code:
:: Dairy Report [nobr]

<<set $bioreactorPerfectedID = 0, $dairySlaves = 0, $legendaryBallsID = 0, $legendaryCowID = 0, $milkmaidDevotionBonus = 1, $milkmaidHealthBonus = 0, $milkmaidTrustBonus = 1, $milkmaidDevotionThreshold = 45, $milkmaidTrustThreshold = 35>>

<<set _anusesStretched = 0, _birthers = 0, _births = 0, _cumWeek = 0, _femCumWeek = 0, _milkmaidFetish = 0, _milkmaidImpregnated = 0, _milkWeek = 0>>

<<set _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, _SL = $slaves.length, _MM = -1, _MMAttentionString = "">>

<<if ($Milkmaid != 0)>>
<<for _MM = 0; _MM < _SL; _MM++>>
<<if $slaves[_MM].ID == $Milkmaid.ID>>
	<<break>>
<</if>>
<</for>>
<</if>>

<<if _MM != -1>>
	<<set $i = _MM>>
	<<if $slaves[_MM].health < 90>>
		<<set $slaves[_MM].curatives to 2>>
	<</if>>
	<<if ($slaves[_MM].muscles > 50)>>
		<<set ($slaves[_MM].diet to "healthy")>>
	<<else>>
		<<set ($slaves[_MM].diet to "muscle building")>>
	<</if>>
	<<silently>>
	<<include "SA diet">>
	<<include "SA long term effects">>
	<<include "SA drugs">>
	<<include "SA relationships">>
	<<include "SA rivalries">>
	<</silently>>
	<<if $slaves[_MM].devotion <= 60>>
		<<set $slaves[_MM].devotion += 5>>
	<</if>>
	<<if $slaves[_MM].trust < 60>>
		<<set $slaves[_MM].trust += 5>>
	<</if>>
	<<if $slaves[_MM].relationship is -3>>
		<<set $milkmaidDevotionBonus += 2, $milkmaidTrustBonus += 2>>
	<</if>>
	<<if ($slaves[_MM].sexualQuirk is "caring")>>
		<<set $milkmaidTrustBonus += 1>>
	<</if>>
	<<if ($slaves[_MM].behavioralQuirk is "funny")>>
		<<set $milkmaidTrustBonus += 1>>
	<</if>>
	<<if ($slaves[_MM].oralSkill > 0)>>
		<<set $milkmaidDevotionBonus += Math.trunc($slaves[_MM].oralSkill/30)>>
	<</if>>
	<<if ($slaves[_MM].health >= 80)>>
		<<set $milkmaidHealthBonus += 1>>
	<</if>>
	<<set $toSearch to $slaves[_MM].career>>
	<<if $milkmaidCareers.contains($toSearch)>>
		<<set $milkmaidHealthBonus += 1>>
	<</if>>
	<<if ($slaves[_MM].muscles > 30)>>
		<<set $milkmaidHealthBonus += 1>>
	<</if>>
	<<set $milkmaidDevotionThreshold += (5*$milkmaidDevotionBonus), $milkmaidTrustThreshold += (5*$milkmaidTrustBonus)>>

	<<if $slaves[_MM].fetishStrength <= 95>>
		<<if $slaves[_MM].fetish != "boobs">>
			<<fetishChangeChance $slaves[_MM]>>
			<<if $fetishChangeChance > random(0,100)>>
				<<set _milkmaidFetish to 1, $slaves[_MM].fetishKnown to 1, $slaves[_MM].fetish to "boobs">>
			<</if>>
		<<elseif $slaves[_MM].fetishKnown == 0>>
			<<set _milkmaidFetish to 1, $slaves[_MM].fetishKnown to 1>>
		<<else>>
			<<set _milkmaidFetish to 2, $slaves[_MM].fetishStrength += 4>>
		<</if>>
	<</if>>

	<<set $Milkmaid = $slaves[_MM]>>
<</if>>

<<set $oldCash to $cash>>

<<for _i to 0; _i < _SL; _i++>>
	<<if ($slaves[_i].assignment != "work in the dairy")>><<continue>><</if>>

/* 000-250-006 */
/* <<if $seeImages == 1>><<SlaveArt $slaves[_i] 0 0>><</if>> */
<<if $seeImages == 1>>
    <div class="imageRef tinyImg">
    <<SlaveArt $slaves[_i] 0 0>>
