code:
:: Default Rules [nobr]

<<for _r = 0; _r < $defaultRules.length; _r++>>
<<set _currentRule = $defaultRules[_r]>>
<<if !ruleApplied($activeSlave, _currentRule.ID)>><<continue>><</if>>
<<if (def _currentRule.facility) && (_currentRule.facility.length > 1) && !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 = 1>>
	<<set $activeSlave.assignment = "choose her own job">>
 <</if>>
 <</if>>
 <</if>>
 <</if>>
 <</if>>
<</if>>

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

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

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

<<if (_currentRule.collar !== "no default setting")>>
<<if ($activeSlave.collar !== _currentRule.collar)>>
	<<set $activeSlave.collar = _currentRule.collar>>
	<<if ($activeSlave.collar == "none")>>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<<if $activeSlave.vagina == 0>>
<<if _currentRule.virginAccessory !== "no default setting">>
<<if $activeSlave.vaginalAccessory !== _currentRule.virginAccessory>>
	<<set $activeSlave.vaginalAccessory = _currentRule.virginAccessory>>
	<<if $activeSlave.vaginalAccessory == "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 = "large dildo">>
		<</if>>
	<<elseif $activeSlave.vaginalAccessory == "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 !== "no default setting">>
<<if $activeSlave.vaginalAccessory !== _currentRule.aVirginAccessory>>
	<<set $activeSlave.vaginalAccessory = _currentRule.aVirginAccessory>>
	<<if $activeSlave.vaginalAccessory == "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 = "large dildo">>
		<</if>>
	<<elseif $activeSlave.vaginalAccessory == "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 !== "no default setting">>
<<if $activeSlave.vaginalAccessory !== _currentRule.vaginalAccessory>>
	<<set $activeSlave.vaginalAccessory = _currentRule.vaginalAccessory>>
	<<if $activeSlave.vaginalAccessory == "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 = "large dildo">>
		<</if>>
	<<elseif $activeSlave.vaginalAccessory == "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 !== "no default setting")>>
<<if ($activeSlave.dickAccessory !== _currentRule.aVirginDickAccessory)>>
	<<set $activeSlave.dickAccessory = _currentRule.aVirginDickAccessory>>
	<<if $activeSlave.dickAccessory == "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 !== "no default setting")>>
<<if ($activeSlave.dickAccessory !== _currentRule.dickAccessory)>>
	<<set $activeSlave.dickAccessory = _currentRule.dickAccessory>>
	<<if $activeSlave.dickAccessory == "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 !== "anal chastity") && ($activeSlave.vaginalAccessory !== "combined chastity") && ($activeSlave.dickAccessory !== "anal chastity") && ($activeSlave.dickAccessory !== "combined chastity")>>
<<if $activeSlave.anus == 0>>
<<if (_currentRule.aVirginButtplug !== "no default setting")>>
<<if ($activeSlave.buttplug !== _currentRule.aVirginButtplug)>>
	<<set $activeSlave.buttplug = _currentRule.aVirginButtplug>>
	<<if ($activeSlave.buttplug == "huge plug")>>

$activeSlave.slaveName has been given a
		<<if ($activeSlave.anus >= 3)>>
			massive plug to permanently gape her asshole.
		<<else>>
			<<set $activeSlave.buttplug = "large plug">>
			large buttplug for her asshole, since it must be stretched before it can accommodate a huge one.
		<</if>>
	<<elseif $activeSlave.buttplug == "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 !== "no default setting")>>
<<if ($activeSlave.buttplug !== _currentRule.buttplug)>>
	<<set $activeSlave.buttplug = _currentRule.buttplug>>
	<<if ($activeSlave.buttplug == "huge plug")>>

$activeSlave.slaveName has been given a
		<<if ($activeSlave.anus >= 3)>>
			massive plug to permanently gape her asshole.
		<<else>>
			<<set $activeSlave.buttplug = "large plug">>
			large buttplug for her asshole, since it must be stretched before it can accommodate a huge one.
		<</if>>
	<<elseif $activeSlave.buttplug == "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 !== "no default setting")>>
<<if ($activeSlave.shoes !== _currentRule.shoes)>>
<<if ($activeSlave.amp != 1)>>
	<<set $activeSlave.shoes = _currentRule.shoes>>

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

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

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

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

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

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

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

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

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

$activeSlave.slaveName has reached growth targets and has been taken off growth injections.
	<</if>>
<<elseif (_currentRule.growth == "stacked")>>
	<<if ($activeSlave.butt < 2)>>
		<<set $activeSlave.drugs = "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 = "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 = "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 = "penis enhancement">>

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

$activeSlave.slaveName has been put on lip growth injections.
	<<elseif ($activeSlave.dick > 0) && ($activeSlave.dick < 6)>>
		<<set $activeSlave.drugs = "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 = "testicle enhancement">>

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

$activeSlave.slaveName's butt could be bigger, so she's been put on butt injections.
	<<elseif ($activeSlave.boobs <= 9000)>>
		<<set $activeSlave.drugs = "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 == "unlimited")>>
		<<set $activeSlave.drugs = "penis enhancement">>

$activeSlave.slaveName's dick could be bigger, so she's been put on penis enhancement.
	<<elseif ($activeSlave.boobs < 24000) && (_currentRule.growth == "unlimited")>>
		<<set $activeSlave.drugs = "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 = "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 !== "no default setting")>>
<<if ($activeSlave.hormones !== _currentRule.gelding)>>
	<<set $activeSlave.hormones = _currentRule.gelding>>
	<<if $activeSlave.indentureRestrictions >= 2>>
		<<set $activeSlave.hormones = 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 !== "no default setting")>>
<<if ($activeSlave.hormones !== _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 = _currentRule.XY>>
	<<if $activeSlave.indentureRestrictions >= 2>>
		<<set $activeSlave.hormones = 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 !== "no default setting")>>
<<if ($activeSlave.hormones !== _currentRule.XX)>>
	<<set $activeSlave.hormones = _currentRule.XX>>
	<<if $activeSlave.indentureRestrictions >= 2>>
		<<set $activeSlave.hormones = 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 !== "no default setting")>>
<<if (_currentRule.preg == -1)>>
	<<set $activeSlave.preg = -1>>
	<<if $activeSlave.drugs == "fertility drugs">>
		<<set $activeSlave.drugs = "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 = 0>>
	<<if $activeSlave.drugs == "fertility drugs">>
		<<set $activeSlave.drugs = "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 = 0>>
	<<set $activeSlave.drugs = "fertility drugs">>
	<<set $activeSlave.hormones = 0>>

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

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

$activeSlave.slaveName is a fertile female, so she has been put on the appropriate contraceptive regime.
<<elseif (_currentRule.preg == 4) and $activeSlave.indentureRestrictions < 1>>
	<<set $activeSlave.drugs = "super fertility drugs">>
	<<set $activeSlave.hormones = 2>>
	<<set $activeSlave.preg = 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 !== "no default setting")>>
<<if ($activeSlave.fetish == "mindbroken")>>
	<<if ($activeSlave.livingRules !== "spare")>>
	<<set $activeSlave.livingRules = "spare">>

Since $activeSlave.slaveName is mindbroken her living standard has been set to spare.
	<</if>>
<<elseif $activeSlave.livingRules !== _currentRule.livingRules>>
	<<if _currentRule.livingRules !== "luxurious">>
		<<if $roomsPopulation <= $rooms-0.5>>
			<<set $activeSlave.livingRules = _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 = "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 = _currentRule.livingRules>>

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

