code:
:: JE slave dispute [nobr]

<<set $nextLink = "RIE Eligibility Check", $returnTo = "RIE Eligibility Check", $nextButton = "Continue", _event = $justiceEvents.pluck()>> /* pick a random event and remove it from the array so it will not occur again */

<<switch _event>>
<<case "slave deal">>
	<<set _ContractCost = 5000>>
	<<set $activeSlaveOneTimeMinAge = 24>>
	<<set $activeSlaveOneTimeMaxAge = 42>>
	<<set $one_time_age_overrides_pedo_mode = 1>>
	<<set $oneTimeDisableDisability = 1>>
	<<set $activeSlave = GenerateNewSlave("XX")>>
	<<set $activeSlave.origin = "$He sold $himself into slavery to buy medical care for $his daughter.">>
	<<set $activeSlave.devotion = random(25,30)>>
	<<set $activeSlave.trust = $activeSlave.devotion-20>>
	<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
	<<run setHealth($activeSlave, jsRandom(0, 20))>>
	<<set $activeSlave.earPiercing = 1>>
	<<set $activeSlave.vagina = random(1,2)>>
	<<set $activeSlave.ovaries = 1>>
	<<set $activeSlave.counter.birthsTotal = 1>>
	<<set $activeSlave.shouldersTat = either("flowers", "tribal patterns")>>
	<<set $activeSlave.stampTat = either("flowers", "tribal patterns")>>
<<case "breeding deal">>
	<<set _ContractCost = 40000>>
	<<set $activeSlaveOneTimeMinAge = $fertilityAge+3>>
	<<set $activeSlaveOneTimeMaxAge = 24>>
	<<set $one_time_age_overrides_pedo_mode = 1>>
	<<set $oneTimeDisableDisability = 1>>
	<<set $activeSlave = GenerateNewSlave("XX")>>
	<<set $activeSlave.origin = "$He was raised to be a mother.">>
	<<set $activeSlave.career = "a breeder">>
	<<set $activeSlave.devotion = random(10,25)>>
	<<set $activeSlave.trust = $activeSlave.devotion>>
	<<run setHealth($activeSlave, jsRandom(80, 90), 0, 0, 0, jsRandom(10, 30))>>
	<<set $activeSlave.anus = 0>>
	<<set $activeSlave.vagina = 3>>
	<<set $activeSlave.skill.anal = 0>>
	<<set $activeSlave.skill.oral = 0>>
	<<set $activeSlave.skill.whoring = 0>>
	<<set $activeSlave.skill.vaginal = 0>>
	<<set $activeSlave.skill.entertainment = 0>>
	<<set $activeSlave.bellySag = 10>>
	<<set $activeSlave.bellySagPreg = 10>>
	<<set $activeSlave.counter.birthsTotal = 3>>
	<<set $activeSlave.hips = 2>>
	<<set $activeSlave.boobs = random(4,6)*100>>
	<<if $seePreg == 1>>
		<<set $activeSlave.belly = 18000>>
	<</if>>
<<case "slave training">>
	<<set _ContractCost = 10000>>
	<<set $oneTimeDisableDisability = 1>>
	<<set $activeSlave = GenerateNewSlave("XY")>>
	<<set $activeSlave.origin = "You bought out a deal involving $him training to be an expert gelded sex slave.">>
	<<set $activeSlave.devotion = random(30,40)>>
	<<set $activeSlave.trust = $activeSlave.devotion>>
	<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
	<<run setHealth($activeSlave, jsRandom(60, 80), 0, 0, 0, jsRandom(10, 30))>>
	<<set $activeSlave.balls = 0>>
	<<set $activeSlave.anus = 2>>
	<<set $activeSlave.skill.anal = 35>>
	<<set $activeSlave.skill.oral = 35>>
	<<set $activeSlave.skill.whoring = 35>>
	<<set $activeSlave.skill.entertainment = 35>>
	<<set $activeSlave.nipplesPiercing = 1>>
	<<set $activeSlave.clitPiercing = 1>>
	<<set $activeSlave.dickPiercing = 1>>
	<<set $activeSlave.anusPiercing = 1>>
	<<set $activeSlave.lipsPiercing = 1>>
	<<set $activeSlave.tonguePiercing = 1>>
	<<set $activeSlave.earPiercing = 1>>
	<<set $activeSlave.nosePiercing = 1>>
	<<set $activeSlave.eyebrowPiercing = 1>>
	<<set $activeSlave.navelPiercing = 1>>
	<<set $activeSlave.boobsTat = either("advertisements", "degradation", "rude words")>>
	<<set $activeSlave.buttTat = either("advertisements", "degradation", "rude words")>>
	<<set $activeSlave.vaginaTat = either("advertisements", "degradation", "rude words")>>
	<<set $activeSlave.dickTat = either("advertisements", "degradation", "rude words")>>
	<<set $activeSlave.lipsTat = either("advertisements", "degradation", "rude words")>>
	<<set $activeSlave.anusTat = either("advertisements", "degradation", "rude words")>>
	<<set $activeSlave.shouldersTat = either("advertisements", "degradation", "rude words")>>
	<<set $activeSlave.armsTat = either("advertisements", "degradation", "rude words")>>
	<<set $activeSlave.legsTat = either("advertisements", "degradation", "rude words")>>
	<<set $activeSlave.stampTat = either("advertisements", "degradation", "rude words")>>
<<case "majority deal">>
	<<set _ContractCost = 20000>>
	<<set $activeSlaveOneTimeMinAge = $minimumSlaveAge>>
	<<set $activeSlaveOneTimeMaxAge = 18>>
	<<set $oneTimeDisableDisability = 1>>
	<<set $activeSlave = GenerateNewSlave()>>
	<<set $activeSlave.origin = "$He was raised to be a slave, since $he was mistakenly thought to be from good slave stock.">>
	<<set $activeSlave.career = "a slave">>
	<<set $activeSlave.devotion = random(10,15)>>
	<<set $activeSlave.trust = $activeSlave.devotion>>
	<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
	<<run setHealth($activeSlave, jsRandom(80, 90), 0, 0, 0, jsRandom(10, 30))>>
	<<if $activeSlave.dick == 0>>
		<<set $activeSlave.vagina = 0>>
		<<set $activeSlave.ovaries = 1>>
	<<elseif $activeSlave.balls == 0>>
		<<set $activeSlave.balls = 1>>
	<</if>>
	<<set $activeSlave.anus = 0>>
	<<set $activeSlave.skill.anal = 0>>
	<<set $activeSlave.skill.oral = 0>>
	<<set $activeSlave.skill.whoring = 0>>
	<<set $activeSlave.skill.vaginal = 0>>
	<<set $activeSlave.skill.entertainment = 0>>
<<case "indenture deal">>
	<<set _ContractCost = 7500>>
	<<set $activeSlaveOneTimeMinAge = 24>>
	<<set $activeSlaveOneTimeMaxAge = 42>>
	<<set $oneTimeDisableDisability = 1>>
	<<set $activeSlave = GenerateNewSlave()>>
	<<run setHealth($activeSlave, jsRandom(-20, 20))>>
	<<set $activeSlave.anus = 2>>
	<<if $activeSlave.vagina > -1>>
		<<set $activeSlave.vagina = 2>>
	<</if>>
	<<set $activeSlave.skill.vaginal = 15>>
	<<set $activeSlave.skill.oral = 15>>
	<<set $activeSlave.skill.anal = 15>>
	<<set $activeSlave.skill.whoring = 0>>
	<<set $activeSlave.skill.entertainment = 15>>
	<<set $activeSlave.boobs += 600>>
	<<set $activeSlave.boobsImplant = 600>>
	<<set $activeSlave.boobsImplantType = "normal">>
	<<set $activeSlave.butt += 1>>
	<<set $activeSlave.buttImplant = 1>>
	<<set $activeSlave.buttImplantType = "normal">>
	<<set $activeSlave.lips += 10>>
	<<set $activeSlave.lipsImplant = 10>>
	<<set $activeSlave.lipsPiercing = 1>>
	<<set $activeSlave.tonguePiercing = 1>>
	<<set $activeSlave.earPiercing = 1>>
	<<set $activeSlave.nosePiercing = 1>>
	<<set $activeSlave.eyebrowPiercing = 1>>
	<<set $activeSlave.navelPiercing = 1>>
	<<set $activeSlave.nipplesPiercing = 1>>
	<<set $activeSlave.clitPiercing = 1>>
	<<set $activeSlave.stampTat = either("flowers", "tribal patterns")>>
<<default>>
	<<set _ContractCost = 10000>>
	<<set $activeSlaveOneTimeMaxAge = 22>>
	<<set $oneTimeDisableDisability = 1>>
	<<set $activeSlave = GenerateNewSlave()>>
	<<set $activeSlave.origin = "You bought out a deal for $his sale after the seller took $his virginity and the buyer no longer wanted $him.">>
	<<set $activeSlave.counter.publicUse += 10>>
	<<set $activeSlave.devotion = random(25,30)>>
	<<set $activeSlave.trust = $activeSlave.devotion-20>>
	<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
	<<run setHealth($activeSlave, jsRandom(0, 20))>>
	<<set $activeSlave.anus = 2>>
	<<if $activeSlave.dick == 0>>
		<<set $activeSlave.vagina = 2>>
		<<set $activeSlave.ovaries = 1>>
		<<if isFertile($activeSlave) && $seePreg == 1>>
			<<= knockMeUp($activeSlave, 100, 2, -2, 1)>>
		<</if>>
	<</if>>
<</switch>>

