code:
:: RES Sale

<<nobr>>

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

<<set $RESSale = $RESSale.random()>>
<<if $RESSale == "TSS">>
	<<set $TSS.schoolSale = 1>>
<<elseif $RESSale == "GRI">>
	<<set $GRI.schoolSale = 1>>
<<elseif $RESSale == "SCP">>
	<<set $SCP.schoolSale = 1>>
<<elseif $RESSale == "LDE">>
	<<set $LDE.schoolSale = 1>>
<<elseif $RESSale == "TGA">>
	<<set $TGA.schoolSale = 1>>
<<elseif $RESSale == "TCR">>
	<<set $TCR.schoolSale = 1>>
<<else>>
	<<set $TFS.schoolSale = 1>>
<</if>>

You receive a personal call from
<<if $RESSale == "TSS">>
	The Slavegirl School, a rising slave training organization known for its reliably unremarkable products, offered at a competitive price.
<<elseif $RESSale == "GRI">>
	The Growth Research Institute, a drug development group breaking new ground on human experimentation.
<<elseif $RESSale == "SCP">>
	St. Claver Preparatory, an unusual combination of slave school and implant surgery training institution.
<<elseif $RESSale == "LDE">>
	L'Ecole des Enculees, an innovative slave school making new and interesting developments in sodomy.
<<elseif $RESSale == "TGA">>
	The Gymnasium-Academy, an intense slave school with a reputation for producing fit bitches with combat skills and stiff dicks.
<<elseif $RESSale == "TCR">>
	The Cattle Ranch, a pastoralist based slave school built around breeding the perfect cowgirl.
<<else>>
	the Futanari Sisters, an enigmatic group of transformation enthusiasts that sells beautiful hermaphrodites.
<</if>>
<<if $RESSale == "TCR">>
	It's from a farmhand, not leadership, and they are offering a cow for sale. Before you can hang up on him and reprimand $assistantName for allowing this Free Cities version of telemarketing to get through to you, the man hurriedly says, "<<if $PC.title == 1>>Sir<<else>>Ma'am<</if>>, She's half off!"

	You pause for a moment, and he plunges on: "<<if $PC.title == 1>>Sir<<else>>Ma'am<</if>>, @@.yellow;your first cow purchase from us this week is half price.@@ And, <<if $PC.title == 1>>Sir<<else>>Ma'am<</if>>, this milky beauty is up for grabs. Keep her by your desk for fresh squeezed milk, knock on wood and she'll suck you right off, grab her by the hips and she'll take anything in her rear; she's plenty of fun! Come on down and get yourself a young, affectionate little cowgirl!"
<<else>>
It's from a piece of merchandise, not leadership, and she's offering herself for sale. Before you can hang up on her and reprimand $assistantName for allowing this Free Cities version of telemarketing to get through to you, the slave hurriedly says, "<<if $PC.title == 1>>Sir<<else>>Ma'am<</if>>, I'm half off!"

You pause for a moment, and she plunges on: "<<if $PC.title == 1>>Sir<<else>>Ma'am<</if>>, @@.yellow;your first slave purchase from us this week is half price.@@ And, <<if $PC.title == 1>>Sir<<else>>Ma'am<</if>>, I'm one of the slaves for sale.
<<if $RESSale == "TSS">>
	I've got the very best skills I could learn as a virgin. I'm healthy, obedient, and educated. And I'm fresh, and willing, and really eager." She rips her white schoolgirl blouse open to show off a fresh pair of tits, and shakes them for you. "I would love to be your sex slave, <<if $PC.title == 1>>Sir<<else>>Ma'am<</if>>," she says, doing her very best to sound appealing, like she's been trained.
<<elseif $RESSale == "GRI">>
	I've, uh, been trained to obey." Her eyes flick to one side, like she's reading her cues. "And um I have really big boobs." She's wearing a bathrobe, and she suddenly jerks it open to reveal a bigger pair of breasts than anyone that age could possibly have grown herself. "I would love to be your sex slave, <<if $PC.title == 1>>Sir<<else>>Ma'am<</if>>," she says, doing her very best to sound appealing. No doubt she'd prefer not to be part of any more testing.
<<elseif $RESSale == "SCP">>
	I'm ready to be the perfect bimbo slave, and the young surgeon who did my implants was very skilled." She's wearing a bikini, and she pulls it down to flash you, revealing that her tits resist gravity almost perfectly. They're gorgeous, but quite fake. "I would love to be your sex slave, <<if $PC.title == 1>>Sir<<else>>Ma'am<</if>>," she says, doing her very best to sound appealing, like she's been trained.
<<elseif $RESSale == "LDE">>
	I've been trained to need cock up my ass." She's nude, and spins around to point her ass at the camera. She begins to wink her big butthole, her tiny, soft cock dangling limply below it. She cranes her head around to continue. "I can come from nothing but buttsex," she says proudly. "I would love to be your anal slut, <<if $PC.title == 1>>Sir<<else>>Ma'am<</if>>," she says, sounding very eager to begin.
<<elseif $RESSale == "TGA">>
	My tutelage has been long and hard, and I'm very eager to begin my life as a slave." She's nude, and stands up to reveal her hardon. She spins for the camera, showing herself off. "I can help protect you, too: I'm proficient in unarmed combat, and I have weapons training. I would love to be your bitch, or your bodyguard, <<if $PC.title == 1>>Sir<<else>>Ma'am<</if>>," she says, doing her very best to sound appealing, like she's been told.
<<else>>
	The time has come for me to serve my Sisters by leaving my community and becoming a slave. Our sex skills are unparalleled," she says proudly. She's nude, and reclines luxuriantly for the camera, showing her remarkable body off in all its gorgeous strangeness. Her boobs are huge, her dick is hard, her pussy is wet, and her ass is relaxed. "I love to fuck, <<if $PC.title == 1>>Sir<<else>>Ma'am<</if>>," she says, and you believe her.
	<<if ($PC.dick == 1) && ($PC.vagina == 1)>>

		<<if ($PC.boobs == 1)>>
			"I would also adore serving someone like you," she adds sincerely, her emphasis making it quite clear the Sisters have heard rumors about your hermaphroditism. "We can't offer any further discount, but I promise I'd worship you with all my heart." She bats her eyes at you. "And my other parts, too!"
		<<else>>
			Her eyes flick downward momentarily, and she looks nervous, swallowing before continuing. "Please let me be your slave," she almost begs. "Serving another futa would, oh," and she pauses, shivering a little. Recollecting herself, she goes on, "Wonderful. Serving you would be a dream come true."
		<</if>>
	<</if>>
<</if>>
<</if>> /* closes Cattle Ranch execption */

<<if $assistantName == "your personal assistant">>Your personal assistant<<else>>$assistantName<</if>>'s $assistantAppearance avatar appears on the screen next to the video call.
<<if $assistant == 0>>
	"I have stored the confirmation code, <<if $PC.title == 1>>Sir<<else>>Ma'am<</if>>," it notes. "If you wish to take advantage of this promotion, use the slave buying menu to navigate to the appropriate school next week. I have appended a note to that school's entry to remind you."