</div>
<</if>>
/* 000-250-006 */

	<<set $dairySlaves++>>
	<<set $i = _i>>

	/* Perform facility based rule changes */
	<<if ($dairySlimMaintain == 0) && ($slaves[_i].weight <= 30)>>
		<<set $slaves[_i].diet to "fattening">>
	<<elseif ($slaves[_i].diet is "fattening") || ($dairyRestraintsSetting > 1)>>
		<<set $slaves[_i].diet to "healthy">>
	<<elseif ($slaves[_i].balls >0) && $cumProDiet == 1>>
		<<set $slaves[_i].diet to "cum production">>
	<</if>>

	/* General End of Week effects */
	<<silently>>
	<<include "SA get milked">>
	<<set _milkWeek += $milk, _cumWeek += $cum>>
	<<if ($milkmaidImpregnates == 1) && ($Milkmaid != 0) && ($Milkmaid.balls > 0) && $Milkmaid.pubertyXY == 1>>
		<<if (canGetPregnant($slaves[_i])) && (canPenetrate($Milkmaid)) && (canBreed($slaves[_i], $Milkmaid))>>
			<<set $slaves[_i].preg to 1, $slaves[_i].pregSource to $Milkmaid.ID, _milkmaidImpregnated++, $slaves[_i].vaginalCount += 10, $vaginalTotal += 10>>
		<</if>>
	<</if>>
	<<include "SA diet">>
	<<include "SA long term effects">>
	<<include "SA relationships">>
	<<include "SA rivalries">>
	<</silently>>

	/* Special attention section */
	<<if ($legendaryCowID == 0) && ($slaves[_i].lactation > 0) && (($slaves[_i].boobs-$slaves[_i].boobsImplant) > 6000) && ($slaves[_i].devotion > 50) && ($slaves[_i].prestige == 0)>>
		<<set $legendaryCowID to $slaves[_i].ID>>
	<</if>>
	<<if ($legendaryBallsID == 0) && ($slaves[_i].balls > 5) && ($slaves[_i].devotion > 50) && ($slaves[_i].prestige == 0)>>
		<<set $legendaryBallsID to $slaves[_i].ID>>
	<</if>>
	<<set $i = _i>>
	<<if $familyTesting == 1>>
		<<if $slaves[_i].mother == $Milkmaid.ID>>
			<<set _MMAttentionString += "She pays special attention to her daughter, $slaves["+_i+"].slaveName, making sure she is well kept and happy. ">>
			<<set $slaves[_i].trust += 1>>
		<</if>>
		<<if $slaves[_i].father == $Milkmaid.ID>>
			<<set _MMAttentionString += "She pays special attention to her daughter, $slaves["+_i+"].slaveName, making sure she is well kept and happy. ">>
			<<set $slaves[_i].trust += 1>>
		<</if>>
		<<if $slaves[_i].ID == $Milkmaid.father>>
			<<set _MMAttentionString += "She pays special attention to her father, $slaves["+_i+"].slaveName, making sure she is well kept and happy. ">>
			<<set $slaves[_i].trust += 1>>
		<</if>>
		<<if $slaves[_i].ID == $Milkmaid.mother>>
			<<set _MMAttentionString += "She pays special attention to her mother, $slaves["+_i+"].slaveName, making sure she is well kept and happy. ">>
			<<set $slaves[_i].trust += 1>>
		<</if>>
		<<if areSisters($slaves[_i], $Milkmaid) == 1>>
			<<set _MMAttentionString += "She pays special attention to her twin sister, $slaves["+_i+"].slaveName, making sure she is well kept and happy. ">>
			<<set $slaves[_i].trust += 1>>
		<<elseif areSisters($slaves[_i], $Milkmaid) == 2>>
			<<set _MMAttentionString += "She pays special attention to her sister, $slaves["+_i+"].slaveName, making sure she is well kept and happy. ">>
			<<set $slaves[_i].trust += 1>>
		<<elseif areSisters($slaves[_i], $Milkmaid) == 3>>
			<<set _MMAttentionString += "She pays special attention to her half-sister, $slaves["+_i+"].slaveName, making sure she is well kept and happy. ">>
			<<set $slaves[_i].trust += 1>>
		<</if>>
	<<else>>
	<<if $Milkmaid.relationTarget is $slaves[_i].ID>>
		<<set _MMAttentionString += "She pays special attention to her $slaves["+_i+"].relation, $slaves["+_i+"].slaveName, making sure she is well kept and happy. ">>
		<<set $slaves[_i].trust += 1>>
	<</if>>
	<</if>> /*closes family mode */
	<<if $Milkmaid.relationshipTarget is $slaves[_i].ID>>
		<<set _MMAttentionString += "She dotes over her <<if $Milkmaid.relationship == 1>>friend<<elseif $Milkmaid.relationship is 2>>best friend<<elseif $Milkmaid.relationship is 3>>friend with benefits<<elseif $Milkmaid.relationship is 4>>lover<<elseif $Milkmaid.relationship is 5>>slave wife<</if>>, $slaves["+_i+"].slaveName, making sure she is happy and comfortable. ">>
		<<set $slaves[_i].devotion += 1>>
	<</if>>
	<<if $Milkmaid.rivalryTarget is $slaves[_i].ID>>
		<<set _MMAttentionString += "She either neglects or harasses her <<if $Milkmaid.rivalry == 1>>growing rival<<elseif $Milkmaid.rivalry is 2>>rival<<elseif $Milkmaid.rivalry is 3>>bitter rival<</if>>, $slaves["+_i+"].slaveName, making sure she is unhappy and uncomfortable. ">>
		<<set $slaves[_i].devotion -= 3, $slaves[_i].trust -= 3>>
		<<if random(1,100) > 65>>
			<<set $Milkmaid.rivalry += 1, $slaves[_MM].rivalry += 1, $slaves[_i].rivalry += 1>>
		<</if>>
	<</if>>
	<<if $slaves[_i].prestigeDesc is "She is remembered for winning best in show as a dairy cow.">>
		<<set _MMAttentionString += "She spends extra time with $slaves["+_i+"].slaveName, the well-known cow.  $Milkmaid.slaveName is fascinated by her massive $slaves["+_i+"].boobs"+"cc breasts and spends extra time massaging and kneading them to maximize production. ">>
		<<set $slaves[_i].devotion += 3, $slaves[_i].trust += 3>>
	<</if>>
	<<if $slaves[_i].prestigeDesc is "She is remembered for winning best in show as a cockmilker.">>
		<<set _MMAttentionString += "She spends extra time with $slaves["+_i+"].slaveName, the massive ejaculating cow.  She can't help but massage the cow's dick and testes to stimulate them further and coax more from them. ">>
		<<set $slaves[_i].devotion += 3, $slaves[_i].trust += 3>>
	<</if>>
	<<if $slaves[_i].prestigeDesc is "She is remembered for winning best in show as a breeder." && $slaves[_i].preg > 10>>
		<<set _MMAttentionString += "She spends extra time with $slaves["+_i+"].slaveName, the well-known breeder. $Milkmaid.slaveName is fascinated by her growing pregnancy and popular womb. She makes sure her belly and it's occupants are nice and comfortable. ">>
		<<set $slaves[_i].devotion += 3, $slaves[_i].trust += 3>>
	<</if>>
	/* Facility Specific End of Week effects */
	<<if ($slaves[_i].devotion <= 20) && ($slaves[_i].trust > -20)>>
		<<set $slaves[_i].devotion -= 5, $slaves[_i].trust -= 5>>
	<</if>>
	<<if ($slaves[_i].health < -80)>>
	<<set $slaves[_i].health += 20>>
	<<elseif ($slaves[_i].health < -40)>>
	<<set $slaves[_i].health += 10>>
	<<elseif ($slaves[_i].health < 0)>>
	<<set $slaves[_i].health += 7>>
	<<elseif ($slaves[_i].health < 90)>>
	<<set $slaves[_i].health += 3>>
	<</if>>
	<<if ($slaves[_i].inflation > 0)>>
		<<set $slaves[_i].inflation = 0>>
		<<set $slaves[_i].inflationType = 0>>
		<<set $slaves[_i].inflationMethod = 0>>
		<<set $slaves[_i].milkSource = 0>>
	<</if>>
	<<if ($slaves[_i].lactation > 0)>>
		<<if ($dairySlimMaintain == 0) || ($slaves[_i].boobs > 700)>>
			<<if ($slaves[_i].boobs < 2000)>>
				<<set $slaves[_i].boobs += 100>>
			<<elseif ($slaves[_i].boobs < 5000)>>
				<<set $slaves[_i].boobs += 50>>
			<<elseif ($slaves[_i].boobs < 10000)>>
				<<set $slaves[_i].boobs += 25>>
			<</if>>
		<</if>>
	<</if>>

	<<if ($dairyFeedersUpgrade == 1) && ($dairyFeedersSetting > 0)>>
		<<if ($dairySlimMaintain == 0)>>
			<<if ($slaves[_i].balls == 0)>>
				<<set $slaves[_i].hormones to 2>>
			<</if>>
			<<if ($slaves[_i].lactation < 2)>>
				<<set $slaves[_i].lactation to 2>>
			<</if>>
		<</if>>
		<<if ($slaves[_i].health < 75)>>
			<<set $slaves[_i].health += 25>>
		<<else>>
			<<if ($dairySlimMaintain == 0)>>
				<<if ($slaves[_i].boobs < 25000)>>
					<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
						<<if ($slaves[_i].boobs < 2000)>>
							<<set $slaves[_i].boobs += 500>>
						<<elseif ($slaves[_i].boobs < 5000)>>
							<<set $slaves[_i].boobs += 250>>
						<<else>>
							<<set $slaves[_i].boobs += 100>>
						<</if>>
					<<else>>
						<<set $slaves[_i].boobs += 25*Math.trunc(($injectionUpgrade*2)+$dairyFeedersSetting+$dairyRestraintsSetting+((50-$slaves[_i].physicalAge)/4))>>
					<</if>>
					<<if ($slaves[_i].boobs > 14900) && ($slaves[_i].boobs < 15100)>>
						<<set _boobtacular += 1>>
					<</if>>
				<<else>>
					<<set $slaves[_i].boobs to 25000>>
				<</if>>
			<</if>>
			<<if ($slaves[_i].balls > 0)>>
				<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
					<<if ($slaves[_i].balls < 125)>>
						<<set $slaves[$_i].balls += 1>>
					<</if>>
					<<if ($slaves[_i].balls == 125)>>
						<<set _balltacular += 1>>
					<</if>>
				<<elseif ($slaves[_i].balls < 6)>>
					<<if (random(1,100) > (40+(10*$slaves[_i].dick)-(10*$dairyRestraintsSetting)-($injectionUpgrade*10)))>>
					<<set $slaves[_i].balls += 1>>
					<</if>>
					<<if ($slaves[_i].balls is 6)>>
					<<set _balltacular += 1>>
					<</if>>
				<</if>>
				<<if ($slaves[_i].dick < 10)>>
					<<if (random(1,100) > (40+(10*$slaves[_i].dick)-(10*$dairyRestraintsSetting)-($injectionUpgrade*10)))>>
					<<set $slaves[_i].dick += 1>>
					<</if>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
	<<if ($dairyStimulatorsUpgrade == 1)>>
		<<if ($dairyStimulatorsSetting > 1) && ($slaves[_i].anus < 4)>>
			<<set $slaves[_i].anus += 1>>
			<<if ($slaves[_i].anus is 4)>>
			<<set _anusesStretched += 1>>
			<</if>>
		<<elseif ($slaves[_i].anus < 3)>>
			<<set $slaves[_i].anus += 1>>
		<</if>>
		<<if ($slaves[_i].health < 60)>>
			<<set $slaves[_i].health += 20>>
		<<elseif $dairySlimMaintain == 0>>
			<<if ($slaves[_i].boobs < 25000)>>
			<<if $arcologies[0].FSAssetExpansionistResearch == 1>>
				<<if ($slaves[_i].boobs < 2000)>>
				<<set $slaves[_i].boobs += 500>>
				<<elseif ($slaves[_i].boobs < 5000)>>
				<<set $slaves[_i].boobs += 250>>
				<<else>>
				<<set $slaves[_i].boobs += 100>>
				<</if>>
			<<else>>
				<<set $slaves[_i].boobs += 25*Math.trunc(($injectionUpgrade*2)+$dairyStimulatorsSetting+$dairyRestraintsSetting+((50-$slaves[_i].physicalAge)/4))>>
			<</if>>
				<<if ($slaves[_i].boobs > 14900) && ($slaves[_i].boobs < 15100)>>
				<<set _boobtacular += 1>>
				<</if>>
			<<else>>
				<<set $slaves[_i].boobs to 25000>>
			<</if>>
		<</if>>
	<</if>>
	<<if ($dairyRestraintsSetting > 1)>>
		<<set $slaves[_i].lactationAdaptation += 1>>
		<<if ($slaves[_i].fetish is "mindbroken")>>
			<<if ($slaves[_i].boobs > 24800)>>
			<<if (($slaves[_i].balls > 5) || ($slaves[_i].balls == 0))>>
			<<set $bioreactorPerfectedID to $slaves[_i].ID>>
			<</if>>
			<</if>>
		<<else>>
			<<if ($slaves[_i].sexualFlaw != "self hating")>>
			<<if ($slaves[_i].sexualFlaw != "cum addict") || ($dairyFeedersSetting == 0)>>
			<<if ($slaves[_i].sexualFlaw != "anal addict") || ($dairyStimulatorsSetting == 0)>>
			<<if ($slaves[_i].sexualFlaw != "breeder") || ($slaves[_i].preg < 0) || ($dairyPregSetting == 0)>>
				<<if $dairyStimulatorsSetting > 1>>
					<<if ($slaves[_i].sexualFlaw != "hates anal") && ($slaves[_i].sexualQuirk != "painal queen")>>
					<<set $slaves[_i].sexualFlaw to "hates anal">>
					<</if>>
				<</if>>
				<<if $dairyPregSetting > 1>>
					<<if ($slaves[_i].sexualFlaw != "hates penetration") && ($slaves[_i].sexualQuirk != "strugglefuck queen")>>
					<<set $slaves[_i].sexualFlaw to "hates penetration">>
					<</if>>
				<</if>>
				<<if $dairyFeedersSetting > 1>>
					<<if ($slaves[_i].sexualFlaw != "hates oral") && ($slaves[_i].sexualQuirk != "gagfuck queen")>>
					<<set $slaves[_i].sexualFlaw to "hates oral">>
					<</if>>
				<</if>>
			<</if>>
			<</if>>
			<</if>>
			<</if>>
		<</if>>
		<<if $slaves[_i].chem > 250>>
			<<set _chemSevere += 1>>
		<<elseif $slaves[_i].chem > 100>>
			<<set _chemMinor += 1>>
		<</if>>
	<</if>>
	<<if ($dairyStimulatorsSetting + $dairyFeedersSetting + $dairyPregSetting) > 5>>
		<<if $slaves[_i].devotion <= 95>>
		<<if $slaves[_i].sexualFlaw != "self hating">>
		<<if ($slaves[_i].sexualFlaw != "breeder") || ($slaves[_i].preg < 0)>>
			<<if ($slaves[_i].devotion > -75)>>
			<<set $slaves[_i].devotion -= 10>>
			<<if ($slaves[_i].devotion < -65)>>
				<<set _hatefilled += 1>>
			<</if>>
			<<elseif ($slaves[_i].trust > -75)>>
			<<set $slaves[_i].trust -= 10>>
			<<if ($slaves[_i].trust < -65)>>
				<<set _horrified += 1>>
			<</if>>
			<<elseif ($slaves[_i].vaginalSkill > 0)>>
			<<set $slaves[_i].vaginalSkill -= 10, _skillsLost += 1>>
			<<elseif ($slaves[_i].oralSkill > 0)>>
			<<set $slaves[_i].oralSkill -= 10, _skillsLost += 1>>
			<<elseif ($slaves[_i].analSkill > 0)>>
			<<set $slaves[_i].analSkill -= 10, _skillsLost += 1>>
			<<elseif ($slaves[_i].career != "a bioreactor")>>
			<<set $slaves[_i].career to "a bioreactor", _careerForgotten += 1>>
			<<elseif ($slaves[_i].intelligence > -1)>>
			<<set $slaves[_i].intelligence -= 1, _intelligenceLost += 1>>
			<<elseif ($slaves[_i].devotion >= -20)>>
			<<set $slaves[_i].devotion -= 10>>
			<<elseif ($slaves[_i].trust > -20)>>
			<<set $slaves[_i].trust -= 10>>
			<<elseif ($slaves[_i].whoreSkill > 0)>>
			<<set $slaves[_i].whoreSkill -= 10, _skillsLost += 1>>
			<<elseif ($slaves[_i].entertainSkill > 0)>>
			<<set $slaves[_i].entertainSkill -= 10, _skillsLost += 1>>
			<<elseif ($slaves[_i].intelligence > -2)>>
			<<set $slaves[_i].intelligence -= 1, _stupidified += 1>>
			<<elseif ($slaves[_i].fetish != "mindbroken")>>
			<<set $slaves[_i].fetish to "mindbroken", _mindbroken += 1>>
			<</if>>
		<</if>>
		<</if>>
		<</if>>
		<<if $slaves[_i].milk > 1000>>
			<<if ($slaves[_i].boobs > 12000) && ($slaves[_i].career != "a bioreactor")>>
				<<set $slaves[_i].career to "a bioreactor", _careerForgotten += 1>>
			<</if>>
		<</if>>
		<<if ($arcologies[0].FSBodyPuristLaw == 0) && ($healthyDrugsUpgrade == 0)>>
			<<set $slaves[_i].chem += 5>>
		<<else>>
			<<set $slaves[_i].chem += 2>>
		<</if>>
	<<elseif ($dairyStimulatorsSetting + $dairyFeedersSetting + $dairyPregSetting) > 3>>
	<<if ($slaves[_i].devotion < 75)>>
		<<if ($slaves[_i].devotion > -75)>>
		<<set $slaves[_i].devotion -= 5>>
		<<if ($slaves[_i].devotion < -70)>>
			<<set _hatefilled += 1>>
		<</if>>
		<<elseif ($slaves[_i].trust > -75)>>
		<<set $slaves[_i].trust -= 5>>
		<<if ($slaves[_i].trust < -70)>>
			<<set _horrified += 1>>
		<</if>>
		<<elseif ($slaves[_i].vaginalSkill >= 20)>>
		<<set $slaves[_i].vaginalSkill -= 10, _skillsLost += 1>>
		<<elseif ($slaves[_i].oralSkill >= 20)>>
		<<set $slaves[_i].oralSkill -= 10, _skillsLost += 1>>
		<<elseif ($slaves[_i].analSkill >= 20)>>
		<<set $slaves[_i].analSkill -= 10, _skillsLost += 1>>
		<<elseif ($slaves[_i].career != "a bioreactor")>>
		<<set $slaves[_i].career to "a bioreactor", _careerForgotten += 1>>
		<<elseif ($slaves[_i].intelligence > -1)>>
		<<set $slaves[_i].intelligence -= 1, _intelligenceLost += 1>>
		<<elseif ($slaves[_i].devotion >= -20)>>
		<<set $slaves[_i].devotion -= 8>>
		<<elseif ($slaves[_i].trust > -20)>>
		<<set $slaves[_i].trust -= 8>>
		<<elseif ($slaves[_i].whoreSkill >= 20)>>
		<<set $slaves[_i].whoreSkill -= 10, _skillsLost += 1>>
		<<elseif ($slaves[_i].entertainSkill >= 20)>>
		<<set $slaves[_i].entertainSkill -= 10, _skillsLost += 1>>
		<<elseif ($slaves[_i].intelligence > -2)>>
		<<set $slaves[_i].intelligence -= 1, _stupidified += 1>>
		<<elseif ($slaves[_i].fetish != "mindbroken")>>
		<<set $slaves[_i].fetish to "mindbroken", _mindbroken += 1>>
		<</if>>
	<<elseif $slaves[_i].milk > 1000>>
		<<if ($slaves[_i].boobs > 12000) && ($slaves[_i].career != "a bioreactor")>>
			<<set $slaves[_i].career to "a bioreactor", _careerForgotten += 1>>
		<</if>>
	<</if>>
	<<if ($arcologies[0].FSBodyPuristLaw == 0) && ($healthyDrugsUpgrade == 0)>>
		<<set $slaves[_i].chem += 2>>
	<<else>>
		<<set $slaves[_i].chem += 1>>
	<</if>>
	<</if>>
	<<if ($dairyPregUpgrade == 1) && ($dairyPregSetting > 0)>>
		<<if ($slaves[_i].ovaries == 1) && ($slaves[_i].vagina > -1)>>
			<<set _femCumWeek += Math.trunc((70-$slaves[_i].physicalAge)/(30-($slaves[_i].vaginaLube*10)))>>
			<<if ($slaves[_i].preg is -2)>>
			<<set $slaves[_i].preg to 0, _desterilized += 1>>
			<</if>>
			<<if isFertile($slaves[_i])>>
				<<if $slaves[_i].eggType == "human">>
				<<set $slaves[_i].preg to 1>>
				<<if ($dairyPregSetting > 2)>>
				<<set $slaves[_i].pregType to random(10,29)>>
				<<elseif ($dairyPregSetting > 1)>>
				<<set $slaves[_i].pregType to random(3,5)>>
				<<else>>
				<<set $slaves[_i].pregType to either(1, 1, 1, 1, 2, 2, 2, 3, 3, 4)>>
				<</if>>
				<<set $slaves[_i].pregSource to -2>>
				<</if>>
				<<if ($slaves[_i].vagina == 0)>>
				<<set $slaves[_i].vagina to 1>>
				<</if>>
			<</if>>
			<<if ($slaves[_i].preg > 0)>>
			<<if ($dairyPregSetting > 2)>>
				<<set $cash += 100>>
			<<elseif ($dairyPregSetting > 1)>>
				<<set $cash += 50>>
			<<else>>
				<<set $cash += 25>>
			<</if>>
			<<if ($dairyPregSetting > 1) && ($slaves[_i].vagina < 4)>>
				<<set $slaves[_i].vagina += 1>>
				<<if ($slaves[_i].vagina is 4)>>
				<<set _vaginasStretched += 1>>
				<</if>>
			<<elseif ($slaves[_i].vagina < 3)>>
				<<set $slaves[_i].vagina += 1>>
			<</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>>

