code:
:: Random Individual Event [nobr]

<<set $showEncyclopedia to 0>>
<<if $eventSlave == 0>>
  <<if $cheatMode == 1>>
	''One of the following slaves would have been selected for a random event:''

	<<for $i to 0; $i < $eligibleSlaves.length; $i++>>
		<<print "[[$eligibleSlaves[$i].slaveName|Random Individual Event][$eventSlave to $eligibleSlaves[" + $i + "]]]">>

	<</for>>
  <<else>>
	<<set $eventSlave to $eligibleSlaves.random()>>
	<<goto "Random Individual Event">>
  <</if>>
<<else>>
<<silently>>
<<set $events = []>>
<<set $RESSevent = []>>
<<set $RESSTRevent = []>>
<<set $RETSevent = []>>
<<set $RECIevent = []>>
<<set $activeSlave = 0>>
<<set $groomSlave = 0>>
<<set $brideSlave = 0>>

<<set $legendaryFacility to 0>>

/* SUB CHECKS */

<<set $RERelationshipSlave = 0>>
<<set $REShowerForceSub = 0>>
<<set $RESadisticDescriptionSub = 0>>
<<set $REIfYouEnjoyItSub = 0>>
<<set $REBoobCollisionSub = 0>>
<<set $REAnalCowgirlSubIDs = []>>
<<set $RETasteTestSubIDs = []>>

<<for $i to 0; $i < $slaves.length; $i++>>
  <<if $slaves[$i].fetish != "mindbroken">>
  <<if canWalk($slaves[$i])>>
  <<if canTalk($slaves[$i])>>
	  <<if ($slaves[$i].assignment != "be confined in the cellblock")>>
	  <<if ($slaves[$i].assignment != "stay confined")>>
	  <<if (($slaves[$i].assignment != "work in the dairy") || ($dairyRestraintsSetting < 2))>>
		<<if $slaves[$i].devotion <= 20>>
		  <<if ($slaves[$i].fetish != "buttslut") || ($slaves[$i].fetishKnown == 0)>>
		  <<if $slaves[$i].anus != 0>>
			<<set $REShowerForceSub to $slaves[$i]>>
			<<set $REIfYouEnjoyItSub to $slaves[$i]>>
		  <<else>>
			<<set $RESadisticDescriptionSub to $slaves[$i]>>
		  <</if>>
		  <</if>>
		<<else>>
		  <<if $slaves[$i].boobs > 3000>>
			<<set $REBoobCollisionSub to $slaves[$i]>>
		  <</if>>
		<</if>>
		<<if $slaves[$i].devotion >= -20>>
		  <<if $slaves[$i].devotion <= 60>>
		  <<if $slaves[$i].fetish != "buttslut">>
		  <<if $slaves[$i].anus != 0>>
			<<set $REAnalCowgirlSubIDs.push($slaves[$i].ID)>>
		  <</if>>
		  <</if>>
		  <</if>>
		<</if>>
	  <</if>>
	  <</if>>
	  <</if>>
	  <<if $slaves[$i].assignmentVisible == 1>>
	  <<if $slaves[$i].livingRules is "luxurious">>
		<<if $slaves[$i].devotion >= -20>>
		  <<if $slaves[$i].anus != 0>>
			<<set $RETasteTestSubIDs.push($slaves[$i].ID)>>
		  <</if>>
		<</if>>
	  <</if>>
	  <</if>>
  <</if>>
  <</if>>
  <</if>>
  <<if ($REShowerForceSub != 0)>>
  <<if ($RESadisticDescriptionSub != 0)>>
  <<if ($REIfYouEnjoyItSub != 0)>>
  <<if ($REAnalCowgirlSubIDs.length > 1)>>
  <<if ($RETasteTestSubIDs.length > 1)>>
	<<break>>
  <</if>>
  <</if>>
  <</if>>
  <</if>>
  <</if>>
<</for>>

<<if $eventSlave.relationship > 0>>
<<for $i to 0; $i < $slaves.length; $i++>>
  <<if $slaves[$i].ID is $eventSlave.relationshipTarget>>
	<<set $RERelationshipSlave to $slaves[$i]>>
  <</if>>
<</for>>
<</if>>

/* STANDARD EVENTS */

<<if ($eventSlave.fetish != "mindbroken")>>
<<if canWalk($eventSlave)>>
<<if canTalk($eventSlave)>>

<<if ($eventSlave.entertainSkill >= 60)>>
<<if ($eventSlave.health > 40)>>
<<if ($eventSlave.devotion > 50)>>
<<if ($eventSlave.trust > 50)>>
	<<set $RESSevent.push("happy dance")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.anus == 0)>>
<<if ($eventSlave.devotion >= -50)>>
<<if ($eventSlave.trust >= -50)>>
<<if ($eventSlave.sexualFlaw is "repressed")>>
	<<set $RETSevent.push("repressed anal virgin")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($assistant > 0)>>
<<if ($assistantAppearance != "normal")>>
<<if ($eventSlave.anus != 0)>>
<<if ($eventSlave.vagina != 0)>>
<<if ($eventSlave.devotion >= -20)>>
<<if canSee($eventSlave)>>
  <<if ($eventSlave.devotion <= 50)>>
	<<if ($eventSlave.assignment is "be a servant")>>
	  <<set $RESSevent.push("PA servant")>>
	<</if>>
  <<elseif ($eventSlave.trust > 75)>>
	<<if ($eventSlave.energy > 60)>>
	  <<set $RESSevent.push("PA flirting")>>
	<</if>>
  <</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.clothes is "a succubus outfit")>>
<<if ($eventSlave.anus != 0)>>
<<if ($eventSlave.vagina != 0)>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.trust > 20)>>
	<<set $RESSevent.push("sexy succubus")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($HeadGirl != 0)>>
  <<if ($eventSlave.devotion <= 50)>>
  <<if ($eventSlave.anus != 0)>>
	<<if ($HGSeverity >= 0)>>
	  <<set $events.push("RE anal punishment")>>
	<</if>>
	<<set $events.push("RE shower punishment")>>
  <</if>>
  <</if>>
  <<if ($eventSlave.ID is $HeadGirl.ID)>>
  <<if ($eventSlave.trust > 50)>>
	<<set $RESSevent.push("trusting HG")>>
  <</if>>
  <</if>>
  <<if ($HeadGirl != 0)>>
  <<if ($eventSlave.ID != $HeadGirl.ID)>>
  <<if ($eventSlave.speechRules != "restrictive")>>
  <<if ($eventSlave.trust > 75)>>
  <<if ($eventSlave.devotion > 50)>>
  <<if ($eventSlave.oralSkill > 30)>>
  <<if ($eventSlave.intelligence >= $HeadGirl.intelligence)>>
  <<if ($eventSlave.oralSkill > $HeadGirl.oralSkill)>>
	<<set $events.push("RE HG replacement")>>
  <</if>>
  <</if>>
  <</if>>
  <</if>>
  <</if>>
  <</if>>
  <</if>>
  <</if>>
<</if>>

<<if ($eventSlave.livingRules is "spare")>>
<<if ($eventSlave.devotion <= 20)>>
	<<if ($eventSlave.devotion > -10)>>
		<<set $RESSevent.push("sleeping ambivalent")>>
	<</if>>
	<<if ($eventSlave.trust < -20)>>
		<<set $RESSevent.push("bad dream")>>
	<</if>>
<</if>>
<</if>>

<<if ($eventSlave.devotion <= 50)>>
<<if ($eventSlave.devotion >= -20)>>
<<if ($week-$eventSlave.weekAcquired < 10)>>
<<if ($eventSlave.anus != 0)>>
<<if ($eventSlave.vagina != 0)>>
	<<set $RESSevent.push("ignorant horny")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($RETasteTestSubIDs.length > 1)>>
<<if ($eventSlave.livingRules is "luxurious")>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.energy > 80)>>
	<<set $RETSevent.push("taste test")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($modRequestsAllowed > 0)>>
<<if ($eventSlave.trust > 50)>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.speechRules is "permissive")>>
<<if ($eventSlave.corsetPiercing == 0)>>
<<if ($eventSlave.tonguePiercing == 0)>>
<<if ($eventSlave.anusPiercing == 0)>>
<<if ($eventSlave.nipplesPiercing == 0)>>
<<if ($eventSlave.dickPiercing == 0)>>
<<if ($eventSlave.vaginaPiercing == 0)>>
<<if ($eventSlave.lipsTat == 0) || ($eventSlave.lipsTat is "none")>>
<<if ($eventSlave.vaginaTat == 0) || ($eventSlave.vaginaTat is "none")>>
	<<set $RESSevent.push("mods please")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.muscles > 5)>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.diet != "slimming")>>
	<<set $RESSevent.push("sore shoulders")>>
<</if>>
<</if>>
<</if>>

<<if $RERelationshipSlave != 0>>
<<if ($eventSlave.relationship > 3)>>
<<if ($RERelationshipSlave.devotion > 20)>>
<<if canWalk($RERelationshipSlave)>>
<<if canTalk($RERelationshipSlave)>>
<<if ($eventSlave.devotion > 50)>>
<<if ($eventSlave.trust > 50)>>
	<<if ($eventSlave.speechRules != "restrictive")>>
		<<set $RETSevent.push("date please")>>
	<</if>>
	<<if ($RERelationshipSlave.anus != 0)>>
	<<if ($RERelationshipSlave.dick != 1)>>
	<<if ($RERelationshipSlave.dick == 0) || (canAchieveErection($RERelationshipSlave))>>
	<<if ($RERelationshipSlave.fetish == "dom") || ($RERelationshipSlave.fetish == "sadist")>>
		<<set $RETSevent.push("top exhaustion")>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if $REAnalCowgirlSubIDs.length > 1>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.releaseRules != "restrictive")>>
<<if ($eventSlave.fetish is "buttslut") || ($eventSlave.fetish is "sadist") || ($eventSlave.fetish is "dom")>>
<<if ($eventSlave.dickAccessory != "chastity") || ($eventSlave.dick == 0)>>
	<<set $RETSevent.push("anal cowgirl")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if $REBoobCollisionSub != 0>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.trust > 20)>>
<<if ($eventSlave.boobs > 3000)>>
<<if ($eventSlave.attrXX > 1) || (($eventSlave.fetish is "boobs") && ($eventSlave.fetishStrength > 95))>>
<<if $eventSlave.ID != $REBoobCollisionSub.ID>>
	<<set $RETSevent.push("boob collision")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($weatherToday.severity <= 1)>>
<<if ($eventSlave.trust > 50)>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.anus != 0)>>
<<if ($eventSlave.vagina != 0)>>
	<<set $RESSevent.push("confident tanning")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.devotion > 50)>>
<<if ($eventSlave.trust > 50)>>
<<if ($eventSlave.anus != 0)>>
<<if ($eventSlave.vagina != 0)>>
  <<set $seed to 0>>
  <<if $HeadGirl == 0>>
	<<set $seed to 1>>
  <<elseif $HeadGirl.ID != $eventSlave.ID>>
	<<set $seed to 1>>
  <</if>>
  <<if $seed == 1>>
	<<set $RESSevent.push("a gift")>>
  <</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.relationship >= 2)>>
<<if ($eventSlave.relationship < 5)>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.trust > -20)>>
	<<set $events.push("RE relationship advice")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if $eventSlave.devotion > 50>>
<<if $eventSlave.anus > 0>>
<<if $eventSlave.vagina != 0>>
  <<if $eventSlave.trust > 20>>
	<<set $RESSevent.push("devoted exhibition")>>
	<<set $RESSevent.push("devoted lotion")>>
  <</if>>
  <<if $eventSlave.energy > 95>>
	<<set $RESSevent.push("devoted nympho")>>
  <</if>>
  <<if $eventSlave.releaseRules is "permissive">>
  <<if ($eventSlave.dickAccessory != "chastity") || ($eventSlave.dick == 0)>>
	<<set $RESSevent.push("permitted masturbation")>>
  <</if>>
  <</if>>
<</if>>
<</if>>
<</if>>

<<if $eventSlave.trust < -50>>
<<if $eventSlave.devotion <= 20>>
	<<set $RESSevent.push("terrified inspection")>>
<</if>>
<</if>>

<<if $eventSlave.dick > 0>>
  <<if $eventSlave.anus > 0>>
  <<if $eventSlave.devotion >= 10>>
	<<if $REFeminizationCheckinIDs.contains($eventSlave.ID)>>
	  <<set $RECIevent.push("feminization")>>
	<</if>>
	<<if $eventSlave.trust >= 10>>
	<<if $eventSlave.balls >= 0>>
	<<if $eventSlave.hormones <= 0>>
	  <<if $REFutaSisterCheckinIDs.contains($eventSlave.ID)>>
		<<set $RECIevent.push("futa")>>
	  <</if>>
	<</if>>
	<</if>>
	<</if>>
  <</if>>
  <</if>>
<</if>>

<<if $eventSlave.analSkill > 30>>
  <<if $eventSlave.devotion >= 10>>
  <<if $REMILFCheckinIDs.contains($eventSlave.ID)>>
	<<set $RECIevent.push("MILF")>>
  <</if>>
  <</if>>
<</if>>

<<if $eventSlave.attrXY > 50>>
  <<if $eventSlave.anus != 0>>
  <<if $eventSlave.vagina != 0>>
  <<if $eventSlave.devotion >= 10>>
  <<if $REOrientationCheckinIDs.contains($eventSlave.ID)>>
	<<set $RECIevent.push("orientation")>>
  <</if>>
  <</if>>
  <</if>>
  <</if>>
<</if>>

<<if $eventSlave.face >= 0>>
  <<if $eventSlave.devotion >= 10>>
  <<if ($eventSlave.assignment is "serve the public") || ($eventSlave.assignment is "whore")>>
  <<if $REUglyCheckinIDs.contains($eventSlave.ID)>>
	<<set $RECIevent.push("ugly")>>
  <</if>>
  <</if>>
  <</if>>
<</if>>

<<if $eventSlave.anus > 1>>
  <<if $eventSlave.anus < 4>>
  <<if $eventSlave.analArea > 1>>
  <<if $eventSlave.devotion > 50>>
  <<if $eventSlave.trust > 50>>
  <<if $REButtholeCheckinIDs.contains($eventSlave.ID)>>
	<<set $RECIevent.push("butthole")>>
  <</if>>
  <</if>>
  <</if>>
  <</if>>
  <</if>>