<<else>>
	<<if ($RESSale == "TSS") || ($RESSale == "SCP")>>
		"And I would love to
		<<switch $assistantAppearance>>
		<<case "monstergirl">>
			break both her virgin holes at once," the monstergirl exclaims, and shakes her dicks for emphasis.
		<<case "shemale">>
			wreck her virgin asshole," the shemale exclaims, and starts to jack off.
		<<case "amazon">>
			fist her virgin cunt," the amazon exclaims, and helpfully raises the fist in question.
		<<case "businesswoman">>
			sell her fresh pussy to the highest bidder," the businesswoman exclaims.
		<<case "fairy">>
			play with her clit and lap up those sweet virgin juices!" the fairy exclaims, licking her lips.
		<<case "pregnant fairy">>
			play with her clit and lap up those sweet motherly juices!" the fairy exclaims, licking her lips.
		<<case "goddess">>
			teach her all about being a real woman," the goddess exclaims, rubbing her belly in anticipation.
		<<case "hypergoddess">>
			teach her all about being a real woman," the goddess exclaims, rubbing her massive belly in anticipation.
		<<case "loli">>
			play with her!"  The little girl exclaims happily while jumping up and down.
		<<case "preggololi">>
			play with her!"  The little girl exclaims happily while caressing her belly.
		<<case "angel">>
			keep her safe and craft the perfect future slavewife for someone," the angel says, crossing her arms under her chest.
		<<case "cherub">>
			pretty her up for her first love!" the cherub says, clasping her hands together and fluttering back and forth.
		<<case "incubus">>
			brutally stretch both those holes until she is a slave to my dick," the incubus says, stroking her cock to erection.
		<<case "succubus">>
			shape her into the perfect girl for <<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>Master<<else>>Mistress<</if>>," the succubus says, licking her lips with anticipation. "I'll make a real sex demon out of them!"
		<<case "imp">>
			tease her until she is begging to have her virgnity taken," the imp says, rubbing her hands together with anticipation.
		<<case "witch">>
			play with their body," the witch says, "Test my spells on someone else for once."
		<<case "ERROR_1606_APPEARANCE_FILE_CORRUPT">>
			break both her virgin holes at once," the avatar exclaims, her chest splitting open to reveal countless tentacles, the flesh at their bases writhing with unborn young. "Fill them with young until they are bloated hives."
		<<case "schoolgirl">>
			make out with her. She's cute!" the schoolgirl exclaims.
		<<default>>
			fuck her virgin holes," she says.
		<</switch>>
	<<elseif $RESSale == "GRI" || $RESSale == "TCR">>
		"And I would love to
		<<switch $assistantAppearance>>
		<<case "monstergirl">>
			get my tentacles on those tits," the monstergirl exclaims.
		<<case "shemale">>
			fuck those titties," the shemale exclaims, and starts to jack off.
		<<case "amazon">>
			put her out to pasture," the amazon exclaims, indicating the skin of milk on her belt.
		<<case "businesswoman">>
			put that cow in the dairy," the businesswoman exclaims.
		<<case "fairy">>
			bounce on those nipples until they fill me with milk!" the fairy exclaims, rubbing her belly.
		<<case "pregnant fairy">>
			bounce on those nipples until my babies are fed!" the fairy exclaims, rubbing her swollen belly.
		<<case "goddess" "hypergoddess">>
			taste those bountiful breasts," the goddess exclaims, licking her lips.
		<<case "loli">>
			play with her tits!"  The little girl exclaims happily while jumping up and down.
		<<case "preggololi">>
			play with her tits!"  The little girl exclaims happily while caressing her belly.
		<<case "angel">>
			feed all the hungry with those motherly breasts," the angel says, blushing at the thought.
		<<case "cherub">>
			have a pair just like them!" the cherub says, clasping her hands to her breasts.
		<<case "incubus">>
			wrap them around my shaft and blow a load right into her face," the incubus says, stroking her cock to erection.
		<<case "succubus">>
			teach her the perfect way to tease <<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>Master<<else>>Mistress<</if>> with those boobs," she says, swelling her own tits and pressing them against the screen.
		<<case "imp">>
			tease her until she cums to the slightest touch of her nipples," the imp says, rubbing her hands together with anticipation.
		<<case "witch">>
			play with their breasts," the witch says, "Test my lactation and breast growth spells on someone else for once."
		<<case "ERROR_1606_APPEARANCE_FILE_CORRUPT">>
			penetrate those nipples," the avatar exclaims, her chest splitting open to reveal countless tentacles, the flesh at their bases writhing with unborn young. "Fill them with young until they pin her to the floor. Then her defenseless holes will be filled too."
		<<case "schoolgirl">>
			suck on those titties!" the schoolgirl exclaims.
		<<default>>
			make those breasts bounce," she says.
		<</switch>>
	<<elseif $RESSale == "LDE">>
		"And I would love to
		<<switch $assistantAppearance>>
		<<case "monstergirl">>
			shove both my cocks up there," the monstergirl exclaims.
		<<case "shemale">>
			fuck that butt even bigger," the shemale exclaims, and starts to jack off.
		<<case "amazon">>
			fist that butthole," the amazon exclaims, and helpfully raises the fist in question.
		<<case "businesswoman">>
			see how many customers that asshole can bear," the businesswoman exclaims.
		<<case "fairy">>
			use that butt as a pillow!," the fairy exclaims.
		<<case "pregnant fairy">>
			see if I can impregnate her butt!," the fairy exclaims.
		<<case "goddess" "hypergoddess">>
			see just how obedient she really is," the goddess exclaims, flexing a hand for emphasis.
		<<case "loli">>
			play with her big butt!" The little girl exclaims happily while jumping up and down.
		<<case "preggololi">>
			play with her big butt!" The little girl exclaims happily while caressing her belly.
		<<case "angel">>
			have an ass like that..." the angel trails off, a finger to her lips as she fantasizes.
		<<case "cherub">>
			take a seat on that ass," the cherub sighs, "Flying all the time gets tiring."
		<<case "incubus">>
			wrap that ass around my shaft and blow a load across her back," the incubus says, stroking her cock to erection.
		<<case "succubus">>
			teach her the perfect way to tease <<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>Master<<else>>Mistress<</if>> with that ass," she says, swelling her own behind, pressing it against the screen and winking her butthole tantalizingly at you.
		<<case "imp">>
			spank that ass till it's big and red then take a nap on it," the imp says, rubbing her hands together with anticipation and yawning.
		<<case "witch">>
			play with their ass," the witch says, "Test my butt growth spells on someone else for once. Last time I was hobbling around with a pair of tits as a rear for a week..."
		<<case "ERROR_1606_APPEARANCE_FILE_CORRUPT">>
			split her asshole," the avatar exclaims, her chest splitting open to reveal countless tentacles, the flesh at their bases writhing with unborn young. "Fill their ass with larva until their belly reaches the floor, swell her bottom with aphrodisiacs and watch her birth until she breaks."
		<<case "schoolgirl">>
			lick her big soft behind," the schoolgirl exclaims, and sticks out her tongue.
		<<default>>
			fuck that ass," she says.
		<</switch>>
	<<elseif $RESSale == "TGA">>
		"And I would love to
		<<switch $assistantAppearance>>
		<<case "monstergirl">>
			shove both my cocks up her virgin anus," the monstergirl exclaims.
		<<case "shemale">>
			fuck that virgin asshole," the shemale exclaims, and starts to jack off.
		<<case "amazon">>
			finger fuck her virgin ass," the amazon exclaims, and helpfully raises the fingers in question.
		<<case "businesswoman">>
			sell her anal virginity to the highest bidder," the businesswoman exclaims.
		<<case "fairy">>
			give the dick a great big hug and suckle out all the precum!" the fairy exclaims, rubbing her legs together.
		<<case "pregnant fairy">>
			play meet the baby! ...Well, maybe just with you, <<if ($PC.title == 0)>>Big Sis<<else>>Big Bro<</if>>." the fairy exclaims, rubbing her legs together.
		<<case "goddess" "hypergoddess">>
			see her put that dick to work," the goddess exclaims, one sultry finger at her lips.
		<<case "loli">>
			play with her dick!" The little girl exclaims happily while jumping up and down.
		<<case "preggololi">>
			get that dick in me!" The little girl exclaims happily while caressing her belly and licking her lips.
		<<case "angel">>
			wrap that penis up in a nice bow for her wife to untie" the angel says, blushign and swaying side to side.
		<<case "cherub">>
			know how long she could go for," the cherub says, "She could probably fuck all night long!"
		<<case "incubus">>
			plow her ass and watch her ejaculate against her will," the incubus says, stroking her cock to erection.
		<<case "succubus">>
			teach her the perfect way to tease <<if def $PC.customTitle>>$PC.customTitle<<elseif $PC.title != 0>>Master<<else>>Mistress<</if>> with that cock," she says, her clit steadily enlarging till it's the size of her leg. She hefts it to her mouth and enthusiastically tongues her urethra.
		<<case "imp">>
			ride that cock until I'm too heavy to fly," the imp says, rubbing her belly and spreading her legs.
		<<case "witch">>
			play with that dick," the witch says, "Test my cock growth and cum amplification spells on someone else for once. Last time I sprouted a cock bigger than me and my belly steadily swelled with cum until I jacked off. I got so tired I couldn't do it anymore and nearly burst like a cum balloon..."
		<<case "ERROR_1606_APPEARANCE_FILE_CORRUPT">>
			fuck her cock," the avatar exclaims, her chest splitting open to reveal countless tentacles, the flesh at their bases writhing with unborn young. "Squirm down to her balls and pump them full of larva and watch her birth them until she breaks."
		<<case "schoolgirl">>
			suck that dick," the schoolgirl exclaims, and sticks out her tongue.
		<<default>>
			train that body," she says.
		<</switch>>
	<<else>>
		<<switch $assistantAppearance>>
		<<case "monstergirl">>
			 "And I love to fuck futas!" she shouts, dicks painfully erect.
		<<case "shemale">>
			"And I love to fuck futas!" she shouts, cock painfully erect.
		<<case "amazon">>
			"And I love to fuck futas!" she howls, and then adds more quietly, "A-and get fucked by futas."
		<<case "businesswoman">>
			"And I love to fuck futas!" she exclaims, and then blushes furiously.
		<<case "fairy" "pregnant fairy">>
			"And I love to fuck futas!" she exclaims, flying circles around you.
		<<case "goddess" "hypergoddess">>
			"And I love to fuck futas!" she exclaims, awestruck with anticipation.
		<<case "loli" "cherub">>
			"And I love to fuck futas!" she exclaims, then blushes beet red when she realizes what she said.
		<<case "preggololi">>
			"And I love to fuck futas!" she exclaims, rubbing her bulging belly with anticipation.
		<<case "angel">>
			"Keep it away from me! It is an aberration!" she shouts, before flying off screen in a huff.
		<<case "incubus">>
			"And I love to fuck futas!" she exclaims, her erect dick throbbing with anticipation.
		<<case "succubus">>
			"And I love to get fucked by futas!" she exclaims, <<if $PC.dick == 1 && $PC.vagina == 1>>blowing you a kiss<<else>>her pussy already wet with anticipation<</if>>.
		<<case "imp">>
			"And I love to get fucked by futas till I'm too heavy to fly," she exclaims, rubbing her belly and spreading her legs.
		<<case "witch">>
			"And I love to fuck futas!" she exclaims, readying a spell to make them last longer.
		<<case "ERROR_1606_APPEARANCE_FILE_CORRUPT">>
			"And I love to fuck futas!" she exclaims, her chest splitting open to reveal countless tentacles, the flesh at their bases writhing with unborn young. "So many holes to force young into! I can't wait to turn it into a bulging, squirming, bursting nursery!"
		<<case "schoolgirl">>
			"And I love to fuck futas!" she exclaims, bouncing with excitement.
		<<default>>
			"And I love to fuck futas!" she exclaims.
		<</switch>>
	<</if>>
	"Ahem. I have stored the confirmation code, <<if $PC.title == 1>>Sir<<else>>Ma'am<</if>>," she notes. "If you wish to take advantage of this promotion, use the slave buying menu to navigate to the appropriate school next week. I have appended a note to that school's entry to remind you."
<</if>>

<</nobr>>\


code:
:: Retrieve [silently]

<<switch $returnTo>>
<<case "Pit">>
	<<set $fighterIDs.delete($slaves[$i].ID)>>
<<case "Coursing Association">>
	<<set $Lurcher = 0>>
<<default>>
	<<removeJob $slaves[$i] $slaves[$i].assignment>>
<</switch>>

<<goto $returnTo>>

repo_name: GavAndAlt/fc

license: mit


code:
:: RIE Eligibility Check

<<silently>>

<<set $eventSlave = 0, $eligibleSlaves = []>>

<<for $i = 0; $i < $slaves.length; $i++>>
	<<if $slaves[$i].assignmentVisible == 1>>
	<<if $slaves[$i].fuckdoll == 0>>
		<<set $eligibleSlaves.push($slaves[$i])>>
	<</if>>
	<</if>>
<</for>>

<<if $hostageRescued == 1>>
	<<goto "P hostage acquisition">>
<<elseif $eligibleSlaves.length == 0>>
	<<goto "Next Week">>
<<else>>
	<<goto "Random Individual Event">>
<</if>>

<</silently>>


code:
:: Rules Assistant Report [nobr]

<<set _SL = $slaves.length>>

<<for $i = 0; $i < _SL; $i++>>
	<<if ($slaves[$i].useRulesAssistant == 1)>>
		<<CheckAutoRulesActivate $slaves[$i]>>
		<<DefaultRules $slaves[$i]>>
	<</if>>
<</for>>