<<if (_currentRule.speechRules !== "no default setting")>>
<<if ($activeSlave.fetish == "mindbroken")>>
	<<if ($activeSlave.speechRules !== "restrictive")>>
	<<set $activeSlave.speechRules = "restrictive">>

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

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

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

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

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

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

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

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

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

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

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

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

<<if (_currentRule.diet !== "no default setting")>>
	<<if ($activeSlave.boobs >= 1600) && ($activeSlave.muscles <= 5) && ($activeSlave.amp != 1) && ((_currentRule.muscles == "no default setting") || (_currentRule.muscles == 0))>>
		<<if ($activeSlave.diet !== "muscle building")>>
			<<set $activeSlave.diet = "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 == "muscle building") && ((_currentRule.muscles == "no default setting") || (_currentRule.muscles == 0))>>
		<<set $activeSlave.diet = "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 == "breast injections") || ($activeSlave.drugs == "butt injections")) && ($activeSlave.weight <= 95)>>
		<<if $activeSlave.diet !== "fattening">>
			<<set $activeSlave.diet = "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 !== "restricted")>>
					<<set $activeSlave.diet = "restricted">>

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

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

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

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

$activeSlave.slaveName is at the target weight, so her diet has been normalized.
					<</if>>
				<</if>>
			<<else>>
				<<if ($activeSlave.diet !== "healthy")>>
					<<set $activeSlave.diet = "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 !== "restricted")>>
					<<set $activeSlave.diet = "restricted">>

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

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

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

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

$activeSlave.slaveName is at the target weight, so her diet has been normalized.
					<</if>>
				<</if>>
			<<else>>
				<<if ($activeSlave.diet !== "healthy")>>
					<<set $activeSlave.diet = "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 !== "restricted")>>
					<<set $activeSlave.diet = "restricted">>

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

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

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

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

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

$activeSlave.slaveName is at the target weight, so her diet has been normalized.
				<</if>>
			<</if>>
		<<elseif (_currentRule.diet == "attractive")>>
			<<if (($activeSlave.weight > 95) || (($activeSlave.weight > 30) && ($activeSlave.hips < 2)))>>
				<<if ($activeSlave.diet !== "restricted")>>
					<<set $activeSlave.diet = "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 !== "fattening")>>
					<<set $activeSlave.diet = "fattening">>

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

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

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

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

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

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

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

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

<<if (_currentRule.dietCum !== "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 !== "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 !== "no default setting")>>
  <<if (_currentRule.teeth == "universal")>>
	<<if ($activeSlave.teeth == "crooked")>>
		<<set $activeSlave.teeth = "straightening braces">>
		<<set $cash -= $surgeryCost>>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<<set _tmp = lastHLengthRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID == _currentRule.ID)>>
<<if (_currentRule.hLength !== "no default setting")>>
<<if ($activeSlave.hLength !== _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 = _currentRule.hLength>>
<</if>>
<</if>>
<</if>>

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

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

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

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

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

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

<<set _tmp = lastUnderArmHStyleRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID == _currentRule.ID)>>
<<if (_currentRule.underArmHStyle !== "no default setting")>>
<<if ($activeSlave.underArmHStyle !== _currentRule.underArmHStyle)>>
  <<set $activeSlave.underArmHStyle = _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 = 0>>

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

$activeSlave.slaveName's areolae piercings have been removed.
<</if>>
<</if>>
<<if (_currentRule.clitPiercing == 0)>>
<<if $activeSlave.clitPiercing != 0>>
	<<set $activeSlave.clitPiercing = 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 = 0>>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<<set _tmp = lastClitPiercingRule($activeSlave, $defaultRules)>>
<<if (_tmp != null) && (_tmp.ID == _currentRule.ID)>>
<<if (_currentRule.clitPiercing !== "no default setting")>>
<<if ($activeSlave.clitPiercing != 3)>>
<<if (_currentRule.clitPiercing != 0)>>
<<if $activeSlave.clitPiercing !== _currentRule.clitPiercing>>
	<<set $activeSlave.clitPiercing = _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 == 3>>
	 <<set $cash -= 1000>>
	<<else>>
	 <<set $cash -= $modCost>>
	<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

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

$activeSlave.slaveName's smart piercing has been set to $activeSlave.clitSetting.
	<<else>>
		<<if $activeSlave.fetishStrength < 100>><<set _used = 1>><</if>>
	<</if>>
	<</if>>
	<</if>>
	<<if _used == 0>>
		<<set _tmp = lastClitSettingXYRule($activeSlave, $defaultRules)>>
		<<if (_tmp != null) && (_tmp.ID == _currentRule.ID)>>
		<<if _currentRule.clitSettingXY !== "no default setting">>
		<<if $activeSlave.attrXY < _currentRule.clitSettingXY>>
			<<set $activeSlave.clitSetting = "men", _used = 1>>

$activeSlave.slaveName's smart piercing has been set to encourage attraction to men.
		<<elseif $activeSlave.attrXY >= _currentRule.clitSettingXY + 10>>
			<<set $activeSlave.clitSetting = "anti-men", _used = 1>>

$activeSlave.slaveName's smart piercing has been set to discourage attraction to men.
		<</if>>
		<</if>>
		<</if>>
	<</if>>
	<<if _used == 0>>
		<<set _tmp = lastClitSettingXXRule($activeSlave, $defaultRules)>>
		<<if (_tmp != null) && (_tmp.ID == _currentRule.ID)>>
		<<if _currentRule.clitSettingXX !== "no default setting">>
		<<if $activeSlave.attrXX < _currentRule.clitSettingXX>>
			<<set $activeSlave.clitSetting = "women", _used = 1>>

$activeSlave.slaveName's smart piercing has been set to encourage attraction to women.
		<<elseif $activeSlave.attrXX >= _currentRule.clitSettingXX + 10>>
			<<set $activeSlave.clitSetting = "anti-women", _used = 1>>

$activeSlave.slaveName's smart piercing has been set to discourage attraction to women.
		<</if>>
		<</if>>
		<</if>>
	<</if>>
	<<if _used == 0>>
		<<set _tmp = lastClitSettingEnergyRule($activeSlave, $defaultRules)>>
		<<if (_tmp != null) && (_tmp.ID == _currentRule.ID)>>
		<<if _currentRule.clitSettingEnergy !== "no default setting">>
		<<if $activeSlave.energy < _currentRule.clitSettingEnergy>>
			<<set $activeSlave.clitSetting = "all", _used = 1>>

$activeSlave.slaveName's smart piercing has been set to enhance libido.
		<<elseif $activeSlave.energy >= _currentRule.clitSettingEnergy + 10>>
			<<set $activeSlave.clitSetting = "none", _used = 1>>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<<if (_currentRule.pornFameSpending !== "no default setting")>>
<<if ($activeSlave.devotion > 95)>>
<<if ($activeSlave.trust > 95)>>
<<if ($activeSlave.prestige < 3)>>
<<if ($activeSlave.pornFameSpending !== _currentRule.pornFameSpending)>>
  <<set $activeSlave.pornFameSpending = _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 = $brandDesign>>
	<<set $activeSlave.brandLocation = $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 = false>>