<</if>>

/*
<<if $eventSlave.drugs is "breast injections">>
  <<if ($eventSlave.anus > 0) || ($eventSlave.vagina > 0)>>
  <<if $eventSlave.devotion <= 50>>
  <<if $eventSlave.devotion >= -20>>
  <<if $eventSlave.trust >= -50>>
	<<if $REReductionCheckinIDs.contains($eventSlave.ID)>>
	  <<set $RECIevent.push("reduction")>>
	<</if>>
  <</if>>
  <</if>>
  <</if>>
  <</if>>
<</if>>
*/

<<if ($eventSlave.assignment is "be a servant")>>
<<if ($eventSlave.devotion <= 95)>>
<<if ($eventSlave.intelligence < -1)>>
	<<set $RESSevent.push("cooler lockin")>>
<</if>>
<</if>>
<</if>>

<<if ($universalRulesConsent == 0)>>
<<if ($eventSlave.devotion > 50)>>
	<<if ($eventSlave.fetish is "sadist") || ($eventSlave.fetish is "dom") || ($eventSlave.energy > 95)>>
	  <<if ($REShowerForceSub != 0)>>
	  <<if ($eventSlave.trust <= 75)>>
		  <<set $RETSevent.push("RE shower force")>>
	  <</if>>
	  <</if>>
	  <<if ($eventSlave.anus > 0)>>
	  <<if ($RESadisticDescriptionSub != 0)>>
		<<set $RETSevent.push("sadistic description")>>
	  <</if>>
	  <</if>>
	  <<if ($cockFeeder > 0)>>
	  <<if ($eventSlave.dickAccessory != "chastity") || ($eventSlave.dick == 0)>>
		  			<<set $RESSevent.push("kitchen molestation")>>
	  <</if>>
	  <</if>>
	<</if>>
	<<if ($REIfYouEnjoyItSub != 0)>>
	  <<set $RETSevent.push("if you enjoy it")>>
	<</if>>
<</if>>
<</if>>

<<if ($eventSlave.devotion < -50)>>
<<if ($eventSlave.trust > -20)>>
<<if ($eventSlave.speechRules is "restrictive")>>
	<<set $RESSevent.push("vocal disobedience")>>
<</if>>
<</if>>
<</if>>

<<if ($boobAccessibility != 1)>>
<<if ($eventSlave.boobs > 3000)>>
<<if ($eventSlave.devotion >= -20)>>
<<if ($slaves.length > 2)>>
	<<set $RESSevent.push("huge tits")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.physicalAge > 30)>>
<<if ($eventSlave.ageImplant > 0)>>
<<if ($eventSlave.devotion > 20)>>
	<<set $RESSevent.push("age implant")>>
<</if>>
<</if>>
<</if>>

<<if ($seeAge != 0)>>
<<if ($eventSlave.devotion > 50)>>
<<if ($eventSlave.speechRules != "restrictive")>>
<<if ($week-$eventSlave.birthWeek >= 51)>>
	<<set $RESSevent.push("birthday")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.clothes is "a penitent nuns habit")>>
<<if ($eventSlave.anus > 0)>>
<<if ($eventSlave.devotion >= -20)>>
<<if ($eventSlave.devotion <= 50)>>
	<<set $RESSevent.push("penitent")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.slaveName != $eventSlave.birthName)>>
<<if ($eventSlave.devotion <= 20)>>
<<if ($eventSlave.trust > -20)>>
<<if ($eventSlave.vagina != 0)>>
<<if ($eventSlave.anus > 0)>>
	<<set $RESSevent.push("not my name")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($slaves.length > 2)>>
<<if ($eventSlave.devotion >= -20)>>
<<if ($eventSlave.heels == 1)>>
<<if ($eventSlave.shoes is "heels") || ($eventSlave.shoes is "boots") || ($eventSlave.shoes is "extreme heels")>>
	<<set $RESSevent.push("tendon fall")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.devotion > 20) || ($eventSlave.trust < -20)>>
<<if ($eventSlave.devotion <= 50)>>
<<if ($eventSlave.vagina < 0)>>
<<if ($eventSlave.anus > 0)>>
<<if ($eventSlave.analSkill <= 30)>>
	<<set $RESSevent.push("obedient shemale")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.devotion > 50)>>
<<if ($eventSlave.trust > 20)>>
<<if ($eventSlave.physicalAge > 37)>>
<<if ($eventSlave.anus > 0)>>
<<if ($eventSlave.vagina > 0)>>
	<<set $RESSevent.push("devoted old")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.fetish is "humiliation") || ($eventSlave.energy > 95)>>
<<if ($eventSlave.devotion <= 50)>>
<<if ($eventSlave.devotion >= -20)>>
<<if ($eventSlave.vagina != 0)>>
<<if ($eventSlave.anus != 0)>>
<<if ($eventSlave.fetishKnown == 1)>>
	<<set $RESSevent.push("fearful humiliation")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.livingRules is "luxurious")>>
<<if ($eventSlave.devotion <= 75)>>
<<if ($eventSlave.devotion > 50)>>
	<<set $RESSevent.push("newly devoted sunrise")>>
<</if>>
<</if>>
<</if>>

<<if ($spa > 0)>>
<<if ($eventSlave.boobs > 2000)>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.trust > 20)>>
	<<set $RESSevent.push("spa boobs")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.lactation > 0)>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.trust > 20)>>
<<if ($eventSlave.vagina != 0)>>
<<if ($eventSlave.anus != 0)>>
	<<set $RESSevent.push("cow milking")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.dietCum > 0)>>
<<if ($eventSlave.devotion < 20)>>
<<if (($eventSlave.fetish != "cumslut") && ($eventSlave.fetish != "masochist")  && ($eventSlave.fetishStrength < 60)) || ($eventSlave.fetishKnown == 0)>>
  <<set $RESSevent.push("retching cum feeding")>>
<</if>>
<</if>>
<</if>>

<<if ($arcologies[0].FSSubjugationist != "unset")>>
<<if ($eventSlave.race != $arcologies[0].FSSubjugationistRace)>>
<<if ($week-$eventSlave.weekAcquired > 1)>>
<<if ($week-$eventSlave.weekAcquired < 10)>>
<<if ($eventSlave.devotion < -20)>>
<<if ($eventSlave.trust > -20)>>
<<if ($eventSlave.health > -20)>>
<<set $toSearch to $eventSlave.race>>
<<if ($toSearch.indexOf("surgically") is -1)>>
<<if ($eventSlave.indentureRestrictions < 1)>>
  <<set $RESSevent.push("subjugation blues")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.accent < 3)>>
<<if ($eventSlave.dietCum > 0)>>
<<if ($eventSlave.diet is "fattening")>>
<<if ($eventSlave.trust > -50)>>
<<if ($eventSlave.fetish != "cumslut")>>
<<if ($eventSlave.weight < -30)>>
<<if ($eventSlave.health > -80)>>
<<if ($eventSlave.behavioralFlaw != "anorexic")>>
<<if ($eventSlave.sexualFlaw != "self hating")>>
<<if ($eventSlave.fetishStrength <= 60) or ($eventSlave.fetishKnown != 1)>>
  <<set $RESSevent.push("too thin for cum diet")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if $eventSlave.drugs == "breast injections">>
<<if $eventSlave.boobs <= 8000>>
<<if $eventSlave.boobs > 2000>>
<<if $eventSlave.devotion <= 50>>
<<if $eventSlave.devotion >= -50>>
<<if $eventSlave.trust >= -50>>
<<if $eventSlave.fetish != "boobs">>
<<if $eventSlave.intelligence > -2>>
	<<set $RESSevent.push("breast expansion blues")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if $eventSlave.physicalAge > 35>>
<<if $eventSlave.speechRules != "restrictive">>
<<if ($eventSlave.assignment == "serve the public") || ($eventSlave.assignment == "whore")>>
<<if $eventSlave.devotion > -20>>
<<if $eventSlave.devotion <= 95>>
	<<set $RESSevent.push("ara ara")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if $eventSlave.anus > 3>>
<<if $eventSlave.devotion > 50>>
<<if $eventSlave.trust > 50>>
	<<set $RESSevent.push("gaped asshole")>>
<</if>>
<</if>>
<</if>>

<<if $eventSlave.health > 90>>
<<if $eventSlave.muscle > 5>>
<<if $eventSlave.weight <= 30>>
<<if $eventSlave.weight >= -30>>
<<if $eventSlave.trust > 50>>
<<if $eventSlave.devotion > 50>>
	<<set $RESSevent.push("passing declaration")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if $eventSlave.trust < -50>>
<<if $eventSlave.devotion < 50>>
	<<set $RESSevent.push("im scared")>>
<</if>>
<</if>>

<</if>> /* closes mute exempt */

<<if $eventSlave.trust > 20>>
<<if $eventSlave.energy > 40>>
	<<set $RESSTRevent.push("comfortable seat")>>
<</if>>
<</if>>

<<if $eventSlave.vaginaLube > 1>>
<<if $eventSlave.devotion > 20>>
<<if $eventSlave.vagina > -1>>
	<<set $RESSevent.push("moist pussy")>>
<</if>>
<</if>>
<</if>>

<<if $eventSlave.devotion <= 20>>
<<if $eventSlave.trust <= -20>>
<<if $eventSlave.dick > 0>>
<<if $eventSlave.attrXY < 50>>
	<<set $RESSevent.push("transition anxiety")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if $seeAge == 1>>

<<if ($eventSlave.devotion >= 20)>>
<<if ($eventSlave.physicalAge == Math.round($eventSlave.pubertyAgeXX))>>
<<if canGetPregnant($eventSlave)>>
<<if ($eventSlave.birthWeek lt 2)>>
	<<set $RESSevent.push("first period")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.devotion >= 20)>>
<<if canAchieveErection($eventSlave)>>
<<if ($eventSlave.physicalAge == Math.round($eventSlave.pubertyAgeXY))>>
<<if ($eventSlave.dickAccessory != "chastity" || $eventSlave.dickAccessory != "combined chastity")>>
<<if ($eventSlave.birthWeek lt 2)>>
	<<set $RESSevent.push("wet dreams")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<</if>> /* closes aging exemption */

<<if $eventSlave.devotion >= -150>>
<<if $eventSlave.devotion <= 50>>
	<<set $events.push("RE standard punishment")>>
<</if>>
<</if>>

<<if $eventSlave.boobs > 600>>
<<if $eventSlave.boobShape is "torpedo-shaped">>
<<if $eventSlave.devotion >= -50>>
	<<set $RESSevent.push("torpedo squeeze")>>
<</if>>
<</if>>
<</if>>

<<if $eventSlave.assignment is "serve the public">>
<<if $eventSlave.fetishKnown is 1>>
<<if $FSDegradationist is "unset">>
<<if $AProsperityCap > 60>>
	<<set $RESSevent.push("mean girls")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.balls > 0)>>
<<if ($eventSlave.hormones > 0)>>
<<if ($hormoneUpgradeMood == 0)>>
<<if ($eventSlave.trust >= -50)>>
<<if ($eventSlave.devotion >= -20)>>
<<if ($eventSlave.devotion <= 50)>>
	<<set $RESSevent.push("orchiectomy please")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.trust > 20)>>
<<if ($eventSlave.devotion > 50)>>
	<<set $RESSevent.push("shower slip")>>
	<<if ($eventSlave.amp < 0)>>
		<<set $RESSevent.push("plimb help")>>
	<</if>>
<</if>>
<</if>>

<<if ($eventSlave.devotion < -50)>>
<<if ($eventSlave.trust > 20)>>
	<<if ($suppository != 0)>>
	<<if ($eventSlave.fetish != "buttslut")>>
		<<set $RESSevent.push("suppository resistance")>>
	<</if>>
	<</if>>
	<<if ($cockFeeder != 0)>>
	<<if ($eventSlave.fetish != "cumslut")>>
		<<set $RESSevent.push("cockfeeder resistance")>>
	<</if>>
	<</if>>
<</if>>
<</if>>

<<if ($eventSlave.relationship <= -2)>>
<<if ($eventSlave.trust > 50)>>
<<if ($eventSlave.devotion > 50)>>
	<<set $RESSevent.push("bonded love")>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.trust > -10)>>
<<if ($eventSlave.ID != $HeadGirl.ID)>>
<<if ($eventSlave.ID != $Concubine.ID)>>
	<<set $RESSevent.push("refreshment delivery")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.dick > 8)>>
<<if ($eventSlave.balls > 0)>>
<<if ($eventSlave.energy > 60)>>
<<if ($eventSlave.devotion > 50)>>
<<if ($eventSlave.trust > 50)>>
<<if ($eventSlave.vagina != 0)>>
<<if ($eventSlave.anus != 0)>>
	<<set $RESSevent.push("dick wringing")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.balls > 0)>>
<<if ($eventSlave.dickAccessory is "chastity")>>
<<if ($eventSlave.devotion <= 95)>>
<<if ($eventSlave.energy > 50)>>
<<if ($eventSlave.energy < 95)>>
<<if ($eventSlave.devotion >= -20) || ($eventSlave.trust < -20)>>
	<<set $RESSevent.push("cage relief")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($PC.dick > 0)>>
<<if ($PC.boobs > 0)>>
<<if ($eventSlave.devotion <= 50)>>
<<if ($eventSlave.devotion >= -20)>>
<<if ($eventSlave.anus != 0)>>
<<if (($eventSlave.attrXY <= 0) && ($eventSlave.attrXX > 0)) || (($eventSlave.attrXX <= 0) && ($eventSlave.attrXY > 0))>>
	<<set $RESSevent.push("dickgirl PC")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if canTalk($eventSlave)>>
<<if ($eventSlave.devotion <= 50)>>
<<if ($eventSlave.trust > -10)>>
<<if ($eventSlave.devotion >= -20) || ($eventSlave.trust < -20)>>
	<<set $RESSevent.push("language lesson")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.energy > 40)>>
<<if canSee($eventSlave)>>
<<if ($eventSlave.trust >= -50)>>
<<if ($eventSlave.devotion > 0)>>
<<if ($eventSlave.devotion <= 50)>>
<<if (($eventSlave.attrXX > 0) && ($PC.boobs == 1)) || (($eventSlave.attrXY > 0) && ($PC.dick == 1))>>
	<<set $RESSevent.push("hot PC")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.trust <= 20)>>
