:: Dairy Report [nobr]

<span id="dairystats">
</span>

<<set _MMWorkout = 0>>

<<set _slaves = App.Utils.sortedEmployees(App.Entity.facilities.dairy)>>
<<set _DL = _slaves.length, _SL = $slaves.length, $bioreactorPerfectedID = 0, $legendaryBallsID = 0, $legendaryCowID = 0, $milkmaidDevotionBonus = 1, $milkmaidHealthBonus = 0, $milkmaidTrustBonus = 1, $milkmaidDevotionThreshold = 45, $milkmaidTrustThreshold = 35, _anusesStretched = 0, _birthers = 0, _births = 0, _cumWeek = 0, _femCumWeek = 0, _FLsFetish = 0, _milkWeek = 0, _balltacular = 0, _boobtacular = 0, _careerForgotten = 0, _chemMinor = 0, _chemSevere = 0, _desterilized = 0, _hatefilled = 0, _horrified = 0, _intelligenceLost = 0, _mindbroken = 0, _profits = 0, _skillsLost = 0, _stupidified = 0, _vaginasStretched = 0, _cmSlave = 0, _dsSlave = 0, _hfSlave = 0, _hrSlave = 0, _slSlave = 0, _cfSlave = 0, _stSlave = 0, _btSlave = 0>>

<!-- Statistics gathering -->
<<set $facility = $facility || {}, $facility.dairy = initFacilityStatistics($facility.dairy)>>

