:: Main [nobr]

<<unset $Flag>>
<<resetAssignmentFilter>>
<<if $releaseID >= 1000 || $ver.includes("0.9") || $ver.includes("0.8") || $ver.includes("0.7") || $ver.includes("0.6")>>
	<<if $releaseID >= 1019>>
	<<else>>
		''@@.red;INCOMPATIBLE SAVE WARNING:@@'' your saved game was created using version $ver build $releaseID. Please select New Game Plus from the Options menu or start a new game.
		<br><br>
	<</if>>
<<else>>
	''@@.red;INCOMPATIBLE SAVE WARNING:@@'' your saved game was created using version $ver and you are using later version which New Game Plus cannot reconcile. Please start a new game.
	<br><br>
<</if>>

<<if def $organsCompleted>>
	<<unset $organsCompleted>>
<</if>>

<<set $currentRule = $defaultRules[0]>>

<<SlaveSort $slaves>>

<<set _SL = $slaves.length>>

/* extra sanity checks and repair */
<<if $slaves.includes(null)>>
	<br><br>@@.red;ERROR: Main slaves array contains a null entry! Please report this.@@ <<link "Repair">><<set $slaves.delete(null)>><</link>><<goto "Main">><br><br>
<</if>>
/* end extra sanity checks and repair */

<<set _duplicateSlaves = _($slaves).countBy(s => s.ID).pickBy(v => v > 1).keys().map(v => Number(v)).value()>>
<<foreach _i of _duplicateSlaves>>
	<br><br>@@.red;Duplicate slave ID _i at indices
	<<= _($slaves)
		.map((s, idx) => ({ID: s.ID, idx: idx, name: s.slaveName, assignment: s.assignment}))
		.filter(s => s.ID === _i).map(s => s.idx + ' - ' + s.name + ' (' + s.assignment + ')').join(', ')>>@@
<</foreach>>
<<set _visibleSlaves = $slaves.filter(s => s.assignmentVisible == 1),
	$slavesVisible = _visibleSlaves.length,
	$dormitoryPopulation = _visibleSlaves.filter(s => s.livingRules != "luxurious").length,
	$roomsPopulation = $slavesVisible - $dormitoryPopulation - _visibleSlaves.filter(s => s.livingRules == "luxurious" && s.relationship >= 4).length * 0.5,
	_PA = $slaves.findIndex(s => s.ID == $personalAttention),
	_HG = $slaves.findIndex(s => s.ID == $HeadGirl.ID),
	_RC = $slaves.findIndex(s => s.ID == $Recruiter.ID),
	_BG = $slaves.findIndex(s => s.ID == $Bodyguard.ID)>>

<<set $nextButton = "END WEEK", $nextLink = "End Week", $showEncyclopedia = 1, $encyclopedia = "How to Play">>
/*<<include "Costs">>*/
<<set $costs = getCost($slaves)>>

<<set
	$arcologies[0].name = $arcologies[0].name || "Arcology X-4",
	$brothelName = $brothelName || "the Brothel",
	$brothelNameCaps = $brothelNameCaps || "The Brothel",
	$dairyName = $dairyName || "the Dairy",
	$dairyNameCaps = $dairyNameCaps || "The Dairy",
	$clubName = $clubName || "the Club",
	$clubNameCaps = $clubNameCaps || "The Club",
	$servantsQuartersName = $servantsQuartersName || "the Servants' Quarters",
	$servantsQuartersNameCaps = $servantsQuartersNameCaps || "The Servants' Quarters",
	$schoolroomName = $schoolroomName || "the Schoolroom",
	$schoolroomNameCaps = $schoolroomNameCaps || "The Schoolroom",
	$spaName = $spaName || "the Spa",
	$spaNameCaps = $spaNameCaps || "The Spa",
	$clinicName = $clinicName || "the Clinic",
	$clinicNameCaps = $clinicNameCaps || "The Clinic",
	$arcadeName = $arcadeName || "the Arcade",
	$arcadeNameCaps = $arcadeNameCaps || "The Arcade",
	$cellblockName = $cellblockName || "the Cellblock",
	$cellblockNameCaps = $cellblockNameCaps || "The Cellblock",
	$masterSuiteName = $masterSuiteName || "the Master Suite",
	$masterSuiteNameCaps = $masterSuiteNameCaps || "The Master Suite",
	$HGSuiteName = $HGSuiteName || "the Head Girl Suite",
	$HGSuiteNameCaps = $HGSuiteNameCaps || "The Head Girl Suite",
	$pitName = $pitName || "the Pit",
	$pitNameCaps = $pitNameCaps || "The Pit",
	$incubatorName = $incubatorName || "the Incubator",
	$incubatorNameCaps = $incubatorNameCaps || "The Incubator">>
