ScriptName DfSV_SuccubusDelight extends ActiveMagicEffect

GlobalVariable Property DfSV_PCSheartXP auto
GlobalVariable Property DfSV_PCSheartXPgain auto
GlobalVariable Property DfSV_PCSspermhvalue auto
GlobalVariable Property DfSV_PCSspermmvalue auto
GlobalVariable Property DfSV_PCSspermsvalue auto
GlobalVariable Property DfSV_spX_stickyspermlover auto
GlobalVariable Property DfSV_spX_sweetspermlover auto
GlobalVariable Property DfSV_spX_warmspermlover auto
GlobalVariable Property DfSV_spX_thickspermlover auto

Spell property DfSV_sp_stickyspermlover auto
Spell property DfSV_sp_sweetspermlover auto
Spell property DfSV_sp_warmspermlover auto
Spell property DfSV_sp_thickspermlover auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	if akTarget == Game.GetPlayer()
		float playerhpa = DfSV_PCSspermhvalue.GetValue()
		float playermpa = DfSV_PCSspermmvalue.GetValue()
		float playerspa = DfSV_PCSspermsvalue.GetValue()
		float playerHeartXP = DfSV_PCSheartXP.GetValue()
		float playerHeartXPgain = DfSV_PCSheartXPgain.GetValue()
		float playerHealth = Game.GetPlayer().GetBaseActorValue("health")
		float playerStamina = Game.GetPlayer().GetBaseActorValue("stamina")
		float playerMagicka = Game.GetPlayer().GetBaseActorValue("magicka")
		float heartXPgain = DfSV_PCSheartXPgain.GetValue()
		
		playerHeartXP += Math.Floor(2*heartXPgain)
		playerHealth += Math.Floor(playerhpa)
		playerStamina += Math.Floor(playerspa)
		playerMagicka += Math.Floor(playermpa)
		DfSV_PCSheartXP.SetValue(playerHeartXP)
		Game.GetPlayer().SetActorValue("health", playerHealth)
		Game.GetPlayer().SetActorValue("stamina", playerStamina)
		Game.GetPlayer().SetActorValue("magicka", playerMagicka)
		
		float CHKstickyspermlover = DfSV_spX_stickyspermlover.GetValue()
		float CHKsweetspermlover = DfSV_spX_sweetspermlover.GetValue()
		float CHKwarmspermlover = DfSV_spX_warmspermlover.GetValue()
		float CHKthickspermlover = DfSV_spX_thickspermlover.GetValue()
		
		if CHKstickyspermlover >= 1
			DfSV_sp_stickyspermlover.cast(akTarget,akTarget)
		endIf
		if CHKsweetspermlover >= 1
			DfSV_sp_sweetspermlover.cast(akTarget,akTarget)
		endIf
		if CHKwarmspermlover >= 1
			DfSV_sp_warmspermlover.cast(akTarget,akTarget)
		endIf
		if CHKthickspermlover >= 1
			DfSV_sp_thickspermlover.cast(akTarget,akTarget)
		endIf
	endIf
endEvent