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>>
	<<include "Generate XX Slave">>
	<<set $activeSlave.origin = "She sold herself into slavery to buy medical care for her daughter.">>
	<<set $activeSlave.devotion = random(25,30)>>
	<<set $activeSlave.trust = $activeSlave.devotion-20>>
	<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
	<<set $activeSlave.health = random(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>>
	<<include "Generate XX Slave">>
	<<set $activeSlave.origin = "She was raised to be a mother.">>
	<<set $activeSlave.career = "a breeder">>
	<<set $activeSlave.devotion = random(10,25)>>
	<<set $activeSlave.trust = $activeSlave.devotion>>
	<<set $activeSlave.health = random(80,90)>>
	<<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>>
	<<include "Generate XY Slave">>
	<<set $activeSlave.origin = "You bought out a deal involving her training to be an expert gelded sex slave.">>
	<<set $activeSlave.devotion = random(30,40)>>
	<<set $activeSlave.trust = $activeSlave.devotion>>
	<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
	<<set $activeSlave.health = random(60,80)>>
	<<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>>
	<<include "Generate New Slave">>
	<<set $activeSlave.origin = "She was raised to be a slave, since she 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>>
	<<set $activeSlave.health = random(80,90)>>
	<<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>>
	<<include "Generate New Slave">>
	<<set $activeSlave.health = random(-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.butt += 1>>
	<<set $activeSlave.buttImplant = 1>>
	<<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>>
	<<include "Generate New Slave">>
	<<set $activeSlave.origin = "You bought out a deal for her sale after the seller took her virginity and the buyer no longer wanted her.">>
	<<if ndef $activeSlave.counter.publicUse>><<set $activeSlave.counter.publicUse = 10>><<else>><<set $activeSlave.counter.publicUse += 10>><</if>>
	<<set $activeSlave.devotion = random(25,30)>>
	<<set $activeSlave.trust = $activeSlave.devotion-20>>
	<<set $activeSlave.oldDevotion = $activeSlave.devotion>>
	<<set $activeSlave.health = random(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>>

<<if $assistantName == "your personal assistant">>Your personal assistant<<else>>$assistantName<</if>> 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 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 her indenture after she 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 = "She was enslaved after you manipulated her 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:
:: Lab Report [nobr]

''Lab Report''

<<if ($researchLab.hired + $researchLab.menials) != 0>>
	<<if $researchLab.research == "none" && $researchLab.manufacture == "none">>
		Since the lab is currently not working on any projects it takes contract work and earns you @@.yellowgreen;<<print cashFormat((($researchLab.hired * 3 + $researchLab.menials) * $researchLab.aiModule * 20))>>.@@
		<<set _cashX = (($researchLab.hired * 3 + $researchLab.menials) * $researchLab.aiModule * 20)>>
		<<run cashX(_cashX, "lab")>>
	<<elseif $researchLab.research != "none">>
		<<set $researchLab.productionTime -= (($researchLab.hired * 3) + ($researchLab.menials) * ($researchLab.aiModule))>>
		<<if $researchLab.productionTime <= 0>>
			Your lab staff have @@.green;completed@@ their $researchLab.research research project, and
			<<switch $researchLab.research>>
			<<case "Basic prosthetics interface">>
				<<set $researchLab.basicPLimbInterface = 1>>
			<<case "Advanced prosthetics interface">>
				<<set $researchLab.advPLimbInterface = 1>>
			<<case "Basic prosthetic limbs">>
				<<set $researchLab.basicPLimb = 1>>
			<<case "Advanced sex limbs">>
				<<set $researchLab.advSexPLimb = 1>>
			<<case "Advanced beauty limbs">>
				<<set $researchLab.advGracePLimb = 1>>
			<<case "Advanced combat limbs">>
				<<set $researchLab.advCombatPLimb = 1>>
			<<case "Cybernetic limbs">>
				<<set $researchLab.cyberneticPLimb = 1>>
			<<case "Ocular implants">>
				<<set $researchLab.ocularImplant = 1>>
			<<case "Cochlear implants">>
				<<set $researchLab.cochlearImplant = 1>>
			<<case "Electrolarynx">>
				<<set $researchLab.electrolarynx = 1>>
			/*<<case "Erectile implant">>
				<<set $researchLab.erectileImplant = 1>>*/
			<</switch>>
			they are awaiting your next instruction.
			<<set $researchLab.productionTime = 0, $researchLab.research = "none">>
		<<else>>
			Your lab staff are currently researching @@.yellow;$researchLab.research.@@
		<</if>>

 <<= ResearchLabStockPile()>>
	<<elseif $researchLab.manufacture != "none">>
		<<set $researchLab.productionTime -= (($researchLab.hired * 3) + ($researchLab.menials) * ($researchLab.aiModule))>>
		<<if $researchLab.productionTime <= 0>>
			Your lab staff have @@.green;completed@@ their $researchLab.manufacture project, and
			<<switch $researchLab.manufacture>>
			<<case "Basic prosthetics interface">>
				<<set $stockpile.basicPLimbInterface += 1, $researchLab.productionTime = 50>>
			<<case "Advanced prosthetics interface">>
				<<set $stockpile.advPLimbInterface += 1, $researchLab.productionTime = 80>>
			<<case "Basic prosthetic limbs">>
				<<set $stockpile.basicPLimb += 1, $researchLab.productionTime = 20>>
			<<case "Advanced sex limbs">>
				<<set $stockpile.advSexPLimb += 1, $researchLab.productionTime = 100>>
			<<case "Advanced beauty limbs">>
				<<set $stockpile.advGracePLimb += 1, $researchLab.productionTime = 100>>
			<<case "Advanced combat limbs">>
				<<set $stockpile.advCombatPLimb += 1, $researchLab.productionTime = 100>>
			<<case "Cybernetic limbs">>
				<<set $stockpile.cyberneticPLimb += 1, $researchLab.productionTime = 150>>
			<<case "Ocular implants">>
				<<set $stockpile.ocularImplant += 1, $researchLab.productionTime = 80>>
			<<case "Cochlear implants">>
				<<set $stockpile.cochlearImplant += 1, $researchLab.productionTime = 60>>
			<<case "Electrolarynx">>
				<<set $stockpile.electrolarynx += 1, $researchLab.productionTime = 100>>
			/*<<case "Erectile implant">>
				<<set $stockpile.erectileImplant += 1, $researchLab.productionTime = 50>>*/
			<</switch>>

				they are starting work on another unit.
				<<link "Halt production">>
					<<set $researchLab.productionTime = 0, $researchLab.manufacture = "none">>
					<<replace "#haltproduction">>
						they are awaiting your next instruction.
					<</replace>>
				<</link>>

		<<else>>
			Your lab staff are currently working on @@.yellow;$researchLab.manufacture.@@
		<</if>>

 <<= ResearchLabStockPile()>>
	<</if>>
<</if>>

repo_name: valleytwo/fc


code:
:: Law Compliance [nobr]

<<setLocalPronouns $activeSlave>>

<<if $arcologies[0].FSSlimnessEnthusiastSMR == 1>>
	<<set $activeSlave.weight = random(-80,0)>>
	<<set $activeSlave.health = random(50,90)>>
	$He has been kept on a rigorous diet for sale, has been required to exercise regularly, and has had excellent care taken of $his health.
<</if>>
<<if $arcologies[0].FSRepopulationFocusSMR == 1>>
	<<if $activeSlave.physicalAge < $fertilityAge>>
		<<if $precociousPuberty == 0>>
			<<set $activeSlave.physicalAge = $fertilityAge>>
			<<set $activeSlave.visualAge = $fertilityAge>>
			<<set $activeSlave.actualAge = $fertilityAge>>
			<<set $activeSlave.ovaryAge = $fertilityAge>>
		<</if>>
	<</if>>
	<<set $activeSlave.pubertyXX = 1>>
	<<if $activeSlave.preg < 1>> /* "if" needed here to avoid conflicts with already pregnant slaves from repopulation FS arcologies markets */
		<<set $activeSlave.ovaries = 1>>
		<<set $activeSlave.vagina = either(0, 0, 1, 1, 1, 1, 1, 2, 2, 3)>>
		<<set $activeSlave.pregType = either(1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5)>>
		<<set $activeSlave.preg = random(5,38)>>
		<<set $activeSlave.pregWeek = $activeSlave.preg>>
		<<set $activeSlave.pregKnown = 1>>
		<<run SetBellySize($activeSlave)>>
	<</if>>
	If $he was unable to become pregnant before, $he has been made to now. $He is fertilized surgically to insure a healthy pregnancy.
<</if>>
<<if $arcologies[0].FSAssetExpansionistSMR == 1>>
	<<set $activeSlave.clit = either(0, 0, 0, 1, 1, 2)>>
	<<set $activeSlave.labia = either(0, 1, 2, 3)>>
	<<set $activeSlave.boobs += random(2,5)*100>>
	<<set $activeSlave.butt += random(1,2)>>
	<<set $activeSlave.lips = random(15,55)>>
	<<if $activeSlave.dick > 0>>
	<<set $activeSlave.dick = random(4,7)>>
	<</if>>
	<<if $activeSlave.balls > 0>>
	<<set $activeSlave.balls = random(4,7)>>
	<</if>>
	$He has been on powerful growth hormones for a long time, and has experienced growth in several areas as a result.
<</if>>
<<if $arcologies[0].FSPhysicalIdealistSMR == 1>>
	Much of $his time before sale was spent
	<<if $arcologies[0].FSPhysicalIdealistLaw == 1>>
		<<set $activeSlave.muscles = random(20,50)>>
		doing cardio,
	<<else>>
		<<set $activeSlave.muscles = random(50,100)>>
		lifting weights,
	<</if>>
	and $his health has been raised to an almost unnatural level.
	<<set $activeSlave.health = random(50,90)>>
	<<set $activeSlave.weight = random(-20,0)>>
<<elseif $arcologies[0].FSHedonisticDecadenceSMR == 1>>
	<<set $activeSlave.weight = random(50,200)>>
	<<if $arcologies[0].FSHedonisticDecadenceStrongFat == 1>>
		<<set $activeSlave.muscles = random(10,60)>>
		<<set $activeSlave.health = random(10,40)>>
	<<else>>
		<<set $activeSlave.muscles = random(-80,0)>>
		<<set $activeSlave.health = random(-30,10)>>
	<</if>>
	Much of $his time before sale was spent being fattened up and <<if $arcologies[0].FSHedonisticDecadenceStrongFat == 1>>pumping iron<<else>>lying around<</if>>.
	<<if $activeSlave.devotion <= 20>>
		$He had to be force-fed massive amounts of slave food while bound to meet requirements, filling $him with @@.gold;fear@@ and @@.mediumorchid;disgust.@@
		<<set $activeSlave.trust -= 5>>
		<<set $activeSlave.devotion -= 5>>
	<</if>>
<</if>>
<<if $arcologies[0].FSGenderFundamentalistSMR == 1>>
	<<if $activeSlave.dick > 0>>
	<<set $activeSlave.balls = 0>>
	<<set $activeSlave.scrotum = 0>>
	<<set $activeSlave.boobs += random(0,2)*100>>
	<<set $activeSlave.butt += random(0,1)>>
	<<if $activeSlave.face < 95>>
		<<set $activeSlave.face = Math.trunc($activeSlave.face+random(0,20),-100,100)>>
	<</if>>
	$His balls were removed as soon as $he was enslaved, and $he's been kept on powerful female hormones for long enough to have a general feminizing effect.
	<</if>>
<<elseif $arcologies[0].FSSupremacistSMR == 1>>
	<<if $activeSlave.dick > 0>>
	<<if $activeSlave.race != $arcologies[0].FSSupremacistRace>>
	<<set $activeSlave.balls = 0>>
	<<set $activeSlave.scrotum = 0>>
	$His balls were removed as soon as $he was enslaved to prevent $him from polluting fertile slaves with $his inferior semen.
	<</if>>
	<</if>>
<<elseif $arcologies[0].FSSubjugationistSMR == 1>>
	<<if $activeSlave.dick > 0>>
	<<if $activeSlave.race == $arcologies[0].FSSubjugationistRace>>
	<<set $activeSlave.balls = 0>>
	<<set $activeSlave.scrotum = 0>>
	$His balls were removed as soon as $he was enslaved to prevent $him from polluting fertile slaves with $his subhuman semen.
	<</if>>
	<</if>>
<</if>>
<<if $arcologies[0].FSRestartSMR == 1>>
	<<if $activeSlave.balls > 0 || $activeSlave.ovaries > 0>>
	<<set $activeSlave.preg = -2>>
	<<set $activeSlave.pregType = 0>>
	<<set $activeSlave.pregKnown = 0>>
	<<set WombFlush($activeSlave)>>
	<<run SetBellySize($activeSlave)>>
	<<set $activeSlave.balls = 0>>
	<<set $activeSlave.ovaries = 0>>
	As a member of the lowest class,<<if $activeSlave.preg > 0>> $his pregnancy is immediately terminated, and<</if>> $he is promptly sterilized to prevent $him from passing on $his useless genes.
	<</if>>
<</if>>
<<if $arcologies[0].FSPaternalistSMR == 1>>
<<if $activeSlave.devotion <= 20>>
	While $he came through the slave markets, $he was treated with decency. $He has begun to wonder whether $he can @@.mediumaquamarine;get away with@@ being disobedient.
	<<set $activeSlave.trust += 10>>
<<else>>
	While $he came through the slave markets, $he was treated with decency. $He has begun to hope that $he can expect @@.mediumaquamarine;basic respect@@ despite being a sex slave.
	<<set $activeSlave.trust += 10>>
<</if>>
<</if>>
<<if $arcologies[0].FSDegradationistSMR == 1>>
	$His current owners @@.gold;brutalized $him@@ before putting $him on sale, using clever methods to produce agony without seriously damaging $his health.
	<<set $activeSlave.trust -= 10>>
<</if>>
<<if $arcologies[0].FSBodyPuristSMR == 1>>
	In order to qualify for sale, $he has been meticulously inspected for implants, tattoos, and piercings, and any present have been removed.
	<<set $activeSlave.nipplesPiercing = 0>>
	<<set $activeSlave.areolaePiercing = 0>>
	<<set $activeSlave.lipsPiercing = 0>>
	<<set $activeSlave.vaginaPiercing = 0>>
	<<set $activeSlave.dickPiercing = 0>>
	<<set $activeSlave.clitPiercing = 0>>
	<<set $activeSlave.anusPiercing = 0>>
	<<set $activeSlave.corsetPiercing = 0>>
	<<set $activeSlave.earPiercing = 0>>
	<<set $activeSlave.eyebrowPiercing = 0>>
	<<set $activeSlave.nosePiercing = 0>>
	<<set $activeSlave.navelPiercing = 0>>
	<<set $activeSlave.lipsTat = 0>>
	<<set $activeSlave.buttTat = 0>>
	<<set $activeSlave.anusTat = 0>>
	<<set $activeSlave.vaginaTat = 0>>
	<<set $activeSlave.dickTat = 0>>
	<<set $activeSlave.boobsTat = 0>>
	<<set $activeSlave.armsTat = 0>>
	<<set $activeSlave.legsTat = 0>>
	<<set $activeSlave.shouldersTat = 0>>
	<<set $activeSlave.backTat = 0>>
	<<set $activeSlave.stampTat = 0>>
	<<if $activeSlave.boobsImplant > 0>>
	<<set $activeSlave.boobs -= $activeSlave.boobsImplant>>
	<<set $activeSlave.boobsImplant = 0>>
	<</if>>
	<<if $activeSlave.buttImplant > 0>>
	<<set $activeSlave.butt -= $activeSlave.buttImplant>>
	<<set $activeSlave.buttImplant = 0>>
	<</if>>
	<<if $activeSlave.lipsImplant > 0>>
	<<set $activeSlave.lips -= $activeSlave.lipsImplant>>
	<<set $activeSlave.lipsImplant = 0>>
	<</if>>
<</if>>
<<if $arcologies[0].FSTransformationFetishistSMR == 1>>
	In order to qualify for sale, $he has been kitted out with a basic set of breast, buttock, and lip implants.
	<<if $activeSlave.devotion <= 20>>
	Being turned into an assembly line bimbo fills $him with @@.gold;fear@@ and @@.mediumorchid;disgust.@@
	<<set $activeSlave.trust -= 5>>
	<<set $activeSlave.devotion -= 5>>
	<</if>>
	<<if $activeSlave.boobsImplant == 0>>
	<<set $activeSlave.boobsImplant = 400>>
	<<set $activeSlave.boobs += $activeSlave.boobsImplant>>
	<</if>>
	<<if $activeSlave.buttImplant == 0>>
	<<set $activeSlave.buttImplant = 1>>
	<<set $activeSlave.butt += $activeSlave.buttImplant>>
	<</if>>
	<<if $activeSlave.lipsImplant == 0>>
	<<set $activeSlave.lipsImplant = 10>>
	<<set $activeSlave.lips += $activeSlave.lipsImplant>>
	<</if>>
<</if>>
<<if $arcologies[0].FSYouthPreferentialistSMR == 1>>
	<<if $activeSlave.physicalAge > 35>>
	$He was treated as a disposable old bitch in the slave pens, @@.gold;worrying $him.@@
	<<set $activeSlave.trust -= 5>>
	<<elseif $activeSlave.physicalAge <= 25>>
	$He was treated reasonably well in the slave pens due to $his youth, @@.mediumaquamarine;reassuring $him.@@
	<<set $activeSlave.trust += 5>>
	<</if>>
<</if>>
<<if $arcologies[0].FSMaturityPreferentialistSMR == 1>>
	<<if $activeSlave.physicalAge > 35>>
	$He was treated reasonably well in the slave pens due to $his maturity, @@.mediumaquamarine;reassuring $him.@@
	<<set $activeSlave.trust += 5>>
	<<elseif $activeSlave.physicalAge <= 25>>
	$He was treated as a disposable little slut in the slave pens, @@.gold;worrying $him.@@
	<<set $activeSlave.trust -= 5>>
	<</if>>
<</if>>
<<if $arcologies[0].FSPastoralistSMR == 1>>
	<<if $activeSlave.lactation == 0>>
	$He was implanted with permanent lactation drugs in order to qualify for sale, and was kept in the slave pens until $he could be put up on the block with dripping nipples.
	<<set $activeSlave.lactation = 2, $activeSlave.lactationDuration = 2>>
	<</if>>
<</if>>
<<if $arcologies[0].FSChattelReligionistSMR == 1>>
	$He has been consecrated for sale by being offered to the public for a full night, from sunset to sunrise.
	<<if $activeSlave.devotion <= 20>>
		Since $he was not willing to accept this treatment, $his consecration took the form of twelve hours of rape, @@.gold;terrifying $him@@ and @@.mediumorchid;filling $him with hatred.@@
		<<set $activeSlave.trust -= 15>>
		<<set $activeSlave.devotion -= 15>>
	<<else>>
		$He accepted this treatment, @@.hotpink;breaking $him@@ to sexual slavery.
		<<set $activeSlave.devotion += 5>>
	<</if>>

	<<if ndef $activeSlave.counter.publicUse>>
		<<set $activeSlave.counter.publicUse = 0>>
	<</if>>

	<<set $activeSlave.counter.oral += 10>>
	<<set $activeSlave.counter.publicUse += 10>>
	<<set $oralTotal += 10>>
	<<set $activeSlave.counter.anal += 10>>
	<<set $activeSlave.counter.publicUse += 10>>
	<<set $analTotal += 10>>
	<<if $activeSlave.vagina > 0>>
		<<set $activeSlave.counter.vaginal += 10>>
		<<set $activeSlave.counter.publicUse += 10>>
		<<set $vaginalTotal += 10>>
		<<if $activeSlave.vagina < 3>>
			<<set $activeSlave.vagina += 1>>
		<</if>>
	<<else>>
		<<set $activeSlave.counter.oral += 10>>
		<<set $activeSlave.counter.publicUse += 10>>
		<<set $oralTotal += 10>>
	<</if>>
	<<if $activeSlave.anus > 0>>
		<<set $activeSlave.counter.anal += 10>>
		<<set $activeSlave.counter.publicUse += 10>>
		<<set $analTotal += 10>>
		<<if $activeSlave.anus < 3>>
			<<set $activeSlave.anus += 1>>
		<</if>>
	<<else>>
		<<set $activeSlave.counter.oral += 10>>
		<<set $activeSlave.counter.publicUse += 10>>
		<<set $oralTotal += 10>>
	<</if>>
<</if>>
<<if $arcologies[0].FSRomanRevivalistSMR == 1>>
	As $he passed though the slave markets, $he saw many less valuable slaves selected to die in gladiatorial combats. $He is relieved $he wasn't one of them, but @@.gold;terrified@@ that will be $his fate if $he makes mistakes.
	<<set $activeSlave.trust -= 10>>
<</if>>
<<if $arcologies[0].FSAztecRevivalistSMR == 1>>
	As $he passed though the golden city, $he saw a less valuable <<if $arcologies[0].FSPaternalist != "unset">>slave's virginity get sacrificed<<else>>slave get sacrificed<</if>> on one of the many altars spread throughout the city. $He was <<if $arcologies[0].FSPaternalist != "unset">>@@.gold;startled@@<<else>>@@.gold;mortified@@<</if>> to learn what befalls lesser slaves here.
	<<if $arcologies[0].FSPaternalist != "unset">>
		<<set $activeSlave.trust -= 5>>
	<<else>>
		<<set $activeSlave.trust -= 20>>
	<</if>>
<</if>>
<<if $arcologies[0].FSEgyptianRevivalistSMR == 1>>
	While $he was in the slave pens, $he was subjected to Egyptian cultural indoctrination.
	<<if $activeSlave.skill.entertainment > 10>>
		$He is now @@.mediumaquamarine;confident@@ that $his entertainment skills will be valued here.
		<<set $activeSlave.trust += 10>>
	<<elseif $activeSlave.intelligenceImplant >= 15>>
		$He now @@.mediumaquamarine;hopes@@ that $his education will be valued here.
		<<set $activeSlave.trust += 5>>
	<<else>>
		$He is @@.gold;concerned@@ that $he doesn't have what it takes to fit in.
		<<set $activeSlave.trust -= 5>>
	<</if>>
<</if>>
<<if $arcologies[0].FSEdoRevivalistSMR == 1>>
	While $he was in the slave pens, $he was subjected to Edo Revivalist cultural indoctrination.
	<<if $activeSlave.nationality == "Japanese">>
		$He is now @@.mediumaquamarine;confident@@ that, as a proper Japanese $girl, $he will receive preferential treatment.
		<<set $activeSlave.trust += 10>>
	<<elseif $activeSlave.skill.entertainment > 30>>
		$He now @@.mediumaquamarine;hopes@@ that $his refined entertainment skills will make $him culturally as well as sexually valuable.
		<<set $activeSlave.trust += 5>>
	<<else>>
		$He is @@.gold;concerned@@ that $he doesn't have what it takes to fit in.
		<<set $activeSlave.trust -= 5>>
	<</if>>
<</if>>
<<if $arcologies[0].FSArabianRevivalistSMR == 1>>
	While $he was in the slave pens, $he was subjected to classical Arabian cultural indoctrination.
	<<if $activeSlave.face > 40>>
		$He is now @@.mediumaquamarine;confident@@ that $his great beauty will be valued here.
		<<set $activeSlave.trust += 10>>
	<<elseif $activeSlave.accent <= 1>>
		$He now @@.mediumaquamarine;hopes@@ that $his linguistic skill will be valued here.
		<<set $activeSlave.trust += 5>>
	<<else>>
		$He is @@.gold;concerned@@ that $he doesn't have what it takes to fit in.
		<<set $activeSlave.trust -= 5>>
	<</if>>
<</if>>
<<if $arcologies[0].FSChineseRevivalistSMR == 1>>
	While $he was in the slave pens, $he was subjected to Imperial Chinese cultural indoctrination.
	<<if $activeSlave.intelligence > 50>>
		$He is now @@.mediumaquamarine;confident@@ that $his brilliance will be valued here.
		<<set $activeSlave.trust += 10>>
	<<elseif $activeSlave.intelligenceImplant >= 15>>
		$He now @@.mediumaquamarine;hopes@@ that $his education will be valued here.
		<<set $activeSlave.trust += 5>>
	<<else>>
		$He is @@.gold;concerned@@ that $he doesn't have what it takes to fit in.
		<<set $activeSlave.trust -= 5>>
	<</if>>
<</if>>

<<if $BasicSMR != 1>>
	While $he came through the slave markets, $he was treated with inhuman callousness. It was very obvious and @@.gold;very terrifying@@ to $him that $he is now considered a piece of meat.
	<<set $activeSlave.trust -= 5>>
<</if>>

<<if $HealthInspectionSMR == 1>>
	<<if $activeSlave.health < -10>>
		$His current owners held $him for basic medical care before putting $him on sale, resolving some of $his health issues.
		<<set $activeSlave.health = -10>>
	<</if>>
<</if>>

<<if $EducationSMR == 1>>
	<<if $activeSlave.intelligenceImplant == 0>>
		$He arrived at $arcologies[0].name in a pitiably undereducated state, and has been held back until $he completed a basic course of slave education.
		<<set $activeSlave.intelligenceImplant = 15>>
	<</if>>
<</if>>

<<if $FrigiditySMR == 1>>
	<<if $activeSlave.energy > 20>>
		Before reaching the market, $he was trained to disregard sex until $he showed no interest in sex at all.
		<<set $activeSlave.energy = 20>>
	<</if>>
<</if>>

<<if $BasicBeautySMR == 1>>
	<<if $activeSlave.face < 0>>
		<<set $activeSlave.face = random(0,60)>>
	<</if>>
	While $he was in the slave pens, $he saw that less attractive slaves were immediately designated as menials and Fuckdolls, and $he is @@.gold;terrified@@ that should $he lose $his beauty, $he'll be considered worthless and be reassigned on the spot.
	<<set $activeSlave.trust -= 5>>
<</if>>

<<if $QualityBeautySMR == 1>>
	<<if $activeSlave.face < 20>>
		<<set $activeSlave.face = random(20,100)>>
	<</if>>
	While $he was in the slave pens, $he saw that less attractive slaves were immediately designated as menials and Fuckdolls, and $he is @@.gold;terrified@@ that should $he loses $his beauty, $he'll be considered worthless and be reassigned on the spot.
	<<set $activeSlave.trust -= 5>>
<</if>>

<<if $BasicWeightSMR == 1>>
	<<if $activeSlave.weight > 100>>
		<<set $activeSlave.weight = random(-50,50)>>
	<</if>>
	While $he was in the slave pens, $he saw that obese slaves were immediately designated as menials and cows, and $he is @@.gold;terrified@@ that should $he get fat, $he'll be considered worthless and be reassigned on the spot.
	<<set $activeSlave.trust -= 5>>
<</if>>

<<if $BasicHeightSMR == 1>>
	<<if $activeSlave.height < 170>>
		<<if $activeSlave.height >= 160>>
			Before $he was put up for sale, $he underwent height increasing surgery to fulfill your arcology's height SMR. $He was @@.gold;horrified@@ by how drastically $his body was altered just for a chance at sale.
			<<set $activeSlave.trust -= 10>>
			<<set $activeSlave.height += 10, $activeSlave.heightImplant = 1, $activeSlave.health -= -40>>
		<<else>>
			While $he was in the slave pens, $he was treated as nothing more than an unsalvageable slab of meat suitable only for the lowliest of jobs. $He's @@.hotpink;desperate@@ enough to follow any order in @@.gold;fear@@ that should $he fail, $he'll be discarded like so many other shorties.
			<<set $activeSlave.devotion += 10, $activeSlave.trust -= 10>>
		<</if>>
	<<else>>
		While $he was in the slave pens, $he saw that short and even average sized slaves were commonly designated as menials and Fuckdolls. $His tall stature gives $him a promising future compared to $his shorter peers, leaving $him @@.mediumOrchid;inappropriately proud@@ of $his height.
		<<set $activeSlave.devotion -= 10>>
	<</if>>
<<elseif $BasicHeightSMR == -1>>
	<<if $activeSlave.height >= 160>>
		<<if $activeSlave.height <= 169>>
			Before $he was put up for sale, $he underwent height reduction surgery to fulfill your arcology's height SMR. $He was @@.gold;horrified@@ by how drastically $his body was altered just for a chance at sale.
			<<set $activeSlave.trust -= 10>>
			<<set $activeSlave.height -= 10, $activeSlave.heightImplant = -1, $activeSlave.health -= -40>>
		<<else>>
			While $he was in the slave pens, $he was treated as nothing more than an unsalvageable slab of meat suitable only for the lowliest of jobs. $He's @@.hotpink;desperate@@ enough to follow any order in @@.gold;fear@@ that should $he fail, $he'll be discarded like all the other tall <<= $girl>>s.
			<<set $activeSlave.devotion += 10, $activeSlave.trust -= 10>>
		<</if>>
	<<else>>
		While $he was in the slave pens, $he saw that tall and even average sized slaves were commonly designated as menials and Fuckdolls. $His short stature gives $him a promising future compared to $his towering peers, leaving $him @@.mediumOrchid;inappropriately proud@@ of $his height.
		<<set $activeSlave.devotion -= 10>>
	<</if>>
<</if>>

<<if $AdvancedHeightSMR == 1>>
	<<set $activeSlave.height = Math.round(Height.random($activeSlave, {skew: $AdvancedHeightSMR, limitMult: [0, 5 * $AdvancedHeightSMR]}))>>
	While $he was in the slave pens, $he saw that slaves on the shorter end of the height curve were immediately designated as menials and Fuckdolls.
	<<if $activeSlave.physicalAge < 16>>
		$He is @@.gold;terrified@@ that if $he doesn't keep growing, $he'll be reassigned on the spot without a second thought.
		<<set $activeSlave.trust -= 5>>
	<<else>>
		$His above average stature gives $him a promising future compared to $his shorter peers, leaving $him @@.mediumOrchid;inappropriately proud@@ of $his height.
		<<set $activeSlave.devotion -= 10>>
	<</if>>
<<elseif $AdvancedHeightSMR == -1>>
	<<set $activeSlave.height = Math.round(Height.random($activeSlave, {skew: $AdvancedHeightSMR, limitMult: [0, 5 * $AdvancedHeightSMR]}))>>
	While $he was in the slave pens, $he saw that slaves on the taller end of the height curve were immediately designated as menials and Fuckdolls.
	<<if $activeSlave.physicalAge < 16>>
		$He is @@.gold;terrified@@ that if $he goes through a growth spurt, $he'll be reassigned on the spot without a second thought.
		<<set $activeSlave.trust -= 5>>
	<<else>>
		$His below average stature gives $him a promising future compared to $his taller peers, leaving $him @@.mediumOrchid;inappropriately proud@@ of $his height.
		<<set $activeSlave.devotion -= 10>>
	<</if>>
<</if>>

<<if $BasicIntelligenceSMR == 1>>
	<<if $activeSlave.intelligence <= -15>>
		<<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [0,40]})>>
	<</if>>
	While $he was in the slave pens, $he saw that less intelligent slaves were immediately designated as menials and Fuckdolls, and $he is @@.gold;terrified@@ that if $he makes a mistake, $he'll be thought stupid and be reassigned on the spot.
	<<set $activeSlave.trust -= 5>>
<</if>>

<<if $QualityIntelligenceSMR == 1>>
	<<if $activeSlave.intelligence <= 15>>
		<<set $activeSlave.intelligence = Intelligence.random({limitIntelligence: [16,100]})>>
	<</if>>
	While $he was in the slave pens, $he saw that less intelligent slaves were immediately designated as menials and Fuckdolls, and $he is @@.gold;terrified@@ that if $he makes a mistake, $he'll be thought stupid and be reassigned on the spot.
	<<set $activeSlave.trust -= 5>>
<</if>>

<<if $IntelligenceEugenicsSMR + $HeightEugenicsSMR + $FaceEugenicsSMR > 0>>
<<set _eugenicsMarketTest = 1>>
As soon as $he arrived in the slave market, $he was subjected to a battery of testing:
<<if $IntelligenceEugenicsSMR == 1>>
	an intelligence test,
	<<if $activeSlave.intelligence+$activeSlave.intelligenceImplant <= 50>>
	<<set _eugenicsMarketTest = 0>>
	<</if>>
<</if>>
<<if $HeightEugenicsSMR == 1>>
	rigorous height and bone measurements,
	<<if $activeSlave.height < (Height.mean($activeSlave) + 15)>>
		<<set _eugenicsMarketTest = 0>>
	<</if>>
<</if>>
<<if $FaceEugenicsSMR == 1>>
	strict judgments of $his facial attractiveness,
	<<if $activeSlave.face < 40>>
	<<set _eugenicsMarketTest = 0>>
	<</if>>
<</if>>
a physical exam, and more.
<<if _eugenicsMarketTest == 0>>
	$He failed, and only then learned that by failing $he placed $himself under the merciless dictates of eugenic theory.
	<<if $activeSlave.balls > 0 && (isFertile($activeSlave) || $activeSlave.preg > 0)>>
		$His balls were promptly
		<<if $seeExtreme == 1>>
			removed
			<<set $activeSlave.balls = 0>>
			<<set $activeSlave.scrotum = 0>>
		<<else>>
			flooded with chemicals
			<<set $activeSlave.ballType = "sterile">>
		<</if>>
		to prevent $him from passing on $his inferior genes, @@.mediumorchid;infuriating@@ and @@.gold;terrifying@@ $him.
		Furthermore, $his <<if $activeSlave.preg > 0>>pregnancy was terminated and afterwards $his <</if>>tubes were promptly tied to prevent $him from passing on $his inferior genes, @@.mediumorchid;saddening@@ and @@.gold;frightening@@ $him.
		<<set $activeSlave.preg = -2>>
		<<set $activeSlave.pregType = 0>>
		<<set $activeSlave.pregKnown = 0>>
		<<set WombFlush($activeSlave)>>
		<<run SetBellySize($activeSlave)>>
		<<set $activeSlave.devotion -= 30>>
		<<set $activeSlave.trust -= 30>>
	<<elseif $activeSlave.balls > 0>>
		$His balls were promptly
		<<if $seeExtreme == 1>>
			removed
			<<set $activeSlave.balls = 0>>
			<<set $activeSlave.scrotum = 0>>
		<<else>>
			flooded with chemicals
			<<set $activeSlave.ballType = "sterile">>
		<</if>>
		to prevent $him from passing on $his inferior genes, @@.mediumorchid;infuriating@@ and @@.gold;terrifying@@ $him.
		<<set $activeSlave.devotion -= 20, $activeSlave.trust -= 20>>
	<<elseif (isFertile($activeSlave) || $activeSlave.preg > 0)>>
		$His <<if $activeSlave.preg > 0>>pregnancy was terminated and afterwards $his <</if>>tubes were promptly tied to prevent $him from passing on $his inferior genes, @@.mediumorchid;saddening@@ and @@.gold;frightening@@ $him.
		<<set $activeSlave.preg = -2>>
		<<set $activeSlave.pregType = 0>>
		<<set $activeSlave.pregKnown = 0>>
		<<set WombFlush($activeSlave)>>
		<<run SetBellySize($activeSlave)>>
		<<set $activeSlave.devotion -= 10>>
		<<set $activeSlave.trust -= 10>>
	<<else>>
		Fortunately for $him, $he was already incapable of passing on $his inferior genes.
	<</if>>
<<else>>
	$He passed, and only then learned that passing marked $him as fit to pass on $his genes, should $his owners decide to breed $him.
	<<if $activeSlave.balls > 0 && (isFertile($activeSlave) || $activeSlave.preg > 0)>>
		$His relief that $he won't have $his balls cut off and $his tubes tied is mixed with fear at being introduced to your society in this way.
	<<elseif (isFertile($activeSlave) || $activeSlave.preg > 0)>>
		$His relief that $he won't have $his tubes tied is mixed with fear at being introduced to your society in this way.
	<<else>>
		This is merely confusing to $him, since $he isn't able to reproduce as it is. Of course, $he doesn't know that you're quite capable of changing that.
	<</if>>
<</if>>
<</if>>

<<= checkForGingering()>> /* may store a backup of $activeSlave and make temporary changes; call removeGingering() to retrieve backup before making changes to $activeSlave */