code:
:: csec [nobr]

<<set $nextButton = "Back", $nextLink = "Slave Interact">>

<<run clearSummaryCache($activeSlave)>>

/*---------------- calculations -----------------*/

/* Now it's will be possible to use passage for broodmothers and partial birthers too.*/

<<set $activeSlave.pregControl = "none">>
<<set _beforeSize = WombGetVolume($activeSlave)>>
<<set $activeSlave.curBabies = WombBirth($activeSlave, $activeSlave.pregData.minLiveBirth)>> /* 34 week is minimal gestation time for human live birth. Here we take only ready to survive. With others we will deal later in code. */
<<set $activeSlave.curStillBirth = 0 >>

<<set _curBabies = $activeSlave.curBabies.length>> /*just to improve speed and usability here.*/

<<set $activeSlave.counter.births += _curBabies>>
<<set $activeSlave.counter.birthsTotal += _curBabies>>
<<set $birthsTotal += _curBabies>>

<<set _others = 0, _PC = 0, _citizens = 0, _oldMaster = 0, _arcOwner = 0, _lab = 0, _futaS = 0, _fathers = [], _babyFatherLink = []>>
<<for _cb = 0; _cb < $activeSlave.curBabies.length; _cb++>>
	<<if $activeSlave.curBabies[_cb].fatherID == 0 || $activeSlave.curBabies[_cb].fatherID == -5>>
		<<set _others++>>
		<<set _fathers.push("some man's")>>
	<<elseif $activeSlave.curBabies[_cb].fatherID == -1>>
		<<set $PC.slavesFathered++>>
		<<set _PC++>>
		<<set _fathers.push("your")>>
	<<elseif $activeSlave.curBabies[_cb].fatherID == -2>>
		<<set _citizens++>>
		<<set _fathers.push("your arcology's")>>
	<<elseif $activeSlave.curBabies[_cb].fatherID == -3>>
		<<set _oldMaster++>>
		<<set _fathers.push("your former Master's")>>
	<<elseif $activeSlave.curBabies[_cb].fatherID == -4>>
		<<set _arcOwner++>>
		<<set _fathers.push("another arcology owner's")>>
	<<elseif $activeSlave.curBabies[_cb].fatherID == -7>>
		<<set _lab++>>
		<<set _fathers.push("the gene lab's")>>
	<<elseif $activeSlave.curBabies[_cb].fatherID == -9>>
		<<set _futaS++>>
		<<set _fathers.push("a Futanari Sister's")>>
	<<else>>
		<<set _babyDaddy = findFather($activeSlave.curBabies[_cb].fatherID)>>
		<<if def _babyDaddy>>
			<<if _babyDaddy.ID == $activeSlave.ID>>
				<<set _fathers.push(String($his + " own"))>>
				<<for _cb2 = 0; _cb2 < _babyFatherLink.length; _cb2++>>
					<<if _babyFatherLink[_cb2].string == String($his + " own")>>
						<<set _babyFatherLink[_cb2].count++>>
					<<else>>
						<<set _babyFatherLink[_cb2] = {string: String($his + " own"), count: 1}>>
					<</if>>
				<</for>>
			<<else>>
				<<set _fathers.push(String(_babyDaddy.slaveName+ "'s"))>>
				<<for _cb2 = 0; _cb2 < _babyFatherLink.length; _cb2++>>
					<<if _babyFatherLink[_cb2].string == String(_babyDaddy.slaveName+ "'s")>>
						<<set _babyFatherLink[_cb2].count++>>
					<<else>>
						<<set _babyFatherLink[_cb2] = {string: String(_babyDaddy.slaveName+ "'s"), count: 1}>>
					<</if>>
				<</for>>
			<</if>>
			<<set _adjust = _babyDaddy.counter.slavesFathered++>>
			<<set adjustFatherProperty(_babyDaddy, "slavesFathered", _adjust)>>
		<<else>>
			<<set _others++>>
			<<set _fathers.push("some man's")>>
		<</if>>
	<</if>>
<</for>>
<<set _fathersReduced = removeDuplicates(_fathers)>>
<<for _cb = 0; _cb < _fathersReduced.length; _cb++>>
	<<set _num = 0>>
	<<if _fathersReduced[_cb] == "some man's">>
		<<set _num = _others>>
	<<elseif _fathersReduced[_cb] == "your">>
		<<set _num = _PC>>
	<<elseif _fathersReduced[_cb] == "your arcology's">>
		<<set _num = _citizens>>
	<<elseif _fathersReduced[_cb] == "your former Master's">>
		<<set _num = _oldMaster>>
	<<elseif _fathersReduced[_cb] == "another arcology owner's">>
		<<set _num = _arcOwner>>
	<<elseif _fathersReduced[_cb] == "the gene lab's">>
		<<set _num = _lab>>
	<<elseif _fathersReduced[_cb] == "a Futanari Sister's">>
		<<set _num = _futaS>>
	<<else>>
		<<set _cb2 = _babyFatherLink.findIndex(function(s) {_fathersReduced[_cb] == _babyFatherLink[s].string; })>>
		<<if _cb2 != -1>>
			<<set _num = _babyFatherLink[_cb2].count>>
		<</if>>
	<</if>>
	<<if _num == 1>>
		<<set _fathersReduced[_cb] += " baby">>
	<<elseif _num >= 40>>
		<<set _fathersReduced[_cb] += String(" massive brood of " + _num + " babies")>>
	<<elseif _num >= 20>>
		<<set _fathersReduced[_cb] += String(" brood of " + _num + " babies")>>
	<<elseif _num >= 10>>
		<<set _fathersReduced[_cb] += String(" impressive group of " + _num + " babies")>>
	<<elseif _num == 9>>
		<<set _fathersReduced[_cb] += " nonuplets">>
	<<elseif _num == 8>>
		<<set _fathersReduced[_cb] += " octuplets">>
	<<elseif _num == 7>>
		<<set _fathersReduced[_cb] += " septuplets">>
	<<elseif _num == 6>>
		<<set _fathersReduced[_cb] += " sextuplets">>
	<<elseif _num == 5>>
		<<set _fathersReduced[_cb] += " quintuplets">>
	<<elseif _num == 4>>
		<<set _fathersReduced[_cb] += " quadruplets">>
	<<elseif _num == 3>>
		<<set _fathersReduced[_cb] += " triplets">>
	<<elseif _num == 2>>
		<<set _fathersReduced[_cb] += " twins">>
	<</if>>
<</for>>

<<if $activeSlave.broodmother < 1>> /* broodmothers can't lose fetuses, or it's abortion procedure, not c'sec.*/
	<<if $surgeryUpgrade == 1 >>
		/* nothing right now. For partial birthers, who can do it. For future use.*/
	<<else>>
		<<set $activeSlave.curStillBirth = $activeSlave.womb.length>>
		<<set WombFlush($activeSlave)>>
		/* normally fetuses before 34 week will not survive */
	<</if>>
<</if>>
<<set _afterSize = WombGetVolume($activeSlave)>> /* not really needed right now, but better to add alredy for future usage. To not forget later.*/
<<set $diffSize = _beforeSize / (1 + _afterSize)>> /* 1 used to avoid divide by zero error.*/

<<set _incubated = 0>>
<<set _oldDevotion = $activeSlave.devotion>>

<<set _cToIncub = 0, _cToNursery = 0>>
<<for _csec = 0; _csec < _curBabies; _csec++>>
	<<if $activeSlave.curBabies[_csec].reserve === "incubator">>
		<<set _cToIncub++>>
	<<elseif $activeSlave.curBabies[_csec].reserve === "nursery">>
		<<set _cToNursery++>>
	<</if>>
<</for>>

/* ------------------------------------------------ */

Performing a cesarean section is trivial for the remote surgery to carry out. $activeSlave.slaveName is sedated, $his child<<if _curBabies > 1>>ren<</if>> extracted, and taken to a bed to recover. By the time $he comes to,
<<if _curBabies > 0>>
	<<if _fathersReduced.length > 2>>
		<<for _cb = 0; _cb < _fathersReduced.length; _cb++>>
			<<if _cb < _fathersReduced.length-1>>
				_fathersReduced[_cb],
			<<else>>
				and _fathersReduced[_cb]
			<</if>>
		<</for>>
	<<elseif _fathersReduced.length > 1>>
		_fathersReduced[0] and _fathersReduced[1]
	<<else>>
		_fathersReduced[0]
	<</if>>

	<<if _curBabies <= 1>>has<<else>>have<</if>>
	already been

	<<if _cToIncub == _curBabies>>
		taken to $incubatorName.
		<<set _incubated = 2>>
	<<elseif _cToIncub < _curBabies && _cToIncub > 0>>
		split between $incubatorName and
		<<set _incubated = 1>>
	<</if>>

	<<if _cToNursery == _curBabies>>
		taken to $nurseryName.
		<<set _nursed = 2>>
	<<elseif _cToNursery < _curBabies && _cToNursery > 0>>
		split between $nurseryName and
		<<set _nursed = 1>>
	<</if>>

	<<set $mom = $activeSlave>>
	<<if _cToIncub > 0 || _cToNursery > 0>>
		<<for _cb = 0; _cb < _curBabies; _cb++>> /* if there is no reserved children, code in loop will not trigger */
			<<if $mom.curBabies[_cb].reserve == "incubator">>
				<<set $activeSlave = generateChild($mom, $mom.curBabies[_cb], 1)>>
				<<include "Incubator Workaround">>
				<<run $mom.curBabies.splice($mom.curBabies[_cb], 1)>>
				<<set _cb--, _curBabies-->>
			<<elseif $mom.curBabies[_cb].reserve == "nursery">>
				<<set $activeSlave = generateChild($mom, $mom.curBabies[_cb])>>
				<<include "Nursery Workaround">>
				<<run $mom.curBabies.splice($mom.curBabies[_cb], 1)>>
				<<set _cb--, _curBabies-->>
			<</if>>
		<</for>>
	<</if>>
	<<set $activeSlave = $mom>>

<<else>>
	/*No live babies. Placeholder */
<</if>>

<<set _curBabies = $activeSlave.curBabies.length>>