<<if ($Milkmaid != 0)>>
	<<set _FLs = $slaveIndices[$Milkmaid.ID]>>
	<<set _milkmaidImpregnated = 0, _milkers = 0, _cummers = 0, _breeders = 0, _prostateStim = 0>>

	<<if (_DL > 0)>>
		<<for _slave range _slaves>>
			<<if _slave.lactation > 0>>
				<<set _milkers++>>
			<</if>>
			<<if _slave.balls > 0 && _slave.ballType == "human">>
				<<set _cummers++>>
			<</if>>
			<<if (_slave.bellyPreg >= 500 && $dairyPregSetting > 0)>>
				<<set _breeders++>>
			<</if>>
			<<if ($milkmaidImpregnates == 1) && (canPenetrate($Milkmaid)) && $Milkmaid.pubertyXY == 1>>
				<<if (canImpreg(_slave, $Milkmaid))>>
					<<set _slave.preg = 1, _slave.pregSource = $Milkmaid.ID, _slave.pregKnown = 1, _slave.pregWeek = 1, _milkmaidImpregnated++>>
					<<if _slave.mpreg == 1>>
						<<set _slave.counter.anal += 10, $analTotal += 10>>
					<<else>>
						<<set _slave.counter.vaginal += 10, $vaginalTotal += 10>>
					<</if>>
					<<set _slave.pregType = setPregType(_slave)>>
					<<set WombImpregnate(_slave, _slave.pregType, $Milkmaid.ID, 1)>>
				<</if>>
			<</if>>
			/* how much effort the MM must take to force a slave into a stall */
			<<if _slave.devotion <= 20>>
				<<set _MMWorkout++>>
			<</if>>
			<<if _slave.trust < 20>>
				<<set _MMWorkout++>>
			<</if>>
			<<if _slave.muscles >= 30 || _slave.muscles < -30>>
				<<set _MMWorkout++>>
			<</if>>
			<<if _slave.weight >= 70>>
				<<set _MMWorkout++>>
			<</if>>
			<<if _slave.weight >= 160>>
				<<set _MMWorkout++>>
			<</if>>
			<<if _slave.boobs >= 20000>>
				<<set _MMWorkout++>>
			<</if>>
			<<if _slave.balls >= 30>>
				<<set _MMWorkout++>>
			<</if>>
			<<if _slave.belly >= 5000>>
				<<set _MMWorkout++>>
			<</if>>
			<<if !canWalk(_slave)>> /* big bonus if they can't move themselves and are fat as cows */
				<<if _slave.weight >= 70>>
					<<set _MMWorkout += 2>>
				<</if>>
				<<if _slave.weight >= 160>>
					<<set _MMWorkout += 2>>
				<</if>>
				<<if _slave.boobs >= 20000>>
					<<set _MMWorkout += 2>>
				<</if>>
				<<if _slave.balls >= 30>>
					<<set _MMWorkout += 2>>
				<</if>>
				<<if _slave.belly >= 5000>>
					<<set _MMWorkout += 2>>
				<</if>>
			<</if>>
			<<if ($dairyStimulatorsSetting < 2) && ($Milkmaid.dick > 4) && (canPenetrate($Milkmaid)) && _prostateStim != 1>>
				<<if (_slave.balls > 0) && (_slave.prostate > 0)>>
					<<set _prostateStim = 1>>
				<</if>>
			<</if>>
		<</for>>
	<</if>>

	<<if $slaves[_FLs].health.condition < 90>>
		<<set $slaves[_FLs].curatives = 2>>
	<<else>>
		<<set $slaves[_FLs].curatives = 0>>
	<</if>>
	<<if ($slaves[_FLs].diet != "healthy")>>
		<<set ($slaves[_FLs].diet = "healthy")>>
	<</if>>
	<<if $slaves[_FLs].devotion <= 60>>
		<<set $slaves[_FLs].devotion += 5>>
	<</if>>
	<<if $slaves[_FLs].trust < 60>>
		<<set $slaves[_FLs].trust += 5>>
	<</if>>
	<<if ($slaves[_FLs].skill.oral > 0)>>
		<<set $milkmaidDevotionBonus += Math.trunc($slaves[_FLs].skill.oral/30)>>
	<</if>>
	<<if ($slaves[_FLs].health.condition >= 80)>>
		<<set $milkmaidHealthBonus++>>
	<</if>>
	<<if $slaves[_FLs].rules.living != "luxurious">>
		<<set $slaves[_FLs].rules.living = "luxurious">>
	<</if>>
	<<if $slaves[_FLs].fetishStrength <= 95>>
		<<if _milkers >= _cummers && _milkers >= _breeders>>
			<<if $slaves[_FLs].fetish != "boobs">>
				<<if fetishChangeChance($slaves[_FLs]) > random(0,100)>>
					<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1, $slaves[_FLs].fetish = "boobs">>
				<</if>>
			<<elseif $slaves[_FLs].fetishKnown == 0>>
				<<set _FLsFetish = 1, $slaves[_FLs].fetishKnown = 1>>
			<<else>>
				<<set _FLsFetish = 2, $slaves[_FLs].fetishStrength += 4>>
			<</if>>
		<<elseif _cummers >= _breeders>>
			<<if $slaves[_FLs].fetish != "cumslut">>
				<<if fetishChangeChance($slaves[_FLs]) > random(0,100)>>
					<<set _FLsFetish = 3, $slaves[_FLs].fetishKnown = 1, $slaves[_FLs].fetish = "cumslut">>
				<</if>>
			<<elseif $slaves[_FLs].fetishKnown == 0>>
				<<set _FLsFetish = 3, $slaves[_FLs].fetishKnown = 1>>
			<<else>>
				<<set _FLsFetish = 4, $slaves[_FLs].fetishStrength += 4>>
			<</if>>
		<<else>>
			<<if $slaves[_FLs].fetish != "pregnancy">>
				<<if fetishChangeChance($slaves[_FLs]) > random(0,100)>>
					<<set _FLsFetish = 5, $slaves[_FLs].fetishKnown = 1, $slaves[_FLs].fetish = "pregnancy">>
				<</if>>
			<<elseif $slaves[_FLs].fetishKnown == 0>>
				<<set _FLsFetish = 5, $slaves[_FLs].fetishKnown = 1>>
			<<else>>
				<<set _FLsFetish = 6, $slaves[_FLs].fetishStrength += 4>>
			<</if>>
		<</if>>
	<</if>>
	<<run getSlaveStatisticData($Milkmaid, $facility.dairy)>>
	<<set $Milkmaid = $slaves[_FLs], $i = _FLs>>
	<<setLocalPronouns $Milkmaid>>
	&nbsp;&nbsp;&nbsp;&nbsp;<<= SlaveFullName($Milkmaid)>> is serving as your Milkmaid.
	<<if $Milkmaid.relationship == -3 && $Milkmaid.devotion > 50>>
		<<set $milkmaidDevotionBonus += 2, $milkmaidTrustBonus += 2>>
		$He tries $his best to be your perfect farm<<= $wife>>.
	<</if>>
	<<if _milkmaidImpregnated > 0>>
		It's $his responsibility to keep $his charges pregnant, and $he constantly
		<<if _milkmaidImpregnated == 1>>
			breeds the one fertile cow.
		<<else>>
			fills the _milkmaidImpregnated cows' cunts with $his cum.
		<</if>>
		<<if $Milkmaid.career == "a breeding bull">>
			$He was conditioned to fill empty wombs, so $he takes a @@.hotpink;deep pleasure@@ in $his job.
			<<set $slaves[_FLs].devotion++>>
		<<elseif ($Milkmaid.fetish == "pregnancy" && $Milkmaid.fetishKnown == 1)>>
			$He has a pregnancy fetish, so $he finds $his job @@.hotpink;quite enjoyable,@@ especially when $he gets to watch the cows swell with $his children.
			<<set $slaves[_FLs].devotion += Math.ceil($slaves[_FLs].fetishStrength/25)>>
			<<set $slaves[_FLs].fetishStrength += 2>>
		<</if>>
		<<set _Tmult = (_milkmaidImpregnated * 10), $slaves[_FLs].counter.penetrative += _Tmult, $Milkmaid.counter.penetrative += _Tmult, $penetrativeTotal += _Tmult>>
		<<set $slaves[_FLs].need = 0>>
	<</if>>
	<<if (_FLsFetish == 1)>>
		In $his line of work, $he touches more breasts than even you do. $He lives in an atmosphere of quivering, heaving, milky breastflesh; of girls who shudder and moan when $he touches their creamy nipples. $He has @@.lightcoral;become more of a breast $girl.@@
	<<elseif (_FLsFetish == 2)>>
		It's a hard life, pulling teats and washing cows, but it does @@.lightsalmon;make $him more of a breast fetishist.@@
	<<elseif (_FLsFetish == 3)>>
		In $his line of work, $he touches more dicks and balls than most sluts. $He lives in an atmosphere of constant orgasm and ejaculation; of girls who shudder and moan when $he touches their engorged members. $He has @@.lightcoral;become more of a cum $girl.@@
	<<elseif (_FLsFetish == 4)>>
		It's a hard life, cupping balls, cleaning dicks, and observing semen quality, but it does @@.lightsalmon;make $him more of a cum fetishist.@@
	<<elseif (_FLsFetish == 5)>>
		In $his line of work, $he fondles more pregnancies than most clinics. $He lives in an atmosphere of swollen, hanging, baby-filled bellies; of girls who shudder and moan when $he runs $his hands across their bellies. $He has @@.lightcoral;grown a taste for girls laden with child.@@
	<<elseif (_FLsFetish == 6)>>
		It's a hard life, washing bellies and inspecting pussies, but it does @@.lightsalmon;make $him more of a pregnancy fetishist.@@
	<</if>>
	<<if ($Milkmaid.muscles > 30)>>
		<<set $milkmaidHealthBonus++>>
		$His muscles help $him handle the fattest or most reluctant cow.
	<</if>>
	<<if (_MMWorkout > random(1,30-$Milkmaid.geneticQuirks.mLoss+$Milkmaid.geneticQuirks.mGain)) && $Milkmaid.muscles < 60>>
		Constantly having to wrestle unruly or aiding heavy cows into their stalls forces $him to @@.lime;build muscle.@@
		<<set $slaves[_FLs].muscles++>>
	<</if>>
	<<if ($Milkmaid.skill.oral > 30)>>
		$His skilled tongue helps $him keep $his cattle happy.
	<</if>>
	<<if ($Milkmaid.skill.oral < 90)>>
		<<= SkillIncrease.Oral($slaves[_FLs], 3)>>
	<</if>>
	<<if ($Milkmaid.sexualQuirk == "caring")>>
		<<set $milkmaidTrustBonus++>>
		$He's very caring, and does $his best to get the cows to trust $him.
	<</if>>
	<<if ($Milkmaid.behavioralQuirk == "funny")>>
		<<set $milkmaidTrustBonus++>>
		$He's funny, and does $his best to get the cows to trust $him by keeping them laughing.
	<</if>>
	<<if setup.milkmaidCareers.includes($Milkmaid.career)>>
		<<set $milkmaidHealthBonus++>>
		$He has career experience dealing with milk animals.
	<<elseif $Milkmaid.skill.milkmaid >= $masteredXP>>
		<<set $milkmaidHealthBonus++>>
		$He has experience harvesting slave products from working for you.
	<<else>>
		<<set $slaves[_FLs].skill.milkmaid += random(1,Math.ceil(($Milkmaid.intelligence+$Milkmaid.intelligenceImplant)/15) + 8)>>
	<</if>>
	<<if _prostateStim == 1>>
		$He uses $his turgid cock to give prostate stimulation to slaves that need help ejaculating.
		<<set $slaves[_FLs].need -= 50>>
	<</if>>
	<<set $milkmaidDevotionThreshold += (5*$milkmaidDevotionBonus), $milkmaidTrustThreshold += (5*$milkmaidTrustBonus)>>
	<<for _slave range _slaves>>
		<<set $i = $slaveIndices[_slave.ID]>>
		<<if $Milkmaid.rivalryTarget == _slave.ID>>
			<<setLocalPronouns _slave 2>>
			$He either neglects or harasses $his <<print rivalryTerm($Milkmaid)>>, _slave.slaveName, making sure _he2 is unhappy and uncomfortable.
			<<set _slave.devotion -= 3, _slave.trust -= 3>>
			<<if random(1,100) > 65>>
				<<set $Milkmaid.rivalry++, $slaves[_FLs].rivalry++, _slave.rivalry++>>
			<</if>>
		<<elseif $Milkmaid.relationshipTarget == _slave.ID>>
			<<setLocalPronouns _slave 2>>
			$He dotes over $his <<print relationshipTerm($Milkmaid)>>, _slave.slaveName, making sure _he2 is happy and comfortable.
			<<set _slave.devotion++, _slave.trust++>>
		<<elseif areRelated($Milkmaid, _slave)>>
			<<setLocalPronouns _slave 2>>
			$He pays special attention to $his <<print relativeTerm($Milkmaid,_slave)>>, _slave.slaveName, making sure _he2 is well kept and happy.
			<<set _slave.trust++>>
		<</if>>
		<<if _slave.prestigeDesc == "$He is remembered for winning best in show as a dairy cow.">>
			<<if (_slave.lactation > 0) && ((_slave.boobs-_slave.boobsImplant) > 6000)>>
				$He spends extra time with _slave.slaveName, the well-known cow. $He is fascinated by _slave.slaveName's massive _slave.boobs cc breasts and spends extra time massaging and kneading them to maximize production.
				<<set _slave.devotion += 3, _slave.trust += 3>>
			<<else>>
				$He is disappointed that the well-known cow _slave.slaveName<<if (_slave.lactation == 0)>> isn't producing milk anymore. <<else>>'s breasts have shrunken considerably from their heyday.<</if>>
			<</if>>
		<</if>>
		<<if _slave.prestigeDesc == "$He is remembered for winning best in show as a cockmilker.">>
			<<if ((_slave.balls > 6) && (_slave.dick != 0)) || ((_slave.balls > 4) && (_slave.dick != 0) && (_slave.prostate > 1))>>
				$He spends extra time with _slave.slaveName, the massive ejaculating cow. $He can't help but massage the cow's dick and testes to stimulate them further and coax more from them.
				<<set _slave.devotion += 3, _slave.trust += 3>>
			<<else>>
				$He is disappointed that the (formerly) massive ejaculating cow _slave.slaveName<<if _slave.balls == 0 || _slave.dick == 0>> is incapable of giving cum<<elseif _slave.prostate < 2>> no longer possesses a hyperactive prostate<<else>>'s balls are considerably smaller than at their heyday<</if>>.
			<</if>>
		<</if>>
		<<if _slave.prestigeDesc == "$He is remembered for winning best in show as a breeder." && _slave.bellyPreg >= 1500>>
			<<setLocalPronouns _slave 2>>
			$He spends extra time with _slave.slaveName, the well-known breeder. $Milkmaid.slaveName is fascinated by _his2 growing pregnancy and popular womb. $He makes sure _his2 belly and its occupants are nice and comfortable.
			<<set _slave.devotion += 3, _slave.trust += 3>>
		<</if>>
	<</for>>