<<if ($PC.customTitle == "")>>
	<<set $PC.customTitle = undefined, $PC.customTitleLisp = undefined>>
<</if>>

/* Saves use the first eight printed words to make the "file name", the below line cheats and makes saves here nicer named. */
@@font-size: 0; $arcologies[0].name, Week $week, $slaves.length Slaves, ¤$cash … … …  @@

<<if $newModelUI == 1>><<DisplayBuilding>><</if>>
<<if $seeArcology == 1>>&nbsp;&nbsp;&nbsp;&nbsp;<<include "Arcology Description">> | [[Hide|Main][$seeArcology = 0]]<br><</if>>

<<if $seeDesk == 1>>
<<include "Office Description">>
[[Hide|Main][$seeDesk = 0]]
<</if>>
<<if $seeFCNN == 1>><center>FCNN: <<print $fcnn.random()>> [[Hide|Main][$seeFCNN = 0]]</center><</if>>
<<if ($seeDesk == 1) && ($seeFCNN == 0)>><br><</if>>

<<if $lowercaseDonkey == 1>>

<br>

<<if $positionMainLinks >= 0>>
	<<MainLinks>>
<</if>>
<br>
<<if $rulesAssistantMain != 0>>
	//<span id="RAButton"><<link "Rules Assistant Options">><<goto "Rules Assistant">><</link>></span>// @@.cyan;[R]@@
	<<if $rulesAssistantAuto != 1>>
		| //<<link "Apply Rules Assistant at week end">><<set $rulesAssistantAuto = 1>><<goto "Main">><</link>>//
	<<else>>
		| //<<link "Stop applying Rules Assistant at week end">><<set $rulesAssistantAuto = 0>><<goto "Main">><</link>>//
	<</if>>
	| //<<link "Re-apply Rules Assistant now (this will only check slaves in the Penthouse)">><<for _i = 0;_i < _SL;_i++>><<if $slaves[_i].assignmentVisible == 1 && $slaves[_i].useRulesAssistant == 1>><<CheckAutoRulesActivate $slaves[_i]>><<DefaultRules $slaves[_i]>><</if>><</for>><<goto "Main">><</link>>//
<</if>>

<<if $useTabs == 0>>
//<<OptionsSortAsAppearsOnMain>>//
	<<include "Slave Summary">>

	<<if $lineSeparations == 0>><br><<else>><hr style="margin:0"><</if>>
	<<if $positionMainLinks <= 0>>
		<br><<MainLinks>>
	<</if>>

	<<if (_BG > -1) && ($slaves[_BG].assignment == "guard you")>>
		<<set $i = _BG>>
		<<set _GO = "idiot ball">>
		<<include "Use Guard">>
		<br>&nbsp;&nbsp;&nbsp;&nbsp;<<print "[[Use her mouth|FLips][$activeSlave = $slaves["+_BG+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
		| <<print "[[Play with her tits|FBoobs][$activeSlave = $slaves["+_BG+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
		<<if canDoVaginal($slaves[_BG])>>
			| <<print "[[Fuck her|FVagina][$activeSlave = $slaves["+_BG+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
			<<if canDoAnal($slaves[_BG])>>
			| <<print "[[Use her holes|FButt][$activeSlave = $slaves["+_BG+"],$nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
			<</if>>
		<</if>>
		/*check*/
		<<if canAchieveErection($slaves[_BG])>>
			| <<print "[[Ride her|FDick][$activeSlave = $slaves["+_BG+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
		<</if>>
		<<if canDoAnal($slaves[_BG])>>
		| <<print "[[Fuck her ass|FAnus][$activeSlave = $slaves["+_BG+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
		<</if>>
		| <<print "[[Abuse her|Gameover][$gameover = _GO]]">>
	<</if>>

	<<set $activeSlave = Array.random($slaves)>>
	<<if $activeSlave &&  ($activeSlave.assignment != "please you") && ($activeSlave.assignment != "guard you")>>
		<br><<include "Walk Past">>
	<</if>>

