```
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:
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
type Effect interface {
|
||||
Fight_Start() bool //战斗开始 首发也写这里吧,别)单独写了
|
||||
Turn_Start(fattack, sattack *action.SelectSkillAction) //回合开始,注入特性
|
||||
TurnStart(fattack, sattack *action.SelectSkillAction) //回合开始,注入特性
|
||||
ComparePre(fattack, sattack *action.SelectSkillAction) bool //比较前对优先级的修改
|
||||
//技能命中前的返回值代表是否可以出手 ,对命中本身的修改应该是对上下文本身的修改
|
||||
//对技能修改 行动开始前,注入视为等参数在这里实现
|
||||
@@ -34,7 +34,7 @@ type Effect interface {
|
||||
//Damage_Use() bool // 伤害作用
|
||||
Skill_Use_ex() bool //技能PP减少节点
|
||||
Skill_Useed() bool //技能PP减少节点
|
||||
Action_end_ex() bool
|
||||
ActionEndEx() bool
|
||||
Action_end() bool
|
||||
//OnDefeat(opp *Input) bool // 精灵被击败时触发
|
||||
|
||||
@@ -46,7 +46,7 @@ type Effect interface {
|
||||
// OnOwnerSwitchIn() bool // 所属玩家精灵出战时触发
|
||||
// OnOwnerSwitchOut() bool // 所属玩家精灵下场时触发
|
||||
|
||||
Turn_End() //回合结束计算
|
||||
TurnEnd() //回合结束计算
|
||||
HookAction() bool //出手前的hook参数,返回false阻止继续出手
|
||||
//PreBattleEnd() bool //战斗结束前
|
||||
OnBattleEnd() bool //战斗结束
|
||||
|
||||
Reference in New Issue
Block a user