This commit is contained in:
2025-04-22 15:31:57 +08:00
parent 5608d89808
commit baf7163e50
6 changed files with 285 additions and 311 deletions
+7
View File
@@ -409,6 +409,13 @@ class Character(CharacterProperty):
"""获取技能名字"""
return [skill.name for skill in self.skills if (type == 'all' or skill.type == type) and (damage == 'all' or skill.damage == damage)]
def GetWeaponType(self) -> str:
"""获取武器类型"""
weapon = self.charEquipInfo["武器"].equInfo
if weapon is None:
return None
else:
return weapon.itemDetailType
# endregion
# region 计算相关
+5 -1
View File
@@ -171,6 +171,9 @@ class ActiveSkill(Skill):
power = getattr(self, f'power{i}', None)
if power is None:
setattr(self, f'power{i}', 1)
dataplus = getattr(self, f'dataplus{i}', None)
if dataplus is None:
setattr(self, f'dataplus{i}', 0)
def skillInfo(self, mode: str | None = None):
if mode is not None:
@@ -191,12 +194,13 @@ class ActiveSkill(Skill):
keys = [key.replace("data","") for key in dir(self) if key.startswith('data')]
for i in keys:
data = getattr(self, f'data{i}', [])
dataplus = getattr(self, f'dataplus{i}', 0)
if len(data) == 0:
break
if lv < len(data):
hit = getattr(self, f'hit{i}', 1)
power = getattr(self, f'power{i}', 1)
res += hit * power * data[lv]
res += hit * power * (data[lv] + dataplus)
return res
def getWeaponCDRatio(self):