ScriptName SuH_ss_focusshotScript extends ActiveMagicEffect

GlobalVariable Property SuH_PCSheartXP auto
GlobalVariable Property SuH_PCSheartXPgain auto

Actor Property playerRef Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	
	if akCaster == playerRef
		float playerStamina = playerRef.GetBaseActorValue("stamina")
		
		if playerStamina > 1
			float heartXP = SuH_PCSheartXP.GetValue()
			float heartXPgain = SuH_PCSheartXPgain.GetValue()
			float atkdmg = 10
			heartXP += Math.Floor(1*heartXPgain*0.01)
			playerStamina -= 1
			SuH_PCSheartXP.SetValue(heartXP)
			playerRef.SetActorValue("stamina", playerStamina)
			akTarget.DamageAV("health",atkdmg)
		else
			debug.Notification("Focus Shot Reflected : Not Enough Stamina")
		endIf
	endIf
endEvent