:: SA get milked [nobr]

<!-- Statistics gathering -->
<<set _incomeStats = getSlaveStatisticData($slaves[$i], $slaves[$i].assignment === Job.DAIRY ? $facility.dairy : undefined)>>
<<set _incomeStats.milk = 0; _incomeStats.cum = 0; _incomeStats.fluid = 0>>

<<if ndef $slaves[$i].lactationAdaptation>>
	<<set $slaves[$i].lactationAdaptation = 0>>
<</if>>

<<set $milk = 0>>
<<set $cum = 0>>

gets milked this week.
<<if $dairy > 0>>
<<if $dairyRestraintsSetting < 2>>
	<<if (($universalRulesFacilityWork == 1) && ($slaves[$i].assignment == "get milked") && ($dairySpots > 0)) || ($slaves[$i].assignment == "work in the dairy")>>
	<<if ($slaves[$i].assignment == "get milked")>>
		Since there's extra space in $dairyName, $he spends most of $his milkings there.
		<<set $dairySpots -= 1>>
	<</if>>
	<<if ($Milkmaid != 0)>>
		While there, $he gets the benefit of $Milkmaid.slaveName's <<if ($Milkmaid.physicalAge < 21)>>youthful energy<<else>>care<</if>><<if ($Milkmaid.oralSkill >= 100)>> and talented tongue<</if>>.
		<<if ($slaves[$i].devotion < $milkmaidDevotionThreshold)>>
			<<set $slaves[$i].devotion += $milkmaidDevotionBonus>>
		<</if>>
		<<if ($slaves[$i].trust < $milkmaidTrustThreshold)>>
			<<set $slaves[$i].trust += $milkmaidTrustBonus>>
		<</if>>
		<<if ($slaves[$i].health < 100)>>
			<<set $slaves[$i].health += $milkmaidHealthBonus>>
		<</if>>
	<</if>>
	<</if>>
<</if>>
<</if>>