<<if _incubated != 2 && _nursed != 2 && _curBabies > 0>>

	<<if _incubated == 1 || _nursed == 1>>the rest<</if>>
	<<if $arcologies[0].FSRestart != "unset" && $activeSlave.breedingMark == 1 && $activeSlave.pregSource == -1 && $propOutcome == 1>>
		<<set _lostBabies = 1>>
		handed off to the Societal Elite to be raised into upstanding members of the new society.
	<<elseif $Cash4Babies == 1 && $activeSlave.pregSource == -9 && ($activeSlave.relationship != -3) && ($activeSlave.assignment != "serve in the master suite") && ($activeSlave.assignment != "be your Concubine")>>
		<<set _lostBabies = 1, _babyCost = random(1000,2500)>>
		purchased by the Futanari Sisters for @@.yellowgreen;<<print cashFormat(_curBabies*(_babyCost))>>.@@
		<<run cashX((_curBabies*(_babyCost)), "babyTransfer")>>
	<<elseif $Cash4Babies == 1 && ($activeSlave.relationship != -3) && ($activeSlave.assignment != "serve in the master suite") && ($activeSlave.assignment != "be your Concubine")>>
		<<set _lostBabies = 1, _babyCost = random(-12,12)>>
		sold for a total of @@.yellowgreen;<<print cashFormat(_curBabies*(50+_babyCost))>>.@@
		<<run cashX((_curBabies*(50+_babyCost)), "babyTransfer")>>
	<<elseif $universalRulesChildrenBecomeBreeders > 0 && $arcologies[0].FSRepopulationFocus > 40 && $DefaultBirthDestination === "individually decided fates">>
		<<set _lostBabies = 1>>
		sent to one of $arcologies[0].name's future minded schools, to be administered fertility and virility treatments as well as be brought up to take pride in reproduction. $activeSlave.slaveName
		<<if $activeSlave.fetish == "mindbroken" || $activeSlave.fuckdoll > 0>>
			has few thoughts about the matter.
		<<elseif $activeSlave.devotion > 95>>
			loves you already, but $he'll @@.hotpink;love you even more@@ for this. $He can't wait to see $his child<<if _curBabies > 1>>ren<</if>> proudly furthering your cause.
			<<set $activeSlave.devotion += 4>>
		<<elseif $activeSlave.devotion > 50>>
			heard about these and will be @@.hotpink;happy that $his child<<if $activeSlave.pregType > 1>>ren<</if>> will have a purpose in your society other than slavery.@@ $He will miss $his child<<if $activeSlave.pregType > 1>>ren<</if>>, but $he expected that.
			<<set $activeSlave.devotion += 4>>
		<<elseif $activeSlave.devotion > 20>>
			will naturally miss $his child<<if _curBabies > 1>>ren<</if>>, but will is broken enough to hope that $his offspring will have a better life, or at least an enjoyable one.
		<<else>>
			will of course @@.mediumorchid;hate you for this.@@ The mere thought of $his <<if $minimumSlaveAge > $fertilityAge>>$minimumSlaveAge<<else>>$fertilityAge<</if>> year old daughter<<if _curBabies > 1>>s<</if>> swollen with life, and proud of it, fills $him with @@.gold;disdain.@@
			<<set $activeSlave.devotion -= 4, $activeSlave.trust -= 4>>
		<</if>>
		<<set $breederOrphanageTotal += _curBabies>>
	<</if>>
	<<if _lostBabies != 1 && $DefaultBirthDestination === "individually decided fates">>

		<<link '...sent to a slave orphanage.'>>
			<<replace #_disposition>>
				<<set $slaveOrphanageTotal += _curBabies>>
				sent to one of $arcologies[0].name's slave orphanages. $activeSlave.slaveName
				<<if $activeSlave.fetish == "mindbroken" || $activeSlave.fuckdoll > 0>>
					has few thoughts about the matter.
				<<elseif $activeSlave.devotion > 95>>
					worships you so completely that $he will not resent this.
				<<elseif $activeSlave.devotion > 50>>
					is devoted to you, but $he will @@.mediumorchid;struggle to accept this.@@
					<<set $activeSlave.devotion -= 2>>
				<<elseif $activeSlave.devotion > 20>>
					has accepted being a sex slave, but $he will @@.mediumorchid;resent this intensely.@@
					<<set $activeSlave.devotion -= 3>>
				<<else>>
					will of course @@.mediumorchid;hate you for this.@@
					<<set $activeSlave.devotion -= 4>>
				<</if>>
			<</replace>>
			<<set $nextButton = "Back">><<UpdateNextButton>> /* unlock Continue button */
		<</link>>
		<<if $activeSlave.pregSource == -9>>

<<link '...handed off to the Futanari Sisters.'>>
				<<replace #_disposition>>
					handed off to be raised into <<if $activeSlave.pregType > 1>>future Futanari Sisters<<else>>a future Futanari Sister<</if>>. $activeSlave.slaveName
					<<if $activeSlave.fetish == "mindbroken" || $activeSlave.fuckdoll > 0>>
						has few thoughts about the matter.
					<<else>>
						is overjoyed that $his child<<if $activeSlave.pregType > 1>>ren<</if>> will follow in <<if $activeSlave.pregType > 1>>their<<else>>its<</if>> parent's footsteps.
						<<set $activeSlave.devotion += 4>>
					<</if>>
				<</replace>>
				<<set $nextButton = "Back">><<UpdateNextButton>> /* unlock Continue button */
			<</link>>
		<</if>>
		<<if $arcologies[0].FSRepopulationFocus > 40>>

<<link '...sent to a breeder school.'>>
				<<replace #_disposition>>
					sent to one of $arcologies[0].name's future minded schools, to be administered fertility and virility treatments as well as be brought up to take pride in reproduction. $activeSlave.slaveName
					<<if $activeSlave.fetish == "mindbroken" || $activeSlave.fuckdoll > 0>>
						has few thoughts about the matter.
					<<elseif $activeSlave.devotion > 95>>
						loves you already, but $he'll @@.hotpink;love you even more@@ for this. $He can't wait to see $his child<<if _curBabies > 1>>ren<</if>> proudly furthering your cause.
						<<set $activeSlave.devotion += 4>>
					<<elseif $activeSlave.devotion > 50>>
						heard about these and will be @@.hotpink;happy that $his child<<if $activeSlave.pregType > 1>>ren<</if>> will have a purpose in your society other than slavery.@@ $He will miss $his child<<if $activeSlave.pregType > 1>>ren<</if>>, but $he expected that.
						<<set $activeSlave.devotion += 4>>
					<<elseif $activeSlave.devotion > 20>>
						will naturally miss $his child<<if _curBabies > 1>>ren<</if>>, but will is broken enough to hope that $his offspring will have a better life, or at least an enjoyable one.
					<<else>>
						will of course @@.mediumorchid;hate you for this.@@ The mere thought of $his <<if $minimumSlaveAge > $fertilityAge>>$minimumSlaveAge<<else>>$fertilityAge<</if>> year old daughter<<if _curBabies > 1>>s<</if>> swollen with life, and proud of it, fills $him with @@.gold;disdain.@@
						<<set $activeSlave.devotion -= 4, $activeSlave.trust -= 4>>
					<</if>>
					<<set $breederOrphanageTotal += _curBabies>>
				<</replace>>
				<<set $nextButton = "Back">><<UpdateNextButton>> /* unlock Continue button */
			<</link>>
			//Will cost a one-time <<print cashFormat(50)>>//
		<</if>>

<<link '...sent to a citizen school.'>>
			<<replace #_disposition>>
				sent to one of $arcologies[0].name's citizen schools, to be brought up coequal with the arcology's other young people. $activeSlave.slaveName
				<<if $activeSlave.fetish == "mindbroken" || $activeSlave.fuckdoll > 0>>
					has few thoughts about the matter.
				<<elseif $activeSlave.devotion > 95>>
					loves you already, but $he'll @@.hotpink;love you even more@@ for this.
				<<elseif $activeSlave.devotion > 50>>
					knows about these and will be @@.hotpink;overjoyed.@@ $He will miss $his child<<if _curBabies > 1>>ren<</if>>, but $he expected that.
				<<elseif $activeSlave.devotion > 20>>
					will naturally miss $his child<<if _curBabies > 1>>ren<</if>>, but will @@.hotpink;take comfort@@ in the hope that $his offspring will have a better life.
				<<else>>
					will naturally retain some resentment over being separated from $his child<<if _curBabies > 1>>ren<</if>>, but this should be balanced by hope that $his offspring will have a better life.
				<</if>>
				<<set $activeSlave.devotion += 4, $citizenOrphanageTotal += _curBabies>>
			<</replace>>
			<<set $nextButton = "Back">><<UpdateNextButton>> /* unlock Continue button */
		<</link>>
		//Will cost <<print cashFormat(100)>> weekly//

<<link '...sent to be raised privately.'>>
			<<replace #_disposition>>
				The child<<if _curBabies > 1>>ren are<<else>> is<</if>> sent to be privately raised, to be brought up as a future high class citizen. $activeSlave.slaveName
				<<if $activeSlave.fetish == "mindbroken" || $activeSlave.fuckdoll > 0>>
					has few thoughts about the matter.
				<<elseif $activeSlave.devotion > 95>>
					will @@.hotpink;worship you utterly@@ for this.
				<<elseif $activeSlave.devotion > 50>>
					understands that this is the best possible outcome for the offspring of slave, and will be @@.hotpink;overjoyed.@@
				<<elseif $activeSlave.devotion > 20>>
					will miss $his child<<if _curBabies > 1>>ren<</if>>, but will be @@.hotpink;very grateful,@@ since $he'll understand this is the best possible outcome for a slave mother.
				<<else>>
					will resent being separated from $his child<<if _curBabies > 1>>ren<</if>>, but @@.hotpink;should understand and be grateful@@ that this is the best possible outcome here.
				<</if>>
				The child<<if _curBabies > 1>>ren<</if>> will be raised privately, with expert care and tutoring, an expensive proposition.
				<<set $activeSlave.devotion += 6, $privateOrphanageTotal += _curBabies>>
			<</replace>>
			<<set $nextButton = "Back">><<UpdateNextButton>> /* unlock Continue button */
		<</link>>
		//Will cost <<print cashFormat(500)>> weekly//
	<<elseif _lostBabies != 1 && $DefaultBirthDestination != "individually decided fates">>
		$His <<if _curBabies > 1>>babies<<else>>baby<</if>> were sent to $DefaultBirthDestination. $activeSlave.slaveName
				<<switch $DefaultBirthDestination>>
					<<case "an orphanage">>
						<<if $activeSlave.devotion > 95>>
							worships you so completely that $he will not resent this.
						<<elseif $activeSlave.devotion > 50>>
							is devoted to you, but $he will @@.mediumorchid;struggle to accept this.@@
							<<set $activeSlave.devotion -= 2>>
						<<elseif $activeSlave.devotion > 20>>
							has accepted being a sex slave, but $he will @@.mediumorchid;resent this intensely.@@
							<<set $activeSlave.devotion -= 3>>
						<<else>>
							will of course @@.mediumorchid;hate you for this.@@
							<<set $activeSlave.devotion -= 4>>
						<</if>>
						<<set $slaveOrphanageTotal += _curBabies>>
					<<case "a citizen school">>
						<<if $activeSlave.devotion > 95>>
							loves you already, but <<print $he>>'ll @@.hotpink;love you even more@@ for this.
						<<elseif $activeSlave.devotion > 50>>
							knows about these and will be @@.hotpink;overjoyed.@@ $He will miss $his child<<if _curBabies > 1>>ren<</if>>, but $he expected that.
						<<elseif $activeSlave.devotion > 20>>
							will naturally miss $his child<<if _curBabies > 1>>ren<</if>>, but will @@.hotpink;take comfort@@ in the hope that $his offspring will have a better life.
						<<else>>
							will naturally retain some resentment over being separated from $his child<<if _curBabies > 1>>ren<</if>>, but this should be balanced by hope that $his offspring will have a better life.
						<</if>>
						<<set $activeSlave.devotion += 4, $citizenOrphanageTotal += _curBabies>>
					<<case "a private school">>
						<<if $activeSlave.devotion > 95>>
							will @@.hotpink;worship you utterly@@ for this.
						<<elseif $activeSlave.devotion > 50>>
							understands that this is the best possible outcome for the offspring of slave, and will be @@.hotpink;overjoyed.@@
						<<elseif $activeSlave.devotion > 20>>
							will miss $his child<<if _curBabies > 1>>ren<</if>>, but will be @@.hotpink;very grateful,@@ since <<print $he>>'ll understand this is the best possible outcome for a slave mother.
						<<else>>
							will resent being separated from $his child<<if _curBabies > 1>>ren<</if>>, but @@.hotpink;should understand and be grateful@@ that this is the best possible outcome here.
						<</if>>
						The child<<if _curBabies > 1>>ren<</if>> will be raised privately, with expert care and tutoring, an expensive proposition.
						<<set $activeSlave.devotion += 6, $privateOrphanageTotal += _curBabies>>
					<<case "breeder schools">>
						<<if $activeSlave.fetish == "mindbroken" || $activeSlave.fuckdoll > 0>>
							has few thoughts about the matter.
						<<elseif $activeSlave.devotion > 95>>
							loves you already, but $he'll @@.hotpink;love you even more@@ for this. $He can't wait to see $his child<<if _curBabies > 1>>ren<</if>> proudly furthering your cause.
							<<set $activeSlave.devotion += 4>>
						<<elseif $activeSlave.devotion > 50>>
							heard about these and will be @@.hotpink;happy that $his child<<if $activeSlave.pregType > 1>>ren<</if>> will have a purpose in your society other than slavery.@@ $He will miss $his child<<if $activeSlave.pregType > 1>>ren<</if>>, but $he expected that.
							<<set $activeSlave.devotion += 4>>
						<<elseif $activeSlave.devotion > 20>>
							will naturally miss $his child<<if _curBabies > 1>>ren<</if>>, but will is broken enough to hope that $his offspring will have a better life, or at least an enjoyable one.
						<<else>>
							will of course @@.mediumorchid;hate you for this.@@ The mere thought of $his <<if $minimumSlaveAge > $fertilityAge>>$minimumSlaveAge<<else>>$fertilityAge<</if>> year old daughter<<if _curBabies > 1>>s<</if>> swollen with life, and proud of it, fills $him with @@.gold;disdain.@@
							<<set $activeSlave.devotion -= 4, $activeSlave.trust -= 4>>
						<</if>>
						<<set $breederOrphanageTotal += _curBabies>>
					<<case "the market">>
						<<if $activeSlave.prestige > 1 || $activeSlave.pornPrestige > 2>>
							<<set _babyCost = random(-12,100)>>
							<<if $activeSlave.prematureBirth > 0>><<set _babyCost = random(-32,40)>><</if>>
						<<else>>
							<<set _babyCost = random(-12,12)>>
							<<if $activeSlave.prematureBirth > 0>><<set _babyCost = -45>><</if>>
						<</if>>
						$His <<if _curBabies > 1>>babies<<else>>baby<</if>> were sold for <<if _curBabies > 1>>a total of <</if>>@@.yellowgreen;<<print cashFormat(_curBabies*(50+_babyCost))>>.@@<<if $activeSlave.prematureBirth == 1>> A low price due to the added costs of caring for them.<</if>>
						<<if $activeSlave.devotion > 95>>
							$He adheres to your thoughts so strongly that even though you backed out of caring for $his child<<if _curBabies > 1>>ren<</if>>, $he still truly believes you are doing $him an honor.
						<<elseif $activeSlave.devotion > 50>>
							$He is @@.mediumorchid;deeply hurt@@ by your sudden decision to sell $his child<<if _curBabies > 1>>ren<</if>> instead of having <<if _curBabies > 1>>them<<else>>it<</if>> cared for. $His trust in your words @@.gold;wavers@@ as $he thinks of $his child<<if _curBabies > 1>>ren<</if>>'s future.
							<<set $activeSlave.trust -= 5, $activeSlave.devotion -= 5>>
						<<elseif $activeSlave.devotion > 20>>
							$He is @@.mediumorchid;devastated@@ by your sudden decision to sell $his child<<if _curBabies > 1>>ren<</if>> instead of having <<if _curBabies > 1>>them<<else>>it<</if>> cared for. $His mind struggles to comprehend @@.gold;such betrayal.@@
							<<set $activeSlave.trust -= 10, $activeSlave.devotion -= 10>>
						<<else>>
							For a moment, $he saw a glimmer of good in you; @@.mediumorchid;$he was clearly wrong.@@ $His mind struggles to comprehend @@.gold;why $he could ever even thing of trusting such a person.@@
							<<set $activeSlave.trust -= 30, $activeSlave.devotion -= 30>>
						<</if>>
						<<run cashX(_curBabies*(50+_babyCost), "babyTransfer")>>
				<</switch>>
	<<else>>
		<<set $nextButton = "Back">><<UpdateNextButton>> /* unlock Continue button */
	<</if>>

