package effect import ( "blazing/logic/service/fight/info" "blazing/logic/service/fight/input" "github.com/alpacahq/alpacadecimal" ) // Effect 443: {0}回合内若受到的伤害超过{1}则对手疲惫{2}回合 type Effect443 struct { RoundEffectArg0Base } func (e *Effect443) Skill_Use_ex() bool { damageThreshold := alpacadecimal.NewFromInt(int64(e.Args()[1].IntPart())) if e.CarrierInput().SumDamage.Cmp(damageThreshold) > 0 { // 对手疲惫x回合 tiredEffect := e.CarrierInput().InitEffect(input.EffectType.Status, int(info.PetStatus.Tired)) if tiredEffect != nil { tiredEffect.Duration(int(e.Args()[2].IntPart())) // x回合 e.TargetInput().AddEffect(e.CarrierInput(), tiredEffect) } } return true } func init() { input.InitEffect(input.EffectType.Skill, 443, &Effect443{}) }