code:
:: BirthStorm [nobr]

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

<<set $activeSlave.curBabies = WombBirth($activeSlave, 34)>> /*Here check - how many children survive this event. 34 weeks minimum.*/
<<set _curBabies = $activeSlave.curBabies>>

The remote surgery allows the removal of the pregnancy generator through conventional means, an injection to induce labor and the resulting birthing of the womb's contents.
<<if $activeSlave.pregType > 40>>
	$activeSlave.slaveName's obscenely swollen belly begins to shudder and writhe moments after being injected with the drug as all her waters break. She spreads her <<if $activeSlave.amp != 1>>legs to either side of her spasming bulk as wide as she can<<else>>stumps as wide as she can<</if>> with a loud moan. Her vaginal lips part as the first of her brood is born, followed by another, and another. After hours of constant
<<elseif $activeSlave.pregType > 20>>
	$activeSlave.slaveName's massive belly shudders and shrinks as all her waters simultaneously break. She spreads her <<if $activeSlave.amp != 1>>legs<<else>>stumps<</if>> wide with a loud moan. Her vaginal lips part as the first of her brood is born, followed not long after by another. After an hour of constant
<<else>>
	$activeSlave.slaveName's massive belly shudders and shrinks as all her waters simultaneously break. She spreads her <<if $activeSlave.amp != 1>>legs<<else>>stumps<</if>> wide with a loud moan. Her vaginal lips part as her birthing begins. After an hour of intensive
<</if>>
<<if $activeSlave.fetish == "mindbroken">>
	birthing, she shows little interest in the changes to her body. @@.red;The ordeal of intensive birthing has had a massive effect on her health as well as completely destroying her vagina.@@
<<elseif $activeSlave.sexualFlaw == "breeder">>
	birthing and the realization that you are taking away her ideal body, her perfect existence; her mind @@.red;fundamentally breaks. The ordeal of intensive birthing has had a massive effect on her health as well as completely destroying her vagina.@@
	<<set $activeSlave.fetish = "mindbroken">>
<<elseif $activeSlave.fetish == "pregnancy" && $Nurse != 0>>
	birthing and orgasming all the time, $activeSlave.slaveName's mind would have broken. However, $Nurse.slaveName had the foresight to sedate her after witnessing her constant orgasming. She awakes to find her belly deflated, no longer crammed full of life. She is @@.mediumorchid;disappointed@@ that you would forbid her from such a pleasure, but @@.mediumaquamarine;understands@@ why it was done. @@.red;The ordeal of intensive birthing has had a massive effect on her health as well as completely destroying her vagina.@@
	<<set $activeSlave.trust += 5, $activeSlave.devotion -= 5>>
<<elseif $activeSlave.fetish == "pregnancy">>
	<<if $activeSlave.pregType > 40>>
		birthing and orgasming each time, $activeSlave.slaveName's mind is @@.red;fundamentally broken.@@ Being under constant pleasure for so long has destroyed all but the part of her that feels pleasure. With one final push the breeding device is expelled from her womb as the last spark of what was her mind is extinguished. @@.red;The ordeal of constant birthing has had a massive effect on her health as well as completely destroying her vagina.@@
		<<set $activeSlave.fetish = "mindbroken">>
	<<elseif $activeSlave.pregType > 20>>
		birthing and orgasming each time, $activeSlave.slaveName is reduced to a quivering, overstimulated pile. When she returns to her senses, @@.hotpink;she can only express how much she wants to go again.@@ @@.red;The ordeal of constant birthing has had a massive effect on her health as well as completely destroying her vagina.@@
		<<set $activeSlave.devotion += 4>>
	<<else>>
		birthing and orgasming all the time, $activeSlave.slaveName is reduced to a quivering, overstimulated pile. When she returns to her senses, @@.hotpink;she can only express how much she wants to go again.@@ @@.red;The ordeal of intensive birthing has had a massive effect on her health as well as completely destroying her vagina.@@
		<<set $activeSlave.devotion += 3>>
	<</if>>
