Scriptname SuH_Fun extends Quest  

SexLabFramework property SexLab auto

;ent/ Variables
GlobalVariable property SuH_PCSabsorbhealth auto
GlobalVariable property SuH_PCSabsorbmagicka auto
GlobalVariable property SuH_PCSabsorbstamina auto
GlobalVariable property SuH_PCScaphealth auto
GlobalVariable property SuH_PCScapmagicka auto
GlobalVariable property SuH_PCScapstamina auto
GlobalVariable property SuH_PCSspermhealth auto
GlobalVariable property SuH_PCSspermmagicka auto
GlobalVariable property SuH_PCSspermstamina auto
GlobalVariable property SuH_PCSmilkhealth auto
GlobalVariable property SuH_PCSmilkmagicka auto
GlobalVariable property SuH_PCSmilkstamina auto
GlobalVariable property SuH_PCSxp auto
GlobalVariable property SuH_PCSxpearn auto
GlobalVariable property SuH_PCSxpgain auto
GlobalVariable property SuH_PCSforce auto
GlobalVariable property SuH_PCSdesire auto
GlobalVariable property SuH_SETallowmalehomo auto
GlobalVariable property SuH_SETallowfemalehomo auto
;end/
;ent/ Spell
Spell property SuH_sex_inact auto
;end/
;ent/ Actors
Actor property PlayerRef auto
;end/

;ent/ XPcalc
Function XPcalc(string aPreset, float aMOD, int XPearn, float lvlS, bool dReport) 

	If aPreset != "0"
		if aPreset == "PCmastery" ; Mastery Sex Act (Player as aggressor)
			int desireCost = Math.Floor(SuH_PCSdesire.GetValue() * 0.05)
			int desireV = Math.Floor(SuH_PCSdesire.GetValue() - desireCost)
			SuH_PCSdesire.SetValue(desireV)
			XPearn = Math.Floor(XPearn + desireCost + SuH_PCSxpearn.GetValue())
			aMOD = 0.2
			lvlS = 2.0
		elseIf aPreset == "PCtraining" ; Consent Sex Act (Player with consent)
			int desireCost = Math.Floor(SuH_PCSdesire.GetValue() * 0.05)
			int desireV = Math.Floor(SuH_PCSdesire.GetValue() - desireCost)
			SuH_PCSdesire.SetValue(desireV)
			XPearn = Math.Floor(XPearn + desireCost + SuH_PCSxpearn.GetValue())
			aMOD = 0.0
			lvlS = 2.0
		elseIf aPreset == "PCsubmit" ; Submit Sex Act (Player as victim)
			int desireCost = Math.Floor(SuH_PCSdesire.GetValue() * 0.05)
			int desireV = Math.Floor(SuH_PCSdesire.GetValue() - desireCost)
			SuH_PCSdesire.SetValue(desireV)
			XPearn = Math.Floor(XPearn + desireCost + SuH_PCSxpearn.GetValue())
			aMOD = -0.2
			lvlS = 2.0
		elseIf aPreset == "PCsperm" ; Consume Sperm
			aMOD = 0.0
			XPearn = Math.Floor(XPearn + SuH_PCSxpearn.GetValue())
			lvlS = 0.5
		elseIf aPreset == "PCmilk" ; Consume Milk
			aMOD = 0.0
			XPearn = Math.Floor(XPearn + SuH_PCSxpearn.GetValue())
			lvlS = 0.5
		elseIf aPreset == "PCorgasm"
			aMOD = 0.0
			lvlS = 0.0
			int desireCost = Math.Floor(SuH_PCSdesire.GetValue() * 0.8)
			int desireV = Math.Floor(SuH_PCSdesire.GetValue() - desireCost)
			SuH_PCSdesire.SetValue(desireV)
			XPearn = Math.Floor(XPearn + desireCost + SuH_PCSxpearn.GetValue())
		else
			debug.trace("SuH ERROR : XPcalc aPreset was invalid", 2)
		endIf
	endIf
		if XPearn == 0
			XPearn = SuH_PCSxpearn.GetValue() as int
		endIf
		float eMOD = aMOD + SuH_PCSxpgain.GetValue()
		int PClevel = PlayerRef.GetLevel() as int
		int x = Math.Floor(((XPearn+(PClevel*lvlS))*eMOD))
		int y = SuH_PCSxp.GetValue() as int
		SuH_PCSxp.SetValue(x+y)
