50 lines
935 B
Go
50 lines
935 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/battle/node"
|
||
"blazing/logic/service/fight/info"
|
||
)
|
||
|
||
/**
|
||
* n回合内没有击败,则对方死亡
|
||
*/
|
||
type Effect62 struct {
|
||
node.EffectNode
|
||
Hide bool // 是否隐藏 正常是命中就可用,镇魂歌是回合数到才可用
|
||
}
|
||
|
||
func init() {
|
||
info.NodeM.AddEffect(&Effect62{})
|
||
}
|
||
|
||
// 重写EFFectID
|
||
func (this *Effect62) ID() int {
|
||
this.EffectNode.ParamSize(1) //设置参数个数
|
||
return 62
|
||
}
|
||
|
||
func (this *Effect62) OnDamage() bool {
|
||
|
||
if this.Hide { //如果本可用
|
||
|
||
//直接秒杀对方
|
||
|
||
}
|
||
|
||
return true
|
||
}
|
||
func (this *Effect62) TurnEnd() bool {
|
||
this.EffectNode.TurnEnd() //先调用回合
|
||
|
||
if this.Duration(0) != 1 { //说明还没到生效节点
|
||
this.Hide = true //隐藏效果
|
||
}
|
||
|
||
return true
|
||
}
|
||
|
||
// 激活回合,比如说镇魂歌秒杀
|
||
func (this *Effect62) OnActive() bool {
|
||
return !this.Hide //返回是否隐藏,正常的话都是可以使用的
|
||
}
|