/* 000-250-006 */
<<if $seeImages == 1>>
<<if $imageChoice == 1>>

<<= SlaveArt($activeSlave, 2, 0)>>

<<else>>

<<= SlaveArt($activeSlave, 2, 0)>>

<</if>>
<</if>>
/* 000-250-006 */

<<setLocalPronouns $activeSlave>>

<<= capFirstChar($assistant.name)>> breaks in on your sleep with an urgent message. You push a slave off you and sit up to take it. As the owner of the arcology, you perform some functions that would traditionally be the province of a government. In this anarcho-liberal polity, it's still necessary for people making deals to have someone to appeal to when disputes arise. Part of your agreement with your tenants is that you will perform this duty on deals between two tenants. The message is about just such a disagreement; they always seem to happen in the middle of the night, and they're always urgent.

<<switch _event>>
<<case "slave deal">>
	An older $woman who has signed an enslavement contract with a slave trader is accusing her of not living up to the terms. The contract requires that the trader pay the medical costs of the $woman's daughter in return for the $woman's voluntary enslavement. The $woman claims that the payments have not been made and the trader is still insisting on enslavement.

	The trader states that the daughter was thought to only have a minor condition, but has proven to be suffering from a serious cancer. She protests that she will lose a great deal of money, and that there's no way she would have made the deal if the $woman had been honest with her about how bad $his daughter's condition was. The $woman responds that $he didn't know.
<<case "breeding deal">>
	A small-time slave breeder is accusing a customer of reneging on their agreement. For the last nine months, one of his best breeders has been busy growing his client's future slave and now
	<<if $seePreg == 1>>
		that $he's ready to give birth,
		<<set $activeSlave.belly = 0>>
		<<set $activeSlave.pregWeek = -3>>
	<<else>>
		that it's born,
	<</if>>
	he's refusing to transfer the funds, placing the entire operation in jeopardy.

	The father<<if $seePreg == 1>>-to-be<</if>> claims that the child is not his and as such, the contract has not been fulfilled. Despite offers from the breeder to perform a paternity test, he adamantly insists on using his private, and rather expensive, physician to run the test; a cost high enough to put them out of business anyway.
<<case "slave training">>
	One of your prominent tenants is accusing another of failing to train a slave for him according to the terms of a slave training contract. He highlights a part of the contract that requires that the slave be expert in "all common sexual skills." He self-righteously declares that the delivered slave has no vaginal skills to speak of, that he doesn't want $him as a result, and requests that you release him from the contract.

	The trainer replies with some aspersion that the accuser is technically correct: the slave has no vaginal skills at all. This is, however, due to the fact that the slave has no vagina. He claims that the accuser verbally requested a gelded slave, though there's nothing about that either way in the contract. He protests that he did his best to train an expert gelding, and offers many lengthy videos to prove that he did.
<<case "majority deal">>
	A prominent citizen is accusing a slave school of lying to him about the pedigree of a $girl about to reach $his majority. $He'll be enslaved once $he's of age, and he owns the rights to $him. He produces many messages from the school about $his progress; they all reference $his excellent bloodline. The slave's genes were sequenced recently for an unrelated treatment, and it appears $he's not the child of the slaves the school stated $he was. He angrily demands compensation for the effort he's put into planning for $him.

	The school's representative is apologetic, but firm. The school readily admits an error, but he protests that they weren't aware of the confusion, either. They've offered to buy $him back, with interest, but reject what they call an exorbitant demand for compensation. They produce the original pedigree, protesting that it shows that they were lied to, too. The slave does resemble the supposed parents closely; only an unusually invasive check would have disclosed the fraud.
<<case "indenture deal">>
	A slutty-looking $girl appears, bearing a split lip and a black eye, accusing a slave trader of tricking $him. $He sends you a lengthy contract of indentured servitude. Nothing seems out of order, though indentured servants are becoming less common, since slave labor is usually cheaper and less limited. The angry accuser claims that the trader told $him that $he wouldn't be required to have sex while indentured. The promise doesn't seem to be in writing, but the $girl bitterly insists that it was made. "And now," $he almost shrieks, "he's making me be a whore. I got assfucked five times yesterday. Five!"

	The trader indignantly denies ever making any such commitment, and points out, correctly, that $he has no proof. He protests that he only made the indentured servitude deal as a favor to $him, and is angry that $he's repaying his courtesy in not insisting on enslavement by this ingratitude. "I see here in the record that $he was indeed used anally five times yesterday," he observes acidly. "But that's $his job."
<<default>>
	A wealthy slaveowner, clearly nursing a ferocious hangover, is accusing a less prominent citizen of refusing to honor the terms of a sale they signed in the early hours of the morning. Already shaking your head, you pull up the security logs with his permission. You verify that yes, indeed, they're visible at a loud party hosted by the wealthy slaveowner, talking over a tablet for a long time before shaking hands and signing.

	The putative buyer protests that though the terms of sale don't show it, their conversation before the sale focused on the slave's virginity. The logs show that this, too, is true. And then, he rages, the slaveowner got even drunker, and brought the slave up to join the party, encouraging other guests to gangbang $him. The logs show this too; the slave is definitely not a virgin any longer. The would-be buyer says he understands that he should have gotten the part about the virginity in writing and guaranteed up until he got his hands on $him, but requests that you honor the spirit of the deal by letting him out of a contract to buy a now-ruined slave.
<</switch>>

<<switch _event>>
<<case "slave deal">>
	<<link "Privately inform both parties you'll settle this in favor of the most generous">>
		<<replace "#result">>
		You privately inform both parties you'll settle this in favor of the most generous. You instantly receive a single notice of escrow payment contingent on the case going the payer's way. You select the @@.yellowgreen;bigger of the two@@ and decide the matter before returning to bed in a good mood. However, the next day it becomes apparent that although $he isn't stupid enough to make a public accusation of corruption, the older $woman made use of $his few remaining hours of freedom to @@.red;slander@@ your administration of justice.
		<<run repX(-100, "event")>>
		<<run cashX(random(150,200)*10, "event")>>
		<</replace>>
	<</link>>

<<link "Settle the dispute in favor of the older $woman">>
		<<replace "#result">>
		You settle the dispute in favor of the slave-to-be. $He is resigned, knowing that $he's now owned by a woman who almost certainly hates $him, but $his daughter's treatments are assured. The story gets around quickly, @@.green;capturing the hearts@@ of more romantic citizens. The angry slave trader leaves the arcology, @@.red;reducing prosperity.@@
		<<set $arcologies[0].prosperity -= 5>>
		<<run repX(2500, "event")>>
		<</replace>>
	<</link>>

<<link "Settle the dispute in favor of the slave trader">>
		<<replace "#result">>
		You settle the dispute in favor of the slave trader. The story of the mother's enslavement, along with the prompt death of the daughter due to inadequate treatment, gets around the Free Cities, @@.red;appalling@@ more romantic citizens. The trader lets it be known amongst her peers that you do not brook uppity behavior from poor bitches, and that slave traders can expect to do well in your arcology, @@.green;increasing prosperity.@@
		<<set $arcologies[0].prosperity += 5>>
		<<run repX(-500, "event")>>
		<</replace>>
	<</link>>

<<link "Offer to buy out the contract">>
		<<run cashX(forceNeg(_ContractCost), "slaveTransfer")>>
		<<replace "#result">>
		You offer to simply buy out the contract, taking the slave for yourself, letting the slave trader out of her side of the deal, and providing for the daughter's medical care. The trader lets it be known amongst her peers that you will make things right no matter the cost to yourself, @@.green;increasing prosperity.@@ The story of the mother willing to be enslaved gets around quickly, @@.green;capturing the hearts@@ of more romantic citizens. The mother, meanwhile, presents $himself for enslavement, @@.hotpink;very grateful@@ that you've saved $his daughter's life.

		<<set $arcologies[0].prosperity += 5>>
		<<run repX(2500, "event")>>
		<<include "New Slave Intro">>
		<</replace>>
	<</link>> //This will cost <<print cashFormat(_ContractCost)>> and give you the slave//
<<case "breeding deal">>
	<<link "Privately inform both parties you'll settle this in favor of the most generous">>
		<<replace "#result">>
		You privately inform both parties you'll settle this in favor of the most generous. You instantly receive two notices of escrow payments contingent on the case going the payer's way. You select the @@.yellowgreen;bigger of the two,@@ a clear choice, and decide the matter before returning to bed in a good mood. However, the next day it becomes apparent that although he isn't stupid enough to make a public accusation of corruption, the loser is proclaiming that he is @@.red;not pleased@@ with your administration of justice.
		<<run repX(-100, "event")>>
		<<run cashX(random(150,200)*10, "event")>>
		<</replace>>
	<</link>>

<<link "Settle the dispute in favor of the accuser">>
		<<replace "#result">>
		You settle the dispute in favor of the wealthy accuser. While he is a little disappointed that he didn't get the slave he wanted, he speaks @@.green;positively@@ in public about how you helped protect his investments from potential mismanagement. Slave trading to and from your arcology is @@.red;somewhat lessened@@ however, since the breeder lets it be known that trading in your arcology is a risk.
		<<set $arcologies[0].prosperity -= 5>>
		<<run repX(2500, "event")>>
		<</replace>>
	<</link>>