<</if>>

<<set _Tadd = ($bioreactorsXY + $bioreactorsXX + $bioreactorsHerm + $bioreactorsBarren)>>
<<if (_DL + _Tadd > 0)>>
	<<if ($Milkmaid != 0)>><br><br><</if>>
	&nbsp;&nbsp;&nbsp;&nbsp;<<if (_DL != 1)>>''There are _DL cows in $dairyName.''<<else>>''There is one cow in $dairyName.''<</if>>
	<<if ($dairyRestraintsSetting > 1)>>
		The facility functions as an industrial slave products factory.
	<</if>>
	<<if (_Tadd > 0)>>
		_Tadd milking machines have permanent biological components, making a total of <<print _Tadd + _DL>> milk-producing bodies.
	<</if>>
<</if>>

<<if ($Milkmaid != 0)>>
	<<set $i = _FLs>> /* apply following SA passages to facility leader */
	<<if $showEWD != 0>>
		<br><br>
		/* 000-250-006 */
		<<if $seeImages && $seeReportImages>>
		<div class="imageRef tinyImg">
			<<= SlaveArt($slaves[_FLs], 0, 0)>>
		</div>
		<</if>>
		/* 000-250-006 */
		<span class='slave-name'><<= SlaveFullName($slaves[_FLs])>></span> is serving as your Milkmaid.
		<br>&nbsp;&nbsp;&nbsp;
		<<= App.SlaveAssignment.choosesOwnClothes($slaves[$i])>>
		<<run tired($slaves[$i])>>
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<= App.SlaveAssignment.drugs($slaves[$i])>>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<br><<include "SA devotion">>
	<<else>>
		<<silently>>
		<<run App.SlaveAssignment.choosesOwnClothes($slaves[$i])>>
		<<run tired($slaves[$i])>>
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<run App.SlaveAssignment.drugs($slaves[$i])>>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<<include "SA devotion">>
		<</silently>>
	<</if>>
	<<set $Milkmaid = $slaves[_FLs]>>
<</if>>