<<elseif $activeSlave.devotion <= 20>>
	birthing, @@.mediumorchid;she hates you for destroying her body like this@@. She is @@.gold;terrified of your power@@ over her body. @@.red;The ordeal of constant birthing has had a massive effect on her health as well as completely destroying her vagina.@@
	<<set $activeSlave.trust -= 40, $activeSlave.devotion -= 50>>
<<elseif $activeSlave.devotion <= 50>>
	birthing, she is dully obedient. She has been broken to slave life so thoroughly that even this is neither surprising nor affecting. She is @@.gold;terrified of your power@@ over her body. @@.red;The ordeal of constant birthing has had a massive effect on her health as well as completely destroying her vagina.@@
	<<set $activeSlave.trust -= 40>>
<<else>>
	birthing, she is @@.hotpink;pleased by this stark development@@ since she is so attentive to your will. She also expects she'll be able to fuck better now without a massive belly getting in the way. @@.red;The ordeal of constant birthing has had a massive effect on her health as well as completely destroying her vagina.@@
	<<set $activeSlave.devotion += 4>>
<</if>>

<<set _babyPrice = random(-20,20)>>
<<if $activeSlave.pregType > 40>>
	<<set $activeSlave.preg = -3>>
	<<if $activeSlave.vagina < 6>>
		<<set $activeSlave.vagina = 10>>
	<</if>>
	<<set $activeSlave.health -= 80>>
<<else>>
	<<if lastPregRule($activeSlave,$defaultRules)>><<set $activeSlave.preg = -1>><<else>><<set $activeSlave.preg = 0>><</if>> /* I think, it's not logical to break her reproductive system out of repair, if she is only type 1 broodmother. In this case she have to birth only like 5-10 fully grown babies, others get progressively smaller. It's should be even smaller stress to body then for "normal" hyperpregnant with 15-20+ children - they have to birth them all at full size.*/
	<<if $activeSlave.vagina < 6>>
		<<set $activeSlave.vagina = 6>>
	<</if>>
	<<set $activeSlave.health -= 30>>
<</if>>
<<if $Cash4Babies == 1 && _curBabies > 0>>
	Her survived <<if _curBabies > 1>>children<<else>>child<</if>> sold for a total of @@.yellowgreen;<<print cashFormat(_curBabies*(50+_babyPrice))>>.@@
	<<set $cash += _curBabies*(50+_babyPrice)>>
<</if>>
<<set $activeSlave.births += _curBabies>>
<<set $activeSlave.birthsTotal += _curBabies>>
<<set $birthsTotal += _curBabies>>

<<set $activeSlave.pregWeek = -4>>
<<set $activeSlave.pregType = 0>>
<<set $activeSlave.pregSource = 0>>
<<set $activeSlave.pregKnown = 0>>
<<set WombFlush($activeSlave)>>
<<set $activeSlave.broodmother = 0>>
<<run SetBellySize($activeSlave)>>


code:
:: Breeder Proposal [nobr]

<<set $nextButton = " ", $nextLink = "Main", $propOutcome = -1>>

You draft a proposal to the Societal Elite proposing the use of specially tested slaves as breeding stock. If they can pass the tests required to join the societal elite; even as slaves, their bodies can prove valuable to furthering eugenics. They will gain no additional rights, but their wombs will be used to birth elite children; helping stave off potential threats of inbreeding and adding possible missed beneficial traits into the Elite's gene pool.

Within the hour, you are called before <<if $eugenicsFullControl == 1>>what's left of <</if>>The Societal Elite.

<<if $eugenicsFullControl == 1>>
	"That sounds like an acceptable proposal. We'll draft the standards for breeding stock and notify you shortly."
	<<set $propOutcome = 1>>
	<<InitStandards>>
	<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
<<elseif $PC.pregSource == -1>>
	"Since you are doing your part and carrying an elite child, we will gladly reward you by granting your proposal. We shall decide upon the standards for breeding stock and notify you shortly."
	<<set $propOutcome = 1>>
	<<InitStandards>>
	<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
<<elseif $PC.birthElite > 0>>
	"Since you have carried children for our cause, we will gladly reward you by granting your proposal. We shall decide upon the standards for breeding stock and notify you shortly."
	<<set $propOutcome = 1>>
	<<InitStandards>>
	<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
