package effect import ( "blazing/logic/service/fight/action" "blazing/logic/service/fight/info" "blazing/logic/service/fight/input" "blazing/logic/service/fight/node" "github.com/shopspring/decimal" ) /** * 给予对象损伤一半,会回复自己的体力 */ type Effect1 struct { node.EffectNode } func init() { ret := &Effect1{} ret.Effect = ret input.InitEffect(input.EffectType.Skill, 1, ret) } // 命中之后 func (e *Effect1) OnHit(opp *input.Input, skill *info.SkillEntity) { e.Input.Heal( &action.SelectSkillAction{}, e.Input.DamageZone.Damage.Div(decimal.NewFromInt(2)), ) }