<<set _Tadd = ($bioreactorsXY + $bioreactorsXX + $bioreactorsHerm + $bioreactorsBarren)>>
<<if ($dairySlaves + _Tadd > 0)>>

	<<if $seeImages == 1>><br style="clear:both" /><</if>>
	<<if ($dairySlaves == 1)>>''There is 1 cow in $dairyName.''<<else>>''There are $dairySlaves cows in $dairyName.''<</if>>

	<<if ($dairyRestraintsSetting > 1)>>
	It functions as an industrial slave products factory.
	<</if>>
	<<if (_Tadd > 0)>>
	_Tadd milking machines have permanent biological components, making a total of <<print _Tadd + $dairySlaves>> milk-producing bodies.
	<<set _seed to (3*$bioreactorsXY) + (3*$bioreactorsHerm), _cumWeek += _seed>>
	<<if ($arcologies[0].FSPastoralistLaw == 1)>>
		<<set $cash += _seed*random(40,50)>>
	<<elseif ($arcologies[0].FSPastoralist != "unset")>>
		<<set $cash += _seed*(random(25,35)+Math.trunc($arcologies[0].FSPastoralist/10))>>
	<<else>>
		<<set $cash += _seed*random(25,35)>>
	<</if>>
	<<set _seed to ($bioreactorsXX) + ($bioreactorsHerm), _femCumWeek += _seed>>
	<<if ($arcologies[0].FSPastoralistLaw == 1)>>
		<<set $cash += _seed*random(40,50)>>
	<<elseif ($arcologies[0].FSPastoralist != "unset")>>
		<<set $cash += _seed*(random(25,35)+Math.trunc($arcologies[0].FSPastoralist/10))>>
	<<else>>
		<<set $cash += _seed*random(25,35)>>
	<</if>>
	<<set _seed to (300*$bioreactorsXX) + (250*$bioreactorsBarren) + (200*$bioreactorsXY) + (200*$bioreactorsHerm), _milkWeek += _seed>>
	<<if ($arcologies[0].FSPastoralistLaw == 1)>>
		<<set $cash += _seed*(13+Math.trunc($arcologies[0].FSPastoralist/30))>>
	<<elseif ($arcologies[0].FSPastoralist != "unset")>>
		<<set $cash += _seed*(8+Math.trunc($arcologies[0].FSPastoralist/30))>>
	<<else>>
		<<set $cash += _seed*9>>
	<</if>>
	<</if>>

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

	<<set _profits to $cash-$oldCash>>

	<<if ($Milkmaid != 0)>>
	$Milkmaid.slaveName is serving as your milkmaid<<if $Milkmaid.relationship is -3>> She tries her best to be your perfect farmwife<</if>>.
	<<if _milkmaidImpregnated > 0>>
		It's her responsibility to keep her charges pregnant, and she constantly
		<<if _milkmaidImpregnated == 1>>
			breeds the one fertile cow.
		<<else>>
			fills the _milkmaidImpregnated cows' cunts with her cum.
		<</if>>
		<<set Tmult = (_milkmaidImpregnated * 10), $slaves[_MM].penetrativeCount += Tmult, $Milkmaid.penetrativeCount += Tmult, $penetrativeTotal += Tmult>>
	<</if>>
	<<if (_milkmaidFetish == 1)>>
		In her line of work, she touches more breasts than even you do. She lives in an atmosphere of quivering, heaving, milky breastflesh; of girls who shudder and moan when she touches their creamy nipples. She has @@color:lightcoral;become more of a breast girl.@@
	<<elseif (_milkmaidFetish == 2)>>
		It's a hard life, pulling teats and washing cows, but it does @@color:lightsalmon;make her more of a breast fetishist.@@
	<</if>>
	<<if ($Milkmaid.muscles > 30)>>
		Her muscles help her handle the fattest or most reluctant cow.
	<<else>>
		Her constant handling of cows causes her to @@color:lime;gain muscle.@@.
	<</if>>
	<<if ($Milkmaid.oralSkill > 30)>>
		Her skilled tongue helps her keep her girls happy.
	<</if>>
	<<if ($Milkmaid.oralSkill < 90)>>
		<<set $skillIncrease = 3>>
		<<OralSkillIncrease $slaves[_MM]>>
	<</if>>
	<<if ($Milkmaid.sexualQuirk is "caring")>>
		She's very caring, and does her best to get the cows to trust her.
	<</if>>
	<<if ($Milkmaid.behavioralQuirk is "funny")>>
		She's funny, and does her best to get the cows to trust her by keeping them laughing.
	<</if>>
	<<set $toSearch to $Milkmaid.career>>
	<<if $milkmaidCareers.contains($toSearch)>>
		She has career experience dealing with milk animals.
	<</if>>

	<<print _MMAttentionString>>

	<<if (_cumWeek > 0) && ($dairyStimulatorsSetting < 2)>>
	<<if ($Milkmaid.dick > 4) && (canPenetrate($Milkmaid))>>
		She uses her turgid cock to give prostate stimulation to slaves that need help ejaculating.
	<</if>>
	<</if>>
	<</if>>

<<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>>
	One cow has been drugged and used long enough that she requires increased curative doses, slightly reducing her 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 _chemMinor > 0>>
	One cow had minor health issues preventing her fertile womb from conceiving; they have been resolved and she 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>>
	One cow stopped struggling so much when fucked by the machines; it seems she 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>>
	One cow's emotional activity dropped significantly; this indicates acceptance that she 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>>
	One cow forgot skills due to her 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>>
	One cow forgot forgot the details of her past professional life; all she 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>>
	One cow was so mentally dulled by use as biological factories that she 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>>
	One cow's testicles reached the largest size drug treatments can produce; the machines will now focus on buttfucking her 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)>>
$dairyNameCaps produced <<print _milkWeek+((8*$inflatedSlavesMilk*10)+8)>> liters of milk<<if _cumWeek > 0>> and <<print _cumWeek+(((80*$inflatedSlavesCum*10)+80)/10)>> liters of cum<</if>> this week.
<<if $inflatedSlavesMilk > 0>>
	<<print ((8*$inflatedSlavesMilk*10)+8)>> liters of milk were pumped into your penthouse for filling slaves this week.
<</if>>
<<if $inflatedSlavesCum > 0>>
	<<if $inflatedSlavesMilk > 0>>and <</if>><<print (((80*$inflatedSlavesCum*10)+80)/10)>> 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">>
<<if $dairyPregSetting > 0>>
	The Societal Elite know what you are doing with your cows. @@color: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. @@color:red;They are not amused by your disenterest in eugenics@@.
	<<set $failedElite += 10>>
<</if>>
<</if>>

These products sell for @@color:yellowgreen;¤_profits@@.

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

<<if ($dairySlimMaintainUpgrade == 1 && $dairySlimMaintain == 1)>>
	<<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 your 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 ($dairy < ($dairySlaves + _Tadd))>>
	<<set $dairySpots to 0>>
	<br>
<<else>>

<<set $dairySpots to $dairy - $dairySpots>>

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

<</if>>

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

<<else>>
	''$dairyNameCaps is empty.''
	<<set $dairySpots to $dairy>>
<</if>>
<br><br>


code:
:: Default Rules [nobr]

<<for _r to 0; _r < $defaultRules.length; _r++>>
<<set _currentRule to $defaultRules[_r]>>
<<if !ruleApplied($activeSlave, _currentRule.ID)>><<continue>><</if>>
<<if (def _currentRule.facility) && (_currentRule.facility.length > 1) and !ruleAppliedToSlaveFacility(_currentRule, $activeSlave)>><<continue>><</if>>

<<if $activeSlave.fuckdoll == 0>>

<<if (_currentRule.choosesOwnAssignment == 1)>>
 <<if ($activeSlave.choosesOwnAssignment == 0)>>
 <<if ($activeSlave.assignmentVisible == 1)>>
 <<if ($activeSlave.assignment != "recruit girls")>>
 <<if ($activeSlave.assignment != "be your Head Girl")>>
 <<if ($activeSlave.assignment != "guard you")>>

$activeSlave.slaveName is now allowed to select her own assignments.
	<<set $activeSlave.choosesOwnAssignment to 1>>
	<<set $activeSlave.assignment to "choose her own job">>
 <</if>>
 <</if>>
 <</if>>
 <</if>>
 <</if>>
<</if>>

<<if (_currentRule.clothes isnot "no default setting")>>
<<if (_currentRule.choosesOwnClothes == 1)>>
 <<if ($activeSlave.choosesOwnClothes == 0)>>

$activeSlave.slaveName is now allowed to choose her own clothes.
	<<set $activeSlave.choosesOwnClothes to 1>>
	<<set $activeSlave.clothes to "choosing her own clothes">>
  <</if>>
<<elseif ($activeSlave.clothes isnot _currentRule.clothes)>>
	<<set $activeSlave.clothes to _currentRule.clothes>>

$activeSlave.slaveName is now wearing $activeSlave.clothes.
	<<set $activeSlave.choosesOwnClothes to 0>>
<</if>>
<</if>>

<<if (_currentRule.collar isnot "no default setting")>>
<<if ($activeSlave.collar isnot _currentRule.collar)>>
	<<set $activeSlave.collar to _currentRule.collar>>
	<<if ($activeSlave.collar is "none")>>

$activeSlave.slaveName has been given no collar.
	<<else>>

$activeSlave.slaveName has been given a $activeSlave.collar collar.
	<</if>>
<</if>>
<</if>>

<<set _tmp to lastEyeWearRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.eyewear isnot "no default setting")>>
	<<if _currentRule.eyewear is "correct with glasses">>
	<<if $activeSlave.eyes <= -1>>
		<<if $activeSlave.eyewear != "corrective glasses">>
		<<set $activeSlave.eyewear to "corrective glasses">>
		<<set $cash -= $modCost>>

$activeSlave.slaveName has been given corrective glasses.
		<</if>>
	<<else>>
		<<if $activeSlave.eyewear != "none">>
		<<set $activeSlave.eyewear to "none">>

$activeSlave.slaveName's eyewear has been removed.
		<</if>>
	<</if>>
	<<elseif _currentRule.eyewear is "correct with contacts">>
	<<if $activeSlave.eyes <= -1>>
		<<if $activeSlave.eyewear != "corrective contacts">>
		<<set $activeSlave.eyewear to "corrective contacts">>
		<<set $cash -= $modCost>>

$activeSlave.slaveName has been given corrective contacts.
	  <</if>>
	<<else>>
		<<if $activeSlave.eyewear != "none">>
		<<set $activeSlave.eyewear to "none">>

$activeSlave.slaveName's eyewear has been removed.
	  <</if>>
	<</if>>
	<<elseif _currentRule.eyewear is "blur with glasses">>
	<<if $activeSlave.eyes > -1>>
		<<if $activeSlave.eyewear != "blurring glasses">>
		<<set $activeSlave.eyewear to "blurring glasses">>
		<<set $cash -= $modCost>>

$activeSlave.slaveName has been given blurring glasses.
	  <</if>>
	<<else>>
		<<if $activeSlave.eyewear != "none">>
		<<set $activeSlave.eyewear to "none">>

$activeSlave.slaveName's eyewear has been removed.
		<</if>>
	<</if>>
	<<elseif _currentRule.eyewear is "blur with contacts">>
	<<if $activeSlave.eyes > -1>>
	  <<if $activeSlave.eyewear != "blurring contacts">>
		<<set $activeSlave.eyewear to "blurring contacts">>
		<<set $cash -= $modCost>>

