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

@@ -22,7 +22,7 @@ type Effect interface {
Damage_SUB(ctx Ctx) bool // 受击触发 这时候就是点数减伤
Damage_Lock(ctx Ctx) bool //锁定伤害
Damage_Post(ctx Ctx) bool // 伤害结算后触发(血量扣除后),克制等重写伤害
//Damage_Post(ctx Ctx) bool // 伤害结算后触发(血量扣除后),克制等重写伤害
Damage_Shield(ctx Ctx) bool // 护盾值变化时触发
Damage_Use(ctx Ctx) bool // 伤害作用
Skill_SubPP(ctx Ctx) bool //技能PP减少节点

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

View File

@@ -26,7 +26,7 @@ type Input struct {
BeforeDiv decimal.Decimal
BeforeSUB decimal.Decimal
BeforeLock decimal.Decimal //锁伤 先锁受击方,再锁攻击方 受击方免疫也是这么锁 免疫等于锁0
BeforePost decimal.Decimal
//BeforePost decimal.Decimal
//OldAttack int //攻击伤害被挡前伤害记录
} //伤害容器