code:
:: Bulk Slave Generate [nobr]

<<set $newSlaves = [], $returnTo = "Main", $newSlavesDone = 0, $spent = 0, $newSlaveIndex = 0>>

<<if ndef $numSlaves>>
	<<set $numSlaves = 5>>
<</if>>

/* Discount calculation. Gives 5% on top of slave school discount */
<<set $discount = 475>>
<<switch $slaveMarket>>
<<case "TSS">>
	<<if $TSS.schoolUpgrade != 0>>
		<<set $discount = 375>>
	<</if>>

<<case "TUO">>
	<<if $TUO.schoolUpgrade != 0>>
		<<set $discount = 375>>
	<</if>>

<<case "GRI">>
	<<if $GRI.schoolUpgrade != 0>>
		<<set $discount = 375>>
	<</if>>

<<case "SCP">>
	<<if $SCP.schoolUpgrade != 0>>
		<<set $discount = 375>>
	<</if>>

<<case "LDE">>
	<<if $LDE.schoolUpgrade != 0>>
		<<set $discount = 375>>
	<</if>>

<<case "TGA">>
	<<if $TGA.schoolUpgrade != 0>>
		<<set $discount = 375>>
	<</if>>

<<case "HA">>
	<<if $HA.schoolUpgrade != 0>>
		<<set $discount = 375>>
	<</if>>

<<case "NUL">>
	<<if $NUL.schoolUpgrade != 0>>
		<<set $discount = 375>>
	<</if>>

<<case "TCR">>
	<<if $TCR.schoolUpgrade != 0>>
		<<set $discount = 375>>
	<</if>>

<<case "TFS">>
	<<if $TFS.schoolUpgrade != 0>>
		<<set $discount = 300>>
	<<else>>
		<<set $discount = 380>>
	<</if>>

<<case "corporate">>
	<<if $corp.Market == 1>>
		<<set $discount = 350>>
	<</if>>

<<case "neighbor">>
	<<if $numArcology >= $arcologies.length>>
		<<set $numArcology = 1>>
	<</if>>
	<<set _opinion = App.Neighbor.opinion(0, $numArcology)>>
	<<set _opinion = Math.clamp(Math.trunc(_opinion/20), -10, 10)>>
	<<set $discount -= (_opinion * 25)>>

<</switch>>

<<for _i = 0; _i < $numSlaves; _i++>>
	<<set $activeSlave = (generateMarketSlave($slaveMarket, $numArcology)).slave>>
	<<set $slavesSeen++>>
	<<if App.Data.misc.lawlessMarkets.includes($slaveMarket)>>
		<<set _slaveCost = slaveCost($activeSlave)>>
	<<else>>
		<<set _backup = $activeSlave>> /* backup newly generated slave */
		<<run App.Desc.lawCompliance($activeSlave, $slaveMarket)>> /* includes CheckForGingering — slave stats may change, affecting price */
		<<set _slaveCost = slaveCost($activeSlave)>>
		<<run removeGingering()>> /* remove gingered state, if applied, so we can apply it again later */
		<<set $activeSlave = _backup>> /* restore backup so we can apply Law Compliance again later */
	<</if>>

	/* Adjust _slaveCost according to $slavesSeen */
	<<if $slavesSeen > $slaveMarketLimit>>
		<<set _slaveCost += _slaveCost*(($slavesSeen-$slaveMarketLimit)*0.1)>>
		<<if $introType == "inStock">>
			<<break>>
		<</if>>
	<</if>>

	/* Apply discount modifier */
	<<set _slaveCost = $discount*Math.trunc(_slaveCost/500)>>

	/* Charge the Player for the slave, or break out if cannot afford */
	<<if $cash < _slaveCost>>
		<<set _i = $numSlaves>>
		<<break>>
	<<else>>
		<<run cashX(forceNeg(_slaveCost), "slaveTransfer", $activeSlave)>>
		<<set $newSlaves.push($activeSlave)>>
		<<set $spent += _slaveCost>>
	<</if>>
<</for>>

/* Max Buy clean-up */
<<if $numSlaves == 9999>>
	<<set $numSlaves = $newSlaves.length>>
<</if>>

/* increment Slave school purchase counts if needed */
<<switch $slaveMarket>>
<<case "TSS">>
	<<set $TSS.studentsBought += $newSlaves.length>>
<<case "TUO">>
	<<set $TUO.studentsBought += $newSlaves.length>>
<<case "GRI">>
	<<set $GRI.studentsBought += $newSlaves.length>>
<<case "SCP">>
	<<set $SCP.studentsBought += $newSlaves.length>>
<<case "LDE">>
	<<set $LDE.studentsBought += $newSlaves.length>>
<<case "TGA">>
	<<set $TGA.studentsBought += $newSlaves.length>>
<<case "HA">>
	<<set $HA.studentsBought += $newSlaves.length>>
<<case "TCR">>
	<<set $TCR.studentsBought += $newSlaves.length>>
<<case "TFS">>
	<<set $TFS.studentsBought += $newSlaves.length>>
<<case "NUL">>
	<<set $NUL.studentsBought += $newSlaves.length>>
<</switch>>

<<goto "Bulk Slave Intro">>


code:
:: Bulk Slave Intro [nobr]

<<if ndef $introType || $newSlaves.length == 0>>
	<<set $introType = "">>
<</if>>

<<switch $introType>>
<<case "">>
	/* No message to give */
<<case "multi">>
	<<if $newSlaves.length > 1>>
		Your selection of $newSlaves.length slaves arrives from <<MarketNamePeriod $slaveMarket $numArcology>>
	<<else>>
		Your new slave from <<MarketName $slaveMarket $numArcology>> has arrived.
	<</if>>

<<case "bulk">>
	Your delivery of $newSlaves.length slaves arrives from <<MarketNamePeriod $slaveMarket $numArcology>>
	<<if $newSlaves.length != $numSlaves>>
		You were going to order $numSlaves, but $assistant.name lowered it on financial grounds.
	<</if>>
	<<set _seed = Math.ceil($slavesSeen - $slaveMarketLimit)>>
	<<if _seed > $newSlaves.length>>
		You have cast such a wide net for slaves this week that all are more expensive than normal.
	<<elseif _seed > 0>>
		You have cast such a wide net for slaves this week that some (_seed) are more expensive than normal.
	<</if>>
	<<if $slaveMarket == "TFS">>
		/* Put line about The Futanari Sisters discount & pricing */
	<<elseif $discount == 475>>
		Your bulk delivery came with a @@.yellowgreen;5%@@ discount.
	<<else>>
		With all your discounts factored in you got a @@.yellowgreen;<<print (500-$discount)/5>>%@@ discount;
	<</if>>
	You spent @@.yellowgreen;<<print cashFormat($spent)>>@@ on your new slaves.

<<case "inStock">>
	You clear out <<MarketName $slaveMarket $numArcology>> of its stock of $newSlaves.length slaves.
	<<if $slaveMarket == "TFS">>
		/* Put line about The Futanari Sisters discount & pricing */
	<<elseif $discount == 475>>
		Your bulk delivery came with a @@.yellowgreen;5%@@ discount.
	<<else>>
		With all your discounts factored in you got a @@.yellowgreen;<<print (500-$discount)/5>>%@@ discount;
	<</if>>
	You spent @@.yellowgreen;<<print cashFormat($spent)>>@@ on your new slaves.

<<case "liquidator">>

Your new pair of slaves look frightened and uncertain, but seem encouraged by each other's presence.

<<case "egyptian">>

They arrive hand-in-hand and don't let go of each other until the end of the enslavement process, and even after they break their grip and undress at your instruction, their eyes never stray far from each other. With a closer look at them, their blood relation is as obvious as their infatuation with one another. No wonder they couldn't keep it a secret.

<<case "event">>
	This is placeholder event info.

<</switch>>
/* remove the below line to make the intro blurb show up for every slave, not just the first */
<<set $introType = "">>

<<if ($newSlaveIndex >= $newSlaves.length) || ($newSlavesDone == 1)>>
	<<if $newSlaves.length > 0>>
		/* Push the induction changes for the final slave to the newSlave array */
		<<run newSlave($activeSlave)>>

		/* Variable Clean-up */
		<<set $newSlaves = []>>
		<<set $newSlavesDone = 0>>
		<<set $introType = "">>
	<</if>>
	<<goto $returnTo>>
<<else>>
	/* If looking at 2nd slave, push the induction changes for the prior slave to the newSlave array */
	<<if $newSlaveIndex > 0>>
		<<run newSlave($activeSlave)>>
	<</if>>
	<<if $newSlaves.length > 1>>
		Showing new slave <<print $newSlaveIndex+1>> of <<print $newSlaves.length>>:
	<</if>>

	/* Set activeSlave to the desired newSlave so that existing code can be used */
	<<set $activeSlave = $newSlaves[$newSlaveIndex]>>

	/* Due to possible gingering, the Long Slave Description must be displayed before the New Slave Intro */
	/* policies were applied earlier, if needed */
	<<includeDOM App.Desc.longSlave(V.activeSlave, {market: "generic"})>>

	/* Use existing New Slave Intro */
	<<include "New Slave Intro">> /* calls removeGingering() if needed */

	/* Override nextButton setting from New Slave Intro */
	<<set $nextButton = "Continue">>
	<<set $nextLink = "Bulk Slave Intro">>

	/* Add an option = goto the next slave below the New Slave Intro section */

	<<if $newSlaveIndex < ($newSlaves.length - 1)>>
		[[Next Slave|Bulk Slave Intro]]
	<<else>>
		[[Finish introducing slaves|Bulk Slave Intro][$newSlavesDone = 1]]
	<</if>>

<</if>> /* Closes no new Slaves check */

<<set $newSlaveIndex++>>

repo_name: NovX/fc

license: mit


code:
:: Buy Slaves [nobr jump-to-safe jump-from-safe]

<<set $nextButton = "Back">>
<<set $nextLink = "Main">>
<<set _minimumFive = minimumSlaveCost() * 5>>
<<set _minimumTen = minimumSlaveCost() * 10>>

The Market

	//There are many different organizations to purchase slaves from, but many of them are selective about their customers and will only sell to you if you are reputable.//

Market status

	<<if ($slaveCostFactor > 1.1)>>
		@@.yellow;There is a bull market for slaves; the price of slaves is very high.@@
	<<elseif ($slaveCostFactor > 1)>>
		@@.yellow;The slave market is bullish; the price of slaves is high.@@
	<<elseif ($slaveCostFactor < 0.9)>>
		@@.yellow;There is a bear market for slaves; the price of slaves is very low.@@
	<<elseif ($slaveCostFactor < 1)>>
		@@.yellow;The slave market is bearish; the price of slaves is low.@@
	<<else>>
		The slave market is stable; the price of slaves is average.
	<</if>>

