Scriptname SuH_comES_milk extends activemagiceffect  

SuH_Fun property _f auto
Actor property PlayerRef auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	if akTarget == PlayerRef ; If player consumes
		_f.XPcalc("PCmilk") ; Grant XP
		_f.STATcalc(PlayerRef, aPreset="PCmilk", stat="All") ; Grant Absorption
		_f.SuH_PCSstackmilk.SetValue( Math.Floor(_f.SuH_PCSstackmilk.GetValue() + _f.SuH_rank_valuestacker.GetValue() + 1) )
		akTarget.RestoreActorValue("Health", (1 + (_f.SuH_rank_lusciousliquids.GetValue() * (_f.SuH_PCSdpoint.GetValue() * 0.1))) )
		akTarget.RestoreActorValue("Magicka", (1 + (_f.SuH_rank_lusciousliquids2.GetValue() * (_f.SuH_PCSdpoint.GetValue() * 0.1))) )
		akTarget.RestoreActorValue("Stamina", (1 + (_f.SuH_rank_lusciousliquids2.GetValue() * (_f.SuH_PCSdpoint.GetValue() * 0.1))) )
	endIf
endEvent