fix: 修复伤害锁定逻辑错误
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -26,7 +26,12 @@ func (e *Effect68) DamageLockEx(t *info.DamageZone) bool {
|
||||
if t.Type != info.DamageType.Red {
|
||||
return true
|
||||
}
|
||||
t.Damage = alpacadecimal.Min(e.Ctx().Our.CurrentPet.GetHP().Sub(alpacadecimal.NewFromInt(1)), t.Damage)
|
||||
if e.Ctx().Our.CurrentPet.GetHP().Cmp(alpacadecimal.NewFromInt(1)) <= 0 {
|
||||
return true
|
||||
}
|
||||
if t.Damage.Cmp(e.Ctx().Our.CurrentPet.GetHP()) > 0 {
|
||||
t.Damage = e.Ctx().Our.CurrentPet.GetHP().Sub(alpacadecimal.NewFromInt(1))
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user