$activeSlave.slaveName has been given blurring contacts.
	  <</if>>
	<<else>>
	  <<if $activeSlave.eyewear != "none">>
		<<set $activeSlave.eyewear to "none">>

Since $activeSlave.slaveName's eyewear has been removed.
	  <</if>>
	<</if>>
	<<elseif _currentRule.eyewear is "universal glasses">>
	<<if $activeSlave.eyes <= -1>>
	  <<if $activeSlave.eyewear != "corrective glasses">>
		<<set $activeSlave.eyewear to "corrective glasses">>
		<<set $cash -= $modCost>>

$activeSlave.slaveName has been given corrective glasses.
	  <</if>>
	<<else>>
	  <<if $activeSlave.eyewear != "glasses">>
		<<set $activeSlave.eyewear to "glasses">>
		<<set $cash -= $modCost>>

$activeSlave.slaveName has been given decorative glasses.
	  <</if>>
	<</if>>
  <<else>>
	  <<if $activeSlave.eyewear != "none">>
		<<set $activeSlave.eyewear to "none">>

$activeSlave.slaveName's eyewear has been removed.
	  <</if>>
  <</if>>
<</if>>
<</if>>

<<if $activeSlave.vagina == 0>>
<<if _currentRule.virginAccessory isnot "no default setting">>
<<if $activeSlave.vaginalAccessory isnot _currentRule.virginAccessory>>
	<<set $activeSlave.vaginalAccessory to _currentRule.virginAccessory>>
	<<if $activeSlave.vaginalAccessory is "huge dildo">>

$activeSlave.slaveName has been given a
		<<if $activeSlave.vagina >= 3>>
			massive dildo to permanently gape her cunt,
		<<else>>
			large dildo for her pussy, since it must be stretched before it can accommodate a huge one,
			<<set $activeSlave.vaginalAccessory to "large dildo">>
		<</if>>
	<<elseif $activeSlave.vaginalAccessory is "none">>

$activeSlave.slaveName's item for her pussy has been changed to be nothing.
	<<else>>

$activeSlave.slaveName has been given a $activeSlave.vaginalAccessory for her pussy,
	<</if>>
<</if>>
<</if>>
<<elseif ($activeSlave.vagina > 0) && ($activeSlave.anus == 0)>>
<<if _currentRule.aVirginAccessory isnot "no default setting">>
<<if $activeSlave.vaginalAccessory isnot _currentRule.aVirginAccessory>>
	<<set $activeSlave.vaginalAccessory to _currentRule.aVirginAccessory>>
	<<if $activeSlave.vaginalAccessory is "huge dildo">>

$activeSlave.slaveName has been given a
		<<if $activeSlave.vagina >= 3>>
			massive dildo to permanently gape her cunt.
		<<else>>
			large dildo for her pussy, since it must be stretched before it can accommodate a huge one.
			<<set $activeSlave.vaginalAccessory to "large dildo">>
		<</if>>
	<<elseif $activeSlave.vaginalAccessory is "none">>

$activeSlave.slaveName's item for her pussy has been changed to be nothing.
	<<else>>

$activeSlave.slaveName has been given a $activeSlave.vaginalAccessory for her pussy,
	<</if>>
<</if>>
<</if>>
<<elseif $activeSlave.vagina > 0>>
<<if _currentRule.vaginalAccessory isnot "no default setting">>
<<if $activeSlave.vaginalAccessory isnot _currentRule.vaginalAccessory>>
	<<set $activeSlave.vaginalAccessory to _currentRule.vaginalAccessory>>
	<<if $activeSlave.vaginalAccessory is "huge dildo">>

$activeSlave.slaveName has been given a
		<<if $activeSlave.vagina >= 3>>
			massive dildo to permanently gape her cunt.
		<<else>>
			large dildo for her pussy, since it must be stretched before it can accommodate a huge one.
			<<set $activeSlave.vaginalAccessory to "large dildo">>
		<</if>>
	<<elseif $activeSlave.vaginalAccessory is "none">>

$activeSlave.slaveName's item for her pussy has been changed to be nothing.
	<<else>>

$activeSlave.slaveName has been given a $activeSlave.vaginalAccessory for her pussy,
	<</if>>
<</if>>
<</if>>
<</if>>

<<if ($activeSlave.dick > 0)>>
<<if $activeSlave.anus == 0>>
<<if (_currentRule.aVirginDickAccessory isnot "no default setting")>>
<<if ($activeSlave.dickAccessory isnot _currentRule.aVirginDickAccessory)>>
	<<set $activeSlave.dickAccessory to _currentRule.aVirginDickAccessory>>
	<<if $activeSlave.dickAccessory is "none">>

$activeSlave.slaveName's dick accessory has been changed to be nothing.
	<<else>>

$activeSlave.slaveName has been given a $activeSlave.dickAccessory for her cock.
	<</if>>
<</if>>
<</if>>
<<else>>
<<if (_currentRule.dickAccessory isnot "no default setting")>>
<<if ($activeSlave.dickAccessory isnot _currentRule.dickAccessory)>>
	<<set $activeSlave.dickAccessory to _currentRule.dickAccessory>>
	<<if $activeSlave.dickAccessory is "none">>

$activeSlave.slaveName's dick accessory has been changed to be nothing.
	<<else>>

$activeSlave.slaveName has been given a $activeSlave.dickAccessory for her cock.
	<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($activeSlave.vaginalAccessory isnot "anal chastity") && ($activeSlave.vaginalAccessory isnot "combined chastity") && ($activeSlave.dickAccessory isnot "anal chastity") && ($activeSlave.dickAccessory isnot "combined chastity")>>
<<if $activeSlave.anus == 0>>
<<if (_currentRule.aVirginButtplug isnot "no default setting")>>
<<if ($activeSlave.buttplug isnot _currentRule.aVirginButtplug)>>
	<<set $activeSlave.buttplug to _currentRule.aVirginButtplug>>
	<<if ($activeSlave.buttplug is "huge plug")>>

$activeSlave.slaveName has been given a
		<<if ($activeSlave.anus >= 3)>>
			massive plug to permanently gape her asshole.
		<<else>>
			<<set $activeSlave.buttplug to "large plug">>
			large buttplug for her asshole, since it must be stretched before it can accommodate a huge one.
		<</if>>
	<<elseif $activeSlave.buttplug is "none">>

$activeSlave.slaveName's item for her pussy has been changed to be nothing.
	<<else>>

$activeSlave.slaveName has been given a $activeSlave.buttplug for her asshole.
	<</if>>
<</if>>
<</if>>
<<else>>
<<if (_currentRule.buttplug isnot "no default setting")>>
<<if ($activeSlave.buttplug isnot _currentRule.buttplug)>>
	<<set $activeSlave.buttplug to _currentRule.buttplug>>
	<<if ($activeSlave.buttplug is "huge plug")>>

$activeSlave.slaveName has been given a
		<<if ($activeSlave.anus >= 3)>>
			massive plug to permanently gape her asshole.
		<<else>>
			<<set $activeSlave.buttplug to "large plug">>
			large buttplug for her asshole, since it must be stretched before it can accommodate a huge one.
		<</if>>
	<<elseif $activeSlave.buttplug is "none">>

$activeSlave.slaveName's item for her pussy has been changed to be nothing.
	<<else>>

$activeSlave.slaveName has been given a $activeSlave.buttplug for her asshole.
	<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if (_currentRule.shoes isnot "no default setting")>>
<<if ($activeSlave.shoes isnot _currentRule.shoes)>>
<<if ($activeSlave.amp != 1)>>
	<<set $activeSlave.shoes to _currentRule.shoes>>

$activeSlave.slaveName's shoes have been set to $activeSlave.shoes.
<</if>>
<</if>>
<</if>>

<<if (_currentRule.bellyAccessory isnot "no default setting")>>
<<if ($activeSlave.bellyAccessory isnot _currentRule.bellyAccessory)>>
    <<if ( (($activeSlave.preg >= 10) and ($activeSlave.bellyImplant >= 2000)) and ( (_currentRule.bellyAccessory is "a small empathy belly") or (_currentRule.bellyAccessory is "a medium empathy belly") or (_currentRule.bellyAccessory is "a large empathy belly") or (_currentRule.bellyAccessory is "a huge empathy belly") ) )>>

$activeSlave.slaveName's natural belly is too big to properly wear an empathy belly.
    <<else>>
	<<set $activeSlave.bellyAccessory to _currentRule.bellyAccessory>>

$activeSlave.slaveName has been given the proper belly accessory to wear.
    <</if>>
<</if>>
<</if>>

<</if>> /* CLOSES FUCKDOLL CHECK */

<<if (_currentRule.growth isnot "no default setting")>>
<<if ($activeSlave.indentureRestrictions < 2)>>
<<if (_currentRule.growth is "girlish")>>
	<<if ($activeSlave.butt < 2)>>
		<<set $activeSlave.drugs to "butt injections">>

$activeSlave.slaveName's butt is tiny, so she's been put on buttock growth drugs.
	<<elseif ($activeSlave.boobs < 350)>>
		<<set $activeSlave.drugs to "breast injections">>

$activeSlave.slaveName's tits are tiny, so she's been put on breast growth drugs.
	<<elseif ($activeSlave.lips <= 20)>>
		<<set $activeSlave.drugs to "lip injections">>

$activeSlave.slaveName's lips are average, so she's been put on lip growth injections.
	<<elseif ($activeSlave.drugs is "lip injections") || ($activeSlave.drugs is "breast injections") || ($activeSlave.drugs is "butt injections")>>
		<<set $activeSlave.drugs to "no drugs">>

$activeSlave.slaveName has reached growth targets and has been taken off growth injections.
	<</if>>
<<elseif (_currentRule.growth is "stacked")>>
	<<if ($activeSlave.butt < 2)>>
		<<set $activeSlave.drugs to "butt injections">>

$activeSlave.slaveName's butt is tiny, so she's been put on buttock growth drugs.
	<<elseif ($activeSlave.butt < 4) && ($activeSlave.hips > -2)>>
		<<set $activeSlave.drugs to "butt injections">>

$activeSlave.slaveName's hips can support a bigger butt, so she's been put on buttock growth drugs.
	<<elseif ($activeSlave.boobs < 1000)>>
		<<set $activeSlave.drugs to "breast injections">>

$activeSlave.slaveName's tits aren't large, so she's been put on breast growth drugs.
	<<elseif ($activeSlave.dick > 0) && ($activeSlave.dick < 4) && ($activeSlave.balls > 0)>>
		<<set $activeSlave.drugs to "penis enhancement">>

$activeSlave.slaveName's dick isn't large, so she's been put on penis enhancement.
	<<elseif ($activeSlave.lips <= 20)>>
		<<set $activeSlave.drugs to "lip injections">>

$activeSlave.slaveName's has been put on lip growth injections.
	<<elseif ($activeSlave.scrotum > 0) && ($activeSlave.balls < 4) && ($activeSlave.balls > 0)>>
		<<set $activeSlave.drugs to "testicle enhancement">>

$activeSlave.slaveName's balls aren't large, so she's been put on testicle enhancement.
	<<elseif $activeSlave.drugs != "no drugs">>
		<<set $activeSlave.drugs to "no drugs">>

$activeSlave.slaveName has reached growth targets and has been taken off growth injections.
	<</if>>
<<else>>
	<<if ($activeSlave.hips > -1) && ($activeSlave.butt < 6) && ($activeSlave.butt < ($activeSlave.boobs/500))>>
		<<set $activeSlave.drugs to "butt injections">>

$activeSlave.slaveName's hips can support a bigger butt, and her butt is behind her tits, so she's been put on butt injections.
	<<elseif ($activeSlave.hips > 0) && ($activeSlave.butt < 8) && ($activeSlave.butt < ($activeSlave.boobs/500))>>
		<<set $activeSlave.drugs to "butt injections">>

$activeSlave.slaveName's hips can support a bigger butt, and her butt is behind her tits, so she's been put on butt injections.
	<<elseif ($activeSlave.hips > 1) && ($activeSlave.butt < 9) && ($activeSlave.butt < ($activeSlave.boobs/500))>>
		<<set $activeSlave.drugs to "butt injections">>

$activeSlave.slaveName's hips can support a bigger butt, and her butt is behind her tits, so she's been put on butt injections.
	<<elseif ($activeSlave.boobs <= 9000) && ($activeSlave.boobs < ($activeSlave.butt*500))>>
		<<set $activeSlave.drugs to "breast injections">>

$activeSlave.slaveName's boobs could be bigger and are behind her butt, so she's been put on breast injections.
	<<elseif ($activeSlave.lips <= 40)>>
		<<set $activeSlave.drugs to "lip injections">>

