code:
:: Backwards Compatibility [nobr]

<<set $nextButton to "Continue", $nextLink to "Main", $returnTo to "Main">>

<<if ndef $summaryStats>>
	<<set $summaryStats = 0>>
<</if>>
<<if ndef $positionMainLinks>>
	<<set $positionMainLinks to -1>>
<</if>>
<<if ndef $seeImages>>
	<<set $seeImages = 0>>
<</if>>
<<if ndef $imageChoice>>
	<<set $imageChoice = 0>>
<</if>>
<<if ndef $seeMainFetishes>>
	<<set $seeMainFetishes = 0>>
<</if>>
<<if ndef $seeSummaryImages>>
	<<set $seeSummaryImages to 1>>
<</if>>
<<if ndef $universalRulesBirthing>>
	<<set $universalRulesBirthing = 0>>
<</if>>
<<if ndef $HGSeverity>>
	<<set $HGSeverity = 0>>
<</if>>
<<if def $recruiters>>
	<<unset $recruiters>>
<</if>>

<<if ndef $RulesID>>
	<<set $RulesID to 3>>
	<<include "Init Rules">>
<<else>>
	<<for _i to 0; _i < $defaultRules.length; _i++>>
		<<if ndef $defaultRules[_i].standardReward>>
			<<set $defaultRules[_i].standardReward to "no default setting">>
		<</if>>
		<<if ndef $defaultRules[_i].standardPunishment>>
			<<set $defaultRules[_i].standardPunishment to "no default setting">>
		<</if>>
		<<if ndef $defaultRules[_i].aVirginAccessory>>
			<<set $defaultRules[_i].aVirginAccessory to "no default setting">>
		<</if>>
		<<if ndef $defaultRules[_i].aVirginDickAccessory>>
			<<set $defaultRules[_i].aVirginDickAccessory to "no default setting">>
		<</if>>
		<<if ndef $defaultRules[_i].aVirginButtplug>>
			<<set $defaultRules[_i].aVirginButtplug to "no default setting">>
		<</if>>
		<<if ndef $defaultRules[_i].surgery>>
			<<set $defaultRules[_i].surgery to {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>>
		<<if ndef $defaultRules[_i].dietMilk>>
			<<set $defaultRules[_i].dietMilk = 0>>
		<</if>>
		<<if ndef $defaultRules[_i].dietCum>>
			<<set $defaultRules[_i].dietCum = 0>>
		<</if>>
		<<if ndef $defaultRules[_i].clitSettingXY>>
			<<set $defaultRules[_i].clitSettingXY = "no default setting">>
		<</if>>
		<<if ndef $defaultRules[_i].clitSettingXX>>
			<<set $defaultRules[_i].clitSettingXX = "no default setting">>
		<</if>>
		<<if ndef $defaultRules[_i].clitSettingEnergy>>
			<<set $defaultRules[_i].clitSettingEnergy = "no default setting">>
		<</if>>
		<<switch $defaultRules[_i].clitSetting>>
		<<case "all">>
			<<set $defaultRules[_i].clitSetting = "no default setting", $defaultRules[_i].clitSettingXY = 100, $defaultRules[_i].clitSettingXX = 100, $defaultRules[_i].clitSettingEnergy = 100>>
		<<case "none">>
			<<set $defaultRules[_i].clitSetting = "no default setting", $defaultRules[_i].clitSettingXY = 0, $defaultRules[_i].clitSettingXX = 0, $defaultRules[_i].clitSettingEnergy = 0>>
		<<case "men">>
			<<set $defaultRules[_i].clitSetting = "no default setting", $defaultRules[_i].clitSettingXY = 100>>
		<<case "women">>
			<<set $defaultRules[_i].clitSetting = "no default setting", $defaultRules[_i].clitSettingXX = 100>>
		<</switch>>
	<</for>>
<</if>>

<<if ndef $month>>
<<set $month to either("January","February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")>>
<</if>>
<<if ndef $day>>
<<set $day to random(1,28)>>
<</if>>
<<if ndef $year>>
	<<set $year to (2037+Math.floor($week/52))>>
<</if>>

<<if ndef $arcologies>>
<<set $arcologies to []>>

<<set $arcologies[0] to {name: "Arcology X-", direction: 0, government: 1, honeymoon: 0, prosperity: 50, FSSupremacist: "unset", FSSupremacistRace: 0, FSSubjugationist: "unset", FSSubjugationistRace: 0, FSGenderRadicalist: "unset", FSGenderFundamentalist: "unset", FSPaternalist: "unset", FSDegradationist: "unset", FSBodyPurist: "unset", FSTransformationFetishist: "unset", FSYouthPreferentialist: "unset", FSMaturityPreferentialist: "unset", FSSlimnessEnthusiast: "unset", FSAssetExpansionist: "unset", FSPastoralist: "unset", FSPhysicalIdealist: "unset", FSChattelReligionist: "unset", FSRomanRevivalist: "unset", FSEgyptianRevivalist: "unset", FSEdoRevivalist: "unset", FSArabianRevivalist: "unset", FSChineseRevivalist: "unset", FSNull: "unset", embargo: 1, embargoTarget: -1, influenceTarget: -1, influenceBonus: 0, rival: 0}>>
<</if>>

<<if def $arcologyName>>
	<<set $arcologies[0].name to $arcologyName>>
	<<unset $arcologyName>>
<<elseif ndef $arcologies[0].name>>
	<<set $arcologies[0].name = "Arcology X-4">>
<</if>>

<<if ndef $arcologies[0].ownership>>
	<<set $arcologies[0].ownership to 50>>
<</if>>
<<if ndef $arcologies[0].minority>>
	<<set $arcologies[0].minority to 20>>
<</if>>
<<if ndef $arcologies[0].embargo>>
	<<set $arcologies[0].embargo to 1>>
<</if>>
<<if ndef $arcologies[0].embargoTarget>>
	<<set $arcologies[0].embargoTarget to -1>>
<</if>>
<<if ndef $arcologies[0].influenceTarget>>
	<<set $arcologies[0].influenceTarget to -1>>
<</if>>
<<if ndef $arcologies[0].influenceBonus>>
	<<set $arcologies[0].influenceBonus to -1>>
<</if>>
<<if ndef $arcologies[0].rival>>
	<<set $arcologies[0].rival to 0>>
<</if>>
<<if ndef $arcologies[0].FSNull>>
	<<set $arcologies[0].FSNull to "unset">>
<</if>>
<<if ndef $arcologies[0].PCminority>>
	<<set $arcologies[0].PCminority to 0>>
<</if>>
<<if ndef $arcologies[0].demandFactor>>
	<<set $arcologies[0].demandFactor to 250>>
<</if>>
<<if ndef $arcologies[0].leaderID>>
	<<set $arcologies[0].leaderID to 0>>
<</if>>

<<if def $FSSupremacist and $FSSupremacist != "unset">>
	<<set $arcologies[0].FSSupremacist to $FSSupremacist>>
	<<set $arcologies[0].FSSupremacistRace to $FSSupremacistRace>>
	<<unset $FSSupremacist>>
	<<unset $FSSupremacistRace>>
<<elseif ndef $arcologies[0].FSSupremacist>>
	<<set $arcologies[0].FSSupremacist to "unset">>
<</if>>

<<if def $FSSupremacistLawME and $FSSupremacistLawME != 0>>
	<<set $arcologies[0].FSSupremacistLawME to $FSSupremacistLawME>>
	<<unset $FSSupremacistLawME>>
<<elseif ndef $arcologies[0].FSSupremacistLawME>>
	<<set $arcologies[0].FSSupremacistLawME to 0>>
<</if>>

<<if def $FSSubjugationist and $FSSubjugationist != "unset">>
	<<set $arcologies[0].FSSubjugationist to $FSSubjugationist>>
	<<set $arcologies[0].FSSubjugationistRace to $FSSubjugationistRace>>
	<<unset $FSSubjugationist>>
	<<unset $FSSubjugationistRace>>
<<elseif ndef $arcologies[0].FSSubjugationist>>
	<<set $arcologies[0].FSSubjugationist to "unset">>
<</if>>

<<if def $FSSubjugationistLawME and $FSSubjugationistLawME != 0>>
	<<set $arcologies[0].FSSubjugationistLawME to $FSSubjugationistLawME>>
	<<unset $FSSubjugationistLawME>>
<<elseif ndef $arcologies[0].FSSubjugationistLawME>>
	<<set $arcologies[0].FSSubjugationistLawME to 0>>
<</if>>

<<if def $FSDegradationist and $FSDegradationist != "unset">>
	<<set $arcologies[0].FSDegradationist to $FSDegradationist>>
	<<unset $FSDegradationist>>
<<elseif ndef $arcologies[0].FSDegradationist>>
	<<set $arcologies[0].FSDegradationist to "unset">>
<</if>>

<<if def $FSDegradationistLaw and $FSDegradationistLaw != 0>>
	<<set $arcologies[0].FSDegradationistLaw to $FSDegradationistLaw>>
	<<unset $FSDegradationistLaw>>
<<elseif ndef $arcologies[0].FSDegradationistLaw>>
	<<set $arcologies[0].FSDegradationistLaw to 0>>
<</if>>

<<if def $FSPaternalist and $FSPaternalist != "unset">>
	<<set $arcologies[0].FSPaternalist to $FSPaternalist>>
	<<unset $FSPaternalist>>
<<elseif ndef $arcologies[0].FSPaternalist>>
	<<set $arcologies[0].FSPaternalist to "unset">>
<</if>>

<<if def $FSPaternalistLaw and $FSPaternalistLaw != 0>>
	<<set $arcologies[0].FSPaternalistLaw to $FSPaternalistLaw>>
	<<unset $FSPaternalistLaw>>
<<elseif ndef $arcologies[0].FSPaternalistLaw>>
	<<set $arcologies[0].FSPaternalistLaw to 0>>
<</if>>

<<if def $FSGenderFundamentalist and $FSGenderFundamentalist != "unset">>
	<<set $arcologies[0].FSGenderFundamentalist to $FSGenderFundamentalist>>
	<<unset $FSGenderFundamentalist>>
<<elseif ndef $arcologies[0].FSGenderFundamentalist>>
	<<set $arcologies[0].FSGenderFundamentalist to "unset">>
<</if>>

<<if def $FSGenderFundamentalistSMR and $FSGenderFundamentalistSMR != 0>>
	<<set $arcologies[0].FSGenderFundamentalistSMR to $FSGenderFundamentalistSMR>>
	<<unset $FSGenderFundamentalistSMR>>
<<elseif ndef $arcologies[0].FSGenderFundamentalistSMR>>
	<<set $arcologies[0].FSGenderFundamentalistSMR to 0>>
<</if>>

<<if def $FSGenderRadicalist and $FSGenderRadicalist != "unset">>
	<<set $arcologies[0].FSGenderRadicalist to $FSGenderRadicalist>>
	<<unset $FSGenderRadicalist>>
<<elseif ndef $arcologies[0].FSGenderRadicalist>>
	<<set $arcologies[0].FSGenderRadicalist to "unset">>
<</if>>

<<if def $FSGenderRadicalistLaw and $FSGenderRadicalistLaw != 0>>
	<<set $arcologies[0].FSGenderRadicalistLaw to $FSGenderRadicalistLaw>>
	<<unset $FSGenderRadicalistLaw>>
<<elseif ndef $arcologies[0].FSGenderRadicalistLaw>>
	<<set $arcologies[0].FSGenderRadicalistLaw to 0>>
<</if>>

<<if def $FSBodyPurist and $FSBodyPurist != "unset">>
	<<set $arcologies[0].FSBodyPurist to $FSBodyPurist>>
	<<unset $FSBodyPurist>>
<<elseif ndef $arcologies[0].FSBodyPurist>>
	<<set $arcologies[0].FSBodyPurist to "unset">>
<</if>>

<<if def $FSBodyPuristLaw and $FSBodyPuristLaw != 0>>
	<<set $arcologies[0].FSBodyPuristLaw to $FSBodyPuristLaw>>
	<<unset $FSBodyPuristLaw>>
<<elseif ndef $arcologies[0].FSBodyPuristLaw>>
	<<set $arcologies[0].FSBodyPuristLaw to 0>>
<</if>>

<<if def $FSPhysicalIdealist and $FSPhysicalIdealist != "unset">>
	<<set $arcologies[0].FSPhysicalIdealist to $FSPhysicalIdealist>>
	<<unset $FSPhysicalIdealist>>
<<elseif ndef $arcologies[0].FSPhysicalIdealist>>
	<<set $arcologies[0].FSPhysicalIdealist to "unset">>
<</if>>

<<if def $FSPhysicalIdealistSMR and $FSPhysicalIdealistSMR != 0>>
	<<set $arcologies[0].FSPhysicalIdealistSMR to $FSPhysicalIdealistSMR>>
	<<unset $FSPhysicalIdealistSMR>>
<<elseif ndef $arcologies[0].FSPhysicalIdealistSMR>>
	<<set $arcologies[0].FSPhysicalIdealistSMR to 0>>
<</if>>

<<if def $FSTransformationFetishist and $FSTransformationFetishist != "unset">>
	<<set $arcologies[0].FSTransformationFetishist to $FSTransformationFetishist>>
	<<unset $FSTransformationFetishist>>
<<elseif ndef $arcologies[0].FSTransformationFetishist>>
	<<set $arcologies[0].FSTransformationFetishist to "unset">>
<</if>>

<<if def $FSTransformationFetishistLaw and $FSTransformationFetishistLaw != 0>>
	<<set $arcologies[0].FSTransformationFetishistLaw to $FSTransformationFetishistLaw>>
	<<unset $FSTransformationFetishistLaw>>
<<elseif ndef $arcologies[0].FSTransformationFetishistLaw>>
	<<set $arcologies[0].FSTransformationFetishistLaw to 0>>
<</if>>

<<if def $FSAssetExpansionist and $FSAssetExpansionist != "unset">>
	<<set $arcologies[0].FSAssetExpansionist to $FSAssetExpansionist>>
	<<unset $FSAssetExpansionist>>
<<elseif ndef $arcologies[0].FSAssetExpansionist>>
	<<set $arcologies[0].FSAssetExpansionist to "unset">>
<</if>>

<<if def $FSAssetExpansionistSMR and $FSAssetExpansionistSMR != 0>>
	<<set $arcologies[0].FSAssetExpansionistSMR to $FSAssetExpansionistSMR>>
	<<unset $FSAssetExpansionistSMR>>
<<elseif ndef $arcologies[0].FSAssetExpansionistSMR>>
	<<set $arcologies[0].FSAssetExpansionistSMR to 0>>
<</if>>

<<if def $FSSlimnessEnthusiast and $FSSlimnessEnthusiast != "unset">>
	<<set $arcologies[0].FSSlimnessEnthusiast to $FSSlimnessEnthusiast>>
	<<unset $FSSlimnessEnthusiast>>
<<elseif ndef $arcologies[0].FSSlimnessEnthusiast>>
	<<set $arcologies[0].FSSlimnessEnthusiast to "unset">>
<</if>>

<<if def $FSSlimnessEnthusiastSMR and $FSSlimnessEnthusiastSMR != 0>>
	<<set $arcologies[0].FSSlimnessEnthusiastSMR to $FSSlimnessEnthusiastSMR>>
	<<unset $FSSlimnessEnthusiastSMR>>
<<elseif ndef $arcologies[0].FSSlimnessEnthusiastSMR>>
	<<set $arcologies[0].FSSlimnessEnthusiastSMR to 0>>
<</if>>

<<if def $FSMaturityPreferentialist and $FSMaturityPreferentialist != "unset">>
	<<set $arcologies[0].FSMaturityPreferentialist to $FSMaturityPreferentialist>>
	<<unset $FSMaturityPreferentialist>>
<<elseif ndef $arcologies[0].FSMaturityPreferentialist>>
	<<set $arcologies[0].FSMaturityPreferentialist to "unset">>
<</if>>

<<if def $FSMaturityPreferentialistLaw and $FSMaturityPreferentialistLaw != 0>>
	<<set $arcologies[0].FSMaturityPreferentialistLaw to $FSMaturityPreferentialistLaw>>
	<<unset $FSMaturityPreferentialistLaw>>
<<elseif ndef $arcologies[0].FSMaturityPreferentialistLaw>>
	<<set $arcologies[0].FSMaturityPreferentialistLaw to 0>>
<</if>>

<<if def $FSYouthPreferentialist and $FSYouthPreferentialist != "unset">>
	<<set $arcologies[0].FSYouthPreferentialist to $FSYouthPreferentialist>>
	<<unset $FSYouthPreferentialist>>
<<elseif ndef $arcologies[0].FSYouthPreferentialist>>
	<<set $arcologies[0].FSYouthPreferentialist to "unset">>
<</if>>

<<if def $FSYouthPreferentialistLaw and $FSYouthPreferentialistLaw != 0>>
	<<set $arcologies[0].FSYouthPreferentialistLaw to $FSYouthPreferentialistLaw>>
	<<unset $FSYouthPreferentialistLaw>>
<<elseif ndef $arcologies[0].FSYouthPreferentialistLaw>>
	<<set $arcologies[0].FSYouthPreferentialistLaw to 0>>
<</if>>

<<if def $FSPastoralist and $FSPastoralist != "unset">>
	<<set $arcologies[0].FSPastoralist to $FSPastoralist>>
	<<unset $FSPastoralist>>
<<elseif ndef $arcologies[0].FSPastoralist>>
	<<set $arcologies[0].FSPastoralist to "unset">>
<</if>>

<<if def $FSPastoralistLaw and $FSPastoralistLaw != 0>>
	<<set $arcologies[0].FSPastoralistLaw to $FSPastoralistLaw>>
	<<unset $FSPastoralistLaw>>
<<elseif ndef $arcologies[0].FSPastoralistLaw>>
	<<set $arcologies[0].FSPastoralistLaw to 0>>
<</if>>

<<if def $FSChattelReligionist and $FSChattelReligionist != "unset">>
	<<set $arcologies[0].FSChattelReligionist to $FSChattelReligionist>>
	<<unset $FSChattelReligionist>>
<<elseif ndef $arcologies[0].FSChattelReligionist>>
	<<set $arcologies[0].FSChattelReligionist to "unset">>
<</if>>

<<if def $FSChattelReligionistLaw and $FSChattelReligionistLaw != 0>>
	<<set $arcologies[0].FSChattelReligionistLaw to $FSChattelReligionistLaw>>
	<<unset $FSChattelReligionistLaw>>
<<elseif ndef $arcologies[0].FSChattelReligionistLaw>>
	<<set $arcologies[0].FSChattelReligionistLaw to 0>>
<</if>>

<<if def $FSRomanRevivalist and $FSRomanRevivalist != "unset">>
	<<set $arcologies[0].FSRomanRevivalist to $FSRomanRevivalist>>
	<<unset $FSRomanRevivalist>>
<<elseif ndef $arcologies[0].FSRomanRevivalist>>
	<<set $arcologies[0].FSRomanRevivalist to "unset">>
<</if>>

<<if def $FSRomanRevivalistLaw and $FSRomanRevivalistLaw != 0>>
	<<set $arcologies[0].FSRomanRevivalistLaw to $FSRomanRevivalistLaw>>
	<<unset $FSRomanRevivalistLaw>>
<<elseif ndef $arcologies[0].FSRomanRevivalistLaw>>
	<<set $arcologies[0].FSRomanRevivalistLaw to 0>>
<</if>>

<<if def $FSEgyptianRevivalist and $FSEgyptianRevivalist != "unset">>
	<<set $arcologies[0].FSEgyptianRevivalist to $FSEgyptianRevivalist>>
	<<unset $FSEgyptianRevivalist>>
<<elseif ndef $arcologies[0].FSEgyptianRevivalist>>
	<<set $arcologies[0].FSEgyptianRevivalist to "unset">>
<</if>>

<<if def $FSEgyptianRevivalistLaw and $FSEgyptianRevivalistLaw != 0>>
	<<set $arcologies[0].FSEgyptianRevivalistLaw to $FSEgyptianRevivalistLaw>>
	<<unset $FSEgyptianRevivalistLaw>>
<<elseif ndef $arcologies[0].FSEgyptianRevivalistLaw>>
	<<set $arcologies[0].FSEgyptianRevivalistLaw to 0>>
<</if>>

<<if def $FSEdoRevivalist and $FSEdoRevivalist != "unset">>
	<<set $arcologies[0].FSEdoRevivalist to $FSEdoRevivalist>>
	<<unset $FSEdoRevivalist>>
<<elseif ndef $arcologies[0].FSEdoRevivalist>>
	<<set $arcologies[0].FSEdoRevivalist to "unset">>
<</if>>

<<if def $FSEdoRevivalistLaw and $FSEdoRevivalistLaw != 0>>
	<<set $arcologies[0].FSEdoRevivalistLaw to $FSEdoRevivalistLaw>>
	<<unset $FSEdoRevivalistLaw>>
<<elseif ndef $arcologies[0].FSEdoRevivalistLaw>>
	<<set $arcologies[0].FSEdoRevivalistLaw to 0>>
<</if>>

<<if def $FSArabianRevivalist and $FSArabianRevivalist != "unset">>
	<<set $arcologies[0].FSArabianRevivalist to $FSArabianRevivalist>>
	<<unset $FSArabianRevivalist>>
<<elseif ndef $arcologies[0].FSArabianRevivalist>>
	<<set $arcologies[0].FSArabianRevivalist to "unset">>
<</if>>

<<if def $FSArabianRevivalistLaw and $FSArabianRevivalistLaw != 0>>
	<<set $arcologies[0].FSArabianRevivalistLaw to $FSArabianRevivalistLaw>>
	<<unset $FSArabianRevivalistLaw>>
<<elseif ndef $arcologies[0].FSArabianRevivalistLaw>>
	<<set $arcologies[0].FSArabianRevivalistLaw to 0>>
<</if>>

<<if def $FSChineseRevivalist and $FSChineseRevivalist != "unset">>
	<<set $arcologies[0].FSChineseRevivalist to $FSChineseRevivalist>>
	<<unset $FSChineseRevivalist>>
<<elseif ndef $arcologies[0].FSChineseRevivalist>>
	<<set $arcologies[0].FSChineseRevivalist to "unset">>
<</if>>

<<if def $FSChineseRevivalistLaw and $FSChineseRevivalistLaw != 0>>
	<<set $arcologies[0].FSChineseRevivalistLaw to $FSChineseRevivalistLaw>>
	<<unset $FSChineseRevivalistLaw>>
<<elseif ndef $arcologies[0].FSChineseRevivalistLaw>>
	<<set $arcologies[0].FSChineseRevivalistLaw to 0>>
<</if>>

<<for _i to 1; _i < $arcologies.length; _i++>>
	<<if ndef $arcologies[_i].FSNull>>
		<<set $arcologies[_i].FSNull to "unset">>
	<</if>>
<</for>>

Setting missing global variables:
<<if ndef $assistantPower>>
	<<set $assistantPower to 0>>
<</if>>

<<if ndef $CulturalOpenness>>
	<<set $CulturalOpenness to 0>>
<</if>>

<<if ndef $displayAssignments>>
	<<set $displayAssignments to 1>>
<</if>>

<<if ndef $universalRulesImpregnation>>
	<<set $universalRulesImpregnation to "none">>
<</if>>

<<if ndef $abbreviateNationality>>
	<<set $abbreviateNationality to 0>>
<</if>>

<<if ndef $language>>
	<<set $language to "English">>
<</if>>

<<if ndef $terrain>>
	<<set $terrain to "rural">>
<</if>>

<<if ndef $menialDemandFactor>>
	<<set $menialDemandFactor = 0>>
<</if>>

<<if ndef $AProsperityCap>>
	<<set $AProsperityCap to 60>>
<</if>>
<<if ndef $ACitizens>>
	<<set $ACitizens to ($AProsperityCap+200)*16>>
<</if>>
<<if ndef $ASlaves>>
	<<set $ASlaves to ($AProsperityCap+200)*4>>
<</if>>
<<if ndef $AHelots>>
	<<set $AHelots to $ASlaves*2>>
<</if>>
<<if ndef $helots>>
	<<set $helots to 0>>
<</if>>

<<if ndef $facilityCost>>
<<set $facilityCost to 500>>
<</if>>
<<if ndef $policyCost>>
	<<set $policyCost to 5000>>
<</if>>

<<if ndef $REFeminizationCheckinIDs>>
	<<set $REFeminizationCheckinIDs to []>>
<</if>>
<<if ndef $REMILFCheckinIDs>>
	<<set $REMILFCheckinIDs to []>>
<</if>>
<<if ndef $REOrientationCheckinIDs>>
	<<set $REOrientationCheckinIDs to []>>
<</if>>
<<if ndef $REUglyCheckinIDs>>
	<<set $REUglyCheckinIDs to []>>
<</if>>
<<if ndef $REButtholeCheckinIDs>>
	<<set $REButtholeCheckinIDs to []>>
<</if>>
<<if ndef $REFutaSisterCheckinIDs>>
	<<set $REFutaSisterCheckinIDs to []>>
<</if>>
<<if ndef $REReductionCheckinIDs>>
	<<set $REReductionCheckinIDs to []>>
<</if>>
<<if ndef $dormitory>>
	<<set $dormitory = 20>>
<</if>>
<<if ndef $dormitoryPopulation>>
	<<set $dormitoryPopulation = 0>>
<</if>>
<<if ndef $rooms>>
	<<set $rooms = 5>>
<</if>>
<<if ndef $roomsPopulation>>
	<<set $roomsPopulation = 0>>
<</if>>

<<if ndef $brothelName>>
	<<set $brothelName = "the Brothel">>
<</if>>
<<if ndef $brothelNameCaps>>
	<<set $brothelNameCaps = "The Brothel">>
<</if>>
<<if ndef $brothelDecoration>>
	<<set $brothelDecoration = "standard">>
<</if>>

<<if ndef $dairyName>>
	<<set $dairyName = "the Dairy">>
<</if>>
<<if ndef $dairyNameCaps>>
	<<set $dairyNameCaps = "The Dairy">>
<</if>>
<<if ndef $dairyDecoration>>
	<<set $dairyDecoration = "standard">>
<</if>>
<<if ndef $dairyFeedersUpgrade>>
	<<set $dairyFeedersUpgrade to 0>>
<</if>>
<<if ndef $dairyStimulatorsUpgrade>>
	<<set $dairyStimulatorsUpgrade to 0>>
<</if>>
<<if ndef $dairyPregUpgrade>>
	<<set $dairyPregUpgrade to 0>>
<</if>>

<<if ndef $createBioreactors>>
	<<set $createBioreactors = 0>>
<</if>>
<<if ndef $bioreactorsAnnounced>>
	<<set $bioreactorsAnnounced = 0>>
<</if>>
<<if ndef $bioreactorsHerm>>
	<<set $bioreactorsHerm = 0>>
<</if>>
<<if ndef $bioreactorsXX>>
	<<set $bioreactorsXX = 0>>
<</if>>
<<if ndef $bioreactorsXY>>
	<<set $bioreactorsXY = 0>>
<</if>>
<<if ndef $bioreactorsBarren>>
	<<set $bioreactorsBarren = 0>>
<</if>>

<<if ndef $clubName>>
	<<set $clubName = "the Club">>
<</if>>
<<if ndef $clubNameCaps>>
	<<set $clubNameCaps = "The Club">>
<</if>>
<<if ndef $clubDecoration>>
	<<set $clubDecoration = "standard">>
<</if>>

<<if ndef $servantsQuartersName>>
	<<set $servantsQuartersName = "the Servants' Quarters">>
<</if>>
<<if ndef $servantsQuartersNameCaps>>
	<<set $servantsQuartersNameCaps = "The Servants' Quarters">>
<</if>>
<<if ndef $servantsQuartersDecoration >>
	<<set $servantsQuartersDecoration = "standard">>
<</if>>

<<if ndef $schoolroomName>>
	<<set $schoolroomName = "the Schoolroom">>
<</if>>
<<if ndef $schoolroomNameCaps>>
	<<set $schoolroomNameCaps = "The Schoolroom">>
<</if>>
<<if ndef $schoolroomUpgradeSkills>>
	<<set $schoolroomUpgradeSkills = 0>>
<</if>>
<<if ndef $schoolroomUpgradeLanguage>>
	<<set $schoolroomUpgradeLanguage = 0>>
<</if>>
<<if ndef $schoolroomDecoration>>
	<<set $schoolroomDecoration = "standard">>
<</if>>

<<if ndef $spaName>>
	<<set $spaName = "the Spa">>
<</if>>
<<if ndef $spaNameCaps>>
	<<set $spaNameCaps = "The Spa">>
<</if>>
<<if ndef $spaDecoration>>
	<<set $spaDecoration = "standard">>
<</if>>

<<if ndef $clinicName>>
	<<set $clinicName = "the Clinic">>
<</if>>
<<if ndef $clinicNameCaps>>
	<<set $clinicNameCaps = "The Clinic">>
<</if>>
<<if ndef $clinicSlaves>>
	<<set $clinicSlaves = 0>>
<</if>>
<<if ndef $clinic>>
	<<set $clinic = 0>>
<</if>>
<<if ndef $clinicUpgradeFilters>>
	<<set $clinicUpgradeFilters = 0>>
<</if>>
<<if ndef $clinicUpgradeScanner>>
	<<set $clinicUpgradeScanner = 0>>
<</if>>
<<if ndef $clinicDecoration>>
	<<set $clinicDecoration = "standard">>
<</if>>

<<if ndef $arcadeName>>
	<<set $arcadeName = "the Arcade">>
<</if>>
<<if ndef $arcadeNameCaps>>
	<<set $arcadeNameCaps = "The Arcade">>
<</if>>
<<if ndef $arcadeDecoration>>
	<<set $arcadeDecoration = "standard">>
<</if>>

<<if ndef $cellblockName>>
	<<set $cellblockName = "the Cellblock">>
<</if>>
<<if ndef $cellblockNameCaps>>
	<<set $cellblockNameCaps = "The Cellblock">>
<</if>>
<<if ndef $cellblockDecoration>>
	<<set $cellblockDecoration = "standard">>
<</if>>

<<if ndef $masterSuiteName>>
	<<set $masterSuiteName = "the Master Suite">>
<</if>>
<<if ndef $masterSuiteNameCaps>>
	<<set $masterSuiteNameCaps = "The Master Suite">>
<</if>>
<<if ndef $masterSuiteUpgradePregnancy>>
	<<set $masterSuiteUpgradePregnancy to 0>>
<</if>>
<<if ndef $masterSuitePregnancyFertilityDrugs>>
	<<set $masterSuitePregnancyFertilityDrugs to 0>>
<</if>>
<<if ndef $masterSuitePregnancyFertilitySupplements>>
	<<set $masterSuitePregnancyFertilitySupplements to 0>>
<</if>>
<<if ndef $masterSuitePregnancySlaveLuxuries>>
	<<set $masterSuitePregnancySlaveLuxuries to 0>>
<</if>>
<<if ndef $universalHGImpregnateMasterSuiteToggle>>
	<<set $universalHGImpregnateMasterSuiteToggle to 0>>
<</if>>
<<if ndef $masterSuiteDecoration>>
	<<set $masterSuiteDecoration = "standard">>
<</if>>

<<if ndef $HGSuiteName>>
	<<set $HGSuiteName = "the Head Girl Suite">>
<</if>>
<<if ndef $HGSuiteNameCaps>>
	<<set $HGSuiteNameCaps = "The Head Girl Suite">>
<</if>>
<<if ndef $HGSuiteSurgery>>
	<<set $HGSuiteSurgery = 1>>
<</if>>
<<if ndef $HGSuiteDrugs>>
	<<set $HGSuiteDrugs = 1>>
<</if>>
<<if ndef $HGSuiteHormones>>
	<<set $HGSuiteHormones = 1>>
<</if>>
<<if ndef $HGSuiteEquality>>
	<<set $HGSuiteEquality = 0>>
<</if>>

<<if ndef $pitName>>
	<<set $pitName = "the Pit">>
<</if>>
<<if ndef $pitNameCaps>>
	<<set $pitNameCaps = "The Pit">>
<</if>>
<<if ndef $fighterIDs>>
	<<set $fighterIDs = []>>
<</if>>
<<if ndef $pitBG>>
	<<set $pitBG = 0>>
<</if>>

<<if ndef $verboseDescriptions>>
	<<set $verboseDescriptions to 0>>
<</if>>
<<if ndef $clothesBoughtBunny>>
	<<set $clothesBoughtBunny to 0>>
<</if>>
<<if ndef $clothesBoughtConservative>>
	<<set $clothesBoughtConservative to 0>>
<</if>>
<<if ndef $clothesBoughtChains>>
	<<set $clothesBoughtChains to 0>>
<</if>>
<<if ndef $clothesBoughtWestern>>
	<<set $clothesBoughtWestern to 0>>
<</if>>
<<if ndef $clothesBoughtOil>>
	<<set $clothesBoughtOil to 0>>
<</if>>
<<if ndef $clothesBoughtHabit>>
	<<set $clothesBoughtHabit to 0>>
<</if>>
<<if ndef $clothesBoughtToga>>
	<<set $clothesBoughtToga to 0>>
<</if>>
<<if ndef $clothesBoughtKimono>>
	<<set $clothesBoughtKimono to 0>>
<</if>>
<<if ndef $clothesBoughtHarem>>
	<<set $clothesBoughtHarem to 0>>
<</if>>
<<if ndef $clothesBoughtQipao>>
	<<set $clothesBoughtQipao to 0>>
<</if>>
<<if ndef $clothesBoughtEgypt>>
	<<set $clothesBoughtEgypt to 0>>
<</if>>

<<if ndef $assistantFSAppearance>>
	<<set $assistantFSAppearance to "default">>
<</if>>

<<if ndef $universalRulesRest>>
	<<set $universalRulesRest to 0>>
<</if>>

<<if ndef $universalRulesNewSlavesRA>>
	<<set $universalRulesNewSlavesRA to 1>>
<</if>>

<<if ndef $hormoneUpgradeMood>>
	<<set $hormoneUpgradeMood to 0>>
<</if>>

<<if ndef $hormoneUpgradeShrinkage>>
	<<set $hormoneUpgradeShrinkage to 0>>
<</if>>

<<if ndef $hormoneUpgradePower>>
	<<set $hormoneUpgradePower to 0>>
<</if>>

<<if ndef $schoolSuggestion>>
	<<set $schoolSuggestion to 0>>
<</if>>

<<if ndef $prostheticsUpgrade>>
	<<set $prostheticsUpgrade to 0>>
<</if>>
<<if ndef $limbs>>
	<<set $limbs = []>>
<</if>>
<<if ndef $limbsCompleted>>
	<<set $limbsCompleted to 0>>
<</if>>

<<if ndef $trinkets>>
	<<set $trinkets to []>>

	<<set $upgradeMultiplierArcology to 1>>
	<<set $upgradeMultiplierMedicine to 1>>
	<<if $PC.career is "wealth">>
		<<set $trinkets.push("a collection of diplomas from expensive schools")>>
	<<elseif $PC.career is "capitalist">>
		<<set $trinkets.push("a framed low denomination piece of paper money from your native country")>>
	<<elseif $PC.career is "mercenary">>
		<<set $trinkets.push("a battered old assault rifle")>>
	<<elseif $PC.career is "slaver">>
		<<set $trinkets.push("a framed picture of a slave with her sale price scrawled across the bottom")>>
	<<elseif $PC.career is "engineer">>
		<<set $trinkets.push("an artist's impression of an early arcology design")>>
		<<set $upgradeMultiplierArcology to 0.6>>
	<<elseif $PC.career is "medicine">>
		<<set $trinkets.push("a framed postsurgical x-ray")>>
		<<set $upgradeMultiplierMedicine to 0.8>>
	<<elseif $PC.career is "celebrity">>
		<<set $trinkets.push("a framed copy of the first news story featuring yourself")>>
	<<elseif $PC.career is "arcology owner">>
		<<set $trinkets.push("a miniature model of your first arcology")>>
	<</if>>
<</if>>

<<if ndef $TSS>>
	<<set $TSS to {schoolUpgrade: 0, schoolPresent: 0, schoolProsperity: 0, subsidize: 0, schoolAnnexed: 0, studentsBought: 0, schoolSale: 0}>>
<</if>>
<<if ndef $GRI>>
	<<set $GRI to {schoolUpgrade: 0, schoolPresent: 0, schoolProsperity: 0, subsidize: 0, schoolAnnexed: 0, studentsBought: 0, schoolSale: 0}>>
<</if>>
<<if ndef $SCP>>
	<<set $SCP to {schoolUpgrade: 0, schoolPresent: 0, schoolProsperity: 0, subsidize: 0, schoolAnnexed: 0, studentsBought: 0, schoolSale: 0}>>
<</if>>
<<if ndef $LDE>>
	<<set $LDE to {schoolUpgrade: 0, schoolPresent: 0, schoolProsperity: 0, subsidize: 0, schoolAnnexed: 0, studentsBought: 0, schoolSale: 0}>>
<</if>>
<<if ndef $TGA>>
	<<set $TGA to {schoolUpgrade: 0, schoolPresent: 0, schoolProsperity: 0, subsidize: 0, schoolAnnexed: 0, studentsBought: 0, schoolSale: 0}>>
<</if>>
<<if ndef $TFS>>
	<<set $TFS to {schoolUpgrade: 0, schoolPresent: 0, schoolProsperity: 0, subsidize: 0, schoolAnnexed: 0, studentsBought: 0, schoolSale: 0}>>
<</if>>

<<if ndef $assistantName>>
	<<set $assistantName to "your personal assistant">>
<</if>>

<<if ndef $expiree>>
	<<set $expiree to 0>>
<</if>>
<<if ndef $retiree>>
	<<set $retiree to 0>>
<</if>>
<<if ndef $birthee>>
	<<set $birthee to 0>>
<</if>>

<<if ndef $assistantNameAnnounced>>
	<<set $assistantNameAnnounced to 0>>
<</if>>

<<if ndef $alwaysSubsidizeRep>>
<<set $alwaysSubsidizeRep to 0>>
<</if>>
<<if ndef $alwaysSubsidizeGrowth>>
<<set $alwaysSubsidizeGrowth to 0>>
<</if>>
<<if ndef $ProImmigrationCash>>
<<set $ProImmigrationCash to 0>>
<</if>>
<<if ndef $ProImmigrationRep>>
<<set $ProImmigrationRep to 0>>
<</if>>
<<if ndef $AntiImmigrationCash>>
<<set $AntiImmigrationCash to 0>>
<</if>>
<<if ndef $AntiImmigrationRep>>
<<set $AntiImmigrationRep to 0>>
<</if>>
<<if ndef $ProEnslavementCash>>
<<set $ProEnslavementCash to 0>>
<</if>>
<<if ndef $ProEnslavementRep>>
<<set $ProEnslavementRep to 0>>
<</if>>
<<if ndef $AntiEnslavementCash>>
<<set $AntiEnslavementCash to 0>>
<</if>>
<<if ndef $AntiEnslavementRep>>
<<set $AntiEnslavementRep to 0>>
<</if>>
<<if ndef $BasicSMR>>
<<set $BasicSMR to 1>>
<</if>>
<<if ndef $HealthInspectionSMR>>
<<set $HealthInspectionSMR to 0>>
<</if>>
<<if ndef $EducationSMR>>
<<set $EducationSMR to 0>>
<</if>>
<<if ndef $IntelligenceEugenicsSMR>>
<<set $IntelligenceEugenicsSMR to 0>>
<</if>>
<<if ndef $HeightEugenicsSMR>>
<<set $HeightEugenicsSMR to 0>>
<</if>>
<<if ndef $FaceEugenicsSMR>>
<<set $FaceEugenicsSMR to 0>>
<</if>>
<<if ndef $HonestySMR>>
<<set $HonestySMR to 0>>
<</if>>
<<if ndef $ProRefugees>>
<<set $ProRefugees to 0>>
<</if>>
<<if ndef $ProRecruitment>>
<<set $ProRecruitment to 0>>
<</if>>
<<if ndef $OralEncouragement>>
<<set $OralEncouragement to 0>>
<</if>>
<<if ndef $VaginalEncouragement>>
<<set $VaginalEncouragement to 0>>
<</if>>
<<if ndef $AnalEncouragement>>
<<set $AnalEncouragement to 0>>
<</if>>
<<if ndef $OralDiscouragement>>
<<set $OralDiscouragement to 0>>
<</if>>
<<if ndef $VaginalDiscouragement>>
<<set $VaginalDiscouragement to 0>>
<</if>>
<<if ndef $AnalDiscouragement>>
<<set $AnalDiscouragement to 0>>
<</if>>
<<if ndef $CashForRep>>
<<set $CashForRep to 0>>
<</if>>
<<if ndef $RepForCash>>
<<set $RepForCash to 0>>
<</if>>
<<if ndef $PAPublic>>
<<set $PAPublic to 0>>
<</if>>
<<if ndef $CoursingAssociation>>
<<set $CoursingAssociation to 0>>
<</if>>
<<if ndef $Lurcher>>
<<set $Lurcher = 0>>
<</if>>
<<if ndef $coursed>>
<<set $coursed = 0>>
<</if>>
<<if ndef $MixedMarriage>>
<<set $MixedMarriage to 0>>
<</if>>

<<if ndef $expiree>>
<<set $expiree to 0>>
<</if>>
<<if ndef $retiree>>
<<set $retiree to 0>>
<</if>>
<<if ndef $retirementAge>>
<<set $retirementAge to 45>>
<</if>>
<<if ndef $customRetirementAge>>
<<set $customRetirementAge to 45>>
<</if>>
<<if ndef $CustomRetirementAgePolicy>>
<<set $CustomRetirementAgePolicy to 0>>
<</if>>
<<if ndef $BioreactorRetirement>>
<<set $BioreactorRetirement to 0>>
<</if>>
<<if ndef $ArcadeRetirement>>
<<set $ArcadeRetirement to 0>>
<</if>>
<<if ndef $CitizenRetirement>>
<<set $CitizenRetirement to 0>>
<</if>>

<<if ndef $justiceEvents>>
	<<set $justiceEvents to ["slave deal", "slave training", "majority deal", "indenture deal", "virginity deal"]>>
<</if>>

<<if ndef $youngCareers>>
	<<set $youngCareers to ["a refugee", "a maid", "a truck driver", "a factory worker", "an office worker", "a farm laborer", "a secretary", "a cook", "a service worker", "a housewife", "a stripper", "a prostitute", "a saleswoman", "a criminal", "a student", "a student", "a camgirl", "a student", "a soldier", "a security guard", "unemployed", "unemployed", "unemployed", "unemployed", "unemployed"]>>
<</if>>

<<if ndef $educatedCareers>>
	<<set $educatedCareers to ["a principal", "a procuress", "a refugee", "a doctor", "a private detective", "a journalist", "a journalist", "a lawyer", "a teacher", "a business owner", "a classical dancer", "a classical musician", "an investor", "a writer", "a programmer", "a counselor", "a nun", "a scientist", "an actress", "a criminal", "a politician", "a military officer", "a professor"]>>
<</if>>

<<if ndef $uneducatedCareers>>
	<<set $uneducatedCareers to ["a masseuse", "a refugee", "a masseuse", "a model", "a pimp", "a maid", "a mail carrier", "a fisherwoman", "a truck driver", "an athlete", "a trophy wife", "a teacher", "a factory worker", "a dancer", "a musician", "an office worker", "a farm laborer", "a secretary", "a cook", "a nurse", "a service worker", "a housewife", "a camgirl", "a stripper", "a prostitute", "a saleswoman", "a criminal", "a student", "a soldier", "a security guard", "an actress", "a party girl", "a law enforcement officer", "a bouncer", "a bodyguard", "unemployed", "unemployed", "unemployed", "unemployed", "unemployed"]>>
<</if>>

<<if ndef $gratefulCareers>>
	<<set $gratefulCareers to ["unemployed", "a refugee"]>>
<</if>>

<<if ndef $menialCareers>>
	<<set $menialCareers to ["an athlete", "a mail carrier", "a fisherwoman", "a truck driver", "a factory worker", "a farm laborer", "a cook", "a service worker", "a maid", "a housewife", "a student", "a programmer", "a nun"]>>
<</if>>

<<if ndef $entertainmentCareers>>
	<<set $entertainmentCareers to ["a party girl", "a camgirl", "an actress", "a journalist", "a writer"]>>
<</if>>

<<if ndef $whoreCareers>>
	<<set $whoreCareers to ["a prostitute", "a stripper", "a saleswoman", "a criminal", "a porn star", "a trophy wife", "a Futanari Sister", "a model"]>>
<</if>>

<<if ndef $HGCareers>>
	<<set $HGCareers to ["a lawyer", "a military officer", "a politician"]>>
<</if>>

<<if ndef $madamCareers>>
	<<set $madamCareers to ["a procuress", "a pimp", "a business owner"]>>
<</if>>

<<if ndef $DJCareers>>
	<<set $DJCareers to ["a dancer", "a musician", "a classical dancer", "a classical musician"]>>
<</if>>

<<if ndef $bodyguardCareers>>
	<<set $bodyguardCareers to ["a soldier", "a bodyguard", "a law enforcement officer"]>>
<</if>>

<<if ndef $wardenessCareers>>
	<<set $wardenessCareers to ["a security guard", "a private detective", "a bouncer"]>>
<</if>>

<<if ndef $nurseCareers>>
	<<set $nurseCareers to ["a nurse", "a doctor"]>>
<</if>>

<<if ndef $attendantCareers>>
	<<set $attendantCareers to ["a masseuse", "a counselor"]>>
<</if>>

<<if ndef $milkmaidCareers>>
	<<set $milkmaidCareers to ["a dairy worker", "a rancher", "a veterinarian", "a farmer's daughter"]>>
<</if>>

<<if ndef $stewardessCareers>>
	<<set $stewardessCareers to ["a secretary", "an office worker", "an investor", "a charity worker"]>>
<</if>>

<<if ndef $schoolteacherCareers>>
	<<set $schoolteacherCareers to ["a principal", "a teacher", "a scientist", "a professor"]>>
<</if>>

<<if ndef $fakeBellies>>
<<set $fakeBellies to ["a small empathy belly", "a medium empathy belly", "a large empathy belly", "a huge empathy belly"]>> /* lets fake bellies be seperated from other .bellyAccessory */
<</if>>

<<if ($ver.includes("0.9") != true) || ($ver == "0.9")>>
	<<if $seeDicks == 2>>
		<<set $seeDicks = 100>>
	<<elseif $seeDicks == 1>>
		<<set $seeDicks = 25>>
	<</if>>
<</if>>
<<if ($ver.includes("0.9.4") != true) && ($ver.includes("0.9.5") != true) && ($ver.includes("0.9.6") != true) && ($ver.includes("0.9.7") != true) && ($ver.includes("0.9.8") != true) && ($ver.includes("0.9.9") != true) && ($ver.includes("0.9.10") != true)>>
	<<for _r to 0; _r < $defaultRules.length; _r++>>
		<<if ndef $defaultRules[_r].aphrodisiacs>>
			<<set $defaultRules[_r].aphrodisiacs = 0>>
		<</if>>
		<<if $defaultRules[_r].curatives == "applied">>
			<<set $defaultRules[_r].curatives = 2>>
		<<else>>
			<<set $defaultRules[_r].curatives = 0>>
		<</if>>
		<<if $defaultRules[_r].drugs == "curatives">>
			<<set $defaultRules[_r].curatives = 2>>
			<<set $defaultRules[_r].drugs = "no drugs">>
		<<elseif $defaultRules[_r].drugs == "preventatives">>
			<<set $defaultRules[_r].curatives = 1>>
			<<set $defaultRules[_r].drugs = "no drugs">>
		<<elseif $defaultRules[_r].drugs == "aphrodisiacs">>
			<<set $defaultRules[_r].aphrodisiacs = 1>>
			<<set $defaultRules[_r].drugs = "no drugs">>
		<<elseif $defaultRules[_r].drugs == "extreme aphrodisiacs">>
			<<set $defaultRules[_r].aphrodisiacs = 2>>
			<<set $defaultRules[_r].drugs = "no drugs">>
		<</if>>
		<<if $defaultRules[_r].muscles >= 3>>
			<<set $defaultRules[_r].muscles = 100>>
		<<elseif $defaultRules[_r].muscles >= 2>>
			<<set $defaultRules[_r].muscles = 50>>
		<<elseif $defaultRules[_r].muscles >= 1>>
			<<set $defaultRules[_r].muscles = 20>>
		<</if>>
	<</for>>
	<<if $PC.refreshment == "cigar">>
		<<set $PC.refreshmentType = 0>>
	<<else>>
		<<set $PC.refreshmentType = 1>>
	<</if>>
<</if>>

Done!

<br><br>
Setting missing slave variables:
<<for _i to 0; _i < $slaves.length; _i++>>
<<set _Slave to $slaves[_i]>>

<<if ndef _Slave.aphrodisiacs>>
	<<set _Slave.aphrodisiacs = 0>>
<</if>>
<<if ndef _Slave.curatives>>
	<<set _Slave.curatives = 0>>
<</if>>
<<if ndef _Slave.lactationAdaptation>>
	<<set _Slave.lactationAdaptation = 0>>
<</if>>
<<if ndef _Slave.dietCum>>
	<<set _Slave.dietCum = 0>>
<</if>>
<<if ndef _Slave.dietMilk>>
	<<set _Slave.dietMilk = 0>>
<</if>>
<<if ndef _Slave.fuckdoll>>
	<<set _Slave.fuckdoll = 0>>
<</if>>
<<if ndef _Slave.customImage>>
	<<set _Slave.customImage = 0>>
<</if>>
<<if ndef _Slave.nationality>>
	<<set _Slave.nationality = "slave">>
<</if>>

<<if ndef _Slave.faceShape>>
	<<set _Slave.faceShape to "normal">>
<</if>>

<<if _Slave.teeth == 0>>
	<<set _Slave.teeth to "normal">>
<</if>>

<<if ndef _Slave.boobShape>>
	<<set _Slave.boobShape to "perky">>
<</if>>

<<if ndef _Slave.vaginaLube>>
	<<set _Slave.vaginaLube to 0>>
<</if>>

<<if ndef _Slave.hips>>
	<<set _Slave.hips to 0>>
<</if>>

<<if ndef _Slave.hipsImplant>>
	<<set _Slave.hipsImplant to 0>>
<</if>>

<<if ndef _Slave.shoulders>>
	<<set _Slave.shoulders to 0>>
<</if>>

<<if ndef _Slave.shouldersImplant>>
	<<set _Slave.shouldersImplant to 0>>
<</if>>

<<if ndef _Slave.voiceImplant>>
	<<set _Slave.voiceImplant to 0>>
<</if>>

<<if ndef _Slave.backTat>>
	<<set _Slave.backTat to 0>>
<</if>>

<<if ndef _Slave.hStyle>>
	<<set _Slave.hColor to either("black", "blonde", "red", "brown")>>
<</if>>

<<if ndef _Slave.hStyle>>
	<<set _Slave.hStyle to either("ass-length", "long", "shoulder-length")>>
<</if>>

<<if ndef _Slave.eyeColor>>
	<<set _Slave.eyeColor to _Slave.eyes>>
	<<set _Slave.eyes to 1>>
	<<if ndef _Slave.eyeColor>>
		<<set _Slave.eyeColor to "brown">>
	<</if>>
<</if>>

<<if ndef _Slave.eyewear>>
  <<set _Slave.eyewear to "none">>
<</if>>

<<if ndef _Slave.indenture>>
	<<set _Slave.indenture to -1>>
<</if>>
<<if ndef _Slave.indentureRestrictions>>
	<<set _Slave.indentureRestrictions to 0>>
<</if>>
<<if ndef _Slave.birthWeek>>
	<<set _Slave.birthWeek to random(0,51)>>
<</if>>
<<if ndef _Slave.cSec>>
	<<set _Slave.cSec = 0>>
<</if>>
<<if ndef _Slave.labor>>
	<<set _Slave.labor = 0>>
<</if>>
<<if ndef _Slave.pregSource>>
	<<set _Slave.pregSource = 0>>
<</if>>

<<if ndef _Slave.training>>
	<<set _Slave.training = 0>>
<</if>>

<<if ($ver.includes("0.8.9") != true) && ($ver.includes("0.8.10") != true) && ($ver.includes("0.8.11") != true) && ($ver.includes("0.8.12") != true)>>
<<if $ver.includes("0.9") != true>>
	<<if _Slave.attrXX == 2>>
		<<set _Slave.attrXX = 90>>
	<<elseif _Slave.attrXX == 1>>
		<<set _Slave.attrXX = 70>>
	<<elseif _Slave.attrXX == 0>>
		<<set _Slave.attrXX = 50>>
	<<elseif _Slave.attrXX == -1>>
		<<set _Slave.attrXX = 30>>
	<<else>>
		<<set _Slave.attrXX = 10>>
	<</if>>
	<<if _Slave.attrXY == 2>>
		<<set _Slave.attrXY = 90>>
	<<elseif _Slave.attrXY == 1>>
		<<set _Slave.attrXY = 70>>
	<<elseif _Slave.attrXY == 0>>
		<<set _Slave.attrXY = 50>>
	<<elseif _Slave.attrXY == -1>>
		<<set _Slave.attrXY = 30>>
	<<else>>
		<<set _Slave.attrXY = 10>>
	<</if>>
<</if>>
<</if>>

<<if $ver.includes("0.9") != true>>
<<if $ver.includes("0.10") != true>>
	<<if _Slave.health <= -9>>
		<<set _Slave.health = -90>>
	<<elseif _Slave.health <= -7>>
		<<set _Slave.health = random(-89,-70)>>
	<<elseif _Slave.health <= -5>>
		<<set _Slave.health = random(-69,-50)>>
	<<elseif _Slave.health <= -3>>
		<<set _Slave.health = random(-49,-30)>>
	<<elseif _Slave.health <= -1>>
		<<set _Slave.health = random(-29,-10)>>
	<<elseif _Slave.health <= 1>>
		<<set _Slave.health = random(-9,10)>>
	<<elseif _Slave.health <= 3>>
		<<set _Slave.health = random(11,30)>>
	<<elseif _Slave.health <= 5>>
		<<set _Slave.health = random(31,50)>>
	<<elseif _Slave.health <= 7>>
		<<set _Slave.health = random(51,70)>>
	<<elseif _Slave.health <= 8>>
		<<set _Slave.health = random(71,80)>>
	<<elseif _Slave.health <= 9>>
		<<set _Slave.health = random(81,90)>>
	<<elseif _Slave.health <= 10>>
		<<set _Slave.health = random(91,100)>>
	<<elseif _Slave.health <= 15>>
		<<set _Slave.health = random(101,150)>>
	<<elseif _Slave.health <= 20>>
		<<set _Slave.health = random(151,200)>>
	<<elseif _Slave.health >= 50>>
		<<set _Slave.health = 500>>
	<<elseif _Slave.health > 20>>
		<<set _Slave.health = 205>>
	<</if>>

	<<set _Slave.devotion = (_Slave.devotion*5)>>
	<<set _Slave.trust = (_Slave.trust*5)>>

	<<if _Slave.fetishStrength == 0>>
		<<set _Slave.fetishStrength = random(0, 60)>>
	<<elseif _Slave.fetishStrength == 1>>
		<<set _Slave.fetishStrength = random(61,80)>>
	<<elseif _Slave.fetishStrength == 2>>
		<<set _Slave.fetishStrength = random(96, 100)>>
	<</if>>

	<<if _Slave.weight == -3>>
		<<set _Slave.weight = random(-110,-96)>>
	<<elseif _Slave.weight == -3>>
		<<set _Slave.weight = random(-95,-31)>>
	<<elseif _Slave.weight == -1>>
		<<set _Slave.weight = random(-30, -11)>>
	<<elseif _Slave.weight == 0>>
		<<set _Slave.weight = random(-11, 10)>>
	<<elseif _Slave.weight == 1>>
		<<set _Slave.weight = random(11, 30)>>
	<<elseif _Slave.weight == 2>>
		<<set _Slave.weight = random(31, 95)>>
	<<elseif _Slave.weight == 3>>
		<<set _Slave.weight = random(96, 110)>>
	<</if>>

	<<if _Slave.lips != 0>>
		<<if _Slave.lips == 3>>
			<<set _Slave.lips = 85>>
		<<elseif _Slave.lips == 2>>
			<<set _Slave.lips = 55>>
		<<elseif _Slave.lips == 1>>
			<<set _Slave.lips = 35>>
		<</if>>
	<</if>>
<</if>>
<</if>>

<<if ($ver.includes("0.9.5") != true) && ($ver.includes("0.9.6") != true) && ($ver.includes("0.9.7") != true) && ($ver.includes("0.9.8") != true) && ($ver.includes("0.9.9") != true) && ($ver.includes("0.9.10") != true)>>
	<<if _Slave.oralSkill > 0>>
	<<if _Slave.oralSkill == 3>>
		<<set _Slave.oralSkill = 100>>
	<<elseif _Slave.oralSkill == 2>>
		<<set _Slave.oralSkill = 65>>
	<<else>>
		<<set _Slave.oralSkill = 35>>
	<</if>>
	<</if>>
	<<if _Slave.vaginalSkill > 0>>
	<<if _Slave.vaginalSkill == 3>>
		<<set _Slave.vaginalSkill = 100>>
	<<elseif _Slave.vaginalSkill == 2>>
		<<set _Slave.vaginalSkill = 65>>
	<<else>>
		<<set _Slave.vaginalSkill = 35>>
	<</if>>
	<</if>>
	<<if _Slave.analSkill > 0>>
	<<if _Slave.analSkill == 3>>
		<<set _Slave.analSkill = 100>>
	<<elseif _Slave.analSkill == 2>>
		<<set _Slave.analSkill = 65>>
	<<else>>
		<<set _Slave.analSkill = 35>>
	<</if>>
	<</if>>
	<<if _Slave.whoreSkill > 0>>
	<<if _Slave.whoreSkill == 3>>
		<<set _Slave.whoreSkill = 100>>
	<<elseif _Slave.whoreSkill == 2>>
		<<set _Slave.whoreSkill = 65>>
	<<else>>
		<<set _Slave.whoreSkill = 35>>
	<</if>>
	<</if>>
	<<if _Slave.entertainSkill > 0>>
	<<if _Slave.entertainSkill == 3>>
		<<set _Slave.entertainSkill = 100>>
	<<elseif _Slave.entertainSkill == 2>>
		<<set _Slave.entertainSkill = 65>>
	<<else>>
		<<set _Slave.entertainSkill = 35>>
	<</if>>
	<</if>>
	<<if ($ver != "0.9.4")>>
		<<set _Slave.aphrodisiacs = 0>>
		<<if _Slave.drugs == "curatives">>
			<<set _Slave.curatives = 2>>
			<<set _Slave.drugs = "no drugs">>
		<<elseif _Slave.drugs == "preventatives">>
			<<set _Slave.curatives = 1>>
			<<set _Slave.drugs = "no drugs">>
		<<elseif _Slave.drugs == "aphrodisiacs">>
			<<set _Slave.aphrodisiacs = 1>>
			<<set _Slave.drugs = "no drugs">>
		<<elseif _Slave.drugs == "extreme aphrodisiacs">>
			<<set _Slave.aphrodisiacs = 2>>
			<<set _Slave.drugs = "no drugs">>
		<</if>>
		<<if _Slave.muscles >= 3>>
			<<set _Slave.muscles = 100>>
		<<elseif _Slave.muscles >= 2>>
			<<set _Slave.muscles = 50>>
		<<elseif _Slave.muscles >= 1>>
			<<set _Slave.muscles = 20>>
		<<else>>
			<<set _Slave.muscles = 0>>
		<</if>>
	<</if>>
<</if>>
<<if ($ver.includes("0.9") != true) || ($ver == "0.9")>>
	<<if _Slave.lips != 0>>
	<<if _Slave.lips == 3>>
		<<set _Slave.lips = 85>>
	<<elseif _Slave.lips == 2>>
		<<set _Slave.lips = 55>>
	<<else>>
		<<set _Slave.lips = 35>>
	<</if>>
	<</if>>
<</if>>

<<switch _Slave.boobsTat>>
<<case "floral designs">>
	<<set _Slave.boobsTat to "flowers">>
<<case "demeaning inscriptions">>
	<<set _Slave.boobsTat to "rude words">>
<<case "lewd scenes">>
	<<set _Slave.boobsTat to "scenes">>
<<case "degrading language">>
	<<set _Slave.boobsTat to "degradation">>
<<case  "slutty advertisements">>
	<<set _Slave.boobsTat to "advertisements">>
<</switch>>

<<switch _Slave.buttTat>>
<<case "floral designs">>
	<<set _Slave.buttTat to "flowers">>
<<case "demeaning inscriptions">>
	<<set _Slave.buttTat to "rude words">>
<<case "lewd scenes">>
	<<set _Slave.buttTat to "scenes">>
<<case "degrading language">>
	<<set _Slave.buttTat to "degradation">>
<<case  "slutty advertisements">>
	<<set _Slave.buttTat to "advertisements">>
<</switch>>

<<switch _Slave.vaginaTat>>
<<case "floral designs">>
	<<set _Slave.vaginaTat to "flowers">>
<<case "demeaning inscriptions">>
	<<set _Slave.vaginaTat to "rude words">>
<<case "lewd scenes">>
	<<set _Slave.vaginaTat to "scenes">>
<<case "degrading language">>
	<<set _Slave.vaginaTat to "degradation">>
<<case  "slutty advertisements">>
	<<set _Slave.vaginaTat to "advertisements">>
<</switch>>

<<switch _Slave.dickTat>>
<<case "floral designs">>
	<<set _Slave.dickTat to "flowers">>
<<case "demeaning inscriptions">>
	<<set _Slave.dickTat to "rude words">>
<<case "lewd scenes">>
	<<set _Slave.dickTat to "scenes">>
<<case "degrading language">>
	<<set _Slave.dickTat to "degradation">>
<<case  "slutty advertisements">>
	<<set _Slave.dickTat to "advertisements">>
<</switch>>

<<switch _Slave.anusTat>>
<<case "floral designs">>
	<<set _Slave.anusTat to "flowers">>
<<case "demeaning inscriptions">>
	<<set _Slave.anusTat to "rude words">>
<<case "lewd scenes">>
	<<set _Slave.anusTat to "scenes">>
<<case "degrading language">>
	<<set _Slave.anusTat to "degradation">>
<<case  "slutty advertisements">>
	<<set _Slave.anusTat to "advertisements">>
<</switch>>

<<switch _Slave.backTat>>
<<case "floral designs">>
	<<set _Slave.backTat to "flowers">>
<<case "demeaning inscriptions">>
	<<set _Slave.backTat to "rude words">>
<<case "lewd scenes">>
	<<set _Slave.backTat to "scenes">>
<<case "degrading language">>
	<<set _Slave.backTat to "degradation">>
<<case  "slutty advertisements">>
	<<set _Slave.backTat to "advertisements">>
<</switch>>

<<switch _Slave.shouldersTat>>
<<case "floral designs">>
	<<set _Slave.shouldersTat to "flowers">>
<<case "demeaning inscriptions">>
	<<set _Slave.shouldersTat to "rude words">>
<<case "lewd scenes">>
	<<set _Slave.shouldersTat to "scenes">>
<<case "degrading language">>
	<<set _Slave.shouldersTat to "degradation">>
<<case  "slutty advertisements">>
	<<set _Slave.shouldersTat to "advertisements">>
<</switch>>

<<switch _Slave.armsTat>>
<<case "floral designs">>
	<<set _Slave.armsTat to "flowers">>
<<case "demeaning inscriptions">>
	<<set _Slave.armsTat to "rude words">>
<<case "lewd scenes">>
	<<set _Slave.armsTat to "scenes">>
<<case "degrading language">>
	<<set _Slave.armsTat to "degradation">>
<<case  "slutty advertisements">>
	<<set _Slave.armsTat to "advertisements">>
<</switch>>

<<switch _Slave.legsTat>>
<<case "floral designs">>
	<<set _Slave.legsTat to "flowers">>
<<case "demeaning inscriptions">>
	<<set _Slave.legsTat to "rude words">>
<<case "lewd scenes">>
	<<set _Slave.legsTat to "scenes">>
<<case "degrading language">>
	<<set _Slave.legsTat to "degradation">>
<<case  "slutty advertisements">>
	<<set _Slave.legsTat to "advertisements">>
<</switch>>

<<switch _Slave.stampTat>>
<<case "floral designs">>
	<<set _Slave.stampTat to "flowers">>
<<case "demeaning inscriptions">>
	<<set _Slave.stampTat to "rude words">>
<<case "lewd scenes">>
	<<set _Slave.stampTat to "scenes">>
<<case "degrading language">>
	<<set _Slave.stampTat to "degradation">>
<<case  "slutty advertisements">>
	<<set _Slave.stampTat to "advertisements">>
<</switch>>

<<switch _Slave.lipsTat>>
<<case "floral designs">>
	<<set _Slave.lipsTat to "flowers">>
<<case "demeaning inscriptions">>
	<<set _Slave.lipsTat to "rude words">>
<<case "lewd scenes">>
	<<set _Slave.lipsTat to "scenes">>
<<case "degrading language">>
	<<set _Slave.lipsTat to "degradation">>
<<case  "slutty advertisements">>
	<<set _Slave.lipsTat to "advertisements">>
<</switch>>

<<if ndef _Slave.areolaePiercing>>
	<<set _Slave.areolaePiercing to 0>>
<</if>>

<<if ndef _Slave.standardPunishment>>
	<<set _Slave.standardPunishment to "situational">>
<</if>>

<<if ndef _Slave.standardReward>>
	<<set _Slave.standardReward to "situational">>
<</if>>

<<if ndef _Slave.corsetPiercing>>
	<<set _Slave.corsetPiercing to 0>>
<</if>>

<<if ndef _Slave.dickAccessory>>
	<<set _Slave.dickAccessory to "none">>
<</if>>

<<if ndef _Slave.scrotum>>
  <<set _Slave.scrotum to _Slave.balls>>
<</if>>

<<if ndef _Slave.markings>>
	<<set _Slave.markings to "none">>
<</if>>

<<if ndef _Slave.accent>>
	<<set _Slave.accent to random(0,3)>>
<</if>>

<<if ndef _Slave.pornFame>>
	<<set _Slave.pornFame to 0>>
<</if>>
<<if ndef _Slave.pornFameSpending>>
	<<set _Slave.pornFameSpending to 0>>
<</if>>

<<if ndef _Slave.bellyAccessory>>
  <<set _Slave.bellyAccessory to "none">>
<</if>>
<<if (ndef _Slave.currentRules) || (_Slave.currentRules.length < 1)>>
	<<set _Slave.currentRules to []>>
<</if>>

<<if _Slave.nationality == 0>>
	<<set _Slave.indenture to "slave">>
<</if>>

<<if _Slave.height < -1>>
	<<set _Slave.height to random(140,149)>>
<<elseif _Slave.height < 0>>
	<<set _Slave.height to random(150,159)>>
<<elseif _Slave.height < 1>>
	<<set _Slave.height to random(160,169)>>
<<elseif _Slave.height < 2>>
	<<set _Slave.height to random(170,184)>>
<<elseif _Slave.height <= 3>>
	<<set _Slave.height to random(185,200)>>
<</if>>

<<if _Slave.customTat is " ">>
	<<set _Slave.customTat to "">>
<</if>>

<<if _Slave.customLabel is " ">>
	<<set _Slave.customLabel to "">>
<</if>>
<<if _Slave.lipsPiercing is "no default setting">>
	<<set _Slave.lipsPiercing to 0>>
<</if>>
<<if _Slave.tonguePiercing is "no default setting">>
	<<set _Slave.tonguePiercing to 0>>
<</if>>
<<if _Slave.nipplesPiercing is "no default setting">>
	<<set _Slave.nipplesPiercing to 0>>
<</if>>
<<if _Slave.areolaePiercing is "no default setting">>
	<<set _Slave.areolaePiercing to 0>>
<</if>>
<<if _Slave.dickPiercing is "no default setting">>
	<<set _Slave.dickPiercing to 0>>
<</if>>
<<if _Slave.vaginaPiercing is "no default setting">>
	<<set _Slave.vaginaPiercing to 0>>
<</if>>
<<if _Slave.clitPiercing is "no default setting">>
	<<set _Slave.clitPiercing to 0>>
<</if>>
<<if _Slave.anusPiercing is "no default setting">>
	<<set _Slave.anusPiercing to 0>>
<</if>>
<<if _Slave.earPiercing is "no default setting">>
	<<set _Slave.earPiercing to 0>>
<</if>>
<<if _Slave.eyebrowPiercing is "no default setting">>
	<<set _Slave.eyebrowPiercing to 0>>
<</if>>
<<if _Slave.nosePiercing is "no default setting">>
	<<set _Slave.nosePiercing to 0>>
<</if>>
<<if _Slave.navelPiercing is "no default setting">>
	<<set _Slave.navelPiercing to 0>>
<</if>>
<<if _Slave.corsetPiercing is "no default setting">>
	<<set _Slave.corsetPiercing to 0>>
<</if>>

<<if _Slave.customDesc is " " or _Slave.customDesc == 0>>
	<<set _Slave.customDesc to "">>
<</if>>

<<if ndef _Slave.prostate>>
	<<if _Slave.dick > 0>>
		<<set _Slave.prostate = 1>>
	<<else>>
		<<set _Slave.prostate = 0>>
	<</if>>
<</if>>

<<set $slaves[_i] to _Slave>>
<</for>>
Done!

<<set $ver = "0.10.0">>
<<set $releaseID = 1000>>


code:
:: Add custom descriptors [nobr]

<<set $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Main">>

<<set $oldName = $activeSlave.slaveName>>
You may enter custom descriptors for your slave's hair color, hair style, tattoos, or anything else here. After typing, press enter to commit your change. These custom descriptors will appear in descriptions of your slave, but will have no gameplay effect. Changing them is free.

<<if (($activeSlave.devotion >= -50) || ($activeSlave.trust < -20)) && ($activeSlave.birthName != $activeSlave.slaveName)>>
	Rename her (birth name was $activeSlave.birthName): <<textbox "$activeSlave.slaveName" $activeSlave.slaveName "Rename">>
	<<link "Restore her birth name">><<set $activeSlave.slaveName = $activeSlave.birthName>><<goto "Rename">><</link>>
	<<if $arcologies[0].FSPastoralist != "unset">>
	<<if $activeSlave.lactation > 0>>
	 | <<link "Give her a random cow name">><<set $activeSlave.slaveName = $cowSlaveNames.random()>><<goto "Rename">><</link>>
	<</if>>
	<</if>>
	<<if $arcologies[0].FSChattelReligionist != "unset">>
	 | <<link "Give her a random devotional name">><<set $activeSlave.slaveName = $chattelReligionistSlaveNames.random()>><<goto "Rename">><</link>>
	<</if>>
	<<if $arcologies[0].FSRomanRevivalist != "unset">>
	 | <<link "Give her a random Roman name">><<set $activeSlave.slaveName = $romanSlaveNames.random()>><<goto "Rename">><</link>>
	<<elseif $arcologies[0].FSEgyptianRevivalist != "unset">>
	 | <<link "Give her a random ancient Egyptian name">><<set $activeSlave.slaveName = $ancientEgyptianSlaveNames.random()>><<goto "Rename">><</link>>
	<<elseif $arcologies[0].FSEdoRevivalist != "unset">>
	 | <<link "Give her a random feudal Japanese name">><<set $activeSlave.slaveName = $edoSlaveNames.random()>><<goto "Rename">><</link>>
	<</if>>
	<<if $arcologies[0].FSDegradationist > -1>>
	 | <<link "Give her a degrading name">><<include "Degrading Name">><<goto "Rename">><</link>>
	<</if>>
<<elseif (($activeSlave.devotion > 20) || ($activeSlave.trust < -20))>>
	Rename her: <<textbox "$activeSlave.slaveName" $activeSlave.slaveName "Rename">>
	<<if $arcologies[0].FSPastoralist != "unset">>
	<<if $activeSlave.lactation > 0>>
	 | <<link "Give her a random cow name">><<set $activeSlave.slaveName = $cowSlaveNames.random()>><<goto "Rename">><</link>>
	<</if>>
	<</if>>
	<<if $arcologies[0].FSChattelReligionist != "unset">>
	 | <<link "Give her a random devotional name">><<set $activeSlave.slaveName = $chattelReligionistSlaveNames.random()>><<goto "Rename">><</link>>
	<</if>>
	<<if $arcologies[0].FSRomanRevivalist != "unset">>
	<<link "Give her a random Roman name">><<set $activeSlave.slaveName = $romanSlaveNames.random()>><<goto "Rename">><</link>>
	<<elseif $arcologies[0].FSEgyptianRevivalist != "unset">>
	<<link "Give her a random ancient Egyptian name">><<set $activeSlave.slaveName = $ancientEgyptianSlaveNames.random()>><<goto "Rename">><</link>>
	<<elseif $arcologies[0].FSEdoRevivalist != "unset">>
	 | <<link "Give her a random feudal Japanese name">><<set $activeSlave.slaveName = $edoSlaveNames.random()>><<goto "Rename">><</link>>
	<</if>>
	<<if $arcologies[0].FSDegradationist > -1>>
	<<link "Give her a degrading name">><<include "Degrading Name">><<goto "Rename">><</link>>
	<</if>>
<<else>>
	//You must break her will further before you can successfully force a new name on her.//
<</if>>

Her hair is $activeSlave.hStyle.
Custom hair description: <<textbox "$activeSlave.hStyle" $activeSlave.hStyle "Add custom descriptors">>

    //For best results, use a short, uncapitalized and unpunctuated description; for example: 'back in a ponytail'//

Her hair is $activeSlave.hColor in color.
Custom hair color: <<textbox "$activeSlave.hColor" $activeSlave.hColor "Add custom descriptors">>

    //For best results, use a short, uncapitalized and unpunctuated description; for example: 'black with purple highlights'//

Change her custom tattoo: <<textbox "$activeSlave.customTat" $activeSlave.customTat "Add custom descriptors">>
    //For best results, use complete sentences; for example: 'She has blue stars tattooed along her cheekbones.'//

Change her origin story: <<textbox "$activeSlave.origin" $activeSlave.origin "Add custom descriptors">>

    //For best results, use complete, capitalized and punctuated sentences; for example: 'She followed you home from the pet store.'//

Change her custom description: <<textbox "$activeSlave.customDesc" $activeSlave.customDesc "Add custom descriptors">>

    //For best results, use complete, capitalized and punctuated sentences; for example: 'She has a beauty mark above her left nipple.'//

Change her custom label: <<textbox "$activeSlave.customLabel" $activeSlave.customLabel "Add custom descriptors">>

    //For best results, use a short phrase; for example: 'Breeder.'//

<<if ndef $activeSlave.customImage>><<set $activeSlave.customImage = 0>><</if>>
Assign her a custom image:
<<if $activeSlave.customImage != 0>>
	<<textbox "$activeSlave.customImage" $activeSlave.customImage "Add custom descriptors">>
<<else>>
	<<textbox "$activeSlave.customImage" "" "Add custom descriptors">>
<</if>>
<<link "Reset">><<set $activeSlave.customImage = 0>><<goto "Add custom descriptors">><</link>>

    //File must be in .png format. Place file in the \resources folder. Enter the filename without the .png extension. For example, for a file with the path \bin\resources\headgirl.png, enter headgirl.//

repo_name: Qotsafan/fc


code:
:: Arcade [nobr]

<<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Arcade", $showEncyclopedia = 1, $encyclopedia = "Arcade", $arcadeSlaves = $ArcadeiIDs.length>>

<<if $arcadeName != "the Arcade">>
	<<set $arcadeNameCaps = $arcadeName.replace("the ", "The ")>>
<</if>>

$arcadeNameCaps
<<switch $arcadeDecoration>>
<<case "Roman Revivalist">>
	is built out as a Roman street restaurant, with the bar containing the inmates. Citizens can amuse themselves at either side of the bar while enjoying some wine and olives and talking over the day's events.
<<case "Egyptian Revivalist">>
	is built to look like an ancient Egyptian temple, with a long altar of sacrifice serving as the wall in which the inmates are held. Incongruously, it's piled with fresh flowers.
<<case "Edo Revivalist">>
	is built to look like an Edo onsen, with discreet partitions allowing citizens a modicum of privacy as they use the services here. There are baths available so they can wash themselves afterward.
<<case "Arabian Revivalist">>
	is built to look like a fantastical Arabian dungeon, with the inmates kept in iron cages that hold their holes in place for use.
<<case "Chinese Revivalist">>
	is set up to look like a rough bar in an ancient Chinese city, with the inmates immured in the bar itself. Rowdy citizens can drink and fuck the holes here while shouting and boasting over the slaves' heads.
<<case "Chattel Religionist">>
	is well decorated with severe religious iconography, since this place is an acceptable if not respectable place for a citizen to find relief, so long as they keep the service of the slave they use here in mind.
<<case "Degradationist">>
	is nothing but a system of harnesses to hold slaves in the usual posture they would hold within a normal Free Cities sex arcade. This way, no iota of their degradation here is missed.
<<case "Asset Expansionist">>
	is constructed so that the slaves lie within the arcade facing up. The wall itself ends at waist height, so their breasts stick up to be groped while they are used from either end.
<<case "Repopulation Focus">>
	is constructed so that the slaves lie within the arcade facing up. A hole is situated above them, so that their belly has room to protrude upwards as they are fucked pregnant.
<<case "Eugenics">>
	is designed with built in dispensers for various prophylactics. Numerous reminders to not impregnate subhumans line the walls along with offers for patrons to join the ranks of the elite.
<<case "Transformation Fetishist">>
	reveals more of its inmates' bodies than the typical Free Cities sex arcade. There's no attempt to hide the feeding arrangements or injection lines, since transformation into a human sex toy is considered arousing here.
<<case "Gender Radicalist">>
	is built to reveal most of its inmate's bellies, butts, groins, and thighs. Whatever a slave here has between her legs, it's available to be fucked, played with, or abused.
<<case "Gender Fundamentalist">>
	is built to block the lower part of its inmates' butts from view and use. The slaves within are thus limited to their anuses for service here, but any slave can be disposed of in $arcadeName without offending fundamentalist sensibilities.
<<case "Physical Idealist">>
	logs customers' performance for their own athletic information. It keeps track of personal bests and all-time high scores, and pays out cash prizes to customers who fuck the holes faster, harder, or for longer than the previous record holder.
<<case "Supremacist">>
	is constructed so that the inmates' entire heads stick out of the mouth wall, though they're still masked and their jaws are held apart by ring gags. After all, seeing the anguish of the subhumans here is one of the main attractions.
<<case "Subjugationist">>
	is constructed so that the inmates' entire heads stick out of the mouth wall, though they're still masked and their jaws are held apart by ring gags. After all, seeing the anguish of the $arcologies[0].FSSubjugationistRace slaves here is one of the main attractions.
<<case "Paternalist">>
	is constructed so that nothing at all of the slaves is visible. The arcade is just a row of holes. In this way, good, paternalistic citizens can partake of a Free Cities sex arcade without being confronted with what they're doing.
<<case "Pastoralist">>
	is constructed so that the slaves lie within the arcade facing up. If a slave is lactating, her breasts are kept bare and under the maximum sustainable dose of lactation drugs, so that any penetration of her holes produces amusing squirts of milk.
<<case "Maturity Preferentialist">>
	is constructed so that nothing but the slaves' holes can be seen. This makes it possible to maintain the appearance of offering MILFs while using $arcadeName to get value out of of useless young bitches' holes.
<<case "Youth Preferentialist">>
	is constructed so that nothing but the slaves' holes can be seen. This makes it possible to maintain the appearance of offering nothing but young slaves while using $arcadeName to get value out of of old bitches' holes.
<<case "Body Purist">>
	is built out in such a way that much more of the slaves' rears and faces are visible than in a standard Free Cities sex arcade. This makes it much easier to check them for purity before using their holes.
<<case "Slimness Enthusiast">>
	is barely distinguishable from a standard Free Cities sex arcade. The difference is a fun one, though: since the butts sticking out of the wall are much skinnier than usual, there's no padding to get in the way of hilting oneself in the holes.
<<default>>
	is a standard Free Cities sex arcade: a pair of hallways extend away from the entrance, lined with doorless stalls like those in a public restroom. One hallway offers mouths, the other <<if $seeDicks != 2>>vaginas and <</if>>anuses.
<</switch>>

<<if $arcadeSlaves > 2>>
	It's busy. Customers are entering and exiting, leaving a few ¤ behind in the charge machines and loads of semen behind in the holes.
<<elseif $arcadeSlaves > 0>>
	It's understaffed; there are lines here and there for the few holes available.
<<else>>
	It's empty and quiet. [[Decommission the arcade|Main][$arcade = 0, $arcadeUpgradeInjectors = 0, $arcadeUpgradeFuckdolls = 0, $arcadeUpgradeCollectors = 0]]
<</if>>

It can support $arcade inmates.
<<if ($arcade < $arcadeSlaves) && ($arcadeUpgradeFuckdolls == 1)>>
	@@color:yellow;$arcadeNameCaps is overcrowded;@@ the least popular inmate will be sold as a standard Fuckdoll this week.
<</if>>
<<set _Tmult0 = Math.trunc($arcade*1000*$upgradeMultiplierArcology)>>
[[Expand the arcade|Arcade][$cash -= _Tmult0, $arcade += 5]] //Costs ¤_Tmult0 and will increase upkeep costs//

<<set _Tmult1 = Math.trunc(10000*$upgradeMultiplierArcology)>>
<<if $arcadeUpgradeInjectors == 1>>
	It has been upgraded with aphrodisiac injection systems and electroshock applicators. If the aphrodisiacs fail to force an orgasm from an inmate, she is shocked to tighten her holes regardless.
<<else>>
	It is a standard arcade. [[Upgrade the arcade with invasive performance-enhancing systems|Arcade][$cash -= _Tmult1, $arcadeUpgradeInjectors = 1]] //Costs ¤_Tmult1 and will increase upkeep costs//
<</if>>

<<if $arcadeUpgradeCollectors == 1>>
	It has been retrofitted to milk lactating slaves<<if $seeDicks != 0>> and cockmilk slaves capable of ejaculating<</if>>, though less efficiently than a dedicated facility.
<<else>>
	There is no special provision for lactating<<if $seeDicks != 0>> or ejaculating<</if>> slaves. [[Retrofit the arcade to collect useful fluids|Arcade][$cash -= _Tmult1, $arcadeUpgradeCollectors = 1]] //Costs ¤_Tmult1 and will increase upkeep costs//
<</if>>

$arcadeNameCaps is
<<if $arcadeUpgradeFuckdolls == 1>>
	equipped to convert surplus inmates into standard Fuckdolls.
<<else>>
	<<set _Tmult2 = Math.trunc(5000*$upgradeMultiplierArcology)>>
	not equipped to convert surplus inmates into standard Fuckdolls. [[Upgrade the arcade to create Fuckdolls|Arcade][$cash -= _Tmult2, $arcadeUpgradeFuckdolls = 1]] //Costs ¤_Tmult2//
<</if>>

<<if $arcadeSlaves > 0>>

''Bring a slave out of $arcadeName:''
	<<set $Flag = 1>>
	<<include "Slave Summary">>
<</if>>

<<if ($slaves.length > $arcadeSlaves)>>

''Confine a slave in $arcadeName:''
	<<set $Flag = 0>>
	<<include "Slave Summary">>
<</if>>
<<unset $Flag>>

Rename $arcadeName: <<textbox "$arcadeName" $arcadeName "Arcade">> //Use a noun or similar short phrase//


code:
:: Arcade Report [nobr]

<<set _DL = $ArcadeiIDs.length, $arcadeSlaves = _DL>>

<<if $arcadeSlaves > 0>>
	<<set _cockmilked = 0, _implanted = 0, _milked = 0,  _profits = 0, _SL = $slaves.length>>
	    <<if ($arcadeSlaves > 1)>>''There are $arcadeSlaves inmates confined in $arcadeName.''<<else>>''There is one inmate confined in $arcadeName.''<</if>>
	<<if ($arcologies[0].FSDegradationist > 20)>>
	<<if $arcologies[0].FSDegradationistLaw == 1>>
		The tenants located near the arcade don't mind having it nearby, even though the crowd of menial slaves waiting their turn spills out into the hallway, 24 hours a day.
	<<else>>
		The tenants located near the arcade don't mind having it nearby.
	<</if>>
	<<elseif ($arcologies[0].FSPaternalist > 20)>>
		Many of the better tenants located near the arcade consider it an @@color:red;intolerable@@ establishment to have nearby.
	<<else>>
		Some of the better tenants located near the arcade consider it an @@color:red;obnoxious@@ establishment to have nearby.
	<</if>>
	<<if $arcadeDecoration != "standard">>

    $arcadeNameCaps's customers enjoy @@color:green;getting off in $arcadeDecoration surroundings.@@
	<</if>>

	<<SlaveSort $ArcadeiIDs>>
	<<for _dI = 0; _dI < _DL; _dI++>>
	<<set _i = $ArcadeiIDs[_dI].Index, _ID = $ArcadeiIDs[_dI].ID>>
	<<if _ID != $slaves[_i].ID>>
		/% Slaves.ID and $ArcadeiIDs.ID's don't match-up so let's find her %/
		<<for _i = 0; _i < _SL; _i++>>
		<<if (_ID == $slaves[_i].ID)>>
			/% Correct the Index %/
			<<set $ArcadeiIDs[_dI].Index = _i>>
			<<break>>
		<</if>>
		<</for>>
	<</if>>
	/% Onward bound as normal %/
	<<set $oldCash = $cash, $i = _i>>
	<<if ($arcadeUpgradeInjectors == 1)>>
		<<if ($slaves[_i].health < -60)>>
			<<set $slaves[_i].health = -60>>
		<<elseif ($slaves[_i].health > -50)>>
			<<set $slaves[_i].health -= 10>>
		<</if>>
		<<set $slaves[_i].aphrodisiacs = 2, $slaves[_i].devotion -= 5, $slaves[_i].trust -= 10>>
	<<else>>
		<<if ($slaves[_i].health < -60)>>
			<<set $slaves[_i].health += 20>>
		<<elseif ($slaves[_i].health < 10)>>
			<<set $slaves[_i].health += 10>>
		<<elseif ($slaves[_i].health > 20)>>
			<<set $slaves[_i].health -= 10>>
		<</if>>
		<<set $slaves[_i].trust -= 5>>
	<</if>>
	<<if $showEWD != 0>>

		/* 000-250-006 */
		<<if $seeImages == 1 && $imageChoice == 0>>

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

		<</if>>
		/* 000-250-006 */
		''__@@color:pink;$slaves[$i].slaveName@@__'' is confined in the $arcadeNameCaps.

    She <<include "SA work a glory hole">>
	<<else>>
		<<silently>><<include "SA work a glory hole">><</silently>>
	<</if>>
	<<if ($arcadeUpgradeCollectors > 0)>>
	<<if ($slaves[_i].lactation < 2)>>
		<<set $slaves[_i].lactation = 2, $slaves[_i].health -= 10, $cash -= $surgeryCost, _implanted++>>
	<<elseif ($slaves[_i].lactation > 0) || ($slaves[_i].balls > 0)>>
		<<if $showEWD != 0>>

    She <<include "SA get milked">>
		<<else>>
			<<silently>><<include "SA get milked">><</silently>>
		<</if>>
		<<if ($slaves[_i].boobs < 2000)>>
			<<set $slaves[_i].boobs += 100>>
		<<elseif ($slaves[_i].boobs < 5000)>>
			<<set $slaves[_i].boobs += 50>>
		<<elseif ($slaves[_i].boobs < 10000)>>
			<<set $slaves[_i].boobs += 25>>
		<</if>>
		<<if ($slaves[_i].balls > 0) && ($slaves[_i].balls < 6) && (random(1,100) > (40+(10*$slaves[_i].balls)))>>
			<<set $slaves[_i].balls++>>
		<</if>>
		<<if ($slaves[_i].dick > 0) && ($slaves[_i].dick < 6) && (random(1,100) > (40+(10*$slaves[_i].dick)))>>
			<<set $slaves[_i].dick++>>
		<</if>>
		<<if ($slaves[_i].lactation > 0)>>
			<<set _milked++>>
		<</if>>
		<<if ($slaves[_i].balls > 0)>>
			<<set _cockmilked++>>
		<</if>>
	<</if>>
	<</if>>
	<<set _profits += $cash-$oldCash>>
	<<if $showEWD != 0>>

		<<include "SA drugs">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA relationships">>
		<<include "SA rivalries">>

<<include "SA devotion">>
	<<else>>
		<<silently>>
		<<include "SA drugs">>
		<<include "SA diet">>
		<<include "SA long term effects">>
		<<include "SA relationships">>
		<<include "SA rivalries">>
		<<include "SA devotion">>
		<</silently>>
	<</if>>
	<</for>>

	<<if _milked == 1>>
		One of them is lactating and spends her time in $arcadeName being simultaneously milked and fucked.
	<<elseif _milked > 1>>
		_milked of them are lactating and spend their time in $arcadeName being simultaneously milked and fucked.
	<</if>>
	<<if _implanted == 1>>
		One of them was not lactating, so she was implanted with long-acting lactation inducing drugs, and it costs @@color:red;¤$surgeryCost@@.
	<<elseif _implanted > 1>>
		_implanted of them were not lactating, so they were implanted with long-acting lactation inducing drugs, and they cost @@color:red;¤<<print $surgeryCost*_implanted>>@@.
	<</if>>
	<<if _cockmilked == 1>>
		One of them retains testicles and is brutally cockmilked as she is used.
	<<elseif _cockmilked > 1>>
		_cockmilked of them retain testicles and are brutally cockmilked as they are used.
	<</if>>
	The arcade makes you @@color:yellowgreen;¤_profits@@ this week.

	<<if ($arcologies[0].FSDegradationist > 20)>>
	<<elseif ($arcologies[0].FSPaternalist > 20)>>
		<<set $repGain -= Math.trunc(_profits/20)>>
	<<else>>
		<<set $repGain -= Math.trunc(_profits/100)>>
	<</if>>

	<<if ($arcadeUpgradeFuckdolls == 1) && ($arcade < $arcadeSlaves)>>
		<<set $activeSlave = 0, _Age = -1, _FD = -1, _MB = -1, _Con = -1>>
		<<for _dI = 0; _dI < _DL; _dI++>>
			<<set _i = $ArcadeiIDs[_dI].Index>>
			<<if ($slaves[_i].fetish == "mindbroken")>>
				<<if ($slaves[_i].fuckdoll == 0)>>
					<<if ($slaves[_i].physicalAge > 35)>>
						<<set _Age = _i>>
						<<break>>
					<<elseif _FD == -1>>
						<<set _FD = _i>>
					<</if>>
				<<elseif _MB == -1>>
					<<set _MB = _i>>
				<</if>>
			<<elseif _Con == -1>>
				<<set _Con = _i>>
			<</if>>
		<</for>>
		<<if _Age > -1>>
			<<set $activeSlave = $slaves[_Age]>>
		<<elseif _FD > -1>>
			<<set $activeSlave = $slaves[_FD]>>
		<<elseif _MB > -1>>
			<<set $activeSlave = $slaves[_MB]>>
		<<elseif _Con > -1>>
			<<set $activeSlave = $slaves[_Con]>>
		<</if>>

    $activeSlave.slaveName is low-quality and surplus to the needs of the arcade, so she has been converted into a Fuckdoll.
		<<include "Remove activeSlave">>
		<<if $activeSlave == 0>> /% if not zero then technically there was an error INVALID SLAVE %/
			<<set $fuckdolls++>>
		<</if>>
	<</if>>

<</if>>


code:
:: Arcology Opinion [nobr]

<<if ndef $activeArcology.FSNull>><<set $activeArcology.FSNull = "unset">><</if>>
<<if ndef $targetArcology.FSNull>><<set $targetArcology.FSNull = "unset">><</if>>

<<set $opinion = 0>>

<<if $activeArcology.FSSubjugationist != "unset">>
	<<if $targetArcology.FSSubjugationist != "unset">>
	<<if $targetArcology.FSSubjugationistRace == $activeArcology.FSSubjugationistRace>>
		<<set $opinion += $activeArcology.FSSubjugationist>>
		<<set $opinion += $targetArcology.FSSubjugationist>>
	<<else>>
		<<set $opinion -= $activeArcology.FSSubjugationist>>
		<<set $opinion -= $targetArcology.FSSubjugationist>>
	<</if>>
	<<elseif $targetArcology.FSSupremacist != "unset">>
	<<if $targetArcology.FSSupremacistRace == $activeArcology.FSSubjugationistRace>>
		<<set $opinion -= $activeArcology.FSSubjugationist>>
		<<set $opinion -= $targetArcology.FSSupremacist>>
	<</if>>
	<</if>>
<</if>>
<<if $activeArcology.FSSupremacist != "unset">>
	<<if $targetArcology.FSSupremacist != "unset">>
	<<if $targetArcology.FSSupremacistRace == $activeArcology.FSSupremacistRace>>
		<<set $opinion += $activeArcology.FSSupremacist>>
		<<set $opinion += $targetArcology.FSSupremacist>>
	<<else>>
		<<set $opinion -= $activeArcology.FSSupremacist>>
		<<set $opinion -= $targetArcology.FSSupremacist>>
	<</if>>
	<<elseif $targetArcology.FSSubjugationist != "unset">>
	<<if $targetArcology.FSSubjugationistRace == $activeArcology.FSSupremacistRace>>
		<<set $opinion -= $activeArcology.FSSupremacist>>
		<<set $opinion -= $targetArcology.FSSubjugationist>>
	<</if>>
	<</if>>
<</if>>
<<if $activeArcology.FSRepopulationFocus != "unset">>
	<<if $targetArcology.FSRepopulationFocus != "unset">>
	<<set $opinion += $activeArcology.FSRepopulationFocus>>
	<<set $opinion += $targetArcology.FSRepopulationFocus>>
	<<elseif $targetArcology.FSRestart != "unset">>
	<<set $opinion -= $activeArcology.FSRepopulationFocus>>
	<<set $opinion -= $targetArcology.FSRestart>>
	<</if>>
<<elseif $activeArcology.FSRestart != "unset">>
	<<if $targetArcology.FSRestart != "unset">>
	<<set $opinion += $activeArcology.FSRestart>>
	<<set $opinion += $targetArcology.FSRestart>>
	<<elseif $targetArcology.FSRepopulationFocus != "unset">>
	<<set $opinion -= $activeArcology.FSRestart>>
	<<set $opinion -= $targetArcology.FSRepopulationFocus>>
	<</if>>
<</if>>
<<if $activeArcology.FSGenderRadicalist != "unset">>
	<<if $targetArcology.FSGenderRadicalist != "unset">>
	<<set $opinion += $activeArcology.FSGenderRadicalist>>
	<<set $opinion += $targetArcology.FSGenderRadicalist>>
	<<elseif $targetArcology.FSGenderFundamentalist != "unset">>
	<<set $opinion -= $activeArcology.FSGenderRadicalist>>
	<<set $opinion -= $targetArcology.FSGenderFundamentalist>>
	<</if>>
<<elseif $activeArcology.FSGenderFundamentalist != "unset">>
	<<if $targetArcology.FSGenderFundamentalist != "unset">>
	<<set $opinion += $activeArcology.FSGenderFundamentalist>>
	<<set $opinion += $targetArcology.FSGenderFundamentalist>>
	<<elseif $targetArcology.FSGenderRadicalist != "unset">>
	<<set $opinion -= $activeArcology.FSGenderFundamentalist>>
	<<set $opinion -= $targetArcology.FSGenderRadicalist>>
	<</if>>
<</if>>
<<if $activeArcology.FSPaternalist != "unset">>
	<<if $targetArcology.FSPaternalist != "unset">>
	<<set $opinion += $activeArcology.FSPaternalist>>
	<<set $opinion += $targetArcology.FSPaternalist>>
	<<elseif $targetArcology.FSDegradationist != "unset">>
	<<set $opinion -= $activeArcology.FSPaternalist>>
	<<set $opinion -= $targetArcology.FSDegradationist>>
	<</if>>
<<elseif $activeArcology.FSDegradationist != "unset">>
	<<if $targetArcology.FSDegradationist != "unset">>
	<<set $opinion += $activeArcology.FSDegradationist>>
	<<set $opinion += $targetArcology.FSDegradationist>>
	<<elseif $targetArcology.FSPaternalist != "unset">>
	<<set $opinion -= $activeArcology.FSDegradationist>>
	<<set $opinion -= $targetArcology.FSPaternalist>>
	<</if>>
<</if>>
<<if $activeArcology.FSBodyPurist != "unset">>
	<<if $targetArcology.FSBodyPurist != "unset">>
	<<set $opinion += $activeArcology.FSBodyPurist>>
	<<set $opinion += $targetArcology.FSBodyPurist>>
	<<elseif $targetArcology.FSTransformationFetishist != "unset">>
	<<set $opinion -= $activeArcology.FSBodyPurist>>
	<<set $opinion -= $targetArcology.FSTransformationFetishist>>
	<</if>>
<<elseif $activeArcology.FSTransformationFetishist != "unset">>
	<<if $targetArcology.FSTransformationFetishist != "unset">>
	<<set $opinion += $activeArcology.FSTransformationFetishist>>
	<<set $opinion += $targetArcology.FSTransformationFetishist>>
	<<elseif $targetArcology.FSBodyPurist != "unset">>
	<<set $opinion -= $activeArcology.FSTransformationFetishist>>
	<<set $opinion -= $targetArcology.FSBodyPurist>>
	<</if>>
<</if>>
<<if $activeArcology.FSYouthPreferentialist != "unset">>
	<<if $targetArcology.FSYouthPreferentialist != "unset">>
	<<set $opinion += $activeArcology.FSYouthPreferentialist>>
	<<set $opinion += $targetArcology.FSYouthPreferentialist>>
	<<elseif $targetArcology.FSMaturityPreferentialist != "unset">>
	<<set $opinion -= $activeArcology.FSYouthPreferentialist>>
	<<set $opinion -= $targetArcology.FSMaturityPreferentialist>>
	<</if>>
<<elseif $activeArcology.FSMaturityPreferentialist != "unset">>
	<<if $targetArcology.FSMaturityPreferentialist != "unset">>
	<<set $opinion += $activeArcology.FSMaturityPreferentialist>>
	<<set $opinion += $targetArcology.FSMaturityPreferentialist>>
	<<elseif $targetArcology.FSYouthPreferentialist != "unset">>
	<<set $opinion -= $activeArcology.FSMaturityPreferentialist>>
	<<set $opinion -= $targetArcology.FSYouthPreferentialist>>
	<</if>>
<</if>>
<<if $activeArcology.FSSlimnessEnthusiast != "unset">>
	<<if $targetArcology.FSSlimnessEnthusiast != "unset">>
	<<set $opinion += $activeArcology.FSSlimnessEnthusiast>>
	<<set $opinion += $targetArcology.FSSlimnessEnthusiast>>
	<<elseif $targetArcology.FSAssetExpansionist != "unset">>
	<<set $opinion -= $activeArcology.FSSlimnessEnthusiast>>
	<<set $opinion -= $targetArcology.FSAssetExpansionist>>
	<</if>>
<<elseif $activeArcology.FSAssetExpansionist != "unset">>
	<<if $targetArcology.FSAssetExpansionist != "unset">>
	<<set $opinion += $activeArcology.FSAssetExpansionist>>
	<<set $opinion += $targetArcology.FSAssetExpansionist>>
	<<elseif $targetArcology.FSSlimnessEnthusiast != "unset">>
	<<set $opinion -= $activeArcology.FSAssetExpansionist>>
	<<set $opinion -= $targetArcology.FSSlimnessEnthusiast>>
	<</if>>
<</if>>
<<if $activeArcology.FSPastoralist != "unset">>
	<<if $targetArcology.FSPastoralist != "unset">>
	<<set $opinion += $activeArcology.FSPastoralist>>
	<<set $opinion += $targetArcology.FSPastoralist>>
	<<elseif $targetArcology.FSPhysicalIdealist != "unset">>
	<<set $opinion -= $activeArcology.FSPastoralist>>
	<<set $opinion -= $targetArcology.FSPhysicalIdealist>>
	<</if>>
<<elseif $activeArcology.FSPhysicalIdealist != "unset">>
	<<if $targetArcology.FSPhysicalIdealist != "unset">>
	<<set $opinion += $activeArcology.FSPhysicalIdealist>>
	<<set $opinion += $targetArcology.FSPhysicalIdealist>>
	<<elseif $targetArcology.FSPastoralist != "unset">>
	<<set $opinion -= $activeArcology.FSPhysicalIdealist>>
	<<set $opinion -= $targetArcology.FSPastoralist>>
	<</if>>
<</if>>
<<if $activeArcology.FSChattelReligionist != "unset">>
	<<if $targetArcology.FSChattelReligionist != "unset">>
	<<set $opinion += $activeArcology.FSChattelReligionist>>
	<<set $opinion += $targetArcology.FSChattelReligionist>>
	<<elseif $targetArcology.FSNull != "unset">>
	<<set $opinion -= $activeArcology.FSChattelReligionist>>
	<<set $opinion -= $targetArcology.FSNull>>
	<</if>>
<<elseif $activeArcology.FSNull != "unset">>
  <<if $targetArcology.FSNull != "unset">>
	<<set $opinion += $activeArcology.FSNull>>
	<<set $opinion += $targetArcology.FSNull>>
  <<elseif $targetArcology.FSChattelReligionist != "unset">>
	<<set $opinion -= $activeArcology.FSNull>>
	<<set $opinion -= $targetArcology.FSChattelReligionist>>
  <<else>>
	<<set $opinion += $activeArcology.FSNull>>
  <</if>>
<<elseif $targetArcology.FSNull != "unset">>
  <<set $opinion += $targetArcology.FSNull>>
<</if>>
<<if $activeArcology.FSRomanRevivalist != "unset">>
	<<if $targetArcology.FSRomanRevivalist != "unset">>
	<<set $opinion += $activeArcology.FSRomanRevivalist>>
	<<set $opinion += $targetArcology.FSRomanRevivalist>>
	<<elseif $targetArcology.FSEgyptianRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSRomanRevivalist>>
	<<set $opinion -= $targetArcology.FSEgyptianRevivalist>>
	<<elseif $targetArcology.FSEdoRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSRomanRevivalist>>
	<<set $opinion -= $targetArcology.FSEdoRevivalist>>
	<<elseif $targetArcology.FSArabianRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSRomanRevivalist>>
	<<set $opinion -= $targetArcology.FSArabianRevivalist>>
	<<elseif $targetArcology.FSChineseRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSRomanRevivalist>>
	<<set $opinion -= $targetArcology.FSChineseRevivalist>>
	<</if>>
<<elseif $activeArcology.FSEgyptianRevivalist != "unset">>
	<<if $targetArcology.FSEgyptianRevivalist != "unset">>
	<<set $opinion += $activeArcology.FSEgyptianRevivalist>>
	<<set $opinion += $targetArcology.FSEgyptianRevivalist>>
	<<elseif $targetArcology.FSRomanRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSEgyptianRevivalist>>
	<<set $opinion -= $targetArcology.FSRomanRevivalist>>
	<<elseif $targetArcology.FSEdoRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSEgyptianRevivalist>>
	<<set $opinion -= $targetArcology.FSEdoRevivalist>>
	<<elseif $targetArcology.FSArabianRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSEgyptianRevivalist>>
	<<set $opinion -= $targetArcology.FSArabianRevivalist>>
	<<elseif $targetArcology.FSChineseRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSEgyptianRevivalist>>
	<<set $opinion -= $targetArcology.FSChineseRevivalist>>
	<</if>>
<<elseif $activeArcology.FSEdoRevivalist != "unset">>
	<<if $targetArcology.FSEdoRevivalist != "unset">>
	<<set $opinion += $activeArcology.FSEdoRevivalist>>
	<<set $opinion += $targetArcology.FSEdoRevivalist>>
	<<elseif $targetArcology.FSEgyptianRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSEdoRevivalist>>
	<<set $opinion -= $targetArcology.FSEgyptianRevivalist>>
	<<elseif $targetArcology.FSRomanRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSEdoRevivalist>>
	<<set $opinion -= $targetArcology.FSRomanRevivalist>>
	<<elseif $targetArcology.FSArabianRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSEdoRevivalist>>
	<<set $opinion -= $targetArcology.FSArabianRevivalist>>
	<<elseif $targetArcology.FSChineseRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSEdoRevivalist>>
	<<set $opinion -= $targetArcology.FSChineseRevivalist>>
	<</if>>
<<elseif $activeArcology.FSArabianRevivalist != "unset">>
	<<if $targetArcology.FSArabianRevivalist != "unset">>
	<<set $opinion += $activeArcology.FSArabianRevivalist>>
	<<set $opinion += $targetArcology.FSArabianRevivalist>>
	<<elseif $targetArcology.FSEgyptianRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSArabianRevivalist>>
	<<set $opinion -= $targetArcology.FSEgyptianRevivalist>>
	<<elseif $targetArcology.FSEdoRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSArabianRevivalist>>
	<<set $opinion -= $targetArcology.FSEdoRevivalist>>
	<<elseif $targetArcology.FSRomanRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSArabianRevivalist>>
	<<set $opinion -= $targetArcology.FSRomanRevivalist>>
	<<elseif $targetArcology.FSChineseRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSArabianRevivalist>>
	<<set $opinion -= $targetArcology.FSChineseRevivalist>>
	<</if>>
<<elseif $activeArcology.FSChineseRevivalist != "unset">>
	<<if $targetArcology.FSChineseRevivalist != "unset">>
	<<set $opinion += $activeArcology.FSChineseRevivalist>>
	<<set $opinion += $targetArcology.FSChineseRevivalist>>
	<<elseif $targetArcology.FSEgyptianRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSChineseRevivalist>>
	<<set $opinion -= $targetArcology.FSEgyptianRevivalist>>
	<<elseif $targetArcology.FSEdoRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSChineseRevivalist>>
	<<set $opinion -= $targetArcology.FSEdoRevivalist>>
	<<elseif $targetArcology.FSArabianRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSChineseRevivalist>>
	<<set $opinion -= $targetArcology.FSArabianRevivalist>>
	<<elseif $targetArcology.FSRomanRevivalist != "unset">>
	<<set $opinion -= $activeArcology.FSChineseRevivalist>>
	<<set $opinion -= $targetArcology.FSRomanRevivalist>>
	<</if>>
<</if>>

<<set $activeArcology = 0>>
<<set $targetArcology = 0>>


code:
:: Assign [silently]

<<set $activeSlave = $slaves[$i], _ID = $activeSlave.ID>>

<<assignJob $activeSlave $returnTo>>
<<switch $returnTo>>
<<case "Arcade">>
	<<set $activeSlave.clothes = "no clothing">>
<<case "Master Suite">>
	<<if $masterSuiteUpgradeLuxury > 1>>
		<<set $activeSlave.livingRules = "luxurious">>
	<<else>>
		<<set $activeSlave.livingRules = "normal">>
	<</if>>
<<case "Dairy">>
	<<if $dairyRestraintsSetting > 1>>
		<<set $activeSlave.collar = "none", $activeSlave.clothes = "no clothing", $activeSlave.buttplug = "none", $activeSlave.vaginalAccessory = "none">>
	<</if>>
	<<if $dairyPregSetting > 0>>
		<<set $reservedChildren -= $activeSlave.reservedChildren>>
		<<set $activeSlave.reservedChildren to 0>>
	<</if>>
<<case "Pit">>
	<<set $fighterIDs.push(_ID)>>
<<case "Coursing Association">>
	<<set $Lurcher = $activeSlave>>
<</switch>>

<<if ($returnTo != "Pit") && ($returnTo != "Coursing Association")>>

<<if $returnTo != "Master Suite">>
	<<set $activeSlave.livingRules = "spare">>
<</if>>

<<set $activeSlave.drugs = "no drugs", $activeSlave.releaseRules = "restrictive", $activeSlave.sentence = 0, $activeSlave.standardPunishment = "situational", $activeSlave.standardReward = "situational", $activeSlave.releaseRules = "restrictive">>

<<if _ID == $HeadGirl.ID>><<set $HeadGirl = 0>><</if>>
<<if _ID == $Recruiter.ID>><<set $Recruiter = 0>><</if>>
<<if _ID == $Bodyguard.ID>><<set $Bodyguard = 0>><</if>>
<<if _ID == $Madam.ID>><<set $Madam = 0>><</if>>
<<if _ID == $DJ.ID>><<set $DJ = 0>><</if>>
<<if _ID == $Milkmaid.ID>><<set $Milkmaid = 0>><</if>>
<<if _ID == $Schoolteacher.ID>><<set $Schoolteacher = 0>><</if>>
<<if _ID == $Attendant.ID>><<set $Attendant = 0>><</if>>
<<if _ID == $Nurse.ID>><<set $Nurse = 0>><</if>>
<<if _ID == $Collectrix.ID>><<set $Collectrix = 0>><</if>>
<<if _ID == $Stewardess.ID>><<set $Stewardess = 0>><</if>>
<<if _ID == $Wardeness.ID>><<set $Wardeness = 0>><</if>>
<<if _ID == $Concubine.ID>><<set $Concubine = 0>><</if>>

<<set $slaves[$i] = $activeSlave>>

<<if ($showAssignToScenes != 1) || ($activeSlave.fetish == "mindbroken")>>
	<<goto $returnTo>>
<<elseif ($returnTo == "Dairy") && (($dairyStimulatorsSetting >= 2) || ($dairyFeedersSetting >= 2) || ($dairyPregSetting >= 2))>>
	<<goto "Industrial Dairy Assignment Scene">>
<<elseif ($returnTo == "Dairy") && ($dairyRestraintsSetting == 0 && $activeSlave.devotion > 0)>>
	<<goto "Free Range Dairy Assignment Scene">>
<<elseif ($returnTo == "Brothel")>>
	<<goto "Brothel Assignment Scene">>
<<else>>
	<<goto $returnTo>>
<</if>>
<<else>>
	<<goto $returnTo>>
<</if>>


code:
:: Assistant Autosurgery

<<nobr>>

<<set $surgeries = []>>

<<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>>

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

<<if ($slaves[$i].health <= 40)>>
	<<set $seed = 1>>
<<else>>
<<if ($slaves[$i].lactation != 2) && ($thisSurgery.lactation == 1)>>
	<<set $surgeries.push("lactation inducing implanted drugs")>>
	<<set $slaves[$i].lactation = 2>>
	<<set $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 == 0) && ($slaves[$i].face <= 95) && ($thisSurgery.cosmetic != 0)>>
	<<set $surgeries.push("a nicer face")>>
	<<if $slaves[$i].faceShape is "masculine">><<set $slaves[$i].faceShape = "androgynous">><</if>>
	<<set $slaves[$i].faceImplant = 1>>
	<<set $slaves[$i].face = Math.trunc($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].ageImplant != 1) && ($slaves[$i].physicalAge >= 25) && ($thisSurgery.cosmetic != 0)>>
	<<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 $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].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].lips < $thisSurgery.lips)>>
	<<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>>