<<if _currentRule.excludeSpecialSlaves>>
	<<if (($HeadGirl != 0) && ($HeadGirl.ID == $activeSlave.ID)) || (($Bodyguard != 0) && ($Bodyguard.ID == $activeSlave.ID)) || (($Recruiter != 0) && ($Recruiter.ID == $activeSlave.ID)) || (($Concubine != 0) && ($Concubine.ID == $activeSlave.ID)) || (($Nurse != 0) && ($Nurse.ID == $activeSlave.ID)) || (($Attendant != 0) && ($Attendant.ID == $activeSlave.ID)) || (($Madam != 0) || ($Madam.ID == $activeSlave.ID)) || (($DJ != 0) && ($DJ.ID == $activeSlave.ID)) || (($Milkmaid != 0) && ($Milkmaid.ID == $activeSlave.ID)) || (($Stewardess != 0 ) && ($Stewardess.ID == $activeSlave.ID)) || (($Schoolteacher != 0) && ($Schoolteacher.ID == $activeSlave.ID)) || (($Wardeness != 0) && ($Wardeness.ID == $activeSlave.ID))>>
		<<set _exclude = true>>
	<</if>>
<</if>>

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

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

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

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

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention == $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
		<</if>>
		<<assignJob $activeSlave _currentRule.assignFacility>>
	<</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)) || (($activeSlave.bellyImplant > 100) && ($bellyImplants == 1)) || $activeSlave.preg > 1>>
	<<if ($activeSlave.assignment != "get treatment in the clinic")>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention == $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
		<</if>>
		<<assignJob $activeSlave _currentRule.assignFacility>>
	<</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 == "mindbroken") && ($activeSlave.devotion >= -20)>>
	<<if ($activeSlave.assignment != "rest in the spa")>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention == $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
		<</if>>
		<<assignJob $activeSlave _currentRule.assignFacility>>
	<</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)) || ($activeSlave.trust < -50) || ($activeSlave.trust > 50) && $activeSlave.breedingMark != 1>>
	<<if ($activeSlave.assignment != "work in the brothel")>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention == $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
		<</if>>
		<<assignJob $activeSlave _currentRule.assignFacility>>
	<</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) && $activeSlave.breedingMark != 1>>
	<<if ($activeSlave.assignment != "serve in the club")>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention == $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
		<</if>>
		<<assignJob $activeSlave _currentRule.assignFacility>>
	<</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)) || ($activeSlave.breedingMark == 1 && $dairyRestriantsSettings > 0) || (($dairyPregSetting > 0) && ((_Slave.bellyImplant != 0) || (_Slave.pregType >= 50)))>>
	<<else>>
		<<if ($activeSlave.lactation > 0) || ($activeSlave.balls > 0) || (($dairyFeedersUpgrade == 1) && ($dairyFeedersSetting > 0))>>
		<<if ($activeSlave.devotion > 20) || (($activeSlave.devotion >= -50) && ($activeSlave.trust < -20)) || ($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")>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention == $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
		<</if>>
		<<assignJob $activeSlave _currentRule.assignFacility>>
	<</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)) || ($activeSlave.trust < -20)>>
	<<if ($activeSlave.assignment != "work as a servant")>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention == $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
		<</if>>
		<<assignJob $activeSlave _currentRule.assignFacility>>
	<</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")>>

$activeSlave.slaveName has automatically been assigned to $activeSlave.assignment.
		<<if ($personalAttention == $activeSlave.ID)>>
			$activeSlave.slaveName no longer has your personal attention; you plan to focus on business.
		<</if>>
		<<assignJob $activeSlave _currentRule.assignFacility>>
	<</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")>>

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

<<if !_exclude>>
<<if def _currentRule.setAssignment && _currentRule.setAssignment !== "none">>
	<<if ($activeSlave.assignment !== _currentRule.setAssignment)>>
		<<set $activeSlave.assignment = _currentRule.setAssignment>>

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

<</for>>


code:
:: Degrading Name

<<silently>>

<<if $activeSlave.fuckdoll > 0>>
	<<set $activeSlave.slaveName = "Fuckdoll No. " + random(1000,9999)>>
<<elseif ($activeSlave.assignment == "work in the dairy") && ($dairyRestraintsSetting >= 2)>>
	<<set $activeSlave.slaveName = "Bioreactor No. " + random(1000,9999)>>
<<else>>

<<set $prefixes = []>>

<<if ($seeRace == 1)>>
<<if ($activeSlave.race == "white")>>
	<<set $prefixes.push("White", "Pale")>>
<<elseif ($activeSlave.race == "asian")>>
	<<set $prefixes.push("Asian", "Yellow")>>
<<elseif ($activeSlave.race == "latina")>>
	<<set $prefixes.push("Latina", "Brown")>>
<<elseif ($activeSlave.race == "black")>>
	<<set $prefixes.push("Black", "Dark")>>
<<elseif ($activeSlave.race == "pacific islander")>>
	<<set $prefixes.push("Islander", "Sea")>>
<<elseif ($activeSlave.race == "malay")>>
	<<set $prefixes.push("Spice", "Cinnamon", "Pinoy")>>
<<elseif ($activeSlave.race == "southern European")>>
	<<set $prefixes.push("Mediterranean", "Olive")>>
<<elseif ($activeSlave.race == "amerindian")>>
	<<set $prefixes.push("Indian", "Reservation")>>
<<elseif ($activeSlave.race == "semitic")>>
	<<set $prefixes.push("Semitic")>>
<<elseif ($activeSlave.race == "middle eastern")>>
	<<set $prefixes.push("Arab", "Sand")>>
<<elseif ($activeSlave.race == "indo-aryan")>>
	<<set $prefixes.push("Indian", "Brown")>>
<<elseif ($activeSlave.race == "mixed race")>>
	<<set $prefixes.push("Mulatto", "Mutt")>>
<</if>>
<</if>>

<<if ($activeSlave.eyes == -2)>>
	<<set $prefixes.push("Blind", "Sightless", "Eyeless")>>
<</if>>

<<if ($activeSlave.boobs < 500) && ($activeSlave.butt < 3)>>
	<<set $prefixes.push("Girly", "Thin", "Slim")>>
<</if>>
<<if ($activeSlave.boobs <= 300)>>
	<<set $prefixes.push("Flat")>>
<</if>>
<<if ($activeSlave.anus > 2) || ($activeSlave.vagina > 2)>>
	<<set $prefixes.push("Gape", "Slit", "Wideopen", "Hallway")>>
<</if>>
<<if ($activeSlave.anus > 0)>>
	<<set $prefixes.push("Butt", "Anus", "Backdoor", "Butthole", "Asshole")>>
<</if>>
<<if ($activeSlave.vagina > 0)>>
	<<set $prefixes.push("Cunt", "Pussy", "Vagina")>>
<</if>>
<<if ($activeSlave.boobs < 500) && ($activeSlave.butt < 3) && ($activeSlave.dick > 0)>>
	<<set $prefixes.push("Trap", "Sissy", "Bottom", "Bitch")>>
<</if>>
<<if ($activeSlave.boobs > 500) && ($activeSlave.butt > 3) && ($activeSlave.dick > 0)>>
	<<set $prefixes.push("Futa", "She", "Trans")>>
<</if>>
<<if ($activeSlave.weight > 30)>>
	<<set $prefixes.push("Fat", "Chubby", "Whale")>>
<<elseif ($activeSlave.weight <= -30)>>
	<<set $prefixes.push("Skinny", "Bony", "Rail")>>
<</if>>
<<if ($activeSlave.muscles > 30)>>
	<<set $prefixes.push("Ripped", "Strong", "Huge")>>
<</if>>
<<if ($activeSlave.energy > 95)>>
	<<set $prefixes.push("Fuck", "Nympho", "Fuckaddict", "Sexaddict")>>