$activeSlave.slaveName has been put on lip growth injections.
	<<elseif ($activeSlave.dick > 0) && ($activeSlave.dick < 6)>>
		<<set $activeSlave.drugs to "penis enhancement">>

$activeSlave.slaveName's dick could be bigger and still function, so she's been put on penis enhancement.
	<<elseif ($activeSlave.scrotum > 0) && ($activeSlave.balls < 6) && ($activeSlave.balls > 0)>>
		<<set $activeSlave.drugs to "testicle enhancement">>

$activeSlave.slaveName's balls could be bigger, so she's been put on testicle enhancement.
	<<elseif ($activeSlave.butt < 9)>>
		<<set $activeSlave.drugs to "butt injections">>

$activeSlave.slaveName's butt could be bigger, so she's been put on butt injections.
	<<elseif ($activeSlave.boobs <= 9000)>>
		<<set $activeSlave.drugs to "breast injections">>

$activeSlave.slaveName could handle bigger tits, so she's been put on breast injections.
	<<elseif ($activeSlave.dick > 0) && ($activeSlave.dick < 10) && (_currentRule.growth is "unlimited")>>
		<<set $activeSlave.drugs to "penis enhancement">>

$activeSlave.slaveName's dick could be bigger, so she's been put on penis enhancement.
	<<elseif ($activeSlave.boobs < 24000) && (_currentRule.growth is "unlimited")>>
		<<set $activeSlave.drugs to "breast injections">>

$activeSlave.slaveName's boobs could be bigger, so she's been put on breast injections.
	<<elseif $activeSlave.drugs != "no drugs">>
		<<set $activeSlave.drugs to "no drugs">>

$activeSlave.slaveName has reached growth targets and has been taken off growth injections.
	<</if>>
<</if>>
<</if>>
<</if>>

<<if (_currentRule.curatives != "no default setting")>>
<<if $activeSlave.curatives != _currentRule.curatives>>
	<<if _currentRule.curatives == 2>>
		<<if $activeSlave.health > 100>>

$activeSlave.slaveName has been	put on preventatives, since curatives cannot improve her health further.
			<<set $activeSlave.curatives = 1>>
		<<else>>

$activeSlave.slaveName has been	put on curatives.
			<<set $activeSlave.curatives = _currentRule.curatives>>
		<</if>>
	<<else>>

$activeSlave.slaveName has been	<<if _currentRule.aphrodisiacs > 0>>put on preventatives<<else>>taken off health drugs<</if>>.
		<<set $activeSlave.curatives = _currentRule.curatives>>
	<</if>>
<</if>>
<</if>>

<<if (_currentRule.aphrodisiacs != "no default setting")>>
<<if $activeSlave.aphrodisiacs != _currentRule.aphrodisiacs>>

$activeSlave.slaveName has been	<<if _currentRule.aphrodisiacs > 0>>put on the proper<<else>>taken off<</if>> aphrodisiacs.
	<<set $activeSlave.aphrodisiacs = _currentRule.aphrodisiacs>>
<</if>>
<</if>>

<<if ($activeSlave.dick > 0)>>
<<if ($activeSlave.balls == 0)>>
<<if (_currentRule.gelding isnot "no default setting")>>
<<if ($activeSlave.hormones isnot _currentRule.gelding)>>
	<<set $activeSlave.hormones to _currentRule.gelding>>
	<<if $activeSlave.indentureRestrictions >= 2>>
		<<set $activeSlave.hormones to Math.clamp($activeSlave.hormones, -1, 1)>>
	<</if>>

$activeSlave.slaveName is a gelding, so she has been put on the appropriate hormones.
<</if>>
<</if>>
<<elseif ($activeSlave.balls > 0)>>
<<if (_currentRule.XY isnot "no default setting")>>
<<if ($activeSlave.hormones isnot _currentRule.XY)>>
<<if ($activeSlave.assignment != "recruit girls")>>
<<if ($activeSlave.assignment != "be the Wardeness")>>
<<if ($activeSlave.assignment != "be the Madam")>>
<<if ($activeSlave.assignment != "be the Collectrix")>>
	<<set $activeSlave.hormones to _currentRule.XY>>
	<<if $activeSlave.indentureRestrictions >= 2>>
		<<set $activeSlave.hormones to Math.clamp($activeSlave.hormones, -1, 1)>>
	<</if>>

$activeSlave.slaveName is a shemale, so she has been put on the appropriate hormones.
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($activeSlave.vagina > -1)>>
<<if ($activeSlave.dick == 0)>>
<<if (_currentRule.XX isnot "no default setting")>>
<<if ($activeSlave.hormones isnot _currentRule.XX)>>
	<<set $activeSlave.hormones to _currentRule.XX>>
	<<if $activeSlave.indentureRestrictions >= 2>>
		<<set $activeSlave.hormones to Math.clamp($activeSlave.hormones, -1, 1)>>
	<</if>>

$activeSlave.slaveName is a female, so she has been put on the appropriate hormonal regime.
	<</if>>
<</if>>
<</if>>
<<if ($activeSlave.ovaries == 1)>>
<<if ($activeSlave.preg > -2)>>
<<if ($activeSlave.preg < 1)>>
<<if (_currentRule.preg isnot "no default setting")>>
<<if (_currentRule.preg is -1)>>
	<<set $activeSlave.preg to -1>>
	<<if $activeSlave.drugs is "fertility drugs">>
		<<set $activeSlave.drugs to "no drugs">>
	<</if>>

$activeSlave.slaveName is a fertile female, so she has been put on the appropriate contraceptive regime.
<<elseif (_currentRule.preg == 0)>>
	<<set $activeSlave.preg to 0>>
	<<if $activeSlave.drugs is "fertility drugs">>
		<<set $activeSlave.drugs to "no drugs">>
	<</if>>

$activeSlave.slaveName is a fertile female, so she has been put on the appropriate contraceptive regime.
<<elseif (_currentRule.preg == 1)>>
	<<set $activeSlave.preg to 0>>
	<<set $activeSlave.drugs to "fertility drugs">>
	<<set $activeSlave.hormones to 0>>

$activeSlave.slaveName is a fertile female, so she has been put on the appropriate contraceptive regime.
<<elseif (_currentRule.preg is 2)>>
	<<set $activeSlave.drugs to "fertility drugs">>
	<<set $activeSlave.hormones to 2>>
	<<set $activeSlave.preg to 0>>

$activeSlave.slaveName is a fertile female, so she has been put on the appropriate contraceptive regime.
<<elseif (_currentRule.preg is 3) and $activeSlave.indentureRestrictions < 1>>
	<<set $activeSlave.drugs to "super fertility drugs">>
	<<set $activeSlave.hormones to 0>>
	<<set $activeSlave.preg to 0>>

$activeSlave.slaveName is a fertile female, so she has been put on the appropriate contraceptive regime.
<<elseif (_currentRule.preg is 4) and $activeSlave.indentureRestrictions < 1>>
	<<set $activeSlave.drugs to "super fertility drugs">>
	<<set $activeSlave.hormones to 2>>
	<<set $activeSlave.preg to 0>>

$activeSlave.slaveName is a fertile female, so she has been put on the appropriate contraceptive regime.
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if $activeSlave.fuckdoll == 0>>

<<if (_currentRule.livingRules isnot "no default setting")>>
<<if ($activeSlave.fetish is "mindbroken")>>
	<<if ($activeSlave.livingRules isnot "spare")>>
	<<set $activeSlave.livingRules to "spare">>

Since $activeSlave.slaveName is mindbroken her living standard has been set to spare.
	<</if>>
<<elseif $activeSlave.livingRules isnot _currentRule.livingRules>>
	<<if _currentRule.livingRules isnot "luxurious">>
		<<if $roomsPopulation <= $rooms-0.5>>
			<<set $activeSlave.livingRules to _currentRule.livingRules>>

$activeSlave.slaveName's living standard has been set to _currentRule.livingRules.
			<<if $activeSlave.relationship >= 4>><<set $roomsPopulation += 0.5>><<else>><<set $roomsPopulation += 1>><</if>>
		<<else>>
			<<set $activeSlave.livingRules to "normal">>

$activeSlave.slaveName's living standard has been set to normal, since there is no room for her to occupy.
		<</if>>
	<<else>>
		<<set $activeSlave.livingRules to _currentRule.livingRules>>

$activeSlave.slaveName's living standard has been set to _currentRule.livingRules.
	<</if>>
<</if>>
<</if>>

<<if (_currentRule.speechRules isnot "no default setting")>>
<<if ($activeSlave.fetish is "mindbroken")>>
	<<if ($activeSlave.speechRules isnot "restrictive")>>
	<<set $activeSlave.speechRules to "restrictive">>

Since $activeSlave.slaveName is mindbroken her speech rules have been set to restrictive.
	<</if>>
<<elseif ($activeSlave.speechRules isnot _currentRule.speechRules)>>
	<<set $activeSlave.speechRules to _currentRule.speechRules>>

$activeSlave.slaveName's speech rules have been set to _currentRule.speechRules.
<</if>>
<</if>>

<<if ($activeSlave.fetish isnot "mindbroken")>>
 <<if (_currentRule.relationshipRules isnot "no default setting")>>
 <<if ($activeSlave.relationshipRules isnot _currentRule.relationshipRules )>>
 	<<set $activeSlave.relationshipRules to _currentRule.relationshipRules >>

$activeSlave.slaveName's relationship rules have been set to _currentRule.relationshipRules.
 <</if>>
 <</if>>
<</if>>

<<if (_currentRule.releaseRules isnot "no default setting")>>
	<<if (_currentRule.releaseRules is "restrictive")>>
	<<SexualRelease $activeSlave>>
	<<else>>
		<<set $release to 1>>
	<</if>>
	<<if ($activeSlave.fetish is "mindbroken") && ($activeSlave.releaseRules isnot "permissive")>>
		<<set $activeSlave.releaseRules to "permissive">>

Since $activeSlave.slaveName is mindbroken her masturbation rules have been set to permissive.
	<<elseif ($release != 0) && ($activeSlave.releaseRules isnot _currentRule.releaseRules)>>
	  <<set $activeSlave.releaseRules to _currentRule.releaseRules>>

$activeSlave.slaveName's masturbation rules have been set to _currentRule.releaseRules.
	<</if>>
<</if>>

<<if (_currentRule.standardPunishment isnot "no default setting")>>
 <<if ($activeSlave.standardPunishment isnot _currentRule.standardPunishment)>>
 	<<set $activeSlave.standardPunishment to _currentRule.standardPunishment >>

$activeSlave.slaveName's typical punishment has been updated to _currentRule.standardPunishment.
 <</if>>
<</if>>

<<if (_currentRule.standardReward isnot "no default setting")>>
 <<if ($activeSlave.standardReward isnot _currentRule.standardReward)>>
 	<<set $activeSlave.standardReward to _currentRule.standardReward >>

$activeSlave.slaveName's typical reward has been updated to _currentRule.standardReward.
 <</if>>
<</if>>

<</if>> /* CLOSES FUCKDOLL CHECK */

<<if (_currentRule.diet isnot "no default setting")>>
	<<if ($activeSlave.boobs >= 1600) && ($activeSlave.muscles <= 5) && ($activeSlave.amp != 1) && ((_currentRule.muscles is "no default setting") || (_currentRule.muscles == 0))>>
		<<if ($activeSlave.diet isnot "muscle building")>>
			<<set $activeSlave.diet to "muscle building">>

$activeSlave.slaveName has big tits and no back muscles, so she's been assigned to gain some.
		<</if>>
	<<elseif ($activeSlave.boobs >= 1600) && ($activeSlave.muscles > 5) && ($activeSlave.diet is "muscle building") && ((_currentRule.muscles is "no default setting") || (_currentRule.muscles == 0))>>
		<<set $activeSlave.diet to "healthy">>

$activeSlave.slaveName has huge boobs, but she already has the back muscles to bear them, so she's been assigned to stop working out so hard.
	<<elseif (_currentRule.dietGrowthSupport == 1) && (($activeSlave.drugs is "breast injections") || ($activeSlave.drugs is "butt injections")) && ($activeSlave.weight <= 95)>>
		<<if $activeSlave.diet isnot "fattening">>
			<<set $activeSlave.diet to "fattening">>

$activeSlave.slaveName is on drugs designed to expand major body parts, so she's been put on a fattening diet to provide her body as much fuel for growth as possible.
		<</if>>
	<<else>>
		<<if (_currentRule.diet == 0)>>
			<<if ($activeSlave.weight > 10)>>
				<<if ($activeSlave.diet isnot "restricted")>>
					<<set $activeSlave.diet to "restricted">>

$activeSlave.slaveName is too fat so her diet has been set to restricted.
				<</if>>
			<<elseif ($activeSlave.weight < -10)>>
				<<if ($activeSlave.diet isnot "fattening")>>
					<<set $activeSlave.diet to "fattening">>

