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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user