53 lines
939 B
Go
53 lines
939 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
// Effect 571: {0}回合后对对手造成{1}点固定伤害 重复使用无法叠加
|
|
type Effect571 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
func (e *Effect571) OnSkill() bool {
|
|
addSubEffect(e.Ctx().Our, e.Ctx().Opp, &e.EffectNode, &Effect571Sub{}, -1)
|
|
return true
|
|
}
|
|
|
|
type Effect571Sub struct {
|
|
node.EffectNode
|
|
delay int
|
|
}
|
|
|
|
func (e *Effect571Sub) SetArgs(t *input.Input, a ...int) {
|
|
e.EffectNode.SetArgs(t, a...)
|
|
e.Duration(-1)
|
|
if len(a) > 0 {
|
|
e.delay = a[0]
|
|
}
|
|
}
|
|
|
|
func (e *Effect571Sub) TurnEnd() {
|
|
if e.delay > 0 {
|
|
e.delay--
|
|
return
|
|
}
|
|
|
|
if len(e.Args()) < 2 {
|
|
e.Alive(false)
|
|
return
|
|
}
|
|
|
|
e.Ctx().Our.Damage(e.Ctx().Opp, &info.DamageZone{
|
|
Type: info.DamageType.Fixed,
|
|
Damage: e.Args()[1],
|
|
})
|
|
e.Alive(false)
|
|
}
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 571, &Effect571{})
|
|
}
|