<<set _oldCash = $cash>>
<<for _slave range _slaves>>
	<<set $i = $slaveIndices[_slave.ID]>>
	<<setLocalPronouns _slave>>
	/* Special attention section */
	<<if ($legendaryCowID == 0) && (_slave.lactation > 0) && ((_slave.boobs-_slave.boobsImplant-_slave.boobsMilk) > 6000) && (_slave.devotion > 50) && (_slave.prestige == 0)>>
		<<set $legendaryCowID = _slave.ID>>
	<</if>>
	<<if ($legendaryBallsID == 0) && (_slave.dick != 0) && (_slave.balls > 5 || (_slave.balls > 4 && _slave.prostate > 1)) && (_slave.devotion > 50) && (_slave.prestige == 0)>>
		<<set $legendaryBallsID = _slave.ID>>
	<</if>>

	/* Perform facility based rule changes */
	<<if ($dairySlimMaintain == 0)>>
		<<if $dairyWeightSetting == 0>>
			<<if _slave.weight <= 30>>
				<<set _slave.diet = "fattening">>
			<<else>>
				<<set _slave.diet = "healthy">>
			<</if>>
		<<elseif $dairyWeightSetting == 1>>
			<<if _slave.weight <= 95>>
				<<set _slave.diet = "fattening">>
			<<else>>
				<<set _slave.diet = "healthy">>
			<</if>>
		<<elseif $dairyWeightSetting == 2>>
			<<if _slave.weight <= 130>>
				<<set _slave.diet = "fattening">>
			<<else>>
				<<set _slave.diet = "healthy">>
			<</if>>
		<<elseif $dairyWeightSetting == 3>>
			<<if _slave.weight <= 160>>
				<<set _slave.diet = "fattening">>
			<<else>>
				<<set _slave.diet = "healthy">>
			<</if>>
		<<elseif $dairyWeightSetting == 4>>
			<<if _slave.weight <= 195>>
				<<set _slave.diet = "fattening">>
			<<else>>
				<<set _slave.diet = "healthy">>
			<</if>>
		<<elseif $dairyRestraintsSetting > 1>>
			<<set _slave.diet = "healthy">>
		<</if>>
	<<elseif _slave.weight > 10>>
		<<set _slave.diet = "restricted">>
	<<elseif (_slave.diet == "fattening") || _slave.diet == "healthy" || ($dairyRestraintsSetting > 1)>>
		<<set _slave.diet = "healthy">>
	<</if>>
	<<if $dairyRestraintsSetting > 1>>
		<<set _slave.collar = "none", _slave.faceAccessory  = "none", _slave.mouthAccessory = "none", _slave.choosesOwnClothes = 0, _slave.clothes = "no clothing", _slave.vaginalAccessory = "none", _slave.vaginalAttachment = "none", _slave.dickAccessory = "none", _slave.buttplug = "none", _slave.chastityAnus = 0, _slave.chastityPenis = 0, _slave.chastityVagina = 0>>
	<</if>>
	<<switch $dairyDecoration>>
	<<case "Arabian Revivalist" "Aztec Revivalist" "Chattel Religionist" "Chinese Revivalist" "Degradationist" "Edo Revivalist" "Egyptian Revivalist" "Roman Revivalist" "Subjugationist" "Supremacist">>
		<<set _slave.rules.living = "spare">>
	<<default>>
		<<set _slave.rules.living = "normal">>
	<</switch>>
	<<if $dairyPregSetting > 0>>
		<<set WombCleanGenericReserve(_slave, "incubator", 9999)>>
		<<set WombCleanGenericReserve(_slave, "nursery", 9999)>>
	<</if>>

	/* General End of Week effects */
	<<if $showEWD != 0>>
		<br><br>
		/* 000-250-006 */
		<<if $seeImages && $seeReportImages>>
			<div class="imageRef tinyImg">
				<<= SlaveArt(_slave, 0, 0)>>
			</div>
		<</if>>
		/* 000-250-006 */
		<span class='slave-name'><<= SlaveFullName(_slave)>></span>
		<<if _slave.choosesOwnAssignment == 2>>
			<<include "SA chooses own job">>
		<<else>>
			is serving as a cow in $dairyName.
		<</if>>
		<br>&nbsp;&nbsp;&nbsp;&nbsp;$He <<= App.SlaveAssignment.getMilked(_slave)>>
		<br>&nbsp;&nbsp;&nbsp;
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<= App.SlaveAssignment.drugs(_slave)>>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<br><<include "SA devotion">>
	<<else>>
		<<silently>>
		<<include "SA chooses own job">>
		<<run App.SlaveAssignment.getMilked(_slave)>>
		<<include "SA rules">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<run App.SlaveAssignment.drugs(_slave)>>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<<include "SA devotion">>
		<</silently>>
	<</if>>
	<<set _milkWeek += $milk, _cumWeek += $cum>>

	/* Facility Specific End of Week effects */
	<<if (_slave.devotion <= 20) && (_slave.trust >= -20)>>
		<<set _slave.devotion -= 5, _slave.trust -= 5>>
	<</if>>
	<<if (_slave.health.condition < -80)>>
		<<run improveCondition(_slave, 20)>>
	<<elseif (_slave.health.condition < -40)>>
		<<run improveCondition(_slave, 10)>>
	<<elseif (_slave.health.condition < 0)>>
		<<run improveCondition(_slave, 7)>>
	<<elseif (_slave.health.condition < 90)>>
		<<run improveCondition(_slave, 3)>>
	<</if>>
	<<if (_slave.inflation > 0)>>
		<<set _slave.inflation = 0, _slave.inflationType = "none", _slave.inflationMethod = 0, _slave.milkSource = 0>>
		<<run SetBellySize(_slave)>>
	<</if>>
	<<set _gigantomastiaMod = _slave.geneticQuirks.gigantomastia == 2 ? (_slave.geneticQuirks.macromastia == 2 ? 3 : 2) : 1>>
	<<if (_slave.lactation > 0) && (($dairySlimMaintain == 0) || (_slave.boobs > 700))>>
		<<if (_slave.boobs < 2000)>>
			<<set _growth = 100>>
		<<elseif (_slave.boobs < 5000*_gigantomastiaMod)>>
			<<set _growth = 50>>
		<<elseif (_slave.boobs < 10000*_gigantomastiaMod)>>
			<<set _growth = 25>>
		<<else>>
			<<set _growth = 0>>
		<</if>>
		<<if (_slave.geneMods.NCS == 1)>>
			<<set _growth = Math.trunc(_growth/2)>>
		<</if>>
		<<set _slave.boobs += _growth>>
	<</if>>
	<<if _slave.prostate == 1>>
		<<set _slave.prostate = 2>>
		<<run cashX(forceNeg($surgeryCost), "slaveSurgery", _slave), surgeryDamage(_slave, 10)>>
	<</if>>
	<<if _slave.vasectomy == 1>>
		<<set _slave.vasectomy = 0>>
		<<run cashX(forceNeg($surgeryCost), "slaveSurgery", _slave), surgeryDamage(_slave, 10)>>
	<</if>>
	<<if ($dairySlimMaintain == 0)>>
		<<if $dairyImplantsSetting <= 1>>
			<<if (_slave.lactation < 2) && (_slave.boobs > 300 || _slave.balls == 0 || _slave.lactation == 1 || $dairyImplantsSetting == 1)>>
				<<set _slave.lactation = 2, _slave.lactationDuration = 2>>
				<<run cashX(forceNeg($surgeryCost), "slaveSurgery", _slave), surgeryDamage(_slave, 10)>>
			<</if>>
		<<elseif $dairyImplantsSetting == 3>>
			<<if (_slave.lactation < 1) && (_slave.boobs > 300 || _slave.balls == 0)>>
				<<set _slave.induceLactation += 9>>
				<<run induceLactation(_slave)>>
			<</if>>
		<</if>>
	<</if>>
	<<if ($dairyFeedersUpgrade == 1) && ($dairyFeedersSetting > 0)>>
		<<if ($dairySlimMaintain == 0)>>
			<<if (_slave.balls == 0)>>
				<<set _slave.hormones = 2>>
			<</if>>
		<<elseif _slave.diet == "fattening">>
			<<set _slave.weight += 2>>
			<<if _slave.weightDirection == 1>>
				<<set _slave.weight += 2>>
			<</if>>
		<</if>>
		<<if (_slave.health.condition < 75)>>
			<<run improveCondition(_slave, 25)>>
		<<else>>
			<<if ($dairySlimMaintain == 0) && _slave.lactation > 0>>
				<<if $dairyFeedersSetting > 1 && $dairyStimulatorsSetting > 0>>
					<<if _slave.boobs < 50000>>
						<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
							<<if (_slave.boobs < 2000)>>
								<<set _growth = 75*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<<elseif (_slave.boobs < 5000*_gigantomastiaMod)>>
								<<set _growth = 50*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<<else>>
								<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<</if>>
						<<else>>
							<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50-_slave.physicalAge)/4))>>
						<</if>>
						<<if _slave.boobs <= 20000 && _slave.boobs+_growth > 20000>>
							<<set _boobtacular++>>
						<</if>>
						<<if (_slave.geneMods.NCS == 1)>>
							<<set _growth = Math.trunc(_growth/2)>>
						<</if>>
						<<set _slave.boobs += _growth>>
					<<else>>
						/*<<set _slave.boobs = 50000>>*/
					<</if>>
				<<elseif $dairyFeedersSetting > 0 && $dairyStimulatorsSetting > 0>>
					<<if _slave.boobs < 25000>>
						<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
							<<if (_slave.boobs < 2000)>>
								<<set _growth = 75*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<<elseif (_slave.boobs < 5000*_gigantomastiaMod)>>
								<<set _growth = 50*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<<else>>
								<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<</if>>
						<<else>>
							<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50-_slave.physicalAge)/4))>>
						<</if>>
						<<if _slave.boobs <= 20000 && _slave.boobs+_growth > 20000>>
							<<set _boobtacular++>>
						<</if>>
						<<if (_slave.geneMods.NCS == 1)>>
							<<set _growth = Math.trunc(_growth/2)>>
						<</if>>
						<<set _slave.boobs += _growth>>
					<</if>>
				<<elseif $dairyFeedersSetting > 1>>
					<<if _slave.boobs < 10000>>
						<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
							<<if (_slave.boobs < 2000)>>
								<<set _growth = 75*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<<elseif (_slave.boobs < 5000*_gigantomastiaMod)>>
								<<set _growth = 50*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<<else>>
								<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<</if>>
						<<else>>
							<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50-_slave.physicalAge)/4))>>
						<</if>>
						<<if _slave.boobs <= 20000 && _slave.boobs+_growth > 20000>>
							<<set _boobtacular++>>
						<</if>>
						<<if (_slave.geneMods.NCS == 1)>>
							<<set _growth = Math.trunc(_growth/2)>>
						<</if>>
						<<set _slave.boobs += _growth>>
					<</if>>
				<<else>>
					<<if _slave.boobs < 5000>>
						<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
							<<if (_slave.boobs < 2000)>>
								<<set _growth = 75*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<<elseif (_slave.boobs < 5000*_gigantomastiaMod)>>
								<<set _growth = 50*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<<else>>
								<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
							<</if>>
						<<else>>
							<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50-_slave.physicalAge)/4))>>
						<</if>>
						<<if _slave.boobs <= 20000 && _slave.boobs+_growth > 20000>>
							<<set _boobtacular++>>
						<</if>>
						<<if (_slave.geneMods.NCS == 1)>>
							<<set _growth = Math.trunc(_growth/2)>>
						<</if>>
						<<set _slave.boobs += _growth>>
					<</if>>
				<</if>>
			<</if>>
			<<if (_slave.balls > 0)>>
				<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
					<<if (_slave.geneMods.NCS == 0) && (_slave.balls < 125)>>
						<<set _slave.balls++>>
					<<elseif (_slave.geneMods.NCS == 1) && (_slave.balls < 125) && (random(1,600) > (30+(10*_slave.balls)-(10*$dairyRestraintsSetting)-($injectionUpgrade*10)))>>
						<<set _slave.balls++>>
					<</if>>
					<<if (_slave.balls >= 125)>>
						<<set _balltacular++>>
						<<set _btSlave = _slave>>
					<</if>>
				<<elseif (_slave.balls < 10)>>
					<<if (_slave.geneMods.NCS == 0) && (random(1,100) > (40+(10*_slave.balls)-(10*$dairyRestraintsSetting)-($injectionUpgrade*10)))>>
						<<set _slave.balls++>>
					<<elseif (_slave.geneMods.NCS == 1) && (_slave.balls < 125) && (random(1,50) > (40+(10*_slave.balls)-(10*$dairyRestraintsSetting)-($injectionUpgrade*10)))>>
						<<set _slave.balls++>>
					<</if>>
					<<if (_slave.balls >= 10)>>
						<<set _balltacular++>>
						<<set _btSlave = _slave>>
					<</if>>
				<</if>>
				<<if _slave.dick > 0>>
					<<if _slave.dick < 10>>
						<<if ((_slave.geneMods.NCS == 0) && (random(1,100) > (40+(10*_slave.dick)-(10*$dairyRestraintsSetting)-($injectionUpgrade*10))))>>
							<<set _slave.dick++>>
						<<elseif ((_slave.geneMods.NCS == 1) && (random(1,50) > (40+(10*_slave.dick)-(10*$dairyRestraintsSetting)-($injectionUpgrade*10))))>>
							<<set _slave.dick++>>
						<</if>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
	<</if>> /* closes ($dairyFeedersUpgrade == 1) && ($dairyFeedersSetting > 0) */
	<<if ($dairyStimulatorsUpgrade == 1) && $dairyStimulatorsSetting > 0>>
		<<if ($dairyStimulatorsSetting > 1) && (_slave.anus < 4)>>
			<<set _slave.anus++>>
			<<if (_slave.anus >= 4)>>
				<<set _anusesStretched++>>
			<</if>>
		<<elseif (_slave.anus < 3)>>
			<<set _slave.anus++>>
		<</if>>
		<<if (_slave.health.condition < 60)>>
			<<run improveCondition(_slave, 20)>>
		<<elseif $dairySlimMaintain == 0 && _slave.lactation > 0>>
			<<if $dairyFeedersSetting > 1>>
				<<if _slave.boobs < 50000>>
					<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
						<<if (_slave.boobs < 2000)>>
							<<set _growth = 75*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<<elseif (_slave.boobs < 5000*_gigantomastiaMod)>>
							<<set _growth = 50*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<<else>>
							<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<</if>>
					<<else>>
						<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50-_slave.physicalAge)/4))>>
					<</if>>
					<<if _slave.boobs <= 20000 && _slave.boobs+_growth > 20000>>
						<<set _boobtacular++>>
					<</if>>
					<<if (_slave.geneMods.NCS == 1)>>
						<<set _growth = Math.trunc(_growth/2)>>
					<</if>>
					<<set _slave.boobs += _growth>>
				<</if>>
			<<elseif $dairyFeedersSetting > 0>>
				<<if _slave.boobs < 25000>>
					<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
						<<if (_slave.boobs < 2000)>>
							<<set _growth = 75*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<<elseif (_slave.boobs < 5000*_gigantomastiaMod)>>
							<<set _growth = 50*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<<else>>
							<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<</if>>
					<<else>>
						<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50-_slave.physicalAge)/4))>>
					<</if>>
					<<if _slave.boobs <= 20000 && _slave.boobs+_growth > 20000>>
						<<set _boobtacular++>>
					<</if>>
					<<if (_slave.geneMods.NCS == 1)>>
						<<set _growth = Math.trunc(_growth/2)>>
					<</if>>
					<<set _slave.boobs += _growth>>
				<</if>>
			<<else>>
				<<if _slave.boobs < 10000>>
					<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
						<<if (_slave.boobs < 2000)>>
							<<set _growth = 75*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<<elseif (_slave.boobs < 5000*_gigantomastiaMod)>>
							<<set _growth = 50*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<<else>>
							<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50)/4))>>
						<</if>>
					<<else>>
						<<set _growth = 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50-_slave.physicalAge)/4))>>
					<</if>>
					<<if _slave.boobs <= 20000 && _slave.boobs+_growth > 20000>>
						<<set _boobtacular++>>
					<</if>>
					<<if (_slave.geneMods.NCS == 1)>>
						<<set _growth = Math.trunc(_growth/2)>>
					<</if>>
					<<set _slave.boobs += _growth>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
	<<if ($dairyRestraintsSetting > 1)>>
		<<if _slave.lactation > 0>>
			<<set _slave.lactationAdaptation += 1>>
		<</if>>
		<<if (_slave.muscles > -100)>>
			<<set _slave.muscles -= 1+_slave.geneticQuirks.mLoss>>
		<</if>>
		<<if (_slave.fetish == "mindbroken")>>
			<<if (_slave.boobs > 48000) && ((_slave.balls >= 10) || (_slave.balls == 0))>>
				<<set $bioreactorPerfectedID = _slave.ID>>
			<</if>>
		<<else>>
			<<if (_slave.sexualFlaw != "self hating")>>
				<<if (_slave.sexualFlaw != "cum addict") || ($dairyFeedersSetting == 0)>>
					<<if (_slave.sexualFlaw != "anal addict") || ($dairyStimulatorsSetting == 0)>>
						<<if (_slave.sexualFlaw != "breeder") || (_slave.preg < 0) || ($dairyPregSetting == 0)>>
							<<if $dairyStimulatorsSetting > 1>>
								<<if (_slave.sexualFlaw != "hates anal") && (_slave.sexualQuirk != "painal queen")>>
									<<set _slave.sexualFlaw = "hates anal">>
								<</if>>
							<</if>>
							<<if $dairyPregSetting > 1>>
								<<if (_slave.sexualFlaw != "hates penetration") && (_slave.sexualQuirk != "strugglefuck queen")>>
									<<set _slave.sexualFlaw = "hates penetration">>
								<</if>>
							<</if>>
							<<if $dairyFeedersSetting > 1>>
								<<if (_slave.sexualFlaw != "hates oral") && (_slave.sexualQuirk != "gagfuck queen")>>
									<<set _slave.sexualFlaw = "hates oral">>
								<</if>>
							<</if>>
						<</if>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
		<<if _slave.chem > 250>>
			<<set _chemSevere++>>
		<<elseif _slave.chem > 100>>
			<<set _chemMinor++>>
			<<set _cmSlave = _slave>>
		<</if>>
	<</if>>
	<<if ($dairyStimulatorsSetting + $dairyFeedersSetting + $dairyPregSetting) > 5>>
		<<if _slave.devotion <= 95 && _slave.sexualFlaw != "self hating">>
			<<if (_slave.sexualFlaw != "breeder") || (_slave.preg < 0)>>
				<<if (_slave.devotion > -75)>>
					<<set _slave.devotion -= 10>>
					<<if (_slave.devotion < -65)>>
						<<set _hatefilled++>>
						<<set _hfSlave = _slave>>
					<</if>>
				<<elseif (_slave.trust > -75)>>
					<<set _slave.trust -= 10>>
					<<if (_slave.trust < -65)>>
						<<set _horrified++>>
						<<set _hrSlave = _slave>>
					<</if>>
				<<elseif (_slave.skill.vaginal > 0)>>
					<<set _slave.skill.vaginal -= 10, _skillsLost++>>
					<<set _slSlave = _slave>>
				<<elseif (_slave.skill.oral > 0)>>
					<<set _slave.skill.oral -= 10, _skillsLost++>>
					<<set _slSlave = _slave>>
				<<elseif (_slave.skill.anal > 0)>>
					<<set _slave.skill.anal -= 10, _skillsLost++>>
					<<set _slSlave = _slave>>
				<<elseif (_slave.career != "a bioreactor")>>
					<<set _slave.career = "a bioreactor", _careerForgotten++>>
					<<set _cfSlave = _slave>>
				<<elseif (_slave.intelligenceImplant > 0)>>
					<<set _slave.intelligenceImplant = Math.clamp(_slave.intelligenceImplant-5, 0, 30), _skillsLost++>>
					<<set _slSlave = _slave>>
				<<elseif (_slave.intelligence >= -15)>>
					<<set _slave.intelligence -= 5, _intelligenceLost++>>
				<<elseif (_slave.devotion >= -20)>>
					<<set _slave.devotion -= 10>>
				<<elseif (_slave.trust >= -20)>>
					<<set _slave.trust -= 10>>
				<<elseif (_slave.skill.whoring > 0)>>
					<<set _slave.skill.whoring -= 10, _skillsLost++>>
					<<set _slSlave = _slave>>
				<<elseif (_slave.skill.entertainment > 0)>>
					<<set _slave.skill.entertainment -= 10, _skillsLost++>>
					<<set _slSlave = _slave>>
				<<elseif (_slave.intelligence >= -50)>>
					<<set _slave.intelligence -= 5>>
					<<if _slave.intelligence < -50>>
						<<set _stupidified++>>
						<<set _stSlave = _slave>>
					<</if>>
				<<elseif (_slave.fetish != "mindbroken")>>
					<<set _slave.fetish = "mindbroken", _mindbroken++>>
				<</if>>
			<</if>>
		<</if>>
		<<if ((_slave.counter.milk > 1000) && (_slave.boobs > 12000) || (_slave.counter.cum > 1000) && (_slave.balls >= 10)) && (_slave.career != "a bioreactor")>>
			<<set _slave.career = "a bioreactor", _careerForgotten++>>
			<<set _cfSlave = _slave>>
		<</if>>
		<<if ($arcologies[0].FSBodyPuristLaw == 0) && ($healthyDrugsUpgrade == 0)>>
			<<set _slave.chem += 5>>
		<<else>>
			<<set _slave.chem += 2>>
		<</if>>
	<<elseif ($dairyStimulatorsSetting + $dairyFeedersSetting + $dairyPregSetting) > 3>>
		<<if (_slave.devotion < 75)>>
			<<if (_slave.devotion > -75)>>
				<<set _slave.devotion -= 5>>
				<<if (_slave.devotion < -70)>>
					<<set _hatefilled++>>
					<<set _hfSlave = _slave>>
				<</if>>
			<<elseif (_slave.trust > -75)>>
				<<set _slave.trust -= 5>>
				<<if (_slave.trust < -70)>>
					<<set _horrified++>>
					<<set _hrSlave = _slave>>
				<</if>>
			<<elseif (_slave.skill.vaginal >= 20)>>
				<<set _slave.skill.vaginal -= 10, _skillsLost++>>
				<<set _slSlave = _slave>>
			<<elseif (_slave.skill.oral >= 20)>>
				<<set _slave.skill.oral -= 10, _skillsLost++>>
				<<set _slSlave = _slave>>
			<<elseif (_slave.skill.anal >= 20)>>
				<<set _slave.skill.anal -= 10, _skillsLost++>>
				<<set _slSlave = _slave>>
			<<elseif (_slave.career != "a bioreactor")>>
				<<set _slave.career = "a bioreactor", _careerForgotten++>>
				<<set _cfSlave = _slave>>
			<<elseif (_slave.intelligenceImplant > 0)>>
				<<set _slave.intelligenceImplant = Math.clamp(_slave.intelligenceImplant-5, 0, 30), _skillsLost++>>
				<<set _slSlave = _slave>>
			<<elseif (_slave.intelligence >= -15)>>
				<<set _slave.intelligence -= 5, _intelligenceLost++>>
			<<elseif (_slave.devotion >= -20)>>
				<<set _slave.devotion -= 8>>
			<<elseif (_slave.trust >= -20)>>
				<<set _slave.trust -= 8>>
			<<elseif (_slave.skill.whoring >= 20)>>
				<<set _slave.skill.whoring -= 10, _skillsLost++>>
				<<set _slSlave = _slave>>
			<<elseif (_slave.skill.entertainment >= 20)>>
				<<set _slave.skill.entertainment -= 10, _skillsLost++>>
				<<set _slSlave = _slave>>
			<<elseif (_slave.intelligence >= -50)>>
				<<set _slave.intelligence -= 5>>
				<<if _slave.intelligence < -50>>
					<<set _stupidified++>>
					<<set _stSlave = _slave>>
				<</if>>
			<<elseif (_slave.fetish != "mindbroken")>>
				<<set _slave.fetish = "mindbroken", _mindbroken++>>
			<</if>>
		<<elseif ((_slave.counter.milk > 1000) && (_slave.boobs > 12000) || (_slave.counter.cum > 1000) && (_slave.balls >= 10)) && (_slave.career != "a bioreactor")>>
			<<set _slave.career = "a bioreactor", _careerForgotten++>>
			<<set _cfSlave = _slave>>
		<</if>>
		<<if ($arcologies[0].FSBodyPuristLaw == 0) && ($healthyDrugsUpgrade == 0)>>
			<<set _slave.chem += 2>>
		<<else>>
			<<set _slave.chem++>>
		<</if>>
	<</if>> /* closes ($dairyStimulatorsSetting + $dairyFeedersSetting + $dairyPregSetting) > 5 */
	<<if ($dairyPregUpgrade == 1) && ($dairyPregSetting > 0)>>
		<<if (_slave.ovaries == 1) && (_slave.vagina > -1)>>
			<<set _femCumWeek += Math.trunc((70-_slave.physicalAge)/(30-(_slave.vaginaLube*10)))>>
			<<if (_slave.preg == -2)>>
				<<set _slave.preg = 0, _desterilized++>>
				<<set _dsSlave = _slave>>
			<</if>>
			<<if isFertile(_slave)>>
				<<if _slave.eggType == "human">>
					<<set _slave.preg = 1, _slave.pregWeek = 1, _slave.pregKnown = 1>>
					<<if ($dairyPregSetting > 2)>>
						<<set _slave.pregType = random(10,29)>>
					<<elseif ($dairyPregSetting > 1)>>
						<<set _slave.pregType = random(3,6)>>
					<<else>>
						<<set _slave.pregType = either(1, 1, 1, 1, 2, 2, 2, 3, 3, 4)>>
					<</if>>
					<<set _slave.pregSource = -2>>
					<<set WombImpregnate(_slave, _slave.pregType, -2, 1)>>
				<</if>> /*closes eggType */
				<<if (_slave.vagina == 0)>>
					<<set _slave.vagina++>>
				<</if>>
			<<elseif (_slave.pregKnown == 1)>>
				<<if ($dairyPregSetting > 2)>>
					<<run cashX(100, "slaveAssignmentDairy", _slave)>>
				<<elseif ($dairyPregSetting > 1)>>
					<<run cashX(50, "slaveAssignmentDairy", _slave)>>
				<<else>>
					<<run cashX(25, "slaveAssignmentDairy", _slave)>>
				<</if>>
				<<if ($dairyPregSetting > 1) && (_slave.vagina < 4)>>
					<<set _slave.vagina++>>
					<<if (_slave.vagina == 4)>>
						<<set _vaginasStretched++>>
					<</if>>
				<<elseif (_slave.vagina < 3)>>
					<<set _slave.vagina++>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<</for>>

