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>>
		<<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 $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,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>>
	<</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.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>>
<<if $activeSlave.fetish == "mindbroken">>
	<<set $activeSlave.fetish = "none">>
<</if>>
<<if $incubatorImprintSetting == "terror">>
	<<set $activeSlave.origin = "Shortly after birth, she was sealed in an aging tank until she was of age. She knows only of the terror that awaits her should she not obey her master.">>
<<else>>
	<<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.">>
<</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>>

repo_name: GavAndAlt/fc

license: mit


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 ¤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>>.
[[Add another incubation tank|Incubator][$cash -= Math.trunc(60000*$upgradeMultiplierArcology), $incubator += 1]] //Costs ¤<<print 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 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].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 $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 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 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>>
				an 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].origin == "Shortly after birth, she was sealed in an aging tank until she was of age. She knows only of the terror that awaits her should she not obey her master.">>
			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 $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//


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.trunc(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>>

	<<if $incubatorReproductionSetting == 2>>
		<<set $tanks[_inc].energy = 80, $tanks[_inc].need = 100>>
	<<elseif $incubatorReproductionSetting == 1>>
		<<set $tanks[_inc].energy = 50, $tanks[_inc].need = 20>>
	<<else>>
		<<set $tanks[_inc].energy = 0, $tanks[_inc].need = 0>>
	<</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">>
<<if $incubatorOrgans.length > 0>>
	<<for _i = 0; _i < $incubatorOrgans.length; _i++>>
		<<if $incubatorOrgans[_i].ID == $incubatorOldID>>
			<<set _newOrgan = {type: $incubatorOrgans[_i].type, weeksToCompletion: $incubatorOrgans[_i].weeksToCompletion, ID: $activeSlave.ID}>>
			<<if _newOrgan.weeksToCompletion <= 0>>
				<<set $completedOrgans.push($incubatorOrgans[_i])>>
			<<else>>
				<<set $organs.push(_newOrgan)>>
			<</if>>
			<<set $incubatorOrgans.deleteAt(_i)>>
		<</if>>
	<</for>>
<</if>>
<<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 = {}>>