:: Incubator [nobr]
 

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

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

<<set $readySlaves to 0>>
<<set $readySlave to 0>>
<<set $incubatorSlaves to 0>>
<<for _i to 0; _i < $tanks.length; _i++>>
		<<set $incubatorSlaves += 1>>
<</for>>

<br><br>
$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 to 0, $incubatorUpgradeSpeed = 0, $incubatorUpgradeWeight = 0, $incubatorUpgradeMuscles = 0, $incubatorUpgradeReproduction = 0, $tanks = []]]
<</if>>

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

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

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

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

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

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

<<if $incubatorSlaves > 0>>
<<for $i to 0; $i < $tanks.length; $i++>>
		<<if $tanks[$i].growTime <= 0>>
			<<set $readySlaves = 1>>
			<br><br>@@color:pink;$tanks[$i].slaveName@@ is ready to be released from her tank.
		<<else>>
			<br><br>@@color:pink;<<print $tanks[$i].slaveName>>'s@@ growth is currently being accelerated. She will be ready for release in about <<print Math.round($tanks[$i].growTime/$incubatorUpgradeSpeed)>> weeks.
		<</if>>
		<<if $incubatorUpgradeWeight == 1>>
			<br>
			<<if $incubatorWeightSetting == 1>>
				Her weight is not being properly managed, saving costs but likely causing excessive weight gain.
			<<elseif $incubatorWeightSetting == 2>>
				Her weight is being carefully managed; she will be released at a healthy weight.
			<<elseif $incubatorWeightSetting == 0>>
				Weight management systems are offline; she will likely be malnourished.
			<</if>>
		<</if>>
		<<if $incubatorUpgradeMuscles == 1>>
			<br>
			<<if $incubatorMusclesSetting == 2>>
				Her strength levels are purposefully set highter than recommended; excessive muscle gain likely.
			<<elseif $incubatorMusclesSetting == 1>>
				Her musculature is being carefully managed; she will be released with near normal strength.
			<<elseif $incubatorMusclesSetting == 0>>
				Strength management systems are offline; she will likely be released extremely weak.
			<</if>>
		<</if>>
		<<if $incubatorUpgradeReproduction == 1>>
			<br>
			<<if $incubatorReproductionSetting == 2>>
				Her hormone levels are purposefully set highter than recommended; over-active reproductive systems likely.
			<<elseif $incubatorReproductionSetting == 1>>
				Her hormone levels are being carefully managed; she will be released with with fully functional reproductive organs.
			<<elseif $incubatorReproductionSetting == 0>>
				Reproduction management systems are offline; she will undergo normal puberty.
			<</if>>
		<</if>>
<</for>>
<</if>>

<br><br>

<<if $incubatorUpgradeWeight == 1>>
	<<if $incubatorWeightSetting == 1>>
		Weight is not being properly managed, saving costs but likely causing excessive weight gain. [[Monitor|Incubator][$incubatorWeightSetting = 2]] | [[Disable|Incubator][$incubatorWeightSetting = 0]]
	<<elseif $incubatorWeightSetting == 2>>
		Weight is being carefully managed; children will be released at a healthy weight. [[Estimate only|Incubator][$incubatorWeightSetting = 1]] | [[Disable|Incubator][$incubatorWeightSetting = 0]]
	<<elseif $incubatorWeightSetting == 0>>
		Weight management systems are offline; children will likely be malnourished. [[Activate|Incubator][$incubatorWeightSetting = 2]]
	<</if>>
<</if>>
<br>
<<if $incubatorUpgradeMuscles == 1>>
	<<if $incubatorMusclesSetting == 2>>
		Strength levels are purposefully set highter than recommended; excessive muscle gain likely. [[Limit|Incubator][$incubatorMusclesSetting = 1]] | [[Disable|Incubator][$incubatorMusclesSetting = 0]]
	<<elseif $incubatorMusclesSetting == 1>>
		Musculature is being carefully managed; children will be released with near normal strength. [[Overload|Incubator][$incubatorMusclesSetting = 2]] | [[Disable|Incubator][$incubatorMusclesSetting = 0]]
	<<elseif $incubatorMusclesSetting == 0>>
		Strength management systems are offline; children will likely be released extremely weak. [[Activate|Incubator][$incubatorMusclesSetting = 1]]
	<</if>>
<</if>>
<br>
<<if $incubatorUpgradeReproduction == 1>>
	<<if $incubatorReproductionSetting == 2>>
		Hormone levels are purposefully set highter than recommended; over-active reproductive systems likely. [[Limit|Incubator][$incubatorReproductionSetting = 1]] | [[Disable|Incubator][$incubatorReproductionSetting = 0]]
	<<elseif $incubatorReproductionSetting == 1>>
		Hormone levels are being carefully managed; children will be released with with fully functional reproductive organs. [[Overload|Incubator][$incubatorReproductionSetting = 2]] | [[Disable|Incubator][$incubatorReproductionSetting = 0]]
	<<elseif $incubatorReproductionSetting == 0>>
		Reproduction management systems are offline; children will undergo normal puberty. [[Activate|Incubator][$incubatorReproductionSetting = 1]]
	<</if>>
<</if>>

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

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


src/pregmod/incubator.tw