Scriptname SuH_sexES_petspell extends activemagiceffect  


SuH_Fun property _f auto
SuH_Status property _s auto

; int isPlayer
; int effect
; float strength
; actor char

; 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)
	; char = akTarget
	
	; effect = _s.SuH_PETeffect
	; strength = _s.SuH_PETeffectstrength
	
	; if char == _s.PlayerRef
		; isPlayer == 1
	; endIf
	; if effect != 0
		; RegisterForSingleUpdate(1.0)
	; endIf
; endEvent

; Event OnUpdate()
	; if effect == 1 ; Damage Target Stamina
		; if isPlayer != 1 ; if not player
			; char.DamageActorValue("Stamina", strength)
		; endIf
	; elseif effect == 2 ; Heal Target Health
		; char.RestoreActorValue("Health", strength)
	; elseif effect == 3 ; Damage Target Magicka
		; if isPlayer != 1
			; char.DamageActorValue("Magicka", strength)
		; endIf
	; elseif effect == 4 ; Gain HeartXP
		; int x = Math.Floor(strength)
		; _f.XPcalc(XPearn=x)
	; elseif effect == 5 ; Damage Target Stamina
		; if isPlayer != 1 ; if not player
			; char.DamageActorValue("Health", strength)
		; endIf
	; endIf
	; RegisterForSingleUpdate(1.0)
; endEvent