package effect import ( "blazing/logic/service/fight/action" "blazing/logic/service/fight/input" "blazing/logic/service/fight/node" "github.com/alpacahq/alpacadecimal" ) /** * 给对手造成伤害时,伤害数值的 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))), ) return true }