Files
bl/logic/service/fight/node/Turn.go
昔念 7f443736bc feat(fight): 重构战斗效果触发机制与ID管理
- 统一将 Skill_Hit_Pre 和 Skill_Hit_Pre_ex 方法重命名为 Action_start 和 Action_start_ex
- 新增 Action_end 和 Action_end_ex 接口方法,完善行动周期控制
- 修改效果ID生成逻辑,使用 EffectIDCombiner 替代简单整数运算,提升扩展性
- 调整状态类效果判断方式,通过前缀匹配识别状态类型
- 增加随机持续时间和参数设置功能,增强部分效果的表现力
- 优化战斗流程中效果执行时机,确保行为前后逻辑完整闭环
2025-11-22 00:44:42 +08:00

39 lines
852 B
Go

package node
import (
"blazing/logic/service/fight/action"
)
func (e *EffectNode) Action_start(fattack, sattack *action.SelectSkillAction) bool {
return true
}
func (e *EffectNode) Action_start_ex(fattack, sattack *action.SelectSkillAction) bool {
return true
}
func (e *EffectNode) Compare_Pre(fattack, sattack *action.SelectSkillAction) bool { //比较前对优先级的修改 {
return true
}
func (e *EffectNode) Turn_Start(fattack, sattack *action.SelectSkillAction) {
//panic("not implemented") // TODO: Implement
}
func (e *EffectNode) Turn_End() {
if e.duration == 0 { // 保留 (负数表示永久)
e.Alive(false)
} else {
// e.trunl.Do(func() {
// if !e.Ctx().Our.FightC.IsFirst(e.Ctx().Our.Player) { //如果我方后手,那就给回合+1
// e.duration++
// // e.Alive(true)
// }
// })
e.duration--
}
}