<<elseif $PC.dick == 0>>
	<<if $failedElite > 50>>
		"Do you really think you are in any position to make such a request? You, a fertile woman and member of the Elite, who has not taken even the slightest interest in carrying one of our children, dares to even suggest using slaves as breeding stock? Well?"

<<link "Agree to being used as a breeder and save face">>
		<<replace "#result">>
			"Good choice girl. A selection of men will be provided to you, take your pick and bear our children. Or use a test tube, if that's more to your tastes."
			<<set $playerBred = 1, $propOutcome = 1>>
			<<InitStandards>>
			<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
		<</replace>>
		<</link>>

<<link "Decline being used as a breeder and face the Societal Elites' wrath">>
		<<replace "#result">>
			"You'll regret this decision. We'll have our way one way or another."
			<<set $failedElite += 275, $propOutcome = -1>>
			<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
		<</replace>>
		<</link>>

	<<else>>
		"An interesting proposal, given your lack of equipment, though we would be much more open to listen to your request if you were heavy with one of our children.

<<link "Agree to being used as a breeder for the sake of your proposal">>
		<<replace "#result">>
			"Good choice girl, your proposal is more important than your dignity after all, isn't it? A selection of men will be provided to you, take your pick and bear our children. Or use a test tube, if that's more to your tastes."
			<<set $failedElite -= 50, $playerBred = 1, $propOutcome = 1>>
			<<InitStandards>>
			<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
		<</replace>>
		<</link>>
		<<if $failedElite <= 0>>

<<link "Decline being used as a breeder and leverage your standing">>
			<<replace "#result">>
				"Yes, you have done much to further our cause. We respect the "balls" on you, despite your lack of them. Very well, we shall set the standards for what shall qualify as breeding stock and our standards will be delivered to you shortly."
				<<set $propOutcome = 1>>
				<<InitStandards>>
				<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
			<</replace>>
			<</link>>
		<<else>>

<<link "Decline being used as a breeder and withdraw your proposal">>
			<<replace "#result">>
				"Then why waste our time? You disappoint us, but don't worry; you'll be laden with child soon enough."
				<<set $propOutcome = -1>>
				<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
			<</replace>>
			<</link>>
		<</if>>

	<</if>>
<<else>>
	<<if $PC.dick == 1 && $PC.vagina == 1 && $failedElite > 50>>
		"We have read your proposal and propose the following: You are not well liked among us, and your medical records show you are quite capable of carrying a child. If you will carry our children, we will grant your proposal, otherwise, leave and never ask us this again."

<<link "Agree to being used as a breeder to complete the deal">>
		<<replace "#result">>
			"Your contributions will be appreciated. We shall convene to decide the qualifications for a slave to become a breeder. We will inform you of them when we send the list of eligible males to breed you. Or send you a test tube, if that's more to your tastes."
			<<set $failedElite -= 50, $playerBred = 1, $propOutcome = 1>>
			<<InitStandards>>
			<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
		<</replace>>
		<</link>>

<<link "Decline being used as a breeder and withdraw your proposal">>
		<<replace "#result">>
			"Very well, if your masculinity is more valuable to you than your proposal, then so be it."
			<<set $propOutcome = -1>>
			<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
		<</replace>>
		<</link>>

	<<elseif $PC.dick == 1 && $PC.vagina == 1>>
		"We have read your proposal and agree. However, we shall set the standards for what shall qualify as breeding stock, not you. Our standards will be delivered to you shortly.

		Your medical records say you have working female sex organs, and we respect your choice to not use them. But have you considered carrying another member's child? It will be extremely lucrative for you and go a long way to furthering our objectives."

<<link "Agree to being used as a breeder">>
		<<replace "#result">>
			"Your contributions will be appreciated. We shall convene to decide the qualifications for a slave to become a breeder. We will inform you of them when we send the list of eligible males to breed you. Or send you a test tube, if that's more to your tastes."
			<<set $playerBred = 1, $propOutcome = 1>>
			<<InitStandards>>
			<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
		<</replace>>
		<</link>>

