Module genshin.models.honkai.chronicle.battlesuits
Honkai chronicle battlesuits.
Classes
class BattlesuitWeapon (**data: Any)-
Expand source code
class BattlesuitWeapon(Equipment): """Battlesuit weapon."""Battlesuit 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
Class variables
var icon : strvar id : intvar max_rarity : intvar model_config : pydantic.config.ConfigDictvar name : strvar rarity : int
Inherited members
class Equipment (**data: Any)-
Expand source code
class Equipment(APIModel, Unique): """Battlesuit equipment.""" id: int name: str rarity: int max_rarity: int icon: str @property def type(self) -> str: """The type of the equipment""" match = re.search(r"/(\w+)Icons/", self.icon) base_type = match[1] if match else "" if not base_type or base_type == "Stigmata": return base_type match = re.search(r"/Weapon_([A-Za-z]+?)_", self.icon) return match[1] if match else "Weapon"Battlesuit 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
Subclasses
Class variables
var icon : strvar id : intvar max_rarity : intvar model_config : pydantic.config.ConfigDictvar name : strvar rarity : int
Instance variables
prop type : str-
Expand source code
@property def type(self) -> str: """The type of the equipment""" match = re.search(r"/(\w+)Icons/", self.icon) base_type = match[1] if match else "" if not base_type or base_type == "Stigmata": return base_type match = re.search(r"/Weapon_([A-Za-z]+?)_", self.icon) return match[1] if match else "Weapon"The type of the equipment
class FullBattlesuit (**data: Any)-
Expand source code
class FullBattlesuit(battlesuit.Battlesuit): """Battlesuit complete with equipped weapon and stigmata.""" level: int weapon: BattlesuitWeapon stigmata: typing.Sequence[Stigma] = Aliased("stigmatas") @pydantic.model_validator(mode="before") def __unnest_char_data(cls, values: dict[str, typing.Any]) -> dict[str, typing.Any]: if isinstance(values.get("character"), typing.Mapping): values.update(values["character"]) values.update(values.get("avatar", {})) return values @pydantic.field_validator("stigmata") def __remove_unequipped_stigmata(cls, value: typing.Sequence[Stigma]) -> typing.Sequence[Stigma]: return [stigma for stigma in value if stigma.id != 0]Battlesuit complete with equipped weapon and stigmata.
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
- Battlesuit
- APIModel
- pydantic.main.BaseModel
- Unique
- abc.ABC
Class variables
var level : intvar model_config : pydantic.config.ConfigDictvar stigmata : Sequence[Stigma]var weapon : BattlesuitWeapon
Inherited members
class Stigma (**data: Any)-
Expand source code
class Stigma(Equipment): """Battlesuit stigma."""Battlesuit stigma.
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
Class variables
var icon : strvar id : intvar max_rarity : intvar model_config : pydantic.config.ConfigDictvar name : strvar rarity : int
Inherited members