```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

refactor(effect): 移除未使用的element导入并优化自然敌人判断逻辑

移除了NewSeIdx_14.go中未使用的element包导入,将自然敌人判断逻辑
提取到EffectNode基类中,通过ISNaturalEnemy方法统一处理。
```
This commit is contained in:
昔念
2026-03-08 22:43:51 +08:00
parent 0cff02158b
commit 90f653d3ee
14 changed files with 366 additions and 528 deletions

View File

@@ -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 {