<<if $inflatedSlavesMilk > 0>>
	<<set _milkWeek -= ((8*$inflatedSlavesMilk*10)+8)>>
<</if>>
<<if $inflatedSlavesCum > 0>>
	<<set _cumWeek -= ((80*$inflatedSlavesCum*10)+80)>>
	<<if _cumWeek < 0>>
		<<set _cumWeek = 0>>
	<</if>>
<</if>>

<<if (_Tadd > 0)>>
	<<set _tempCash = $cash>>
	<<set _seed = (100*$bioreactorsXY) + (100*$bioreactorsHerm), _cumWeek += _seed>>
	<<if ($arcologies[0].FSPastoralistLaw == 1)>>
		<<set _cashX = _seed*random(40,50)>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<<elseif ($arcologies[0].FSPastoralist != "unset")>>
		<<set _cashX = _seed*(random(25,35)+Math.trunc($arcologies[0].FSPastoralist/10))>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<<else>>
		<<set _cashX = _seed*random(25,35)>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<</if>>
	<<set _seed = (2*$bioreactorsXX) + (2*$bioreactorsHerm), _femCumWeek += _seed>>
	<<if ($arcologies[0].FSPastoralistLaw == 1)>>
		<<set _cashX = _seed*random(40,50)>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<<elseif ($arcologies[0].FSPastoralist != "unset")>>
		<<set _cashX = _seed*(random(25,35)+Math.trunc($arcologies[0].FSPastoralist/10))>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<<else>>
		<<set _cashX = _seed*random(25,35)>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<</if>>
	<<set _seed = (800*$bioreactorsXX) + (700*$bioreactorsBarren) + (600*$bioreactorsXY) + (600*$bioreactorsHerm), _milkWeek += _seed>>
	<<if ($arcologies[0].FSPastoralistLaw == 1)>>
		<<set _cashX = _seed*(13+Math.trunc($arcologies[0].FSPastoralist/30))>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<<elseif ($arcologies[0].FSPastoralist != "unset")>>
		<<set _cashX = _seed*(8+Math.trunc($arcologies[0].FSPastoralist/30))>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<<else>>
		<<set _cashX = _seed*9>>
		<<run cashX(_cashX, "menialBioreactors")>>
	<</if>>
	<br><br>_Tadd permanently converted biological "machine<<if _Tadd > 1>>s<</if>>" produce<<if _Tadd == 1>>s<</if>> @@.yellowgreen;<<print cashFormat($cash-_tempCash)>>@@ income.
