Files
bl/logic/service/fight/effect/effect_436.go
昔念 b9ae17234d
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
```
feat(boss): 新增技能优先级调整功能

新增ComparePre方法用于比较和调整技能释放优先级,
修复了Boss战斗中的技能执行顺序问题,
同时在login模块中启用战斗测试功能。
```
2026-03-07 22:16:06 +08:00

30 lines
607 B
Go

package effect
import (
"blazing/logic/service/fight/info"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
)
func init() {
input.InitEffect(input.EffectType.Skill, 436, &Effect436{
EffectNode: node.EffectNode{},
})
}
type Effect436 struct {
node.EffectNode
}
func (e *Effect436) OnSkill() bool {
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
Type: info.DamageType.Fixed,
Damage: e.Ctx().Our.CurrentPet.GetMaxHP().Sub(e.Ctx().Our.CurrentPet.GetHP()).Mul(e.Args()[0].Div(alpacadecimal.NewFromInt(100))),
})
return true
}