code:
:: Rules Autosurgery [nobr]

<<set $surgeries = []>>

<<if $HGTastes>>
	<<if $HGTastes == 1>>
		<<set $thisSurgery = {lactation: 0, cosmetic: 1, faceShape: "cute", lips: 10, hips: 0, hipsImplant: 0, butt: 0, accent: 0, shoulders: 0, shouldersImplant: 0, boobs: 0, holes: 0}>>
	<<elseif $HGTastes == 2>>
		<<set $thisSurgery = {lactation: 0, cosmetic: 1, faceShape: "cute", lips: 60, hips: 0, hipsImplant: 0, butt: 4, accent: 0, shoulders: 0, shouldersImplant: 0, boobs: 1200, holes: 0}>>
	<<else>>
		<<set $thisSurgery = {lactation: 0, cosmetic: 1, faceShape: "cute", lips: 95, hips: 0, hipsImplant: 0, butt: 8, accent: 0, shoulders: 0, shouldersImplant: 0, boobs: 10000, holes: 2}>>
	<</if>>
<<else>>
	<<for _r = $defaultRules.length-1; _r >= 0; _r-->>
		<<set _currentRule = $defaultRules[_r]>>
		<<if (def _currentRule) && (_currentRule.autoSurgery != 0)>>
			<<set $thisSurgery = _currentRule.surgery>>
			<<set _temp = lastLactationSurgeryRule($slaves[$i], $defaultRules)>>
			<<if _temp != null>>
				<<set $thisSurgery.lactation = _temp.surgery.lactation>>
			<</if>>
			<<set _temp = lastProstateSurgeryRule($slaves[$i], $defaultRules)>>
			<<if _temp != null>>
				<<set $thisSurgery.prostate = _temp.surgery.prostate>>
			<</if>>
			<<set _temp = lastLipSurgeryRule($slaves[$i], $defaultRules)>>
			<<if _temp != null>>
				<<set $thisSurgery.lips = _temp.surgery.lips>>
			<</if>>
			<<set _temp = lastButtSurgeryRule($slaves[$i], $defaultRules)>>
			<<if _temp != null>>
				<<set $thisSurgery.butt = _temp.surgery.butt>>
			<</if>>
			<<set _temp = lastBoobSurgeryRule($slaves[$i], $defaultRules)>>
			<<if _temp != null>>
				<<set $thisSurgery.boobs = _temp.surgery.boobs>>
			<</if>>
			<<if ($thisSurgery.hips !== "no default setting") && ($thisSurgery.butt !== "no default setting")>>
				<<if $slaves[$i].hips < -1>>
					<<if $thisSurgery.butt > 2>>
						<<set $thisSurgery.butt = 2>>
					<</if>>
				<<elseif $slaves[$i].hips < 0>>
					<<if $thisSurgery.butt > 4>>
						<<set $thisSurgery.butt = 4>>
					<</if>>
				<<elseif $slaves[$i].hips > 0>>
					<<if $thisSurgery.butt > 8>>
						<<set $thisSurgery.butt = 8>>
					<</if>>
				<<elseif $slaves[$i].hips > 1>>
				<<else>>
					<<if $thisSurgery.butt > 6>>
						<<set $thisSurgery.butt = 6>>
					<</if>>
				<</if>>
			<</if>>
			<<break>>
		<</if>>
	<</for>>
<</if>>

<<if ndef $thisSurgery>>
	<<set $thisSurgery = {lactation: "no default setting", cosmetic: 0, accent: "no default setting", shoulders: "no default setting", shouldersImplant: "no default setting", boobs: "no default setting", hips: "no default setting", hipsImplant: "no default setting", butt: "no default setting", faceShape: "no default setting", lips: "no default setting", holes: 0}>>
<</if>>

<<set $seed = 0>>
<<for $seed == 0>>

<<if ($slaves[$i].health <= 20)>>
	<<set $seed = 1>>
<<else>>
<<if ($slaves[$i].lactation == 2) && ($thisSurgery.lactation == 0)>>
	<<set $surgeries.push("surgery to remove her lactation implants"), $slaves[$i].lactation = 0, $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif $slaves[$i].lactation != 2 && $thisSurgery.lactation>>
	<<set $surgeries.push("lactation inducing implanted drugs"), $slaves[$i].lactation = 2, $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].prostate == 2) && ($thisSurgery.prostate == 0)>>
	<<set $surgeries.push("surgery to remove her prostate implant"), $slaves[$i].prostate = 0, $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif $slaves[$i].prostate == 1 && $thisSurgery.prostate>>
	<<set $surgeries.push("a precum production enhancing drug implant"), $slaves[$i].prostate = 2, $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].anus > 3) && ($thisSurgery.cosmetic > 0)>>
	<<set $surgeries.push("a restored anus")>>
	<<set $slaves[$i].anus = 3>>
	<<if $slaves[$i].analSkill > 10>>
		<<set $slaves[$i].analSkill -= 10>>
	<</if>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].vagina > 3) && ($thisSurgery.cosmetic > 0)>>
	<<set $surgeries.push("a restored pussy")>>
	<<set $slaves[$i].vagina = 3>>
	<<if $slaves[$i].vaginalSkill > 10>>
		<<set $slaves[$i].vaginalSkill -= 10>>
	<</if>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].faceImplant <= 15) && ($slaves[$i].face <= 95) && ($thisSurgery.cosmetic != 0)>>
	<<set $surgeries.push("a nicer face")>>
	<<if $slaves[$i].faceShape == "masculine">><<set $slaves[$i].faceShape = "androgynous">><</if>>
	<<set $slaves[$i].faceImplant += 25-5*Math.trunc($PC.medicine/100)-5*$surgeryUpgrade>>
	<<set $slaves[$i].face = Math.clamp($slaves[$i].face+20,-100,100)>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].faceImplant <= 15) && ($slaves[$i].ageImplant != 1) && ($slaves[$i].visualAge >= 25) && ($thisSurgery.cosmetic != 0)>>
	<<set $surgeries.push("an age lift")>>
	<<set $slaves[$i].ageImplant = 1>>
	<<set $slaves[$i].faceImplant += 25-5*Math.trunc($PC.medicine/100)-5*$surgeryUpgrade>>
	<<if $slaves[$i].visualAge > 80>>
		<<set $slaves[$i].visualAge -= 40>>
	<<elseif $slaves[$i].visualAge >= 70>>
		<<set $slaves[$i].visualAge -= 30>>
	<<elseif $slaves[$i].visualAge > 50>>
		<<set $slaves[$i].visualAge -= 20>>
	<<elseif $slaves[$i].visualAge > 36>>
		<<set $slaves[$i].visualAge -= 10>>
	<<else>>
		<<set $slaves[$i].visualAge -= 5>>
	<</if>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].voice == 1) && ($slaves[$i].voiceImplant == 0) && ($thisSurgery.cosmetic != 0)>>
	<<set $surgeries.push("a feminine voice")>>
	<<set $slaves[$i].voice += 1>>
	<<set $slaves[$i].voiceImplant += 1>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].waist >= -10) && ($thisSurgery.cosmetic != 0)>>
	<<set $surgeries.push("a narrower waist")>>
	<<set $slaves[$i].waist -= 20>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif (($slaves[$i].boobShape == "saggy") || ($slaves[$i].boobShape == "downward-facing")) && ($thisSurgery.cosmetic != 0) && ($slaves[$i].breastMesh != 1)>>
	<<set $surgeries.push("a breast lift")>>
	<<set $slaves[$i].boobShape = "normal">>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif (($slaves[$i].boobShape == "normal") || ($slaves[$i].boobShape == "wide-set")) && ($thisSurgery.cosmetic != 0) && ($slaves[$i].breastMesh != 1)>>
	<<if $slaves[$i].boobs > 800>>
		<<set $slaves[$i].boobShape = "torpedo-shaped">>
	<<else>>
		<<set $slaves[$i].boobShape = "perky">>
	<</if>>
	<<set $surgeries.push("more interestingly shaped breasts")>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($thisSurgery.lips == 0) && ($slaves[$i].lipsImplant > 0)>>
	<<set $surgeries.push("surgery to remove her lip implants")>>
	<<set $slaves[$i].lips -= $slaves[$i].lipsImplant>>
	<<set $slaves[$i].lipsImplant = 0>>
	<<if $slaves[$i].oralSkill > 10>>
		<<set $slaves[$i].oralSkill -= 10>>
	<</if>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].lips <= 95) && ($slaves[$i].lips < $thisSurgery.lips)>>
	<<if $thisSurgery.lips !== "no default setting">>
		<<set $surgeries.push("bigger lips")>>
		<<set $slaves[$i].lipsImplant += 10>>
		<<set $slaves[$i].lips += 10>>
		<<if $slaves[$i].oralSkill > 10>>
			<<set $slaves[$i].oralSkill -= 10>>
		<</if>>
		<<set $cash -= $surgeryCost>>
		<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
	<</if>>
<<elseif ($slaves[$i].faceImplant <= 45) && ($slaves[$i].face <= 95) && ($thisSurgery.cosmetic == 2)>>
	<<set $surgeries.push("a nicer face")>>
	<<if $slaves[$i].faceShape == "masculine">><<set $slaves[$i].faceShape = "androgynous">><</if>>
	<<set $slaves[$i].faceImplant += 25-5*Math.trunc($PC.medicine/100)-5*$surgeryUpgrade>>
	<<set $slaves[$i].face = Math.clamp($slaves[$i].face+20,-100,100)>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].faceImplant <= 45) && ($slaves[$i].ageImplant != 1) && ($slaves[$i].visualAge >= 25) && ($thisSurgery.cosmetic == 2)>>
	<<set $surgeries.push("an age lift")>>
	<<set $slaves[$i].ageImplant = 1>>
	<<if $slaves[$i].visualAge > 80>>
		<<set $slaves[$i].visualAge -= 40>>
	<<elseif $slaves[$i].visualAge >= 70>>
		<<set $slaves[$i].visualAge -= 30>>
	<<elseif $slaves[$i].visualAge > 50>>
		<<set $slaves[$i].visualAge -= 20>>
	<<elseif $slaves[$i].visualAge > 36>>
		<<set $slaves[$i].visualAge -= 10>>
	<<else>>
		<<set $slaves[$i].visualAge -= 5>>
	<</if>>
	<<set $slaves[$i].faceImplant += 25-5*Math.trunc($PC.medicine/100)-5*$surgeryUpgrade>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].waist >= -95) && ($thisSurgery.cosmetic == 2) && ($seeExtreme == 1)>>
	<<set $surgeries.push("a narrower waist")>>
	<<set $slaves[$i].waist = Math.clamp($slaves[$i].waist-20,-100,100)>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].voice < 3) && ($slaves[$i].voiceImplant == 0) && ($thisSurgery.cosmetic == 2)>>
	<<set $surgeries.push("a bimbo's voice")>>
	<<set $slaves[$i].voice += 1>>
	<<set $slaves[$i].voiceImplant += 1>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($thisSurgery.butt == 0) && ($slaves[$i].buttImplant > 0)>>
	<<set $surgeries.push("surgery to remove her butt implants")>>
	<<set $slaves[$i].butt -= $slaves[$i].buttImplant>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($thisSurgery.boobs == 0) && ($slaves[$i].boobsImplant > 0)>>
	<<set $surgeries.push("surgery to remove her boob implants")>>
	<<set $slaves[$i].boobs -= $slaves[$i].boobsImplant>>
	<<set $slaves[$i].boobsImplant = 0>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].butt <= 3) && ($slaves[$i].butt < $thisSurgery.butt)>>
	<<if $thisSurgery.butt !== "no default setting">>
		<<set $surgeries.push("a bigger butt")>>
		<<set $slaves[$i].buttImplant = 1>>
		<<set $slaves[$i].butt += 1>>
		<<set $cash -= $surgeryCost>>
		<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
	<</if>>
