code:
:: Manage Penthouse [nobr jump-to-safe jump-from-safe]

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

<<if $cheatMode == 1>>

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

<</if>>

Penthouse

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

	<<if $SF.Toggle && $SF.Active >= 1>>

		<<link "Take your express elevator down to $SF.Lower""Firebase">> <</link>>
	<<elseif $SF.FS.Tension > 100>>
		<<= App.SF.fsIntegration('BadOutcome_Firebase')>>
	<</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][cashX(forceNeg(Math.trunc($dormitory*1000*$upgradeMultiplierArcology)), "capEx"), $dormitory += 10, $PC.skill.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][cashX(forceNeg(Math.trunc($rooms*1000*$upgradeMultiplierArcology)), "capEx"), $rooms += 5, $PC.skill.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][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $masterSuite = 1, $PC.skill.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][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $servantsQuarters = 5, $PC.skill.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][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $schoolroom = 5, $PC.skill.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][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $spa = 5, $PC.skill.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 $seePreg != 0>>
		<<if $experimental.nursery == 1>>

				<<if $nursery == 0>>
					[[Build a nursery to raise children from birth|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $nursery = 5, $nurseryNannies = 1, $PC.skill.engineering += 1]]
					Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>
				<<else>>
					The penthouse has a nursery built where infants can be brought up.
				<</if>>

		<</if>>
	<</if>>

	<<if $clinic == 0>>
		[[Expand the surgical recovery area to accommodate patients and a nurse|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $clinic = 5, $PC.skill.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][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $cellblock = 5, $PC.skill.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 $seePreg != 0>>

		<<if $arcologyUpgrade.grid == 1>>
			<<if $incubator == 0>>
				[[Install an incubation chamber to rapidly age children|Manage Penthouse][cashX(forceNeg(Math.trunc(100000*$upgradeMultiplierArcology)), "capEx"), $incubator = 1, $PC.skill.engineering += 1, $readySlaves = 0]]
				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][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $HGSuite = 1, $PC.skill.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>>

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][cashX(forceNeg(Math.trunc(25000*$upgradeMultiplierArcology)), "capEx"), $servantMilkers = 1, $PC.skill.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][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $boobAccessibility = 1, $PC.skill.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][cashX(forceNeg(Math.trunc(50000*$upgradeMultiplierArcology)), "capEx"), $boobAccessibility = 1, $PC.skill.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][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $pregAccessibility = 1, $PC.skill.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][cashX(forceNeg(Math.trunc(50000*$upgradeMultiplierArcology)), "capEx"), $pregAccessibility = 1, $PC.skill.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][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $dickAccessibility = 1, $PC.skill.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][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $ballsAccessibility = 1, $PC.skill.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][cashX(forceNeg(Math.trunc(50000*$upgradeMultiplierArcology)), "capEx"), $ballsAccessibility = 1, $PC.skill.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][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $buttAccessibility = 1, $PC.skill.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][cashX(forceNeg(Math.trunc(50000*$upgradeMultiplierArcology)), "capEx"), $buttAccessibility = 1, $PC.skill.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 $boobAccessibility > 0 || $pregAccessibility > 0 || $dickAccessibility > 0 || $ballsAccessibility > 0 || $buttAccessibility > 0>>
		<<set _removeCost = Math.trunc(((5000*($boobAccessibility+$pregAccessibility+$dickAccessibility+$ballsAccessibility+$buttAccessibility)))*$upgradeMultiplierArcology)>>

			[[Remove the accessibility renovations|Manage Penthouse][cashX(forceNeg(_removeCost), "capEx"), $boobAccessibility = 0, $pregAccessibility = 0, $dickAccessibility = 0, $ballsAccessibility = 0, $buttAccessibility = 0]] Will cost <<print cashFormat(_removeCost)>>

	<</if>>

	<<if $feeder == 0>>
		[[Upgrade the kitchen's nutritional sensing systems|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $feeder = 1, $PC.skill.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][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $cockFeeder = 1, $PC.skill.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][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $suppository = 1, $PC.skill.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][cashX(forceNeg(Math.trunc(15000*$upgradeMultiplierArcology)), "capEx"), $dairyPiping = 1, $PC.skill.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 $seePee == 1>>

		<<if $wcPiping == 0>>
			[[Install pipes connecting the slave bathrooms to the rest of your penthouse for use in watersports|Manage Penthouse][cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx"), $wcPiping = 1, $PC.skill.engineering += .5]]
			Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>
		<<else>>
			The plumbing underneath the slave bathrooms connects to various taps throughout the penthouse that can dispense its contents when needed.
		<</if>>

	<</if>>

	<<if $studio == 0>>
		[[Install a media hub to convert slave video feeds into pornography|Manage Penthouse][cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx"), $studio = 1, $PC.skill.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 $studioFeed == 0>>
			[[Upgrade the media hub to allow better control of pornographic content|Manage Penthouse][cashX(forceNeg(Math.trunc(15000*$upgradeMultiplierArcology)), "capEx"), $studioFeed = 1]]
			Costs <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology))>>
		<<else>>
			It has been upgraded to allow superior control of a slave's pornographic content.
		<</if>>
	<</if>>

	<<if $dojo == 0>>
		[[Set up a personal armory to support a bodyguard|Manage Penthouse][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $dojo = 1, $PC.skill.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][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $dojo = 2, $PC.skill.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 them to rest in when off duty.
	<</if>>

	<<if $dispensary == 0>>
		<<if $rep > 2000>>
			[[Install a pharmaceutical fabricator|Manage Penthouse][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $dispensary = 1, $drugsCost = $drugsCost*.75, $PC.skill.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 $ImplantProductionUpgrade == 0>>
		<<if $rep > 2000>>
			[[Install an implant manufactory|Manage Penthouse][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $ImplantProductionUpgrade = 1, $PC.skill.engineering += .1]]
			Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>>
		<<else>>
			You lack the reputation to obtain cutting-edge implant fabrication technology.
		<</if>>
	<<else>>
		There is a [[implant manufactory|Implant Manufactory]] attached to the surgery.
	<</if>>

	<<if $organFarmUpgrade == 0>>
		<<if $rep > 10000>>
			[[Install an experimental organ farm|Manage Penthouse][cashX(forceNeg(Math.trunc(70000*$upgradeMultiplierArcology)), "capEx"), $organFarmUpgrade = 1, $PC.skill.engineering += .1]]
			Costs <<print cashFormat(Math.trunc(70000*$upgradeMultiplierArcology))>>
		<<else>>
			You lack the reputation to obtain an experimental organ fabricator.
		<</if>>
	<<else>>
		There is an [[organ farm|Organ Farm]] attached to the surgery.
	<</if>>

	<<if $geneticMappingUpgrade == 0>>
		<<if $rep > 14000>>
			[[Install a genetic sequencer|Manage Penthouse][cashX(-120000, "capEx"), $geneticMappingUpgrade = 1, $PC.skill.engineering += .1]]
			Costs <<print cashFormat(120000)>>
		<<else>>
			You lack the reputation to purchase a cutting-edge genetic sequencer
		<</if>>
	<<else>>
		There is a [[genetic sequencer|Gene Lab]] attached to the surgery.
	<</if>>

	<<switch $prostheticsUpgrade>>
	<<case 0>>
		<<if ($rep > 8000)>>
			[[Install basic equipment for attaching and maintenance of prosthetics|Manage Penthouse][cashX(forceNeg(Math.trunc(100000*$upgradeMultiplierArcology)), "capEx"), $prostheticsUpgrade = 1, $PC.skill.engineering += 1]]
			Costs <<print cashFormat(Math.trunc(100000*$upgradeMultiplierArcology))>>
		<<else>>
			You lack the reputation to buy basic equipment for attaching and maintenance of prosthetics.
		<</if>>
	<<case 1>>
		You have basic equipment for attaching and maintenance of prosthetics.
		<<if ($rep > 12000)>>
			[[Buy a contract for advanced prosthetics|Manage Penthouse][cashX(forceNeg(Math.trunc(100000*$upgradeMultiplierArcology)), "capEx"), $prostheticsUpgrade = 2]]
			Costs <<print cashFormat(Math.trunc(100000*$upgradeMultiplierArcology))>>
		<<else>>
			You lack the reputation to get a contract for advanced prosthetics.
		<</if>>
	<<case 2>>
		You have basic equipment for attaching and maintenance of prosthetics and a contract to guarantee the availability of advanced prosthetics.
		<<if ($rep > 16000)>>
			[[Buy a contract for high-tech prosthetics|Manage Penthouse][cashX(forceNeg(Math.trunc(100000*$upgradeMultiplierArcology)), "capEx"), $prostheticsUpgrade = 3]]
			Costs <<print cashFormat(Math.trunc(100000*$upgradeMultiplierArcology))>>
		<<else>>
			You lack the reputation to get a contract for high-tech prosthetics.
		<</if>>
	<<case 3>>
		You have basic equipment for attaching and maintenance of prosthetics and a contract to guarantee the availability of high-tech prosthetics.
	<</switch>>

	<<if $prostheticsUpgrade > 0>>

		<<if $researchLab.level > 0>>
			Your penthouse is equipped with an advanced prosthetic lab.
		<<else>>
			[[Clear out one of the floors and install equipment to construct prosthetics yourself|Manage Penthouse][cashX(forceNeg(Math.trunc(150000*$upgradeMultiplierArcology)), "capEx"), $researchLab.level = 1, $researchLab.maxSpace = 5, $PC.skill.engineering += 1]]

				Costs <<print cashFormat(Math.trunc(150000*$upgradeMultiplierArcology))>>

					Buying the equipment to construct prosthetics yourself is expensive but if you want to construct a lot of prosthetics it will pay out in the long run.

		<</if>>

	<</if>>

	<<if $surgeryUpgrade == 0>>
		<<if $rep > 10000>>
			[[Upgrade the remote surgery|Manage Penthouse][cashX(forceNeg(Math.trunc(50000*$upgradeMultiplierArcology)), "capEx"), $surgeryUpgrade = 1, $PC.skill.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 $seePreg == 1>>

		<<if $pregnancyMonitoringUpgrade == 0>>
			<<if $rep > 10000>>
				[[Upgrade the pregnancy monitoring systems|Manage Penthouse][cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "capEx"), $pregnancyMonitoringUpgrade = 1, $PC.skill.engineering += 1]]
				Costs <<print cashFormat(Math.trunc(30000*$upgradeMultiplierArcology))>>
			<<else>>
				You lack the reputation to purchase improved pregnancy monitoring systems.
			<</if>>
		<<else>>
			Your pregnancy monitoring systems have been heavily upgraded.
		<</if>>

	<</if>>

	<<if $rep >= 10000>>
		[[Black Market|The Black Market]]
	<<else>>
		You lack the reputation (<<= num(10000)>>) to be invited to the underground Black Market.
	<</if>>


code:
:: Markets Report [nobr]

//FC Markets Report://

<<set _assetAffected = either("capture", "drugs", "entrapment", "general", "slaves", "surgical", "training")>>
<<set _assetDirection = either("down", "up")>>

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

repo_name: KnightBoulegard/fc

license: mit


code:
:: Master Suite [nobr jump-to-safe jump-from-safe]

<<set _slaves = App.Utils.sortedEmployees(App.Entity.facilities.masterSuite)>>
<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Master Suite", $encyclopedia = "Master Suite", _SL = $slaves.length, _MsL = _slaves.length>>

<<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 _MsL > 0>>
<<for _slave range _slaves>>
	<<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/_MsL>>
	<<set _masterSuiteAverageMilk = _masterSuiteAverageMilk/_MsL>>
	<<set _masterSuiteAverageCum = _masterSuiteAverageCum/_MsL>>
	<<set _masterSuiteAverageDick = _masterSuiteAverageDick/_MsL>>
	<<set _masterSuiteAveragePreg = _masterSuiteAveragePreg/_MsL>>
	<<set _masterSuiteAverageDom = _masterSuiteAverageDom/_MsL>>
	<<set _masterSuiteAverageSadism = _masterSuiteAverageSadism/_MsL>>
<</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 <<= properMaster()>> 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 <<= properMaster()>>'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 <<= properMaster()>> 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 <<= properMaster()>>.
		<<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 <<= properMaster()>>.
		<<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.
		<<case "Intellectual Dependency">>
			comfortably, with lots of easy-to-clean leather and plentiful easy-to-use tools, toys, and lubricants to make sex with bimbo slaves as fun and simple as possible. There's a huge bed in the middle of the suite, heavily reinforced.
		<<case "Slave Professionalism">>
			comfortably, with complex sex toys and tools designed to maximize pleasure when used by skilled hands. The space is dominated by a broad, soft bed, well supplied with pillows. The rest is dedicated to perfecting oneself and boosting <<= properMaster()>>'s status ever higher.
		<<case "Petite Admiration">>
			comfortably, with plentiful tools, toys, lubricants and a bevy of stepping stools to accommodate even the shortest slave. There's a huge, reinforced, low to the ground bed in the middle of the suite.
		<<case "Statuesque Glorification">>
			comfortably, though designed for slaves of the taller variety. Short slaves will find the furniture, and the room's centerpiece, a massive four-poster bed, woefully out of their reach.
		<<default>>
			in a refined, yet practical style. It's dominated by a huge bed in which many slaves could serve their <<= properTitle()>> 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 _MsL > 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 _MsL > 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][cashX(forceNeg(_Tmult1), "capEx"), $masterSuiteUpgradeLuxury = 2]]

		Costs <<print cashFormat(_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 <<= properTitle()>> 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 <<= properTitle()>>'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 <<= properTitle()>> 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.
<<case "Intellectual Dependency">>
	comfortably, with lots of easy-to-clean leather and plentiful easy-to-use tools, toys, and lubricants to make sex with bimbo slaves as fun and simple as possible.
<<case "Slave Professionalism">>
	comfortably, with complex sex toys and tools designed to maximize pleasure when used by skilled hands. The space is largely dedicated to perfecting oneself and boosting <<= properMaster()>>'s status ever higher.
<<case "Petite Admiration">>
	comfortably, with plentiful tools, toys, lubricants and a bevy of stepping stools to accommodate even the shortest slave.
<<case "Statuesque Glorification">>
	comfortably, though designed for slaves of the taller variety. Short slaves will find the furniture woefully out of their 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 _MsL > 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 slave is dozing while another plays with their 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 _MsL > 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][cashX(forceNeg(_Tmult1), "capEx"), $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 <<= properTitle()>> 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 <<= properTitle()>>'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 <<= properTitle()>> 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 <<= properTitle()>>.
<<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.
<<case "Intellectual Dependency">>
	comfortably, with lots of easy-to-clean leather and plentiful easy-to-use tools, toys, and lubricants to make sex with bimbo slaves as fun and simple as possible.
<<case "Slave Professionalism">>
	comfortably, with complex sex toys and tools designed to maximize pleasure when used by skilled hands. The space is largely dedicated to perfecting oneself and boosting <<= properMaster()>>'s status ever higher.
<<case "Petite Admiration">>
	comfortably, with plentiful tools, toys, lubricants and a bevy of stepping stools to accommodate even the shortest slave.
<<case "Statuesque Glorification">>
	comfortably, though designed for slaves of the taller variety. Short slaves will find the furniture woefully out of their reach.
<<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 _MsL > 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 _MsL > 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][cashX(forceNeg(_Tmult2), "capEx"), $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][cashX(forceNeg(_Tmult2), "capEx"), $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 _MsL == 1>>is<<else>>are<</if>> currently _MsL slave<<if _MsL != 1>>s<</if>> in $masterSuiteName.
<<set _Tmult0 = Math.trunc($masterSuite*1000*$upgradeMultiplierArcology)>>

	[[Expand the Master Suite|Master Suite][cashX(forceNeg(_Tmult0), "capEx"), $masterSuite += 2, $PC.skill.engineering += .1]] //Costs <<print cashFormat(_Tmult0)>>//
	<<if $Concubine == 0 && _MsL == 0>>
		| [[Decommission the Master Suite|Main][$masterSuite = 0, $masterSuiteUpgradeLuxury = 0, $masterSuitePregnancySlaveLuxuries = 0, $masterSuiteDecoration = "standard", $masterSuitePregnancyFertilityDrugs = 0, $masterSuitePregnancyFertilitySupplements = 0, $masterSuiteUpgradePregnancy = 0, $masterSuiteHyperPregnancy = 0]]
	<</if>>

<<if _MsL > 0>>
	<<removeFacilityWorkers "masterSuite" "rest" "please you">>
<</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][cashX(forceNeg(_Tmult3), "capEx"), $masterSuiteUpgradePregnancy = 1]] //Costs <<print cashFormat(_Tmult3)>>//
	<</if>>
<</if>>

<<print App.UI.SlaveList.stdFacilityPage(App.Entity.facilities.masterSuite)>>

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

<<run App.UI.SlaveList.ScrollPosition.restore()>>


code:
:: Master Suite Report [nobr]

<<set _slaves = App.Utils.sortedEmployees(App.Entity.facilities.masterSuite)>>
<<set _DL = _slaves.length, _SL = $slaves.length, $legendaryAbolitionistID = 0, $masterSuiteAverageEnergy = 0, _masterSuiteAverageCum = 0, _masterSuiteAverageDick = 0, _masterSuiteAverageDom = 0, _masterSuiteAverageMilk = 0, _masterSuiteAveragePreg = 0, _masterSuiteAverageSadism = 0, _masterSuitePregnantSlaves = 0, _masterSuitePregnantSlavesMultiple = 0>>
<<if $Concubine != 0>>
	<<set _FLs = $slaveIndices[$Concubine.ID]>>

	<<if def _FLs>>
		/% Add the Concubine to the _slaves list at the front of the array, so that $he displays first %/
		<<set _slaves.unshift($Concubine), _DL++>>
	<</if>>
<</if>>

<<if _DL > 0>>
	<<for _slave range _slaves>>
		<<set $masterSuiteAverageEnergy += _slave.energy>>
		<<if $masterSuiteUpgradeLuxury == 2>>
		<<if canAchieveErection(_slave)>>
			<<set _masterSuiteAverageCum += _slave.balls, _masterSuiteAverageDick += _slave.dick>>
		<</if>>
		<<set _masterSuiteAverageMilk += _slave.lactation*(_slave.boobs-_slave.boobsImplant), _masterSuiteAveragePreg += _slave.pregKnown>>
		<<switch _slave.fetish>>
		<<case "dom">>
			<<set _masterSuiteAverageDom += _slave.fetishStrength>>
		<<case "submissive">>
			<<set _masterSuiteAverageDom -= _slave.fetishStrength>>
		<<case "sadist">>
			<<set _masterSuiteAverageSadism += _slave.fetishStrength>>
		<<case "masochist">>
			<<set _masterSuiteAverageSadism -= _slave.fetishStrength>>
		<</switch>>
		<</if>>
		<<if ($legendaryAbolitionistID == 0) && (_slave.devotion > 95) && (_slave.prestige == 0) && ((_slave.origin == "You sentenced $him to enslavement as a punishment for attempted theft of a slave.") || (_slave.origin == "$He is an enslaved Daughter of Liberty.") || (_slave.origin === "You got $him at the Slave Shelter. $He is an enslaved Daughter of Liberty, caught some weeks after the failed coup. $His previous owner used $him as a punching bag and dart board, then when he was bored of $him tattooed obscenities all over $his body and threw $him away.") || (_slave.origin === "$He is an enslaved member of an anti-slavery extremist group.") || (_slave.career == "an antislavery activist"))>>
			<<set $legendaryAbolitionistID = _slave.ID>>
		<</if>>
	<</for>>
	<<set $masterSuiteAverageEnergy = $masterSuiteAverageEnergy/_DL>>
	<<set _masterSuiteAverageMilk = _masterSuiteAverageMilk/_DL>>
	<<set _masterSuiteAverageCum = _masterSuiteAverageCum/_DL>>
	<<set _masterSuiteAverageDick = _masterSuiteAverageDick/_DL>>
	<<set _masterSuiteAveragePreg = _masterSuiteAveragePreg/_DL>>
	<<set _masterSuiteAverageDom = _masterSuiteAverageDom/_DL>>
	<<set _masterSuiteAverageSadism = _masterSuiteAverageSadism/_DL>>

	    ''There <<if (_DL == 1)>>is one slave<<else>>are _DL slaves<</if>>
	seeing to your pleasure in the master suite.'' Such sexual opulence @@.green;improves@@ your reputation.
	<<if ($arcologies[0].FSEgyptianRevivalist > 0) && (_DL >= 5)>>
		Society @@.green;approves@@ of your keeping a large number of women. This advances the Egyptian revivalist ideal of multiple concubinage.
		<<= FutureSocieties.Change("EgyptianRevivalist", 2)>>
	<</if>>
	<<if (_masterSuitePregnantSlaves >= 1)>>
		The suite is supporting the pregnancies of the slaves
		<<if ($masterSuitePregnancyFertilityDrugs == 1 || $masterSuiteHyperPregnancy == 1)>>
			within, and is providing them with fertility drugs
			<<if ($masterSuitePregnancyFertilitySupplements == 1)>>
				and supplements to encourage impregnation.
			<<else>>
				to encourage impregnation.
			<</if>>
		<<else>>
		within.
		<</if>>
		<<if ($arcologies[0].FSHedonisticDecadence > 0)>>
			Society @@.green;approves@@ of the pampering your pregnant harem receives. This advances the ideal that everyone's desires should be fulfilled.
			<<= FutureSocieties.Change("Hedonistic", 1)>>
		<</if>>
	<</if>>
	<<if _DL > 1>>
		The level of sexual energy in the suite is
		<<if $masterSuiteUpgradeLuxury == 1>>
			<<if $masterSuiteAverageEnergy > 90>>
				intense. When you enter your luxurious retreat, you can set off pent-up orgasms with a touch.
			<<elseif $masterSuiteAverageEnergy > 60>>
				high; there is strong competition for your favors whenever you enter your retreat.
			<<else>>
				relatively normal; the slaves serve your pleasure before their own.
			<</if>>
		<<elseif $masterSuiteUpgradeLuxury == 2>>
			<<if $masterSuiteAverageEnergy > 90>>
				intense. Your slaves spend almost all their time in the fuckpit, having sex in a big pile.
			<<elseif $masterSuiteAverageEnergy > 60>>
				high; your slaves spend much of their time in the fuckpit, having sex with each other.
			<<else>>
				relatively normal; the slaves lounging in the fuckpit get each other off when they feel like it.
			<</if>>
			<<if _masterSuiteAverageCum > 4>>
				Unless it's right after an automated cleaning, everything in the fuckpit is spattered with cum.
			<</if>>
			<<if _masterSuiteAverageMilk > 4000>>
				There's so much lactation going on that the lowest level of the fuckpit is a pool of milk.
			<</if>>
		<<else>>
			relatively normal.
		<</if>>
	<</if>>

	<<for _slave range _slaves>>
		<<set $i = $slaveIndices[_slave.ID]>>
		<<setLocalPronouns _slave>>

		/* 000-250-006 */
		<<if $seeImages && $seeReportImages>>

			<<= SlaveArt(_slave, 0, 0)>>

		<</if>>
		/* 000-250-006 */
		<<if (_slave.assignment == "be your Concubine")>>
			<<set $Concubine = $slaves[_FLs]>>
			''Your concubine <<= SlaveFullName($Concubine)>> is serving you in $masterSuiteName.'' More than any other slave, $his sexual brilliance and physical appeal are @@.green;critical@@ to your reputation.

			<<if (($Concubine.prestigeDesc == "You bankrupted and enslaved $him in revenge for $his part in the attack on your arcology by the Daughters of Liberty.") && ($Concubine.newGamePlus == 0))>>
				$He was once your rival, and your relationship is widely thought to be @@.green;the perfect modern romance.@@
				<<run repX(500, "concubine", $Concubine)>>
			<<elseif ($Concubine.prestige > 0)>>
				<<run repX(500*$Concubine.prestige, "concubine", $Concubine)>>
				<<if $verboseDescriptions == 1>>
					Keeping such a prestigious slave as your concubine @@.green;adds to your fame.@@
					<<if $Concubine.prestigeDesc == "$He is a famed Free Cities whore, and commands top prices.">>
						When $he has a free moment, $he refines $his flexibility so that $he is prepared for any sexual position you can think of, and many more that $he researched just for your pleasure.
					<</if>>
					<<if $Concubine.prestigeDesc == "$He is a famed Free Cities slut, and can please anyone.">>
						When $he has a free moment, $he pretties $himself up so that $he may be as beautiful as possible to make you look even better.
					<</if>>
					<<if $Concubine.prestigeDesc == "$He is remembered for winning best in show as a cockmilker.">>
						<<if $Concubine.balls > 10 || $Concubine.prostate > 1>>
							$He does $his best to prevent $himself from making a mess when you don't want one. When $he has free time, $he researches new techniques to make use of $his huge loads to entertain you.
						<<elseif $Concubine.balls > 0>>
							When $he has a free moment, $he researches ways to increase the size of $his loads for you; $he dreams of the day $he show you just what $he was capable of.
						<<else>>
							$He wishes $he could blow huge loads for you, but without balls, there is little $he can do.
						<</if>>
					<</if>>
					<<if $Concubine.prestigeDesc == "$He is remembered for winning best in show as a dairy cow.">>
						<<if $Concubine.lactation > 1 || $Concubine.lactationAdaptation > 90>>
							$He does $his best to prevent $himself from making a mess when you don't want one. When $he has free time, $he researches new techniques to make use of $his excessive milk to entertain you.
						<<elseif $Concubine.lactation > 0>>
							$He does $his best to prevent $himself from making a mess when you don't want one. When $he has free time, $he researches new techniques to make use of $his breast milk to entertain you.
						<<else>>
							$He wishes $he could lactate for you, but $he has dried up since $his glory days.
						<</if>>
					<</if>>
					<<if $Concubine.prestigeDesc == "$He is remembered for winning best in show as a breeder.">>
						<<if $Concubine.bellyPreg >= 5000>>
							When $he has a free moment, $he refines $his flexibility so that $he can perform any sexual position possible for $him in $his motherly state. $He takes the time to look up new positions to work around $his growing pregnancy.
						<<elseif isFertile($Concubine) || $Concubine.preg > 0>>
							When $he has a free moment, $he refines $his flexibility so that $he is prepared for any sexual position you can think of, no matter how heavy $he becomes with children.
						<<else>>
							When $he has a free moment, $he researches ways to restore $his fertility; $he dreams of the day $he can carry <<if $PC.dick != 0>>your children<<else>>children for you<</if>>.
						<</if>>
					<</if>>
				<</if>>
			<</if>>
			<<if $Concubine.porn.prestige > 2>>
				<<run repX(800, "concubine", $Concubine)>>
				Having a porn star as your personal bed warmer @@.green;reflects on your standing.@@ Your citizens can only wonder at what kinky things happen behind closed doors.
			<<elseif $Concubine.porn.prestige > 1>>
				<<run repX(300, "concubine", $Concubine)>>
				Having a rising porn star as your personal bed warmer @@.green;reflects on your standing.@@
			<</if>>
			<<if ($Concubine.counter.oral + $Concubine.counter.anal + $Concubine.counter.vaginal + $Concubine.counter.mammary + $Concubine.counter.penetrative > 1000)>>
				<<if $verboseDescriptions == 1>>Many citizens <<if $Concubine.counter.publicUse > 10>>remember having had $him themselves, and <</if>>@@.green;respectfully@@ envy you $his exclusive company.<</if>>
				<<run repX(300, "concubine", $Concubine)>>
			<</if>>
			<<if $masterSuiteUpgradeLuxury > 0>>
				<<set _slave.rules.living = "luxurious", _slave.devotion += 4, _slave.trust += 4>>
			<<else>>
				<<set _slave.rules.living = "normal", _slave.devotion += 2, _slave.trust += 2>>
			<</if>>
			<<if $masterSuiteDecoration != "standard">>
				<<set _slave.devotion++>>
			<</if>>
			<<run repX(Beauty($Concubine) * 5 + ($Concubine.skill.vaginal || 0) + ($Concubine.skill.anal || 0) + ($Concubine.skill.oral || 0) + ($Concubine.skill.whoring || 0) + ($Concubine.skill.entertainment || 0), "concubine", $Concubine)>>
		<<else>> /* not Concubine */
			<<= SlaveFullName(_slave)>>
			<<if _slave.choosesOwnAssignment == 2>>
				<<include "SA chooses own job">>
			<<else>>
				sees to your pleasure in $masterSuiteName.
			<</if>>
			/* Perform facility based rule changes */
			<<if ($masterSuiteUpgradeLuxury == 1)>>
				<<set _slave.rules.living = "luxurious">>
				<<if (_slave.devotion <= 95)>>
					<<set _slave.devotion += 2>>
				<</if>>
				<<if $masterSuiteDecoration != "standard">>
					<<set _slave.devotion++>>
				<</if>>
				<<if (_slave.trust < 60)>>
					<<set _slave.trust++>>
				<</if>>
			<<elseif ($masterSuiteUpgradeLuxury == 2)>>
				<<set _slave.rules.living = "luxurious">>
				<<if (_slave.energy > 90)>>
					<<if (_slave.devotion <= 95)>>
						<<set _slave.devotion += 2>>
					<</if>>
					<<if (_slave.trust <= 95)>>
						<<set _slave.trust += 2>>
					<</if>>
				<<else>>
					<<if (_slave.devotion <= 60)>>
						<<set _slave.devotion++>>
					<</if>>
					<<if (_slave.trust < 60)>>
						<<set _slave.trust++>>
					<</if>>
				<</if>>
			<<else>>
				<<set _slave.rules.living = "spare">>
				<<if (_slave.devotion <= 20) && (_slave.trust >= -20)>>
					<<set _slave.devotion -= 2, _slave.trust -= 5>>
				<<elseif (_slave.devotion <= 60)>>
					<<set _slave.devotion += 2>>
				<<elseif (_slave.devotion > 60)>>
					<<set _slave.devotion -= 2>>
				<</if>>
				<<if (_slave.trust < 60)>>
					<<set _slave.trust++>>
				<</if>>
			<</if>>
		<</if>>
		/% Both Concubine and other slaves %/
		<<if $masterSuiteUpgradeLuxury == 2 && $masterSuiteAverageEnergy > random(50,90)>>
			<<set _energy = (Math.ceil(_slave.energy/5)*7)>>
			<<run SimpleSexAct.Slave(_slave, _energy)>>
			<<if canPenetrate(_slave)>>
				<<set _fuckCount = (random(1,3)*_energy)>>
				<<set _slave.counter.penetrative += _fuckCount, $penetrativeTotal += _fuckCount>>
			<</if>>
			<<if _slave.nipples == "fuckable" && _masterSuiteAverageDick > 2>>
				<<set _fuckCount = (random(1,3)*_energy)>>
				<<set _slave.counter.mammary += _fuckCount, $mammaryTotal += _fuckCount>>
			<</if>>
			<<if (_slave.trust >= -20) && (_slave.devotion > -10) && (_slave.fetishStrength <= 95) && _slave.fetish != "mindbroken">>
				<<set _fetishChangeChance = fetishChangeChance(_slave)>>
				<<if (_masterSuiteAverageMilk > 2000) && (_fetishChangeChance > random(0,50))>>
					<<if _slave.fetish == "boobs">>
						<<if $verboseDescriptions == 1>>$His<<else>>_slave.slaveName's<</if>> @@.lightcoral;boob fetish is strengthened@@ by the constant availability of milky nipples for $him to play with.
						<<set _slave.fetishStrength += 4>>
					<<else>>
						<<if $verboseDescriptions == 1>>$He<<else>>_slave.slaveName<</if>> @@.lightcoral;acquires a boob fetish@@ after spending a lot of time in the fuckpit drinking from $his fellow fucktoys' tits.
						<<set _slave.fetish = "boobs", _slave.fetishStrength = 65>>
					<</if>>
				<<elseif (_masterSuiteAverageDick > 3) && (_slave.anus > 0) && (_fetishChangeChance > random(0,50))>>
					$He
					<<if _slave.fetish == "buttslut">>
						@@.lightcoral;sinks farther into anal pleasure,@@ since $he spends $his time in the fuckpit with at least one of the many available cocks up $his butt.
						<<set _slave.fetishStrength += 4>>
					<<else>>
						@@.lightcoral;acquires an anal fetish@@ after helplessly orgasming at the mercy of your many fucktoys eager to shove their big stiff penises up $his ass.
						<<set _slave.fetish = "buttslut", _slave.fetishStrength = 65>>
					<</if>>
				<<elseif (_masterSuiteAverageCum > 3) && (_fetishChangeChance > random(0,50))>>
					$He
					<<if _slave.fetish == "cumslut">>
						@@.lightcoral;sinks farther into cum addiction,@@ since $he spends $his time in the fuckpit eagerly sucking down ejaculate, straight from the many sources.
						<<set _slave.fetishStrength += 4>>
					<<else>>
						@@.lightcoral;acquires an oral fixation@@ after orally servicing your many fucktoys eager to blow their loads down $his throat.
						<<set _slave.fetish = "cumslut", _slave.fetishStrength = 65>>
					<</if>>
				<<elseif (_masterSuiteAveragePreg > 10) && (_fetishChangeChance > random(0,50))>>
					$He
					<<if _slave.fetish == "pregnancy">>
						@@.lightcoral;sinks farther into pregnancy obsession,@@ since $he never wants for a pregnant girl to make love to.
						<<set _slave.fetishStrength += 4>>
					<<else>>
						@@.lightcoral;acquires a pregnancy fetish,@@ since many of $his sexual partners in the fuckpit are heavily pregnant.
						<<set _slave.fetish = "pregnancy", _slave.fetishStrength = 65>>
					<</if>>
				<<elseif (_masterSuiteAverageDom < 50) && (_fetishChangeChance > random(0,50))>>
					$He
					<<if _slave.fetish == "dom">>
						@@.lightcoral;becomes more dominant,@@ since there are so many subs in the fuckpit who beg $him to fuck them hard.
						<<set _slave.fetishStrength += 4>>
					<<else>>
						@@.lightcoral;becomes sexually dominant@@ after having fun satisfying the many submissive fucktoys in the fuckpit who beg $him to top them.
						<<set _slave.fetish = "dom", _slave.fetishStrength = 65>>
					<</if>>
				<<elseif (_masterSuiteAverageDom > 50) && (_fetishChangeChance > random(0,50))>>
					$He
					<<if _slave.fetish == "submissive">>
						@@.lightcoral;becomes even more submissive,@@ since there are so many doms in the fuckpit that $he's often used by more than one at once.
						<<set _slave.fetishStrength += 4>>
					<<else>>
						@@.lightcoral;becomes sexually submissive@@ after the many dominant slaves in the fuckpit hold $him down and use $him for their pleasure.
						<<set _slave.fetish = "submissive", _slave.fetishStrength = 65>>
					<</if>>
				<<elseif (_masterSuiteAverageSadism < 50) && (_fetishChangeChance > random(0,50))>>
					$He
					<<if _slave.fetish == "sadist">>
						@@.lightcoral;becomes more sadistic,@@ since there are so many sluts in the fuckpit who will do anything for $him if $he'll only spank them.
						<<set _slave.fetishStrength += 4>>
					<<else>>
						@@.lightcoral;becomes a bit of a sadist@@ after $he notices that so many of $his fellow fucktoys cum harder if $he gives them a good slap.
						<<set _slave.fetish = "sadist", _slave.fetishStrength = 65>>
					<</if>>
				<<elseif (_masterSuiteAverageSadism > 50) && (_fetishChangeChance > random(0,50))>>
					<<if _slave.fetish == "masochist">>
						<<if $verboseDescriptions == 1>>$His<<else>>_slave.slaveName's<</if>> @@.lightcoral;pain addiction deepens,@@ since the fuckpit is full of ladies happy to fuck $him while $he screams.
						<<set _slave.fetishStrength += 4>>
					<<else>>
						<<if $verboseDescriptions == 1>>$He<<else>>_slave.slaveName<</if>> @@.lightcoral;learns masochism@@ after experiencing many orgasms under the exquisite sexual torture of the sadists in the fuckpit.
						<<set _slave.fetish = "masochist", _slave.fetishStrength = 65>>
					<</if>>
				<</if>>
			<</if>>
			<<if _slave.lactation > 0>>
				<<set _slave.lactationDuration = 2>>
				<<set _slave.boobs -= _slave.boobsMilk, _slave.boobsMilk = 0>>
			<</if>>
			<<if _slave.energy > 40 && _slave.energy < 95>>
				Being a constant part of the fuckpit orgy @@.green;greatly heightens $his libido.@@
				<<set _slave.energy += 2>>
			<</if>>
			<<set _slave.need -= 50>>
		<</if>>

		<<if $masterSuiteUpgradePregnancy == 1>>
			/* If they're not on fertility drugs and the toggle is active, stick them on (if they can take them). Otherwise take them off. */
			<<if ($masterSuitePregnancyFertilityDrugs == 1) && (_slave.drugs != "fertility drugs") && canGetPregnant(_slave)>>
				<<set _slave.drugs = "fertility drugs">>
			<<elseif ($masterSuiteHyperPregnancy == 1) && (_slave.drugs != "super fertility drugs") && canGetPregnant(_slave)>>
				<<set _slave.drugs = "super fertility drugs">>
			<<elseif ((($masterSuitePregnancyFertilityDrugs == 0) && (_slave.drugs == "fertility drugs")) || (($masterSuiteHyperPregnancy == 0) && (_slave.drugs == "super fertility drugs"))) || (!canGetPregnant(_slave) && ["fertility drugs", "super fertility drugs"].includes(_slave.drugs))>>
				<<set _slave.drugs = "no drugs">>
			<</if>>
			/* We don't know they're pregnant for a month or so by game logic */
			<<if (_slave.pregKnown == 1)>>
				/* Once we know they're knocked up, get the counter going. */
				<<set _masterSuitePregnantSlaves += 1>>
				/* Don't know about twins/triplets etc until 10 weeks. Once we do, get the counter going */
				<<if (_slave.pregType > 1) && (_slave.preg >= _slave.pregData.normalBirth/1.33)>>
					<<set _masterSuitePregnantSlavesMultiple += 1>>
				<</if>>
				/* If they're preggo and in the upgraded suite, give them extra devotion. More if they're being given lighter duties. */
				<<if (_slave.devotion <= 100)>>
					<<if ($masterSuitePregnancySlaveLuxuries == 0)>>
						<<set _slave.devotion += 2>>
					<<else>>
						<<set _slave.devotion += 5>>
					<</if>>
				<</if>>
				/* If they're preggo and in the upgraded suite, give them extra trust. More if they're being given lighter duties. */
				<<if (_slave.trust <= 100)>>
					<<if ($masterSuitePregnancySlaveLuxuries == 0)>>
						<<set _slave.trust += 2>>
					<<else>>
						<<set _slave.trust += 5>>
					<</if>>
				<</if>>
				/* If they're preggo and in the upgraded suite, give them extra health. More if they're being given lighter duties. */
				<<if (_slave.health.condition < 100)>>
					<<if ($masterSuitePregnancySlaveLuxuries == 0)>>
						<<run improveCondition(_slave, 15)>>
					<<else>>
						<<run improveCondition(_slave, 25)>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>

		<<if $verboseDescriptions == 1>>

    $He <<= App.SlaveAssignment.pleaseYou(_slave)>>

			<<if $servantMilkers == 1 && _slave.lactation > 0 && _slave.fuckdoll == 0 && _slave.fetish != "mindbroken" && canWalk(_slave) && _slave.intelligence+_slave.intelligenceImplant >= -90>>
				When $his breasts begin to feel full and you aren't around, $he avails $himself to the penthouse milkers and
				<<set $servantMilkersMultiplier = 0.25>>
				<<run App.SlaveAssignment.getMilked(_slave)>>
				<<set $servantMilkersMultiplier = 1>>
				gives $milk liters of milk over the week, which is sold for @@.yellowgreen;<<print cashFormat($milkSale)>>.@@
			<</if>>

			<<= App.SlaveAssignment.choosesOwnClothes(_slave)>>
			<<include "SA rules">>
			<<include "SA diet">>
			<<include "SA long term effects">>
			<<= App.SlaveAssignment.drugs(_slave)>>
			<<include "SA relationships">>
			<<include "SA rivalries">>

<<include "SA devotion">>
		<<else>>
			<<silently>>
			<<include "SA chooses own job">>
			<<run App.SlaveAssignment.pleaseYou(_slave)>>
			<<if $servantMilkers == 1 && _slave.lactation > 0 && _slave.fuckdoll == 0 && _slave.fetish != "mindbroken" && canWalk(_slave) && _slave.intelligence+_slave.intelligenceImplant >= -90>>
				<<set $servantMilkersMultiplier = 0.25>>
				<<run App.SlaveAssignment.getMilked(_slave)>>
				<<set $servantMilkersMultiplier = 1>>
			<</if>>
			<<run App.SlaveAssignment.choosesOwnClothes(_slave)>>
			<<include "SA rules">>
			<<include "SA diet">>
			<<include "SA long term effects">>
			<<run App.SlaveAssignment.drugs(_slave)>>
			<<include "SA relationships">>
			<<include "SA rivalries">>
			<<include "SA devotion">>
			<</silently>>
		<</if>>
		<<if _slave.health.condition < 80>>
			<<if $masterSuiteUpgradeLuxury == 1>>
				<<run improveCondition(_slave, 20)>>
			<<else>>
				<<run improveCondition(_slave, 10)>>
			<</if>>
		<</if>>

	<</for>>

	<<if $arcologies[0].FSRestart != "unset" && $propOutcome != 1 && _masterSuitePregnantSlaves > 0 && $eugenicsFullControl != 1>>
		The Societal Elite know what you are doing with your bedslaves. @@.red;They do not approve.@@
		<<set $failedElite += 5*_masterSuitePregnantSlaves>>
	<</if>>

	<<if $masterSuiteDecoration != "standard">>

    $masterSuiteNameCaps's $masterSuiteDecoration atmosphere @@.hotpink;has a minor impact on your fucktoys.@@
	<</if>>
<</if>>
<<if _DL > 0 || $Concubine != 0>>

<</if>>


code:
:: Milkmaid Select [nobr jump-to-safe jump-hidden jump-from-safe]

<<set $nextButton = "Back", $nextLink = "Dairy", $encyclopedia = "Milkmaid">>
<<if ($Milkmaid != 0)>>
	<<set $Milkmaid = getSlave($Milkmaid.ID)>>
	<<setLocalPronouns $Milkmaid>>
	<<= SlaveFullName($Milkmaid)>> is serving as your Milkmaid.

$He will look after your livestock, helping them give milk<<if $seeDicks > 0>> and semen<</if>>.
<<else>>
	You have not selected a Milkmaid.
<</if>>

''Appoint a Milkmaid from your obedient slaves:''

[[None|Dairy][removeJob($Milkmaid, "be the Milkmaid")]]

<<print App.UI.SlaveList.facilityManagerSelection(App.Entity.facilities.dairy, "Dairy")>>


code:
:: Multiple Organ Implant [nobr]

You head down to your
<<if $surgeryUpgrade == 1>>
	heavily upgraded and customized
<</if>>
remote surgery and start having the slaves with
<<if ($completedOrgans.length > 0) && ($adjustProstheticsCompleted > 0)>>
	organs or prosthetics
<<elseif ($completedOrgans.length > 1)>>
	organs
<<elseif ($adjustProstheticsCompleted > 1)>>
	prosthetics
<</if>>
that are ready be sent down.

Implant Organs

<<set _F = App.Medicine.OrganFarm>>
<<for _i = 0; _i < $slaves.length; _i++>>
	<<set $activeSlave = $slaves[_i]>>
	<<set _sortedOrgans = _F.getSortedOrgans($activeSlave)>>
	<<if _sortedOrgans.length === 0>><<continue>><</if>>

$activeSlave.slaveName

	<<for _k = 0; _k < _sortedOrgans.length; _k++>>

<<print _F.Organs[_sortedOrgans[_k]].name>>

		<<set _actions = _F.Organs[_sortedOrgans[_k]].implantActions>>
		<<set _manual = false, _success = false, _break = false>>
		<<for _l = 0; _l < _actions.length; _l++>>
			<<if !_actions[_l].autoImplant>>
				<<if _actions[_l].canImplant($activeSlave)>>
					<<set _manual = true>>
				<</if>>
				<<continue>>
			<</if>>
			<<if !_actions[_l].canImplant($activeSlave)>>
				<<set _error = _actions[_l].implantError($activeSlave)>>
				<<if _error !== "">>
					@@.red;ERROR: <<print _error>>@@

				<</if>>
			<<elseif $activeSlave.health.health - _actions[_l].healthImpact < -75>>
				Estimated health impact too high, skipping further surgeries.
				<<set _break = true>>
				<<break>>
			<<else>>
				<<run App.Medicine.OrganFarm.implant($activeSlave, _sortedOrgans[_k], _l)>>
				<<include "Surgery Degradation">>

				<<set _success = true>>
			<</if>>
		<</for>>
		<<if _break>><<break>><</if>>
		<<if !_success && _manual>>
			//Cannot implant <<print _F.Organs[_sortedOrgans[_k]].name.toLowerCase()>> automatically, try implanting manually in the remote surgery.//
		<</if>>
	<</for>>

	<<set $slaves[_i] = $activeSlave>>
<</for>>

Implant prosthetics

/* prosthetics */
<<for _i = 0; _i < $slaves.length; _i++>>
	<<set $activeSlave = $slaves[_i]>>

	/* count for estimating health impact */
	<<set _prostheticCount = $adjustProsthetics.filter(p => p.slaveID == $activeSlave.ID && p.workLeft <= 0).length>>

	/* since we already have count, skip slaves that don't need work */
	<<if _prostheticCount < 1>>
		<<continue>>
	<</if>>
	/*
	Ensures that a slave can never die during the execution of this passage.
	Calculation based on worst case, so when changing worst case change it here too.
	*/
	<<if $activeSlave.health.health - (_prostheticCount * 20) < -75>>

		@@.red;Estimated health impact too great; $activeSlave.slaveName skipped.@@
		<<continue>>
	<</if>>

	<<for _k = 0; _k < $adjustProsthetics.length; _k++>>
		<<set _p = $adjustProsthetics[_k]>>
		<<if _p.slaveID == $activeSlave.ID && _p.workLeft <= 0>>
			<<set $adjustProsthetics.splice(_k, 1), _k-->>
			<<set addProsthetic($activeSlave, _p.id)>>

			<<switch _p.id>>
			<<case "ocular">>
				<<if getBestVision($activeSlave) === 0>>
					<<run eyeSurgery($activeSlave, "both", "cybernetic"), cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave)>>
					<<set surgeryDamage($activeSlave, 20), $surgeryType = "ocular implant">>
					<<include "Surgery Degradation">>
				<<else>>
					//Since $he has working eyes the <<= setup.prosthetics.ocular.name>> will be put into storage.//
				<</if>>
			<<case "cochlear">>
				<<if $activeSlave.hears != 0>>
					<<set $activeSlave.earImplant = 1, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), surgeryDamage($activeSlave, 20), $surgeryType = "cochlear implant">>
					<<include "Surgery Degradation">>
				<<else>>
					//Since $he has working ears the <<= setup.prosthetics.cochlear.name>> will be put into storage.//
				<</if>>
			<<case "electrolarynx">>
				<<if $activeSlave.voice <= 0>>
					<<set $activeSlave.electrolarynx = 1, $activeSlave.voice = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), surgeryDamage($activeSlave, 20), $surgeryType = "electrolarynx">>
					<<include "Surgery Degradation">>
				<<else>>
					//Since $he has a voice the <<= setup.prosthetics.electrolarynx.name>> will be put into storage.//
				<</if>>
			<<case "interfaceP1">>
				<<if hasAnyNaturalLimbs($activeSlave)>>
					//Since $he has at least one healthy limb the <<= setup.prosthetics.interfaceP1.name>> will be put into storage.//
				<<elseif $activeSlave.PLimb == 2>>
					//Since $he already has <<= addA(setup.prosthetics.interfaceP2.name)>> installed the <<= setup.prosthetics.interfaceP1.name>> will be put into storage.//
				<<else>>
					<<set $activeSlave.PLimb = 1, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), surgeryDamage($activeSlave, 20), $surgeryType = "PLimb interface1">>
					<<include "Surgery Degradation">>
				<</if>>
			<<case "interfaceP2">>
				<<if hasAllNaturalLimbs($activeSlave)>>
					//Since $he has no amputated limbs the <<= setup.prosthetics.interfaceP2.name>> will be put into storage.//
				<<elseif $activeSlave.PLimb == 1>>
					<<set $activeSlave.PLimb = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), surgeryDamage($activeSlave, 5), $surgeryType = "PLimb interface3">>
					<<include "Surgery Degradation">>
				<<else>>
					<<set $activeSlave.PLimb = 2, cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), surgeryDamage($activeSlave, 20), $surgeryType = "PLimb interface2">>
					<<include "Surgery Degradation">>
				<</if>>
			<<case "basicL" "sexL" "beautyL" "combatL" "cyberneticL">>
				<<if $activeSlave.fuckdoll != 0>>
					//Since a Fuckdoll can't use prosthetic limbs the <<= setup.prosthetics[_p.id].name>> will be put into storage.//
				<<elseif hasAllNaturalLimbs($activeSlave)>>
					//Since $he needs an amputated limb to attach prosthetics the <<= setup.prosthetics[_p.id].name>> will be put into storage.//
				<<elseif $activeSlave.PLimb == 0>>
					//Since $he must have a prosthetic interface installed to attach prosthetic limbs the <<= setup.prosthetics[_p.id].name>> will be put into storage.//
				<<else>>
					<<if _p.id == "basicL">>
						<<set _state = App.Desc.limbChange().currentLimbs($activeSlave), _change = upgradeLimbs($activeSlave, 2)>>
						<<if _change>>
							<<= App.Desc.limbChange().reaction($activeSlave, _state)>>
						<<else>>
							//Since $he already has more advanced prosthetic limbs attached the <<= setup.prosthetics.basicL.name>> will be put into storage.//
						<</if>>
					<<elseif _p.id == "sexL">>
						<<set _state = App.Desc.limbChange().currentLimbs($activeSlave), _change = upgradeLimbs($activeSlave, 3)>>
						<<if _change>>
							<<= App.Desc.limbChange().reaction($activeSlave, _state)>>
						<<else>>
							//Since $he already has advanced prosthetic limbs attached the <<= setup.prosthetics.sexL.name>> will be put into storage.//
						<</if>>
					<<elseif _p.id == "beautyL">>
						<<set _state = App.Desc.limbChange().currentLimbs($activeSlave), _change = upgradeLimbs($activeSlave, 4)>>
						<<if _change>>
							<<= App.Desc.limbChange().reaction($activeSlave, _state)>>
						<<else>>
							//Since $he already has advanced prosthetic limbs attached the <<= setup.prosthetics.beautyL.name>> will be put into storage.//
						<</if>>
					<<elseif _p.id == "combatL">>
						<<set _state = App.Desc.limbChange().currentLimbs($activeSlave), _change = upgradeLimbs($activeSlave, 5)>>
						<<if _change>>
							<<= App.Desc.limbChange().reaction($activeSlave, _state)>>
						<<else>>
							//Since $he already has advanced prosthetic limbs attached the <<= setup.prosthetics.combatL.name>> will be put into storage.//
						<</if>>
					<<else>>
						<<if $activeSlave.PLimb == 2>>
							<<set _state = App.Desc.limbChange().currentLimbs($activeSlave), _change = upgradeLimbs($activeSlave, 2)>>
							<<if _change>>
								<<= App.Desc.limbChange().reaction($activeSlave, _state)>>
							<</if>>
						<<else>>
							//Since $he must have <<= addA(setup.prosthetics.interfaceP2.name)>> installed to attach cybernetic limbs the <<= setup.prosthetics.cyberneticL.name>> will be put into storage.//
						<</if>>
					<</if>>
				<</if>>
			<<case "interfaceTail">>
				<<set $activeSlave.PTail = 1, $activeSlave.tail = "none", $activeSlave.tailColor = "none", cashX(forceNeg($surgeryCost), "slaveSurgery", $activeSlave), surgeryDamage($activeSlave, 10), $surgeryType = "tailInterface">>
				<<include "Surgery Degradation">>
			<<case "modT" "sexT" "combatT">>
				<<if $activeSlave.PTail == 0>>
					//Since $he must have <<= addA(setup.prosthetics.interfaceTail.name)>> installed to attach tails the <<= setup.prosthetics[_p.id].name>> will be put into storage.//
				<<elseif $activeSlave.tail != "none">>
					//Since $he currently has a tail attached the <<= setup.prosthetics[_p.id].name>> will be put into storage.//
				<<elseif _p.id == "modT">>
					//Since installing <<= addA(setup.prosthetics.modT.name)>> is complicated it can't be automated.//
					/*Reason: there are different designs player can choose from.*/
				<<elseif _p.id == "combatT">>
					<<set $prostheticsConfig = "attachTail", $activeSlave.tail = "combat", $activeSlave.tailColor = "jet black">>
					<<include "Prosthetics Configuration">>
				<<elseif _p.id == "sexT">>
					<<set $prostheticsConfig = "attachTail", $activeSlave.tail = "sex", $activeSlave.tailColor = "pink">>
					<<include "Prosthetics Configuration">>
				<</if>>
			<<default>>
				//Since there is no automated procedure to implant/attach <<= setup.prosthetics[_p.id].name>> it will be put into storage.//
			<</switch>>

		<</if>>
	<</for>>
	/* updates the interrogated slave */
	<<set $slaves[_i] = $activeSlave>>
<</for>> /* end of the $slaves loop */
<<set $adjustProstheticsCompleted = 0>>

/* This needs to be down here to over-ride any Surgery Degradation calls */
<<set $nextButton = "Continue">>
<<set $nextLink = "Main">>