<</if>>

<<if $inflatedSlavesMilk > 0>>
	<<set _cashX -= Math.trunc(((600*($inflatedSlavesMilk)+8)+random(50,200)))>>
	<<run cashX(_cashX, "slaveAssignmentDairy")>>
<</if>>
<<if $inflatedSlavesCum > 0>>
	<<set _cashX -= Math.trunc(((300*($inflatedSlavesCum+8))+random(25,100)))>>
	<<run cashX(_cashX, "slaveAssignmentDairy")>>
<</if>>

<<set _profits = $cash-_oldCash>>
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;
<<if _chemSevere > 1>>
	_chemSevere cows' productivity is being reduced by the long term effects of industrial use.
<<elseif _chemSevere > 0>>
	One cow's productivity is being reduced by the long term effects of industrial use.
<</if>>
<<if _chemMinor > 1>>
	_chemMinor cows have been drugged and used long enough that they require increased curative doses, slightly reducing their output.
<<elseif _chemMinor > 0>>
	<<setLocalPronouns _cmSlave>>
	One cow has been drugged and used long enough that $he requires increased curative doses, slightly reducing $his output.
<</if>>
<<if _desterilized > 1>>
	_desterilized cows had minor health issues preventing their fertile womb from conceiving; the issues have been resolved and they have been impregnated.
