feat(fight): 重构战斗系统技能逻辑与精灵切换功能

- 优化技能执行流程,统一使用 SelectSkillAction 作为技能载体
- 移除冗余的技能 ID 字段,简化数据结构
- 调整命中判断和技能效果触发机制,提升准确性
- 修改精灵切换与捕获相关方法参数格式
- 更新技能列表结构为动态数组以支持灵活长度
- 完善睡眠等异常状态的处理逻辑
- 修复战斗中技能 PP 扣减及副本还原问题
- 清理无用代码,如多余的 FindWithIndex 函数定义
- 强化验证码缓存键命名规则,增强安全性
This commit is contained in:
2025-10-26 20:56:03 +08:00
parent 2678cd9685
commit e75ecd413d
25 changed files with 195 additions and 184 deletions

View File

@@ -1,7 +1,6 @@
package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
@@ -21,12 +20,15 @@ func init() {
Owner: true,
},
}
t.Effect = t
input.InitEffect(input.EffectType.Skill, 62, t)
}
func (e *Effect62) OnHit(*input.Input, *info.SkillEntity) {
func (e *Effect62) OnSkill(ctx input.Ctx) bool {
if !e.Hit() {
return true
}
if e.Duration() != 1 { //说明还没到生效节点
e.Hide = true //隐藏效果
} else {
@@ -42,7 +44,7 @@ func (e *Effect62) OnHit(*input.Input, *info.SkillEntity) {
//否则触发秒杀 在对面使用技能后
//return true
}
return false
}
// 默认添加回合