<</if>>

<<if _curBabies+_cToIncub+_cToNursery < 1>>
	/* Reaction for no live babies here. Placeholder.*/
<<elseif $activeSlave.fetish != "mindbroken" && $activeSlave.fuckdoll == 0>>

	<<if $activeSlave.pregSource == -1>>
		<<if $activeSlave.devotion <= 20 && $activeSlave.weekAcquired > 0>>
			$He @@.mediumorchid;despises@@ you for using $his body to bear your children.
			<<set $activeSlave.devotion -= 10>>
		<<elseif $activeSlave.devotion > 50>>
			$He's @@.hotpink;so proud@@ to have successfully carried children for you.
			<<set $activeSlave.devotion += 3>>
		<</if>>
	<</if>>
	<<if $activeSlave.fetish == "pregnancy">>
		$He's a little disappointed $he didn't get to give birth, but can't wait to get pregnant again.
	<<elseif ($activeSlave.devotion > 50)>>
		$He is @@.hotpink;pleased by this stark development,@@ since $he is so attentive to your will. $He also expects $he'll be able to fuck better now.
		<<set $activeSlave.devotion += 4>>
	<<elseif ($activeSlave.devotion > 20)>>
		$He is broken enough to accept your control of $his pregnancies.
	<<elseif ($activeSlave.devotion >= -20)>>
		$He would have preferred to give birth when $he was ready and is @@.gold;sensibly fearful@@ of your total power over $his body.
		<<set $activeSlave.trust -= 5>>
	<<else>>
		$He does not understand the realities of $his life as a slave at a core level, so $he's @@.mediumorchid;terrified and angry@@ that you decided to cut short $his pregnancy. $He is @@.gold;sensibly fearful@@ of your total power over $his body.
		<<set $activeSlave.trust -= 5, $activeSlave.devotion -= 5>>
	<</if>>
<</if>>

<<if $arcologies[0].FSRestart != "unset" && _curBabies > 0>>

	<<if $activeSlave.breedingMark == 1 && ($activeSlave.pregSource == -1 || $activeSlave.pregSource == -6) && $propOutcome == 1>>
		The Societal Elite @@.green;are pleased@@ at the new additions to their class.
		<<set $failedElite -= 2*_curBabies>>
	<<elseif $eugenicsFullControl != 1>>
		The Societal Elite @@.red;are disappointed@@ that you would allow subhuman filth to dirty society under your watch. Society @@.red;frowns@@ on the unwelcome addition of more subhumans into the world.
		<<set $failedElite += 5*_curBabies>>
		<<run repX(forceNeg(10*_curBabies), "birth", $activeSlave)>>
	<</if>>
<</if>>

Since $his <<if $activeSlave.mpreg == 1>>ass<<else>>vagina<</if>> was spared from childbirth, @@.lime;it retained its tightness.@@
<<if ($PC.medicine >= 100)>>
	Since you @@.springgreen;performed the surgery yourself,@@ and you do artist's work, $his health is @@.green;less affected@@ by the surgery than it would have been if you'd paid some hack to do it remotely.
	<<if $activeSlave.fetish != "mindbroken" && $activeSlave.fuckdoll == 0>>
		$He went into the surgery very aware that you were performing it manually.
		<<if ($activeSlave.devotion < _oldDevotion)>>
			<<if ($activeSlave.devotion > 50)>>
				Though $he is unhappy with the results, $he consoles $himself with the knowledge that you cared enough to do it personally.
			<<elseif ($activeSlave.devotion >= -20)>>
				$He is @@.gold;even more afraid@@ of you afterward than $he would otherwise be. You must seem a cruel and near-omnipotent power to $him.
				<<set $activeSlave.trust -= 5>>
			<<else>>
				$He is @@.mediumorchid;even more hateful@@ of you afterward than $he would otherwise be. It must seem to $him that $he's nothing more than a test subject to you.
				<<set $activeSlave.devotion -= 5>>
			<</if>>
		<<else>>
			<<if ($activeSlave.devotion > 50)>>
				Since $he's happy with the results, $he's almost beside $himself with @@.hotpink;gratitude,@@ and filled with @@.mediumaquamarine;admiration@@ of your skill.
				<<set $activeSlave.devotion += 4, $activeSlave.trust += 4>>
			<<elseif ($activeSlave.devotion >= -20)>>
				$He is quite struck by how you performed the surgery personally. $He admires your refusal to be one of the idle rich, and @@.hotpink;likes you more.@@
				<<set $activeSlave.devotion += 5>>
			<<else>>
				$He knows that $he should be grateful to you for performing the surgery personally, but the emotional turmoil of the occasion is too much for $him, and the realization makes little lasting impact.
			<</if>>
		<</if>>
	<</if>>
<<else>>
	As with all surgery @@.red;$his health has been slightly affected.@@
	<<set $activeSlave.health -= 5>>
<</if>>
<<if $activeSlave.wombImplant == "restraint">>
	The uterine support mesh built into $his womb was irreversibly damaged and had to be carefully extracted. Such an invasive surgery carried @@.red;major health complications.@@
	<<set $activeSlave.health -= 30, $activeSlave.wombImplant = "none">>
<</if>>

<<if $activeSlave.womb.length == 0>> /* Only if pregnancy is really ended... */
	<<if lastPregRule($activeSlave,$defaultRules)>><<set $activeSlave.preg = -1>><<else>><<set $activeSlave.preg = 0>><</if>>
	<<set $activeSlave.pregType = 0>>
	<<set $activeSlave.pregSource = 0>>
	<<set $activeSlave.pregKnown = 0>>
	<<if $activeSlave.geneticQuirks.fertility+$activeSlave.geneticQuirks.hyperFertility >= 4>>
		<<set $activeSlave.pregWeek = -2>>
	<<elseif $activeSlave.geneticQuirks.hyperFertility > 1>>
		<<set $activeSlave.pregWeek = -3>>
	<<else>>
		<<set $activeSlave.pregWeek = -4>>
	<</if>>
	<<set $activeSlave.labor = 0>>
	<<if $activeSlave.broodmother == 0 && $bellyImplants == 1>>

		Since $he is already in surgery and $his body already stretched, it would be possible to preserve $his pregnant appearance via fillable implant.

		<<link "Do it.">>
			<<replace "#bir">>
				<<if $PC.medicine >= 100>><<set $activeSlave.health -= 5>><<else>><<set $activeSlave.health -= 10>><</if>>
				Installation of belly implant is relatively simple procedure. Using the fact that $his body and internal organs have already adapted to pregnancy, it's possible to greatly expand the initial size of implant. $He will still look pregnant post surgery and recovery.

				<<if ($activeSlave.devotion > 50)>>
					$He leaves the surgery with $his belly still very gravid, and as such, knows you put something into $his womb replacing $his prior natural pregnancy. $He is @@.hotpink;curious@@ about the details of the implant, and eagerly awaits to see the end result.
					<<set $activeSlave.devotion += 4>>
				<<elseif ($activeSlave.devotion >= -20)>>
					$He leaves the surgery with $his belly still very gravid, and as such, knows you put something into $his womb replacing $his prior natural pregnancy. $He understands the realities of $his life as a slave, but $he is still surprised at what now resides in $his womb. $He is @@.gold;sensibly fearful@@ of your total power over $his body.
					<<set $activeSlave.trust -= 5>>
				<<else>>
					$He leaves the surgery with $his belly still very gravid, and as such, knows you put something into $his womb replacing $his prior natural pregnancy. $He does not understand the realities of $his life as a slave at a core level, so $he's @@.mediumorchid;terrified and angry@@ at the potential that $he's been turned in some sort of freak. Even after what has been implanted into $his womb is explained to $him, $he is no less defiant; though $he is relieved that procedure is reversible and there is no truly permanent damage. $He is @@.gold;sensibly fearful@@ of your total power over $his body.
					<<set $activeSlave.trust -= 5>>
					<<set $activeSlave.devotion -= 5>>
				<</if>>
				<<set $activeSlave.bellyImplant = Math.floor(_beforeSize)>>
				<<if $activeSlave.bellyImplant > 800000 && $arcologies[0].FSTransformationFetishistResearch > 0>>
					<<set $activeSlave.bellyImplant = 800000>>
				<<elseif $activeSlave.bellyImplant > 130000 && $arcologies[0].FSTransformationFetishistResearch < 1>>
					<<set $activeSlave.bellyImplant = 130000>>
				<</if>>
				<<set $activeSlave.preg = -2>>
				<<run SetBellySize($activeSlave)>>
			<</replace>>
		<</link>>
	<</if>>
<</if>>
<<set $activeSlave.cSec = 1>>
<<run SetBellySize($activeSlave)>>
<<set $reservedChildren = FetusGlobalReserveCount("incubator")>>
<<set $reservedChildrenNursery = FetusGlobalReserveCount("nursery")>>


code:
:: Customize Slave Trade [nobr]

<<if ndef $nationalities>>
	<<set $nationalities = {}>>
<</if>>
<<if ndef $baseControlsFilter>>
	<<set $baseControlsFilter = "all">>
<</if>>
<<if ndef $customWA>>
	<<set $customWA = 0>>
<</if>>

When civilization turned upon itself, some countries readily took to enslaving their own. Others were raided by their neighbors for their desirable, and profitable, citizens. Which nationalities were most affected by the booming slave trade, and thus, likely to appear in your local slave markets?

''+ to increase pop. – to reduce pop. 0 to remove entirely''

<<include "Basenationalities Controls">>

[[Reset filters|passage()][$baseControlsFilter = "all"]] | [[Clear all nationalities|passage()][$nationalities = {}]]

Vanilla presets:

<>

Mod presets:

<>