<<link "Decline being used as a breeder">>
		<<replace "#result">>
			"Very well, if you wish to waste your gift, it is your prerogative. We shall convene to decide the qualifications for a slave to become a breeder and inform you upon completion."
			<<set $propOutcome = 1>>
			<<InitStandards>>
			<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
		<</replace>>
		<</link>>

	<<else>>
		"We have read your proposal and agree. However, we shall set the standards for what shall qualify as breeding stock, not you. Our standards will be delivered to you shortly."
		<<set $propOutcome = 1>>
		<<InitStandards>>
		<<set $nextButton = "Continue">><<UpdateNextButton>> /* unlock Continue button */
	<</if>>
<</if>>

repo_name: shoku/fc


code:
:: BreedingTest [nobr]

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

<<UpdateStandards>>
<<BreedingStandards>>

<<BreedingEligibility>>


code:
:: csec [nobr]

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

<<run clearSummaryCache($activeSlave)>>

<<set _getFather = getSlave($activeSlave.pregSource)>>
<<if def _getFather>>
	<<set $daddy = _getFather.slaveName>>
<</if>>

/*---------------- 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, 34)>> /* 34 week is minimal gestation time for 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.births += _curBabies>>
<<set $activeSlave.birthsTotal += _curBabies>>
<<set $birthsTotal += _curBabies>>

<<if $activeSlave.pregSource > 0>>
	<<set _babyDaddy = $slaveIndices[$activeSlave.pregSource]>>
	<<if def _babyDaddy>>
		<<set $slaves[_babyDaddy].slavesFathered += _curBabies>>
	<</if>>
<<elseif $activeSlave.pregSource == -1>>
	<<set $PC.slavesFathered += _curBabies>>
<</if>>

<<if $activeSlave.broodmother < 1>>  /* broodmothers can't lose fetuses, or it's abortion procedure, not c'sec.*/
	<<if $safePartialBirthTech == 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, _origReserve = $activeSlave.reservedChildren>>
<<if _origReserve > 0 && _curBabies > 0>> /*Do we need incubator checks?*/
	<<if _curBabies >= _origReserve >>
		/*adding normal*/
		<<set _cToIncub = _origReserve >>
	<<elseif _curBabies <  _origReserve && $activeSlave.womb.length > 0>>
		/*broodmother or partial birth, we will wait for next time to get remaining children*/
		<<set $activeSlave.reservedChildren -= _curBabies, _cToIncub = _curBabies>>
	<<else>>
		/*Stillbirth or something other go wrong. Correcting children count.*/
		<<set $activeSlave.reservedChildren = 0, _cToIncub = _curBabies>>
	<</if>>
<</if>>

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