<<elseif _desterilized > 0>>
	<<setLocalPronouns _dsSlave>>
	One cow had minor health issues preventing $his fertile womb from conceiving; they have been resolved and $he has been impregnated.
<</if>>
<<if _hatefilled > 1>>
	_hatefilled cows stopped struggling so much when fucked by the machines; it seems they have sunk into a fugue.
<<elseif _hatefilled > 0>>
	<<setLocalPronouns _hfSlave>>
	One cow stopped struggling so much when fucked by the machines; it seems $he has sunk into a fugue.
<</if>>
<<if _horrified > 1>>
	_horrified cows' emotional activity dropped significantly; this indicates acceptance that they are not likely to leave $dairyName, ever again.
<<elseif _horrified > 0>>
	<<setLocalPronouns _hrSlave>>
	One cow's emotional activity dropped significantly; this indicates acceptance that $he is not likely to leave $dairyName, ever again.
<</if>>
<<if _skillsLost > 1>>
	_skillsLost cows forgot skills due to their inability to focus on anything but machine rape.
<<elseif _skillsLost > 0>>
	<<setLocalPronouns _slSlave>>
	One cow forgot skills due to $his inability to focus on anything but machine rape.
<</if>>
<<if _careerForgotten > 1>>
	_careerForgotten cows forgot the details of their past professional lives; all they can remember now is this.
<<elseif _careerForgotten > 0>>
	<<setLocalPronouns _cfSlave>>
	One cow forgot the details of $his past professional life; all $he can remember now is this.
<</if>>
<<if _vaginasStretched > 1>>
	_vaginasStretched cows' vaginas were broken in for machine use, and are unlikely to be any use for anything other than receiving cum and medication, and giving birth.
<<elseif _vaginasStretched > 0>>
	One cow's vagina was broken in for machine use, and is unlikely to be any use for anything other than receiving cum and medication, and giving birth.
<</if>>
<<if _anusesStretched > 1>>
	_anusesStretched cows' anuses were loosened by machine sodomy, and are now permanently gaped.
<<elseif _anusesStretched > 0>>
	One cow's anus was loosened by machine sodomy, and is now permanently gaped.
<</if>>
<<if _intelligenceLost > 1>>
	_intelligenceLost cows suffered some loss of intelligence due to accumulated mental stress from life attached to a milking machine.
<<elseif _intelligenceLost > 0>>
	One cow suffered some loss of intelligence due to accumulated mental stress from life attached to a milking machine.
<</if>>
<<if _stupidified > 1>>
	_stupidified cows were so mentally dulled by use as biological factories that they were reduced to a very low level of intelligence.
<<elseif _stupidified > 0>>
	<<setLocalPronouns _stSlave>>
	One cow was so mentally dulled by use as biological factories that $he was reduced to a very low level of intelligence.
<</if>>
<<if _mindbroken > 1>>
	_mindbroken cows finally lost higher mental function, and are now nothing more than industrial equipment made of meat.
<<elseif _mindbroken > 0>>
	One cow finally lost higher mental function, and is now nothing more than industrial equipment made of meat.
<</if>>
<<if _boobtacular > 1>>
	_boobtacular cows grew past 30 kilograms of breasts, a remarkable advance in capacity.
<<elseif _boobtacular > 0>>
	One cow grew past 30 kilograms of breasts, a remarkable advance in capacity.
<</if>>
<<if _balltacular > 1>>
	_balltacular cows' testicles reached the largest size drug treatments can produce; the machines will now focus on buttfucking them with extra force.
<<elseif _balltacular > 0>>
	<<setLocalPronouns _btSlave>>
	One cow's testicles reached the largest size drug treatments can produce; the machines will now focus on buttfucking $him with extra force.
<</if>>

<<if ($dairyPregUpgrade == 1)>>
	<<if ($dairyPregSetting >= 2)>>
		Fertile cows make you a significant profit through contract pregnancies.
	<<elseif ($dairyPregSetting == 1)>>
		Fertile cows make you a small profit through contract pregnancies.
	<</if>>