<<elseif ($slaves[$i].faceImplant == 1) && ($slaves[$i].face <= 95) && ($thisSurgery.cosmetic is 2)>>
	<<set $surgeries.push("a nicer face")>>
	<<if $slaves[$i].faceShape is "masculine">><<set $slaves[$i].faceShape to "androgynous">><</if>>
	<<set $slaves[$i].faceImplant to 2>>
	<<set $slaves[$i].face = Math.trunc($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 > 0) && ($slaves[$i].face <= 95) && ($surgeryUpgrade == 1) && ($thisSurgery.cosmetic is 2)>>
	<<set $surgeries.push("a nicer face")>>
	<<if $slaves[$i].faceShape is "masculine">><<set $slaves[$i].faceShape to "androgynous">><</if>>
	<<set $slaves[$i].faceImplant to 2>>
	<<set $slaves[$i].face = Math.trunc($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].waist >= -95) && ($thisSurgery.cosmetic is 2) && ($seeExtreme == 1)>>
	<<set $surgeries.push("a narrower waist")>>
	<<set $slaves[$i].waist = Math.trunc($slaves[$i].waist-20,-100,100)>>
	<<set $cash -= $surgeryCost>>
	<<if $PC.medicine >= 100>><<set $slaves[$i].health -= 30.5>><<else>><<set $slaves[$i].health -= 4>><</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 ($slaves[$i].butt <= 3) && ($slaves[$i].butt < $thisSurgery.butt)>>
	<<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>>
