code:
:: Default Rules [nobr]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<</for>>


code:
:: Degrading Name

<<silently>>

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

<<set $prefixes to []>>

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

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

<<if ($activeSlave.boobs < 500) && ($activeSlave.butt < 3)>>
	<<set $prefixes.push("Girly", "Thin", "Slim")>>
<</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 is "buttslut") && ($activeSlave.fetishKnown == 1)>>
	<<set $prefixes.push("Anal", "Butthole", "Sodomy")>>
<</if>>
<<if ($activeSlave.fetish is "cumslut") && ($activeSlave.fetishKnown == 1)>>
	<<set $prefixes.push("Cum", "Suck", "Sucker")>>
<</if>>
<<if ($activeSlave.fetish is "humiliation") && ($activeSlave.fetishKnown == 1)>>
	<<set $prefixes.push("Public", "Rape", "Showgirl")>>
<</if>>
<<if ($activeSlave.fetish is "submissive") && ($activeSlave.fetishKnown == 1)>>
	<<set $prefixes.push("Bottom", "Rape", "Fuckee")>>
<</if>>
<<if ($activeSlave.fetish is "dom") && ($activeSlave.fetishKnown == 1)>>
	<<set $prefixes.push("Top", "Dom", "Fucker")>>
<</if>>
<<if ($activeSlave.fetish is "masochist") && ($activeSlave.fetishKnown == 1)>>
	<<set $prefixes.push("Pain", "Rape", "Struggle")>>
<</if>>
<<if ($activeSlave.fetish is "pregnancy") && ($activeSlave.fetishKnown == 1)>>
	<<set $prefixes.push("Breeder", "Mommy", "Fertile")>>
<</if>>
<<if ($activeSlave.fetish is "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 to ["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 is "guard you")>>
	<<set $activeSlave.slaveName to either("Guard", "Battle")>>
<<elseif ($activeSlave.assignment is "recruit girls")>>
	<<set $activeSlave.slaveName to either("Cam", "Recruiter")>>
<<elseif ($activeSlave.assignment is "be the Madam")>>
	<<set $activeSlave.slaveName to either("Pimp", "Madam")>>
<<elseif ($activeSlave.assignment is "be the DJ")>>
	<<set $activeSlave.slaveName to either("Bass", "Booth")>>
<<elseif ($activeSlave.assignment is "be the Milkmaid")>>
	<<set $activeSlave.slaveName to either("Farm", "Dairy")>>
<<elseif ($activeSlave.assignment is "be the Collectrix")>>
	<<set $activeSlave.slaveName to either("Milker", "Fucker")>>
<<elseif ($activeSlave.assignment is "be your Head Girl")>>
	<<set $activeSlave.slaveName to either("Chief", "Head")>>
<<elseif ($activeSlave.assignment is "be the Schoolteacher")>>
	<<set $activeSlave.slaveName to either("Teacher", "Classroom")>>
<<elseif ($activeSlave.assignment is "be the Attendant")>>
	<<set $activeSlave.slaveName to either("Spa", "Bath")>>
<<elseif ($activeSlave.assignment is "be the Wardeness")>>
	<<set $activeSlave.slaveName to either("Jail", "Prison")>>
<<elseif ($activeSlave.assignment is "be your concubine")>>
	<<set $activeSlave.slaveName to either("Bed", "Master")>>
<<else>>
	<<set $activeSlave.slaveName to $prefixes.random()>>
<</if>>

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

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

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

<</if>>

<</silently>>

repo_name: PresidentConvert/fc


code:
:: Description Options [nobr]

<<set $nextButton to "Back to Main">>
<<set $nextLink to "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 to 0]]//
<<else>>
	Sexual histories are @@color:red;HIDDEN.@@ //[[Show|Description Options][$showSexualHistory to 1]]//
<</if>>

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

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

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

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

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

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

<<if $seeDicks != 0>>

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

Attractiveness and Sexual scores are
<<if $showScores == 1>>
	@@color:green;SHOWN.@@ //[[Hide|Description Options][$showScores to 0]]//
<<else>>
	@@color:red;HIDDEN.@@ //[[Show|Description Options][$showScores to 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 to "Back">>
<<set $nextLink to "Manage Arcology">>
<<set $showEncyclopedia to 1>><<set $encyclopedia to "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 to 1, $drugsCost to $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 to 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 to 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 to 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 to 0; $i < $organs.length; $i++>>
	<<for $j to 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 to 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 to 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 is 2>>
	prototype growth hormones.
	<<if $rep > 14000>>
		[[Upgrade the fabricator with prototype biomechanical microfactories|Dispensary][$cash -= 100000*$upgradeMultiplierMedicine, $injectionUpgrade to 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 to 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 to 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 to 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 to 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 to 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 to 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 to 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 to 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 to 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 to 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 to 1, $clinicSpeedGestation to 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 to 1, $clinicSpeedGestation to 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 to 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 to 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 to 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 to 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 to 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].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 to 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 to "Back">>
<<set $nextLink to "Club">>
<<set $showEncyclopedia to 1>><<set $encyclopedia to "DJs">>

<<for _i to 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 to "be the DJ">>
	<<set $slaves[_i].assignmentVisible to 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 to 0]]
<</nobr>>


code:
:: DJ Workaround

<<for $i to 0; $i < $slaves.length; $i++>>
	<<if ($slaves[$i].assignment is "be the DJ") && ($slaves[$i].ID != $DJ.ID)>>
		<<set $slaves[$i].assignment to "rest">>
		<<set $slaves[$i].assignmentVisible to 1>>
		<<break>>
	<</if>>
	<</for>>

	<<for $i to 0; $i < $slaves.length; $i++>>
	<<if $DJ.ID == $slaves[$i].ID>>
		<<if $slaves[$i].ID is $personalAttention>>
		<<if $PC.career == "escort">>
		<<set $personalAttention to "whoring">>
		<<elseif $PC.career == "servant">>
		<<set $personalAttention to "upkeep">>
		<<else>>
		<<set $personalAttention to "business">>
		<</if>>
		<</if>>
		<<set $slaves[$i].assignment to "be the DJ">>
		<<if $slaves[$i].choosesOwnClothes == 1>><<include "SA chooses own clothes">><</if>>
		<<set $slaves[$i].assignmentVisible to 0>>
		<<set $slaves[$i].sentence to 0>>
		<<set $slaves[$i].livingRules to "luxurious">>
		<<if $slaves[$i].ID is $HeadGirl.ID>>
			<<set $HeadGirl to 0>>
		<</if>>
		<<if $slaves[$i].ID is $Recruiter.ID>>
			<<set $Recruiter to 0>>
		<</if>>
		<<if $slaves[$i].ID is $Bodyguard.ID>>
			<<set $Bodyguard to 0>>
		<</if>>
		<<break>>
	<</if>>
	<</for>>

<<goto "Club">>