Scriptname SuH_comES_soulofmagic extends activemagiceffect  

SuH_Fun Property _Fun auto

GlobalVariable Property SuH_PCScapmagicka auto
GlobalVariable Property SuH_PCScapmagickaitem auto
GlobalVariable Property SuH_PCSmpoint auto

Actor property playerRef auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	if akTarget == PlayerRef ; If player consumes
		int x = Math.Floor(2 + SuH_PCScapmagicka.GetValue())
		SuH_PCScapmagicka.SetValue(x)
		int y = Math.Floor(2 + SuH_PCScapmagickaitem.GetValue())
		SuH_PCScapmagickaitem.SetValue(y)
		_Fun.BDSMcalc("m", 2)
		debug.Notification("Soul of Magic - Granted 2 Magicka Cap")
	endIf
endEvent