<</if>>
<<set _cumWeek = Math.trunc(_cumWeek/10)>>
<<set $cumPipeline = _cumWeek, $milkPipeline = _milkWeek>>
<<if $inflatedSlavesMilk > 0>>
	<<set _outputMilk = ((8*$inflatedSlavesMilk*10)+8)>>
<<else>>
	<<set _outputMilk = 0>>
<</if>>
<<if $inflatedSlavesCum > 0>>
	<<set _outputCum = (((80*$inflatedSlavesCum*10)+80)/10)>>
<<else>>
	<<set _outputCum = 0>>
<</if>>
$dairyNameCaps produced <<print _milkWeek+_outputMilk>> liters of milk<<if _cumWeek > 0>> and <<print _cumWeek+_outputCum>> liters of cum<</if>> this week.
<<if $inflatedSlavesMilk > 0>>
	_outputMilk liters of milk were pumped into your penthouse for filling slaves this week.
<</if>>
<<if $inflatedSlavesCum > 0>>
	<<if $inflatedSlavesMilk > 0>>and <</if>>_outputCum liters of cum were pumped into your penthouse<<if $inflatedSlavesMilk > 0>> as well<<else>> this week<</if>>.
<</if>>
<<if _femCumWeek > 0>>
	The machines also managed to reclaim _femCumWeek liters of salable vaginal secretions.
<</if>>
<<if _births > 1>>
	Additionally, _birthers cows gave birth<<if _births > _birthers>> to a total of _births calves<</if>> this week.
<<elseif _births > 0>>
	Additionally, one cow gave birth<<if _births > _birthers>> to a total of _births calves<</if>> this week.
<</if>>

<<if $arcologies[0].FSRestart != "unset" && $eugenicsFullControl != 1>>
	<<if $dairyPregSetting > 0>>
		The Societal Elite know what you are doing with your cows. @@.red;They do not approve.@@
		<<set $failedElite += 5>>
	<</if>>
	<<if _milkmaidImpregnates == 1>>
		The Societal Elite know you've ordered $Milkmaid.slaveName to impregnate your cows. @@.red;They are not amused by your disinterest in eugenics.@@
		<<set $failedElite += 10>>
	<</if>>
<</if>>

<!-- Record statistics gathering -->
<<script>>
	var b = State.variables.facility.dairy;
	b.whoreIncome = 0;
	b.whoreCosts = 0;
	b.rep = 0;
	for (var si of b.income.values()) {
		b.whoreIncome += si.income;
		b.whoreCosts += si.cost;
		b.rep += si.rep;
	}
	b.maintenance = (State.variables.bioreactorsXY + State.variables.bioreactorsXX + State.variables.bioreactorsHerm + State.variables.bioreactorsBarren);
	if (b.maintenance > 0) {
		b.maintenance *= 100;
	} else {
		b.maintenance = 0;
	}
	b.maintenance += State.variables.dairy * State.variables.facilityCost * (1.0 + 0.2 * State.variables.dairyFeedersUpgrade + 0.1 * State.variables.dairyPregUpgrade);
	b.totalIncome = b.whoreIncome;
	b.totalExpenses = b.whoreCosts + b.maintenance;
	b.profit = b.totalIncome - b.totalExpenses;
<</script>>
<<if (_profits > 0)>>
	The sale of these products makes a profit of @@.yellowgreen;<<print cashFormat(_profits)>>.@@
<<elseif (_profits < 0)>>
	Due to <<if $dairyImplantsSetting != 3>>one-off costs of hormonal implants to encourage fluid production<<else>>the need to induce lactation in some cows<</if>>, your dairy made a loss of @@.red;<<print cashFormat(_profits)>>.@@
<<else>>
	Due to <<if $dairyImplantsSetting != 3>>one-off costs of hormonal implants to encourage fluid production<<else>>the need to induce lactation in some cows<</if>> paired with existing output, your dairy broke even this week.
<</if>>

<<if ($arcologies[0].FSPastoralistLaw == 1)>>
	Slave products have completely replaced traditional dairy, making the facility extremely lucrative.
<</if>>

<<if ($dairySlimMaintainUpgrade == 1 && $dairySlimMaintain == 1)>>
	<br>&nbsp;&nbsp;&nbsp;
	<<if $arcologies[0].FSSlimnessEnthusiast > 80>>
		Because of your arcology's great enthusiasm for small breasted slaves, the dairy's milking systems have been carefully overhauled and optimized for maximum milk extraction from slaves with smaller endowments — providing a significant boost to their otherwise modest output. This also prevents unfashionable breast expansion of already slim slaves through the milking process.
	<<elseif $arcologies[0].FSSlimnessEnthusiast > 20>>
		In keeping with your arcology's ideals, $dairyName has been modified to handle slim slaves with minimal impact to their body shapes. This limits potential profitability, but prevents unfashionable breast expansion of already slim slaves through the milking process.
	<<else>>
		Due to your arcology's lack of enthusiasm for small breasted slaves the dairy has discontinued using milking techniques that prevent breast growth through the milking process.
		<<set $dairySlimMaintain = 0, $dairySlimMaintainUpgrade = 0>>
	<</if>>
<</if>>

<<if ($createBioreactors == 1) && ($bioreactorPerfectedID != 0)>>
	<<for _slave range _slaves>>
		<<setLocalPronouns _slave>>
		<<if (_slave.ID == $bioreactorPerfectedID)>>
			<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<<= SlaveFullName(_slave)>>'s breasts<<if _slave.balls > 0>>, balls<</if>><<if _slave.ovaries == 1>>, belly<</if>>, body, and mind have been completely adapted to synthesize useful products. $He has been reclassified as part of the machine $he's now permanently attached to. This combination is projected to produce approximately
			<<if _slave.balls > 0>><<print 1000*Math.trunc((3*52*(45-_slave.physicalAge))/1000)>> liters of cum,<</if>>
			<<if _slave.ovaries == 1>><<print 100*Math.trunc((52*(45-_slave.physicalAge))/100)>> liters of vaginal secretions, <<if $dairyPregSetting == 3>><<print 13*(45-_slave.physicalAge)>><<else>><<print 5*(45-_slave.physicalAge)>><</if>> slaves,<</if>>
			and <<print 1000*Math.trunc((300*52*(45-_slave.physicalAge))/1000)>> liters of milk over a <<print 45-_slave.physicalAge>> year period before its biological components must be replaced.
			<<if (_slave.ovaries == 1)>>
				<<if (_slave.balls == 0)>>
					<<set $bioreactorsXX++>>
				<<else>>
					<<set $bioreactorsHerm++>>
				<</if>>
			<<else>>
				<<if (_slave.balls == 0)>>
					<<set $bioreactorsBarren++>>
				<<else>>
					<<set $bioreactorsXY++>>
				<</if>>
			<</if>>
			<<set $activeSlave = _slave>>
			<<= removeActiveSlave() >>
			<<break>>
		<</if>>
	<</for>>
<</if>>

<<if $dairyDecoration != "standard">>
	<br><br>&nbsp;&nbsp;&nbsp;&nbsp;$dairyNameCaps's @@.green;$dairyDecoration style is well known.@@
<</if>>

<<if _DL > 0>>
	<!-- Statistics output -->
	<<DairyStatistics 0>>
	<<timed 50ms>>
		<<replace #dairystats>>
			<<DairyStatistics 1>>
		<</replace>>
	<</timed>>
<</if>>
<<if (_DL + _Tadd) > 0 || $Milkmaid != 0>>
	<br><br>
<</if>>

src/uncategorized/dairyReport.tw