<</if>>
<<if ($activeSlave.fetish == "buttslut") && ($activeSlave.fetishKnown == 1)>>
	<<set $prefixes.push("Anal", "Butthole", "Sodomy")>>
<</if>>
<<if ($activeSlave.fetish == "cumslut") && ($activeSlave.fetishKnown == 1)>>
	<<set $prefixes.push("Cum", "Suck", "Sucker")>>
<</if>>
<<if ($activeSlave.fetish == "humiliation") && ($activeSlave.fetishKnown == 1)>>
	<<set $prefixes.push("Public", "Rape", "Showgirl")>>
<</if>>
<<if ($activeSlave.fetish == "submissive") && ($activeSlave.fetishKnown == 1)>>
	<<set $prefixes.push("Bottom", "Rape", "Fuckee")>>
<</if>>
<<if ($activeSlave.fetish == "dom") && ($activeSlave.fetishKnown == 1)>>
	<<set $prefixes.push("Top", "Dom", "Fucker")>>
<</if>>
<<if ($activeSlave.fetish == "masochist") && ($activeSlave.fetishKnown == 1)>>
	<<set $prefixes.push("Pain", "Rape", "Struggle")>>
<</if>>
<<if ($activeSlave.fetish == "pregnancy") && ($activeSlave.fetishKnown == 1)>>
	<<set $prefixes.push("Breeder", "Mommy", "Fertile")>>
<</if>>
<<if ($activeSlave.fetish == "boobs") && ($activeSlave.fetishKnown == 1)>>
	<<set $prefixes.push("Titty", "Boob", "Boobie", "Tit")>>
<</if>>
<<if (($activeSlave.boobs*$activeSlave.lactation) > 1000)>>
	<<set $prefixes.push("Cow", "Creamy", "Milky")>>
<</if>>
<<if ($activeSlave.oralSkill <= 30) && ($activeSlave.analSkill <= 30)>>
	<<set $prefixes.push("Cheap", "Gutter", "Fail")>>
<</if>>
<<if ($activeSlave.nipples != "tiny") && ($activeSlave.nipples != "cute")>>
	<<set $prefixes.push("Nipples", "Pointy", "Titclit")>>
<</if>>
<<if ($activeSlave.areolae > 2)>>
	<<set $prefixes.push("Headlights", "Areolas")>>
<</if>>
<<if ($activeSlave.lips > 40)>>
	<<set $prefixes.push("Lippy", "Plush", "Pillow")>>
<</if>>
<<if ($activeSlave.labia > 1)>>
	<<set $prefixes.push("Flower", "Lip", "Curtain")>>
<</if>>
<<if ($activeSlave.visualAge > 35)>>
	<<set $prefixes.push("Old", "Cougar", "MILF")>>
<</if>>
<<if ($activeSlave.visualAge < 25)>>
	<<set $prefixes.push("Young", "Girly", "Thin")>>
<</if>>
<<if ($activeSlave.amp == 1)>>
	<<set $prefixes.push("Amp", "Stumpy")>>
<</if>>
<<if ($activeSlave.boobsImplant > 1000) || ($activeSlave.buttImplant > 3)>>
	<<set $prefixes.push("Fake", "Plastic", "Silicone")>>
<</if>>
<<if ($activeSlave.dick > 5) && ($activeSlave.balls > 5)>>
	<<set $prefixes.push("Daddy", "Potent", "Cannon")>>
<</if>>
<<if $activeSlave.breedingMark == 1>>
	<<set $prefixes.push("Breeder", "Oven", "Womb")>>
<</if>>
<<if ($activeSlave.pregType >= 50) && ($activeSlave.preg > 30)>>
	<<set $prefixes.push("Nursery", "Seeded", "Burst", "Factory")>>
<</if>>
<<if ($activeSlave.pregType >= 10) && ($activeSlave.preg > 20)>>
	<<set $prefixes.push("Squirmy", "Bulgey", "Balloon")>>
<</if>>
<<if ($activeSlave.preg > 5)>>
	<<set $prefixes.push("Preg", "Belly", "Mommy")>>
<</if>>
<<if ($activeSlave.dick > 4)>>
	<<set $prefixes.push("Hung", "Dangle", "Cock", "Dick")>>
<</if>>
<<if ($activeSlave.dick > 0) && ($activeSlave.balls == 0)>>
	<<set $prefixes.push("Soft", "Gelded", "Cut")>>
<</if>>
<<if ($activeSlave.dick > 0) && ($activeSlave.balls > 0)>>
	<<set $prefixes.push("Hard", "Stiff", "Erect")>>
<</if>>
<<if ($activeSlave.dick == 1)>>
	<<set $prefixes.push("Tiny", "Micro", "Bitch")>>
<</if>>
<<if ($activeSlave.boobs >= 800)>>
	<<set $prefixes.push("Boob", "Boobs", "Titty")>>
<</if>>
<<if ($activeSlave.butt > 5)>>
	<<set $prefixes.push("Ass", "Butt", "Bottom")>>
<</if>>
<<if ($activeSlave.vagina == 0)>>
	<<set $prefixes.push("Virgin")>>
<</if>>
<<if ($activeSlave.height >= 185)>>
	<<set $prefixes.push("Top", "Tower", "Tall")>>
<</if>>
<<if ($activeSlave.height < 150)>>
	<<set $prefixes.push("Bottom", "Short", "Stumpy")>>
<</if>>
<<if ($activeSlave.whoreSkill > 30)>>
	<<set $prefixes.push("Street", "Whore", "Money")>>
<</if>>
<<if ($activeSlave.entertainSkill > 30)>>
	<<set $prefixes.push("Easy", "Slut", "Club")>>
<</if>>
<<if ($activeSlave.oralSkill > 30)>>
	<<set $prefixes.push("Throat", "Suck", "Tonsil")>>
<</if>>
<<if ($activeSlave.vaginalSkill > 30)>>
	<<set $prefixes.push("Pussy", "Kegel", "Channel")>>
<</if>>
<<if ($activeSlave.analSkill > 30)>>
	<<set $prefixes.push("Asspussy", "Anal", "Sphincter")>>
<</if>>
<<if ($activeSlave.intelligence > 0)>>
	<<set $prefixes.push("Smart", "Bright", "Clever")>>
<<elseif ($activeSlave.intelligence > 0)>>
	<<set $prefixes.push("Dumb", "Stupid", "Retarded", "Cretin")>>
<</if>>
<<if ($activeSlave.intelligenceImplant == 1)>>
	<<set $prefixes.push("Books", "College", "Graduate")>>
<</if>>
<<if ($activeSlave.vagina == 1) && ($activeSlave.vaginalSkill <= 10)>>
	<<set $prefixes.push("Tight", "New", "Fresh")>>
<</if>>
<<if ($activeSlave.anus == 1) && ($activeSlave.analSkill <= 10)>>
	<<set $prefixes.push("Tightbutt", "Tightass")>>
<</if>>
<<if ($activeSlave.devotion < -75)>>
	<<set $prefixes.push("Angry", "Cage", "Biter")>>
<<elseif ($activeSlave.devotion < -50)>>
	<<set $prefixes.push("Cell", "Cuffs")>>
<<elseif ($activeSlave.devotion < -20)>>
	<<set $prefixes.push("Bag", "Box")>>
<<elseif ($activeSlave.devotion <= 20)>>
	<<set $prefixes.push("Whiner", "Sad")>>
<</if>>
<<if ($activeSlave.trust < -50)>>
	<<set $prefixes.push("Sobber", "Screamer")>>
<<elseif ($activeSlave.trust < -20)>>
	<<set $prefixes.push("Weeper", "Crying")>>