<<elseif ($slaves[$i].boobs <= 600) && ($slaves[$i].lactation < 2) && ($slaves[$i].boobs+400 <= $thisSurgery.boobs)>>
	<<if $thisSurgery.boobs !== "no default setting">>
		<<set $surgeries.push("bigger boobs")>>
		<<set $slaves[$i].boobsImplant += 400>>
		<<set $slaves[$i].boobs += 400>>
		<<set $cash -= $surgeryCost>>
		<<if $PC.medicine >= 100>>
		<<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
	<</if>>
<<elseif ($slaves[$i].boobs <= 600) && ($slaves[$i].lactation < 2) && ($slaves[$i].boobs+200 <= $thisSurgery.boobs)>>
	<<if $thisSurgery.boobs !== "no default setting">>
		<<set $surgeries.push("modestly bigger boobs")>>
		<<set $slaves[$i].boobsImplant += 200>>
		<<set $slaves[$i].boobs += 200>>
		<<set $cash -= $surgeryCost>>
		<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
	<</if>>
<<elseif ($slaves[$i].butt <= 5) && ($slaves[$i].butt < $thisSurgery.butt)>>
	<<if $thisSurgery.butt !== "no default setting">>
		<<set $surgeries.push("a bigger butt")>>
		<<set $slaves[$i].buttImplant = 1>>
		<<set $slaves[$i].butt += 1>>
		<<set $cash -= $surgeryCost>>
		<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
	<</if>>
<<elseif ($slaves[$i].boobs <= 2000) && ($slaves[$i].lactation < 2) && ($slaves[$i].boobs+400 < $thisSurgery.boobs)>>
	<<if $thisSurgery.boobs !== "no default setting">>
		<<set $surgeries.push("bigger boobs")>>
		<<set $slaves[$i].boobsImplant += 400>>
		<<set $slaves[$i].boobs += 400>>
		<<set $cash -= $surgeryCost>>
		<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
	<</if>>
<<elseif ($slaves[$i].anus > 0) && ($surgeryUpgrade == 1) && ($thisSurgery.holes == 2)>>
	<<set $surgeries.push("a virgin anus")>>
	<<set $slaves[$i].anus = 0>>
	<<if $slaves[$i].analSkill > 10>>
		<<set $slaves[$i].analSkill -= 10>>
	<</if>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].vagina > 0) && ($surgeryUpgrade == 1) && ($thisSurgery.holes == 2)>>
	<<set $surgeries.push("a virgin pussy")>>
	<<set $slaves[$i].vagina = 0>>
	<<if $slaves[$i].vaginalSkill > 10>>
		<<set $slaves[$i].vaginalSkill -= 10>>
	<</if>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].anus > 1) && ($thisSurgery.holes == 1)>>
	<<set $surgeries.push("a tighter anus")>>
	<<set $slaves[$i].anus = 1>>
	<<if $slaves[$i].analSkill > 10>>
		<<set $slaves[$i].analSkill -= 10>>
	<</if>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].vagina > 1) && ($thisSurgery.holes == 1)>>
	<<set $surgeries.push("a tighter pussy")>>
	<<set $slaves[$i].vagina = 1>>
	<<if $slaves[$i].vaginalSkill > 10>>
		<<set $slaves[$i].vaginalSkill -= 10>>
	<</if>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
<<elseif ($slaves[$i].butt <= 8) && ($slaves[$i].butt < $thisSurgery.butt)>>
	<<if $thisSurgery.butt !== "no default setting">>
		<<set $surgeries.push("a bigger butt")>>
		<<set $slaves[$i].buttImplant = 1>>
		<<set $slaves[$i].butt += 1>>
		<<set $cash -= $surgeryCost>>
		<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
	<</if>>
<<elseif ($slaves[$i].boobs <= 9000) && ($slaves[$i].lactation < 2) && ($slaves[$i].boobs < $thisSurgery.boobs)>>
	<<if $thisSurgery.boobs !== "no default setting">>
		<<set $surgeries.push("bigger boobs")>>
		<<set $slaves[$i].boobsImplant += 200>>
		<<set $slaves[$i].boobs += 200>>
		<<set $cash -= $surgeryCost>>
		<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 5>><<else>><<set $slaves[$i].health -= 10>><</if>>
	<</if>>
<<else>>

<<set $seed = 1>>
<</if>>
<</if>>

<</for>>

<<if $surgeries.length > 0>>
	<<set $surgeriesDisplay = "">>
	<<for $j = 0; $j < $surgeries.length; $j++>>
		<<set $seed = $surgeries[$j]>>
		<<set $surgeriesDisplay = ($surgeriesDisplay + $seed)>>
		<<if $j < $surgeries.length-2>>
		<<set $surgeriesDisplay = ($surgeriesDisplay + ", ")>>
		<<elseif $j < $surgeries.length-1>>
		<<if $surgeries.length > 2>>
			<<set $surgeriesDisplay = ($surgeriesDisplay + ", and ")>>
		<<else>>
			<<set $surgeriesDisplay = ($surgeriesDisplay + " and ")>>
		<</if>>
		<</if>>
	<</for>>
	<<if $assistantName == "your personal assistant">>Your personal assistant<<else>>$assistantName<</if>>, ordered to apply surgery, gives $slaves[$i].slaveName @@.lime;$surgeriesDisplay.@@
<</if>>


code:
:: Rules Facility Remove [nobr]

<<if _combinedRule.facilityRemove>>

	<<switch _combinedRule.assignFacility>>
	<<case "brothel">>
		<<if $activeSlave.assignment == "work in the brothel">>
			<<if ($Madam == 0) || ($Madam.ID != $activeSlave.ID)>>

$activeSlave.slaveName has been removed from $brothelName and has been assigned to _combinedRule.removalAssignment.
				<<assignJob $activeSlave _combinedRule.removalAssignment>>
			<</if>>
		<</if>>

	<<case "club">>
		<<if $activeSlave.assignment == "serve in the club">>
			<<if ($DJ == 0) || ($DJ.ID != $activeSlave.ID)>>

$activeSlave.slaveName has been removed from $clubName and has been assigned to _combinedRule.removalAssignment.
				<<assignJob $activeSlave _combinedRule.removalAssignment>>
			<</if>>
		<</if>>

	<<case "dairy">>
		<<if $activeSlave.assignment == "work in the dairy">>
			<<if ($Milkmaid == 0) || ($Milkmaid.ID != $activeSlave.ID)>>

$activeSlave.slaveName has been removed from $dairyName and has been assigned to _combinedRule.removalAssignment.
				<<assignJob $activeSlave _combinedRule.removalAssignment>>
			<</if>>
		<</if>>

	<<case "arcade">>
		<<if $activeSlave.assignment == "be confined in the arcade">>

$activeSlave.slaveName has been removed from $arcadeName and has been assigned to _combinedRule.removalAssignment.
			<<assignJob $activeSlave _combinedRule.removalAssignment>>
		<</if>>

	<<case "spa">>
		<<if $activeSlave.assignment == "rest in the spa">>
			<<if ($Attendant == 0) || ($Attendant.ID != $activeSlave.ID)>>

$activeSlave.slaveName has been removed from $spaName and has been assigned to _combinedRule.removalAssignment.
				<<assignJob $activeSlave _combinedRule.removalAssignment>>
			<</if>>
		<</if>>

	<<case "clinic">>
		<<if $activeSlave.assignment == "get treatment in the clinic">>
			<<if ($Nurse == 0) || ($Nurse.ID != $activeSlave.ID)>>

$activeSlave.slaveName has been removed from $clinicName and has been assigned to _combinedRule.removalAssignment.
				<<assignJob $activeSlave _combinedRule.removalAssignment>>
			<</if>>
		<</if>>

	<<case "mastersuite">>
		<<if $activeSlave.assignment == "serve in the master suite">>
			<<if ($Concubine == 0) || ($Concubine.ID != $activeSlave.ID)>>

$activeSlave.slaveName has been removed from $masterSuiteName and has been assigned to _combinedRule.removalAssignment.
				<<assignJob $activeSlave _combinedRule.removalAssignment>>
			<</if>>
		<</if>>

	<<case "hgsuite">>
		<<if $activeSlave.assignment == "live with your Head Girl">>
			<<if ($HeadGirl == 0) || ($HeadGirl.ID != $activeSlave.ID)>>

$activeSlave.slaveName has been removed from $HGSuiteName and has been assigned to _combinedRule.removalAssignment.
				<<assignJob $activeSlave _combinedRule.removalAssignment>>
			<</if>>
		<</if>>

	<<case "servantsquarters">>
		<<if $activeSlave.assignment == "work as a servant">>
			<<if ($Stewardess == 0) || ($Stewardess.ID != $activeSlave.ID)>>

