- 重构了 BattleSkillEntity 结构,改名为 SkillEntity - 优化了 Input 结构,移除了冗余的 Effect 容器 - 调整了 Effect 接口,增加了 SetInput 和 Alive 方法 - 重构了战斗逻辑中的技能使用和效果处理流程 - 优化了代码结构,提高了可读性和可维护性
29 lines
454 B
Go
29 lines
454 B
Go
package node
|
|
|
|
import "blazing/logic/service/fight/input"
|
|
|
|
// 回合开始前
|
|
func (this *EffectNode) PreTurnStart() bool {
|
|
return true
|
|
|
|
}
|
|
|
|
// 回合开始
|
|
func (this *EffectNode) OnTurnStart(opp *input.Input) bool {
|
|
|
|
//处理异常状态
|
|
|
|
return true
|
|
}
|
|
|
|
// 回合结束一次性effect清楚掉
|
|
|
|
func (this *EffectNode) TurnEnd() bool {
|
|
|
|
if this.duration == 0 { // 保留 (负数表示永久)
|
|
this.NotAlive = true
|
|
}
|
|
this.duration--
|
|
return true
|
|
}
|