code:
:: Madam Select [nobr]

<<set $nextButton = "Back", $nextLink = "Brothel", $showEncyclopedia = 1, $encyclopedia = "Madam">>
<<showallAssignmentFilter>>
<<if ($Madam != 0)>>
	''__@@.pink;<<SlaveFullName $Madam>>@@__'' is serving as your Madam.

She will manage the brothel.
<<else>>
	You have not selected a Madam.
<</if>>

''Appoint a Madam from your devoted slaves:''

[[None|Madam Workaround][$i = -1]]

<<assignmentFilter>>

	<<showallAssignmentFilter>>
	<<include "Slave Summary">>
	<<resetAssignmentFilter>>

repo_name: drakeashordcataclysm/fc


code:
:: Madam Workaround [silently]

<<if $Madam != 0>>
	<<removeJob $Madam "be the Madam">>
<</if>>
<<if $i > -1>>
	<<assignJob $slaves[$i] "be the Madam">>
	<<set $slaves[$i].livingRules = "luxurious">>
	<<set $Madam = $slaves[$i]>>
<</if>>

<<goto "Brothel">>


code:
:: 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 >= 1022>>
	<<elseif $releaseID >= 1019>>
		''@@.red;INCOMPATIBILITY WARNING:@@'' your saved game was created using version $ver build $releaseID. Due to a major change to nationality weighting, you must run backwards compatibility.
	<<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.

	<</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.

<</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)>>

@@.red;ERROR: Main slaves array contains a null entry! Please report this.@@ <<link "Repair">><<set $slaves.delete(null)>><</link>><<goto "Main">>

<</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>>

