fix: 修正战斗伤害锁与结束判定逻辑
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-08 18:43:56 +08:00
committed by cnb
parent c252d6b5f9
commit 53cf3191c2
2 changed files with 11 additions and 5 deletions

View File

@@ -26,10 +26,10 @@ func (e *Effect68) DamageLockEx(t *info.DamageZone) bool {
if t.Type != info.DamageType.Red {
return true
}
if e.Ctx().Our.CurrentPet.GetHP().Cmp(alpacadecimal.NewFromInt(1)) <= 0 {
if e.Ctx().Our.CurrentPet.GetHP().IntPart() <= 1 {
return true
}
if t.Damage.Cmp(e.Ctx().Our.CurrentPet.GetHP()) > 0 {
if t.Damage.Cmp(e.Ctx().Our.CurrentPet.GetHP()) >= 0 {
t.Damage = e.Ctx().Our.CurrentPet.GetHP().Sub(alpacadecimal.NewFromInt(1))
}