ScriptName SuH_Main extends Quest

;ent/ #Include
SexLabFramework property SexLab auto
;end/
;ent/ Globals
GlobalVariable Property SuH_NPChdry auto
GlobalVariable Property SuH_NPCmdry auto
GlobalVariable Property SuH_NPCsdry auto
GlobalVariable Property SuH_MODversion auto
GlobalVariable Property SuH_NPCgenders auto
GlobalVariable Property SuH_PCSheartXP auto
GlobalVariable Property SuH_SETsexdrops auto
GlobalVariable Property SuH_SETinvact auto
GlobalVariable Property SuH_Lsuccubusprowl auto
GlobalVariable Property SuH_Lspermlover auto
GlobalVariable Property SuH_Lmilklover auto
GlobalVariable Property SuH_Lperfectorgasm auto
GlobalVariable Property SuH_Lspeciallover auto
GlobalVariable Property SuH_Lcaringlover auto
GlobalVariable Property SuH_Lmagicallover auto
GlobalVariable Property SuH_Llastinglover auto
GlobalVariable Property SuH_Lhumandesires auto
GlobalVariable Property SuH_Lanimaldesires auto
GlobalVariable Property SuH_Lmasochist auto
GlobalVariable Property SuH_Lmilkdrinker auto
GlobalVariable Property SuH_SETdrainconsent auto
GlobalVariable Property SuH_PCSmaxactstacks auto
GlobalVariable Property SuH_PCSmaxspermstacks auto
GlobalVariable Property SuH_PCSmaxmilkstacks auto
GlobalVariable Property SuH_PCSactstacks auto
GlobalVariable Property SuH_PCSspermstacks auto
GlobalVariable Property SuH_PCSmilkstacks auto
GlobalVariable Property SuH_PCSdesire auto
GlobalVariable Property SuH_PCSdesireOrg auto
;end/	
;ent/ Spells
Spell Property SuH_PCSsubmit auto
Spell Property SuH_PCStraining auto
Spell Property SuH_PCSmastery auto
Spell Property SuH_NPCsvictim auto
Spell Property SuH_NPCsattacker auto
Spell Property SuH_NPCsconsent auto
Spell Property SuH_ss_focusshot auto
Spell Property SuH_ss_sexualenrage auto
Spell Property SuH_ss_silentkiss auto
Spell Property SuH_sp_succubusprowl auto
Spell Property SuH_sp_HealthyDelights auto
Spell Property SuH_sp_ShiningDelights auto
Spell Property SuH_sp_SugaryDelights auto
Spell Property SuH_sp_HealthyMilk auto
Spell Property SuH_sp_ShiningMilk auto
Spell Property SuH_sp_SugaryMilk auto
Spell Property SuH_NPCsmastery auto
Spell Property SuH_NPCssubmit auto
Spell Property SuH_NPCstraining auto
Spell Property SuH_NPCsnconsent auto
Spell Property SuH_NPCsnattacker auto
Spell Property SuH_NPCsnvictim auto
Spell Property SuH_CHAinact auto
Spell Property SuH_csGrace auto
Spell Property SuH_essential auto
Spell Property SuH_sp_spermlover auto
Spell Property SuH_sp_HealthyDelights2 auto
Spell Property SuH_sp_ShiningDelights2 auto
Spell Property SuH_sp_SugaryDelights2 auto
Spell Property SuH_sp_seductivedelights auto
Spell Property SuH_sp_milklover auto
Spell Property SuH_sp_HealthyMilk2 auto
Spell Property SuH_sp_ShiningMilk2 auto
Spell Property SuH_sp_SugaryMilk2 auto
Spell Property SuH_sp_seductivemilk auto
Spell Property SuH_sp_perfectorgasm auto
Spell Property SuH_sp_speciallover auto
Spell Property SuH_sp_caringlover auto
Spell Property SuH_sp_magicallover auto
Spell Property SuH_sp_lastinglover auto
Spell Property SuH_sp_humandesires auto
Spell Property SuH_sp_animaldesires auto
Spell Property SuH_sp_masochist auto
Spell Property SuH_sp_milkdrinker auto
Spell Property SuH_ss_statchecker auto
Spell Property SuH_ss_creatureclaim auto
;end/
;ent/ Magic Effects
MagicEffect Property SuH_sp_perfectorgasmeffect auto
MagicEffect Property SuH_sp_HealthyDelights2effect auto
MagicEffect Property SuH_sp_ShiningDelights2effect auto
MagicEffect Property SuH_sp_SugaryDelights2effect auto
MagicEffect Property SuH_sp_HealthyMilk2effect auto
MagicEffect Property SuH_sp_ShiningMilk2effect auto
MagicEffect Property SuH_sp_SugaryMilk2effect auto
MagicEffect Property SuH_NPCsuccubuseffect auto
;end/
;ent/ Items
Ingredient Property SuH_SpermSticky auto
Ingredient Property SuH_SpermSweet auto
Ingredient Property SuH_SpermThick auto
Ingredient Property SuH_SpermWarm auto
Ingredient Property SuH_SpermPerfect auto
Ingredient Property SuH_MilkWarm auto
Ingredient Property SuH_MilkSweet auto
Ingredient Property SuH_MilkSmooth auto
Ingredient Property SuH_MilkCreamy auto
Ingredient Property SuH_ii_Sperm auto
Ingredient Property SuH_ii_BreastMilk auto
Ingredient Property SuH_ii_SpermCreature auto
Ingredient Property SuH_ii_BreastMilkCreature auto
;end/
;ent/ Actors
Actor Property PlayerRef Auto
;end/
;ent/ Variables
;end/