endFunction
;end/

;ent/ STATcalc
Function STATcalc(Actor eChar,bool PCin, string aPreset,string Stat, bool drainC,float aMOD,float aEffect,bool dReport)
	if PCin ; If Player Character is involved
		If aPreset != "0"
			if aPreset == "PCmastery" ; Mastery Sex Act
				aMOD = 0.2
				aEffect = 0.0
			elseif aPreset == "PCtraining" ; Consent Sex Act
				aMOD = 0.0
				aEffect = 0.0
			elseif aPreset == "PCsubmit" ; Submit Sex Act
				aMOD = -0.2
				aEffect = 0
			elseif aPreset == "PCsperm" ; Consume Sperm
				aMOD = 0.0
				aEffect = 0.0
			elseif aPreset == "PCmilk" ; Consume Milk
				aMOD = 0.0
				aEffect = 0.0
			else
				debug.trace("SuH ERROR : STATcalc aPreset was invalid", 2)
			endIf
		endIf
		if eChar == PlayerRef ; if character is the player
			if drainC ; if drain is TRUE
				; [][][] Currently Disabled
			else ; if drain is FALSE
				if Stat == "All" || Stat == "Health" ; Earn Health 
						float eMOD = 1.0+aMOD ; Set Multiplier
						float cS = eChar.GetBaseActorValue("health") ; Get Base Stat
						float cScap = SuH_PCScaphealth.GetValue() ; Get Stat Cap
						float k = 0.0 ; Set-up Absorption Variable
						if aEffect == 0 ; if aEffect is set to default
							if aPreset == "PCsperm" ; Check if preset is PCsperm
								k = SuH_PCSspermhealth.GetValue() as int ; set to default
							elseIf aPreset == "PCmilk" ; Check if preset is PCmilk
								k = SuH_PCSmilkhealth.GetValue() as int ; set to default
							else ; Set to general absorption stat
								k = SuH_PCSabsorbhealth.GetValue() as int ; set to default
							endIf
						else ; If aEffect isn't default
							k = aEffect ; Set absorption calculation to k
						endIf
					if cS >= cScap ; Check if Stat is capped
						int x = Math.Floor(k*eMOD) ; Find total absorption
						int y = SuH_PCSforce.GetValue() as int ; Get Force value
						SuH_PCSforce.SetValue(x+y) ; Set Force
					else ; If stat wasn't capped
						int x = Math.Floor(k*eMOD) ; Find total absorption
						int y = Math.Floor(x+cS) ; Find result stat
						if y <= cScap ; If result is below cap
							eChar.SetActorValue("health", y) ; Set Stat
							debug.trace("SuH : "+x+" Health Earned") ; Output
						else ; If result was above cap
							eChar.SetActorValue("health", cScap) ; Set Stat to cap
							int j = Math.Floor(x-cScap) ; Find absorbed value
							int z = Math.Floor(y+SuH_PCSforce.GetValue()) ; Get Force and add
							SuH_PCSforce.SetValue(z) ; Set Force
						endIf
					endIf
				endIf
				if Stat == "All" || Stat == "Magicka" ; Earn Magicka
						float eMOD = 1.0+aMOD
						float cS = eChar.GetBaseActorValue("magicka")
						float cScap = SuH_PCScapmagicka.GetValue()
						float k = 0.0
						if aEffect == 0
							if aPreset == "PCsperm"
								k = SuH_PCSspermmagicka.GetValue() as int
							elseIf aPreset == "PCmilk"
								k = SuH_PCSmilkmagicka.GetValue() as int
							else
								k = SuH_PCSabsorbmagicka.GetValue() as int
							endIf
						else
							k = aEffect
						endIf
					if cS >= cScap
						int x = Math.Floor(k*eMOD)
						int y = SuH_PCSforce.GetValue() as int
						SuH_PCSforce.SetValue(x+y)
					else
						int x = Math.Floor(k*eMOD)
						int y = Math.Floor(x+cS)
						if y <= cScap
							eChar.SetActorValue("magicka", y)
						else
							eChar.SetActorValue("magicka", cScap)
							int j = Math.Floor(x-cScap)
							int z = Math.Floor(y+SuH_PCSforce.GetValue())
							SuH_PCSforce.SetValue(z)
						endIf
					endIf
				endIf
				if Stat == "All" || Stat == "Stamina" ; Earn Stamina
						float eMOD = 1.0+aMOD
						float cS = eChar.GetBaseActorValue("Stamina")
						float cScap = SuH_PCScapstamina.GetValue()
						float k = 0
						if aEffect == 0
							if aPreset == "PCsperm"
								k = SuH_PCSspermstamina.GetValue() as int
							elseIf aPreset == "PCmilk"
								k = SuH_PCSmilkstamina.GetValue() as int
							else
								k = SuH_PCSabsorbstamina.GetValue() as int
							endIf
						else
							k = aEffect
						endIf
					if cS >= cScap
						int x = Math.Floor(k*eMOD)
						int y = SuH_PCSforce.GetValue() as int
						SuH_PCSforce.SetValue(x+y)
					else
						int x = Math.Floor(k*eMOD)
						int y = Math.Floor(x+cS)
						if y <= cScap
							eChar.SetActorValue("stamina", y)
						else
							eChar.SetActorValue("stamina", cScap)
							int j = Math.Floor(x-cScap)
							int z = Math.Floor(y+SuH_PCSforce.GetValue())
							SuH_PCSforce.SetValue(z)
						endIf
					endIf
				endIf
			endIf
		else ; if character isn't the player
			if aEffect == 0
				aEffect = SuH_PCSabsorbhealth.GetValue()
			endIf
			if drainC ; if drain is TRUE
				if Stat == "All" || Stat == "Health"
					float eMOD = 1.0+aMOD
					float cS = eChar.GetBaseActorValue("health")
					int x = Math.Floor(aEffect*eMOD)
					if x >= cS
						eChar.SetActorValue("health",0)
					else
						int y = Math.Floor(cS-x)
						eChar.SetActorValue("health",y)
					endIf
				endIf
				if Stat == "All" || Stat == "Magicka"
					float eMOD = 1.0+aMOD
					float cS = eChar.GetBaseActorValue("magicka")
					int x = Math.Floor(aEffect*eMOD)
					if x >= cS
						eChar.SetActorValue("magicka",0)
					else
						int y = Math.Floor(cS-x)
						eChar.SetActorValue("magicka",y)
					endIf
				endIf
				if Stat == "All" || Stat == "Stamina"
					float eMOD = 1.0+aMOD
					float cS = eChar.GetBaseActorValue("stamina")
					int x = Math.Floor(aEffect*eMOD)
					if x >= cS
						eChar.SetActorValue("stamina",0)
					else
						int y = Math.Floor(cS-x)
						eChar.SetActorValue("stamina",y)
					endIf
				endIf
			else ; if drain is FALSE
				; [][][] Currently Disabled
			endIf
		endIf
	endIf
