code:
:: Incubator [nobr jump-to-safe jump-from-safe]

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

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

<<set $readySlaves = 0, $readySlave = 0, $incubatorSlaves = $tanks.length, _freeTanks = $incubator - $incubatorSlaves, _SL = $slaves.length, _eligibility = 0, $reservedChildren = FetusGlobalReserveCount("incubator"), $reservedChildrenNursery = FetusGlobalReserveCount("nursery")>>

$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 child<<if $incubator != 1>>ren<</if>>. There <<if $incubatorSlaves == 1>>is<<else>>are<</if>> currently $incubatorSlaves tank<<if $incubatorSlaves != 1>>s<</if>> in use in $incubatorName.
[[Add another incubation tank|Incubator][cashX(forceNeg(Math.trunc(60000*$upgradeMultiplierArcology)), "capEx"), $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][cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx"), $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.
/*
** With hundreds of slaves, navigating the Incubator room was giving me as much of a headache as other lists.
** So, I borrowed the sorting list and dropped a few options here.
*/
<<if (0 < _SL)>>
	<<set $sortIncubatorList = $sortIncubatorList || 'Unsorted'>>

//Sorting:// ''$sortIncubatorList.''
	<<link "Sort by Name">>
		<<set $sortIncubatorList = 'Name'>>
		<<replace "#qlIncubatorSort">>$sortIncubatorList<</replace>>
		<>
	<</link>> |
	<<link "Sort by Reserved Incubator Spots">>
		<<set $sortIncubatorList = 'Reserved Incubator Spots'>>
		<<replace "#qlIncubatorSort">>$sortIncubatorList<</replace>>
		<>
	<</link>> |
	<<link "Sort by Pregnancy Week">>
		<<set $sortIncubatorList = 'Pregnancy Week'>>
		<<replace "#qlIncubatorSort">>$sortIncubatorList<</replace>>
		<>
	<</link>> |
	<<link "Sort by Number of Children">>
		<<set $sortIncubatorList = 'Number of Children'>>
		<<replace "#qlIncubatorSort">>$sortIncubatorList<</replace>>
		<>
	<</link>>

<</if>>

<<for _u = 0; _u < _SL; _u++>>
	<<setLocalPronouns $slaves[_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) || $activeSlave.assignment == "be your agent" || $activeSlave.assignment == "live with your agent">>
		<<else>>
			<<set _slaveId = "slave-" + $slaves[_u].ID>>
			<<set _WL = $slaves[_u].womb.length>>
			<<set _reservedIncubator = WombReserveCount($slaves[_u], "incubator")>>
			<<set _reservedNursery = WombReserveCount($slaves[_u], "nursery")>>
			<<set _pregWeek = $slaves[_u].pregWeek>>
			<<set _slaveName = SlaveFullName($slaves[_u])>>

			<<print "[[_slaveName|Long Slave Description][$activeSlave = $slaves[" + _u + "], $nextLink = passage()]]">> is $slaves[_u].pregWeek week<<if $slaves[_u].pregWeek > 1>>s<</if>> 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
			<<elseif $slaves[_u].pregSource == -3>>your Master's
			<<elseif $slaves[_u].pregSource == -4>>another arcology owner's
			<<elseif $slaves[_u].pregSource == -5>>your client's
			<<elseif $slaves[_u].pregSource == -6>>the Societal Elite's
			<<elseif $slaves[_u].pregSource == -7>>the lab's
			<<elseif $slaves[_u].pregSource == -9>>the Futanari Sisters'
			<<else>>
				<<set _t = $slaveIndices[$slaves[_u].pregSource]>>
				<<if def _t>>
					<<print $slaves[_t].slaveName>>'s
				<</if>>
			<</if>>
			<<if _WL > 1>>_WL babies<<else>>baby<</if>>.
			<<if _reservedIncubator > 0>>
				<<set _childrenReserved = 1>>
				<<if _WL == 1>>
					$His child will be placed in $incubatorName.
				<<elseif _reservedIncubator < _WL>>
					_reservedIncubator of $his children will be placed in $incubatorName.
				<<elseif _WL == 2>>
					Both of $his children will be placed in $incubatorName.
				<<else>>
					All _reservedIncubator of $his children will be placed in $incubatorName.
				<</if>>
				<<if (_reservedIncubator + _reservedNursery < _WL) && ($reservedChildren < _freeTanks)>>

					<<if $pregnancyMonitoringUpgrade == 1>>
						<<print "[[Inspect pregnancy|Analyze Pregnancy][$i = " + _u + "; $activeSlave = $slaves[$i]]] | ">>
					<</if>>
					<<print "[[Keep another child|Incubator][WombAddToGenericReserve($slaves[" + _u + "], 'incubator', 1)]]">>
					<<if _reservedIncubator > 0>>
						| <<print "[[Keep one less child|Incubator][WombCleanGenericReserve($slaves[" + _u + "], 'incubator', 1)]]">>
					<</if>>
					<<if _reservedIncubator > 1>>
						| <<print "[[Keep none of " + $his + " children|Incubator][WombCleanGenericReserve($slaves[" + _u + "], 'incubator', 9999)]]">>
					<</if>>
					<<if ($reservedChildren + _WL - _reservedIncubator) <= _freeTanks>>
						| <<print "[[Keep the rest of " + $his + " children|Incubator][WombAddToGenericReserve($slaves[" + _u + "], 'incubator', 9999)]]">>
					<</if>>
				<<elseif (_reservedIncubator == _WL) || ($reservedChildren == _freeTanks) || (_reservedIncubator + _reservedNursery == _WL)>>

					<<if $pregnancyMonitoringUpgrade == 1>>
						<<print "[[Inspect pregnancy|Analyze Pregnancy][$i = " + _u + "; $activeSlave = $slaves[$i]]] | ">>
					<</if>>
					<<print "[[Keep one less child|Incubator][WombCleanGenericReserve($slaves[" + _u + "], 'incubator', 1)]]">>
					<<if _reservedIncubator > 1>>
						| <<print "[[Keep none of " + $his + " children|Incubator][WombCleanGenericReserve($slaves[" + _u + "], 'incubator', 9999)]]">>
					<</if>>
				<</if>>
			<<elseif ($reservedChildren < _freeTanks)>>
				<<if _WL - _reservedNursery == 0>>
					//$His children are already reserved for $nurseryName//

					<<if $pregnancyMonitoringUpgrade == 1>>
						<<print "[[Inspect pregnancy|Analyze Pregnancy][$i = " + _u + "; $activeSlave = $slaves[$i]]] | ">>
					<</if>>
					<<print "[[Keep " + $his + " " + ((_WL > 1) ? "children" : "child") + " here instead|Incubator][WombChangeReserveType($slaves[" + _u + "], 'nursery', 'incubator')]]">>
				<<else>>
					You have <<if _freeTanks == 1>>an<</if>> @@.lime;available aging tank<<if _freeTanks > 1>>s<</if>>.@@

					<<if $pregnancyMonitoringUpgrade == 1>>
						<<print "[[Inspect pregnancy|Analyze Pregnancy][$i = " + _u + "; $activeSlave = $slaves[$i]]] | ">>
					<</if>>
					<<print "[[Keep "+ ((_WL > 1) ? "a" : "the") +" child|Incubator][WombAddToGenericReserve($slaves[" + _u + "], 'incubator', 1)]]">>
					<<if (_WL > 1) && ($reservedChildren + _WL - _reservedIncubator) <= _freeTanks>>
						| <<print "[[Keep all of " + $his + " children|Incubator][WombAddToGenericReserve($slaves[" + _u + "], 'incubator', 9999)]]">>
					<</if>>
				<</if>>
			<<elseif $reservedChildren == _freeTanks>>

				<<if $pregnancyMonitoringUpgrade == 1>>
					<<print "[[Inspect pregnancy|Analyze Pregnancy][$i = " + _u + "; $activeSlave = $slaves[$i]]] | ">>
				<</if>>
				You have @@.red;no room for $his offspring.@@
			<</if>>
			<<set _eligibility = 1>>

		<</if>>
	<</if>>
<</for>>

<>
<<if _eligibility == 0>>

	//You have no pregnant slaves bearing eligible children.//
<</if>>
<<if $PC.pregKnown == 1 && ($arcologies[0].FSRestart == "unset" || $eugenicsFullControl == 1 || ($PC.pregSource != -1 && $PC.pregSource != -6))>>
	<<set _WL = $PC.womb.length>>
	<<set _reservedIncubator = WombReserveCount($PC, "incubator")>>
	<<set _reservedNursery = WombReserveCount($PC, "nursery")>>

''@@.pink;You're pregnant@@'' and going to have
		<<if _WL == 1>>
			a baby.
		<<else>>
			<<print pregNumberName(_WL, 2)>>.
		<</if>>
	<<if (_reservedIncubator > 0)>>
		<<set _childrenReserved = 1>>
		<<if _WL == 1>>
			Your child will be placed in $incubatorName.
		<<elseif _reservedIncubator < _WL>>
			_reservedIncubator of your children will be placed in $incubatorName.
		<<elseif _WL == 2>>
			Both of your children will be placed in $incubatorName.
		<<else>>
			All _reservedIncubator of your children will be placed in $incubatorName.
		<</if>>
		<<if (_reservedIncubator < _WL) && ($reservedChildren < _freeTanks) && (_reservedIncubator - _reservedNursery > 0)>>

			<<if $pregnancyMonitoringUpgrade == 1>>
				<<print "[[Inspect pregnancy|Analyze PC Pregnancy]] | ">>
			<</if>>
			<<print "[[Keep another child|Incubator][WombAddToGenericReserve($PC, 'incubator', 1)]]">>
			<<if _reservedIncubator > 0>>
				| <<print "[[Keep one less child|Incubator][WombCleanGenericReserve($PC, 'incubator', 1)]]">>
			<</if>>
			<<if _reservedIncubator > 1>>
				| <<print "[[Keep none of your children|Incubator][WombCleanGenericReserve($PC, 'incubator', 9999)]]">>
			<</if>>
			<<if ($reservedChildren + _WL - _reservedIncubator) <= _freeTanks>>
				| <<print "[[Keep the rest of your children|Incubator][WombAddToGenericReserve($PC, 'incubator', 9999)]]">>
			<</if>>
		<<elseif (_reservedIncubator == _WL) || ($reservedChildren == _freeTanks) || (_reservedIncubator - _reservedNursery >= 0)>>

			<<if $pregnancyMonitoringUpgrade == 1>>
				<<print "[[Inspect pregnancy|Analyze PC Pregnancy]] | ">>
			<</if>>
			<<print "[[Keep one less child|Incubator][_reservedIncubator -= 1, $reservedChildren -= 1]]">>
			<<if _reservedIncubator > 1>>
				| <<print "[[Keep none of your children|Incubator][WombCleanGenericReserve($PC, 'incubator', 9999)]]">>
			<</if>>
		<</if>>
	<<elseif $reservedChildren < _freeTanks>>
		<<if _WL - _reservedNursery == 0>>
			//Your child<<if _WL > 0>>ren are<<else>>is<</if>> already reserved for $nurseryName//
			<<print "[[Keep your" + ((_WL > 1) ? "children" : "child") + " here instead|Incubator][WombChangeReserveType($PC, 'nursery', 'incubator')]]">>
		<<else>>
			You have <<if _freeTanks == 1>>an<</if>> @@.lime;available aging tank<<if _freeTanks > 1>>s<</if>>.@@

			<<if $pregnancyMonitoringUpgrade == 1>>
				<<print "[[Inspect pregnancy|Analyze PC Pregnancy]] | ">>
			<</if>>
			<<print "[[Keep " + ((_WL > 1) ? "a" : "your") +" child|Incubator][WombAddToGenericReserve($PC, 'incubator', 1)]]">>
			<<if (_WL > 1) && ($reservedChildren + _WL - _reservedIncubator) <= _freeTanks>>
				| [[Keep all of your children|Incubator][WombAddToGenericReserve($PC, 'incubator', 9999)]]
			<</if>>
		<</if>>
	<<elseif $reservedChildren == _freeTanks>>

		<<if $pregnancyMonitoringUpgrade == 1>>
			<<print "[[Inspect pregnancy|Analyze PC Pregnancy]] | ">>
		<</if>>
		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 WombReserveCount($slaves[_u], "incubator") != 0>>
				<<set WombCleanGenericReserve($slaves[_u], 'incubator', 9999)>>
			<</if>>
		<</for>>
		<<set WombCleanGenericReserve($PC, 'incubator', 9999)>>
		<<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 $incubatorBulkRelease == 1>>
	Released children will be handled in bulk and not receive personal attention.
	[[Individual release|Incubator][$incubatorBulkRelease = 0]]
<<else>>
	Released children will be seen to personally.
	[[Bulk release|Incubator][$incubatorBulkRelease = 1]]
<</if>>

<<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][cashX(forceNeg(Math.trunc(500000*$upgradeMultiplierArcology)), "capEx"), $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][cashX(forceNeg(Math.trunc(75000*$upgradeMultiplierArcology)), "capEx"), $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][cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "capEx"), $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][cashX(forceNeg(Math.trunc(30000*$upgradeMultiplierArcology)), "capEx"), $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 the rapid growth. [[Upgrade the growth tanks with weight monitoring systems|Incubator][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $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 the rapid growth. [[Upgrade the growth tanks with muscle monitoring systems|Incubator][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $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][cashX(forceNeg(Math.trunc(50000*$upgradeMultiplierArcology)), "capEx"), $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][cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx"), $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][cashX(forceNeg(Math.trunc(20000*$upgradeMultiplierArcology)), "capEx"), $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 $minimumSlaveAge <= 6 && ($arcologies[0].FSRepopulationFocus >=60 || $BlackmarketPregAdaptation == 1) >> /*Main prequsite - stable repopulation FS OR documentation purchased from black market. And age gate. */

	<<if $incubatorUpgradePregAdaptation == 1>>
		The incubators have been upgraded with special set of manipulators, probes, nozzles and syringes coupled together with specific programs to take advantage of the accelerated growth to heighten viable reproductive capacity. These include injections of specialized serums and mechanical manipulation of the reproductive system and associated tissues, organs, muscles and bones.
	<<else>>
		The highly controlled environment inside incubation tube coupled with the greatly accelerated growth process is the perfect opportunity to push the boundaries of a body's ability to sustain pregnancy. This will include injections of specialized serums and mechanical manipulation of their reproductive system through a special set of manipulators, probes, nozzles and syringes supervised by a powerful monitoring program. Costly to maintain.

		<<if $incubatorUpgradeReproduction < 1>> /* Now with reports - what is lacking for construction */
			$incubatorNameCaps lacks advanced monitoring and hormone injection systems. Construction not possible.
		<<elseif $incubatorUpgradeOrgans < 1>>
			$incubatorNameCaps lacks the ability to extract tissue samples. Construction not possible.
		<<elseif $dispensaryUpgrade < 1>>
			$incubatorNameCaps lacks a connection to an advanced pharmaceutical fabricator. Cutting-edge targeted serums production needed as integral part. Construction not possible.
		<<elseif $bellyImplants < 1>>
			$incubatorNameCaps lacks a connection with an implant manufacturing to construct fillable abdominal implants to simulate expansion. Construction not possible.
		<<elseif $incubatorUpgradeGrowthStims < 1>>
			$incubatorNameCaps lacks advanced monitoring and stimulant injection systems. Construction not possible.
		<<else>>
			[[Manufacture and install this subsystem|Incubator][cashX(forceNeg(Math.trunc(2000000*$upgradeMultiplierArcology)), "capEx"), $incubatorUpgradePregAdaptation = 1]] //Costs <<print cashFormat(Math.trunc(2000000*$upgradeMultiplierArcology))>> and will increase upkeep costs//
		<</if>>
	<</if>>

<</if>>

<<if $incubatorImprintSetting == "terror">>
	The imprinting system is currently focused on making them devoted but fearful of you. The imprinting cycle is locked upon incubation start.
	<<if $bodyswapAnnounced == 1>>

[[Switch the system to focus on preparation for body-swapping|Incubator][$incubatorImprintSetting = "husk"]]
	<</if>>

[[Switch the system to focus on attachment|Incubator][$incubatorImprintSetting = "trust"]]
<<elseif $incubatorImprintSetting == "trust">>
	The imprinting system is currently focused on making them devoted and trusting of you. The imprinting cycle is locked upon incubation start.
	<<if $bodyswapAnnounced == 1>>

[[Switch the system to focus on preparation for body-swapping|Incubator][$incubatorImprintSetting = "husk"]]
	<</if>>

[[Switch the system to focus on dependence|Incubator][$incubatorImprintSetting = "terror"]]
<<else>>
	The imprinting system is currently focused on producing complete vegetables ready to be used as hosts for body swapping. The imprinting cycle is locked upon incubation start.

[[Switch the system to focus on dependence|Incubator][$incubatorImprintSetting = "terror"]]

[[Switch the system to focus on attachment|Incubator][$incubatorImprintSetting = "trust"]]
<</if>>
//Only affects new infants//

<<if $incubatorSlaves > 0>>

''Children in $incubatorName''

<<for $i = 0; $i < $incubatorSlaves; $i++>>
	<<capture $i>>
		<<setLocalPronouns $tanks[$i]>>

@@.pink;$tanks[$i].slaveName@@ occupies this tank.
		<<if $geneticMappingUpgrade >= 1>>
			$He is a <<if $tanks[$i].genes == "XX">>female<<else>>male<</if>> of $tanks[$i].race descent with <<print App.Desc.eyesColor($tanks[$i])>>, $tanks[$i].hColor hair and $tanks[$i].skin skin. Given $his parentage, $he is considered $tanks[$i].nationality.
		<<else>>
			$He appears to be <<if $tanks[$i].genes == "XX">>a natural girl<<else>>a natural boy<</if>>, with $tanks[$i].hColor hair<<if getBestVision($tanks[$i]) === 0>> and <<print App.Desc.eyesColor($tanks[$i])>>.<<else>>. $He most likely will be blind.<</if>>
		<</if>>
		Statistical projections indicates that once released $he will be around <<= heightToEitherUnit($tanks[$i].height + random(-5,5))>> tall. Most likely $he 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>>
			$His breasts are projected to be
			<<if $tanks[$i].boobs <= 299>>
				of small size,
			<<elseif $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 $his 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 $his dick will end up being around the average
				<<elseif $tanks[$i].dick >= 4 && $tanks[$i].dick <= 6>>
					The latest analysis reported $his dick will end up being above average
				<<elseif $tanks[$i].dick >= 7 && $tanks[$i].dick <= 9>>
					The latest analysis reported $his dick will end up being far above the average
				<<else>>
					The latest analysis reported $his dick will end up being of monstrous size
				<</if>>
			<</if>>
			<<if $tanks[$i].balls > 0>>
				<<if $tanks[$i].balls <= 3>>
					and $his testicles will reach a normal size.
				<<elseif $tanks[$i].balls >= 4 && $tanks[$i].balls <= 6>>
					and $his testicles will be of remarkable size.
				<<elseif $tanks[$i].balls >= 7 && $tanks[$i].balls <= 9>>
					and $his testicles will reach an impressive size.
				<<else>>
					and $his testicles will reach a monstrous size.
				<</if>>
			<</if>>
			<<if $tanks[$i].pubertyXX == 1 && $tanks[$i].ovaries == 1>>
				Scanners report $his womb is fertile.
			<<else>>
				Scanners report $he is not fertile,
				<<if $tanks[$i].pubertyXX == 0>>
					as $he has not yet entered puberty.
				<<else>>
					as it appears $his womb is sterile.
				<</if>>
			<</if>>
			<<if ($incubatorPregAdaptationSetting == 1 && $tanks[$i].genes == "XX") || ($incubatorPregAdaptationSetting == 2 && $tanks[$i].genes == "XY") || $incubatorPregAdaptationSetting == 3 >>
				There are probes and tubes inserted inside $his reproductive organs so $incubatorName may work on them.
				<<set _safecc = ($tanks[$i].pregAdaptation - 5) * 2000>>
				<<if _safecc > 300000>> /* Some bigger size descriptions may be unreachable by normal game mechanics, so they are here just in case.*/
					$His bloated form looks more like an overinflated beachball made of the overstretched skin of $his belly with $his relative tiny body attached to its side. $He is completely dominated by it now. The process has gone too far, so $his body can't maintain its form with the belly as part of abdominal cavity. Now $his skin, tissues and muscles have stretched enough for $his belly to expand outside of any physical boundaries and appear more an attachment to $his body, rather than part of it.
				<<elseif _safecc > 150000>>
					$His body looks almost spherical, having been grotesquely inflated with the stimulator sacks inserted into $his internals. The incubator constantly maintains high pressure inside $him, forcing the displacement of $his organs and stretching skin, tissues, and muscles. Even $his chest forced to become a part of the top of $his belly, having been pushed forward from the overwhelming volume inside.
				<<elseif _safecc > 75000>>
					$His belly has become so huge that can be easily compared with belly of a woman ready to birth quintuplets. It pulses from the pressure applied within by the incubator probes.
				<<elseif _safecc > 45000>>
					$His belly, in the current state, would look normal on a woman who was ready to birth triplets. On $his still growing form, it's something completely out of the ordinary.
				<<elseif _safecc > 30000>>
					$His belly looks like it contains full sized twins, ready to be birthed.
				<<elseif _safecc > 15000>>
					$His belly has reached the size of full term pregnancy.
				<<elseif _safecc > 10000>>
					$His belly has inflated to the size of late term pregnancy; its skin shines from the tension.
				<<elseif _safecc > 5000>>
					$His belly resembles a mid term pregnancy; it pulses slightly from the expansion and contraction of expandable sacks tipping the incubator probes.
				<<elseif _safecc > 1500>>
					$His belly slightly bulges and rhythmically expands and contracts to the cycles of $his stimulation as the incubator inflates and deflates expandable sacks on its probes within $his body cavity. With the correct serums applied, this should allow it to stretch the skin, tissues, and muscles of $his belly to better to tolerate the displacement of internal organs caused by fetal growth.
				<</if>>
			<</if>>
		<<if $tanks[$i].growTime <= 0>>
			<<set $readySlaves = 1>>

$He is ready to be released from $his tank.
		<<else>>
			<<set _weekDisplay = Math.round($tanks[$i].growTime/$incubatorUpgradeSpeed)>>

$His growth is currently being accelerated. $He will be ready for release in about _weekDisplay week<<if _weekDisplay > 1>>s<</if>>.
		<</if>>

		<<if $tanks[$i].tankBaby != 3>>
			The tank is imprinting $him with basic life and sexual skills, though $he will still be very naïve and inexperienced on release.
			<<if $tanks[$i].tankBaby == 2>>
				The majority of $his indoctrination involves painting the world as a terrible place where only horror awaits $him should $he not obey $his owner.
			<<else>>
				The majority of $his indoctrination involves painting the world as a wonderful place only if $he is unconditionally devoted to, and absolutely trusting of, $his owner.
			<</if>>
		<<else>>
			The tank keeps $him a braindead husk on a complete life-support.
		<</if>>
		<<if $incubatorUpgradeWeight == 1>>

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

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

			<<if $incubatorGrowthStimsSetting == 2>>
				$He is being injected with higher than recommended doses of stimulants; $he is likely to be much taller than expected.
			<<elseif $incubatorGrowthStimsSetting == 1>>
				$He is injected with the recommended dosage of stimulants; $he will grow to $his full expected height.
			<<elseif $incubatorGrowthStimsSetting == 0>>
				Growth stimulant injection systems are offline; $he will develop normally.
			<</if>>
		<</if>>
		<<if $incubatorUpgradeReproduction == 1>>

			<<if $incubatorReproductionSetting == 2>>
				$His hormone levels are purposefully set higher than recommended; $his reproductive systems are likely to be over-active.
			<<elseif $incubatorReproductionSetting == 1>>
				$His hormone levels are being carefully managed; $he will be released with fully functional reproductive organs.
			<<elseif $incubatorReproductionSetting == 0>>
				Reproduction management systems are offline; $he will undergo normal puberty.
			<</if>>
			<<if ($incubatorPregAdaptationSetting == 1 && $tanks[$i].genes == "XX") || ($incubatorPregAdaptationSetting == 2 && $tanks[$i].genes == "XY") ||$incubatorPregAdaptationSetting == 3 >> /* Should be visible only after incubatorUpgradeReproduction is installed and activated*/

				$His reproductive organs are getting <<if $tanks[$i].incubatorPregAdaptationPower == 1>>an advanced<<elseif $tanks[$i].incubatorPregAdaptationPower == 2>>an intensive<<elseif $tanks[$i].incubatorPregAdaptationPower == 3>>an extreme<<else>>a standard<</if>> course of mechanical and hormonal therapy to become adapted for future use.
			<</if>>
		<</if>>

Rename $him: <<textbox "_tempName" _tempName >> [[Apply |Incubator][$tanks[$i].slaveName = _tempName]] // Given name only //
		<<if $cheatMode == 1>>

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

			You can extract a sample and prepare a new organ for $him to be implanted once $he exits $his tank.
			<<set _newOrgan = 0>>
			<<set $tankOrgans = {
				ovaries: 0,
				penis: 0,
				testicles:0,
				rightEye: 0,
				leftEye: 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 == "rightEye">>
						<<set $tankOrgans.rightEye = 1>>
					<</if>>
					<<if $incubatorOrgans[_i].type == "leftEye">>
						<<set $tankOrgans.leftEye = 1>>
					<</if>>
					<<if $incubatorOrgans[_i].type == "voicebox">>
						<<set $tankOrgans.voicebox = 1>>
					<</if>>
				<</if>>
			<</for>>
			<<if $tanks[$i].genes == "XX">>
				Being a natural girl, $he 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>>
				<<if $tankOrgans.ovaries != 1>>
					<<link "Prepare ovaries">>
						<<run App.Medicine.OrganFarm.growIncubatorOrgan($tanks[$i], "ovaries")>>
						<<goto "Incubator">>
					<</link>>
				<<else>>
					@@.detail;Ovaries are already prepared.@@
				<</if>>
			<</if>>
			<<if $tanks[$i].dick == 0>>
				<<if $tankOrgans.penis != 1>>
					<<link "Prepare penis">>
						<<run App.Medicine.OrganFarm.growIncubatorOrgan($tanks[$i], "penis")>>
						<<goto "Incubator">>
					<</link>>
				<<else>>
					@@.detail;A penis is already prepared.@@
				<</if>>
			<</if>>
			<<if $tanks[$i].balls == 0>>
				|
				<<if $tankOrgans.testicles != 1>>
					<<link "Prepare testicles">>
						<<run App.Medicine.OrganFarm.growIncubatorOrgan($tanks[$i], "testicles")>>
						<<goto "Incubator">>
					<</link>>
				<<else>>
					@@.detail;Testicles are already prepared.@@
				<</if>>
			<</if>>
			<<if getLeftEyeVision($tanks[$i]) === 0 || getRightEyeVision($tanks[$i]) === 0>>

				<<set _both = getLeftEyeVision($tanks[$i]) === 0 && getRightEyeVision($tanks[$i]) === 0>>
				<<if _both>>
					$He appears to be blind in both eyes:
				<<elseif getLeftEyeVision($tanks[$i]) === 0>>
					$He appears to be blind in $his left eye:
				<<else>>
					$He appears to be blind in $his right eye:
				<</if>>
				<<set _unprepared = 0>>
				<<if getLeftEyeVision($tanks[$i]) === 0 && $tankOrgans.leftEye != 1>>
					<<link "Prepare left eye">>
						<<run App.Medicine.OrganFarm.growIncubatorOrgan($tanks[$i], "leftEye")>>
						<<goto "Incubator">>
					<</link>>
					<<set _unprepared++>>
				<</if>>
				<<if getRightEyeVision($tanks[$i]) === 0 && $tankOrgans.rightEye != 1>>
					<<if _unprepared > 0>> | <</if>>
					<<link "Prepare right eye">>
						<<run App.Medicine.OrganFarm.growIncubatorOrgan($tanks[$i], "rightEye")>>
						<<goto "Incubator">>
					<</link>>
					<<set _unprepared++>>
				<</if>>
				<<if _both && _unprepared === 2>>
					|
					<<link "Prepare both eyes">>
						<<run App.Medicine.OrganFarm.growIncubatorOrgan($tanks[$i], "leftEye"), App.Medicine.OrganFarm.growIncubatorOrgan($tanks[$i], "rightEye")>>
						<<goto "Incubator">>
					<</link>>
				<</if>>
				<<if _both && _unprepared === 0>> @@.detail;Both eyes are already prepared.@@
				<<elseif $tankOrgans.leftEye == 1>> @@.detail;A left eye is already prepared.@@
				<<elseif $tankOrgans.rightEye == 1>> @@.detail;A right eye is already prepared.@@
				<</if>>
			<</if>>
			<<if $tanks[$i].voice == 0>>

$He appears to be mute:
				<<if $tankOrgans.voicebox != 1>>
					<<link "Prepare vocal cords">>
						<<run App.Medicine.OrganFarm.growIncubatorOrgan($tanks[$i], "voicebox")>>
						<<goto "Incubator">>
					<</link>>
				<<else>>
					@@.detail;Vocal cords are already prepared.@@
				<</if>>
			<</if>>
		<</if>>
	<</capture>>
<</for>>
<</if>>

<<if $incubatorUpgradeWeight == 1>>
	<<if $incubatorWeightSetting == 1>>
		Weight is not being properly managed; excessive weight gain is likely. [[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 is 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 are 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 $incubatorUpgradePregAdaptation == 1>> /* Should be visible only after incubatorUpgradeReproduction is installed */

		<<if $incubatorPregAdaptationSetting == 3>>
			Pregnancy adaptation system online: All.
			[[Females|Incubator][$incubatorPregAdaptationSetting = 1]] | [[Males|Incubator][$incubatorPregAdaptationSetting = 2]] | [[Disable|Incubator][$incubatorPregAdaptationSetting = 0]]
		<<elseif $incubatorPregAdaptationSetting == 2>>
			Pregnancy adaptation system online: Males only.
			[[All|Incubator][$incubatorPregAdaptationSetting = 3]] | [[Females|Incubator][$incubatorPregAdaptationSetting = 1]] | [[Disable|Incubator][$incubatorPregAdaptationSetting = 0]]
		<<elseif $incubatorPregAdaptationSetting == 1>>
			Pregnancy adaptation system online: Females only.
			[[All|Incubator][$incubatorPregAdaptationSetting = 3]] | [[Males|Incubator][$incubatorPregAdaptationSetting = 2]] | [[Disable|Incubator][$incubatorPregAdaptationSetting = 0]]
		<<else>>
			Pregnancy adaptation system offline.
			[[All|Incubator][$incubatorPregAdaptationSetting = 3]] | [[Females|Incubator][$incubatorPregAdaptationSetting = 1]] | [[Males|Incubator][$incubatorPregAdaptationSetting = 2]]
		<</if>>
	<</if>>
	<<if $incubatorUpgradePregAdaptation == 1 && $incubatorPregAdaptationSetting > 0>> /* Should be visible only after incubatorUpgradeReproduction is installed and turned on*/

		<<if $incubatorPregAdaptationPower == 1>>
			Pregnancy adaptation programmed to advanced procedures. Up to triplet pregnancy should be safe for the subjects.
			[[Standard|Incubator][$incubatorPregAdaptationPower = 0]] | [[Intensive|Incubator][$incubatorPregAdaptationPower = 2]] | [[Extreme|Incubator][$incubatorPregAdaptationPower = 3]]
		<<elseif $incubatorPregAdaptationPower == 2>>
			Pregnancy adaptation programmed to intensive procedures. Up to octuplet pregnancy should be possible for the subjects. Warning! Side effects may occur to health and mental condition.
			[[Standard|Incubator][$incubatorPregAdaptationPower = 0]] | [[Advanced|Incubator][$incubatorPregAdaptationPower = 1]] | [[Extreme|Incubator][$incubatorPregAdaptationPower = 3]]
		<<elseif $incubatorPregAdaptationPower == 3>>
			Pregnancy adaptation programmed to extreme procedures. Normally unsustainable pregnancies may be possible for some subjects. Actual capacity will vary with genetic and other individal conditions. WARNING! Extreme side effects may occur to health and mental condition!
			[[Standard|Incubator][$incubatorPregAdaptationPower = 0]] | [[Advanced|Incubator][$incubatorPregAdaptationPower = 1]] | [[Intensive|Incubator][$incubatorPregAdaptationPower = 2]]
		<<else>>
			Pregnancy adaptation programmed to standard procedures. Normal pregnancy should be safe for subjects.
			[[Advanced|Incubator][$incubatorPregAdaptationPower = 1]] | [[Intensive|Incubator][$incubatorPregAdaptationPower = 2]] | [[Extreme|Incubator][$incubatorPregAdaptationPower = 3]]
		<</if>>

		//Due to the high complexity and steep risks of the procedure, settings will not be changed on tanks in use.//
	<</if>>
<</if>>

<<if $incubatorUpgradeGrowthStims == 1>>
	<<if $incubatorGrowthStimsSetting == 2>>
		Children are 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>>
		Children are injected with the recommended dosage of stimulants; they will grow to their full expected height. [[Overload|Incubator][$incubatorGrowthStimsSetting = 2]] | [[Disable|Incubator][$incubatorGrowthStimsSetting = 0]]
	<<elseif $incubatorGrowthStimsSetting == 0>>
		Growth stimulant injection systems are offline; children will develop normally. [[Activate|Incubator][$incubatorGrowthStimsSetting = 1]]
	<</if>>
<</if>>

<<if $readySlaves == 1>>
	<<if $incubatorBulkRelease == 1>>
		<<set $newSlavePool = []>>
		<<for _inc = 0; _inc < $tanks.length; _inc++>>
			<<if $tanks[_inc].growTime <= 0>>
				<<set $incubatorOldID = $tanks[_inc].ID>> /* single slave case */
				<<set _tempObject = {object: $tanks[_inc], ID: $tanks[_inc].ID}>>
				<<set $newSlavePool.push(clone(_tempObject))>>
				<<run $tanks.splice(_inc, 1)>>
				<<set _inc-->>
			<</if>>
		<</for>>
		<<if $newSlavePool.length == 1>>
			<<set $readySlave = $newSlavePool[0].object>>
			<<set $newSlavePool = 0>>
		<</if>>
	<<else>>
		<<for _inc = 0; _inc < $incubatorSlaves; _inc++>>
			<<if $tanks[_inc].growTime <= 0>>
				<<set $incubatorOldID = $tanks[_inc].ID>>
				<<set $readySlave = $tanks[_inc]>>
				<<run $tanks.splice(_inc, 1)>>
				<<break>>
			<</if>>
		<</for>>
	<</if>>
	<<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, $readySlaves = 0>>
<<if $incubatorImprintSetting == 0>><<set $incubatorImprintSetting = "trust">><</if>>

<<for _inc = 0; _inc < $tanks.length; _inc++>>
	<<setLocalPronouns $tanks[_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. $He <<if Math.round($tanks[_inc].growTime/$incubatorUpgradeSpeed) <= 0>>is @@.lime;ready for release.@@ $He will be ejected from $his 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.@@ $He will be ejected from $his tank upon your approach.
		<<set $readySlaves = 1>>
	<</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 $his 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 $he is overweight and @@.green;decrease $his 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 $he is underweight and @@.green;increase $his caloric intake.@@
			<<else>>
				$He is @@.lime;currently at a healthy weight;@@ efforts will be made to maintain it.
			<</if>>
		<<elseif $incubatorWeightSetting == 0>>
			<<if $tanks[_inc].weight > -100>>
				$His developing body @@.red;quickly sheds its gained weight.@@
				<<set $tanks[_inc].weight -= 40>>
			<</if>>
		<</if>>
	<<else>>
		<<if $tanks[_inc].weight > -100>>
			$His 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 $him 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 $he is overly muscular and @@.green;decrease $his 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 $he is weak and @@.green;increase $his steroid dosage.@@
			<<else>>
				$He has @@.lime;a healthy musculature;@@ efforts will be made to maintain it.
			<</if>>
		<<elseif $incubatorMusclesSetting == 0>>
			<<if $tanks[_inc].muscles > -100>>
				$His developing body @@.red;quickly loses its gained muscle.@@
				<<set $tanks[_inc].muscles -= 40>>
			<</if>>
		<</if>>
	<<else>>
		<<if $tanks[_inc].muscles > -100>>
			$His 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]) * 1.25),0,274))>>
		<<set _heightLimitAge = Height.forAge($tanks[_inc].height, $tanks[_inc])>>
		<<if $tanks[_inc].geneticQuirks.dwarfism == 2 && $tanks[_inc].geneticQuirks.gigantism != 2>>
			<<set _heightLimit = Math.min(_heightLimit, 160)>>
		<</if>>
		<<if $tanks[_inc].geneMods.NCS == 1>>
			/*
			** NCS should block physical growth beyond that of a toddler, but some players might like
			** a little more or less. So using $minimumSlaveAge or 8, whichever is lesser.
			*/
			<<set _limitAge = Math.min(8, $minimumSlaveAge)>>
			<<set _heightLimitAge = Height.forAge($tanks[_inc].height, _limitAge, $tanks[_inc].genes)>>
			<<set _heightLimit = _heightLimitAge>>
		<</if>>
		<<if $tanks[_inc].height >= _heightLimit>>
			The monitoring system detects $his body is not able to support further increases in height, so it carefully regulates stimulant injections to @@.yellow;maintain $his current stature.@@
			<<set $tanks[_inc].height = _heightLimit>>
		<<elseif $incubatorGrowthStimsSetting == 2>>
			<<if $tanks[_inc].geneMods.NCS == 1>>
				The monitoring system floods $his body with growth stimulants, but $his @@.orange;NCS prevents an increase in $his growth rate.@@
				<<set $tanks[_inc].height = _heightLimitAge>>
			<<else>>
				The monitoring system floods $his 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>>
			<</if>>
		<<elseif $incubatorGrowthStimsSetting == 1>>
			<<if $tanks[_inc].geneMods.NCS == 1>>
				The monitoring system detects $he is near the expected height for $his @@.orange;NCS@@ condition, so it carefully regulates stimulant injections to @@.yellow;maintain $his current stature.@@
				<<set $tanks[_inc].height = _heightLimitAge>>
			<<elseif $tanks[_inc].height > _heightLimitAge>>
				The monitoring systems detect $he is near the expected height, so it carefully regulates stimulant injections to @@.yellow;maintain $his 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 systems detect $his body is capable of developing more rapidly and @@.green;increase $his 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, $his body is left to develop naturally.
	<</if>>

	<<if $incubatorUpgradeReproduction == 1>>

		<<set _rearQuirk = $tanks[_inc].geneticQuirks.rearLipedema == 2 ? 2 : 1>>
		<<if $incubatorReproductionSetting == 2>>
			$His developing body is being flooded with hormones.
			<<if $incubatorWeightSetting == 1>>
				Combined with the abundant food provided to $him, $his body grows rapidly.
				<<if $tanks[_inc].ovaries == 1>>
					<<set $tanks[_inc].pubertyXX = 1>>
					<<if $tanks[_inc].hormoneBalance < 500>>
						<<set $tanks[_inc].hormoneBalance += 100>>
					<</if>>
					<<if $seeHyperPreg == 1>>
						<<set $tanks[_inc].readyOva = random(25,45)>>
					<<else>>
						<<set $tanks[_inc].readyOva = random(3,8)>>
					<</if>>
					<<if $tanks[_inc].geneMods.NCS == 1>>
						/* NCS blocks hormonal growth of all secondary sexual characteristics */
						$His @@.orange;NCS blocks all growth@@ despite the excess estrogen-laced growth hormones flooding $his body.
					<<elseif $incubatorUpgradeSpeed == 52>>
						<<if $tanks[_inc].boobs < 8000>>
							The excess estrogen-laced growth hormones @@.green;rapidly balloon $his breasts.@@
							<<set $tanks[_inc].boobs += 2000>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 50>>
							The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@
							<<set $tanks[_inc].hips += 2>>
						<</if>>
						<<if $tanks[_inc].butt < 12*_rearQuirk && random(1,100) > 30/_rearQuirk>>
							The excess estrogen-laced growth hormones @@.green;cause $his 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 $his breasts.@@
							<<set $tanks[_inc].boobs += 500>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 50>>
							The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 12*_rearQuirk && random(1,100) > 50/_rearQuirk>>
							The excess estrogen-laced growth hormones @@.green;cause $his 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 $his breasts.@@
							<<set $tanks[_inc].boobs += 200>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 60>>
							The excess estrogen-laced growth hormones @@.green;causes $his hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 12*_rearQuirk && random(1,100) > 50/_rearQuirk>>
							The excess estrogen-laced growth hormones @@.green;cause $his 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 $his breasts.@@
							<<set $tanks[_inc].boobs += 100>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 70>>
							The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 12*_rearQuirk && random(1,100) > 60/_rearQuirk>>
							The excess estrogen-laced growth hormones @@.green;cause $his 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 $his breasts.@@
							<<set $tanks[_inc].boobs += 100>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 80>>
							The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 12*_rearQuirk && random(1,100) > 70/_rearQuirk>>
							The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@
							<<set $tanks[_inc].butt++>>
						<</if>>
					<</if>>
				<<elseif $tanks[_inc].balls > 0>>
					<<set $tanks[_inc].pubertyXY = 1>>
					<<if $tanks[_inc].hormoneBalance > -500>>
						<<set $tanks[_inc].hormoneBalance -= 100>>
					<</if>>
					<<if $tanks[_inc].geneMods.NCS == 1>>
						/* NCS blocks hormonal growth of all secondary sexual characteristics */
						$His @@.orange;NCS blocks all growth@@ despite the excess testosterone-laced growth hormones flooding $his body.
					<<elseif $incubatorUpgradeSpeed == 52>>
						<<if $tanks[_inc].balls < 40>>
							The excess testosterone-laced growth hormones @@.green;cause $his 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 $his 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 $his 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 $his 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 $his 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 $his 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 $his 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 $his 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 $his 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 $his penis to swell.@@
							<<set $tanks[_inc].dick++>>
						<</if>>
					<</if>>
				<</if>>
			<<elseif $incubatorWeightSetting == 2>>
				Combined with the healthy food provided to $him, $his body grows readily.
				<<if $tanks[_inc].ovaries == 1>>
					<<set $tanks[_inc].pubertyXX = 1>>
					<<if $tanks[_inc].hormoneBalance < 500>>
						<<set $tanks[_inc].hormoneBalance += 100>>
					<</if>>
					<<if $seeHyperPreg == 1>>
						<<set $tanks[_inc].readyOva = random(15,25)>>
					<<else>>
						<<set $tanks[_inc].readyOva = random(2,6)>>
					<</if>>
					<<if $tanks[_inc].geneMods.NCS == 1>>
						/* NCS blocks hormonal growth of all secondary sexual characteristics */
						$His @@.orange;NCS blocks all growth@@ despite the excess estrogen-laced growth hormones flooding $his body.
					<<elseif $incubatorUpgradeSpeed == 52>>
						<<if $tanks[_inc].boobs < 4000>>
							The excess estrogen-laced growth hormones @@.green;rapidly balloon $his breasts.@@
							<<set $tanks[_inc].boobs += 1000>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 70>>
							The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 8*_rearQuirk && random(1,100) > 50/_rearQuirk>>
							The excess estrogen-laced growth hormones @@.green;cause $his 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 $his breasts.@@
							<<set $tanks[_inc].boobs += 500>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 80>>
							The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 8*_rearQuirk && random(1,100) > 50/_rearQuirk>>
							The excess estrogen-laced growth hormones @@.green;cause $his 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 $his breasts.@@
							<<set $tanks[_inc].boobs += 200>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 90>>
							The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 8*_rearQuirk && random(1,100) > 60/_rearQuirk>>
							The excess estrogen-laced growth hormones @@.green;cause $his 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 $his breasts.@@
							<<set $tanks[_inc].boobs += 100>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 95>>
							The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 8*_rearQuirk && random(1,100) > 70/_rearQuirk>>
							The excess estrogen-laced growth hormones @@.green;cause $his 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 $his breasts.@@
							<<set $tanks[_inc].boobs += 100>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 95>>
							The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 8*_rearQuirk && random(1,100) > 80/_rearQuirk>>
							The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@
							<<set $tanks[_inc].butt++>>
						<</if>>
					<</if>>
				<<elseif $tanks[_inc].balls > 0>>
					<<set $tanks[_inc].pubertyXY = 1>>
					<<if $tanks[_inc].hormoneBalance > -500>>
						<<set $tanks[_inc].hormoneBalance -= 100>>
					<</if>>
					<<if $tanks[_inc].geneMods.NCS == 1>>
						/* NCS blocks hormonal growth of all secondary sexual characteristics */
						$His @@.orange;NCS blocks all growth@@ despite the excess testosterone-laced growth hormones flooding $his body.
					<<elseif $incubatorUpgradeSpeed == 52>>
						<<if $tanks[_inc].balls < 10>>
							The excess testosterone-laced growth hormones @@.green;cause $his 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 $his 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 $his 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 $his 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 $his 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 $his 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 $his 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 $his 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 $his 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 $his penis to swell.@@
							<<set $tanks[_inc].dick++>>
						<</if>>
					<</if>>
				<</if>>
			<<else>>
				Since $his body has little to work with, $his growth is fairly minor.
				<<if $tanks[_inc].ovaries == 1>>
					<<set $tanks[_inc].pubertyXX = 1>>
					<<if $tanks[_inc].hormoneBalance < 500>>
						<<set $tanks[_inc].hormoneBalance += 100>>
					<</if>>
					<<if $seeHyperPreg == 1>>
						<<set $tanks[_inc].readyOva = random(10,15)>>
					<<else>>
						<<set $tanks[_inc].readyOva = random(2,4)>>
					<</if>>
					<<if $tanks[_inc].geneMods.NCS == 1>>
						/* NCS blocks hormonal growth of all secondary sexual characteristics */
						$His @@.orange;NCS blocks all growth@@ despite the excess estrogen-laced growth hormones flooding $his body.
					<<elseif $incubatorUpgradeSpeed == 52>>
						<<if $tanks[_inc].boobs < 2000>>
							The excess estrogen-laced growth hormones @@.green;rapidly balloon $his breasts.@@
							<<set $tanks[_inc].boobs += 700>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 90>>
							The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@
							<<set $tanks[_inc].hips += 2>>
						<</if>>
						<<if $tanks[_inc].butt < 6*_rearQuirk && random(1,100) > 70/_rearQuirk>>
							The excess estrogen-laced growth hormones @@.green;cause $his 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 $his breasts.@@
							<<set $tanks[_inc].boobs += 200>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 80>>
							The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 6*_rearQuirk && random(1,100) > 70/_rearQuirk>>
							The excess estrogen-laced growth hormones @@.green;cause $his 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 $his breasts.@@
							<<set $tanks[_inc].boobs += 50>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 80>>
							The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 6*_rearQuirk && random(1,100) > 90/_rearQuirk>>
							The excess estrogen-laced growth hormones @@.green;cause $his 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 $his breasts.@@
							<<set $tanks[_inc].boobs += 20>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 90>>
							The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 6*_rearQuirk && random(1,100) > 90/_rearQuirk>>
							The excess estrogen-laced growth hormones @@.green;cause $his 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 $his breasts.@@
							<<set $tanks[_inc].boobs += 10>>
						<</if>>
						<<if $tanks[_inc].hips < 2 && random(1,100) > 95>>
							The excess estrogen-laced growth hormones @@.green;cause $his hips to widen for childbirth.@@
							<<set $tanks[_inc].hips++>>
						<</if>>
						<<if $tanks[_inc].butt < 6*_rearQuirk && random(1,100) > 90/_rearQuirk>>
							The excess estrogen-laced growth hormones @@.green;cause $his rear to grow fatter.@@
							<<set $tanks[_inc].butt++>>
						<</if>>
					<</if>>
				<<elseif $tanks[_inc].balls > 0>>
					<<set $tanks[_inc].pubertyXY = 1>>
					<<if $tanks[_inc].hormoneBalance > -500>>
						<<set $tanks[_inc].hormoneBalance -= 100>>
					<</if>>
					<<if $tanks[_inc].geneMods.NCS == 1>>
						/* NCS blocks hormonal growth of all secondary sexual characteristics */
						$His @@.orange;NCS blocks all growth@@ despite the excess testosterone-laced growth hormones flooding $his body.
					<<elseif $incubatorUpgradeSpeed == 52>>
						<<if $tanks[_inc].balls < 6>>
							The excess testosterone-laced growth hormones @@.green;cause $his 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 $his 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 $his 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 $his 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 $his 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 $his 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 $his 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 $his 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 $his 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 $his penis to swell.@@
							<<set $tanks[_inc].dick++>>
						<</if>>
					<</if>>
				<</if>>
			<</if>>
		<<elseif $incubatorReproductionSetting == 1>>
			$His hormone levels are being carefully managed, @@.green;encouraging early puberty.@@
			<<if $tanks[_inc].ovaries == 1>>
				<<set $tanks[_inc].pubertyXX = 1>>
				<<set $tanks[_inc].hormoneBalance = 250>>
				<<if $tanks[_inc].geneMods.NCS == 1>>
					/* NCS blocks hormonal growth of all secondary sexual characteristics */
					$His @@.orange;NCS blocks growth@@ despite the added estrogen.
				<<else>>
					<<if $tanks[_inc].boobs < 400 && random(1,100) > 60>>
						The added estrogen @@.green;causes $his breasts to swell.@@
						<<set $tanks[_inc].boobs += 50>>
					<</if>>
					<<if $tanks[_inc].hips < 2 && random(1,100) > 90>>
						The added estrogen @@.green;causes $his hips to widen.@@
						<<set $tanks[_inc].hips++>>
					<</if>>
					<<if $tanks[_inc].butt < 5*_rearQuirk && random(1,100) > 80/_rearQuirk>>
						The added estrogen @@.green;causes $his butt to grow.@@
						<<set $tanks[_inc].butt++>>
					<</if>>
				<</if>>
			<<elseif $tanks[_inc].balls > 0>>
				<<set $tanks[_inc].pubertyXY = 1>>
				<<set $tanks[_inc].hormoneBalance = -250>>
				<<if $tanks[_inc].geneMods.NCS == 1>>
					/* NCS blocks hormonal growth of all secondary sexual characteristics */
					$His @@.orange;NCS blocks all growth@@ despite the added testosterone.
				<<else>>
					<<if $tanks[_inc].balls < 3 && random(1,100) > 80>>
						The added testosterone @@.green;causes $his balls to swell.@@
						<<set $tanks[_inc].balls++>>
					<</if>>
					<<if $tanks[_inc].dick < 3 && random(1,100) > 60>>
						The added testosterone @@.green;causes $his penis to grow.@@
						<<set $tanks[_inc].dick++>>
					<</if>>
				<</if>>
			<</if>>
		<<else>>
			<<if $tanks[_inc].hormoneBalance > 100>>
				<<set $tanks[_inc].hormoneBalance -= 50>>
			<<elseif $tanks[_inc].hormoneBalance < -100>>
				<<set $tanks[_inc].hormoneBalance += 50>>
			<</if>>
			<<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].hormoneBalance > 100>>
			<<set $tanks[_inc].hormoneBalance -= 50>>
		<<elseif $tanks[_inc].hormoneBalance < -100>>
			<<set $tanks[_inc].hormoneBalance += 50>>
		<</if>>
		<<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>>

	<<if ($incubatorPregAdaptationSetting == 1 && $tanks[_inc].genes == "XX") || ($incubatorPregAdaptationSetting == 2 && $tanks[_inc].genes == "XY") || $incubatorPregAdaptationSetting == 3>>

		The incubator is working on adapting $his abdomen and reproductive organs for future pregnancies.

		<<set _weekAdapt = $tanks[_inc].incubatorPregAdaptationInWeek * $incubatorUpgradeSpeed>>
		<<if isNaN(_weekAdapt)>> /* NaN check AFTER multiply operation, against it result is critical here. Need to be absolutely sure about this operation, not about just tank[x] property itself. This give me two very unpleasant hours to catch this */
			<<set $tanks[_inc].incubatorPregAdaptationInWeek = (15000 / 2000 - $tanks[_inc].pregAdaptation) / $tanks[_inc].growTime>>
		<</if>>
		<<set _weekAdapt = $tanks[_inc].incubatorPregAdaptationInWeek * $incubatorUpgradeSpeed>> /* Now it's should be fine */
		<<set _weekAdapt *= 1 + ($incubatorReproductionSetting / 5)>>
		<<set _weekAdapt *= 1 + ($tanks[_inc].hormoneBalance / 1500)>>
		/*And now we done*/
		<<set $tanks[_inc].pregAdaptation += _weekAdapt>>
		/* here goes side effect from intense and extreme settings: */
		<<if (random(0, 100) <= ($tanks[_inc].incubatorPregAdaptationPower - 1) * ($incubatorUpgradeSpeed / 2 + 1))>>
			<<switch random(1, 9)>> /*side effect selection*/
			<<case 1>>
				<<set $tanks[_inc].preg = -2>>
				It caused @@.red;reproductive damage@@ when excessive meddling damaged an organ.
			<<case 2>>
				<<if $tanks[_inc].ovaries == 1 || $tanks[_inc].mpreg == 1>>
					<<set $tanks[_inc].preg = -3>>
				<</if>>
				<<if $tanks[_inc].balls > 0>>
					<<set $tanks[_inc].ballType = "sterile">>
				<</if>>
				It caused @@.red;severe reproductive damage@@ when excessive hormones shut down the associated organs.
			<<case 3>>
				<<set $tanks[_inc].lactation = 1>>
				It has @@.orange;triggered a hormonal disorder,@@ causing $his breast glands begin producing milk.
			<<case 4>>
				<<set $tanks[_inc].bellySag = 100, $tanks[_inc].bellySagPreg = 100>>
				It activated @@.red;emergency protocols@@ when overpressure to $his abdominal tissues and skin reached critical levels. $His belly has lost muscle tone and has begun to strongly sag.
			<<case 5>>
				<<set $tanks[_inc].health.condition -= 15>>
				Overzealous prodding caused some @@.red;internal bleeding.@@
			<<case 6>>
				<<set $tanks[_inc].weight += 50>>
				An unexpected shift in hormones spurred @@.red;massive weight gain@@ before it could be corrected.
			<<case 7>>
				<<set $tanks[_inc].weight -= 50>>
				An unexpected shift in hormones spurred @@.red;massive weight loss@@ before it could be corrected.
			<<case 8>>
				<<set $tanks[_inc].boobs += 5000>>
				<<set $tanks[_inc].boobShape = "saggy">>
				An unexpected shift in hormones encouraged @@.green;explosive breast growth@@ before it could be corrected.
			<<case 9>>
				<<set $tanks[_inc].hips = 3>>
				A malfunction in the skeletal reconstruction software caused it to @@.green;overwiden $his hips.@@
			<</switch>>
		<</if>>
	<</if>>

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

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

repo_name: KnightBoulegard/fc

license: mit


code:
:: Incubator Retrieval Workaround [nobr]

<<set $nextLink = "AS Dump", $returnTo = "Main">>

<<if $readySlave != 0>>
	<<setLocalPronouns $readySlave>>
	$readySlave.slaveName has been discharged from $incubatorName and is ready for $his first ever inspection.

	<<set $activeSlave = $readySlave>>
	<<set $saleDescription = 0, $applyLaw = 0>>
	<<set $incubatorSlaves-->>
	<<include "Long Slave Description">>
	<<if $readySlave.tankBaby != 3>>
		<<if $incubatorOrgans.length > 0>>
			<<for _irw = 0; _irw < $incubatorOrgans.length; _irw++>>
				<<if $incubatorOrgans[_irw].ID == $incubatorOldID>>
					<<set _newOrgan = {type: $incubatorOrgans[_irw].type, weeksToCompletion: $incubatorOrgans[_irw].weeksToCompletion, ID: $activeSlave.ID}>>
					<<if _newOrgan.weeksToCompletion <= 0>>
						<<set $completedOrgans.push($incubatorOrgans[_irw])>>
					<<else>>
						<<set $organs.push(_newOrgan)>>
					<</if>>
					<<set $incubatorOrgans.deleteAt(_irw), _irw-->>
				<</if>>
			<</for>>
		<</if>>
		<<run newSlave($activeSlave)>>
		<<include "New Child Intro">>
	<<else>>
		A husk is ready to be used.

		//As expected, $he is a complete vegetable, but that is what you wanted after all. You lack the facilities to care for $him in this state, so you should do what you are planning quickly. Or you could sell $him to the Flesh Heap.//

		<<if $cash >= $surgeryCost>>

[[Contact the bodyswap surgeon.|husk Slave Swap Workaround]] //Will significantly increase the selected slave's upkeep.//

[[Sell the husk to Flesh Heap.|Main][cashX(Math.trunc(slaveCost($activeSlave)/3), "slaveTransfer")]]
//This body can be bought by the Flesh Heap for <<print cashFormat(Math.trunc(slaveCost($activeSlave)/3))>>//.
		<<else>>
			<<run cashX(Math.trunc(slaveCost($activeSlave)/3), "slaveTransfer")>>
			//You can't sustain $him and thus must sell $him for <<print cashFormat(Math.trunc(slaveCost($activeSlave)/3))>>.//
		<</if>>

	<</if>>
<<else>>
	The following slaves were discharged from $incubatorName:

	<<for _irw = 0; _irw < $newSlavePool.length; _irw++>>

		<<set $incubatorSlaves-->>
		<<set _newSlave = $newSlavePool[_irw].object>>

		Name: <<= SlaveFullName(_newSlave)>>

Mother:
		<<if _newSlave.mother > 0>>
			<<set _tempMom = getSlave(_newSlave.mother)>>
			<<if ndef _tempMom>>
				Unknown.
			<<else>>
				<<= SlaveFullName(_tempMom)>>
			<</if>>
		<<elseif _newSlave.mother == -1>>
			<<= PlayerName()>>.
		<<else>>
			Your former slave, $missingTable[_newSlave.mother].slaveName.
		<</if>>

Father:
		<<if _newSlave.father > 0>>
			<<set _tempDad = getSlave(_newSlave.father)>>
			<<if ndef _tempDad>>
				Unknown.
			<<else>>
				<<= SlaveFullName(_tempDad)>>
			<</if>>
		<<elseif _newSlave.father == -1>>
			<<= PlayerName()>>.
		<<elseif _newSlave.father == -2>>
			Unknown citizen.
		<<elseif _newSlave.father == -3>>
			Your former Master.
		<<elseif _newSlave.father == -4>>
			Another arcology's owner.
		<<elseif _newSlave.father == -5>>
			One of your clients.
		<<elseif _newSlave.father == -6>>
			Societal Elite.
		<<elseif _newSlave.father == -7>>
			Lab crafted.
		<<elseif _newSlave.father == -8>>
			//Error! Animal fathered children shouldn't be here!//
		<<elseif _newSlave.father == -9>>
			Futanari Sister.
		<<else>>
			<<if def $missingTable[_newSlave.father]>>
				Your former slave, $missingTable[_newSlave.father].slaveName.
			<<else>>
				Unknown.
			<</if>>
		<</if>>

		<<run newSlave(_newSlave)>>
		<<if $incubatorOrgans.length > 0>>
			<<for _irw2 = 0; _irw2 < $incubatorOrgans.length; _irw2++>>
				<<if $incubatorOrgans[_irw2].ID == $newSlavePool[_irw].ID>>
					<<set _newOrgan = {type: $incubatorOrgans[_irw2].type, weeksToCompletion: $incubatorOrgans[_irw2].weeksToCompletion, ID: _newSlave.ID}>>
					<<if _newOrgan.weeksToCompletion <= 0>>
						<<set $completedOrgans.push($incubatorOrgans[_irw2])>>
					<<else>>
						<<set $organs.push(_newOrgan)>>
					<</if>>
					<<set $incubatorOrgans.deleteAt(_irw2), _irw2-->>
				<</if>>
			<</for>>
		<</if>>

	<</for>>
	<<set $newSlavePool = 0>>
<</if>>


code:
:: Incubator Workaround [nobr]

<<if $tanks.length < $incubator>>
	<<set $activeChild.growTime = Math.trunc($targetAge*52)>>
	<<set $activeChild.incubatorPregAdaptationPower = $incubatorPregAdaptationPower>>
	<<if $incubatorPregAdaptationPower == 1>>
		<<set _fullAdapt = 45000 / 2000>>
	<<elseif $incubatorPregAdaptationPower == 2>>
		<<set _fullAdapt = 100000 / 2000>>
	<<elseif $incubatorPregAdaptationPower == 3>>
		<<set _fullAdapt = 150000 / 2000>>
	<<else>>
		<<set _fullAdapt = 15000 / 2000>>
	<</if>>
	<<set $activeChild.incubatorPregAdaptationInWeek = (_fullAdapt - $activeChild.pregAdaptation) / $activeChild.growTime>>
	<<set $tanks.push($activeChild)>>
	<<set $incubatorSlaves++>>
<</if>>


code:
:: KillSlave [nobr]

<<set _qualifiedFS = []>>
<<if $arcologies[0].FSRomanRevivalist != "unset">>
	<<set _qualifiedFS.push("roman revivalist"), _weapon = 'gladius'>>
<<elseif $arcologies[0].FSAztecRevivalist != "unset">>
	<<set _qualifiedFS.push("aztec revivalist"), _weapon = 'Tecpatl'>>
<<elseif $arcologies[0].FSEgyptianRevivalist != "unset">>
	<<set _qualifiedFS.push("egyptian revivalist"), _weapon = 'kopesh'>>
<<elseif $arcologies[0].FSEdoRevivalist != "unset">>
	<<set _qualifiedFS.push("edo revivalist"), _weapon = 'katana'>>
<<elseif $arcologies[0].FSArabianRevivalist != "unset">>
	<<set _qualifiedFS.push("arabian revivalist"), _weapon = 'scimitar'>>
<<elseif $arcologies[0].FSChineseRevivalist != "unset">>
	<<set _qualifiedFS.push("chinese revivalist"), _weapon = 'jian'>>
<</if>>

<<if _qualifiedFS.length < 1>>
	<<set _weapon = 'handgun'>>
<</if>>

<<if canWalk($activeSlave)>>
	You call $activeSlave.slaveName into your office.
<<else>>
	You have $activeSlave.slaveName brought into your office.
<</if>>

<<if $activeSlave.fuckdoll <= 0>>
	$He looks at you
	<<if $activeSlave.fetish != "mindbroken">>
		with
		<<if $activeSlave.devotion > 50>>
			adoration
		<<elseif ($activeSlave.devotion) > 20 && ($activeSlave.devotion <= 50)>>
			calmly
		<<elseif ($activeSlave.devotion >= -20) && ($activeSlave.devotion <= 20)>>
			apprehension
		<<elseif $activeSlave.devotion < -20>>
			hatred
		<</if>>
	<<else>>
		blankly
	<</if>>
	and waits for you to continue.
<<else>>
	It's hard to tell the expression on the Fuckdoll's face, but your guess is it's
	<<if $activeSlave.fetish != "mindbroken">>
		one of
		<<if $activeSlave.devotion > 50>>
			adoration.
		<<elseif ($activeSlave.devotion) > 20 && ($activeSlave.devotion <= 50)>>
			calm.
		<<elseif ($activeSlave.devotion >= -20) && ($activeSlave.devotion <= 20)>>
			apprehension.
		<<elseif $activeSlave.devotion < -20>>
			hatred.
		<</if>>
	<<else>>
		blank.
	<</if>>
<</if>>
	You tell $him that you've gotten tired of having $him around and that you have decided it is time you got rid of $him.

<<if $activeSlave.fuckdoll <= 0>>
	<<if $activeSlave.fetish != "mindbroken">> $His expression changes to one of
		<<if $activeSlave.devotion > 50>>
			pure sorrow
		<<elseif ($activeSlave.devotion) > 20 && ($activeSlave.devotion <= 50)>>
			sadness
		<<else>>
			relief
		<</if>>
		until
	<<else>>
		$He just nods dumbly and continues to watch you with a vacant expression, even as
	<</if>>
<<else>>
	$He simply nods, not being able to see
<</if>>
you <<if canHear($activeSlave)>>quietly <</if>>reach behind your desk and pull out your trusty _weapon<<if $activeSlave.fuckdoll <= 0 && canSee($activeSlave)>><<if $activeSlave.fetish != "mindbroken">>, at which point abject fear fills $his face. $He immediately <<if hasBothLegs($activeSlave)>>drops to $his knees and <</if>>begins openly begging for you to have mercy.<<else>>, to which $he still doesn't respond.<</if>><<else>>.<</if>>

<<if $killChoice == -1>>

<<link "Kill $him">><<set $killChoice = 0>>
	<<replace "#killScene">>
		<<if $Bodyguard>>
			<<setLocalPronouns $Bodyguard 2>>
		<</if>>

		<<set _qualifiedFS = []>>
		<<if $arcologies[0].FSRomanRevivalist != "unset">>
			<<set _qualifiedFS.push("roman revivalist"), _weapon = 'gladius'>>
		<<elseif $arcologies[0].FSAztecRevivalist != "unset">>
			<<set _qualifiedFS.push("aztec revivalist"), _weapon = 'Tecpatl'>>
		<<elseif $arcologies[0].FSEgyptianRevivalist != "unset">>
			<<set _qualifiedFS.push("egyptian revivalist"), _weapon = 'kopesh'>>
		<<elseif $arcologies[0].FSEdoRevivalist != "unset">>
			<<set _qualifiedFS.push("edo revivalist"), _weapon = 'katana'>>
		<<elseif $arcologies[0].FSArabianRevivalist != "unset">>
			<<set _qualifiedFS.push("arabian revivalist"), _weapon = 'scimitar'>>
		<<elseif $arcologies[0].FSChineseRevivalist != "unset">>
			<<set _qualifiedFS.push("chinese revivalist"), _weapon = 'jian'>>
		<</if>>

		<<if $activeSlave.fuckdoll <= 0 && $activeSlave.fetish != "mindbroken">>
			You simply smile at $him and tell $him not to worry
		<<else>>
			You say nothing
		<</if>>
		as you continue

		<<if _qualifiedFS.length > 0>>
			sharpening your _weapon.
		<<else>>
			threading on a suppressor.
		<</if>>

		$activeSlave.slaveName
		<<if $activeSlave.fuckdoll <= 0 && $activeSlave.fetish != "mindbroken">>
			gives an audible sigh of relief and begins to thank you profusely, though $his thanks are cut short as the sound of
		<<else>>
			continues to stand there dumbly until the sound of
		<</if>>

		<<if _qualifiedFS.length > 0>>
			a sharp edge slicing though flesh
		<<else>>
			a suppressed gunshot
		<</if>>

		rings through the room. You have another servant clean up the mess as you continue with what you were previously doing.

		<<for _ss = 0; _ss < $slaves.length; _ss++>>
			<<if $activeSlave.mother == $slaves[_ss].ID>>
				<<setLocalPronouns $slaves[_ss] 2>>
				$slaves[_ss].slaveName is @@.mediumorchid;grieved@@ that you have killed _his2 $daughter.

				<<set $slaves[_ss].devotion -= 30>>
			<</if>>
			<<if $activeSlave.father == $slaves[_ss].ID>>
				<<setLocalPronouns $slaves[_ss] 2>>
				$slaves[_ss].slaveName is @@.mediumorchid;disappointed@@ that you have killed _his2 $daughter.

				<<set $slaves[_ss].devotion -= 20>>
			<</if>>
			<<if $activeSlave.ID == $slaves[_ss].father>>
				<<setLocalPronouns $slaves[_ss] 2>>
				$slaves[_ss].slaveName is @@.mediumorchid;saddened@@ that you have killed _his2 father.

				<<set $slaves[_ss].devotion -= 20>>
			<</if>>
			<<if $activeSlave.ID == $slaves[_ss].mother>>
				<<setLocalPronouns $slaves[_ss] 2>>
				$slaves[_ss].slaveName is @@.mediumorchid;grieved@@ that you have killed _his2 mother.

				<<set $slaves[_ss].devotion -= 30>>
			<</if>>
			<<switch areSisters($activeSlave, $slaves[_ss])>>
			<<case 1>>
				<<setLocalPronouns $slaves[_ss] 2>>
				$slaves[_ss].slaveName is @@.mediumorchid;devastated@@ that you have killed _his2 twin.

				<<set $slaves[_ss].devotion -= 30>>
			<<case 2>>
				<<setLocalPronouns $slaves[_ss] 2>>
				$slaves[_ss].slaveName is @@.mediumorchid;grieved@@ that you have killed _his2 $sister.

				<<set $slaves[_ss].devotion -= 30>>
			<<case 3>>
				<<setLocalPronouns $slaves[_ss] 2>>
				$slaves[_ss].slaveName is @@.mediumorchid;disheartened@@ that you have killed _his2 half-<<= $sister>>.

				<<set $slaves[_ss].devotion -= 20>>
			<</switch>>
		<</for>>
		<<if $activeSlave.relationship > 0>>
			<<set _ss = $slaveIndices[$activeSlave.relationshipTarget]>>
			<<if (def _ss) && $slaves[_ss].fetish != "mindbroken">>
				<<setLocalPronouns $slaves[_ss] 2>>
				$slaves[_ss].slaveName is @@.mediumorchid;grieved@@ that you have killed _his2 best source of comfort and companionship in a life of bondage.

				<<set $slaves[_ss].devotion -= $slaves[_ss].relationship*10>>
				<<set $display = 1>>
			<</if>>
		<<elseif $activeSlave.relationship == -3>>
			Killing one of your slave $wives is @@.red;socially unacceptable.@@ In addition, your other devoted slaves are @@.gold;worried@@ that you may not respect their status.

			<<run repX(-200, "event")>>
			<<set $display = 1>>
			<<for _ss = 0; _ss < $slaves.length; _ss++>>
				<<if $slaves[_ss].devotion > 50>>
					<<set $slaves[_ss].trust -= 10>>
				<</if>>
			<</for>>
		<</if>>
		<<if $activeSlave.rivalry != 0>>
			<<set _ss = $slaveIndices[$activeSlave.rivalryTarget]>>
			<<if (def _ss) && $slaves[_ss].fetish != "mindbroken">>
				<<setLocalPronouns $slaves[_ss] 2>>
				$slaves[_ss].slaveName is @@.hotpink;pleased@@ that $he won't have to see _his2 rival any more.

				<<set $slaves[_ss].devotion += $slaves[_ss].rivalry*3>>
				<<set $display = 1>>
			<</if>>
		<</if>>

		<<= removeActiveSlave() >>
		<<set $nextLink = "Main", $killChoice = -1>>
	<</replace>><</link>>

<<link "Have mercy on $him">><<set $killChoice = 1>>
	<<replace "#killScene">>

		<<if $activeSlave.fuckdoll <= 0 && $activeSlave.fetish != "mindbroken">>
			You make a show of considering sparing $his life, then, with a heavy sigh, unbuckle your pants and sit down at your desk. You beckon to $him, and $he just about trips over $himself as $he hastily makes $his way over to you. $His blowjob isn't the best you've ever had, $him @@.gold;sobbing@@ as much as $he is; but $his enthusiasm more than makes up for it. After you finish deep in $his throat, $he sits back and wipes away $his tears, sniffling and @@.hotpink;thanking you again@@ for giving $him another chance.

			<<if $activeSlave.devotion <= 30>>
				<<set $activeSlave.devotion = 30>>
			<<else>>
				<<set $activeSlave.devotion += 20>>
			<</if>>
			<<set $activeSlave.trust = -100>>
		<<else>>
			You change your mind, and with a wave of your hand, send $activeSlave.slaveName back to $his duties. Maybe some other time.
		<</if>>
		<<set $killChoice = -1>>
	<</replace>><</link>>
	<<if $activeSlave.assignment != "guard you" && $pit && $Bodyguard && $activeSlave.fuckdoll <= 0 && $activeSlave.fetish != "mindbroken">>
		<<if ($pitLethal == 1)>>

<<link "Let $him win $his life in combat">><<set $killChoice = 2>>
			<<replace "#killScene">>
				    You tell $him that you'll let your bodyguard $Bodyguard.slaveName decide $his fate — if $he wants to live, $he'll have to beat _him2 in hand-to-hand combat in $pitName.
				<<if $activeSlave.skill.combat == 0>>
					The fear on $his face is palpable, though $he nods slowly and agrees, not seeing another choice.
				<<else>>
					$He nods $his head and straightens up, as though mentally preparing $himself for the fight for $his life.
				<</if>>

				<<set $slaveFightingBG = $activeSlave, $pitAnimal = 0, $killChoice = -1>>
			<</replace>><</link>>
		<<else>>

//You must allow lethal fights in $pitName to have $activeSlave.slaveName fight your bodyguard for $his life//
		<</if>>
	<</if>>

<<else>>
	<<if $activeSlave.fetish != "mindbroken" || $activeSlave.fuckdoll <= 0>>
		You abruptly cut $his begging short once you
	<<else>>
		You change your mind as you suddenly
	<</if>>
	realize $slaveFightingBG.slaveName is already fighting your bodyguard $Bodyguard.slaveName for $his life this week. [[Cancel the fight|KillSlave][$killChoice = -1]]
<</if>>