Module genshin.models.zzz.character

ZZZ character models.

Classes

class AgentSkill (**data: Any)
Expand source code
class AgentSkill(APIModel):
    """ZZZ agent skill model."""

    level: int
    type: ZZZSkillType = Aliased("skill_type")
    items: typing.Sequence[AgentSkillItem]
    """One skill can have different forms (?), so there are multiple 'items'."""

ZZZ agent skill model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Subclasses

Class variables

var items : Sequence[AgentSkillItem]

One skill can have different forms (?), so there are multiple 'items'.

var level : int
var model_config : pydantic.config.ConfigDict
var type : ZZZSkillType
class AgentSkillItem (**data: Any)
Expand source code
class AgentSkillItem(APIModel):
    """An agent skill item."""

    title: str
    text: str

An agent skill item.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Subclasses

Class variables

var model_config : pydantic.config.ConfigDict
var text : str
var title : str
class DiscSetEffect (**data: Any)
Expand source code
class DiscSetEffect(APIModel):
    """A disc set effect."""

    id: int = Aliased("suit_id")
    name: str
    owned_num: int = Aliased("own")
    two_piece_description: str = Aliased("desc1")
    four_piece_description: str = Aliased("desc2")

A disc set effect.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Subclasses

Class variables

var four_piece_description : str
var id : int
var model_config : pydantic.config.ConfigDict
var name : str
var owned_num : int
var two_piece_description : str
class WEngine (**data: Any)
Expand source code
class WEngine(APIModel):
    """A ZZZ W-engine, it's like a weapon."""

    id: int
    level: int
    name: str
    icon: str
    refinement: typing.Literal[1, 2, 3, 4, 5] = Aliased("star")
    rarity: typing.Literal["B", "A", "S"]
    properties: typing.Sequence[ZZZProperty]
    main_properties: typing.Sequence[ZZZProperty]
    effect_title: str = Aliased("talent_title")
    effect_description: str = Aliased("talent_content")
    profession: ZZZSpecialty

A ZZZ W-engine, it's like a weapon.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Subclasses

Class variables

var effect_description : str
var effect_title : str
var icon : str
var id : int
var level : int
var main_properties : Sequence[ZZZProperty]
var model_config : pydantic.config.ConfigDict
var name : str
var profession : ZZZSpecialty
var properties : Sequence[ZZZProperty]
var rarity : Literal['B', 'A', 'S']
var refinement : Literal[1, 2, 3, 4, 5]
class ZZZAgentProperty (**data: Any)
Expand source code
class ZZZAgentProperty(ZZZProperty):
    """A property model, but for agents."""

    add: str
    final: str

A property model, but for agents.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Subclasses

Class variables

var add : str
var final : str
var model_config : pydantic.config.ConfigDict
class ZZZAgentRank (**data: Any)
Expand source code
class ZZZAgentRank(APIModel):
    """ZZZ agent rank model."""

    id: int
    name: str
    description: str = Aliased("desc")
    position: int = Aliased("pos")
    unlocked: bool = Aliased("is_unlocked")

ZZZ agent rank model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var description : str
var id : int
var model_config : pydantic.config.ConfigDict
var name : str
var position : int
var unlocked : bool
class ZZZAwakenedPotential (**data: Any)
Expand source code
class ZZZAwakenedPotential(APIModel):
    """ZZZ awakened potential model."""

    level: int = Aliased("awaken_level")
    name: str = Aliased("level_show_name")
    buffed_skills: typing.Sequence[ZZZAwakenedPotentialSkill] = Aliased("awaken_skill_items")

ZZZ awakened potential model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var buffed_skills : Sequence[ZZZAwakenedPotentialSkill]
var level : int
var model_config : pydantic.config.ConfigDict
var name : str
class ZZZAwakenedPotentialInfo (**data: Any)
Expand source code
class ZZZAwakenedPotentialInfo(APIModel):
    """ZZZ agent awakened potential info model."""

    has_potential: bool = Aliased("has_awaken_system")
    current: int = Aliased("awaken_level")
    max: int = Aliased("awaken_max_level")
    items: typing.Sequence[ZZZAwakenedPotential] = Aliased("skill_awaken_items")

