code:
:: FSlaveSlaveVag Consummate [nobr]

<<ClearSummaryCache $activeSlave>>
<<ClearSummaryCache $slaverapistx>>

<<if $slaverapistx.dick == 1>>
		<<set $dicksize = "pathetic">>
<<elseif ($slaverapistx.dick == 2)>>
		<<set $dicksize = "tiny">>
<<elseif ($slaverapistx.dick == 3)>>
		<<set $dicksize = "average">>
<<elseif ($slaverapistx.dick == 4)>>
		<<set $dicksize = "big">>
<<elseif ($slaverapistx.dick == 5)>>
		<<set $dicksize = "huge">>
<<elseif ($slaverapistx.dick == 6)>>
		<<set $dicksize = "gigantic">>
<<elseif ($slaverapistx.dick == 7)>>
		<<set $dicksize = "titanic">>
<<elseif ($slaverapistx.dick == 8)>>
		<<set $dicksize = "absurd">>
<<elseif ($slaverapistx.dick == 9)>>
		<<set $dicksize = "inhuman">>
<<else>>
		<<set $dicksize = "obscene">>
<</if>>

You take a look at the slave you selected.

<<if $activeSlave.mother == $slaverapistx.ID>>
	<<if ($slaverapistx.fetish == "perverted")>>
			<<if ($slaverapistx.energy > 60)>>
				$slaverapistx.slaveName is well aware that she is about to rape her own daughter, but despite that seems eager to do it.
			<<else>>
				$slaverapistx.slaveName is well aware that she is about to rape her own daughter, but despite that seems to feel some arousal at the thought.
			<</if>>
	<<else>>
		$slaverapistx.slaveName is well aware that she is about to rape her own daughter and is understandingly disturbed.
	<</if>>
<</if>>

<<if $slaverapistx.mother == $activeSlave.ID>>
	<<if ($slaverapistx.fetish == "perverted")>>
			<<if ($slaverapistx.energy > 60)>>
				$slaverapistx.slaveName is well aware that she is about to rape her own mother, but despite that seems eager to do it.
			<<else>>
				$slaverapistx.slaveName is well aware that she is about to rape her own mother, but despite that seems to feel some arousal at the thought.
			<</if>>
	<<else>>
		$slaverapistx.slaveName is well aware that she is about to rape her own mother and is understandingly disturbed.
	<</if>>
<</if>>

<<if (areSisters($activeSlave, $slaverapistx) > 0)>>
	<<if ($slaverapistx.fetish == "perverted")>>
			<<if ($slaverapistx.energy > 60)>>
				$slaverapistx.slaveName is looking down at her sisters helpless form and inviting pussy with a look of hunger.
			<<else>>
				$slaverapistx.slaveName seems paralyzed, looking down at her bound sister with disbelief, curiosity...and excitement?
			<</if>>
	<<else>>
		$slaverapistx.slaveName looks with horror down at her bound sister, knowing what will soon happen.
	<</if>>
<</if>>

<<set $activeSlave.penetrativeCount += 1>>
<<set $penetrativeTotal += 1>>

<<if ($slaverapistx.fetish == "dominant") && ($slaverapistx.fetishStrength > 20) && ($slaverapistx.devotion >= -20)>>
	Since $slaverapistx.slaveName loves to dominate others it's not hard to get her <<if $slaverapistx.dick > 0>>$dicksize dick ready.<<else>>to don her strap-on.<</if>>
	<<set  $slaverapistx.devotion += 4>>
		<<if ($slaverapistx.attrXX > 65)>>With her high libido and love for girls, she becomes aroused indecently fast.
		<<else>>
			<<if $slaverapistx.dick > 0>>Her $dicksize member springs instantly to attention<<else>>She becomes wet and flushed<</if>>
			at the prospect of forcing herself on another slave.
		<</if>>

<<elseif ($slaverapistx.fetish == "sadist") && ($slaverapistx.fetishStrength > 20) && ($slaverapistx.devotion >= -20)>>
			With the prospect of torturing another slave <<if $slaverapistx.dick > 0>>her $dicksize member springs instantly to attention<<else>>she becomes wet and flushed<</if>>

<<elseif ($slaverapistx.attrXX > 65) && ($slaverapistx.devotion >= -20)>>
	Since $slaverapistx.slaveName likes sticking her <<if $slaverapistx.dick > 0>>$dicksize dick<<else>>strap-on<</if>> in girls, she doesn't take much convincing.

<<elseif ($slaverapistx.devotion > 50)>>
	Since $slaverapistx.slaveName is devoted to you, she'll eagerly fuck anything you tell her to fuck.

<<elseif ($slaverapistx.devotion > 20)>>
	Since $slaverapistx.slaveName is obedient, she'll fuck anything you tell her to fuck.

<<elseif ($slaverapistx.devotion >= -20)>>
	Since $slaverapistx.slaveName does not resist your will, she should comply reasonably well.
	<<if (if $slaverapistx.dick > 0)>>She dons a strap-on and applies lube in a mechanical, detached fashion,
	<<else>>She has to work to get herself hard despite her doubts,
	<</if>>
	fear and disgust showing on her face as she absorbs the perversion of the natural order of things she's about to experience.

<<else>>
	<<if $slaverapistx.dick > 0>>
		Since $slaverapistx.slaveName is unlikely to comply willingly, you simply restrain her and administer a massive dose of vasodilators, directly where they will do the most good. $slaverapistx.slaveName writhes with the pain of the injection, which is compounded as her $dicksize penis springs agonizingly erect.
	<<else>>
		Since $slaverapistx.slaveName is unlikely to comply willingly, you tie her up, put a strap-on with a clit vibrator on her and administer strong aphrodisiacs. She writes with discomfort and confusion.
	<</if>>

<</if>>

Next, you see to $activeSlave.slaveName.

<<if $activeSlave.mother == $slaverapistx.ID>>
	<<if ($activeSlave.fetish == "perverted")>>
			<<if ($activeSlave.energy > 60)>>
				$activeSlave.slaveName is looking up at her mother, fully naked, her <<if $slaverapistx.dick > 0>>$dicksize penis<<else>>strap-on<</if>> standing firm despite her rapid breathing. She is flushed and her pussy moist.
			<<else>>
				$activeSlave.slaveName seems paralyzed, looking at her mothers <<if $slaverapistx.dick > 0>>$dicksize member<<else>>strap-on<</if>> with fascination and disbelief.
			<</if>>
	<<else>>
		$activeSlave.slaveName looks with horror at her mothers <<if $slaverapistx.dick > 0>>$dicksize member<<else>>strap-on<</if>>, knowing what will soon happen.
	<</if>>
<</if>>

<<if $slaverapistx.mother == $activeSlave.ID>>
	<<if ($activeSlave.fetish == "perverted")>>
			<<if ($activeSlave.energy > 60)>>
				$activeSlave.slaveName is looking up at her daughter, fully naked, her <<if $slaverapistx.dick > 0>>$dicksize penis<<else>>strap-on<</if>> standing firm despite her rapid breathing. She is flused and her pussy moist.
			<<else>>
				$activeSlave.slaveName seems paralyzed, looking at her daughters <<if $slaverapistx.dick > 0>>$dicksize cock<<else>>strap-on<</if>> swaying above her with disbelief, hesitation... and excitement?
			<</if>>
	<<else>>
		$activeSlave.slaveName looks with horror at her daughters <<if $slaverapistx.dick > 0>>$dicksize dick<<else>>strap-on<</if>>, knowing what will soon happen.
	<</if>>
<</if>>

<<if (areSisters($activeSlave, $slaverapistx) > 0)>>
	<<if ($activeSlave.fetish == "perverted")>>
			<<if ($activeSlave.energy > 60)>>
				$activeSlave.slaveName seems paralyzed with fear, but her nipples are already hard and her face flushed. Her eyes are fixed on the <<if $slaverapistx.dick > 0>>$dicksize dick<<else>>strap-on<</if>> above her.
			<<else>>
				$activeSlave.slaveName seems paralyzed, looking at her sister <<if $slaverapistx.dick > 0>>$dicksize cock<<else>>strap-on<</if>> above her with disbelief, curiosity...and excitement?
			<</if>>
	<<else>>
		$activeSlave.slaveName looks with horror at her sister's <<if $slaverapistx.dick > 0>>$dicksize dick<<else>>strap-on<</if>>, knowing what will soon happen.
	<</if>>
<</if>>

<<set $activeSlave.vaginalCount += 1>>
<<set $vaginalTotal += 1>>

<<if ($activeSlave.fetish == "submissive") && ($activeSlave.fetishStrength > 60) && ($activeSlave.fetishKnown == 1) && ($activeSlave.vagina == 0)>>
	She presents her virgin pussy to $slaverapistx.slaveName without protest. This act @@.lime; breaks in her pussy.@@
	<<set $activeSlave.vagina = 1>>
	<<set  $activeSlave.devotion += 4>>
	<<set  $activeSlave.fetishStrength += 1>>

<<elseif ($activeSlave.fetish == "submissive") && ($activeSlave.fetishStrength > 60) && ($activeSlave.fetishKnown == 1) && ($activeSlave.fetishStrength > 60)>>
	She smiles as she is tied and her pussy presented to $slaverapistx.slaveName. @@.hotpink;She enjoys@@ submitting to a dominant slave.
	<<set  $activeSlave.devotion += 4>>

<<elseif  ($activeSlave.devotion > 20) && ($activeSlave.vagina == 0) >>
	She accepts your orders without comment and presents her virgin pussy to $slaverapistx.slaveName. She gasps in shock when she feels the <<if $slaverapistx.dick > 0>>$dicksize dick<<else>>strap-on<</if>> enter her. @@.hotpink;She is broken to slavery@@ by this application of her body, which naturally @@.lime;will break in her pussy.@@
	<<set $activeSlave.vagina = 1>>
	<<set  $activeSlave.devotion += 10>>
<<elseif ($activeSlave.devotion >= -20) && ($activeSlave.vagina == 0)>>
	She is clearly unhappy at the idea of losing her pearl of great price to $slaverapistx.slaveName; this probably isn't what she imagined her first real sex would be like. Nevertheless, @@.hotpink;she is broken to slavery@@ by this application of her body, which naturally @@.lime;will break in her pussy.@@
	<<set $activeSlave.vagina = 1>>
	<<set  $activeSlave.devotion += 4>>
<<elseif ($activeSlave.vagina == 0)>>
	As you anticipated, she refuses to give $slaverapistx.slaveName her virginity. Since she is restrained, her @@.mediumorchid;horrified tears@@ and @@.gold;frightened begging@@ are her only signs on rebellion. Naturally, this cruel act @@.lime;will break in her pussy.@@
	<<set  $activeSlave.devotion -= 5>>
	<<set  $activeSlave.trust -= 5>>
	<<set $activeSlave.vagina = 1>>
<</if>>

<<if ($activeSlave.amp == 1)>>
	You set her limbless torso up for $slaverapistx.slaveName.
<<elseif tooBigBreasts($activeSlave)>>
	You set her up for $slaverapistx.slaveName, face down so the weight of her tits pins her helplessly in place.
<<elseif tooBigButt($activeSlave)>>
	You set her up for $slaverapistx.slaveName, face down so the weight of her giant ass pins her helplessly in place and gives $slaverapistx.slaveName a lovely cushion to thrust against.
<<elseif tooBigDick($activeSlave)>>
	You set her up for $slaverapistx.slaveName, face up so she is pinned under the weight of her giant cock.
<<elseif tooBigBalls($activeSlave)>>
	You set her up for $slaverapistx.slaveName, face down so the weight of her giant balls anchor her helplessly in place.
<<elseif  $activeSlave.devotion < -20>>
	She tries to refuse, so you restrain her despite her resistance to the idea of being raped by another slave.
<<elseif  $activeSlave.devotion <= 20>>
	She obeys your orders reluctantly, arranging herself for vaginal sex despite her obvious hesitation to be raped by another slave.
<<elseif  $activeSlave.devotion < 10>>
	She obeys your orders, arranging herself for vaginal sex despite her slight hesitation at the idea of being another's slave sex toy.
<<else>>
	She happily obeys your orders, getting ready to serve another slave.
<</if>>

<<if ($activeSlave.devotion < -20) && ($slaverapistx.devotion < -20)>>
	Since you have two restrained slaves, it's up to you to do all the work. $activeSlave.slaveName is tied up on the bed with her pussy available, so you maneuver $slaverapistx.slaveName's <<if $slaverapistx.dick > 0>>$dicksize dick<<else>>strap-on<</if>> into place. The two slaves make no further moves until you deal $slaverapistx.slaveName a terrific swat across the ass and promise to give her more of the same until she gets going. $slaverapistx.slaveName starts moving very slowly, barely prodding. After watching them mechanically go at it for a while, you use your leg to suddenly push her deep into $activeSlave.slaveName, fully hilting her in one motion. You occasionally prod them with an electrical jolt to keep them going at a faster pace. Both slaves @@.mediumorchid;resent@@ what you made them do and @@.gold;fear you@@ as a result.
	<<set  $activeSlave.devotion -= 5>>
	<<set  $slaverapistx.devotion -= 5>>
	<<set  $activeSlave.trust -= 5>>
	<<set  $slaverapistx.trust -= 5>>

<<elseif ($slaverapistx.devotion < -20)>>
	Since your dick slave is restrained, you order $activeSlave.slaveName to present herself on the bed, and then maneuver $slaverapistx.slaveName's <<if $slaverapistx.dick > 0>>$dicksize dick<<else>>strap-on<</if>> into place. $activeSlave.slaveName does her best to hump herself against the unwilling cock until you deal $slaverapistx.slaveName a terrific swat across the ass and promise to give her more of the same until she gets going. She is still unenthusiastic, so you have her lie down and have $activeSlave.slaveName ride herself to orgasm. She @@.mediumorchid;resents@@ what you made her do and @@.gold;fears you@@ as a result.. Though $activeSlave.slaveName accepts the situation, she looks into $slaverapistx.slaveName's eyes with obvious apology.
	<<set  $slaverapistx.devotion -= 5>>
	<<set  $slaverapistx.trust -= 5>>

