code:
:: FSlaveSlaveVag Consummate [nobr]

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

<<set $activeSlave.vaginalCount += 1>>
<<set $vaginalTotal += 1>>
<<set $slaverapistx.penetrativeCount++, $penetrativeTotal++>>

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

<<if $activeSlave.mother == $slaverapistx.ID || $activeSlave.father == $slaverapistx.ID || $slaverapistx.mother == $activeSlave.ID || $slaverapistx.father == $activeSlave.ID || (areSisters($activeSlave, $slaverapistx) > 0)>>
	<<set _isIncest = 1>>
<</if>>

You take a look at the slave you selected.

<<if ($slaverapistx.fetish == "dom") && ($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<<else>>massive clit<</if>> ready.
	<<if ($slaverapistx.attrXX > 65)>>
		With her love of pussy, she becomes aroused indecently fast.
	<<else>>
		Her <<if $slaverapistx.dick > 0>>_dicksize cock<<else>>massive clit<</if>> quickly swells to a throbbing erection 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 cock swells to a throbbing erection in seconds<<else>>her huge clit becomes fully engorged in seconds<</if>>.
<<elseif ($slaverapistx.fetish == "pregnancy") && ($slaverapistx.fetishStrength > 20) && ($slaverapistx.devotion >= -20) && $slaverapistx.dick > 0>>
	With the prospect of raping another slave bareback, her _dicksize cock swells to a throbbing erection in seconds.
<<elseif ($slaverapistx.attrXX > 65) && ($slaverapistx.devotion >= -20)>>
	Since $slaverapistx.slaveName likes sticking her <<if $slaverapistx.dick > 0>>_dicksize penis<<else>>massive clit<</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. She has to work to get her <<if $slaverapistx.dick > 0>>_dicksize penis<<else>>massive clit<</if>> hard despite her doubts,	visibly disturbed that you are ordering her to fuck someone for your entertainment.
<<else>>
	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 <<if $slaverapistx.dick > 0>>_dicksize penis<<else>>massive clit<</if>> quickly reaches an agonizingly full erection.
<</if>>

<<if _isIncest == 1>>
	$slaverapistx.slaveName is well aware that she is about to rape
	<<if $slaverapistx.father == $activeSlave.ID && $slaverapistx.mother == $activeSlave.ID>>
		the slave that is both her mother and her father,
	<<elseif $activeSlave.mother == $slaverapistx.ID || $activeSlave.father == $slaverapistx.ID>>
		her own daughter,
	<<elseif $slaverapistx.mother == $activeSlave.ID>>
		her own mother,
	<<elseif $slaverapistx.mother == $activeSlave.ID>>
		the slave that fathered her,
	<<elseif (areSisters($activeSlave, $slaverapistx) > 0)>>
		her <<if areTwins($activeSlave, $slaverapistx)>>twin <</if>>sister,
	<</if>>
	<<if ($slaverapistx.sexualQuirk == "perverted") || ($slaverapistx.sexualQuirk == "sinful")>>
		<<if ($slaverapistx.energy > 60)>>
			and seems quite aroused at just how <<if ($slaverapistx.sexualQuirk == "perverted")>>perverted<<else>>sinful<</if>> that is. <<if canSee($slaverapistx)>>$slaverapistx.slaveName's eyes seemed locked on $activeSlave.slaveName's inviting pussy, thoroughly aroused and waiting for your order.<</if>>
		<<else>>
			but despite her conflicted feelings her arousal is clear.
		<</if>>
		<<set _incestMood = "Top">>
	<<elseif ($slaverapistx.relationshipTarget == $activeSlave.ID) && ($slaverapistx.relationship > 2)>>
		but since she's already in a sexual relationship with her, it's only special because her <<WrittenMaster $slaverapistx>> is watching.
		<<set _incestMood = "Top">>
	<<else>>
		<<if $slaverapistx.devotion > 95>>
			but her deep acceptance of slavery means she can't help but be eager to please everyone involved with her performance.
			<<set _incestMood = "Top">>
		<<elseif $slaverapistx.devotion > 60>>
			but her experience as a slave means she can mostly ignore it and focus on sex.
		<<else>>
		and is understandably disturbed.
		<</if>>
	<</if>>
<</if>>

Next, you see to $activeSlave.slaveName.

<<if _isIncest == 1>>
	$activeSlave.slaveName is fully naked and <<if canSee($activeSlave)>>looking up at<<else>>waiting in front of<</if>>
	<<if $activeSlave.father == $slaverapistx.ID && $activeSlave.mother == $slaverapistx.ID>>
		the slave that is both her mother and her father,
	<<elseif $slaverapistx.mother == $activeSlave.ID>>
		her own daughter,
	<<elseif $activeSlave.mother == $slaverapistx.ID>>
		her own mother,
	<<elseif $activeSlave.father == $slaverapistx.ID>>
		the slave that fathered her,
	<<elseif (areSisters($activeSlave, $slaverapistx) > 0)>>
		her <<if areTwins($activeSlave, $slaverapistx)>>twin <</if>>sister,
	<</if>>
	<<if ($activeSlave.sexualQuirk == "perverted") || ($activeSlave.sexualQuirk == "sinful")>>
		<<if ($activeSlave.energy > 60)>>
			whose <<if $slaverapistx.dick > 0>>_dicksize penis<<else>>massive clit<</if>> is standing firm above her. She seems indecently aroused, flushed and shivering in anticipation.
		<<else>>
			but despite her conflicted feelings her growing arousal is clear as she <<if canSee($activeSlave)>>stares at<<else>>imagines<</if>> the <<if $slaverapistx.dick > 0>>_dicksize penis<<else>>massive clit<</if>> that's soon going inside her.
		<</if>>
		<<if _incestMood == "Top">>
			<<set _incestMood = "Both">>
		<<else>>
			<<set _incestMood = "Bottom">>
		<</if>>
	<<elseif ($activeSlave.relationshipTarget == $slaverapistx.ID) && ($activeSlave.relationship > 2)>>
		and seems calm and inviting to her
		<<if slave.relationship == 3>>
			sex friend
		<<elseif slave.relationship == 4>>
			lover
		<<else>>
			slave wife
		<</if>>
		's <<if $slaverapistx.dick > 0>>_dicksize penis<<else>>massive clit<</if>> that will be penetrating her.
		<<if _incestMood == "Top">>
			<<set _incestMood = "Both">>
		<<else>>
			<<set _incestMood = "Bottom">>
		<</if>>
	<<else>>
		<<if $activeSlave.devotion > 95>>
			and her deep acceptance of her status as a slave has her staring <<if canSee($activeSlave)>>at<<else>>blindly towards<</if>> the <<if $slaverapistx.dick > 0>>_dicksize penis<<else>>massive clit<</if>> above her with a lusty smile.
			<<if _incestMood == "Top">>
				<<set _incestMood = "Both">>
			<<else>>
				<<set _incestMood = "Bottom">>
			<</if>>
		<<elseif $activeSlave.devotion > 60>>
			and if she focuses, she can forget the <<if $slaverapistx.dick > 0>>_dicksize penis<<else>>massive clit<</if>> standing erect in front of her belongs to someone related to her.
		<<else>>
		and is understandably disturbed, <<if canSee($activeSlave)>>eyes glued to the <<if $slaverapistx.dick > 0>>_dicksize penis<<else>>massive clit<</if>> throbbing before her.<<else>>listening to the heavy breathing of her relative whose <<if $slaverapistx.dick > 0>>_dicksize penis<<else>>massive clit<</if>> will be entering her soon.<</if>>
		<</if>>
	<</if>>
<</if>>

<<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@@, and @@.hotpink;reminds her@@ of her status as a submissive slave.
	<<set $activeSlave.vagina = 1>>
	<<set $activeSlave.devotion += 4>>
	<<set $activeSlave.fetishStrength += 1>>
<<elseif ($activeSlave.fetish == "submissive") && ($activeSlave.fetishStrength > 60) && ($activeSlave.fetishKnown == 1)>>
	She smiles as she lays back and presents her pussy to $slaverapistx.slaveName. She openly enjoys submitting herself for others to make use of.
<<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>>massive clit<</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 sexual encounter would be like. Nevertheless, she is @@.hotpink;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 resent what you made them do for you and fear you'll make them do it again.

<<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 resents what you made her do and fears you'll force her to do it again. Though $activeSlave.slaveName accepts the situation, she looks into $slaverapistx.slaveName's eyes with obvious apology.

<<elseif ($slaverapistx.fetish == "dom") && ($slaverapistx.fetishStrength > 20) && ($slaverapistx.devotion > 20)>>
	$activeSlave.slaveName is tied and placed on the bed with her pussy defenseless and available, and then you 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.
	<<if ($activeSlave.fetish == "dom")>>
		<<if ($activeSlave.devotion < -20)>>
			By the end of the day $activeSlave.slaveName's abused cunt is <<if $slaverapistx.dick > 0>>dripping with cum<<else>>overflowing with juices<</if>>, leaving her horrified and disgusted at her lack of control.
		<<else>>
			By the end of the day $activeSlave.slaveName's abused cunt is <<if $slaverapistx.dick > 0>>dripping with cum<<else>>overflowing with juices<</if>>, leaving her annoyed at her lack of control, though she still somewhat enjoyed herself.
		<</if>>
	<<elseif ($activeSlave.fetish == "submissive")>>
		<<if ($activeSlave.devotion < -20)>>
			By the end of the day $activeSlave.slaveName's abused cunt is <<if $slaverapistx.dick > 0>>dripping with cum<<else>>overflowing with juices<</if>>, leaving the submissive slave horrified that she found the experience sexually satisfying.
		<<else>>
			By the end of the day $activeSlave.slaveName's abused cunt is <<if $slaverapistx.dick > 0>>dripping with cum<<else>>overflowing with juices<</if>>. This sexual encounter is everything she dreamed of, leaving her utterly satisfied.
		<</if>>
	<</if>>
	$slaverapistx.slaveName is lying next to her on the bed in a state of obvious satiation and bliss.

<<elseif ($slaverapistx.energy > 95) && ($slaverapistx.devotion > 20) && ($activeSlave.devotion < -20)>>
	$activeSlave.slaveName is tied and placed on the bed with her pussy defenseless and available, and then you 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, bringing the helpless toy to one forced orgasm after another. By the end of the day $activeSlave.slaveName is lying on the bed, all worn out, her cunt <<if $slaverapistx.dick > 0>>dripping with cum<<else>>overflowing with juices<</if>> to her horror and resentment, while $slaverapistx.slaveName is sleeping next to her in a state of obvious satiation and bliss.

<<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 non-verbal 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 get down to business. 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, happy pile of slave flesh.

<</if>>

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

<<set $slaves[$slaveIndices[$slaverapistx.ID]] = $slaverapistx>>


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


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>>
<<set $ageAdjustOverride = 1>>

<<if $babyGender == 1>>
	<<include "Generate XX Slave">>
	<<if $PC.pregSource < 1>>
		<<set $activeSlave.slaveName = "Your daughter">>
		<<set $activeSlave.mother = -1>>
		<<if $PC.pregSource != -6>>
			<<set $activeSlave.father = $missingParentID>>
			<<set $missingParentID-->>
			<<set $activeSlave.nationality = "Stateless">>
		<<else>>
			<<set $activeSlave.father = -1>>
			<<set $activeSlave.nationality = $PC.nationality>>
		<</if>>
		<<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>>
		<<if $PC.pregSource != -6>>
			<<set $activeSlave.father = $missingParentID>>
			<<set $missingParentID-->>
			<<set $activeSlave.nationality = "Stateless">>
		<<else>>
			<<set $activeSlave.father = -1>>
			<<set $activeSlave.nationality = $PC.nationality>>
		<</if>>
		<<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 random(0,100) >= $seeDicks>>
		<<include "Generate XX Slave">>
	<<else>>
		<<include "Generate XY Slave">>
	<</if>>
	<<set $activeSlave.mother = $mergeMom.ID>>
	<<if $mom.pregSource > 0>>
		<<set _currentFather = getSlave($mom.pregSource)>>
		<<set $activeSlave.father = $mergeDad.ID>>
		<<set $activeSlave.slaveName = String($mom.slaveName + " and " + _currentFather.slaveName + "'s child")>>
		<<if def $mom.slaveSurname && $mom.slaveSurname != "">><<set $activeSlave.slaveSurname = $mom.slaveSurname>><<elseif def _currentFather.slaveSurname && _currentFather.slaveSurname != "">><<set $activeSlave.slaveSurname = _currentFather.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 == "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>>
	<<elseif $mergeMom.origHColor == "black">>
		<<set $activeSlave.hColor = either($mergeMom.origHColor, $mergeMom.origHColor, $mergeMom.origHColor, $mergeMom.origHColor, $mergeMom.origHColor, $mergeMom.origHColor, $mergeMom.origHColor, $mergeDad.origHColor)>>
	<<elseif $mergeDad.origHColor == "black">>
		<<set $activeSlave.hColor = either($mergeDad.origHColor, $mergeDad.origHColor, $mergeDad.origHColor, $mergeDad.origHColor, $mergeDad.origHColor, $mergeDad.origHColor, $mergeDad.origHColor, $mergeMom.origHColor)>>
	<<elseif $mergeMom.origHColor == "brown">>
		<<set $activeSlave.hColor = either($mergeMom.origHColor, $mergeMom.origHColor, $mergeMom.origHColor, $mergeDad.origHColor)>>
	<<elseif $mergeDad.origHColor == "brown">>
		<<set $activeSlave.hColor = either($mergeDad.origHColor, $mergeDad.origHColor, $mergeDad.origHColor, $mergeMom.origHColor)>>
	<<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(90,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>>
	<<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 $mom.breedingMark == 1>>
		<<if $activeSlave.face < 60>>
			<<set $activeSlave.face = random(60,100)>>
		<</if>>
		<<if $activeSlave.intelligence < 2>>
			<<set $activeSlave.intelligence = either(2, 2, 2, 2, 3, 3)>>
		<</if>>
	<<elseif $inbreeding == 1>>
		<<if $activeSlave.face > -100 && random(1,100) > 60>>
			<<set $activeSlave.face -= random(2,20)>>
		<</if>>
		<<if $activeSlave.intelligence > -3 && random(1,100) < 40>>
			<<set $activeSlave.intelligence -= 1>>
			<<if $activeSlave.intelligence > -3 && random(1,100) < 20>>
				<<set $activeSlave.intelligence -= 1>>
			<</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) < 50>>
			<<set $activeSlave.face -= random(5,20)>>
		<</if>>
		<<if $activeSlave.intelligence > -3 && random(1,100) < 50>>
			<<set $activeSlave.intelligence -= 1>>
				<<if $activeSlave.intelligence > -3 && random(1,100) < 30>>
					<<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.lipsImplant = 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>>
<<if $activeSlave.fetish == "mindbroken">>
	<<set $activeSlave.fetish = "none">>
<</if>>
<<if $incubatorImprintSetting == "terror">>
	<<set $activeSlave.origin = "She was conditioned from birth into mindless terror in an aging tank.">>
	<<set $activeSlave.tankBaby = 2>>
<<else>>
	<<set $activeSlave.origin = "She was conditioned from birth into trusting obedience in an aging tank.">>
	<<set $activeSlave.tankBaby = 1>>
<</if>>
<<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"]]
| [[Semitic|Husk Slave][$huskSlave.race = "semitic"]]
| [[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 <<print cashFormat(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 = $slaveIndices[$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,
//To do - Reactions//

<<slaveCost _oldSlave>>
<<set _payout = Math.trunc($slaveCost/3)>>
$slaves[_m].slaveName's body was bought by the Flesh Heap for <<print cashFormat(_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>>. Currently $incubatorSlaves tanks are in use.
[[Add another incubation tank|Incubator][$cash -= Math.trunc(60000*$upgradeMultiplierArcology), $incubator += 1]] //Costs <<print cashFormat(Math.trunc(60000*$upgradeMultiplierArcology))>> and will increase upkeep costs//
<<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 cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> and will reduce upkeep costs//
<</if>>

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].preg > 0 && $slaves[_u].broodmother == 0 && $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>>
			<<set _t = $slaveIndices[$slaves[_u].pregSource]>>
			<<if def _t>>
				<<print $slaves[_t].slaveName>>'s
			<</if>>
		<</if>>
		<<if $slaves[_u].pregType > 1>>$slaves[_u].pregType babies<<else>>baby<</if>>.
		<<if $slaves[_u].reservedChildren > 0>>
			<<set _childrenReserved = 1>>
		    <<if $slaves[_u].pregType == 1>>
				Her child will be placed in $incubatorName.
			<<elseif $slaves[_u].reservedChildren < $slaves[_u].pregType>>
				$slaves[_u].reservedChildren of her children will be placed in $incubatorName.
			<<elseif $slaves[_u].pregType == 2>>
				Both of her children will be placed in $incubatorName.
			<<else>>
				All $slaves[_u].reservedChildren of her children will be placed in $incubatorName.
			<</if>>
			<<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>>
		<<set _childrenReserved = 1>>
		<<if $PC.pregType == 1>>
			Your child will be placed in $incubatorName.
		<<elseif $PC.reservedChildren < $PC.pregType>>
			$PC.reservedChildren of your children will be placed in $incubatorName.
		<<elseif $PC.pregType == 2>>
			Both of your children will be placed in $incubatorName.
		<<else>>
			All $PC.reservedChildren of your children will be placed in $incubatorName.
		<</if>>
		<<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 || _childrenReserved == 1>> /* 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 cashFormat(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 cashFormat(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 cashFormat(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 cashFormat(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 cashFormat(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 cashFormat(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 cashFormat(Math.trunc(50000*$upgradeMultiplierArcology))>> and will increase upkeep costs//
<</if>>

<<if $incubatorUpgradeOrgans == 1>>
	Surgical tools have been added to the tank to be able to extract tissue samples from the occupant.
<<elseif $organFarmUpgrade >= 1>>
	The tanks lack the ability to extract tissue samples to be used by the organ fabricator. [[Upgrade the growth tanks with surgical extraction tools|Incubator][$cash -= Math.trunc(10000*$upgradeMultiplierArcology), $incubatorUpgradeOrgans = 1]] //Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>> and will increase upkeep costs//
<<else>>
	The tanks lack the ability to extract tissue samples and the dispensary lacks the ability to make use of them to fabricate organs.
<</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 cashFormat(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 $incubatorImprintSetting == "terror">>
	The imprinting system is currently focused on making her devoted but fearful of you. The imprinting cycle is locked upon incubation start.
	[[Switch the system to focus on attachment|Incubator][$incubatorImprintSetting = "trust"]] //Only affects new infants//
<<else>>
	The imprinting system is currently focused on making her devoted and trusting of you. The imprinting cycle is locked upon incubation start.
	[[Switch the system to focus on dependence|Incubator][$incubatorImprintSetting = "terror"]] //Only affects new infants//
<</if>>

<<if $incubatorSlaves > 0>>
<<for $i = 0; $i < $incubatorSlaves; $i++>>
	<<capture $i>>

@@.pink;$tanks[$i].slaveName@@ occupies this tank. She appears to be <<if $tanks[$i].genes == "XX">>a natural girl<<else>>a natural boy<</if>>, with $tanks[$i].hColor hair<<if $tanks[$i].eyes != -2>> and $tanks[$i].eyeColor eyes.<<else>>. She most likely will be blind.<</if>>
		Statistical projections indicates that once released she will be around <<print $tanks[$i].height + random(-5,5)>> cm tall. Most likely she will be
			<<if $tanks[$i].weight <= 30 && $tanks[$i].weight >= -30>>
				at a healthy weight and
			<<elseif $tanks[$i].weight >= 31 && $tanks[$i].weight <= 95>>
				quite overweight and
			<<elseif $tanks[$i].weight >= 96>>
				very overweight and
			<<elseif $tanks[$i].weight <= -31 && $tanks[$i].weight >= -95>>
				quite thin and
			<<elseif  $tanks[$i].weight <= -96>>
				very thin and
			<</if>>
			<<if $tanks[$i].muscles <= 5 && $tanks[$i].muscles >= -5>>
				with a normal musculature.
			<<elseif $tanks[$i].muscles >= 6 && $tanks[$i].muscles <= 30>>
				quite toned.
			<<elseif $tanks[$i].muscles >= 31 && $tanks[$i].muscles <= 95>>
				quite muscular.
			<<elseif $tanks[$i].muscles >= 96>>
				with a powerful musculature.
			<<elseif $tanks[$i].muscles <= -6 && $tanks[$i].muscles >= -30>>
				quite weak.
			<<elseif $tanks[$i].muscles <= -31 && $tanks[$i].muscles >= 95>>
				very weak.
			<<elseif $tanks[$i].muscles <= -96>>
				extremely weak.
			<</if>>
			Her breasts are projected to be
			<<if $tanks[$i].boobs <= 799>>
				of normal size,
			<<elseif $tanks[$i].boobs <= 1799>>
				of generous size,
			<<elseif $tanks[$i].boobs <= 3249>>
				of incredible size,
			<<else>>
				of humongous size,
			<</if>>
			while her rear will be
			<<if $tanks[$i].butt <= 3>>
				a healthy size.
			<<elseif $tanks[$i].butt <= 6>>
				quite impressive.
			<<elseif $tanks[$i].butt <= 9>>
				very impressive.
			<<else>>
				immense.
			<</if>>
			<<if $tanks[$i].dick > 0>>
				<<if $tanks[$i].dick <= 3>>
					The latest analysis reported her dick will end up being around the average
				<<elseif $tanks[$i].dick >= 4 && $tanks[$i].dick <= 6>>
					The latest analysis reported her dick will end up being above average
				<<elseif $tanks[$i].dick >= 7 && $tanks[$i].dick <= 9>>
					The latest analysis reported her dick will end up being far above the average
				<<else>>
					The latest analysis reported her dick will end up being of monstrous size
				<</if>>
			<</if>>
			<<if $tanks[$i].balls > 0>>
				<<if $tanks[$i].balls <= 3>>
					and her testicles will reach a normal size.
				<<elseif $tanks[$i].balls >= 4 && $tanks[$i].balls <= 6>>
					and her testicles will be of remarkable size.
				<<elseif $tanks[$i].balls >= 7 && $tanks[$i].balls <= 9>>
					and her testicles will reach an impressive size.
				<<else>>
					and her testicles will reach a monstrous size.
				<</if>>
			<</if>>
			<<if $tanks[$i].pubertyXX == 1 &&  $tanks[$i].ovaries == 1>>
				Scanners report her womb is fertile.
			<<else>>
				Scanners report she is not fertile,
				<<if $tanks[$i].pubertyXX == 0>>
					as she has not yet entered puberty.
				<<else>>
					it appears her womb is sterile.
				<</if>>
			<</if>>
		<<if $tanks[$i].growTime <= 0>>
			<<set $readySlaves = 1>>

She is ready to be released from her tank.
		<<else>>

Her growth is currently being accelerated. She will be ready for release in about <<print Math.round($tanks[$i].growTime/$incubatorUpgradeSpeed)>> weeks.
		<</if>>

The tank is imprinting her with basic life and sexual skills, though she will still be very naive and inexperienced on release.
		<<if $tanks[$i].tankBaby == 2>>
			The majority of her indoctrination involves painting the world as a terrible place where only horror awaits her should she not obey her owner.
		<<else>>
			The majority of her indoctrination involves painting the world as a wonderful place only if she is unconditionally devoted to, and absolutely trusting of, her owner.
		<</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>>
		<<if $cheatMode == 1>>

''Cheatmode:''
			<<link "Retrieve immediately">>
				<<set $incubatorOldID = $tanks[$i].ID>>
				<<set $readySlave = $tanks.pluck([$i], [$i])>>
				<<goto "Incubator Retrieval Workaround">>
			<</link>>
		<</if>>
		<<if $incubatorUpgradeOrgans == 1>>

			You can extract a sample and prepare a new organ for her to be implanted once she exits her tank.
			<<set _newOrgan = 0>>
			<<set $tankOrgans = {
				ovaries: 0,
				penis: 0,
				testicles:0,
				eyes: 0,
				voiceBox: 0}>>
			<<for _i = 0; _i < $incubatorOrgans.length; _i++>>
				<<if $tanks[$i].ID == $incubatorOrgans[_i].ID>>
					<<if $incubatorOrgans[_i].type == "ovaries">>
						<<set $tankOrgans.ovaries = 1>>
					<</if>>
					<<if $incubatorOrgans[_i].type == "testicles">>
						<<set $tankOrgans.testicles = 1>>
					<</if>>
					<<if $incubatorOrgans[_i].type == "penis">>
						<<set $tankOrgans.penis = 1>>
					<</if>>
					<<if $incubatorOrgans[_i].type == "eyes">>
						<<set $tankOrgans.eyes = 1>>
					<</if>>
					<<if $incubatorOrgans[_i].type == "voicebox">>
						<<set $tankOrgans.voicebox = 1>>
					<</if>>
				<</if>>
			<</for>>
			<<if $tanks[$i].genes == "XX">>
				Being a natural girl she possesses a functional vagina and ovaries, you can:
			<<else>>
				Being a natural boy he possesses a functional penis and balls, you can:
			<</if>>

			<<if $tanks[$i].ovaries == 0 && $tankOrgans.ovaries != 1>>
				<<link "Prepare ovaries">>
					<<set $cash -= 10000>>
					<<set _newOrgan = {type: "ovaries", weeksToCompletion: "10", ID: 0}>>
					<<set _newOrgan.ID = $tanks[$i].ID>>
					<<set $incubatorOrgans.push(_newOrgan)>>
					<<goto "Incubator">>
				<</link>>
			<</if>>
			<<if $tanks[$i].dick == 0 && $tankOrgans.penis != 1>>
				<<link "Prepare penis">>
					<<set $cash -= 5000>>
					<<set _newOrgan = {type: "penis", weeksToCompletion: "5", ID: 0}>>
					<<set _newOrgan.ID = $tanks[$i].ID>>
					<<set $incubatorOrgans.push(_newOrgan)>>
					<<goto "Incubator">>
				<</link>>
			<</if>>
			<<if $tanks[$i].balls == 0 && $tankOrgans.testicles != 1>>
				|
				<<link "Prepare testicles">>
					<<set $cash -= 5000>>
					<<set _newOrgan = {type: "testicles", weeksToCompletion: "10", ID: 0}>>
					<<set _newOrgan.ID = $tanks[$i].ID>>
					<<set $incubatorOrgans.push(_newOrgan)>>
					<<goto "Incubator">>
				<</link>>
			<</if>>
			<<if $tanks[$i].eyes == -2 && $tankOrgans.eyes != 1>>

She appears to be blind:
				<<link "Prepare eyes">>
					<<set $cash -= 10000>>
					<<set _newOrgan = {type: "eyes", weeksToCompletion: "10", ID: 0}>>
					<<set _newOrgan.ID = $tanks[$i].ID>>
					<<set $incubatorOrgans.push(_newOrgan)>>
					<<goto "Incubator">>
				<</link>>
			<</if>>
			<<if $tanks[$i].voice == 0 && $tankOrgans.voicebox != 1>>

It appears she was born a mute:
				<<link "Prepare vocal cords">>
					<<set $cash -= 5000>>
					<<set _newOrgan = {type: "voicebox", weeksToCompletion: "5", ID: 0}>>
					<<set _newOrgan.ID = $tanks[$i].ID>>
					<<set $incubatorOrgans.push(_newOrgan)>>
					<<goto "Incubator">>
				<</link>>
			<</if>>
		<</if>>
	<</capture>>
<</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 $incubatorOldID = $tanks[$i].ID>>
			<<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//