ZZZ agent awakened potential info model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var current : int
var has_potential : bool
var items : Sequence[ZZZAwakenedPotential]
var max : int
var model_config : pydantic.config.ConfigDict
class ZZZAwakenedPotentialSkill (**data: Any)
Expand source code
class ZZZAwakenedPotentialSkill(APIModel):
    """ZZZ awakened potential skill model."""

    type: ZZZSkillType = Aliased("skill_type")
    title: str = Aliased("awaken_simple_info")
    skill_details: typing.Sequence[ZZZAwakenedPotentialSkillDetail] = Aliased("skill_items")

ZZZ awakened potential skill model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var model_config : pydantic.config.ConfigDict
var skill_details : Sequence[ZZZAwakenedPotentialSkillDetail]
var title : str
var type : ZZZSkillType
class ZZZAwakenedPotentialSkillDetail (**data: Any)
Expand source code
class ZZZAwakenedPotentialSkillDetail(APIModel):
    """ZZZ awakened potential skill detail model."""

    name: str = Aliased("title")
    description: str = Aliased("text")

ZZZ awakened potential skill detail model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var description : str
var model_config : pydantic.config.ConfigDict
var name : str
class ZZZBaseAgent (**data: Any)
Expand source code
class ZZZBaseAgent(APIModel, Unique):
    """ZZZ base agent model."""

    id: int  # 4 digit number
    element: ZZZElementType = Aliased("element_type")
    rarity: typing.Literal["S", "A"]
    name: str = Aliased("name_mi18n")
    full_name: str = Aliased("full_name_mi18n")
    specialty: ZZZSpecialty = Aliased("avatar_profession")
    faction_icon: str = Aliased("group_icon_path")
    rectangle_icon: str = Aliased("hollow_icon_path")
    square_icon: str = Aliased("role_square_url")
    faction_name: str = Aliased("camp_name_mi18n")

ZZZ base agent model.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Subclasses

Class variables

var element : ZZZElementType
var faction_icon : str
var faction_name : str
var full_name : str
var id : int
var model_config : pydantic.config.ConfigDict
var name : str
var rarity : Literal['S', 'A']
var rectangle_icon : str
var specialty : ZZZSpecialty
var square_icon : str
class ZZZDisc (**data: Any)
Expand source code
class ZZZDisc(APIModel):
    """A ZZZ disc, like an artifact in Genshin."""

    id: int
    level: int
    name: str
    icon: str
    rarity: typing.Literal["B", "A", "S"]
    main_properties: typing.Sequence[ZZZProperty]
    properties: typing.Sequence[ZZZProperty]
    set_effect: DiscSetEffect = Aliased("equip_suit")
    position: int = Aliased("equipment_type")

A ZZZ disc, like an artifact in Genshin.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Subclasses

Class variables

var icon : str
var id : int
var level : int
var main_properties : Sequence[ZZZProperty]
var model_config : pydantic.config.ConfigDict
var name : str
var position : int
var properties : Sequence[ZZZProperty]
var rarity : Literal['B', 'A', 'S']
var set_effect : DiscSetEffect
class ZZZElementType (value, names=None, *, module=None, qualname=None, type=None, start=1)
Expand source code
class ZZZElementType(enum.IntEnum):
    """ZZZ element type."""

    PHYSICAL = 200
    FIRE = 201
    ICE = 202
    ELECTRIC = 203
    WIND = 204
    ETHER = 205
    LUMIFLUX = 300

ZZZ element type.

Ancestors

  • enum.IntEnum
  • builtins.int
  • enum.Enum

Class variables