<<if $slaves[$i].lactation > 0>>

	<<set $milk = milkAmount($slaves[$i])>>

	$He produces from $his <<print either("tits", "breasts", "mammaries", "udders", "boobs")>>, which have a combined volume of <<print $slaves[$i].boobs*2>> CCs;
	<<if ($slaves[$i].lactation == 1)>>
		$he is lactating naturally and produces a healthy stream of milk.
	<<elseif ($slaves[$i].lactation == 2)>>
		$he is on lactation drugs and produces a river of milk.
		<<if $slaves[$i].lactationAdaptation < 100>>
			$His udders are forced to adapt to this unnatural productivity.
			<<set $slaves[$i].lactationAdaptation += 1>>
		<</if>>
		<<if $slaves[$i].curatives == 0 && $slaves[$i].inflationType != "curative">>
			The stress of extreme milk production @@.red;damages $his health.@@
			<<set $slaves[$i].health -= 3>>
		<</if>>
	<</if>>

	<<if ($slaves[$i].devotion > 50)>>
		$He's such a happy cow that $his mental state has a positive impact on $his production.
	<<elseif ($slaves[$i].devotion < -50)>>
		$He's such an unhappy cow that $his mental state has a negative impact on $his production.
	<</if>>

	<<if ($slaves[$i].boobsImplant > 200)>>
		However, $his breast implants impede milk production.
	<</if>>

	<<set $hormones = $slaves[$i].hormoneBalance/100>>
	<<if ($slaves[$i].balls != 0)>>
		<<set $hormones -= 1>>
	<</if>>
	<<if (($slaves[$i].ovaries != 0) || ($slaves[$i].mpreg != 0))>>
		<<set $hormones += 1>>
	<</if>>
	<<if ($hormones > 1)>>
		$His internal chemistry is perfectly suited to milk production.
	<<elseif ($hormones > 0)>>
		$His hormonal balance favors milk production.
	<<elseif ($hormones < 0)>>
		$His hormonal balance impedes milk production.
	<<elseif ($hormones < -1)>>
		$His internal chemistry is poorly suited to milk production.
	<</if>>

	<<if $slaves[$i].lactationAdaptation < 100>>
	<<if ($slaves[$i].assignment == "get milked") || ($slaves[$i].assignment == "work in the dairy")>>
		Living as a cow helps $his body and mind adapt to producing milk.
		<<set $slaves[$i].lactationAdaptation += 1>>
	<</if>>
	<</if>>

	<<if ($slaves[$i].preg > 5) && ($slaves[$i].pregKnown == 1)>>
		$His pregnancy helps $his body produce more milk naturally<<if $slaves[$i].lactationAdaptation < 100>>, and also helps it adapt to milk production<<set $slaves[$i].lactationAdaptation += 1>><</if>>.
	<</if>>

	<<if ($slaves[$i].health > 50)>>
		$His shining health helps $him really produce.
	<<elseif ($slaves[$i].health < -50)>>
		$His poor health impedes milk production.
	<</if>>

	<<if ($slaves[$i].weight > 10)>>
		$His extra weight supports $his productivity.
	<<elseif ($slaves[$i].weight < -10)>>
		$His thinness hinders $his productivity.
	<</if>>

	<<if $slaves[$i].lactationAdaptation > 10>>
	<<if $slaves[$i].lactationAdaptation > 50>>
		$His body has adapted heavily to milk production, making $him extremely productive.
	<<else>>
		$His body has gotten used to producing milk, making $him very productive.
	<</if>>
	<</if>>

	<<if $dairySlimMaintainUpgrade == 1>>
	<<if $dairySlimMaintain == 1>>
		<<if ($slaves[$i].boobs <= 700)>>
			<<if ($arcologies[0].FSSlimnessEnthusiast > 80)>>
				Your arcology's milkers are optimized to extract maximum output from small breasted slaves, which substantially increases $his otherwise modest productivity.
				<<set $milk *= 1.5>>
			<<elseif ($arcologies[0].FSSlimnessEnthusiast > 20)>>
				Your arcology's milkers have been carefully modified to more readily accommodate slaves with tiny breasts, which slightly mitigates $his less than ideal physiology for milk production.
				<<set $milk *= 1.1>>
			<</if>>
		<</if>>
	<</if>>
	<</if>>

	/* This is going to be where the dairy overhaul takes place (milk half) */
	<<if ($slaves[$i].assignment == "work in the dairy")>>
		<<if ($dairyFeedersUpgrade == 1)>>
		<<if ($dairyFeedersSetting > 0)>>
			<<set $milk += $milk*(0.1*($dairyFeedersUpgrade+$dairyRestraintsSetting+((50-$slaves[$i].physicalAge)/20)))>>
			<<if ($slaves[$i].chem > 360)>>
				<<set $milk *= 0.6>>
			<<elseif ($slaves[$i].chem > 100)>>
				<<set $milk *= ((600-$slaves[$i].chem)/600)>>
			<</if>>
		<</if>>
		<</if>>
	<<elseif ($slaves[$i].assignment == "be confined in the arcade")>>
		<<set $milk *= 0.5>>
	<</if>>

	<<set $milk *= $servantMilkersMultiplier>>

	<<set $milk = Math.trunc($milk)>>
	<<if $milk < 1>>
		<<set $milk = 1>>
	<</if>>
	<<set $slaves[$i].milk += $milk>>
	<<set $milkTotal += $milk>>

	As a result, $he produces $milk liters of milk over the week.
	<<set _incomeStats.milk = $milk>>

	<<if ($arcologies[0].FSPastoralistLaw == 1)>>
		<<set $milkSale = $milk*(8+Math.trunc($arcologies[0].FSPastoralist/30))>>
		Since breast milk is $arcologies[0].name's only legal dairy product, $he can scarcely be milked fast enough, and $he makes @@.yellowgreen;<<print cashFormat($milkSale)>>.@@
	<<elseif ($arcologies[0].FSPastoralist != "unset")>>
		<<set $milkSale = $milk*(6+Math.trunc($arcologies[0].FSPastoralist/30))>>
		Since milk is fast becoming a major part of the $arcologies[0].name's dietary culture, $his milk is in demand, and $he makes @@.yellowgreen;<<print cashFormat($milkSale)>>.@@
	<<else>>
		<<set $milkSale = $milk*6>>
		$His milk is sold for @@.yellowgreen;<<print cashFormat($milkSale)>>.@@
	<</if>>
	<<set $cash += $milkSale>>
	<<set _incomeStats.income += $milkSale>>

	<<if $slaves[$i].fetishKnown>>
	<<if ($slaves[$i].fetish == "boobs") || ($slaves[$i].energy > 95)>>
		Getting constantly milked is as good as sex, as far as $he's concerned. @@.hotpink;$He is happy@@ to have $his breasts receive so much attention.
		<<set $slaves[$i].devotion += 1>>
		<<if $slaves[$i].need>><<set $slaves[$i].need = 0>><</if>>
	<</if>>
	<</if>>

	<<if $slaves[$i].career == "a dairy cow" && $slaves[$i].fetish != "mindbroken" && $slaves[$i].fuckdoll == 0>>
		$He feels like @@.hotpink;$he was made to be milked,@@ @@.mediumaquamarine;not that $he'd complain about such a good feeling.@@
		<<set $slaves[$i].devotion++, $slaves[$i].trust++>>
		<<if $slaves[$i].need>><<set $slaves[$i].need = 0>><</if>>
	<</if>>

	<<if ($slaves[$i].nipples != "huge")>>
		<<if ($slaves[$i].nipples == "inverted")>>
			<<if ($slaves[$i].fetish == "masochist") && ($slaves[$i].fetishKnown == 1)>>
				Having the milkers constantly haul $his inverted nipples out is @@.hotpink;extremely uncomfortable; $he loves it.@@
				<<set $slaves[$i].devotion += 3>>
			<<else>>
				Having the milkers constantly haul $his inverted nipples out is @@.mediumorchid;extremely uncomfortable.@@
				<<set $slaves[$i].devotion -= 3>>
			<</if>>
			<<if (random(1,100) > 50)>>
				The constant suction @@.lime;permanently protrudes them,@@ and
				<<if (random(1,2) == 1)>>
					it turns out they're absolutely massive.
					<<set $slaves[$i].nipples = "huge">>
				<<else>>
					it turns out they're nice and puffy.
					<<set $slaves[$i].nipples = "puffy">>
				<</if>>
			<</if>>
		<<elseif ($slaves[$i].nipples == "partially inverted")>>
			<<if ($slaves[$i].fetish == "masochist") && ($slaves[$i].fetishKnown == 1)>>
				Having the milkers constantly haul $his inverted nipples out is @@.hotpink;quite uncomfortable; $he loves it.@@
				<<set $slaves[$i].devotion += 1>>
			<<else>>
				Having the milkers constantly haul $his inverted nipples out is @@.mediumorchid;quite uncomfortable.@@
				<<set $slaves[$i].devotion -= 1>>
			<</if>>
			<<if (random(1,100) > 30)>>
				The constant suction @@.lime;permanently protrudes them,@@ and
				<<if (random(1,2) == 1)>>
					it turns out they're pretty cute.
					<<set $slaves[$i].nipples = "cute">>
				<<else>>
					it turns out they're nice and puffy.
					<<set $slaves[$i].nipples = "puffy">>
				<</if>>
			<</if>>
		<<elseif ($slaves[$i].nipples == "puffy") && (random(1,100) > 90)>>
			Producing this river of milk @@.lime;enlarges $his nipples:@@ they're now enormous.
			<<set $slaves[$i].nipples = "huge">>
		<<elseif ($slaves[$i].nipples == "cute") && (random(1,100) > 80)>>
			Producing this river of milk @@.lime;makes $his nipples nice and puffy.@@
			<<set $slaves[$i].nipples = "puffy">>
		<<elseif ($slaves[$i].nipples == "tiny")>>
			Producing this river of milk @@.lime;makes $his nipples grow to a nice size.@@
			<<set $slaves[$i].nipples = "cute">>
		<<elseif ($slaves[$i].areolae < 3) && (random(1,100) > 30+($slaves[$i].areolae*20))>>
			Producing this river of milk @@.lime;broadens $his areolae.@@
			<<set $slaves[$i].areolae += 1>>
		<</if>>
	<</if>>


