47 lines
1.1 KiB
Go
47 lines
1.1 KiB
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
// Effect 1381: 消除对手回合类效果,消除成功则自身{0}回合内免疫并反弹异常状态
|
|
type Effect1381 struct{ node.EffectNode }
|
|
|
|
func (e *Effect1381) Skill_Use() bool {
|
|
if len(e.Args()) == 0 {
|
|
return true
|
|
}
|
|
|
|
before := activeTurnEffectCount(e.Ctx().Opp)
|
|
e.Ctx().Opp.CancelTurn(e.Ctx().Our)
|
|
if before <= 0 {
|
|
return true
|
|
}
|
|
|
|
sub := e.Ctx().Our.InitEffect(input.EffectType.Sub, 1381, int(e.Args()[0].IntPart()))
|
|
if sub != nil {
|
|
e.Ctx().Our.AddEffect(e.Ctx().Our, sub)
|
|
}
|
|
return true
|
|
}
|
|
|
|
type Effect1381Sub struct{ RoundEffectArg0Base }
|
|
|
|
func (e *Effect1381Sub) EFFect_Befer(in *input.Input, effEffect input.Effect) bool {
|
|
if in != e.Ctx().Opp || !input.IS_Stat(effEffect) {
|
|
return true
|
|
}
|
|
|
|
statusEffect := e.Ctx().Our.InitEffect(input.EffectType.Status, int(effEffect.ID().Suffix()))
|
|
if statusEffect != nil {
|
|
e.Ctx().Opp.AddEffect(e.Ctx().Our, statusEffect)
|
|
}
|
|
return false
|
|
}
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 1381, &Effect1381{})
|
|
input.InitEffect(input.EffectType.Sub, 1381, &Effect1381Sub{})
|
|
}
|