Module genshin.models.zzz.character
Classes
class AgentSkill (**data: Any)
-
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 allowself
as a field name.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'."""
Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var items : Sequence[AgentSkillItem]
-
One skill can have different forms (?), so there are multiple 'items'.
var level : int
var model_computed_fields
var model_config : pydantic.config.ConfigDict
var model_fields
var type : ZZZSkillType
class AgentSkillItem (**data: Any)
-
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 allowself
as a field name.Expand source code
class AgentSkillItem(APIModel): """An agent skill item.""" title: str text: str
Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var model_computed_fields
var model_config : pydantic.config.ConfigDict
var model_fields
var text : str
var title : str
class DiscSetEffect (**data: Any)
-
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 allowself
as a field name.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")
Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var four_piece_description : str
var id : int
var model_computed_fields
var model_config : pydantic.config.ConfigDict
var model_fields
var name : str
var owned_num : int
var two_piece_description : str
class WEngine (**data: Any)
-
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 allowself
as a field name.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
Ancestors
- APIModel
- pydantic.main.BaseModel
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_computed_fields
var model_config : pydantic.config.ConfigDict
var model_fields
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)
-
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 allowself
as a field name.Expand source code
class ZZZAgentProperty(ZZZProperty): """A property model, but for agents.""" add: str final: str
Ancestors
- ZZZProperty
- APIModel
- pydantic.main.BaseModel
Class variables
var add : str
var final : str
var model_computed_fields
var model_config : pydantic.config.ConfigDict
var model_fields
class ZZZAgentRank (**data: Any)
-
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 allowself
as a field name.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")
Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var description : str
var id : int
var model_computed_fields
var model_config : pydantic.config.ConfigDict
var model_fields
var name : str
var position : int
var unlocked : bool
class ZZZBaseAgent (**data: Any)
-
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 allowself
as a field name.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") flat_icon: str = Aliased("hollow_icon_path") @property def base_icon_url(self) -> str: return "https://act-webstatic.hoyoverse.com/game_record/zzzv2" @property def square_icon(self) -> str: """Example: https://act-webstatic.hoyoverse.com/game_record/zzz/role_square_avatar/role_square_avatar_1131.png""" return f"{self.base_icon_url}/role_square_avatar/role_square_avatar_{self.id}.png" @property def rectangle_icon(self) -> str: """Example: https://act-webstatic.hoyoverse.com/game_record/zzz/role_rectangle_avatar/role_rectangle_avatar_1131.png""" return f"{self.base_icon_url}/role_rectangle_avatar/role_rectangle_avatar_{self.id}.png" @property def banner_icon(self) -> str: """Example: https://act-webstatic.hoyoverse.com/game_record/zzz/role_vertical_painting/role_vertical_painting_1131.png""" return f"{self.base_icon_url}/role_vertical_painting/role_vertical_painting_{self.id}.png"
Ancestors
Subclasses
Class variables
var element : ZZZElementType
var faction_icon : str
var flat_icon : str
var full_name : str
var id : int
var model_computed_fields
var model_config : pydantic.config.ConfigDict
var model_fields
var name : str
var rarity : Literal['S', 'A']
var specialty : ZZZSpecialty
Instance variables
-
Expand source code
@property def banner_icon(self) -> str: """Example: https://act-webstatic.hoyoverse.com/game_record/zzz/role_vertical_painting/role_vertical_painting_1131.png""" return f"{self.base_icon_url}/role_vertical_painting/role_vertical_painting_{self.id}.png"
prop base_icon_url : str
-
Expand source code
@property def base_icon_url(self) -> str: return "https://act-webstatic.hoyoverse.com/game_record/zzzv2"
prop rectangle_icon : str
-
Expand source code
@property def rectangle_icon(self) -> str: """Example: https://act-webstatic.hoyoverse.com/game_record/zzz/role_rectangle_avatar/role_rectangle_avatar_1131.png""" return f"{self.base_icon_url}/role_rectangle_avatar/role_rectangle_avatar_{self.id}.png"
prop square_icon : str
-
Example: https://act-webstatic.hoyoverse.com/game_record/zzz/role_square_avatar/role_square_avatar_1131.png
Expand source code
@property def square_icon(self) -> str: """Example: https://act-webstatic.hoyoverse.com/game_record/zzz/role_square_avatar/role_square_avatar_1131.png""" return f"{self.base_icon_url}/role_square_avatar/role_square_avatar_{self.id}.png"
class ZZZDisc (**data: Any)
-
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 allowself
as a field name.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")
Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var icon : str
var id : int
var level : int
var main_properties : Sequence[ZZZProperty]
var model_computed_fields
var model_config : pydantic.config.ConfigDict
var model_fields
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)
-
ZZZ element type.
Expand source code
class ZZZElementType(enum.IntEnum): """ZZZ element type.""" PHYSICAL = 200 FIRE = 201 ICE = 202 ELECTRIC = 203 ETHER = 205
Ancestors
- enum.IntEnum
- builtins.int
- enum.Enum
Class variables
var ELECTRIC
var ETHER
var FIRE
var ICE
var PHYSICAL
class ZZZFullAgent (**data: Any)
-
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 allowself
as a field name.Expand source code
class ZZZFullAgent(ZZZBaseAgent): """Character with equipment.""" level: int rank: int """Also known as Mindscape Cinema in-game.""" faction_name: str = Aliased("camp_name_mi18n") 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."""
Ancestors
- ZZZBaseAgent
- APIModel
- pydantic.main.BaseModel
- Unique
- abc.ABC
Class variables
var discs : Sequence[ZZZDisc]
var faction_name : str
var level : int
var model_computed_fields
var model_config : pydantic.config.ConfigDict
var model_fields
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 : Optional[WEngine]
Inherited members
class ZZZPartialAgent (**data: Any)
-
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 allowself
as a field name.Expand source code
class ZZZPartialAgent(ZZZBaseAgent): """Character without any equipment.""" level: int rank: int """Also known as Mindscape Cinema in-game."""
Ancestors
- ZZZBaseAgent
- APIModel
- pydantic.main.BaseModel
- Unique
- abc.ABC
Class variables
var level : int
var model_computed_fields
var model_config : pydantic.config.ConfigDict
var model_fields
var rank : int
-
Also known as Mindscape Cinema in-game.
Inherited members
class ZZZProperty (**data: Any)
-
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 allowself
as a field name.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]: # Prevent enum crash try: return ZZZPropertyType(v) except ValueError: return v
Ancestors
- APIModel
- pydantic.main.BaseModel
Subclasses
Class variables
var model_computed_fields
var model_config : pydantic.config.ConfigDict
var model_fields
var name : str
var type : Union[int, ZZZPropertyType]
var value : str
class ZZZPropertyType (value, names=None, *, module=None, qualname=None, type=None, start=1)
-
ZZZ property type.
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 DMG bonus PHYSICAL_DMG_BONUS = 315 FIRE_DMG_BONUS = 316 ICE_DMG_BONUS = 317 ELECTRIC_DMG_BONUS = 318 ETHER_DMG_BONUS = 319 # Disc drive and w-engine CRIT_RATE = 20103 CRIT_DMG = 21103 ANOMALY_PROFICIENCY = 31203 ANOMALY_MASTERY = 31402 ENERGY_REGEN = 30502 IMPACT = 12202 BASE_ATK = 12101 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
Ancestors
- enum.IntEnum
- builtins.int
- enum.Enum
Class variables
var AGENT_ANOMALY_MASTERY
var AGENT_ANOMALY_PROFICIENCY
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_PEN
var AGENT_PEN_RATIO
var ANOMALY_MASTERY
var ANOMALY_PROFICIENCY
var ATK_PERCENT
var BASE_ATK
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 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
class ZZZSkillType (value, names=None, *, module=None, qualname=None, type=None, start=1)
-
ZZZ agent skill type.
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
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)
-
ZZZ agent compatible specialty.
Expand source code
class ZZZSpecialty(enum.IntEnum): """ZZZ agent compatible specialty.""" ATTACK = 1 STUN = 2 ANOMALY = 3 SUPPORT = 4 DEFENSE = 5
Ancestors
- enum.IntEnum
- builtins.int
- enum.Enum
Class variables
var ANOMALY
var ATTACK
var DEFENSE
var STUN
var SUPPORT