refactor(fight/input): 移除Damage_Post相关逻辑,清理伤害结算后触发代码

This commit is contained in:
1
2025-09-28 09:31:08 +00:00
parent 1655005741
commit f08a5c4ef0
3 changed files with 3 additions and 12 deletions

View File

@@ -90,22 +90,13 @@ func (u *Input) Damage(ctx Ctx) {
return true
})
}
ctx.Input.DamageZone.BeforePost = ctx.DamageZone.Damage
if ok {
ok = ctx.Input.Exec(func(t Effect) bool {
t.Damage_Lock(ctx)
return true
})
}
if ctx.DamageZone.Type == info.DamageType.Red {
ctx.AttackValue.LostHp = uint32(ctx.DamageZone.Damage.IntPart()) //红伤落实
}
if uint32(ctx.DamageZone.Damage.IntPart()) > u.CurrentPet.Info.Hp {
u.CurrentPet.Info.Hp = 0
} else {
u.CurrentPet.Info.Hp = u.CurrentPet.Info.Hp - ctx.AttackValue.LostHp