```
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

@@ -1,8 +1,10 @@
package input
import (
"blazing/logic/service/common"
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/modules/player/model"
"github.com/alpacahq/alpacadecimal"
)
@@ -72,3 +74,7 @@ type Effect interface {
ID(...EffectIDCombiner) EffectIDCombiner
//GetSkill() *BattleSkillEntity //获得技能ctx
}
type RuleI interface {
SetArgs(param ...int)
Exec(common.FightI, *model.FightOverInfo) bool
}