Files
bl/logic/service/fight/effect/effect_487.go
昔念 d367f9d1d4
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
41
2026-03-07 23:54:01 +08:00

29 lines
620 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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