<</if>> /* CLOSES BREAST MILKING */

<<if ($slaves[$i].balls > 0)>>

	<<set $cumSlaves += 1>>
	<<set $cum = cumAmount($slaves[$i])>>

	<<if $slaves[$i].lactation > 0>>
		$His
	<<else>>
		$slaves[$i].slaveName's
	<</if>>

	<<if $slaves[$i].dick > 0>>
		<<if ($slaves[$i].dick > 6)>>
			inhuman
		<<elseif ($slaves[$i].dick > 5)>>
			massive
		<<elseif ($slaves[$i].dick > 4)>>
			big
		<<elseif ($slaves[$i].dick > 3)>>
			sizeable
		<<elseif ($slaves[$i].dick > 2)>>
			moderate
		<<elseif ($slaves[$i].dick > 1)>>
			little
		<<else>>
			tiny
		<</if>>
		prick is
		<<if $slaves[$i].lactation > 0>>
			also
		<</if>>
		machine-milked
	<<else>>
		butt is machine-fucked
	<</if>>
	to extract the cum from $his
	<<if !$slaves[$i].scrotum>>
		invisible
	<<else>>
		<<switch $slaves[$i].balls>>
		<<case 10>>inhuman
		<<case 9>>titanic
		<<case 8>>gigantic
		<<case 7>>monstrous
		<<case 6>>huge
		<<case 5>>pendulous
		<<case 4>>swinging
		<<case 3>>big
		<<case 2>>average
		<<case 1>>pathetic
		<<default>>hypertrophied
		<</switch>>
	<</if>>
	<<if $slaves[$i].drugs == "testicle enhancement">>
		balls, relieving them of the excessive cum production caused by the testicle enhancement drugs.
	<<elseif $slaves[$i].drugs == "hyper testicle enhancement">>
		balls, relieving them of the excessive cum production caused by the hyper testicle enhancement drugs.
	<<else>>
		balls.
	<</if>>

	<<if $slaves[$i].diet == "cum production">>
		$His diet is designed for cum production.
	<</if>>

	<<set $hormones = $slaves[$i].hormoneBalance/50>>
	<<if $hormones < -1>>
		$His internal chemistry is perfectly suited to cum production.
	<<elseif $hormones < 0>>
		$His hormonal balance favors cum production.
	<<elseif $hormones > 0>>
		$His hormonal balance impedes cum production.
	<<elseif $hormones > 1>>
		$His internal chemistry is poorly suited to cum production.
	<</if>>

	<<if $slaves[$i].scrotum == 0>>
		$He does produce cum despite $his apparent ballslessness, but less than $he would if they weren't hidden inside $him.
	<</if>>

	<<if $slaves[$i].prostate>>
		<<if $slaves[$i].prostate > 2>>
			$His heavily altered prostate greatly increases the volume of $his ejaculations and promotes excessive, watery semen production. This dilute ejaculate @@.red;sells poorly@@ compared to normal cum.
		<<elseif $slaves[$i].prostate > 1>>
			$His hyperactive prostate increases the volume of $his ejaculations and promotes good semen production.
		<</if>>
	<<else>>
		$His lack of a prostate reduces the health and volume of $his ejaculations.
	<</if>>

	<<if ($slaves[$i].devotion > 50)>>
		$He's so happy that $his mental state has a positive impact on $his semen production.
	<<elseif ($slaves[$i].devotion < -50)>>
		$He's so unhappy that $his mental state has a negative impact on $his semen production.
	<</if>>

	<<if ($slaves[$i].health > 50)>>
		$His shining health helps $him really produce.
	<<elseif ($slaves[$i].health < -50)>>
		$His poor health impedes semen production.
	<</if>>

	<<if $slaves[$i].vasectomy == 1>>
		$His cum lacks the primary ingredient, sperm, thanks to $his vasectomy, @@.red;considerably lowering the value@@ of $his ejaculate.
	<<elseif $slaves[$i].ballType == "sterile">>
		$His cum lacks vigor entirely, thanks to $his chemical castration, @@.red;considerably lowering the value@@ of $his ejaculate.
	<</if>>

	/* Dairy rework cum half here */
	<<if ($slaves[$i].assignment == "work in the dairy")>>
		<<if ($dairyStimulatorsUpgrade == 1)>>
			<<if ($dairyStimulatorsSetting > 0)>>
				<<set $cum += $cum*(0.2*($dairyStimulatorsSetting+$dairyRestraintsSetting+Math.trunc((50-$slaves[$i].physicalAge)/20)))>>
			<</if>>
			<<if ($slaves[$i].chem > 360)>>
				<<set $cum = Math.trunc($cum*0.6)>>
			<<elseif ($slaves[$i].chem > 100)>>
				<<set $cum = Math.trunc($cum*((600-$slaves[$i].chem)/600))>>
			<</if>>
		<<elseif ($Milkmaid != 0)>>
			<<if ($Milkmaid.dick > 4) && canAchieveErection($Milkmaid)>>
				$Milkmaid.slaveName sometimes stands in for the machines, which is a polite way of saying $he sometimes fucks $slaves[$i].slaveName's ass to help $him cum.
				<<set $cum += $cum*0.2>>
			<</if>>
		<</if>>
	<<elseif ($slaves[$i].assignment == "be confined in the arcade")>>
		<<set $cum = $cum*0.5>>
	<</if>>

	<<set $cum = Math.trunc($cum)>>
	<<if $cum < 1>>
		<<set $cum = 1>>
	<</if>>
	<<set $slaves[$i].cum += $cum>>
	<<set $cumTotal += $cum>>
	<<set _incomeStats.cum = $cum>>

	<<if ($arcologies[0].FSPastoralist == "unset")>>
		<<set _cumSale = ($cum*random(15,25))>>
		<<if $slaves[$i].vasectomy == 1 || $slaves[$i].ballType == "sterile">><<set _cumSale *= 0.2>><<elseif $slaves[$i].prostate == 3>><<set _cumSale *= 0.5>><</if>>
		$He produces <<print $cum>> deciliters of cum over the week; the fresh ejaculate is sold for @@.yellowgreen;<<print cashFormat(_cumSale)>>.@@
	<<elseif $arcologies[0].FSPastoralistLaw == 1>>
		<<set _cumSale = ($cum*(random(20,40)))>>
		<<if $slaves[$i].vasectomy == 1 || $slaves[$i].ballType == "sterile">><<set _cumSale *= 0.2>><<elseif $slaves[$i].prostate == 3>><<set _cumSale *= 0.5>><</if>>
		$He produces <<print $cum>> deciliters of cum over the week; the fresh ejaculate, which is in extremely high demand as one of $arcologies[0].name's few legal sources of animal protein, is sold for @@.yellowgreen;<<print cashFormat(_cumSale)>>.@@
	<<else>>
		<<set _cumSale = ($cum*(random(10,20)+Math.trunc($arcologies[0].FSPastoralist/10)))>>
		<<if $slaves[$i].vasectomy == 1 || $slaves[$i].ballType == "sterile">><<set _cumSale *= 0.2>><<elseif $slaves[$i].prostate == 3>><<set _cumSale *= 0.5>><</if>>
		$He produces <<print $cum>> deciliters of cum over the week; the fresh ejaculate, which is in high demand given the new cultural preference for slave products, is sold for @@.yellowgreen;<<print cashFormat(_cumSale)>>.@@
	<</if>>
	<<set $cash += _cumSale>>
	<<set _incomeStats.income += _cumSale>>

	<<if ($slaves[$i].energy > 95)>>
		Getting $his dick constantly milked is almost as good as getting constant blowjobs as far as $he's concerned. @@.hotpink;$He is happy@@ to have $his member receive so much attention.
		<<set $slaves[$i].devotion += 1>>
	<</if>>

	<<if $slaves[$i].need>>
		$His cock and balls are milked so thoroughly that $he's involuntarily sexually sated, regardless of $his feelings and tastes.
		<<set $slaves[$i].need = 0>>
	<</if>>

	<<if !canAchieveErection($slaves[$i])>>
		Since $he cannot maintain an erection, $he requires @@.gold;painful@@ and @@.mediumorchid;degrading@@ anal electrostimulation to produce.
		<<set $slaves[$i].devotion -= 2>>
		<<set $slaves[$i].trust -= 2>>
		<<if ($slaves[$i].anus == 0)>>
			The electrostimulator @@.lime;breaks in $his virgin asshole.@@
			<<set $slaves[$i].anus = 1>>
		<</if>>
	<<elseif ($slaves[$i].devotion <= 20)>>
		Since $he's unaroused by $his situation, $he requires @@.gold;painful@@ and @@.mediumorchid;degrading@@ anal electrostimulation to produce.
		<<set $slaves[$i].devotion -= 2>>
		<<set $slaves[$i].trust -= 2>>
		<<if ($slaves[$i].anus == 0)>>
			The electrostimulator @@.lime;breaks in $his virgin asshole.@@
			<<set $slaves[$i].anus = 1>>
		<</if>>
	<</if>>

	<<if ($slaves[$i].balls < 3) && $slaves[$i].ballType != "sterile">>
		<<if ($slaves[$i].balls < 2)>>
			<<if (random(1,100) > (70 + ($slaves[$i].inducedNCS * 15)))>>
				Constant semen production and continual emptying and refilling @@.lime;increases the size of $his tiny testicles.@@
				<<set $slaves[$i].balls += 1>>
			<</if>>
		<<elseif (random(1,100) > (90 + ($slaves[$i].inducedNCS * 5)))>>
			Constant semen production and continual emptying and refilling @@.lime;increases the size of $his small testicles.@@
			<<set $slaves[$i].balls += 1>>
		<</if>>
	<</if>>