$activeSlave.slaveName has been removed from $servantsQuartersName and has been assigned to _combinedRule.removalAssignment.
				<<assignJob $activeSlave _combinedRule.removalAssignment>>
			<</if>>
		<</if>>

	<<case "schoolroom">>
		<<if $activeSlave.assignment == "learn in the schoolroom">>
			<<if ($Schoolteacher == 0) || ($Schoolteacher.ID != $activeSlave.ID)>>

$activeSlave.slaveName has been removed from $schoolroomName and has been assigned to _combinedRule.removalAssignment.
				<<assignJob $activeSlave _combinedRule.removalAssignment>>
			<</if>>
		<</if>>

	<<case "cellblock">>
		<<if $activeSlave.assignment == "be confined in the cellblock">>
			<<if ($Wardeness == 0) || ($Wardeness.ID != $activeSlave.ID)>>

$activeSlave.slaveName has been removed from $cellblockName and has been assigned to _combinedRule.removalAssignment.
				<<assignJob $activeSlave _combinedRule.removalAssignment>>
			<</if>>
		<</if>>
	<</switch>>
<</if>>


code:
:: Rules Slave Deselect Workaround

<<nobr>>
<<set $nextButton = "Continue", $nextLink = "Rules Slave Select">>

<<if ruleSlaveSelected($activeSlave, $currentRule)>>
	<<set $currentRule.selectedSlaves.delete($activeSlave.ID)>>
<</if>>

<<goto "Rules Slave Select">>
<</nobr>>


code:
:: Rules Slave Exclude

<<nobr>>
<<set $nextButton = "Continue", $nextLink = "Rules Assistant">>

<<if ndef $currentRule.excludedSlaves>>
	<<set $currentRule.excludedSlaves to []>>
<</if>>

<<if ($currentRule.excludedSlaves.length < 1)>>
	<<set $Flag = 0>>
	Select slaves to exclude from Rule $r:
	<<include "Slave Summary">>
<<else>>
	Slaves currently excluded from Rule $r: [[Clear list|Rules Slave Exclude][$currentRule.excludedSlaves = []]]
	<<set $Flag = 1>>
	<<include "Slave Summary">>

	Select more slaves to exclude from Rule $r:
	<<set $Flag = 0>>
	<<include "Slave Summary">>
<</if>>
<</nobr>>


code:
:: Rules Slave Exclude Workaround

<<nobr>>
<<set $nextButton = "Continue", $nextLink = "Rules Slave Exclude">>

<<if !ruleSlaveExcluded($activeSlave, $currentRule)>>
	<<set $currentRule.excludedSlaves.push($activeSlave.ID)>>
	<<if ruleSlaveSelected($activeSlave, $currentRule)>>
		<<set $currentRule.selectedSlaves.delete($activeSlave.ID)>>
	<</if>>
<</if>>

<<goto "Rules Slave Exclude">>
<</nobr>>


code:
:: Rules Slave NoExclude Workaround

<<nobr>>
<<set $nextButton = "Continue", $nextLink = "Rules Slave Exclude">>

<<if ruleSlaveExcluded($activeSlave, $currentRule)>>
	<<set $currentRule.excludedSlaves.delete($activeSlave.ID)>>
<</if>>

<<goto "Rules Slave Exclude">>
<</nobr>>


code:
:: Rules Slave Select

<<nobr>>
<<set $nextButton = "Continue", $nextLink = "Rules Assistant">>

<<if ndef $currentRule.selectedSlaves>>
	<<set $currentRule.selectedSlaves to []>>
<</if>>

<<if ($currentRule.selectedSlaves.length < 1)>>
	<<set $Flag = 0>>
	Choose specific slaves to limit Rule $r:
	<<include "Slave Summary">>
<<else>>
	Rule $r currently limited to specific slaves: [[Clear list|Rules Slave Select][$currentRule.selectedSlaves = []]]
	<<set $Flag = 1>>
	<<include "Slave Summary">>

	Choose more specific slaves:
	<<set $Flag = 0>>
	<<include "Slave Summary">>
<</if>>
<</nobr>>


code:
:: Rules Slave Select Workaround

<<nobr>>
<<set $nextButton = "Continue", $nextLink = "Rules Slave Select">>

<<if !ruleSlaveSelected($activeSlave, $currentRule)>>
	<<set $currentRule.selectedSlaves.push($activeSlave.ID)>>
	<<if ruleSlaveExcluded($activeSlave, $currentRule)>>
		<<set $currentRule.excludedSlaves.delete($activeSlave.ID)>>
	<</if>>
<</if>>

<<goto "Rules Slave Select">>
<</nobr>>


code:
:: SA be your Head Girl [nobr]

<<set $HGTimeInGrade += 1>>

<<if $arcologies[0].FSEgyptianRevivalistLaw == 0>>
	helps manage your other slaves. She helps them when they try and fail, and punishes them when they fail to try.
<<else>>
	serves as your Consort. Though she is still your slave, her status is scarcely below that of a citizen. She @@.green;contributes to your reputation@@ just like a Concubine, and she is @@.hotpink;conscious@@ of the @@.mediumaquamarine;trust@@ you place in her.
	<<set $slaves[$i].devotion += 1>>
	<<set $slaves[$i].trust += 1>>
	<<silently>>
	<<include "SA please you">>
	<</silently>>
	<<if $slaves[$i].relationship > 4>>
		<<if $familyTesting == 1>>
			<<if $slaves[$i].relationshipTarget == $Concubine.ID>>
				<<if totalRelatives($slaves[$i]) > 0>>
					<<if $Concubine.mother == $slaves[$i].ID || $Concubine.father == $slaves[$i].ID>>
						Your Concubine is your Consort's daughter-wife. Truly, $arcologies[0].name looks up to you @@.green;as children to a father.@@
						<<set $rep += 250>>
					<<elseif $slaves[$i].mother == $Concubine.ID>>
						Your Concubine is your Consort's mother-wife. Truly, $arcologies[0].name looks up to you @@.green;as children to a father.@@
						<<set $rep += 250>>
					<<elseif $slaves[$i].father == $Concubine.ID>>
						Your Concubine is your Consort's father-wife. Truly, $arcologies[0].name looks up to you @@.green;as children to a father.@@
						<<set $rep += 250>>
					<<else>>
						<<switch areSisters($slaves[$i], $Concubine)>>
						<<case 1>>
							Your Concubine is your Consort's twin-wife. Truly, $arcologies[0].name looks up to you @@.green;as children to a father.@@
							<<set $rep += 250>>
						<<case 2>>
							Your Concubine is your Consort's sister-wife. Truly, $arcologies[0].name looks up to you @@.green;as children to a father.@@
							<<set $rep += 250>>
						<<case 3>>
							Your Concubine is your Consort's half-sister-wife. Truly, $arcologies[0].name looks up to you @@.green;as children to a father.@@
							<<set $rep += 250>>
						<<default>>
							//Shit went wrong! Post this in a bug report!// This is @@.red;NOT as it should be.@@
							<<set $rep += 100>>
						<</switch>>
					<</if>>
				<<else>>
					Your Consort and your Concubine are wives to each other and to Pharaoh. This is @@.green;as it should be.@@
					<<set $rep += 100>>
				<</if>>
			<<else>>
				<<if totalRelatives($slaves[$i]) > 0>>
					<<set _sbyhg = $slaves.findIndex(function(s) { return s.ID == $slaves[$i].relationshipTarget; })>>
					<<if _sbyhg != -1>>
						<<if $slaves[_sbyhg].mother == $slaves[$i].ID || $slaves[_sbyhg].father == $slaves[$i].ID>>
							Your Consort has a daughter-wife. This is @@.green;as it should be.@@
							<<set $rep += 100>>
						<<elseif $slaves[$i].mother == $slaves[_sbyhg].ID>>
							Your Consort has a mother-wife. This is @@.green;as it should be.@@
							<<set $rep += 100>>
						<<elseif $slaves[$i].father == $slaves[_sbyhg].ID>>
							Your Consort has a father-wife. This is @@.green;as it should be.@@
							<<set $rep += 100>>
						<<else>>
							<<switch areSisters($slaves[$i], $slaves[_sbyhg])>>
							<<case 1>>
								Your Consort has a twin-wife. This is @@.green;as it should be.@@
								<<set $rep += 100>>
							<<case 2>>
								Your Consort has a sister-wife. This is @@.green;as it should be.@@
								<<set $rep += 100>>
							<<case 3>>
								Your Consort has a half-sister-wife. This is @@.green;as it should be.@@
								<<set $rep += 100>>
							<</switch>>
						<</if>>
					<</if>>
				<</if>>
			<</if>>
		<<else>>
			<<if $slaves[$i].relationshipTarget == $Concubine.ID>>
				<<if $slaves[$i].relationTarget == $Concubine.ID>>
				Your Concubine is your Consort's $slaves[$i].relation-wife. Truly, $arcologies[0].name looks up to you @@.green;as children to a father.@@
				<<set $rep += 250>>
				<<else>>
				Your Consort and your Concubine are wives to each other and to Pharaoh. This is @@.green;as it should be.@@
				<<set $rep += 100>>
				<</if>>
			<<elseif $slaves[$i].relationshipTarget == $slaves[$i].relationTarget>>
				Your Consort has a $slaves[$i].relation-wife. This is @@.green;as it should be.@@
				<<set $rep += 100>>
			<</if>>
		<</if>> /* closes extended family mode */
	<</if>>
<</if>>

<<if ($slaves[$i].livingRules == "luxurious") && ($HGSuite == 1)>>
	Being continually trusted with this position @@.hotpink;increases her devotion to you,@@ and encourages her to @@.mediumaquamarine;trust you in turn;@@ she's also @@.hotpink;grateful@@ for her nice suite, which makes her one of the best provided for slaves in the Free Cities.
	<<set $slaves[$i].devotion += 4>>
	<<set $slaves[$i].trust += 4>>
<<elseif ($slaves[$i].livingRules == "luxurious")>>
	Being continually trusted with this position @@.hotpink;increases her devotion to you@@ and encourages her to @@.mediumaquamarine;trust you in turn.@@
	<<set $slaves[$i].devotion += 4>>
	<<set $slaves[$i].trust += 4>>
<<elseif ($HGSuite == 1)>>
	She's @@.hotpink;grateful@@ for her nice suite, which makes her one of the best provided for slaves in the Free Cities. Being continually trusted with this position encourages her to @@.mediumaquamarine;trust you in turn.@@
	<<set $slaves[$i].devotion += 2>>
	<<set $slaves[$i].trust += 4>>
