refactor(effect): 移除未使用的element导入并优化自然敌人判断逻辑 移除了NewSeIdx_14.go中未使用的element包导入,将自然敌人判断逻辑 提取到EffectNode基类中,通过ISNaturalEnemy方法统一处理。 ```
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package node
|
||||
|
||||
import (
|
||||
element "blazing/common/data/Element"
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/logic/service/fight/input"
|
||||
"sync"
|
||||
@@ -124,6 +125,17 @@ func (e *EffectNode) PropBefer(in *input.Input, prop int8, level int8, ptype inf
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *EffectNode) ISNaturalEnemy() bool {
|
||||
|
||||
t, _ := element.Calculator.GetOffensiveMultiplier(e.Ctx().Opp.CurrentPet.Type, e.Ctx().Our.CurrentPet.Type)
|
||||
|
||||
if t <= 1 {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
// func (e *EffectNode) BoolisFalse(t ...bool) bool {
|
||||
|
||||
// if len(t) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user