repo_name: Fekenol/fc


code:
:: Elite Slave [nobr]

<<set $nextButton = "Back", $nextLink = "Buy Slaves", $returnTo = "Buy Slaves">>
<<set $showEncyclopedia = 1, $encyclopedia = "Slave Schools">>

You check to see if any potential breeding slaves are on auction. <<if $eliteAuctioned == 1>>There are none available right now, but there probably will be next week.<<else>>

<<set $eliteAuctioned = 1>>

<<if $arcologies[0].FSMaturityPreferentialist > 20>>
	<<set $activeSlaveOneTimeMinAge = 25>>
<<else>>
	<<set $activeSlaveOneTimeMinAge = $fertilityAge>>
<</if>>
<<if $arcologies[0].FSYouthPreferentialist > 20>>
	<<set $activeSlaveOneTimeMaxAge = 23>>
<<else>>
	<<set $activeSlaveOneTimeMaxAge = 40>>
<</if>>
<<set $one_time_age_overrides_pedo_mode = 1>>
<<set $oneTimeDisableDisability = 1>>
<<if $arcologies[0].FSSupremacist != "unset">>
	<<set $fixedRace = $arcologies[0].FSSupremacistRace>>
<<elseif $arcologies[0].FSSubjugationist != "unset">>
	<<set _races = ["amerindian", "asian", "asian", "asian", "asian", "asian", "asian", "black", "black", "indo-aryan", "indo-aryan", "latina", "latina", "latina", "malay", "malay", "middle eastern", "middle eastern", "mixed race", "pacific islander", "semitic", "semitic", "southern european", "southern european", "white", "white", "white", "white", "white", "white", "white", "white", "white"]>>
	<<set _races = _races.delete($arcologies[0].FSSubjugationistRace)>>
	<<set $fixedRace = _races.random()>>
<</if>>
<<include "Generate XX Slave">>
<<set $activeSlave.origin = "She was purchased from a member of the Elite.">>
<<set $activeSlave.career = "a slave">>
<<set $activeSlave.prestige = 1>>
<<set $activeSlave.trust = random(60,100)>>
<<set $activeSlave.devotion = random(60,100)>>
<<if $arcologies[0].FSPaternalist > 20>>
	<<set $activeSlave.health = 100>>
	<<set $activeSlave.intelligenceImplant = 30>>
<<else>>
	<<set $activeSlave.health = random(10,60)>>
	<<set $activeSlave.intelligenceImplant = either(0,15,30)>>
<</if>>
<<if $arcologies[0].FSSlimnessEnthusiast > 20>>
	<<if $arcologies[0].FSHedonisticDecadence > 20 || $arcologies[0].FSPhysicalIdealistLaw == 1>>
		<<set _weightMax = 30>>
	<<else>>
		<<set _weightMax = 0>>
	<</if>>
<<elseif $arcologies[0].FSPhysicalIdealistLaw == 1>>
	<<set _weightMax = 30>>
<<else>>
	<<set _weightMax = 100>>
<</if>>
<<if $arcologies[0].FSHedonisticDecadence > 20>>
	<<if $arcologies[0].FSSlimnessEnthusiast > 20>>
		<<set _weightMin = 10>>
	<<else>>
		<<set _weightMin = 95>>
	<</if>>
<<else>>
	<<set _weightMin = -70>>
<</if>>
<<set $activeSlave.weight = random(_weightMin, _weightMax)>>
<<if $arcologies[0].FSPhysicalIdealist > 20>>
	<<if $arcologies[0].FSPhysicalIdealistLaw == 1>>
		<<set _musclesMin = 20>>
		<<set _musclesMax = 50>>
	<<else>>
		<<set _musclesMin = 95>>
		<<set _musclesMax = 100>>
	<</if>>
<<elseif $arcologies[0].FSHedonisticDecadence > 20>>
	<<if $arcologies[0].FSHedonisticDecadenceStrongFat == 1>>
		<<set _musclesMin = 50>>
		<<set _musclesMax = 100>>
	<<else>>
		<<set _musclesMin = -100>>
		<<set _musclesMax = 50>>
	<</if>>
<<else>>
	<<set _musclesMin = -50>>
	<<set _musclesMax = 50>>
<</if>>
<<set $activeSlave.muscles = random(_musclesMin, _musclesMax)>>
<<if $arcologies[0].FSPhysicalIdealist > 20>>
	<<set $activeSlave.height += 5>>
<</if>>
<<set $activeSlave.eyes = 1>>
<<set $activeSlave.hears = 0>>
<<if ($activeSlave.weight < -30)>>
	<<set $activeSlave.waist = random(-55,0)>>
<<elseif $activeSlave.physicalAge < 13>>
	<<set $activeSlave.waist = random(-25,25)>>
<<elseif ($activeSlave.weight <= 30)>>
	<<set $activeSlave.waist = random(-45,5)>>
<<elseif ($activeSlave.weight <= 160)>>
	<<set $activeSlave.waist = random(-20,10)>>
<</if>>
<<if $activeSlave.voice < 2>>
	<<set $activeSlave.voice++>>
<</if>>
<<if $activeSlave.accent > 1>>
	<<set $activeSlave.accent = 1>>
<</if>>
<<if $activeSlave.shoulders > 0>>
	<<set $activeSlave.shoulders -= 2>>
<</if>>
<<if $arcologies[0].FSAssetExpansionist > 20>>
	<<set $activeSlave.boobs = (random(50,500) * 100)>>
	<<set $activeSlave.butt = random(6,20)>>
	<<if $arcologies[0].FSTransformationFetishist > 20>>
		<<set $activeSlave.boobsImplant = $activeSlave.boobs-200>>
		<<set $activeSlave.buttImplant = $activeSlave.butt-1>>
	<</if>>
<<elseif $arcologies[0].FSSlimnessEnthusiast > 20>>
	<<set $activeSlave.boobs = (random(3,5) * 100)>>
	<<set $activeSlave.butt = random(0,2)>>
	<<if $arcologies[0].FSTransformationFetishist > 20>>
		<<set $activeSlave.boobsImplant = $activeSlave.boobs-50>>
		<<if $activeSlave.butt > 1>>
			<<set $activeSlave.buttImplant = 1>>
		<</if>>
	<</if>>
<<else>>
	<<set $activeSlave.boobs = (random(5,10) * 100)>>
	<<set $activeSlave.butt = random(3,7)>>
	<<if $arcologies[0].FSTransformationFetishist > 20>>
		<<set $activeSlave.boobsImplant = $activeSlave.boobs-200>>
		<<set $activeSlave.buttImplant = $activeSlave.butt-1>>
	<</if>>
<</if>>
<<if $arcologies[0].FSTransformationFetishist > 20>>
	<<set $activeSlave.boobShape = "normal">>
<<else>>
	<<set $activeSlave.boobShape = either("perky", "perky", "torpedo-shaped", "wide-set")>>
<</if>>
<<if $activeSlave.nipples == "tiny">>
	<<set $activeSlave.nipples = "puffy">>
<</if>>
<<set $activeSlave.face = 100>>
<<set $activeSlave.faceShape = either("cute", "cute", "exotic", "exotic", "normal", "normal", "sensual", "sensual", "sensual")>>
<<set $activeSlave.lips = random(45,75)>>
<<if $arcologies[0].FSTransformationFetishist > 20>>
	<<set $activeSlave.lips += 25>>
	<<set $activeSlave.lipsImplant = 25>>
<</if>>
<<if $activeSlave.teeth != "normal" && $activeSlave.physicalAge >= 12>>
	<<set $activeSlave.teeth = "normal">>
<</if>>
<<if $activeSlave.vaginaLube == 0>>
	<<set $activeSlave.vaginaLube++>>
<</if>>
<<set $activeSlave.preg = 0>>
<<set $activeSlave.counter.birthsTotal = either(0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 4)>>
<<if $arcologies[0].FSPastoralist > 20 || $activeSlave.counter.birthsTotal > 0>>
	<<set $activeSlave.lactation = 1>>
	<<if $arcologies[0].FSPastoralist > 20>>
		<<set $activeSlave.lactationAdaptation = $arcologies[0].FSPastoralist>>
	<<else>>
		<<set $activeSlave.lactationAdaptation = Math.min($activeSlave.counter.birthsTotal*10, 100)>>
	<</if>>
<<else>>
	<<set $activeSlave.lactation = either(0, 0, 0, 0, 1)>>
<</if>>
<<if $activeSlave.lactation > 0>>
	<<set $activeSlave.lactationDuration = 2>>
<</if>>
<<if $activeSlave.counter.birthsTotal > 0>>
	<<set $activeSlave.vagina = random(2,3)>>
	<<set $activeSlave.pregWeek = either(-4, -3, -2, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)>>
<<else>>
	<<set $activeSlave.vagina = random(0,3)>>
	<<set $activeSlave.pregWeek = 0>>
<</if>>
<<if $activeSlave.hips <= 0>>
	<<set $activeSlave.hips = 1>>
<</if>>
<<if $arcologies[0].FSGenderRadicalist > 20>>
	<<set $activeSlave.dick = random(2,5)>>
	<<set $activeSlave.balls = random(2,10)>>
	<<set $activeSlave.scrotum = $activeSlave.balls>>
	<<set $activeSlave.prostate = random(1,3)>>
<</if>>
<<set $activeSlave.makeup = 2>>
<<set $activeSlave.nails = 1>>
<<if $activeSlave.vagina == 0>>
	<<set $activeSlave.skill.vaginal = 30>>
<<else>>
	<<set $activeSlave.skill.vaginal = 100>>
<</if>>
<<if $activeSlave.anus == 0>>
	<<set $activeSlave.skill.anal = 10>>
<<else>>
	<<set $activeSlave.skill.anal = 70>>
<</if>>
<<set $activeSlave.skill.oral = 100>>
<<set $activeSlave.chastityVagina = 1>>
<<set $activeSlave.intelligence = random(51,100)>>
<<set $activeSlave.attrKnown = 1>>
<<set $activeSlave.fetishKnown = 1>>
<<set $activeSlave.behavioralQuirk = "confident">>
<<set $activeSlave.sexualQuirk = either("caring", "caring", "gagfuck queen", "perverted", "romantic", "romantic", "strugglefuck queen", "tease", "unflinching")>>
<<set $activeSlave.pubertyXX = 1>>
<<set $activeSlave.breedingMark = 1>>

<<slaveCost $activeSlave>>

It will take <<print cashFormat($slaveCost)>> to win the auction.

<<if $cash >= $slaveCost>>
	[[Place that bid|New Slave Intro][cashX(forceNeg($slaveCost), "slaveTransfer", $activeSlave),$nextButton = "Continue",$nextLink = "AS Dump",$returnTo = "Main"]]
<<else>>
	//You lack the necessary funds to place a winning bid.//
<</if>>

<<set $saleDescription = 1>><<include "Long Slave Description">>

<</if>>


code:
:: eliteTakeOver [nobr]

<<set $nextButton = " ">>

<<set _pregSurrender = 0>>
/* preg/lobotomization check */
You knew this day would come. Surrounding yourself with powerful people has its boons, but also poses a distinct threat. You've heard them murmuring when you enter the room, you've seen them excuse themselves from your presence, and lately they've been overtly hostile. The Societal Elite have turned on you.

You look up from your desk as the locked door to your office unseals, and a dozen individuals brazenly walk into your view.<<if $Bodyguard != 0>><<setLocalPronouns $Bodyguard>> $Bodyguard.slaveName stands between you and them. A single glare from the leader of the bunch and $he backs off, eyes to the ground.<</if>>

