Files
bl/logic/service/fight/effect/effect_487.go
xinian 9c6f3988de
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
refactor: 重构 CurrentPet 为 CurPet
2026-04-04 04:34:43 +08:00

28 lines
566 B
Go

package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// Effect 487: 若对手的体力大于{0},则每次使用自身攻击+{1}
type Effect487 struct {
node.EffectNode
}
func (e *Effect487) OnSkill() bool {
opponentHp := e.Ctx().Opp.CurPet[0].GetHP()
if opponentHp.Cmp(alpacadecimal.NewFromInt(400)) > 0 {
// 提升自身攻击等级
e.Ctx().Our.SetProp(e.Ctx().Our, 0, 1)
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 487, &Effect487{})
}