refactor: 优化先手判断逻辑,增加IsFirst接口
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-09 12:28:37 +08:00
committed by cnb
parent f3ada66c11
commit f35af82bec
16 changed files with 65 additions and 31 deletions

View File

@@ -16,7 +16,8 @@ type EffectNode struct {
Input *input.Input
stacks int // 当前层数
id input.EffectIDCombiner
canStack bool // 最大叠加层数 ,正常都是不允许叠加的,除了衰弱特殊效果 ,异常和能力的叠层
canStack bool // 最大叠加层数 ,正常都是不允许叠加的,除了衰弱特殊效果 ,异常和能力的叠层
isFirst bool
SideEffectArgs []int // 附加效果参数
// owner bool //是否作用自身
Success bool // 是否执行成功 成功XXX失败XXX
@@ -86,6 +87,14 @@ func (e *EffectNode) CanStack(t ...bool) bool {
}
return e.canStack
}
func (e *EffectNode) IsFirst(t ...bool) bool {
if len(t) > 0 {
e.isFirst = t[0]
}
return e.isFirst
}
// 回合类改成int.max,然后魂印类重写切换精灵替换