refactor(fight): 修正技能攻击处理逻辑,优化暴击破防条件判断

This commit is contained in:
1
2025-11-04 16:55:14 +00:00
parent f7b1e6ce08
commit e398c31834

View File

@@ -260,7 +260,7 @@ func (f *FightC) processSkillAttack(attacker, defender *input.Input, a *action.S
attacker.Exec(func(t input.Effect) bool { //计算命中 miss改命中
t.Skill_Hit(input.Ctx{ //计算变威力
Input: attacker,
Input: defender,
SelectSkillAction: a,
}) //相当于先调整基础命中,不光调整命中,这里还能调整技能属性,暴击率
@@ -295,9 +295,10 @@ func (f *FightC) processSkillAttack(attacker, defender *input.Input, a *action.S
if attacker.AttackValue.IsCritical == 1 {
//暴击破防
if a.SkillEntity.Category() == info.Category.PHYSICAL {
if a.SkillEntity.Category() == info.Category.PHYSICAL && defender.Prop[1] > 0 {
defender.Prop[1] = 0
} else if a.SkillEntity.Category() == info.Category.SPECIAL {
} else if a.SkillEntity.Category() == info.Category.SPECIAL && defender.Prop[3] > 0 {
defender.Prop[3] = 0
}