<<elseif ($slaverapistx.fetish == "dominant") && ($slaverapistx.fetishStrength > 20) && ($slaverapistx.devotion > 20) && ($activeSlave.devotion < -20)>>
	You arrange $activeSlave.slaveName on the bed with her pussy defenseless and available, and then tell the randy $slaverapistx.slaveName that it's all hers. The slave life has so affected $slaverapistx.slaveName that she is quite eager to rape another slave for her pleasure. She penetrates her immediately, fondling, pinching and licking while pistoning away, fully enjoying her dominant role, edging her poor toy again and again and making her beg for release.
	<<set  $slaverapistx.devotion += 4>>
	<<set  $slaverapistx.energy += 1>>
	<<set  $slaverapistx.trust += 2>>
		<<if ($activeSlave.fetish == "dominant")>>
				By the end of the day $activeSlave.slaveName's @@.lime;abused cunt@@ is <<if $slaverapistx.dick > 0>>$dripping with cum<<else>>overflowing with juices<</if>>, leaving her @@.gold;horrified@@ and @@.mediumorchid;disgusted at her lack of control@@.
				<<set  $activeSlave.trust -= 5>>
				<<set  $activeSlave.energy -= 1>>
				<<set  $activeSlave.devotion -= 3>>
		<<elseif ($activeSlave.fetish == "submissive")>>
				By the end of the day $activeSlave.slaveName's @@.lime;abused cunt@@ is <<if $slaverapistx.dick > 0>>$dripping with cum<<else>>overflowing with juices<</if>>, leaving her @@.gold;horrified@@ but @@.hotpink;surprisingly sexually satisfied@@.
				<<set  $activeSlave.trust -= 5>>
				<<set  $activeSlave.energy += 3>>
				<<set  $activeSlave.devotion = 1>>
		<</if>>
		$slaverapistx.slaveName is lying next to her on the bed in a state of obvious @@.hotpink;satiation@@ and @@.teal;bliss.@@

<<elseif ($slaverapistx.energy > 95) && ($slaverapistx.devotion > 20) && ($activeSlave.devotion < -20)>>
	You arrange $activeSlave.slaveName on the bed with her pussy defenseless and available, and then tell the randy $slaverapistx.slaveName that it's all hers. The slave life has so affected $slaverapistx.slaveName that she is quite eager to rape another slave, just for the perverted novelty of the act. Her high libido keeps her going for a long time, brining the helpless toy to one forced orgasm after another. By the end of the day $activeSlave.slaveName is lying on the bed @@.lime;all worn out@@, her cunt <<if $slaverapistx.dick > 0>>$dripping with cum<<else>>overflowing with juices<</if>>, to her @@.gold;horror@@ and @@.mediumorchid;resentment,@@ while $slaverapistx.slaveName is sleeping next to her in a state of obvious @@.hotpink;satiation and bliss.@@
	<<set  $activeSlave.devotion -= 3>>
	<<set  $activeSlave.trust -= 3>>
	<<set  $activeSlave.energy += 3>>
	<<set  $slaverapistx.devotion += 3>>
	<<set  $slaverapistx.trust += 3>>

<<elseif ($activeSlave.devotion <= 20) || ($slaverapistx.devotion <= 20)>>
	You order $activeSlave.slaveName onto the couch and tell $slaverapistx.slaveName to get on with it. They fuck mechanically, gazing with roiling emotions into each others' eyes. They do seem to come to some sort of a nonverbal understanding on the necessity of getting it done, and there is no real unhappiness in either of them when they finish and disentangle themselves. As they clean themselves and exit, you notice $slaverapistx.slaveName's looking a little more longingly at $activeSlave.slaveName.

<<elseif ($activeSlave.devotion <= 50) || ($slaverapistx.devotion <= 50)>>
	You order $activeSlave.slaveName and $slaverapistx.slaveName to get on with it. They fuck mechanically at first, gazing with roiling emotions into each others' eyes. Eventually, they begin to enjoy the intimacy of the act, finding the shared pleasure between them comforting. They finish and resume life as slaves, the light of this intimacy diminishing, softening with $slaverapistx.slaveName's dick and dripping away with the contents of $activeSlave.slaveName's cum-filled pussy.

<<else>>
	The two slaves happily and eagerly to the business sex. They take their time with foreplay, humping slowly and gazing into each others' eyes, exchanging kisses almost constantly. After a little while, $activeSlave.slaveName looks over $slaverapistx.slaveName's shoulder to where you're sitting, the invitation clear in her eyes. You come over and penetrate $slaverapistx.slaveName with your <<if $PC.dick > 0>>dick<<else>>strap-on<</if>>. With the double stimulus of penetrating a tight vagina and being penetrated, she comes indecently hard. The two of them collapse into an exhausted, @@.hotpink;happy@@ pile of slave flesh.
	<<set  $activeSlave.devotion += 4>>
	<<set  $slaverapistx.devotion += 8>>

<</if>>

Throughout the week, you keep $activeSlave.slaveName's pussy intimate with $slaverapistx.slaveName's cock. In the end, you are certain they got closer.

<<if canImpreg($activeSlave, $slaverapistx)>>
	<<KnockMeUp $activeSlave 25 0 $slaverapistx.ID>>
<</if>>

<<for $i = 0; $i < $slaves.length; $i++>>
	<<if $slaverapistx.ID == $slaves[$i].ID>>
		<<set $slaves[$i] = $slaverapistx>>
		<<break>>
	<</if>>
<</for>>


code:
:: fat grafting workaround [nobr]

<<set $nextButton = "Finalize fat transfer", $nextLink = "Surgery Degradation">>

Enough graftable body fat was harvested for an additional <<print $availabeFat*100>>ccs per breast or an additional <<if $activeSlave.butt <= 10>><<print $availabeFat/2>><<else>><<print $availabeFat/5>><</if>> sizes to her rear. <<if $availabeFat == 0>>All fat marked for use<<else>>A total of $availabeFat unit<<if $availabeFat > 1>>s<</if>> remain<</if>>.

$boobFat units of fat will be added to her breasts for a size gain of <<print $boobFat*100>>ccs.

<<if $availabeFat > 0>>
	[[Increase|fat grafting workaround][$boobFat++, $availabeFat--]] |
<<else>>
	No more fat available. |
<</if>>
<<if $boobFat > 0>>
	[[Decrease|fat grafting workaround][$boobFat--, $availabeFat++]]
<<else>>
	No more fat marked for breast use.
<</if>>

<<if $activeSlave.butt <= 10>><<print $buttFat*2>><<else>><<print $buttFat*5>><</if>> units of fat will be added to her ass for a size gain of $buttFat.
<<if $activeSlave.butt > 10>>

	<<if $availabeFat > 0>>
		[[Increase|fat grafting workaround][$buttFat += .2, $availabeFat -= 1]] |
	<<else>>
		Insufficient fat. |
	<</if>>
	<<if $buttFat > 0>>
		[[Decrease|fat grafting workaround][$buttFat -= .2, $availabeFat += 1]]
	<<else>>
		No fat marked for ass use.
	<</if>>
<<else>>

	<<if $availabeFat > 0>>
		[[Increase|fat grafting workaround][$buttFat += .5, $availabeFat -= 1]] |
	<<else>>
		No more fat available. |
	<</if>>
	<<if $buttFat > 0>>
		[[Decrease|fat grafting workaround][$buttFat -= .5, $availabeFat += 1]]
	<<else>>
		No fat marked for ass use.
	<</if>>
<</if>>

license: mit


code:
:: Generate Child [nobr]

<<if $mom != 0>>
	<<set $mergeMom = 0>>
	<<set $mergeDad = 0>>
	<<for $m = 0; $m < $genePool.length; $m++>>
		<<if $mom.ID == $genePool[$m].ID>>
			<<set $mergeMom = $genePool[$m]>>
		<</if>>
		<<if $mom.pregSource == $genePool[$m].ID>>
			<<set $mergeDad = $genePool[$m]>>
		<</if>>
	<</for>>
	<<if $mom.pregSource == -1>>
		<<set $mergeDad = $PC>>
	<<elseif $mom.pregSource == 0 || $mom.pregSource < -1>>
		<<set $mergeDad = $mergeMom>>
	<</if>>
<</if>>

<<set $activeSlaveOneTimeMinAge = $targetAge>>
<<set $activeSlaveOneTimeMaxAge = $targetAge>>
<<set $one_time_age_overrides_pedo_mode = 1>>

<<if $babyGender == 1>>
	<<include "Generate XX Slave">>
	<<if $PC.pregSource < 1>>
		<<set $activeSlave.slaveName = "Your daughter">>
		<<set $activeSlave.mother = -1>>
		<<set $activeSlave.father = $missingParentID>>
		<<set $missingParentID-->>
		<<set $activeSlave.nationality = "Stateless">>
		<<if $PC.pregSource == -2 && $arcologies[0].FSSupremacist != "unset">>
			<<set $activeSlave.race = either($PC.race, $arcologies[0].FSSubjugationistRace, $arcologies[0].FSSubjugationistRace)>>
			<<if $PC.race != $arcologies[0].FSSubjugationistRace>>
				<<if random(1,100) > 50>>
					<<set $activeSlave.race = "mixed race">>
				<</if>>
			<</if>>
		<<else>>
			<<set $activeSlave.race = $PC.race>>
		<</if>>
		<<set $activeSlave.skin = $PC.origSkin>>
		<<set $activeSlave.eyeColor = either($PC.origEye, "brown", "blue", "brown", "green", "hazel", "green")>>
		<<set $activeSlave.hColor = either($PC.origHColor, "brown", "blonde", "black", "brown")>>
		<<set $activeSlave.pubicHColor = $activeSlave.hColor>>
		<<set $activeSlave.underArmHColor = $activeSlave.hColor>>
		<<set $activeSlave.sexualFlaw = "none">>
		<<set $activeSlave.sexualQuirk = "none">>
		<<set $activeSlave.behavioralFlaw = "none">>
		<<set $activeSlave.behavioralQuirk = "none">>
		<<set $activeSlave.fetish = "none">>
		<<if $PC.markings != "none" && random(1,100) > 50>>
			<<set $activeSlave.markings = $PC.markings>>
		<</if>>
	<<else>>
		<<for $m = 0; $m < $genePool.length; $m++>>
			<<if $PC.pregSource == $genePool[$m].ID>>
				<<set $mergeDad = $genePool[$m]>>
				<<break>>
			<</if>>
		<</for>>
		<<set $activeSlave.slaveName = String("Your and " + $mergeDad.slaveName + "'s daughter")>>
		<<set $activeSlave.mother = -1>>
		<<set $activeSlave.father = $mergeDad.ID>>
		<<if $PC.nationality == $mergeDad.nationality>>
			<<set $activeSlave.nationality = $mergeDad.nationality>>
		<<else>>
			<<set $activeSlave.nationality = "Stateless">>
		<</if>>
		<<if $PC.race == $mergeDad.race>>
			<<set $activeSlave.race = $mergeDad.race>>
		<<elseif random(1,4) == 4>>
			<<set $activeSlave.race = either($PC.race, $mergeDad.race)>>
		<<else>>
			<<set $activeSlave.race = "mixed race">>
		<</if>>
		<<if $PC.origSkin == $mergeDad.origSkin>>
			<<set $activeSlave.skin = $PC.origSkin>>
		<<else>>
			<<GenSkinTone $PC $mergeDad>>
		<</if>>
		<<if $PC.origEye == $mergeDad.origEye>>
			<<set $activeSlave.eyeColor = $PC.origEye>>
		<<elseif $PC.origEye == "red" || $PC.origEye == "pale red" || $PC.origEye == "light red" || $PC.origEye == "pale gray">>
			<<set $activeSlave.eyeColor = $mergeDad.origEye>>
		<<elseif $mergeDad.origEye == "red" || $mergeDad.origEye == "pale red" || $mergeDad.origEye == "light red" || $mergeDad.origEye == "pale gray" || $mergeDad.origEye == "milky white">>
			<<set $activeSlave.eyeColor = $PC.origEye>>
		<<elseif $PC.origEye == "blue">>
			<<if random(1,4) == 2>>
				<<set $activeSlave.eyeColor = $PC.origEye>>
			<<else>>
				<<set $activeSlave.eyeColor = $mergeDad.origEye>>
			<</if>>
		<<elseif $mergeDad.origEye == "blue">>
			<<if random(1,4) == 2>>
				<<set $activeSlave.eyeColor = $mergeDad.origEye>>
			<<else>>
				<<set $activeSlave.eyeColor = $PC.origEye>>
			<</if>>
		<<else>>
			<<set $activeSlave.eyeColor = either($PC.origEye, $mergeDad.origEye)>>
		<</if>>
		<<if $PC.origHColor == $mergeDad.origHColor>>
			<<set $activeSlave.hColor = $PC.origHColor>>
		<<elseif $PC.origHColor == "black">>
			<<set $activeSlave.hColor = $PC.origHColor>>
		<<elseif $mergeDad.origHColor == "black">>
			<<set $activeSlave.hColor = $mergeDad.origHColor>>
		<<elseif $PC.origHColor == "brown">>
			<<set $activeSlave.hColor = $PC.origHColor>>
		<<elseif $mergeDad.origHColor == "brown">>
			<<set $activeSlave.hColor = $mergeDad.origHColor>>
		<<elseif $PC.origHColor == "white">>
			<<if random(1,100) == 69>>
				<<set $activeSlave.hColor = $PC.origHColor>>
			<<else>>
				<<set $activeSlave.hColor = $mergeDad.origHColor>>
			<</if>>
		<<elseif $mergeDad.origHColor == "white">>
			<<if random(1,100) == 69>>
				<<set $activeSlave.hColor = $PC.origHColor>>
			<<else>>
				<<set $activeSlave.hColor = $mergeDad.origHColor>>
			<</if>>
		<<else>>
			<<set $activeSlave.hColor = either($PC.origHColor, $mergeDad.origHColor)>>
		<</if>>
		<<set $activeSlave.pubicHColor = $activeSlave.hColor>>
		<<set $activeSlave.underArmHColor = $activeSlave.hColor>>
		<<if $mergeDad.underArmHStyle == "hairless">>
			<<if random(1,5) == 3>>
				<<set $activeSlave.underArmHStyle = "hairless">>
			<</if>>
		<</if>>
		<<if $mergeDad.pubicHStyle == "hairless">>
			<<if random(1,5) == 3>>
				<<set $activeSlave.pubicHStyle = "hairless">>
			<</if>>
		<</if>>
		<<set $activeSlave.sexualFlaw = either("none", "none", "none", "none", "none", $mergeDad.sexualFlaw)>>
		<<set $activeSlave.sexualQuirk = either("none", "none", "none", "none", "none", $mergeDad.sexualFlaw)>>
		<<set $activeSlave.behavioralFlaw = either("none", "none", "none", "none", "none", $mergeDad.sexualFlaw)>>
		<<set $activeSlave.behavioralQuirk = either("none", "none", "none", "none", "none", $mergeDad.sexualFlaw)>>
		<<set $activeSlave.fetish = either("none", "none", "none", "none", "none", $mergeDad.fetish)>>
		<<if $activeSlave.markings == "none">>
			<<set $activeSlave.markings = either($PC.markings, $mergeDad.markings, "none", "none")>>
		<</if>>
	<</if>>
	<<set $activeSlave.slaveSurname = $PC.surname>>
