refactor(fight): 重构战斗逻辑中技能实体传递方式

将战斗逻辑中使用的 action.SelectSkillAction 替换为 info.SkillEntity,
以统一技能数据结构。同时更新相关函数签名和字段引用。

此外,移除了未使用的 Attack 字段,并调整了部分逻辑实现以提高代码清晰度。
还修复了 effect_power_doblue.go 中对输入参数的错误引用问题。

最后,修改了通道命名规范(ActionChan -> actionChan, GetActionChan -> GetOverChan),
并引入 overchan 用于战斗结束通知,提升并发安全性与语义明确性。
```
This commit is contained in:
2025-11-10 02:29:00 +08:00
parent a4041aaa66
commit 4b34445dfc
12 changed files with 64 additions and 71 deletions

View File

@@ -1,7 +1,6 @@
package common
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"math/rand"
)
@@ -19,5 +18,5 @@ type FightI interface {
UseItem(c PlayerI, cacthid, itemid uint32)
CanEscape() bool
IsFirst(c PlayerI) bool
GetActionChan() chan action.BattleActionI
GetOverChan() chan struct{}
}