Scriptname SuH_ss_vitalcureScript extends activemagiceffect  

Spell Property SuH_sse_vitalcure auto

Actor Property playerRef Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	
	if akCaster == playerRef
		float playerHealth = playerRef.GetBaseActorValue("health")
		
		if playerHealth > 20
			playerHealth -= 20
			playerRef.SetActorValue("health", playerHealth)
			SuH_sse_vitalcure.cast(akCaster, akCaster)
		else
			debug.Notification("Vital Cure Failed : Not Enough Health")
		endIf
	else
		float cHealth = akCaster.GetBaseActorValue("health")
		if cHealth > 20
			cHealth -= 5
			akCaster.SetActorValue("health", cHealth)
			SuH_sse_vitalcure.cast(akCaster, akCaster)
		endIf
	endIf
endEvent