<<elseif ($activeSlave.trust < 20)>>
	<<set $prefixes.push("Tears", "Begging")>>
<</if>>

<<set $suffixes = ["bitch", "slut", "whore", "slave", "puppet", "hole", "butt", "tit", "thing", "object", "tool", "toy", "fuck", "ass", "face"]>>

<<if ($activeSlave.visualAge <= 25)>>
	<<set $suffixes.push("girl")>>
<<elseif ($activeSlave.visualAge > 30)>>
	<<set $suffixes.push("MILF", "cougar", "mother")>>
<</if>>
<<if ($activeSlave.vagina > -1)>>
	<<set $suffixes.push("cunt", "pussy")>>
<</if>>
<<if ($activeSlave.dick > 0)>>
	<<if ($activeSlave.balls == 0)>>
	<<set $suffixes.push("gelding", "sissy", "trap")>>
	<<elseif ($activeSlave.boobs < 500)>>
	<<set $suffixes.push("sissy", "trap")>>
	<<else>>
	<<set $suffixes.push("futa", "pole")>>
	<</if>>
<</if>>

<<if ($activeSlave.assignment == "guard you")>>
	<<set $activeSlave.slaveName = either("Guard", "Battle")>>
<<elseif ($activeSlave.assignment == "recruit girls")>>
	<<set $activeSlave.slaveName = either("Cam", "Recruiter")>>
<<elseif ($activeSlave.assignment == "be the Madam")>>
	<<set $activeSlave.slaveName = either("Pimp", "Madam")>>
<<elseif ($activeSlave.assignment == "be the DJ")>>
	<<set $activeSlave.slaveName = either("Bass", "Booth")>>
<<elseif ($activeSlave.assignment == "be the Milkmaid")>>
	<<set $activeSlave.slaveName = either("Farm", "Dairy")>>
<<elseif ($activeSlave.assignment == "be the Collectrix")>>
	<<set $activeSlave.slaveName = either("Milker", "Fucker")>>
<<elseif ($activeSlave.assignment == "be your Head Girl")>>
	<<set $activeSlave.slaveName = either("Chief", "Head")>>
<<elseif ($activeSlave.assignment == "be the Schoolteacher")>>
	<<set $activeSlave.slaveName = either("Teacher", "Classroom")>>
<<elseif ($activeSlave.assignment == "be the Attendant")>>
	<<set $activeSlave.slaveName = either("Spa", "Bath")>>
<<elseif ($activeSlave.assignment == "be the Wardeness")>>
	<<set $activeSlave.slaveName = either("Jail", "Prison")>>
<<elseif ($activeSlave.assignment == "be your concubine")>>
	<<set $activeSlave.slaveName = either("Bed", "Master")>>
<<else>>
	<<set $activeSlave.slaveName = $prefixes.random()>>
<</if>>

<<set $seed = $suffixes.random()>>

<<if $seed == $activeSlave.slaveName.toLowerCase()>>
	<<goto "Degrading Name">>
<</if>>

<<set $activeSlave.slaveName = $activeSlave.slaveName+$seed>>

<</if>>

<</silently>>

repo_name: breadedpigeon/fc


code:
:: Description Options [nobr]

<<set $nextButton = "Back to Main">>
<<set $nextLink = "Main">>

//These options will affect both the long form description of each slave and the miniscenes available from the main menu.//

<<if $showSexualHistory == 1>>
	Sexual histories are @@color:green;SHOWN.@@ //[[Hide|Description Options][$showSexualHistory = 0]]//
<<else>>
	Sexual histories are @@color:red;HIDDEN.@@ //[[Show|Description Options][$showSexualHistory = 1]]//
<</if>>

<<if $showBodyMods == 1>>
	Cosmetic body mods are @@color:green;SHOWN.@@ //[[Hide|Description Options][$showBodyMods = 0]]//
<<else>>
	Cosmetic body mods are @@color:red;HIDDEN.@@ //[[Show|Description Options][$showBodyMods = 1]]//
<</if>>

<<if $showImplantEffects == 1>>
	The effects of implants are @@color:green;SHOWN.@@ //[[Hide|Description Options][$showImplantEffects = 0]]//
<<else>>
	The effects of implants are @@color:red;HIDDEN.@@ //[[Show|Description Options][$showImplantEffects = 1]]//
<</if>>

<<if $showClothing == 1>>
	Clothing is mostly @@color:green;SHOWN.@@ //[[Hide|Description Options][$showClothing = 0]]//
<<else>>
	Clothing is mostly @@color:red;HIDDEN.@@ //[[Show|Description Options][$showClothing = 1]]//
<</if>>

Detailed slave age information is
<<if $showAgeDetail == 1>>
	@@color:green;SHOWN.@@ //[[Hide|Description Options][$showAgeDetail = 0]]//
<<else>>
	@@color:red;HIDDEN.@@ //[[Show|Description Options][$showAgeDetail = 1]]//
<</if>>

Approximate height is
<<if $showHeightCMs == 1>>
	@@color:green;SHOWN.@@ //[[Hide|Description Options][$showHeightCMs = 0]]//
<<else>>
	@@color:red;HIDDEN.@@ //[[Show|Description Options][$showHeightCMs = 1]]//
<</if>>

Volume, in CCs, of breasts is
<<if $showBoobCCs == 1>>
	@@color:green;SHOWN.@@ //[[Hide|Description Options][$showBoobCCs = 0]]//
<<else>>
	@@color:red;HIDDEN.@@ //[[Show|Description Options][$showBoobCCs = 1]]//
<</if>>

<<if $seeDicks != 0>>

Approximate sizes of dicks and balls are
<<if $showDickCMs == 1>>
	@@color:green;SHOWN.@@ //[[Hide|Description Options][$showDickCMs = 0]]//
<<else>>
	@@color:red;HIDDEN.@@ //[[Show|Description Options][$showDickCMs = 1]]//
<</if>>
<</if>>

Attractiveness and Sexual scores are
<<if $showScores == 1>>
	@@color:green;SHOWN.@@ //[[Hide|Description Options][$showScores = 0]]//
<<else>>
	@@color:red;HIDDEN.@@ //[[Show|Description Options][$showScores = 1]]//
<</if>>


code:
:: Discard Confirm

This will permanently remove $activeSlave.slaveName from the game, and you will not receive any money for her. This is primarily intended as a way to rid yourself of bugged slaves. Are you certain?

[[Discard her|Slave Sold]]

[[Cancel|Slave Interact]]


code:
:: Dispensary [nobr]

<<set $nextButton = "Back">>
<<set $nextLink = "Manage Arcology">>
<<set $showEncyclopedia = 1>><<set $encyclopedia = "The Pharmaceutical Fab.">>

<<if $dispensaryUpgrade == 0>>
//The pharmaceutical fabricator is running smoothly. It can cheaply replicate complex medications, and has already cut the cost of drugs for your slaves by a fourth. It can easily produce advanced drugs should you obtain the data necessary to create them.//
<<else>>
//The pharmaceutical fabricator is running smoothly. It can cheaply and quickly replicate complex medications, and has already cut the cost of drugs for your slaves in half. It can easily produce advanced drugs should you obtain the data necessary to create them.//
<</if>>

<<if ($dispensaryUpgrade == 0)>>

<<if ($rep > 5000)>>
	[[Upgrade the pharmaceutical fabricator|Dispensary][$cash -= Math.trunc(30000*$upgradeMultiplierArcology), $dispensaryUpgrade = 1, $drugsCost = $drugsCost/2]]
	//Costs ¤<<print Math.trunc(30000*$upgradeMultiplierArcology)>>//

    //Will improve production efficiency further decreasing costs.//
