feat: 使用预处理特效伤害数组
This commit is contained in:
@@ -167,7 +167,7 @@ class CalcEquipMixin(CharacterBase):
|
||||
apply_uppercase_attrs(self, suit)
|
||||
if func is not None and oathEffect is None:
|
||||
# print(f'套装 {suit.name} 生效')
|
||||
func(self)
|
||||
func(self, suit.effectDamage)
|
||||
if max_point_suit != max_point_oath_suit:
|
||||
self.charOathSkillId = '1'
|
||||
oathSkillEffect = []
|
||||
@@ -187,7 +187,9 @@ class CalcEquipMixin(CharacterBase):
|
||||
# 誓约套装效果生效
|
||||
apply_uppercase_attrs(self, oathSuit)
|
||||
if skill is not None:
|
||||
oathSkillEffect.append(skill)
|
||||
base_suit = next((x for x in suitList if x.suitId == oathSuit.suitId), None)
|
||||
base_effect_damage = [] if base_suit is None else base_suit.effectDamage
|
||||
oathSkillEffect.append((skill, base_effect_damage + skill.effectDamage))
|
||||
# 誓约技能效果生效
|
||||
apply_uppercase_attrs(self, skill)
|
||||
self.oathSkillInfo.append(skill)
|
||||
@@ -205,11 +207,11 @@ class CalcEquipMixin(CharacterBase):
|
||||
'skills': [{'id': skill.id, 'skillId': i.skillId, 'name': i.name, 'imageUrl': i.imageUrl, 'enable': i.skillId == '1' or max_point_oath_suit == max_point_suit} for i in skills],
|
||||
# 'value': oathSuit.value,
|
||||
}
|
||||
for skill in oathSkillEffect:
|
||||
for skill, effectDamage in oathSkillEffect:
|
||||
func = equs.funs.execture(f'oath_skill_{skill.id}')
|
||||
if func is not None:
|
||||
# print(f'誓约技能 {skill.id} 生效')
|
||||
func(self)
|
||||
func(self, effectDamage)
|
||||
# 太初积分以上,每超过70点数增加1%技能攻击力
|
||||
if self.max_point >= 2550:
|
||||
skillAttack = (self.max_point - 2550) // 70 * 0.02
|
||||
@@ -235,7 +237,7 @@ class CalcEquipMixin(CharacterBase):
|
||||
if fun is None:
|
||||
continue
|
||||
apply_uppercase_attrs(self, equ)
|
||||
fun(self)
|
||||
fun(self, equ.effectDamage)
|
||||
fun = effects.execture(f'enchant_{enchat}')
|
||||
if fun is not None:
|
||||
fun(self)
|
||||
|
||||
Reference in New Issue
Block a user