Files
bl/logic/service/fight/effect/effect_436.go
xinian 875ad668aa
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed
feat: 实现战斗效果逻辑和接口重构
2026-03-28 21:57:22 +08:00

29 lines
634 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{})
}
// Effect 436: 附加已损失体力值{0}%的百分比伤害
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
}