Files
bl/logic/service/fight/node/PetSwitch.go
昔念 f281b949ba ```
feat(fight): 调整战斗逻辑与精灵切换机制

- 优化精灵切换时的效果处理,增加切换事件支持
- 修复战斗中超时逻辑和技能CD计算问题
- 增强状态效果在精灵上下场时的清理机制
- 修改伤害计算逻辑以提高准确性
- 更新战斗池初始化参数提升并发性能

此外,同步更新了宠物放生字段命名及逻辑处理方式,并调整网络通信中的限流策略。
```
2025-11-13 02:43:00 +08:00

23 lines
446 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package node
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
)
// 切精灵返回false重写change方法来实现切换效果
// 精灵切换相关触发
func (e *EffectNode) Switch(in *input.Input, outpet, inpet *info.BattlePetEntity) bool {
//说明是我放切精灵
if e.Input == in {
//下场,执行消回合效果
// e.ctx.Our.CancelAll()
///我放下场
e.Alive(false)
}
return true
}