refactor(fight): 修正技能攻击处理逻辑,优化暴击破防条件判断
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user