27 lines
641 B
Go
27 lines
641 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/input"
|
|
|
|
"github.com/alpacahq/alpacadecimal"
|
|
)
|
|
|
|
// Effect 545: {0}回合内若受到伤害高于{1}则对手{2}
|
|
type Effect545 struct {
|
|
RoundEffectArg0Base
|
|
}
|
|
|
|
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 init() {
|
|
input.InitEffect(input.EffectType.Skill, 545, &Effect545{})
|
|
}
|