package effect

import (
	"blazing/logic/service/fight/info"
	"blazing/logic/service/fight/input"
	"blazing/logic/service/fight/node"
)

/**
 * 给予对象损伤一半，会回复自己的体力
 */
type Effect1 struct {
	node.EffectNode
}

func init() {
	input.InitEffect(input.EffectType.Skill, 1, &Effect1{})

}
func (e *Effect1) OnHit(opp *input.Input, skill *info.SkillEntity) {
	t := e.Input.GetEffect(input.EffectType.Damage, 0).Stack()
	e.Input.CurrentPet.Info.Hp += uint32(t / 2)

}
