refactor(fight): 清理无用代码并优化注释

This commit is contained in:
1
2025-08-25 16:49:38 +00:00
parent 3b6e69f1f4
commit 32d0b7d804
4 changed files with 3 additions and 25 deletions

View File

@@ -1,21 +0,0 @@
package impl
import (
"blazing/logic/service/fight/battle/node"
"blazing/logic/service/fight/battle/skill/effect"
"fmt"
)
var burn = &effect.Effect{
Name: "Burn",
Trigger: node.EnumEffectTrigger{
Event: BaseEvent.Damage, // ✅ 类型安全
Phase: HookPhase.After,
},
LifeType: LifeType.TurnBased,
Duration: 3,
Handler: func(ctx *EffectContext, next func()) {
fmt.Printf("[%s] 灼烧 %s\n", ctx.Actor, ctx.Target)
next()
},
}

View File

@@ -23,7 +23,6 @@ var PlayerOperations = enum.New[struct {
type BattleAction struct {
Priority EnumPlayerOperation //优先级本质上是action的itoa
//ramdom *random.RandomXS128
ctx context.Context
}

View File

@@ -4,7 +4,7 @@ import "context"
type BattleInputSourceEntity struct {
FightUserInfo
ctx context.Context
ctx context.Context //输入源的上下文
}
// 新建一个宠物

View File

@@ -1,7 +1,7 @@
package info
import (
"blazing/logic/service/fight/battle/random"
"blazing/common/utils/random"
"context"
"time"
@@ -9,7 +9,7 @@ import (
type BattleContainer1V1 struct {
BattleContext
ownerid uint32
ownerid uint32 // 房主ID
}
// 返回房主信息