;ent/ MOD Update
function MODupdate()
	float MODversion = SuH_MODversion.GetValue()
	;ent/ Previous Patches
	If MODversion == 0
		debug.Notification("Succubus Heart : Installing Patches")
	endIf
	If MODversion < 2.1
		if MODversion != 0
			debug.Notification("Succubus Heart : Applying Patch 2.1")
		endIf
		playerRef.AddSpell(SuH_ss_focusshot)
		; playerRef.AddSpell(SuH_ss_sexualenrage)
		; playerRef.AddSpell(SuH_ss_silentkiss)
		; if playerRef.HasSpell(SuH_sp_succubusprowl)
			; SuH_Lsuccubusprowl.SetValue(1)
		; endIf
		SuH_MODversion.SetValue(2.1)
	endIf
	If MODversion < 2.4
		If MODversion != 0
			debug.Notification("Succubus Heart : Applying Patch 2.4")
		endIf
		int x = SuH_PCSheartXP.GetValue() as int
		x += 500
		SuH_PCSheartXP.SetValue(x)
		SuH_MODversion.SetValue(2.4)
	endIf
	If MODversion < 2.61 && MODversion != 0
		debug.Notification("Succubus Heart : Applying Patch 2.61")
		if playerRef.HasSpell(SuH_sp_HealthyDelights2) || playerRef.HasSpell(SuH_sp_ShiningDelights2) || playerRef.HasSpell(SuH_sp_SugaryDelights2) || playerRef.HasSpell(SuH_sp_seductivedelights) || playerRef.HasSpell(SuH_sp_HealthyDelights) || playerRef.HasSpell(SuH_sp_ShiningDelights) || playerRef.HasSpell(SuH_sp_SugaryDelights)
			playerRef.AddSpell(SuH_sp_spermlover)
			playerRef.RemoveSpell(SuH_sp_HealthyDelights)
			playerRef.RemoveSpell(SuH_sp_HealthyDelights2)
			playerRef.RemoveSpell(SuH_sp_ShiningDelights)
			playerRef.RemoveSpell(SuH_sp_ShiningDelights2)
			playerRef.RemoveSpell(SuH_sp_SugaryDelights)
			playerRef.RemoveSpell(SuH_sp_SugaryDelights2)
			playerRef.RemoveSpell(SuH_sp_seductivedelights)
		endIf
		if playerRef.HasSpell(SuH_sp_HealthyMilk2) || playerRef.HasSpell(SuH_sp_ShiningMilk2) || playerRef.HasSpell(SuH_sp_SugaryMilk2) || playerRef.HasSpell(SuH_sp_seductivemilk) || playerRef.HasSpell(SuH_sp_HealthyMilk) || playerRef.HasSpell(SuH_sp_ShiningMilk) || playerRef.HasSpell(SuH_sp_SugaryMilk)
			playerRef.AddSpell(SuH_sp_milklover)
			playerRef.RemoveSpell(SuH_sp_HealthyMilk)
			playerRef.RemoveSpell(SuH_sp_HealthyMilk2)
			playerRef.RemoveSpell(SuH_sp_ShiningMilk)
			playerRef.RemoveSpell(SuH_sp_ShiningMilk2)
			playerRef.RemoveSpell(SuH_sp_SugaryMilk)
			playerRef.RemoveSpell(SuH_sp_SugaryMilk2)
			playerRef.RemoveSpell(SuH_sp_seductivemilk)
		endIf
	endIf
	If MODversion < 2.7
		if MODversion != 0 && MODversion < 2.612
			Debug.Notification("Succubus Heart : Installing Patch 2.7")
			;if playerRef.HasSpell(SuH_sp_succubusprowl)
			;	SuH_Lsuccubusprowl.SetValue(1)
			;endIf
			if playerRef.HasSpell(SuH_sp_spermlover)
				SuH_Lspermlover.SetValue(1)
			endIf
			if playerRef.HasSpell(SuH_sp_milklover)
				SuH_Lmilklover.SetValue(1)
			endIf
			if playerRef.HasSpell(SuH_sp_perfectorgasm)
				SuH_Lperfectorgasm.SetValue(1)
			endIf
			if playerRef.HasSpell(SuH_sp_speciallover)
				SuH_Lspeciallover.SetValue(1)
			endIf
			if playerRef.HasSpell(SuH_sp_caringlover)
				SuH_Lcaringlover.SetValue(1)
			endIf
			if playerRef.HasSpell(SuH_sp_magicallover)
				SuH_Lmagicallover.SetValue(1)
			endIf
			if playerRef.HasSpell(SuH_sp_lastinglover)
				SuH_Llastinglover.SetValue(1)
			endIf
			if playerRef.HasSpell(SuH_sp_humandesires)
				SuH_Lhumandesires.SetValue(1)
			endIf
			if playerRef.HasSpell(SuH_sp_animaldesires)
				SuH_Lanimaldesires.SetValue(1)
			endIf
			if playerRef.HasSpell(SuH_sp_masochist)
				SuH_Lmasochist.SetValue(1)
			endIf
			if playerRef.HasSpell(SuH_sp_milkdrinker)
				SuH_Lmilkdrinker.SetValue(1)
			endIf
			SuH_SETdrainconsent.SetValue(0.5)
		endIf
		SuH_MODversion.SetValue(2.7)
	endIf
	If MODversion < 2.703
		If MODversion != 0
			debug.Notification("Succubus Heart : Installing Patch 2.71")
			SuH_PCSmaxactstacks.SetValue(1)
			SuH_PCSmaxspermstacks.SetValue(1)
			SuH_PCSmaxmilkstacks.SetValue(1)
			SuH_PCSactstacks.SetValue(0)
			SuH_PCSactstacks.SetValue(0)
			SuH_PCSactstacks.SetValue(0)
			debug.MessageBox("Succubus Heart : Do to a bug in the last official version stack values have been reset, sorry!")
		endIf
		playerRef.AddSpell(SuH_ss_statchecker)
		SuH_MODversion.SetValue(2.71)
	endIf
	;end/
	;ent/ Current Patch (DEVpatch)
	; NULL
	If MODversion < 2.721 && MODversion != 0
		SuH_Lsuccubusprowl.SetValue(1)
		if playerRef.HasSpell(SuH_ss_creatureclaim)
			playerRef.RemoveSpell(SuH_ss_creatureclaim)
			int x = SuH_PCSheartXP.GetValue() as int
			x += 8000
			SuH_PCSheartXP.SetValue(x)
		endIf
		playerRef.RemoveSpell(SuH_sp_succubusprowl)
		playerRef.RemoveSpell(SuH_ss_silentkiss)
		playerRef.RemoveSpell(SuH_ss_sexualenrage)
		debug.Notification("Succubus Heart : Running DevBuild -2.7121-")
		SuH_MODversion.SetValue(2.721)
	endIf
	;end/