<<elseif $babyGender == 2>>
	<<include "Generate XY Slave">>
	<<if $PC.pregSource < 1>>
		<<set $activeSlave.slaveName = "Your son">>
		<<set $activeSlave.mother = -1>>
		<<set $activeSlave.father = $missingParentID>>
		<<set $missingParentID-->>
		<<set $activeSlave.nationality = "Stateless">>
		<<if $PC.pregSource == -2 && $arcologies[0].FSSupremacist != "unset">>
			<<set $activeSlave.race = either($PC.race, $arcologies[0].FSSubjugationistRace, $arcologies[0].FSSubjugationistRace)>>
			<<if $PC.race != $arcologies[0].FSSubjugationistRace>>
				<<if random(1,100) > 50>>
					<<set $activeSlave.race = "mixed race">>
				<</if>>
			<</if>>
		<<else>>
			<<set $activeSlave.race = $PC.race>>
		<</if>>
		<<set $activeSlave.skin = $PC.origSkin>>
		<<set $activeSlave.eyeColor = either($PC.origEye, "brown", "blue", "brown", "green", "hazel", "green")>>
		<<set $activeSlave.hColor = either($PC.origHColor, "brown", "blonde", "black", "brown")>>
		<<set $activeSlave.pubicHColor = $PC.origHColor>>
		<<set $activeSlave.underArmHColor = $PC.origHColor>>
		<<set $activeSlave.sexualFlaw = "none">>
		<<set $activeSlave.sexualQuirk = "none">>
		<<set $activeSlave.behavioralFlaw = "none">>
		<<set $activeSlave.behavioralQuirk = "none">>
		<<set $activeSlave.fetish = "none">>
		<<if $PC.markings != "none" && random(1,100) > 50>>
			<<set $activeSlave.markings = $PC.markings>>
		<</if>>
	<<else>>
		<<for $m = 0; $m < $genePool.length; $m++>>
			<<if $PC.pregSource == $genePool[$m].ID>>
				<<set $mergeDad = $genePool[$m]>>
				<<break>>
			<</if>>
		<</for>>
		<<set $activeSlave.slaveName = String("Your and " + $mergeDad.slaveName + "'s son")>>
		<<set $activeSlave.mother = -1>>
		<<set $activeSlave.father = $mergeDad.ID>>
		<<if $PC.nationality == $mergeDad.nationality>>
			<<set $activeSlave.nationality = $mergeDad.nationality>>
		<<else>>
			<<set $activeSlave.nationality = "Stateless">>
		<</if>>
		<<if $PC.race == $mergeDad.race>>
			<<set $activeSlave.race = $mergeDad.race>>
		<<elseif random(1,4) == 4>>
			<<set $activeSlave.race = either($PC.race, $mergeDad.race)>>
		<<else>>
			<<set $activeSlave.race = "mixed race">>
		<</if>>
		<<if $PC.origSkin == $mergeDad.origSkin>>
			<<set $activeSlave.skin = $PC.origSkin>>
		<<else>>
			<<GenSkinTone $PC $mergeDad>>
		<</if>>
		<<if $PC.origEye == $mergeDad.origEye>>
			<<set $activeSlave.eyeColor = $PC.origEye>>
		<<elseif $PC.origEye == "red" || $PC.origEye == "pale red" || $PC.origEye == "light red" || $PC.origEye == "pale gray">>
			<<set $activeSlave.eyeColor = $mergeDad.origEye>>
		<<elseif $mergeDad.origEye == "red" || $mergeDad.origEye == "pale red" || $mergeDad.origEye == "light red" || $mergeDad.origEye == "pale gray" || $mergeDad.origEye == "milky white">>
			<<set $activeSlave.eyeColor = $PC.origEye>>
		<<elseif $PC.origEye == "blue">>
			<<if random(1,4) == 2>>
				<<set $activeSlave.eyeColor = $PC.origEye>>
			<<else>>
				<<set $activeSlave.eyeColor = $mergeDad.origEye>>
			<</if>>
		<<elseif $mergeDad.origEye == "blue">>
			<<if random(1,4) == 2>>
				<<set $activeSlave.eyeColor = $mergeDad.origEye>>
			<<else>>
				<<set $activeSlave.eyeColor = $PC.origEye>>
			<</if>>
		<<else>>
			<<set $activeSlave.eyeColor = either($PC.origEye, $mergeDad.origEye)>>
		<</if>>
		<<if $PC.origHColor == $mergeDad.origHColor>>
			<<set $activeSlave.hColor = $PC.origHColor>>
		<<elseif $PC.origHColor == "black">>
			<<set $activeSlave.hColor = $PC.origHColor>>
		<<elseif $mergeDad.origHColor == "black">>
			<<set $activeSlave.hColor = $mergeDad.origHColor>>
		<<elseif $PC.origHColor == "brown">>
			<<set $activeSlave.hColor = $PC.origHColor>>
		<<elseif $mergeDad.origHColor == "brown">>
			<<set $activeSlave.hColor = $mergeDad.origHColor>>
		<<elseif $PC.origHColor == "white">>
			<<if random(1,100) == 69>>
				<<set $activeSlave.hColor = $PC.origHColor>>
			<<else>>
				<<set $activeSlave.hColor = $mergeDad.origHColor>>
			<</if>>
		<<elseif $mergeDad.origHColor == "white">>
			<<if random(1,100) == 69>>
				<<set $activeSlave.hColor = $PC.origHColor>>
			<<else>>
				<<set $activeSlave.hColor = $mergeDad.origHColor>>
			<</if>>
		<<else>>
			<<set $activeSlave.hColor = either($PC.origHColor, $mergeDad.origHColor)>>
		<</if>>
		<<if $mergeDad.underArmHStyle == "hairless">>
			<<if random(1,5) == 3>>
				<<set $activeSlave.underArmHStyle = "hairless">>
			<</if>>
		<</if>>
		<<if $mergeDad.pubicHStyle == "hairless">>
			<<if random(1,5) == 3>>
				<<set $activeSlave.pubicHStyle = "hairless">>
			<</if>>
		<</if>>
		<<set $activeSlave.pubicHColor = $activeSlave.hColor>>
		<<set $activeSlave.underArmHColor = $activeSlave.hColor>>
		<<set $activeSlave.sexualFlaw = either("none", "none", "none", "none", "none", $mergeDad.sexualFlaw)>>
		<<set $activeSlave.sexualQuirk = either("none", "none", "none", "none", "none", $mergeDad.sexualQuirk)>>
		<<set $activeSlave.behavioralFlaw = either("none", "none", "none", "none", "none", $mergeDad.behavioralFlaw)>>
		<<set $activeSlave.behavioralQuirk = either("none", "none", "none", "none", "none", $mergeDad.behavioralQuirk)>>
		<<set $activeSlave.fetish = either("none", "none", "none", "none", "none", $mergeDad.fetish)>>
		<<if $activeSlave.markings == "none">>
			<<set $activeSlave.markings = either($PC.markings, $mergeDad.markings, "none", "none")>>
		<</if>>
	<</if>>
	<<set $activeSlave.slaveSurname = $PC.surname>>
<<else>>
	<<if $seeDicks == 100>>
		<<include "Generate XY Slave">>
	<<elseif $seeDicks == 0>>
		<<include "Generate XX Slave">>
	<<else>>
		<<if random(0,100) >= 30>>
			<<include "Generate XX Slave">>
		<<else>>
			<<include "Generate XY Slave">>
		<</if>>
	<</if>>
	<<set $activeSlave.mother = $mergeMom.ID>>
	<<if $mom.pregSource > 0>>
		<<set $activeSlave.father = $mergeDad.ID>>
		<<set $activeSlave.slaveName = String($mom.slaveName + " and " + $mergeDad.slaveName + "'s child")>>
		<<if def $mom.slaveSurname && $mom.slaveSurname != "">><<set $activeSlave.slaveSurname = $mom.slaveSurname>><<elseif def $mergeDad.slaveSurname && $mergeDad.slaveSurname != "">><<set $activeSlave.slaveSurname = $mergeDad.slaveSurname>><<else>><<set $activeSlave.slaveSurname = 0>><</if>>
	<<elseif $mom.pregSource == -1>>
		<<set $activeSlave.father = -1>>
		<<set $activeSlave.slaveName = String($mom.slaveName + " and my child")>>
		<<set $activeSlave.slaveSurname = $PC.surname>>
	<<else>>
		<<set $activeSlave.father = $missingParentID>>
		<<set $missingParentID-->>
		<<set $activeSlave.slaveName = String($mom.slaveName + "'s slut child")>>
		<<if def $mom.slaveSurname && $mom.slaveSurname != "">><<set $activeSlave.slaveSurname = $mom.slaveSurname>><<else>><<set $activeSlave.slaveSurname = 0>><</if>>
	<</if>>
	<<if $mergeMom.nationality == $mergeDad.nationality>>
		<<set $activeSlave.nationality = $mergeDad.nationality>>
	<<else>>
		<<set $activeSlave.nationality = "Stateless">>
	<</if>>
	<<if $mergeMom.race == $mergeDad.race>>
		<<set $activeSlave.race = $mergeDad.race>>
	<<elseif random(1,4) == 4>>
		<<set $activeSlave.race = either($mergeMom.race, $mergeDad.race)>>
	<<else>>
		<<set $activeSlave.race = "mixed race">>
	<</if>>
	<<if $mom.pregSource == -2 && $arcologies[0].FSSupremacist != "unset">>
		<<set $activeSlave.race = either($mergeMom.race, $arcologies[0].FSSubjugationistRace, $arcologies[0].FSSubjugationistRace)>>
		<<if $mergeMom.race != $arcologies[0].FSSubjugationistRace>>
			<<if random(1,100) > 50>>
				<<set $activeSlave.race = "mixed race">>
			<</if>>
		<</if>>
	<</if>>
	<<if $mergeMom.origSkin == $mergeDad.origSkin>>
		<<set $activeSlave.skin = $mergeMom.origSkin>>
	<<else>>
		<<GenSkinTone $mergeMom $mergeDad>>
	<</if>>
	<<if $mergeMom.origEye == $mergeDad.origEye>>
		<<set $activeSlave.eyeColor = $mergeMom.origEye>>
	<<elseif $mergeMom.origEye == "red" || $mergeMom.origEye == "pale red" || $mergeMom.origEye == "light red" || $mergeMom.origEye == "pale gray" || $mergeMom.origEye == "milky white">>
		<<set $activeSlave.eyeColor = $mergeDad.origEye>>
	<<elseif $mergeDad.origEye == "red" || $mergeDad.origEye == "pale red" || $mergeDad.origEye == "light red" || $mergeDad.origEye == "pale gray" || $mergeDad.origEye == "milky white">>
		<<set $activeSlave.eyeColor = $mergeMom.origEye>>
	<<elseif $mergeMom.origEye == "blue">>
		<<if random(1,4) == 2>>
			<<set $activeSlave.eyeColor = $mergeMom.origEye>>
		<<else>>
			<<set $activeSlave.eyeColor = $mergeDad.origEye>>
		<</if>>
	<<elseif $mergeDad.origEye == "blue">>
		<<if random(1,4) == 2>>
			<<set $activeSlave.eyeColor = $mergeDad.origEye>>
		<<else>>
			<<set $activeSlave.eyeColor = $mergeMom.origEye>>
		<</if>>
	<<else>>
		<<set $activeSlave.eyeColor = either($mergeMom.origEye, $mergeDad.origEye)>>
	<</if>>
	<<if $mom.pregSource == -2 || $mom.pregSource == 0>>
		<<set $activeSlave.eyeColor = either($mergeMom.origEye, "brown", "blue", "brown", "green", "hazel", "green")>>
	<</if>>
	<<if $mergeMom.origHColor == $mergeDad.origHColor>>
		<<set $activeSlave.hColor = $mergeMom.origHColor>>
	<<elseif $mergeMom.origHColor == "black">>
		<<set $activeSlave.hColor = $mergeMom.origHColor>>
	<<elseif $mergeDad.origHColor == "black">>
		<<set $activeSlave.hColor = $mergeDad.origHColor>>
	<<elseif $mergeMom.origHColor == "brown">>
		<<set $activeSlave.hColor = $mergeMom.origHColor>>
	<<elseif $mergeDad.origHColor == "brown">>
		<<set $activeSlave.hColor = $mergeDad.origHColor>>
	<<elseif $mergeMom.origHColor == "white">>
		<<if random(1,100) == 69>>
			<<set $activeSlave.hColor = $mergeMom.origHColor>>
		<<else>>
			<<set $activeSlave.hColor = $mergeDad.origHColor>>
		<</if>>
	<<elseif $mergeDad.origHColor == "white">>
		<<if random(1,100) == 69>>
			<<set $activeSlave.hColor = $mergeDad.origHColor>>
		<<else>>
			<<set $activeSlave.hColor = $mergeMom.origHColor>>
		<</if>>
	<<else>>
		<<set $activeSlave.hColor = either($mergeMom.origHColor, $mergeDad.origHColor)>>
	<</if>>
	<<if $mom.pregSource == -2 || $mom.pregSource == 0>>
		<<set $activeSlave.hColor = either($mergeMom.origHColor, "brown", "blonde", "black", "brown", "black", "brown", "black")>>
	<</if>>
	<<if $mergeDad.underArmHStyle == "hairless" && $mergeMom.underArmHStyle == "hairless">>
		<<set $activeSlave.underArmHStyle = "hairless">>
	<<elseif $mergeDad.underArmHStyle == "hairless" || $mergeMom.underArmHStyle == "hairless">>
		<<if random(1,5) == 3>>
			<<set $activeSlave.underArmHStyle = "hairless">>
		<</if>>
	<</if>>
	<<if $mergeDad.pubicHStyle == "hairless" && $mergeMom.pubicHStyle == "hairless">>
		<<set $activeSlave.pubicHStyle = "hairless">>
	<<elseif $mergeDad.pubicHStyle == "hairless" || $mergeMom.pubicHStyle == "hairless">>
		<<if random(1,5) == 3>>
			<<set $activeSlave.pubicHStyle = "hairless">>
		<</if>>
	<</if>>
	<<set $activeSlave.pubicHColor = $activeSlave.hColor>>
	<<set $activeSlave.underArmHColor = $activeSlave.hColor>>
	<<set $activeSlave.sexualFlaw = either($mergeMom.sexualFlaw, "none", "none", "none", "none", "none", $mergeDad.sexualFlaw)>>
	<<set $activeSlave.sexualQuirk = either($mergeMom.sexualQuirk, "none", "none", "none", "none", "none", $mergeDad.sexualQuirk)>>
	<<set $activeSlave.behavioralFlaw = either($mergeMom.behavioralFlaw, "none", "none", "none", "none", "none", $mergeDad.behavioralFlaw)>>
	<<set $activeSlave.behavioralQuirk = either($mergeMom.behavioralQuirk, "none", "none", "none", "none", "none", $mergeDad.behavioralQuirk)>>
	<<set $activeSlave.fetish = either("none", "none", "none", "none", "none", $mergeDad.fetish, $mergeMom.fetish)>>
	<<if $activeSlave.markings == "none">>
		<<set $activeSlave.markings = either($mergeMom.markings, $mergeDad.markings, "none", "none")>>
	<</if>>
	<<if $mom.addict > 0>>
		<<set $activeSlave.addict = Math.trunc($mom.addict/2)>>
	<</if>>
