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{}) }