<<if $PC.pregSource == -1 || $PC.pregSource == -6>>
	<<if $PC.refreshmentType == 0>>
		Taking a drag from a fresh $PC.refreshment,
	<<elseif $PC.refreshmentType == 1>>
		Taking a drink of a fresh glass of $PC.refreshment,
	<<elseif $PC.refreshmentType == 2>>
		Taking a bite of a fresh $PC.refreshment,
	<<elseif $PC.refreshmentType == 3>>
		Doing a line of $PC.refreshment,
	<<elseif $PC.refreshmentType == 4>>
		Injecting a hit of $PC.refreshment into your arm,
	<<elseif $PC.refreshmentType == 5>>
		Swallowing a $PC.refreshment,
	<<elseif $PC.refreshmentType == 6>>
		Placing a tab of $PC.refreshment under your tongue,
	<</if>>
	you greet your rather unwelcome guests.

	"You are no longer worthy of being a part of our society. But you carry within you one of our heirs. A conundrum for some, but we have already solved that problem."

	What was that last thing he said? It's getting hard to think right. The $PC.refreshment... Drugged... You collapse onto your desk, unconscious.

	<<if $Bodyguard != 0>>
		A sharp pain and a rush of adrenaline drags you back to your senses. Sneaking a peak, you witness $Bodyguard.slaveName valiantly trying to protect you, despite <<if $Bodyguard.amp < 0>>$his cybernetics being locked down<<else>>the overwhelming odds<</if>>. As $he and their leader struggle closer to your desk, his revolver and a syringe are dislodged onto your desk. It seems drugging you wasn't their first thought. With $Bodyguard.slaveName's risky gamble, your fate has fallen back into your hands.
	<<else>>
		You'll spend the rest of your life a breeder to the Societal Elite; blinded and muted. More than a slave, but still less than your master. Life isn't so bad, your two most devoted slaves were taken along to keep you happy, and you are treated quite well, possibilities considered. Though once your eggs dry up, odds are your little remaining usefulness will be at an end. Best not to think too much into it.
		<<set _pregSurrender = 1>>
		<<set $ui = "start">>

		''GAME OVER''
	<</if>>
<<else>>
	The leader reaches into his jacket and extracts a syringe, you recognize it as a powerful drug used in lobotomies, and places it to your left. From his hip he pulls a revolver, six-chambered, and loads five bullets, spins the chamber, and places it to your right.

	"You are no longer worthy of being a part of our society. You know you can't be allowed to spread any information. But we are not merciless; one of our members has taken an interest in having you as her pet. You may choose to lose your mind, and service her until she tires of you, or gamble for your life and serve her anyway. Now decide."
<</if>>

<<if _pregSurrender == 0>>
	<<set $finalChoice = "final stand">>
	The choice is simple — you will not be a slave.

	You decide to make a final stand.

	<<if $Bodyguard != 0>>

		<<if $PC.pregSource == -1 || $PC.pregSource == -6>>
			$Bodyguard.slaveName is already doing everything in $his power to save you.
		<<else>>
			<<link "Attempt to signal $Bodyguard.slaveName, your bodyguard">>
				<<set $finalChoice = "bodyguard">>
				<<replace "#fate">>
					attempt to signal $Bodyguard.slaveName, your bodyguard.
				<</replace>>
			<</link>>
		<</if>>
	<</if>>
	<<if $mercenaries >= 1>>

		<<link "Send a message to the leader of the $mercenariesTitle">>
			<<set $finalChoice = "mercenaries">>
			<<replace "#fate">>
				send a message to the leader of the $mercenariesTitle.
			<</replace>>
		<</link>>
	<</if>>
	<<if $SF.Toggle && $SF.Active >= 1>>

 <<set _N = SFC()>>
		<<link "Send a message to _N">>
			<<set $finalChoice = "SF">>
			<<replace "#fate">>
				send a message to <<print SFC()>>.
			<</replace>>
		<</link>>
	<</if>>
	<<if $PC.pregSource != -6 && $PC.pregSource != -1>>

		<<link "Try and enrage them.">>
			<<set $finalChoice = "enrage">>
			<<replace "#fate">>
				try and enrage them, baiting them into a vulnerable position.
			<</replace>>
		<</link>>
	<</if>>

	<<link "Make a final stand">>
		<<set $finalChoice = "final stand">>
		<<replace "#fate">>
			make a final stand.
		<</replace>>
	<</link>>

	<<link "Give in">>
		<<set $finalChoice = "give in">>
		<<replace "#fate">>
			give in.
		<</replace>>
	<</link>>

	<<link "Confirm">>
		<<goto "eliteTakeOverFight">>
	<</link>>
<</if>>


code:
:: eliteTakeOverFight [nobr]

<<set _shoot = 0>>
<<switch $finalChoice>>
<<case "bodyguard">>
	<<set _roll = random(0,100)>>
	<<if $career == "mercenary">>
		As a result of your prior experience as a mercenary you were able to successfully signal $Bodyguard.slaveName without the elites noticing.
		<<set $BodyguardHasSucessfullyRecivedSignal = 1>>
	<<elseif $PC.warfare >= 100 && _roll > 20>>
		As a result of your mastery of warfare you were able to successfully signal $Bodyguard.slaveName without the elites noticing.
		<<set $BodyguardHasSucessfullyRecivedSignal = 1>>
	<<elseif $PC.warfare >= 60 && _roll > 30>>
		As a result of your expertness of warfare you were able to successfully signal $Bodyguard.slaveName without the elites noticing.
		<<set $BodyguardHasSucessfullyRecivedSignal = 1>>
	<<elseif $PC.warfare >= 30 && _roll > 40>>
		As a result of having some skill in warfare you were able to successfully signal $Bodyguard.slaveName without the elites noticing.
		<<set $BodyguardHasSucessfullyRecivedSignal = 1>>
	<<elseif $PC.warfare >= 10 && _roll > 50>>
		As a result of having a small amount of skill in warfare you were able to successfully signal $Bodyguard.slaveName without the elite's noticing.
		<<set $BodyguardHasSucessfullyRecivedSignal = 1>>
	<<elseif $PC.warfare < 10 && _roll > 60>>
		By blind luck and what little you remember of your lessons in warfare are were able to successfully signal $Bodyguard.slaveName without the elites noticing.
		<<set $BodyguardHasSucessfullyRecivedSignal = 1>>
	<<else>>
		One of the elites shouts "What the fuck were you trying to do?" Well, there goes that option.
		<<set $BodyguardHasSucessfullyRecivedSignal = 0>>
	<</if>>

You then pick up the revolver and quickly take aim.
<<case "mercenaries">>

You send a quick message to the leader of your $mercenariesTitle, about your situation, then you pick up the revolver and quickly take aim.
	<<set $MercenariesMessageSent = 1>>
<<case "SF">>

You send a quick message to <<print SFC()>> about your situation, then you pick up the revolver and quickly take aim.
	<<set $SpecialForcesMessageSent = 1>>
<<case "enrage">>
	<<if $PC.career != "wealth" && $PC.career != "engineer" && $PC.career != "medicine">>
		You know exactly what to say in order to enrage them.
		<<set _EliteEnraged = 1>>
	<<elseif random(0,100) > 50>>
		You manage to select the right words to enrage them.
		<<set _EliteEnraged = 1>>
	<<else>>
		You try to enrage them, but your words have had no effect.
		<<set _EliteEnraged = 0>>
	<</if>>

You then pick up the revolver and quickly take aim.
<<case "final stand">>
	You pick up the revolver and quickly take aim.
<<case "give in">>
	You pick up the revolver and hold the barrel to your temple.
<</switch>>

<<if $finalChoice == "give in">>
	<<if $PC.pregSource == -1 || $PC.pregSource == -6>> Screw their plans, you're out of here. <</if>>With a bang! you drop dead.
	<<set $ui = "start">>

	''GAME OVER''
<<else>>
	/* PC shooting */
	/* higher skill means a higher chance to hit due to lower requirements and if the elites are enraged they very slightly become easier targets. */
	/* 5/6 = 83% rounded down is the chance that it was loaded chamber (simplified version based off the Wikipedia article) */

	/* variables: */
	/* Revolver */
	<<set _revolverChambers = 6>>
	<<set _revolverBullets = 5>>
	/*Elites */
	<<set $eliteTotal = 12>>
	<<set $eliteDead = 0>>
	<<set $eliteVegetable = 0>>

	/* To Hit chance */
	<<if $PC.pregSource == -1 || $PC.pregSource == -6>> /* still woozy */
		<<set _toHit = 56>>
	<<elseif $PC.career == "mercenary" || $PC.warfare == 100>>
		<<set _toHit = 83>>
	<<elseif $PC.warfare >= 60>>
		<<set _toHit = 76>>
	<<elseif $PC.warfare >= 30>>
		<<set _toHit = 67>>
	<<elseif $PC.warfare >= 10>>
		<<set _toHit = 60>>
	<<else>>
		<<set _toHit = 56>>
	<</if>>
	<<if _EliteEnraged == 1>>
		<<set _toHit += 5>>
	<</if>>

	/* shooting */
	/* in the end I removed the messages from the cycle. I don't think having 6 lines of "you shot" is pretty looking. Feel free to re add them in however */
	<<for _i = _revolverChambers; _i > 0; _i-->>
		<<if random(0,100) <= _toHit && _revolverBullets > 0>>
			<<set $eliteDead += 1, _revolverBullets -= 1>>
		<<elseif _revolverBullets > 0>>
			<<set _revolverBullets -= 1>>
		<</if>>
	<</for>>

	<<if $eliteDead >= 1>>

You managed to kill several elites in rapid succession, leaving the rest in shock and fear.
	<<elseif $eliteDead == 1>>

You managed to kill one elite, leaving the rest in shock and fear.
	<<else>>

Unfortunately you fail to kill a single elite.
	<</if>>

	/* syringe shot */
	<<set $eliteVegetable = 0>>
	<<set _druggedThrow = 0>>

	<<if $eliteDead > 0>>
		With $eliteDead elite's dead, you pick up the syringe from the desk and aim for the forehead of another.
	<<else>>
		Having failed to kill them with the revolver, in a desperate move you pick up the syringe from the desk and aim for the forehead of one of the elite.
	<</if>>
	<<if $PC.pregSource == -1 || $PC.pregSource == -6>>But there's two of them... Shaking your head, you realize it's the drugs messing with you. You just need to focus.<</if>>
	<<set _hitRoll = (random(0,100) - _druggedThrow)>>
	<<if $career == "mercenary" && _hitRoll > 0>>
		With your prior history as a mercenary, making the throw is child's play.
		<<set _SyringeHeadShot = 1>>
	<<elseif $PC.warfare >= 100>>
		<<if _hitRoll > 50>>
			As a result of your mastery of warfare you successfully made the throw.
			<<set _SyringeHeadShot = 1>>
		<<else>>
			Unfortunately you miss the shot.
			<<set _SyringeHeadShot = 0>>
		<</if>>
	<<elseif $PC.warfare >= 60>>
		<<if _hitRoll > 60>>
			As a result of your combat expertise you successfully made the throw.
			<<set _SyringeHeadShot = 1>>
		<<else>>
			Unfortunately you miss the shot.
			<<set _SyringeHeadShot = 0>>
		<</if>>
	<<elseif $PC.warfare >= 30>>
		<<if _hitRoll > 70>>
			As you have some skill, you successfully made the throw.
			<<set _SyringeHeadShot = 1>>
		<<else>>
			Unfortunately you miss the shot.
			<<set _SyringeHeadShot = 0>>
		<</if>>
	<<elseif $PC.warfare >= 10>>
		<<if _hitRoll > 80>>
			Your small amount of skill assisted you in making the throw.
			<<set _SyringeHeadShot = 1>>
		<<else>>
			Unfortunately you miss the shot.
			<<set _SyringeHeadShot = 0>>
		<</if>>
	<<elseif $PC.warfare < 10>>
		<<if _hitRoll > 90>>
			By blind luck you successfully made the throw.
			<<set _SyringeHeadShot = 1>>
		<<else>>
			Unfortunately you miss the shot.
			<<set _SyringeHeadShot = 0>>
		<</if>>
	<</if>>
	<<if _SyringeHeadShot == 1>>

		Picking up the spent revolver, you aim for the syringe's plunger.
		<<if $career == "mercenary">>
			With your prior history as a mercenary, making the throw is child's play.
			<<set _SpentRevolverHitSyringePlunger = 1>>
		<<elseif $PC.warfare >= 100 && random(0,100) > 50>>
			As a result of your mastery of warfare you successfully made the throw.
			<<set _SpentRevolverHitSyringePlunger = 1>>
		<<elseif $PC.warfare >= 60 && random(0,100) > 60>>
			As a result of your expertness of warfare you successfully made the throw.
			<<set _SpentRevolverHitSyringePlunger = 1>>
		<<elseif $PC.warfare >= 30 && random(0,100) > 70>>
			As you have some skill you successfully made the throw.
		<<set _SpentRevolverHitSyringePlunger = 1>>
		<<elseif $PC.warfare >= 10 && random(0,100) > 80>>
			Your small amount of skill assisted you in making the throw.
			<<set _SpentRevolverHitSyringePlunger = 1>>
		<<elseif $PC.warfare < 10 && random(0,100) > 90>>
			By blind luck you successfully made the throw.
			<<set _SpentRevolverHitSyringePlunger = 1>>
		<<else>>
			Unfortunately you miss the shot.
			<<set _SpentRevolverHitSyringePlunger = 0>>
		<</if>>
	<</if>>
	<<if _SpentRevolverHitSyringePlunger == 1>>

		<<if random(0,100) > 50>>
			The target dies of nervous system overload brought about by the drug.
			<<set $eliteDead +=1>>
		<<else>>
			The target is still alive but is nothing more than a vegetable.
			<<set $eliteVegetable = 1>>
		<</if>>
	<</if>>