<<else>>
	Being continually trusted with this position @@.hotpink;slightly increases her devotion to you,@@ though she harbors some doubts because she isn't allowed a room of her own to set her apart from the other slaves.
	<<set $slaves[$i].devotion += 1>>
<</if>>

<<if ($personalAttention == "HG")>>
	You're cooperating with her this week, working with $assistantName to free up some of her time so she can target more slaves in need of individual attention.
	<<if ($slaves[$i].trust > 95)>>
	She is so trusting of you that she can act as your own right hand, allowing her to oversee your slaves with remarkable efficiency.
	<<else>>
	This arrangement @@.mediumaquamarine;builds trust@@ between you.
	<<set $slaves[$i].trust += 2>>
	<</if>>
<</if>>

<<if ($HGFormality == 0)>>
	<<if ($slaves[$i].trust > 95)>>
	Every so often, when you're alone, she calls you <<if $PC.title == 1>>Sir<<else>>Ma'am<</if>>. She treats your permission to do this as a sacred thing, and @@.hotpink;loves you for it.@@
	<<set $slaves[$i].devotion += 1>>
	<<else>>
	Your permission to be informal in private @@.mediumorchid;confuses her@@ a little, since she isn't perfectly confident enough to be comfortable with the idea.
	<<set $slaves[$i].devotion -= 1>>
	<</if>>
<</if>>

<<if $slaves[$i].fetishKnown == 1>>
	<<if $slaves[$i].fetish == "dom">>
		<<if ($slaves[$i].fetishKnown == 1)>>
		<<if ($slaves[$i].fetishStrength <= 95)>>
			Having all the slaves look up to and obey her advances her @@.lightcoral;dominant tendencies.@@
			<<set $slaves[$i].fetishStrength += 4>>
		<</if>>
		<</if>>
	<<elseif $slaves[$i].fetishStrength > random(20,40)>>
		The sheer variety of sexual situations she sees and participates in @@.pink;broaden her sexual interests@@ and incline her to take a dominant sexual role.
		<<set $slaves[$i].fetishStrength -= 4>>
	<<else>>
		Having all the slaves look up to and obey her affects her sexuality, turning her into a @@.lightcoral;bit of a dominatrix.@@
		<<set $slaves[$i].fetish = "dom">>
		<<set $slaves[$i].fetishStrength = 20>>
	<</if>>
<<else>>
	<<if random(1,3) == 1>>
		Having all the slaves look up to and obey her affects her sexuality, turning her into a @@.lightcoral;bit of a dominatrix.@@
		<<set $slaves[$i].fetish = "dom">>
		<<set $slaves[$i].fetishStrength = 20>>
		<<set $slaves[$i].fetishKnown = 1>>
	<</if>>
<</if>>

<<if ($slaves[$i].dick > 0) && ($universalRulesImpregnation == "HG") && canPenetrate($slaves[$i])>>
	She finds her duty to impregnate slaves at will sexually satisfying.
	<<set $slaves[$i].need = 0>>
<<else>>
	<<if $slaves.length > 5>>
		Seldom a day goes by without her finding an outlet among your slaves for her sexual desires.
		<<set $slaves[$i].need = 0>>
	<</if>>
<</if>>

<<if $slaves[$i].prestige == 0>>
<<if $HGTimeInGrade+($slaves[$i].intelligence*5)+($slaves[$i].devotion/10)+($slaves[$i].trust/10) > 50>>
	$slaves[$i].slaveName has rendered such long and competent service as your Head Girl that many of your citizens have come to rely on her word as an extension of yours, trusting that if she does something, it's because you trust her to. @@.green;She has become prestigious on her own merits, a remarkable achievement for a slave!@@
	<<set $slaves[$i].prestige += 1>>
	<<set $slaves[$i].prestigeDesc = "Many citizens respect her long and able service as your Head Girl.">>
<</if>>
<</if>>


code:
:: SA chooses own clothes [nobr]

<<if $slaves[$i].choosesOwnClothes == 1>>

<<SlavePronouns $slaves[$i]>>

<<set $bellyAccessory = $slaves[$i].bellyAccessory>>

<<if $slaves[$i].fetish == "mindbroken">>
	$pronounCap is fundamentally broken, but still follows some faint memories of standing within the wardrobe.
	<<if $slaves[$i].amp != 1 && $slaves[$i].heels == 1>>
		$pronounCap finds $pronoun can inexplicably walk if $pronoun wears heels; a daily lesson for $object, as $pronoun forgets shortly after leaving.
		<<set $slaves[$i].shoes = either("heels", "extreme heels", "boots")>>
	<</if>>
	<<if ($arcologies[0].FSRepopulationFocus > 0) && (!visibleBelly($slaves[$i]))>>
		$pronounCap sees the fake bellies; since every girl $pronoun has ever met has a rounded middle, it's only natuaral $pronoun is compelled to wear one.
		<<if $slaves[$i].weight > 130>>
			She struggles to fit it around her huge gut, only stopping when another slave takes it away from her so she moves on and stops blocking the wardrobe with her fat ass.
		<<else>>
			<<set $slaves[$i].bellyAccessory = "a large empathy belly">>
		<</if>>
	<</if>>
	Faced with so many choices and no thought on the matter;
	<<set _clothingPool = []>>
	<<if ($arcologies[0].FSChattelReligionist > 0)>>
		$pronoun commonly sees others wearing chattel habits and is drawn to doing so <<print $object>>self.
		<<set $slaves[$i].clothes = "a chattel habit">>
	<<else>>
		<<if ($arcologies[0].FSEgyptianRevivalist > 0) && (random(1,3) == 1)>>
			<<set _clothingPool.push("egyptian")>>
		<<elseif ($arcologies[0].FSRomanRevivalist > 0) && (random(1,3) == 1)>>
			<<set _clothingPool.push("roman")>>
		<<elseif ($arcologies[0].FSAztecRevivalist > 0) && (random(1,3) == 1)>>
			<<set _clothingPool.push("aztec")>>
		<<elseif ($arcologies[0].FSEdoRevivalist > 0) && (random(1,3) == 1)>>
			<<set _clothingPool.push("edo")>>
		<<elseif ($arcologies[0].FSArabianRevivalist > 0) && (random(1,3) == 1)>>
			<<set _clothingPool.push("arabic")>>
		<<elseif ($arcologies[0].FSChineseRevivalist > 0) && (random(1,3) == 1)>>
			<<set _clothingPool.push("chinese")>>
		<</if>>
		<<if ($arcologies[0].FSGenderFundamentalist > 0) && (random(1,3) == 1)>>
			<<set _clothingPool.push("genderFund")>>
		<</if>>
		<<if ($arcologies[0].FSPaternalist > 0) && (random(1,3) == 1)>>
			<<set _clothingPool.push("paternalist")>>
		<<elseif ($arcologies[0].FSDegradationist > 0) && (random(1,3) == 1)>>
			<<set _clothingPool.push("degradationist")>>
		<</if>>
		<<if ($arcologies[0].FSMaturityPreferentialist > 0) && (random(1,3) == 1)>>
			<<set _clothingPool.push("mature")>>
		<<elseif ($arcologies[0].FSYouthPreferentialist > 0) && (random(1,3) == 1)>>
			<<set _clothingPool.push("youth")>>
		<</if>>
		<<if ($arcologies[0].FSPhysicalIdealist > 0) && (random(1,3) == 1)>>
			<<set _clothingPool.push("physicalIdealist")>>
		<</if>>
		<<if ($arcologies[0].FSPastoralist > 0) && (random(1,3) == 1)>>
			<<set _clothingPool.push("pastoralist")>>
		<</if>>
		<<if ($arcologies[0].FSBodyPurist > 0) && (random(1,3) == 1)>>
			<<set _clothingPool.push("bodyPurist")>>
		<</if>>
		<<set _clothingPool.push("panties")>>
		<<switch _randomClothes>>
		<<case "egyptian">>
			$pronoun commonly sees others wearing nothing but jewelry and is drawn to doing so <<print $object>>self.
			<<set $slaves[$i].clothes = "slutty jewelry">>
		<<case "roman">>
			$pronoun commonly sees others wearing togas and is drawn to doing so <<print $object>>self.
			<<set $slaves[$i].clothes = "a toga">>
		<<case "aztec">>
			$pronoun commonly sees others wearing huipils and is drawn to doing so <<print $object>>self.
			<<set $slaves[$i].clothes = "a huipil">>
		<<case "edo">>
			$pronoun commonly sees others wearing kimonos and is drawn to doing so <<print $object>>self.
			<<set $slaves[$i].clothes = "a kimono">>
		<<case "arabic">>
			$pronoun commonly sees others wearing silk and is drawn to doing so <<print $object>>self.
			<<set $slaves[$i].clothes = "harem gauze">>
		<<case "chinese">>
			$pronoun commonly sees others wearing qipaos and is drawn to doing so <<print $object>>self.
			<<set $slaves[$i].clothes = "a slutty qipao">>
		<<case "genderFund">>
			<<if random(1,2) == 1>>
				$pronoun commonly sees cheerleaders around and instinctually follows along.
				<<set $slaves[$i].clothes = either("a cheerleader outfit", "a schoolgirl outfit")>>
			<<else>>
				$pronoun commonly sees bunnies around and instinctually follows along.
				<<set $slaves[$i].clothes = "a bunny outfit">>
			<</if>>
		<<case "paternalist">>
			$pronoun commonly sees others wearing clothing and is drawn to doing so <<print $object>>self.
			<<set $slaves[$i].clothes = "conservative clothing">>
		<<case "mature">>
			$pronoun commonly sees others wearing suits and is drawn to doing so <<print $object>>self.
			<<set $slaves[$i].clothes = either("slutty business attire", "a nice maid outfit", "a military uniform", "nice business attire")>>
		<<case "youth">>
			$pronoun commonly sees schoolgirls around and instinctually follows along.
			<<set $slaves[$i].clothes = either("a schoolgirl outfit", "a cheerleader outfit")>>
		<<case "degradationist">>
			$pronoun commonly sees others wearing chains and is drawn to doing so <<print $object>>self.
			<<set $slaves[$i].clothes = either("chains", "uncomfortable straps", "shibari ropes")>>
		<<case "physicalIdealist">>
			$pronoun commonly sees naked girls around and seldom realizes they are coated in oil.
			<<set $slaves[$i].clothes = either("body oil", "no clothing", "no clothing")>>
		<<case "pastoralist">>
			$pronoun commonly sees cowgirls around and instinctually follows along.
			<<set $slaves[$i].clothes = "Western clothing">>
		<<case "bodyPurist">>
			$pronoun commonly sees others wearing tight, form-fitting clothes and is drawn to doing so <<print $object>>self.
			<<set $slaves[$i].clothes = either("a leotard", "a string bikini", "a scalemail bikini", "a slave gown", "a comfortable bodysuit", "restrictive latex", "clubslut netting", "a leotard", "a halter top dress")>>
		<<default>>
			$pronoun chooses to put on underwear, the reasons lost to $possessive, and moves on.
			<<set $slaves[$i].clothes = "attractive lingerie">>
		<</switch>>
	<</if>>
