bump to 1.9.3

This commit is contained in:
baiqwerdvd 2024-09-18 14:54:41 +08:00
parent 91ee735cd8
commit 6838cb94eb
No known key found for this signature in database
GPG Key ID: 7717E46E1797411A
9 changed files with 86 additions and 86 deletions

View File

@ -1,6 +1,6 @@
[project]
name = "starrail_damage_cal"
version = "1.9.2"
version = "1.9.3"
description = "For StarRail Role Damage Cal"
authors = [
{name = "qwerdvd", email = "105906879+qwerdvd@users.noreply.github.com"},

View File

@ -10,12 +10,12 @@ from .exception import (
)
from .map.name_covert import alias_to_char_name, name_to_avatar_id
from .mihomo.models import MihomoData
from .model import MohomoCharacter
from .model import MihomoCharacter
from .mono.Character import Character
from .to_data import api_to_dict
async def cal_char_info(char_data: MohomoCharacter):
async def cal_char_info(char_data: MihomoCharacter):
char: Character = Character(char_data)
await char.get_equipment_info()
await char.get_char_attribute_bonus()
@ -23,7 +23,7 @@ async def cal_char_info(char_data: MohomoCharacter):
return char
async def cal_info(char_data: MohomoCharacter):
async def cal_info(char_data: MihomoCharacter):
char = await cal_char_info(char_data)
avatar = AvatarInstance(char)
return await avatar.get_damage_info()

View File

@ -12,13 +12,13 @@ from ...damage.Role import (
calculate_shield,
)
from ...logger import logger
from ...model import MohomoAvatarSkill
from ...model import MihomoAvatarSkill
class Seele(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -118,7 +118,7 @@ class Seele(BaseAvatar):
class JingYuan(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -210,7 +210,7 @@ class JingYuan(BaseAvatar):
class Welt(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -319,7 +319,7 @@ class Welt(BaseAvatar):
class Danhengil(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -534,7 +534,7 @@ class Danhengil(BaseAvatar):
class Argenti(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -646,7 +646,7 @@ class Argenti(BaseAvatar):
class Clara(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -775,7 +775,7 @@ class Clara(BaseAvatar):
class Silverwolf(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -857,7 +857,7 @@ class Silverwolf(BaseAvatar):
class Kafka(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -955,7 +955,7 @@ class Kafka(BaseAvatar):
class Blade(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -1100,7 +1100,7 @@ class Blade(BaseAvatar):
class Fuxuan(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -1177,7 +1177,7 @@ class Fuxuan(BaseAvatar):
class Yanqing(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -1272,7 +1272,7 @@ class Yanqing(BaseAvatar):
class Himeko(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -1359,7 +1359,7 @@ class Himeko(BaseAvatar):
class Qingque(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -1437,7 +1437,7 @@ class Qingque(BaseAvatar):
class Jingliu(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -1542,7 +1542,7 @@ class Jingliu(BaseAvatar):
class Topaz(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -1627,7 +1627,7 @@ class Topaz(BaseAvatar):
class Guinaifen(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -1717,7 +1717,7 @@ class Guinaifen(BaseAvatar):
class Gepard(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -1782,7 +1782,7 @@ class Gepard(BaseAvatar):
class Luocha(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -1909,7 +1909,7 @@ class Luocha(BaseAvatar):
class Bailu(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -2005,7 +2005,7 @@ class Bailu(BaseAvatar):
class Lynx(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -2120,7 +2120,7 @@ class Lynx(BaseAvatar):
class Natasha(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -2214,7 +2214,7 @@ class Natasha(BaseAvatar):
class Mar7th(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -2310,7 +2310,7 @@ class Mar7th(BaseAvatar):
class Bronya(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -2374,7 +2374,7 @@ class Bronya(BaseAvatar):
class Yukong(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -2455,7 +2455,7 @@ class Yukong(BaseAvatar):
class Sushang(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -2559,7 +2559,7 @@ class Sushang(BaseAvatar):
class Luka(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -2674,7 +2674,7 @@ class Luka(BaseAvatar):
class DanHeng(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -2751,7 +2751,7 @@ class DanHeng(BaseAvatar):
class Arlan(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -2826,7 +2826,7 @@ class Arlan(BaseAvatar):
class Asta(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -2895,7 +2895,7 @@ class Asta(BaseAvatar):
class Herta(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -2984,7 +2984,7 @@ class Herta(BaseAvatar):
class Serval(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -3078,7 +3078,7 @@ class Serval(BaseAvatar):
class Pela(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -3167,7 +3167,7 @@ class Pela(BaseAvatar):
class Sampo(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -3257,7 +3257,7 @@ class Sampo(BaseAvatar):
class Hook(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -3366,7 +3366,7 @@ class Hook(BaseAvatar):
class Tingyun(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -3420,7 +3420,7 @@ class Tingyun(BaseAvatar):
class Trailblazer(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -3508,7 +3508,7 @@ class Trailblazer(BaseAvatar):
class Trailblazer_K(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -3633,7 +3633,7 @@ class Trailblazer_K(BaseAvatar):
class Huohuo(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -3737,7 +3737,7 @@ class Huohuo(BaseAvatar):
class Hanya(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -3814,7 +3814,7 @@ class Hanya(BaseAvatar):
class DrRatio(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -3913,7 +3913,7 @@ class DrRatio(BaseAvatar):
class RuanMei(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -4011,7 +4011,7 @@ class RuanMei(BaseAvatar):
class XueYi(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -4105,7 +4105,7 @@ class XueYi(BaseAvatar):
class BlackSwan(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -4217,7 +4217,7 @@ class BlackSwan(BaseAvatar):
class Sparkle(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -4287,7 +4287,7 @@ class Sparkle(BaseAvatar):
class Acheron(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -4444,7 +4444,7 @@ class Acheron(BaseAvatar):
class Aventurine(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -4557,7 +4557,7 @@ class Aventurine(BaseAvatar):
class Gallagher(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -4657,7 +4657,7 @@ class Gallagher(BaseAvatar):
class Robin(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
@ -4745,7 +4745,7 @@ class Robin(BaseAvatar):
class AvatarDamage:
@classmethod
def create(cls, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def create(cls, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
if char.id_ == 1214:
return XueYi(char, skills)
if char.id_ == 1306:

View File

@ -11,7 +11,7 @@ from ...damage.Base.model import (
)
from ...damage.Base.SkillBase import BaseSkills
from ...excel.model import AvatarPromotionConfig
from ...model import MohomoAvatarSkill
from ...model import MihomoAvatarSkill
path = Path(__file__).parent.parent
with Path.open(path / "Excel" / "SkillData.json", encoding="utf-8") as f:
@ -41,7 +41,7 @@ class BaseAvatarAttribute(Struct):
class BaseAvatarBuff:
@classmethod
def create(cls, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def create(cls, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
cls.extra_ability_id: List[int] = []
if char.extra_ability:
for extra_ability in char.extra_ability:
@ -111,7 +111,7 @@ class BaseAvatarinfo:
class BaseAvatar:
def __init__(self, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def __init__(self, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
self.Skill = BaseSkills.create(char=char, skills=skills)
self.Buff = BaseAvatarBuff.create(char=char, skills=skills)
self.avatar_id = char.id_

View File

@ -5,7 +5,7 @@ from typing import List
from ...damage.Base.model import (
DamageInstanceAvatar,
)
from ...model import MohomoAvatarSkill
from ...model import MihomoAvatarSkill
path = Path(__file__).parent.parent
with Path.open(path / "Excel" / "SkillData.json", encoding="utf-8") as f:
@ -22,7 +22,7 @@ skill_types = {
class SingleSkill:
def __init__(self, skill: MohomoAvatarSkill):
def __init__(self, skill: MihomoAvatarSkill):
self.id = skill.skillId
self.level = skill.skillLevel
@ -35,7 +35,7 @@ class BaseSkills:
Talent_: SingleSkill
@classmethod
def create(cls, char: DamageInstanceAvatar, skills: List[MohomoAvatarSkill]):
def create(cls, char: DamageInstanceAvatar, skills: List[MihomoAvatarSkill]):
for skill in skills:
skill_attack_type = skill.skillAttackType
if skill_attack_type not in skill_types:

View File

@ -3,9 +3,9 @@ from typing import List, Union
from msgspec import Struct, field
from ...model import (
MohomoAvatarAttributeBonus,
MohomoAvatarExtraAbility,
MohomoAvatarSkill,
MihomoAvatarAttributeBonus,
MihomoAvatarExtraAbility,
MihomoAvatarSkill,
Relic,
)
from ...mono.Character import Character
@ -24,15 +24,15 @@ class DamageInstanceAvatar(Struct):
rank: int
element: str
promotion: int
attribute_bonus: List[MohomoAvatarAttributeBonus]
extra_ability: List[MohomoAvatarExtraAbility]
attribute_bonus: List[MihomoAvatarAttributeBonus]
extra_ability: List[MihomoAvatarExtraAbility]
class DamageInstance:
avatar: DamageInstanceAvatar
weapon: Union[DamageInstanceWeapon, None]
relic: List[Relic]
skill: List[MohomoAvatarSkill]
skill: List[MihomoAvatarSkill]
def __init__(self, char: Character):
self.avatar = DamageInstanceAvatar(

View File

@ -3,7 +3,7 @@ from typing import List
from msgspec import Struct, field
class MohomoAvatarSkill(Struct):
class MihomoAvatarSkill(Struct):
skillId: int
skillName: str
skillEffect: str
@ -11,7 +11,7 @@ class MohomoAvatarSkill(Struct):
skillLevel: int
class MohomoAvatarExtraAbility(Struct):
class MihomoAvatarExtraAbility(Struct):
extraAbilityId: int
extraAbilityLevel: int
@ -22,7 +22,7 @@ class AttributeBounsStatusAdd(Struct):
value: float
class MohomoAvatarAttributeBonus(Struct):
class MihomoAvatarAttributeBonus(Struct):
attributeBonusId: int
attributeBonusLevel: int
statusAdd: AttributeBounsStatusAdd
@ -86,7 +86,7 @@ class RankData(Struct):
rankName: str
class MohomoCharacter(Struct):
class MihomoCharacter(Struct):
uid: str
nickName: str
avatarId: int
@ -95,9 +95,9 @@ class MohomoCharacter(Struct):
avatarRarity: str
avatarLevel: int
avatarPromotion: int
avatarSkill: List[MohomoAvatarSkill]
avatarExtraAbility: List[MohomoAvatarExtraAbility]
avatarAttributeBonus: List[MohomoAvatarAttributeBonus]
avatarSkill: List[MihomoAvatarSkill]
avatarExtraAbility: List[MihomoAvatarExtraAbility]
avatarAttributeBonus: List[MihomoAvatarAttributeBonus]
RelicInfo: List[Relic]
avatarEnName: str
baseAttributes: AvatarBaseAttributes

View File

@ -5,11 +5,11 @@ from ..map.SR_MAP_PATH import (
EquipmentID2AbilityProperty,
RelicSetSkill,
)
from ..model import MohomoCharacter
from ..model import MihomoCharacter
class Character:
def __init__(self, card_prop: MohomoCharacter):
def __init__(self, card_prop: MihomoCharacter):
self.char_level = card_prop.avatarLevel
self.char_id = card_prop.avatarId
self.char_name = card_prop.avatarName

View File

@ -37,10 +37,10 @@ from .model import (
AvatarBaseAttributes,
AvatarEquipmentInfo,
EquipmentBaseAttributes,
MohomoAvatarAttributeBonus,
MohomoAvatarExtraAbility,
MohomoAvatarSkill,
MohomoCharacter,
MihomoAvatarAttributeBonus,
MihomoAvatarExtraAbility,
MihomoAvatarSkill,
MihomoCharacter,
RankData,
Relic,
RelicMainAffix,
@ -52,7 +52,7 @@ async def api_to_dict(
uid: Union[str, None] = None,
mihomo_raw: Union[MihomoData, None] = None,
save_path: Union[Path, None] = None,
) -> Tuple[List[str], Dict[str, MohomoCharacter]]:
) -> Tuple[List[str], Dict[str, MihomoCharacter]]:
if not mihomo_raw:
if not uid:
raise KeyError
@ -74,7 +74,7 @@ async def api_to_dict(
char_name_list: List[str] = []
char_id_list: List[str] = []
char_data_list: Dict[str, MohomoCharacter] = {}
char_data_list: Dict[str, MihomoCharacter] = {}
nickName = PlayerDetailInfo.nickname
avatarList = (
PlayerDetailInfo.avatarDetailList if PlayerDetailInfo.avatarDetailList else []
@ -100,9 +100,9 @@ async def api_to_dict(
async def get_data(
char: Avatar, nick_name: str, uid: str, save_path: Union[Path, None] = None
) -> Tuple[MohomoCharacter, str]:
) -> Tuple[MihomoCharacter, str]:
# 处理基本信息
char_data = MohomoCharacter(
char_data = MihomoCharacter(
uid=uid,
nickName=nick_name,
avatarId=char.avatarId,
@ -141,7 +141,7 @@ async def get_data(
for behavior in char.skillTreeList:
# 处理技能
if f"{char.avatarId}0" == str(behavior.pointId)[0:5]:
skill_temp = MohomoAvatarSkill(
skill_temp = MihomoAvatarSkill(
skillId=char.avatarId * 100 + behavior.pointId % 10,
skillName=skillId2Name[
str(char.avatarId * 100 + behavior.pointId % 10)
@ -158,7 +158,7 @@ async def get_data(
# 处理技能树中的额外能力
if f"{char.avatarId}1" == str(behavior.pointId)[0:5]:
extra_ability_temp = MohomoAvatarExtraAbility(
extra_ability_temp = MihomoAvatarExtraAbility(
extraAbilityId=behavior.pointId,
extraAbilityLevel=behavior.level,
)
@ -166,7 +166,7 @@ async def get_data(
# 处理技能树中的属性加成
if f"{char.avatarId}2" == str(behavior.pointId)[0:5]:
attribute_bonus_temp = MohomoAvatarAttributeBonus(
attribute_bonus_temp = MihomoAvatarAttributeBonus(
attributeBonusId=behavior.pointId,
attributeBonusLevel=behavior.level,
statusAdd=AttributeBounsStatusAdd(