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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Subclasses
Class variables
var items : Sequence[AgentSkillItem]-
One skill can have different forms (?), so there are multiple 'items'.
var level : intvar model_config : pydantic.config.ConfigDictvar type : ZZZSkillType
class AgentSkillItem (**data: Any)-
Expand source code
class AgentSkillItem(APIModel): """An agent skill item.""" title: str text: strAn 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Subclasses
Class variables
var model_config : pydantic.config.ConfigDictvar text : strvar 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Subclasses
Class variables
var four_piece_description : strvar id : intvar model_config : pydantic.config.ConfigDictvar name : strvar owned_num : intvar 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: ZZZSpecialtyA 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Subclasses
Class variables
var effect_description : strvar effect_title : strvar icon : strvar id : intvar level : intvar main_properties : Sequence[ZZZProperty]var model_config : pydantic.config.ConfigDictvar name : strvar profession : ZZZSpecialtyvar 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: strA 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- ZZZProperty
- APIModel
- pydantic.main.BaseModel
Subclasses
Class variables
var add : strvar final : strvar 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var description : strvar id : intvar model_config : pydantic.config.ConfigDictvar name : strvar position : intvar 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var buffed_skills : Sequence[ZZZAwakenedPotentialSkill]var level : intvar model_config : pydantic.config.ConfigDictvar 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var current : intvar has_potential : boolvar items : Sequence[ZZZAwakenedPotential]var max : intvar 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var model_config : pydantic.config.ConfigDictvar skill_details : Sequence[ZZZAwakenedPotentialSkillDetail]var title : strvar 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var description : strvar model_config : pydantic.config.ConfigDictvar 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
Subclasses
Class variables
var element : ZZZElementTypevar faction_icon : strvar faction_name : strvar full_name : strvar id : intvar model_config : pydantic.config.ConfigDictvar name : strvar rarity : Literal['S', 'A']var rectangle_icon : strvar specialty : ZZZSpecialtyvar 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Subclasses
Class variables
var icon : strvar id : intvar level : intvar main_properties : Sequence[ZZZProperty]var model_config : pydantic.config.ConfigDictvar name : strvar position : intvar 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 = 300ZZZ element type.
Ancestors
- enum.IntEnum
- builtins.int
- enum.Enum
Class variables
var ELECTRICvar ETHERvar FIREvar ICEvar LUMIFLUXvar PHYSICALvar 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- ZZZBaseAgent
- APIModel
- pydantic.main.BaseModel
- Unique
- abc.ABC
Class variables
var discs : Sequence[ZZZDisc]var level : intvar model_config : pydantic.config.ConfigDictvar potential : ZZZAwakenedPotentialInfovar 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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- ZZZBaseAgent
- APIModel
- pydantic.main.BaseModel
- Unique
- abc.ABC
Class variables
var level : intvar model_config : pydantic.config.ConfigDictvar rank : int-
Also known as Mindscape Cinema in-game.
Instance variables
-
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.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Subclasses
Class variables
var model_config : pydantic.config.ConfigDictvar name : strvar type : int | ZZZPropertyTypevar 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 = 32303ZZZ property type.
Ancestors
- enum.IntEnum
- builtins.int
- enum.Enum
Class variables
var AGENT_ADRENALINEvar AGENT_ANOMALY_MASTERYvar AGENT_ANOMALY_PROFICIENCYvar AGENT_ASAvar AGENT_ATKvar AGENT_CRIT_DMGvar AGENT_CRIT_RATEvar AGENT_DEFvar AGENT_ENERGY_GENvar AGENT_HPvar AGENT_IMPACTvar AGENT_LACERATION_DMGvar AGENT_PENvar AGENT_PEN_RATIOvar AGENT_SHEER_FORCEvar ANOMALY_MASTERYvar ANOMALY_PROFICIENCYvar ATK_PERCENTvar BASE_ATKvar BASE_DEFvar BASE_HPvar BASE_PENvar CRIT_DMGvar CRIT_RATEvar DEF_PERCENTvar DISC_ELECTRIC_DMG_BONUSvar DISC_ETHER_DMG_BONUSvar DISC_FIRE_DMG_BONUSvar DISC_ICE_DMG_BONUSvar DISC_PHYSICAL_DMG_BONUSvar DISC_WIND_DMG_BONUSvar ELECTRIC_DMG_BONUSvar ENERGY_REGENvar ETHER_DMG_BONUSvar FIRE_DMG_BONUSvar FLAT_ATKvar FLAT_DEFvar FLAT_HPvar FLAT_PENvar HP_PERCENTvar ICE_DMG_BONUSvar IMPACTvar PEN_PERCENTvar PHYSICAL_DMG_BONUSvar 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 = 5ZZZ agent skill type.
Ancestors
- enum.IntEnum
- builtins.int
- enum.Enum
Class variables
var ASSISTvar BASIC_ATTACKvar CHAIN_ATTACKvar CORE_SKILLvar DODGEvar 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 = 7ZZZ agent compatible specialty.
Ancestors
- enum.IntEnum
- builtins.int
- enum.Enum
Class variables
var ANOMALYvar ARMORERvar ATTACKvar DEFENSEvar RUPTUREvar STUNvar SUPPORT