Performing a cesarean section is trivial for the remote surgery to carry out. $activeSlave.slaveName is sedated, her child<<if _curBabies > 1>>ren<</if>> extracted, and taken to a bed to recover. By the time she comes to,
<<if _curBabies > 0>>
	<<if $activeSlave.pregSource == -1>>
		your
	<<elseif $activeSlave.pregSource == -2>>
		your arcology's
	<<elseif $activeSlave.pregSource == -3>>
		the Societal Elites'
	<<elseif $activeSlave.pregSource == 0>>
		some man's
	<<elseif $activeSlave.ID == $activeSlave.pregSource>>
		her own
	<<else>>
		$daddy's
	<</if>>
	<<if _curBabies <= 1>>
		baby has
	<<elseif _curBabies >= 40>>
		massive brood of $activeSlave.pregType babies have
	<<elseif _curBabies >= 20>>
		brood of $activeSlave.pregType babies have
	<<elseif _curBabies >= 10>>
		impressive group of $activeSlave.pregType babies have
	<<elseif _curBabies == 9>>
		nonuplets have
	<<elseif _curBabies == 8>>
		octuplets have
	<<elseif _curBabies == 7>>
		septuplets have
	<<elseif _curBabies == 6>>
		sextuplets have
	<<elseif _curBabies == 5>>
		quintuplets have
	<<elseif _curBabies == 4>>
		quadruplets have
	<<elseif _curBabies == 3>>
		triplets have
	<<else>>
		twins have
	<</if>>
	already been

	<<if _cToIncub == _curBabies && _cToIncub > 0 >>
		taken to $incubatorName.
		<<set _incubated = 2>>
	<<elseif _cToIncub < _curBabies && _cToIncub > 0>>
		split between $incubatorName and
		<<set _incubated = 1>>
	<</if>>
	<<set $mom = $activeSlave>>
	<<set _identicalChildGen = 0, _shiftDegree = 0>>
	<<for _cb = 0; _cb < _cToIncub; _cb++>> /* if there is no reserved children, code in loop will not trigger */
			<<if _identicalChildGen == 0>>
				<<if _cb == $mom.curBabies.length-1 && $mom.curBabies.length > 1 && $mom.curBabies[_cb].identical == 1>> /* catch for improperly placed identical twin flag to still generate*/
					<<set _twin = clone($activeSlave)>>
					<<set _twin.ID = $IDNumber++>>
					<<set $activeSlave = 0>>
					<<set $activeSlave = _twin>>
				<<else>>
					<<include "Generate Child">>
				<</if>>
			<<else>>
				<<set _twin = clone($activeSlave)>>
				<<set _twin.ID = $IDNumber++>>
				<<set $activeSlave = 0>>
				<<set $activeSlave = _twin>>
			<</if>>
			<<include "Incubator Workaround">>
			<<if $mom.curBabies[_cb].identical === 1>>
				<<set _identicalChildGen = 1>>
			<<else>>
				<<set _identicalChildGen = 0>>
			<</if>>
			<<set _shiftDegree++>>
			<<set $reservedChildren-- >>
	<</for>>
	<<if _shiftDegree > 0>>
		<<for _csec = 0; _csec < _shiftDegree; _csec++>>
			<<set $mom.curBabies.shift()>> /*for now child generation metod for incubator not changed. But here children for incubator removed from array of birthed babies. If we decide later - we can use them for incubator as real objects here. For now they just discarded silently */
		<</for>>
	<</if>>
	<<set $activeSlave = $mom>>
<<else>>
	/*No live babies. Placeholder */
<</if>>
<<set _curBabies = $activeSlave.curBabies.length >>

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

	<<if _incubated == 1>>the rest<</if>>
	<<if $arcologies[0].FSRestart != "unset" && $activeSlave.breedingMark == 1 && $activeSlave.pregSource == -1>>
		<<set _lostBabies = 1>>
		handed off to the Societal Elite to be raised into upstanding members of the new society.
	<<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))>>.@@
		<<set $cash += _curBabies*(50+_babyCost)>>
	<</if>>
	<<if _lostBabies != 1>>

		<<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 she will not resent this.
				<<elseif $activeSlave.devotion > 50>>
					is devoted to you, but she will @@.mediumorchid;struggle to accept this.@@
					<<set $activeSlave.devotion -= 2>>
				<<elseif $activeSlave.devotion > 20>>
					has accepted being a sex slave, but she 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 $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 she'll @@.hotpink;love you even more@@ for this. She can't wait to see her 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 her child<<if $activeSlave.pregType > 1>>ren<</if>> will have a purpose in your society other than slavery.@@ She will miss her child<<if $activeSlave.pregType > 1>>ren<</if>>, but she expected that.
						<<set $activeSlave.devotion += 4>>
					<<elseif $activeSlave.devotion > 20>>
						will naturally miss her child<<if _curBabies > 1>>ren<</if>>, but will is broken enough to hope that her 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 her $fertilityAge year old daughter<<if _curBabies > 1>>s<</if>> swollen with life, and proud of it, fills her 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 onetime <<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 she'll @@.hotpink;love you even more@@ for this.
				<<elseif $activeSlave.devotion > 50>>
					knows about these and will be @@.hotpink;overjoyed.@@ She will miss her child<<if _curBabies > 1>>ren<</if>>, but she expected that.
				<<elseif $activeSlave.devotion > 20>>
					will naturally miss her child<<if _curBabies > 1>>ren<</if>>, but will @@.hotpink;take comfort@@ in the hope that her offspring will have a better life.
				<<else>>
					will naturally retain some resentment over being separated from her child<<if _curBabies > 1>>ren<</if>>, but this should be balanced by hope that her 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 her child<<if _curBabies > 1>>ren<</if>>, but will be @@.hotpink;very grateful,@@ since she'll understand this is the best possible outcome for a slave mother.
				<<else>>
					will resent being separated from her 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//
	<<else>>
		<<set $nextButton = "Back">><<UpdateNextButton>> /* unlock Continue button */
	<</if>>