<<else>>

<<if ($slaves[$i].devotion <= 20)>>
	$pronounCap uses the ability to select outfits to cover up with comfortable cut-offs and a t-shirt,
	<<set $slaves[$i].clothes = "cutoffs and a t-shirt">>
	<<if ($slaves[$i].amp != 1)>>
		<<if ($slaves[$i].heels == 0)>>
			and wears comfortable flats,
			<<set $slaves[$i].shoes = "flats">>
		<<else>>
			and angrily wears the heels $pronoun needs to walk,
			<<set $slaves[$i].shoes = "heels">>
		<</if>>
	<</if>>
	@@.mediumorchid;increasing $possessive independence.@@
	<<set $slaves[$i].devotion -= 5>>

<<else>>
	$pronounCap @@.hotpink;loves@@ being able to dress <<print $object>>self,
	<<set $slaves[$i].devotion += 1>>

<<if ($arcologies[0].FSEgyptianRevivalist > 0)>>
	dons a wesekh to support your ancient Egyptian pretensions,
	<<set $slaves[$i].collar = "ancient Egyptian">>
<</if>>

<<if ($arcologies[0].FSRepopulationFocus > 0) && (!visibleBelly($slaves[$i])) && $slaves[$i].sexualFlaw != "breeder">>
	<<if $slaves[$i].weight > 130>>
		struggles to fit a fake pregnant belly around her gut before giving up and hoping she can pass as fecund,
	<<else>>
		straps on a fake pregnant belly to fit in with all the other pregnant girls,
		<<set $slaves[$i].bellyAccessory = "a large empathy belly">>
	<</if>>
<<elseif (!visibleBelly($slaves[$i])) && ($slaves[$i].fetish == "pregnancy") && isItemAccessible("a small empathy belly") && $slaves[$i].sexualFlaw != "breeder" && $slaves[$i].weight <= 130>>
	<<if ($slaves[$i].fetishStrength <= 30)>>
	  <<set _bellySeed = random(1,3)>>
	  <<if _bellySeed == 1>>
		straps on a 1st trimester belly to satisfy $possessive curiosity,
		<<set $slaves[$i].bellyAccessory = "a small empathy belly">>
	  <<elseif _bellySeed == 2>>
		straps on a 2nd trimester belly to satisfy $possessive curiosity,
		<<set $slaves[$i].bellyAccessory = "a medium empathy belly">>
	  <<else>>
		straps on a 3rd trimester belly to satisfy $possessive curiosity,
		<<set $slaves[$i].bellyAccessory = "a large empathy belly">>
	  <</if>>
	<<elseif ($slaves[$i].fetishStrength <= 95)>>
	  straps on a 3rd trimester belly to satisfy $possessive pregnancy fetish,
	  <<set $slaves[$i].bellyAccessory = "a large empathy belly">>
	<<elseif ($slaves[$i].fetishStrength > 95)>>
	  straps on the largest belly $pronoun can find to satisfy $possessive pregnancy fetish,
	  <<set $slaves[$i].bellyAccessory = "a huge empathy belly">>
	<</if>>
<<elseif (setup.fakeBellies.includes($bellyAccessory)) && ($slaves[$i].fetish != "pregnancy")>>
	removes $possessive fake belly, since $pronoun dislikes it,
	<<set $slaves[$i].bellyAccessory to "none">>
<<elseif (setup.fakeBellies.includes($bellyAccessory)) && ($slaves[$i].sexualFlaw == "breeder")>>
	pulls $possessive fake belly off, disgusted by it,
	<<set $slaves[$i].bellyAccessory = "none">>
<</if>>

<<if ($arcologies[0].FSChattelReligionist > 0)>>
	and wears a chattel habit to conform to your arcology's culture.
	<<set $slaves[$i].clothes = "a chattel habit">>
<<elseif ($arcologies[0].FSEgyptianRevivalist > 0) && (random(1,3) == 1)>>
	and complements it with golden bangles, since no clothing is necessary for a sex slave in your warm and sunny arcology.
	<<set $slaves[$i].clothes = "slutty jewelry">>
<<elseif ($arcologies[0].FSRomanRevivalist > 0) && (random(1,3) == 1)>>
	and wears a toga to take part in your Roman revivalism.
	<<set $slaves[$i].clothes = "a toga">>
<<elseif ($arcologies[0].FSEdoRevivalist > 0) && (random(1,3) == 1)>>
	and wears a kimono, overjoyed that such lovely clothing is now appropriate.
	<<set $slaves[$i].clothes = "a kimono">>
<<elseif ($arcologies[0].FSArabianRevivalist > 0) && (random(1,3) == 1)>>
	and wears a harem outfit to look like a slave girl fit for a Sultan.
	<<set $slaves[$i].clothes = "harem gauze">>
<<elseif ($arcologies[0].FSChineseRevivalist > 0) && (random(1,3) == 1)>>
	and wears a brief qipao to show off and look Chinese at the same time.
	<<set $slaves[$i].clothes = "a slutty qipao">>
<<elseif ($arcologies[0].FSGenderFundamentalist > 0) && (random(1,3) == 1)>>
	and wears a cheerleader outfit to look like a hot slut.
	<<set $slaves[$i].clothes = "a cheerleader outfit">>
<<elseif ($arcologies[0].FSGenderFundamentalist > 0) && (random(1,3) == 1)>>
	and wears a bunny outfit to look like a slut from the glory days.
	<<set $slaves[$i].clothes = "a bunny outfit">>
<<elseif ($arcologies[0].FSPaternalist > 0) && (random(1,3) == 1)>>
	and wears conservative clothing, as permitted by your paternalism.
	<<set $slaves[$i].clothes = "conservative clothing">>
<<elseif ($arcologies[0].FSMaturityPreferentialist > 0) && (random(1,3) == 1) && ($slaves[$i].visualAge >= 30)>>
	and wears a slutty suit to look like the ideal horny older woman.
	<<set $slaves[$i].clothes = "slutty business attire">>
<<elseif ($arcologies[0].FSYouthPreferentialist > 0) && (random(1,3) == 1)>>
	and wears a schoolgirl outfit to look younger.
	<<set $slaves[$i].clothes = "a schoolgirl outfit">>
<<elseif ($arcologies[0].FSDegradationist > 0) && (random(1,3) == 1)>>
	and wears chains, to degrade <<print $object>>self as required by your societal goals.
	<<set $slaves[$i].clothes = "chains">>
<<elseif ($arcologies[0].FSPhysicalIdealist > 0) && (random(1,3) == 1)>>
	and coats <<print $object>>self in body oil to show off how $pronoun's part of your physical idealism.
	<<set $slaves[$i].clothes = "body oil">>
<<elseif ($arcologies[0].FSPastoralist > 0) && (random(1,3) == 1)>>
	and wears Western clothing, since $pronoun thinks it fits with pastoralism.
	<<set $slaves[$i].clothes = "Western clothing">>
<<elseif ($arcologies[0].FSBodyPurist > 0) && (random(1,3) == 1)>>
	and wears a leotard to show off the purity of $possessive body.
	<<set $slaves[$i].clothes = "a leotard">>
<<elseif ($slaves[$i].behavioralQuirk == "sinful") && (random(1,3) == 1)>>
	and dresses up like a succubus because it makes $object feel naughty.
	<<set $slaves[$i].clothes = "a succubus outfit">>
<<elseif ($slaves[$i].behavioralQuirk == "fitness") && (random(1,3) == 1)>>
	and wears spats and a tank top to give herself a sporty look.
	<<set $slaves[$i].clothes = "spats and a tank top">>
<<elseif ($slaves[$i].assignment == "guard you")>>
	<<if ($slaves[$i].muscles > 30)>>
	and wears a scalemail bikini to show off $possessive curves and strength.
	<<set $slaves[$i].clothes = "a scalemail bikini">>
	<<elseif random(1,2) == 1>>
	and wears a bodysuit to show off $possessive curves without hindering $possessive deadliness.
	<<set $slaves[$i].clothes = "a comfortable bodysuit">>
	<<else>>
	and wears a military uniform to look the part of the honor guard.
	<<set $slaves[$i].clothes = "a military uniform">>
	<</if>>
<<elseif ($slaves[$i].assignment == "be the Nurse")>>
	and wears a nice nurse outfit to look professional before $possessive patients.
	<<set $slaves[$i].clothes = "a nice nurse outfit">>
<<elseif ($slaves[$i].assignment == "recruit girls")>>
	and wears a flattering mini dress to appear sexy and carefree before those desperately seeking a better life.
	<<set $slaves[$i].clothes = "a mini dress">>
<<elseif ($slaves[$i].assignment == "be the Madam")>>
	and wears a slutty suit to entice and arouse while still looking managerial.
	<<set $slaves[$i].clothes = "slutty business attire">>
<<elseif ($slaves[$i].assignment == "be the DJ")>>
	and wears clubslut netting to look like the perfect easy club girl.
	<<set $slaves[$i].clothes = "clubslut netting">>
<<elseif ($slaves[$i].assignment == "be the Milkmaid")>>
	and wears a sturdy maid outfit, since anything else might be damaged by $possessive hard work with the cows.
	<<set $slaves[$i].clothes = "a nice maid outfit">>
<<elseif ($slaves[$i].assignment == "be the Milkmaid") && canPenetrate($slaves[$i]) && $cumSlaves > 2>>
	and wears a slutty nurse outfit to help keep $possessive charges hard.
	<<set $slaves[$i].clothes = "a slutty nurse outfit">>
<<elseif ($slaves[$i].assignment == "be your Head Girl")>>
	and wears a handsome suit to give $object that extra touch of authority.
	<<set $slaves[$i].clothes = "nice business attire">>