<</if>>

<<set $activeSlave.actualAge = 0>>
<<set $activeSlave.birthWeek = 0>>
<<set $activeSlave.weight = -100>>
<<set $activeSlave.muscles = -100>>
<<set $activeSlave.boobs = 0>>
<<set $activeSlave.butt = 0>>
<<set $activeSlave.energy = 0>>
<<set $activeSlave.anus = 0>>
<<set $activeSlave.chem = 990>>
<<if $activeSlave.vagina > -1>>
	<<set $activeSlave.vagina = 0>>
<</if>>
<<if $activeSlave.dick > 0>>
	<<set $activeSlave.foreskin = 1>>
	<<set $activeSlave.balls = 1>>
	<<set $activeSlave.scrotum = 1>>
<</if>>
<<if $activeSlave.fetish != "none">>
	<<set $activeSlave.fetishStrength = 20>>
<</if>>

/* Int and facial attractiveness changes to bolster eugenics and add negatives for excessive inbreeding */
<<if $activeSlave.mother == -1 && $PC.pregSource == -1>>
	<<set $activeSlave.face = random(50,100)>>
	<<set $activeSlave.intelligence = either(2, 2, 2, 2, 3, 3)>>
<<elseif $activeSlave.mother == -1>>
	<<if $PC.pregSource > 0>>
		<<if $mergeDad.face < $PC.face>>
			<<set $activeSlave.face = random($mergeDad.face, $PC.face)>>
		<<else>>
			<<set $activeSlave.face = random(0,$PC.face)>>
		<</if>>
		<<if $activeSlave.face < 40>>
			<<set $activeSlave.face += random(5,20)>>
		<</if>>
		<<if $mergeDad.intelligence < $PC.intelligence>>
			<<set $activeSlave.intelligence = random($mergeDad.intelligence, $PC.intelligence)>>
		<<else>>
			<<set $activeSlave.intelligence = $PC.intelligence>>
		<</if>>
		<<if $activeSlave.intelligence < 2>>
			<<set $activeSlave.intelligence += 1>>
		<</if>>
	<<else>>
		<<set $activeSlave.face =random(20,100)>>
		<<set $activeSlave.intelligence = either(1, 2, 2, 2, 2, 3, 3)>>
	<</if>>
<<elseif $activeSlave.father == -1 && $mom > 0>>
	<<if $mom.breedingMark == 1>>
		<<set $activeSlave.face = random(60,100)>>
		<<set $activeSlave.intelligence = either(2, 2, 2, 2, 3, 3)>>
	<<else>>
		<<if $PC.face > $mergeMom.face>>
			<<set $activeSlave.face = random($mergeMom.face, $PC.face)>>
		<<else>>
			<<set $activeSlave.face = either($mergeMom.face-10, $mergeMom.face+10)>>
		<</if>>
		<<if $PC.intelligence > $mergeMom.intelligence>>
			<<set $activeSlave.intelligence = random($mergeMom.intelligence, $PC.intelligence)>>
		<<else>>
			<<set $activeSlave.intelligence = $mergeMom.intelligence>>
		<</if>>
		<<if $inbreeding == 1>>
			<<if $activeSlave.face > -100 && random(1,100) > 60>>
				<<set $activeSlave.face -= random(2,40)>>
			<</if>>
			<<if $activeSlave.intelligence > -3 && random(1,100) < 60>>
				<<set $activeSlave.intelligence -= 1>>
				<<if $activeSlave.intelligence > -3 && random(1,100) < 30>>
					<<set $activeSlave.intelligence -= 1>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<<else>>
	<<if $mergeDad.face < $mergeMom.face>>
		<<set $activeSlave.face = random($mergeDad.face, $mergeMom.face)>>
	<<elseif $mergeDad.face > $mergeMom.face>>
		<<set $activeSlave.face = random($mergeMom.face, $mergeDad.face)>>
	<<else>>
		<<set $activeSlave.face = $mergeMom.face>>
	<</if>>
	<<if $mergeDad.intelligence < $mergeMom.intelligence>>
		<<set $activeSlave.intelligence = random($mergeDad.intelligence, $mergeMom.intelligence)>>
	<<elseif $mergeDad.intelligence > $mergeMom.intelligence>>
		<<set $activeSlave.intelligence = random($mergeMom.intelligence, $mergeDad.intelligence)>>
	<<else>>
		<<set $activeSlave.intelligence = $mergeMom.intelligence>>
	<</if>>
	<<if $inbreeding == 1>>
		<<if $activeSlave.face > -100 && random(1,100) < 70>>
			<<set $activeSlave.face -= random(5,40)>>
		<</if>>
		<<if $activeSlave.intelligence > -3 && random(1,100) < 90>>
			<<set $activeSlave.intelligence -= 1>>
				<<if $activeSlave.intelligence > -3 && random(1,100) < 60>>
					<<set $activeSlave.intelligence -= 1>>
				<</if>>
		<</if>>
	<</if>>
<</if>>

<<set $activeSlave.areolaePiercing = 0>>
<<set $activeSlave.face = Math.clamp($activeSlave.face, -100, 100)>>
<<set $activeSlave.corsetPiercing = 0>>
<<set $activeSlave.boobsImplant = 0>>
<<set $activeSlave.boobsImplantType = 0>>
<<set $activeSlave.nipplesPiercing = 0>>
<<set $activeSlave.areolaePiercing = 0>>
<<set $activeSlave.lactation = 0>>
<<set $activeSlave.hipsImplant = 0>>
<<set $activeSlave.buttImplant = 0>>
<<set $activeSlave.buttImplantType = 0>>
<<set $activeSlave.lipsImplants = 0>>
<<set $activeSlave.lipsPiercing = 0>>
<<set $activeSlave.tonguePiercing = 0>>
<<set $activeSlave.vaginaPiercing = 0>>
<<set $activeSlave.preg = 0>>
<<set $activeSlave.pregType = 0>>
<<set $activeSlave.pregKnown = 0>>
<<set $activeSlave.belly = 0>>
<<set $activeSlave.bellyPreg = 0>>
<<set $activeSlave.bellyFluid = 0>>
<<set $activeSlave.bellyImplant = -1>>
<<set $activeSlave.clitPiercing = 0>>
<<set $activeSlave.dickPiercing = 0>>
<<set $activeSlave.makeup = 0>>
<<set $activeSlave.nails = 0>>
<<set $activeSlave.earPiercing = 0>>
<<set $activeSlave.nosePiercing = 0>>
<<set $activeSlave.eyebrowPiercing = 0>>
<<set $activeSlave.stampTat = 0>>
<<set $activeSlave.bellyTat = 0>>
<<set $activeSlave.anusPiercing = 0>>
<<set $activeSlave.anusTat = 0>>
<<set $activeSlave.shouldersTat = 0>>
<<set $activeSlave.armsTat = 0>>
<<set $activeSlave.legsTat = 0>>
<<set $activeSlave.backTat = 0>>
<<set $activeSlave.combatSkill = 0>>
<<set $activeSlave.whoreSkill = 0>>
<<set $activeSlave.entertainSkill = 0>>
<<set $activeSlave.oralSkill = 0>>
<<set $activeSlave.analSkill = 0>>
<<set $activeSlave.vaginalSkill = 0>>
<<set $activeSlave.accent = 4>>
<<set $activeSlave.canRecruit = 0>>
<<set $activeSlave.hStyle = "long">>
<<set $activeSlave.hLength = 300>>
<<if $activeSlave.pubicHStyle != "hairless">>
	<<set $activeSlave.pubicHStyle = either("bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless")>>