<</if>>

<<set $eliteLeft = $eliteTotal - $eliteDead - $eliteVegetable>>

/* if the player has managed to make enough damage to the elite and the rep is high enough the citizens will come to save the PC */
/* this is to give reason to exist for the "enrage" and "last stand" option */
/* result							*/
/* $eliteFate:						*/
/*		killed = 0					*/
/*		enslaved = 1				*/
/*		had fun (and enslaved) = 2	*/
<<if $BodyguardHasSucessfullyRecivedSignal == 1>>
	<<setLocalPronouns $Bodyguard>>
	<<run Enunciate($Bodyguard)>>
	$Bodyguard.slaveName asks, "<<Master>>, what <<sh>>ould I do with the <<if $eliteLeft < $eliteTotal>>remaining<</if>> 'elite' left?"

	<<link "Open fire">>
		<<set $eliteFate = 0>>
		<<goto "eliteTakeOverResult">>
	<</link>>

	<<link "Enslave them">>
		<<set $eliteFate = 1>>
		<<goto "eliteTakeOverResult">>
	<</link>>

<<link "Have fun with them them">>
		<<set $eliteFate = 2>>
		<<goto "eliteTakeOverResult">>
	<</link>>
<<elseif $MercenariesMessageSent == 1>>
	It is now that a squad of $mercenariesTitle makes their entrance, pointing their guns at the <<if $eliteLeft < $eliteTotal>>remaining<</if>> elite.
	The officer asks, "Your orders, <<= properTitle()>>?"

	<<link "Open fire">>
		<<set $eliteFate = 0>>
		<<goto "eliteTakeOverResult">>
	<</link>>

	<<link "Enslave them">>
		<<set $eliteFate = 1>>
		<<goto "eliteTakeOverResult">>
	<</link>>

<<link "Have fun with them them">>
		<<set $eliteFate = 2>>
		<<goto "eliteTakeOverResult">>
	<</link>>
<<elseif $SpecialForcesMessageSent>>
	It is now that a squad of $SF.Lower makes their entrance, pointing their guns at the <<if $eliteLeft < $eliteTotal>>remaining<</if>> elite.
	The officer asks, "Your orders, <<= properTitle()>>?"

	<<link "Open fire">>
		<<set $eliteFate = 0>>
		<<goto "eliteTakeOverResult">>
	<</link>>

	<<link "Enslave them">>
		<<set $eliteFate = 1>>
		<<goto "eliteTakeOverResult">>
	<</link>>

<<link "Have fun with them them">>
		<<set $eliteFate = 2>>
		<<goto "eliteTakeOverResult">>
	<</link>>
<<elseif $Bodyguard != 0>>
	<<setLocalPronouns $Bodyguard>>
	<<run Enunciate($Bodyguard)>>
	It is now that $Bodyguard.slaveName makes $his entrance, pointing $his guns at the <<if $eliteLeft < $eliteTotal>>remaining<</if>> elite.
	$He then asks "<<Master>>, what <<sh>>ould I do with the <<if $eliteLeft < $eliteTotal>>remaining<</if>> 'elite' left?"

	<<link "Open fire">>
		<<set $eliteFate = 0>>
		<<goto "eliteTakeOverResult">>
	<</link>>

	<<link "Enslave them">>
		<<set $eliteFate = 1>>
		<<goto "eliteTakeOverResult">>
	<</link>>

<<link "Have fun with them them">>
		<<set $eliteFate = 2>>
		<<goto "eliteTakeOverResult">>
	<</link>>
<<elseif $eliteLeft <= 9 && $rep >= 10000>>
	Some of the citizens waiting outside your penthouse to see you hear the ruckus and rush inside, worried. Time freezes for a few seconds, while the remaining elite recover from their terror and the citizens digest the gory scene in front of them.
	The newcomers are quick to take your side. In little time the elites, outgunned and outnumbered, are neutralized.

One of the more courageous citizens approaches you and asks "<<= properTitle()>>, what should we do with them?"

	<<link "Open fire">>
		<<set $eliteFate = 0>>
		<<goto "eliteTakeOverResult">>
	<</link>>

	<<link "Enslave them">>
		<<set $eliteFate = 1>>
		<<goto "eliteTakeOverResult">>
	<</link>>

<<link "Have fun with them them">>
		<<set $eliteFate = 2>>
		<<goto "eliteTakeOverResult">>
	<</link>>
<<elseif $finalChoice != "give in">>
	With nothing else left, you remain powerless to stop the <<if $eliteLeft < $eliteTotal>>remaining<</if>> elite, who quickly capture and enslave you. Your personal story may continue, but the part of it worthy of retelling has now ended.
	<<set $ui = "start">>

	''GAME OVER''
<</if>>


code:
:: eliteTakeOverResult [nobr]

<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */

<<if $Bodyguard != 0>>
	<<setLocalPronouns $Bodyguard>>
<</if>>
<<setNonlocalPronouns $seeDicks>>

<<switch $eliteFate>>
<<case 0>>
	<<if $MercenariesMessageSent == 1>>
		The mercenaries open fire as ordered. Shortly after, the conspiring elite are dead.
	<<elseif $SpecialForcesMessageSent == 1>>
		The soldiers open fire as ordered. Shortly after, the conspiring elite are dead.
	<<elseif $eliteLeft <= 9 && $rep >= 10000>>
		Your citizens freeze for a second, then obey your orders. Shortly after, the conspiring elite are dead.
	<<else>>
		Your bodyguard opens fire as ordered. Shortly after, the conspiring elite are dead.
	<</if>>
<<case 1>>
	<<if random(0,100) > 50>>
			An elite bites down on a cyanide pill hidden in a false tooth and
		<<if random(0,100) > 75>>
			takes the coward's way out (how predictable), frothing at the mouth.
			<<set $eliteDead += 1>>
		<<else>>
			experiences great pain but unfortunately (for them at least) survives.
		<</if>>
	<</if>>
	<<if $MercenariesMessageSent == 1>>

The <<if $eliteLeft < $eliteTotal>>remaining<</if>> elite are quickly captured and enslaved by your mercenaries.
	<<elseif $SpecialForcesMessageSent == 1>>

The <<if $eliteLeft < $eliteTotal>>remaining<</if>> elite are quickly captured and enslaved by your soldiers.
	<<elseif $eliteLeft <= 9 && $rep >= 10000>>

The <<if $eliteLeft < $eliteTotal>>remaining<</if>> elite are quickly captured and enslaved by your loyal citizens.
	<<else>>

The <<if $eliteLeft < $eliteTotal>>remaining<</if>> elite are quickly captured and enslaved by your bodyguard.
	<</if>>
<<case 2>>
	<<if random(0,100) > 50>>
			An elite bites down on a cyanide pill hidden in a false tooth and
		<<if random(0,100) > 75>>
			takes the coward's way out (how predictable), frothing at the mouth.
			<<set $eliteDead += 1>>
		<<else>>
			experiences great pain but unfortunately (for them at least) survives.
		<</if>>
	<</if>>
	<<if $MercenariesMessageSent == 1>>

The <<if $eliteLeft < $eliteTotal>>remaining<</if>> elite are quickly captured, abused and enslaved.
		The officer is thankful for giving the troops a chance to let off some stream. Two soldiers decide to double team an elite; one ass fucks while the other facefucks.
		Another soldier takes a particular interest in an elite and politely asks you
		"<<= properTitle()>>, can I keep _himU?"

			<<link "No">>
				<<replace "#choice1">>
					Your rejection upsets some of them, but their professionalism ensures it isn't visible.
				<</replace>>
			<</link>>
			|
			<<link "Yes">>
				<<set $eliteLeft -= 1>>
				<<run repX(2500, "event")>>
				<<replace "#choice1">>
					For a second your acceptance shocks them. Once they recover they are very grateful. "Thank you <<= properTitle()>>, I'll make sure to look after _himU." Soon the story spreads of the kind arcology owner, enhancing your reputation.
				<</replace>>
			<</link>>

	<<elseif $SpecialForcesMessageSent>>

The <<if $eliteLeft < $eliteTotal>>remaining<</if>> elite are quickly captured, abused and enslaved.
		<<if $SF.Depravity <= 0.3>>
			Two soldiers decide to double team an elite; one gropes _hisU ass while the other gropes _hisU tits.
		<<elseif $SF.Depravity <= 1.2>>
			Two soldiers decide to double team an elite; one ass fucks while the other facefucks.
		<<else>>
			Two soldiers decide to double team an elite; one breaks out their knife and begins to make little breaks in the elite's skin while the other soldier facefucks them.
		<</if>>
		Another soldier takes a particular interest in an elite and politely asks you "<<= properTitle()>>, can I keep _himU?"

			<<link "No">>
				<<set _SFHappyEverAfter = 0>>
				<<replace "#choice1">>
					Your rejection upsets some of them, but their professionalism ensures it isn't visible.
				<</replace>>
			<</link>>
			|
			<<link "Yes">>
				<<set $eliteLeft -= 1, _SFHappyEverAfter = 1>>
				<<run repX(2500, "event")>>
				<<replace "#choice1">>
					For a second your acceptance shocks them. Once they recover they are very grateful. "Thank you <<= properTitle()>>, I'll make sure to look after _himU." Soon the story spreads of the kind arcology owner, enhancing your reputation.
				<</replace>>
			<</link>>

		<<if $SF.MercCon.CanAttend === -1>>
			<<switch $SF.Colonel.Core>>
				<<case "kind">>
					The Colonel is shocked that you would allow her troops to do this but understands that it comes with the territory. <<if _SFHappyEverAfter == 1>>Thanks for being kind to one of my soldiers.<</if>>
				<<case "brazen""jaded""cruel">>
					The Colonel is grateful that you let her troops let off some steam. <<if _SFHappyEverAfter == 1>>Thanks for being kind to one of my soldiers.<</if>>
			<</switch>>
		<</if>>
		<<set $SF.Depravity += 0.05>>
	<<elseif $eliteLeft <= 9 && $rep >= 10000>>
		<<if $arcologies[0].FSDegradationist != "unset">>
			An evil smile appears on the faces of your loyal citizens, while the surviving elite freeze in terror. The impromptu festivity will go on for hours, getting more and more depraved.
		<<else>>
			While some citizens respectfully step out, some join you in the fun. The impromptu festivities will go on for hours, getting more and more depraved.
		<</if>>
	<<else>>
		<<if $Bodyguard.fetish == "sadist">>$Bodyguard.slaveName gets out $his melee weapon and starts to give them many small cuts, the look of pleasure on $his face is evident.<<else>>$Bodyguard.slaveName ties them and then gets out $his melee weapon and starts to abuse them, $his face is blank.<</if>>

Shortly after, the terrified <<if $eliteLeft < $eliteTotal>>remaining<</if>> elite are quickly brought away to be officially enslaved.
	<</if>>
<</switch>>

