Scriptname SuH_comES_vitalitystone extends activemagiceffect  

SuH_Fun Property _Fun auto

GlobalVariable property SuH_PCScaphealth auto
GlobalVariable property SuH_PCScaphealthitem auto
GlobalVariable property SuH_PCScapmagicka auto
GlobalVariable property SuH_PCScapmagickaitem auto
GlobalVariable property SuH_PCScapstamina auto
GlobalVariable property SuH_PCScapstaminaitem auto
GlobalVariable property SuH_PCSbpoint auto
GlobalVariable property SuH_PCSspoint auto
GlobalVariable property SuH_PCSmpoint auto

Actor property playerRef auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	if akTarget == PlayerRef ; If player consumes
		int h = SuH_PCScaphealth.GetValue() as int
		int m = SuH_PCScapmagicka.GetValue() as int
		int s = SuH_PCScapstamina.GetValue() as int
		SuH_PCScaphealth.SetValue(h+5)
		SuH_PCScapmagicka.SetValue(m+5)
		SuH_PCScapstamina.SetValue(s+5)
		h = SuH_PCScaphealthitem.GetValue() as int
		m = SuH_PCScapmagickaitem.GetValue() as int
		s = SuH_PCScapstaminaitem.GetValue() as int
		SuH_PCScaphealthitem.SetValue(h+5)
		SuH_PCScapmagickaitem.SetValue(m+5)
		SuH_PCScapstaminaitem.SetValue(s+5)
		_Fun.BDSMcalc("b", 5)
		_Fun.BDSMcalc("s", 5)
		_Fun.BDSMcalc("m", 5)
		Debug.Notification("Vitality Stone - All status caps increased by 5")
	endIf
endEvent