Scriptname SuH_ss_poisonpointScript extends activemagiceffect  

Spell Property SuH_sse_poisonpoint auto

Actor Property playerRef Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	
	if akCaster == playerRef
		float playerMagicka = playerRef.GetBaseActorValue("magicka")
		
		if playerMagicka > 5
			playerMagicka -= 2
			playerRef.SetActorValue("magicka", playerMagicka)
			SuH_sse_poisonpoint.cast(akCaster, akTarget)
		else
			debug.Notification("Poison Point Reflected : Not Enough Magicka")
		endIf
	else
		float cMagicka = akCaster.GetBaseActorValue("magicka")
		if cMagicka > 5
			cMagicka -= 5
			akCaster.SetActorValue("magicka", cMagicka)
			SuH_sse_poisonpoint.cast(akCaster, akTarget)
		endIf
	endIf
endEvent