Files
bl/logic/service/fight/effect/443.go

34 lines
796 B
Go
Raw Normal View History

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.Ctx().Our.SumDamage.Cmp(damageThreshold) > 0 {
// 对手疲惫x回合
tiredEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(info.PetStatus.Tired))
if tiredEffect != nil {
tiredEffect.Duration(int(e.Args()[2].IntPart())) // x回合
e.Ctx().Opp.AddEffect(e.Ctx().Our, tiredEffect)
}
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 443, &Effect443{})
}