artipy.stats
Submodules
artipy.stats.mainstat module
Mainstat dataclass for a Genshin Impact artifact.
artipy.stats.stats module
Stat types and data for Genshin Impact artifacts.
artipy.stats.substat module
Substats for Genshin Impact artifacts.
- class artipy.stats.substat.SubStat(name: StatType, _value: float | int | Decimal = Decimal('0'), rarity: int = 5)[source]
Bases:
Stat
Substat dataclass for a Genshin Impact artifact.
- rarity: int
artipy.stats.utils module
Utilities for stats module.
- artipy.stats.utils.map_to_decimal(values: Iterable[float | int]) tuple[Decimal, ...] [source]
Map the values to Decimal.
- Parameters:
values (Iterable[float | int]) – The values to map.
- Returns:
The mapped values.
- Return type:
tuple[Decimal, …]
- artipy.stats.utils.possible_mainstat_values(stat: StatType, rarity: int) tuple[Decimal, ...] [source]
Get the possible values for a mainstat based on the stat type and rarity. Map the values to Decimal.
- Parameters:
stat (StatType) – The stat type to get the values for.
rarity (int) – The rarity of the artifact.
- Returns:
The possible values for the mainstat.
- Return type:
tuple[Decimal, …]
- artipy.stats.utils.possible_substat_values(stat: StatType, rarity: int) tuple[Decimal, ...] [source]
Get the possible values for a substat based on the stat type and rarity. Map the values to Decimal.
- Parameters:
stat (StatType) – The stat type to get the values for.
rarity (int) – The rarity of the artifact.
- Returns:
The possible values for the substat.
- Return type:
tuple[Decimal, …]
Module contents
Module for handling stats and their data.
- class artipy.stats.MainStat(name: StatType, _value: float | int | Decimal = Decimal('0'), rarity: int = 5)[source]
Bases:
Stat
Mainstat dataclass for a Genshin Impact artifact.
- rarity: int
- class artipy.stats.SubStat(name: StatType, _value: float | int | Decimal = Decimal('0'), rarity: int = 5)[source]
Bases:
Stat
Substat dataclass for a Genshin Impact artifact.
- rarity: int