This commit was merged in pull request #1.
This commit is contained in:
2026-06-02 20:56:07 +08:00
parent f824177aa5
commit bb3ad71d21
38 changed files with 1304 additions and 532 deletions
+16 -6
View File
@@ -32,12 +32,15 @@ class CharacterEquipInfo:
precision: float
"""秘宝精度"""
def __init__(self, info={}, equVerison=0, part='') -> None:
def __init__(self, info=None, equVerison=0, part='', equipments=None) -> None:
if info is None:
info = {}
# info['fusion'] = info.get('fusion', None)
info['precision'] = info.get('precision', 0)
# info['weaponFusion'] = info.get('weaponFusion', None)
self.__dict__.update(info)
equ = get_equipment(equVerison).equ_dict.get(self.id, None)
equipments = equipments or get_equipment(equVerison)
equ = equipments.equ_dict.get(self.id, None)
# fusion = get_equipment(equVerison).stone_dict.get(self.fusion, None)
if equ is not None and (equ.itemType == part or equ.itemDetailType == part or (equ.itemType == '武器' and part == '副武器')):
self.equInfo = equ.adapt(self.adaptation)
@@ -60,10 +63,13 @@ class CharacterOathInfo:
oathInfo: Union['Oath', None]
"""誓约信息"""
def __init__(self, info={}, equVerison=0, position='') -> None:
def __init__(self, info=None, equVerison=0, position='', equipments=None) -> None:
if info is None:
info = {}
self.__dict__.update(info)
self.id = str(self.id)
oath = get_equipment(equVerison).oath_dict.get(self.id, None)
equipments = equipments or get_equipment(equVerison)
oath = equipments.oath_dict.get(self.id, None)
if oath is not None and position in oath.position:
self.oathInfo = oath.adapt(self.adaptation)
self.adaptation = min(self.adaptation, self.oathInfo.max_adaptation)
@@ -79,7 +85,9 @@ class CharacterEmblemInfo:
lv: int
"""星徽等级"""
def __init__(self, info={}) -> None:
def __init__(self, info=None) -> None:
if info is None:
info = {}
self.__dict__.update(info)
@@ -89,7 +97,9 @@ class CharacterWeaponInfo(CharacterEquipInfo):
upgradeDetail: dict
"""贴膜详情"""
def __init__(self, info={}) -> None:
def __init__(self, info=None) -> None:
if info is None:
info = {}
self.__dict__.update(info)