Scriptname SuH_ss_manabreakScript extends activemagiceffect  

actor property playerRef auto

Event OnEffectStart(actor cT, actor cC)
	int cM = Math.Floor(cC.GetBaseActorValue("magicka"))
	
	if cM >= 21
		cT.SetActorValue("magicka", 0)
		cM -= 20
		cC.SetActorValue("magicka", cM)
	elseIf cC == playerRef
		debug.Notification("Mana Break : Not Enough Magicka!")
	endIf
endEvent