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

32 lines
798 B
Go

package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
// 545 - n回合内若受到伤害高于m则对手XX
type Effect545 struct {
node.EffectNode
}
func (e *Effect545) Skill_Use_ex() bool {
if e.Ctx().Our.SumDamage.Cmp(alpacadecimal.NewFromInt(int64(e.Args()[1].IntPart()))) > 0 {
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(e.Args()[2].IntPart())) // 以麻痹为例
if statusEffect != nil {
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
}
}
return true
}
func (e *Effect545) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(a[0]) // 持续n回合
}
func init() {
input.InitEffect(input.EffectType.NewSel, 545, &Effect545{})
}