var ELECTRIC
var ETHER
var FIRE
var ICE
var LUMIFLUX
var PHYSICAL
var WIND
class ZZZFullAgent (**data: Any)
Expand source code
class ZZZFullAgent(ZZZBaseAgent):
    """Character with equipment."""

    level: int
    rank: int
    """Also known as Mindscape Cinema in-game."""
    properties: typing.Sequence[ZZZAgentProperty]
    discs: typing.Sequence[ZZZDisc] = Aliased("equip")
    w_engine: typing.Optional[WEngine] = Aliased("weapon", default=None)
    skills: typing.Sequence[AgentSkill]
    ranks: typing.Sequence[ZZZAgentRank]
    """Also known as Mindscape Cinemas in-game."""
    potential: ZZZAwakenedPotentialInfo = Aliased("skill_awaken")

    banner_icon: str = Aliased("role_vertical_painting_url")

    @staticmethod
    def _extract_skin_id(url: str) -> typing.Optional[int]:
        filename = url.split("/")[-1].split(".")[0]
        parts = filename.split("_")

        if len(parts) >= 5:
            return int(parts[-1])
        return None

    @property
    def outfit_id(self) -> typing.Optional[int]:
        return self._extract_skin_id(self.banner_icon)

Character with equipment.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var banner_icon : str
var discs : Sequence[ZZZDisc]
var level : int
var model_config : pydantic.config.ConfigDict
var potential : ZZZAwakenedPotentialInfo
var properties : Sequence[ZZZAgentProperty]
var rank : int

Also known as Mindscape Cinema in-game.

var ranks : Sequence[ZZZAgentRank]

Also known as Mindscape Cinemas in-game.

var skills : Sequence[AgentSkill]
var w_engine : WEngine | None

Instance variables

prop outfit_id : int | None
Expand source code
@property
def outfit_id(self) -> typing.Optional[int]:
    return self._extract_skin_id(self.banner_icon)
class ZZZPartialAgent (**data: Any)
Expand source code
class ZZZPartialAgent(ZZZBaseAgent):
    """Character without any equipment."""

    level: int
    rank: int
    """Also known as Mindscape Cinema in-game."""

    @property
    def banner_icon(self) -> str:
        return f"https://act-webstatic.hoyoverse.com/game_record/zzzv2/role_vertical_painting/role_vertical_painting_{self.id}.png"

Character without any equipment.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Class variables

var level : int
var model_config : pydantic.config.ConfigDict
var rank : int

Also known as Mindscape Cinema in-game.

Instance variables

prop banner_icon : str
Expand source code
@property
def banner_icon(self) -> str:
    return f"https://act-webstatic.hoyoverse.com/game_record/zzzv2/role_vertical_painting/role_vertical_painting_{self.id}.png"
class ZZZProperty (**data: Any)
Expand source code
class ZZZProperty(APIModel):
    """A property (stat) for disc or w-engine."""

    name: str = Aliased("property_name")
    type: typing.Union[int, ZZZPropertyType] = Aliased("property_id")
    value: str = Aliased("base")

    @pydantic.field_validator("type", mode="before")
    def __cast_id(cls, v: int) -> typing.Union[int, ZZZPropertyType]:
        return prevent_enum_error(v, ZZZPropertyType)

A property (stat) for disc or w-engine.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Ancestors

Subclasses

Class variables

var model_config : pydantic.config.ConfigDict
var name : str
var type : int | ZZZPropertyType
var value : str
class ZZZPropertyType (value, names=None, *, module=None, qualname=None, type=None, start=1)
Expand source code
class ZZZPropertyType(enum.IntEnum):
    """ZZZ property type."""

    # Agent prop
    AGENT_HP = 1
    AGENT_ATK = 2
    AGENT_DEF = 3
    AGENT_IMPACT = 4
    AGENT_CRIT_RATE = 5
    AGENT_CRIT_DMG = 6
    AGENT_ANOMALY_MASTERY = 7
    AGENT_ANOMALY_PROFICIENCY = 8
    AGENT_PEN_RATIO = 9
    AGENT_ENERGY_GEN = 11
    AGENT_PEN = 232
    AGENT_SHEER_FORCE = 19
    AGENT_ADRENALINE = 20
    AGENT_LACERATION_DMG = 28
    AGENT_ASA = 25

    # Agent DMG bonus
    PHYSICAL_DMG_BONUS = 315
    FIRE_DMG_BONUS = 316
    ICE_DMG_BONUS = 317
    ELECTRIC_DMG_BONUS = 318
    ETHER_DMG_BONUS = 319
    WIND_DMG_BONUS = 323

    # Disc drive and w-engine
    CRIT_RATE = 20103
    CRIT_DMG = 21103

    ANOMALY_PROFICIENCY = 31203
    ANOMALY_MASTERY = 31402
    ENERGY_REGEN = 30502
    IMPACT = 12202

    BASE_HP = 11101
    BASE_ATK = 12101
    BASE_DEF = 13101
    BASE_PEN = 23101

    FLAT_HP = 11103
    FLAT_ATK = 12103
    FLAT_DEF = 13103
    FLAT_PEN = 23203

    HP_PERCENT = 11102
    ATK_PERCENT = 12102
    DEF_PERCENT = 13102
    PEN_PERCENT = 23103

    DISC_PHYSICAL_DMG_BONUS = 31503
    DISC_FIRE_DMG_BONUS = 31603
    DISC_ICE_DMG_BONUS = 31703
    DISC_ELECTRIC_DMG_BONUS = 31803
    DISC_ETHER_DMG_BONUS = 31903
    DISC_WIND_DMG_BONUS = 32303