<</if>> /* CLOSES COCK MILKING */

<<if $slaves[$i].genes == "XX" && $slaves[$i].prostate > 0 && $slaves[$i].balls == 0>>
	$His female prostate fluid is considered an exotic delicacy.
	<<set $fluid = $slaves[$i].prostate * $slaves[$i].energy/5 + 1>>
	<<if $slaves[$i].energy > 10>>
		<<if $slaves[$i].health > 50>>
			<<if $slaves[$i].energy > 90>>
				As a nympho, $he has no trouble orgasming almost constantly.
			<</if>>
			<<set $fluid = $fluid*$slaves[$i].health/50>>
			$His shining health keeps $his juices flowing.
		<<elseif $slaves[$i].health < -50>>
			<<set $fluid = $fluid * (1 + $slaves[$i].health/50)>>
			$He is so unwell, $he produces less than normal.
		<</if>>
	<<else>>
		/* $slaves[$i].energy <= 10 */
		Unfortunately, $he is frigid and rarely reaches orgasm in spite of the intense automatic stimulation.
	<</if>>
	<<set $fluid = Math.clamp(Math.trunc($fluid),1,1000)>>
	<<set _incomeStats.fluid = $fluid>>
	<<print $fluid >> deciliters of uncommon ejaculate is gathered during $his milkings.
	<<set $fluidSale = $fluid*random(40,50)>>
	<<if $arcologies[0].FSPastoralist != "unset" && $arcologies[0].FSPastoralist > 30>>
		<<set $fluidSale = Math.trunc($fluidSale*(1 + ($arcologies[0].FSPastoralist-30)/140))>> /* fully accepted parsoralism gives +50% on the price*/
		Because of your arcology's cultural preferences, it comes with extra value.
	<</if>>
	It is sold for @@.yellowgreen;<<print cashFormat($fluidSale)>>.@@
	<<set $cash += $fluidSale>>
	<<set _incomeStats.income += $fluidSale>>
