StarRailDamageCal/starrail_damage_cal/model.py

107 lines
2.0 KiB
Python
Raw Normal View History

2024-09-18 06:39:29 +00:00
from typing import List
2024-09-17 16:28:39 +00:00
from msgspec import Struct, field
2024-09-18 06:54:41 +00:00
class MihomoAvatarSkill(Struct):
2024-09-17 16:28:39 +00:00
skillId: int
skillName: str
skillEffect: str
skillAttackType: str
skillLevel: int
2024-09-18 06:54:41 +00:00
class MihomoAvatarExtraAbility(Struct):
2024-09-17 16:28:39 +00:00
extraAbilityId: int
extraAbilityLevel: int
class AttributeBounsStatusAdd(Struct):
property_: str = field(name="property")
name: str
value: float
2024-09-18 06:54:41 +00:00
class MihomoAvatarAttributeBonus(Struct):
2024-09-17 16:28:39 +00:00
attributeBonusId: int
attributeBonusLevel: int
statusAdd: AttributeBounsStatusAdd
class RelicMainAffix(Struct):
AffixID: int
Property: str
Name: str
Value: float
class RelicSubAffix(Struct):
SubAffixID: int
Property: str
Name: str
Cnt: int
Step: int
Value: float
class Relic(Struct):
relicId: int
relicName: str
SetId: int
SetName: str
Type: int
MainAffix: RelicMainAffix
SubAffixList: List[RelicSubAffix]
Level: int = 0
class AvatarBaseAttributes(Struct):
hp: float
attack: float
defence: float
CriticalChanceBase: float
CriticalDamageBase: float
speed: float
BaseAggro: float
class EquipmentBaseAttributes(Struct):
hp: float
attack: float
defence: float
class AvatarEquipmentInfo(Struct):
equipmentID: int
equipmentName: str
equipmentLevel: int
equipmentPromotion: int
equipmentRank: int
equipmentRarity: int
baseAttributes: EquipmentBaseAttributes
class RankData(Struct):
rankId: int
rankName: str
2024-09-18 06:54:41 +00:00
class MihomoCharacter(Struct):
2024-09-17 16:28:39 +00:00
uid: str
nickName: str
avatarId: int
avatarName: str
avatarElement: str
avatarRarity: str
avatarLevel: int
avatarPromotion: int
2024-09-18 06:54:41 +00:00
avatarSkill: List[MihomoAvatarSkill]
avatarExtraAbility: List[MihomoAvatarExtraAbility]
avatarAttributeBonus: List[MihomoAvatarAttributeBonus]
2024-09-17 16:28:39 +00:00
RelicInfo: List[Relic]
avatarEnName: str
baseAttributes: AvatarBaseAttributes
equipmentInfo: AvatarEquipmentInfo
rank: int
rankList: List[RankData]