<<elseif ($slaves[$i].assignment == "be the Schoolteacher")>>
	and wears a schoolgirl outfit to help keep $possessive charges on task.
	<<set $slaves[$i].clothes = "a schoolgirl outfit">>
<<elseif ($slaves[$i].assignment == "be the Attendant")>>
	and wears a string bikini, since it's all $pronoun can wear that won't be ruined by all the moisture in the spa.
	<<set $slaves[$i].clothes = "a string bikini">>
<<elseif ($slaves[$i].assignment == "be the Wardeness")>>
	and dons battledress, the better to intimidate the prisoners.
	<<set $slaves[$i].clothes = "battledress">>
<<elseif ($slaves[$i].assignment == "be your concubine")>>
	and goes naked, since it's $possessive honored role to be the chief object of your desire.
	<<set $slaves[$i].clothes = "no clothing">>
<<elseif ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetish == "submissive")>>
	<<if random(1,2) == 1>>
	and wears restrictive latex to encourage others to dominate $object.
	<<set $slaves[$i].clothes = "restrictive latex">>
	<<else>>
	and wears shibari ropes to encourage others to dominate $object.
	<<set $slaves[$i].clothes = "shibari ropes">>
	<</if>>
<<elseif ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetish == "dom")>>
	<<if random(1,2) == 1>>
	and wears a handsome suit, since $pronoun likes other slaves to look up to $object.
	<<set $slaves[$i].clothes = "nice business attire">>
	<<else>>
	and wears a full body latex catsuit to look the part of the whip cracking domme.
	<<set $slaves[$i].clothes = "a latex catsuit">>
	<</if>>
<<elseif ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetish == "masochist")>>
	and wears painfully restrictive bondage gear, since $pronoun likes the torment.
	<<set $slaves[$i].clothes = "uncomfortable straps">>
<<elseif ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetish == "sadist")>>
	and wears an elegant gown, since $pronoun thinks it makes $object look the part of the femme fatale.
	<<set $slaves[$i].clothes = "a slave gown">>
<<elseif ($slaves[$i].attrKnown == 1) && ($slaves[$i].attrXY > 85)>>
	and wears a schoolgirl outfit to show off a some T&A to attract boys.
	<<set $slaves[$i].clothes = "a schoolgirl outfit">>
<<elseif ($slaves[$i].attrKnown == 1) && ($slaves[$i].attrXX > 85)>>
	and wears a fashionable gown, since girls appreciate nice clothes.
	<<set $slaves[$i].clothes = "a slave gown">>
<<elseif ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetish == "cumslut")>>
	and wears cut-offs and a t-shirt, because the fun yet relatively conservative outfit seems to encourage others to ask $object for blowjobs.
	<<set $slaves[$i].clothes = "cutoffs and a t-shirt">>
<<elseif ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetish == "humiliation")>>
	and wears leather straps with rings over $possessive private parts because $pronoun enjoys the embarrassment such a humiliating outfit causes $object.
	<<set $slaves[$i].clothes = "uncomfortable straps">>
<<elseif ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetish == "buttslut")>>
	and wears nothing other than slutty bangles, because $pronoun likes to catch the eye without putting anything between cocks and $possessive rear end.
	<<set $slaves[$i].clothes = "slutty jewelry">>
<<elseif ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetish == "mindbroken")>>
	or would, if $pronoun were competent or sane.
	<<set $slaves[$i].clothes = "no clothing">>
<<elseif ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetish == "pregnancy")>>
	and wears a short maid dress, because $pronoun wants to look motherly and fuckable at the same time.
	<<set $slaves[$i].clothes = "a slutty maid outfit">>
<<elseif ($slaves[$i].energy > 95)>>
	but goes nude, since as a nympho $pronoun gets plenty of attention anyway, and considers clothes an unnecessary hindrance.
	<<set $slaves[$i].clothes = "no clothing">>
<<elseif ($slaves[$i].assignment == "rest")>>
	and wears a comfortable t-shirt and cutoffs to relax.
	<<set $slaves[$i].clothes = "cutoffs and a t-shirt">>
<<elseif ($slaves[$i].assignment == "be a subordinate slave")>>
	but gives up and goes naked after the other slaves constantly tear whatever $pronoun's wearing off $object.
	<<set $slaves[$i].clothes = "no clothing">>
<<elseif ($slaves[$i].assignment == "work a glory hole")>>
	but doesn't bother wearing anything, since no one can see $possessive clothing when $pronoun's immured inside a glory hole.
	<<set $slaves[$i].clothes = "no clothing">>
<<elseif ($slaves[$i].assignment == "take classes") || ($slaves[$i].assignment == "learn in the schoolroom")>>
	and wears a schoolgirl outfit, since it seems most appropriate.
	<<set $slaves[$i].clothes = "a schoolgirl outfit">>
<<elseif (($slaves[$i].assignment == "whore") || ($slaves[$i].assignment == "work in the brothel")) && bigBelly($slaves[$i]) && isItemAccessible("a maternity dress")>>
	and wears pretty lingerie to show off $possessive merchandise and accentuate $possessive pregnancy while still looking a little classy.
	<<set $slaves[$i].clothes = "attractive lingerie for a pregnant woman">>
<<elseif ($slaves[$i].assignment == "whore") || ($slaves[$i].assignment == "work in the brothel")>>
	and wears pretty lingerie to show off $possessive merchandise and still look a little classy.
	<<set $slaves[$i].clothes = "attractive lingerie">>
<<elseif ($slaves[$i].assignment == "serve the public") || ($slaves[$i].assignment == "serve in the club")>>
	and wears string lingerie to look fun and fuckable.
	<<set $slaves[$i].clothes = "a string bikini">>
<<elseif ($slaves[$i].assignment == "get milked") || ($slaves[$i].assignment == "work in the dairy")>>
	and wears sturdy lingerie to offer the best support to $possessive sore, milk-filled udders.
	<<set $slaves[$i].clothes = "attractive lingerie">>
<<elseif ($slaves[$i].assignment == "be a servant") || ($slaves[$i].assignment == "work as a servant")>>
	and wears a sturdy maid outfit, since anything else might be damaged by $possessive hard work around the penthouse.
	<<set $slaves[$i].clothes = "a nice maid outfit">>
<<elseif bigBelly($slaves[$i])>>
	<<if random(1,2) == 1>>
		and wears pretty lingerie to show off $possessive merchandise while giving $possessive big belly plenty of room to hang free.
		<<set $slaves[$i].clothes = "attractive lingerie">>
	<<elseif isItemAccessible("attractive lingerie for a pregnant woman") && $slaves[$i].energy > 90>>
		and wears pretty lingerie to show off $possessive merchandise and accentuate $possessive pregnancy while giving it plenty of room to hang free.
		<<set $slaves[$i].clothes = "attractive lingerie for a pregnant woman">>
	<<elseif isItemAccessible("a maternity dress")>>
		and wears a conservative dress with plenty of give for $possessive belly to stretch it.
		<<set $slaves[$i].clothes = "a maternity dress">>
	<<else>>
		and wears string lingerie to look fun and fuckable while giving $possessive big belly plenty of room to hang free.
		<<set $slaves[$i].clothes = "a string bikini">>
	<</if>>
<<else>>
	and wears string lingerie to show off $possessive body.
	<<set $slaves[$i].clothes = "a string bikini">>
<</if>>

<<if $arcologies[0].FSRestart != "unset">>
	<<if $slaves[$i].choosesOwnChastity == 1>>
		<<if $slaves[$i].vagina > -1 && $slaves[$i].breedingMark == 1 && ($slaves[$i].vaginalAccessory == "chastity belt" || $slaves[$i].vaginalAccessory == "combined chastity")>>
			$pronounCap unfastens $possessive chastity belt knowing full well $possessive role in life is to carry $possessive <<WrittenMaster $slaves[$i]>>'s children.
			<<set $slaves[$i].vaginalAccessory = "none">>
		<<elseif $slaves[$i].vagina > -1 && $slaves[$i].ovaries == 1 && $slaves[$i].preg == 0 && $slaves[$i].vaginalAccessory != "chastity belt">>
			$pronounCap also affixes a chastity belt over $possessive vagina to discourage use of $possessive reproductive organ.
			<<set $slaves[$i].vaginalAccessory = "chastity belt">>
		<<elseif $slaves[$i].vagina > -1 && ($slaves[$i].ovaries == 0 || $slaves[$i].preg < -1) && $slaves[$i].vaginalAccessory == "chastity belt">>
			$pronounCap removes $possessive chastity belt since no matter how hard someone tries, $pronoun can never become pregnant.
			<<set $slaves[$i].vaginalAccessory = "none">>
		<</if>>
		<<if $slaves[$i].dick > 0 && $slaves[$i].balls > 0 && $slaves[$i].dickAccessory != "chastity">>
			$pronounCap also affixes a chastity cage onto $possessive dick to discourage use of $possessive reproductive organ.
			<<set $slaves[$i].dickAccessory = "chastity">>
		<<elseif $slaves[$i].dick > 0 && $slaves[$i].balls == 0 && $slaves[$i].dickAccessory == "chastity">>
			$pronounCap removes $possessive chastity cage since even if $pronoun could get erect, $pronoun only shoots blanks.
			<<set $slaves[$i].dickAccessory = "none">>
		<</if>>
	<</if>>
<</if>>

<<if ($slaves[$i].amp != 1)>>
	<<if ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetish == "dom")>>
		$pronounCap wears boots to look like a proper dominant.
		<<set $slaves[$i].shoes = "boots">>
	<<elseif ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetish == "sadist")>>
		$pronounCap wears boots, since $pronoun thinks they make $possessive look dangerous.
		<<set $slaves[$i].shoes = "boots">>
	<<elseif ($slaves[$i].heels == 1)>>
		$pronounCap wears the heels $pronoun needs to walk.
		<<set $slaves[$i].shoes = "heels">>
	<<elseif ($slaves[$i].fetishKnown == 1) && ($slaves[$i].fetish == "none")>>
		$pronounCap wears comfortable flats, since $pronoun doesn't have a fetish to show off.
		<<set $slaves[$i].shoes = "flats">>
	<<else>>
		$pronounCap wears heels to strut $possessive stuff.
		<<set $slaves[$i].shoes = "heels">>
	<</if>>
<</if>>

<</if>> /* closes devotion > 20 */

<</if>> /* closes MB check */

<</if>> /* closes choosesOwnClothes check */