@@.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 && (s.assignment != "be your Head Girl" || $HGSuite != 1) && (s.assignment != "guard you" || $dojo <= 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 = (Array.isArray($personalAttention) ? $personalAttention.map(function(x) { return getSlave(x.ID); }) : []),
	_HG = $slaveIndices[$HeadGirl.ID],
	_RC = $slaveIndices[$Recruiter.ID],
	_BG = $slaveIndices[$Bodyguard.ID]>>

<<if (def _HG && $HGSuite > 0)>><<set $slavesVisible++>><</if>>
<<if ($HGSuiteSlaves > 0)>><<set $slavesVisible++>><</if>>
<<if (def _BG && $dojo > 1)>><<set $slavesVisible++>><</if>>

<<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, <<print cashFormat($cash)>> … … …  @@

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

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

__''MAIN MENU''__    //[[Summary Options]]//
<<if $rulesAssistantMain != 0>>
	| //<<link "Rules Assistant Options">><<goto "Rules Assistant">><</link>>// @@.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 $useSlaveSummaryTabs == 1>>
	<<if $positionMainLinks >= 0>>
		<<MainLinks>>
	<</if>>
	<<set _j = "Back", _k = "AS Dump", _l = "Main">>

	<<CreateSimpleTabs>>

		<<if $useSlaveSummaryOverviewTab == 1>>
		<button class="tablinks" onclick="opentab(event, 'overview')">Overview</button>
		<</if>>
		<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')" id="defaultButton">All</button>

			<<set $slaveAssignmentTab = "overview">>
			<<if def _HG>>
				''__@@.pink;<<SlaveFullName $HeadGirl>>@@__'' is serving as your head girl<<if $arcologies[0].FSEgyptianRevivalistLaw == 1>> and Consort<</if>>.
				<<link "Manage Head Girl">><<goto "HG Select">><</link>> @@.cyan;[H]@@
				<<set $showOneSlave = "Head Girl">>
				<<include "Slave Summary">>
			<<elseif (ndef _HG) && ($slaves.length > 1)>>
				You have @@.red;not@@ selected a Head Girl<<if $arcologies[0].FSEgyptianRevivalistLaw == 1>> and Consort<</if>>. <<link "Select one">><<goto "HG Select">><</link>> @@.cyan;[H]@@
			<<elseif (ndef _HG)>>
				//You do not have enough slaves to keep a Head Girl//
			<</if>>

			<<if def _RC>>
				''__@@.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>>
				<<link "Manage Recruiter">><<goto "Recruiter Select">><</link>> @@.cyan;[U]@@
				<<set $showOneSlave = "recruit girls">>
				<<include "Slave Summary">>
			<<else>>
				You have @@.red;not@@ selected a Recruiter.
				<<link "Select one">><<goto "Recruiter Select">><</link>> @@.cyan;[U]@@
			<</if>>
			<<if ($dojo != 0)>>

				<<if def _BG>>
					''__@@.pink;<<SlaveFullName $Bodyguard>>@@__'' is serving as your bodyguard. <<link "Manage Bodyguard">><<goto "BG Select">><</link>> @@.cyan;[B]@@
					<<set $showOneSlave = "guard you">>
					<<include "Slave Summary">>
				<<else>>
					You have @@.red;not@@ selected a Bodyguard. <<link "Select one">><<goto "BG Select">><</link>> @@.cyan;[B]@@
				<</if>>

				/* Start Italic event text */
				<<if (def _BG) && ($slaves[_BG].assignment == "guard you")>>
				    <<set $i = _BG>>
					<<set _GO = "idiot ball">>

<<include "Use Guard">>

    <<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 canPenetrate($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>>

			<<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">>

			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntryConfinement>>
				Associated facility: <<if $cellblock>>[[Cellblock]]<<else>>Cellblock<</if>>//
			<</if>>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "stay confined">>
			<<include "Slave Summary">>

			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntryAttendingClasses>>
				Associated facility: <<if $schoolroom>>[[Schoolroom]]<<else>>Schoolroom<</if>>//
			<</if>>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "take classes">>
			<<include "Slave Summary">>

			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntryFucktoy>>
				Associated facility: <<if $masterSuite>>[[Master Suite]]<<else>>Master Suite<</if>> //
			<</if>>

			/* Start Italic event text */
			<<for $i = 0; $i < _SL; $i++>>
				<<if ($slaves[$i].assignment == "please you")>>

<<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://

    <<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 canPenetrate($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://

    <<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 canPenetrate($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 */

			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "please you">>
			<<include "Slave Summary">>

			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntryWhoring>>
				Associated facility: <<if $brothel>>[[Brothel]]<<else>>Brothel<</if>>//
			<</if>>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "whore">>
			<<include "Slave Summary">>

			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntryPublicService>>
				Associated facility: <<if $club>>[[Club]]<<else>>Club<</if>> //
			<</if>>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "serve the public">>
			<<include "Slave Summary">>

			<<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">>

			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntryMilking>> Associated facility: <<if $dairy>>[[Dairy]]<<else>>Dairy<</if>>//
			<</if>>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "get milked">>
			<<include "Slave Summary">>

			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntryGloryHole>>
				Associated facility: <<if $arcade>>[[Arcade]]<<else>>Arcade<</if>>//
			<</if>>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "work a glory hole">>
			<<include "Slave Summary">>

			<<if $showTipsFromEncy != 0>>
				//<<encyclopediaEntrySexualServitude>>//
			<</if>>
			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "be a subordinate slave">>
			<<include "Slave Summary">>

			//<<OptionsSortAsAppearsOnMain>>//
			<<set $slaveAssignmentTab = "all">>
			<<include "Slave Summary">>

	<<if $positionMainLinks <= 0>>

<<MainLinks>>
	<</if>>

<<else>>  /*Display traditionally, without tabs*/

//<<if $sortSlavesMain != 0>>

	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>>

	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 */
<<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"}]>>

<<link Reset>><<resetAssignmentFilter>><<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>>

<<include "Slave Summary">>

<<if $lineSeparations == 0>>
<<else>>
<</if>>
<<if $positionMainLinks <= 0>>

<<MainLinks>>
<</if>>

<<set _j = "Back", _k = "AS Dump", _l = "Main">>
<<for $i = 0; $i < _SL; $i++>>
<<if ($slaves[$i].assignment == "please you")>>

<<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://

    <<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 canPenetrate($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://

    <<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 canPenetrate($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>>

<<if (def _BG) && ($slaves[_BG].assignment == "guard you") && ($useSlaveSummaryOverviewTab != 1)>>
    <<set $i = _BG>>
	<<set _GO = "idiot ball">>

<<include "Use Guard">>

    <<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 canPenetrate($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 = $slaves.random()>>
<<if $activeSlave && ($activeSlave.assignment != "please you") && ($activeSlave.assignment != "guard you")>>

<<include "Walk Past">>
<</if>>


code:
:: Manage Arcology [nobr]

<<set $HackingSkillMultiplier = HSM()>>
<<set $nextButton = "Back", $nextLink = "Main">>

<<if $cheatMode == 1>>

//[[Cheat Edit Arcology|MOD_Edit Arcology Cheat][$cheater = 1]]//

<</if>>
<<set $showEncyclopedia = 0>>

<<DisplayBuilding>>
<<include "Arcology Description">>

__Arcology Ownership__

<<UpdateOwnership>>
You own ''$arcologies[0].ownership%'' of $arcologies[0].name, <<if $arcologies[0].minority > 0>>against ''$arcologies[0].minority%'' owned by the second most significant holder<<else>>and there are no other significant holders<</if>>.
<<if $arcologies[0].minority > $arcologies[0].ownership-10>>
	@@.red;This is a dangerously narrow margin of control.@@
<</if>>

<<if $FSAnnounced > 0>>
	<<if $FSCredits > 0>>

		@@.yellow;$arcologies[0].name's society is ready to begin accepting a new societal direction.@@
	<</if>>
<</if>>

__Construction__

<<if $arcologyUpgrade.drones != 1>>
	//The first major upgrade needed is the installation of a drone security system so higher-class citizens will feel safe and protected should they choose to immigrate. This upgrade will cost <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>.//
	<<link "Install drone security system">>
		<<set $cash -= Math.trunc(5000*$upgradeMultiplierArcology)>>
		<<set $arcologyUpgrade.drones = 1>>
		<<set $secBots.active = 1>>
		<<set $secBots.troops = 30>>
		<<set $secBots.maxTroops = 30>>
		<<goto "Manage Arcology">>
		<<if $PC.engineering < 100>><<set $PC.engineering += 1>><</if>>
	<</link>>
<<elseif $arcologyUpgrade.hydro != 1>>
	//The next major upgrade needed is the installation of a better water reclamation system so your residents will have access to cheaper water and hydroponically grown food. This upgrade will cost <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>.// [[Upgrade water reclamation system|Manage Arcology][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $arcologyUpgrade.hydro = 1, $PC.engineering += 1]]
<<elseif $arcologyUpgrade.apron != 1>>
	//The next major upgrade needed is the installation of a broader apron at the bottom of the arcology to increase its surface area and gather more solar energy. Right now, tenants that use a lot of power have to import it from outside. This upgrade will cost <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>>.// [[Install solar apron|Manage Arcology][$cash -= Math.trunc(20000*$upgradeMultiplierArcology), $arcologyUpgrade.apron = 1, $PC.engineering += 1]]
<<elseif $arcologyUpgrade.grid != 1>>
	//The next major upgrade needed is an improvement of the arcology's electrical transmission lines to make efficient use of the additional power from the solar apron. This upgrade will cost <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>>.// [[Upgrade transmission lines|Manage Arcology][$cash -= Math.trunc(50000*$upgradeMultiplierArcology), $arcologyUpgrade.grid = 1, $PC.engineering += 1]]
<<elseif $arcologyUpgrade.spire != 1>>
	//The next major upgrade needed is the addition of a spire at the top of the arcology to increase the space available for the wealthiest citizens to own whole floors. This huge project will cost <<print cashFormat(Math.trunc(250000*$upgradeMultiplierArcology))>>.// [[Add spire|Manage Arcology][$cash -= Math.trunc(250000*$upgradeMultiplierArcology), $arcologyUpgrade.spire = 1, $sectors[1].type = "Apartments", $sectors[2].type = "Apartments", $sectors[3].type = "Apartments", $sectors[4].type = "Apartments", $sectors[1].ownership = 1, $sectors[2].ownership = 1, $sectors[3].ownership = 1, $sectors[4].ownership = 1, $PC.engineering += 1]]
<<else>>
	//The arcology's public areas are fully upgraded.//
<</if>>

<<if $weatherCladding == 0>>
	//Extreme weather is becoming common worldwide. The arcology's exterior can be hardened to reduce damage in case of heavy weather, but this will reduce its beauty somewhat and will cost <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>>. Your citizens are <<if $weatherAwareness == 0>>likely to disapprove of this measure as alarmism.<<else>>@@.yellow;concerned that this measure has not been taken already.@@<</if>> // [[Apply weather cladding|Manage Arcology][$cash -= Math.trunc(50000*$upgradeMultiplierArcology), $weatherCladding = 1, $PC.engineering += 1]]
<<elseif $weatherCladding == 1 && $arcologyUpgrade.spire == 1>>
	The arcology's exterior is jacketed with unsightly but sturdy weather cladding. Your arcology is so prosperous that remodeling the cladding into something beautiful is within the realm of possibility. This massive project will cost <<print cashFormat(Math.trunc(3500000*$upgradeMultiplierArcology))>> and without a doubt render your arcology one of the wonders of the world.
[[Remodel weather cladding|Manage Arcology][$cash -= Math.trunc(3500000*$upgradeMultiplierArcology), $weatherCladding = 2, $PC.engineering += 1]]
<<elseif $weatherCladding == 1>>
	//The arcology's exterior is jacketed with unsightly but sturdy weather cladding.//
<<elseif $weatherCladding == 2>>
	//The arcology's exterior is jacketed with gorgeously sculpted and fully functional weather cladding.//
<</if>>

<<if ($receiverAvailable == 1) && ($FCTVenable != 0) && ($FCTVreceiver == 0)>>
	You have not installed an FCTV receiver. Installing this receiver yourself will cost <<print cashFormat(Math.trunc(25000*$upgradeMultiplierArcology))>>. You can have your citizens pay for the fiberoptic upgrades, reducing the cost to <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>>. You can also have them heavily subsidize installation, they will be upset about it, but it will only cost <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>.
	[[No subsidy|Manage Arcology][$cash -= Math.trunc(25000*$upgradeMultiplierArcology), $FCTVreceiver = 1, $receiverAvailable = $week, $rep += 500, $PC.engineering += 1]] | [[Light subsidy|Manage Arcology][$cash -= Math.trunc(20000*$upgradeMultiplierArcology), $FCTVreceiver = 1, $receiverAvailable = $week, $PC.engineering += 1]] | [[Heavy subsidy|Manage Arcology][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $FCTVreceiver = 1, $receiverAvailable = $week, $rep -= 1500, $PC.engineering += 1]]
<<elseif ($FCTVreceiver == 3)>>
	You have installed the FCTV receiver and have access to the full range of FCTV's programs. High viewership rates amongst your citizens makes it easier to pursue your societal goals.
<<elseif ($FCTVreceiver == 2)>>
	You have installed the FCTV receiver and have access to the full range of FCTV's programs. Decent viewership rates amongst your citizens makes it somewhat easier to pursue your societal goals.
<<elseif ($FCTVreceiver == 1)>>
	You have installed the FCTV receiver and have access to the full range of FCTV's programs. Low viewership rates amongst your citizens limits the impact of FCTV on your societal goals.
<</if>>

<<if $secExp == 1>>

	__Security__
	<<if $propHub == 0>>

		[[Set up the propaganda Hub|Manage Arcology][$cash -= Math.trunc((5000*$upgradeMultiplierArcology*$HackingSkillMultiplier)), $propHub = 1, $PC.engineering += 1, $PC.hacking += 1]]
		//Costs <<print cashFormat(Math.trunc((5000*$upgradeMultiplierArcology*$HackingSkillMultiplier)))>>.//

//Building specialized in the management of authority.//
	<<else>>

		The [[Propaganda Hub|propagandaHub]] is ready to manipulate reality on your command.
	<</if>>
	<<if $secHQ == 0>>

		[[Set up the security headquarters|Manage Arcology][$cash -= Math.trunc((5000*$upgradeMultiplierArcology*$HackingSkillMultiplier)), $secHQ = 1, $PC.engineering += 1, $PC.hacking += 1]]
		//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology*$HackingSkillMultiplier))>>.//

//Building specialized in the management of security and crime.//
	<<else>>

		The [[security HQ|securityHQ]] is constantly working to protect your arcology.
	<</if>>

	<<if $secBarracks == 0>>

		[[Set up the barracks|Manage Arcology][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $secBarracks = 1, $PC.engineering += 1]]
		//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//

//Building specialized in the management of armed forces.//
	<<else>>

		The [[barracks|secBarracks]] patiently await your orders.
	<</if>>

	<<if $riotCenter == 0 && $rebellionsEnabled == 1>>

		[[Set up the riot control center|Manage Arcology][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $riotCenter = 1, $PC.engineering += 1]]
		//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
		<<if $PC.engineering < 100>><<set $PC.engineering += 1>><</if>>

//Building specialized in the management and suppression of rebellions.//
	<<elseif $rebellionsEnabled == 1>>

		The [[Riot Control Center|riotControlCenter]] stands ready for action.
	<</if>>
<</if>>

<<if ($PC.engineering >= 100) || ($PC.career == "arcology owner")>>
	//Arcology upgrades are less expensive due to your @@.springgreen;<<if $PC.career == "arcology owner">>experience in the Free Cities<<else>>arcology engineering training<</if>>.@@//
<</if>>

<<if $corpIncorporated == 1 || $corpMarket == 1>>
	__Corporation__
<<if $corpIncorporated == 1 && $corpMarket == 0>>
	<<link "Dissolve the corporation">>
			<<set $corpIncorporated = 0>>
			<<set $corpPeopleEnslaved = 0>>
			<<set $slaveAssets = 0>>
			<<set $slaveAssetPrice = 0>>
			<<set $corpProfit = 0>>
			<<set $corpCash = 0>>
			<<set $mercenariesHelpCorp = 0>>
			<<set $corpValue = 0>>
			<<set $sharePrice = 0>>
			<<set $oldSharePrice = 0>>
			<<set $personalShares = 0>>
			<<set $publicShares = 0>>
			<<set $generalAssetPrice = 0>>
			<<set $generalAssets = 0>>
			<<set $entrapmentAssets = 0>>
			<<set $entrapmentAssetPrice = 0>>
			<<set $captureAssets = 0>>
			<<set $captureAssetPrice = 0>>
			<<set $trainingAssets = 0>>
			<<set $trainingAssetPrice = 0>>
			<<set $surgicalAssets = 0>>
			<<set $surgicalAssetPrice = 0>>
			<<set $drugAssets = 0>>
			<<set $drugAssetPrice = 0>>
			<<set $generalUpgradeBreaking = "">>
			<<set $generalUpgradeWeight = "">>
			<<set $generalUpgradeMuscle = "">>
			<<set $entrapmentUpgradeDevotionOne = "", $entrapmentUpgradeDevotionTwo = "">>
			<<set $entrapmentUpgradeIntelligence = "">>
			<<set $captureUpgradeGender = "">>
			<<set $surgicalUpgradeGenitalia = "">>
			<<set $captureUpgradeAge = "">>
			<<set $captureUpgradeRace = "">>
			<<set $trainingUpgradeAccent = "">>
			<<set $trainingUpgradeEducation = "">>
			<<set $surgicalUpgradeCosmetics = "">>
			<<set $surgicalUpgradeImplants = "">>
			<<set $drugUpgradeHormones = "">>
			<<set $drugUpgradeInjectionOne = "">>
			<<set $drugUpgradeInjectionTwo = "">>
			<<goto "Manage Arcology">>
	<</link>>
<<elseif $corpIncorporated == 1 && $corpMarket == 1>>

<<link "Dissolve both corporation and the market">>
			<<set $corpIncorporated = 0>>
			<<set $corpPeopleEnslaved = 0>>
			<<set $slaveAssets = 0>>
			<<set $slaveAssetPrice = 0>>
			<<set $corpProfit = 0>>
			<<set $corpCash = 0>>
			<<set $mercenariesHelpCorp = 0>>
			<<set $corpValue = 0>>
			<<set $sharePrice = 0>>
			<<set $oldSharePrice = 0>>
			<<set $personalShares = 0>>
			<<set $publicShares = 0>>
			<<set $generalAssetPrice = 0>>
			<<set $generalAssets = 0>>
			<<set $entrapmentAssets = 0>>
			<<set $entrapmentAssetPrice = 0>>
			<<set $captureAssets = 0>>
			<<set $captureAssetPrice = 0>>
			<<set $trainingAssets = 0>>
			<<set $trainingAssetPrice = 0>>
			<<set $surgicalAssets = 0>>
			<<set $surgicalAssetPrice = 0>>
			<<set $drugAssets = 0>>
			<<set $drugAssetPrice = 0>>
			<<set $generalUpgradeBreaking = "">>
			<<set $generalUpgradeWeight = "">>
			<<set $generalUpgradeMuscle = "">>
			<<set $entrapmentUpgradeDevotionOne = "", $entrapmentUpgradeDevotionTwo = "">>
			<<set $entrapmentUpgradeIntelligence = "">>
			<<set $captureUpgradeGender = "">>
			<<set $surgicalUpgradeGenitalia = "">>
			<<set $captureUpgradeAge = "">>
			<<set $captureUpgradeRace = "">>
			<<set $trainingUpgradeAccent = "">>
			<<set $trainingUpgradeEducation = "">>
			<<set $surgicalUpgradeCosmetics = "">>
			<<set $surgicalUpgradeImplants = "">>
			<<set $drugUpgradeHormones = "">>
			<<set $drugUpgradeInjectionOne = "">>
			<<set $drugUpgradeInjectionTwo = "">>
			<<set $corpMarket = 0>>
			<<for _i = 0; _i < $sectors.length; _i++>>
			<<if $sectors[_i].type == "CorporateMarket">><<set $sectors[_i].type = "Markets">><<break>><</if>>
			<</for>>
			<<goto "Manage Arcology">>
	<</link>>
<</if>>

<</if>>

__Language__

The lingua franca of the arcology is ''$language''.
<<link "Language options">><<set $seed = $language>><<goto "Change Language">><</link>>

__Special Arcology Upgrades__

<<if ($personalArms == 0) && ($mercenaries == 0) && ($assistant == 0)>>
//$arcologies[0].name has no special upgrades//
<</if>>

<<if ($personalArms == 1)>>
You own a prototype powered exoskeleton that mounts armor and a smart mortar system, and has rifles mounted into its forearms.
<<elseif ($personalArms > 1)>>
You own a prototype powered exoskeleton that mounts armor and a smart mortar system, and has rifles mounted into its forearms. Furthermore, your security drones can rearm with small-caliber guns if necessary.
<</if>>

<<if ($mercenaries > 0)>>
<<if ($mercenaries == 1)>>
A squad of mercenaries is permanently quartered in $arcologies[0].name. They are grim men and women, heavily armed and armored.
<<elseif ($mercenaries < 5)>>
A full platoon of mercenaries is permanently quartered in $arcologies[0].name. They are grim men and women, heavily armed and armored.
<<elseif ($mercenaries >= 5)>>
You have permanently settled a full company of mercenaries in $arcologies[0].name as your $mercenariesTitle. They are grim men and women who appreciate their luxurious life here and train hard to keep their skills with their prototype armor sharp.
<</if>>
<</if>>

<<if ($assistant > 0)>>
<<if $assistantName == "your personal assistant">>Your personal assistant<<else>>$assistantName<</if>> is using an alternative personality setting, speaking in a sultry, sexual voice, and talking as though the penthouse's sex toys are her body.
<</if>>
<<if ($assistant > 1)>>
She also has charge of all smart piercings in the arcology, and is using her adaptations to sexual duties to improve their effectiveness.
<</if>>

Your slaves have participated in approximately <<print commaNum($oralTotal+$vaginalTotal+$analTotal)>> sexual encounters: <<print commaNum($oralTotal)>> primarily oral, <<print commaNum($vaginalTotal)>> vanilla, <<print commaNum($mammaryTotal)>> mammary, <<print commaNum($analTotal)>> anal, and <<print commaNum($penetrativeTotal)>> with the slave penetrating another. They have produced about <<print commaNum($milkTotal)>> liters of marketable milk, <<if $seeDicks != 0>>about <<print commaNum($cumTotal)>> deciliters of marketable cum, <</if>>and have given birth <<print commaNum($birthsTotal)>> times.

<<if $pitKillsTotal > 0>>$pitKillsTotal slaves have died in your fighting pit.<</if>>
<<if $fuckdollsSold > 0>>$fuckdollsSold mindbroken arcade slaves have been converted into Fuckdolls and sold.<</if>>

<<if $secExp == 1 && $battlesEnabled == 1>>

<<if $securityForceCreate == 0>>
	Your army counts <<print commaNum($militiaEmployedManpower + $slavesEmployedManpower + $mercEmployedManpower)>> total soldiers.
<<else>>
	Your army counts <<print commaNum($militiaEmployedManpower + $slavesEmployedManpower + $mercEmployedManpower + $securityForcePersonnel)>> total soldiers of which <<print commaNum($securityForcePersonnel)>> under the security force command and the rest under your direct control.
<</if>>
<<if $hasFoughtOnce == 1>>
	Your troops were involved in <<print commaNum($battlesCount)>> battles of which <<print commaNum($majorBattlesCount)>> major engagements. You won <<print commaNum($PCvictories)>> of them, while the enemy managed to gain the upper hand in the other <<print commaNum($PClosses)>>.
<</if>>

<<if $rebellionsCount >= 1>>
	Your arcology was involved in <<print commaNum($rebellionsCount)>> rebellions. You won <<print commaNum($PCrebWon)>> of them, while the rebels defeated your forces in <<print commaNum($PCrebLoss)>>.
<</if>>

During all battles you lost a total of <<print commaNum($militiaTotalCasualties + $slavesTotalCasualties + $mercTotalCasualties)>> men, while scoring a total of <<print commaNum($totalKills)>> kills.
<</if>>

Your arcology is named <<textbox "$arcologies[0].name" $arcologies[0].name "Manage Arcology">>


code:
:: Manage Penthouse [nobr]

<<set $nextButton = "Back", $nextLink = "Main", $showEncyclopedia = 1, $encyclopedia = "What the Upgrades Do">>

<<if $cheatMode == 1>>

//[[Cheat Edit Arcology|MOD_Edit Arcology Cheat][$cheater = 1]]//

<</if>>

<<include "Office Description">>
<<if $PC.career == "mercenary">>
	You look back at the rifle. It could never hold a zero, and would fail to feed if it wasn't given just the right amount of lubricant. But sometimes, you'd give anything for one more mission with that shitty old rifle.
<</if>>

__Penthouse Capacity__

The main penthouse dormitory, which houses slaves who aren't living in a facility and aren't granted a luxurious standard of living, has a capacity of ''$dormitory'' slaves.
[[Expand the dormitory|Manage Penthouse][$cash -= Math.trunc($dormitory*1000*$upgradeMultiplierArcology), $dormitory += 10, $PC.engineering += .1]]
//Costs <<print cashFormat(Math.trunc($dormitory*1000*$upgradeMultiplierArcology))>>//

//Exceeding this limit is bad for slaves' health, devotion and trust//

The penthouse also features little individual rooms, which house slaves who do enjoy a luxurious standard of living. They have a capacity of ''$rooms'' slaves.
[[Expand the rooms|Manage Penthouse][$cash -= Math.trunc($rooms*1000*$upgradeMultiplierArcology), $rooms += 5, $PC.engineering += .1]]
//Costs <<print cashFormat(Math.trunc($rooms*1000*$upgradeMultiplierArcology))>>//

//The number of rooms determines the number of slaves that can be granted luxury//

__Penthouse Facilities__

<<if $masterSuite == 0>>
	[[Improve your master bedroom to house a harem of personal toys|Manage Penthouse][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $masterSuite = 1, $PC.engineering += 1]]
	//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
<<else>>
	Your penthouse is capped by a master suite with room for an entire harem of personal toys.
<</if>>

<<if $servantsQuarters == 0>>
	[[Build a dormitory to house large numbers of house servants|Manage Penthouse][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $servantsQuarters = 5, $PC.engineering += 1]]
	//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
<<else>>
	Your penthouse includes a dormitory to house large numbers of house servants.
<</if>>

<<if $schoolroom == 0>>
	[[Build a schoolroom where slaves can be educated|Manage Penthouse][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $schoolroom = 5, $PC.engineering += 1]]
	//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
<<else>>
	Your penthouse includes a schoolroom where slaves can be educated.
<</if>>

<<if $spa == 0>>
	[[Install open baths to provide relaxation space for resting slaves|Manage Penthouse][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $spa = 5, $PC.engineering += 1]]
	//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
<<else>>
	The penthouse includes a fully appointed spa where slaves can rest and recuperate.
<</if>>

<<if $clinic == 0>>
	[[Expand the surgical recovery area to accommodate patients and a nurse|Manage Penthouse][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $clinic = 5, $PC.engineering += 1]]
	//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
<<else>>
	The surgical recovery area has been expanded to take in more unhealthy slaves and be staffed by a nurse.
<</if>>

<<if $cellblock == 0>>
	[[Construct cells to properly confine disobedient slaves|Manage Penthouse][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $cellblock = 5, $PC.engineering += 1]]
	//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
<<else>>
	The lower level of the penthouse includes a hallway of cells to confine slaves in.
<</if>>

<<if $familyTesting == 1 && $seePreg != 0>>
<<if $arcologyUpgrade.grid == 1>>
<<if $incubator == 0>>
	[[Install an incubation chamber to rapidly age children|Manage Penthouse][$cash -= Math.trunc(100000*$upgradeMultiplierArcology), $incubator = 1, $PC.engineering += 1]]
	//Costs <<print cashFormat(Math.trunc(100000*$upgradeMultiplierArcology))>>//
<<else>>
	The penthouse has a specialized facility dedicated to rapidly aging children.
<</if>>
<<elseif $arcologyUpgrade.hydro == 1 || $arcologyUpgrade.apron == 1>>
	//Installation of a child aging facility will require the arcology's electrical infrastructure to be overhauled.//
<</if>>

<</if>>

<<if $HGSuite != 1>>
	[[Build a small suite for a Head Girl to live in|Manage Penthouse][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $HGSuite = 1, $PC.engineering += 1]]
	//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
<<else>>
	There is a small but handsome suite next to yours reserved for the Head Girl.
<</if>>

<<if $cyberMod == 1>>

	<<if $researchLab.built == "true">>
		Your penthouse is now equipped with a research lab.
	<<else>>
		[[Clear out one of the floors and install research equipment|Manage Penthouse][$cash -= Math.trunc(15000*$upgradeMultiplierArcology), $researchLab.built = "true", $researchLab.maxSpace = 5, $PC.engineering += 1]]
		//Costs <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology))>>//
	<</if>>
<</if>>

__Penthouse Upgrades__

<<if $servantMilkers != 1>>
	Your penthouse is equipped with basic milkers for lactating slaves. [[Install more and tie them into the liquid systems|Manage Penthouse][$cash -= Math.trunc(25000*$upgradeMultiplierArcology), $servantMilkers = 1, $PC.engineering += .1]]
	//Costs <<print cashFormat(Math.trunc(25000*$upgradeMultiplierArcology))>>//
<<else>>
	Every room in the penthouse is equipped with milkers tied into the liquid systems, letting slaves with full udders drain them anywhere.
<</if>>

<<if $boobAccessibility != 1>>
<<if $pregAccessibility == 1 || $ballsAccessibility || $buttAccessibility>>
	Your penthouse has already been widened for overly wide slaves but there are no special accommodations for slaves with enormous breasts. [[Remodel for accessibility|Manage Penthouse][$cash -= Math.trunc(20000*$upgradeMultiplierArcology), $boobAccessibility = 1, $PC.engineering += .5]]
	//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>>//
<<else>>
	Your penthouse has no special accessibility provisions for slaves with enormous breasts. [[Remodel for accessibility|Manage Penthouse][$cash -= Math.trunc(50000*$upgradeMultiplierArcology), $boobAccessibility = 1, $PC.engineering += 1]]
	//Costs <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>>//
<</if>>
<<else>>
	The entire penthouse has been remodeled to make life with enormous breasts easier. The doorways have been widened, and tables, sinks and other items now have two levels: one at shoulder height for slaves to use, and another at waist height for them to rest their tits on while they do.
<</if>>

<<if $seeHyperPreg == 1>>

<<if $pregAccessibility != 1>>
<<if $boobAccessibility == 1 || $ballsAccessibility || $buttAccessibility>>
	Your penthouse has already been widened to make life for overly wide slaves easier but there are no special accommodations for slaves with enormous pregnancies. [[Remodel for accessibility|Manage Penthouse][$cash -= Math.trunc(20000*$upgradeMultiplierArcology), $pregAccessibility = 1, $PC.engineering += .5]]
	//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>>//
<<else>>
	Your penthouse has no special accessibility provisions for slaves with enormous pregnancies. [[Remodel for accessibility|Manage Penthouse][$cash -= Math.trunc(50000*$upgradeMultiplierArcology), $pregAccessibility = 1, $PC.engineering += 1]]
	//Costs <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>>//
<</if>>
<<else>>
	The entire penthouse has been remodeled to make life with enormous pregnancies easier. The doorways have been widened, and tables, sinks and other items are now designed to work around a massively distended belly.
<</if>>
<</if>>

<<if $arcologies[0].FSAssetExpansionistResearch == 1>>

<<if $dickAccessibility != 1>>
	Your penthouse has no special accessibility provisions for slaves with enormous dicks. [[Remodel for accessibility|Manage Penthouse][$cash -= Math.trunc(20000*$upgradeMultiplierArcology), $dickAccessibility = 1, $PC.engineering += .5]]
	//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>>//
<<else>>
	The entire penthouse has been remodeled to make life with enormous dicks easier. Carts, slings and harnesses are available to keep things from dragging and there is now plenty of room for huge genitals to occupy when a slave must use appliances, tables and seats.
<</if>>

<<if $ballsAccessibility != 1>>
<<if $boobAccessibility == 1 || $buttAccessibility || $pregAccessibility>>
	Your penthouse has already been widened to make life for overly wide slaves easier but there are no special accommodations for slaves with enormous testicles. [[Remodel for accessibility|Manage Penthouse][$cash -= Math.trunc(20000*$upgradeMultiplierArcology), $ballsAccessibility = 1, $PC.engineering += .5]]
	//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>>//
<<else>>
	Your penthouse has no special accessibility provisions for slaves with enormous testicles. [[Remodel for accessibility|Manage Penthouse][$cash -= Math.trunc(50000*$upgradeMultiplierArcology), $ballsAccessibility = 1, $PC.engineering += 1]]
	//Costs <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>>//
<</if>>
<<else>>
	The entire penthouse has been remodeled to make life with enormous testicles easier. The doorways have been widened, tables, sinks and other items are now designed to fit over giant balls, drains have been widened to allow excessive cum to flow easier, and seats have been specially altered to allow plenty of ball room for seated slaves.
<</if>>

<<if $buttAccessibility != 1>>
<<if $boobAccessibility == 1 || $dickAccessibility || $ballsAccessibility>>
	Your penthouse has already been widened to make life for overly wide slaves easier but there are no special accommodations for slaves with gigantic posteriors. [[Remodel for accessibility|Manage Penthouse][$cash -= Math.trunc(20000*$upgradeMultiplierArcology), $buttAccessibility = 1, $PC.engineering += .5]]
	//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>>//
<<else>>
	Your penthouse has no special accessibility provisions for slaves with enormous posteriors. [[Remodel for accessibility|Manage Penthouse][$cash -= Math.trunc(50000*$upgradeMultiplierArcology), $buttAccessibility = 1, $PC.engineering += 1]]
	//Costs <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>>//
<</if>>
<<else>>
	The entire penthouse has been remodeled to make life with enormous rears easier. The doorways have been widened, and anything that can be sat on is now extra, extra wide and reinforced to allow even the heaviest, biggest asses to comfortably rest upon it.
<</if>>

<</if>>

<<if $feeder == 0>>
	[[Upgrade the kitchen's nutritional sensing systems|Manage Penthouse][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $feeder = 1, $PC.engineering += .1]]
	//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
<<else>>
	The kitchen mounts sensors to refine diets in real time.
<</if>>

<<if $cockFeeder == 0>>
	[[Enhance the feeding system with faux phalli|Manage Penthouse][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $cockFeeder = 1, $PC.engineering += .1]]
	//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
<<else>>
	The kitchen dispenses food from phalli slaves must suck off in order to eat. //[[Remove them|Manage Penthouse][$cockFeeder = 0]]//
<</if>>

<<if $suppository == 0>>
	[[Replace the drug dispensers with reciprocating dildo suppositories|Manage Penthouse][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $suppository = 1, $PC.engineering += .1]]
	//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
<<else>>
	The kitchen applies drugs that can be absorbed rectally by assfucking slaves with dildos that cum the pharmaceuticals. //[[Remove them|Manage Penthouse][$suppository = 0]]//
<</if>>

<<if $dairy != 0>>
<<if $dairyPiping == 0>>
	[[Install pipes connecting the Dairy to the rest of your penthouse for use in enema play|Manage Penthouse][$cash -= Math.trunc(15000*$upgradeMultiplierArcology), $dairyPiping = 1, $PC.engineering += .5]]
	//Costs <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology))>>//
<<else>>
	Various taps around the penthouse supply product from $dairyName for use in enema play and force-feeding.
<</if>>
<<elseif $dairyPiping == 1>>
	Various taps around the penthouse supply product from $dairyName for use in enema play and force-feeding. With no dairy to draw from, they are currently unused.
<</if>>

<<if $studio == 0>>
	[[Install a media hub to convert slave video feeds into pornography|Manage Penthouse][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $studio = 1, $PC.engineering += 1]]
	//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>//
<<else>>
	The arcology's video systems are connected to a media hub that can convert slave video feeds into pornography.
<</if>>

<<if $dojo == 0>>
	[[Set up a personal armory to support a bodyguard|Manage Penthouse][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $dojo = 1, $PC.engineering += 1]]
	//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
<<elseif $dojo == 1>>
	There is a small armory next to your office that can support a bodyguard. [[Upgrade the armory with a private room for the bodyguard|Manage Penthouse][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $dojo = 2, $PC.engineering += .5]]
	//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
<<else>>
	There is a small armory next to your office that can support a bodyguard, with a little room for her to rest in when off duty.
<</if>>

<<if $surgeryUpgrade == 0>>
<<if $rep > 10000>>
	[[Upgrade the remote surgery|Manage Penthouse][$cash -= Math.trunc(50000*$upgradeMultiplierArcology), $surgeryUpgrade = 1, $PC.engineering += 1]]
	//Costs <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>>//
<<else>>
	//You lack the reputation to secure rare surgery upgrades//
<</if>>
<<else>>
	Your remote surgery has been heavily upgraded and customized.
<</if>>

<<if $dispensary == 0>>
<<if $rep > 2000>>
	[[Install a pharmaceutical fabricator|Manage Penthouse][$cash -= Math.trunc(20000*$upgradeMultiplierArcology), $dispensary = 1, $drugsCost = $drugsCost*.75, $PC.engineering += .1]]
	//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>>//
<<else>>
	//You lack the reputation to obtain cutting-edge pharmaceutical technology//
<</if>>
<<else>>
	There is a [[pharmaceutical fabricator|Dispensary]] attached to the surgery.
<</if>>

<<if $cyberMod == 0>>
	<<switch $prostheticsUpgrade>>
	<<case 1>>
	There is a facility to construct mechanical prosthetic limbs for amputated slaves.
	<<if ($rep > 14000)>>
		[[Research advanced prototype prosthetics|Manage Penthouse][$cash -= Math.trunc(100000*$upgradeMultiplierArcology), $prostheticsUpgrade = 2]]
		//Costs <<print cashFormat(Math.trunc(100000*$upgradeMultiplierArcology))>>//
	<<else>>
		//You lack the reputation to research and produce prototype prosthetics.//
	<</if>>
	<<case 2>>
	There is a prosthetics facility upgraded to use advanced materials and designs.
	<<if ($rep > 16000)>>
		[[Research high-tech cybernetic limbs|Manage Penthouse][$cash -= Math.trunc(100000*$upgradeMultiplierArcology), $prostheticsUpgrade = 3]]
		//Costs <<print cashFormat(Math.trunc(100000*$upgradeMultiplierArcology))>>//
	<<else>>
		//You lack the reputation to research and produce prototype cybernetic limbs.//
	<</if>>
	<<case 3>>
	There is a high-tech facility to build prosthetics and state-of-the-art cybernetic replacement limbs.
	<<default>>
	<<if ($rep > 12000)>>
		[[Construct a mechanical prosthetics facility|Manage Penthouse][$cash -= Math.trunc(100000*$upgradeMultiplierArcology), $prostheticsUpgrade = 1, $PC.engineering += 1]]
		//Costs <<print cashFormat(Math.trunc(100000*$upgradeMultiplierArcology))>>//
	<<else>>
		//You lack the reputation to construct a prosthetics facility.//
	<</if>>
	<</switch>>
<</if>>


code:
:: Manufacturing [nobr]

<<set $nextButton = "Back", $nextLink = "Main">>

This is a space in the arcology's service areas,
<<switch $sectors[$AS].type>>
<<case "Manufacturing">>
	rented to a variety of tenants for manufacturing purposes. You control this part of the arcology and all these producers pay you rent.
<<case "Sweatshops">>
	designed for labor intensive manufacturing by menial slaves.
<<default>>ERROR: bad sector type
<</switch>>
<<if $sectors[$AS].type == "Manufacturing">><<SectorSell>><</if>>

<<if $sectors[$AS].type == "Sweatshops">>
<<if $helots > 0>>

	You own <<print commaNum($helots)>> menial slaves. All your sweatshops together can use only <<print $Sweatshops*500>>,
	<<if $helots > $Sweatshops*500>>
		the remainder is assigned to various odd-jobs in the arcology.
	<<elseif $helots == $Sweatshops*500>>
		and your menials are fully staffing them.
	<<else>>
		leaving space for <<print $Sweatshops*500-$helots>> more.
	<</if>>
<</if>>
<</if>>

<<if $dairy == 0>>

	[[Construct a dairy to milk slaves on an industrial scale|Main][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $dairy = 5, $sectors[$AS].type = "Dairy"]]
	//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> and will incur upkeep costs//
<</if>>

<<if $mercenaries>>
<<if $barracks != 1>>

	[[Build an armoury to properly house your mercenaries|Main][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $barracks = 1, $sectors[$AS].type = "Barracks"]]
	//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> but will reduce mercenary upkeep//
<</if>>
<</if>>

<<if $secExp == 1>>
<<if $weapManu != 1>>

	[[Convert this sector to weapons manufacturing|Main][$cash -= Math.trunc(30000*$upgradeMultiplierArcology), $weapManu = 1, $sectors[$AS].type = "weapManu"]]
	//Costs <<print cashFormat(Math.trunc(30000*$upgradeMultiplierArcology))>> but will provide a weekly income and will unlock upgrades for our troops//
<</if>>
<</if>>

[[Convert to pens to increase the number of menial slaves you can house|Main][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $sectors[$AS].type = "Pens"]]
//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>//

<<if $sectors[$AS].type != "Sweatshops">>

	[[Convert these facilities to use the labor of menial slaves|Main][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $sectors[$AS].type = "Sweatshops"]]
	//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>//
<</if>>

<<if $sectors[$AS].type != "Manufacturing">>

	[[Return this sector to standard manufacturing|Main][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $sectors[$AS].type = "Manufacturing"]]
	//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>//
<</if>>


code:
:: Markets [nobr]

<<set $nextButton = "Back", $nextLink = "Main">>

This is an area of the concourse occupied by large stores and markets, many of which sell slaves. You control this part of the arcology and all these merchants pay you rent.
<<SectorSell>>

<<if $arcade == 0>>

	[[Construct a sex arcade to present slaves' holes for public use|Main][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $arcade = 5, $sectors[$AS].type = "Arcade"]]
	//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> and will incur upkeep costs//
<</if>>

<<if $pit == 0>>

	[[Build a pit to host proper slave fights|Main][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $pit = 1, $sectors[$AS].type = "Pit"]]
	//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>//
<</if>>

<<if $secExp == 1 && $transportHub == 0>>

	[[Centralize and modernize the transport hub|Main][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $transportHub = 1, $sectors[$AS].type = "transportHub", $docks = 1, $railway = 1, $airport = 1]]
	//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>//
<</if>>

<<if $corpMarket == 0 && $corpIncorporated == 1>>

	[[Create a flagship slave market for your corporation here|Main][$corpCash -= Math.trunc(10000*$upgradeMultiplierArcology), $corpMarket = 1, $sectors[$AS].type = "CorporateMarket"]]
	//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> of the corporation's money//
<</if>>


code:
:: Markets Report [nobr]

//FC Markets Report://

<<set $assetAffected = either("general", "slaves", "entrapment", "capture", "training", "surgical", "drugs")>>
<<set $assetDirection = either("up", "down")>>

<<if $assetAffected == "general">>
	<<if $assetDirection == "up">>
	<<if random(1,100) > 50>>
		...rising energy costs drove @@.yellowgreen;rising prices@@ of several market baskets...
	<<else>>
		...conflict-driven increases in transportation costs increase @@.yellowgreen;price indices@@...
	<</if>>
	<<set $generalAssetPrice += 2>>
	<<else>>
	<<if random(1,100) > 50>>
		...increasing Free Cities slave labor effects @@.gold;general prices@@...
	<<else>>
		...Antarctic oil shale pushing down energy prices, driving down major @@.gold;price indices@@...
	<</if>>
	<<set $generalAssetPrice -= 2>>
	<</if>>
<<elseif $assetAffected == "slaves">>
	<<if $assetDirection == "up">>
	<<if random(1,100) > 50>>
		...heavy demand for fashionable varieties drove @@.yellowgreen;rising slave prices@@ last...
	<<else>>
		...study suggested the sexual revolution would continue to drive up @@.yellowgreen;slave prices@@...
	<</if>>
	<<set $slaveAssetPrice += 2>>
	<<else>>
	<<if random(1,100) > 50>>
		...increased supply due to bush wars drove down @@.gold;slave prices@@...
	<<else>>
		...@@.gold;slave prices@@ continue to fall due to major improvements in training...
	<</if>>
	<<set $slaveAssetPrice -= 2>>
	<</if>>
<<elseif $assetAffected == "entrapment">>
	<<if $assetDirection == "up">>
	<<if random(1,100) > 50>>
		...prospect of deregulation drove a @@.yellowgreen;scramble@@ for means of enslavement...
	<<else>>
		...law would legalize enslavement, driving @@.yellowgreen;high prices@@ for associated...
	<</if>>
	<<set $entrapmentAssetPrice += 2>>
	<<else>>
	<<if random(1,100) > 50>>
		...reactionism produced lower demand and @@.gold;lower prices@@ for legal enslavement...
	<<else>>
		...report on low success rates @@.gold;drove down@@ value of legal enslavement methods...
	<</if>>
	<<set $entrapmentAssetPrice -= 2>>
	<</if>>
<<elseif $assetAffected == "capture">>
	<<if $assetDirection == "up">>
	<<if random(1,100) > 50>>
		...declaration of war @@.yellowgreen;pushed up@@ average mercenary wage...
	<<else>>
		...advancing technology to blame for @@.yellowgreen;rising costs@@ of assets for wet work...
	<</if>>
	<<set $captureAssetPrice += 2>>
	<<else>>
	<<if random(1,100) > 50>>
		...rumored peace treaty @@.gold;pushed down@@ mercenary contract clearing rate...
	<<else>>
		...demobilization of the cash-strapped army expected to produce mercenary @@.gold;glut@@...
	<</if>>
	<<set $captureAssetPrice -= 2>>
	<</if>>
<<elseif $assetAffected == "training">>
	<<if $assetDirection == "up">>
	<<if random(1,100) > 50>>
		...rising demand in turn @@.yellowgreen;pushing up@@ prices for most means of slave training...
	<<else>>
		...public demand for ever-better slave training inevitably @@.yellowgreen;increase@@ training costs...
	<</if>>
	<<set $trainingAssetPrice += 2>>
	<<else>>
	<<if random(1,100) > 50>>
		...competition from low-cost slave breaking firms @@.gold;reducing@@ asking price for...
	<<else>>
		...increased automation of slave training @@.gold;negatively impacting@@ training contracts...
	<</if>>
	<<set $trainingAssetPrice -= 2>>
	<</if>>
<<elseif $assetAffected == "surgical">>
	<<if $assetDirection == "up">>
	<<if random(1,100) > 50>>
		...fashionable extravagant implant procedures @@.yellowgreen;driving prices@@ of remote surgical...
	<<else>>
		...near-universal breast implants producing corresponding @@.yellowgreen;price inflation@@ of surgery...
	<</if>>
	<<set $surgicalAssetPrice += 2>>
	<<else>>
	<<if random(1,100) > 50>>
		...vastly reduced overhead with remote surgery @@.gold;hitting prices@@ of surgery hard...
	<<else>>
		...oversupply after major manufacturers converted lines to @@.gold;low-cost@@ implant production...
	<</if>>
	<<set $surgicalAssetPrice -= 2>>
	<</if>>
<<elseif $assetAffected == "drugs">>
	<<if $assetDirection == "up">>
	<<if random(1,100) > 50>>
		...intense demand for curatives in conflict zones @@.yellowgreen;increasing prices@@...
	<<else>>
		...setbacks in growth hormone human testing expected to @@.yellowgreen;increase prices@@ of traditional formula...
	<</if>>
	<<set $drugAssetPrice += 2>>
	<<else>>
	<<if random(1,100) > 50>>
		...new formula @@.gold;cut costs@@ of common curatives by an unprecedented...
	<<else>>
		...glut caused by big pharma reorienting towards @@.gold;cheap,@@ mass-produced aphros...
	<</if>>
	<<set $drugAssetPrice -= 2>>
	<</if>>
<</if>>


code:
:: Master Suite [nobr]

<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Master Suite", $showEncyclopedia = 1, $encyclopedia = "Master Suite", _SL = $slaves.length>>

<<SlaveSort $MastSiIDs>>
<<set _DL = $MastSiIDs.length, $masterSuiteSlaves = _DL>>
<<suiteAssignmentFilter>>

<<if $masterSuiteName != "the Master Suite">>
	<<set $masterSuiteNameCaps = $masterSuiteName.replace("the ", "The ")>>
<</if>>

<<set $masterSuiteAverageEnergy = 0, _masterSuiteAverageCum = 0, _masterSuiteAverageDick = 0, _masterSuiteAverageDom = 0, _masterSuiteAverageMilk = 0, _masterSuiteAveragePreg = 0, _masterSuiteAverageSadism = 0, _masterSuitePregnantSlaves = 0, _masterSuitePregnantSlavesMultiple = 0>>

<<if ($Concubine != 0 && $Concubine.pregKnown == 1)>>
	<<set _masterSuitePregnantSlaves++>>
	<<if $Concubine.pregType > 1>>
		<<set _masterSuitePregnantSlavesMultiple++>>
	<</if>>
<</if>>

<<if $masterSuiteSlaves > 0>>
<<for _dI = 0; _dI < _DL; _dI++>>
	<<set _i = $slaveIndices[$MastSiIDs[_dI]]>>
	<<set _Slave = $slaves[_i]>>

	<<if $masterSuiteUpgradeLuxury == 2>>
	<<if canAchieveErection(_Slave)>>
		<<set _masterSuiteAverageCum += _Slave.balls, _masterSuiteAverageDick += _Slave.dick>>
	<</if>>
	<<set _masterSuiteAverageMilk += _Slave.lactation*(_Slave.boobs-_Slave.boobsImplant), $masterSuiteAverageEnergy += _Slave.energy, _masterSuiteAveragePreg += _Slave.preg>>
	<<if _Slave.fetish == "dom">>
		<<set _masterSuiteAverageDom += _Slave.fetishStrength>>
	<<elseif _Slave.fetish == "submissive">>
		<<set _masterSuiteAverageDom -= _Slave.fetishStrength>>
	<<elseif _Slave.fetish == "sadist">>
		<<set _masterSuiteAverageSadism += _Slave.fetishStrength>>
	<<elseif _Slave.fetish == "masochist">>
		<<set _masterSuiteAverageSadism -= _Slave.fetishStrength>>
	<</if>>
	<</if>>
	<<if (_Slave.pregKnown == 1)>>
		<<set _masterSuitePregnantSlaves++>>
		<<if _Slave.pregType > 1>>
			<<set _masterSuitePregnantSlavesMultiple++>>
		<</if>>
	<</if>>
<</for>>
	<<set $masterSuiteAverageEnergy = $masterSuiteAverageEnergy/$masterSuiteSlaves>>
	<<set _masterSuiteAverageMilk = _masterSuiteAverageMilk/$masterSuiteSlaves>>
	<<set _masterSuiteAverageCum = _masterSuiteAverageCum/$masterSuiteSlaves>>
	<<set _masterSuiteAverageDick = _masterSuiteAverageDick/$masterSuiteSlaves>>
	<<set _masterSuiteAveragePreg = _masterSuiteAveragePreg/$masterSuiteSlaves>>
	<<set _masterSuiteAverageDom = _masterSuiteAverageDom/$masterSuiteSlaves>>
	<<set _masterSuiteAverageSadism = _masterSuiteAverageSadism/$masterSuiteSlaves>>
<</if>>

<<set _Tmult1 = Math.trunc(10000*$upgradeMultiplierArcology)>>
<<set _Tmult2 = Math.trunc(25000*$upgradeMultiplierArcology)>>
<<set _Tmult3 = Math.trunc(15000*$upgradeMultiplierArcology)>>
<<if $masterSuiteUpgradeLuxury == 1>>

$masterSuiteNameCaps is furnished
<<switch $masterSuiteDecoration>>
<<case "Roman Revivalist">>
	as a Roman emperor's apartment. There is a small shrine to the old gods the <<if $PC.title == 1>>master<<else>>mistress<</if>> favors in a side room, and the flooring is erotic mosaic. Pride of place is given to a set of low couches placed together, capable of accommodating many nude bodies.
<<case "Aztec Revivalist">>
	as an Aztec cultural, spiritual and military leader of the city you're allowed great leniency. The <<if $PC.title == 1>>Master<<else>>Mistress<</if>>'s room is created to gratify you as a true god of the people.
<<case "Egyptian Revivalist">>
	after the royal room of an ancient Egyptian palace. There is a small shrine to the old gods the <<if $PC.title == 1>>master<<else>>mistress<</if>> favors in a side room, and linen hangings decorate the walls and ceiling. An imposing bed of sandalwood occupies the center of the room.
<<case "Edo Revivalist">>
	in the Spartan style of an Edo period castle's innermost rooms. Rice paper screens partition off many small cubicles around its large central space. There, around a low bed, there are many mats for servants to kneel around their <<if $PC.title == 1>>master<<else>>mistress<</if>>.
<<case "Arabian Revivalist">>
	as a beguiling haze of Arabian decadence. There is a great gilded bed in the center of the space, piled with silk pillows for naked bodies to recline on. Gauzy curtains flutter in the warm, heady breeze.
<<case "Chinese Revivalist">>
	as though it were the innermost sanctum of the Forbidden City. A massive bed fills the central space. The walls are gorgeous gilded hand-carved screens, and heavy jade statues of favored gods crouch in the corners.
<<case "Chattel Religionist">>
	as a severe place of cold stone and hard wood. A single shaft of sunlight illuminates an enormous stone platform that serves as a bed where penitents give their bodies to their <<if $PC.title == 1>>master<<else>>mistress<</if>>.
<<case "Degradationist">>
	with a gothic grandeur. Blood-red upholstery and hardwood menace crouch in the center of the space in the form of a massive poster bed with curtains of chain mail.
<<case "Repopulation Focus">>
	comfortably, with lots of cushions and seats for pregnant slaves to lounge on. Various specialized toys, as well as, lotions and creams are readily available. There's a huge, reinforced, low to the ground bed in the middle of the suite.
<<case "Eugenics">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make fucking slave girls lots of fun. There's a huge bed in the middle of the suite, with hidden compartments containing condoms and spermicides.
<<case "Asset Expansionist">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make sex with stacked slaves as fun as possible. There's a huge bed in the middle of the suite, heavily reinforced.
<<case "Transformation Fetishist">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make sex with bimbo slaves as fun as possible. There's a huge bed in the middle of the suite, heavily reinforced.
<<case "Gender Radicalist">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make fucking slave girls in the butt lots of fun.  There's a huge bed in the middle of the suite, with straps to restrain slave girls who don't want to be fucked in the butt, but they're concealed for now.
<<case "Gender Fundamentalist">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make fucking slave girls nice and enjoyable. There's a huge bed in the middle of the suite, with straps to restrain slave girls who don't want to be fucked, but they're concealed for now.
<<case "Physical Idealist">>
	as a shrine to the owner's body. Athletic trophies and photographs of past victories line the walls. There's a huge bed in the middle of the space, and there are mirrors almost everywhere, including on the ceiling over the bed.
<<case "Supremacist">>
	like the royal bedroom in a palace in the old countries of $arcologies[0].FSSupremacistRace people. A massive four-poster bed dominates the space.
<<case "Subjugationist">>
	like the royal bedroom in a palace in the old countries which favored $arcologies[0].FSSubjugationistRace slaves. A massive four-poster bed dominates the space.
<<case "Paternalist">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make sex with slaves mutually enjoyable.
<<case "Pastoralist">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants. The space is dominated by a massive, reinforced bed, built in sections so that part of it can be cleaned while cream-squirting cows cavort on the rest.
<<case "Maturity Preferentialist">>
	comfortably, with elegant sex toys and perfumed lubricants designed to appeal to mature sex slaves. The space is dominated by a broad, soft bed, well supplied with pillows. It's the perfect place to relax with a harem of MILFs.
<<case "Youth Preferentialist">>
	comfortably, with pastel-colored sex toys and flavored lubricants designed to appeal to eager young sex slaves. The space is dominated by a broad, reinforced bed, without cushions or sheets, which would just get in the way of energetic sex.
<<case "Body Purist" "Slimness Enthusiast">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make sex with slaves mutually enjoyable. The space is dominated by a huge bed with soft sheets.
<<case "Hedonistic">>
	comfortably, with lots of lounges for a hefty slaves to relax on. <<if $arcologies[0].FSHedonisticDecadenceResearch == 1>>Platters of food and treats are readily available throughout the room and are<<else>>Slave food is readily available for your harem and platters of food for yourself are<</if>> never out of arm's reach. There's a huge, reinforced, low to the ground bed in the middle of the suite.
<<default>>
	in a refined, yet practical style. It's dominated by a huge bed in which many slaves could serve their <<if $PC.title == 1>>master<<else>>mistress<</if>> and then cuddle afterward.
<</switch>>

It is full of luxuries of all kinds. The slaves here live free of want or worry, and have everything except their freedom. Their only duties are to please you and look after the suite and one another.
<<if $masterSuiteSlaves > 2>>
	It's busy with slaves, so many that they are able to rotate through keeping themselves perfect and ready for your pleasure. The slaves not on call at the moment are beautifying themselves, cleaning, or serving others.
	<<if (_masterSuitePregnantSlaves > 2) && (_masterSuitePregnantSlavesMultiple < 2)>>
	Many of the slaves are pregnant, and they walk around proudly displaying their bellies and the new slaves growing inside them.

	<<elseif (_masterSuitePregnantSlaves > 2) && (_masterSuitePregnantSlavesMultiple > 2) && $masterSuiteHyperPregnancy == 1>>
	Many of the slaves are heavily pregnant with multiple children, and they waddle around proudly displaying their distended bulging bellies and the next generation of slaves growing within them.

	<<elseif (_masterSuitePregnantSlaves > 2) && (_masterSuitePregnantSlavesMultiple > 2)>>
	Many of the slaves are pregnant with multiple children, and they walk around proudly displaying their distended bellies and the next generation of slaves growing within them.

	<</if>>
<<elseif $masterSuiteSlaves > 0>>
	It's sparsely populated, so that the few slaves here have to work hard and quickly to ensure that an assortment of sex slaves is perfect and ready for your pleasure at any given moment.
<<else>>
	None of your slaves are serving here.
<</if>>

    [[Remodel the suite around a luxurious pit for group sex|Master Suite][$cash -= _Tmult1, $masterSuiteUpgradeLuxury = 2]] //Costs _Tmult1; will encourage fucktoys to fuck each other//

<<elseif $masterSuiteUpgradeLuxury == 2>>

$masterSuiteNameCaps is furnished
<<switch $masterSuiteDecoration>>
<<case "Roman Revivalist">>
	as a Roman emperor's apartment. There is a small shrine to the old gods the <<if $PC.title == 1>>master<<else>>mistress<</if>> favors in a side room, and the flooring is erotic mosaic.
<<case "Aztec Revivalist">>
	as an Aztec cultural, spiritual and military leader of the city you're allowed great leniency. The <<if $PC.title == 1>>Master<<else>>Mistress<</if>>'s room is created to gratify you as a true god of the people.
<<case "Egyptian Revivalist">>
	after the royal room of an ancient Egyptian palace. There is a small shrine to the old gods the <<if $PC.title == 1>>master<<else>>mistress<</if>> favors in a side room, and linen hangings decorate the walls and ceiling.
<<case "Edo Revivalist">>
	in the Spartan style of an Edo period castle's innermost rooms. Rice paper screens partition off many small cubicles around its large central space.
<<case "Arabian Revivalist">>
	as a beguiling haze of Arabian decadence. Gauzy curtains flutter in the warm, heady breeze.
<<case "Chinese Revivalist">>
	as though it were the innermost sanctum of the Forbidden City. The walls are gorgeous gilded hand-carved screens, and heavy jade statues of favored gods crouch in the corners.
<<case "Chattel Religionist">>
	as a severe place of cold stone and hard wood. A single shaft of sunlight illuminates the central space.
<<case "Degradationist">>
	with a gothic grandeur. Blood-red upholstery and hardwood menace decorate the walls.
<<case "Repopulation Focus">>
	comfortably, with lots of cushions and seats for a pregnant slaves to lounge on. There are various specialized toys, as well as, lotions and creams readily available.
<<case "Eugenics">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make fucking slave girls lots of fun. Condoms and spermicides are readily available throughout the suite.
<<case "Asset Expansionist">>
	comfortably, with the convenience of massive-breasted slaves in mind. There are lots of handrails, cushions, and low tables, covered with creams, lubricants, and sex toys.
<<case "Transformation Fetishist">>
	comfortably, with the convenience of bimbos in mind. There are lots of makeup dressers with mirrors, stripper poles, and low tables, covered with creams, lubricants, and sex toys.
<<case "Gender Radicalist">>
	comfortably, with the convenience of dickgirls in mind. There are lots of makeup dressers with mirrors, stripper poles, and low tables, covered with creams, lubricants, and vibrating butt plugs.
<<case "Gender Fundamentalist">>
	comfortably, with the convenience and pleasure of slavegirls in mind. There are lots of makeup dressers with mirrors, soft divans, and low tables, covered with creams, lubricants, and vibrators.
<<case "Physical Idealist">>
	as a shrine to the owner's body. Athletic trophies and photographs of past victories line the walls. The entire area is filled with the heady odors of sweat, metabolites, and sex.
<<case "Supremacist">>
	like the royal bedroom in a palace in the old countries of $arcologies[0].FSSupremacistRace people.
<<case "Subjugationist">>
	like the royal bedroom in a palace in the old countries which favored $arcologies[0].FSSubjugationistRace slaves.
<<case "Paternalist">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make sex with slaves mutually enjoyable.
<<case "Pastoralist">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants, with a distinct focus on mammary intercourse.
<<case "Maturity Preferentialist">>
	comfortably, with elegant sex toys and perfumed lubricants designed to appeal to mature sex slaves.
<<case "Youth Preferentialist">>
	comfortably, with pastel-colored sex toys and flavored lubricants designed to appeal to eager young sex slaves.
<<case "Body Purist" "Slimness Enthusiast">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make sex with slaves mutually enjoyable.
<<case "Hedonistic">>
	comfortably, with lots of lounges for a hefty slaves to relax on. <<if $arcologies[0].FSHedonisticDecadenceResearch == 1>>Platters of food and treats are readily available throughout the room and are<<else>>Slave food is readily available for your harem and platters of food for yourself are<</if>> never out of arm's reach.
<<default>>
	in a refined, yet practical style.
<</switch>>

The true focus of the suite is, however, the fuckpit. This stepped depression in the middle of the floor
<<if $masterSuiteSlaves > 3>>
	is filled by cushions and every slave in the suite who isn't sleeping, eating, or bathing.
	<<if $masterSuiteAverageEnergy > 90>>
	They're having energetic group sex; most of them are fucking and being fucked at the same time.
	<<elseif $masterSuiteAverageEnergy > 60>>
	They're having group sex; most of them are in active sexual contact with more than one partner.
	<<else>>
	They're having languid group sex; more than one girl is dozing while another plays with her body.
	<</if>>
	<<if $masterSuiteAverageEnergy > 90>>
	The pit features automated cleaning systems, which are quite necessary.
	<<if _masterSuiteAverageDick > 4>>
		With so many huge cocks in the fuckpit, every hole available is frequently fucked vigorously.
	<</if>>
	<<if _masterSuiteAverageCum > 4>>
		The slaves' bodies grow more coated with cum, and more of the white stuff drips from their holes, until they take a break for a shower.
	<</if>>
	<<if _masterSuiteAverageMilk > 4000>>
		Most of them cannot tear themselves away (or cannot escape) for a normal machine milking, so their tender, overfull breasts squirt milk whenever anyone touches them. The lowest level of the fuckpit is a pool of milk.
	<</if>>
	<</if>>
	<<if (_masterSuitePregnantSlaves > 2) && (_masterSuitePregnantSlavesMultiple < 2)>>
	Many of the slaves are pregnant, and more than one has her face buried in the cunt directly below a gravid belly while she lovingly massages her own.

	<<elseif (_masterSuitePregnantSlaves > 2) && (_masterSuitePregnantSlavesMultiple > 2) && $masterSuiteHyperPregnancy == 1>>
	Many of the slaves are heavily pregnant with multiple children, and more than one has her face buried in the cunt directly below a massively overburdened belly while she lovingly massages her own distended squirming stomach.

	<<elseif (_masterSuitePregnantSlaves > 2) && (_masterSuitePregnantSlavesMultiple > 2)>>
	Many of the slaves are pregnant with multiple children, and more than one has her face buried in the cunt directly below a grossly swollen belly while she lovingly massages her own distended stomach.

	<</if>>
<<elseif $masterSuiteSlaves > 0>>
	has a few lonely-looking fucktoys in it, badly outnumbered by the cushions.
<<else>>
	is desolate and unpopulated.
<</if>>

    [[Refit the suite to the height of traditional opulence|Master Suite][$cash -= _Tmult1, $masterSuiteUpgradeLuxury = 1]] //Costs <<print cashFormat(_Tmult1)>>; will focus the suite on you//

<<else>>

$masterSuiteNameCaps is furnished
<<switch $masterSuiteDecoration>>
<<case "Roman Revivalist">>
	as a Roman patrician's apartment. There is a small shrine to the old gods the <<if $PC.title == 1>>master<<else>>mistress<</if>> favors in a side room, and the flooring is erotic mosaic.
<<case "Aztec Revivalist">>
	as an Aztec cultural, spiritual and military leader of the city you're allowed great leniency. The <<if $PC.title == 1>>Master<<else>>Mistress<</if>>'s room is created to gratify you as a true god of the people.
<<case "Egyptian Revivalist">>
	after the best room of an ancient Egyptian mansion. There is a small shrine to the old gods the <<if $PC.title == 1>>master<<else>>mistress<</if>> favors in a side room, and linen hangings decorate the walls and ceiling.
<<case "Edo Revivalist">>
	in the Spartan style of an Edo period mansion's innermost rooms. Rice paper screens divide it into subsections, each of which contains little more than a low bed.
<<case "Arabian Revivalist">>
	as a beguiling haze of Arabian decadence. Soft cushions are scattered across the floor and piled against the walls to provide something for dusky, naked bodies to recline on. Gauzy curtains partition the room into a number of cozy dens.
<<case "Chinese Revivalist">>
	like the mansion of a senior mandarin of ancient China. The walls are gorgeous hand-carved wooden screens, and heavy jade statues of favored gods crouch in the corners.
<<case "Chattel Religionist">>
	as a severe place of cold stone and hard wood. A single shaft of sunlight illuminates the bed where penitents give their bodies to their <<if $PC.title == 1>>master<<else>>mistress<</if>>.
<<case "Repopulation Focus">>
	comfortably, with lots of cushions and seats for a pregnant slaves to lounge on. Various specialized toys, as well as, lotions and creams are readily available.
<<case "Eugenics">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make fucking slave girls lots of fun. Condoms and spermicides are readily available throughout the suite.
<<case "Degradationist">>
	with a gothic grandeur. Blood-red upholstery and hardwood menace. There are numerous places where resistant slaves can be restrained.
<<case "Asset Expansionist">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make sex with stacked slaves as fun as possible.
<<case "Transformation Fetishist">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make sex with bimbo slaves as fun as possible.
<<case "Gender Radicalist">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make fucking slave girls in the butt lots of fun. The straps to restrain slave girls who don't want to be fucked in the butt are concealed for now.
<<case "Gender Fundamentalist">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make fucking slave girls nice and enjoyable. The straps to restrain slave girls who don't want to be fucked are concealed for now.
<<case "Physical Idealist">>
	as a shrine to the owner's body. Athletic trophies and photographs of past victories line the walls. There are mirrors almost everywhere, including on the ceiling over the bed.
<<case "Supremacist">>
	like the master bedroom in a mansion in the old countries of $arcologies[0].FSSupremacistRace people.
<<case "Subjugationist">>
	like the master bedroom in a mansion in the old countries which favored $arcologies[0].FSSubjugationistRace slaves.
<<case "Paternalist">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make sex with slaves mutually enjoyable.
<<case "Pastoralist">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants. Everything that isn't waterproof is covered in plastic, to catch errant milk.
<<case "Maturity Preferentialist">>
	comfortably, with elegant sex toys and perfumed lubricants designed to appeal to mature sex slaves.
<<case "Youth Preferentialist">>
	comfortably, with pastel-colored sex toys and flavored lubricants designed to appeal to eager young sex slaves.
<<case "Body Purist" "Slimness Enthusiast">>
	comfortably, with lots of easy-to-clean leather and plentiful tools, toys, and lubricants to make sex with slaves mutually enjoyable.
<<case "Hedonistic">>
	comfortably, with lots of lounges for a hefty slaves to relax on. <<if $arcologies[0].FSHedonisticDecadenceResearch == 1>>Platters of food and treats are readily available throughout the room and are<<else>>Slave food is readily available for your harem and platters of food for yourself are<</if>> never out of arm's reach. There's a huge, reinforced, low to the ground bed in the middle of the suite.
<<default>>
	comfortably, as a fairly normal luxury suite. It is unusually large, to accommodate as large a stable of sex slaves as strikes your fancy.
<</switch>>

<<if $masterSuiteSlaves > 2>>
	It's busy with slaves, so many that they are able to rotate through keeping themselves perfect and ready for your pleasure. The slaves not on call at the moment are beautifying themselves, cleaning, or serving others.
	<<if (_masterSuitePregnantSlaves > 2) && (_masterSuitePregnantSlavesMultiple < 2)>>
	Many of the slaves are pregnant, and they walk around proudly displaying their bellies and the new slaves growing inside them.

	<<elseif (_masterSuitePregnantSlaves > 2) && (_masterSuitePregnantSlavesMultiple > 2) && $masterSuiteHyperPregnancy == 1>>
	Many of the slaves are heavily pregnant with multiple children, and they waddle around proudly displaying their distended bulging bellies and the next generation of slaves growing within them.

	<<elseif (_masterSuitePregnantSlaves > 2) && (_masterSuitePregnantSlavesMultiple > 2)>>
	Many of the slaves are pregnant with multiple children, and they walk around proudly displaying their distended bellies and the next generation of slaves growing within them.

	<</if>>
<<elseif $masterSuiteSlaves > 0>>
	It's sparsely populated, so that the few slaves here have to work hard and quickly to ensure that an assortment of sex slaves is perfect and ready for your pleasure at any given moment.
<<else>>
	None of your slaves are serving here.
<</if>>

    [[Refit the suite to the height of traditional opulence|Master Suite][$cash -= _Tmult2, $masterSuiteUpgradeLuxury = 1]] //Costs <<print cashFormat(_Tmult2)>> and will focus the suite on you//

    [[Remodel the suite around a luxurious pit for group sex|Master Suite][$cash -= _Tmult2, $masterSuiteUpgradeLuxury = 2]] //Costs <<print cashFormat(_Tmult2)>>; will encourage fucktoys to fuck each other//

<</if>>

$masterSuiteNameCaps has room for $masterSuite slaves to live comfortably<<if $masterSuiteUpgradeLuxury == 2>> in the moments when they're not in the fuckpit<<elseif $masterSuiteUpgradeLuxury == 1>> on its huge bed<</if>>. There <<if $masterSuiteSlaves == 1>>is<<else>>are<</if>> currently $masterSuiteSlaves slave<<if $masterSuiteSlaves != 1>>s<</if>> in $masterSuiteNameCaps.
<<set _Tmult0 = Math.trunc($masterSuite*1000*$upgradeMultiplierArcology)>>
[[Expand the Master Suite|Master Suite][$cash -= _Tmult0, $masterSuite += 2, $PC.engineering += .1]] //Costs <<print cashFormat(_Tmult0)>>//
<<if $Concubine == 0 && $masterSuiteSlaves == 0>>
 	|[[Decommission the Master Suite|Main][$masterSuite = 0, $masterSuiteUpgradeLuxury = 0, $masterSuitePregnancySlaveLuxuries = 0, $masterSuiteDecoration = "standard", $masterSuitePregnancyFertilityDrugs = 0, $masterSuitePregnancyFertilitySupplements = 0, $masterSuiteUpgradePregnancy = 0, $masterSuiteHyperPregnancy = 0]]
<</if>>

<<if $masterSuiteSlaves > 0>>
	<<if $Concubine != 0>><<set _X = 1>><<else>><<set _X = 0>><</if>>
	<<set _NewPop = $masterSuiteSlaves+$dormitoryPopulation+_X>>
	<<link "Remove all slaves" "Master Suite">>
		<<if $Concubine != 0>>
			<<assignJob $Concubine "rest">>
		<</if>>
		<<for $masterSuiteSlaves > 0>>
			<<assignJob $slaves[$slaveIndices[$MastSiIDs[0]]] "please you">>
		<</for>>
	<</link>>
	<<if _NewPop > $dormitory>>
		@@.red;Dormitory capacity will be exceeded.@@
	<</if>>
<</if>>

<<if $seePreg != 0>>

<<if $masterSuiteUpgradePregnancy == 1>>
	The master suite has been further upgraded to support fertile slaves and encourage slave pregnancy, providing additional rest areas, better access to amenities, and a dedicated birthing chamber.
	<<if $masterSuitePregnancySlaveLuxuries == 1>>
		Pregnant slaves are being ''given some luxuries'' to reduce stress. [[End the special treatment of pregnant slaves|Master Suite][$masterSuitePregnancySlaveLuxuries = 0]]

	<<else>>
		Pregnant slaves ''have no extra luxuries'' to reduce stress. [[Give pregnant slaves lighter duties|Master Suite][$masterSuitePregnancySlaveLuxuries = 1]]  //Costs <<print cashFormat(500)>>/week//

	<</if>>
	<<if $masterSuitePregnancyFertilityDrugs == 1 || $masterSuiteHyperPregnancy == 1>>
		Fertile slaves ''are being given'' <<if $masterSuiteHyperPregnancy == 1>>super fertility drugs<<else>>fertility drugs<</if>>, encouraging impregnation and multiple pregnancy.<<if $masterSuiteHyperPregnancy == 1>> [[End the drug regime|Master Suite][$masterSuiteHyperPregnancy = 0, $masterSuitePregnancyFertilitySupplements = 0]]<<else>> [[End the drug regime|Master Suite][$masterSuitePregnancyFertilityDrugs = 0, $masterSuitePregnancyFertilitySupplements = 0]]<</if>>

	<<else>>
		Fertile slaves ''are not being given'' fertility drugs. [[Give fertility drugs to all fertile slaves|Master Suite][$masterSuitePregnancyFertilityDrugs = 1]]<<if $seeHyperPreg == 1 && $superFertilityDrugs == 1>> | [[Give hyper fertility drugs to all fertile slaves|Master Suite][$masterSuiteHyperPregnancy = 1]]<</if>>

	<</if>>
	<<if $masterSuitePregnancyFertilityDrugs == 0 && $masterSuiteHyperPregnancy == 0>>
		//Fertile slaves ''must be on fertility drugs'' to be given fertility supplements//

	<<elseif $masterSuitePregnancyFertilitySupplements == 0 && ($masterSuitePregnancyFertilityDrugs == 1 || $masterSuiteHyperPregnancy == 1)>>
		Fertile slaves ''are not being given'' fertility drug supplements. [[Give supplements to slaves on fertility drugs|Master Suite][$masterSuitePregnancyFertilitySupplements = 1]] //Costs <<print cashFormat(1000)>>/week//

	<</if>>
	<<if $masterSuitePregnancyFertilitySupplements == 1 && ($masterSuitePregnancyFertilityDrugs == 1 || $masterSuiteHyperPregnancy == 1)>>
		Fertile slaves ''are being given'' supplements to their fertility drugs, further enhancing the chances of multiple pregnancy. [[End the supplement regime|Master Suite][$masterSuitePregnancyFertilitySupplements = 0]]

	<</if>>
<<else>>
	The master suite does not currently have special customizations to support slave pregnancy. [[Refit the suite to support and encourage slave pregnancy|Master Suite][$cash -= _Tmult3, $masterSuiteUpgradePregnancy = 1]] //Costs <<print cashFormat(_Tmult3)>>//
<</if>>
<</if>>

<<if $Concubine != 0>>
	<<set $Flag = 2>>
	<<include "Slave Summary">>
<<else>>
	You do not have a slave serving as your Concubine. [[Appoint one|Concubine Select]]
<</if>>

<<if ($masterSuite <= $masterSuiteSlaves)>>
	''$masterSuiteNameCaps is full and cannot hold any more slaves''
<<elseif ($slaves.length > $masterSuiteSlaves)>>
	<<link "''Send a slave to serve in $masterSuiteName''">>
		<<replace #ComingGoing>>
			<<resetAssignmentFilter>>
			<<set $Flag = 0>>
			<<include "Slave Summary">>
		<</replace>>
	<</link>>
<</if>>

<<if $masterSuiteSlaves > 0>>
	| <<link "''Bring a slave out of the master suite''">>
		<<replace #ComingGoing>>
			<<suiteAssignmentFilter>>
			<<set $Flag = 1>>
			<<include "Slave Summary">>
			<<resetAssignmentFilter>>
		<</replace>>
	<</link>>
<<else>>

//$masterSuiteNameCaps is empty for the moment//
<</if>>

<<assignmentFilter>>

	<<suiteAssignmentFilter>>
	<<set $Flag = 1>>
	<<include "Slave Summary">>
	<<resetAssignmentFilter>>

Rename $masterSuiteName: <<textbox "$masterSuiteName" $masterSuiteName "Master Suite">> //Use a noun or similar short phrase//