$activeSlave.slaveName is too skinny so her diet has been set to fattening.
				<</if>>
			<<elseif (_currentRule.muscles isnot "no default setting") && ($activeSlave.amp != 1)>>
				<<if ($activeSlave.muscles >= _currentRule.muscles+5)>>
					<<if ($activeSlave.diet isnot "slimming")>>
						<<set $activeSlave.diet to "slimming">>

$activeSlave.slaveName has been put on a slimming exercise regime.
					<</if>>
				<<elseif ($activeSlave.muscles <= _currentRule.muscles-5)>>
					<<if ($activeSlave.diet isnot "muscle building")>>
						<<set $activeSlave.diet to "muscle building">>

$activeSlave.slaveName has been put on a muscle building exercise regime.
					<</if>>
				<<else>>
					<<if ($activeSlave.diet isnot "healthy")>>
						<<set $activeSlave.diet to "healthy">>

$activeSlave.slaveName is at the target weight, so her diet has been normalized.
					<</if>>
				<</if>>
			<<else>>
				<<if ($activeSlave.diet isnot "healthy")>>
					<<set $activeSlave.diet to "healthy">>

$activeSlave.slaveName is at the target weight, so her diet has been normalized.
				<</if>>
			<</if>>
		<<elseif (_currentRule.diet == 30)>>
			<<if ($activeSlave.weight > 30)>>
				<<if ($activeSlave.diet isnot "restricted")>>
					<<set $activeSlave.diet to "restricted">>

$activeSlave.slaveName is too fat so her diet has been set to restricted.
				<</if>>
			<<elseif ($activeSlave.weight < 20)>>
				<<if ($activeSlave.diet isnot "fattening")>>
					<<set $activeSlave.diet to "fattening">>

$activeSlave.slaveName is too skinny so her diet has been set to fattening.
				<</if>>
			<<elseif (_currentRule.muscles isnot "no default setting") && ($activeSlave.amp != 1)>>
				<<if ($activeSlave.muscles >= _currentRule.muscles+5)>>
					<<if ($activeSlave.diet isnot "slimming")>>
						<<set $activeSlave.diet to "slimming">>

$activeSlave.slaveName has been put on a slimming exercise regime.
					<</if>>
				<<elseif ($activeSlave.muscles <= _currentRule.muscles-5)>>
					<<if ($activeSlave.diet isnot "muscle building")>>
						<<set $activeSlave.diet to "muscle building">>

$activeSlave.slaveName has been put on a muscle building exercise regime.
					<</if>>
				<<else>>
					<<if ($activeSlave.diet isnot "healthy")>>
						<<set $activeSlave.diet to "healthy">>

$activeSlave.slaveName is at the target weight, so her diet has been normalized.
					<</if>>
				<</if>>
			<<else>>
				<<if ($activeSlave.diet isnot "healthy")>>
					<<set $activeSlave.diet to "healthy">>

$activeSlave.slaveName is at the target weight, so her diet has been normalized.
				<</if>>
			<</if>>
		<<elseif (_currentRule.diet == -30)>>
			<<if ($activeSlave.weight > -20)>>
				<<if ($activeSlave.diet isnot "restricted")>>
					<<set $activeSlave.diet to "restricted">>

$activeSlave.slaveName is too fat so her diet has been set to restricted.
				<</if>>
			<<elseif ($activeSlave.weight < -30)>>
				<<if ($activeSlave.diet isnot "fattening")>>
					<<set $activeSlave.diet to "fattening">>

$activeSlave.slaveName is too skinny so her diet has been set to fattening.
				<</if>>
			<<elseif (_currentRule.muscles isnot "no default setting") && ($activeSlave.amp != 1)>>
				<<if ($activeSlave.muscles >= _currentRule.muscles+5)>>
					<<if ($activeSlave.diet isnot "slimming")>>
						<<set $activeSlave.diet to "slimming">>

$activeSlave.slaveName has been put on a slimming exercise regime.
					<</if>>
				<<elseif ($activeSlave.muscles <= _currentRule.muscles-5)>>
					<<if ($activeSlave.diet isnot "muscle building")>>
						<<set $activeSlave.diet to "muscle building">>

$activeSlave.slaveName has been put on a muscle building exercise regime.
					<</if>>
				<<else>>
					<<if ($activeSlave.diet isnot "healthy")>>
						<<set $activeSlave.diet to "healthy">>

$activeSlave.slaveName is at the target weight, so her diet has been normalized.
					<</if>>
				<</if>>
			<<else>>
				<<if ($activeSlave.diet isnot "healthy")>>
					<<set $activeSlave.diet to "healthy">>

$activeSlave.slaveName is at the target weight, so her diet has been normalized.
				<</if>>
			<</if>>
		<<elseif (_currentRule.diet is "attractive")>>
			<<if (($activeSlave.weight > 95) || (($activeSlave.weight > 30) && ($activeSlave.hips < 2)))>>
				<<if ($activeSlave.diet isnot "restricted")>>
					<<set $activeSlave.diet to "restricted">>

$activeSlave.slaveName is too fat so her diet has been set to restricted.
				<</if>>
			<<elseif (($activeSlave.weight < -95) || (($activeSlave.weight < -30) && ($activeSlave.hips > -2)))>>
				<<if ($activeSlave.diet isnot "fattening")>>
					<<set $activeSlave.diet to "fattening">>

$activeSlave.slaveName is too skinny so her diet has been set to fattening.
				<</if>>
			<<elseif (_currentRule.muscles isnot "no default setting") && ($activeSlave.amp != 1)>>
				<<if ($activeSlave.muscles >= _currentRule.muscles+5)>>
					<<if ($activeSlave.diet isnot "slimming")>>
						<<set $activeSlave.diet to "slimming">>

$activeSlave.slaveName has been put on a slimming exercise regime.
					<</if>>
				<<elseif ($activeSlave.muscles <= _currentRule.muscles-5)>>
					<<if ($activeSlave.diet isnot "muscle building")>>
						<<set $activeSlave.diet to "muscle building">>

$activeSlave.slaveName has been put on a muscle building exercise regime.
					<</if>>
				<<else>>
					<<if ($activeSlave.diet isnot "healthy")>>
						<<set $activeSlave.diet to "healthy">>

$activeSlave.slaveName is at the target weight, so her diet has been normalized.
					<</if>>
				<</if>>
			<<else>>
				<<if ($activeSlave.diet isnot "healthy")>>
					<<set $activeSlave.diet to "healthy">>

$activeSlave.slaveName is at the target weight, so her diet has been normalized.
				<</if>>
			<</if>>
		<<elseif (_currentRule.diet is "XX")>>
			<<if ($activeSlave.diet isnot "XX")>>
				<<set $activeSlave.diet to "XX">>

$activeSlave.slaveName has been put on a diet that favors feminine development.
			<</if>>
		<<elseif (_currentRule.diet is "XY")>>
			<<if ($activeSlave.diet isnot "XY")>>
				<<set $activeSlave.diet to "XY">>

$activeSlave.slaveName has been put on a diet that favors masculine development.
			<</if>>
		<<elseif (_currentRule.diet is "XXY")>>
			<<if ($activeSlave.diet isnot "XXY")>>
				<<set $activeSlave.diet to "XXY">>

$activeSlave.slaveName has been put on a diet that enhances a herm's unique sexuality.
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if (_currentRule.dietCum isnot "no default setting")>>
	<<if $activeSlave.dietCum != _currentRule.dietCum>>
		<<set $activeSlave.dietCum = _currentRule.dietCum>>
		<<if $activeSlave.dietCum == 2>>

$activeSlave.slaveName has been put on a diet based on cum.
			<<set $activeSlave.dietMilk = 0>>
		<<elseif $activeSlave.dietCum == 1>>

$activeSlave.slaveName has had cum added to her diet.
		<<else>>

$activeSlave.slaveName has had cum removed from her diet.
		<</if>>
	<</if>>
<</if>>

<<if (_currentRule.dietMilk isnot "no default setting")>>
	<<if $activeSlave.dietMilk != _currentRule.dietMilk>>
		<<set $activeSlave.dietMilk = _currentRule.dietMilk>>
		<<if $activeSlave.dietMilk == 2>>

$activeSlave.slaveName has been put on a diet based on human milk.
			<<set $activeSlave.dietCum = 0>>
		<<elseif $activeSlave.dietMilk == 1>>

$activeSlave.slaveName has had human milk added to her diet.
		<<else>>

$activeSlave.slaveName has had human milk removed from her diet.
		<</if>>
	<</if>>
<</if>>

<<if (_currentRule.teeth isnot "no default setting")>>
  <<if (_currentRule.teeth is "universal")>>
	<<if ($activeSlave.teeth is "crooked")>>
		<<set $activeSlave.teeth to "straightening braces">>
		<<set $cash -= $surgeryCost>>

$activeSlave.slaveName has been given braces for her crooked teeth.
	<<elseif ($activeSlave.teeth is "normal")>>
		<<set $activeSlave.teeth to "cosmetic braces">>
		<<set $cash -= $surgeryCost>>

$activeSlave.slaveName has been given cosmetic braces.
	<</if>>
  <<elseif (_currentRule.teeth is "straighten")>>
	<<if ($activeSlave.teeth is "crooked")>>
		<<set $activeSlave.teeth to "straightening braces">>
		<<set $cash -= $surgeryCost>>

$activeSlave.slaveName has been given braces for her crooked teeth.
	<<elseif ($activeSlave.teeth is "cosmetic braces")>>
		<<set $activeSlave.teeth to "normal">>

$activeSlave.slaveName has gotten her braces off, since her teeth are straight.
	<</if>>
  <<elseif (_currentRule.teeth is "none")>>
	<<if ($activeSlave.teeth is "straightening braces")>>
		<<set $activeSlave.teeth to "crooked">>

$activeSlave.slaveName has gotten her braces off.
	<<elseif ($activeSlave.teeth is "cosmetic braces")>>
		<<set $activeSlave.teeth to "normal">>

$activeSlave.slaveName has gotten her braces off.
	<</if>>
	<</if>>
<</if>>

<<set _tmp to lastEyeColorRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.eyeColor isnot "no default setting")>>
<<if ($activeSlave.eyeColor isnot _currentRule.eyeColor)>>
  <<set $activeSlave.eyeColor to _currentRule.eyeColor>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName has been given $activeSlave.eyeColor contact lenses.
<</if>>
<</if>>
<</if>>

<<set _tmp to lastMakeupRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.makeup isnot "no default setting")>>
<<if ($activeSlave.makeup isnot _currentRule.makeup)>>
  <<set $activeSlave.makeup to _currentRule.makeup>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName has been assigned the standard makeup.
<</if>>
<</if>>
<</if>>

<<set _tmp to lastNailsRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if ($activeSlave.amp != 1)>>
<<if (_currentRule.nails isnot "no default setting")>>
<<if ($activeSlave.nails isnot _currentRule.nails)>>
  <<set $activeSlave.nails to _currentRule.nails>>
  <<set $cash -= $modCost>>

$activeSlave.slaveName has been assigned the standard nails.
<</if>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastHColorRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.hColor isnot "no default setting")>>
<<if ($activeSlave.hColor isnot _currentRule.hColor)>>
  <<set $activeSlave.hColor to _currentRule.hColor>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's hair has been dyed _currentRule.hColor.
<</if>>
<</if>>
<</if>>

<<set _tmp to lastHStyleRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.hStyle isnot "no default setting")>>
<<if ($activeSlave.hStyle isnot _currentRule.hStyle)>>

$activeSlave.slaveName's hair has been
<<if (_currentRule.hStyle is "shaved")>>
	<<set $activeSlave.hLength to 0>>
	shaved.
<<else>>
	restyled.
<</if>>
<<set $activeSlave.hStyle to _currentRule.hStyle>>
<<set $cash -= $modCost>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastHLengthRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.hLength isnot "no default setting")>>
<<if ($activeSlave.hLength isnot _currentRule.hLength)>>
<<if ($activeSlave.hLength > _currentRule.hLength)>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's hair has been cut; it
<<else>>
	<<set $cash -= $modCost*Math.trunc((_currentRule.hLength-$activeSlave.hLength)/10)>>

$activeSlave.slaveName has been given extensions; her hair
<</if>>
is now _currentRule.hLength cm long.
<<set $activeSlave.hLength to _currentRule.hLength>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastPubicHColorRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.pubicHColor isnot "no default setting")>>
<<if ($activeSlave.pubicHColor isnot _currentRule.pubicHColor)>>
  <<set $activeSlave.pubicHColor to _currentRule.pubicHColor>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's pubic hair, if present, has been dyed _currentRule.pubicHColor.
<</if>>
<</if>>
<</if>>