endFunction
;end/
;Initialization
Event OnInit()
	RegisterForModEvent("AnimationStart","DanisManage")
	RegisterForModEvent("AnimationEnd","DanieManage")
	RegisterForModEvent("OrgasmStart","DorgsManage")
	RegisterForModEvent("OrgasmEnd","DorgeManage")
	
	MODupdate()
EndEvent

;ent/ Animation Start
Event DanisManage(string eventName, string argString, float argNum, form sender)
	sslThreadController Thread = SexLab.HookController(argString)
	actor[] aniActor = SexLab.HookActors(argString)
	
	;ent/ Animation Variables
	int i = 0
	int femalePres = 0
	int malePres = 0
	int mcrePres = 0
	int fcrePres = 0
	int sucpres = 0
	;end/
	
	i = 0
	while i < aniActor.Length
		;ent/ Gender Check
		int Agender = SexLab.GetGender(aniActor[i])
		if Agender == 1
			femalePres += 1
		elseIf Agender == 0
			malePres += 1
		elseIf Agender == 2
			mcrePres += 1
		elseIf Agender == 3
			fcrePres += 1
		endIf
		if aniActor[i].HasMagicEffect(SuH_NPCsuccubuseffect)
			sucpres += 1
		endIf
		;end/
		;ent/ Apply OnAct
		aniActor[i].AddSpell(SuH_CHAinact, false)
		if SuH_SETinvact.GetValue()
			aniActor[i].AddSpell(SuH_essential, false)
		endIf
		;end/
	i += 1
	endWhile
	
	if Thread.HasPlayer
		;ent/ Animation Variables
		int NPCgenders = 0
		int pGender = SexLab.GetGender(playerRef)
		;end/
		;ent/ Set NPCgenders
		If mcrePres > 0 || fcrePres > 0
			SuH_NPCgenders.SetValue(3) ;creature
		elseIf pGender == 1 ;Female
			if malePres > 0
				SuH_NPCgenders.SetValue(2) ;male
			else
				SuH_NPCgenders.SetValue(1) ;female
			endIf	
		elseIf pGender == 0 ;Male
			if malePres > 1
				SuH_NPCgenders.SetValue(2) ;male
			else
				SuH_NPCgenders.SetValue(1) ;female
			endIf
		endIf
		;end/
		;ent/ Type Effects
		actor victim = SexLab.HookVictim(argString)
		if victim != none
			i = 0
			while i < aniActor.Length
				if aniActor[i] == victim
					if aniActor[i] == playerRef
						aniActor[i].AddSpell(SuH_PCSsubmit, false)
					elseIf aniActor[i].HasMagicEffect(SuH_NPCsuccubuseffect)
						aniActor[i].AddSpell(SuH_NPCssubmit, false)
					else
						aniActor[i].AddSpell(SuH_NPCsvictim, false)
					endIf
				else
					if aniActor[i] == playerRef
						aniActor[i].AddSpell(SuH_PCSmastery, false)
					elseif aniActor[i].HasMagicEffect(SuH_NPCsuccubuseffect)
						aniActor[i].AddSpell(SuH_NPCsmastery, false)
					else
						aniActor[i].AddSpell(SuH_NPCsattacker, false)
					endIf
				endIf
			i += 1
			endWhile
		else
			i = 0
			while i < aniActor.Length
				if aniActor[i] == playerRef
					aniActor[i].AddSpell(SuH_PCStraining, false)
				elseif aniActor[i].HasMagicEffect(SuH_NPCsuccubuseffect)
					aniActor[i].AddSpell(SuH_NPCstraining, false)
				else
					aniActor[i].AddSpell(SuH_NPCsconsent, false)
				endIf
			i += 1
			endWhile
		endIf
		;end/
	elseIf sucpres > 0
		;ent/ Type Effects
		actor victim = SexLab.HookVictim(argString)
		if victim != none
			i = 0
			while i < aniActor.Length
				if aniActor[i] == victim
					if aniActor[i].HasMagicEffect(SuH_NPCsuccubuseffect)
						aniActor[i].AddSpell(SuH_NPCssubmit, false)
					else
						aniActor[i].AddSpell(SuH_NPCsnvictim, false)
					endIf
				else
					if aniActor[i].HasMagicEffect(SuH_NPCsuccubuseffect)
						aniActor[i].AddSpell(SuH_NPCsmastery, false)
					else
						aniActor[i].AddSpell(SuH_NPCsnattacker, false)
					endIf
				endIf
			i += 1
			endWhile
		else
			i = 0
			while i < aniActor.Length
				if aniActor[i].HasMagicEffect(SuH_NPCsuccubuseffect)
					aniActor[i].AddSpell(SuH_NPCstraining, false)
				else
					aniActor[i].AddSpell(SuH_NPCsnconsent, false)
				endIf
			i += 1
			endWhile
		endIf
		;end/
	endIf