<<if $eliteFate >= 1>>
	<<if $eliteVegetable == 1>>
		<<set $eliteLeft-->>
		<<set $activeSlaveOneTimeMinAge = 25>>
		<<set $activeSlaveOneTimeMaxAge = ($retirementAge-2)>>
		<<set $oneTimeDisableDisability = 1>>
		<<if $arcologies[0].FSSupremacistLawME == 1>>
			<<set $fixedRace = $arcologies[0].FSSupremacistRace>>
		<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
			<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
			<<set $fixedRace = _races.random()>>
		<</if>>
		<<if $seeDicks == 0>>
			<<include "Generate XX Slave">>
		<<elseif $seeDicks == 100>>
			<<include "Generate XY Slave">>
		<<elseif random(1,100) > 50>> /* 50% chance of getting girl or boy */
			<<include "Generate XX Slave">>
		<<else>>
			<<include "Generate XY Slave">>
		<</if>>
		<<set _origin = "She was a member of the Societal Elite, captured in their failed attempt at expressing their displeasure.">>
		<<set $activeSlave.origin = _origin>>
		<<set $activeSlave.career = "a well connected individual">>
		<<set $activeSlave.prestige = either(2,2,3)>> /* 33% chance of getting level 3 prestige */
		<<set $activeSlave.prestigeDesc = "She was once considered influential in society, but now she's the one getting fucked.">>
		<<set $activeSlave.face = random(70,100)>>
		<<set $activeSlave.devotion = random(-10,-20)>>
		<<set $activeSlave.trust = random(-20,-30)>>
		<<if $activeSlave.boobShape == "saggy" || $activeSlave.boobShape == "downward-facing">>
			<<set $activeSlave.boobShape = either("perky", "torpedo-shaped", "wide-set")>>
		<</if>>
		<<set $activeSlave.fetish = "mindbroken">>
		<<set $activeSlave.pubicHStyle = "waxed">>
		<<set $activeSlave.underArmHStyle = "waxed">>
		<<set $activeSlave.anus = 0>>
		<<set $activeSlave.weight = random(10,75)>>
		<<set $activeSlave.intelligence = random(70,100)>>
		<<set $activeSlave.intelligenceImplant = 30>>
		<<set $activeSlave.skill.entertainment = 0>>
		<<set $activeSlave.skill.whoring = 0>>
		<<set $activeSlave.health = random(60,75)>>
		<<set $activeSlave.canRecruit = 0>>
		<<run newSlave($activeSlave)>> /* skip New Slave Intro */
		<<set $activeSlave.recruiter = 0>> /* override New Slave Intro */
	<</if>>
	<<for _i = $eliteLeft; _i > 0; _i-->>
		<<set $activeSlaveOneTimeMinAge = 25>>
		<<set $activeSlaveOneTimeMaxAge = ($retirementAge-2)>>
		<<set $oneTimeDisableDisability = 1>>
		<<if $arcologies[0].FSSupremacistLawME == 1>>
			<<set $fixedRace = $arcologies[0].FSSupremacistRace>>
		<<elseif $arcologies[0].FSSubjugationistLawME == 1>>
			<<set _races = setup.filterRacesLowercase.filter(race => race !== $arcologies[0].FSSubjugationistRace)>>
			<<set $fixedRace = _races.random()>>
		<</if>>
		<<if $seeDicks == 0>>
			<<include "Generate XX Slave">>
		<<elseif $seeDicks == 100>>
			<<include "Generate XY Slave">>
		<<elseif random(1,100) > 50>> /* 50% chance of getting girl or boy */
			<<include "Generate XX Slave">>
		<<else>>
			<<include "Generate XY Slave">>
		<</if>>
		<<set _origin = "She was a member of the Societal Elite, captured in their failed attempt at expressing their displeasure.">>
		<<set $activeSlave.origin = _origin>>
		<<set $activeSlave.career = "a well connected individual">>
		<<set $activeSlave.prestige = either(2,2,3)>>
		<<set $activeSlave.prestigeDesc = "She was once considered influential in society, but now she's the one getting fucked.">>
		<<set $activeSlave.face = random(70,100)>>
		<<set $activeSlave.devotion = random(-10,-20)>>
		<<set $activeSlave.trust = random(-20,-30)>>
		<<if $eliteFate == 2 && random(1,100) >= 75>> /* 25% chance of getting mindbroken elites if they were abused */
			<<set $activeSlave.fetish = "mindbroken">>
		<</if>>
		<<if $activeSlave.boobShape == "saggy" || $activeSlave.boobShape == "downward-facing">>
			<<set $activeSlave.boobShape = either("perky", "torpedo-shaped", "wide-set")>>
		<</if>>
		<<set $activeSlave.pubicHStyle = "waxed">>
		<<set $activeSlave.underArmHStyle = "waxed">>
		<<set $activeSlave.anus = 0>>
		<<set $activeSlave.weight = random(-30,75)>>
		<<set $activeSlave.intelligence = random(0,60)>>
		<<set $activeSlave.intelligenceImplant = 30>>
		<<set $activeSlave.skill.entertainment = 0>>
		<<set $activeSlave.skill.whoring = 0>>
		<<set $activeSlave.health = random(60,75)>>
		<<set $activeSlave.canRecruit = 0>>
		<<set $activeSlave.behavioralFlaw = either("arrogant", "bitchy")>>
		<<run newSlave($activeSlave)>> /* skip New Slave Intro */
		<<set $activeSlave.recruiter = 0>> /* override New Slave Intro */
	<</for>>
<</if>>

/* clean up */
<<set $failedElite = 0, $eugenicsFullControl = 1>>


code:
:: FAnimalImpreg [nobr]

<<set $nextButton = "Back", $nextLink = "Slave Interact", $impregnatrix = 0, $eligibility = 0>>

<<set _CL = $canines.length, _HL = $hooved.length, _FL = $felines.length>>

__Select an eligible animal to knock $him up:__

/* FIXME: this might not work */

<<for _c = 0; _c < _CL; _c++>>
	<<if canBreed($activeSlave, $canines[_c])>>
		<<if $canines[_c].species != "dog">>
			<<set _canine = $canines[_c].species>>
		<<else>>
			<<set _canine = $canines[_c].breed>>
		<</if>>

<<link "Have a _canine knock $him up" "FAnimalImpreg Consummate">><<set $impregnatrix = $canines[_c]>><</link>>
		<<set $eligibility = 1>>
	<</if>>
<</for>>
<<for _h = 0; _h < _HL; _h++>>
	<<if canBreed($activeSlave, $hooved[_h])>>
		<<set _hooved = $hooved[_h].species>>

<<link "Have a _hooved knock $him up" "FAnimalImpreg Consummate">><<set $impregnatrix = $hooved[_h]>><</link>>
		<<set $eligibility = 1>>
	<</if>>
<</for>>
<<for _f = 0; _f < _fL; _f++>>
	<<if canBreed($activeSlave, $felines[_f])>>
		<<if $felines[_f].species != "cat">>
			<<set _feline = $felines[_f].species>>
		<<else>>
			<<set _feline = $felines[_f].breed>>
		<</if>>

<<link "Have a _feline knock $him up" "FAnimalImpreg Consummate">><<set $impregnatrix = $felines[_f]>><</link>>
		<<set $eligibility = 1>>
	<</if>>
<</for>>
<<if ($eligibility == 0)>>
//You have no animals capable of inseminating $him.//
<</if>>


code:
:: FAnimalImpreg Consummate [nobr]

/* TODO: all of this */

<<set _animal = $impregnatrix>>
You have a servant lead the <<if _animal.species != "dog" || _animal.species != "cat">><<print _animal.species>><<else>><<print _animal.breed>><</if>> in on a leash and feed him a special treat, one laced with high amounts of aphrodasiacs and vasodilators. They have an effect very rapidly, and the <<if _animal.species != "dog" || _animal.species != "cat">><<print _animal.species>><<else>><<print _animal.breed>><</if>>'s <<print _animal.dickSize>> cock quickly stands at attention.


code:
:: FDick [nobr]
/* TODO: .pregMood and more amp variants */

<<run clearSummaryCache($activeSlave)>>
<<setLocalPronouns $activeSlave>>

<<set _belly = bellyAdjective($activeSlave)>>
/*CHECK*/