<</if>> /* CLOSES FEMALE PROSTATE FLUID GATHERING */

<<if ($slaves[$i].behavioralQuirk == "fitness")>>
	$slaves[$i].slaveName @@.hotpink;privately enjoys@@ the focus on $his health and fitness that comes with being a cow.
	<<set $slaves[$i].devotion += 1>>
<</if>>

<<if ($showVignettes == 1 && ($slaves[$i].assignment == "get milked" || $slaves[$i].assignment == "work in the dairy"))>>
	<<set _vignette = GetVignette($slaves[$i])>>
	__This week__ _vignette.text
	<<if (_vignette.type == "cash")>>
		<<set FResult($slaves[$i])>>
		<<if (_vignette.effect > 0)>>
			@@.yellowgreen;making you an extra <<print cashFormat(Math.trunc($FResult*_vignette.effect))>>.@@
		<<elseif (_vignette.effect < 0)>>
			@@.red;losing you <<print cashFormat(Math.abs(Math.trunc($FResult*_vignette.effect)))>>.@@
		<<else>>
			an incident without lasting effect.
		<</if>>
		<<set $cash += Math.trunc($FResult*_vignette.effect)>>
		<<set _incomeStats.income += Math.trunc($FResult*_vignette.effect)>>
	<<elseif (_vignette.type == "devotion")>>
		<<if (_vignette.effect > 0)>>
			<<if $slaves[$i].devotion > 50>>
		@@.hotpink;increasing $his devotion to you.@@
			<<elseif $slaves[$i].devotion >= -20>>
		@@.hotpink;increasing $his acceptance of you.@@
		<<elseif $slaves[$i].devotion > -10>>
		@@.hotpink;reducing $his dislike of you.@@
			<<else>>
		@@.hotpink;reducing $his hatred of you.@@
			<</if>>
		<<elseif (_vignette.effect < 0)>>
			<<if $slaves[$i].devotion > 50>>
		@@.mediumorchid;reducing $his devotion to you.@@
			<<elseif $slaves[$i].devotion >= -20>>
		@@.mediumorchid;reducing $his acceptance of you.@@
		<<elseif $slaves[$i].devotion > -10>>
		@@.mediumorchid;increasing $his dislike of you.@@
			<<else>>
		@@.mediumorchid;increasing $his hatred of you.@@
			<</if>>
		<<else>>
			an incident without lasting effect.
		<</if>>
		<<set $slaves[$i].devotion += 1*_vignette.effect>>
	<<elseif (_vignette.type == "trust")>>
		<<if (_vignette.effect > 0)>>
			<<if $slaves[$i].trust > 20>>
		@@.mediumaquamarine;increasing $his trust in you.@@
		<<elseif $slaves[$i].trust > -10>>
		@@.mediumaquamarine;reducing $his fear of you.@@
			<<else>>
		@@.mediumaquamarine;reducing $his terror of you.@@
			<</if>>
		<<elseif (_vignette.effect < 0)>>
			<<if $slaves[$i].trust > 20>>
		@@.gold;reducing $his trust in you.@@
			<<elseif $slaves[$i].trust >= -20>>
		@@.gold;increasing $his fear of you.@@
			<<else>>
		@@.gold;increasing $his terror of you.@@
			<</if>>
		<<else>>
			an incident without lasting effect.
		<</if>>
		<<set $slaves[$i].trust += 1*_vignette.effect>>
	<<elseif (_vignette.type == "health")>>
		<<if (_vignette.effect > 0)>>
		@@.green;improving $his health.@@
		<<elseif (_vignette.effect < 0)>>
		@@.red;affecting $his health.@@
		<<else>>
			an incident without lasting effect.
		<</if>>
		<<set $slaves[$i].health += 2*_vignette.effect>>
	<<else>>
		<<set FResult($slaves[$i])>>
		<<if (_vignette.effect > 0)>>
			@@.green;gaining you a bit of reputation.@@
		<<elseif (_vignette.effect < 0)>>
			@@.red;losing you a bit of reputation.@@
		<<else>>
			an incident without lasting effect.
		<</if>>
		<<set $rep += Math.trunc($FResult*_vignette.effect*0.1)>>
		<<set _incomeStats.rep += Math.trunc($FResult*_vignette.effect*0.1)>>
	<</if>>