endFunction
;end/

;ent/ ANIMcalc
Function ANIMcalc(string aPreset, actor[] sentActor, actor victimActor=none)
	if sentActor.Length == 2
		actor a0 = sentActor[0]
		actor a1 = sentActor[1]
		int a0g = SexLab.GetGender(a0)
		int a1g = SexLab.GetGender(a1)
		if a0g == 1 ; 0 female
			if a1g == 0 ; 1 male
				bool a0v = True
				bool a1v = True
				if a0.HasSpell(SuH_sex_inact)
					a0v = false
				else
					a0v = SexLab.IsValidActor(a0)
				endIf
				if a1.HasSpell(SuH_sex_inact)
					a1v = false
				else
					a1v = SexLab.IsValidActor(a1)
				endIf
				if a0v == TRUE && a1v == TRUE ; if valid
					actor[] animActor = new actor[2]
					animActor[0] = a0
					animActor[1] = a1
					if victimActor != none ; if aggressive
							if victimActor == a0 ; if female victim
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
							SexLab.StartSex(animActor, animSET, victim=victimActor)
						else ; if male victim
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"Cowgirl", "Lesbian", requireAll=true)
							SexLab.StartSex(animActor, animSET, victim=victimActor)
						endIf
					else ; if non-aggressive
						sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
						SexLab.StartSex(animActor, animSET)
					endIf
				endIf
			elseIf a1g == 2 ; 1 male creature
				bool a0v = True
				bool a1v = True
				if a0.HasSpell(SuH_sex_inact)
					a0v = false
				else
					a0v = SexLab.IsValidActor(a0)
				endIf
				if a1.HasSpell(SuH_sex_inact)
					a1v = false
				else
					a1v = SexLab.IsValidActor(a1)
				endIf
				if a0v == TRUE && a1v == TRUE ; if valid
					actor[] animActor = new actor[2]
					animActor[0] = a0
					animActor[1] = a1
					if victimActor != none ; if aggressive
						sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "", requireAll=true)
						SexLab.StartSex(animActor, animSET, victim=victimActor)
					else ; if non-aggressive
						sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "", requireAll=true)
						SexLab.StartSex(animActor, animSET)
					endIf
				endIf
			elseif SuH_SETallowfemalehomo.GetValue()
				if a1g == 1 ; 1 female
					bool a0v = True
					bool a1v = True
					if a0.HasSpell(SuH_sex_inact)
						a0v = false
					else
						a0v = SexLab.IsValidActor(a0)
					endIf
					if a1.HasSpell(SuH_sex_inact)
						a1v = false
					else
						a1v = SexLab.IsValidActor(a1)
					endIf
					if a0v == TRUE && a1v == TRUE ; if valid
						actor[] animActor = new actor[2]
						animActor[0] = a0
						animActor[1] = a1
						if victimActor != none ; if aggressive
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"Lesbian", "", requireAll=true)
							SexLab.StartSex(animActor, animSET, victim=victimActor)
						else ; if non-aggressive
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
							SexLab.StartSex(animActor, animSET)
						endIf
					endIf
				elseIf a1g == 3 ; 1 female creature
					bool a0v = True
					bool a1v = True
					if a0.HasSpell(SuH_sex_inact)
						a0v = false
					else
						a0v = SexLab.IsValidActor(a0)
					endIf
					if a1.HasSpell(SuH_sex_inact)
						a1v = false
					else
						a1v = SexLab.IsValidActor(a1)
					endIf
					if a0v == TRUE && a1v == TRUE ; if valid
						actor[] animActor = new actor[2]
						animActor[0] = a0
						animActor[1] = a1
						if victimActor != none ; if aggressive
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"Cowgirl", "Lesbian", requireAll=true)
							SexLab.StartSex(animActor, animSET, victim=victimActor)
						else ; if non-aggressive
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
							SexLab.StartSex(animActor, animSET)
						endIf
					endIf
				endIf
			endIf
		elseIf a0g == 0 ; 0 male
			if a1g == 1 ; 1 female
					bool a0v = True
					bool a1v = True
					if a0.HasSpell(SuH_sex_inact)
						a0v = false
					else
						a0v = SexLab.IsValidActor(a0)
					endIf
					if a1.HasSpell(SuH_sex_inact)
						a1v = false
					else
						a1v = SexLab.IsValidActor(a1)
					endIf
				if a0v == TRUE && a1v == TRUE ; if valid
					actor[] animActor = new actor[2]
					animActor[0] = a1
					animActor[1] = a0
					if victimActor != none ; if aggressive
							if victimActor == a1 ; if female victim
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
							SexLab.StartSex(animActor, animSET, victim=victimActor)
						else ; if male attacker
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"Cowgirl", "Lesbian", requireAll=true)
							SexLab.StartSex(animActor, animSET, victim=victimActor)
						endIf
					else ; if non-aggressive
						sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
						SexLab.StartSex(animActor, animSET)
					endIf
				endIf
			elseif a1g == 3 ; 1 female creature
					bool a0v = True
					bool a1v = True
					if a0.HasSpell(SuH_sex_inact)
						a0v = false
					else
						a0v = SexLab.IsValidActor(a0)
					endIf
					if a1.HasSpell(SuH_sex_inact)
						a1v = false
					else
						a1v = SexLab.IsValidActor(a1)
					endIf
				if a0v == TRUE && a1v == TRUE ; if valid
					actor[] animActor = new actor[2]
					animActor[0] = a1
					animActor[1] = a0
					if victimActor != none ; if aggressive
						sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "", requireAll=true)
						SexLab.StartSex(animActor, animSET, victim=victimActor)
					else ; if non-aggressive
						sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
						SexLab.StartSex(animActor, animSET)
					endIf
				endIf
			elseIf SuH_SETallowmalehomo.GetValue()
				if a1g == 0 ; 1 male
					bool a0v = True
					bool a1v = True
					if a0.HasSpell(SuH_sex_inact)
						a0v = false
					else
						a0v = SexLab.IsValidActor(a0)
					endIf
					if a1.HasSpell(SuH_sex_inact)
						a1v = false
					else
						a1v = SexLab.IsValidActor(a1)
					endIf
					if a0v == TRUE && a1v == TRUE ; if valid
						actor[] animActor = new actor[2]
						animActor[0] = a1
						animActor[1] = a0
						if victimActor != none ; if aggressive
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
							SexLab.StartSex(animActor, animSET, victim=victimActor)
						else ; if non-aggressive
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
							SexLab.StartSex(animActor, animSET)
						endIf
					endIf
				elseif a1g == 2 ; male creature
					bool a0v = True
					bool a1v = True
					if a0.HasSpell(SuH_sex_inact)
						a0v = false
					else
						a0v = SexLab.IsValidActor(a0)
					endIf
					if a1.HasSpell(SuH_sex_inact)
						a1v = false
					else
						a1v = SexLab.IsValidActor(a1)
					endIf
					if a0v == TRUE && a1v == TRUE ; if valid
						actor[] animActor = new actor[2]
						animActor[0] = a1
						animActor[1] = a0
						if victimActor != none ; if aggressive
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"Cowgirl", "Lesbian", requireAll=true)
							SexLab.StartSex(animActor, animSET, victim=victimActor)
						else ; if non-aggressive
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
							SexLab.StartSex(animActor, animSET)
						endIf
					endIf
				endIf
			endIf
		elseIf a0g == 2 ; 0 male creature
			if a1g == 1 ; 1 female
					bool a0v = True
					bool a1v = True
					if a0.HasSpell(SuH_sex_inact)
						a0v = false
					else
						a0v = SexLab.IsValidActor(a0)
					endIf
					if a1.HasSpell(SuH_sex_inact)
						a1v = false
					else
						a1v = SexLab.IsValidActor(a1)
					endIf
				if a0v == TRUE && a1v == TRUE ; if valid
					actor[] animActor = new actor[2]
					animActor[0] = a1
					animActor[1] = a0
					if victimActor != none ; if aggressive
						sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "", requireAll=true)
						SexLab.StartSex(animActor, animSET, victim=victimActor)
					else ; if non-aggressive
						sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
						SexLab.StartSex(animActor, animSET)
					endIf
				endIf
			elseIf a1g == 2 ; 1 female creature
					bool a0v = True
					bool a1v = True
					if a0.HasSpell(SuH_sex_inact)
						a0v = false
					else
						a0v = SexLab.IsValidActor(a0)
					endIf
					if a1.HasSpell(SuH_sex_inact)
						a1v = false
					else
						a1v = SexLab.IsValidActor(a1)
					endIf
				if a0v == TRUE && a1v == TRUE ; if valid
					actor[] animActor = new actor[2]
					animActor[0] = a1
					animActor[1] = a0
					if victimActor != none ; if aggressive
						sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "", requireAll=true)
						SexLab.StartSex(animActor, animSET, victim=victimActor)
					else ; if non-aggressive
						sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
						SexLab.StartSex(animActor, animSET)
					endIf
				endIf
			elseIf SuH_SETallowmalehomo.GetValue()
				if a1g == 0 ; 1 male
					bool a0v = True
					bool a1v = True
					if a0.HasSpell(SuH_sex_inact)
						a0v = false
					else
						a0v = SexLab.IsValidActor(a0)
					endIf
					if a1.HasSpell(SuH_sex_inact)
						a1v = false
					else
						a1v = SexLab.IsValidActor(a1)
					endIf
					if a0v == TRUE && a1v == TRUE ; if valid
						actor[] animActor = new actor[2]
						animActor[0] = a1
						animActor[1] = a0
						if victimActor != none ; if aggressive
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "", requireAll=true)
							SexLab.StartSex(animActor, animSET, victim=victimActor)
						else ; if non-aggressive
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
							SexLab.StartSex(animActor, animSET)
						endIf
					endIf
				elseIf a1g == 3 ; 1 male creature
					bool a0v = True
					bool a1v = True
					if a0.HasSpell(SuH_sex_inact)
						a0v = false
					else
						a0v = SexLab.IsValidActor(a0)
					endIf
					if a1.HasSpell(SuH_sex_inact)
						a1v = false
					else
						a1v = SexLab.IsValidActor(a1)
					endIf
					if a0v == TRUE && a1v == TRUE ; if valid
						actor[] animActor = new actor[2]
						animActor[0] = a1
						animActor[1] = a0
						if victimActor != none ; if aggressive
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "", requireAll=true)
							SexLab.StartSex(animActor, animSET, victim=victimActor)
						else ; if non-aggressive
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
							SexLab.StartSex(animActor, animSET)
						endIf
					endIf
				endIf
			endIf
		elseIf a0g == 3 ; 0 female creature
			if a1g == 0 ; 1 male
					bool a0v = True
					bool a1v = True
					if a0.HasSpell(SuH_sex_inact)
						a0v = false
					else
						a0v = SexLab.IsValidActor(a0)
					endIf
					if a1.HasSpell(SuH_sex_inact)
						a1v = false
					else
						a1v = SexLab.IsValidActor(a1)
					endIf
				if a0v == TRUE && a1v == TRUE ; if valid
					actor[] animActor = new actor[2]
					animActor[0] = a0
					animActor[1] = a1
					if victimActor != none ; if aggressive
						sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "", requireAll=true)
						SexLab.StartSex(animActor, animSET, victim=victimActor)
					else ; if non-aggressive
						sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
						SexLab.StartSex(animActor, animSET)
					endIf
				endIf
			elseif a1g == 2 ; 1 male creature
					bool a0v = True
					bool a1v = True
					if a0.HasSpell(SuH_sex_inact)
						a0v = false
					else
						a0v = SexLab.IsValidActor(a0)
					endIf
					if a1.HasSpell(SuH_sex_inact)
						a1v = false
					else
						a1v = SexLab.IsValidActor(a1)
					endIf
				if a0v == TRUE && a1v == TRUE ; if valid
					actor[] animActor = new actor[2]
					animActor[0] = a0
					animActor[1] = a1
					if victimActor != none ; if aggressive
						sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "", requireAll=true)
						SexLab.StartSex(animActor, animSET, victim=victimActor)
					else ; if non-aggressive
						sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
						SexLab.StartSex(animActor, animSET)
					endIf
				endIf
			elseIf SuH_SETallowfemalehomo.GetValue()
				if a1g == 1 ; 1 female
					bool a0v = True
					bool a1v = True
					if a0.HasSpell(SuH_sex_inact)
						a0v = false
					else
						a0v = SexLab.IsValidActor(a0)
					endIf
					if a1.HasSpell(SuH_sex_inact)
						a1v = false
					else
						a1v = SexLab.IsValidActor(a1)
					endIf
					if a0v == TRUE && a1v == TRUE ; if valid
						actor[] animActor = new actor[2]
						animActor[0] = a0
						animActor[1] = a1
						if victimActor != none ; if aggressive
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "", requireAll=true)
							SexLab.StartSex(animActor, animSET, victim=victimActor)
						else ; if non-aggressive
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
							SexLab.StartSex(animActor, animSET)
						endIf
					endIf
				elseif a1g == 3 ; 1 female creature
					bool a0v = True
					bool a1v = True
					if a0.HasSpell(SuH_sex_inact)
						a0v = false
					else
						a0v = SexLab.IsValidActor(a0)
					endIf
					if a1.HasSpell(SuH_sex_inact)
						a1v = false
					else
						a1v = SexLab.IsValidActor(a1)
					endIf
					if a0v == TRUE && a1v == TRUE ; if valid
						actor[] animActor = new actor[2]
						animActor[0] = a0
						animActor[1] = a1
						if victimActor != none ; if aggressive
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "", requireAll=true)
							SexLab.StartSex(animActor, animSET, victim=victimActor)
						else ; if non-aggressive
							sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(2,"", "Lesbian", requireAll=true)
							SexLab.StartSex(animActor, animSET)
						endIf
					endIf
				endIf
			endIf
		endIf
	elseif sentActor.Length == 1
		bool c0valid = SexLab.IsValidActor(sentActor[0])
		if c0valid == TRUE ; If actor is valid
			sslBaseAnimation[] animSET = SexLab.GetAnimationsByTags(1,"", "", requireAll=true)
			SexLab.StartSex(sentActor, animSET)
		endIf
	endIf
endFunction
;end/