Scriptname SuH_spellES_soulbend_base extends activemagiceffect  

actor property PlayerRef auto

Event OnEffectStart(actor akTarget, actor akCaster)
	int h = akCaster.GetBaseActorValue("health") as int
	int m = akCaster.GetBaseActorValue("magicka") as int
	if h >= 11 && m >= 21
		h -= 10
		m -= 20
		akCaster.SetActorValue("health", h)
		akCaster.SetActorValue("magicka", m)
		int mh = akTarget.GetBaseActorValue("health") as int
		int x = Math.Floor(mh - (mh*0.05))
		akTarget.SetActorValue("health", x)
		akTarget.DamageActorValue("health", 50)
	elseif akCaster == PlayerRef
		debug.Notification("Soul Bend Failed : Not Enough Status")
	endIf
endEvent