<<else>>
	//You lack the reputation to obtain cutting-edge pharmaceutical fabricator upgrades//
<</if>>
<</if>>

<<if ($organFarmUpgrade < 3) && ($rep <= 10000*$upgradeMultiplierMedicine)>>
	//You lack the reputation to access experimental organ farm parts//
<<elseif $dispensaryUpgrade == 0 && $organFarmUpgrade == 2>>
	//The fabricator must updgraded before it can be fitted with perfected organ farm parts//
<<elseif $organs.length > 0>>
	//The organ farm can not be upgraded while it is use//
<<elseif ($organFarmUpgrade == 2) && ($rep > 10000*$upgradeMultiplierMedicine)>>
	[[Upgrade to the organ farm to the cutting edge model|Dispensary][$cash -= 150000*$upgradeMultiplierMedicine, $organFarmUpgrade = 3]]
	//Costs ¤<<print 150000*$upgradeMultiplierMedicine>>//

    //Will allow the organ farm to rapidly grow organs without risk to the implantee's health.//
<<elseif ($organFarmUpgrade == 1) && ($rep > 10000*$upgradeMultiplierMedicine)>>
	[[Upgrade the organ farm with an experimental growth accelerator|Dispensary][$cash -= 50000*$upgradeMultiplierMedicine, $organFarmUpgrade = 2]]
	//Costs ¤<<print 50000*$upgradeMultiplierMedicine>>//

    //Will allow the organ farm to quickly grow organs. Implanted organs may cause health issues.//
<<elseif ($organFarmUpgrade == 0) && ($rep > 10000*$upgradeMultiplierMedicine)>>
	[[Upgrade the fabricator with an experimental organ farm|Dispensary][$cash -= 50000*$upgradeMultiplierMedicine, $organFarmUpgrade = 1]]
	//Costs ¤<<print 50000*$upgradeMultiplierMedicine>>//

    //Will allow the fabrication of tailored organs using the autosurgery.//
<</if>>

<<if $organFarmUpgrade > 2>>
	The fabricator is capable of rapidly growing organs.
<<elseif $organFarmUpgrade > 1>>
	The fabricator is capable of quickly growing organs, though not without side effects.
<<elseif ($organFarmUpgrade > 0)>>
	The fabricator is capable of growing organs.
<</if>>

<<if $organs.length > 0>>
It is currently working on the following organs:
	<<for $i = 0; $i < $organs.length; $i++>>
	<<for $j = 0; $j < $slaves.length; $j++>>
		<<if $slaves[$j].ID == $organs[$i].ID>>

		$slaves[$j].slaveName's $organs[$i].type,
		<<if $organs[$i].weeksToCompletion <= 0>>
			ready for implantation.
		<<else>>
			<<if $organFarmUpgrade == 1>><<print $organs[$i].weeksToCompletion>><<elseif $organFarmUpgrade == 2>><<print Math.ceil($organs[$i].weeksToCompletion/2)>><<elseif $organFarmUpgrade == 3>><<print Math.ceil($organs[$i].weeksToCompletion/4)>><</if>> weeks from completion.
		<</if>>
		<<break>>
		<</if>>
	<</for>>
	<</for>>
<</if>>

The fabricator is producing
<<if $injectionUpgrade == 0>>
	standard growth hormones.
	<<if $rep > 6000>>
		[[Purchase data on prototype growth hormone tests|Dispensary][$cash -= 25000*$upgradeMultiplierMedicine, $injectionUpgrade = 1]]
		//Costs ¤<<print 25000*$upgradeMultiplierMedicine>>//

    //Should improve the reliability of growth injections of all kinds.//
	<<else>>
		//You lack the reputation to obtain prototype medicines//
	<</if>>
