feat:优化职业技能关联实现
This commit is contained in:
@@ -742,26 +742,10 @@ class Skill20(ActiveSkill):
|
||||
# 7点 : {value7}%
|
||||
data7 = get_data(f'{prefix}/{uuid}', 7)
|
||||
|
||||
_maxLayer = 6
|
||||
maxLayer = 6
|
||||
|
||||
associate = [{'type': '*endpower', 'data': data0}, {'type': '*endpower'}]
|
||||
|
||||
@property
|
||||
def maxLayer(self):
|
||||
return self._maxLayer
|
||||
|
||||
@maxLayer.setter
|
||||
def maxLayer(self, value):
|
||||
if self._maxLayer != value:
|
||||
skills = self.char.GetSkillNames('all', True)
|
||||
if self.lv > 0:
|
||||
raito = (getattr(self, f'data{int(value)}')[self.lv] - 100) / (getattr(self, f'data{int(self.maxLayer)}')[self.lv] - 100)
|
||||
for name in skills:
|
||||
skill = self.char.GetSkillByName(name)
|
||||
if skill.type == 'active' and skill.damage:
|
||||
skill.endpower *= raito
|
||||
self._maxLayer = value
|
||||
|
||||
def update_skill_attribute(self, skill, type, old, new, data, ratio=100, weapon=(), weapon_type=None, weapon_options=()):
|
||||
if len(data) == 0:
|
||||
data = getattr(self, f'data{int(self.maxLayer)}')
|
||||
@@ -1080,7 +1064,7 @@ class Skill27(PassiveSkill):
|
||||
associate = [
|
||||
{'type': '$*PAtkP', 'data': data0},
|
||||
{'type': '*cdReduce', 'data': data1, 'exceptSkills': []},
|
||||
{'type': '+maxLayer', 'data': data2, 'ratio': 1, 'skills': ['终结追击']},
|
||||
{'type': '+maxLayer', 'data': data2, 'ratio': 1, 'skills': ['终结之击']},
|
||||
]
|
||||
|
||||
# 旋舞斩
|
||||
|
||||
Reference in New Issue
Block a user