refactor(fight/effect): 重构效果失效逻辑,统一使用NotALive方法并优化效果叠加处理

This commit is contained in:
1
2025-09-23 22:20:52 +00:00
parent 023b937d49
commit 6dc3c68774
7 changed files with 16 additions and 21 deletions

View File

@@ -22,13 +22,13 @@ type EffectNode struct {
Success bool // 是否执行成功 成功XXX失败XXX
arget bool // 传出作用对象,默认0是自身,1是作用于对面
Flag int //过滤掉的战斗类型 pvp pve boss战斗,野怪全部生效
NotAlive bool // 是否失效 effect返回值是否被取消是否被删除
notAlive bool // 是否失效 effect返回值是否被取消是否被删除
//增加owner target如果owner target都为自身就回合效果结束后再使用回合效果
}
func (this *EffectNode) Alive() bool {
return !this.NotAlive
return !this.notAlive
}
func (this *EffectNode) ID() int {
@@ -38,7 +38,7 @@ func (this *EffectNode) ID() int {
}
func (this *EffectNode) NotALive() {
this.NotAlive = true
this.notAlive = true
}
func (this *EffectNode) GetOwner() bool {