This commit is contained in:
qwerdvd 2023-10-30 15:25:15 +08:00
parent f39712816f
commit 4514b05781
No known key found for this signature in database
GPG Key ID: A3AF89C783404769

View File

@ -14,6 +14,20 @@ from starrail_damage_cal.mono.Character import Character
from starrail_damage_cal.to_data import api_to_dict from starrail_damage_cal.to_data import api_to_dict
async def cal_char_info(char_data: Dict):
char: Character = Character(char_data)
await char.get_equipment_info()
await char.get_char_attribute_bonus()
await char.get_relic_info()
return char
async def cal_info(char_data: Dict):
char = await cal_char_info(char_data)
avatar = AvatarInstance(char)
return await avatar.get_damage_info()
class DamageCal: class DamageCal:
@classmethod @classmethod
async def cal_info(cls, char_data: Dict): async def cal_info(cls, char_data: Dict):