ScriptName SuH_spt_trainingstateScript 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

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