refactor(fight): 重构战斗系统

- 移除 NodeManager 相关代码,改为使用 input 包中的 Effect
- 重构 FightC 结构,添加 GetRand 方法
- 新增 BaseAction 结构和 NewBaseAction 函数
- 更新 effect 包中的 Effect 结构和相关方法
- 调整 BattleSkillEntity 中的 AttackTime 方法,增加 Hit 字段
- 更新 AttackValue 结构,保留原有的 AttackTime 字段
- 重构战斗逻辑,包括回合开始前的处理、技能使用、伤害计算等
This commit is contained in:
2025-09-14 03:36:26 +08:00
parent 06e8ae3d9c
commit 9d87ce9e46
19 changed files with 858 additions and 246 deletions

View File

@@ -74,7 +74,7 @@ func NewAttackValue(userid uint32) *AttackValue {
type AttackValue struct {
UserID uint32 `json:"userId" fieldDescription:"玩家的米米号 与野怪对战userid = 0"`
SkillID uint32 `json:"skillId" fieldDescription:"使用技能的id"`
AttackTime uint32 `json:"attackTime" fieldDescription:"是否击中 如果为0 则miss 如果为1 则击中"`
AttackTime uint32 `json:"attackTime" fieldDescription:"是否击中 如果为0 则miss 如果为1 则击中,2为必中"`
LostHp uint32 `json:"lostHp" fieldDescription:"我方造成的伤害"`
GainHp int32 `json:"gainHp" fieldDescription:"我方获得血量"`
RemainHp int32 `json:"remainHp" fieldDescription:"我方剩余血量"`