<<if ($eventSlave.trust >= -75)>>
<<if ($eventSlave.devotion <= 30)>>
<<if ($eventSlave.devotion >= -20)>>
	<<set $RESSevent.push("like me")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.boobs > 1400)>>
<<if ($eventSlave.boobsImplant == 0)>>
<<if ($eventSlave.nipples != "tiny")>>
<<if ($eventSlave.devotion > 20)>>
	<<set $RESSevent.push("huge naturals")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.devotion < -20)>>
<<if ($eventSlave.trust >= -20)>>
<<if ($eventSlave.clothes is "uncomfortable straps")>>
	<<set $RESSevent.push("bondage gear")>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.labia > 1)>>
<<if ($eventSlave.muscles > 30)>>
<<if ($eventSlave.vagina > -1)>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.trust > 20)>>
	<<set $RESSevent.push("inconvenient labia")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.devotion > 20) || ($eventSlave.trust < -20)>>
<<if ($eventSlave.addict > 20)>>
<<if ($eventSlave.aphrodisiacs > 0)>>
	<<set $RESSevent.push("obedient addict")>>
<</if>>
<</if>>
<</if>>

<<if ($seeExtreme == 1)>>
<<if ($eventSlave.devotion < -50)>>
<<if ($eventSlave.trust >= -50)>>
<<if ($eventSlave.assignment != "stay confined")>>
<<if ($eventSlave.heels != 1)>>
	<<set $RESSevent.push("escapee")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.devotion <= 50)>>
<<if ($eventSlave.trust >= -50)>>
<<if ($eventSlave.behavioralFlaw is "gluttonous")>>
<<if ($eventSlave.diet is "restricted")>>
	<<set $RESSevent.push("diet")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.devotion <= 20)>>
<<if ($eventSlave.devotion >= -50)>>
	<<set $RESSevent.push("resistant shower")>>
<</if>>
<</if>>

<<if ($eventSlave.speechRules != "restrictive")>>
<<if ($eventSlave.devotion >= -20)>>
<<if ($eventSlave.trust >= -20)>>
<<if ($eventSlave.energy > 75)>>
<<if ($eventSlave.fetish != "buttslut")>>
<<if ($eventSlave.vagina != 0) || ($eventSlave.anus != 0)>>
	<<set $RESSevent.push("night visit")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.releaseRules is "restrictive")>>
  <<SexualRelease $eventSlave>>
<<if ($release != 1)>>
  <<if ($eventSlave.devotion <= 95)>>
  <<if ($eventSlave.trust >= -20)>>
  <<if ($eventSlave.dickAccessory != "chastity") || ($eventSlave.dick == 0)>>
	<<set $RESSevent.push("forbidden masturbation")>>
  <</if>>
  <</if>>
  <</if>>
  <<if ($eventSlave.devotion >= -20)>>
  <<if ($eventSlave.trust >= -50)>>
	<<set $RESSevent.push("desperately horny")>>
  <</if>>
  <</if>>
<</if>>
<</if>>

<<if ($eventSlave.releaseRules != "restrictive") >>
<<if ($eventSlave.dick != 0) >>
<<if ($eventSlave.hormones < 1)>>
<<if ($eventSlave.balls > 0)>>
<<if ($eventSlave.dickAccessory != "chastity")>>
<<if ($eventSlave.vaginalAccessory != "chastity belt") >>
	<<set $RESSevent.push("slave dick on slave")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.muscles > 30)>>
<<if ($eventSlave.anus != 0)>>
<<if ($eventSlave.vagina != 0)>>
	<<set $RESSevent.push("muscles")>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.devotion >= -20)>>
<<if ($eventSlave.lactation > 1)>>
<<if ($eventSlave.vaginalAccessory != "chastity belt")>>
	<<set $RESSevent.push("milkgasm")>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.waist > 1)>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.trust > -20)>>
<<if ($eventSlave.anus > 0)>>
	<<set $RESSevent.push("devoted waist")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.entertainSkill >= 100)>>
<<if ($eventSlave.trust > 50)>>
<<if ($eventSlave.assignment is "serve the public")>>
	<<set $RESSevent.push("masterful entertainer")>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.whoreSkill >= 100)>>
<<if ($eventSlave.trust > 50)>>
<<if ($eventSlave.assignment is "whore")>>
	<<set $RESSevent.push("masterful whore")>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.dick > 0)>>
<<if ($eventSlave.balls == 0)>>
<<if ($eventSlave.ovaries == 0)>>
<<if ($eventSlave.devotion <= 50)>>
<<if ($eventSlave.trust < -50)>>
<<if ($eventSlave.anus > 0)>>
	<<set $RESSevent.push("resistant gelding")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if isFertile($eventSlave)>>
<<if ($eventSlave.devotion > 50)>>
<<if ($PC.dick != 0)>>
<<if ($eventSlave.fetish is "pregnancy") || ($eventSlave.energy > 95)>>
<<if $eventSlave.eggType == "human">>
<<if ($eventSlave.fetishKnown == 1)>>
<<if ($eventSlave.vagina > 0)>>
<<if ($eventSlave.anus > 0)>>
	<<set $RESSevent.push("impregnation please")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.buttplug is "large plug") || ($eventSlave.buttplug is "long, large plug")>>
<<if ($eventSlave.assignment != "stay confined")>>
<<if ($eventSlave.devotion <= 20)>>
<<if ($eventSlave.trust >= -50)>>
<<if ($eventSlave.anus < 3)>>
	<<set $RESSevent.push("plug disobedience")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if (($eventSlave.assignment is "whore") || ($eventSlave.assignment is "serve the public"))>>
<<if ($eventSlave.devotion <= 50)>>
	<<set $RESSevent.push("used whore")>>
<</if>>
<</if>>

<</if>> /* closes amp/crawling exempt */

<<if canTalk($eventSlave)>>

<<if ($eventSlave.speechRules != "restrictive")>>
<<if ($eventSlave.boobsImplant > 400)>>
<<if (($eventSlave.lipsImplant + $eventSlave.buttImplant) > 3)>>
<<if ($eventSlave. boobs < 90) || ($eventSlave. butt < 8)>>
<<if ($eventSlave.relation == 0)>>
	<<set $RESSevent.push("surgery addict")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.assignment is "please you")>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.trust > -20)>>
<<if ($eventSlave.anus > 0)>>
	<<if ($eventSlave.vagina != 0)>>
	<<if ($eventSlave.dickAccessory != "chastity") || ($eventSlave.dick == 0)>>
	  <<if ($corpIncorporated != 0)>>
		<<set $RESSevent.push("shift sleep")>>
	  <</if>>
	  <<if ($eventSlave.releaseRules is "permissive")>>
		<<set $RESSevent.push("shift masturbation")>>
	  <</if>>
	  <<if ($eventSlave.entertainSkill >= 60)>>
		<<set $RESSevent.push("shift doorframe")>>
	  <</if>>
	<</if>>
	<</if>>
	<<if ($PC.vagina == 1)>>
	<<if ($eventSlave.dick == 0)>>
	<<if ($fuckSlaves > 2)>>
		<<set $RESSevent.push("fucktoy tribbing")>>
	<</if>>
	<</if>>
	<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.speechRules != "restrictive") >>
<<if ($eventSlave.oralCount+$eventSlave.vaginalCount+$eventSlave.analCount > 900)>>
<<if ($eventSlave.oralCount+$eventSlave.vaginalCount+$eventSlave.analCount < 1100)>>
<<if ($eventSlave.vagina != 0)>>
<<if ($eventSlave.anus > 0)>>
	<<set $RESSevent.push("millenary")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.assignment is "stay confined")>>
<<if ($eventSlave.devotion <= 50)>>
	<<set $RESSevent.push("solitary desperation")>>
<</if>>
<</if>>

<<if ($eventSlave.speechRules is "restrictive")>>
<<if ($eventSlave.devotion > 60)>>
<<if ($eventSlave.trust >= -20)>>
	<<set $RESSevent.push("restricted profession")>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.speechRules is "restrictive")>>
<<if ($eventSlave.intelligence > 0)>>
<<if ($eventSlave.trust >= -20)>>
<<if ($eventSlave.devotion <= 20)>>
	<<set $RESSevent.push("restricted smart")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($expansionRequestsAllowed > 0)>>
<<if ($eventSlave.drugs is "no drugs")>>
<<if ($eventSlave.speechRules is "permissive")>>
<<if ($eventSlave.health > 20)>>
<<if ($eventSlave.devotion >= -20)>>
<<if ($eventSlave.trust > 20)>>
<<if ($arcologies[0].FSSlimnessEnthusiast is "unset")>>
	<<set $RESSevent.push("injections please")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.assignment is "serve the public")>>
<<if ($eventSlave.devotion > 50)>>
	<<set $RESSevent.push("serve the public devoted")>>
<</if>>
<</if>>

<<if ($eventSlave.behavioralFlaw is "bitchy")>>
<<if canSee($eventSlave)>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.trust >= -20)>>
	<<set $RESSevent.push("obedient bitchy")>>
<</if>>
<</if>>
<</if>>
<</if>>

<</if>> /* closes mute exempt */

<<if ($cockFeeder == 0)>>
<<if ($eventSlave.intelligence < -1)>>
<<if ($eventSlave.devotion <= 50)>>
<<if ($eventSlave.devotion >= -20) || ($eventSlave.trust < -20)>>
	<<set $RESSevent.push("obedient idiot")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.boobs > 15000)>>
	<<set $RESSevent.push("tittymonster inspection")>>
<</if>>

<<if ($assistant > 1)>>
<<if ($eventSlave.fetishKnown == 1)>>
<<if ($eventSlave.energy > 95)>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.releaseRules is "permissive")>>
	<<set $RESSevent.push("nympho with assistant")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.devotion > 50)>>
<<if ($eventSlave.trust > 50)>>
<<if ($eventSlave.assignment is "please you") || ($eventSlave.assignment is "serve in the master suite") || ($eventSlave.assignment is "be your Concubine")>>
	<<set $RESSevent.push("bed snuggle")>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.minorInjury is "sore ass")>>
<<if ($eventSlave.devotion <= 50)>>
	<<set $RESSevent.push("sore ass")>>
<</if>>
<</if>>

<<if ($eventSlave.sexualFlaw is "hates oral")>>
<<if ($PC.dick != 0)>>
<<if ($eventSlave.devotion <= 50)>>
	<<set $RESSevent.push("hates oral")>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.anus == 0)>>
<<if ($eventSlave.devotion > 50)>>
<<if ($eventSlave.trust > 20)>>
<<if ($eventSlave.speechRules != "restrictive")>>
	<<set $RESSevent.push("devoted anal virgin")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($seeExtreme == 1)>>
<<if ($eventSlave.balls > 1)>>
<<if ($eventSlave.devotion <= 20)>>
<<if ($eventSlave.trust <= 20)>>
<<if ($eventSlave.speechRules != "restrictive")>>
	<<set $RESSevent.push("fearful balls")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.devotion <= 50)>>
<<if ($eventSlave.assignment is "be a servant")>>
	<<set $RESSevent.push("scrubbing")>>
<</if>>
<</if>>

<<if ($eventSlave.speechRules != "restrictive")>>
<<if ($eventSlave.vaginalAccessory != "chastity belt")>>
<<if ($eventSlave.fetish != "buttslut")>>
<<if ($eventSlave.vagina == 0)>>
<<if ($eventSlave.anus != 0)>>
<<if ($eventSlave.oralCount+$eventSlave.vaginalCount+$eventSlave.analCount > 100)>>
	<<set $RESSevent.push("unhappy virgin")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.aphrodisiacs > 1)>>
<<if ($eventSlave.speechRules is "restrictive")>>
	<<set $RESSevent.push("extreme aphrodisiacs")>>
<</if>>
<</if>>

<<if ($eventSlave.releaseRules != "restrictive") >>
<<if ($eventSlave.clit > 2)>>
<<if ($eventSlave.vaginalAccessory != "chastity belt")>>
	<<set $RESSevent.push("slave clit on slave")>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.releaseRules != "restrictive") >>
<<if ($eventSlave.dick > 4) >>
<<if ($eventSlave.hormones < 1)>>
<<if ($eventSlave.balls != 0)>>
<<if ($eventSlave.dickAccessory != "chastity")>>
	<<set $RESSevent.push("slave dick huge")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.heels == 1) >>
<<if ($eventSlave.shoes is "heels") || ($eventSlave.shoes is "extreme heels")>>
<<if ($eventSlave.anus != 0)>>
	<<set $RESSevent.push("heels")>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.releaseRules != "restrictive") >>
<<if ($eventSlave.anus > 2)>>
<<if ($eventSlave.fetish is "buttslut") || ($eventSlave.energy > 95)>>
<<if ($eventSlave.fetish != "none")>>
<<if canDoAnal($eventSlave)>>
	<<set $RESSevent.push("loose buttslut")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.assignment is "whore")>>
<<if ($eventSlave.devotion < -20) && ($eventSlave.trust > -20)>>
	<<set $RESSevent.push("whore rebellious")>>
<</if>>
<</if>>

<<if ($eventSlave.amp == 1)>>
	<<if ($eventSlave.devotion > 20)>>
	<<if ($eventSlave.anus > 0)>>
		<<set $RESSevent.push("devoted amp")>>
	<</if>>
	<</if>>
	<<if ($eventSlave.assignment is "rest")>>
		<<set $RESSevent.push("resting amp")>>
	<</if>>
<</if>>

<<if ($eventSlave.boobs < 500)>>
<<if ($eventSlave.butt < 3)>>
<<if ($eventSlave.devotion <= 50)>>
<<if ($eventSlave.devotion > 20) || ($eventSlave.trust < -20)>>
<<if ($eventSlave.anus > 0)>>
<<if ($eventSlave.weight <= 10)>>
<<if ($eventSlave.muscles <= 30)>>
	<<set $RESSevent.push("obedient girlish")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.boobs > 1200)>>
<<if ($eventSlave.areolae > 3)>>
<<if ($eventSlave.devotion > 50)>>
<<if ($eventSlave.anus > 0)>>
	<<set $RESSevent.push("shaped areolae")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.behavioralFlaw is "arrogant")>>
