fix: 修复伤害锁逻辑错误
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-07 11:44:16 +08:00
committed by cnb
parent bbaa71f4b2
commit fe8e2786c2

View File

@@ -23,14 +23,11 @@ func (e *Effect68) DamageLockEx(t *info.DamageZone) bool {
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
//fmt.Println("Effect68_o", t.Damage)
//伤害溢出
if t.Type == info.DamageType.Red && t.Damage.Cmp(e.Ctx().Our.CurrentPet.GetHP()) == 1 {
//e.Ctx().Our.CurrentPet.Info.Hp = 1
t.Damage = e.Ctx().Our.CurrentPet.GetHP().Sub(alpacadecimal.NewFromInt(1))
if t.Type != info.DamageType.Red {
return true
}
//fmt.Println("Effect68_n", t.Damage)
t.Damage = alpacadecimal.Min(e.Ctx().Our.CurrentPet.GetHP().Sub(alpacadecimal.NewFromInt(1)), t.Damage)
return true
}