Sex Slave Purchase Options

	<<if $corp.Incorporated == 1>>
		[[Corporate Market][$slavesSeen += 1]] |
		<<if $cash > _minimumFive>>
			[[(x5)|Bulk Slave Generate][$slaveMarket = "corporate", $introType = "bulk", $numSlaves = 5]] |
		<</if>>
		<<if $cash > _minimumTen>>
			[[(x10)|Bulk Slave Generate][$slaveMarket = "corporate", $introType = "bulk", $numSlaves = 10]] |
		<</if>>
		<<if $corp.Market == 1>>//Slaves from your corporation purchased at a discounted rate.//<<else>>//Slaves from your corporation//<</if>>
	<</if>>

	[[The Flesh Heap|Slave Markets][$slaveMarket = "heap", $slavesSeen += 1]] | //Broken and discarded slaves. Near useless, but cheap. No longer does bulk orders after complaints.//

	<<if $bodyswapAnnounced == 1>>
		[[Order a custom husk slave from the Flesh Heap|Husk Slave]] | //Will need to be used on arrival.//
	<</if>>

	<<if ($rep > 500)>>
		[[Kidnappers' Market|Slave Markets][$slaveMarket = "kidnappers", $slavesSeen += 1]] |
		<<if $cash > _minimumFive>>
			[[(x5)|Bulk Slave Generate][$slaveMarket = "kidnappers", $introType = "bulk", $numSlaves = 5]] |
		<</if>>
		<<if $cash > _minimumTen>>
			[[(x10)|Bulk Slave Generate][$slaveMarket = "kidnappers", $introType = "bulk", $numSlaves = 10]] |
		<</if>>
		//Slaves will tend to be low quality and resistant.//
	<</if>>

	''Neighboring Arcologies:'' //The arcology's prosperity and culture will affect slaves who have lived there.//

<<for _i = 0; _i < $arcologies.length; _i++>>
	<<if $arcologies[_i].direction != 0>>

			<<capture _i>>[[Slaves from|Slave Markets][$slaveMarket = "neighbor", $numArcology = _i]]<</capture>>
			'' $arcologies[_i].name''
			<<if $cash > _minimumFive>>
				| <<capture _i>>[[(x5)|Bulk Slave Generate][$slaveMarket = "neighbor", $introType = "bulk", $numSlaves = 5, $numArcology = _i]]<</capture>>
			<</if>>
			<<if $cash > _minimumTen>>
				| <<capture _i>>[[(x10)|Bulk Slave Generate][$slaveMarket = "neighbor", $introType = "bulk", $numSlaves = 10, $numArcology = _i]]<</capture>>
			<</if>>

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

	<<if ($rep > 1000)>>
		[[Runaway Hunters' Market|Slave Markets][$slaveMarket = "hunters", $slavesSeen += 1]] |
		<<if $cash > _minimumFive>>
			[[(x5)|Bulk Slave Generate][$slaveMarket = "hunters", $introType = "bulk", $numSlaves = 5]] |
		<</if>>
		<<if $cash > _minimumTen>>
			[[(x10)|Bulk Slave Generate][$slaveMarket = "hunters", $introType = "bulk", $numSlaves = 10]] |
		<</if>>
		//Slaves will tend to be skilled but rebellious.//
	<</if>>

	<<if ($rep > 1500)>>
		[[Indentures Market|Slave Markets][$slaveMarket = "indentures", $slavesSeen += 1]] |
		<<if $cash > _minimumFive>>
			[[(x5)|Bulk Slave Generate][$slaveMarket = "indentures", $introType = "bulk", $numSlaves = 5]] |
		<</if>>
		<<if $cash > _minimumTen>>
			[[(x10)|Bulk Slave Generate][$slaveMarket = "indentures", $introType = "bulk", $numSlaves = 10]] |
		<</if>>
		//Temporary enslavement and restrictions on treatment.//
	<</if>>

	<<if ($rep > 2000)>>
		[[Raiders' Market|Slave Markets][$slaveMarket = "raiders", $slavesSeen += 1]] |
		<<if $cash > _minimumFive>>
			[[(x5)|Bulk Slave Generate][$slaveMarket = "raiders", $introType = "bulk", $numSlaves = 5]] |
		<</if>>
		<<if $cash > _minimumTen>>
			[[(x10)|Bulk Slave Generate][$slaveMarket = "raiders", $introType = "bulk", $numSlaves = 10]] |
		<</if>>
		//Slaves will always be sold immediately upon reaching majority.//
	<</if>>

	<<if ($pedo_mode == 1 || ($minimumSlaveAge <= 13 && $minimumSlaveAge <= $fertilityAge)) && ($rep > 3000)>>
		[[Raiders' Black Market|Slave Markets][$slaveMarket = "underage raiders", $slavesSeen += 1]] |
		<<if $cash > _minimumFive>>
			[[(x5)|Bulk Slave Generate][$slaveMarket = "underage raiders", $introType = "bulk", $numSlaves = 5]] |
		<</if>>
		<<if $cash > _minimumTen>>
			[[(x10)|Bulk Slave Generate][$slaveMarket = "underage raiders", $introType = "bulk", $numSlaves = 10]] |
		<</if>>
		//Very young slaves.//
	<</if>>

<<if ($rep > 4000)>>

		[[Trainers' Market|Slave Markets][$slaveMarket = "trainers", $slavesSeen += 1]] |
		<<if $cash > _minimumFive>>
			[[(x5)|Bulk Slave Generate][$slaveMarket = "trainers", $introType = "bulk", $numSlaves = 5]] |
		<</if>>
		<<if $cash > _minimumTen>>
			[[(x10)|Bulk Slave Generate][$slaveMarket = "trainers", $introType = "bulk", $numSlaves = 10]] |
		<</if>>
		//Slaves will tend to be good quality and obedient.//

		<<if $arcologies[0].FSPaternalist == "unset">>
			[[Wetware CPUs|Slave Markets][$slaveMarket = "wetware", $slavesSeen += 1]] |
			<<if $cash > _minimumFive>>
				[[(x5)|Bulk Slave Generate][$slaveMarket = "wetware", $introType = "bulk", $numSlaves = 5]] |
			<</if>>
			<<if $cash > _minimumTen>>
				[[(x10)|Bulk Slave Generate][$slaveMarket = "wetware", $introType = "bulk", $numSlaves = 10]] |
			<</if>>
			//Ruined bodies but keen minds. Requires some TLC, but offers outstanding training at a discount.//
		<<else>>
			//The paternalistic nature of your society blocks the abusive Wetware CPU manufactures from operating within your arcology.//
		<</if>>

<</if>>

	<<if ($rep > 5000)>>
		<<set $weeklyMarket = $prisonCircuit[$prisonCircuitIndex]>>
		[[Prisoner Sale|Criminal Market][$slavesSeen += 1]] |
		<<if $cash > _minimumFive>>
			[[(x5)|Bulk Slave Generate][$slaveMarket = $weeklyMarket, $introType = "bulk", $numSlaves = 5]] |
		<</if>>
		<<if $cash > _minimumTen>>
			[[(x10)|Bulk Slave Generate][$slaveMarket = $weeklyMarket, $introType = "bulk", $numSlaves = 10]] |
		<</if>>
		This week
		<<switch $weeklyMarket>>
		<<case "low tier criminals">>
			a minor prison is selling inmates.
			//Slaves will tend to be low to mid quality with few redeeming factors.//
		<<case "gangs and smugglers">>
			a major prison is selling hardened criminals.
			//Slaves will tend to be low quality and difficult but may prove useful once broken.//
		<<case "white collar">>
			a white collar prison is selling inmates.
			//Slaves will tend to be medium to high quality with a variety of useful backgrounds.//
		<<case "military prison">>
			a military prison is selling inmates.
			//Slaves will tend to be high quality but defiant.//
		<</switch>>
	<</if>>

<<if ($rep > 6000)>>

		''Slave Schools:'' //High prices; will be young and healthy.//

	<<if ($seeDicks != 100)>>

			[[The Slavegirl School][$slavesSeen += 1]] |
			<<if $cash > _minimumFive>>
				[[(x5)|Bulk Slave Generate][$slaveMarket = "TSS", $introType = "bulk", $numSlaves = 5]] |
			<</if>>
			<<if $cash > _minimumTen>>
				[[(x10)|Bulk Slave Generate][$slaveMarket = "TSS", $introType = "bulk", $numSlaves = 10]] |
			<</if>>
			//Straightforward slaves with good training.//<<if $TSS.schoolSale == 1>> //@@.yellow;Offering your first purchase at half price this week.@@//<</if>>

			[[The Utopian Orphanage][$slavesSeen += 1]] |
			<<if $cash > _minimumFive>>
				[[(x5)|Bulk Slave Generate][$slaveMarket = "TUO", $introType = "bulk", $numSlaves = 5]] |
			<</if>>
			<<if $cash > _minimumTen>>
				[[(x10)|Bulk Slave Generate][$slaveMarket = "TUO", $introType = "bulk", $numSlaves = 10]] |
			<</if>>
			//Intelligent, unspoiled slaves just past their majority.//<<if $TUO.schoolSale == 1>> //@@.yellow;Offering your first purchase at half price this week.@@//<</if>>

			[[Growth Research Institute][$slavesSeen += 1]] |
			<<if $cash > _minimumFive>>
				[[(x5)|Bulk Slave Generate][$slaveMarket = "GRI", $introType = "bulk", $numSlaves = 5]] |
			<</if>>
			<<if $cash > _minimumTen>>
				[[(x10)|Bulk Slave Generate][$slaveMarket = "GRI", $introType = "bulk", $numSlaves = 10]] |
			<</if>>
			//Poorly trained slaves with huge assets.//<<if $GRI.schoolSale == 1>> //@@.yellow;Offering your first purchase at half price this week.@@//<</if>>

			[[St. Claver Preparatory][$slavesSeen += 1]] |
			<<if $cash > _minimumFive>>
				[[(x5)|Bulk Slave Generate][$slaveMarket = "SCP", $introType = "bulk", $numSlaves = 5]] |
			<</if>>
			<<if $cash > _minimumTen>>
				[[(x10)|Bulk Slave Generate][$slaveMarket = "SCP", $introType = "bulk", $numSlaves = 10]] |
			<</if>>
			//Slaves with basic training and solid implants.//<<if $SCP.schoolSale == 1>> //@@.yellow;Offering your first purchase at half price this week.@@//<</if>>

			[[The Cattle Ranch][$slavesSeen += 1]] |
			<<if $cash > _minimumFive>>
				[[(x5)|Bulk Slave Generate][$slaveMarket = "TCR", $introType = "bulk", $numSlaves = 5]] |
			<</if>>
			<<if $cash > _minimumTen>>
				[[(x10)|Bulk Slave Generate][$slaveMarket = "TCR", $introType = "bulk", $numSlaves = 10]] |
			<</if>>
			//Mentally conditioned free-range cowgirls.//<<if $TCR.schoolSale == 1>> //@@.yellow;Offering your first purchase at half price this week.@@//<</if>>

			[[The Hippolyta Academy][$slavesSeen += 1]] |
			<<if $cash > _minimumFive>>
				[[(x5)|Bulk Slave Generate][$slaveMarket = "HA", $introType = "bulk", $numSlaves = 5]] |
			<</if>>
			<<if $cash > _minimumTen>>
				[[(x10)|Bulk Slave Generate][$slaveMarket = "HA", $introType = "bulk", $numSlaves = 10]] |
			<</if>>
			//High quality slaves of powerful physique and refined skills.//<<if $HA.schoolSale == 1>> //@@.yellow;Offering your first purchase at half price this week.@@//<</if>>

	<</if>>
	<<if ($seeDicks != 0)>>

			[[L'École des Enculées][$slavesSeen += 1]] |
			<<if $cash > _minimumFive>>
				[[(x5)|Bulk Slave Generate][$slaveMarket = "LDE", $introType = "bulk", $numSlaves = 5]] |
			<</if>>
			<<if $cash > _minimumTen>>
				[[(x10)|Bulk Slave Generate][$slaveMarket = "LDE", $introType = "bulk", $numSlaves = 10]] |
			<</if>>
			//Slaves optimized and trained for anal.//<<if $LDE.schoolSale == 1>> //@@.yellow;Offering your first purchase at half price this week.@@//<</if>>

			[[The Gymnasium-Academy][$slavesSeen += 1]] |
			<<if $cash > _minimumFive>>
				[[(x5)|Bulk Slave Generate][$slaveMarket = "TGA", $introType = "bulk", $numSlaves = 5]] |
			<</if>>
			<<if $cash > _minimumTen>>
				[[(x10)|Bulk Slave Generate][$slaveMarket = "TGA", $introType = "bulk", $numSlaves = 10]] |
			<</if>>
			//Well trained slaves with dicks.//<<if $TGA.schoolSale == 1>> //@@.yellow;Offering your first purchase at half price this week.@@//<</if>>

			[[The Futanari Sisters][$slavesSeen += 1]] |
			<<if $cash > _minimumFive>>
				[[(x5)|Bulk Slave Generate][$slaveMarket = "TFS", $introType = "bulk", $numSlaves = 5]] |
			<</if>>
			<<if $cash > _minimumTen>>
				[[(x10)|Bulk Slave Generate][$slaveMarket = "TFS", $introType = "bulk", $numSlaves = 10]] |
			<</if>>
			//Highly skilled, highly feminine hermaphrodites.//<<if $TFS.schoolSale == 1>> //@@.yellow;Offering your first purchase at half price this week.@@//<</if>>

	<</if>>

		[[Nueva Universidad de Libertad][$slavesSeen += 1]] |
		<<if $cash > _minimumFive>>
			[[(x5)|Bulk Slave Generate][$slaveMarket = "NUL", $introType = "bulk", $numSlaves = 5]] |
		<</if>>
		<<if $cash > _minimumTen>>
			[[(x10)|Bulk Slave Generate][$slaveMarket = "NUL", $introType = "bulk", $numSlaves = 10]] |
		<</if>>
		//Androgynous slaves lacking genitalia.//<<if $NUL.schoolSale == 1>> //@@.yellow;Offering your first purchase at half price this week.@@//<</if>>

<</if>>

	<<if ($arcologies[0].FSDegradationist != "unset")>>
		//The Slave Shelter does not place slaves into Degradationist arcologies.//
	<<elseif ($shelterAbuse > 10)>>
		//The Slave Shelter has banned you due to dark rumors about you.//
	<<elseif ($shelterAbuse > 5)>>
		//The Slave Shelter has banned you due to rumors that you resell its slaves.//
	<<elseif ($shelterSlaveBought == 1)>>
		>//The Slave Shelter will not offer another slave for placement until next week.//
	<<elseif ($rep > 7000)>>
		[[Take in a shelter slave|Slave Shelter]] | //Presents charity cases for a nominal fee.//
	<</if>>

	<<if ($rep > 8000)>>
		[[Consult the household liquidator|Household Liquidator][$slavesSeen += 2]] | //Offers slaves close to one another at a very high price.//
	<</if>>

<<if ($rep > 10000)>>

[[Place a special order|Custom Slave]] | //Customizable but very expensive.//

[[Place a fulfillment order|JobFulfillmentCenterOrder]] | //Fills leaderships roles for a price.//

<</if>>

<<if ($rep > 12000)>>

[[Attend an auction of a prestigious slave|Prestigious Slave]] | //Variable and expensive.//

<</if>>

<<if ($propOutcome == 1)>>

[[Attend an auction of other Elite's stock|Elite Slave]] | //Limited and very expensive.//

<</if>>

<<if ($rep > 14000)>>

[[Acquire other slaveowners' stock|Special Slave]] | //Variable and expensive.//

<</if>>

	<<if ($rep <= 500)>>
		//You are not reputable enough to buy kidnapped slaves.//
	<<elseif ($rep <= 1000)>>
		//You are not reputable enough to buy recaptured slaves.//
	<<elseif ($rep <= 1500)>>
		//You are not reputable enough to buy indentured servants.//
	<<elseif ($rep <= 2000)>>
		//You are not reputable enough to buy teenaged slaves.//
	<<elseif ($pedo_mode == 1 || ($minimumSlaveAge <= 13 && $minimumSlaveAge <= $fertilityAge)) && ($rep <= 3000)>>
		//You are not reputable enough to buy underaged slaves.//
	<<elseif ($rep <= 4000)>>
		//You are not reputable enough to buy trained slaves.//
	<<elseif ($rep <= 5000)>>
		//You are not reputable enough to buy prison slaves.//
	<<elseif ($rep <= 6000)>>
		//You are not reputable enough to acquire fresh school slaves.//
	<<elseif ($rep <= 7000)>>
		//You are not reputable enough to take in Shelter slaves.//
	<<elseif ($rep <= 8000)>>
		//You are not reputable enough to consult the household liquidator.//
	<<elseif ($rep <= 1000)>>
		//You are not reputable enough to order custom slaves.//
	<<elseif ($rep <= 12000)>>
		//You are not reputable enough to bid on prestigious slaves.//
	<<elseif ($rep <= 14000)>>
		//You are not reputable enough to acquire other slaveowners' stock.//
	<<else>>
		You are so reputable that you can access all of the Free Cities' slaving markets.
	<</if>>

Selling slaves

	While you are at the market, you may want to [[look at your own underperforming slaves|Underperforming Slaves]].

Menial Slaves

	Slave demand is
	<<if $menialDemandFactor <= -35000>>
		@@.red;''extremely low''@@
	<<elseif $menialDemandFactor <= -20000>>
		@@.red;''very low''@@
	<<elseif $menialDemandFactor <= 0>>
		@@.yellow;''weak''@@
	<<elseif $menialDemandFactor >= 35000>>
		@@.green;''extremely high''@@
	<<elseif $menialDemandFactor >= 20000>>
		@@.green;''very high''@@
	<<else>>
		@@.yellow;''strong''@@
	<</if>>
	<<if $deltaDemand > 0>>
		and @@.green;''improving''@@
	<<elseif $deltaDemand < 0>>
		and @@.red;''decreasing''@@
	<</if>>
	<<if $deltaDemand != 0>>
		<<if $demandTimer - $elapsedDemandTimer < 3>>
			but it might change soon
		<</if>>
	<</if>>
	<<if ($cheatMode) && ($cheatModeM)>>

			@@.yellowgreen;Slave Demand@@
			| <<print $menialDemandFactor>>

		<<set _tMenialDemandFactor = $menialDemandFactor>>
		<<textbox "_tMenialDemandFactor" _tMenialDemandFactor>>
		<<link "Apply">>
			<<set $menialDemandFactor = Math.clamp(Math.trunc(Number(_tMenialDemandFactor)),-50000,50000) || $menialDemandFactor, $cheater = 1>>
			<<replace "#menialDemandFactor">>
				@@.yellowgreen; Slave Demand@@
				| <<print $menialDemandFactor>>
			<</replace>>
		<</link>>
	<</if>>

	Slave supply is
	<<if $menialSupplyFactor <= -35000>>
		@@.green;''extremely low''@@
	<<elseif $menialSupplyFactor <= -20000>>
		@@.green;''very low''@@
	<<elseif $menialSupplyFactor <= 0>>
		@@.yellow;''weak''@@
	<<elseif $menialSupplyFactor >= 35000>>
		@@.red;''extremely high''@@
	<<elseif $menialSupplyFactor >= 20000>>
		@@.red;''very high''@@
	<<else>>
		@@.yellow;''strong''@@
	<</if>>
	<<if $deltaSupply > 0>>
		and @@.red;''improving''@@
	<<elseif $deltaSupply < 0>>
		and @@.green;''decreasing''@@
	<</if>>
	<<if $deltaSupply != 0>>
		<<if $supplyTimer - $elapsedDemandTimer < 3>>
			but it might change soon
		<</if>>
	<</if>>
	<<if ($cheatMode) && ($cheatModeM)>>

			@@.yellowgreen;Slave Supply@@
			| <<print $menialSupplyFactor>>

		<<set _tMenialSupplyFactor = $menialSupplyFactor>>
		<<textbox "_tMenialSupplyFactor" _tMenialSupplyFactor>>
		<<link "Apply">>
			<<set $menialSupplyFactor = Math.clamp(Math.trunc(Number(_tMenialSupplyFactor)),-50000,50000) || $menialSupplyFactor, $cheater = 1>>
			<<replace "#menialSupplyFactor">>
				@@.yellowgreen; Slave Supply@@
				| <<print $menialSupplyFactor>>
			<</replace>>
		<</link>>
	<</if>>

	<<= MenialPopCap()>>
	The parts of your arcology you own can house a total of <<= num($PopCap)>> menial slaves.

<<set _menialPrice = menialSlaveCost()>>
<<set _bulkMax = $PopCap-$menials-$fuckdolls-$menialBioreactors>>

	<<if $menials > 1>>
		You own <<print num(Math.trunc($menials))>> menial slaves.
	<<elseif $menials > 0>>
		You own one menial slave.
	<<else>>
		You do not own any menial slaves.
	<</if>>
	The market price of menials is <<print cashFormat(_menialPrice)>>.
	<<set _optionsBreak = 0>>
	<<if _bulkMax > 0 && $cash > _menialPrice>>
		[[Buy|Buy Slaves][$menials+=1,$menialSupplyFactor-=1,cashX(forceNeg(_menialPrice), "menialTransfer")]]
		<<if $cash > (menialSlaveCost(10))*10>>
			[[(x10)|Buy Slaves][$menials+=10,$menialSupplyFactor-=10,cashX(forceNeg((menialSlaveCost(10))*10), "menialTransfer")]]
		<</if>>
		<<if $cash > (menialSlaveCost(100))*100>>
			[[(x100)|Buy Slaves][$menials+=100,$menialSupplyFactor-=100,cashX(forceNeg((menialSlaveCost(100))*100), "menialTransfer")]]
		<</if>>
		<<if $cash > (_menialPrice+1)*2>>
			<<set _menialBulkPremium = Math.trunc(1 + Math.clamp($cash/_menialPrice,0,_bulkMax)/400)>>
			[[(max)|Buy Slaves][$menials+=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax)),cashX(forceNeg(Math.trunc(Math.clamp($cash/(_menialPrice+_menialBulkPremium),0,_bulkMax))*(_menialPrice+_menialBulkPremium)), "menialTransfer")]]
		<</if>>
		//Bulk transactions may require offering a premium.//
		<<set _optionsBreak = 1>>
	<</if>>
	<<if $menials >= 1>>
		<<if _optionsBreak>>|<</if>>
		[[Sell|Buy Slaves][$menials-=1,$menialDemandFactor-=1,cashX(_menialPrice, "menialTransfer")]]
		<<if $menials >= 10>>
			[[(x10)|Buy Slaves][$menials-=10,$menialDemandFactor-=10,cashX(((menialSlaveCost(-10))*10), "menialTransfer")]]
			<<if $menials >= 100>>
				[[(x100)|Buy Slaves][$menials-=100,$menialDemandFactor-=100,cashX(((menialSlaveCost(-100))*100), "menialTransfer")]]
			<</if>>
		<</if>>
		[[(all)|Buy Slaves][cashX(($menials*(menialSlaveCost(-$menials))), "menialTransfer"),$menialDemandFactor-=$menials,$menials = 0]]
		<<if $arcologies[0].FSPaternalist == "unset">>
			<<if $arcadeUpgradeFuckdolls > 0>>
				<<set _fConvertCost = 100>>

					[[Convert to Fuckdoll|Buy Slaves][$menials-=1,$fuckdolls+=1,cashX(forceNeg(_fConvertCost), "menialTransfer")]]
					<<if $menials >= 10>>
						[[(x10)|Buy Slaves][$menials-=10,$fuckdolls+=10,cashX(forceNeg(10*(_fConvertCost)), "menialTransfer")]]
						<<if $menials >= 100>>
							[[(x100)|Buy Slaves][$menials-=100,$fuckdolls+=100,cashX(forceNeg(100*(_fConvertCost)), "menialTransfer")]]
						<</if>>
					<</if>>
					[[(all)|Buy Slaves][$fuckdolls+=$menials,cashX(forceNeg((_fConvertCost)*($menials)), "menialTransfer"),$menials=0]]
					//Conversion costs <<print cashFormat(_fConvertCost)>> each//

			<</if>>
			<<if $dairyFeedersUpgrade > 0>>

					[[Convert to Bioreactor|Buy Slaves][$menials-=1,$menialBioreactors+=1,cashX(-100, "menialTransfer")]]
					<<if $menials >= 10>>
						[[(x10)|Buy Slaves][$menials-=10,$menialBioreactors+=10,cashX(-1000, "menialTransfer")]]
						<<if $menials >= 100>>
							[[(x100)|Buy Slaves][$menials-=100,$menialBioreactors+=100,cashX(-10000, "menialTransfer")]]
						<</if>>
					<</if>>
					[[(all)|Buy Slaves][$menialBioreactors+=$menials,cashX(forceNeg(500*$menials), "menialTransfer"),$menials=0]]
					//Conversion costs <<print cashFormat(500)>> each//

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

	<<if $fuckdolls > 1>>
		You own <<print num(Math.trunc($fuckdolls))>> standard Fuckdolls.
	<<elseif $fuckdolls > 0>>
		You own one standard Fuckdoll.
	<<elseif $arcologies[0].FSPaternalist == "unset">>
		You do not own any standard Fuckdolls.
	<</if>>
	<<if ($fuckdolls > 0) || ($arcologies[0].FSPaternalist == "unset")>>
		The market price of standard Fuckdolls is <<print cashFormat(_menialPrice)>>.
		<<set _optionsBreak = 0>>
		<<if _bulkMax > 0>>
			<<if $arcologies[0].FSPaternalist == "unset" && $cash > _menialPrice>>
				[[Buy|Buy Slaves][$fuckdolls+=1,$menialSupplyFactor-=1,cashX(forceNeg(_menialPrice), "fuckdollsTransfer")]]
				<<if $cash > menialSlaveCost(10)*10>>
					[[(x10)|Buy Slaves][$fuckdolls+=10,$menialSupplyFactor-=10,cashX(forceNeg(menialSlaveCost(10)*10), "fuckdollsTransfer")]]
				<</if>>
				<<if $cash > menialSlaveCost(100)*100>>
					[[(x100)|Buy Slaves][$fuckdolls+=100,$menialSupplyFactor-=100,cashX(forceNeg(menialSlaveCost(100)*100), "fuckdollsTransfer")]]
				<</if>>
				<<if $cash > ((_menialPrice+1)*2)>>
					[[(max)|Buy Slaves][$fuckdolls+=Math.trunc(Math.clamp($cash/_menialPrice,0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/_menialPrice,0,_bulkMax)),cashX(forceNeg(Math.trunc(Math.clamp($cash/_menialPrice,0,_bulkMax))*_menialPrice), "fuckdollsTransfer")]]
				<</if>>
				//Bulk transactions may require offering a premium.//
				<<set _optionsBreak = 1>>
			<</if>>
		<</if>>
		<<if $fuckdolls >= 1>>
			<<if _optionsBreak>>|<</if>>
			[[Sell|Buy Slaves][$fuckdolls-=1,$menialDemandFactor-=1,cashX(_menialPrice, "fuckdollsTransfer")]]
		<<if $fuckdolls >= 10>>
			[[(x10)|Buy Slaves][$fuckdolls-=10,$menialDemandFactor-=10,cashX((menialSlaveCost(-10)*10), "fuckdollsTransfer")]]
			<<if $fuckdolls >= 100>>
				[[(x100)|Buy Slaves][$fuckdolls-=100,$menialDemandFactor-=100,cashX((menialSlaveCost(-100)*100), "fuckdollsTransfer")]]
			<</if>>
		<</if>>
		[[(all)|Buy Slaves][cashX($fuckdolls*(menialSlaveCost(-$fuckdolls)), "fuckdollsTransfer"),$menialDemandFactor-=$fuckdolls,$fuckdolls = 0]]
		<</if>>
	<</if>>

	<<if $menialBioreactors > 1>>
		You own <<print num(Math.trunc($menialBioreactors))>> standard bioreactors.
	<<elseif $menialBioreactors > 0>>
		You own one standard bioreactor.
	<<elseif $arcologies[0].FSPaternalist == "unset">>
		You do not own any standard bioreactors.
	<</if>>
	<<if ($menialBioreactors > 0) || ($arcologies[0].FSPaternalist == "unset")>>
		The market price of standard bioreactors is <<print cashFormat(_menialPrice-100)>>.
		<<set _optionsBreak = 0>>
		<<if _bulkMax > 0>>
			<<if $arcologies[0].FSPaternalist == "unset" && $cash > _menialPrice+100>>
				[[Buy|Buy Slaves][$menialBioreactors+=1,$menialSupplyFactor-=1,cashX(forceNeg(_menialPrice+100), "menialBioreactors")]]
				<<if $cash > (menialSlaveCost(10)-100)*10>>
					[[(x10)|Buy Slaves][$menialBioreactors+=10,$menialSupplyFactor-=10,cashX(forceNeg((menialSlaveCost(10)-100)*10), "menialBioreactors")]]
				<</if>>
				<<if $cash > (menialSlaveCost(100)-100)*100>>
					[[(x100)|Buy Slaves][$menialBioreactors+=100,$menialSupplyFactor-=100,cashX(forceNeg((menialSlaveCost(100)-100)*100), "menialBioreactors")]]
				<</if>>
				<<if $cash > (_menialPrice-99)*2>>
					<<set _bioreactorBulkPremium = Math.trunc(1+ Math.clamp($cash/(_menialPrice-99),0,_bulkMax)/400)>>
					[[(max)|Buy Slaves][$menialBioreactors+=Math.trunc(Math.clamp($cash/(_menialPrice-99+_bioreactorBulkPremium),0,_bulkMax)),$menialSupplyFactor-=Math.trunc(Math.clamp($cash/(_menialPrice-99+_bioreactorBulkPremium),0,_bulkMax)),cashX(forceNeg(Math.trunc(Math.clamp($cash/(_menialPrice-99+_bioreactorBulkPremium),0,_bulkMax))*(_menialPrice-99+_bioreactorBulkPremium)), "menialBioreactors")]]
				<</if>>
				//Bulk transactions may require offering a premium.//
				<<set _optionsBreak = 1>>
			<</if>>
		<</if>>
		<<if $menialBioreactors >= 1>>
			<<if _optionsBreak>>|<</if>>
			[[Sell|Buy Slaves][$menialBioreactors-=1,$menialDemandFactor-=1,cashX((_menialPrice-100), "menialBioreactors")]]
			<<if $menialBioreactors >= 10>>
				[[(x10)|Buy Slaves][$menialBioreactors-=10,$menialDemandFactor-=10,cashX(((menialSlaveCost(-10)-100)*10), "menialBioreactors")]]
				<<if $menialBioreactors >= 100>>
					[[(x100)|Buy Slaves][$menialBioreactors-=100,$menialDemandFactor-=100,cashX(((menialSlaveCost(-100)-100)*100), "menialBioreactors")]]
				<</if>>
			<</if>>
			[[(all)|Buy Slaves][cashX(($menialBioreactors*(menialSlaveCost(-$menialBioreactors)-100)), "menialBioreactors"),$menialDemandFactor-=$menialBioreactors,$menialBioreactors = 0]]
		<</if>>
	<</if>>


code:
:: Cellblock [nobr jump-to-safe jump-from-safe]

<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Cellblock", $encyclopedia = "Cellblock", _CL = App.Entity.facilities.cellblock.employeesIDs().size>>

<<if $cellblockName != "the Cellblock">>
	<<set $cellblockNameCaps = $cellblockName.replace("the ", "The ")>>
<</if>>

	$cellblockNameCaps
	<<switch $cellblockDecoration>>
		<<case "Roman Revivalist">>
			is designed to resemble the holding pens beneath the old Coliseum. Whenever there's a fight in the arcology, screens in each cell helpfully keep inmates informed of what awaits (otherwise) useless slaves.
		<<case "Aztec Revivalist">>
			is designed to frighten the prisoners to submission. All the cells look to the center of the facility, where a sacrificial altar stands, adorned with ceremonial <<if $arcologies[0].FSPaternalist != "unset">>ropes and penetrators<<else>>knives, ropes and blunt instruments<</if>>.
		<<case "Egyptian Revivalist">>
			uses the climate of Egypt as an additional source of discomfort. The air here is hot and dry, and inmates can easily imagine themselves confined in mud brick cells in a baking desert.
		<<case "Edo Revivalist">>
			is furnished in a severely medieval Japanese style. There is one refinement, but it's of exquisite cruelty. At the end of the hall, there's a fountain with a traditional bamboo boar scarer. As it fills with water, it tips against a stone with a thunk... thunk... thunk... thunk...
		<<case "Arabian Revivalist">>
			is furnished as imagined Arabian slave pens, all set around a central pillar. This pillar is capped by shackles, so that slaves can be bound by their hands and whipped on the backs, buttocks, and thighs in clear view of all their fellow chattel.
		<<case "Chinese Revivalist">>
			is furnished in a severely medieval Chinese style. There is one refinement, but it's of exquisite cruelty. Somewhere out of sight, water is dripping into an urn, drop by drop... drop... drop... drop...
		<<case "Chattel Religionist">>
			is built of cold stone. Most of the cells are unfurnished little cubes inside which the only bed is the bare floor. A few are smaller still, so that the inmates can neither stand nor lie flat.
		<<case "Degradationist">>
			is a nightmare. Everything is made of metal, and almost everything menaces with spikes of steel. Inmates must carefully avoid the walls of their own cells if they wish to avoid being stabbed.
		<<case "Asset Expansionist">>
			is a straightforward prison, with one exception. Each cell features a screen displaying plans for its inmate's expansion. Day and night, inmates are confronted with the sight of themselves transformed.
		<<case "Transformation Fetishist">>
			is a straightforward prison, with one exception. Each cell features a screen displaying plans for its inmate's expansion. Day and night, inmates are confronted with the sight of themselves transformed.
		<<case "Gender Radicalist">>
			is a straightforward prison, with one exception. Each cell features a screen displaying plans for its inmate's bimbofication. Day and night, inmates are confronted with the sight of themselves dyed, pierced, tattooed, gaped, filled with implants, or all of these.
		<<case "Gender Fundamentalist">>
			is a block of barred cells whose sides, offering a clear view of the whole prison, provide much menace. Anyone who abuses an inmate does so in full view of every other slave here, keeping the jailbirds in a state of constant fear that they're next.
		<<case "Physical Idealist">>
			is a block of barred cells whose sides, offering a clear view of the whole prison, provide much menace. Anyone who rapes an inmate does so in full view of every other slave here, keeping the bitches in a state of constant fear that their asses are next.
		<<case "Supremacist">>
			is a straightforward prison whose menace is provided by context that, although subtle, adds up to a nightmare. Everyone outside the cells is $arcologies[0].FSSupremacistRace, and everyone inside them is not. The darkness of history is palpable here.
		<<case "Subjugationist">>
			is a straightforward prison whose menace is provided by context that, although subtle, adds up to a nightmare. The inmates inside the cells are $arcologies[0].FSSubjugationistRace, and everyone outside them is not. The darkness of history is palpable here.
		<<case "Repopulation Focus">>
			is a straightforward prison, with two exceptions. One cell style features a screen displaying plans for its inmate's impregnation, the other is covered with mirrors for its inmate to watch her pregnancy grow. Day and night, inmates are confronted with the sight of themselves transformed.
		<<case "Eugenics">>
			is designed to make very clear to its inmates that they are subhuman. Many screens showcasing their inadequacy intermingled with propaganda play on nonstop loops.
		<<case "Paternalist">>
			is a prison, but a modern and scientific one. The cells, the common areas, and even the color of the walls are all carefully designed to communicate the feeling that inmates can better themselves.
		<<case "Pastoralist">>
			requires its inmates to drink as much breast milk as they can hold. This sounds like a small thing, but for an unbroken slave, conquering the revulsion of drinking another slave's milk is an important step.
		<<case "Maturity Preferentialist">>
			is subtly designed to make very clear to its inmates that they are sex objects. Many screens showing pornography make it clear to the maturest slave here that they're still an object of lust, and will be used to slake others' pleasure.
		<<case "Youth Preferentialist">>
			is subtly designed to make the breadth of sex acts performed in the arcology clear to its inmates. A cacophony of pornography makes clear to the most innocent inmate that <<if $seeDicks != 100>>her pussy is a fuck hole, <</if>>her mouth is a fuck hole, her anus is a fuck hole, and, in fact, <<if $seeDicks != 100>>all three<<else>>both<</if>> can be fuck holes at once.
		<<case "Body Purist">>
			requires its inmates to drink as much filtered water as they can, all the time. This sounds like a petty thing, but most inmates are very aware that they're being flushed out. Cleaned. It is an oddly menacing thought.
		<<case "Slimness Enthusiast">>
			is torture for chubby slaves. Fat bitches that pass through here soon learn that they're going to be slim and pretty one day, but that it isn't going to be much fun getting there.
		<<case "Hedonistic">>
			is torture for thin slaves. The first thing they notice is the heavily reinforced cot they will reside upon. The second is the feeding tube that will be anchored in their stomach for the duration of their stay. Slaves imprisoned here will have their body stuffed to capacity with concentrated slave food, ensuring a plump, docile slave by the end of their sentence.
		<<case "Intellectual Dependency">>
			is a straightforward prison, with one exception. Each cell comes equipped with sound dampening shutters so slaves may be cut off from all outside stimulation. They are forced to be alone with their thoughts for most of their stay.
		<<case "Slave Professionalism">>
			is torture for dumb slaves. Everything in the cell is a puzzle, from the food dispenser to the cot cover. Slaves are frequently rotated so that they may never become accustomed to any solutions.
		<<case "Petite Admiration">>
			is designed to make tall slaves know they are unwelcome. What amounts a basic prison for a short slave is positively torturous when one is far too large to even move in it.
		<<case "Statuesque Glorification">>
			is designed to make short slaves know they are unwelcome. Where a tall slave will find nothing more than a standard cell, the vertically challenged while will find an insurmountable trial designed to teach them their place.
		<<default>>
			could be mistaken for a modern prison. A close inspection, however, reveals restraints in each cell that will hold inmates in sexually compromising positions, and compliance systems to force them to place their wrists and ankles in them.
	<</switch>>

	<<if _CL > 2>>
		$cellblockNameCaps is full of slaves, though it's difficult to tell at first. In many of the cells, a scene of loneliness and misery may be witnessed, but not one sound escapes them in fear of the punishment that would follow.
	<<elseif _CL > 0>>
		$cellblockNameCaps holds a few slaves, though it's difficult to tell at first. In several of the cells, a scene of loneliness and misery may be witnessed, but not one sound escapes them in fear of the punishment that would follow.
	<<elseif _S.Wardeness>>
		_S.Wardeness.slaveName is alone in the cellblock, and seems rather lonely without anyone to oppress.
	<<else>>
		None of your slaves are confined in the cellblock.

			[[Decommission the cellblock|Main][$cellblock = 0, $cellblockDecoration = "standard", $cellblockUpgrade = 0]]

	<</if>>

<<if _CL > 0>>
	<<includeDOM removeFacilityWorkers("cellblock", "rest", "stay confined")>>
<</if>>

	<<set _Tmult0 = Math.trunc($cellblock*1000*$upgradeMultiplierArcology)>>
	$cellblockNameCaps has room for $cellblock slaves to be kept in close confinement.
	There <<if _CL == 1>>is<<else>>are<</if>> currently _CL slaves<<if _CL != 1>>s<</if>> kept in close confinement in $cellblockName.

		[[Expand the cellblock|Cellblock][cashX(forceNeg(_Tmult0), "capEx"), $cellblock += 5, $PC.skill.engineering += .1]]

			Costs <<print cashFormat(_Tmult0)>>

	<<if $cellblockUpgrade == 1>>
		Its compliance systems have been upgraded to allow slaves no mental respite, painstakingly correcting the tiniest misbehaviors to soften flaws into quirks at the cost of considerable anguish to inmates denied any rest from correction.
	<<else>>
		<<set _Tmult1 = Math.trunc(20000*$upgradeMultiplierArcology*$HackingSkillMultiplier)>>
		Its compliance systems are standard.

			[[Upgrade them to soften slave flaws|Cellblock][cashX(forceNeg(_Tmult1), "capEx"), $cellblockUpgrade = 1, $PC.skill.engineering += 0.1, $PC.skill.hacking += 0.1]]

				Costs <<print cashFormat(_Tmult1)>>

	<</if>>

	<<if _S.Wardeness && canPenetrate(_S.Wardeness)>>
		<<setLocalPronouns _S.Wardeness>>
		<<if $cellblockWardenCumsInside == 1>>
			_S.Wardeness.slaveName is permitted to cum inside $his inmates when $he disciplines them.

				<<link "Forbid $him from cumming inside" "Cellblock">>
					<<set $cellblockWardenCumsInside = 0>>
				<</link>>

		<<else>>
			_S.Wardeness.slaveName is not permitted to cum inside $his inmates.

				<<link "Let $him cum inside" "Cellblock">>
					<<set $cellblockWardenCumsInside = 1>>
				<</link>>

					May result in pregnancies

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

	<<includeDOM App.UI.SlaveList.stdFacilityPage(App.Entity.facilities.cellblock)>>

	Rename $cellblockName: <<textbox "$cellblockName" $cellblockName "Cellblock">>

		Use a noun or similar short phrase

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


code:
:: Cellblock Report [nobr]

<<set _slaves = App.Utils.sortedEmployees(App.Entity.facilities.cellblock)>>
<<set _DL = _slaves.length, _SL = $slaves.length, _brokenSlaves = 0, _idleBonus = 0, _softenedQuirks = 0, _trustMalus = 0, _FLsFetish = 0>>

<<if $cellblockDecoration != "standard">>
	<<set _devBonus = 1>>
<<else>>
	<<set _devBonus = 0>>
<</if>>

<<if (_S.Wardeness)>>
	<<setLocalPronouns _S.Wardeness>>

	<<if (_S.Wardeness.health.condition < -80)>>
		<<run improveCondition(_S.Wardeness, 20)>>
	<<elseif (_S.Wardeness.health.condition < -40)>>
		<<run improveCondition(_S.Wardeness, 15)>>
	<<elseif (_S.Wardeness.health.condition < 0)>>
		<<run improveCondition(_S.Wardeness, 10)>>
	<<elseif (_S.Wardeness.health.condition < 90)>>
		<<run improveCondition(_S.Wardeness, 7)>>
	<</if>>
	<<if (_S.Wardeness.devotion <= 60)>>
		<<set _S.Wardeness.devotion += 2>>
	<</if>>
	<<set _S.Wardeness.devotion += _devBonus>>
	<<if _S.Wardeness.trust < 60>>
		<<set _S.Wardeness.trust += 3>>
	<</if>>
	<<if (_S.Wardeness.rules.living != "luxurious")>>
		<<set _S.Wardeness.rules.living = "luxurious">>
	<</if>>
	<<if _S.Wardeness.fetishStrength <= 95>>
		<<if _S.Wardeness.fetish != "sadist">>
			<<if fetishChangeChance(_S.Wardeness) > random(0,100)>>
				<<set _FLsFetish = 1, _S.Wardeness.fetishKnown = 1, _S.Wardeness.fetish = "sadist">>
			<</if>>
		<<elseif _S.Wardeness.fetishKnown == 0>>
			<<set _FLsFetish = 1, _S.Wardeness.fetishKnown = 1>>
		<<else>>
			<<set _FLsFetish = 2, _S.Wardeness.fetishStrength += 4>>
		<</if>>
	<</if>>
	<<if (_S.Wardeness.energy > 95) || (_S.Wardeness.fetish == "sadist")>>
		<<set _devBonus++, _trustMalus++, _idleBonus++>>
	<</if>>
	    <<= SlaveFullName(_S.Wardeness)>> is serving as the Wardeness.
	<<if _S.Wardeness.relationship == -3 && _S.Wardeness.devotion > 50>>
		<<set _devBonus++, _trustMalus++, _idleBonus++>>
		As your $wife, $he tries $his best to break the disobedient slaves to your will.
	<</if>>
	<<if (_FLsFetish == 1)>>
		One day $he demands obedience. The next day $he strikes a slave when it isn't given. The next, $he seems more excited than embarrassed when beating a prisoner. Soon, $he's looking for an excuse to punish. $He's @@.pink;become more of a sadist.@@
	<<elseif (_FLsFetish == 2)>>
		Being not only allowed but encouraged to get off while punishing prisoners @@.lightsalmon;deepens $his sadism.@@
	<</if>>
	<<if setup.wardenessCareers.includes(_S.Wardeness.career)>>
		<<set _devBonus++, _trustMalus++, _idleBonus++>>
		$He has experience with detecting security issues and grinding down potential miscreants from $his life before $he was a slave, making $him more effective.
	<<elseif _S.Wardeness.skill.wardeness >= $masteredXP>>
		<<set _devBonus++, _trustMalus++, _idleBonus++>>
		$He has experience with detecting security issues and grinding down potential miscreants from working for you, making $him more effective.
	<<else>>
		<<set _S.Wardeness.skill.wardeness += random(1,Math.ceil((_S.Wardeness.intelligence+_S.Wardeness.intelligenceImplant)/15) + 8)>>
	<</if>>
	<<if _S.Wardeness.fetish == "sadist">>
		$He uses the prisoners to gratify $his sadism, terrifying them and quickly breaking their resistance.
	<<elseif _S.Wardeness.energy > 95>>
		$He is so sexually depraved that $he constantly molests the prisoners, breaking them to a life of servitude.
	<</if>>
	<<if _S.Wardeness.sexualFlaw == "malicious" || _S.Wardeness.sexualFlaw == "abusive">>
		<<set _devBonus++, _trustMalus += 2, _idleBonus += 2>>
		Sexual abuse of prisoners has become an end for $him, not a means. $He inspires $his prisoners to do everything possible to qualify to get away from $him, even as $he slowly grinds away their interest in sex to do it.
	<<elseif _S.Wardeness.sexualQuirk == "caring">>
		<<set _devBonus--, _trustMalus--, _idleBonus-->>
		$His kindness sometimes shows through $his tough facade, letting prisoners get off easier than they should.
	<</if>>
	<<if (_S.Wardeness.dick > 2) && (canPenetrate(_S.Wardeness))>>
		<<set _devBonus++, _trustMalus++, _idleBonus++>>
		$His molestation of the prisoners is more varied and effective because $he has a dick to fuck them with.
	<</if>>
	<<if (_S.Wardeness.muscles > 35)>>
		<<set _devBonus++, _trustMalus++, _idleBonus++>>
		$He is strong enough to restrain anyone that tries anything with $his own hands.
	<</if>>
	<<if (_S.Wardeness.devotion > 95)>>
		<<set _devBonus++, _trustMalus++, _idleBonus++>>
		$His devotion to you is so absolute that $he sees breaking bitches for your service as a noble calling.
	<</if>>
	<<for _slave range _slaves>>
		<<if _S.Wardeness.rivalryTarget == _slave.ID>>
			$He greatly enjoys breaking $his <<print rivalryTerm(_S.Wardeness)>>, _slave.slaveName's will.
			<<set _slave.devotion++, _slave.trust -= 3>>
			<<if random(1,100) > 30>>
				<<set _S.Wardeness.rivalry++, _slave.rivalry++>>
			<</if>>
		<<elseif _S.Wardeness.relationshipTarget == _slave.ID>>
			$He hates having to break $his <<print relationshipTerm(_S.Wardeness)>>, _slave.slaveName, but $his devotion to you wins out in the end.
			<<set _slave.devotion++, _slave.trust -= 3>>
			<<if random(1,100) >= 50>>
				$His and _slave.slaveName's relationship has been shattered by these events.
				<<set _S.Wardeness.relationship = 0, _S.Wardeness.relationshipTarget = 0 _slave.relationship = 0, _slave.relationshipTarget = 0>>
			<</if>>
		<<elseif areRelated(_S.Wardeness, _slave)>>
			<<setLocalPronouns _slave 2>>
			$He shows $his <<print relativeTerm(_S.Wardeness,_slave)>> _slave.slaveName no mercy, making sure _he2 understands _his2 place.
			<<set _slave.devotion++, _slave.trust-->>
		<</if>>
	<</for>>
	<<if (_DL < $cellblock)>>
		<<set _seed = random(1,10)+(($cellblock-_DL)*(random(150,170)+(_idleBonus*10)))>>
		<<run cashX(_seed, "cellblock", _S.Wardeness)>>

    Since $he doesn't have enough prisoners to manage to keep $him busy, $he works on citizens' slaves, earning @@.yellowgreen;<<print cashFormat(_seed)>>.@@
	<</if>>
	<<if (_DL > 0)>>

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

<<if (_DL > 0)>>
	    <<if (_DL == 1)>>''One slave is being confined in $cellblockName until they are willing to obey.''<<else>>''_DL slaves are being confined in $cellblockName until they are willing to obey.''<</if>>
<</if>>

<<if (_S.Wardeness)>>
	<<set $i = $slaveIndices[$WardenessID]>> /* apply following SA passages to facility leader */
	<<if $showEWD != 0>>

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

			<<= SlaveArt(_S.Wardeness, 0, 0)>>

		<</if>>
		/* 000-250-006 */
		<<= SlaveFullName($slaves[$i])>> is serving as the Wardeness in $cellblockName.

		<<= App.SlaveAssignment.choosesOwnClothes($slaves[$i])>>
		<<run tired($slaves[$i])>>
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<= App.SlaveAssignment.drugs($slaves[$i])>>
		<<= App.SlaveAssignment.relationships($slaves[$i])>>
		<<= App.SlaveAssignment.rivalries($slaves[$i])>>

    <<= App.SlaveAssignment.devotion($slaves[$i])>>
	<<else>>
		<<silently>>
		<<run App.SlaveAssignment.choosesOwnClothes($slaves[$i])>>
		<<run tired($slaves[$i])>>
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<run App.SlaveAssignment.drugs($slaves[$i])>>
		<<run App.SlaveAssignment.relationships($slaves[$i])>>
		<<run App.SlaveAssignment.rivalries($slaves[$i])>>
		<<run App.SlaveAssignment.devotion($slaves[$i])>>
		<</silently>>
	<</if>>
<</if>>

<<for _slave range _slaves>>
	<<set $i = $slaveIndices[_slave.ID]>>
	<<setLocalPronouns _slave>>
	<<if (_slave.devotion <= 20)>>
		<<if (_slave.trust >= -20)>>
			<<if ((_slave.hears == -1 && _slave.earwear != "hearing aids") || (_slave.hears == 0 && _slave.earwear == "muffling ear plugs") ||(_slave.hears == -2))>>
				<<set _slave.devotion -= 2, _slave.trust -= 2>>
			<<else>>
				<<set _slave.devotion -= 4, _slave.trust -= 4>>
			<</if>>
		<<else>>
			<<set _slave.devotion++>>
		<</if>>
	<</if>>
	<<switch $cellblockDecoration>>
	<<case "Paternalist">>
		<<set _slave.rules.living = "normal">>
		<<if (_slave.inflation > 0)>>
			<<run deflate(_slave)>>
		<</if>>
	<<case "Pastoralist">>
		<<set _slave.rules.living = "spare">>
		<<if _slave.inflation == 0>>
			<<if _slave.pregKnown == 0 && _slave.bellyImplant < 1500>>
				<<set _slave.inflation = 2, _slave.inflationType = "milk", _slave.inflationMethod = 1>>
			<<else>>
				<<set _slave.inflation = 1, _slave.inflationType = "milk", _slave.inflationMethod = 1>>
			<</if>>
			<<run SetBellySize(_slave)>>
		<</if>>
	<<case "Hedonistic">>
		<<set _slave.rules.living = "spare">>
		<<if _slave.weight < 200>>
			<<if _slave.weightDirection == 1>>
				<<set _slave.weight += 5>>
			<<elseif _slave.weightDirection == -1>>
				<<set _slave.weight += 1>>
			<<else>>
				<<set _slave.weight += 3>>
			<</if>>
		<</if>>
		<<if _slave.muscles > -100>>
			<<set _slave.muscles -= 2>>
		<</if>>
		<<if _slave.inflation == 0>>
			<<if _slave.pregKnown == 0 && _slave.bellyImplant < 1500>>
				<<set _slave.inflation = 3, _slave.inflationType = "food", _slave.inflationMethod = 1>>
			<<else>>
				<<set _slave.inflation = 1, _slave.inflationType = "food", _slave.inflationMethod = 1>>
			<</if>>
			<<run SetBellySize(_slave)>>
		<</if>>
	<<default>>
		<<set _slave.rules.living = "spare">>
		<<if (_slave.inflation > 0)>>
			<<run deflate(_slave)>>
		<</if>>
	<</switch>>
	<<if $cellblockUpgrade == 1>>
		<<if (_slave.behavioralFlaw != "none") && (_slave.behavioralQuirk == "none")>>
			<<run SoftenBehavioralFlaw(_slave)>>
			<<set _slave.devotion -= 10, _softenedQuirks++>>
		<<elseif (_slave.sexualFlaw != "none") && (_slave.sexualQuirk == "none")>>
			<<run SoftenSexualFlaw(_slave)>>
			<<set _slave.devotion -= 10, _softenedQuirks++>>
		<</if>>
	<</if>>
	<<set _slave.devotion += _devBonus, _slave.trust -= _trustMalus>>
	<<if (_S.Wardeness) && (_S.Wardeness.sexualFlaw == "malicious") && (_slave.energy >= 2)>>
		<<set _slave.energy -= 2>>
	<</if>>
	<<if (_slave.health.condition < -80)>>
		<<run improveCondition(_slave, 20)>>
	<<elseif (_slave.health.condition < -40)>>
		<<run improveCondition(_slave, 15)>>
	<<elseif (_slave.health.condition < 0)>>
		<<run improveCondition(_slave, 10)>>
	<<elseif (_slave.health.condition < 40)>>
		<<run improveCondition(_slave, 7)>>
	<<elseif (_slave.health.condition < 100)>>
		<<run improveCondition(_slave, 3)>>
	<</if>>
	<<if $showEWD != 0>>

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

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

		<</if>>
		/* 000-250-006 */
		<<= SlaveFullName(_slave)>>
		<<if _slave.choosesOwnAssignment == 2>>
			<<= App.SlaveAssignment.choosesOwnJob(_slave)>>
		<<else>>
			is confined in $cellblockName.
		<</if>>

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

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

    <<= App.SlaveAssignment.devotion(_slave)>>
	<<else>>
		<<silently>>
		<<run App.SlaveAssignment.choosesOwnJob(_slave)>>
		<<run App.SlaveAssignment.stayConfined(_slave)>>
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<run App.SlaveAssignment.drugs(_slave)>>
		<<run App.SlaveAssignment.relationships(_slave)>>
		<<run App.SlaveAssignment.rivalries(_slave)>>
		<<run App.SlaveAssignment.devotion(_slave)>>
		<</silently>>
	<</if>>
<</for>>
<<if (_softenedQuirks) || (_brokenSlaves)>>

	<<if (_softenedQuirks > 0)>>
		$cellblockNameCaps's advanced compliance systems successfully softened
		<<if (_softenedQuirks == 1)>>
			one slave's mental flaw into an @@.green;appealing quirk,@@ though the constant correction caused them @@.mediumorchid;considerable anguish.@@
		<<else>>
			_softenedQuirks slaves' mental flaws into @@.green;appealing quirks,@@ though the constant correction caused them @@.mediumorchid;considerable anguish.@@
		<</if>>
	<</if>>
	<<if (_brokenSlaves > 0)>>
		<<if (_brokenSlaves == 1)>>
			One slave is now willing to @@.hotpink;do as they're told@@ and has been released.
		<<else>>
			_brokenSlaves slaves are now willing to @@.hotpink;do as they're told@@ and have been released.
		<</if>>
		<<if $cellblockDecoration != "standard">>

    $cellblockNameCaps's $cellblockDecoration atmosphere @@.hotpink;had an impact on them while they were@@ imprisoned.
		<</if>>
	<</if>>
<</if>>
<<if _DL > 0 || _S.Wardeness>>

<</if>>


code:
:: Change Language [nobr jump-from-safe]

<<set $nextButton = "Confirm changes">>
<<set $nextLink = "Main">>

<<set _revivalistLanguage = 0>>
<<if $arcologies[0].FSRomanRevivalist != "unset">>
	<<set _revivalistLanguage = "Latin">>
<<elseif $arcologies[0].FSAztecRevivalist != "unset">>
	<<set _revivalistLanguage = "Nahuatl">>
<<elseif $arcologies[0].FSEgyptianRevivalist != "unset">>
	<<set _revivalistLanguage = "Ancient Egyptian">>
<<elseif $arcologies[0].FSEdoRevivalist != "unset">>
	<<set _revivalistLanguage = "Japanese">>
<<elseif $arcologies[0].FSArabianRevivalist != "unset">>
	<<set _revivalistLanguage = "Arabic">>
<<elseif $arcologies[0].FSChineseRevivalist != "unset">>
	<<set _revivalistLanguage = "Chinese">>
<</if>>

The lingua franca of the arcology is ''$language''.

//Changing the lingua franca of the arcology is a difficult process. Doing so will slightly reduce the arcology's prosperity due to the difficulty changing languages will impose on businesses. It will also cost <<print cashFormat(500)>> for each mentally competent slave you own, since it will be necessary to build time into their schedules for them to learn basic commands in the new language. Slaves' starting fluency in the new language will depend on their intelligence, nationality, education, and in some cases, ethnicity. Previous linguistic experience will not be saved, meaning that repeated language changes will wipe out slaves' previous language skills.//

Select a custom language to be applied: <<textbox "$seed" $seed "Change Language">> //A single capitalized word is recommended.//

<<if $language != "English">>

<<link "English">>
	<<replace "#result">>
	<<set $language = "English">>
	<<set $arcologies[0].prosperity = Math.trunc(0.9*$arcologies[0].prosperity)>>
	<<for _cl = 0; _cl < $slaves.length; _cl++>>
		<<if $slaves[_cl].fetish != "mindbroken">>
			<<run nationalityToAccent($slaves[_cl])>>
			<<if ($slaves[_cl].accent >= 3)>>
				<<if ($slaves[_cl].intelligence+$slaves[_cl].intelligenceImplant+100) > random(0,100)>>
					<<set $slaves[_cl].accent -= 1>>
				<</if>>
			<</if>>
			<<run cashX(-500, "capEx")>>
		<</if>>
	<</for>>

//Language changed to $language.//
	<</replace>>
	<</link>>
<</if>>
<<if $language != "Spanish">>

<<link "Spanish">>
	<<replace "#result">>
	<<set $language = "Spanish">>
	<<set $arcologies[0].prosperity = Math.trunc(0.9*$arcologies[0].prosperity)>>
	<<for _cl = 0; _cl < $slaves.length; _cl++>>
		<<if $slaves[_cl].fetish != "mindbroken">>
			<<run nationalityToAccent($slaves[_cl])>>
			<<if ($slaves[_cl].accent >= 3)>>
				<<if ($slaves[_cl].intelligence+$slaves[_cl].intelligenceImplant+100) > random(0,100)>>
					<<set $slaves[_cl].accent -= 1>>
				<</if>>
			<</if>>
			<<run cashX(-500, "capEx")>>
		<</if>>
	<</for>>

//Language changed to $language.//
	<</replace>>
	<</link>>
<</if>>
<<if $language != "Portuguese">>

<<link "Portuguese">>
	<<replace "#result">>
	<<set $language = "Portuguese">>
	<<set $arcologies[0].prosperity = Math.trunc(0.9*$arcologies[0].prosperity)>>
	<<for _cl = 0; _cl < $slaves.length; _cl++>>
		<<if $slaves[_cl].fetish != "mindbroken">>
			<<run nationalityToAccent($slaves[_cl])>>
			<<if ($slaves[_cl].accent >= 3)>>
				<<if ($slaves[_cl].intelligence+$slaves[_cl].intelligenceImplant+100) > random(0,100)>>
					<<set $slaves[_cl].accent -= 1>>
				<</if>>
			<</if>>
			<<run cashX(-500, "capEx")>>
		<</if>>
	<</for>>

//Language changed to $language.//
	<</replace>>
	<</link>>
<</if>>
<<if $language != "Arabic">>

<<link "Arabic">>
	<<replace "#result">>
	<<set $language = "Arabic">>
	<<set $arcologies[0].prosperity = Math.trunc(0.9*$arcologies[0].prosperity)>>
	<<for _cl = 0; _cl < $slaves.length; _cl++>>
		<<if $slaves[_cl].fetish != "mindbroken">>
			<<run nationalityToAccent($slaves[_cl])>>
			<<if ($slaves[_cl].accent >= 3)>>
				<<if ($slaves[_cl].intelligence+$slaves[_cl].intelligenceImplant+100) > random(0,100)>>
					<<set $slaves[_cl].accent -= 1>>
				<</if>>
			<</if>>
			<<run cashX(-500, "capEx")>>
		<</if>>
	<</for>>

//Language changed to $language.//
	<</replace>>
	<</link>>
<</if>>
<<if $language != "Chinese">>

<<link "Chinese">>
	<<replace "#result">>
	<<set $language = "Chinese">>
	<<set $arcologies[0].prosperity = Math.trunc(0.9*$arcologies[0].prosperity)>>
	<<for _cl = 0; _cl < $slaves.length; _cl++>>
		<<if $slaves[_cl].fetish != "mindbroken">>
			<<run nationalityToAccent($slaves[_cl])>>
			<<if ($slaves[_cl].accent >= 3)>>
				<<if ($slaves[_cl].intelligence+$slaves[_cl].intelligenceImplant+100) > random(0,100)>>
					<<set $slaves[_cl].accent -= 1>>
				<</if>>
			<</if>>
			<<run cashX(-500, "capEx")>>
		<</if>>
	<</for>>

//Language changed to $language.//
	<</replace>>
	<</link>>
<</if>>
<<if $language != $seed>>

<<link "Apply custom language">>
	<<replace "#result">>
	<<set $language = $seed>>
	<<set $arcologies[0].prosperity = Math.trunc(0.9*$arcologies[0].prosperity)>>
	<<for _cl = 0; _cl < $slaves.length; _cl++>>
		<<if $slaves[_cl].fetish != "mindbroken">>
			<<run nationalityToAccent($slaves[_cl])>>
			<<if ($slaves[_cl].accent >= 3)>>
				<<if ($slaves[_cl].intelligence+$slaves[_cl].intelligenceImplant+100) > random(0,100)>>
					<<set $slaves[_cl].accent -= 1>>
				<</if>>
			<</if>>
			<<run cashX(-500, "capEx")>>
		<</if>>
	<</for>>

//Language changed to $language.//
	<</replace>>
	<</link>>
<</if>>
<<if _revivalistLanguage != 0 && $language != _revivalistLanguage>>

<<link "Match language to Revivalist future society">>
	<<replace "#result">>
	<<set $language = _revivalistLanguage>>
	<<set $arcologies[0].prosperity = Math.trunc(0.9*$arcologies[0].prosperity)>>
	<<for _cl = 0; _cl < $slaves.length; _cl++>>
		<<if $slaves[_cl].fetish != "mindbroken">>
			<<run nationalityToAccent($slaves[_cl])>>
			<<if ($slaves[_cl].accent >= 3)>>
				<<if ($slaves[_cl].intelligence+$slaves[_cl].intelligenceImplant+100) > random(0,100)>>
					<<set $slaves[_cl].accent -= 1>>
				<</if>>
			<</if>>
			<<run cashX(-500, "capEx")>>
		<</if>>
	<</for>>

//Language changed to $language.//
	<</replace>>
	<</link>> //Failing to take this step will retard adoption of Revivalism//
<</if>>


code:
:: Clinic [nobr jump-to-safe jump-from-safe]

<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Clinic", $encyclopedia = "Clinic", _CL = App.Entity.facilities.clinic.employeesIDs().size>>

<<if $clinicName != "the Clinic">>
	<<set $clinicNameCaps = $clinicName.replace("the ", "The ")>>
<</if>>

	$clinicNameCaps
	<<switch $clinicDecoration>>
		<<case "Roman Revivalist">>
			is open and airy; a breeze wafts through the space, and Roman theories on natural cleanliness are very much on display.
		<<case "Aztec Revivalist">>
			is open and airy; a light hint of herbs and natural oil permeates the air. Everything is incredibly sterile, especially the blood management equipment.
		<<case "Egyptian Revivalist">>
			is open and airy; clean rushes are strewn across the floor, making a gentle susurration when anyone crosses the space.
		<<case "Edo Revivalist">>
			is clean and spartan to the point of featurelessness. Spotless tatami mats cover the floor, and partitions divide the space into cubicles.
		<<case "Arabian Revivalist">>
			is open and airy; a thin trail of smoke wafts through the space on a gentle breeze, coming from a brazier burning incense.
		<<case "Chinese Revivalist">>
			is open and airy; a thin trail of smoke wafts through the space on a gentle breeze, coming from a brazier burning medicinal herbs.
		<<case "Chattel Religionist">>
			is open and airy; shaded beams of sunlight shine through skylights to bathe each bed in a pool of healing warmth.
		<<case "Degradationist">>
			is clean and cold, all scrubbed tile and cool steel. The beds have prominent restraint attachment points to force patients into any position desired.
		<<case "Repopulation Focus">>
			is warm and inviting, with wide corridors and ample seating for its pregnant clientèle. All the equipment is designed to accommodate heavily pregnant women.
		<<case "Eugenics">>
			is warm and inviting on one side, cold and utilitarian on the other. Only the toys of the elite are allowed the best of care.
		<<case "Asset Expansionist">>
			is utilitarian, without any concession to style. Every available <<if $showInches == 2>>inch<<else>>centimeter<</if>> of space is used for equipment specialized to support growth.
		<<case "Transformation Fetishist">>
			is utilitarian, without any concession to style. Every available <<if $showInches == 2>>inch<<else>>centimeter<</if>> of space is used for equipment specialized to support radical surgery.
		<<case "Gender Radicalist">>
			is comfortable and feminine. Its curving walls and soft colors are designed to present slaves coming out of anesthesia with an impression of girlishness.
		<<case "Gender Fundamentalist">>
			is comfortable and feminine. Its curving walls and soft colors are designed to keep slaves here for their female health nice and comfortable.
		<<case "Physical Idealist">>
			is utilitarian, without any concession to style. Every available <<if $showInches == 2>>inch<<else>>centimeter<</if>> of space is used for some piece of equipment useful in making the human body faster or stronger.
		<<case "Supremacist">>
			is clean and cold, all scrubbed tile and cool steel. The only hint of its radical uses are the pseudoscientific racialist charts on the walls.
		<<case "Subjugationist">>
			is clean and cold, all scrubbed tile and cool steel. The only hint of its radical uses are the pseudoscientific racialist charts on the walls.
		<<case "Paternalist">>
			is warm and inviting, with curved walls and warm colors designed to put patients at their ease. Each bed is well provided with entertainment options.
		<<case "Pastoralist">>
			is utilitarian, without any concession to style. Every available <<if $showInches == 2>>inch<<else>>centimeter<</if>> of space is used for equipment specialized for human veterinary medicine.
		<<case "Maturity Preferentialist">>
			is comfortable and soothing, with curved walls and cool colors designed to keep patients relaxed. Each bed is provided with refined yet invariably pornographic entertainment options.
		<<case "Youth Preferentialist">>
			is bright and cheerful, with curved walls and pastel colors designed to keep patients in good spirits. Each bed is provided with light entertainment options.
		<<case "Body Purist">>
			is utilitarian, without any concession to style. Every available <<if $showInches == 2>>inch<<else>>centimeter<</if>> of space is filled with equipment designed to make medicine as low-impact as possible.
		<<case "Slimness Enthusiast">>
			is warm and inviting, with curved walls and warm colors designed to put patients at their ease. Each bed is well provided with entertainment options.
		<<case "Hedonistic">>
			is warm and comfortable, with extra wide, soft, heated beds and ample morphine. Pleasant smells are pumped into the recovery wards, plenty of entertainment is available and chubby nurse in a too small dress with a big bowl of slave food is only a button press away. It can be quite difficult to convince patients to leave.
		<<case "Intellectual Dependency">>
			is bright and cheerful, with plenty of simple amusements to keep bimbos distracted and in bed. A complex locking mechanism promises no chance of a slave wandering off to slake their lust.
		<<case "Slave Professionalism">>
			is clean and cold, all scrubbed tile and cool steel. Any delays in recovery are nothing more than time spent not honing one's talents.
		<<case "Petite Admiration">>
			is open and airy due to all the extra space freed up by shortening the beds. A footrest is the only accommodation made for tall slaves.
		<<case "Statuesque Glorification">>
			is warm and comfortable, if a little cramped; tall slaves require long beds, after all. A meager footstool is the only accommodation made for short slaves.
		<<default>>
			is a well-equipped modern medical facility. Each patient has their own area, with heavy automation to provide them treatment without any human intervention at all.
	<</switch>>

	<<if _CL > 2>>
		$clinicNameCaps is busy. Patients occupy many of the beds; most are alert, but a few are dozing under medication designed to promote healing through deep rest.
	<<elseif _CL > 0>>
		$clinicNameCaps is sparsely populated. Patients occupy a few of the beds; most are alert, but a few are dozing under medication designed to promote healing through deep rest.
	<<elseif _S.Nurse>>
		_S.Nurse.slaveName is alone in the clinic, and has nothing to do but keep the place spotlessly clean and ready for its next patients.
	<<else>>
		$clinicNameCaps is empty and quiet.

			[[Decommission the Clinic|Main][$clinic = 0, $clinicDecoration = "standard", $clinicUpgradeScanner = 0, $clinicUpgradeFilters = 0, $clinicUpgradePurge = 0, $clinicInflateBelly = 0, $clinicSpeedGestation = 0]]

	<</if>>

	<<set _Tmult0 = Math.trunc($clinic*1000*$upgradeMultiplierArcology)>>
	$clinicNameCaps has room to support $clinic slaves while they receive treatment.
	There <<if _CL == 1>>is<<else>>are<</if>> currently _CL slave<<if _CL != 1>>s<</if>> receiving treatment in $clinicName.

		[[Expand the clinic|Clinic][cashX(forceNeg(_Tmult0), "capEx"), $clinic += 5, $PC.skill.engineering += .1]]

			Costs <<print cashFormat(_Tmult0)>>

		<<if _CL > 0>>
			<<includeDOM removeFacilityWorkers("clinic", "rest", "rest")>>
		<</if>>

	<<if $clinicUpgradeScanner == 1>>
		$clinicNameCaps's scanners have been upgraded with a sampling system that can estimate carcinogenic damage to a slave's body.
	<<else>>
		<<set _Tmult1 = Math.trunc(10000*$upgradeMultiplierArcology*Math.min($upgradeMultiplierMedicine, $HackingSkillMultiplier))>>
		It mounts powerful medical scanning technology.

			[[Upgrade the scanners to help detect genomic damage|Clinic][cashX(forceNeg(_Tmult1), "capEx"), $clinicUpgradeScanner = 1, $PC.skill.hacking += 0.1]]

				Costs <<print cashFormat(_Tmult1)>>

	<</if>>

	<<if $clinicUpgradeFilters == 1>>
		<<if $clinicUpgradePurge >= 1>>
			The entire floor beneath $clinicName is occupied by a huge filtration plant that constantly cycles out the patients' blood to remove impurities.
			<<if $clinicUpgradePurge > 1>>
				Microscopic magnets have been added to better facilitate the leeching of impurities from cells.
			<</if>>
			The blood is intensely cleaned to greatly decrease the presence of impurities at the cost of compatibility. Patients will likely be ill for the duration of the treatment.
		<</if>>
		<<set _Tmult3 = Math.trunc(150000*$upgradeMultiplierArcology*Math.min($upgradeMultiplierMedicine, $HackingSkillMultiplier))>>
		<<if $clinicUpgradePurge === 0>>
			The entire floor beneath $clinicName is occupied by a huge filtration plant that constantly cycles out the patients' blood to remove impurities.

				[[Increase the effectiveness of the impurity purging|Clinic][cashX(forceNeg(_Tmult3), "capEx"), $clinicUpgradePurge = 1, $PC.skill.hacking += 0.1]]

					Costs <<print cashFormat(_Tmult3)>> and may cause health problems in slaves.

		<<elseif $clinicUpgradePurge === 1>>
			Add nano magnets into the process to increase the rate that impurities are pulled from the body.

				[[Further increase the effectiveness of the impurity purging|Clinic][cashX(forceNeg(_Tmult3*2), "capEx"), $clinicUpgradePurge = 3, $PC.skill.hacking += 0.1]]

					Costs <<print cashFormat(_Tmult3*2)>>

		<</if>>
		<<if !_S.Nurse>>

				However, without a nurse in attendance, the @@.yellow;blood treatment equipment remains idle.@@

		<</if>>
	<<else>>
		<<set _Tmult2 = Math.trunc(50000*$upgradeMultiplierArcology*Math.min($upgradeMultiplierMedicine, $HackingSkillMultiplier))>>
		It includes standard dialysis equipment.

			[[Install advanced blood treatment equipment to help address drug side effects|Clinic][cashX(forceNeg(_Tmult2), "capEx"), $clinicUpgradeFilters = 1, $PC.skill.hacking += 0.1]]

				Costs <<print cashFormat(_Tmult2)>>

	<</if>>

	<<if $bellyImplants == 1 && !_S.Nurse>>
		A resident nurse could be used to safely regulate the rate a slave's fillable belly implant for maximum size with minimum health loss.
	<<elseif $bellyImplants == 1 && $clinicInflateBelly == 1>>
		$clinicNameCaps is useful for keeping slaves healthy during long term procedures. Slaves in $clinicName with inflatable belly implants will be filled during their time under _S.Nurse.slaveName's supervision to maximize growth with minimized health complications.

			[[Do not fill belly implants|Clinic][$clinicInflateBelly = 0]]

	<<elseif $bellyImplants == 1 && _S.Nurse && $clinicInflateBelly != 1>>
		$clinicNameCaps is useful for keeping slaves healthy during long term procedures. _S.Nurse.slaveName can supervise weekly filling regimens for clinic slaves with fillable belly implants during their stay to maximize growth with minimal health complications.

			[[Fill belly implants|Clinic][$clinicInflateBelly = 1]]

	<</if>>

	<<if $seePreg == 1>>
		<<if $clinicObservePregnancy != 1>>
			Pregnant patients will not be kept under observation.

				[[Keep high-risk pregnancies under observation|Clinic][$clinicObservePregnancy = 1]]

		<<else>>
			Patients undergoing a high-risk pregnancy or are close to giving birth will be kept under observation.

				[[Stop observing pregnancies|Clinic][$clinicObservePregnancy = 0]]

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

	<<if $pregSpeedControl == 1 && !_S.Nurse>>
		A resident nurse could be used to supervise patients under rapid gestation agents while minimizing strain and health complications.
	<<elseif $pregSpeedControl == 1 && $clinicSpeedGestation == 1>>
		It's exceedingly dangerous to speed up gestation without constant supervision. In $clinicName, _S.Nurse.slaveName will monitor slaves on rapid gestation agents; making sure the growing patients' food demands are met, monitoring their skin and womb and, if need be, perform an emergency c-section should the need arise.

			[[Limit rapid gestation agents to selected slaves only|Clinic][$clinicSpeedGestation = 0]]

	<<elseif $pregSpeedControl == 1 && _S.Nurse && $clinicSpeedGestation != 1>>
		$clinicNameCaps is currently not applying rapid gestation agents to pregnant patients. Only individually selected slaves will undergo this procedure

			[[Speed up gestation for all pregnant patients|Clinic][$clinicSpeedGestation = 1]]

	<</if>>

	<<includeDOM App.UI.SlaveList.stdFacilityPage(App.Entity.facilities.clinic, true)>>

	Rename $clinicName: <<textbox "$clinicName" $clinicName "Clinic">>

		Use a noun or similar short phrase

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


code:
:: Clinic Report [nobr]

/* This passage probably isn't really necessary but it helps organize the profiler output.
 * TODO: Once all the facility reports look like this, we should probably get rid of these intermediate passages. */
<<includeDOM App.EndWeek.clinicReport()>>


code:
:: Club [nobr jump-to-safe jump-from-safe]

<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Club", $encyclopedia = "Club", _CL = App.Entity.facilities.club.employeesIDs().size>>

	<<if $clubName != "the Club">>
		<<set $clubNameCaps = $clubName.replace("the ", "The ")>>
	<</if>>
	$clubNameCaps
	<<switch $clubDecoration>>
		<<case "Roman Revivalist">>
			is decorated like a Roman villa's entertainment rooms. There is a lot of white stone, plaster, and terracotta.
		<<case "Aztec Revivalist">>
			is decorated with obsidian figures inserted in the lime walls and giant oak pillars that give a homey feeling to the otherwise cold building.
		<<case "Egyptian Revivalist">>
			is decorated like a room in an ancient Egyptian palace. There are columns of warm stone and pools of clear water full of aquatic plants.
		<<case "Edo Revivalist">>
			is furnished as an Edo period theater. Performances of the traditional Japanese arts can be seen here, though more modern dancing happens in the evenings. In either case, geisha girls are present and willing.
		<<case "Arabian Revivalist">>
			is designed like an open plaza in an Arabian palace, with a raised stage in the center for erotic dancing. Diaphanous, flowing curtains billow across the space, dispersing the narcotic smoke billowing from a score of hookahs.
		<<case "Chinese Revivalist">>
			is furnished as an old Chinese disorderly house. It's intentionally packed in so that closeness and good cheer is obligatory here; prominent citizens share tables while their hangers-on jostle for room.
		<<case "Chattel Religionist">>
			isn't a religious establishment, but it almost looks like one. It's clean and proper, with beams of natural light that come down to highlight holy sex slaves' bodies.
		<<case "Degradationist">>
			has a perverted, debauched appearance. The décor is utilitarian so it can be cleaned easily, and the reason is obvious. Many patrons have brought their own slaves to publicly rape here.
		<<case "Repopulation Focus">>
			has a gaudy appearance. There are lots of deep soft chairs for pregnant patrons and slaves to rest in and screens showing girls with large bellies lining the walls.
		<<case "Eugenics">>
			has a gaudy appearance. There are screens lining the walls discouraging unprotected slave sex. The real action happens in the several exclusive rooms reserved for society's best.
		<<case "Asset Expansionist">>
			has a gaudy appearance. There are a lot of neon lights and there are screens everywhere, showing off big tits and plush asses.
		<<case "Transformation Fetishist">>
			has a gaudy appearance. There are a lot of neon lights and there are screens everywhere, showing off huge fake tits and plastic dick sucking lips.
		<<case "Gender Radicalist">>
			has a gaudy appearance. There are a lot of neon lights and there are screens everywhere, showing closeups of cocks fucking every imaginable orifice.
		<<case "Gender Fundamentalist">>
			has an old world appearance, a decidedly throwback atmosphere harking back to the glory days of cultures past.
		<<case "Physical Idealist">>
			isn't a gym, but it smells like one. The dancing is rough and competitive, and the drinks are rich with protein.
		<<case "Supremacist">>
			is decorated like an upper-class gentleman's club in the old countries of $arcologies[0].FSSupremacistRace people.
		<<case "Subjugationist">>
			is decorated like an upper-class gentleman's club in the old countries which favored $arcologies[0].FSSubjugationistRace slaves.
		<<case "Paternalist">>
			is handsome and well-kept, even romantic. Though the slaves here are sex slaves, every provision is made to encourage them to enjoy themselves.
		<<case "Pastoralist">>
			is decorated to resemble a frontier disorderly house. The drinks are pounded straight, and there's a set of swinging doors for bad men to part dramatically as they enter.
		<<case "Maturity Preferentialist">>
			is surprisingly elegant. The music consists of refined remixes of traditional dance music, offering slaves and citizens the chance to dance beautifully together.
		<<case "Youth Preferentialist">>
			is deafeningly loud. There's a bright light show running, offering staccato glimpses of the scene out on the dance floor.
		<<case "Body Purist">>
			is gorgeous, decorated and kept in the height of fashionable night establishment style. The music is cutting edge and everything and everyone is elegant.
		<<case "Slimness Enthusiast">>
			is distinctly gaudy, with lots of sugary drinks on offer. The music and décor are of a decidedly bubblegum quality.
		<<case "Hedonistic">>
			has a gaudy appearance. The dance floor is extra large to accommodate its extra wide dancers, though bodies grinding against each other is an inevitability. Plenty of roomy, comfortable booths encircle the room for an exhausted citizen to relax with his plush dance partner, and a wide selection of greasy food accompanies the drinks. <<if $arcologies[0].FSHedonisticDecadenceResearch == 1>>Platters of food are complementary for feeding slaves<<else>>Feeders are available in the booths to feed tired slaves<</if>> while they get fondled.
		<<case "Intellectual Dependency">>
			is distinctly gaudy and easy for slaves to move around in. The dancing is as energetic and sexual, and the drinks sugary and sweet.
		<<case "Slave Professionalism">>
			is decorated like an upper-class gentleman's club. It is where a true courtesan works their craft.
		<<case "Petite Admiration">>
			has a gaudy appearance. The dance floor is surrounded by raised platforms so even the shortest slave can be seen by the crowd.
		<<case "Statuesque Glorification">>
			has a tiered appearance. The booths and bar are positioned overlooking the dance floor so patrons may loom over the dancing slaves even when seated.
		<<default>>
			is set up in an uncomplicated way. There's a bar for drinks, a dance floor for slave girls, and private rooms for slave sex.
	<</switch>>

	<<if $clubAdsSpending > 0>>
		Screens outside the entrance are showing softcore music videos to advertise $clubNameCaps.
		<<if $clubAdsOld == 1>>
			The featured strippers are all MILFs.
		<<elseif $clubAdsOld == -1>>
			The featured strippers are all nice and young.
		<<elseif $clubAdsOld == -2>>
			The featured strippers are all teenagers.
		<<elseif $clubAdsOld == -3>>
			The featured strippers are all lolis.
		<<else>>
			The featured strippers vary in age.
		<</if>>
		<<if $clubAdsStacked == 1>>
			Lots of bouncing breasts and butts
		<<elseif $clubAdsStacked == -1>>
			Lots of trim breasts and shapely butts
		<<else>>
			A variety of breast and butt sizes and shapes
		<</if>>
		are on display, and
		<<if $clubAdsImplanted == 1>>
			most of these are augmented by implants.
		<<elseif $clubAdsImplanted == -1>>
			they're all natural.
		<<else>>
			some are augmented by implants.
		<</if>>
		<<if $seePreg == 1>>
			<<if $clubAdsPreg == 1>>
				Most of strippers have firm, rounded bellies.
			<<elseif $clubAdsPreg == -1>>
				Most of the strippers have firm, flat bellies.
			<<else>>
				Some of the strippers are pregnant.
			<</if>>
		<</if>>
		<<if $clubAdsModded == 1>>
			Everything is heavily pierced and tattooed.
		<<elseif $clubAdsModded == -1>>
			Everything is free of tattoos and piercings.
		<<else>>
			Some of these assets are tattooed and pierced, and some aren't.
		<</if>>
		The strippers get naked quickly, and show off
		<<if $clubAdsXX == 1>>
			their pussies and assholes.
		<<elseif $clubAdsXX == -1>>
			their assholes.
		<<else>>
			their holes.
		<</if>>
		The ads are shown across the arcology.
		<<if ($clubAdsXX == 1) && ($clubAdsImplanted == 1) && ($clubAdsStacked == 1)>>
			As a result, $clubName is known as the place to spend a night partying with<<if ($clubAdsPreg == 1)>>pregnant<</if>> bimbos.
		<<elseif ($clubAdsXX == 1) && ($clubAdsOld == 1)>>
			As a result, $clubName is known as the place to spend a night partying with<<if ($clubAdsPreg == 1)>>pregnant<</if>> MILFs.
		<<elseif ($clubAdsXX == 1) && ($clubAdsOld == -3)>>
			As a result, $clubName is known as the place to spend a night partying with<<if $clubAdsPreg == 1>> pregnant<</if>><<if $clubAdsStacked == 1>> oppai<</if>> lolis.
		<<elseif ($clubAdsXX == 1) && ($clubAdsPreg == 1)>>
			As a result, $clubName is known as the place to spend a night partying with pregnant sluts.
		<<elseif ($clubAdsXX == -1) && ($clubAdsStacked == 1)>>
			As a result, $clubName is known as the place to spend a night partying with shemales.
		<<elseif ($clubAdsXX == -1) && ($clubAdsStacked == -1)>>
			As a result, $clubName is known as the place to spend a night partying with traps.
		<</if>>
	<</if>>

	<<if _CL > 2>>
		$clubNameCaps is dotted with pretty, flirtatious slaves, stripping on stages, serving drinks, and dancing. They're very willing to suck patrons off in the open or give a public handjob, and there are little private rooms for them to use when engaging in heavier intercourse.
	<<elseif _CL > 0>>
		There are a few pretty, flirtatious slaves, stripping on stages, serving drinks, and dancing. They're very willing to suck patrons off in the open or give a public handjob, and there are little private rooms for them to use when engaging in heavier intercourse.
	<<elseif _S.DJ>>
		<<setLocalPronouns _S.DJ>>
		$clubNameCaps is doing business normally, without a complement of sex slaves to spice things up. _S.DJ.slaveName is alone in $clubName, and can accomplish little by $himself.
	<<else>>
		$clubNameCaps is doing business normally, without a complement of sex slaves to spice things up.

			<<link "Decommission the club" "Main">>
				<<set $club = 0, $clubDecoration = "standard", $clubUpgradePDAs = 0, $clubAdsSpending = 0>>
				<<run App.Arcology.cellUpgrade($building, App.Arcology.Cell.Shop, "Club", "Shops")>>
			<</link>>

	<</if>>

	<<if _CL > 2>>
		<<switch $clubDecoration>>
			<<case "Chattel Religionist">>
				From one of the private rooms, praying interspersed with the slap of leather on flesh can be heard.
			<<case "Degradationist">>
				Agonized screaming can be heard from one of the private rooms.
			<<case "Repopulation Focus">>
				A wet slapping sound is coming from one of the private rooms, the kind of sound made by mammary intercourse with very milky breasts. Occasionally crying can be heard from one of the rooms specially designed for patrons wishing to assfuck a slave as she gives birth.
			<<case "Eugenics">>
				The slight sounds of whispering can be heard emanating from one of the restricted rooms.
			<<case "Asset Expansionist">>
				A wet slapping sound is coming from one of the private rooms, the kind of sound made by mammary intercourse with very large breasts.
			<<case "Transformation Fetishist">>
				A wet slapping sound is coming from one of the private rooms, the kind of sound made by mammary intercourse with very large fake breasts.
			<<case "Gender Radicalist">>
				Uncomfortable moaning from one of the private rooms suggests that a slave inside is taking a painfully large cock up their tight butt.
			<<case "Gender Fundamentalist">>
				The unmistakable sound of vigorous vaginal intercourse can be heard from one of the private rooms.
			<<case "Physical Idealist">>
				Bestial grunting can be heard from one of the private rooms.
			<<case "Supremacist">>
				The sound of a beating, interspersed with desperate begging, can be heard from one of the private rooms.
			<<case "Subjugationist">>
				The sound of a beating, interspersed with desperate begging, can be heard from one of the private rooms.
			<<case "Paternalist">>
				The unmistakable sound of a slave experiencing an authentic orgasm can be heard from one of the private rooms.
			<<case "Body Purist">>
				The faint but unmistakable sound of a slave trying to keep quiet while orgasming can be heard from one of the private rooms.
			<<case "Slimness Enthusiast">>
				The faint but unmistakable sound of a shrill climax can be heard from one of the private rooms.
			<<case "Pastoralist">>
				A faint gushing sound is audible from one of the private rooms.
			<<case "Roman Revivalist">>
				A business meeting is just audible from one of the private rooms; only an occasional moan indicates that the businessmen are enjoying a couple of serving girls at the same time.
			<<case "Aztec Revivalist">>
				A muffled <<if $arcologies[0].FSPaternalist != "unset">>moan<<else>>scream<</if>>, followed by the sounds of liquid gently dripping on the stone floors denote the goings-on in the building.
			<<case "Egyptian Revivalist">>
				The smell of incense and the sounds of sex are drifting out of the private rooms.
			<<case "Edo Revivalist">>
				The faint but unmistakable sound of a slave trying to keep quiet while orgasming can be heard from one of the private rooms.
			<<case "Arabian Revivalist">>
				The faint sound of multiple slaves pleasuring a single patron can be heard from one of the private rooms.
			<<case "Chinese Revivalist">>
				The faint but unmistakable sound of a slave trying to keep quiet while orgasming can be heard from one of the private rooms.
			<<case "Maturity Preferentialist">>
				The faint sound of a well traveled slave showing off their experience can be heard from one of the private rooms.
			<<case "Youth Preferentialist">>
				The faint but unmistakable sound of a shrill climax can be heard from one of the private rooms.
			<<case "Hedonistic">>
				The sound of fat bodies fucking while feeding each other can be heard from one of the private rooms.
			<<case "Intellectual Dependency">>
				The sounds of an overstimulated bimbo can be heard from one of the private rooms.
			<<case "Slave Professionalism">>
				The sounds of an overstimulated patron can be heard from one of the private rooms.
			<<case "Petite Admiration">>
				The faint sound of a slave giving head can be heard from one of the private rooms.
			<<case "Statuesque Glorification">>
				The faint banging of a patron banging a slave against the wall can be heard echoing from one of the private rooms.
			<<default>>
				The faint but unmistakable sound of a shrill climax can be heard from one of the private rooms.
		<</switch>>
	<</if>>

	<<set _Tmult0 = Math.trunc($club*1000*$upgradeMultiplierArcology)>>
	There are rooms off $clubName to support slaves as they work as club sluts. They can support $club slaves. There
	<<if _CL == 1>>
		is
	<<else>>
		are
	<</if>>
	currently _CL slave<<if _CL != 1>>s<</if>> serving in $clubName.

		[[Expand the club|Club][cashX(forceNeg(_Tmult0), "capEx"), $club += 5, $PC.skill.engineering += .1]]

			Costs <<print cashFormat(_Tmult0)>> and will increase upkeep costs

		<<if _CL > 0>>
			<<includeDOM removeFacilityWorkers("club", "rest", "serve the public")>>
		<</if>>

	<<if $clubUpgradePDAs == 1>>
		$clubNameCaps has been wired for unobtrusive personal data assistants to let your sluts pass tips about enslavable people to your recruiter.
	<<else>>
		<<set _Tmult1 = Math.trunc(10000*$upgradeMultiplierArcology*$HackingSkillMultiplier)>>
		The rooms are standard.

			[[Upgrade them with PDAs to help your recruiter|Club][cashX(forceNeg(_Tmult1), "capEx"), $clubUpgradePDAs = 1, $PC.skill.hacking += 0.1]]

				Costs <<print cashFormat(_Tmult1)>> and will increase upkeep costs

	<</if>>

	<<if _S.DJ>>
		<<if $DJignoresFlaws != 1>>
			_S.DJ.slaveName will attempt to fix flaws in <<print $clubName>>'s sluts.
			[[Ignore flaws|Club][$DJignoresFlaws = 1]]
		<<else>>
			_S.DJ.slaveName has been instructed to ignore flaws in <<print $clubName>>'s sluts.
			[[Fix flaws|Club][$DJignoresFlaws = 0]]
		<</if>>

		<<if $DJnoSex != 1>>
			_S.DJ.slaveName will slut it up when $he doesn't have enough sluts serving under $him.
			[[Don't serve clients|Club][$DJnoSex = 1]]
		<<else>>
			_S.DJ.slaveName will not be slutting it up $himself even if $he has time.
			[[Serve clients|Club][$DJnoSex = 0]]
		<</if>>
	<</if>>

	<<if $clubAdsSpending > 0>>
		$clubNameCaps is the subject of an active ad campaign.
	<<else>>
		$clubNameCaps is not being advertised.
	<</if>>

		<<link "Manage club advertisements" "Club Advertisement">>
			<<set $nextLink = passage(), $nextButton = "Back">>
		<</link>>

<<includeDOM App.Facilities.Club.Stats(true)>>

	<<includeDOM App.UI.SlaveList.stdFacilityPage(App.Entity.facilities.club)>>

	Rename $clubName: <<textbox "$clubName" $clubName "Club">>

		Use a noun or similar short phrase

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