refactor(fight): 统一战斗系统方法命名规范并优化逻辑

- 将所有下划线命名的方法统一为驼峰命名,如 Turn_Start 改为 TurnStart,
  Action_end_ex 改为 ActionEndEx,Turn_End 改为 TurnEnd
- 新增 IsOwner() 方法用于判断当前精灵是否为场上的当前宠物
- 将硬编码的 CatchTime 比较逻辑替换为 IsOwner() 方法调用
- 在 NewSel408 中实现消除对手能力强化效果的具体逻辑
- 修复 effect_74 中衰弱状态的数值引用,使用枚举类型代替硬编码
- 优化 input/fight.go 中的技能选择逻辑,使用伤害值比较代替权重比较
- 移除 shiny.go 中未使用的 utils 导入和相关逻辑
- 修正 NewSel77 从 Turn_End 重命名为 TurnStart 的方法
- 在 input/fight.go 中添加 Damage 方法的注释说明
```
This commit is contained in:
2026-01-05 22:54:41 +08:00
parent 43bec155e1
commit 85f15a72aa
44 changed files with 87 additions and 95 deletions

View File

@@ -133,7 +133,7 @@ func (f *FightC) enterturn(firstAttack, secondAttack *action.SelectSkillAction)
ff.EffectCache = make([]input.Effect, 0) //先把上一回合数据清空,但是应该把本身延续类效果集成过来
ff.EffectLost = make([]input.Effect, 0)
ff.Exec(func(effect input.Effect) bool { //回合开始前
effect.Turn_Start(firstAttack, secondAttack)
effect.TurnStart(firstAttack, secondAttack)
return true
})
})
@@ -255,7 +255,7 @@ func (f *FightC) enterturn(firstAttack, secondAttack *action.SelectSkillAction)
})
defender.Exec(func(effect input.Effect) bool {
effect.Ctx().SkillEntity = currentSkill
effect.Action_end_ex()
effect.ActionEndEx()
return true
})
@@ -340,7 +340,7 @@ func (f *FightC) enterturn(firstAttack, secondAttack *action.SelectSkillAction)
ff.GenSataus()
ff.Exec(func(t input.Effect) bool { //这个是能否使用技能
//结算状态
t.Turn_End() //返回本身结算,如果false,说明不能使用技能了
t.TurnEnd() //返回本身结算,如果false,说明不能使用技能了
return true
})
ff.GenInfo()