Files
bl/logic/service/fight/effect/effect_101.go

32 lines
582 B
Go
Raw Normal View History

2025-11-13 23:48:34 +08:00
package effect
import (
"blazing/logic/service/fight/action"
"blazing/logic/service/fight/input"
"blazing/logic/service/fight/node"
"github.com/alpacahq/alpacadecimal"
2025-11-13 23:48:34 +08:00
)
/**
* 给对手造成伤害时伤害数值的 n%恢复自身体力
*/
type Effect101 struct {
node.EffectNode
}
func init() {
input.InitEffect(input.EffectType.Skill, 101, &Effect101{})
}
// 命中之后
func (e *Effect101) OnSkill() bool {
e.Input.Heal(
e.Ctx().Our, &action.SelectSkillAction{}, e.Ctx().Our.SumDamage.Mul(e.Args()[0].Div(alpacadecimal.NewFromInt(100))),
2025-11-13 23:48:34 +08:00
)
return true
}