<</if>>

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

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

	<<if $activeSlave.breedingMark == 1 && $activeSlave.pregSource == -1>>
		The Societal Elite @@.green;are pleased@@ at the new additions to their class.
		<<set $failedElite -= 2*_curBabies>>
	<<else>>
		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>>
		<<set $rep -= 10*_curBabies>>
	<</if>>
<</if>>

Since her <<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, her 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>>
		She went into the surgery very aware that you were performing it manually.
		<<if ($activeSlave.devotion < _oldDevotion)>>
			<<if ($activeSlave.devotion > 50)>>
				Though she is unhappy with the results, she consoles herself with the knowledge that you cared enough to do it personally.
			<<elseif ($activeSlave.devotion >= -20)>>
				She is @@.gold;even more afraid@@ of you afterward than she would otherwise be. You must seem a cruel and near-omnipotent power to her.
				<<set $activeSlave.trust -= 5>>
			<<else>>
				She is @@.mediumorchid;even more hateful@@ of you afterward than she would otherwise be. It must seem to her that she's nothing more than a test subject to you.
				<<set $activeSlave.devotion -= 5>>
			<</if>>
		<<else>>
			<<if ($activeSlave.devotion > 50)>>
				Since she's happy with the results, she's almost beside herself with @@.hotpink;gratitude,@@ and filled with @@.mediumaquamarine;admiration@@ of your skill.
				<<set $activeSlave.devotion += 4, $activeSlave.trust += 4>>
			<<elseif ($activeSlave.devotion >= -20)>>
				She is quite struck by how you performed the surgery personally. She admires your refusal to be one of the idle rich, and @@.hotpink;likes you more.@@
				<<set $activeSlave.devotion += 5>>
			<<else>>
				She knows that she should be grateful to you for performing the surgery personally, but the emotional turmoil of the occasion is too much for her, and the realization makes little lasting impact.
			<</if>>
		<</if>>
	<</if>>
<<else>>
	As with all surgery @@.red;her health has been slightly affected.@@
	<<set $activeSlave.health -= 5>>
<</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>>
	<<set $activeSlave.pregWeek = -4>>
	<<if $activeSlave.broodmother == 0 && $bellyImplants == 1>>

		Since she is already in surgery and her body already stretched, it would be possible to preserve her 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 relative simple procedure. Using the fact that her body and internal organs have already adapted to pregnancy, it's possible to greatly expand initial size of implant. She will still look pregnant post surgery and recovery.

				<<if ($activeSlave.devotion > 50)>>
					She leaves the surgery with her belly still very gravid, and as such, knows you put something into her womb replacing her prior natural pregnancy. She 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)>>
					She leaves the surgery with her belly still very gravid, and as such, knows you put something into her womb replacing her prior natural pregnancy. She understands the realities of her life as a slave, but she is still surprised at what now resides in her womb. She is @@.gold;sensibly fearful@@ of your total power over her body.
					<<set $activeSlave.trust -= 5>>
				<<else>>
					She leaves the surgery with her belly still very gravid, and as such, knows you put something into her womb replacing her prior natural pregnancy. She does not understand the realities of her life as a slave at a core level, so she's @@.mediumorchid;terrified and angry@@ at the potential that she's been turned in some sort of freak. Even after what has been implanted into her womb is explained to her, she is no less defiant; though she is relieved that procedure is reversible and there is no truly permanent damage. She is @@.gold;sensibly fearful@@ of your total power over her 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)>>


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:

<>


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>>
<<if $arcologies[0].FSSupremacist != "unset">>
	<<set $fixedRace = $arcologies[0].FSSupremacistRace>>