<<elseif ($slaves[$i].boobs <= 600) && ($slaves[$i].lactation < 2) && ($slaves[$i].boobs+400 <= $thisSurgery.boobs)>>
	<<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>>
<<elseif ($slaves[$i].boobs <= 600) && ($slaves[$i].lactation < 2) && ($slaves[$i].boobs+200 <= $thisSurgery.boobs)>>
	<<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>>
<<elseif ($slaves[$i].butt <= 5) && ($slaves[$i].butt < $thisSurgery.butt)>>
	<<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>>
<<elseif ($slaves[$i].boobs <= 2000) && ($slaves[$i].lactation < 2) && ($slaves[$i].boobs+400 < $thisSurgery.boobs)>>
	<<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>>
<<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)>>
	<<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>>
<<elseif ($slaves[$i].boobs <= 9000) && ($slaves[$i].lactation < 2) && ($slaves[$i].boobs < $thisSurgery.boobs)>>
	<<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>>
<<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 at will, gives $slaves[$i].slaveName @@color:lime;$surgeriesDisplay.@@

<</if>>

<</nobr>>


code:
:: Attendant Select

<<nobr>>
<<set $nextButton = "Back">>
<<set $nextLink = "Spa">>
<<set $showEncyclopedia = 0>>

<<for _i = 0;_i < $slaves.length;_i++>>
<<if $Attendant.ID == $slaves[_i].ID>>
	''__@@color:pink;$slaves[_i].slaveName@@__'' is serving as your Attendant.

She will help pamper and counsel your slaves.
	<<set $slaves[_i].assignment = "be the Attendant">>
	<<set $slaves[_i].assignmentVisible = 0>>
	<<break>>
<</if>>
<</for>>
<<if ($Attendant == 0)>>
	You have not selected an Attendant.
<</if>>

''Appoint an Attendant from your devoted slaves:''
<<include "Slave Summary">>

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


code:
:: Attendant Workaround

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

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

<<goto "Spa">>