endEvent
;end/

;ent/ Animation Orgasm
Event DorgsManage(string eventName, string argString, float argNum, form sender)
	sslThreadController Thread = SexLab.HookController(argString)
	
	;ent/ Orgasm Variables
	actor[] orgaActor = SexLab.HookActors(argString)
	int femalePres = 0
	int malePres = 0
	int mcrePres = 0
	int fcrePres = 0
	;end/
	;ent/ Loop 1 -Gender -Player Passives (Always act)
	int i = 0
	while i < orgaActor.Length
		;ent/ Gender Catch
		int Agender = SexLab.GetGender(orgaActor[i])
		if Agender == 0
			malePres += 1
		elseIf Agender == 1
			femalePres += 1
		elseIf Agender == 2
			mcrePres += 1
		elseIf Agender == 3
			fcrePres
		endIf
		;end/
		;ent/ Player Passives (always act)
		if orgaActor[i] == playerRef
			if playerRef.HasMagicEffect(SuH_sp_perfectorgasmeffect)
				float pH = playerRef.GetBaseActorValue("health")
				float pS = playerRef.GetBaseActorValue("stamina")
				float pM = playerRef.GetBaseActorValue("magicka")
				float cH = playerRef.GetActorValue("health")
				float cM = playerRef.GetActorValue("magicka")
				float cS = playerRef.GetActorValue("stamina")
				float hheal = (pH - cH)*0.75
				float mheal = (pM - cM)*0.75
				float sheal = (pS - cS)*0.75
				playerRef.RestoreActorValue("health",hheal)
				playerRef.RestoreActorValue("magicka",mheal)
				playerRef.RestoreActorValue("stamina",sheal)
			endIf
		endIf
		;end/
		i += 1
	endWhile
	;end/
	;ent/ Loop 2 -Drops - MultiActor Passives
	i = 0
	While i < orgaActor.Length
		; Variables
		int Agender = SexLab.GetGender(orgaActor[i])
		int SETsexdrops = SuH_SETsexdrops.GetValue() as int
		int x = 0
		;ent/ Desire Calculation
		if orgaActor[i] == playerRef
			int pDesire = SuH_PCSdesire.GetValue() as int
			int pDesireOrg = Math.Floor(pDesire*0.9) ;Get 90% for Orgasm bonus
			pDesire = Math.Floor(pDesire*0.1) ;Remove 90%
			SuH_PCSdesireOrg.SetValue(pDesireOrg)
			SuH_PCSdesire.SetValue(pDesire)
		endIf
		;end/
		;ent/ Drop Functions
		;;; If Female ,,,
		If Agender == 1
			;;; Sperm ,,,
			if malePres > 0 && SETsexdrops != 2
				x = malePres+1
				orgaActor[i].AddItem(SuH_ii_Sperm, x, true)
				orgaActor[i].EquipItem(SuH_ii_Sperm, false, true)
			endIf
			;;; Sperm (Creature) ,,,
			if mcrePres > 0 && SETsexdrops != 2
				x = mcrePres+1
				orgaActor[i].AddItem(SuH_ii_SpermCreature, x, true)
				orgaActor[i].EquipItem(SuH_ii_SpermCreature, false, true)
			endIf
			if femalePres > 1 && SETsexdrops != 1
				x = femalePres
				orgaActor[i].AddItem(SuH_ii_BreastMilk, x, true)
				orgaActor[i].EquipItem(SuH_ii_BreastMilk, false, true)
			endIf
			if fcrePres > 0 && SETsexdrops != 1
				x = fcrePres+1
				orgaActor[i].AddItem(SuH_ii_BreastMilkCreature, x, true)
				orgaActor[i].EquipItem(SuH_ii_BreastMilkCreature, false, true)
			endIf
		endIf
		;;; If Male ,,,
		If Agender == 0
			;;; Sperm ,,,
			if malePres > 1 && SETsexdrops != 2
				x = malePres
				orgaActor[i].AddItem(SuH_ii_Sperm, x, true)
				orgaActor[i].EquipItem(SuH_ii_Sperm, false, true)
			endIf
			;;; Sperm (Creature) ,,,
			if mcrePres > 0 && SETsexdrops != 2
				x = mcrePres+1
				orgaActor[i].AddItem(SuH_ii_SpermCreature, x, true)
				orgaActor[i].EquipItem(SuH_ii_SpermCreature, false, true)
			endIf
			if femalePres > 0 && SETsexdrops != 1
				x = femalePres+1
				orgaActor[i].AddItem(SuH_ii_BreastMilk, x, true)
				orgaActor[i].EquipItem(SuH_ii_BreastMilk, false, true)
			endIf
			if fcrePres > 0 && SETsexdrops != 1
				x = fcrePres+1
				orgaActor[i].AddItem(SuH_ii_BreastMilkCreature, x, true)
				orgaActor[i].EquipItem(SuH_ii_BreastMilkCreature, false, true)
			endIf
		endIf
		;;; If Male Creature ,,,
		If Agender == 2
			;;; Sperm ,,,
			if malePres > 0 && SETsexdrops != 2
				x = malePres+1
				orgaActor[i].AddItem(SuH_ii_Sperm, x, true)
				orgaActor[i].EquipItem(SuH_ii_Sperm, false, true)
			endIf
			;;; Sperm (Creature) ,,,
			if mcrePres > 1 && SETsexdrops != 2
				x = mcrePres
				orgaActor[i].AddItem(SuH_ii_SpermCreature, x, true)
				orgaActor[i].EquipItem(SuH_ii_SpermCreature, false, true)
			endIf
			if femalePres > 0 && SETsexdrops != 1
				x = femalePres+1
				orgaActor[i].AddItem(SuH_ii_BreastMilk, x, true)
				orgaActor[i].EquipItem(SuH_ii_BreastMilk, false, true)
			endIf
			if fcrePres > 0 && SETsexdrops != 1
				x = fcrePres+1
				orgaActor[i].AddItem(SuH_ii_BreastMilkCreature, x, true)
				orgaActor[i].EquipItem(SuH_ii_BreastMilkCreature, false, true)
			endIf
		endIf
		;;; If Female Creature ,,,
		If Agender == 3
			;;; Sperm ,,,
			if malePres > 0 && SETsexdrops != 2
				x = malePres+1
				orgaActor[i].AddItem(SuH_ii_Sperm, x, true)
				orgaActor[i].EquipItem(SuH_ii_Sperm, false, true)
			endIf
			;;; Sperm (Creature) ,,,
			if mcrePres > 0 && SETsexdrops != 2
				x = mcrePres+1
				orgaActor[i].AddItem(SuH_ii_SpermCreature, x, true)
				orgaActor[i].EquipItem(SuH_ii_SpermCreature, false, true)
			endIf
			if femalePres > 0 && SETsexdrops != 1
				x = femalePres+1
				orgaActor[i].AddItem(SuH_ii_BreastMilk, x, true)
				orgaActor[i].EquipItem(SuH_ii_BreastMilk, false, true)
			endIf
			if fcrePres > 1 && SETsexdrops != 1
				x = fcrePres
				orgaActor[i].AddItem(SuH_ii_BreastMilkCreature, x, true)
				orgaActor[i].EquipItem(SuH_ii_BreastMilkCreature, false, true)
			endIf
		endIf
		;end/

		i += 1
	endWhile
	;end/
