```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

feat(fight): 添加战斗攻击值获取接口并实现战斗规则系统

添加 GetAttackValue 方法到 FightI 接口,用于获取战斗中的攻击值信息。

新增 RuleI 接口定义战斗规则契约,包括 SetArgs 和 Exec 方法。

重构战斗规则系统:
- 创建 RuleBase 基类提供通用参数存储和基础方法
- 实现 17
This commit is contained in:
昔念
2026-03-07 00:26:05 +08:00
parent ef7595a218
commit 4bb7477147
8 changed files with 177 additions and 4 deletions

View File

@@ -127,10 +127,9 @@ type FightOverInfo struct {
// 4=isSysError 系统错误
// 5=isNpcEscape 精灵主动逃跑
Winpet *PetInfo `struc:"skip"`
Round uint32 `struc:"skip"`
LastAttavue AttackValue `struc:"skip"`
Duration uint32 `struc:"skip"` // 对局时长(秒)
Winpet *PetInfo `struc:"skip"`
Round uint32 `struc:"skip"`
// Duration uint32 `struc:"skip"` // 对局时长(秒)
//7 切磋结束
Reason EnumBattleOverReason // 固定值0
WinnerId uint32 // 胜者的米米号 野怪为0