Scriptname SuH_spellES_pettarget extends activemagiceffect  

SuH_Fun property _f auto
SuH_Status property _s auto

; Pets Menu
; 0 Rape Target
; 1 Cancel

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)
	Int i = _s.SuH_menu_pettarget.Show()
	if i == 0 ;Pet: Rape Target
		if  _s.SuH_actor_activepet != none
			actor[] animActor = new actor[2]
			animActor[0] =  _s.SuH_actor_activepet
			animActor[1] = akTarget
			_f.ANIMcalc(animActor,  _s.SuH_actor_activepet)
		else
			Debug.Notification("Train Pet - No active pets found!")
		endIf
	elseif i == 1 ;Replicate Soul
		if akTarget.IsInFaction(_s.SuH_petfaction)
			Debug.MessageBox(": Soul Pets : \n Character is already registered as a pet!")
		elseif akTarget.IsInFaction(_s.CurrentFollowerFaction)
			Debug.MessageBox(": Soul Pets : \n Followers can't be registered as a pet.")
		elseif akTarget.IsInFaction(_s.PlayerPotentialAnimalFaction)
			Debug.MessageBox(": Soul Pets : \n Followers can't be registered as a pet.")
		else
			actorbase makepetbase = akTarget.GetActorBase()
			_f.SoulPetAdd(makepetbase, true)
		endIf
	endIf
endEvent