endEvent
;end/

Event DanieManage(string eventName, string argString, float argNum, form sender)
	sslThreadController Thread = SexLab.HookController(argString)
	actor[] endActor = SexLab.HookActors(argString)
	int i = 0
	while i < endActor.Length
		endActor[i].RemoveSpell(SuH_essential)
		if endActor[i] == playerRef
			endActor[i].RemoveSpell(SuH_PCSmastery)
			endActor[i].RemoveSpell(SuH_PCSsubmit)
			endActor[i].RemoveSpell(SuH_PCStraining)
		else
			endActor[i].RemoveSpell(SuH_NPCsattacker)
			endActor[i].RemoveSpell(SuH_NPCsconsent)
			endActor[i].RemoveSpell(SuH_NPCsvictim)
			endActor[i].RemoveSpell(SuH_NPCsnvictim)
			endActor[i].RemoveSpell(SuH_NPCsnattacker)
			endActor[i].RemoveSpell(SuH_NPCsnconsent)
			endActor[i].RemoveSpell(SuH_NPCsmastery)
			endActor[i].RemoveSpell(SuH_NPCstraining)
			endActor[i].RemoveSpell(SuH_NPCssubmit)
		endIf
		endActor[i].RemoveSpell(SuH_CHAinact)
	i += 1
	endWhile
endEvent