<<if ($eventSlave.devotion < -50)>>
<<if ($eventSlave.trust >= -50)>>
	<<set $RESSevent.push("rebellious arrogant")>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.preg > 20)>>
	<<set $RESSevent.push("hugely pregnant")>>
<</if>>

<<if ($eventSlave.hormones > 0)>>
<<if ($eventSlave.vagina is -1)>>
<<if ($eventSlave.devotion > 20) || ($eventSlave.trust < -20)>>
<<if ($eventSlave.devotion <= 50)>>
<<if ($eventSlave.fetish != "buttslut")>>
<<if ($eventSlave.speechRules is "permissive")>>
	<<set $RESSevent.push("hormone dysfunction")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.vaginaPiercing > 1)>>
<<if ($eventSlave.nipplesPiercing > 1)>>
<<if ($eventSlave.clitPiercing > 1)>>
<<if ($eventSlave.devotion > 20) || ($eventSlave.trust < -20)>>
<<if ($eventSlave.devotion <= 50)>>
	<<set $RESSevent.push("heavy piercing")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.fetishKnown == 1)>>
<<if ($eventSlave.fetish is "cumslut") || ($eventSlave.energy > 95)>>
<<if (($eventSlave.assignment is "whore") || ($eventSlave.assignment is "serve the public"))>>
<<if ($eventSlave.devotion > 20)>>
<<if ($PC.dick != 0)>>
	<<set $RESSevent.push("cumslut whore")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.anus == 0)>>
<<if ($eventSlave.devotion < -20)>>
<<if ($eventSlave.trust >= -20)>>
	<<set $RESSevent.push("resistant anal virgin")>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.relationship > 3)>>
<<if ($eventSlave.relationship < 5)>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.trust > 20)>>
	<<set $events.push("RE slave marriage")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.prestige == 0)>>

<<if ($eventSlave.devotion > 50)>>
<<if ($eventSlave.trust > 50)>>

<<if ($eventSlave.entertainSkill >= 100)>>
<<if ($eventSlave.assignment is "serve the public")>>
	<<set $events.push("RE legendary entertainer")>>
<</if>>
<</if>>

<<if ($eventSlave.whoreSkill >= 100)>>
<<if ($eventSlave.assignment is "whore")>>
	<<set $events.push("RE legendary whore")>>
<</if>>
<</if>>

<<if ($eventSlave.lactation > 0)>>
<<if (($eventSlave.boobs-$eventSlave.boobsImplant) > 6000)>>
<<if ($eventSlave.assignment is "get milked")>>
<<if ($eventSlave.prestige == 0)>>
	<<set $events.push("RE legendary cow")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.preg > 30)>>
<<if ($eventSlave.pregType < 50)>>
<<if ($eventSlave.births > 10)>>
<<if ($eventSlave.assignment is "whore") || ($eventSlave.assignment is "serve the public")>>
<<if ($eventslave.amp != 1)>>
<<if ($eventSlave.prestige == 0)>>
	<<set $events.push("RE legendary womb")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.balls > 4)>>