<<set _tmp to lastPubicHStyleRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.pubicHStyle isnot "no default setting")>>
<<if ($activeSlave.pubicHStyle isnot _currentRule.pubicHStyle)>>
  <<set $activeSlave.pubicHStyle to _currentRule.pubicHStyle>>
  <<set $cash -= $modCost>>

$activeSlave.slaveName's pubic hair has been restyled; it is now _currentRule.pubicHStyle.
<</if>>
<</if>>
<</if>>

<<set _tmp to lastUnderArmHColorRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.underArmHColor isnot "no default setting")>>
<<if ($activeSlave.underArmHColor isnot _currentRule.underArmHColor)>>
  <<set $activeSlave.underArmHColor to _currentRule.underArmHColor>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's underarm hair, if present, has been dyed _currentRule.underArmHColor.
<</if>>
<</if>>
<</if>>

<<set _tmp to lastUnderArmHStyleRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.underArmHStyle isnot "no default setting")>>
<<if ($activeSlave.underArmHStyle isnot _currentRule.underArmHStyle)>>
  <<set $activeSlave.underArmHStyle to _currentRule.underArmHStyle>>
  <<set $cash -= $modCost>>

$activeSlave.slaveName's underarm hair has been restyled; it is now _currentRule.underArmHStyle.
<</if>>
<</if>>
<</if>>

<<if (_currentRule.nipplesPiercing == 0)>>
<<if $activeSlave.nipplesPiercing != 0>>
	<<set $activeSlave.nipplesPiercing to 0>>

$activeSlave.slaveName's nipple piercings have been removed.
<</if>>
<</if>>
<<if (_currentRule.areolaePiercing == 0)>>
<<if $activeSlave.areolaePiercing != 0>>
	<<set $activeSlave.areolaePiercing to 0>>

$activeSlave.slaveName's areolae piercings have been removed.
<</if>>
<</if>>
<<if (_currentRule.clitPiercing == 0)>>
<<if $activeSlave.clitPiercing != 0>>
	<<set $activeSlave.clitPiercing to 0>>
	<<if $activeSlave.dick > 0>>

$activeSlave.slaveName's frenulum piercing has been removed.
	<<else>>

$activeSlave.slaveName's clit piercing has been removed.
	<</if>>
<</if>>
<</if>>
<<if (_currentRule.vaginaPiercing == 0)>>
<<if $activeSlave.vaginaPiercing != 0>>
	<<set $activeSlave.vaginaPiercing to 0>>

$activeSlave.slaveName's labia piercings have been removed.
<</if>>
<</if>>
<<if (_currentRule.dickPiercing == 0)>>
<<if $activeSlave.dickPiercing != 0>>
	<<set $activeSlave.dickPiercing to 0>>

$activeSlave.slaveName's shaft piercings have been removed.
<</if>>
<</if>>
<<if (_currentRule.anusPiercing == 0)>>
<<if $activeSlave.anusPiercing != 0>>
	<<set $activeSlave.anusPiercing to 0>>

$activeSlave.slaveName's asshole piercings have been removed.
<</if>>
<</if>>
<<if (_currentRule.lipsPiercing == 0)>>
<<if $activeSlave.lipsPiercing != 0>>
	<<set $activeSlave.lipsPiercing to 0>>

$activeSlave.slaveName's lip piercings have been removed.
<</if>>
<</if>>
<<if (_currentRule.tonguePiercing == 0)>>
<<if $activeSlave.tonguePiercing != 0>>
	<<set $activeSlave.tonguePiercing to 0>>

$activeSlave.slaveName's tongue piercings have been removed.
<</if>>
<</if>>
<<if (_currentRule.earPiercing == 0)>>
<<if $activeSlave.earPiercing != 0>>
	<<set $activeSlave.earPiercing to 0>>

$activeSlave.slaveName's ear piercings have been removed.
<</if>>
<</if>>
<<if (_currentRule.nosePiercing == 0)>>
<<if $activeSlave.nosePiercing != 0>>
	<<set $activeSlave.nosePiercing to 0>>

$activeSlave.slaveName's nose piercing has been removed.
<</if>>
<</if>>
<<if (_currentRule.eyebrowPiercing == 0)>>
<<if $activeSlave.eyebrowPiercing != 0>>
	<<set $activeSlave.eyebrowPiercing to 0>>

$activeSlave.slaveName's eyebrow piercings have been removed.
<</if>>
<</if>>
<<if (_currentRule.navelPiercing == 0)>>
<<if $activeSlave.navelPiercing != 0>>
	<<set $activeSlave.navelPiercing to 0>>

$activeSlave.slaveName's navel piercing have been removed.
<</if>>
<</if>>
<<if (_currentRule.corsetPiercing == 0)>>
<<if $activeSlave.corsetPiercing != 0>>
	<<set $activeSlave.corsetPiercing to 0>>

$activeSlave.slaveName's corset piercings have been removed.
<</if>>
<</if>>

<<set _tmp to lastNipplesPiercingRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.nipplesPiercing isnot "no default setting")>>
<<if (_currentRule.nipplesPiercing != 0)>>
<<if $activeSlave.nipplesPiercing isnot _currentRule.nipplesPiercing>>
	<<set $activeSlave.nipplesPiercing to _currentRule.nipplesPiercing>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's nipples have been pierced.
<</if>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastAreolaePiercingRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.areolaePiercing isnot "no default setting")>>
<<if (_currentRule.areolaePiercing != 0)>>
<<if $activeSlave.areolaePiercing isnot _currentRule.areolaePiercing>>
	<<set $activeSlave.areolaePiercing to _currentRule.areolaePiercing>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's areolae have been given stud piercings.
<</if>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastClitPiercingRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.clitPiercing isnot "no default setting")>>
<<if ($activeSlave.clitPiercing != 3)>>
<<if (_currentRule.clitPiercing != 0)>>
<<if $activeSlave.clitPiercing isnot _currentRule.clitPiercing>>
	<<set $activeSlave.clitPiercing to _currentRule.clitPiercing>>
	<<if $activeSlave.dick > 0>>

$activeSlave.slaveName's frenulum has been pierced.
	<<else>>

$activeSlave.slaveName's clit has been pierced.
	<</if>>
	<<if _currentRule.clitPiercing is 3>>
	 <<set $cash -= 1000>>
	<<else>>
	 <<set $cash -= $modCost>>
	<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastClitSettingRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if ($activeSlave.clitPiercing == 3)>>
<<if (_currentRule.clitSetting isnot "no default setting")>>
<<if $activeSlave.clitSetting isnot _currentRule.clitSetting>>
	<<set $activeSlave.clitSetting to _currentRule.clitSetting>>

$activeSlave.slaveName's smart piercing has been set to $activeSlave.clitSetting.
<</if>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastVaginaPiercingRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if $activeSlave.vagina != -1>>
<<if (_currentRule.vaginaPiercing isnot "no default setting")>>
<<if (_currentRule.vaginaPiercing != 0)>>
<<if $activeSlave.vaginaPiercing isnot _currentRule.vaginaPiercing>>
	<<set $activeSlave.vaginaPiercing to _currentRule.vaginaPiercing>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's pussylips have been pierced.
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastDickPiercingRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if $activeSlave.dick > 0>>
<<if (_currentRule.dickPiercing isnot "no default setting")>>
<<if (_currentRule.dickPiercing != 0)>>
<<if $activeSlave.dickPiercing isnot _currentRule.dickPiercing>>
	<<set $activeSlave.dickPiercing to _currentRule.dickPiercing>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's shaft has been pierced.
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastAnusPiercingRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.anusPiercing isnot "no default setting")>>
<<if (_currentRule.anusPiercing != 0)>>
<<if $activeSlave.anusPiercing isnot _currentRule.anusPiercing>>
	<<set $activeSlave.anusPiercing to _currentRule.anusPiercing>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's asshole has been pierced.
<</if>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastLipsPiercingRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.lipsPiercing isnot "no default setting")>>
<<if (_currentRule.lipsPiercing != 0)>>
<<if $activeSlave.lipsPiercing isnot _currentRule.lipsPiercing>>
	<<set $activeSlave.lipsPiercing to _currentRule.lipsPiercing>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's lips have been pierced.
<</if>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastTonguePiercingRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.tonguePiercing isnot "no default setting")>>
<<if (_currentRule.tonguePiercing != 0)>>
<<if $activeSlave.tonguePiercing isnot _currentRule.tonguePiercing>>
	<<set $activeSlave.tonguePiercing to _currentRule.tonguePiercing>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's tongue has been pierced.
<</if>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastEarPiercingRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.earPiercing isnot "no default setting")>>
<<if (_currentRule.earPiercing != 0)>>
<<if $activeSlave.earPiercing isnot _currentRule.earPiercing>>
	<<set $activeSlave.earPiercing to _currentRule.earPiercing>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's ears have been pierced.
<</if>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastNosePiercingRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.nosePiercing isnot "no default setting")>>
<<if (_currentRule.nosePiercing != 0)>>
<<if $activeSlave.nosePiercing isnot _currentRule.nosePiercing>>
	<<set $activeSlave.nosePiercing to _currentRule.nosePiercing>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's nose has been pierced.
<</if>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastEyebrowPiercingRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.eyebrowPiercing isnot "no default setting")>>
<<if (_currentRule.eyebrowPiercing != 0)>>
<<if $activeSlave.eyebrowPiercing isnot _currentRule.eyebrowPiercing>>
	<<set $activeSlave.eyebrowPiercing to _currentRule.eyebrowPiercing>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's eyebrows have been pierced.
<</if>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastNavelPiercingRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.navelPiercing isnot "no default setting")>>
<<if (_currentRule.navelPiercing != 0)>>
<<if $activeSlave.navelPiercing isnot _currentRule.navelPiercing>>
	<<set $activeSlave.navelPiercing to _currentRule.navelPiercing>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's navel has been pierced.
<</if>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastCorsetPiercingRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.corsetPiercing isnot "no default setting")>>
<<if (_currentRule.corsetPiercing != 0)>>
<<if $activeSlave.corsetPiercing isnot _currentRule.corsetPiercing>>
	<<set $activeSlave.corsetPiercing to _currentRule.corsetPiercing>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName has been given a set of corset piercings.
<</if>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastBoobsTatRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.boobsTat isnot "no default setting")>>
<<if ($activeSlave.boobsTat isnot _currentRule.boobsTat)>>
	<<set $activeSlave.boobsTat to _currentRule.boobsTat>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's chest has been tattooed.
<</if>>
<</if>>
<</if>>

<<set _tmp to lastButtTatRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.buttTat isnot "no default setting")>>
<<if ($activeSlave.buttTat isnot _currentRule.buttTat)>>
	<<set $activeSlave.buttTat to _currentRule.buttTat>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's butt has been tattooed.
<</if>>
<</if>>
<</if>>

<<set _tmp to lastVaginaTatRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.vaginaTat isnot "no default setting")>>
<<if ($activeSlave.vaginaTat isnot _currentRule.vaginaTat)>>
	<<set $activeSlave.vaginaTat to _currentRule.vaginaTat>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's abdomen has been tattooed.
<</if>>
<</if>>
<</if>>

<<set _tmp to lastDickTatRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if ($activeSlave.dick > 0)>>
<<if (_currentRule.dickTat isnot "no default setting")>>
<<if ($activeSlave.dickTat isnot _currentRule.dickTat)>>
	<<set $activeSlave.dickTat to _currentRule.dickTat>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's dick has been tattooed.
<</if>>
<</if>>
<</if>>
<</if>>

<<set _tmp to lastLipsTatRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.lipsTat isnot "no default setting")>>
<<if ($activeSlave.lipsTat isnot _currentRule.lipsTat)>>
	<<set $activeSlave.lipsTat to _currentRule.lipsTat>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's face has been tattooed.
<</if>>
<</if>>
<</if>>

<<set _tmp to lastAnusTatRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.anusTat isnot "no default setting")>>
<<if ($activeSlave.anusTat isnot _currentRule.anusTat)>>
	<<set $activeSlave.anusTat to _currentRule.anusTat>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's asshole has been modded.
<</if>>
<</if>>
<</if>>

<<set _tmp to lastShouldersTatRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.shouldersTat isnot "no default setting")>>
<<if ($activeSlave.shouldersTat isnot _currentRule.shouldersTat)>>
	<<set $activeSlave.shouldersTat to _currentRule.shouldersTat>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's shoulders have been tattooed.
<</if>>
<</if>>
<</if>>

<<set _tmp to lastArmsTatRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.armsTat isnot "no default setting")>>
<<if ($activeSlave.armsTat isnot _currentRule.armsTat)>>
	<<set $activeSlave.armsTat to _currentRule.armsTat>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's arms have been tattooed.
<</if>>
<</if>>
<</if>>

