:: Main [nobr]

<<if $releaseID >= 1000 || $ver.includes("0.9") || $ver.includes("0.8") || $ver.includes("0.7") || $ver.includes("0.6")>>
	<<if $releaseID >= 1000>>
	<<else>>
		''@@color:red;INCOMPATIBLE SAVE WARNING:@@'' your saved game was created using version $ver and you are using version 0.10.0. Please select New Game Plus from the Options menu or start a new game.
		<br><br>
	<</if>>
<<else>>
	''@@color: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 ndef $defaultRules>>
	<<include "Init Rules">>
<</if>>
<<if ndef $PC.birthArcOwner>>
	<<set $PC.birthArcOwner = 0>>
<</if>>
<<if ndef $PC.birthCitizen>>
	<<set $PC.birthCitizen = 0>>
<</if>>
<<if ndef $medicalEnema>>
	<<set $medicalEnema = 0>>
<</if>>
<<set $currentRule = $defaultRules[0]>>

<<SlaveSort $slaves>>

<<set $dormitoryPopulation = 0, $roomsPopulation = 0, $slavesVisible = 0, _PA = -1, _HG = -1, _RC = -1, _BG = -1, _SL = $slaves.length>>

<<for $i = 0; $i < _SL; $i++>>
	<<if $slaves[$i].assignmentVisible == 1>>
		<<set $slavesVisible++>>
		<<if $slaves[$i].livingRules == "luxurious">>
			<<if $slaves[$i].relationship >= 4>>
			  <<set $roomsPopulation += 0.5>>
			<<else>>
			  <<set $roomsPopulation++>>
			<</if>>
		<<else>>
			<<set $dormitoryPopulation++>>
		<</if>>
	<</if>>
	<<set _ID = $slaves[$i].ID>>
	<<if $personalAttention == _ID>>
		<<set _PA = $i>>
	<</if>>
	<<if $HeadGirl.ID == _ID>>
		<<set _HG = $i>>
	<<elseif $Recruiter.ID == _ID>>
		<<set _RC = $i>>
	<<elseif $Bodyguard.ID == _ID>>
		<<set _BG = $i>>
	<</if>>
<</for>>

<<set $nextButton = "END WEEK", $nextLink = "End Week", $showEncyclopedia = 1, $encyclopedia = "How to Play">>
<<include "Costs">>

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

__''MAIN MENU''__&nbsp;&nbsp;&nbsp;&nbsp;//[[Summary Options]]
<<if $rulesAssistantMain != 0>>
| [[Rules Assistant Options|Rules Assistant]]
<<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 "Activate Rules Assistant">><<for _i = 0;_i < _SL;_i++>><<if $slaves[_i].useRulesAssistant == 1 && $slaves[_i].assignmentVisible == 1>><<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 != "age">>[[Age|Main][$sortSlavesBy = "age"]]<<else>>Age<</if>> |
	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>>

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