Scriptname SuH_comES_sperm extends activemagiceffect  

SuH_Fun property _f auto
SuH_Status property _s auto

Event OnInit()
	_f = Game.GetFormFromFile(0x814, "Succubus Heart.esp") as SuH_Fun
	_s = Game.GetFormFromFile(0x16E496, "Succubus Heart.esp") as SuH_Status
endEvent

Event OnEffectStart(Actor akTarget, Actor akCaster)
	if akTarget == _s.PlayerRef ; If player consumes
		_f.XPcalc("PCsperm") ; Grant XP
		_f.STATcalc(_s.PlayerRef, aPreset="PCsperm", stat="All") ; Grant Absorption
		_s.SuH_PCSstacksperm += (1 + _s.SuH_rank_valuestacker)
		if _s.SuH_rank_lusciousliquids > 0
			akTarget.RestoreActorValue("Health", (1 + (_s.SuH_rank_lusciousliquids * (_s.SuH_PCSdpoint * 0.1))))
		endIf
		if _s.SuH_rank_lusciousliquids2 > 0
			akTarget.RestoreActorValue("Magicka", (1 + (_s.SuH_rank_lusciousliquids2 * (_s.SuH_PCSdpoint * 0.1))))
			akTarget.RestoreActorValue("Stamina", (1 + (_s.SuH_rank_lusciousliquids2 * (_s.SuH_PCSdpoint * 0.1))))
		endIf
	endIf
endEvent