<</if>>
<<if $activeSlave.underArmHStyle != "hairless">>
	<<set $activeSlave.underArmHStyle = either("bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "bushy", "hairless")>>
<</if>>
<<set $activeSlave.origin = "Shortly after birth, she was sealed in an aging tank until she was of age. She knows nothing of the world outside of what the tank imprinted her with.">>
<<set $activeSlave.career = "a slave since birth">>
<<set $activeSlave.birthName =  $activeSlave.slaveName>>
<<set $activeSlave.birthSurname = $activeSlave.slaveSurname>>
<<set $activeSlave.intelligenceImplant = 0>>
<<set $activeSlave.navelPiercing = 0>>
<<set $activeSlave.devotion = 0>>
<<set $activeSlave.trust = 0>>
<<set $activeSlave.weekAcquired = $week>>
<<if $activeSlave.nationality == "Stateless">>
	<<if $arcologies[0].FSRomanRevivalist > 90>>
		<<set $activeSlave.nationality = "Roman Revivalist">>
	<<elseif $arcologies[0].FSAztecRevivalist > 90>>
		<<set $activeSlave.nationality = "Aztec Revivalist">>
	<<elseif $arcologies[0].FSEgyptianRevivalist > 90>>
		<<set $activeSlave.nationality = "Ancient Egyptian Revivalist">>
	<<elseif $arcologies[0].FSEdoRevivalist > 90>>
		<<set $activeSlave.nationality = "Edo Revivalist">>
	<<elseif $arcologies[0].FSArabianRevivalist > 90>>
		<<set $activeSlave.nationality = "Arabian Revivalist">>
	<<elseif $arcologies[0].FSChineseRevivalist > 90>>
		<<set $activeSlave.nationality = "Ancient Chinese Revivalist">>
	<</if>>
<</if>>

<<set $mergeMom = 0>>
<<set $mergeDad = 0>>


code:
:: Hotswap Prosthetics [nobr]
<<if ndef $activeLimbs>>
	<<set $activeLimbs = 0>>
<</if>>

	Switch out her prosthetics for
	<<if $activeSlave.amp == -1>>
		Basic P-limbs equipped
		<<elseif $activeSlave.readyLimbs.includes(-1)>>
		<<link "a basic set">><<set $activeSlave.amp = -1>><<replace "#LimbOptions">><<include "Hotswap Prosthetics">><</replace>><</link>>
		<<elseif $activeLimbs.type == "simple" && $activeSlave.ID == $activeLimbs.ID>>
		//Basic P-limbs being built
		<<else>>
		//Basic prostheses unavailable
	<</if>>|
	<<if $activeSlave.amp == -2>>
		Sex focused P-limbs equipped
		<<elseif $activeSlave.readyLimbs.includes(-2)>>
		<<link "a sex focused set">><<set $activeSlave.amp = -2>><<replace "#LimbOptions">><<include "Hotswap Prosthetics">><</replace>><</link>>
		<<elseif $activeLimbs.type == "sex" && $activeSlave.ID == $activeLimbs.ID>>
		//Sex focused P-limbs being built
		<<else>>
		//Sex focused prostheses unavailable
	<</if>>|
	<<if $activeSlave.amp == -3>>
		Natural looking P-limbs equipped
		<<elseif $activeSlave.readyLimbs.includes(-3)>>
		<<link "a natural looking set">><<set $activeSlave.amp = -3>><<replace "#LimbOptions">><<include "Hotswap Prosthetics">><</replace>><</link>>
		<<elseif $activeLimbs.type == "beauty" && $activeSlave.ID == $activeLimbs.ID>>
		//Natural looking P-limbs being built
		<<else>>
		//Natural looking prostheses unavailable
	<</if>>|
	<<if $activeSlave.amp == -4>>
		Combat P-limbs equipped
		<<elseif $activeSlave.readyLimbs.includes(-4)>>
		<<link "military grade arms">><<set $activeSlave.amp = -4>><<replace "#LimbOptions">><<include "Hotswap Prosthetics">><</replace>><</link>>
		<<elseif $activeLimbs.type == "combat" && $activeSlave.ID == $activeLimbs.ID>>
		//Combat P-limbs being built
		<<else>>
		//Combat prostheses unavailable
	<</if>>|
	<<if $activeSlave.amp == -5>>
		Cybernetic P-limbs equipped
		<<elseif $activeSlave.readyLimbs.includes(-5)>>
		<<link "advanced cybernetics">><<set $activeSlave.amp = -5>><<replace "#LimbOptions">><<include "Hotswap Prosthetics">><</replace>><</link>>
		<<elseif $activeLimbs.type == "cyber" && $activeSlave.ID == $activeLimbs.ID>>
		//Cybernetic P-limbs being built
		<<else>>
		//Cybernetic prostheses unavailable
	<</if>>


code:
:: Husk Slave [nobr]

<<set $nextButton = "Back", $nextLink = "Buy Slaves", $returnTo = "Buy Slaves", $showEncyclopedia = 1, $encyclopedia = "Kidnapped Slaves">>
<<if ($huskSlave.dick == 0) && ($huskSlave.vagina == -1)>><<set $huskSlave.vagina = 0>><</if>>

<<if $huskSlaveOrdered == 0>>You lay out a new order for a braindead slave to be put aside for your use.<<else>>You review your posted husk order.<</if>> Your order requests a body with the following characteristics:

<<set $huskSlave.age = Math.clamp($huskSlave.age, $minimumSlaveAge, $retirementAge-1)>>

Age:

<<textbox "$huskSlave.age" $huskSlave.age "Husk Slave">>

Sex:
<<if $huskSlave.sex == 1>>Female.
<<elseif $huskSlave.sex == 2>>Male.
<<elseif $huskSlave.sex == 3>>Futanari.
<</if>>

[[Female|Husk Slave][$huskSlave.sex = 1]]
| [[Male|Husk Slave][$huskSlave.sex = 2]]
| [[Both|Husk Slave][$huskSlave.sex = 3]]

Nationality:

<<textbox "$huskSlave.nationality" $huskSlave.nationality "Husk Slave">>

<<textbox "$huskSlave.race" $huskSlave.race "Husk Slave">>

[[White|Husk Slave][$huskSlave.race = "white"]]
| [[Asian|Husk Slave][$huskSlave.race = "asian"]]
| [[Latina|Husk Slave][$huskSlave.race = "latina"]]
| [[Middle Eastern|Husk Slave][$huskSlave.race = "middle eastern"]]
| [[Black|Husk Slave][$huskSlave.race = "black"]]
| [[Semetic|Husk Slave][$huskSlave.race = "semetic"]]
| [[Southern European|Husk Slave][$huskSlave.race = "southern european"]]
| [[Indo-aryan|Husk Slave][$huskSlave.race = "indo-aryan"]]
| [[Amerindian|Husk Slave][$huskSlave.race = "amerindian"]]
| [[Pacific Islander|Husk Slave][$huskSlave.race = "pacific islander"]]
| [[Malay|Husk Slave][$huskSlave.race = "malay"]]
| [[Mixed Race|Husk Slave][$huskSlave.race = "mixed race"]]

Virginity:
<<if $huskSlave.virgin == 0>>Virgin.
<<else>>Not important.
<</if>>

[[Important|Husk Slave][$huskSlave.virgin = 0]]
| [[Not Important|Husk Slave][$huskSlave.virgin = 1]]

Reserving a body will cost ¤10000 up front. Cancelling an order will refund your money, however if a delivered body is rejected; your money will not be refunded.
<<if $huskSlaveOrdered == 1>>
[[Withdraw body order|Main][$huskSlaveOrdered = 0, $cash += 10000]]
<<elseif $cash < 10000>>
	//You lack the credits to place a body reservation.//
<<else>>
[[Post body order|Main][$huskSlaveOrdered = 1, $cash -= 10000]]
<</if>>


code:
:: Husk Slave Swap [nobr]

<<set $nextButton = "Continue">>
<<set _oldSlave = clone($swappingSlave)>>
<<set _m = $slaves.findIndex(function(s) { return s.ID == $swappingSlave.ID; })>>

You strap $slaves[_m].slaveName, and the body to which $pronoun will be transferred, into the remote surgery and stand back as it goes to work.
<<BodySwap $slaves[_m] $activeSlave>>
<<set _gps = $genePool.findIndex(function(s) { return s.ID == $slaves[_m].ID; })>>
<<set $genePool[_gps].race = $slaves[_m].race, $genePool[_gps].skin = $slaves[_m].skin, $genePool[_gps].markings = $slaves[_m].markings, $genePool[_gps].origEye = $slaves[_m].origEye, $genePool[_gps].origHColor = $slaves[_m].origHColor, $genePool[_gps].origSkin = $slaves[_m].skin, $genePool[_gps].face = $slaves[_m].face, $genePool[_gps].pubicHStyle = $slaves[_m].pubicHStyle, $genePool[_gps].underArmHStyle = $slaves[_m].underArmHStyle>> /* special exception to swap genePool since the temporary body lacks an entry. Otherwise we could just call the widget using the genePool entries */
After an honestly impressive procedure, $slaves[_m].slaveName is released and allowed to explore her new body.

//To do - Reactions//

<<slaveCost _oldSlave>>
<<set _payout = Math.trunc($slaveCost/3)>>
$slaves[_m].slaveName's body was bought by the Flesh Heap for ¤_payout.
<<set $cash += _payout>>
<<set $activeSlave = 0, $swappingSlave = 0>>


code:
:: husk Slave Swap Workaround [nobr]

<<set $nextButton = "Abort Operation", $nextLink = "Scheduled Event", $returnTo = "Scheduled Event">>

<<set $swapFailure = random(1,1000)>>

"This operation is neither simple nor is it perfected. There are extreme health risks involved and no guarantee of success. Strap a slave into your remote surgery to consent to the operation. Indentured servants<<if $incubator > 0>> and slaves with reserved children<</if>> not eligible."

//Select the slave whose brain will be transferred into the waiting husk.<<if $cyberMod == 1>> Amputated slaves must not be wearing prosthetics.<</if>>//

__Select an eligible slave:__
<<for _i = 0; _i < $slaves.length; _i++>>
	<<if isSlaveAvailable($slaves[_i])>>
	<<if ($slaves[_i].PLimb == 0) || ($slaves[_i].PLimb == 1 && $slaves[_i].amp == 1)>>
	<<if ($slaves[_i].indenture == -1)>>
	<<if ($slaves[_i].breedingMark == 0)>>
	<<if ($slaves[_i].reservedChildren == 0)>>
	<<if ($slaves[_i].ID != $activeSlave.ID)>>

<<print "[[$slaves[_i].slaveName|Husk Slave Swap][$swappingSlave = $slaves[" + _i + "]]]">>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
<</for>>


code:
:: Incubator [nobr]

<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Incubator">>
<<set $targetAge = Number($targetAge) || $minimumSlaveAge>>
<<set $targetAge = Math.clamp($targetAge, $minimumSlaveAge, 42)>>

<<if $incubatorName != "the Incubator">>
	<<set $incubatorNameCaps = $incubatorName.replace("the ", "The ")>>
<</if>>

<<set $readySlaves = 0, $readySlave = 0, $incubatorSlaves = $tanks.length, $freeTanks = $incubator - $incubatorSlaves, _SL = $slaves.length, _eligibility = 0>>

$incubatorNameCaps is a clean, cold hall designed to be lined with tanks and their connected monitoring systems.

<<if $incubatorSlaves > 2>>
	It's well used. The hum of active tanks fill the air.
<<elseif $incubatorSlaves > 0>>
	It's barely used; most of the tanks lie dormant.
<<else>>
	It's empty and quiet. [[Decommission the incubator|Main][$incubator = 0, $incubatorUpgradeSpeed = 5, $incubatorUpgradeWeight = 0, $incubatorUpgradeMuscles = 0, $incubatorUpgradeReproduction = 0, $incubatorUpgradeGrowthStims = 0, $incubatorWeightSetting = 0, $incubatorMusclesSetting = 0, $incubatorReproductionSetting = 0, $incubatorGrowthStimsSetting = 0, $tanks = []]]
<</if>>

It can support $incubator <<if $incubator == 1>>child<<else>>children<</if>>.
<<if $freeTanks == 0>>
	All of the tanks are currently occupied by growing children.
<<elseif $incubator > 1 && $reservedChildren < $freeTanks>>
	[[Remove an incubation tank|Incubator][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $incubator -= 1]] //Costs ¤<<print Math.trunc(10000*$upgradeMultiplierArcology)>> and will reduce upkeep costs//
<</if>>
[[Add another incubation tank|Incubator][$cash -= Math.trunc(60000*$upgradeMultiplierArcology), $incubator += 1]] //Costs ¤<<print Math.trunc(60000*$upgradeMultiplierArcology)>> and will increase upkeep costs//

Reserve an eligible mother-to-be's child to be placed in a tank upon birth. Of $incubator tanks, <<print $freeTanks>> <<if $freeTanks == 1>>is<<else>>are<</if>> unoccupied. Of those, $reservedChildren <<if $reservedChildren == 1>>tank is<<else>>tanks are<</if>> reserved.
<<for _u = 0; _u < _SL; _u++>>
	<<if $slaves[_u].pregType < 50 && $slaves[_u].pregKnown == 1 && $slaves[_u].eggType == "human">>
	<<if $slaves[_u].assignment == "work in the dairy" && $dairyPregSetting > 0>>
	<<else>>

<<print "[[$slaves[" + _u + "].slaveName|Long Slave Description][$activeSlave = $slaves[" + _u + "], $nextLink = passage()]]">> is $slaves[_u].pregWeek weeks pregnant with
		<<if $slaves[_u].pregSource == 0 || $slaves[_u].preg <= 5>>someone's<<if $slaves[_u].preg <= 5>>, though it is too early to tell whose,<</if>>
		<<elseif $slaves[_u].pregSource == -1>>your
		<<elseif $slaves[_u].pregSource == -2>>a citizen's
		<<else>>
			<<for _t = 0; _t < _SL; _t++>>
				<<if $slaves[_u].pregSource == $slaves[_t].ID>>
					<<print $slaves[_t].slaveName>>'s
					<<break>>
				<</if>>
			<</for>>
		<</if>>
		<<if $slaves[_u].pregType > 1>>$slaves[_u].pregType babies<<else>>baby<</if>>.
		<<if $slaves[_u].reservedChildren > 0>>
			$slaves[_u].reservedChildren of her children will be placed in $incubatorName.
			<<if ($slaves[_u].reservedChildren < $slaves[_u].pregType) && ($reservedChildren < $freeTanks)>>

				<<print "[[Keep another child|Incubator][$slaves[" + _u + "].reservedChildren += 1, $reservedChildren += 1]]">>
				<<if $slaves[_u].reservedChildren > 0>>
					| <<print "[[Keep one less child|Incubator][$slaves[" + _u + "].reservedChildren -= 1, $reservedChildren -= 1]]">>
				<</if>>
				<<if $slaves[_u].reservedChildren > 1>>
					| <<print "[[Keep none of her children|Incubator][$reservedChildren -= $slaves[" + _u + "].reservedChildren, $slaves[" + _u + "].reservedChildren = 0]]">>
				<</if>>
				<<if ($reservedChildren + $slaves[_u].pregType - $slaves[_u].reservedChildren) <= $freeTanks>>
					| <<print "[[Keep the rest of her children|Incubator][$reservedChildren += ($slaves[" + _u + "].pregType - $slaves[" + _u + "].reservedChildren), $slaves[" + _u + "].reservedChildren += ($slaves[" + _u + "].pregType - $slaves[" + _u + "].reservedChildren)]]">>
				<</if>>
			<<elseif ($slaves[_u].reservedChildren == $slaves[_u].pregType) || ($reservedChildren == $freeTanks)>>

				<<print "[[Keep one less child|Incubator][$slaves[" + _u + "].reservedChildren -= 1, $reservedChildren -= 1]]">>
				<<if $slaves[_u].reservedChildren > 1>>
					| <<print "[[Keep none of her children|Incubator][$reservedChildren -= $slaves[" + _u + "].reservedChildren, $slaves[" + _u + "].reservedChildren = 0]]">>
				<</if>>
			<</if>>
		<<elseif $reservedChildren < $freeTanks>>
			You have <<if $freeTanks == 1>>an<</if>> @@.lime;available aging tank<<if $freeTanks > 1>>s<</if>>.@@

			<<print "[[Keep "+ (($slaves[_u].pregType > 1) ? "a" : "the") +" child|Incubator][$slaves[" + _u + "].reservedChildren += 1, $reservedChildren += 1]]">>
			<<if ($slaves[_u].pregType > 1) && ($reservedChildren + $slaves[_u].pregType - $slaves[_u].reservedChildren) <= $freeTanks>>
				| <<print "[[Keep all of her children|Incubator][$reservedChildren += $slaves["+ _u + "].pregType, $slaves[" + _u + "].reservedChildren += $slaves["+ _u +"].pregType]]">>
			<</if>>
		<<elseif $reservedChildren == $freeTanks>>

			You have @@.red;no room for her offspring.@@
		<</if>>
		<<set _eligibility = 1>>
	<</if>>
	<</if>>
<</for>>
<<if _eligibility == 0>>

	//You have no pregnant slaves bearing eligible children.//
<</if>>
<<if $PC.pregKnown == 1 && $PC.pregSource != -1>>

''@@.pink;You're pregnant@@'' and going to have
		<<switch $PC.pregType>>
		<<case 1>>
			a baby.
		<<case 2>>
			twins.
		<<case 3>>
			triplets.
		<<case 4>>
			quadruplets.
		<<case 5>>
			quintuplets.
		<<case 6>>
			sextuplets.
		<<case 7>>
			septuplets.
		<<case 8>>
			octuplets.
		<</switch>>
	<<if $PC.reservedChildren > 0>>
		$PC.reservedChildren of your children will be placed in $incubatorName.
		<<if ($PC.reservedChildren < $PC.pregType) && ($reservedChildren < $freeTanks)>>

			<<print "[[Keep another child|Incubator][$PC.reservedChildren += 1, $reservedChildren += 1]]">>
			<<if $PC.reservedChildren > 0>>
				| <<print "[[Keep one less child|Incubator][$PC.reservedChildren -= 1, $reservedChildren -= 1]]">>
			<</if>>
			<<if $PC.reservedChildren > 1>>
				| <<print "[[Keep none of your children|Incubator][$reservedChildren -= $PC.reservedChildren, $PC.reservedChildren = 0]]">>
			<</if>>
			<<if ($reservedChildren + $PC.pregType - $PC.reservedChildren) <= $freeTanks>>
				| <<print "[[Keep the rest of your children|Incubator][$reservedChildren += ($PC.pregType - $PC.reservedChildren), $PC.reservedChildren += ($PC.pregType - $PC.reservedChildren)]]">>
			<</if>>
		<<elseif ($PC.reservedChildren == $PC.pregType) || ($reservedChildren == $freeTanks)>>

			<<print "[[Keep one less child|Incubator][$PC.reservedChildren -= 1, $reservedChildren -= 1]]">>
			<<if $PC.reservedChildren > 1>>
				| <<print "[[Keep none of your children|Incubator][$reservedChildren -= $PC.reservedChildren, $PC.reservedChildren = 0]]">>
			<</if>>
		<</if>>
	<<elseif $reservedChildren < $freeTanks>>
		You have <<if $freeTanks == 1>>an<</if>> @@.lime;available aging tank<<if $freeTanks > 1>>s<</if>>.@@

		<<print "[[Keep "+ (($PC.pregType > 1) ? "a" : "your") +" child|Incubator][$PC.reservedChildren += 1, $reservedChildren += 1]]">>
		<<if ($PC.pregType > 1) && ($reservedChildren + $PC.pregType - $PC.reservedChildren) <= $freeTanks>>
			| <<print "[[Keep all of your children|Incubator][$reservedChildren += $PC.pregType, $PC.reservedChildren += $PC.pregType]]">>
		<</if>>
	<<elseif $reservedChildren == $freeTanks>>

		You have @@.red;no room for your offspring.@@
	<</if>>
<</if>>
<<if $reservedChildren != 0>> /* the oops I made it go negative somehow button */

	 <<link "Clear all reserved children">>
		<<for _u = 0; _u < _SL; _u++>>
			<<if $slaves[_u].reservedChildren != 0>>
				<<set $slaves[_u].reservedChildren = 0>>
			<</if>>
		<</for>>
		<<set $PC.reservedChildren = 0>>
		<<set $reservedChildren = 0>>
		<<goto "Incubator">>
	 <</link>>
<</if>>

Target age for release: <<textbox "$targetAge" $targetAge "Incubator">> [[Minimum Legal Age|Incubator][$targetAge = $minimumSlaveAge]] | [[Average Age of Fertility|Incubator][$targetAge = $fertilityAge]] | [[Average Age of Potency|Incubator][$targetAge = $potencyAge]] | [[Legal Adulthood|Incubator][$targetAge = 18]]
//Setting will not be applied to tanks in use.//

<<if $incubatorUpgradeSpeed == 52>>
	It has been upgraded with perfected growth accelerants; children grow at the rate of 1 week to 1 year.
<<elseif $incubatorUpgradeSpeed == 18>>
	It has been upgraded with advanced experimental growth accelerants; children grow at the rate of 3 weeks to 1 year. [[Fund speculative research into maximizing growth rate|Incubator][$cash -= Math.trunc(500000*$upgradeMultiplierArcology), $incubatorUpgradeSpeed = 52]] //Costs ¤<<print Math.trunc(500000*$upgradeMultiplierArcology)>> and will increase upkeep costs//
<<elseif $incubatorUpgradeSpeed == 9>>
	It has been upgraded with advanced growth accelerants; children grow at the rate of 6 weeks to 1 year. [[Fund research into increasing growth rate even further|Incubator][$cash -= Math.trunc(75000*$upgradeMultiplierArcology), $incubatorUpgradeSpeed = 18]] //Costs ¤<<print Math.trunc(75000*$upgradeMultiplierArcology)>> and will increase upkeep costs//
<<elseif $incubatorUpgradeSpeed == 6>>
	It has been upgraded with growth accelerants; children grow at the rate of 9 weeks to 1 year. [[Further upgrade the incubators with specialized stem cells to speed growth|Incubator][$cash -= Math.trunc(30000*$upgradeMultiplierArcology), $incubatorUpgradeSpeed = 9]] //Costs ¤<<print Math.trunc(30000*$upgradeMultiplierArcology)>> and will increase upkeep costs//
<<elseif $incubatorUpgradeSpeed == 5>>
	The incubation tanks are basic; children grow at the rate of 12 weeks to 1 year. [[Upgrade the incubators with growth accelerating drugs|Incubator][$cash -= Math.trunc(30000*$upgradeMultiplierArcology), $incubatorUpgradeSpeed = 6]] //Costs ¤<<print Math.trunc(30000*$upgradeMultiplierArcology)>> and will increase upkeep costs//
<</if>>

<<if $incubatorUpgradeWeight == 1>>
	Advanced caloric monitoring systems have been installed in the tanks to monitor and maintain a developing child's weight.
<<else>>
	There are no systems in place to control a growing child's weight; they will likely come out emaciated from rapidly growing. [[Upgrade the growth tanks with weight monitoring systems|Incubator][$cash -= Math.trunc(20000*$upgradeMultiplierArcology), $incubatorUpgradeWeight = 1]] //Costs ¤<<print Math.trunc(20000*$upgradeMultiplierArcology)>> and will increase upkeep costs//
<</if>>

<<if $incubatorUpgradeMuscles == 1>>
	Advanced monitoring and steroid injection systems have been installed in the tanks to monitor and maintain a developing child's musculature.
<<else>>
	There are no systems in place to control a growing child's musculature; they will likely come out frail and weak from rapidly growing. [[Upgrade the growth tanks with muscle monitoring systems|Incubator][$cash -= Math.trunc(20000*$upgradeMultiplierArcology), $incubatorUpgradeMuscles = 1]] //Costs ¤<<print Math.trunc(20000*$upgradeMultiplierArcology)>> and will increase upkeep costs//
<</if>>

<<if $incubatorUpgradeReproduction == 1>>
	Advanced monitoring and hormone injection systems have been installed in the tanks to influence a developing child's reproductive organs.
<<else>>
	There are no systems in place to control a growing child's reproductive capability. [[Upgrade the growth tanks with hormone monitoring systems|Incubator][$cash -= Math.trunc(50000*$upgradeMultiplierArcology), $incubatorUpgradeReproduction = 1]] //Costs ¤<<print Math.trunc(50000*$upgradeMultiplierArcology)>> and will increase upkeep costs//
<</if>>

<<if $incubatorUpgradeGrowthStims == 1>>
	Advanced monitoring and stimulant injection systems have been installed in the tanks to monitor and maintain a developing child's height.
<<elseif $growthStim == 1>>
	There are no systems in place to control a growing child's height. [[Upgrade the growth tanks with stimulants injection systems|Incubator][$cash -= Math.trunc(20000*$upgradeMultiplierArcology), $incubatorUpgradeGrowthStims = 1]] //Costs ¤<<print Math.trunc(20000*$upgradeMultiplierArcology)>> and will increase upkeep costs//
<<else>>
	There are no systems in place to control a growing child's height and you lack the capability to fabricate growth stimulants.
<</if>>

<<if $incubatorSlaves > 0>>
<<for $i = 0; $i < $incubatorSlaves; $i++>>
		<<if $tanks[$i].growTime <= 0>>
			<<set $readySlaves = 1>>

@@.pink;$tanks[$i].slaveName@@ is ready to be released from her tank.
		<<else>>

@@.pink;<<print $tanks[$i].slaveName>>'s@@ growth is currently being accelerated. She will be ready for release in about <<print Math.round($tanks[$i].growTime/$incubatorUpgradeSpeed)>> weeks.
		<</if>>
		<<if $incubatorUpgradeWeight == 1>>

			<<if $incubatorWeightSetting == 1>>
				Her weight is not being properly managed, saving costs but likely causing excessive weight gain.
			<<elseif $incubatorWeightSetting == 2>>
				Her weight is being carefully managed; she will be released at a healthy weight.
			<<elseif $incubatorWeightSetting == 0>>
				Weight management systems are offline; she will likely be malnourished.
			<</if>>
		<</if>>
		<<if $incubatorUpgradeMuscles == 1>>

			<<if $incubatorMusclesSetting == 2>>
				Her strength levels are purposefully set higher than recommended; excessive muscle gain likely.
			<<elseif $incubatorMusclesSetting == 1>>
				Her musculature is being carefully managed; she will be released with near normal strength.
			<<elseif $incubatorMusclesSetting == 0>>
				Strength management systems are offline; she will likely be released extremely weak.
			<</if>>
		<</if>>
		<<if $incubatorUpgradeGrowthStims == 1>>

			<<if $incubatorGrowthStimsSetting == 2>>
				She is being injected with higher than recommended doses of stimulants; exceeding expected final height is likely.
			<<elseif $incubatorGrowthStimsSetting == 1>>
				She is injected with the recommended dosage of stimulants; she will grow to her full expected height.
			<<elseif $incubatorGrowthStimsSetting == 0>>
				Growth stimulant injection systems are offline; she will develop normally.
			<</if>>
		<</if>>
		<<if $incubatorUpgradeReproduction == 1>>

			<<if $incubatorReproductionSetting == 2>>
				Her hormone levels are purposefully set higher than recommended; over-active reproductive systems likely.
			<<elseif $incubatorReproductionSetting == 1>>
				Her hormone levels are being carefully managed; she will be released with fully functional reproductive organs.
			<<elseif $incubatorReproductionSetting == 0>>
				Reproduction management systems are offline; she will undergo normal puberty.
			<</if>>
		<</if>>
<</for>>
<</if>>

<<if $incubatorUpgradeWeight == 1>>
	<<if $incubatorWeightSetting == 1>>
		Weight is not being properly managed, saving costs but likely causing excessive weight gain. [[Monitor|Incubator][$incubatorWeightSetting = 2]] | [[Disable|Incubator][$incubatorWeightSetting = 0]]
	<<elseif $incubatorWeightSetting == 2>>
		Weight is being carefully managed; children will be released at a healthy weight. [[Estimate only|Incubator][$incubatorWeightSetting = 1]] | [[Disable|Incubator][$incubatorWeightSetting = 0]]
	<<elseif $incubatorWeightSetting == 0>>
		Weight management systems are offline; children will likely be malnourished. [[Activate|Incubator][$incubatorWeightSetting = 2]]
	<</if>>
<</if>>

<<if $incubatorUpgradeMuscles == 1>>
	<<if $incubatorMusclesSetting == 2>>
		Strength levels are purposefully set higher than recommended; excessive muscle gain likely. [[Limit|Incubator][$incubatorMusclesSetting = 1]] | [[Disable|Incubator][$incubatorMusclesSetting = 0]]
	<<elseif $incubatorMusclesSetting == 1>>
		Musculature is being carefully managed; children will be released with near normal strength. [[Overload|Incubator][$incubatorMusclesSetting = 2]] | [[Disable|Incubator][$incubatorMusclesSetting = 0]]
	<<elseif $incubatorMusclesSetting == 0>>
		Strength management systems are offline; children will likely be released extremely weak. [[Activate|Incubator][$incubatorMusclesSetting = 1]]
	<</if>>
<</if>>

<<if $incubatorUpgradeReproduction == 1>>
	<<if $incubatorReproductionSetting == 2>>
		Hormone levels are purposefully set higher than recommended; over-active reproductive systems likely. [[Limit|Incubator][$incubatorReproductionSetting = 1]] | [[Disable|Incubator][$incubatorReproductionSetting = 0]]
	<<elseif $incubatorReproductionSetting == 1>>
		Hormone levels are being carefully managed; children will be released with fully functional reproductive organs. [[Overload|Incubator][$incubatorReproductionSetting = 2]] | [[Disable|Incubator][$incubatorReproductionSetting = 0]]
	<<elseif $incubatorReproductionSetting == 0>>
		Reproduction management systems are offline; children will undergo normal puberty. [[Activate|Incubator][$incubatorReproductionSetting = 1]]
	<</if>>
<</if>>

<<if $incubatorUpgradeGrowthStims == 1>>
	<<if $incubatorGrowthStimsSetting == 2>>
		She is injected with higher than recommended doses of stimulants; exceeding expected final height is likely. [[Limit|Incubator][$incubatorGrowthStimsSetting = 1]] | [[Disable|Incubator][$incubatorGrowthStimsSetting = 0]]
	<<elseif $incubatorGrowthStimsSetting == 1>>
		She is injected with the recommended dosage of stimulants; she will grow to her full expected height. [[Overload|Incubator][$incubatorGrowthStimsSetting = 2]] | [[Disable|Incubator][$incubatorGrowthStimsSetting = 0]]
	<<elseif $incubatorGrowthStimsSetting == 0>>
		Growth stimulant injection systems are offline; she will develop normally. [[Activate|Incubator][$incubatorGrowthStimsSetting = 1]]
	<</if>>
<</if>>

<<if $readySlaves == 1>>
	<<for $i = 0; $i < $incubatorSlaves; $i++>>
		<<if $tanks[$i].growTime <= 0>>
			<<set $readySlave = $tanks.pluck([$i], [$i])>>
			<<break>>
		<</if>>
	<</for>>
	<<goto "Incubator Retrieval Workaround">>
<</if>>

Rename $incubatorName: <<textbox "$incubatorName" $incubatorName "Incubator">> //Use a noun or similar short phrase//


code:
:: Incubator Report [nobr]

<<set $incubatorSlaves = 0>>

<<for _inc = 0; _inc < $tanks.length; _inc++>>
	<<set $tanks[_inc].birthWeek += 1>>
	<<if $tanks[_inc].birthWeek >= 52>>
		<<set $tanks[_inc].birthWeek = 0>>
		<<if $seeAge == 1>>
			<<set $tanks[_inc].actualAge++, $tanks[_inc].ovaryAge++>>
		<</if>>
	<</if>>
	<<set $incubatorSlaves += 1>>
	<<if $tanks[_inc].growTime > 0>>
		<<set $tanks[_inc].growTime -= $incubatorUpgradeSpeed>>

@@.pink;<<print $tanks[_inc].slaveName>>'s@@ growth is currently being accelerated. She <<if Math.round($tanks[_inc].growTime/$incubatorUpgradeSpeed) <= 0>>is @@.lime;ready for release.@@ She will be ejected from her tank upon your approach<<else>>will be ready for release in about <<print Math.round($tanks[_inc].growTime/$incubatorUpgradeSpeed)>> weeks<</if>>.
	<<else>>
		@@.pink;$tanks[_inc].slaveName@@ is @@.lime;ready for release.@@ She will be ejected from her tank upon your approach.
	<</if>>

	<<if $incubatorUpgradeWeight == 1>>

		<<if $incubatorWeightSetting == 1>>
			<<if $tanks[_inc].weight < 200>>
				<<if $incubatorUpgradeSpeed == 52>>
					<<set $tanks[_inc].weight += 70>>
				<<elseif $incubatorUpgradeSpeed == 18>>
					<<set $tanks[_inc].weight += 40>>
				<<elseif $incubatorUpgradeSpeed == 9>>
					<<set $tanks[_inc].weight += 20>>
				<<elseif $incubatorUpgradeSpeed == 6>>
					<<set $tanks[_inc].weight += 10>>
				<<elseif $incubatorUpgradeSpeed == 5>>
					<<set $tanks[_inc].weight += 5>>
				<</if>>
			<</if>>
			The weight monitoring systems are overloading her intake causing @@.red;rapid weight gain.@@
		<<elseif $incubatorWeightSetting == 2>>
			<<if $tanks[_inc].weight > 10>>
				<<if $incubatorUpgradeSpeed == 52>>
					<<set $tanks[_inc].weight -= 30>>
				<<elseif $incubatorUpgradeSpeed == 18>>
					<<set $tanks[_inc].weight -= 10>>
				<<elseif $incubatorUpgradeSpeed == 9>>
					<<set $tanks[_inc].weight -= 5>>
				<<elseif $incubatorUpgradeSpeed == 6>>
					<<set $tanks[_inc].weight -= 2>>
				<<elseif $incubatorUpgradeSpeed == 5>>
					<<set $tanks[_inc].weight -= 1>>
				<</if>>
				The weight monitoring systems detect she is overweight and @@.green;decrease her caloric intake.@@
			<<elseif $tanks[_inc].weight < -10>>
				<<if $incubatorUpgradeSpeed == 52>>
					<<set $tanks[_inc].weight += 30>>
				<<elseif $incubatorUpgradeSpeed == 18>>
					<<set $tanks[_inc].weight += 10>>
				<<elseif $incubatorUpgradeSpeed == 9>>
					<<set $tanks[_inc].weight += 5>>
				<<elseif $incubatorUpgradeSpeed == 6>>
					<<set $tanks[_inc].weight += 2>>
				<<elseif $incubatorUpgradeSpeed == 5>>
					<<set $tanks[_inc].weight += 1>>
				<</if>>
				The weight monitoring systems detect she is underweight and @@.green;increase her caloric intake.@@
			<<else>>
				She is @@.lime;currently a healthy weight;@@ efforts will be made to maintain it.
			<</if>>
		<<elseif $incubatorWeightSetting == 0>>
			<<if $tanks[_inc].weight > -100>>
				Her developing body @@.red;quickly sheds its gained weight.@@
				<<set $tanks[_inc].weight -= 40>>
			<</if>>
		<</if>>
	<<else>>
		<<if $tanks[_inc].weight > -100>>
			Her developing body @@.red;quickly sheds its gained weight.@@
			<<set $tanks[_inc].weight -= 40>>
		<</if>>
	<</if>>

	<<if $incubatorUpgradeMuscles == 1>>

		<<if $incubatorMusclesSetting == 2>>
			<<if $tanks[_inc].muscles < 100>>
				<<if $incubatorUpgradeSpeed == 52>>
					<<set $tanks[_inc].muscles += 70>>
				<<elseif $incubatorUpgradeSpeed == 18>>
					<<set $tanks[_inc].muscles += 40>>
				<<elseif $incubatorUpgradeSpeed == 9>>
					<<set $tanks[_inc].muscles += 20>>
				<<elseif $incubatorUpgradeSpeed == 6>>
					<<set $tanks[_inc].muscles += 10>>
				<<elseif $incubatorUpgradeSpeed == 5>>
					<<set $tanks[_inc].muscles += 5>>
				<</if>>
			<</if>>
			The strength monitoring systems are overloading her with steroids causing @@.green;rapid muscle development.@@
		<<elseif $incubatorMusclesSetting == 1>>
			<<if $tanks[_inc].muscles > 10>>
				<<if $incubatorUpgradeSpeed == 52>>
					<<set $tanks[_inc].muscles -= 30>>
				<<elseif $incubatorUpgradeSpeed == 18>>
					<<set $tanks[_inc].muscles -= 10>>
				<<elseif $incubatorUpgradeSpeed == 9>>
					<<set $tanks[_inc].muscles -= 5>>
				<<elseif $incubatorUpgradeSpeed == 6>>
					<<set $tanks[_inc].muscles -= 2>>
				<<elseif $incubatorUpgradeSpeed == 5>>
					<<set $tanks[_inc].muscles-->>
				<</if>>
				The strength monitoring systems detect she is overly muscular and @@.green;decrease her steroid dosage.@@
			<<elseif $tanks[_inc].muscles < -10>>
				<<if $incubatorUpgradeSpeed == 52>>
					<<set $tanks[_inc].muscles += 30>>
				<<elseif $incubatorUpgradeSpeed == 18>>
					<<set $tanks[_inc].muscles += 10>>
				<<elseif $incubatorUpgradeSpeed == 9>>
					<<set $tanks[_inc].muscles += 5>>
				<<elseif $incubatorUpgradeSpeed == 6>>
					<<set $tanks[_inc].muscles += 2>>
				<<elseif $incubatorUpgradeSpeed == 5>>
					<<set $tanks[_inc].muscles++>>
				<</if>>
				The strength monitoring systems detect she is weak and @@.green;increase her steroid dosage.@@
			<<else>>
				She has @@.lime;a healthy musculature;@@ efforts will be made to maintain it.
			<</if>>
		<<elseif $incubatorMusclesSetting == 0>>
			<<if $tanks[_inc].muscles > -100>>
				Her developing body @@.red;quickly loses its gained muscle.@@
				<<set $tanks[_inc].muscles -= 40>>
			<</if>>
		<</if>>
	<<else>>
		<<if $tanks[_inc].muscles > -100>>
			Her developing body @@.red;quickly loses its gained muscle.@@
			<<set $tanks[_inc].muscles -= 40>>
		<</if>>
	<</if>>

	<<if $incubatorUpgradeGrowthStims == 1 && $incubatorGrowthStimsSetting != 0>>

		<<set _heightLimit =  Math.clamp((Height.mean($tanks[_inc].height) * 1.25),0,274)>>
		<<set _heightLimitAge = Height.forAge($tanks[_inc].height, $tanks[_inc])>>
		<<if $tanks[_inc].height >= _heightLimit>>
			The monitoring system detects her body is not able to support further increases in height, so it carefully regulates stimulant injections to @@.yellow;maintain her current stature.@@
			<<set $tanks[_inc].height = _heightLimit>>
		<<elseif $incubatorGrowthStimsSetting == 2>>
			The monitoring system floods her body with growth stimulants, causing @@.green;a sharp increase in growth rate.@@
			<<if $incubatorWeightSetting >= 1 && $incubatorMusclesSetting <= 1 && $incubatorReproductionSetting <= 1>>
				<<if $incubatorUpgradeSpeed == 52>>
					<<set $tanks[_inc].height += random(3,6)>>
				<<elseif $incubatorUpgradeSpeed == 18>>
					<<set $tanks[_inc].height += random(2,5)>>
				<<elseif $incubatorUpgradeSpeed == 9>>
					<<set $tanks[_inc].height += random(1,4)>>
				<<elseif $incubatorUpgradeSpeed == 6>>
					<<set $tanks[_inc].height += random(1,3)>>
				<<elseif $incubatorUpgradeSpeed == 5>>
					<<set $tanks[_inc].height += random(1,2)>>
				<</if>>
			<<else>>
				<<if $incubatorUpgradeSpeed == 52>>
					<<set $tanks[_inc].height += random(2,5)>>
				<<elseif $incubatorUpgradeSpeed == 18>>
					<<set $tanks[_inc].height += random(1,4)>>
				<<elseif $incubatorUpgradeSpeed == 9>>
					<<set $tanks[_inc].height += random(1,3)>>
				<<elseif $incubatorUpgradeSpeed == 6>>
					<<set $tanks[_inc].height += random(1,2)>>
				<<elseif $incubatorUpgradeSpeed == 5>>
					<<set $tanks[_inc].height += random(0,1)>>
				<</if>>
			<</if>>
		<<elseif $incubatorGrowthStimsSetting == 1>>
			<<if $tanks[_inc].height > _heightLimitAge>>
				The monitoring system detects she is near the expected height, so it carefully regulates stimulants injections to @@.yellow;maintain her current stature.@@
				<<if random(1,10) == 10>>
					<<if $incubatorUpgradeSpeed == 52>>
						<<set $tanks[_inc].height += random(1,4)>>
					<<elseif $incubatorUpgradeSpeed == 18>>
						<<set $tanks[_inc].height += random(1,3)>>
					<<elseif $incubatorUpgradeSpeed == 9>>
						<<set $tanks[_inc].height += random(1,2)>>
					<<elseif $incubatorUpgradeSpeed == 6>>
						<<set $tanks[_inc].height += random(0,1)>>
					<<elseif $incubatorUpgradeSpeed == 5>>
						<<set $tanks[_inc].height += random(0,1)>>
					<</if>>
				<</if>>
			<<else>>
				The monitoring system detects her body is capable of developing more rapidly and @@.green;increases her growth stimulant dosage.@@
				<<if $incubatorUpgradeSpeed == 52>>
					<<set $tanks[_inc].height += random(1,4)>>
				<<elseif $incubatorUpgradeSpeed == 18>>
					<<set $tanks[_inc].height += random(1,3)>>
				<<elseif $incubatorUpgradeSpeed == 9>>
					<<set $tanks[_inc].height += random(1,2)>>
				<<elseif $incubatorUpgradeSpeed == 6>>
					<<set $tanks[_inc].height += random(0,1)>>
				<<elseif $incubatorUpgradeSpeed == 5>>
					<<set $tanks[_inc].height += random(0,1)>>
				<</if>>
			<</if>>
		<</if>>
		<<set $tanks[_inc].height = Math.clamp($tanks[_inc].height, 0, _heightLimit)>>
	<<else>>

		With the growth stimulant injections offline, her body is left to develop naturally.
	<</if>>

	<<if $incubatorUpgradeReproduction == 1>>

		<<if $incubatorReproductionSetting == 2>>
			Her developing body is being flooded with hormones.
			<<if $incubatorWeightSetting == 1>>
				Combined with the abundant food provided to her, her body grows rapidly.
				<<if $tanks[_inc].ovaries == 1>>
					<<set $tanks[_inc].pubertyXX = 1>>
					<<if $seeHyperPreg == 1>>
						<<set $tanks[_inc].pregType = random(25,45)>>
					<<else>>
						<<set $tanks[_inc].pregType = random(3,8)>>
					<</if>>
					<<if $incubatorUpgradeSpeed == 52>>
						<<if $tanks[_inc].boobs < 8000>>
							The excess estrogen-laced growth hormones @@.green;rapidly balloon her breasts.@@
							<<set $tanks[_inc].boobs += 2000>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 50>>
							The excess estrogen-laced growth hormones @@.green;cause her hips to widen for childbirth.@@
							<<set $tanks[_inc].hips += 2>>
						<</if>>
						<<if $tanks[_inc].butt < 12 && random(1,100) > 30>>
							The excess estrogen-laced growth hormones @@.green;cause her rear to grow fatter.@@
							<<set $tanks[_inc].butt += 4>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 18>>
						<<if $tanks[_inc].boobs < 8000>>
							The excess estrogen-laced growth hormones @@.green;rapidly balloon her breasts.@@
							<<set $tanks[_inc].boobs += 500>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 50>>
							The excess estrogen-laced growth hormones @@.green;cause her hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 12 && random(1,100) > 50>>
							The excess estrogen-laced growth hormones @@.green;cause her rear to grow fatter.@@
							<<set $tanks[_inc].butt += 3>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 9>>
						<<if $tanks[_inc].boobs < 8000>>
							The excess estrogen-laced growth hormones @@.green;rapidly balloon her breasts.@@
							<<set $tanks[_inc].boobs += 200>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 60>>
							The excess estrogen-laced growth hormones @@.green;causes her hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 12 && random(1,100) > 50>>
							The excess estrogen-laced growth hormones @@.green;cause her rear grow fatter.@@
							<<set $tanks[_inc].butt += 2>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 6>>
						<<if $tanks[_inc].boobs < 8000>>
							The excess estrogen-laced growth hormones @@.green;rapidly balloon her breasts.@@
							<<set $tanks[_inc].boobs += 100>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 70>>
							The excess estrogen-laced growth hormones @@.green;cause her hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 12 && random(1,100) > 60>>
							The excess estrogen-laced growth hormones @@.green;cause her rear to grow fatter.@@
							<<set $tanks[_inc].butt++>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 5>>
						<<if $tanks[_inc].boobs < 8000>>
							The excess estrogen-laced growth hormones @@.green;rapidly balloon her breasts.@@
							<<set $tanks[_inc].boobs += 100>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 80>>
							The excess estrogen-laced growth hormones @@.green;cause her hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 12 && random(1,100) > 70>>
							The excess estrogen-laced growth hormones @@.green;cause her rear to grow fatter.@@
							<<set $tanks[_inc].butt++>>
						<</if>>
					<</if>>
				<<elseif $tanks[_inc].balls > 0>>
					<<set $tanks[_inc].pubertyXY = 1>>
					<<if $incubatorUpgradeSpeed == 52>>
						<<if $tanks[_inc].balls < 40>>
							The excess testosterone-laced growth hormones @@.green;cause her balls to balloon for extra cum production.@@
							<<set $tanks[_inc].balls += 16>>
						<</if>>
						<<if $tanks[_inc].dick < 10 && random(1,100) > 20>>
							The excess testosterone-laced growth hormones @@.green;cause her penis to swell.@@
							<<set $tanks[_inc].dick += 4>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 18>>
						<<if $tanks[_inc].balls < 40 && random(1,100) > 10>>
							The excess testosterone-laced growth hormones @@.green;cause her balls to balloon for extra cum production.@@
							<<set $tanks[_inc].balls += 9>>
						<</if>>
						<<if $tanks[_inc].dick < 10 && random(1,100) > 30>>
							The excess testosterone-laced growth hormones @@.green;cause her penis to swell.@@
							<<set $tanks[_inc].dick += 3>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 9>>
						<<if $tanks[_inc].balls < 40 && random(1,100) > 20>>
							The excess testosterone-laced growth hormones @@.green;cause her balls to balloon for extra cum production.@@
							<<set $tanks[_inc].balls += 4>>
						<</if>>
						<<if $tanks[_inc].dick < 10 && random(1,100) > 50>>
							The excess testosterone-laced growth hormones @@.green;cause her penis to swell.@@
							<<set $tanks[_inc].dick += 2>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 6>>
						<<if $tanks[_inc].balls < 40 && random(1,100) > 30>>
							The excess testosterone-laced growth hormones @@.green;cause her balls to balloon for extra cum production.@@
							<<set $tanks[_inc].balls += 2>>
						<</if>>
						<<if $tanks[_inc].dick < 10 && random(1,100) > 70>>
							The excess testosterone-laced growth hormones @@.green;cause her penis to swell.@@
							<<set $tanks[_inc].dick++>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 5>>
						<<if $tanks[_inc].balls < 40 && random(1,100) > 30>>
							The excess testosterone-laced growth hormones @@.green;cause her balls to balloon for extra cum production.@@
							<<set $tanks[_inc].balls++>>
						<</if>>
						<<if $tanks[_inc].dick < 10 && random(1,100) > 80>>
							The excess testosterone-laced growth hormones @@.green;cause her penis to swell.@@
							<<set $tanks[_inc].dick++>>
						<</if>>
					<</if>>
				<</if>>
			<<elseif $incubatorWeightSetting == 1>>
				Combined with the healthy food provided to her, her body grows readily.
				<<if $tanks[_inc].ovaries == 1>>
					<<set $tanks[_inc].pubertyXX = 1>>
					<<if $seeHyperPreg == 1>>
						<<set $tanks[_inc].pregType = random(15,25)>>
					<<else>>
						<<set $tanks[_inc].pregType = random(2,6)>>
					<</if>>
					<<if $incubatorUpgradeSpeed == 52>>
						<<if $tanks[_inc].boobs < 4000>>
							The excess estrogen-laced growth hormones @@.green;rapidly balloon her breasts.@@
							<<set $tanks[_inc].boobs += 1000>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 70>>
							The excess estrogen-laced growth hormones @@.green;cause her hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 8 && random(1,100) > 50>>
							The excess estrogen-laced growth hormones @@.green;cause her rear to grow fatter.@@
							<<set $tanks[_inc].butt += 3>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 18>>
						<<if $tanks[_inc].boobs < 4000>>
							The excess estrogen-laced growth hormones @@.green;rapidly balloon her breasts.@@
							<<set $tanks[_inc].boobs += 500>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 80>>
							The excess estrogen-laced growth hormones @@.green;cause her hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 8 && random(1,100) > 50>>
							The excess estrogen-laced growth hormones @@.green;cause her rear to grow fatter.@@
							<<set $tanks[_inc].butt++>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 9>>
						<<if $tanks[_inc].boobs < 4000>>
							The excess estrogen-laced growth hormones @@.green;rapidly balloon her breasts.@@
							<<set $tanks[_inc].boobs += 200>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 90>>
							The excess estrogen-laced growth hormones @@.green;cause her hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 8 && random(1,100) > 60>>
							The excess estrogen-laced growth hormones @@.green;cause her rear to grow fatter.@@
							<<set $tanks[_inc].butt++>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 6>>
						<<if $tanks[_inc].boobs < 4000>>
							The excess estrogen-laced growth hormones @@.green;rapidly balloon her breasts.@@
							<<set $tanks[_inc].boobs += 100>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 95>>
							The excess estrogen-laced growth hormones @@.green;cause her hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 8 && random(1,100) > 70>>
							The excess estrogen-laced growth hormones @@.green;cause her rear to grow fatter.@@
							<<set $tanks[_inc].butt++>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 5>>
						<<if $tanks[_inc].boobs < 4000>>
							The excess estrogen-laced growth hormones @@.green;rapidly balloon her breasts.@@
							<<set $tanks[_inc].boobs += 100>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 95>>
							The excess estrogen-laced growth hormones @@.green;cause her hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 8 && random(1,100) > 80>>
							The excess estrogen-laced growth hormones @@.green;cause her rear to grow fatter.@@
							<<set $tanks[_inc].butt++>>
						<</if>>
					<</if>>
				<<elseif $tanks[_inc].balls > 0>>
					<<set $tanks[_inc].pubertyXY = 1>>
					<<if $incubatorUpgradeSpeed == 52>>
						<<if $tanks[_inc].balls < 10>>
							The excess testosterone-laced growth hormones @@.green;cause her balls to balloon for extra cum production.@@
							<<set $tanks[_inc].balls += 3>>
						<</if>>
						<<if $tanks[_inc].dick < 7 && random(1,100) > 20>>
							The excess testosterone-laced growth hormones @@.green;cause her penis to swell.@@
							<<set $tanks[_inc].dick += 2>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 18>>
						<<if $tanks[_inc].balls < 10 && random(1,100) > 10>>
							The excess testosterone-laced growth hormones @@.green;cause her balls to balloon for extra cum production.@@
							<<set $tanks[_inc].balls += 2>>
						<</if>>
						<<if $tanks[_inc].dick < 7 && random(1,100) > 30>>
							The excess testosterone-laced growth hormones @@.green;cause her penis to swell.@@
							<<set $tanks[_inc].dick++>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 9>>
						<<if $tanks[_inc].balls < 10 && random(1,100) > 20>>
							The excess testosterone-laced growth hormones @@.green;cause her balls to balloon for extra cum production.@@
							<<set $tanks[_inc].balls++>>
						<</if>>
						<<if $tanks[_inc].dick < 7 && random(1,100) > 50>>
							The excess testosterone-laced growth hormones @@.green;cause her penis to swell.@@
							<<set $tanks[_inc].dick++>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 6>>
						<<if $tanks[_inc].balls < 10 && random(1,100) > 30>>
							The excess testosterone-laced growth hormones @@.green;cause her balls to balloon for extra cum production.@@
							<<set $tanks[_inc].balls++>>
						<</if>>
						<<if $tanks[_inc].dick < 7 && random(1,100) > 70>>
							The excess testosterone-laced growth hormones @@.green;cause her penis to swell.@@
							<<set $tanks[_inc].dick++>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 5>>
						<<if $tanks[_inc].balls < 10 && random(1,100) > 30>>
							The excess testosterone-laced growth hormones @@.green;cause her balls to balloon for extra cum production.@@
							<<set $tanks[_inc].balls++>>
						<</if>>
						<<if $tanks[_inc].dick < 7 && random(1,100) > 80>>
							The excess testosterone-laced growth hormones @@.green;cause her penis to swell.@@
							<<set $tanks[_inc].dick++>>
						<</if>>
					<</if>>
				<</if>>
			<<else>>
				Since her body has little to work with, her growth is fairly minor.
				<<if $tanks[_inc].ovaries == 1>>
					<<set $tanks[_inc].pubertyXX = 1>>
					<<if $seeHyperPreg == 1>>
						<<set $tanks[_inc].pregType = random(10,15)>>
					<<else>>
						<<set $tanks[_inc].pregType = random(2,4)>>
					<</if>>
					<<if $incubatorUpgradeSpeed == 52>>
						<<if $tanks[_inc].boobs < 2000>>
							The excess estrogen-laced growth hormones @@.green;rapidly balloon her breasts.@@
							<<set $tanks[_inc].boobs += 700>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 90>>
							The excess estrogen-laced growth hormones @@.green;cause her hips to widen for childbirth.@@
							<<set $tanks[_inc].hips += 2>>
						<</if>>
						<<if $tanks[_inc].butt < 6 && random(1,100) > 70>>
							The excess estrogen-laced growth hormones @@.green;cause her rear to grow fatter.@@
							<<set $tanks[_inc].butt += 2>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 18>>
						<<if $tanks[_inc].boobs < 2000>>
							The excess estrogen-laced growth hormones @@.green;rapidly balloon her breasts.@@
							<<set $tanks[_inc].boobs += 200>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 80>>
							The excess estrogen-laced growth hormones @@.green;cause her hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 6 && random(1,100) > 70>>
							The excess estrogen-laced growth hormones @@.green;cause her rear to grow fatter.@@
							<<set $tanks[_inc].butt++>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 9>>
						<<if $tanks[_inc].boobs < 2000>>
							The excess estrogen-laced growth hormones @@.green;rapidly balloon her breasts.@@
							<<set $tanks[_inc].boobs += 50>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 80>>
							The excess estrogen-laced growth hormones @@.green;cause her hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 6 && random(1,100) > 90>>
							The excess estrogen-laced growth hormones @@.green;cause her rear to grow fatter.@@
							<<set $tanks[_inc].butt++>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 6>>
						<<if $tanks[_inc].boobs < 2000>>
							The excess estrogen-laced growth hormones @@.green;rapidly grow her breasts.@@
							<<set $tanks[_inc].boobs += 20>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 90>>
							The excess estrogen-laced growth hormones @@.green;cause her hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 6 && random(1,100) > 90>>
							The excess estrogen-laced growth hormones @@.green;cause her rear to grow fatter.@@
							<<set $tanks[_inc].butt++>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 5>>
						<<if $tanks[_inc].boobs < 2000>>
							The excess estrogen-laced growth hormones @@.green;rapidly grow her breasts.@@
							<<set $tanks[_inc].boobs += 10>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 95>>
							The excess estrogen-laced growth hormones @@.green;cause her hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 6 && random(1,100) > 90>>
							The excess estrogen-laced growth hormones @@.green;cause her rear to grow fatter.@@
							<<set $tanks[_inc].butt++>>
						<</if>>
					<</if>>
				<<elseif $tanks[_inc].balls > 0>>
					<<set $tanks[_inc].pubertyXY = 1>>
					<<if $incubatorUpgradeSpeed == 52>>
						<<if $tanks[_inc].balls < 6>>
							The excess testosterone-laced growth hormones @@.green;cause her balls to grow for extra cum production.@@
							<<set $tanks[_inc].balls += 2>>
						<</if>>
						<<if $tanks[_inc].dick < 4 && random(1,100) > 60>>
							The excess testosterone-laced growth hormones @@.green;cause her penis to swell.@@
							<<set $tanks[_inc].dick++>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 18>>
						<<if $tanks[_inc].balls < 6 && random(1,100) > 50>>
							The excess testosterone-laced growth hormones @@.green;cause her balls to grow for extra cum production.@@
							<<set $tanks[_inc].balls++>>
						<</if>>
						<<if $tanks[_inc].dick < 4 && random(1,100) > 60>>
							The excess testosterone-laced growth hormones @@.green;cause her penis to swell.@@
							<<set $tanks[_inc].dick++>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 9>>
						<<if $tanks[_inc].balls < 6 && random(1,100) > 60>>
							The excess testosterone-laced growth hormones @@.green;cause her balls to balloon for extra cum production.@@
							<<set $tanks[_inc].balls++>>
						<</if>>
						<<if $tanks[_inc].dick < 4 && random(1,100) > 70>>
							The excess testosterone-laced growth hormones @@.green;cause her penis to swell.@@
							<<set $tanks[_inc].dick += 2>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 6>>
						<<if $tanks[_inc].balls < 6 && random(1,100) > 70>>
							The excess testosterone-laced growth hormones @@.green;cause her balls to grow for extra cum production.@@
							<<set $tanks[_inc].balls++>>
						<</if>>
						<<if $tanks[_inc].dick < 4 && random(1,100) > 80>>
							The excess testosterone-laced growth hormones @@.green;cause her penis to swell.@@
							<<set $tanks[_inc].dick++>>
						<</if>>
					<<elseif $incubatorUpgradeSpeed == 5>>
						<<if $tanks[_inc].balls < 6 && random(1,100) > 80>>
							The excess testosterone-laced growth hormones @@.green;cause her balls to grow for extra cum production.@@
							<<set $tanks[_inc].balls++>>
						<</if>>
						<<if $tanks[_inc].dick < 4 && random(1,100) > 90>>
							The excess testosterone-laced growth hormones @@.green;cause her penis to swell.@@
							<<set $tanks[_inc].dick++>>
						<</if>>
					<</if>>
				<</if>>
			<</if>>
		<<elseif $incubatorReproductionSetting == 1>>
			Her hormone levels are being carefully managed, @@.green;encouraging early puberty.@@
			<<if $tanks[_inc].ovaries == 1>>
				<<set $tanks[_inc].pubertyXX = 1>>
				<<if $tanks[_inc].boobs < 400 && random(1,100) > 60>>
					The added estrogen @@.green;causes her breasts to swell.@@
					<<set $tanks[_inc].boobs += 50>>
				<</if>>
				<<if $tanks[_inc].hips < 2 && random(1,100) > 90>>
					The added estrogen @@.green;causes her hips to widen.@@
					<<set $tanks[_inc].hips++>>
				<</if>>
				<<if $tanks[_inc].butt < 5 && random(1,100) > 80>>
					The added estrogen @@.green;causes her butt to grow.@@
					<<set $tanks[_inc].butt++>>
				<</if>>
			<<elseif $tanks[_inc].balls > 0>>
				<<set $tanks[_inc].pubertyXY = 1>>
				<<if $tanks[_inc].balls < 3 && random(1,100) > 80>>
					The added testosterone @@.green;causes her balls to swell.@@
					<<set $tanks[_inc].balls++>>
				<</if>>
				<<if $tanks[_inc].dick < 3 && random(1,100) > 60>>
					The added testosterone @@.green;causes her penis to grow.@@
					<<set $tanks[_inc].dick++>>
				<</if>>
			<</if>>
		<<else>>
			<<if $tanks[_inc].balls > 0>>
				<<if $tanks[_inc].balls > 1>>
					<<set $tanks[_inc].balls -= 5>>
				<</if>>
				<<if $tanks[_inc].dick > 1>>
					<<set $tanks[_inc].dick -= 5>>
				<</if>>
				<<if $tanks[_inc].balls <= 0>>
					<<set $tanks[_inc].balls = 1>>
				<</if>>
				<<if $tanks[_inc].dick <= 0>>
					<<set $tanks[_inc].dick = 1>>
				<</if>>
			<</if>>
			<<if $tanks[_inc].boobs > 0>>
				<<set $tanks[_inc].boobs -= 500>>
			<</if>>
			<<if $tanks[_inc].butt > 0>>
				<<set $tanks[_inc].butt -= 4>>
			<</if>>
		<</if>>
	<<else>>
		<<if $tanks[_inc].balls > 0>>
			<<if $tanks[_inc].balls > 1>>
				<<set $tanks[_inc].balls -= 5>>
			<</if>>
			<<if $tanks[_inc].dick > 1>>
				<<set $tanks[_inc].dick -= 5>>
			<</if>>
			<<if $tanks[_inc].balls <= 0>>
				<<set $tanks[_inc].balls = 1>>
			<</if>>
			<<if $tanks[_inc].dick <= 0>>
				<<set $tanks[_inc].dick = 1>>
			<</if>>
		<</if>>
		<<if $tanks[_inc].boobs > 0>>
			<<set $tanks[_inc].boobs -= 500>>
		<</if>>
		<<if $tanks[_inc].butt > 0>>
			<<set $tanks[_inc].butt -= 4>>
		<</if>>
	<</if>>

	<<set $tanks[_inc].weight = Math.clamp($tanks[_inc].weight, -100, 200)>>
	<<set $tanks[_inc].muscles = Math.clamp($tanks[_inc].muscles, -100, 100)>>
	<<set $tanks[_inc].dick = Math.clamp($tanks[_inc].dick, 0, 10)>>
	<<set $tanks[_inc].hips = Math.clamp($tanks[_inc].hips, -2, 2)>>
	<<set $tanks[_inc].balls = Math.clamp($tanks[_inc].balls, 0, 40)>>
	<<set $tanks[_inc].boobs = Math.clamp($tanks[_inc].boobs, 0, 30000)>>
	<<set $tanks[_inc].height = Math.clamp($tanks[_inc].height, 0, 274)>>

<</for>>
/*
<<if $incubatorSlaves == 0>>
$incubatorNameCaps is currently unused.
<</if>>
*/


code:
:: Incubator Retrieval Workaround [nobr]

$readySlave.slaveName has been discharged from $incubatorName and is ready for her first ever inspection.

<<set $activeSlave = $readySlave>>
<<set $saleDescription = 0, $applyLaw = 0>>
<<set $incubatorSlaves-->>
<<include "Long Slave Description">>
<<AddSlave $activeSlave>>
<<set $nextLink = "AS Dump">>
<<set $returnTo = "Main">>
<<include "New Child Intro">>


code:
:: Incubator Workaround [nobr]

<<if $tanks.length < $incubator>>
	<<set $activeSlave.growTime = Math.trunc($targetAge*52)>>
	<<set $tanks.push($activeSlave)>>
	<<set $incubatorSlaves++>>
<</if>>

<<set $activeSlave = {}>>