Files
bl/logic/service/fight/node/PetSwitch.go
昔念 6ba9c3549c feat(fight): 优化精灵切换逻辑与技能效果处理
- 修改 `ChangePet` 方法,记录初始攻击值并在切换时正确传递
- 简化多个 effect 的初始化方式,移除冗余的 `EffectNode` 字段
- 增强 Effect58 和 Effect67 的逻辑判断,增加空指针检查和类型判断
- 引入 decimal 包用于精确血量计算
- 统一 `Switch` 接口参数,增强状态类和节点类的兼容性
- 修正部分技能效果的触发条件和持续时间设置
- 调整回合结束逻辑,注释掉原有后手增益机制
2025-11-13 23:06:55 +08:00

23 lines
460 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, at info.AttackValue, outpet *info.BattlePetEntity) bool {
//说明是我放切精灵
if e.Input == in {
//下场,执行消回合效果
// e.ctx.Our.CancelAll()
///我放下场
e.Alive(false)
}
return true
}