<<if ($eventSlave.dick > 4)>>
<<if ($eventSlave.assignment is "work in the dairy") || ($eventSlave.assignment is "get milked")>>
<<if ($eventSlave.prestige == 0>>
	<<set $events.push("RE legendary balls")>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if ($eventSlave.origin is "You sentenced her to enslavement as a punishment for attempted theft of a slave.") || ($eventSlave.origin is "She is an enslaved Daughter of Liberty.")>>
<<if ($eventSlave.devotion > 95) && ($eventSlave.prestige == 0) && ($eventSlave.assignment is "please you")>>
	<<set $events.push("RE former abolitionist")>>
<</if>>
<</if>>

<</if>>
<</if>>

<</if>>

/* NICKNAME EVENTS */

<<if $nicknamesAllowed == 1>>
<<set $toSearch to $eventSlave.slaveName.toLowerCase();>>
<<if ($toSearch.indexOf("'") is -1)>>
  <<if ($week-$eventSlave.weekAcquired >= 4)>>
	<<set $events.push("RE nickname")>>
	<<set $seed to 0>>
  <</if>>
<</if>> /* closes nickname check */
<</if>> /* closes no nicknames option */

<</if>> /* closes mindbreak exempt */

<<if ($eventSlave.fetish is "mindbroken")>>
<<if canWalk($eventSlave)>>
	<<set $RESSevent.push("mindbroken morning")>>
<</if>>
<</if>>

/* EVENT STRIPPING */

<<if $normalizedEvents == 1>>
  <<for $i to 0; $i < $events.length; $i++>>
	<<if $events.count($events[$i]) > 1>>
	  <<set $dumped to $events.pluck([$i],[$i])>>
	<</if>>
  <</for>>
<</if>>

/* EVENT RANDOMIZATION */

<<for $i to 0; $i < $RESSevent.length; $i++>>
  <<set $events.push("RESS")>>
<</for>>
<<for $i to 0; $i < $RESSTRevent.length; $i++>>
  <<set $events.push("RESSTR")>>
<</for>>
<<for $i to 0; $i < $RETSevent.length; $i++>>
  <<set $events.push("RETS")>>
<</for>>
<<for $i to 0; $i < $RECIevent.length; $i++>>
  <<set $events.push("RECI")>>
<</for>>
<<if $events.length == 0>>
	<<set $events.push("RE no event")>>
<</if>>
<<if $cheatMode == 1>>
  <<goto "random event select">>
<<else>>
  <<goto "random event roll">>
<</if>>

<</silently>>
<</if>> /* CLOSES SLAVE SELECT */


code:
:: Random Nonindividual Event

<<silently>>

<<set $showEncyclopedia to 0>>

<<set $events = []>>
<<set $RecETSevent = []>>
<<set $REFIevent = []>>
<<set $PESSevent = []>>
<<set $PETSevent = []>>
<<set $activeSlave = 0>>
<<set $groomSlave = 0>>
<<set $brideSlave = 0>>

<<set $seed to 0>>
<<set $eventSlave to $slaves.random()>>

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

<<if $nicknamesAllowed == 1>>
<<if $eventSlave.assignment != "be confined in the arcade">>
<<set $toSearch to $eventSlave.slaveName.toLowerCase();>>
<<if ($toSearch.indexOf("'") is -1)>>
	<<if ($week-$eventSlave.weekAcquired >= 4)>>
	<<if ($eventSlave.devotion >= -20)>>
	<<set $events.push("RE nickname")>>
	<<set $events.push("RE nickname")>>
	<<set $events.push("RE nickname")>>
	<<set $events.push("RE nickname")>>
	<<set $seed to 1>>
	<<else>>
	<<set $events.push("RE nickname")>>
	<<set $events.push("RE nickname")>>
	<<set $seed to 1>>
	<</if>>
	<</if>>
<</if>> /* closes nickname check */
<</if>>
<</if>> /* closes no nicknames option */

<<if ($eventSlave.assignment is "serve in the master suite")>>
<<if ($eventSlave.devotion > 20)>>
<<if ($eventSlave.trust > -20)>>
<<if ($activeSlave.anus > 0)>>
<<if ($activeSlave.vagina != 0)>>
	<<if ($corpIncorporated != 0)>>
		<<set $events.push("RE shift sleep")>>
	<</if>>
	<<if ($activeSlave.releaseRules != "restrictive")>>
		<<set $events.push("RE shift masturbation")>>
	<</if>>
	<<if ($activeSlave.entertainSkill >= 60)>>
		<<set $events.push("RE shift doorframe")>>
	<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

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

<<set $legendaryFacility to 1>>
<<if $legendaryWhoreID != 0>>
	<<set $events.push("RE legendary whore")>>
<</if>>
<<if $legendaryEntertainerID != 0>>
	<<set $events.push("RE legendary entertainer")>>
<</if>>
<<if $legendaryCowID != 0>>
	<<set $events.push("RE legendary cow")>>
<</if>>
<<if $legendaryBallsID != 0>>
	<<set $events.push("RE legendary balls")>>
<</if>>
<<if $legendaryWombID != 0>>
	<<set $events.push("RE legendary womb")>>
<</if>>
<<if $legendaryAbolitionistID != 0>>
<<set $events.push("RE former abolitionist")>>
<</if>>

<<if $shelterAbuse <= 5>>
<<if $shelterGirlsIDs.length > 0>>
<<set $events.push("RE shelter inspection")>>
<</if>>
<</if>>

/* Relationship Events */

<<if $familyTesting == 1>>

<<set $used to 0>>
<<for $i to 0; $i < $slaves.length; $i++>>
<<if ($used == 0)>>
<<if ($slaves[$i].daughters > 0)>>
<<if ($slaves[$i].devotion > 50)>>
	<<set $mother to $slaves[$i]>>
	<<set $daughter to RandomDaughter($slaves[$i])>>
	<<if ($daughter.devotion > 50)>>
	<<if canWalk($daughter)>>
		<<if canWalk($mother)>>
		<<if ($daughter.anus != 0)>>
			<<if ($mother.anus != 0)>>
			<<set $events.push("RE devoted mother daughter")>>
			<<set $used to 1>>
			<</if>>
		<</if>>
		<</if>>
	<</if>>
	<</if>>
<</if>>
<</if>>
<</if>>
<</for>>

<<set $used to 0>>
<<for $i to 0; $i < $slaves.length; $i++>>
<<if ($used == 0)>>
<<if ($slaves[$i].sisters > 0)>>
<<if ($slaves[$i].dick == 1)>>
	<<set $youngerSister to $slaves[$i]>>
	<<set $olderSister to randomSister($slaves[$i])>>
<<if ($olderSister.anus == 0)>>
<<if ($youngerSister.devotion > ($olderSister.devotion+20))>>
<<set $events.push("RE sibling revenge")>>
<<set $used to 1>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</for>>

<<set $used to 0>>
<<for $i to 0; $i < $slaves.length; $i++>>
<<if ($used == 0)>>
<<if ($slaves[$i].sisters > 0)>>
	<<set $alphaTwin to $slaves[$i]>>
	<<set $betaTwin to randomTwinSister($slaves[$i])>>
<<if ($alphaTwin.anus > 0)>>
<<if ($betaTwin.anus > 0)>>
<<if ($alphaTwin.devotion > 50)>>
<<if ($betaTwin.devotion > 50)>>
<<if canWalk($alphaTwin)>>
<<if canWalk($betaTwin)>>
<<set $events.push("RE devoted twins")>>
<<set $used to 1>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</for>>

<<else>>

<<set $used to 0>>
<<for $i to 0; $i < $slaves.length; $i++>>
<<if ($used == 0)>>
<<if ($slaves[$i].relation is "mother")>>
<<if ($slaves[$i].relationshipTarget != $slaves[$i].relationTarget)>>
<<if ($slaves[$i].devotion > 50)>>
	<<set $mother to $slaves[$i]>>
	<<for $j to 0; $j < $slaves.length; $j++>>
	<<if $slaves[$j].ID is $mother.relationTarget>>
		<<set $daughter to $slaves[$j]>>
		<<break>>
	<</if>>
	<</for>>
	<<if ($daughter.devotion > 50)>>
	<<if canWalk($daughter)>>
		<<if canWalk($mother)>>
		<<if ($daughter.anus != 0)>>
			<<if ($mother.anus != 0)>>
			<<set $events.push("RE devoted mother daughter")>>
			<<set $used to 1>>
			<</if>>
		<</if>>
		<</if>>
	<</if>>
	<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</for>>

<<set $used to 0>>
<<for $i to 0; $i < $slaves.length; $i++>>
<<if ($used == 0)>>
<<if ($slaves[$i].relation is "sister")>>
<<if ($slaves[$i].dick == 1)>>
	<<set $youngerSister to $slaves[$i]>>
	<<for $j to 0; $j < $slaves.length; $j++>>
		<<if $slaves[$j].ID is $slaves[$i].relationTarget>>
			<<set $olderSister to $slaves[$j]>>
			<<break>>
		<</if>>
	<</for>>
<<if ($olderSister.anus == 0)>>
<<if ($youngerSister.devotion > ($olderSister.devotion+20))>>
<<set $events.push("RE sibling revenge")>>
<<set $used to 1>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</for>>

<<set $used to 0>>
<<for $i to 0; $i < $slaves.length; $i++>>
<<if ($used == 0)>>
<<if ($slaves[$i].relation is "twin")>>
	<<set $alphaTwin to $slaves[$i]>>
	<<for $j to 0; $j < $slaves.length; $j++>>
		<<if $slaves[$j].ID is $slaves[$i].relationTarget>>
			<<set $betaTwin to $slaves[$j]>>
			<<break>>
		<</if>>
	<</for>>
<<if ($alphaTwin.anus > 0)>>
<<if ($betaTwin.anus > 0)>>
<<if ($alphaTwin.devotion > 50)>>
<<if ($betaTwin.devotion > 50)>>
<<if canWalk($alphaTwin)>>
<<if canWalk($betaTwin)>>
<<set $events.push("RE devoted twins")>>
<<set $used to 1>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</for>>

/*<<include "Twin Check">>

<<if ($alphaTwin.anus > 0) && ($betaTwin.anus > 0) && ($alphaTwin.devotion > 50) && ($betaTwin.devotion > 50)>>
	<<set $events.push("RE devoted twins")>>
<</if>>*/

<</if>>  /* closes extended family mode */

/* Fetish Interest Events */

<<set $buttslutID to 0>>
<<set $cumslutID to 0>>
<<set $humiliationID to 0>>
<<set $subID to 0>>
<<set $pregnancyID to 0>>
<<set $masochistID to 0>>
<<set $boobsID to 0>>
<<for $i to 0; $i < $slaves.length; $i++>>
<<if ($slaves[$i].fetishKnown == 1)>>
<<if ($slaves[$i].fetishStrength > 95)>>
<<if ($slaves[$i].fetish is "buttslut")>>
	<<if ($slaves[$i].anus > 0)>>
	<<if ($buttslutID == 0)>>
		<<set $buttslutID to $slaves[$i].ID>>
	<</if>>
	<</if>>
<<elseif ($slaves[$i].fetish is "cumslut")>>
	<<if ($cumslutID == 0)>>
		<<set $cumslutID to $slaves[$i].ID>>
	<</if>>
<<elseif ($slaves[$i].fetish is "submissive")>>
	<<if ($slaves[$i].anus > 0)>>
	<<if ($subID == 0)>>
		<<set $subID to $slaves[$i].ID>>
	<</if>>
	<</if>>
<<elseif ($slaves[$i].fetish is "humiliation")>>
	<<if ($slaves[$i].anus > 0)>>
	<<if ($humiliationID == 0)>>
		<<set $humiliationID to $slaves[$i].ID>>
	<</if>>
	<</if>>
<<elseif ($slaves[$i].fetish is "boobs")>>
	<<if ($slaves[$i].lactation > 0)>>
	<<if ($boobsID == 0)>>
		<<set $boobsID to $slaves[$i].ID>>
	<</if>>
	<</if>>
<<elseif ($slaves[$i].fetish is "pregnancy")>>
	<<if ($slaves[$i].preg > 15)>>
	<<if ($pregnancyID == 0)>>
		<<set $pregnancyID to $slaves[$i].ID>>
	<</if>>
	<</if>>
<<elseif ($slaves[$i].fetish is "masochist")>>
	<<if ($slaves[$i].anus != 0)>>
	<<if ($masochistID == 0)>>
		<<set $masochistID to $slaves[$i].ID>>
	<</if>>
	<</if>>
<</if>>
<</if>>
<</if>>
<</for>>

<<for $i to 0; $i < $slaves.length; $i++>>
<<if ($slaves[$i].speechRules != "restrictive")>>
<<if ($slaves[$i].assignment != "work in the dairy") || ($dairyRestraintsSetting < 2)>>
<<if ($slaves[$i].fetish is "none") || ($slaves[$i].fetishStrength <= 60)>>
	<<if ($buttslutID != 0)>>
	<<if ($slaves[$i].anus != 0)>>
		<<set $REFIevent.push("buttslut")>>
		<<set $buttslutInterestTargetID to $slaves[$i].ID>>
	<</if>>
	<</if>>
	<<if ($cumslutID != 0)>>
		<<set $REFIevent.push("cumslut")>>
		<<set $cumslutInterestTargetID to $slaves[$i].ID>>
	<</if>>
	<<if ($subID != 0)>>
		<<set $REFIevent.push("submissive")>>
		<<set $submissiveInterestTargetID to $slaves[$i].ID>>
	<</if>>
	<<if ($humiliationID != 0)>>
		<<set $REFIevent.push("humiliation")>>
		<<set $humiliationInterestTargetID to $slaves[$i].ID>>
	<</if>>
	<<if ($boobsID != 0)>>
		<<set $REFIevent.push("boobs")>>
		<<set $boobsInterestTargetID to $slaves[$i].ID>>
	<</if>>
	<<if ($pregnancyID != 0)>>
	<<if ($slaves[$i].anus != 0)>>
		<<set $REFIevent.push("pregnancy")>>
		<<set $pregnancyInterestTargetID to $slaves[$i].ID>>
	<</if>>
	<</if>>
	<<if ($masochistID != 0)>>
	<<if ($slaves[$i].anus != 0)>>
		<<set $REFIevent.push("masochist")>>
		<<set $masochistInterestTargetID to $slaves[$i].ID>>
	<</if>>
	<</if>>
<</if>>
<</if>>
<</if>>
<</for>>

/* Multislave Events */

<<if def $slaves[3]>>
<<if ($slaves[3].devotion > 50)>>
<<if canWalk($slaves[3])>>
<<if canWalk($slaves[2])>>
<<if canWalk($slaves[1])>>
<<if canWalk($slaves[0])>>
	<<set $events.push("RE devotees")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if $fuckSlaves > 1>>
	<<set $events.push("RE full bed")>>
<</if>>
<<if $fuckSlaves > 3>>
	<<set $events.push("RE staffed morning")>>
<</if>>

<<if $slaves.length > 2>>
<<if ($slaves[$slaves.length-2].devotion < -20)>>
<<if canWalk($slaves[$slaves.length-2])>>
<<if ($slaves[$slaves.length-2].assignment != "be confined in the arcade")>>
<<if ($slaves[$slaves.length-2].assignment != "work in the dairy") || ($dairyRestraintsSetting < 2)>>
<<if canWalk($slaves[$slaves.length-1])>>
<<if ($slaves[$slaves.length-1].assignment != "be confined in the arcade")>>
<<if ($slaves[$slaves.length-1].assignment != "work in the dairy") || ($dairyRestraintsSetting < 2)>>
	<<set $events.push("RE rebels")>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if $brothelSlaves > 3>>
	<<set $events.push("RE busy brothel")>>
<</if>>
<<if $clubSlaves > 3>>
	<<set $events.push("RE busy club")>>
<</if>>
<<if $dairySlaves > 3>>
<<if $dairyRestraintsSetting < 2>>
	<<set $events.push("RE busy dairy")>>
<</if>>
<</if>>
<<if $servantsQuartersSlaves > 3>>
	<<set $events.push("RE busy servants quarters")>>
<</if>>
<<if $arcadeSlaves > 3>>
	<<set $events.push("RE busy arcade")>>
<</if>>
<<if $masterSuiteSlaves > 3>>
	<<if $Concubine != 0>>
	<<set $events.push("RE busy master suite")>>
	<</if>>
<</if>>

/* Position Events */

<<if ($HeadGirl != 0)>>

	<<if ($Concubine != 0)>>
	<<if $fuckSlaves > 1>>
	<<if canTalk($Concubine)>>
		<<set $events.push("PE headgirl concubine")>>
	<</if>>
	<</if>>
	<</if>>

	<<if ($HeadGirl.dick > 0)>>
	<<if ($HeadGirl.hormones < 1)>>
	<<if ($slaves[$slaves.length-1].devotion <= 20)>>
		<<set $PESSevent.push("headgirl dickgirl")>>
	<</if>>
	<</if>>
	<<if ($universalRuleImpregnation == "HG")>>
	<<if ($HeadGirl.devotion > 95)>>
	<<if ($HeadGirl.balls > 0)>>
		<<set $PESSevent.push("worshipful impregnatrix")>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>

	<<if ($HeadGirl.devotion > 95)>>
	<<if ($slaves.length > 4)>>
		<<set $PESSevent.push("loving headgirl")>>
	<</if>>
	<<if ($week > 20)>>
	<<if ($HeadGirl.trust > 95)>>
	<<if ($HeadGirl.intelligence > 1)>>
		<<set $PESSevent.push("worried headgirl")>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>

<</if>>

<<if ($Bodyguard != 0)>>

	<<set $events.push("PE pit fight invite")>>

	<<if ($Bodyguard.combatSkill != 0)>>
		<<set $PESSevent.push("bodyguard bedtime")>>
	<</if>>

	<<if ($Bodyguard.relationship == 0)>>
	<<if ($Bodyguard.relationshipRules is "permissive")>>
	<<if ($Bodyguard.fetish != "mindbroken")>>
	<<set $seed to 0>>
	<<for $j to 0; $j < $slaves.length; $j++>>
	<<if ($slaves[$j].relationship == 0)>>
		<<set $seed to 1>>
		<<break>>
	<</if>>
	<</for>>
	<<if ($seed == 1)>>
		<<set $events.push("PE lonely bodyguard")>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>

	<<if ($Bodyguard.combatSkill == 0)>>
		<<set $events.push("PE combat training")>>
		<<set $events.push("PE combat training")>>
		<<set $events.push("PE combat training")>>
	<</if>>

<</if>>

<<if ($Milkmaid != 0)>>

	<<if ($dairySlaves >= 5)>>
	<<if ($Milkmaid.health >= 70)>>
	<<if ($Milkmaid.muscles > 5)>>
		<<set $PESSevent.push("tired milkmaid")>>
	<</if>>
	<<if canAchieveErection($Milkmaid)>>
		<<set $PESSevent.push("tired collectrix")>>
	<</if>>
	<</if>>
	<</if>>

<</if>>

<<if ($Stewardess != 0)>>

	<<if ($servantsQuartersSlaves >= 1)>>
	<<if ($Stewardess.actualAge >= 35)>>
		<<set $PETSevent.push("stewardess beating")>>
	<</if>>
	<</if>>

<</if>>

<<if ($Madam != 0)>>

	<<if ($brothelSlaves >= 5)>>
	<<if ($Madam.actualAge >= 35)>>
	<<if ($Madam.whoreSkill >= 100)>>
		<<set $PESSevent.push("madam strategy")>>
	<</if>>
	<</if>>
	<</if>>

<</if>>

<<if ($DJ != 0)>>

	<<if ($clubSlaves >= 5)>>
	<<if ($DJ.face >= 3)>>
	<<if ($DJ.entertainSkill >= 100)>>
		<<set $PESSevent.push("DJ publicity")>>
	<</if>>
	<</if>>
	<</if>>

<</if>>

<<if ($Schoolteacher != 0)>>
	<<if ($schoolroomSlaves >= 1)>>
	<<if ($Schoolteacher.intelligence >= 1)>>
	<<if ($Schoolteacher.actualAge >= 35)>>
		<<set $PETSevent.push("aggressive schoolteacher")>>
	<</if>>
	<</if>>
	<</if>>
<</if>>

<<if ($Wardeness != 0)>>
	<<if ($cellblockSlaves > 0)>>
	<<if canTalk($Wardeness)>>
		<<set $PETSevent.push("abusive wardeness")>>
	<</if>>
	<</if>>
<</if>>

<<if ($Attendant != 0)>>
	<<if ($spaSlaves > 0)>>
	<<if canTalk($Attendant)>>
		<<set $PETSevent.push("comforting attendant")>>
	<</if>>
	<</if>>
<</if>>

<<if ($Nurse != 0)>>
<<if ($clinicSlaves > 0)>>
	<<set $nurseMolestationSubIDs to []>>
	<<for $i to 0; $i < $slaves.length; $i++>>
	<<if $slaves[$i].assignment is "get treatment in the clinic">>
	<<if $slaves[$i].anus != 0>>
		<<set $nurseMolestationSubIDs.push($slaves[$i].ID)>>
	<</if>>
	<</if>>
	<</for>>
	<<if ($nurseMolestationSubIDs.length > 0)>>
	<<if ($Nurse.energy > 95) || (($Nurse.fetishStrength > 60) && (($Nurse.fetish is "sadist") || ($Nurse.fetish is "dom")))>>
		<<set $PETSevent.push("nurse molestation")>>
		<<set $nurseMolestationSubIDs to $slaves[$i].ID>>
	<</if>>
	<</if>>
<</if>>
<</if>>

<<if ($Concubine != 0)>>
	<<set $PESSevent.push("loving concubine")>>
	<<if canTalk($Concubine)>>
		<<set $events.push("PE concubine interview")>>
	<</if>>
<</if>>

/* Acquisition Events */

<<set $events.push("RE recruit")>>
<<if random(1,100) < $rep/200>>
	<<set $events.push("RE recruit")>>
<</if>>
<<if $ProRecruitment == 1>>
<<if random(1,100) < $rep/200>>
	<<set $events.push("RE recruit")>>
<</if>>
<</if>>
<<if $AntiEnslavementRep == 0>>
<<if random(1,100) < $rep/300>>
	<<set $events.push("RE recruit")>>
<</if>>
<</if>>
<<if $AntiEnslavementCash == 0>>
<<if random(1,100) < $rep/300>>
	<<set $events.push("RE recruit")>>
<</if>>
<</if>>
<<set $recruit to []>>

<<if $seeDicks != 2>> /*XX ACQUISITIONS*/

<<set $recruit.push("female debtor")>>
<<set $recruit.push("desperate milf")>>
<<if $arcologies[0].FSRestart == "unset">>
	<<set $recruit.push("desperate preg")>>
<</if>>
<<set $recruit.push("blind homeless")>>
<<set $recruit.push("female SD")>>
<<set $recruit.push("female SE")>>
<<set $recruit.push("CCS angel")>>
<<set $recruit.push("CCS DA")>>
<<set $recruit.push("racer loser")>>
<<set $recruit.push("racer winner")>>
<<set $recruit.push("repo housekeeper")>>
<<set $recruit.push("repo nanny")>>
<<set $recruit.push("farm cow")>>
<<set $recruit.push("farm virgin cow")>>
<<set $recruit.push("orphan rebellious female")>>
<<set $recruit.push("captured teen")>>
<<if ($mercenaries > 5)>>
	<<set $recruit.push("female runaway")>>
<</if>>
<<if ($cash > 20000)>>
	<<set $recruit.push("school sale")>>
<</if>>
<<if ($HeadGirl.devotion > 50) && ($HeadGirl.entertainSkill >= 100)>>
	<<set $recruit.push("female recruit")>>
<</if>>
<<if ($HeadGirl.devotion > 50) && ($HeadGirl.whoreSkill >= 100)>>
	<<set $recruit.push("whore recruit")>>
<</if>>
<<if ($AProsperityCap > 60)>>
	<<set $events.push("RE malefactor")>>
	<<set $malefactor to ["liberator", "whore", "businesswoman", "addict"]>>
	<<if $seeDicks != 0>>
	<<set $malefactor.push("rapist")>>
	<</if>>
	<<if $minimumSlaveAge <= 12>>
	<<set $malefactor.push("orphanloli")>>
	<</if>>
	<<if $arcologies[0].FSPaternalist < 50>>
	<<set $malefactor.push("escapee")>>
	<</if>>
	<<set $malefactor to $malefactor.random()>>
	<<if ($rep/150) > random(1,100)>>
	<<set $events.push("RE malefactor")>>
	<</if>>
<</if>>

<</if>>

<<if $seeDicks != 0>> /*XY ACQUISITIONS*/

<<set $recruit.push("male debtor")>>
<<set $recruit.push("tg addict")>>
<<set $recruit.push("male SD")>>
<<set $recruit.push("MTF SE")>>
<<set $recruit.push("DG SE")>>
<<set $recruit.push("gang leader")>>
<<set $recruit.push("racer DG chaser")>>
<<set $recruit.push("farm bull")>>
<<set $recruit.push("orphan femboy")>>
<<if ($mercenaries > 5)>>
	<<set $recruit.push("DG runaway")>>
	<<set $recruit.push("herm runaway")>>
<</if>>
<<if ($cash > 20000)>>
	<<set $recruit.push("school trap")>>
<</if>>
<<if ($HeadGirl.devotion > 50) && ($HeadGirl.dick > 0)>>
	<<set $recruit.push("male recruit")>>
<</if>>
<<if $seeDicks != 2>>
	<<if ($HeadGirl.devotion > 50)>>
		<<set $RecETSevent.push("mismatched pair")>>
	<</if>>
	<<if ($rep/250) > random(1,100)>>
		<<set $RecETSevent.push("matched pair")>>
	<</if>>
	<<if ($rep/250) > random(1,100) && $arcologies[0].FSRestart == "unset">>
		<<set $RecETSevent.push("identical herm pair")>>
	<</if>>
	<<if ($rep/250) > random(1,100) && $arcologies[0].FSRestart == "unset">>
		<<set $RecETSevent.push("incest mother son")>>
	<</if>>
	<<if ($rep/250) > random(1,100) && $arcologies[0].FSRestart == "unset">>
		<<set $RecETSevent.push("incest father daughter")>>
	<</if>>
<</if>>

<<else>> /*XX ACQUISITIONS*/

<<if ($rep/250) > random(1,100)>>
	<<set $RecETSevent.push("identical pair")>>
<</if>>
<<if ($rep/250) > random(1,100)>>
	<<set $RecETSevent.push("posh mother daughter")>>
<</if>>

<</if>>

<<if ($rep/250) > random(1,100)>>
	<<set $RecETSevent.push("addict mother daughter")>>
<</if>>
<<if ($rep/250) > random(1,100)>>
	<<set $recruit.push("immigrant")>>
<</if>>

<<if ($PC.dick == 1) && ($PC.vagina == 0) && ($PC.boobs == 0) && ($PC.title == 1)>>
	<<if ($rep/250) > random(1,100)>>
	<<set $recruit.push("handsome PC")>>
	<<set $recruit.push("handsome PC")>>
	<</if>>
<<elseif ($PC.dick == 0) && ($PC.boobs == 1) && ($PC.title == 0)>>
	<<if ($rep/250) > random(1,100)>>
	<<set $recruit.push("womanly PC")>>
	<<set $recruit.push("womanly PC")>>
	<</if>>
<<elseif ($PC.dick == 1) && ($PC.boobs == 1)>>
	<<if ($rep/250) > random(1,100)>>
	<<set $recruit.push("shemale PC")>>
	<<set $recruit.push("shemale PC")>>
	<</if>>
<</if>>

<<if $familyTesting == 1>>

<<for $i to 0; $i < $slaves.length; $i++>>
	<<if $slaves[$i].fuckdoll == 0>>
	<<if $slaves[$i].canRecruit == 1>>
	<<if ($slaves[$i].devotion > 50)>>
	<<if canWalk($slaves[$i])>>
	<<if random(1,100) > 80+(totalRelatives($slaves[$i])*5)>>
		<<for $j to 0; $j < $slavesOriginal.length; $j++>>
			<<if $slaves[$i].ID is $slavesOriginal[$j].ID>>
				<<set $events.push("RE relative recruiter")>>
				<<break>>
			<</if>>
		<</for>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
<</for>>

<<else>>

<<for $i to 0; $i < $slaves.length; $i++>>
	<<if $slaves[$i].recruiter != 0>>
	<<if $slaves[$i].canRecruit == 1>>
	<<if ($slaves[$i].devotion > 50)>>
	<<if ($slaves[$i].relation == 0)>>
	<<if canWalk($slaves[$i])>>
		<<for $j to 0; $j < $recruiters.length; $j++>>
			<<if $slaves[$i].ID is $recruiters[$j].ID>>
				<<set $seed = 1>>
				<<set $events.push("RE relative recruiter")>>
				<<break>>
			<</if>>
		<</for>>
		<<if $seed != 1>><<set $slaves[$i].recruiter to 0>><</if>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
	<</if>>
<</for>>

<</if>>

<<if $FSAnnounced == 1>>
	<<set $FSAcquisitionEvents to []>>
	<<if $arcologies[0].FSSupremacist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Supremacist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSSubjugationist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Subjugationist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSGenderRadicalist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Gender Radicalist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSRepopulationFocus > random(1,100)>>
  		<<set $FSAcquisitionEvents.push("Repopulation Efforts")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSRestart > random(1,100)>>
  		<<set $FSAcquisitionEvents.push("Eugenics")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSGenderFundamentalist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Gender Fundamentalist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSPaternalist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Paternalist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSDegradationist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Degradationist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSBodyPurist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Body Purist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSTransformationFetishist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Transformation Fetishist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSYouthPreferentialist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Youth Preferentialist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSMaturityPreferentialist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Maturity Preferentialist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSSlimnessEnthusiast > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Slimness Enthusiast")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSAssetExpansionist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Asset Expansionist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSPastoralist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Pastoralist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSPhysicalIdealist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Physical Idealist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSChattelReligionist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Chattel Religionist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSRomanRevivalist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Roman Revivalist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSEdoRevivalist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Edo Revivalist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSArabianRevivalist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Arabian Revivalist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSChineseRevivalist > random(1,100)>>
		<<set $FSAcquisitionEvents.push("Chinese Revivalist")>>
		<<set $events.push("RE FS acquisition")>>
	<</if>>
	<<if $arcologies[0].FSEgyptianRevivalist > random(1,100)>>
		<<set $events.push("RE FSEgyptianRevivalist acquisition")>>
	<</if>>
	<<set $FSNonconformistEvents to []>>
	<<if $arcologies[0].FSSupremacist < 95>><<if $arcologies[0].FSSupremacist > 50>>
		<<set $FSNonconformistEvents.push("Supremacist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSSubjugationist < 95>><<if $arcologies[0].FSSubjugationist > 50>>
		<<set $FSNonconformistEvents.push("Subjugationist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $seeHyperPreg == 1>>
	<<if $arcologies[0].FSRepopulationFocus < 95>><<if $arcologies[0].FSRepopulationFocus > 50>>
		<<set $FSNonconformistEvents.push("Repopulation Efforts")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<</if>>
	<<if $arcologies[0].FSRestart < 95>><<if $arcologies[0].FSRestart > 50>>
		<<set $FSNonconformistEvents.push("Eugenics")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSGenderRadicalist < 95>><<if $arcologies[0].FSGenderRadicalist > 50>>
		<<set $FSNonconformistEvents.push("Gender Radicalist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSGenderFundamentalist < 95>><<if $arcologies[0].FSGenderFundamentalist > 50>>
		<<set $FSNonconformistEvents.push("Gender Fundamentalist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSPaternalist < 95>><<if $arcologies[0].FSPaternalist > 50>>
		<<set $FSNonconformistEvents.push("Paternalist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSDegradationist < 95>><<if $arcologies[0].FSDegradationist > 50>>
		<<set $FSNonconformistEvents.push("Degradationist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSBodyPurist < 95>><<if $arcologies[0].FSBodyPurist > 50>>
		<<set $FSNonconformistEvents.push("Body Purist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSTransformationFetishist < 95>><<if $arcologies[0].FSTransformationFetishist > 50>>
		<<set $FSNonconformistEvents.push("Transformation Fetishist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSYouthPreferentialist < 95>><<if $arcologies[0].FSYouthPreferentialist > 50>>
		<<set $FSNonconformistEvents.push("Youth Preferentialist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSMaturityPreferentialist < 95>><<if $arcologies[0].FSMaturityPreferentialist > 50>>
		<<set $FSNonconformistEvents.push("Maturity Preferentialist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSSlimnessEnthusiast < 95>><<if $arcologies[0].FSSlimnessEnthusiast > 50>>
		<<set $FSNonconformistEvents.push("Slimness Enthusiast")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSAssetExpansionist < 95>><<if $arcologies[0].FSAssetExpansionist > 50>>
		<<set $FSNonconformistEvents.push("Asset Expansionist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSPastoralist < 95>><<if $arcologies[0].FSPastoralist > 50>>
		<<set $FSNonconformistEvents.push("Pastoralist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSPhysicalIdealist < 95>><<if $arcologies[0].FSPhysicalIdealist > 50>>
		<<set $FSNonconformistEvents.push("Physical Idealist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSChattelReligionist < 95>><<if $arcologies[0].FSChattelReligionist > 50>>
		<<set $FSNonconformistEvents.push("Chattel Religionist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSRomanRevivalist < 95>><<if $arcologies[0].FSRomanRevivalist > 50>>
		<<set $FSNonconformistEvents.push("Roman Revivalist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSEdoRevivalist < 95>><<if $arcologies[0].FSEdoRevivalist > 50>>
		<<set $FSNonconformistEvents.push("Edo Revivalist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSArabianRevivalist < 95>><<if $arcologies[0].FSArabianRevivalist > 50>>
		<<set $FSNonconformistEvents.push("Arabian Revivalist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSChineseRevivalist < 95>><<if $arcologies[0].FSChineseRevivalist > 50>>
		<<set $FSNonconformistEvents.push("Chinese Revivalist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
	<<if $arcologies[0].FSEgyptianRevivalist < 95>><<if $arcologies[0].FSEgyptianRevivalist > 50>>
		<<set $FSNonconformistEvents.push("Egyptian Revivalist")>>
		<<set $events.push("RE FS nonconformist")>>
	<</if>><</if>>
<</if>>

/* SCHOOL EVENTS */

<<if $cash > 50000>>
	<<set $RESEndowment to []>>
	<<if $TSS.schoolUpgrade == 0>>
	<<if ($TSS.studentsBought > 1) || ($TSS.schoolPresent != 0)>>
		<<set $events.push("RES Endowment")>>
		<<if $TSS.studentsBought > 2>>
		<<set $events.push("RES Endowment")>>
		<</if>>
		<<set $RESEndowment.push("TSS")>>
	<</if>>
	<</if>>
	<<if $GRI.schoolUpgrade == 0>>
	<<if ($GRI.studentsBought > 1) || ($GRI.schoolPresent != 0)>>
		<<set $events.push("RES Endowment")>>
		<<if $GRI.studentsBought > 2>>
		<<set $events.push("RES Endowment")>>
		<</if>>
		<<set $RESEndowment.push("GRI")>>
	<</if>>
	<</if>>
	<<if $SCP.schoolUpgrade == 0>>
	<<if ($SCP.studentsBought > 1) || ($SCP.schoolPresent != 0)>>
		<<set $events.push("RES Endowment")>>
		<<if $SCP.studentsBought > 2>>
		<<set $events.push("RES Endowment")>>
		<</if>>
		<<set $RESEndowment.push("SCP")>>
	<</if>>
	<</if>>
	<<if $LDE.schoolUpgrade == 0>>
	<<if ($LDE.studentsBought > 1) || ($LDE.schoolPresent != 0)>>
		<<set $events.push("RES Endowment")>>
		<<if $LDE.studentsBought > 2>>
		<<set $events.push("RES Endowment")>>
		<</if>>
		<<set $RESEndowment.push("LDE")>>
	<</if>>
	<</if>>
	<<if $TGA.schoolUpgrade == 0>>
	<<if ($TGA.studentsBought > 1) || ($TGA.schoolPresent != 0)>>
		<<set $events.push("RES Endowment")>>
		<<if $TGA.studentsBought > 2>>
		<<set $events.push("RES Endowment")>>
		<</if>>
		<<set $RESEndowment.push("TGA")>>
	<</if>>
	<</if>>
	<<if $TFS.schoolUpgrade == 0>>
	<<if ($TFS.studentsBought > 1) || ($TFS.schoolPresent != 0) || (($TFS.studentsBought > 0) && ($PC.dick == 1) && ($PC.vagina == 1) && ($PC.boobs == 1))>>
		<<set $events.push("RES Endowment")>>
		<<set $RESEndowment.push("TFS")>>
		<<if $TFS.studentsBought > 2>>
			<<set $events.push("RES Endowment")>>
			<<set $RESEndowment.push("TFS")>>
		<</if>>
		<<if ($PC.dick == 1) && ($PC.vagina == 1) && ($PC.boobs == 1)>>
			<<set $events.push("RES Endowment")>>
			<<set $RESEndowment.push("TFS")>>
		<</if>>
	<</if>>
	<</if>>
<</if>>

<<set $RESMove to []>>
<<if $TSS.schoolUpgrade != 0>>
<<if $TSS.schoolPresent == 0>>
<<if $TSS.schoolAnnexed == 0>>
	<<set $events.push("RES Move")>>
	<<set $events.push("RES Move")>>
	<<set $RESMove.push("TSS")>>
<</if>>
<</if>>
<</if>>
<<if $GRI.schoolUpgrade != 0>>
<<if $GRI.schoolPresent == 0>>
<<if $GRI.schoolAnnexed == 0>>
	<<set $events.push("RES Move")>>
	<<set $events.push("RES Move")>>
	<<set $RESMove.push("GRI")>>
<</if>>
<</if>>
<</if>>
<<if $SCP.schoolUpgrade != 0>>
<<if $SCP.schoolPresent == 0>>
<<if $SCP.schoolAnnexed == 0>>
	<<set $events.push("RES Move")>>
	<<set $events.push("RES Move")>>
	<<set $RESMove.push("SCP")>>
<</if>>
<</if>>
<</if>>
<<if $LDE.schoolUpgrade != 0>>
<<if $LDE.schoolPresent == 0>>
<<if $LDE.schoolAnnexed == 0>>
	<<set $events.push("RES Move")>>
	<<set $events.push("RES Move")>>
	<<set $RESMove.push("LDE")>>
<</if>>
<</if>>
<</if>>
<<if $TGA.schoolUpgrade != 0>>
<<if $TGA.schoolPresent == 0>>
<<if $TGA.schoolAnnexed == 0>>
	<<set $events.push("RES Move")>>
	<<set $events.push("RES Move")>>
	<<set $RESMove.push("TGA")>>
<</if>>
<</if>>
<</if>>
<<if $TFS.schoolUpgrade != 0>>
<<if $TFS.schoolPresent == 0>>
<<if $TFS.schoolAnnexed == 0>>
	<<set $events.push("RES Move")>>
	<<set $events.push("RES Move")>>
	<<set $RESMove.push("TFS")>>
	<<if ($PC.dick == 1) && ($PC.vagina == 1) && ($PC.boobs == 1)>>
		<<set $events.push("RES Move")>>
		<<set $events.push("RES Move")>>
		<<set $RESMove.push("TFS")>>
		<<set $RESMove.push("TFS")>>
	<</if>>
<</if>>
<</if>>
<</if>>

<<if $cash > 10000>>
<<if $rep > 6000>>
	<<set $RESSale to []>>
<<if $seeDicks != 2>>
<<if $TSS.studentsBought == 0>>
	<<set $events.push("RES Sale")>>
	<<set $RESSale.push("TSS")>>
<</if>>
<<if $GRI.studentsBought == 0>>
	<<set $events.push("RES Sale")>>
	<<set $RESSale.push("GRI")>>
<</if>>
<<if $SCP.studentsBought == 0>>
	<<set $events.push("RES Sale")>>
	<<set $RESSale.push("SCP")>>
<</if>>
<</if>>
<<if $seeDicks != 0>>
<<if $LDE.studentsBought == 0>>
	<<set $events.push("RES Sale")>>
	<<set $RESSale.push("LDE")>>
<</if>>
<<if $TGA.studentsBought == 0>>
	<<set $events.push("RES Sale")>>
	<<set $RESSale.push("TGA")>>
<</if>>
<<if ($TFS.studentsBought == 0)>>
	<<set $events.push("RES Sale")>>
	<<set $RESSale.push("TFS")>>
	<<if ($PC.dick == 1) && ($PC.vagina == 1) && ($PC.boobs == 1)>>
		<<set $events.push("RES Sale")>>
		<<set $events.push("RES Sale")>>
		<<set $RESSale.push("TFS")>>
		<<set $RESSale.push("TFS")>>
	<</if>>
<</if>>
<</if>>
<</if>>
<</if>>

<<if $justiceEvents.length > 0>>
	<<if ($seeExtreme == 0) || ($seeDicks == 0)>>
	<<for $x to 0; $x < $justiceEvents.length; $x++>>
		<<if "slave training" == $justiceEvents[$x]>>
		<<set $dump to $justiceEvents.pluck([$x], [$x])>>
		<<break>>
		<</if>>
	<</for>>
	<</if>>
	<<if $justiceEvents.length > 2>>
	<<set $events.push("JE slave dispute")>>
	<<set $events.push("JE slave dispute")>>
	<<else>>
	<<set $events.push("JE slave dispute")>>
	<</if>>
<</if>>

<<if $minimumSlaveCost > 3000>>
	<<set $events.push("RE shipping container")>>
<</if>>

<<if $corpCash > 50000>>
	<<set $events.push("REM merger")>>
<</if>>

<<if $rep-10000 > random(1,10000)>>
	<<if ($PC.vagina == 1 && $PC.boobs == 1 && $PC.title == 0) && (random(0,99) < $seeDicks)>>
		<<set $events.push("RE male arcology owner")>>
	<<else>>
		<<set $events.push("RE female arcology owner")>>
	<</if>>
<</if>>

<<set $REM to []>>
<<if random(1,100) > $slaveCostFactor*40>>
	<<set $events.push("REM fluctuations")>>
	<<set $events.push("REM fluctuations")>>
	<<set $REM to 1>>
<</if>>
<<if random(1,100) < $slaveCostFactor*60>>
	<<set $events.push("REM fluctuations")>>
	<<set $events.push("REM fluctuations")>>
	<<set $REM to -1>>
<</if>>

/* EVENT RANDOMIZATION */

<<for $i to 0; $i < $RecETSevent.length; $i++>>
  <<set $events.push("RecETS")>>
<</for>>
<<for $i to 0; $i < $REFIevent.length; $i++>>
  <<set $events.push("REFI")>>
<</for>>
<<for $i to 0; $i < $PESSevent.length; $i++>>
  <<set $events.push("PESS")>>
<</for>>
<<for $i to 0; $i < $PETSevent.length; $i++>>
  <<set $events.push("PETS")>>
<</for>>
<<if $cheatMode == 1>>
	<<goto "random event select">>
<<else>>
	<<goto "random event roll">>
<</if>>

<</silently>>

repo_name: Welptard/fc


code:
:: RE busy arcade

<<set $activeSlave to 0>>
<<for $i to 0; $i < $slaves.length; $i++>>
	<<if $slaves[$i].assignment is "be confined in the arcade">>
	<<if $slaves[$i].fetish != "mindbroken">>
	<<if $slaves[$i].amp != 1>>
	<<set $activeSlave to $slaves[$i]>>
	<</if>>
	<</if>>
	<</if>>
<</for>>
<<if $activeSlave == 0>>
	<<goto "RIE Eligibility Check">>
<<else>>
	<<goto "RE busy arcade workaround">>
<</if>>


code:
:: RE busy brothel [nobr]

<<set $nextButton to "Continue">>
<<set $nextLink to "RIE Eligibility Check">>

$brothelNameCaps is well staffed, and does a busy trade in flesh 24 hours a day. With so many sex slaves in the Free Cities, brothels occupy a functional, nearly mechanical part of the sexual landscape. Free citizens and sometimes even favored slaves visit the brothel, select from the available merchandise, relieve their sexual needs, and leave. Affection, companionship, and emotional needs are available elsewhere.

Of course, $brothelName is the best establishment of its kind in the arcology. Citizens who patronize it can expect themselves to be very well looked after by skilled slaves. The quality of the merchandise, the efficiency with which it is delivered, and the cleanliness and reputation of the premises @@color:green;reflect well on you,@@<<set $rep += 100>> so much so that you could leverage this bustling sexual commerce in many ways.

<<link "Surprise the hardworking whores with a day of rest">>
	<<replace "#result">>
	The problem with assembly-line sex is that it has a tendency to destroy any sense of intimacy or fun. So, you make some simple preparations and close the brothel for a day, hiring some freelancers to cover. All your slave whores are allowed to sleep late, and then spend the day with you playing games and enjoying light amusements. The girls are surprised by your generosity, but they have fun. Many of the games are sexually themed. One day of giggling and squealing can't completely reverse the transactionalization of sex for them, but they @@color:hotpink;appreciate the effort.@@
	<<for $i to 0; $i < $slaves.length; $i++>>
		<<if $slaves[$i].assignment is "work in the brothel">>
		<<set $slaves[$i].devotion += 4>>
		<</if>>
	<</for>>
	<<set $cash -= 1000>>
	<</replace>>
<</link>> //This will cost ¤1000//

<<link "Hire an expert hooker to give lessons">>
	<<replace "#result">>
	The citizen streetwalker has had her day. A few of the cleverest have avoided being driven into poverty, either by becoming madams or by finding a way to build a new career serving the slave brothel industry. One of these is touring the city, offering her long sexual experience in seminars for slave prostitutes. Her services are not cheap, but it rapidly becomes clear that they are worth it. She is a grey-haired but still elegant woman with deep crow's feet and a smoker's voice. She is not only a sexual master, but a hardbitten and comprehensively experienced businesswoman. All of your brothel slaves with any room for improvement in their whoring skills @@color:green;learn from her lessons,@@ while those who have nothing to learn @@color:hotpink;gain confidence@@ from her praise.
	<<for $i to 0; $i < $slaves.length; $i++>>
		<<if $slaves[$i].assignment is "work in the brothel">>
		<<if $slaves[$i].whoreSkill < 100>>
		<<set $slaves[$i].whoreSkill += 10>>
		<<else>>
		<<set $slaves[$i].devotion += 4>>
		<</if>>
		<</if>>
	<</for>>
	<<set $cash -= 2000>>
	<</replace>>
<</link>> //This will cost ¤2000//

<<link "Eliminate prices for one morning to promote the brothel">>
	<<replace "#result">>
	The news that sex will be free at the brothel travels like wildfire. Security measures are necessary to control the throng that spends the entire day entering and leaving the brothel, though as the day goes on the crowds thin. By midmorning, all the holes on offer are so fucked out that only those who fetishize that sort of thing stick around. The brothel is a real seminal sewer by noon, and it smells like it. Nevertheless, free sex is a short route to @@color:green;public approval,@@ though you do miss a morning's fees. The poor slave whores are @@color:red;fairly battered@@ by so much wear and tear in so little time.
	<<for $i to 0; $i < $slaves.length; $i++>>
		<<if $slaves[$i].assignment is "work in the brothel">>
		<<set $slaves[$i].health -= 10>>
		<</if>>
		<<if ($slaves[$i].vagina > -1) && ($slaves[$i].vaginalAccessory != "chastity belt")>>
		<<set $slaves[$i].vaginalCount += 5>>
		<<set $vaginalTotal += 5>>
		<<set $slaves[$i].analCount += 5>>
		<<set $analTotal += 5>>
		<<else>>
		<<set $slaves[$i].analCount += 10>>
		<<set $analTotal += 10>>
		<</if>>
		<<set $slaves[$i].oralCount += 10>>
		<<set $oralTotal += 10>>
	<</for>>
	<<set $cash -= 2000>>
	<</replace>>
<</link>> //This will cost ¤2000//


code:
:: RE busy club

<<nobr>>

<<set $nextButton to "Continue">>
<<set $nextLink to "RIE Eligibility Check">>

<</nobr>>\
\
The original designers of the modern arcology did not realize how inseparable from slavery their work would become. The club at the social heart of $arcologies[0].name was not meant as a center of the more friendly kind of sexual slavery, but that is what it has become. Free whores of the highest quality work there, and they are accompanied by a flock of your slaves who have simple orders to dance, add cheer, and perform sexual favors wherever they can.

Offering slaves for free sex would become unmanageable if the club where your public servants work was open to the unwashed masses, but it is not. The arcology is already selective, and only good citizens can party, dance, and fuck the night away in $clubName. The upper classes @@color:green;recognize your contributions@@<<set $rep += 100>> to arcology culture, which you could probably parlay into an even greater benefit.
\
<span id="result">
<<link "Sponsor a special event in the club">>
	<<replace "#result">>
	The Free Cities are new, and so is their culture. There are new traditions, new expectations, and now, new holidays. One morning, the upper classes of the arcology are surprised and gratified to find that the club has been specially decorated, and all the club sluts are nude. The floor of the club is typically meant for dirty dancing and some light sex, not public penetrative intercourse. Not today; today is special. The festivities @@color:green;greatly improve your renown;@@ you have set a high bar for what a wealthy arcology owner should do.
	<<set $cash -= 2000>>
	<<set $rep += 500>>
	<</replace>>
<</link>> //This will cost ¤2000//
<<link "Host a business exposition">>
	<<replace "#result">>
	With the world economy in a perilous state, the Free Cities are one of the few remaining areas where innovation and new business opportunities still appear. The novel markets associated with the slave trade only reinforce this trend, offering a cornucopia of opportunities for the clear-eyed investor with liquid assets. Every other week there is news of a new fortune being made from smart investments in leather, in human growth hormones, or in psychoactive drugs. You host an exposition for slave services centered on the club, with your slaves serving as greeters who are eager to ensure that all the little wants of visiting notables are thoroughly satisfied. The optimistic outlook projected by this event @@color:green;improves $arcologies[0].name's business prospects@@ and even @@color:green;reflects well on you personally.@@
	<<set $cash -= 5000>>
	<<set $arcologies[0].prosperity += 2>>
	<<set $rep += 500>>
	<</replace>>
<</link>> //This will cost ¤5000//
</span>


code:
:: RE busy dairy

<<nobr>>

<<set $nextButton to "Continue">>
<<set $nextLink to "RIE Eligibility Check">>

<</nobr>>\
\
$dairyNameCaps is working away steadily. Its high-quality product @@color:green;reflects well on you,@@<<set $rep += 100>> you muse one day as you inspect the premises. The gentle pneumatic sounds of the milkers and the whimpers of the cows being milked are a pleasant background for the thought.

Even with high doses of modern drugs, human cows simply do not produce a very high volume of milk. This isn't much of a business problem, since it just means that the product can be sold at a high price. However, some of the more grandiose ideas about how to use milk have had to wait until you have enough cows producing enough milk to make them possible.
\
<span id="result">
<<link "Share a milk bath with the cows">>
	<<replace "#result">>
	Milk is a fashionable skin treatment in the Free Cities, and many of the cows fetishize their breasts and their milk. Many of them giggle with delight when you bring them all into a large spa room with a huge tub full of their fresh milk. A pittance will be lost from sales, but it's hard to think of such things when swimming and splashing in warm, nutty mother's milk with so many huge-breasted slaves, many of whom are milking themselves into the bath. Some of the older ones relax and luxuriate, gently milking themselves and masturbating or each other, according to taste. The younger cows prefer to rub themselves against you, taking turns being fucked. Regardless, they all @@color:hotpink;appreciate such a special experience.@@
	<<for $i to 0; $i < $slaves.length; $i++>>
		<<if $slaves[$i].assignment is "work in the dairy">>
		<<set $slaves[$i].devotion += 4>>
		<<if ($slaves[$i].vagina > -1) && ($slaves[$i].vaginalAccessory != "chastity belt")>>
		<<set $slaves[$i].vaginalCount += 1>>
		<<set $vaginalTotal += 1>>
		<<else>>
		<<set $slaves[$i].analCount += 1>>
		<<set $analTotal += 1>>
		<</if>>
		<<set $slaves[$i].oralCount += 1>>
		<<set $oralTotal += 1>>
		<</if>>
	<</for>>
	<<set $cash -= 1000>>
	<</replace>>
<</link>> //This will cost ¤1000//
<<if $club != 0>>\
<<link "Add fresh milk to the club for a day to advertise">>
	<<replace "#result">>
	Sexual sights and sounds are all over the arcology. Nevertheless, passersby on the club are surprised to find one morning that a previously normal screen advertising your brand of milk has a luscious pair of breasts protruding through it at head height. The advertisement encourages anyone to try a free sample. The slaves constantly rotate, pressing fresh tits through the gap for public suckling. It is @@color:green;generally agreed that your product is of the finest quality@@ and you even have enquiries about how it might be exported outside the arcology, should you manage to increase production.
	<<set $cash -= 2000>>
	<<set $rep += 500>>
	<</replace>>
<</link>> //This will cost ¤2000//
<</if>>\
<<if ($cumSlaves >= 5) && ($activeSlave.fetish != "cumslut")>>
	<<link "Cum in, milk out">>
		<<replace "#result">>
		As a promotional gimmick, you announce with considerable fanfare a special, experimental brand of milk, available at the normal price for a short time only. The milk will be unique in that it will be from cows fed mostly on slaves' cum; the cockmilked slaves will in turn be given as much milk as possible to produce a 'pure slave product,' recursively. The sad realities of nutrition stop it from being much more than a marketing ploy, but it's certainly a @@color:green;successful@@ attempt to spark discussion.
	<<set $rep += 1000>>
	<<set $cash -= 1000>>
		<</replace>>
	<</link>> //This will cost ¤1000//
<</if>>
</span>


code:
:: RE busy servants quarters [nobr]

<<set $nextButton to "Continue">>
<<set $nextLink to "RIE Eligibility Check">>

Your penthouse is very well staffed with servants. The trend in modern buildings is to design around automatic cleaning systems. Dusting, mopping, and polishing are no longer really necessary when machines that do them more cheaply and thoroughly than any human are readily available. Keeping slaves to clean is an ostentation, and visitors to your quarters are often @@color:green;surprised and gratified@@ to see a sex slave working away in the old way.<<set $rep += 100>>

The busy servants' quarters are a reservoir of slaves that can be used for almost any whim that occurs to you.

<<link "Share the servants' quarters with your more favored slaves">>
	<<replace "#result">>

	The poor slaves in the servants' quarters are lower than almost any others, and they know it. Unfortunately for them, they're about to spend a long weekend knowing it unusually well. Sleeping time is usually nearly inviolate; you are the only person in the penthouse who is permitted to wake a sleeping slave for any but emergency reasons. Not now. You haunt the servants' quarters, using and abusing at will, and encourage your better slaves to follow your example. They quickly take the opportunity to be better than someone for once, and compete with each other in sexual harassment of the servants. They @@color:hotpink;appreciate@@ having @@color:mediumorchid;targets@@ for their frustrations.
	<<for $i to 0; $i < $slaves.length; $i++>>
		<<if $slaves[$i].assignment != "work in servants' quarters">>
		<<set $slaves[$i].devotion += 4>>
			<<set $slaves[$i].oralCount += 3>>
			<<set $oralTotal += 3>>
		<</if>>
		<<if $slaves[$i].assignment is "work in servants' quarters">>
		<<set $slaves[$i].devotion -= 5>>
		<<if ($slaves[$i].vagina > -1) && ($slaves[$i].vaginalAccessory != "chastity belt")>>
			<<set $slaves[$i].vaginalCount += 1>>
			<<set $vaginalTotal += 1>>
		<<else>>
			<<set $slaves[$i].analCount += 1>>
			<<set $analTotal += 1>>
		<</if>>
			<<set $slaves[$i].oralCount += 5>>
			<<set $oralTotal += 5>>
		<</if>>
	<</for>>
	<</replace>>
<</link>>


code:
:: RE devotees [nobr]

<<set $nextButton to "Continue">>
<<set $nextLink to "RIE Eligibility Check">>

/* 000-250-006 */
/* <<if $seeImages == 1>><<SlaveArt $slaves[0] 2 0>><<SlaveArt $slaves[1] 2 0>><<SlaveArt $slaves[2] 2 0>><<SlaveArt $slaves[3] 2 0>><</if>> */
<<if $seeImages == 1>>

        <<SlaveArt $slaves[0] 2 0>>

        <<SlaveArt $slaves[1] 2 0>>

        <<SlaveArt $slaves[2] 2 0>>

        <<SlaveArt $slaves[3] 2 0>>

<</if>>
/* 000-250-006 */

You have a mature, well-trained household of slaves. $slaves[0].slaveName, $slaves[1].slaveName, $slaves[2].slaveName, and $slaves[3].slaveName are all devoted to you. There are all manner of ways you could display this coterie of loyal sex slaves to show off your wealth and power.

<<link "See an operetta with four attendants">>
	<<replace "#result">>
	<<PCTitle>>
	You reserve a box at an upcoming operetta; classical Italian music is enjoying a renaissance these days. The doormen at the fashionable opera house promptly widen the velvet ropes so that you and your party may proceed unimpeded. Their quick thinking is necessary, since there are five of you walking sedately up the steps: you in the middle, impeccable in <<if $PC.title == 1>>gentleman's evening wear, complete with gloves and cane<<else>>a fine and noble lady's tuxedo<</if>>; and $slaves[0].slaveName, $slaves[1].slaveName, $slaves[2].slaveName, and $slaves[3].slaveName, all dressed in the gorgeous fashion of the seventeenth century, all plunging necklines, piled hair, and ruffled petticoats. The splendid master of ceremonies clears his throat and announces in a sonorous voice, "$PCTitle." The ostentation @@color:green;turns every head and catches every eye.@@
	<<set $rep += 500>>
	<</replace>>
<</link>>

<<link "Visit a casino in good company">>
	<<replace "#result">>
	The croupiers, bouncers and regulars down at the nearest casino hardly know what to think when you appear with a chit full of cash and twice as many girls as you have arms. You live the night big, starting at the poker table with so many tits and asses on display behind you that, @@color:yellowgreen;baby, you make a killing.@@ $slaves[0].slaveName, $slaves[1].slaveName, $slaves[2].slaveName, and $slaves[3].slaveName quickly catch the rhythm of the place: slaves can get away with a little more in the smoky, whiskey soaked, money tinted atmosphere, and they @@color:hotpink;enjoy themselves immensely.@@ They flirt, flash, giggle, kiss each other, and generally destroy the concentration of everyone within twenty yards - except you. Ring-a-ding-ding.
	<<set $slaves[0].devotion += 4>>
	<<set $slaves[1].devotion += 4>>
	<<set $slaves[2].devotion += 4>>
	<<set $slaves[3].devotion += 4>>
	<<set $cash += random(30,100)*10>>
	<</replace>>
<</link>>


code:
:: RE FSEgyptianRevivalist acquisition
/* Written and coded by Boney M */
<<nobr>>

<<set $nextButton to "Continue">>
<<set $nextLink to "RIE Eligibility Check">>
<<set $returnTo to "RIE Eligibility Check">>
<<set $showEncyclopedia to 1>><<set $encyclopedia to "Enslaving People">>

<<set $contractCost to 3000>>
<<include "Generate New Slave">>
<<set $activeSlave.origin to "She offered herself to you for enslavement hoping you would preserve her incestuous relationship with her sibling.">>
<<set $activeSlave.devotion = random(5,15)>>
<<set $activeSlave.trust = random(-15,-5)>>
<<set $activeSlave.actualAge to random(21,29)>>
<<set $activeSlave.visualAge = $activeSlave.actualAge>>
<<set $activeSlave.physicalAge = $activeSlave.actualAge>>
<<set $activeSlave.health = random(-20,0)>>
<<slaveCost $activeSlave>>
<<set $slaveCost -= 3000>>
<<if $familyTesting == 1>>
	<<set $activeSlave.mother = $missingParentID>>
	<<set $activeSlave.father = $missingParentID>>
	<<set $activeSlave.sisters += 1>>
	<<set $activeSlave.canRecruit = 0>>
	<<set $missingParentID -= 1>>
<<else>>
	<<set $activeSlave.relation to "sister">>
	<<set $activeSlave.relationTarget to $activeSlave.ID + 1000>>
<</if>>
<<set $activeSlave.relationship to 4>>
<<set $activeSlave.relationshipTarget to $activeSlave.ID + 1000>>

<<if ($activeSlave.dick > 0) && ($activeSlave.balls == 0)>><<set $activeSlave.balls to random(1,5)>><</if>>

<</nobr>>\
\
You receive so many messages, as a noted titan of the new Free Cities world, that $assistantName has to be quite draconian in culling them. She lets only the most important through to you. One category of message that always gets through regardless of content, though, is requests for voluntary enslavement. As the new world takes shape, they've become less rare than they once were.

This call is coming from a public kiosk, which is usually an indication that the person on the other end is a transient individual who has decided to take slavery over homelessness. In this case, however, the story is more unusual - the callers seem stressed, but otherwise normal. They haltingly and quietly explain, with many nervous glances off-camera to ensure they are not overheard, that they are both siblings and lovers, and their attempts to keep the truth of the nature of their relationship from their friends, family, and society at large have failed. They had heard of $arcologies[0].name's reverence for incestuous relationships, and have managed to talk themselves into the questionable conclusion that their only chance to be together was for them to sell themselves to someone who would not just accept but encourage their incest - namely, you.

//Enslaving them will cost ¤<<print $contractCost>>. Selling them immediately will bring in approximately ¤<<print $slaveCost*2>>.//

<<include "Long Slave Description">>\

<span id="result">
<<if $cash >= $contractCost>>\
[[Enslave the pair|RE FSEgyptianRevivalist acquisition workaround][$sibling to $activeSlave, $cash -= ($contractCost)]]
<<else>>\
	//You lack the necessary funds to enslave them.//
<</if>>\
</span>


code:
:: RE FSEgyptianRevivalist acquisition workaround

/* Written and coded by Boney M */
They arrive hand-in-hand and don't let go of each other until the end of the enslavement process, and even after they break their grip and undress at your instruction, their eyes never stray far from each other. With a closer look at them, their blood relation is as obvious as their infatuation with one another. No wonder they couldn't keep it a secret.

<<AddSlave $sibling>>

<<set _secondSlave to clone($activeSlave)>>

<<NationalityToName _secondSlave>>

<<set _secondSlave.slaveName to $activeSlave.birthName>>
<<set _secondSlave.ID to $activeSlave.ID + 1000>>
<<set _secondSlave.devotion += random (-1, 1)>>
<<set _secondSlave.trust += random (-1, 1)>>
<<set _secondSlave.oldDevotion to $activeSlave.devotion>>
<<set _secondSlave.actualAge -= random (1, 3)>>
<<set _secondSlave.visualAge = _secondSlave.actualAge>>
<<set _secondSlave.physicalAge = _secondSlave.actualAge>>
<<if $familyTesting == 0>>
	<<set _secondSlave.relation to "sister">>
	<<set _secondSlave.relationTarget to $activeSlave.ID>>
<</if>>
<<set _secondSlave.relationship to 4>>
<<set _secondSlave.relationshipTarget to $activeSlave.ID>>

<<set _secondSlave.hStyle to either("ass-length", "long", "shoulder-length", "short", "very short", "shaved bald")>>
<<if (_secondSlave.actualAge <= 22)>>
	<<set _secondSlave.career to $youngCareers.random()>>
<<elseif (_secondSlave.intelligenceImplant == 1)>>
	<<set _secondSlave.career to $educatedCareers.random()>>
<<else>>
	<<set _secondSlave.career to $uneducatedCareers.random()>>
<</if>>

<<if (random(1,4) > 1) && (random(1,99) < $seeDicks)>>

<<if ($activeSlave.dick > 0) && ($activeSlave.vagina < 0)>>
	<<set _secondSlave.dick to 0>>
	<<set _secondSlave.foreskin to 0>>
	<<set _secondSlave.scrotum to 0>>
	<<set _secondSlave.balls to 0>>
	<<set _secondSlave.vagina to 1>>
	<<set _secondSlave.clit to either(0, 0, 0, 0, 0, 0, 1, 1, 2)>>
	<<set _secondSlave.labia to either(0, 0, 0, 1, 1, 1, 1, 2, 2, 3)>>
	<<set _secondSlave.preg to -1>>
	<<set _secondSlave.ovaries to 1>>
	<<set _secondSlave.face += either(0, 1, 1)>>
	<<set _secondSlave.boobs += either(0, 100, 200, 300, 400)>>
	<<set _secondSlave.butt += either(0, 1, 1, 2)>>
	<<set _secondSlave.earPiercing to either(0,1)>>
	<<set _secondSlave.nosePiercing to either(0,0,0,1)>>
	<<set _secondSlave.eyebrowPiercing to either(0,0,0,0,0,1)>>
	<<set _secondSlave.clitPiercing to either(0,0,0,0,0,1)>>
	<<set _secondSlave.lipsPiercing to either(0,0,0,0,0,1)>>
	<<set _secondSlave.navelPiercing to either(0,0,0,1)>>
	<<set _secondSlave.nipplesPiercing to either(0,0,0,1)>>
<<elseif ($activeSlave.dick == 0) && ($activeSlave.vagina >= 0)>>
	<<set _secondSlave.dick to either(1, 2, 2, 2, 3, 3, 3, 4, 4, 5)>>
	<<set _secondSlave.balls to either(1, 2, 2, 2, 3, 3, 3, 4, 4, 5)>>
	<<set $activeSlave.vagina to 1>>
	<<set _secondSlave.vagina to -1>>
	<<set _secondSlave.clit to 0>>
	<<set _secondSlave.labia to 0>>
	<<set _secondSlave.preg to -2>>
	<<set _secondSlave.ovaries to 0>>

	<<set _secondSlave.face -= either(0, 1, 1)>>
	<<set _secondSlave.boobs -= either(0, 100, 200, 300, 400)>>
	<<set _secondSlave.butt -= either(0, 1, 1, 2)>>

	<<set _secondSlave.earPiercing to either(0,0,0,1)>>
	<<set _secondSlave.nosePiercing to either(0,0,0,0,1)>>
	<<set _secondSlave.eyebrowPiercing to either(0,0,0,0,0,1)>>
	<<set _secondSlave.dickPiercing to either(0,0,0,0,0,1)>>
	<<set _secondSlave.lipsPiercing to either(0,0,0,0,0,1)>>
	<<set _secondSlave.navelPiercing to either(0,0,0,0,1)>>
	<<set _secondSlave.nipplesPiercing to either(0,0,0,0,1)>>
<<elseif $activeSlave.dick > 0>>
	<<if random(1, 3) == 1>>
		<<set _secondSlave.anus to 1>>
	<<else>>
		<<set $activeSlave.anus to 1>>
	<</if>>
<</if>>

<<if _secondSlave.vagina == 0>>
	<<set _secondSlave.vagina to 1>>
<</if>>
<<if (_secondSlave.dick > 0) && (_secondSlave.balls == 0)>>
	<<set _secondSlave.balls to random(1,5)>>
<</if>>

<</if>>

<<AddSlave _secondSlave>>