Files
bl/logic/service/fight/effect/effect_1.go
2025-11-21 05:47:51 +00:00

36 lines
577 B
Go

package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/shopspring/decimal"
)
/**
* 给予对象损伤一半,会回复自己的体力
*/
type Effect1 struct {
node.EffectNode
}
func init() {
ret := &Effect1{}
input.InitEffect(input.EffectType.Skill, 1, ret)
}
// 命中之后
func (e *Effect1) OnSkill() bool {
if !e.Hit() {
return true
}
e.Input.Heal(
e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.SumDamage.Div(decimal.NewFromInt(2)),
)
return true
}