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
移除 `NotAlive` 字段,改用 `Alive()` 方法通过 HP 判断存活状态,修正相关效果触发逻辑。
This commit is contained in:
@@ -31,7 +31,7 @@ func (e *SelfKill) OnSkill() bool {
|
||||
Damage: alpacadecimal.NewFromInt(int64(e.Ctx().Our.CurrentPet.Info.MaxHp)),
|
||||
})
|
||||
e.can = true
|
||||
e.Ctx().Our.CurrentPet.NotAlive = true
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -210,6 +210,6 @@ func (e *Effect112) Skill_Use() bool {
|
||||
Type: info.DamageType.Fixed,
|
||||
Damage: alpacadecimal.Min(alpacadecimal.NewFromInt(n), e.Ctx().Opp.CurrentPet.GetHP().Sub(alpacadecimal.NewFromInt(1))),
|
||||
})
|
||||
e.Ctx().Our.CurrentPet.NotAlive = true
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user