<<else>>
	<<CreateSimpleTabs>>
	<body>

	<div class="tab">
		<button class="tablinks" onclick="opentab(event, 'overview')" id="defaultButton">Overview</button>
		<button class="tablinks" onclick="opentab(event, 'Resting')">Resting</button>
		<button class="tablinks" onclick="opentab(event, 'stay confined')">Confined</button>
		<button class="tablinks" onclick="opentab(event, 'take classes')">Students</button>
		<button class="tablinks" onclick="opentab(event, 'please you')">Fucktoys</button>
		<button class="tablinks" onclick="opentab(event, 'whore')">Whores</button>
		<button class="tablinks" onclick="opentab(event, 'serve the public')">Public Servants</button>
		<button class="tablinks" onclick="opentab(event, 'be a servant')">Servants</button>
		<button class="tablinks" onclick="opentab(event, 'get milked')">Cows</button>
		<button class="tablinks" onclick="opentab(event, 'work a glory hole')">Gloryhole</button>
		<button class="tablinks" onclick="opentab(event, 'be a subordinate slave')">Subordinate slaves</button>
		<button class="tablinks" onclick="opentab(event, 'All')">All</button>	  
	</div>

	<div id="overview" class="tabcontent">
		<div class="content">
			<<set $slaveAssignmentTab = "overview">>			
			<<if _HG > -1>>
				''__@@.pink;<<SlaveFullName $HeadGirl>>@@__'' is <<if ndef $headGirlFocus>>serving as your head girl<<if $arcologies[0].FSEgyptianRevivalistLaw == 1>> and Consort<</if>>.<<else>>your head girl<<if $arcologies[0].FSEgyptianRevivalistLaw == 1>> and Consort,<</if>> and is focusing on your slaves' $headGirlFocus.<</if>>
				<span id="manageHG"><strong><<link "Manage Head Girl">><<goto "HG Select">><</link>></strong></span> @@.cyan;[H]@@
				<<set $showOneSlave = "Head Girl">>
				<<include "Slave Summary">>
			<<elseif (_HG == -1) && ($slaves.length > 1)>>
				You have @@.red;not@@ selected a Head Girl<<if $arcologies[0].FSEgyptianRevivalistLaw == 1>> and Consort<</if>>. <span id="manageHG"><strong><<link "Select one">><<goto "HG Select">><</link>></strong></span> @@.cyan;[H]@@
			<<elseif (_HG == -1)>>
				//You do not have enough slaves to keep a Head Girl//
			<</if>>
			<br><br>
			<<if _RC > -1>>
				''__@@.pink;<<SlaveFullName $Recruiter>>@@__'' is working
				<<if $recruiterTarget != "other arcologies">>
					to recruit girls.
				<<else>>
					as a Sexual
					<<if $arcologies[0].influenceTarget == -1>>
						Ambassador,  but @@.red;she has no target to influence.@@
					<<else>>
						Ambassador to <<for $i = 0; $i < $arcologies.length; $i++>><<if $arcologies[$i].direction == $arcologies[0].influenceTarget>>$arcologies[$i].name<<break>><</if>><</for>>.
					<</if>>
				<</if>>
				<span id="manageRecruiter"><strong><<link "Manage Recruiter">><<goto "Recruiter Select">><</link>></strong></span> @@.cyan;[U]@@
				<<set $showOneSlave = "recruit girls">>
				<<include "Slave Summary">>
			<<else>>
				You have @@.red;not@@ selected a Recruiter.
				<span id="manageRecruiter"><strong><<link "Select one">><<goto "Recruiter Select">><</link>></strong></span> @@.cyan;[U]@@
			<</if>>
			<<if ($dojo != 0)>>
				<br><br>
				<<if _BG > -1>>
					''__@@.pink;<<SlaveFullName $Bodyguard>>@@__'' is serving as your bodyguard. <span id="manageBG"><strong><<link "Manage Bodyguard">><<goto "BG Select">><</link>></strong></span> @@.cyan;[B]@@
					<<set $showOneSlave = "guard you">>
					<<include "Slave Summary">>
				<<else>>
					You have @@.red;not@@ selected a Bodyguard. <span id="manageBG"><strong><<link "Select one">><<goto "BG Select">><</link>></strong></span> @@.cyan;[B]@@
				<</if>>
					
				/* Start Italic event text */
				<<if (_BG > -1) && ($slaves[_BG].assignment == "guard you")>>
					<<set $i = _BG>>
					<<set _GO = "idiot ball">>
					<br><<include "Use Guard">>
					<br>&nbsp;&nbsp;&nbsp;&nbsp;<<print "[[Use her mouth|FLips][$activeSlave = $slaves["+_BG+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
					| <<print "[[Play with her tits|FBoobs][$activeSlave = $slaves["+_BG+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
					<<if canDoVaginal($slaves[_BG])>>
						| <<print "[[Fuck her|FVagina][$activeSlave = $slaves["+_BG+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
						<<if canDoAnal($slaves[_BG])>>
						| <<print "[[Use her holes|FButt][$activeSlave = $slaves["+_BG+"],$nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
						<</if>>
					<</if>>
						/*check*/
						<<if canAchieveErection($slaves[_BG])>>
						| <<print "[[Ride her|FDick][$activeSlave = $slaves["+_BG+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
					<</if>>
					<<if canDoAnal($slaves[_BG])>>
					| <<print "[[Fuck her ass|FAnus][$activeSlave = $slaves["+_BG+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
					<</if>>
					| <<print "[[Abuse her|Gameover][$gameover = _GO]]">>
				<</if>>
				/* End Italic event text */
				
			<</if>>
		</div>
	</div>
	
	<div id="Resting" class="tabcontent">
		<div class="content">
			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntryRest>>
				Associated facilities:
				<<if $spa>>[[Spa]],<<else>>Spa,<</if>>
				<<if $clinic>>[[Clinic]]<<else>>Clinic<</if>>//
			<</if>>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "resting">>
			<<include "Slave Summary">>
		</div>
	</div>
	
	<div id="stay confined" class="tabcontent">
		<div class="content">
			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntryConfinement>>
				Associated facility: <<if $cellblock>>[[Cellblock]]<<else>>Cellblock<</if>>//
			<</if>>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "stay confined">>
			<<include "Slave Summary">>
		</div>
	</div>

	<div id="take classes" class="tabcontent">
		<div class="content">
			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntryAttendingClasses>>
				Associated facility: <<if $schoolroom>>[[Schoolroom]]<<else>>Schoolroom<</if>>//
			<</if>>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "take classes">>
			<<include "Slave Summary">>
		</div>
	</div>
	
	<div id="please you" class="tabcontent">
		<div class="content">
			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntryFucktoy>>
				Associated facility: <<if $masterSuite>>[[Master Suite]]<<else>>Master Suite<</if>> //
			<</if>>
			<br>
			/* Start Italic event text */
			<<set _j = "Back", _k = "AS Dump", _l = "Main">>
			<<for $i = 0; $i < _SL; $i++>>
				<<if ($slaves[$i].assignment == "please you")>>
					<br><<include "Toychest">> //In the coming week you plan to concentrate on
					<<if $slaves[$i].fuckdoll == 0>>
						<<if $slaves[$i].toyHole != "all her holes">>
							her $slaves[$i].toyHole, but for now://
							<br>&nbsp;&nbsp;&nbsp;&nbsp;<<print "[[Use her mouth|FLips][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">> | <<print "[[Play with her tits|FBoobs][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
							<<if canDoVaginal($slaves[$i])>>
								| <<print "[[Fuck her|FVagina][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
								<<if canDoAnal($slaves[$i])>>
								| <<print "[[Use her holes|FButt][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
								<</if>>
							<</if>>
							<<if canDoAnal($slaves[$i])>>
							| <<print "[[Fuck her ass|FAnus][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
							<</if>>
							/*check*/
							<<if canAchieveErection($slaves[$i])>>
							| <<print "[[Ride her|FDick][$activeSlave = $slaves["+$i+"],$nextButton = _j,$nextLink = _k,$returnTo = _l]]">>
							<</if>>
							| <<print "[[Abuse her|FAbuse][$activeSlave = $slaves["+$i+"],$nextButton = _j,$nextLink = _k,$returnTo = _l]]">>
						<<else>>
							all of her holes equally, but for now://
							<br>&nbsp;&nbsp;&nbsp;&nbsp;<<print "[[Use her mouth|FLips][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">> | <<print "[[Play with her tits|FBoobs][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
							<<if canDoVaginal($slaves[$i])>>
								| <<print "[[Fuck her|FVagina][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
								<<if canDoAnal($slaves[$i])>>
								| <<print "[[Use her holes|FButt][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
								<</if>>
							<</if>>
							<<if canDoAnal($slaves[$i])>>
							| <<print "[[Fuck her ass|FAnus][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
							<</if>>
							/*check*/
							<<if canAchieveErection($slaves[$i])>>
							| <<print "[[Ride her|FDick][$activeSlave = $slaves["+$i+"],$nextButton = _j,$nextLink = _k,$returnTo = _l]]">>
							<</if>>
							| <<print "[[Abuse her|FAbuse][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
						<</if>>
					<<else>>
						<<if $slaves[$i].toyHole != "all her holes">>
							its $slaves[$i].toyHole.
						<<else>>
							all of its holes.
						<</if>>
					<</if>>
				<</if>>
			<</for>>
			/* End Italic event text */
			<br>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "please you">>
			<<include "Slave Summary">>
		</div>
	</div>
	
	<div id="whore" class="tabcontent">
		<div class="content">
			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntryWhoring>>
				Associated facility: <<if $brothel>>[[Brothel]]<<else>>Brothel<</if>>//
			<</if>>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "whore">>
			<<include "Slave Summary">>
		</div>
	</div>
	
	<div id="serve the public" class="tabcontent">
		<div class="content">
			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntryPublicService>>
				Associated facility: <<if $club>>[[Club]]<<else>>Club<</if>> //
			<</if>>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "serve the public">>
			<<include "Slave Summary">>
		</div>
	</div>
	
	<div id="be a servant" class="tabcontent">
		<div class="content">
			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntryServitude>>
				Associated facility: <<if $servantsQuarters>>[[Servants' Quarters]]<<else>>Servant's Quarters<</if>>//
			<</if>>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "be a servant">>
			<<include "Slave Summary">>
		</div>
	</div>
	
	<div id="get milked" class="tabcontent">
		<div class="content">
			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntryMilking>> Associated facility: <<if $dairy>>[[Dairy]]<<else>>Dairy<</if>>//
			<</if>>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "get milked">>
			<<include "Slave Summary">>
		</div>
	</div>
	
	<div id="work a glory hole" class="tabcontent">
		<div class="content">
			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntryGloryHole>>
				Associated facility: <<if $arcade>>[[Arcade]]<<else>>Arcade<</if>>//
			<</if>>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "work a glory hole">>
			<<include "Slave Summary">>
		</div>
	</div>
	
	<div id="be a subordinate slave" class="tabcontent">
		<div class="content">
			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntrySexualServitude>>//
			<</if>>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "be a subordinate slave">>
			<<include "Slave Summary">>
		</div>
	</div>
	
	<div id="All" class="tabcontent">
		<div class="content">
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "all">>
			<<include "Slave Summary">>
		</div>
	</div>

	<script>
	function opentab(evt, tabName) {
		var i, tabcontent, tablinks;
		tabcontent = document.getElementsByClassName("tabcontent");
		for (i = 0; i < tabcontent.length; i++) {
			tabcontent[i].style.display = "none";
		}
		tablinks = document.getElementsByClassName("tablinks");
		for (i = 0; i < tablinks.length; i++) {
			tablinks[i].className = tablinks[i].className.replace(" active", "");
		}
		document.getElementById(tabName).style.display = "block";
		evt.currentTarget.className += " active";
	}

	document.getElementById("defaultButton").click();
	</script>

	</body>
	<<if $positionMainLinks <= 0>>
		<br><<MainLinks>>
	<</if>>
<</if>>

<<else>>

__''MAIN MENU''__&nbsp;&nbsp;&nbsp;&nbsp;//[[Summary Options]]//
<<if $rulesAssistantMain != 0>>
	| //<span id="RAButton"><<link "Rules Assistant Options">><<goto "Rules Assistant">><</link>></span>// @@.cyan;[R]@@
	<<if $rulesAssistantAuto != 1>>
		| //<<link "Apply Rules Assistant at week end">><<set $rulesAssistantAuto = 1>><<goto "Main">><</link>>//
	<<else>>
		| //<<link "Stop applying Rules Assistant at week end">><<set $rulesAssistantAuto = 0>><<goto "Main">><</link>>//
	<</if>>
	| //<<link "Re-apply Rules Assistant now (this will only check slaves in the Penthouse)">><<for _i = 0;_i < _SL;_i++>><<if $slaves[_i].assignmentVisible == 1 && $slaves[_i].useRulesAssistant == 1>><<CheckAutoRulesActivate $slaves[_i]>><<DefaultRules $slaves[_i]>><</if>><</for>><<goto "Main">><</link>>//
<</if>>
//<<if $sortSlavesMain != 0>>
	<br>&nbsp;&nbsp;&nbsp;&nbsp;
	Sort by:
	<<if $sortSlavesBy != "devotion">>[[Devotion|Main][$sortSlavesBy = "devotion"]]<<else>>Devotion<</if>> |
	<<if $sortSlavesBy != "name">>[[Name|Main][$sortSlavesBy = "name"]]<<else>>Name<</if>> |
	<<if $sortSlavesBy != "assignment">>[[Assignment|Main][$sortSlavesBy = "assignment"]]<<else>>Assignment<</if>> |
	<<if $sortSlavesBy != "seniority">>[[Seniority purchased|Main][$sortSlavesBy = "seniority"]]<<else>>Seniority<</if>> |
	<<if $sortSlavesBy != "actualAge">>[[Age|Main][$sortSlavesBy = "actualAge"]]<<else>>Age<</if>> |
	<<if $sortSlavesBy != "visualAge">>[[Apparent Age|Main][$sortSlavesBy = "visualAge"]]<<else>>Apparent Age<</if>> |
	<<if $sortSlavesBy != "physicalAge">>[[Bodily Age|Main][$sortSlavesBy = "physicalAge"]]<<else>>Bodily Age<</if>>
	&nbsp;&nbsp;&nbsp;&nbsp;
	Sort: <<if $sortSlavesOrder != "descending">>[[Descending|Main][$sortSlavesOrder = "descending"]]<<else>>Descending<</if>> |
	<<if $sortSlavesOrder != "ascending">>[[Ascending|Main][$sortSlavesOrder = "ascending"]]<<else>>Ascending<</if>>
<</if>>//

<<if $positionMainLinks >= 0>>
	<<MainLinks>>
<</if>>
/* TASK ARRAY */
<<if $assignFilter == 1>>
<<set $jobTypes = [{title: "Rest", asgn: "rest"}, {title: "Subordinate", asgn: "be a subordinate slave"}, {title: "Whore", asgn: "whore"}, {title: "Public Servant", asgn: "serve the public"}, {title: "Hole", asgn: "work a glory hole"}, {title: "Milking", asgn: "get milked"}, {title: "House Servant", asgn: "be a servant"}, {title: "Fucktoy", asgn: "please you"}, {title: "Confinement", asgn: "stay confined"}, {title: "Classes", asgn: "take classes"}, {title: "Choose own", asgn: "choose her own job"}]>>
<br>
<<link Reset>><<set $slaves.map(function(y){y.assignmentVisible = 1})>><<set $slaves.filter(function(x){return x.assignment == "live with your Head Girl" || x.assignment.includes("in the") || x.assignment == "work as a servant" || x.assignment.includes("be the") || x.assignment == "be your agent" || x.assignment == "be your Concubine"}).map(function(y){y.assignmentVisible = 0})>><<replace '#summarylist'>><<include "Slave Summary">><</replace>><</link>>
Filter by assignment: | 
<<for _i = 0; _i < $jobTypes.length; _i++>>	
	<<set _title = $jobTypes[_i].title>>
	<<if $slaves.filter(function(x){return x.assignment == ($jobTypes[_i].asgn)}).length > 0>>
		<<print "
			<<link _title>>
				<<set $slaves.filter(function(x){return x.assignment == ($jobTypes[" + _i + "].asgn)}).map(function(y){y.assignmentVisible = 1})>>
				<<set $slaves.filter(function(x){return x.assignment != ($jobTypes[" + _i + "].asgn)}).map(function(y){y.assignmentVisible = 0})>>
				<<replace '#summarylist'>><<include 'Slave Summary'>><</replace>>
			<</link>>
		">>	|
	<</if>>
<</for>>
<</if>>
<span id='summarylist'><<include "Slave Summary">></span>

<<if $lineSeparations == 0>><br><<else>><hr style="margin:0"><</if>>
<<if $positionMainLinks <= 0>>
	<br><<MainLinks>>
<</if>>

<<set _j = "Back", _k = "AS Dump", _l = "Main">>
<<for $i = 0; $i < _SL; $i++>>
<<if ($slaves[$i].assignment == "please you")>>
	<br><<include "Toychest">> //In the coming week you plan to concentrate on
	<<if $slaves[$i].fuckdoll == 0>>
		<<if $slaves[$i].toyHole != "all her holes">>
			her $slaves[$i].toyHole, but for now://
			<br>&nbsp;&nbsp;&nbsp;&nbsp;<<print "[[Use her mouth|FLips][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">> | <<print "[[Play with her tits|FBoobs][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
			<<if canDoVaginal($slaves[$i])>>
				| <<print "[[Fuck her|FVagina][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
				<<if canDoAnal($slaves[$i])>>
				| <<print "[[Use her holes|FButt][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
				<</if>>
			<</if>>
			<<if canDoAnal($slaves[$i])>>
			| <<print "[[Fuck her ass|FAnus][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
			<</if>>
			/*check*/
			<<if canAchieveErection($slaves[$i])>>
			| <<print "[[Ride her|FDick][$activeSlave = $slaves["+$i+"],$nextButton = _j,$nextLink = _k,$returnTo = _l]]">>
			<</if>>
			| <<print "[[Abuse her|FAbuse][$activeSlave = $slaves["+$i+"],$nextButton = _j,$nextLink = _k,$returnTo = _l]]">>
		<<else>>
			all of her holes equally, but for now://
			<br>&nbsp;&nbsp;&nbsp;&nbsp;<<print "[[Use her mouth|FLips][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">> | <<print "[[Play with her tits|FBoobs][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
			<<if canDoVaginal($slaves[$i])>>
				| <<print "[[Fuck her|FVagina][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
				<<if canDoAnal($slaves[$i])>>
				| <<print "[[Use her holes|FButt][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
				<</if>>
			<</if>>
			<<if canDoAnal($slaves[$i])>>
			| <<print "[[Fuck her ass|FAnus][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
			<</if>>
			/*check*/
			<<if canAchieveErection($slaves[$i])>>
			| <<print "[[Ride her|FDick][$activeSlave = $slaves["+$i+"],$nextButton = _j,$nextLink = _k,$returnTo = _l]]">>
			<</if>>
			| <<print "[[Abuse her|FAbuse][$activeSlave = $slaves["+$i+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
		<</if>>
	<<else>>
		<<if $slaves[$i].toyHole != "all her holes">>
			its $slaves[$i].toyHole.
		<<else>>
			all of its holes.
		<</if>>
	<</if>>
<</if>>
<</for>>

<<if (_BG > -1) && ($slaves[_BG].assignment == "guard you")>>
	<<set $i = _BG>>
	<<set _GO = "idiot ball">>
	<br><<include "Use Guard">>
	<br>&nbsp;&nbsp;&nbsp;&nbsp;<<print "[[Use her mouth|FLips][$activeSlave = $slaves["+_BG+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
	| <<print "[[Play with her tits|FBoobs][$activeSlave = $slaves["+_BG+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
	<<if canDoVaginal($slaves[_BG])>>
		| <<print "[[Fuck her|FVagina][$activeSlave = $slaves["+_BG+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
		<<if canDoAnal($slaves[_BG])>>
		| <<print "[[Use her holes|FButt][$activeSlave = $slaves["+_BG+"],$nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
		<</if>>
	<</if>>
		/*check*/
		<<if canAchieveErection($slaves[_BG])>>
		| <<print "[[Ride her|FDick][$activeSlave = $slaves["+_BG+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
	<</if>>
	<<if canDoAnal($slaves[_BG])>>
	| <<print "[[Fuck her ass|FAnus][$activeSlave = $slaves["+_BG+"], $nextButton = _j, $nextLink = _k, $returnTo = _l]]">>
	<</if>>
	| <<print "[[Abuse her|Gameover][$gameover = _GO]]">>
<</if>>

<</if>> /* closes lowercase_donkey's fuckery */

<<set $activeSlave = $slaves.random()>>
<<if $activeSlave && ($activeSlave.assignment != "please you") && ($activeSlave.assignment != "guard you")>>
	<br><<include "Walk Past">>
<</if>>