<<set _tmp to lastLegsTatRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.legsTat isnot "no default setting")>>
<<if ($activeSlave.legsTat isnot _currentRule.legsTat)>>
	<<set $activeSlave.legsTat to _currentRule.legsTat>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's legs have been tattooed.
<</if>>
<</if>>
<</if>>

<<set _tmp to lastStampTatRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID is _currentRule.ID)>>
<<if (_currentRule.stampTat isnot "no default setting")>>
<<if ($activeSlave.stampTat isnot _currentRule.stampTat)>>
	<<set $activeSlave.stampTat to _currentRule.stampTat>>
	<<set $cash -= $modCost>>

$activeSlave.slaveName's lower back has been tattooed.
<</if>>
<</if>>
<</if>>

<<if (_currentRule.pornFameSpending isnot "no default setting")>>
<<if ($activeSlave.devotion > 95)>>
<<if ($activeSlave.trust > 95)>>
<<if ($activeSlave.prestige < 3)>>
<<if ($activeSlave.pornFameSpending isnot _currentRule.pornFameSpending)>>
  <<set $activeSlave.pornFameSpending to _currentRule.pornFameSpending>>

$activeSlave.slaveName's porn publicity has been corrected.
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if (_currentRule.autoBrand == 1)>>
<<if ($activeSlave.brand == 0)>>
<<if ($activeSlave.health > -20)>>
	<<set $activeSlave.brand to $brandDesign>>
	<<set $activeSlave.brandLocation to $brandTarget>>
	<<if ($activeSlave.devotion < 18)>><<set $activeSlave.devotion -= 5>><</if>>
	<<set $activeSlave.trust -= 5>>
	<<set $activeSlave.health -= 10>>

$activeSlave.slaveName has been branded, with @@color:gold;fear@@<<if ($activeSlave.devotion < 18)>>, @@color:mediumorchid;regard@@,<</if>> and @@color:red;health@@
consequences.
<</if>>
<</if>>
<</if>>

<<set _exclude to false>>
<<if _currentRule.excludeSpecialSlaves>>
	<<if (($HeadGirl != 0) && ($HeadGirl.ID is $activeSlave.ID)) || (($Bodyguard != 0) && ($Bodyguard.ID is $activeSlave.ID)) || (($Recruiter != 0) && ($Recruiter.ID is $activeSlave.ID)) || (($Concubine != 0) && ($Concubine.ID is $activeSlave.ID)) || (($Nurse != 0) && ($Nurse.ID is $activeSlave.ID)) || (($Attendant != 0) and($Attendant.ID is $activeSlave.ID)) || (($Madam != 0) || ($Madam.ID is $activeSlave.ID)) || (($DJ != 0) && ($DJ.ID is $activeSlave.ID)) || (($Milkmaid != 0) && ($Milkmaid.ID is $activeSlave.ID)) || (($Stewardess != 0 ) && ($Stewardess.ID is $activeSlave.ID)) || (($Schoolteacher != 0) && ($Schoolteacher.ID is $activeSlave.ID)) || (($Wardeness != 0) && ($Wardeness.ID is $activeSlave.ID))>>
		<<set _exclude to true>>
	<</if>>
<</if>>

<<if $activeSlave.assignmentVisible != 1>>
	<<set _exclude to true>>
<</if>>

<<if !_exclude>>
<<switch _currentRule.assignFacility>>
<<case "hgsuite">>
	<<if ($activeSlave.indentureRestrictions <= 0)>>
	<<if ($activeSlave.assignment != "live with your Head Girl")>>
		<<set $activeSlave.assignment to "live with your Head Girl">>
		<<set $activeSlave.assignmentVisible to 0>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention is $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
			<<set $personalAttention to "business">>
		<</if>>
	<</if>>
	<</if>>
<<case "arcade">>
	<<if ($arcade > $arcadeSlaves) && ($activeSlave.indentureRestrictions <= 0)>>
	<<if ($activeSlave.assignment != "be confined in the arcade")>>
		<<set $activeSlave.assignment to "be confined in the arcade">>
		<<set $activeSlave.assignmentVisible to 0>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention is $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
			<<set $personalAttention to "business">>
		<</if>>
	<</if>>
	<</if>>
<<case "mastersuite">>
	<<if ($masterSuite > $masterSuiteSlaves) && ($activeSlave.devotion > 20) || (($activeSlave.devotion >= -50) && ($activeSlave.trust < -20)) or  ($activeSlave.trust < -50)>>
	<<if ($activeSlave.assignment != "serve in the master suite")>>
		<<set $activeSlave.assignment to "serve in the master suite">>
		<<set $activeSlave.assignmentVisible to 0>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention is $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
			<<set $personalAttention to "business">>
		<</if>>
	<</if>>
	<<else>>
		<<if ($activeSlave.assignment == "serve in the master suite")>>
			<<include "Rules Facility Remove">>
		<</if>>
	<</if>>
<<case "clinic">>
	<<if ($clinic > $clinicSlaves) && ($activeSlave.health < 20) || (($activeSlave.chem > 15) && ($clinicUpgradeFilters == 1))>>
	<<if ($activeSlave.assignment != "get treatment in the clinic")>>
		<<set $activeSlave.assignment to "get treatment in the clinic">>
		<<set $activeSlave.assignmentVisible to 0>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention is $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
			<<set $personalAttention to "business">>
		<</if>>
	<</if>>
	<<else>>
		<<if ($activeSlave.assignment == "get treatment in the clinic")>>
			<<include "Rules Facility Remove">>
		<</if>>
	<</if>>
<<case "spa">>
	<<if ($spa > $spaSlaves) && ($activeSlave.health < 20) || ($activeSlave.trust < 60) || ($activeSlave.devotion <= 60) || ($activeSlave.fetish is "mindbroken") && ($activeSlave.devotion >= -20)>>
	<<if ($activeSlave.assignment != "rest in the spa")>>
		<<set $activeSlave.assignment to "rest in the spa">>
		<<set $activeSlave.assignmentVisible to 0>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention is $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
			<<set $personalAttention to "business">>
		<</if>>
	<</if>>
	<<else>>
		<<if ($activeSlave.assignment == "rest in the spa")>>
			<<include "Rules Facility Remove">>
		<</if>>
	<</if>>
<<case "brothel">>
	<<if ($brothel > $brothelSlaves) && ($activeSlave.devotion > 50) || (($activeSlave.devotion >= -50) && ($activeSlave.trust < -20)) or  ($activeSlave.trust < -50) || ($activeSlave.trust > 50)>>
	<<if ($activeSlave.assignment != "work in the brothel")>>
		<<set $activeSlave.assignment to "work in the brothel">>
		<<set $activeSlave.assignmentVisible to 0>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention is $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
			<<set $personalAttention to "business">>
		<</if>>
	<</if>>
	<<else>>
		<<if ($activeSlave.assignment == "work in the brothel")>>
			<<include "Rules Facility Remove">>
		<</if>>
	<</if>>
<<case "club">>
	<<if ($club > $clubSlaves)  && ($activeSlave.devotion > 50) || (($activeSlave.devotion >= -50) && ($activeSlave.trust < -20)) || ($activeSlave.trust < -50) || ($activeSlave.trust > 50)>>
	<<if ($activeSlave.assignment != "serve in the club")>>
		<<set $activeSlave.assignment to "serve in the club">>
		<<set $activeSlave.assignmentVisible to 0>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention is $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
			<<set $personalAttention to "business">>
		<</if>>
	<</if>>
	<<else>>
		<<if ($activeSlave.assignment == "serve in the club")>>
			<<include "Rules Facility Remove">>
		<</if>>
	<</if>>
<<case "dairy">>
	<<if ($dairy > $dairySlaves+$bioreactorsXY+$bioreactorsXX+$bioreactorsHerm+$bioreactorsBarren)>>
	<<if ($activeSlave.indentureRestrictions > 0) && ($dairyRestraintsSetting > 1)>>
	<<elseif ($activeSlave.indentureRestrictions > 1) && ($dairyRestraintsSetting > 0)>>
	<<else>>
		<<if ($activeSlave.lactation > 0) || ($activeSlave.balls > 0) || (($dairyFeedersUpgrade == 1) && ($dairyFeedersSetting > 0))>>
		<<if ($activeSlave.devotion > 20) || (($activeSlave.devotion >= -50) && ($activeSlave.trust < -20)) or  ($activeSlave.trust < -50) || ($activeSlave.amp == 1) || ($dairyRestraintsUpgrade == 1)>>
		<<if ($dairyStimulatorsSetting < 2) || ($activeSlave.anus > 2) || ($dairyPrepUpgrade == 1)>>
		<<if ($dairyPregSetting < 2) || ($activeSlave.vagina > 2) || ($activeSlave.ovaries == 0) || ($dairyPrepUpgrade == 1)>>
	<<if ($activeSlave.assignment != "work in the dairy")>>
		<<set $activeSlave.assignment to "work in the dairy">>
		<<set $activeSlave.assignmentVisible to 0>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention is $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
			<<set $personalAttention to "business">>
		<</if>>
	<</if>>
		<<else>>
			<<if ($activeSlave.assignment == "work in the dairy")>>
				<<include "Rules Facility Remove">>
			<</if>>
		<</if>>
		<<else>>
			<<if ($activeSlave.assignment == "work in the dairy")>>
				<<include "Rules Facility Remove">>
			<</if>>
		<</if>>
		<<else>>
			<<if ($activeSlave.assignment == "work in the dairy")>>
				<<include "Rules Facility Remove">>
			<</if>>
		<</if>>
		<<else>>
			<<if ($activeSlave.assignment == "work in the dairy")>>
				<<include "Rules Facility Remove">>
			<</if>>
		<</if>>
	<</if>>
	<</if>>
<<case "servantsquarters">>
	<<if ($servantsQuarters > $servantsQuartersSlaves) && ($activeSlave.devotion >= -20) || (($activeSlave.devotion >= -50) && ($activeSlave.trust <= 20)) or  ($activeSlave.trust < -20)>>
	<<if ($activeSlave.assignment != "work as a servant")>>
		<<set $activeSlave.assignment to "work as a servant">>
		<<set $activeSlave.assignmentVisible to 0>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention is $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
			<<set $personalAttention to "business">>
		<</if>>
	<</if>>
	<<else>>
		<<if ($activeSlave.assignment == "work as a servant")>>
			<<include "Rules Facility Remove">>
		<</if>>
	<</if>>
<<case "schoolroom">>
	<<if ($schoolroom > $schoolroomSlaves) && ($activeSlave.devotion >= -20) || (($activeSlave.devotion >= -50) && ($activeSlave.trust < -20)) || ($activeSlave.trust < -50)>>
	<<if ($activeSlave.intelligenceImplant < 1) || ($activeSlave.accent+$schoolroomUpgradeLanguage > 2) || ($activeSlave.oralSkill <= 10) || ($activeSlave.whoreSkill <= 10) || ($activeSlave.entertainSkill <= 10) || ($activeSlave.analSkill < 1) || (($activeSlave.vaginalSkill < 1) && ($activeSlave.vagina > 0))>>
	<<if ($activeSlave.assignment != "learn in the schoolroom")>>
		<<set $activeSlave.assignment to "learn in the schoolroom">>
		<<set $activeSlave.assignmentVisible to 0>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention is $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
			<<set $personalAttention to "business">>
		<</if>>
	<</if>>
	<<else>>
		<<if ($activeSlave.assignment == "learn in the schoolroom")>>
			<<include "Rules Facility Remove">>
		<</if>>
	<</if>>
	<<else>>
		<<if ($activeSlave.assignment == "learn in the schoolroom")>>
			<<include "Rules Facility Remove">>
		<</if>>
	<</if>>
<<case "cellblock">>
	<<if ($cellblock > $cellblockSlaves ) && (($activeSlave.devotion < -20) && ($activeSlave.trust >= -20)) || (($activeSlave.devotion < -50) && ($activeSlave.trust >= -50))>>
	<<if ($activeSlave.assignment != "be confined in the cellblock")>>
		<<set $activeSlave.assignment to "be confined in the cellblock">>
		<<set $activeSlave.assignmentVisible to 0>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention is $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
			<<set $personalAttention to "business">>
			<</if>>
		<</if>>
	<<else>>
		<<if ($activeSlave.assignment == "be confined in the cellblock")>>
			<<include "Rules Facility Remove">>
		<</if>>
	<</if>>
<</switch>>
<</if>>

<<if !_exclude>>
<<if def _currentRule.setAssignment and _currentRule.setAssignment isnot"none">>
	<<if ($activeSlave.assignment isnot _currentRule.setAssignment)>>
		<<set $activeSlave.assignment to _currentRule.setAssignment>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
	<</if>>
<</if>>
<</if>>

<</for>>

repo_name: Welptard/fc