45 lines
926 B
Go
45 lines
926 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/info"
|
||
"blazing/logic/service/fight/input"
|
||
"blazing/logic/service/fight/node"
|
||
)
|
||
|
||
// {
|
||
// "id": 571,
|
||
// "argsNum": 2,
|
||
// "info": "{0}回合后对对手造成{1}点固定伤害 重复使用无法叠加"
|
||
// },
|
||
type Effect571 struct {
|
||
node.EffectNode
|
||
duy int
|
||
}
|
||
|
||
func (e *Effect571) TurnEnd() {
|
||
|
||
e.duy--
|
||
|
||
}
|
||
|
||
// 这个实际上在对方回合执行的
|
||
func (e *Effect571) Skill_Use() bool {
|
||
//fmt.Println("镇魂歌剩余回合", e.duy)
|
||
//defer e.Alive(false)
|
||
damage := e.Args()[1] // 固定伤害值
|
||
|
||
if e.duy <= 0 { //说明对方没有切换精灵
|
||
// 如果回合数为0或负数,立即造成伤害
|
||
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
||
Type: info.DamageType.Fixed,
|
||
Damage: damage,
|
||
})
|
||
e.Alive(false)
|
||
}
|
||
return true
|
||
}
|
||
|
||
func init() {
|
||
input.InitEffect(input.EffectType.Skill, 571, &Effect571{})
|
||
}
|