<<elseif $arcologies[0].FSSubjugationist != "unset">>
	<<set _races = ["white", "white", "white", "white", "white", "white", "white", "white", "white", "asian", "asian", "asian", "asian", "asian", "asian", "latina", "latina", "latina", "black", "black", "middle eastern", "middle eastern", "indo-aryan", "indo-aryan", "southern european", "southern european", "semitic", "semitic", "malay", "malay", "amerindian", "pacific islander", "mixed race"]>>
	<<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 = 1>>
<<else>>
	<<set $activeSlave.health = random(10,60)>>
	<<set $activeSlave.intelligenceImplant = random(0,1,1)>>
<</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>>
<<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", "sensual", "sensual", "sensual", "normal", "normal", "exotic", "exotic")>>
<<set $activeSlave.lips = random(45,75)>>
<<if $arcologies[0].FSTransformationFetishist > 20>>
	<<set $activeSlave.lips += 25>>
	<<set $activeSlave.lipsImplant = 25>>
<</if>>
<<if $activeSlave.teeth != "normal">>
	<<set $activeSlave.teeth = "normal">>
<</if>>
<<if $activeSlave.vaginaLube == 0>>
	<<set $activeSlave.vaginaLube++>>
<</if>>
<<set $activeSlave.preg = 0>>
<<set $activeSlave.birthsTotal = either(0,0,0,0,0,0,0,0,1,1,1,1,2,2,3,4)>>
<<if $arcologies[0].FSPastoralist > 20 || $activeSlave.birthsTotal > 0>>
	<<set $activeSlave.lactation = 1>>
	<<if $arcologies[0].FSPastoralist > 20>>
		<<set $activeSlave.lactationAdaptation = $arcologies[0].FSPastoralist>>
	<<else>>
		<<set $activeSlave.lactationAdaptation = Math.min($activeSlave.birthsTotal*10, 100)>>
	<</if>>
<<else>>
	<<set $activeSlave.lactation = either(0, 0, 0 , 0, 1)>>
<</if>>
<<if $activeSlave.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.vaginalSkill = 30>>
<<else>>
	<<set $activeSlave.vaginalSkill = 100>>
<</if>>
<<if $activeSlave.anus == 0>>
	<<set $activeSlave.analSkill = 10>>
<<else>>
	<<set $activeSlave.analSkill = 70>>
