feat(fight): 重构战斗模块并添加新功能

- 重构了战斗动作处理逻辑,增加了新的战斗动作类型
- 新增了逃跑、使用药剂、系统放弃等战斗动作
- 优化了战斗回合循环和动作执行顺序
- 增加了战斗结束处理逻辑
- 调整了玩家和AI的战斗行为
-增加精灵捕捉
This commit is contained in:
2025-09-05 22:40:36 +08:00
parent a86b69dd1e
commit 52d35119c8
10 changed files with 386 additions and 126 deletions

View File

@@ -19,7 +19,7 @@ type EffectNode struct {
SideEffectArgs []int // 附加效果参数
Success bool // 是否执行成功 成功XXX失败XXX
efftype int // 传出作用对象,默认0是自身,1是作用于对面
target int // 传出作用对象,默认0是自身,1是作用于对面
Flag int //过滤掉的战斗类型 pvp pve boss战斗,野怪全部生效
//增加owner target如果owner target都为自身就回合效果结束后再使用回合效果
}
@@ -31,9 +31,14 @@ func (this *EffectNode) ID() int {
}
// 传出作用对象,默认0是自身,1是作用于对面
func (this *EffectNode) Type() int {
func (this *EffectNode) Target() int {
return this.efftype
return this.target
}
func (this *EffectNode) SetTarget(t int) {
this.target = t
}
func (this *EffectNode) Stack(t int) int {