<<link "Settle the dispute in favor of the breeder">>
		<<replace "#result">>
		You settle the dispute in favor of the slave breeder, and against the prominent accuser, by declaring that the standard paternity test will suffice.
		<<if $seePreg == 1>>
			As if on queue, the $girl's water breaks and soaks $his pants. The call ends to the sight of $his crotch bulging as $his child is born into $his clothing.
		<</if>>
		While he is satisfied with his future slave, he speaks @@.red;openly@@ in public about how you were so quick to use cheap services to settle the claim instead of listening to his requests. The breeder, however, passes a @@.green;good word@@ around the industry that slavers trading with your arcology can expect to be protected from abusive claims.
		<<set $arcologies[0].prosperity += 5>>
		<<run repX(-500, "event")>>
		<</replace>>
	<</link>>

<<link "Compromise on the compensation and offer to buy out the deal">>
		<<run cashX(forceNeg(_ContractCost), "slaveTransfer")>>
		<<replace "#result">>
		You offer to buy out the deal, paying the breeder and taking the slave yourself, and passing the child off to the buyer. The citizen gets what he wants and speaks @@.green;kindly@@ in public about how you helped smooth over a rather rough dispute. The breeder sends a @@.green;positive note@@ around the industry to the effect that slavers trading with your arcology can expect to be aided in times of need; though the loss of a star mother always stings.

		<<set $arcologies[0].prosperity += 3>>
		<<run repX(300, "event")>>
		<<include "New Slave Intro">>
		<</replace>>
	<</link>> //This will cost <<print cashFormat(_ContractCost)>> and give you the slave//
<<case "slave training">>
	<<link "Privately inform both parties you'll settle this in favor of the most generous">>
		<<replace "#result">>
		You privately inform both parties you'll settle this in favor of the most generous. You instantly receive two notices of escrow payments contingent on the case going the payer's way. You select the @@.yellowgreen;bigger of the two@@ and decide the matter before returning to bed in a good mood. However, the next day it becomes apparent that although he isn't stupid enough to make a public accusation of corruption, the loser is proclaiming that he is @@.red;not pleased@@ with your administration of justice.
		<<run repX(-100, "event")>>
		<<run cashX(random(150,200)*10, "event")>>
		<</replace>>
	<</link>>

<<link "Settle the dispute in favor of the accuser">>
		<<replace "#result">>
		You settle the dispute in favor of the wealthy accuser. He lets you know privately that he recently had a business deal go bad, so he's in a tough cash situation right now; he's so grateful for your assistance in this embarrassing situation that he talks @@.green;effusively@@ for days to anyone who will listen about your good administration of the arcology. Unfortunately, the furious trainer has packed up his equipment and his gelding and left for another arcology, somewhat @@.red;reducing prosperity.@@
		<<set $arcologies[0].prosperity -= 5>>
		<<run repX(2500, "event")>>
		<</replace>>
	<</link>>

<<link "Settle the dispute in favor of the trainer">>
		<<replace "#result">>
		You settle the dispute in favor of the slave trainer. It transpires that the wealthy accuser was no longer wealthy at all, and was looking to get out of the deal; he's furious, and spends a long day @@.red;spewing invectives@@ against you to anyone who will listen before decamping back to the old world. The trainer, on the other hand, lets it be known that you support businessmen, who can trust you to look after their interests, @@.green;increasing prosperity.@@
		<<set $arcologies[0].prosperity += 5>>
		<<run repX(-500, "event")>>
		<</replace>>
	<</link>>

<<link "Offer to buy out the deal">>
		<<run cashX(forceNeg(_ContractCost), "slaveTransfer")>>
		<<replace "#result">>
		You offer to simply buy out the deal, paying the trainer and taking the slave yourself, and letting the buyer out of the payment. The trainer lets it be known that you support businessmen, who can trust you to ensure they don't come out second best, @@.green;increasing prosperity.@@ The buyer lets you know privately that he recently had a business deal go bad, so he's in a tough cash situation right now; he's so grateful for your assistance in this embarrassing situation that he talks @@.green;effusively@@ for days to anyone who will listen about your discreet administration of the arcology. The slave, meanwhile, arrives at your penthouse, @@.hotpink;rather hopeful@@ that $he's going to a good master.

		<<set $arcologies[0].prosperity += 5>>
		<<run repX(2500, "event")>>
		<<include "New Slave Intro">>
		<</replace>>
	<</link>> //This will cost <<print cashFormat(_ContractCost)>> and give you the slave//
<<case "majority deal">>
	<<link "Privately inform both parties you'll settle this in favor of the most generous">>
		<<replace "#result">>
		You privately inform both parties you'll settle this in favor of the most generous. You instantly receive two notices of escrow payments contingent on the case going the payer's way. You select the @@.yellowgreen;bigger of the two@@ and decide the matter before returning to bed in a good mood. However, the next day it becomes apparent that although he isn't stupid enough to make a public accusation of corruption, the loser is proclaiming that he is @@.red;not pleased@@ with your administration of justice.
		<<run repX(-100, "event")>>
		<<run cashX(random(150,200)*10, "event")>>
		<</replace>>
	<</link>>

<<link "Settle the dispute in favor of the accuser">>
		<<replace "#result">>
		You settle the dispute in favor of the prominent accuser. He dabbles in slave breeding himself, and was looking forward to using the slave in question for breeding stock; like many breeders he cares deeply about his stable, and speaks @@.green;positively@@ in public about how you helped an innocent breeder protect his prize bloodlines. Slave trading to and from your arcology is @@.red;somewhat lessened@@ however, since the school lets it be known that trading in your arcology is a risk.
		<<set $arcologies[0].prosperity -= 5>>
		<<run repX(2500, "event")>>
		<</replace>>
	<</link>>

<<link "Settle the dispute in favor of the trainer">>
		<<replace "#result">>
		You settle the dispute in favor of the school, and against the prominent accuser. He dabbles in slave breeding himself, and was looking forward to using the slave in question for breeding stock; like many breeders he cares deeply about his stable, and speaks @@.red;furiously@@ in public about how you denied an innocent breeder justice against those swindling slave schools. The school, however, passes a @@.green;good word@@ around the industry that schools trading with your arcology can expect to be protected from frivolous claims.
		<<set $arcologies[0].prosperity += 5>>
		<<run repX(-500, "event")>>
		<</replace>>
	<</link>>

<<link "Compromise on the compensation and offer to buy out the deal">>
		<<run cashX(forceNeg(_ContractCost), "slaveTransfer")>>
		<<replace "#result">>
		You offer to buy out the deal, paying the school and taking the slave yourself, and compromising on the demanded compensation. The citizen was looking forward to using the slave in question for breeding stock; like many breeders he cares deeply about his stable and is mollified by the moderate payment, and speaks @@.green;kindly@@ in public about how you helped an innocent breeder protect his prize bloodlines. The school sends a @@.green;positive note@@ around the industry to the effect that schools trading with your arcology can expect to have excessive claims sensibly reduced.

		<<set $arcologies[0].prosperity += 3>>
		<<run repX(1500, "event")>>
		<<include "New Slave Intro">>
		<</replace>>
	<</link>> //This will cost <<print cashFormat(_ContractCost)>> and give you the slave//
<<case "indenture deal">>
	<<link "Privately inform both parties you'll settle this in favor of the most generous">>
		<<replace "#result">>
		You privately inform both parties you'll settle this in favor of the most generous. You instantly receive a single notice of escrow payment contingent on the case going the payer's way. You select the @@.yellowgreen;bigger of the two@@ and decide the matter before returning to bed in a good mood. However, the next day it becomes apparent that although $he isn't stupid enough to make a public accusation, the whore has been @@.red;whispering@@ to $his peers that you helped the trader cheat $him into prostitution. Few citizens care, but there is a faint scent of corruption.
		<<run repX(-50, "event")>>
		<<run cashX(random(150,200)*10, "event")>>
		<</replace>>
	<</link>>

<<link "Settle the dispute in favor of the indentured whore">>
		<<replace "#result">>
		You settle the dispute in favor of the indentured whore, adding a requirement to the indentured servitude that $he not be required to fuck against $his will. The story of the brave prostitute and the conniving trader is @@.green;told and retold,@@ impressing the more credulous citizens. It also @@.red;raises doubts@@ among the wealthier, more business-minded residents about whether you can be depended on to promote their interests.
		<<set $arcologies[0].prosperity -= 5>>
		<<run repX(2500, "event")>>
		<</replace>>
	<</link>>

<<link "Settle the dispute in favor of the indenture holder">>
		<<replace "#result">>
		You settle the dispute in favor of the owner of the indenture. No change in the contract is necessary, since it already says what it should: that he controls $him for the required period. That's all. The story of your strictness in business disputes @@.green;impresses@@ some of the more commercially powerful citizens of the arcology, but is @@.red;hissed@@ by the stupider, more romantic residents, who see only a brave whore being beaten down by a conniving slave trader.
		<<set $arcologies[0].prosperity += 5>>
		<<run repX(-500, "event")>>
		<</replace>>
	<</link>>

<<link "Buy out the contract and $his indenture">>
		<<set $activeSlave.devotion = random(10,15)>>
		<<set $activeSlave.trust = $activeSlave.devotion+4>>
		<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
		<<set $activeSlave.indenture = random(52,78)>>
		<<set $activeSlave.indentureRestrictions = 2>>
		<<set $activeSlave.origin = "You took over $his indenture after $he launched a legal complaint against an abusive master.">>
		<<run cashX(forceNeg(_ContractCost), "slaveTransfer")>>
		<<replace "#result">>
			You offer to simply buy out the indenture contract, thereby acquiring $him, to which both parties readily agree. This decision is viewed as @@.green;incredibly generous@@ by both your arcology's romantically-minded and financially-inclined citizens. For their part, your new servant is hopeful that you will be more considerate of $his health, while the former holder is just happy to have $him off his hands.

			<<set $arcologies[0].prosperity += 3>>
			<<run repX(1500, "event")>>
			<<include "New Slave Intro">>
		<</replace>>
	<</link>> //This will cost <<print cashFormat(_ContractCost)>> and give you the servant as such//