<</if>>

/* FACILITY DECORATION IMPACTS */

<<if $slaves[$i].assignment == "work in the dairy">>
<<if $dairyDecoration != "standard">>
<<set _fsGain = Math.min(0.0001*$FSSingleSlaveRep*($milk+5*$cum), 1)>>
<<switch $dairyDecoration>>
<<case "Roman Revivalist">>
	<<set $arcologies[0].FSRomanRevivalist = Math.clamp($arcologies[0].FSRomanRevivalist += _fsGain,0,100)>>
<<case "Aztec Revivalist">>
	<<set $arcologies[0].FSAztecRevivalist = Math.clamp($arcologies[0].FSAztecRevivalist += _fsGain,0,100)>>
<<case "Egyptian Revivalist">>
	<<set $arcologies[0].FSEgyptianRevivalist = Math.clamp($arcologies[0].FSEgyptianRevivalist += _fsGain,0,100)>>
<<case "Edo Revivalist">>
	<<set $arcologies[0].FSEdoRevivalist = Math.clamp($arcologies[0].FSEdoRevivalist += _fsGain,0,100)>>
<<case "Arabian Revivalist">>
	<<set $arcologies[0].FSArabianRevivalist = Math.clamp($arcologies[0].FSArabianRevivalist += _fsGain,0,100)>>