/*NON-AMPUTEE*/
<<if ($activeSlave.amp < 1)>>
	You direct $activeSlave.slaveName to lie down and ready $himself as you step over to $him and align your <<if $PC.vagina == 1>> vagina <<else>> ass <</if>> with
	<<if ($activeSlave.vaginaPiercing > 1) && ($activeSlave.dick != 0)>>
		$his pierced cock-head.
	<<elseif ($activeSlave.vaginaPiercing == 1) && ($activeSlave.dick != 0)>>
		$his pierced cock.
	<<else>>
		$his cock.
	<</if>>

	<<if $activeSlave.fetish != "mindbroken" && $activeSlave.fuckdoll == 0>>
		<<if $activeSlave.devotion > 20>>
			$He thought $he would be fucking another slave, not $his <<= WrittenMaster()>>, so to say $he's pleasantly surprised would be an understatement.
		<<elseif $activeSlave.devotion >= -20>>
			$He thought $he would fucking another slave, not $his <<= WrittenMaster()>>; $he has mixed feelings about this, but $his body can't wait to plunge your depths.
		<<else>>
			<<if $activeSlave.trust > 20>>
				$He was already horrified at the thought of being ordered to lie down and let another slave rape $his dick, but when $he realized it would be you instead, that horror turned to a mix of confusion and sheer terror.
			<<else>>
				$His dick springs to life at the prospect of plunging into your depths; this may be $his chance to one up you for a change.
			<</if>>
		<</if>>
	<</if>>

	You slowly lower yourself onto $his
	<<if $activeSlave.dick == 1>>
		tiny
	<<elseif $activeSlave.dick == 2>>
		cute
	<<elseif $activeSlave.dick == 3>>
		average
	<<elseif $activeSlave.dick == 4>>
		big
	<<elseif $activeSlave.dick == 5>>
		impressive
	<<elseif $activeSlave.dick == 6>>
		huge
	<<elseif $activeSlave.dick == 7>>
		gigantic
	<<elseif $activeSlave.dick == 8>>
		titanic
	<<elseif $activeSlave.dick == 9>>
		absurd
	<<elseif $activeSlave.dick == 10>>
		inhuman
	<<else>>
		hypertrophied
	<</if>>
	dick, savoring every <<if $showInches == 2>>inch<<else>>centimeter<</if>>,
	<<if $activeSlave.dick <= 6>>
		until you find yourself hilted and sitting on $his pelvis.
	<<else>>
		until you feel that you can't take any more of $him inside you.
	<</if>>

	Making eye contact, you reach <<if $PC.belly < 5000 && $activeSlave.belly < 5000>>back<<else>>down<</if>>
	<<if $activeSlave.scrotum > 0>>
		and stroke $his
		<<if $activeSlave.balls == 0>>
			soft
		<<elseif $activeSlave.balls == 1>>
			tiny
		<<elseif $activeSlave.balls == 2>>
			cute
		<<elseif $activeSlave.balls == 3>>
			average
		<<elseif $activeSlave.balls == 4>>
			large
		<<elseif $activeSlave.balls == 5>>
			huge
		<<else>>
			monstrous
		<</if>>
		balls,
	<<else>>
		soft perineum,
	<</if>>
	making it abundantly clear that you want $his cum.

	<<if ($activeSlave.fetish == "mindbroken")>>
		Like a doll, $he dumbly remains still, completely indifferent that $he's deep in $his <<= WrittenMaster()>>'s <<if $PC.vagina == 1>>pussy<<else>>butt<</if>>.
		You start moving up and on $his shaft, continuing until you climax and lift yourself off of $him. A strand of cum slips from your <<if $PC.vagina == 1>>slit<<else>>anus<</if>>; it seems $activeSlave.slaveName came too.
		Since $he is mindbroken, $his responses to you are purely physiological and your actions have no affect on $him mentally. You leave your toy for one of your other slaves to clean and maintain.
	<<elseif $activeSlave.devotion > 50>>
		<<if $activeSlave.trust < -20>>
			Having followed your instructions as quickly as $he could in fear of your wrath, $he tries $his best to please you while you bounce<<if $PC.belly >= 5000>> your gravid bulk<</if>> on $his obedient cock. $He timidly warns you that $he is about to cum; in response you speed up your pace and clamp down hard on $his throbbing shaft. $He squeaks lewdly, overwhelmed by your orgasmic <<if $PC.vagina == 1>>cunt<<else>>rectal<</if>> spasms, and unloads inside of you before apologizing submissively.
		<<elseif $activeSlave.trust <= 20>>
			Having followed your instructions quickly and obediently, $he tries $his best to please you while you bounce<<if $PC.belly >= 5000>> your gravid bulk<</if>> on $his eager cock. $He grabs your hips and warns you $he is about to cum; in response you speed up your pace, encouraging $him to impale you on $his throbbing shaft. $He squeals lewdly, overwhelmed by your orgasmic <<if $PC.vagina == 1>>cunt<<else>>rectal<</if>> spasms, and unloads spurt after spurt into you before helping you up.
		<<else>>
			Having followed your instructions with gusto, $he energetically pounds you while you bounce<<if $PC.belly >= 5000>> your gravid bulk<</if>> on $his eager cock. $He grabs your hips and desperately warns you $he can't hold out any longer; in response you speed up your pace, tipping $him over the edge and forcing $him to impale you on $his twitching shaft. $He moans loudly, overwhelmed by your orgasmic <<if $PC.vagina == 1>>cunt<<else>>rectal<</if>> spasms, and unloads spurt after spurt into you before pulling you into a post coitus embrace.
		<</if>>
	<<elseif $activeSlave.devotion >= -20>>
		<<if $activeSlave.trust < -20>>
			Having hesitatingly followed your instructions, $he lies as still as $he can beneath you while you bounce<<if $PC.belly >= 5000>> your gravid bulk<</if>> on $his terrified cock. While $he is too afraid to enjoy pleasuring you, $he obediently thrusts into you. $He timidly warns you that $he is about to cum; in response you speed up your pace and clamp down hard on $his throbbing shaft. $He cries out in surprise, overwhelmed by your orgasmic <<if $PC.vagina == 1>>cunt<<else>>rectal<</if>> spasms, and blows $his load in you like a good little slave.
		<<elseif $activeSlave.trust <= 20>>
			Having obediently followed your instructions, $he lies as still as $he can beneath you while you bounce<<if $PC.belly >= 5000>> your gravid bulk<</if>> on $his willing cock. While $he is too uncertain of $his position in the hierarchy to really enjoy $himself, $he hesitatingly thrusts into you. When $he feels $he is nearing $his limit, $he gives you proper warning that $he is about to cum; in response you speed up your pace and clamp down hard on $his throbbing shaft. $He cries out in surprise, overwhelmed by your orgasmic <<if $PC.vagina == 1>>cunt<<else>>rectal<</if>> spasms and boldness, and blows $his load in you during the confusion.
		<<else>>
			Having obediently followed your instructions, $he energetically pounds you while you bounce<<if $PC.belly >= 5000>> your gravid bulk<</if>> on $his eager cock. $He grabs your hips and pounds you a little too eagerly, not even slowing down as you begin to feel $him tense with orgasm. Without so much as a warning to you, $he trembles with orgasm, pumping $his load deep into your <<if $PC.vagina == 1>>cunt<<else>>rectum<</if>> and setting off your own. You glare daggers at $him as $he profusely apologizes for $his lack of restraint.
		<</if>>
	<<else>>
		<<if $activeSlave.trust < -20>>
			Having followed your instructions as quickly as $he could, $he lies as still as $he can beneath you while you bounce<<if $PC.belly >= 5000>> your gravid bulk<</if>> on $his reluctant cock. While $he is too afraid to be an active participant in pleasuring you, you make do with what $he's giving. $He timidly warns you that $he is about to cum; in response you speed up your pace and clamp down hard on $his throbbing shaft. $He cries out lewdly, overwhelmed by your orgasmic <<if $PC.vagina == 1>>cunt<<else>>rectal<</if>> spasms, and unloads inside of you despite $his fear.
		<<elseif $activeSlave.trust <= 20>>
			Having followed your instructions as quickly as $he could, $he lies as still as $he can beneath you while you bounce<<if $PC.belly >= 5000>> your gravid bulk<</if>> on $his reluctant cock. While $he is too hateful to be an active participant in pleasuring you, you make do with what $he's got. $He cries out lewdly, overwhelmed by your orgasmic <<if $PC.vagina == 1>>cunt<<else>>rectal<</if>> spasms, and unloads deep inside you without warning. $He @@.orangered;smirks a little@@ as you glare daggers at $him.
			<<set $activeSlave.trust++>>
		<<elseif overpowerCheck($activeSlave, $PC) < random(1,100)>>
			Without warning, $he flips you onto your side and, still hilted,
			<<if $activeSlave.belly >= 300000>>
				repositions you onto your hands and knees while using $his _belly belly to pin you under $him.
			<<elseif $PC.belly >= 5000>>
				rolls you into missionary while pinning your arms and legs.
			<<elseif $PC.boobsBonus > 1>>
				pushes your face down into your <<if $PC.boobsImplant == 1>>fake <</if>>cleavage while pinning your arms and legs.
			<<else>>
				rolls you into missionary while pinning your arms and forcing you into a mating press.
			<</if>>
			Such audacity takes you entirely by surprise and gives $him the edge $he needs to pull it off. $He vigorously pistons in and out of you with little regard for you<<if $PC.pregKnown == 1>> or your pregnancy<</if>>, fucking you senseless until $he has had enough and cums deep inside your <<if $PC.vagina == 1>>pussy<<else>>ass<</if>>.
			<<if canImpreg($PC, $activeSlave) && $activeSlave.fetish == "pregnancy">>
				Running a hand across your firm belly, $he decides $his job is not yet done and begins reaming you once more, dead set on taking this opportunity to @@.orangered;show you your place by knocking you up with $his child.@@ $He manages to empty $his balls in your womb several more times before exhaustion kicks in, forcing $him to leave you twitching and drooling cum.
				<<= knockMeUp($PC, 100, 0, $activeSlave.ID)>>
				<<set $activeSlave.counter.penetrative += 5, $penetrativeTotal += 5>>
			<<else>>
				Contently sighing, $he pulls $his still very hard cock from your overwhelmed body and forces it into your mouth, ready to blow a second load and give you a @@.orangered;taste of your place,@@ before leaving you twitching and drooling cum.
				<<set $activeSlave.counter.penetrative++, $penetrativeTotal++>>
			<</if>>
			<<set $activeSlave.trust += 5>>
		<<else>>
			You feel $him shift dominantly beneath you and in response
			<<if $activeSlave.scrotum > 0>>
				clamp down on $his balls
			<<else>>
				twist $his dick at an odd angle
			<</if>>
			until $he behaves. $He groans with a mix and disgust and pleasure while you bounce<<if $PC.belly >= 5000>> your gravid bulk<</if>> on $his traitorous cock. $He might not want to bend to your will, but you have $his body wrapped around your little finger, even though it still leaves you doing all the work. $He cries out lewdly, overwhelmed by your orgasmic <<if $PC.vagina == 1>>cunt<<else>>rectal<</if>> spasms, and unloads deep inside you without warning. $He @@.orangered;smirks a little@@ as you glare daggers at $him.
			<<set $activeSlave.trust++>>
		<</if>>
	<</if>>
/*AMPUTEE*/
<<else>>
	You step over to pick up $activeSlave.slaveName, lie $him down and get $him ready. Then you align your <<if $PC.vagina == 1>> vagina <<else>> ass <</if>> with
	<<if ($activeSlave.vaginaPiercing > 1) && ($activeSlave.dick != 0)>>
		$his pierced cock-head.
	<<elseif ($activeSlave.vaginaPiercing == 1) && ($activeSlave.dick != 0)>>
		$his pierced cock
	<<else>>
		$his cock
	<</if>>
	and lower yourself onto $his

	<<if $activeSlave.dick == 1>>
		tiny dick
	<<elseif $activeSlave.dick == 2>>
		cute dick
	<<elseif $activeSlave.dick == 3>>
		dick
	<<elseif $activeSlave.dick == 4>>
		big dick
	<<elseif $activeSlave.dick == 5>>
		impressive dick
	<<elseif $activeSlave.dick == 6>>
		huge dick
	<<elseif $activeSlave.dick == 7>>
		gigantic dick
	<<elseif $activeSlave.dick == 8>>
		titanic dick
	<<elseif $activeSlave.dick == 9>>
		absurd dick
	<<elseif $activeSlave.dick == 10>>
		inhuman dick
	<<else>>
		hypertrophied dick
	<</if>>
	<<if $activeSlave.dick <= 6>>
		until you are sitting on $his loins.
	<<else>>
		until feel that you can't take more of $him inside you.
	<</if>>

	You reach back

	<<if $activeSlave.scrotum > 0>>
		and stroke $his
		<<if $activeSlave.balls == 0>>
			soft scrotum.
		<<elseif $activeSlave.balls == 1>>
			tiny balls.
		<<elseif $activeSlave.balls == 2>>
			cute balls.
		<<elseif $activeSlave.balls == 3>>
			balls.
		<<elseif $activeSlave.balls == 4>>
			large balls.
		<<elseif $activeSlave.balls == 5>>
			huge balls.
		<<else>>
			monstrous balls.
		<</if>>
	<<else>>
		soft perineum.
	<</if>>
	<<if ($activeSlave.fetish == "mindbroken")>>
		Like a broken doll, $he dumbly remains still, watching you without interest.
		You start moving up and on $his shaft, until you climax and notice that so did $activeSlave.slaveName.
		Since $he is mindbroken, $his responses to you are purely physiological and your actions have no affect on $him mentally. You leave your toy for one of your other slaves to clean and maintain.
	<<else>>
		You ride your helpless slave until you both climax.
	<</if>>
<</if>>

<<if canWalk($activeSlave) && $activeSlave.fetish != "mindbroken" && $postSexCleanUp > 0>>
	<<switch $activeSlave.assignment>>
	<<case "whore">>
		$He heads to the bathroom to clean $his dick before returning to selling $his body publicly.
	<<case "serve the public">>
		$He heads to the bathroom to clean $his dick before returning to allowing the public to use $his body.
	<<case "rest">>
		$He heads to the bathroom to clean $his dick before crawling back into bed.
	<<case "get milked">>
		$He hurries to the bathroom to clean $his dick <<if $activeSlave.lactation > 0>>before going to get $his uncomfortably milk-filled tits drained<<else>>and then rests until $his balls are ready to be drained again<</if>>.
	<<case "please you">>
		$He hurries to the bathroom to clean $his dick before returning to await your next use of $his body, as though nothing had happened.
	<<case "be a subordinate slave">>
		$He moves to the bathroom to clean $his dick, though it's only a matter of time before another slave decides to take their turn with $his cock.
	<<case "be a servant">>
		$He hurries to the bathroom to clean $his dick, since $his chores didn't perform themselves while you used $him.
	<<case "be your Head Girl">>
		$He hurries to the bathroom to clean $his dick, worried that $his charges got up to trouble while you were using $him.
	<<case "guard you">>
		$He hurries off to wash $his dick so you'll be unguarded for as little time as possible.
	<<case "work in the brothel">>
		$He goes to wash $his dick so $his next customer has no idea what $he's been up to.
	<<case "serve in the club">>
		$He goes to wash $his dick to make it appear unused.
	<<case "work in the dairy">>
		$He goes off to carefully wash $his dick to avoid besmirching the nice clean dairy.
	<<case "work as farmhand">>
		$He goes off to wash $his dick to avoid tainting the food in $farmyardName.
	<<case "work as a servant">>
		$He rushes to wash $his dick, impatient to get back to $his undiminished chores.
	<<case "work as a nanny">>
		$He runs off to wash off $his dick before heading back to the $nurseryName.
	<</switch>>
<</if>>

<<set $activeSlave.counter.penetrative++, $penetrativeTotal++>>
<<if canImpreg($PC, $activeSlave)>>
	<<if $activeSlave.diet == "cum production">>
		<<set _pregChance = ($activeSlave.balls * 5 * 1.2)>>
		<<= knockMeUp($PC, _pregChance, 0, $activeSlave.ID)>>
	<<else>>
		<<set _pregChance = ($activeSlave.balls * 5)>>
		<<= knockMeUp($PC, _pregChance, 0, $activeSlave.ID)>>
	<</if>>
<</if>>
<<if $sexualOpeness == 0>>
	Rumors spread that you @@.red;enjoy taking it from slaves.@@
	<<set $PC.degeneracy += 2>>
<</if>>

<<if passage() !== "Slave Interact">>
	<<set $slaves[$slaveIndices[$activeSlave.ID]] = $activeSlave>>
<</if>>