refactor: 重构战斗系统支持多单位多动作

This commit is contained in:
xinian
2026-04-04 05:44:02 +08:00
committed by cnb
parent b62b4af628
commit 28d92c1e18
23 changed files with 1652 additions and 311 deletions

View File

@@ -155,13 +155,15 @@ var BattleOverReason = enum.New[struct {
// 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 则击中,2为必中"`
LostHp uint32 `json:"lostHp" fieldDescription:"我方造成的伤害"`
GainHp int32 `json:"gainHp" fieldDescription:"我方获得血量"`
RemainHp int32 `json:"remainHp" fieldDescription:"我方剩余血量"`
MaxHp uint32 `json:"maxHp" fieldDescription:"我方最大血量"`
UserID uint32 `json:"userId" fieldDescription:"玩家的米米号 与野怪对战userid = 0"`
ActorIndex uint32 `json:"actorIndex" fieldDescription:"当前动作所属战斗位"`
TargetIndex uint32 `json:"targetIndex" fieldDescription:"当前动作目标战斗位"`
SkillID uint32 `json:"skillId" fieldDescription:"使用技能的id"`
AttackTime uint32 `json:"attackTime" fieldDescription:"是否击中 如果为0 则miss 如果为1 则击中,2为必中"`
LostHp uint32 `json:"lostHp" fieldDescription:"我方造成的伤害"`
GainHp int32 `json:"gainHp" fieldDescription:"我方获得血量"`
RemainHp int32 `json:"remainHp" fieldDescription:"我方剩余血量"`
MaxHp uint32 `json:"maxHp" fieldDescription:"我方最大血量"`
//颜色
State uint32 `json:"state" `
SkillListLen uint32 `struc:"sizeof=SkillList"`