<<case "Chinese Revivalist">>
	<<set $arcologies[0].FSChineseRevivalist = Math.clamp($arcologies[0].FSChineseRevivalist += _fsGain,0,100)>>
<<case "Chattel Religionist">>
	<<set $arcologies[0].FSChattelReligionist = Math.clamp($arcologies[0].FSChattelReligionist += _fsGain,0,100)>>
<<case "Degradationist">>
	<<set $arcologies[0].FSDegradationist = Math.clamp($arcologies[0].FSDegradationist += _fsGain,0,100)>>
<<case "Repopulation Focus">>
	<<set $arcologies[0].FSRepopulationFocus = Math.clamp($arcologies[0].FSRepopulationFocus += _fsGain,0,100)>>
<<case "Eugenics">>
	<<set $arcologies[0].FSRestart = Math.clamp($arcologies[0].FSRestart += _fsGain,0,100)>>
<<case "Asset Expansionist">>
	<<set $arcologies[0].FSAssetExpansionist = Math.clamp($arcologies[0].FSAssetExpansionist += _fsGain,0,100)>>
<<case "Transformation Fetishist">>
	<<set $arcologies[0].FSTransformationFetishist = Math.clamp($arcologies[0].FSTransformationFetishist += _fsGain,0,100)>>
<<case "Gender Radicalist">>
	<<set $arcologies[0].FSGenderRadicalist = Math.clamp($arcologies[0].FSGenderRadicalist += _fsGain,0,100)>>
