Files
bl/logic/service/fight/boss/NewSeIdx_1.go
昔念 11f6817d62 feat(fight): 优化战斗逻辑与精灵切换流程
- 在多个战斗控制器方法中添加 defer 调用,确保战斗操作正确延迟执行
- 修改 ChangePet 方法返回值类型,增强接口一致性
- 修复战斗准备阶段逻辑,重构战斗开始信息构建过程
- 移除冗余广播调用,调整 PVE 战斗初始化流程
- 更新 README 中的 pprof 命令地址并完善项目介绍部分

fix(effect): 修复效果叠加逻辑与ID解析问题

- 效果叠加时默认增加一层,而非直接相加参数
- 修正 EffectIDCombiner 类型、CatchTime 的掩码偏移计算错误
- 添加重复效果日志输出,便于调试追踪

feat(boss): 完善BOSS特性实现逻辑

- 修正 NewSel17 特性
2025-11-29 19:26:56 +08:00

50 lines
1.2 KiB
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 effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 基类特性
// 特性的ID=PET cacthtime+eid 这样保证不重复
type NewSel0 struct {
node.EffectNode
//Catchtime int //保存精灵的唯一指令,保证在上场时候正确注入
//Hide bool //是否隐藏 ,所属精灵下场后特性就应该消失
//如果2只精灵一个特性怎么办每次切精灵注入特性
}
// 重写回合结束效果,特性都是无线回合类的
// 次数类本质上也是这种
// 特性,无法被切精灵消除
func (e *NewSel0) Switch(in *input.Input, at info.AttackValue, outpet *info.BattlePetEntity) bool {
return true
}
// 免疫"能力(battle_lv)下降"
type NewSel1 struct {
NewSel0
}
func (e *NewSel1) Prop_Befer(in *input.Input, prop int8, level int8, ptype info.EnumAbilityOpType) bool {
//魂印特性有不在场的情况,绑定时候将精灵和特性绑定
if e.ID().GetCatchTime() != e.Ctx().Our.CurrentPet.Info.CatchTime {
return true
}
//能力下降类
if ptype == info.AbilityOpType.SUB {
return false
}
return true
}
func init() {
input.InitEffect(input.EffectType.NewSel, 1, &NewSel1{})
}