<<link "Buy out the contract and enslave $him">>
		<<set $activeSlave.origin = "$He was enslaved after you manipulated $his deal for indentured servitude.">>
		<<set $activeSlave.devotion = random(-10,-15)>>
		<<set $activeSlave.trust = $activeSlave.devotion+4>>
		<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
		<<run cashX(forceNeg(_ContractCost), "slaveTransfer")>>
		<<replace "#result">>
			You quietly contact the trader and suggest an alternative method of settling the dispute. He is surprised, but agrees readily, chuckling at how the "recalcitrant bitch" is going to be dealt with. To $his horror, $he finds that your near-total power over deals made in your arcology has been employed to saddle $him with additional debts that, under $his indentured servitude, $he cannot hope to repay. It is then the work of ten minutes to demand payment, and when $he cannot pay, demand $his body for enslavement. The story of your cunning @@.green;impresses@@ the slave traders, but is @@.red;booed@@ by fairer-minded citizens.

			<<set $arcologies[0].prosperity += 5>>
			<<run repX(-100, "event")>>
			<<include "New Slave Intro">>
		<</replace>>
	<</link>> //This will cost <<print cashFormat(_ContractCost)>> and give you the servant as a slave//
<<default>>
	<<link "Privately inform both parties you'll settle this in favor of the most generous">>
		<<replace "#result">>
		You privately inform both parties you'll settle this in favor of the most generous. You instantly receive two notices of escrow payment contingent on the case going the payer's way. You select the @@.yellowgreen;bigger of the two@@ and decide the matter before returning to bed in a good mood. However, the next day it becomes apparent that although he isn't stupid enough to make a public accusation of corruption, the buyer is furious at paying virgin prices for a defiled slave, and is privately @@.red;slandering@@ your administration of justice.
		<<run repX(-100, "event")>>
		<<run cashX(random(150,200)*10, "event")>>
		<</replace>>
	<</link>>

<<link "Settle the dispute in favor of the prospective buyer">>
		<<replace "#result">>
		What's most important is the justice of the outcome. You settle the dispute in favor of the buyer, who would otherwise be forced to buy something he did not mean to pay for. He lets it be known far and wide that you are willing to stand up for what's right, no matter what and no matter who, @@.green;improving@@ your reputation. The angry seller, now afflicted with a devalued slave in addition to a bad headache, lets his group of friends know that social superiors have no advantage at justice here. They become more reticent about deal-making in your arcology, @@.red;damaging@@ its prosperity.
		<<set $arcologies[0].prosperity -= 5>>
		<<run repX(2500, "event")>>
		<</replace>>
	<</link>>

<<link "Settle the dispute in favor of the prominent slaveowner">>
		<<replace "#result">>
		A deal is a deal; buyer beware. You settle the dispute in favor of the slaveowner. He lets it be known amongst his peers that you do not let social inferiors insist on justice against their betters. Citizens of quality become more willing to consider deal-making in your arcology, @@.green;increasing prosperity.@@ On the other hand, the angry buyer shows himself to be not a person to treat lightly, either; he maintains a @@.red;malicious@@ whispering campaign to the effect that your administration of justice is fatally biased.
		<<set $arcologies[0].prosperity += 5>>
		<<run repX(-500, "event")>>
		<</replace>>
	<</link>>

<<link "Offer to buy out the contract">>
		<<run cashX(forceNeg(_ContractCost), "slaveTransfer")>>
		<<replace "#result">>
		You offer to simply buy out the contract, taking the slave for yourself. This lets the buyer out of buying $him, and the slaveowner gets his money; but it soon becomes apparent that what both of them were really looking for is an opportunity to put one over on the other. Neither is pleased to be denied a petty victory, but they both have the sense to keep their mouths shut. The poor slave, meanwhile, appears in the penthouse entryway, @@.hotpink;hopeful@@ that $he's been lucky enough to end up in a less abusive situation.

		<<include "New Slave Intro">>
		<</replace>>
	<</link>> //This will cost <<print cashFormat(_ContractCost)>> and give you the slave//
<</switch>>


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

<<set $nextButton = "Back", $nextLink = "Brothel", $encyclopedia = "Madam">>
<<if ($MadamID != 0)>>
	<<setLocalPronouns _S.Madam>>
	<<= SlaveFullName(_S.Madam)>> is serving as your Madam.

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

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

[[None|Brothel][removeJob(_S.Madam, "be the Madam")]]

<<includeDOM App.UI.SlaveList.facilityManagerSelection(App.Entity.facilities.brothel, "Brothel")>>

repo_name: NovX/fc

license: mit


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

/* make sure the first thing that happens is the error check */
<<set _errors = App.MainView.errors()>>

<>

<<if $tabChoice.SlaveInteract != 'Description'>>
	<<set $tabChoice.SlaveInteract = 'Description'>>
<</if>>

<<run penthouseCensus()>>

<<set $nextButton = "END WEEK", $nextLink = "End Week", $encyclopedia = "How to Play">>
<<set $costs = Math.trunc(calculateCosts.predict())>>

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

<<run SlaveSort.slaves($slaves)>>

<<if $newModelUI == 1>>

	<>
<</if>>

<<if $seeArcology == 1>>

	<>
<</if>>

<<if $seeDesk == 1>>
	<<include "Office Description">>
	[[Hide|Main][$seeDesk = 0]]
<</if>>

<<includeDOM App.MainView.full()>>

<<set $activeSlave = $slaves.random()>>
<<if $activeSlave && ($activeSlave.assignment != "please you") && ($activeSlave.assignment != "guard you")>>

//<<= walkPast($activeSlave)>>//
<</if>>
<<if ($debugMode == 1)>>
	//| [[Show all walk past scenes|Walk Past List]]//
<</if>>

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


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

<<set $nextButton = "Back", $nextLink = "Main", $encyclopedia = "The X-Series Arcology">>

<<if $cheatMode == 1>>

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

<</if>>

	<>

	<>

Arcology Ownership

		<<run App.Arcology.updateOwnership()>>
		<<= ownershipReport({sidebar: false})>>

<<if FutureSocieties.availCredits() > 0>>

		$arcologies[0].name's society is ready to begin accepting a new societal direction.

<</if>>

