:: Random Individual Event [nobr]

<<set $showEncyclopedia = 0>>
<<if $eventSlave == 0>>
	<<if $cheatMode == 1>>
		<<set $nextButton = "Refresh", $nextLink = "Random Individual Event", $returnTo = "Random Individual Event">>
		''One of the following eligible slaves would have been selected for an individual random event:''
		<br>
		<<for $i = 0; $i < $eligibleSlaves.length; $i++>>
			<<capture $i>>
			<<set $eventSlave = getSlave($eligibleSlaves[$i])>>
			<<if $eventSlave.slaveSurname>>
				<<if $surnameOrder != 1>>
					<<switch $eventSlave.nationality>>
						<<case "Cambodian" "Chinese" "Hungarian" "Japanese" "Korean" "Mongolian" "Taiwanese" "Vietnamese">>
							<<set _slaveName = $eventSlave.slaveSurname + " " + $eventSlave.slaveName>>
						<<default>>
							<<set _slaveName = $eventSlave.slaveName + " " + $eventSlave.slaveSurname>>
					<</switch>>
				<<else>>
					<<set _slaveName = $eventSlave.slaveName + " " + $eventSlave.slaveSurname>>
				<</if>>
			<<else>>
				<<set _slaveName = $eventSlave.slaveName>>
			<</if>>
			<br><<print "[[_slaveName|Random Individual Event][$eventSlave = getSlave($eligibleSlaves[$i])]]">>
			<</capture>>
		<</for>>
		<br><br>[[Switch to Random Nonindividual Event|Random Nonindividual Event][$activeSlave = 0, $eventSlave = 0]]
	<<else>>
		<<set $eventSlave = getSlave($eligibleSlaves.random())>>
		<<goto "Random Individual Event">>
	<</if>>
<<else>>

	/* initialize event lists as arrays [], not objects {} */
	<<set $events = [], $RESSevent = [], $RESSTRevent = [], $RETSevent = [], $RECIevent = [], $activeSlave = 0, $groomSlave = 0, $brideSlave = 0, $legendaryFacility = 0>>

	/* SUB CHECKS */

	<<set $REAnalCowgirlSubIDs = [], $RETasteTestSubIDs = [], $RESimpleAssaultIDs = [], $REInterslaveBeggingIDs = [], $RECockmilkInterceptionIDs = [], $REShowerForceSubIDs = [], $RESadisticDescriptionSubIDs = [], $REIfYouEnjoyItSubIDs = [], $REBoobCollisionSubIDs = [], $RERepressedAnalVirginSubIDs = []>>

	<<for $i = 0; $i < $slaves.length; $i++>>
		<<if $slaves[$i].fetish != "mindbroken">>
			<<if canWalk($slaves[$i])>>
				<<if canTalk($slaves[$i])>>
					<<if isSlaveAvailable($slaves[$i])>>
						<<if $slaves[$i].devotion <= 20>>
							<<if ($slaves[$i].fetish != "buttslut") || ($slaves[$i].fetishKnown == 0)>>
								<<if $slaves[$i].anus != 0>>
									<<set $REShowerForceSubIDs.push($slaves[$i].ID)>>
									<<set $REIfYouEnjoyItSubIDs.push($slaves[$i].ID)>>
								<<else>>
									<<set $RESadisticDescriptionSubIDs.push($slaves[$i].ID)>>
								<</if>>
							<</if>>
							<<if $slaves[$i].anus != 0 && canDoAnal($slaves[$i])>>
								<<if $slaves[$i].vagina != 0 && canDoVaginal($slaves[$i])>>
									<<if $slaves[$i].belly < 2000>>
										<<if $slaves[$i].combatSkill == 0>>
											<<if $slaves[$i].muscles <= 30>>
												<<set $RESimpleAssaultIDs.push($slaves[$i].ID)>>
											<</if>>
										<</if>>
									<</if>>
								<</if>>
							<</if>>
						<<else>>
							<<if $slaves[$i].boobs > 3000>>
								<<set $REBoobCollisionSubIDs.push($slaves[$i].ID)>>
							<</if>>
							<<if $slaves[$i].releaseRules != "restrictive" && $slaves[$i].releaseRules != "masturbation">>
								<<if $slaves[$i].energy > 40>>
									<<if canDoVaginal($slaves[$i]) || canDoAnal($slaves[$i])>>
										<<set $REInterslaveBeggingIDs.push($slaves[$i].ID)>>
									<</if>>
								<</if>>
							<</if>>
						<</if>>
						<<if $slaves[$i].devotion >= -20>>
							<<if $slaves[$i].devotion <= 60>>
								<<if $slaves[$i].fetish != "buttslut">>
									<<if $slaves[$i].anus != 0 && canDoAnal($slaves[$i])>>
										<<set $REAnalCowgirlSubIDs.push($slaves[$i].ID)>>
									<</if>>
								<</if>>
							<</if>>
						<</if>>
						<<if $slaves[$i].anus > 0 && canDoAnal($slaves[$i])>>
							<<if $slaves[$i].devotion > 50>>
								<<if $slaves[$i].amp == 0>>
									<<set $RERepressedAnalVirginSubIDs.push($slaves[$i].ID)>>
								<</if>>
							<</if>>
						<</if>>
					<</if>>
					<<if $slaves[$i].assignmentVisible == 1>>
						<<if $slaves[$i].livingRules == "luxurious">>
							<<if $slaves[$i].devotion >= -20>>
								<<if $slaves[$i].anus != 0>>
									<<set $RETasteTestSubIDs.push($slaves[$i].ID)>>
								<</if>>
							<</if>>
						<</if>>
					<</if>>
				<</if>>
			<</if>>
			<<if $slaves[$i].assignment == "work in the dairy" || $slaves[$i].assignment == "get milked">>
				<<if $slaves[$i].balls>>
					<<if $slaves[$i].dick>>
						<<if $slaves[$i].vasectomy == 0 && $slaves[$i].ballType == "human">>
							<<if canDoAnal($slaves[$i])>>
								<<set $RECockmilkInterceptionIDs.push($slaves[$i].ID)>>
							<</if>>
						<</if>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
	<</for>>

	<<if $eventSlave.assignment == "be a servant">>
		<<run generateRandomEventPoolServant($eventSlave)>>
	<<else>>
		<<run generateRandomEventPoolStandard($eventSlave)>>
	<</if>>

	/* EVENT STRIPPING */
	/* obsolete? Slave is chosen before this is ever reached and as such has no use?
	<<if $normalizedEvents == 1>>
		<<for $i = 0; $i < $events.length; $i++>>
			<<if $events.count($events[$i]) > 1>>
				<<set $events.deleteAt($i), $i-->>
			<</if>>
		<</for>>
	<</if>>
	*/
	/* EVENT RANDOMIZATION */
	<<set $events = populateEventArray()>>

	<<if $cheatMode == 1>>
		<<goto "random event select">>
	<<else>>
		<<goto "random event roll">>
	<</if>>

<</if>> /* CLOSES SLAVE SELECT */