<<elseif $injectionUpgrade == 1>>
	prototype growth hormones.
	<<if $rep > 10000>>
		[[Upgrade the fabricator to customize each slave's growth hormones|Dispensary][$cash -= 50000*$upgradeMultiplierMedicine, $injectionUpgrade = 2]]
		//Costs ¤<<print 50000*$upgradeMultiplierMedicine>>//

    //Should improve the reliability of growth injections of all kinds.//
	<<else>>
		//You lack the reputation to obtain prototype fabricator upgrades//
	<</if>>
<<elseif $injectionUpgrade == 2>>
	prototype growth hormones.
	<<if $rep > 14000>>
		[[Upgrade the fabricator with prototype biomechanical microfactories|Dispensary][$cash -= 100000*$upgradeMultiplierMedicine, $injectionUpgrade = 3]]
		//Costs ¤<<print 100000*$upgradeMultiplierMedicine>>//

    //Should improve the reliability of growth injections of all kinds.//
	<<else>>
		//You lack the reputation to obtain prototype biomechanical microfactories//
	<</if>>
<<else>>
	the world's most effective growth hormones.
<</if>>

The fabricator is producing
<<if $hormoneUpgradeMood == 0>>
	standardized hormone replacement therapies.
	<<if $rep > 2000>>
		[[Upgrade for individualized therapy|Dispensary][$cash -= 10000*$upgradeMultiplierMedicine, $hormoneUpgradeMood = 1]]
		//Costs ¤<<print 10000*$upgradeMultiplierMedicine>>//

    //Should eliminate the occasional moodiness caused by generalized therapy.//
	<<else>>
		//You lack the reputation to obtain advanced drug manufacturing components//
	<</if>>
<<else>>
	individualized hormone replacement therapies.
<</if>>

The hormone replacement therapies
<<if $hormoneUpgradePower == 0>>
	are traditional: they're formulated to mimic natural hormones.
	<<if $rep > 4000>>
		[[Purchase data on advanced HRT|Dispensary][$cash -= 25000*$upgradeMultiplierMedicine, $hormoneUpgradePower = 1]]
		//Costs ¤<<print 25000*$upgradeMultiplierMedicine>>//

    //Should increase the power of hormone therapies.//
	<<else>>
		//You lack the reputation to obtain prototype medicines//
	<</if>>
<<else>>
	are advanced: they're formulated to improve on natural hormones.
<</if>>

The hormone replacement therapies
<<if $hormoneUpgradeShrinkage == 0>>
	are broad-spectrum.
	<<if $rep > 4000>>
		[[Purchase data on targeted HRT|Dispensary][$cash -= 25000*$upgradeMultiplierMedicine, $hormoneUpgradeShrinkage = 1]]
		//Costs ¤<<print 25000*$upgradeMultiplierMedicine>>//

    //Should reduce atrophy of organs corresponding to original sex.//
	<<else>>
		//You lack the reputation to obtain prototype medicines//
	<</if>>
<<else>>
	are targeted, reducing atrophy of organs corresponding to original sex.
<</if>>

<<if $precociousPuberty == 1>>

<<if ($pubertyHormones == 0) && ($rep <= 4500*$upgradeMultiplierMedicine)>>
	//You lack the reputation to fund forced puberty drugs//
<<elseif ($pubertyHormones == 0) && ($rep > 4500*$upgradeMultiplierMedicine)>>
	[[Fund research into powerful hormonal injections to jumpstart puberty|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine, $pubertyHormones = 1]]
	//Costs ¤<<print 30000*$upgradeMultiplierMedicine>>//

    //Will allow the production of powerful hormonal drugs designed to force a slave through puberty without regard for side effects. //
<<elseif ($pubertyHormones == 1)>>
	The fabricator is producing extra strong hormonal drugs designed to force a slave through puberty.
<</if>>
<</if>>

<<if $feeder == 1>>
<<if ($dietXXY == 0) && ($rep <= 3500*$upgradeMultiplierMedicine)>>
	//You lack the reputation to fund research into hermaphrodite hormones//
<<elseif ($dietXXY == 0) && ($rep > 3500*$upgradeMultiplierMedicine)>>
	[[Fund research into developing hermaphrodite hormone therapies|Dispensary][$cash -= 10000*$upgradeMultiplierMedicine, $dietXXY = 1]]
	//Costs ¤<<print 10000*$upgradeMultiplierMedicine>>//

    //Will allow for specially balanced meals to be served in the cafeteria designed to promote both halves of a herm's sexuality. //
<<elseif ($dietXXY == 1)>>
	The fabricator is producing meals to be served in the cafeteria designed to promote both halves of a herm's sexuality.
<</if>>
<<else>>
	The feeders are incapable of modifying slave diets well enough to adjust hormones for hermaphrodite meals.
<</if>>

<<if $cumProDiet == 0>>
	[[Purchase recipes to encourage cum production|Dispensary][$cash -= 5000*$upgradeMultiplierMedicine, $cumProDiet = 1]]
	//Costs ¤<<print 5000*$upgradeMultiplierMedicine>>//

    //Will allow for specially designed meals to be served in the cafeteria to promote cum production.//
<<elseif $cumProDiet == 1>>
	The fabricator is producing meals to be served in the cafeteria designed to promote cum production.
<</if>>

<<if ($curativeUpgrade == 0) && ($rep > 6000*$upgradeMultiplierMedicine)>>
	[[Purchase data on advanced curatives|Dispensary][$cash -= 25000*$upgradeMultiplierMedicine, $curativeUpgrade = 1]]
	//Costs ¤<<print 25000*$upgradeMultiplierMedicine>>//

    //Should improve the effectiveness of curative treatment.//
<<elseif ($curativeUpgrade == 1)>>
	The fabricator is producing highly effective curative cocktails.
<</if>>

<<if ($aphrodisiacUpgrade == 0) && ($rep > 6000*$upgradeMultiplierMedicine)>>
	[[Purchase data on aphrodisiac withdrawal treatment|Dispensary][$cash -= 10000*$upgradeMultiplierMedicine, $aphrodisiacUpgrade = 1]]
	//Costs ¤<<print 10000*$upgradeMultiplierMedicine>>//

    //Should prevent most negative effects of withdrawal.//
<<elseif ($aphrodisiacUpgrade == 1)>>
	The fabricator is producing a substitute that will protect slaves from aphrodisiac withdrawal.
<</if>>

<<if ($superFertilityDrugs == 0) && ($rep > 2500*$upgradeMultiplierMedicine) && $seeHyperPreg == 1>>
	[[Purchase data on powerful fertility drugs|Dispensary][$cash -= 20000*$upgradeMultiplierMedicine, $superFertilityDrugs = 1]]
	//Costs ¤<<print 20000*$upgradeMultiplierMedicine>>//

    //Should improve the likelihood of conception and multiples. //
<<elseif ($superFertilityDrugs == 1)>>
	The fabricator is producing highly effective fertility agents. There is a warning present involving overdosing and instances of ten or more children.
<</if>>

<<if ($healthyDrugsUpgrade == 0)>>
	<<if (($organFarmUpgrade >= 1) && ($injectionUpgrade != 0) && ($curativeUpgrade == 1) && ($aphrodisiacUpgrade == 1))>>
	<<if ($rep >= 15000*$upgradeMultiplierMedicine)>>
		[[Fund research into drug formulations without negative physical side effects|Dispensary][$cash -= 500000*$upgradeMultiplierMedicine,$healthyDrugsUpgrade = 1]] //Costs ¤<<print 500000*$upgradeMultiplierMedicine>>. Will prevent the negative side effects of excessive drug usage on your slaves.//

	<<else>>
		// You lack the reputation to access the technology necessary to develop advanced drug formulations. //
	<</if>>
	<<else>>
	// You must purchase all other upgrades before developing advanced drug formulations. //

	<</if>>
<<else>>
	The fabricator has been upgraded to optimize the structures of your other drugs, eliminating their negative side effects.

<</if>>
/* Code [draft] contributed by Anon1888 */

<<if ($arcologies[0].FSBodyPuristLaw == 1)>>
	//The pharmaceutical fabricator is working with your body purist arcology to reduce long term drug side effects.//

<</if>>

<<if ($ImplantProductionUpgrade == 0) && ($rep <= 2000*$upgradeMultiplierMedicine)>>
	//You lack the reputation to access experimental implant manufacturer parts//

<</if>>

<<if ($ImplantProductionUpgrade == 0) && ($rep > 2000*$upgradeMultiplierMedicine)>>
    [[Upgrade the fabricator with an experimental implant manufacturer|Dispensary][$cash -= 20000*$upgradeMultiplierMedicine, $ImplantProductionUpgrade = 1]]
	//Costs ¤<<print 20000*$upgradeMultiplierMedicine>>//

    //Will allow the fabrication of special implants using the autosurgery.//
<<elseif ($ImplantProductionUpgrade > 0)>>
	The fabricator is capable of crafting special implants.
<</if>>

<<if $ImplantProductionUpgrade == 1 && $seeHyperPreg == 1 && $seeExtreme == 1>>
<<if ($permaPregImplant == 0) and ($rep <= 4000*$upgradeMultiplierMedicine)>>
	//You lack the reputation to access experimental pregnancy generator schematics//
<</if>>

<<if ($permaPregImplant == 0) && ($rep > 4000*$upgradeMultiplierMedicine)>>
    [[Purchase schematics for an experimental implantable pregnancy generator|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine, $permaPregImplant = 1]]
	//Costs ¤<<print 30000*$upgradeMultiplierMedicine>>//

    //Will allow the fabrication of implants that force perpetual pregnancy.//
<<elseif ($permaPregImplant > 0)>>
	The fabricator is capable of crafting pregnancy generators.
<</if>>

<</if>>

<<if $seeHyperPreg == 1>>
<<if $superFertilityDrugs == 1 && ($rep > 10000*$upgradeMultiplierMedicine) && $pregSpeedControl != 1>>
	[[Fund research pregnancy speed control methods|Dispensary][$cash -= 200000*$upgradeMultiplierMedicine, $pregSpeedControl = 1, $clinicSpeedGestation = 0]]
	//Costs ¤<<print 200000*$upgradeMultiplierMedicine>>//

    // Fund underground research labs to develop methods for controlling pregnancy progress. //
<<elseif ($rep > 10000*$upgradeMultiplierMedicine) && $pregSpeedControl != 1>>
	//You lack the reputation required to contact underground research labs to develop methods for controlling pregnancy progress.//
<<elseif ($pregSpeedControl == 1)>>
	The fabricator is producing extremly complex gestation control agents. They can be used to control gestation speed, and even supress labor for some time. //
<</if>>

<<elseif $birthsTotal > 10>>
<<if ($rep > 10000*$upgradeMultiplierMedicine) && $pregSpeedControl != 1>>
	[[Fund research pregnancy speed control methods|Dispensary][$cash -= 200000*$upgradeMultiplierMedicine, $pregSpeedControl = 1, $clinicSpeedGestation = 0]]
	//Costs ¤<<print 200000*$upgradeMultiplierMedicine>>//

    // Fund underground research labs to develop methods for controlling pregnancy progress. //
<<elseif ($rep > 10000*$upgradeMultiplierMedicine) && $pregSpeedControl != 1>>
	//You lack the reputation required to contact underground research labs to develop methods for controlling pregnancy progress.//
<<elseif ($pregSpeedControl == 1)>>
	The fabricator is producing extremly complex gestation control agents. They can be used to control gestation speed, and even supress labor for some time. //
<</if>>

<</if>>

<<if $ImplantProductionUpgrade == 1>>
<<if ($bellyImplants == 0) && ($rep <= 2000*$upgradeMultiplierMedicine)>>
	//You lack the reputation to access experimental fillable abdominal implants//
<</if>>

<<if ($bellyImplants == 0) && ($rep > 2000*$upgradeMultiplierMedicine)>>
    [[Purchase schematics for fillable abdominal implants|Dispensary][$cash -= 20000*$upgradeMultiplierMedicine, $bellyImplants = 1]]
	//Costs ¤<<print 20000*$upgradeMultiplierMedicine>>//

    //Will allow the fabrication of fillable abdominal implants using the autosurgery.//
<<elseif ($bellyImplants > 0)>>
	The fabricator is capable of crafting fillable abdominal implants.
<</if>>

<</if>>

<<if $ImplantProductionUpgrade == 1>>
<<if ($bellyImplants == 1) && ($cervixImplants != 1) && ($rep <= 6000*$upgradeMultiplierMedicine)>> /* show only after belly implants already researched */
	//You lack the reputation to access schematics far experimental cervix filter micropumps for abdominal implants//
<</if>>

<<if ($bellyImplants == 1) && ($cervixImplants != 1) && ($rep >6000*$upgradeMultiplierMedicine)>> /* nanotech like technology much more impressive and costly than simple implant */
    [[Purchase schematics for cervix filter micropumps|Dispensary][$cash -= 70000*$upgradeMultiplierMedicine, $cervixImplants = 1]]
	//Costs ¤<<print 70000*$upgradeMultiplierMedicine>>//

    //Will allow the fabrication of cervix filter micropumps for fillable abdominal implants using the autosurgery.//
<<elseif ($cervixImplants > 0)>>
	The fabricator is capable of crafting cervix filter micropumps for fillable abdominal implants.
<</if>>
<</if>>

__Societal Focused Research__

<<if $arcologies[0].FSGenderRadicalistDecoration == 100 && $organFarmUpgrade > 0>>
<<if ($arcologies[0].FSGenderRadicalistResearch == 0)>>
	<<if ($rep >= 10000*$upgradeMultiplierMedicine)>>
	  [[Fund research into developing male pregnancy methods|Dispensary][$cash -= 50000*$upgradeMultiplierMedicine,$arcologies[0].FSGenderRadicalistResearch = 1]] //Costs ¤<<print 50000*$upgradeMultiplierMedicine>>. Will allow cloning and production of anal uteri and ovaries.//
	<<else>>
	  // You lack the reputation to access the research necessary to develop anal uteri and ovaries. //
	<</if>>
<<else>>
  The organ farm has been upgraded with schematics for modified uteri and ovaries.
<</if>>

<</if>>

<<if ($ImplantProductionUpgrade == 1) and ($arcologies[0].FSTransformationFetishistDecoration >= 100)>>
<<if ($arcologies[0].FSTransformationFetishistResearch == 0) and ($rep <= 5000*$upgradeMultiplierMedicine)>>
	//You lack the reputation to access experimental gigantic implants and elasticizing filler//
<</if>>
<<if ($arcologies[0].FSTransformationFetishistResearch == 0) and ($rep > 5000*$upgradeMultiplierMedicine) and ($arcologies[0].FSTransformationFetishistDecoration >= 100)>>
    [[Purchase data on gigantic implants and elasticizing filler|Dispensary][$cash -= 20000*$upgradeMultiplierMedicine, $arcologies[0].FSTransformationFetishistResearch = 1]]
	//Costs ¤<<print 20000*$upgradeMultiplierMedicine>>//

    //Will allow the fabrication of gigantic implants using the autosurgery and filler capable of overfilling existing fillable implants.//
<<elseif ($arcologies[0].FSTransformationFetishistResearch > 0)>>
	The fabricator is capable of crafting gigantic implants and elasticizing filler designed to overfill existing implants.
<</if>>

<</if>>

<<if $arcologies[0].FSAssetExpansionistDecoration == 100>>
<<if ($arcologies[0].FSAssetExpansionistResearch == 0)>>
	<<if ($rep >= 5000*$upgradeMultiplierMedicine)>>
	  [[Fund research into drug formulations for growth without limit|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine,$arcologies[0].FSAssetExpansionistResearch = 1]] //Costs ¤<<print 30000*$upgradeMultiplierMedicine>>. Will allow creation of drugs to push assets to unthinkable sizes.//
	<<else>>
	  // You lack the reputation to access the research necessary to develop advanced growth drug formulations. //
	<</if>>
<<else>>
  The fabricator has been upgraded to manufacture extremely powerful growth drugs.
<</if>>

<</if>>

<<if $arcologies[0].FSSlimnessEnthusiastDecoration == 100>>
<<if ($arcologies[0].FSSlimnessEnthusiastResearch == 0)>>
	<<if ($rep >= 5000*$upgradeMultiplierMedicine)>>
	  [[Fund research into drug formulations for slimming slaves|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine,$arcologies[0].FSSlimnessEnthusiastResearch = 1]] //Costs ¤<<print 30000*$upgradeMultiplierMedicine>>. Will allow creation of drugs to shrink assets.//
	<<else>>
	  // You lack the reputation to access the research necessary to develop asset reducing drug formulations. //
	<</if>>
<<else>>
  The fabricator has been upgraded to manufacture growth reversing drugs.
<</if>>

<</if>>

<<if $arcologies[0].FSYouthPreferentialistDecoration == 100>>
<<if ($arcologies[0].FSYouthPreferentialistResearch == 0)>>
	<<if ($rep >= 5000*$upgradeMultiplierMedicine)>>
	  [[Fund research into skin care designed to reverse the effects of aging|Dispensary][$cash -= 30000*$upgradeMultiplierMedicine,$arcologies[0].FSYouthPreferentialistResearch = 1]] //Costs ¤<<print 30000*$upgradeMultiplierMedicine>>. Will allow creation of beauty creams designed to make slaves look young again.//
	<<else>>
	  // You lack the reputation to access the research necessary to develop beauty creams designed to make slaves look young again. //
	<</if>>
<<else>>
  The fabricator has been upgraded to manufacture extremely effective beauty creams designed to combat aging.
<</if>>

<</if>>


code:
:: DJ Select

<<nobr>>
<<set $nextButton = "Back">>
<<set $nextLink = "Club">>
<<set $showEncyclopedia = 1>><<set $encyclopedia = "DJs">>

<<for _i = 0; _i < $slaves.length; _i++>>
<<if $DJ.ID == $slaves[_i].ID>>
	''__@@color:pink;$slaves[_i].slaveName@@__'' is serving as your DJ.
	<<set $slaves[_i].assignment = "be the DJ">>
	<<set $slaves[_i].assignmentVisible = 0>>

She will headline entertainment in $clubName.
	<<break>>
<</if>>
<</for>>
<<if ($DJ == 0)>>
	You have not selected a DJ.
<</if>>

''Appoint a DJ from your devoted slaves:''
<<include "Slave Summary">>

[[None|DJ Workaround][$DJ = 0]]
<</nobr>>