Files
bl/logic/service/fight/effect/516.go
xinian 1e37d71878
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
fix: 修复属性设置逻辑
2026-03-17 10:57:11 +08:00

33 lines
649 B
Go

package effect
import (
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
)
// 516 - 1 1 1 1 1 1 1 体力低于1/n时强化效果翻倍
type Effect516 struct {
node.EffectNode
}
func (e *Effect516) Skill_Use() bool {
maxHp := e.Ctx().Our.CurrentPet.GetMaxHP()
currentHp := e.Ctx().Our.CurrentPet.GetHP()
threshold := maxHp.Div(e.Args()[6]) // 1/n
for i, v := range e.SideEffectArgs[:6] {
if currentHp.Cmp(threshold) < 0 {
v *= 2
}
if v == 0 {
continue
}
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), int8(v))
}
return true
}
func init() {
input.InitEffect(input.EffectType.Skill, 516, &Effect516{})
}