ZZZ property type.

Ancestors

  • enum.IntEnum
  • builtins.int
  • enum.Enum

Class variables

var AGENT_ADRENALINE
var AGENT_ANOMALY_MASTERY
var AGENT_ANOMALY_PROFICIENCY
var AGENT_ASA
var AGENT_ATK
var AGENT_CRIT_DMG
var AGENT_CRIT_RATE
var AGENT_DEF
var AGENT_ENERGY_GEN
var AGENT_HP
var AGENT_IMPACT
var AGENT_LACERATION_DMG
var AGENT_PEN
var AGENT_PEN_RATIO
var AGENT_SHEER_FORCE
var ANOMALY_MASTERY
var ANOMALY_PROFICIENCY
var ATK_PERCENT
var BASE_ATK
var BASE_DEF
var BASE_HP
var BASE_PEN
var CRIT_DMG
var CRIT_RATE
var DEF_PERCENT
var DISC_ELECTRIC_DMG_BONUS
var DISC_ETHER_DMG_BONUS
var DISC_FIRE_DMG_BONUS
var DISC_ICE_DMG_BONUS
var DISC_PHYSICAL_DMG_BONUS
var DISC_WIND_DMG_BONUS
var ELECTRIC_DMG_BONUS
var ENERGY_REGEN
var ETHER_DMG_BONUS
var FIRE_DMG_BONUS
var FLAT_ATK
var FLAT_DEF
var FLAT_HP
var FLAT_PEN
var HP_PERCENT
var ICE_DMG_BONUS
var IMPACT
var PEN_PERCENT
var PHYSICAL_DMG_BONUS
var WIND_DMG_BONUS
class ZZZSkillType (value, names=None, *, module=None, qualname=None, type=None, start=1)
Expand source code
class ZZZSkillType(enum.IntEnum):
    """ZZZ agent skill type."""

    BASIC_ATTACK = 0
    DODGE = 2
    ASSIST = 6
    SPECIAL_ATTACK = 1
    CHAIN_ATTACK = 3
    CORE_SKILL = 5

ZZZ agent skill type.

Ancestors

  • enum.IntEnum
  • builtins.int
  • enum.Enum

Class variables

var ASSIST
var BASIC_ATTACK
var CHAIN_ATTACK
var CORE_SKILL
var DODGE
var SPECIAL_ATTACK
class ZZZSpecialty (value, names=None, *, module=None, qualname=None, type=None, start=1)
Expand source code
class ZZZSpecialty(enum.IntEnum):
    """ZZZ agent compatible specialty."""

    ATTACK = 1
    STUN = 2
    ANOMALY = 3
    SUPPORT = 4
    DEFENSE = 5
    RUPTURE = 6
    ARMORER = 7

ZZZ agent compatible specialty.

Ancestors

  • enum.IntEnum
  • builtins.int
  • enum.Enum

Class variables

var ANOMALY
var ARMORER
var ATTACK
var DEFENSE
var RUPTURE
var STUN
var SUPPORT