<<case "Gender Fundamentalist">>
	<<set $arcologies[0].FSGenderFundamentalist = Math.clamp($arcologies[0].FSGenderFundamentalist += _fsGain,0,100)>>
<<case "Physical Idealist">>
	<<set $arcologies[0].FSPhysicalIdealist = Math.clamp($arcologies[0].FSPhysicalIdealist += _fsGain,0,100)>>
<<case "Hedonistic">>
	<<set $arcologies[0].FSHedonisticDecadence = Math.clamp($arcologies[0].FSHedonisticDecadence += _fsGain,0,100)>>
<<case "Supremacist">>
	<<set $arcologies[0].FSSupremacist = Math.clamp($arcologies[0].FSSupremacist += _fsGain,0,100)>>
<<case "Subjugationist">>
	<<set $arcologies[0].FSSubjugationist = Math.clamp($arcologies[0].FSSubjugationist += _fsGain,0,100)>>
<<case "Paternalist">>
	<<set $arcologies[0].FSPaternalist = Math.clamp($arcologies[0].FSPaternalist += _fsGain,0,100)>>
<<case "Pastoralist">>
	<<set $arcologies[0].FSPastoralist = Math.clamp($arcologies[0].FSPastoralist += _fsGain,0,100)>>
<<case "Maturity Preferentialist">>
	<<set $arcologies[0].FSMaturityPreferentialist = Math.clamp($arcologies[0].FSMaturityPreferentialist += _fsGain,0,100)>>
<<case "Youth Preferentialist">>
	<<set $arcologies[0].FSYouthPreferentialist = Math.clamp($arcologies[0].FSYouthPreferentialist += _fsGain,0,100)>>
<<case "Body Purist">>
	<<set $arcologies[0].FSBodyPurist = Math.clamp($arcologies[0].FSBodyPurist += _fsGain,0,100)>>
<<case "Slimness Enthusiast">>
	<<set $arcologies[0].FSSlimnessEnthusiast = Math.clamp($arcologies[0].FSSlimnessEnthusiast += _fsGain,0,100)>>
<</switch>>
<</if>>
<</if>>
