refactor(fight/effect): 重构效果命中处理逻辑,统一Hit接口并优化效果触发时机
This commit is contained in:
@@ -23,6 +23,7 @@ type EffectNode struct {
|
||||
arget bool // 传出作用对象,默认0是自身,1是作用于对面
|
||||
Flag int //过滤掉的战斗类型 pvp pve boss战斗,野怪全部生效
|
||||
notAlive bool // 是否失效 effect返回值是否被取消,是否被删除
|
||||
hit bool
|
||||
//增加owner target,如果owner target都为自身,就回合效果结束后再使用回合效果
|
||||
}
|
||||
|
||||
@@ -54,6 +55,14 @@ func (this *EffectNode) Stack(t ...int) int {
|
||||
|
||||
return this.stacks
|
||||
|
||||
}
|
||||
func (this *EffectNode) Hit(t ...bool) bool {
|
||||
if len(t) > 0 {
|
||||
this.hit = t[0]
|
||||
}
|
||||
|
||||
return this.hit
|
||||
|
||||
}
|
||||
func (this *EffectNode) GetMaxStack() int {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user