ScriptName SuH_spt_focusedstateScript extends ActiveMagicEffect

Spell property SuH_sp_trainingstate auto
Spell property SuH_sp_hungerstate auto
Spell property SuH_sp_focusedstate auto
Spell property SuH_sp_bracingstate auto
MagicEffect property SuH_sp_trainingstateeffect auto
MagicEffect property SuH_sp_hungerstateeffect auto
MagicEffect property SuH_sp_focusedstateeffect auto
MagicEffect property SuH_sp_bracingstateeffect auto

Actor Property playerRef Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	
	if playerRef.HasMagicEffect(SuH_sp_focusedstateeffect)
		playerRef.RemoveSpell(SuH_sp_focusedstate)
		debug.Notification("Focused State was cancelled")
	else
		playerRef.RemoveSpell(SuH_sp_hungerstate)
		playerRef.RemoveSpell(SuH_sp_trainingstate)
		playerRef.RemoveSpell(SuH_sp_bracingstate)
		playerRef.AddSpell(SuH_sp_focusedstate)
		debug.Notification("Began meditating with Focused State")
	endIf
	
endEvent