feat: 实现战斗效果逻辑和接口重构
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
xinian
2026-03-28 21:57:22 +08:00
committed by cnb
parent 0780eae582
commit 875ad668aa
332 changed files with 2062 additions and 1442 deletions

View File

@@ -4,7 +4,6 @@ import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"blazing/modules/player/model"
"github.com/alpacahq/alpacadecimal"
@@ -14,7 +13,7 @@ import (
// 通用效果:当次攻击击败对方精灵时,触发指定行为
// -----------------------------------------------------------
type EffectDefeatTrigger struct {
node.EffectNode
FixedDuration1Base
can bool // 标记技能是否生效(当次攻击有效)
effectID int // 效果ID用于区分不同触发行为
isd bool
@@ -80,10 +79,6 @@ func (e *EffectDefeatTrigger) SwitchIn(in *input.Input) bool {
}
// SetArgs统一设置持续时间为1回合
func (e *EffectDefeatTrigger) SetArgs(t *input.Input, a ...int) {
e.EffectNode.SetArgs(t, a...)
e.EffectNode.Duration(1)
}
// -----------------------------------------------------------
// 根据effectID触发对应行为