Construction

	<<if $arcologyUpgrade.drones != 1>>

			The first major upgrade needed is the installation of a drone security system so higher-class citizens will feel safe and protected should they choose to immigrate. This upgrade will cost <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>.

		<<link "Install drone security system" "Manage Arcology">>
			<<run cashX(-Math.trunc(5000*$upgradeMultiplierArcology), "capEx")>>
			<<set $arcologyUpgrade.drones = 1, $PC.skill.engineering += 1>>
			<<if $secExpEnabled > 0>>
				<<set $secBots = App.SecExp.generateUnit("bots")>>
			<</if>>
		<</link>>
	<<elseif $arcologyUpgrade.hydro != 1>>

			The next major upgrade needed is the installation of a better water reclamation system so your residents will have access to cheaper water and hydroponically grown food. This upgrade will cost <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>.

		[[Upgrade water reclamation system|Manage Arcology][cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx"), $arcologyUpgrade.hydro = 1, $PC.skill.engineering += 1]]
	<<elseif $arcologyUpgrade.apron != 1>>

			The next major upgrade needed is the installation of a broader apron at the bottom of the arcology to increase its surface area and gather more solar energy. Right now, tenants that use a lot of power have to import it from outside. This upgrade will cost <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>>.

		[[Install solar apron|Manage Arcology][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $arcologyUpgrade.apron = 1, $PC.skill.engineering += 1]]
	<<elseif $arcologyUpgrade.grid != 1>>

			The next major upgrade needed is an improvement of the arcology's electrical transmission lines to make efficient use of the additional power from the solar apron. This upgrade will cost <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>>.

		[[Upgrade transmission lines|Manage Arcology][cashX(forceNeg(Math.trunc(50000*$upgradeMultiplierArcology)), "capEx"), $arcologyUpgrade.grid = 1, $PC.skill.engineering += 1]]
	<<else>>

			The arcology's public areas are fully upgraded.

		<<includeDOM App.Arcology.upgrades($building)>>
	<</if>>

	<<if $weatherCladding == 0>>

			Extreme weather is becoming common worldwide. The arcology's exterior can be hardened to reduce damage in case of heavy weather, but this will reduce its beauty somewhat and will cost <<print cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>>.
			Your citizens are
			<<if $weatherAwareness == 0>>
				likely to disapprove of this measure as alarmism.
			<<else>>
				concerned that this measure has not been taken already.
			<</if>>

		[[Apply weather cladding|Manage Arcology][cashX(forceNeg(Math.trunc(50000*$upgradeMultiplierArcology)), "capEx"), $weatherCladding = 1, $PC.skill.engineering += 1]]
	<<elseif $weatherCladding == 1 && $building.sections.length > 0>>
		The arcology's exterior is jacketed with unsightly but sturdy weather cladding. Your arcology is so prosperous that remodeling the cladding into something beautiful is within the realm of possibility. This massive project will cost <<print cashFormat(Math.trunc(3500000*$upgradeMultiplierArcology))>> and without a doubt render your arcology one of the wonders of the world.
		[[Remodel weather cladding|Manage Arcology][cashX(forceNeg(Math.trunc(3500000*$upgradeMultiplierArcology)), "capEx"), $weatherCladding = 2, $PC.skill.engineering += 1]]
	<<elseif $weatherCladding == 1>>

			The arcology's exterior is jacketed with unsightly but sturdy weather cladding.

	<<elseif $weatherCladding == 2>>

			The arcology's exterior is jacketed with gorgeously sculpted and fully functional weather cladding.

	<</if>>

	<<if $FCTV.receiver > -1 && !$FCTV.weekEnabled>>
		<<set _noSub = Math.trunc(25000*$upgradeMultiplierArcology*$HackingSkillMultiplier)>>
		<<set _lightSub = Math.trunc(20000*$upgradeMultiplierArcology*$HackingSkillMultiplier)>>
		<<set _heavySub = Math.trunc(10000*$upgradeMultiplierArcology*$HackingSkillMultiplier)>>

		You have not installed an FCTV receiver.
		Installing this receiver yourself will cost <<print cashFormat(_noSub)>>.
		You can have your citizens pay for the fiber optic upgrades, reducing the cost to <<print cashFormat(_lightSub)>>.
		You can also have them heavily subsidize installation, they will be upset about it, but it will only cost <<print cashFormat(_heavySub)>>.

		<<link "No subsidy" "Manage Arcology">>
			<<set $FCTV.receiver = 1, $FCTV.weekEnabled = $week, $PC.skill.hacking += 1>>
			<<run FCTV.initChannels()>>
			<<run cashX(forceNeg(_noSub), "capEx")>>
			<<run repX(500, "capEx")>>
		<</link>>
		|
		<<link "Light subsidy" "Manage Arcology">>
			<<set $FCTV.receiver = 1, $FCTV.weekEnabled = $week, $PC.skill.hacking += 1>>
			<<run FCTV.initChannels()>>
			<<run cashX(forceNeg(_lightSub), "capEx")>>
			/* No rep change */
		<</link>>
		|
		<<link "Heavy subsidy" "Manage Arcology">>
			<<set $FCTV.receiver = 1, $FCTV.weekEnabled = $week, $PC.skill.hacking += 1>>
			<<run FCTV.initChannels()>>
			<<run cashX(forceNeg(Math.trunc(_heavySub), "capEx")>>
			<<run repX(-1500, "capEx")>>
		<</link>>
	<<elseif ($FCTV.receiver == 3)>>
		You have installed the FCTV receiver and have access to the full range of FCTV's programs. High viewership rates amongst your citizens makes it easier to pursue your societal goals.
	<<elseif ($FCTV.receiver == 2)>>
		You have installed the FCTV receiver and have access to the full range of FCTV's programs. Decent viewership rates amongst your citizens makes it somewhat easier to pursue your societal goals.
	<<elseif ($FCTV.receiver == 1)>>
		You have installed the FCTV receiver and have access to the full range of FCTV's programs. Low viewership rates amongst your citizens limits the impact of FCTV on your societal goals.
	<</if>>

	<<if ($PC.skill.engineering >= 100) || ($PC.career == "arcology owner")>>

			Arcology upgrades are less expensive due to your

				<<if $PC.career == "arcology owner">>experience in the Free Cities<<else>>arcology engineering training<</if>>.

	<</if>>

<<if $secExpEnabled == 0>>
	<<if $weatherAwareness > 0>>

		<<if $antiWeatherFreeze == 0>>
			The extreme weather hurts your arcology's ability to function. Reinforcing your passenger terminals increase the weather range at which they can operate.

				Reinforcing passenger terminals costs <<print cashFormat(50000)>> and increase upkeep. [[Reinforce|Manage Arcology][$antiWeatherFreeze = 1, cashX(-50000, "capEx")]]

		<<elseif $antiWeatherFreeze == 1>>
			You have reinforced your passenger terminals to function even during bad weather. You can invest into all-weather transportation to remain functional no matter what.

				Investing in all-weather transportation costs <<print cashFormat(100000)>> and increase upkeep. [[Invest|Manage Arcology][$antiWeatherFreeze = 2, cashX(-100000, "capEx")]]

		<<elseif $antiWeatherFreeze == 2>>
			Your arcology's passenger terminals remain fully operational even during the most extreme weather.
		<</if>>

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

<<if $secExpEnabled > 0>>

Security

		<<if !$SecExp.buildings.propHub>>
			[[Set up the propaganda Hub|Manage Arcology][cashX(forceNeg(Math.trunc((5000*$upgradeMultiplierArcology*$HackingSkillMultiplier))), "capEx"), App.SecExp.propHub.Init(), $PC.skill.engineering += 1, $PC.skill.hacking += 1]]

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

Building specialized in the management of authority.

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

		<<if $secHQ == 0>>
			[[Set up the security headquarters|Manage Arcology][cashX(forceNeg(Math.trunc((5000*$upgradeMultiplierArcology*$HackingSkillMultiplier))), "capEx"), $secHQ = 1, $PC.skill.engineering += 1, $PC.skill.hacking += 1]]

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

Building specialized in the management of security and crime.

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

		<<if !$SecExp.buildings.barracks>>
			[[Set up the barracks|Manage Arcology][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), App.SecExp.barracks.Init(), $PC.skill.engineering += 1]]

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

Building specialized in the management of armed forces.

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

		<<if $riotCenter == 0 && $SecExp.settings.rebellion.enabled == 1>>
			[[Set up the riot control center|Manage Arcology][cashX(forceNeg(Math.trunc(5000*$upgradeMultiplierArcology)), "capEx"), $riotCenter = 1, $PC.skill.engineering += 1]]

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

Building specialized in the management and suppression of rebellions.

		<<elseif $SecExp.settings.rebellion.enabled == 1>>
			The [[Riot Control Center|riotControlCenter]] stands ready for action.
		<</if>>

<</if>>

<<if $difficultySwitch == 1>>

Disaster Response

		<<if $econWeatherDamage > 0>>
			The recent terrible weather has damaged the local infrastructure. It is reducing the local economy score by <<print $econWeatherDamage>>.

			<<if $disasterResponse == 0>>
				Locals will do their best to repair the damage on their own, but setting up a disaster response unit will improve the recovery of infrastructure critical for keeping goods, people and information flowing smoothly in and out of your arcology.

					Creating the unit will cost <<print cashFormat(50000)>> and incur upkeep. [[Create Disaster Response Unit|Manage Arcology][cashX(-50000, "capEx"), $disasterResponse = 1]]

			<<elseif $disasterResponse == 1>>
				You are sending your disaster response unit to repair critical infrastructure. They are doing what they can.

					The unit can be made more effective with an additional investment of <<print cashFormat(100000)>>. This will also increase upkeep. [[Improve Disaster Response Unit|Manage Arcology][cashX(-100000, "capEx"), $disasterResponse = 2]]

			<<else>>
				Your highly capable disaster response unit is rapidly repairing the weather damage.
			<</if>>

		<<elseif $disasterResponse > 0>>
			Your disaster response unit is idle. It will not cost you any upkeep this week.
		<</if>>

<</if>>

<<if $foodMarket > 0>>

Food Management

		<<include "Food Market">>

<</if>>

Sexual Service Policies

		If so desired, your assistant can help you manipulate the business environment within your arcology.

		Currently outside parties are providing <<print $NPCMarketShare.lowerClass/10>>%, <<print $NPCMarketShare.middleClass/10>>%, <<print $NPCMarketShare.upperClass/10>>% and <<print $NPCMarketShare.topClass/10>>% of the sexual services for the lower, middle, upper and top class respectively.

	<<if $sexSubsidies.lowerClass == 0>>
		You can provide a minor subsidy for those selling sexual services to the lower class. Upkeep is relative to the amount of sex provided by other parties. [[Minor Subsidy|Manage Arcology][$sexSubsidies.lowerClass = 1]]
	<<elseif $sexSubsidies.lowerClass == 1>>
		You are providing a minor subsidy for those selling sexual services to the lower class. Upkeep is relative to the amount of sex provided by other parties. [[Cancel Subsidy|Manage Arcology][$sexSubsidies.lowerClass = 0]] | [[Moderate Subsidy|Manage Arcology][$sexSubsidies.lowerClass = 2]]
	<<elseif $sexSubsidies.lowerClass == 2>>
		You are providing a moderate subsidy for those selling sexual services to the lower class. Upkeep is relative to the amount of sex provided by other parties. [[Minor Subsidy|Manage Arcology][$sexSubsidies.lowerClass = 1]] | [[Substantial Subsidy|Manage Arcology][$sexSubsidies.lowerClass = 3]]
	<<elseif $sexSubsidies.lowerClass == 3>>
		You are providing a substantial subsidy for those selling sexual services to the lower class. Upkeep is relative to the amount of sex provided by other parties. [[Moderate Subsidy|Manage Arcology][$sexSubsidies.lowerClass = 2]] | [[Gratuitous Subsidy|Manage Arcology][$sexSubsidies.lowerClass = 4]]
	<<else>>
		You are providing a gratuitous subsidy for those selling sexual services to the lower class. Upkeep is relative to the amount of sex provided by other parties [[Substantial Subsidy|Manage Arcology][$sexSubsidies.lowerClass = 3]]
	<</if>>

	<<if $sexSupplyBarriers.lowerClass == 0>>
		You can make things more difficult for those supplying sexual services in the lower class segment if you are willing to spend 1000 reputation and pay a flat upkeep of <<print cashFormat(1000)>>. <<if $rep > 1000>>[[Create Bureaucracy|Manage Arcology][$sexSupplyBarriers.lowerClass = 1, repX(-1000, "subsidiesAndBarriers")]] <<else>>You are not reputable enough.<</if>>
	<<elseif $sexSupplyBarriers.lowerClass == 1>>
		You have forced some unneeded bureaucracy on those selling sexual services to the lower class making things a little more difficult. If you are willing to spend 1000 reputation you can change this policy. Increasing the bureaucracy further will cost a flat upkeep of <<print cashFormat(5000)>>. <<if $rep > 1000>>[[Abolish Bureaucracy|Manage Arcology][$sexSupplyBarriers.lowerClass = 0, repX(-1000, "subsidiesAndBarriers")]] | [[Increase Bureaucracy|Manage Arcology][$sexSupplyBarriers.lowerClass = 2, repX(-1000, "subsidiesAndBarriers")]]<<else>>You are not reputable enough.<</if>>
	<<elseif $sexSupplyBarriers.lowerClass == 2>>
		You have forced considerable bureaucracy on those selling sexual services to the lower class making things a little more difficult. If you are willing to spend 1000 reputation you can change this policy. Increasing the bureaucracy further will cost a flat upkeep of <<print cashFormat(20000)>>. <<if $rep > 1000>>[[Reduce Bureaucracy|Manage Arcology][$sexSupplyBarriers.lowerClass = 1, repX(-1000, "subsidiesAndBarriers")]] | [[Increase Bureaucracy|Manage Arcology][$sexSupplyBarriers.lowerClass = 3, repX(-1000, "subsidiesAndBarriers")]]<<else>>You are not reputable enough.<</if>>
	<<elseif $sexSupplyBarriers.lowerClass == 3>>
		You have forced stifling bureaucracy on those selling sexual services to the lower class making things a little more difficult. If you are willing to spend 1000 reputation you can change this policy. Increasing the bureaucracy further will cost a flat upkeep of <<print cashFormat(60000)>>. <<if $rep > 1000>>[[Reduce Bureaucracy|Manage Arcology][$sexSupplyBarriers.lowerClass = 2, repX(-1000, "subsidiesAndBarriers")]] | [[Increase Bureaucracy|Manage Arcology][$sexSupplyBarriers.lowerClass = 4, repX(-1000, "subsidiesAndBarriers")]]<<else>>You are not reputable enough.<</if>>
	<<else>>
		You have forced suffocating bureaucracy on those selling sexual services to the lower class making things a little more difficult. If you are willing to spend 1000 reputation you can change this policy. <<if $rep > 1000>>[[Reduce Bureaucracy|Manage Arcology][$sexSupplyBarriers.lowerClass = 3, repX(-1000, "subsidiesAndBarriers")]]<<else>>You are not reputable enough.<</if>>
	<</if>>

	<<if $sexSubsidies.middleClass == 0>>
		You can provide a minor subsidy for those selling sexual services to the middle class. Upkeep is relative to the amount of sex provided by other parties. [[Minor Subsidy|Manage Arcology][$sexSubsidies.middleClass = 1]]
	<<elseif $sexSubsidies.middleClass == 1>>
		You are providing a minor subsidy for those selling sexual services to the middle class. Upkeep is relative to the amount of sex provided by other parties. [[Cancel Subsidy|Manage Arcology][$sexSubsidies.middleClass = 0]] | [[Moderate Subsidy|Manage Arcology][$sexSubsidies.middleClass = 2]]
	<<elseif $sexSubsidies.middleClass == 2>>
		You are providing a moderate subsidy for those selling sexual services to the middle class. Upkeep is relative to the amount of sex provided by other parties. [[Minor Subsidy|Manage Arcology][$sexSubsidies.middleClass = 1]] | [[Substantial Subsidy|Manage Arcology][$sexSubsidies.middleClass = 3]]
	<<elseif $sexSubsidies.middleClass == 3>>
		You are providing a substantial subsidy for those selling sexual services to the middle class. Upkeep is relative to the amount of sex provided by other parties. [[Moderate Subsidy|Manage Arcology][$sexSubsidies.middleClass = 2]] | [[Gratuitous Subsidy|Manage Arcology][$sexSubsidies.middleClass = 4]]
	<<else>>
		You are providing a gratuitous subsidy for those selling sexual services to the middle class. Upkeep is relative to the amount of sex provided by other parties [[Substantial Subsidy|Manage Arcology][$sexSubsidies.middleClass = 3]]
	<</if>>

	<<if $sexSupplyBarriers.middleClass == 0>>
		You can make things more difficult for those supplying sexual services in the middle class segment if you are willing to spend 1000 reputation and pay a flat upkeep of <<print cashFormat(1000)>>. <<if $rep > 1000>>[[Create Bureaucracy|Manage Arcology][$sexSupplyBarriers.middleClass = 1, repX(-1000, "subsidiesAndBarriers")]] <<else>>You are not reputable enough.<</if>>
	<<elseif $sexSupplyBarriers.middleClass == 1>>
		You have forced some unneeded bureaucracy on those selling sexual services to the middle class making things a little more difficult. If you are willing to spend 1000 reputation you can change this policy. Increasing the bureaucracy further will cost a flat upkeep of <<print cashFormat(5000)>>. <<if $rep > 1000>>[[Abolish Bureaucracy|Manage Arcology][$sexSupplyBarriers.middleClass = 0, repX(-1000, "subsidiesAndBarriers")]] | [[Increase Bureaucracy|Manage Arcology][$sexSupplyBarriers.middleClass = 2, repX(-1000, "subsidiesAndBarriers")]]<<else>>You are not reputable enough.<</if>>
	<<elseif $sexSupplyBarriers.middleClass == 2>>
		You have forced considerable bureaucracy on those selling sexual services to the middle class making things a little more difficult. If you are willing to spend 1000 reputation you can change this policy. Increasing the bureaucracy further will cost a flat upkeep of <<print cashFormat(20000)>>. <<if $rep > 1000>>[[Reduce Bureaucracy|Manage Arcology][$sexSupplyBarriers.middleClass = 1, repX(-1000, "subsidiesAndBarriers")]] | [[Increase Bureaucracy|Manage Arcology][$sexSupplyBarriers.middleClass = 3, repX(-1000, "subsidiesAndBarriers")]]<<else>>You are not reputable enough.<</if>>
	<<elseif $sexSupplyBarriers.middleClass == 3>>
		You have forced stifling bureaucracy on those selling sexual services to the middle class making things a little more difficult. If you are willing to spend 1000 reputation you can change this policy. Increasing the bureaucracy further will cost a flat upkeep of <<print cashFormat(60000)>>. <<if $rep > 1000>>[[Reduce Bureaucracy|Manage Arcology][$sexSupplyBarriers.middleClass = 2, repX(-1000, "subsidiesAndBarriers")]] | [[Increase Bureaucracy|Manage Arcology][$sexSupplyBarriers.middleClass = 4, repX(-1000, "subsidiesAndBarriers")]]<<else>>You are not reputable enough.<</if>>
	<<else>>
		You have forced suffocating bureaucracy on those selling sexual services to the middle class making things a little more difficult. If you are willing to spend 1000 reputation you can change this policy. <<if $rep > 1000>>[[Reduce Bureaucracy|Manage Arcology][$sexSupplyBarriers.middleClass = 3, repX(-1000, "subsidiesAndBarriers")]]<<else>>You are not reputable enough.<</if>>
	<</if>>

	<<if $sexSubsidies.upperClass == 0>>
		You can provide a minor subsidy for those selling sexual services to the upper class. Upkeep is relative to the amount of sex provided by other parties. [[Minor Subsidy|Manage Arcology][$sexSubsidies.upperClass = 1]]
	<<elseif $sexSubsidies.upperClass == 1>>
		You are providing a minor subsidy for those selling sexual services to the upper class. Upkeep is relative to the amount of sex provided by other parties. [[Cancel Subsidy|Manage Arcology][$sexSubsidies.upperClass = 0]] | [[Moderate Subsidy|Manage Arcology][$sexSubsidies.upperClass = 2]]
	<<elseif $sexSubsidies.upperClass == 2>>
		You are providing a moderate subsidy for those selling sexual services to the upper class. Upkeep is relative to the amount of sex provided by other parties. [[Minor Subsidy|Manage Arcology][$sexSubsidies.upperClass = 1]] | [[Substantial Subsidy|Manage Arcology][$sexSubsidies.upperClass = 3]]
	<<elseif $sexSubsidies.upperClass == 3>>
		You are providing a substantial subsidy for those selling sexual services to the upper class. Upkeep is relative to the amount of sex provided by other parties. [[Moderate Subsidy|Manage Arcology][$sexSubsidies.upperClass = 2]] | [[Gratuitous Subsidy|Manage Arcology][$sexSubsidies.upperClass = 4]]
	<<else>>
		You are providing a gratuitous subsidy for those selling sexual services to the upper class. Upkeep is relative to the amount of sex provided by other parties. [[Substantial Subsidy|Manage Arcology][$sexSubsidies.upperClass = 3]]
	<</if>>

	<<if $sexSupplyBarriers.upperClass == 0>>
		You can make things more difficult for those supplying sexual services in the upper class segment if you are willing to spend 1000 reputation and pay a flat upkeep of <<print cashFormat(1000)>>. <<if $rep > 1000>>[[Create Bureaucracy|Manage Arcology][$sexSupplyBarriers.upperClass = 1, repX(-1000, "subsidiesAndBarriers")]] <<else>>You are not reputable enough.<</if>>
	<<elseif $sexSupplyBarriers.upperClass == 1>>
		You have forced some unneeded bureaucracy on those selling sexual services to the upper class making things a little more difficult. If you are willing to spend 1000 reputation you can change this policy. Increasing the bureaucracy further will cost a flat upkeep of <<print cashFormat(5000)>>. <<if $rep > 1000>>[[Abolish Bureaucracy|Manage Arcology][$sexSupplyBarriers.upperClass = 0, repX(-1000, "subsidiesAndBarriers")]] | [[Increase Bureaucracy|Manage Arcology][$sexSupplyBarriers.upperClass = 2, repX(-1000, "subsidiesAndBarriers")]]<<else>>You are not reputable enough<</if>>
	<<elseif $sexSupplyBarriers.upperClass == 2>>
		You have forced considerable bureaucracy on those selling sexual services to the upper class making things a little more difficult. If you are willing to spend 1000 reputation you can change this policy. Increasing the bureaucracy further will cost a flat upkeep of <<print cashFormat(20000)>>. <<if $rep > 1000>>[[Reduce Bureaucracy|Manage Arcology][$sexSupplyBarriers.upperClass = 1, repX(-1000, "subsidiesAndBarriers")]] | [[Increase Bureaucracy|Manage Arcology][$sexSupplyBarriers.upperClass = 3, repX(-1000, "subsidiesAndBarriers")]]<<else>>You are not reputable enough.<</if>>
	<<elseif $sexSupplyBarriers.upperClass == 3>>
		You have forced stifling bureaucracy on those selling sexual services to the upper class making things a little more difficult. If you are willing to spend 1000 reputation you can change this policy. Increasing the bureaucracy further will cost a flat upkeep of <<print cashFormat(60000)>>. <<if $rep > 1000>>[[Reduce Bureaucracy|Manage Arcology][$sexSupplyBarriers.upperClass = 2, repX(-1000, "subsidiesAndBarriers")]] | [[Increase Bureaucracy|Manage Arcology][$sexSupplyBarriers.upperClass = 4, repX(-1000, "subsidiesAndBarriers")]]<<else>>You are not reputable enough.<</if>>
	<<else>>
		You have forced suffocating bureaucracy on those selling sexual services to the upper class making things a little more difficult. If you are willing to spend 1000 reputation you can change this policy. <<if $rep > 1000>>[[Reduce Bureaucracy|Manage Arcology][$sexSupplyBarriers.upperClass = 3, repX(-1000, "subsidiesAndBarriers")]]<<else>>You are not reputable enough.<</if>>
	<</if>>

	<<if $sexSubsidies.topClass == 0>>
		You can provide a minor subsidy for those selling sexual services to the millionaires. Upkeep is relative to the amount of sex provided by other parties. [[Minor Subsidy|Manage Arcology][$sexSubsidies.topClass = 1]]
	<<elseif $sexSubsidies.topClass == 1>>
		You are providing a minor subsidy for those selling sexual services to the millionaires. Upkeep is relative to the amount of sex provided by other parties. [[Cancel Subsidy|Manage Arcology][$sexSubsidies.topClass = 0]] | [[Moderate Subsidy|Manage Arcology][$sexSubsidies.topClass = 2]]
	<<elseif $sexSubsidies.topClass == 2>>
		You are providing a moderate subsidy for those selling sexual services to the millionaires. Upkeep is relative to the amount of sex provided by other parties. [[Minor Subsidy|Manage Arcology][$sexSubsidies.topClass = 1]] | [[Substantial Subsidy|Manage Arcology][$sexSubsidies.topClass = 3]]
	<<elseif $sexSubsidies.topClass == 3>>
		You are providing a substantial subsidy for those selling sexual services to the millionaires. Upkeep is relative to the amount of sex provided by other parties [[Moderate Subsidy|Manage Arcology][$sexSubsidies.topClass = 2]] | [[Gratuitous Subsidy|Manage Arcology][$sexSubsidies.topClass = 4]]
	<<else>>
		You are providing a gratuitous subsidy for those selling sexual services to the millionaires. Upkeep is relative to the amount of sex provided by other parties [[Substantial Subsidy|Manage Arcology][$sexSubsidies.topClass = 3]]
	<</if>>

	<<if $sexSupplyBarriers.topClass == 0>>
		You can make things more difficult for those supplying sexual services in the millionaires segment if you are willing to spend 1000 reputation and pay a flat upkeep of <<print cashFormat(1000)>>. <<if $rep > 1000>>[[Create Bureaucracy|Manage Arcology][$sexSupplyBarriers.topClass = 1, repX(-1000, "subsidiesAndBarriers")]] <<else>>You are not reputable enough.<</if>>
	<<elseif $sexSupplyBarriers.topClass == 1>>
		You have forced some unneeded bureaucracy on those selling sexual services to the millionaires making things a little more difficult. If you are willing to spend 1000 reputation you can change this policy. Increasing the bureaucracy further will cost a flat upkeep of <<print cashFormat(5000)>>. <<if $rep > 1000>>[[Abolish Bureaucracy|Manage Arcology][$sexSupplyBarriers.topClass = 0, repX(-1000, "subsidiesAndBarriers")]] | [[Increase Bureaucracy|Manage Arcology][$sexSupplyBarriers.topClass = 2, repX(-1000, "subsidiesAndBarriers")]]<<else>>You are not reputable enough.<</if>>
	<<elseif $sexSupplyBarriers.topClass == 2>>
		You have forced considerable bureaucracy on those selling sexual services to the millionaires making things a little more difficult. If you are willing to spend 1000 reputation you can change this policy. Increasing the bureaucracy further will cost a flat upkeep of <<print cashFormat(20000)>>. <<if $rep > 1000>>[[Reduce Bureaucracy|Manage Arcology][$sexSupplyBarriers.topClass = 1, repX(-1000, "subsidiesAndBarriers")]] | [[Increase Bureaucracy|Manage Arcology][$sexSupplyBarriers.topClass = 3, repX(-1000, "subsidiesAndBarriers")]]<<else>>You are not reputable enough<</if>>
	<<elseif $sexSupplyBarriers.topClass == 3>>
		You have forced stifling bureaucracy on those selling sexual services to the millionaires making things a little more difficult. If you are willing to spend 1000 reputation you can change this policy. Increasing the bureaucracy further will cost a flat upkeep of <<print cashFormat(60000)>>. <<if $rep > 1000>>[[Reduce Bureaucracy|Manage Arcology][$sexSupplyBarriers.topClass = 2, repX(-1000, "subsidiesAndBarriers")]] | [[Increase Bureaucracy|Manage Arcology][$sexSupplyBarriers.topClass = 4, repX(-1000, "subsidiesAndBarriers")]]<<else>>You are not reputable enough.<</if>>
	<<else>>
		You have forced suffocating bureaucracy on those selling sexual services to the millionaires making things a little more difficult. If you are willing to spend 1000 reputation you can change this policy. <<if $rep > 1000>>[[Reduce Bureaucracy|Manage Arcology][$sexSupplyBarriers.topClass = 3, repX(-1000, "subsidiesAndBarriers")]]<<else>>You are not reputable enough<</if>>
	<</if>>

Population and Rent

	<<print $arcologies[0].name>> is home to the following;
	<<set _percACitizens = Math.trunc(($ACitizens / ($ACitizens + $ASlaves)) * 1000) / 10,
	_percASlaves = Math.trunc(($ASlaves / ($ACitizens + $ASlaves)) * 1000) / 10,
	_percLowerClass = Math.trunc(($lowerClass / ($ACitizens + $ASlaves)) * 1000) / 10,
	_percMiddleClass = Math.trunc(($middleClass / ($ACitizens + $ASlaves)) * 1000) / 10,
	_percUpperClass = Math.trunc(($upperClass / ($ACitizens + $ASlaves)) * 1000) / 10,
	_percTopClass = Math.trunc(($topClass / ($ACitizens + $ASlaves)) * 1000) / 10,
	_rentLowerClass = Math.trunc($rent.lowerClass * (1 + (5 - $baseDifficulty) / 20) / 0.25) / 100,
	_rentMiddleClass = Math.trunc($rent.middleClass * (1 + (5 - $baseDifficulty) / 20) / 0.25) / 100,
	_rentUpperClass = Math.trunc($rent.upperClass * (1 + (5 - $baseDifficulty) / 20) / 25),
	_rentTopClass = Math.trunc($rent.topClass * (1 + (5 - $baseDifficulty) / 20) / 25)>>

	Lower Class Citizens | $lowerClass | <<print _percLowerClass>>% | Rent <<print cashFormat(_rentLowerClass)>>
	<<if $rent.lowerClass > $rentDefaults.lowerClass * 1.5>>
		Very High | [[Decrease|Manage Arcology][$rent.lowerClass = $rentDefaults.lowerClass * 1.5, $rentEffectL = 0.94, $whoreBudget.lowerClass *= 9 / 8]]
	<<elseif $rent.lowerClass > $rentDefaults.lowerClass>>
		High | [[Increase|Manage Arcology][$rent.lowerClass = $rentDefaults.lowerClass * 2, $rentEffectL = 0.85, $whoreBudget.lowerClass *= 8 / 9]] | [[Decrease|Manage Arcology][$rent.lowerClass = $rentDefaults.lowerClass, $rentEffectL = 1, $whoreBudget.lowerClass *= 10 / 9]]
	<<elseif $rent.lowerClass > $rentDefaults.lowerClass * 0.5>>
		Average | [[Increase|Manage Arcology][$rent.lowerClass = $rentDefaults.lowerClass * 1.5, $rentEffectL = 0.94, $whoreBudget.lowerClass *= 9 / 10]] | [[Decrease|Manage Arcology][$rent.lowerClass = $rentDefaults.lowerClass * 0.5, $rentEffectL = 1.04, $whoreBudget.lowerClass *= 11 / 10]]
	<<elseif $rent.lowerClass > 0>>
		Low | [[Increase|Manage Arcology][$rent.lowerClass = $rentDefaults.lowerClass, $rentEffectL = 1, $whoreBudget.lowerClass *= 10 / 11]] | [[Free Rent|Manage Arcology][$rent.lowerClass = 0, $rentEffectL = 1.1, $whoreBudget.lowerClass *= 12 / 11]]
	<<else>>
		Free | [[Increase|Manage Arcology][$rent.lowerClass = $rentDefaults.lowerClass * 0.5, $rentEffectL = 1.04, $whoreBudget.lowerClass *= 11 / 12]]
	<</if>>

	Middle Class Citizens | $middleClass | <<print _percMiddleClass>>% | Rent <<print cashFormat(_rentMiddleClass)>>
	<<if $rent.middleClass > $rentDefaults.middleClass * 1.5>>
		Very High | [[Decrease|Manage Arcology][$rent.middleClass = $rentDefaults.middleClass * 1.5, $rentEffectM = 0.94, $whoreBudget.middleClass *= 9 / 8]]
	<<elseif $rent.middleClass > $rentDefaults.middleClass>>
		High | [[Increase|Manage Arcology][$rent.middleClass = $rentDefaults.middleClass * 2, $rentEffectM = 0.85, $whoreBudget.middleClass *= 8 / 9]] | [[Decrease|Manage Arcology][$rent.middleClass = $rentDefaults.middleClass, $rentEffectM = 1, $whoreBudget.middleClass *= 10 / 9]]
	<<elseif $rent.middleClass > $rentDefaults.middleClass * 0.5>>
		Average | [[Increase|Manage Arcology][$rent.middleClass = $rentDefaults.middleClass * 1.5, $rentEffectM = 0.94, $whoreBudget.middleClass *= 9 / 10]] | [[Decrease|Manage Arcology][$rent.middleClass = $rentDefaults.middleClass * 0.5, $rentEffectM = 1.04, $whoreBudget.middleClass *= 11 / 10]]
	<<elseif $rent.middleClass > 0>>
		Low | [[Increase|Manage Arcology][$rent.middleClass = $rentDefaults.middleClass, $rentEffectM = 1, $whoreBudget.middleClass *= 10 / 11]] | [[Free Rent|Manage Arcology][$rent.middleClass = 0, $rentEffectM = 1.1, $whoreBudget.middleClass *= 12 / 11]]
	<<else>>
		Free | [[Increase|Manage Arcology][$rent.middleClass = $rentDefaults.middleClass * 0.5, $rentEffectM = 1.04, $whoreBudget.middleClass *= 11 / 12]]
	<</if>>

	Upper Class Citizens | $upperClass | <<print _percUpperClass>>% | Rent <<print cashFormat(_rentUpperClass)>>
	<<if $rent.upperClass > $rentDefaults.upperClass * 1.5>>
		Very High | [[Decrease|Manage Arcology][$rent.upperClass = $rentDefaults.upperClass * 1.5, $rentEffectU = 0.94, $whoreBudget.upperClass *= 9 / 8]]
	<<elseif $rent.upperClass > $rentDefaults.upperClass>>
		High | [[Increase|Manage Arcology][$rent.upperClass = $rentDefaults.upperClass * 2, $rentEffectU = 0.85, $whoreBudget.upperClass *= 8 / 9]] | [[Decrease|Manage Arcology][$rent.upperClass = $rentDefaults.upperClass, $rentEffectU = 1, $whoreBudget.upperClass *= 10 / 9 ]]
	<<elseif $rent.upperClass > $rentDefaults.upperClass * 0.5>>
		Average | [[Increase|Manage Arcology][$rent.upperClass = $rentDefaults.upperClass * 1.5, $rentEffectU = 0.94, $whoreBudget.upperClass *= 9 / 10]] | [[Decrease|Manage Arcology][$rent.upperClass = $rentDefaults.upperClass * 0.5, $rentEffectU = 1.04, $whoreBudget.upperClass *= 11 / 10]]
	<<elseif $rent.upperClass > 0>>
		Low | [[Increase|Manage Arcology][$rent.upperClass = $rentDefaults.upperClass, $rentEffectU = 1, $whoreBudget.upperClass *= 10 / 11]] | [[Free Rent|Manage Arcology][$rent.upperClass = 0, $rentEffectU = 1.1, $whoreBudget.upperClass *= 12 / 11]]
	<<else>>
		Free | [[Increase|Manage Arcology][$rent.upperClass = $rentDefaults.upperClass * 0.5, $rentEffectU = 1.04, $whoreBudget.upperClass *= 11 / 12]]
	<</if>>

	Millionaires | $topClass | <<print _percTopClass>>% | Rent <<print cashFormat(_rentTopClass)>>
	<<if $rent.topClass > $rentDefaults.topClass * 1.5>>
		Very High | [[Decrease|Manage Arcology][$rent.topClass = $rentDefaults.topClass * 1.5, $rentEffectT = 0.94, $whoreBudget.topClass *= 9 / 8]]
	<<elseif $rent.topClass > $rentDefaults.topClass>>
		High | [[Increase|Manage Arcology][$rent.topClass = $rentDefaults.topClass * 2, $rentEffectT = 0.85, $whoreBudget.topClass *= 8 / 9]] | [[Decrease|Manage Arcology][$rent.topClass = $rentDefaults.topClass, $rentEffectT = 1, $whoreBudget.topClass *= 10 / 9]]
	<<elseif $rent.topClass > $rentDefaults.topClass * 0.5>>
		Average | [[Increase|Manage Arcology][$rent.topClass = $rentDefaults.topClass * 1.5, $rentEffectT = 0.94, $whoreBudget.topClass *= 9 / 10]] | [[Decrease|Manage Arcology][$rent.topClass = $rentDefaults.topClass * 0.5, $rentEffectT = 1.04, $whoreBudget.topClass *= 11 / 10]]
	<<elseif $rent.topClass > 0>>
		Low | [[Increase|Manage Arcology][$rent.topClass = $rentDefaults.topClass, $rentEffectT = 1, $whoreBudget.topClass *= 10 / 11]] | [[Free Rent|Manage Arcology][$rent.topClass = 0, $rentEffectT = 1.1, $whoreBudget.topClass *= 12 / 11]]
	<<else>>
		Free | [[Increase|Manage Arcology][$rent.topClass = $rentDefaults.topClass * 0.5, $rentEffectT = 1.04, $whoreBudget.topClass *= 11 / 12]]
	<</if>>

		Slaves | $ASlaves | <<print _percASlaves>>%

Language

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

Special Arcology Upgrades

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

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

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

	<<if $assistant.personality > 0>>
		<<setAssistantPronouns>>
		<<= capFirstChar($assistant.name)>> is using an alternative personality setting, speaking in a sultry, sexual voice, and talking as though the penthouse's sex toys are _hisA body.
		<<if $assistant.personality > 1>>
			_HeA also has charge of all smart piercings in the arcology, and is using _hisA adaptations to sexual duties to improve their effectiveness.
		<</if>>
	<</if>>

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

	<<if $abortionsTotal > 0 && $miscarriagesTotal > 0>>
		They have had a total of <<print num($abortionsTotal)>> abortions and <<print num($miscarriagesTotal)>> miscarriages.
	<<elseif $abortionsTotal > 0>>
		They have had a total of <<print num($abortionsTotal)>> abortions.
	<<elseif $miscarriagesTotal > 0>>
		They have had a total of <<print num($miscarriagesTotal)>> miscarriages.
	<</if>>

	<<if $fuckdollsSold > 0>>
		$fuckdollsSold mindbroken arcade slaves have been converted into Fuckdolls and sold.
	<</if>>

<<if $pitFightsTotal > 0 && $pitKillsTotal > 0>>

	$arcologies[0].name has hosted <<print num ($pitFightsTotal)>> pit fights, and <<print num ($pitKillsTotal)>> slaves have died in your pit.

<<elseif $pitFightsTotal > 0>>

	$arcologies[0].name has hosted <<print num ($pitFightsTotal)>> pit fights.

<</if>>

<<if $secExpEnabled > 0 && $SecExp.settings.battle.enabled == 1>>

	<<if $SF.Toggle === 0||$SF.Active === 0>>
		Your army counts <<print num(App.SecExp.Manpower.employedOverall)>> total soldiers.
	<<elseif $SF.Toggle && $SF.Active >= 1>>
		Your army counts <<print num(App.SecExp.Manpower.employedOverall + $SF.ArmySize)>> total soldiers of which <<print num($SF.ArmySize)>> under the special force command and the rest under your direct control.
	<</if>>
	<<if $battlesCount > 0>>
		Your troops were involved in <<print num($battlesCount)>> battles of which <<print num($majorBattlesCount)>> were major engagements. You won
		<<if $battlesCount == $PCvictories>>
			all of them.
		<<elseif $battlesCount == $PClosses>>
			none of them.
		<<else>>
			<<print num($PCvictories)>> of them, while the enemy managed to gain the upper hand in the other <<print num($PClosses)>>.
		<</if>>
	<</if>>

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

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

<</if>>

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

<<if $experimental.dinnerParty == 1 && $seeExtreme == 1>>

		[[Host Dinner Party|Dinner Party Preparations]]

<</if>>


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