32 lines
673 B
Go
32 lines
673 B
Go
package node
|
|
|
|
// 回合开始前
|
|
func (this *EffectNode) PreTurnStart() bool {
|
|
return true
|
|
|
|
}
|
|
|
|
// 回合开始
|
|
func (this *EffectNode) OnTurnStart() bool {
|
|
return true
|
|
}
|
|
|
|
// 如果是次数类的,那就相当于重写回合结束计数器
|
|
func (this *EffectNode) PreTurnEnd() bool {
|
|
panic("not implemented") // TODO: Implement
|
|
}
|
|
|
|
// 回合结束一次性effect清楚掉
|
|
|
|
func (this *EffectNode) TurnEnd() bool {
|
|
this.duration--
|
|
// if this.duration > 0 {
|
|
// this.Duration(this.Duration(0) - 1) //回合数减1
|
|
// }
|
|
if this.duration != 0 { // 保留 (负数表示永久)
|
|
this.GetBattle().Effects.AddEffect(this) //重新添加buff到上下文
|
|
|
|
}
|
|
return true
|
|
}
|