<</if>>
<<set $activeSlave.oralSkill = 100>>
<<set $activeSlave.vaginalAccessory = "chastity belt">>
<<set $activeSlave.intelligence = either(2,2,2,2,2,2,2,3)>>
<<set $activeSlave.attrKnown = 1>>
<<set $activeSlave.fetishKnown = 1>>
<<set $activeSlave.behavioralQuirk = "confident">>
<<set $activeSlave.sexualQuirk = either("gagfuck queen", "strugglefuck queen", "tease", "romantic", "romantic", "perverted", "caring", "caring", "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][$cash -= $slaveCost,$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>> $Bodyguard.slaveName stands between you and them. A single glare from the leader of the bunch and she backs off, eyes to the ground.<</if>>

<<if $PC.pregSource == -1>>
	<<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>>her cybernetics being locked down<<else>>the overwhelming odds<</if>>. As she 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>>
<<elseif $PC.pregSource != -1>>
	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>>
			$Bodyguard.slaveName is already doing everything in her 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 $securityForceActive == 1>>

		<<link "Send a message to The Colonel">>
			<<set $finalChoice = "colonel">>
			<<replace "#fate">>
				send a message to The Colonel.
			<</replace>>
		<</link>>
	<</if>>
	<<if $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 "colonel">>

You send a quick message to The Colonel 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>> 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>> /* 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>>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>>
	$Bodyguard.slaveName asks <<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>sir<<else>>ma'am<</if>>, what should I do with the <<if $eliteLeft < $eliteTotal>>remaining<</if>> "elite"?

	<<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 <<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>sir<<else>>ma'am<</if>>?"

	<<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 == 1>>
	It is now that a squad of $securityForceName makes their entrance, pointing their guns at the <<if $eliteLeft < $eliteTotal>>remaining<</if>> elite.
	The officer asks "your orders <<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>sir<<else>>ma'am<</if>>?"

	<<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>>
	It is now that $Bodyguard.slaveName makes her entrance, pointing her guns at the <<if $eliteLeft < $eliteTotal>>remaining<</if>> elite.
	She then asks<<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>sir<<else>>ma'am<</if>>, what should 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 hears 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 "<<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>sir<<else>>ma'am<</if>>, 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>>
<<else>>
	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 */

<<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
		"<<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>sir<<else>>ma'am<</if>> can I keep her?"

			<<link "No">>
				<<replace "#choice1">>
					Your rejection upsets some of them, but their professionalism ensures it isn't visible.
				<</replace>>
			<</link>>
			|
			<<link "Yes">>
				<<set $rep += 500, $eliteLeft -= 1>>
				<<replace "#choice1">>
					For a second your acceptance shocks them. Once they recover they are very grateful. "Thank you <<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>sir<<else>>ma'am<</if>>, I'll make sure to look after her. Soon the story spreads of the kind arcology owner, enhancing your reputation.
				<</replace>>
			<</link>>

	<<elseif $SpecialForcesMessageSent == 1>>

The <<if $eliteLeft < $eliteTotal>>remaining<</if>> elite are quickly captured, abused and enslaved.
		<<if $securityForceDepravity <= 0.3>>
			Two soldiers decide to double team an elite; one gropes her ass while the other gropes her tits.
		<<elseif $securityForceDepravity <= 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 "<<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>sir<<else>>ma'am<</if>> can I keep her?"

			<<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 $rep += 500, $eliteLeft -= 1, _SFHappyEverAfter = 1>>
				<<replace "#choice1">>
					For a second your acceptance shocks them. Once they recover they are very grateful. "Thank you <<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>sir<<else>>ma'am<</if>>, I'll make sure to look after her. Soon the story spreads of the kind arcology owner, enhancing your reputation.
				<</replace>>
			<</link>>

		<<switch $ColonelCore>>
			<<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 "warmonger" "cruel" "sociopathic" "jaded" "brazen" "psychopathic" "mischievous">>
				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>>
		<<set $securityForceDepravity += 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 festivity will go on for hours, getting more and more depraved.
		<</if>>
	<<else>>
		<<if $Bodyguard.fetish == "sadist">>$Bodyguard.slaveName's gets out her melee weapon and starts to give them many small cuts, the look of pleasure on her face is evident.<<else>>$Bodyguard.slaveName's ties them and then gets out her melee weapon and starts to abuse them, her 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)>>
		<<if 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 = either(2,3)>>
		<<set $activeSlave.intelligenceImplant = 1>>
		<<set $activeSlave.entertainSkill = 0>>
		<<set $activeSlave.whoreSkill = 0>>
		<<set $activeSlave.health = random(60,75)>>
		<<set $activeSlave.canRecruit = 0>>
		<<AddSlave $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)>>
		<<if 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 = either(0,-1, 1, 2,3)>>
		<<set $activeSlave.intelligenceImplant = 1>>
		<<set $activeSlave.entertainSkill = 0>>
		<<set $activeSlave.whoreSkill = 0>>
		<<set $activeSlave.health = random(60,75)>>
		<<set $activeSlave.canRecruit = 0>>
		<<set $activeSlave.behavioralFlaw = either("bitchy", "arrogant")>>
		<<AddSlave $activeSlave>> /* skip New Slave Intro */
		<<set $activeSlave.recruiter = 0>> /* override New Slave Intro */
	<</for>>
<</if>>

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


code:
:: FDick [nobr]

<<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 centimeter,
	<<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 $his 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 breeding 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 isPlayerFertile($PC) && ($activeSlave.ballType == "human") && $activeSlave.vasectomy == 0 && $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.penetrationCount += 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.penetrationCount++, $penetrativeTotal++>>
			<</if>>
			<<set $activeSlave.trust += 5>>
		<<else>>
			You feel $his 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 $his.
			<<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 $his 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">>
	<<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 a servant">>
		$He rushes to wash $his dick, impatient to get back to $his undiminished chores.
	<</switch>>
<</if>>

<<set $activeSlave.penetrationCount++, $penetrativeTotal++>>
<<if isPlayerFertile($PC) && ($activeSlave.ballType == "human") && $activeSlave.vasectomy == 0>>
	<<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>>