code:
:: init [nobr]

/*
FREE CITIES
a text-based slave management game
Copyright (C) 2017 freecitiesdev

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

<<set $returnTo = "init", $nextButton = "Continue", $nextLink = "Alpha disclaimer">>

<<unset $releaseID>>
<<set $ver = "0.10.7", $pmodVer = "1.3.X", $releaseID = 1035>>
<<if ndef $pmodVer>><<set $pmodVer = "1.3.X">><</if>>

/* This needs to be broken down into individual files that can be added to StoryInit instead. */

<<if def $slaves>>
	<<set _SL = $slaves.length>>
	<<for _i = 0; _i < _SL; _i++>>
		<<if $slaves[_i].assignment == "be imported">>
			<<set $slaves[_i].ID += 1200000>>
			<<set $slaves[_i].assignment = "rest">>
			<<set $slaves[_i].assignmentVisible = 1>>
			<<set $slaves[_i].weekAcquired = 0>>
			<<set $slaves[_i].newGamePlus = 1>>
			<<PMODinit $slaves[_i]>>
			<<if $slaves[_i].mother > 0>>
				<<set $slaves[_i].mother += 1200000>>
			<<elseif $freshPC == 1 && $slaves[_i].mother == -1>>
				<<set $slaves[_i].mother = -12000000>>
			<<elseif $slaves[_i].mother < -1>>
				<<set $slaves[_i].mother -= 1200000>>
			<</if>>
			<<if $slaves[_i].father > 0>>
				<<set $slaves[_i].father += 1200000>>
			<<elseif $freshPC == 1 && $slaves[_i].father == -1>>
				<<set $slaves[_i].father = -12000000>>
			<<elseif $slaves[_i].father < -1>>
				<<set $slaves[_i].father -= 1200000>>
			<</if>>
			<<set $slaves[_i].daughters = 0>>
			<<set $slaves[_i].sisters = 0>>
			<<set $slaves[_i].canRecruit = 0>>
			<<set $slaves[_i].breedingMark = 0>>
			<<set $slaves[_i].reservedChildren = 0>>
			<<set $slaves[_i].reservedChildrenNursery = 0>>
			<<if $arcologies[0].FSRomanRevivalist > 90>>
				<<set $slaves[_i].nationality = "Roman Revivalist">>
			<<elseif $arcologies[0].FSAztecRevivalist > 90>>
				<<set $slaves[_i].nationality = "Aztec Revivalist">>
			<<elseif $arcologies[0].FSEgyptianRevivalist > 90>>
				<<set $slaves[_i].nationality = "Ancient Egyptian Revivalist">>
			<<elseif $arcologies[0].FSEdoRevivalist > 90>>
				<<set $slaves[_i].nationality = "Edo Revivalist">>
			<<elseif $arcologies[0].FSArabianRevivalist > 90>>
				<<set $slaves[_i].nationality = "Arabian Revivalist">>
			<<elseif $arcologies[0].FSChineseRevivalist > 90>>
				<<set $slaves[_i].nationality = "Ancient Chinese Revivalist">>
			<</if>>
			<<if $slaves[_i].relationTarget != 0>>
			<<set $slaves[_i].relationTarget += 1200000>>
			<</if>>
			<<if $slaves[_i].relationshipTarget != 0>>
			<<set $slaves[_i].relationshipTarget += 1200000>>
			<</if>>
			<<set $slaves[_i].rivalry = 0, $slaves[_i].rivalryTarget = 0, $slaves[_i].subTarget = 0>>
			<<set $slaves[_i].drugs = "no drugs">>
			<<set $slaves[_i].pornFameSpending = 0>>
			<<set $slaves[_i].livingRules = "spare">>
			<<set $slaves[_i].diet = "healthy">>
			<<set $slaves[_i].pregControl = "none">>
		<<else>>
			<<set _dump = removeSlave(_i), _i--, _SL-->>
		<</if>>
	<</for>>
	<<set $slaveIndices = slaves2indices()>>
	<<for _k = 0; _k < _SL; _k++>>
		<<for _i = 0; _i < _SL; _i++>>
			<<if $slaves[_k].mother == $slaves[_i].ID || $slaves[_k].father == $slaves[_i].ID>>
				<<set $slaves[_i].daughters += 1>>
			<</if>>
			<<if areSisters($slaves[_k], $slaves[_i]) > 0>>
				<<set $slaves[_i].sisters += 1>>
			<</if>>
		<</for>>
		<<if $slaves[_k].pregSource > 0>>
			<<set $slaves[_k].pregSource += 1200000>>
			<<set _getFather = $slaveIndices[$slaves[_k].pregSource]>>
			<<if ndef _getFather>>
				<<set $slaves[_k].pregSource = 0>>
			<</if>>
			<<for _sInit = 0; _sInit < $slaves[_k].womb.length; _sInit++>>
				<<if $slaves[_k].womb[_sInit].fatherID > 0>>
					<<set $slaves[_k].womb[_sInit].fatherID += 1200000>>
				<</if>>
			<</for>>
		<</if>>
	<</for>>
	<<set $genePool = ngUpdateGenePool($genePool)>>
	<<if ndef $missingTable || $showMissingSlaves == 0>>
		<<set $missingTable = {}>>
	<<else>>
		<<set $missingTable = ngUpdateMissingTable($missingTable)>>
	<</if>>
	<<for _i = 0; _i < _SL; _i++>>
		<<if $slaves[_i].relation != 0>>
			<<set _seed = 0, _rt = $slaves[_i].relationTarget, _ID = $slaves[_i].ID>>
			<<set _j = $slaveIndices[_rt]>>
			<<if def _j && $slaves[_j].relationTarget == _ID>>
				<<set _seed = 1>>
			<</if>>
			<<if _seed == 0>>
			<<set $slaves[_i].relation = 0, $slaves[_i].relationTarget = 0>>
			<</if>>
		<</if>>
		<<if $slaves[_i].relationship > 0>>
			<<set _seed = 0, _rt = $slaves[_i].relationshipTarget, _ID = $slaves[_i].ID>>
			<<set _j = $slaveIndices[_rt]>>
			<<if def _j && $slaves[_j].relationshipTarget == _ID>>
				<<set _seed = 1>>
			<</if>>
			<<if _seed == 0>>
			<<set $slaves[_i].relationship = 0, $slaves[_i].relationshipTarget = 0>>
			<</if>>
		<</if>>
	<</for>>
	<<for _i = 0; _i < _SL; _i++>>
		<<if $familyTesting == 1>>
			<<if $slaves[_i].canRecruit == 1>>
				/*<<set $recruiters.push($slaves[_i])>>*/
			<</if>>
		<<else>>
			<<if $slaves[_i].relation == 0>>
				<<if random(1,100) <= 5>>
					<<set $slaves[_i].recruiter = "twin">>
				<<elseif ($slaves[_i].actualAge > 32) && (random(1,100) <= 41)>>
					<<set $slaves[_i].recruiter = "mother">>
				<<elseif ($slaves[_i].actualAge < 24) && (random(1,100) <= 40)>>
					<<set $slaves[_i].recruiter = "daughter">>
				<<elseif ($slaves[_i].actualAge < 43) && (random(1,100) <= 20)>>
					<<set $slaves[_i].recruiter = "older sister">>
				<<elseif ($slaves[_i].actualAge < 25) && ($slaves[_i].actualAge > 18) && (random(1,100) <= 20)>>
					<<set $slaves[_i].recruiter = "young sister">>
				<</if>>
			<<else>>
				<<set $slaves[_i].recruiter = 0>>
			<</if>>
		<</if>> /*closes family mode */
		<<set $slaves[_i].milk = 0>>
		<<set $slaves[_i].cum = 0>>
		<<set $slaves[_i].births = 0>>
		<<set $slaves[_i].mammaryCount = 0>>
		<<set $slaves[_i].penetrativeCount = 0>>
		<<set $slaves[_i].oralCount = 0>>
		<<set $slaves[_i].analCount = 0>>
		<<set $slaves[_i].vaginalCount = 0>>
	<</for>>
	<<set $slavesOriginal = []>> /* not used by pregmod */
	<<if ndef $PC.markings>>
		<<set $PC.markings = "none">>
	<</if>>
	<<set $PC.reservedChildren = 0>>
	<<set $PC.reservedChildrenNursery = 0>>
<<else>>
	<<set $slaves = []>>
	<<set $slavesOriginal = []>> /* not used by pregmod */
	<<set $genePool = []>>
	<<set $slaveIndices = slaves2indices()>>
		<<set $missingTable = {}>>
	<<set $showMissingSlaves = false>>
	<<set $showMissingSlavesSD = false>>
<</if>>

<<set $organs = []>>
<<set $ArcadeiIDs = [], $BrothiIDs = [], $CellBiIDs = [], $CliniciIDs = [], $ClubiIDs = [], $DairyiIDs = [], $FarmyardiIDs = [], $HGSuiteiIDs = [], $MastSiIDs = [], $SchlRiIDs = [], $ServQiIDs = [], $SpaiIDs = [], $NurseryiIDs = []>>

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

<<if $saveImported == 0>> /* new game (not NG+) */

	<<initPC>>
	<<set $freshPC = 0>>
	<<set $cheater = 0>>
	<<set $cash = 10000>>
	<<set $normalizedEvents = 0>>
	<<set $autosave = 1>>
	<<set $useFSNames = 1>>
	<<set $seeDetails = 1>>
	<<set $seeDesk = 1>>
	<<set $newModelUI = 1>>
	<<set $seeArcology = 1>>
	<<set $seeFCNN = 1>>
	<<set $useSummaryCache = true>>
	<<set $seeExtreme = 0>>
	<<set $seeBestiality = 0>>
	<<set $extremeUnderage = 0>>
	<<set $seeHyperPreg = 0>>
	<<set $seePreg = 1>>
	<<set $dangerousPregnancy = 0>>
	<<set $adamPrinciple = 0>>
	<<set $seeCircumcision = 1>>
	<<set $seeAge = 1>>
	<<set $seeDicks = 25>>
	<<set $seeDicksAffectsPregnancy = 1>>
	<<set $seeRace = 1>>
	<<set $seeNationality = 1>>
	<<set $seeImages = 0>>
	<<set $seeFaces = 1>>
	<<set $seeAvatar = 1>>
	<<set $imageChoice = 0>>
	<<set $seeVectorArtHighlights = 1>>
	<<set $seeMainFetishes = 0>>
	<<set $seeSummaryImages = 1>>
	<<set $seeReportImages = 1>>
	<<set $lineSeparations = 1>>
	<<set $showSexualHistory = 1>>
	<<set $showBodyMods = 0>>
	<<set $showImplantEffects = 1>>
	<<set $showClothing = 1>>
	<<set $showAgeDetail = 1>>
	<<set $showBoobCCs = 1>>
	<<set $showHeightCMs = 1>>
	<<set $showDickCMs = 1>>
	<<set $showInches = 0>>
	<<set $showScores = 1>>
	<<set $showAssignToScenes = 1>>
	<<set $showEWD = 1>>
	<<set $showEWM = 1>>
	<<set $showVignettes = 1>>
	<<set $showAppraisal = 1>>
	<<set $positionMainLinks = -1>>
	<<set $showTipsFromEncy = 1>>
	<<set $displayAssignments = 1>>
	<<set $sortSlavesBy = "devotion">>
	<<set $sortSlavesOrder = "descending">>
	<<set $sortSlavesMain = 1>>
	<<set $HGSeverity = 0>>
	<<set $HGFormality = 1>>
	<<set $universalRulesConsent = 0>>
	<<set $universalRulesRest = 0>>
	<<set $universalRulesFacilityWork = 1>>
	<<set $universalRulesImpregnation = "none">>
	<<set $universalRulesBirthing = 0>>
	<<set $universalRulesCSec = 0>>
	<<set $universalRulesNewSlavesRA = 1>>
	<<set $universalRulesAssignsSelfFacility = 0>>
	<<set $universalRulesImmobileSlavesMaintainMuscles = 0>>
	<<set $universalRulesChildrenBecomeBreeders = 0>>
	<<set $slaveDead = 0>>
	<<set $rulesAssistantMain = 1>>
	<<set $rulesAssistantAuto = 0>>
	<<set $abbreviateDevotion = 2>>
	<<set $abbreviateRules = 2>>
	<<set $abbreviateClothes = 2>>
	<<set $abbreviateOrigins = 2>>
	<<set $abbreviateRulesets = 2>>
	<<set $abbreviateNationality = 2>>
	<<set $abbreviateHealth = 2>>
	<<set $abbreviateDiet = 2>>
	<<set $abbreviateDrugs = 2>>
	<<set $abbreviateRace = 2>>
	<<set $abbreviateGenitalia = 2>>
	<<set $abbreviatePhysicals = 2>>
	<<set $abbreviateSkills = 2>>
	<<set $abbreviateMental = 2>>
	<<set $abbreviateSidebar = 2>>
	<<set $summaryStats = 1>>
	<<set $nicknamesAllowed = 1>>
	<<set $modRequestsAllowed = 1>>
	<<set $expansionRequestsAllowed = 1>>
	<<set $plot = 1>>
	<<set $continent = "North America">>
	<<set $terrain = "rural">>
	<<set $language = "English">>
	<<set $headGirlTrainsSkills = 1>>
	<<set $headGirlTrainsHealth = 1>>
	<<set $headGirlTrainsObedience = 1>>
	<<set $headGirlTrainsFlaws = 1>>
	<<set $headGirlSoftensFlaws = 1>>
	<<set $headGirlTrainsParaphilias = 1>>
	<<set $retainCareer = 1>>
	<<set $useSlaveSummaryTabs = 0>>
	<<set $useSlaveSummaryOverviewTab = 0>>
	<<set $useSlaveListInPageJSNavigation = 0>>

	/* master suite reporting and alternate descriptions */
	<<set $verboseDescriptions = 0>>
	/* Accordion 000-250-006 */
	<<set $useAccordion = 0>>

	<<set $useTabs = 0>>

	/*onlyintendeddickgirls variables */
	<<set $makeDicks = 0>>

	/* economy reports variables */
	<<set $showEconomicDetails = 0>>

	/* Pregmod specific */
	<<set $economy = 100>>
	<<set $antiWeatherFreeze = 0>>
	<<set $difficultySwitch = 0>>
	<<set $econWeatherDamage = 0>>
	<<set $disasterResponse = 0>>
	<<set $neighboringArcologies = 3>>
	<<set $newDescriptions = 0>>
	<<set $familyTesting = 0>>
	<<set $inbreeding = 1>>
	<<set $allowFamilyTitles = 0>>

	/% Begin mod section: toggle whether slaves lisp. %/
	<<set $disableLisping = 0>>
	/% End mod section: toggle whether slaves lisp. %/

	<<set $weightAffectsAssets = 1>>
	<<set $curativeSideEffects = 1>>

	/*non-vanilla shit*/
	<<set $pedo_mode = 0>>
	<<set $minimumSlaveAge = 18>>
	<<set $fertilityAge = 13>>
	<<silently>>
	FertilityAge($fertilityAge)
	<</silently>>
	<<set $potencyAge = 13>>
	<<set $AgePenalty = 1>>
	<<set $precociousPuberty = 0>>
	<<set $loliGrow = 1>>

	<<set $retirementAge = 45>>
	<<set $customRetirementAge = 45>>
	<<set $FSCreditCount = 5>>
	<<set $FSCreditCountString = "five">>

	<<include "Init Rules">>

<<else>> /* imported save (NG+) */

	<<if $freshPC == 0>>
		<<if def $arcologies[0].prosperity>>
			<<set $cash += 250*$arcologies[0].prosperity*$arcologies[0].ownership>>
		<</if>>
		<<set $cash = Math.clamp(1000*Math.trunc($cash/100000), 5000, 1000000)>>
		<<if $retainCareer == 0>>
			<<set $PC.career = "arcology owner", $PC.trading = 100, $PC.warfare = 100, $PC.hacking = 100, $PC.slaving = 100, $PC.engineering = 100, $PC.medicine = 100>>
		<</if>>
		<<if $PC.mother > 0>>
			<<set $PC.mother += 1200000>>
		<<elseif $PC.mother < 0>>
			<<set $PC.mother -= 1200000>>
		<</if>>
		<<if $PC.father > 0>>
			<<set $PC.father += 1200000>>
		<<elseif $PC.father < 0>>
			<<set $PC.father -= 1200000>>
		<</if>>
		<<if $PC.pregSource > 0>>
			<<set $PC.pregSource += 1200000>>
			<<set _getFather = $slaveIndices[$PC.pregSource]>>
			<<if ndef _getFather>>
				<<set $PC.pregSource = 0>>
			<</if>>
			<<for _sInit = 0; _sInit < $PC.womb.length; _sInit++>>
				<<if $PC.womb[_sInit].fatherID > 0>>
					<<set $PC.womb[_sInit].fatherID += 1200000>>
				<</if>>
			<</for>>
		<</if>>
	<<else>>
		<<initPC>>
		<<set $cheater = 0>>
		<<set $cash = 10000>>
	<</if>>

<</if>>

<<set $targetArcology = {type: "New"}>>

<<set $REFeminizationCheckinIDs = []>>
<<set $REMILFCheckinIDs = []>>
<<set $REOrientationCheckinIDs = []>>
<<set $REUglyCheckinIDs = []>>
<<set $REButtholeCheckinIDs = []>>
<<set $REFutaSisterCheckinIDs = []>>
<<set $REReductionCheckinIDs = []>>
<<set $activeSlave = 0>>

<<set $boomerangSlave = 0, $boomerangWeeks = 0, $boomerangBuyer = 0>>

<<set $bioreactorPerfectedID = 0>>

<<set $independenceDay = 0>>
<<set $invasionVictory = 0>>
<<set $daughtersVictory = 0>>
<<set $startingGirlCopied = 0, $startingGirlRelation = 0>>
<<set $archetyped = 0>>
<<set $createRelatedSlave = 0>>

<<set $slavesVisible = 0>>
<<set $dormitory = 20>>
<<set $dormitoryPopulation = 0>>
<<set $rooms = 5>>
<<set $roomsPopulation = 0>>

<<set $brothelSlaves = 0>>
<<set $brothelDecoration = "standard">>
<<set $brothelUpgradeDrugs = 0>>
<<set $brothelAdsSpending = 0>>
<<set $brothelAdsOld = 0>>
<<set $brothelAdsModded = 0>>
<<set $brothelAdsImplanted = 0>>
<<set $brothelAdsStacked = 0>>
<<set $brothelAdsPreg = 0>>
<<set $brothelAdsXX = 0>>
<<set $brothelName = "the Brothel">>
<<set $brothelNameCaps = "The Brothel">>
<<set $brothel = 0>>
<<set $dairySlaves = 0>>
<<set $dairyDecoration = "standard">>
<<set $dairyPrepUpgrade = 0>>
<<set $dairyStimulatorsUpgrade = 0>>
<<set $dairyStimulatorsSetting = 0>>
<<set $dairyStimulatorsSettingChanged = 0>>
<<set $dairyFeedersUpgrade = 0>>
<<set $dairyFeedersSetting = 0>>
<<set $dairyFeedersSettingChanged = 0>>
<<set $dairyPregUpgrade = 0>>
<<set $dairyPregSetting = 0>>
<<set $dairyPregSettingChanged = 0>>
<<set $dairyRestraintsUpgrade = 0>>
<<set $dairyRestraintsSetting = 0>>
<<silently>>
DairyRestraintsSetting($dairyRestraintsSetting)
<</silently>>
<<set $dairySlimMaintainUpgrade = 0>>
<<set $dairySlimMaintain = 0>>
<<set $dairyHyperPregRemodel = 0>>
<<set $dairyWeightSetting = 0>>
<<set $dairyImplantsSetting = 1>>
<<set $dairyUpgradeMenials = 0>>
<<set $createBioreactors = 0>>
<<set $bioreactorsAnnounced = 0>>
<<set $bioreactorsHerm = 0>>
<<set $bioreactorsXX = 0>>
<<set $bioreactorsXY = 0>>
<<set $bioreactorsBarren = 0>>
<<set $dairyName = "the Dairy">>
<<set $dairyNameCaps = "The Dairy">>
<<set $dairy = 0>>
<<set $cumSlaves = 0>>
<<set $clubSlaves = 0>>
<<set $clubDecoration = "standard">>
<<set $clubUpgradePDAs = 0>>
<<set $clubAdsSpending = 0>>
<<set $clubAdsOld = 0>>
<<set $clubAdsModded = 0>>
<<set $clubAdsImplanted = 0>>
<<set $clubAdsStacked = 0>>
<<set $clubAdsPreg = 0>>
<<set $clubAdsXX = 0>>
<<set $clubName = "the Club">>
<<set $clubNameCaps = "The Club">>
<<set $club = 0>>
<<set $servantsQuartersSlaves = 0>>
<<set $servantsQuartersDecoration = "standard">>
<<set $servantsQuartersUpgradeMonitoring = 0>>
<<set $servantsQuarters = 0>>
<<set $servantsQuartersName = "the Servants' Quarters">>
<<set $servantsQuartersNameCaps = "The Servants' Quarters">>
<<set $schoolroomSlaves = 0>>
<<set $schoolroomDecoration = "standard">>
<<set $schoolroomUpgradeSkills = 0>>
<<set $schoolroomUpgradeLanguage = 0>>
<<set $schoolroomUpgradeRemedial = 0>>
<<set $schoolroom = 0>>
<<set $schoolroomName = "the Schoolroom">>
<<set $schoolroomNameCaps = "The Schoolroom">>
<<set $spaSlaves = 0>>
<<set $spaDecoration = "standard">>
<<set $spa = 0>>
<<set $spaUpgrade = 0>>
<<set $spaFix = 0>>
<<set $spaName = "the Spa">>
<<set $spaNameCaps = "The Spa">>

<<set $incubator = 0>>
<<set $incubatorSlaves = 0>>
<<set $incubatorOrgans = []>>
<<set $incubatorOldID = 0>>
<<set $incubatorUpgradeSpeed = 5>>
<<set $incubatorUpgradeWeight = 0>>
<<set $incubatorUpgradeMuscles = 0>>
<<set $incubatorUpgradeGrowthStims = 0>>
<<set $incubatorUpgradeReproduction = 0>>
<<set $incubatorUpgradeOrgans = 0>>
<<set $incubatorImprintSetting = 0>>
<<set $incubatorWeightSetting = 0>>
<<set $incubatorMusclesSetting = 0>>
<<set $incubatorGrowthStimsSetting = 0>>
<<set $incubatorReproductionSetting = 0>>
<<set $incubatorName = "the Incubator">>
<<set $incubatorNameCaps = "The Incubator">>
<<set $reservedChildren = 0>>
<<set $tanks = []>>
<<set $clinicSlaves = 0>>
<<set $clinicDecoration = "standard">>
<<set $clinic = 0>>
<<set $clinicUpgradeFilters = 0>>
<<set $clinicUpgradeScanner = 0>>
<<set $clinicUpgradePurge = 0>>
<<set $clinicName = "the Clinic">>
<<set $clinicNameCaps = "The Clinic">>
<<set $arcadeSlaves = 0>>
<<set $arcadeDecoration = "standard">>
<<set $arcadeUpgradeInjectors = 0>>
<<set $arcadeUpgradeFuckdolls = 0>>
<<set $arcadeUpgradeCollectors = 0>>
<<set $arcadeUpgradeMenials = 0>>
<<set $arcadeName = "the Arcade">>
<<set $arcadeNameCaps = "The Arcade">>
<<set $arcade = 0>>
<<set $fuckdollsSold = 0>>
<<set $cellblockSlaves = 0>>
<<set $cellblockDecoration = "standard">>
<<set $cellblockUpgrade = 0>>
<<set $cellblock = 0>>
<<set $cellblockName = "the Cellblock">>
<<set $cellblockNameCaps = "The Cellblock">>
<<set $cellblockWardenCumsInside = 1>>
<<set $masterSuiteSlaves = 0>>
<<set $masterSuiteDecoration = "standard">>
<<set $masterSuiteUpgradeLuxury = 0>>
<<set $masterSuiteUpgradePregnancy = 0>>				/* Is the upgrade active? */
<<set $masterSuitePregnancyFertilityDrugs = 0>>		/* Are slaves being put on fertility drugs? */
<<set $masterSuitePregnancyFertilitySupplements = 0>>	/* Are those drugs being supplemented (health benefits and (even) more multiple pregnancies) */
<<set $masterSuitePregnancySlaveLuxuries = 0>>			/* Are the slaves being given some nicer things to reduce stress during preg? (health/devotion/trust benefits) */
<<set $universalHGImpregnateMasterSuiteToggle = 0>>	/* Will the HG impregnate fertile slaves in the MS? */
<<set $masterSuiteHyperPregnancy = 0>>
<<set $masterSuite = 0>>
<<set $masterSuiteName = "the Master Suite">>
<<set $masterSuiteNameCaps = "The Master Suite">>

<<set $nursery = 0>>	/*counts the number of children the nursery can support*/
<<set $nurseryNannies = 0>>	/*counts the number of nannies the nursery can support*/
<<set $nurseryBabies = 0>>	/*counts the number of children currently in the nursery*/
<<set $nurserySlaves = 0>>	/*counts the number of nannies currently assigned to the nursery*/
<<set $nurseryDecoration = "standard">>
<<set $MatronInfluence = 0>> /*check for whether the children are influenced by the Matron*/
<<set $nannyInfluence = 0>>	/*check for whether the children are influenced by the nannies*/
<<set $nurseryWeight = 0>>
<<set $nurseryMuscles = 0>>
<<set $nurseryHormones = 0>>
<<set $nurseryOrgans = 0>>	/*not currently in use*/
<<set $nurseryImprintSetting = 0>>
<<set $nurseryWeightSetting = 0>>
<<set $nurseryMusclesSetting = 0>>
<<set $nurseryHormonesSetting = 0>>
<<set $nurseryName = "the Nursery">>
<<set $nurseryNameCaps = "The Nursery">>
<<set $reservedChildrenNursery = 0>>
<<set $cribs = []>>		/*array of children in the nursery*/
<<set $childToSlave = -1>>

<<set $farmyard = 0>>
<<set $farmyardSlaves = 0>>
<<set $farmyardDecoration = "standard">>
<<set $farmyardUpgrade = 0>>
<<set $farmyardUpgradeList = []>>
<<set $farmyardCrops = 0>>
<<set $farmyardStable = 0>>
<<set $farmyardKennels = 0>>
<<set $farmyardCages = 0>>
<<set $activeCanine = 0>>
<<set $activeHooved = 0>>
<<set $activeFeline = 0>>
<<set $farmyardLab = 0>>
<<set $farmyardLabUpgrades = {animalOvaries: 0, animalTesticles: 0, animalMpreg: 0}>>
<<set $animalsBought = {canines: 0, hooved: 0, felines: 0, labradorRetrievers: 0, germanShepherds: 0, goldenRetrievers: 0, frenchBulldogs: 0, bulldogs: 0, beagles: 0, poodles: 0, rottweilers: 0, yorkshireTerriers: 0, siberianHuskies: 0, horses: 0, siameses: 0, persians: 0, maineCoons: 0, ragdolls: 0, bengals: 0, abbysinians: 0, birmans: 0, orientalShorthairs: 0, sphynxes: 0, russianBlues: 0, wolves: 0, foxes: 0, jackals: 0, dingos: 0, zebras: 0, cougars: 0, jaguars: 0, pumas: 0, lynx: 0, leopards: 0, lions: 0, tigers: 0}>>
<<set $canines = []>>
<<set $hooved = []>>
<<set $felines = []>>
<<set $farmyardName = "the Farmyard">>
<<set $farmyardNameCaps = "The Farmyard">>

<<set $HGSuite = 0>>
<<set $HGSuiteSlaves = 0>>
<<set $HGSuiteSurgery = 1>>
<<set $HGSuiteDrugs = 1>>
<<set $HGSuiteHormones = 1>>
<<set $HGSuiteEquality = 0>>
<<set $HGSuiteName = "the Head Girl Suite">>
<<set $HGSuiteNameCaps = "The Head Girl Suite">>
<<set $fighterIDs = []>>
<<set $pitBG = 0>>
<<set $pitAnimal = 0>>
<<set $pitAnimalType = 0>>
<<set $pitAudience = "none">>
<<set $pitLethal = 0>>
<<set $pitVirginities = 0>>
<<set $pitFought = 0>>
<<set $pit = 0>>
<<set $pitName = "the Pit">>
<<set $pitNameCaps = "The Pit">>
<<set $dojo = 0>>
<<set $feeder = 0>>
<<set $cockFeeder = 0>>
<<set $suppository = 0>>
<<set $weatherCladding = 0>>
<<set $weatherAwareness = 0>>
<<set $boobAccessibility = 0>>
<<set $servantMilkers = 0>>
<<set $servantMilkersMultiplier = 1>>
<<set $foodCost = 25>>
<<set $revealFoodEffects = 0>>

<<set $studio = 0>>
<<set $studioFeed = 0>>
<<set $PCSlutContacts = 1>>

/* Porn type counts */
<<set $pornStars = 0>>
<<set $pornStarFuckdolls = 0>>
<<set $pornStarRapees = 0>>
<<set $pornStarPreggos = 0>>
<<set $pornStarBBWs = 0>>
<<set $pornStarGainers = 0>>
<<set $pornStarStuds = 0>>
<<set $pornStarLolis = 0>>
<<set $pornStarDeepThroats = 0>>
<<set $pornStarStruggleFucks = 0>>
<<set $pornStarPainals = 0>>
<<set $pornStarTeases = 0>>
<<set $pornStarRomantics = 0>>
<<set $pornStarPerverts = 0>>
<<set $pornStarCarings = 0>>
<<set $pornStarUnflinchings = 0>>
<<set $pornStarSizeQueens = 0>>
<<set $pornStarNeglectfuls = 0>>
<<set $pornStarCumAddicts = 0>>
<<set $pornStarAnalAddicts = 0>>
<<set $pornStarAttentionWhores = 0>>
<<set $pornStarBreastGrowths = 0>>
<<set $pornStarAbusives = 0>>
<<set $pornStarMalicious = 0>>
<<set $pornStarSelfHatings = 0>>
<<set $pornStarBreeders = 0>>
<<set $pornStarSubs = 0>>
<<set $pornStarCumSluts = 0>>
<<set $pornStarAnals = 0>>
<<set $pornStarHumiliations = 0>>
<<set $pornStarBoobs = 0>>
<<set $pornStarDoms = 0>>
<<set $pornStarSadists = 0>>
<<set $pornStarMasochists = 0>>
<<set $pornStarPregnancySluts = 0>>

/* level 3 prestige */
<<set $pornStarID = 0>>
<<set $pornStarFuckdollID = 0>>
<<set $pornStarRapeID = 0>>
<<set $pornStarPreggoID = 0>>
<<set $pornStarBBWID = 0>>
<<set $pornStarGainerID = 0>>
<<set $pornStarStudID = 0>>
<<set $pornStarLoliID = 0>>
<<set $pornStarDeepThroatID = 0>>
<<set $pornStarStruggleFuckID = 0>>
<<set $pornStarPainalID = 0>>
<<set $pornStarTeaseID = 0>>
<<set $pornStarRomanticID = 0>>
<<set $pornStarPervertID = 0>>
<<set $pornStarCaringID = 0>>
<<set $pornStarUnflinchingID = 0>>
<<set $pornStarSizeQueenID = 0>>
<<set $pornStarNeglectfulID = 0>>
<<set $pornStarCumAddictID = 0>>
<<set $pornStarAnalAddictID = 0>>
<<set $pornStarAttentionWhoreID = 0>>
<<set $pornStarBreastGrowthID = 0>>
<<set $pornStarAbusiveID = 0>>
<<set $pornStarMaliciousID = 0>>
<<set $pornStarSelfHatingID = 0>>
<<set $pornStarBreederID = 0>>
<<set $pornStarSubID = 0>>
<<set $pornStarCumSlutID = 0>>
<<set $pornStarAnalID = 0>>
<<set $pornStarHumiliationID = 0>>
<<set $pornStarBoobsID = 0>>
<<set $pornStarDomID = 0>>
<<set $pornStarSadistID = 0>>
<<set $pornStarMasochistID = 0>>
<<set $pornStarPregnancyID = 0>>

<<set $pregInventor = 0>>
<<set $pregInventorID = 0>>
<<set $pregInventions = 0>>

<<set $legendaryWhoreID = 0>>
<<set $legendaryEntertainerID = 0>>
<<set $legendaryCowID = 0>>
<<set $legendaryBallsID = 0>>
<<set $legendaryWombID = 0>>
<<set $legendaryAbolitionistID = 0>>

<<set $FSAnnounced = 0>>
<<set $FSCredits = 0>>
<<set $FSGotRepCredits = 0>>
<<set $FSSingleSlaveRep = 10>>
<<set $FSSpending = 0>>
<<set $FSLockinLevel = 100>>
<<set $applyLaw = 0>>
<<set $FSPromenade = {Subjugationist: 0, Supremacist: 0, GenderRadicalist: 0, GenderFundamentalist: 0, Paternalist: 0, Degradationist: 0, BodyPurist: 0, TransformationFetishist: 0, YouthPreferentialist: 0, MaturityPreferentialist: 0, SlimnessEnthusiast: 0, AssetExpansionist: 0, Pastoralist: 0, PhysicalIdealist: 0, ChattelReligionist: 0, AztecRevivalist: 0, RomanRevivalist: 0, EgyptianRevivalist: 0, EdoRevivalist: 0, ArabianRevivalist: 0, ChineseRevivalist: 0, Repopulationist: 0, Eugenics: 0, Hedonism: 0}>>

<<set $corpAnnounced = 0>>
<<set $corpIncorporated = 0>>
<<set $corpMarket = 0>>
<<set $corpPeopleEnslaved = 0>>
<<set $sharePrice = 0>>
<<set $personalShares = 0>>
<<set $publicShares = 0>>
<<set $corpCash = 0>>
<<set $corpProfit = 0>>
<<set $generalAssets = 0>>
<<set $slaveAssets = 0>>
<<set $entrapmentAssets = 0>>
<<set $captureAssets = 0>>
<<set $trainingAssets = 0>>
<<set $surgicalAssets = 0>>
<<set $drugAssets = 0>>
<<set $generalAssetPrice = 10>>
<<set $slaveAssetPrice = 10>>
<<set $entrapmentAssetPrice = 10>>
<<set $captureAssetPrice = 10>>
<<set $trainingAssetPrice = 10>>
<<set $surgicalAssetPrice = 10>>
<<set $drugAssetPrice = 10>>
<<set $generalUpgradeBreaking = "unselected">>
<<set $generalUpgradeWeight = "unselected">>
<<set $generalUpgradeMuscle = "unselected">>
<<set $entrapmentUpgradeDevotionOne = "unselected">>
<<set $entrapmentUpgradeDevotionTwo = "unselected">>
<<set $entrapmentUpgradeIntelligence = "unselected">>
<<set $captureUpgradeGender = "unselected">>
<<set $captureUpgradeAge = "unselected">>
<<set $captureUpgradeRace = "unselected">>
<<set $trainingUpgradeAccent = "unselected">>
<<set $trainingUpgradeEducation = "unselected">>
<<set $trainingUpgradeSexEd = "unselected">>
<<set $surgicalUpgradeCosmetics = "unselected">>
<<set $surgicalUpgradeImplants = "unselected">>
<<set $surgicalUpgradeGenitalia = "unselected">>
<<set $drugUpgradeHormones = "unselected">>
<<set $drugUpgradeInjectionOne = "unselected">>
<<set $drugUpgradeInjectionTwo = "unselected">>
<<set $corpValue = 0>>

<<set $shelterSlave = 0>>
<<set $shelterSlaveBought = 0>>
<<set $shelterAbuse = 0>>
<<set $shelterSlaveGeneratedWeek = 0>>

/* alternate clothing access variables */
<<set $clothesBoughtBunny = 0>>
<<set $clothesBoughtConservative = 0>>
<<set $clothesBoughtChains = 0>>
<<set $clothesBoughtWestern = 0>>
<<set $clothesBoughtOil = 0>>
<<set $clothesBoughtHabit = 0>>
<<set $clothesBoughtToga = 0>>
<<set $clothesBoughtHuipil = 0>>
<<set $clothesBoughtKimono = 0>>
<<set $clothesBoughtHarem = 0>>
<<set $clothesBoughtQipao = 0>>
<<set $clothesBoughtEgypt = 0>>
<<set $clothesBoughtBelly = 0>>
<<set $clothesBoughtMaternityDress = 0>>
<<set $clothesBoughtMaternityLingerie = 0>>
<<set $clothesBoughtLazyClothes = 0>>
<<set $clothesBoughtMilitary = 0>>
<<set $clothesBoughtCultural = 0>>
<<set $clothesBoughtMiddleEastern = 0>>
<<set $clothesBoughtPol = 0>>
<<set $clothesBoughtPantsu = 0>>
<<set $clothesBoughtCareer = 0>>
<<set $clothesBoughtDresses = 0>>
<<set $clothesBoughtBodysuits = 0>>
<<set $clothesBoughtCasual = 0>>
<<set $clothesBoughtUnderwear = 0>>
<<set $clothesBoughtSports = 0>>
<<set $clothesBoughtPony = 0>>
<<set $clothesBoughtSwimwear = 0>>
<<set $toysBoughtDildos = 0>>
<<set $toysBoughtGags = 0>>
<<set $toysBoughtButtPlugs = 0>>
<<set $toysBoughtButtPlugTails = 0>>
<<set $buckets = 0>>
/* assistant FS appearance variable */
<<set $assistantFSAppearance = "default">>

<<set $assistantPronouns = {pronoun: "she", possessivePronoun: "hers", possessive: "her", object: "her", objectReflexive: "herself", noun: "girl"}>>

/*pregmod variables */
<<set $specialSlavesPriceOverride = 0>>
<<set $pregAccessibility = 0>>
<<set $dickAccessibility = 0>>
<<set $ballsAccessibility = 0>>
<<set $buttAccessibility = 0>>
<<set $ageMode = 0>>
<<set $enema = 0>>
<<set $medicalEnema = 0>>
<<set $dairyPiping = 0>>
<<set $inflatedSlavesMilk = 0>>
<<set $inflatedSlavesCum = 0>>
<<set $milkPipeline = 0>>
<<set $cumPipeline = 0>>
<<set $burstee = 0>>
<<set $slaveDeath = 0>>
<<set $clinicInflateBelly = 0>>
<<set $playerBred = 0>>
<<set $propOutcome = 0>>
<<set $EliteSires = ["moves", "quick", "crazy", "virgin", "futa", "preggo"]>>
<<set $startingPoint = -1>>
<<set $PhysicalRetirementAgePolicy = 0>>
<<set $raped = -1>>
<<set $children = []>>
<<set $missingParentID = -10000>>
<<set $startingSlaveRelative = 0>>
<<set $mom = 0>>
/*<<set $animalParts = 0>>*/
<<set $originOveride = 0>>
<<set $playerAging = 2>>
<<set $pregSpeedControl = 0>>
<<set $clinicSpeedGestation = 0>>
<<set $playerSurgery = 0>>
<<set $playerGetsMilked = 0>>
<<set $bodyswapAnnounced = 0>>
<<set $surnamesForbidden = 0>>
<<set $menstruation = 0>>
<<set $FCTVcount = 0>>
<<set $FCTVrate = 4>>
<<set $FCTVreceiver = 0>>
<<set $receiverAvailable = 0>>
<<set $FCTVshow = 0>>
<<set $lastShow = 0>>
<<set $randShow = 0>>
<<set $MercenariesMessageSent = 0>>
<<set $SpecialForcesMessageSent = 0>>
<<set $BodyguardHasSucessfullyRecivedSignal = 0>>
<<set $finalChoice = "none">>
<<set $eliteTotal = 12>>
<<set $eliteDead = 0>>
<<set $eliteVegetable = 0>>
<<set $eliteFate = 0>>
<<set $swanSong = 0>>
<<set $failedElite = 0>>
<<set $eugenicsFullControl = 0>>
<<set $badC = 0, $badB = 0>>

<<set $schoolSuggestion = 0>>
<<set $TSS = {schoolUpgrade: 0, schoolPresent: 0, schoolProsperity: 0, subsidize: 0, schoolAnnexed: 0, studentsBought: 0, schoolSale: 0}>>
<<set $GRI = {schoolUpgrade: 0, schoolPresent: 0, schoolProsperity: 0, subsidize: 0, schoolAnnexed: 0, studentsBought: 0, schoolSale: 0}>>
<<set $SCP = {schoolUpgrade: 0, schoolPresent: 0, schoolProsperity: 0, subsidize: 0, schoolAnnexed: 0, studentsBought: 0, schoolSale: 0}>>
<<set $LDE = {schoolUpgrade: 0, schoolPresent: 0, schoolProsperity: 0, subsidize: 0, schoolAnnexed: 0, studentsBought: 0, schoolSale: 0}>>
<<set $TGA = {schoolUpgrade: 0, schoolPresent: 0, schoolProsperity: 0, subsidize: 0, schoolAnnexed: 0, studentsBought: 0, schoolSale: 0}>>
<<set $TCR = {schoolUpgrade: 0, schoolPresent: 0, schoolProsperity: 0, subsidize: 0, schoolAnnexed: 0, studentsBought: 0, schoolSale: 0}>>
<<set $TFS = {farmUpgrade: 0, schoolUpgrade: 0, schoolPresent: 0, schoolProsperity: 0, subsidize: 0, schoolAnnexed: 0, studentsBought: 0, schoolSale: 0, compromiseWeek: 0}>>
<<set $futaAddiction = 0>>
<<set $HA = {schoolUpgrade: 0, schoolPresent: 0, schoolProsperity: 0, subsidize: 0, schoolAnnexed: 0, studentsBought: 0, schoolSale: 0}>>

<<set $IDNumber = 1>>

<<set $week = 1>>
<<set $month = "January">>
<<set $day = 19>>
<<set $year = 2037>>

<<set $weddingPlanned = 0>>
<<set $weddingSlaveID = 0>>
<<set $personalAttention = "sex">>
<<set $HeadGirl = 0>>
<<set $HGTimeInGrade = 0>>
<<set $HGEnergy = 0>>
<<set $HGCum = 0>>
<<set $Recruiter = 0>>
<<set $recruiterTarget = "desperate whores">>
<<set $recruiterProgress = 0>>
<<set $recruiterIdleRule = "number">>
<<set $recruiterIdleNumber = 20>>
<<set $bodyguardTrains = 1>>
<<set $Bodyguard = 0>>
<<set $Madam = 0>>
<<set $DJ = 0>>
<<set $Milkmaid = 0>>
<<set $milkmaidImpregnates = 0>>
<<set $Farmer = 0>>
<<set $Collectrix = 0>>
<<set $Stewardess = 0>>
<<set $stewardessImpregnates = 0>>
<<set $Schoolteacher = 0>>
<<set $Attendant = 0>>
<<set $Matron = 0>>
<<set $Nurse = 0>>
<<set $Wardeness = 0>>
<<set $Concubine = 0>>
<<set $assistant = 0>>
<<set $assistantPower = 0>>
<<set $economicUncertainty = 10>>
<<set $assistantAppearance = "normal">>
<<set $assistantExtra1 = 0>>
<<set $assistantExtra2 = 0>>
<<set $assistantOptions = 0>>
<<set $assistantFSOptions = 0>>
<<set $assistantName = "your personal assistant">>
<<set $assistantNameAnnounced = 0>>
<<set $assistantBodyDesire = 0>>
<<set $marketAssistantAnnounced = 0>>
<<set $marketAssistantRelationship = "cute">>
<<set $marketAssistantLimit = 0>>
<<set $marketAssistantAggressiveness = 0>>

<<set $justiceEvents = ["slave deal", "slave training", "majority deal", "indenture deal", "virginity deal", "breeding deal"]>> /* not in setupVars because we remove events from this array as they occur */
<<set $prisonCircuit = ["low tier criminals", "gangs and smugglers", "white collar", "military prison"]>>
<<set $prisonCircuitIndex = random(0,$prisonCircuit.length-1)>>

<<set $fixedNationality = 0>>
<<set $fixedRace = 0>>
<<set $ui = "start">>

<<set $brandTarget = "buttock">>
<<set $brandDesign = "your initials">>

<<set $oralTotal = 0>>
<<set $vaginalTotal = 0>>
<<set $analTotal = 0>>
<<set $mammaryTotal = 0>>
<<set $penetrativeTotal = 0>>
<<set $milkTotal = 0>>
<<set $cumTotal = 0>>
<<set $birthsTotal = 0>>
<<set $pitKillsTotal = 0>>

<<set $collaboration = 0>>
<<set $traitor = 0>>
<<set $traitorWeeks = 0>>
<<set $hackerSupport = 0>>
<<set $hostage = 0>>
<<set $hostageAnnounced = 0>>
<<set $hostageCost = 0>>
<<set $hostageRescued = 0>>
<<set $hostageGiveIn = 0>>
<<set $rivalSet = 0>>
<<set $rivalryFS = 0>>
<<set $rivalryFSAdopted = 0>>
<<set $rivalryFSRace = 0>>
<<set $rivalOwner = 0>>
<<set $rivalOwnerEnslaved = 0>>
<<set $rivalryPower = 0>>
<<set $rivalryDuration = 0>>
<<set $nationHate = 0>>
<<set $slaveMedic = 0>>
<<set $PShoot = 0>>
<<set $PSnatch = 0>>
<<set $PRaid = 0>>
<<set $PAid = 0>>
<<set $PPit = 0>>

<<set $dispensary = 0>>
<<set $dispensaryUpgrade = 0>>
<<set $organFarmUpgrade = 0>>
<<set $completedOrgans = []>>
<<set $limbsCompleted = 0>>
<<set $limbs = []>>
<<set $ImplantProductionUpgrade = 0>>
<<set $permaPregImplant = 0>>
<<set $injectionUpgrade = 0>>
<<set $hormoneUpgradeMood = 0>>
<<set $hormoneUpgradeShrinkage = 0>>
<<set $hormoneUpgradePower = 0>>
<<set $pubertyHormones = 0>>
<<set $dietXXY = 0>>
<<set $dietCleanse = 0>>
<<set $cumProDiet = 0>>
<<set $dietFertility = 0>>
<<set $curativeUpgrade = 0>>
<<set $growthStim = 0>>
<<set $reproductionFormula = 0>>
<<set $aphrodisiacUpgrade = 0>>
<<set $aphrodisiacUpgradeRefine = 0>>
<<set $healthyDrugsUpgrade = 0>>
<<set $superFertilityDrugs = 0>>
<<set $bellyImplants = 0>>
<<set $cervixImplants = 0>>
<<set $meshImplants = 0>>
<<set $prostateImplants = 0>>
<<set $youngerOvaries = 0>>
<<set $animalOvaries = 0>> /*{pigOvaries: 0, canineOvaries: 0, horseOvaries: 0, cowOvaries: 0} currently unused*/
<<set $animalTesticles = 0>> /*{pigTestes: 0, dogTestes: 0, horseTestes: 0, cowTestes: 0} currently unused*/
<<set $animalMpreg = 0>> /*{pigMpreg: 0, dogMpreg: 0, horseMpreg: 0, cowMpreg: 0} currently unused*/
<<set $prostheticsUpgrade = 0>>
<<set $geneticMappingUpgrade = 0>>
<<set $pregnancyMonitoringUpgrade = 0>>

<<set $surgeryUpgrade = 0>>

<<set $barracks = 0>>
<<set $mercenaries = 0>>
<<set $mercenariesHelpCorp = 0>>
<<set $personalArms = 0>>

<<set $saleDescription = 0>>
<<set $gingering = 0>>
<<set $beforeGingering = 0>>
<<set $gingeringDetected = 0>>
<<set $gingeringDetection = 0>>
<<set $surgeryDescription = 0>>
<<set $encyclopedia = "How to Play">>
<<set $showEncyclopedia = 1>>

<<set $trinkets = []>>
<<set $SPcost = 1000>>
<<set $preOwnedViewed = 0>>
<<set $debtWarned = 0>>
<<set $internationalTrade = 1>>
<<set $internationalVariety = 0>>
<<set $slaveCostFactor = 0.95>>
<<set $menialDemandFactor = 0>>
<<set $menialSupplyFactor = 0>>
<<set $demandTimer = 0>>
<<set $supplyTimer = 0>>
<<set $elapsedDemandTimer = 0>>
<<set $elapsedSupplyTimer = 0>>
<<set $slaveCostRandom = 0>>
<<set $deltaDemand = 0>>
<<set $deltaSupply = 0>>
<<set $minimumSlaveCost = 2500>>
<<set $facilityCost = 100>>
<<set $enduringRep = 1000>>
<<set $rep = 1000>>
<<set $repGain = 0>>
<<set $repLoss = 0>>
<<set $cashLastWeek = 0>>

<<set $arcologyUpgrade = {drones: 0, hydro: 0, apron: 0, grid: 0, spire: 0}>>

<<set $AGrowth = 2>>
<<set $ACitizens = 4250>>
<<set $lowerClass = 3120>>
<<set $LSCBase = 800>>
<<set $visitors = 0>>
<<set $welfare = 0.004>>
<<set $rentEffectL = 1>>
<<set $LCRent = 20>>
<<set $middleClass = 890>>
<<set $MCBase = 200>>
<<set $rentEffectM = 1>>
<<set $MCRent = 50>>
<<set $upperClass = 200>>
<<set $UCBase = 40>>
<<set $rentEffectU = 1>>
<<set $UCRent = 175>>
<<set $topClass = 40>>
<<set $TCBase = 20>>
<<set $rentEffectT = 1>>
<<set $TCRent = 650>>
<<set $GDP = 278.6>>
<<set $NPCSlaves = 900>>
<<set $ASlaves = 900>>
<<set $slaveDemandU = 2>>
<<set $slaveDemandT = 12>>
<<set $slaveProductivity = 0.8>>
<<set $enslaveChance = 0.2>>
<<set $slaveExpiration = 0.005>>
<<set $AProsperityCap = 120>>

<<set $sectors = [
	{type: "Penthouse", ownership: 1},
	{type: "Empty", ownership: 0},
	{type: "Empty", ownership: 0},
	{type: "Empty", ownership: 0},
	{type: "Empty", ownership: 0},
	{type: "Shops", ownership: 1},
	{type: "Shops", ownership: 1},
	{type: "Shops", ownership: 1},
	{type: "Apartments", ownership: 1},
	{type: "Apartments", ownership: 1},
	{type: "Apartments", ownership: 1},
	{type: "Apartments", ownership: 1},
	{type: "Apartments", ownership: 1},
	{type: "Apartments", ownership: 1},
	{type: "Apartments", ownership: 1},
	{type: "Apartments", ownership: 1},
	{type: "Apartments", ownership: 1},
	{type: "Apartments", ownership: 1},
	{type: "Apartments", ownership: 1},
	{type: "Apartments", ownership: 1},
	{type: "Markets", ownership: 1},
	{type: "Markets", ownership: 1},
	{type: "Markets", ownership: 1},
	{type: "Markets", ownership: 1},
	{type: "Markets", ownership: 1},
	{type: "Manufacturing", ownership: 1},
	{type: "Manufacturing", ownership: 1},
	{type: "Manufacturing", ownership: 1},
	{type: "Manufacturing", ownership: 1},
	{type: "Manufacturing", ownership: 1}
]>>

<<for _i = 0; _i < 12; _i++>>
	<<set _j = random(5,28)>>
	<<if $sectors[_j].ownership == 1>>
		<<set $sectors[_j].ownership = 0>>
	<<else>>
		<<set _i-->>
	<</if>>
<</for>>

<<set $helots = 0>>
<<set $fuckdolls = 0>>
<<set $menialBioreactors = 0>>
<<set $prestigeAuctioned = 0>>
<<set $slaveMarketLimit = 20>>
<<set $slavesSeen = 0>>

<<set $slaveOrphanageTotal = 0>>
<<set $citizenOrphanageTotal = 0>>
<<set $privateOrphanageTotal = 0>>
<<set $breederOrphanageTotal = 0>>

<<set $alwaysSubsidizeRep = 0>>
<<set $alwaysSubsidizeGrowth = 0>>
<<set $ProImmigrationCash = 0>>
<<set $ProImmigrationRep = 0>>
<<set $AntiImmigrationCash = 0>>
<<set $AntiImmigrationRep = 0>>
<<set $ProEnslavementCash = 0>>
<<set $ProEnslavementRep = 0>>
<<set $AntiEnslavementCash = 0>>
<<set $AntiEnslavementRep = 0>>
<<set $BasicSMR = 1>>
<<set $HealthInspectionSMR = 0>>
<<set $EducationSMR = 0>>
<<set $FrigiditySMR = 0>>
<<set $BasicBeautySMR = 0>>
<<set $QualityBeautySMR = 0>>
<<set $BasicWeightSMR = 0>>
<<set $BasicIntelligenceSMR = 0>>
<<set $QualityIntelligenceSMR = 0>>
<<set $BasicHeightSMR = 0>>
<<set $AdvancedHeightSMR = 0>>
<<set $IntelligenceEugenicsSMR = 0>>
<<set $HeightEugenicsSMR = 0>>
<<set $FaceEugenicsSMR = 0>>
<<set $HonestySMR = 0>>
<<set $ProRefugees = 0>>
<<set $ProRecruitment = 0>>
<<set $OralEncouragement = 0>>
<<set $VaginalEncouragement = 0>>
<<set $AnalEncouragement = 0>>
<<set $OralDiscouragement = 0>>
<<set $VaginalDiscouragement = 0>>
<<set $AnalDiscouragement = 0>>
<<set $CashForRep = 0>>
<<set $RepForCash = 0>>
<<set $Cash4Babies = 0>>
<<set $RegularParties = 0>>
<<set $PAPublic = 0>>
<<set $CoursingAssociation = 0>>
	<<set $Lurcher = 0>>
	<<set $coursed = 0>>
<<set $RaidingMercenaries = 0>>
	<<set $raided = 0>>
<<set $MixedMarriage = 0>>
<<set $CulturalOpenness = 0>>
<<set $goodImageCampaign = 0>>
<<set $sexualOpeness = 0>>

<<set $policyCost = 5000>>
<<set $expiree = 0>>
<<set $retiree = 0>>
<<set $birthee = 0>>
<<set $CustomRetirementAgePolicy = 0>>
<<set $BioreactorRetirement = 0>>
<<set $ArcadeRetirement = 0>>
<<set $CitizenRetirement = 0>>
<<set $CitizenRetirementTrigger = 0>>
<<set $FSSupLawTrigger = 0>>
<<set $FSSubLawTrigger = 0>>
<<set $SexMilestoneRetirement = 0>>
<<set $MilkMilestoneRetirement = 0>>
<<set $CumMilestoneRetirement = 0>>
<<set $BirthsMilestoneRetirement = 0>>
<<set $KillsMilestoneRetirement = 0>>
<<set $retirementSex = 10000>>
<<set $retirementMilk = 50000>>
<<set $retirementCum = 500000>>
<<set $retirementBirths = 5>>
<<set $retirementKills = 3>>
<<set $nicaea = 0>>
<<set $nicaeaAnnounceable = 0>>
<<set $nicaeaAnnounced = 0>>
<<set $nicaeaPreparation = 0>>
<<set $nicaeaInvolvement = -2>>
<<set $nicaeaPower = 0>>
<<set $nicaeaHeld = 0>>
<<set $peacekeepers = 0>>
<<set $peacekeepersFate = 0>>
<<set $mercRomeo = 0>>

<<set $oralUseWeight = 5>>
<<set $vaginalUseWeight = 5>>
<<set $analUseWeight = 5>>

<<set $niceWeather = [
	{name: "Sunny", severity: 1},
	{name: "Cloudy", severity: 1},
	{name: "Partly Cloudy", severity: 1},
	{name: "Overcast", severity: 1},
	{name: "Light Wind", severity: 1},
	{name: "Clear and Calm", severity: 1},
	{name: "Light Rain", severity: 1},
	{name: "Heavy Rain", severity: 1},
	{name: "Smoke warning", severity: 1},
]>>

<<set $lightWeather = [
	{name: "High Winds", severity: 2},
	{name: "Acid Rain", severity: 2},
	{name: "T-Storm Warning", severity: 2},
	{name: "Flood Warning", severity: 2},
	{name: "Tornado Warning", severity: 2},
	{name: "Light Sandstorm", severity: 2},
	{name: "High Heat", severity: 2},
	{name: "Smoky", severity: 2},
]>>

<<set $heavyWeather = [
	{name: "Extreme Winds", severity: 3},
	{name: "Heavy Acid Rain", severity: 3},
	{name: "Extreme T-storm", severity: 3},
	{name: "Flooding", severity: 3},
	{name: "Tornadoes", severity: 3},
	{name: "Sandstorm", severity: 3},
	{name: "Extreme Heat", severity: 3},
	{name: "Dense Smoke", severity: 3},
]>>

<<set $extremeWeather = [
	{name: "Solar Flare", severity: 4},
	{name: "Ion Storm", severity: 4},
	{name: "Cataclysmic Rains", severity: 4},
	{name: "Cat 6 Hurricane", severity: 4},
	{name: "Abrasive Sandstorm", severity: 4},
	{name: "Radiological Warning", severity: 4},
]>>

<<set $weatherToday = $niceWeather.random()>>

<<set $customSlaveOrdered = 0>>
<<set $customSlave = {age: 19, health: 0, muscles: 0, lips: 15, heightMod: "normal", weight: 0, face: 0, race: "white", skin: "left natural", boobs: 500, butt: 3, sex: 1, virgin: 0, dick: 2, balls: 2, clit: 0, labia: 0, vaginaLube: 1, analVirgin: 0, skills: 15, whoreSkills: 15, combatSkills: 0, intelligence: 0, intelligenceImplant: 0, nationality: "Stateless", amp: 0, eyes: 1, hears: 0}>>

<<set $huskSlaveOrdered = 0>>
<<set $huskSlave = {age: 18, nationality: "Stateless", race: "white", sex: 1, virgin: 0}>>

/*non-vanilla shit*/

<<set $one_time_age_overrides_pedo_mode = 0>>
<<set $activeSlaveOneTimeMinAge = 0>>
<<set $activeSlaveOneTimeMaxAge = 999>>
<<set $oneTimeDisableDisability = 0>>
<<set $targetAge = $minimumSlaveAge>>
<<set $pubertyLength = 5>>
<<set $maxGrowthAge = 24>>

/* Job Fulfillment Center */
<<set $JFCOrder = 0, $Role = "">>

<<set $cheatMode = 0>>
<<set $cheatModeM = 1>>
<<set $NaNArray = []>>

<<set $fcnn = []>>
<<set $fcnn.push("...coming up at the top of the hour: Catgirl slaves, science fact or science fiction...")>>
<<set $fcnn.push("...coming up at the top of the hour: Malnockestivi Smith, Free Cities' first MtFtMtFtH transgendered person...")>>
<<set $fcnn.push("...new arcology construction up 23% worldwide this year, according to...")>>
<<set $fcnn.push("...United States Congress spends 1,264th consecutive day gridlocked over post office...")>>
<<set $fcnn.push("...coming up at the top of the hour: Arcology owners: oversexed oligarchs or attractive, oversexed oligarchs?...")>>
<<set $fcnn.push("...coming up at the top of the hour: Anal sex: not just for sex any more...")>>
<<set $fcnn.push("...coming up at the top of the hour: Oral sex: the new hello...")>>
<<set $fcnn.push("...new book by prominent feminist suggests that women should not be used as sexual appliances...")>>
<<set $fcnn.push("...just ahead, interview with Desha Moore, prominent advocate for compulsory female enslavement...")>>
<<set $fcnn.push("...just ahead, Slave Market Trends: will the pierced anus be in again this year...")>>
<<set $fcnn.push("...just ahead, Slave Market Trends: upstart slave trainers avoid implants...")>>
<<set $fcnn.push("...implant technology firm BusTech notches successful initial public offering...")>>
<<set $fcnn.push("...the upcoming shortage of authentic leather and what it means for the whip industry...")>>
<<set $fcnn.push("...dairy conglomerate Creem Inc. denies allegations of adulterating breast milk with...")>>
<<set $fcnn.push("...two-time award-winning actress Linda Loveless debuted new implants on the red carpet this...")>>
<<set $fcnn.push("...dick size: are your slaves lying to you when they tell you you're too big...")>>
<<set $fcnn.push("...just ahead, slave expert's opinion on best shemale slaves to use for double penetration...")>>
<<set $fcnn.push("...Free Cities social conservatives criticize marriage, say your slaves should be enough...")>>
<<set $fcnn.push("...councilman Taggart suggested in a public address that involuntary enslavement...")>>
<<set $fcnn.push("...councilman Taggart denies allegations that he has remained faithful to his wife...")>>
<<set $fcnn.push("...councilman Taggart presented evidence that regulation of the sex slave market would...")>>
<<set $fcnn.push("...after a word from our sponsors. Creem Inc.: for all your dairy needs...")>>
<<set $fcnn.push("...after a word from our sponsors. Horstmann Ltd, Free Cities' finest whipmakers...")>>
<<set $fcnn.push("...after a word from our sponsors. Coming soon to theaters, Quintuple, the musical...")>>
<<set $fcnn.push("...critical of low-end slave training corporation Wallerson & Sons for practices that they say...")>>
<<set $fcnn.push("...training corporation Wallerson & Sons called a study on slave illness rates 'ludicrous,' but...")>>
<<set $fcnn.push("...our tech correspondent: the possibilities of virally-administered gene therapy...")>>
<<set $fcnn.push("...our tech correspondent: breakthrough in in-vitro drug treatments that promise to...")>>
<<set $fcnn.push("...our tech correspondent: next year to see release of two competing aphrodisiacs...")>>
<<set $fcnn.push("...our tech correspondent: the coming permanent aphrodisiac implants, and what they mean...")>>
<<set $fcnn.push("...Sex Slaves in Space: what it takes to keep a mining crew happy for an 18-month contract...")>>
<<set $fcnn.push("...the implant-drug balance: how much tissue growth is necessary to support larger...")>>
<<set $fcnn.push("...the actress stated that the cut to full nudity in the script violated contractual...")>>
<<set $fcnn.push("...doping scandal as Slave Games watchdog alleges champion used internal reservoir of lube...")>>
<<set $fcnn.push("...next on Extreme Surgery: the mouthpussy experimenters and what they...")>>
<<set $fcnn.push("...'A hole's a hole,' said CEO of upstart budget glory hole franchise...")>>
<<set $fcnn.push("...underground slave pit fights step into the light this evening as...")>>
<<set $fcnn.push("...underground slave pit fight champion, freed yesterday, sells herself back into...")>>
<<set $fcnn.push("...with the lead designer of the MP17, the new machine pistol marketed specifically for bodyguards...")>>
<<set $fcnn.push("...the new Aegis drone series: because your arcology's security is your most important possession...")>>
<<set $fcnn.push("...the BAe Goshawk: because you deserve to travel at twice the speed of sound in the finest style...")>>
<<set $fcnn.push("...this year's Goat.cx award for outstanding orifice innovation goes to...")>>
<<set $fcnn.push("...public controversy over cannibalism. Decadence taken too far or an acceptable next step...")>>
<<set $fcnn.push("...sixth day of street cleaners' strike. Spokesman for the strikers: 'It's getting too nasty...")>>
<<set $fcnn.push("...debuts new book, 'So Long, And Thanks For All The Dicks', in which the recently retired sex slaves tell-all about...")>>

/* HACKY EVENT WORKAROUNDS */
<<set $eventID = -1>>

/* INCORPORATED MODS */

/*SFVAR*/ <<set $SF = Object.assign({}, $SF, {Toggle:0, Active: -1}), $SF.Facility = Object.assign({}, $SF.Facility, {Toggle:0, Active:0})>>

/* Misc mod variables */
<<set $recruiterEugenics = 0>>
<<set $cyberMod = 0>>
<<set $stockpile = {
basicPLimbInterface: 0,
advPLimbInterface: 0,
basicPLimb: 0,
advSexPLimb: 0,
advGracePLimb: 0,
advCombatPLimb: 0,
cyberneticPLimb: 0,
ocularImplant: 0,
cochlearImplant: 0,
electrolarynx: 0,
erectileImplant: 0
} >>

<<if ndef $AgeEffectOnTrainerPricingPC>>
	<<set $AgeEffectOnTrainerPricingPC = 1>>
<</if>>
<<if ndef $AgeEffectOnTrainerEffectivenessPC>>
	<<set $AgeEffectOnTrainerEffectivenessPC = 1>>
<</if>>
<<if ndef $AgeTrainingUpperBoundPC>>
	<<set $AgeTrainingUpperBoundPC = 14>>
<</if>>
<<if ndef $AgeTrainingLowerBoundPC>>
	<<set $AgeTrainingLowerBoundPC = 12>>
<</if>>
<<if ndef $IsInPrimePC>>
	<<set $IsInPrimePC = 3>>
<</if>>
<<if ndef $IsPastPrimePC>>
	<<set $IsPastPrimePC = 5000>>
<</if>>

<<set $researchLab = {
built: "false",
aiModule: 1,
productionTime: 0,
research: "none",
manufacture: "none",
maxSpace: 0,
hired: 0,
menials: 0,
basicPLimbInterface: 0,
advPLimbInterface: 0,
basicPLimb: 0,
advSexPLimb: 0,
advGracePLimb: 0,
advCombatPLimb: 0,
cyberneticPLimb: 0,
ocularImplant: 0,
cochlearImplant: 0,
electrolarynx: 0,
erectileImplant: 0
} >>

<<set $merchantFSWares = ["GenderRadicalistResearch", "TransformationFetishistResearch", "AssetExpansionistResearch", "SlimnessEnthusiastResearch", "YouthPreferentialistResearch", "HedonisticDecadenceResearch"]>>
<<set $merchantIllegalWares = ["childhoodFertilityInducedNCS", "UterineRestraintMesh", "RapidCellGrowthFormula", "PGHack", "AnimalOrgans"]>>
<<set $RapidCellGrowthFormula = 0>>
<<set $UterineRestraintMesh = 0>>
<<set $PGHack = 0>>

<<if ndef $PC.hacking>>
	<<set $PC.hacking = 0>>
<</if>>

/* Security Expansion */
<<set $secExp = 0>>
<<set $showSecExp = 0>>
<<set $wasToggledBefore = 0>>

/* Career-skill gain */
<<set $masteredXP = 200>>

<<include "secInit">>

<<set $postSexCleanUp = 1>>

<<set $DefaultBirthDestination = "anywhere">>
<<set $abbreviateHormoneBalance = 2>>

<<goto "Alpha disclaimer">>


code:
:: cyberConfig [nobr]

<<switch $temp>>

<<case 0>>
	This room is lined with shelves and cabinets, it could be easily mistaken for a storage room if it were not for examination table in its center.

	<<set $nextButton = "Back", $nextLink = "Slave Interact">>
		<<if $activeSlave.amp != 1>>
			Your slave $activeSlave.slaveName is obediently waiting for your instructions.
		<<else>>
			Your slave $activeSlave.slaveName is lying on the table, waiting for your instructions.
		<</if>>

	<<if $activeSlave.origEye == "implant">>

		$He has an ocular implant installed.
		<<if $activeSlave.eyes == 1>>
			They are operating normally.
		<<elseif $activeSlave.eyes == -1>>
			They are set to blur $his vision.
		<<else>>
			They are turned off.
		<</if>>

		<<if $activeSlave.eyes != 1>>[[Restore vision|cyberConfig][$activeSlave.eyes = 1,$temp = 3]] | <</if>>
		<<if $activeSlave.eyes != -1>>[[Blur|cyberConfig][$activeSlave.eyes = -1,$temp = 3]] | <</if>>
		<<if $activeSlave.eyes != -2>>[[Disable|cyberConfig][$activeSlave.eyes = -2,$temp = 3]]<</if>>

		$He currently has $activeSlave.eyeColor lenses equipped.

		Swap out $his lenses:

		Iris Color:
		[[Blue|cyberConfig][$activeSlave.eyeColor = "blue",$temp = 2,$cash -= $modCost]]
		| [[Black|cyberConfig][$activeSlave.eyeColor = "black",$temp = 2,$cash -= $modCost]]
		| [[Brown|cyberConfig][$activeSlave.eyeColor = "brown",$temp = 2,$cash -= $modCost]]
		| [[Green|cyberConfig][$activeSlave.eyeColor = "green",$temp = 2,$cash -= $modCost]]
		| [[Turquoise|cyberConfig][$activeSlave.eyeColor = "turquoise",$temp = 2,$cash -= $modCost]]
		| [[Sky-Blue|cyberConfig][$activeSlave.eyeColor = "sky-blue",$temp = 2,$cash -= $modCost]]
		| [[Hazel|cyberConfig][$activeSlave.eyeColor = "hazel",$temp = 2,$cash -= $modCost]]
		| [[Pale-Grey|cyberConfig][$activeSlave.eyeColor = "pale-grey",$temp = 2,$cash -= $modCost]]
		| [[White|cyberConfig][$activeSlave.eyeColor = "white",$temp = 2,$cash -= $modCost]]
		| [[Pink|cyberConfig][$activeSlave.eyeColor = "pink",$temp = 2,$cash -= $modCost]]
		| [[Amber|cyberConfig][$activeSlave.eyeColor = "amber",$temp = 2,$cash -= $modCost]]
		| [[Red|cyberConfig][$activeSlave.eyeColor = "red",$temp = 2,$cash -= $modCost]]
		| [[Yellow|cyberConfig][$activeSlave.eyeColor = "yellow",$temp = 2,$cash -= $modCost]]
		| [[Orange|cyberConfig][$activeSlave.eyeColor = "orange",$temp = 2,$cash -= $modCost]]

		Pupil Shape:

[[Circular|cyberConfig][$activeSlave.pupil = "circular",$temp = 2,$cash -= $modCost]]
		| [[Catlike|cyberConfig][$activeSlave.pupil = "catlike",$temp = 2,$cash -= $modCost]]
		| [[Serpent-Like|cyberConfig][$activeSlave.pupil = "serpent-like",$temp = 2,$cash -= $modCost]]
		| [[Devilish|cyberConfig][$activeSlave.pupil = "devilish",$temp = 2,$cash -= $modCost]]
		| [[Demonic|cyberConfig][$activeSlave.pupil = "demonic",$temp = 2,$cash -= $modCost]]
		| [[Hypnotic|cyberConfig][$activeSlave.pupil = "hypnotic",$temp = 2,$cash -= $modCost]]
		| [[Heart-Shaped|cyberConfig][$activeSlave.pupil = "heart-shaped",$temp = 2,$cash -= $modCost]]
		| [[Wide-Eyed|cyberConfig][$activeSlave.pupil = "wide-eyed",$temp = 2,$cash -= $modCost]]
		| [[Almond-Shaped|cyberConfig][$activeSlave.pupil = "almond-shaped",$temp = 2,$cash -= $modCost]]
		| [[Bright|cyberConfig][$activeSlave.pupil = "bright",$temp = 2,$cash -= $modCost]]
		| [[Teary|cyberConfig][$activeSlave.pupil = "teary",$temp = 2,$cash -= $modCost]]
		| [[Vacant|cyberConfig][$activeSlave.pupil = "vacant",$temp = 2,$cash -= $modCost]]
		| [[Star-Shaped|cyberConfig][$activeSlave.pupil = "star-shaped",$temp = 2,$cash -= $modCost]]
		| [[Goat-Like|cyberConfig][$activeSlave.pupil = "goat-like",$temp = 2,$cash -= $modCost]]

		Sclera Colors:
		[[White|cyberConfig][$activeSlave.sclerae = "white",$temp = 2,$cash -= $modCost]]
		| [[Blue|cyberConfig][$activeSlave.sclerae = "blue",$temp = 2,$cash -= $modCost]]
		| [[Black|cyberConfig][$activeSlave.sclerae = "black",$temp = 2,$cash -= $modCost]]
		| [[Brown|cyberConfig][$activeSlave.sclerae = "brown",$temp = 2,$cash -= $modCost]]
		| [[Green|cyberConfig][$activeSlave.sclerae = "green",$temp = 2,$cash -= $modCost]]
		| [[Turquoise|cyberConfig][$activeSlave.sclerae = "turquoise",$temp = 2,$cash -= $modCost]]
		| [[Sky-Blue|cyberConfig][$activeSlave.sclerae = "sky-blue",$temp = 2,$cash -= $modCost]]
		| [[Hazel|cyberConfig][$activeSlave.sclerae = "hazel",$temp = 2,$cash -= $modCost]]
		| [[Pale-Grey|cyberConfig][$activeSlave.sclerae = "pale-grey",$temp = 2,$cash -= $modCost]]
		| [[Pink|cyberConfig][$activeSlave.sclerae = "pink",$temp = 2,$cash -= $modCost]]
		| [[Amber|cyberConfig][$activeSlave.sclerae = "amber",$temp = 2,$cash -= $modCost]]
		| [[Red|cyberConfig][$activeSlave.sclerae = "red",$temp = 2,$cash -= $modCost]]
		| [[Yellow|cyberConfig][$activeSlave.sclerae = "yellow",$temp = 2,$cash -= $modCost]]
		| [[Orange|cyberConfig][$activeSlave.sclerae = "orange",$temp = 2,$cash -= $modCost]]
	<</if>>

	<<if $activeSlave.earImplant == 1>>

		$He has a cochlear implant installed.
		<<if $activeSlave.hears == 0>>
			They are operating normally.
		<<elseif $activeSlave.hears == -1>>
			They are set to muffle $his hearing.
		<<else>>
			They are turned off.
		<</if>>

		<<if $activeSlave.hears != 0>>[[Restore hearing|cyberConfig][$activeSlave.hears = 0,$temp = 5]] | <</if>>
		<<if $activeSlave.hears != -1>>[[Muffle|cyberConfig][$activeSlave.hears = -1,$temp = 5]] | <</if>>
		<<if $activeSlave.hears != -2>>[[Disable|cyberConfig][$activeSlave.hears = -2,$temp = 5]]<</if>>
	<</if>>

	<<if $activeSlave.electrolarynx == 1>>

		$He has an electrolarynx installed.
		<<if $activeSlave.voice == 0>>
			It is turned off.
		<<elseif $activeSlave.voice == 1>>
			It is set to its "deep voice" setting.
		<<elseif $activeSlave.voice == 2>>
			It is set to its "normal voice" setting.
		<<elseif $activeSlave.voice == 3>>
			It is set to its "high voice" setting.
		<</if>>

		<<if $activeSlave.voice != 0>>[[Disable|cyberConfig][$activeSlave.voice = 0,$temp = 6]] | <</if>>
		<<if $activeSlave.voice != 1>>[[Deep voice setting|cyberConfig][$activeSlave.voice = 1,$temp = 6]] | <</if>>
		<<if $activeSlave.voice != 2>>[[Standard voice setting|cyberConfig][$activeSlave.voice = 2,$temp = 6]] | <</if>>
		<<if $activeSlave.voice != 3>>[[High voice setting|cyberConfig][$activeSlave.voice = 3,$temp = 6]]<</if>>
	<</if>>

	<<if $activeSlave.PLimb > 0>>

		$He has PLimb interface installed. You can assign and adjust $his prosthetics here.
		<<if $activeSlave.amp <= -1>>

			$His prosthetics are currently attached, if you wish to change them you will first need to detach them.

			[[Detach|cyberConfig][$temp = 1,$nextButton = "Continue", $nextLink = "cyberConfig"]]
		<<else>>

			<<if $stockpile.basicPLimb > 0>>[[Attach basic limbs|cyberConfig][$temp = 4, $activeSlave.amp = -1, $stockpile.basicPLimb -= 1]]<</if>>
			<<if $stockpile.advSexPLimb > 0>>[[Attach sex limbs|cyberConfig][$temp = 4, $activeSlave.amp = -2, $stockpile.advSexPLimb -= 1]]<</if>>
			<<if $stockpile.advGracePLimb > 0>>[[Attach beauty limbs|cyberConfig][$temp = 4, $activeSlave.amp = -3, $stockpile.advGracePLimb -= 1]]<</if>>
			<<if $stockpile.advCombatPLimb > 0>>[[Attach combat limbs|cyberConfig][$temp = 4, $activeSlave.amp = -4, $stockpile.advCombatPLimb -= 1]]<</if>>
			<<if $activeSlave.PLimb == 2>>
				<<if $stockpile.cyberneticPLimb > 0>>[[Attach cybernetic limbs|cyberConfig][$temp = 4, $activeSlave.amp = -5, $stockpile.cyberneticPLimb -= 1]]<</if>>
			<<else>>
				//To equip more advanced prosthetics you will need to upgrade your slaves' PLimb interface.//
			<</if>>
		<</if>>

	<<else>>
		<<if $activeSlave.amp == 0>>

			$He has healthy limbs so there is no need for prosthetics.
		<<elseif $activeSlave.amp < 0>>
			Unidentified PLimb interface detected. [[Please reboot system.|cyberConfig][$activeSlave.PLimb = 2]]
		<<else>>

			$He does not have a PLimb interface installed so you can't give $him any prosthetics.
		<</if>>
	<</if>>

<<case 1>>
	<<set $temp = 0, $nextButton = "Continue", $nextLink = "cyberConfig">>
	<<if $activeSlave.amp == -1>><<set $stockpile.basicPLimb += 1>>
	<<elseif $activeSlave.amp == -2>><<set $stockpile.advSexPLimb += 1>>
	<<elseif $activeSlave.amp == -3>><<set $stockpile.advGracePLimb += 1>>
	<<elseif $activeSlave.amp == -4>><<set $stockpile.advCombatPLimb += 1>>
	<<elseif $activeSlave.amp == -5>><<set $stockpile.cyberneticPLimb += 1>>
	<</if>>
	<<set $activeSlave.amp = 1>>
	Due to built-in safeties it is necessary to remove each limb separately, first releasing the lock and then waiting for automated seal release.

	<<if ($activeSlave.devotion > 20)>>
		You instruct $him to lie down on the table and proceed to remove $his limbs. $He <<if canSee($activeSlave)>>watches<<else>>listens<</if>> with interest as you work.<<if ($activeSlave.devotion > 50)>> As you remove the last limb $he playfully wiggles $his stumps at you.<</if>>
	<<else>>
		You order $him to lie down on the table and proceed to remove $his limbs. $He <<if canSee($activeSlave)>>watches<<else>>listens<</if>> with a bitter expression as you work.
	<</if>>

<<case 2>>
	<<set $temp = 0, $nextButton = "Continue", $nextLink = "cyberConfig">>
	<<if $activeSlave.amp != 1>>You have $him lie down and<<else>>You<</if>> use a speculum to keep $his eyes open while you disengage $his lenses remotely and swap them out with $his new $activeSlave.eyeColor lenses<<if $activeSlave.pupil != "circular" || $activeSlave.sclerae != "white">> with <<if $activeSlave.pupil != "circular" >>$activeSlave.pupil pupils<</if>><<if $activeSlave.pupil != "circular" && $activeSlave.sclerae != "white">> and <</if>><<if $activeSlave.sclerae != "white" >>$activeSlave.sclerae sclerae<</if>><</if>>.
<<case 3>>
	<<set $temp = 0, $nextButton = "Continue", $nextLink = "cyberConfig">>
	<<if $activeSlave.eyes == 1>>
		$He blinks as $his vision returns.
	<<elseif $activeSlave.eyes == -1>>
		$He squints at you as $his vision becomes a blur.
	<<else>>
		$He has a panicked expression when $his vision suddenly goes out.
	<</if>>
<<case 4>>
	<<set $temp = 0, $nextButton = "Continue", $nextLink = "cyberConfig">>
	Attaching $his limbs is a simple procedure, you simply push a connector on each limb into the socket in $his implants until the lock engages.<<if $activeSlave.PLimb == 2>> $He jumps a bit as limbs connect to $his nerves.<</if>> When you are done, $he sits up and
	<<if $activeSlave.amp == -2>>experimentally engages the vibe function in $his fingers.
	<<elseif $activeSlave.amp == -3>>runs a hand over the smooth skin of $his new legs.
	<<elseif $activeSlave.amp == -4>>engages and disengages the blade in $his forearm.
	<<elseif $activeSlave.amp == -5>>experimentally flexes the muscles in $his artificial arm.
	<<else>>catches $his balance.
	<</if>>
<<case 5>>
	<<set $temp = 0, $nextButton = "Continue", $nextLink = "cyberConfig">>
	<<if $activeSlave.hears == 0>>
		$He tilts $his head as $his hearing returns.
	<<elseif $activeSlave.hears == -1>>
		$He shakes $his head as $his hearing becomes muffled.
	<<else>>
		$He has a panicked expression when $his hearing is suddenly silenced.
	<</if>>
<<case 6>>
	<<set $temp = 0, $nextButton = "Continue", $nextLink = "cyberConfig">>
	<<if $activeSlave.voice == 0>>
		$He tries testing out $his new voice, only to discover $he's been made mute.
	<<elseif $activeSlave.voice == 1>>
		$He tests out the <<if canHear($activeSlave)>>sound<<else>>feeling<</if>> of $his new, deep voice.
	<<elseif $activeSlave.voice == 2>>
		$He tests out the <<if canHear($activeSlave)>>sound<<else>>feeling<</if>> of $his new, normal voice.
	<<elseif $activeSlave.voice == 3>>
		$He tests out the <<if canHear($activeSlave)>>sound<<else>>feeling<</if>> of $his new, high voice.
	<</if>>
<</switch>>


code:
:: Research Lab [nobr]

<<switch $temp>>

<<case 0>>

	<<set $nextButton = "Back", $nextLink = "Manage Arcology">>

	//You switch one of the screens in your office to the feed from research facility.//

[[Decommission facility|Manage Arcology][$researchLab.built = "false",$researchLab.hired = 0,$helots += $researchLab.menials,$researchLab.menials = 0,$researchLab.research = "none",$researchLab.manufacture = "none",$researchLab.productionTime = 0]] //Warning! This will cancel all projects, remove all staff and shut down this facility.//

[[Purchase cybernetics|Research Lab][$temp = 1]]

	__Personnel__

	<<if $researchLab.aiModule == 1>>
		[[Buy and install research module|Research Lab][$cash -= 35000, $researchLab.aiModule = 2]] //This module enables your assistant to assist staff and direct menials assigned to your research facility, increasing efficiency. It costs <<print cashFormat(35000)>>//

	<</if>>
	<<if ($researchLab.hired + $researchLab.menials) == 0>>
		//Facility is currently unstaffed.//
	<<else>>
		//You have
		<<if $researchLab.hired == 1>>
			one scientist
		<<elseif $researchLab.hired > 1>>
			$researchLab.hired scientists
		<</if>>
		<<if $researchLab.menials != 0>> and<</if>>
		<<if $researchLab.menials == 0>>
		<<elseif $researchLab.menials == 1>>
			one menial slave
		<<elseif $researchLab.menials > 1>>
			$researchLab.menials menials
		<</if>>
		working in your lab.
			<<if $researchLab.aiModule != 0>>Occasionally you hear voice of your assistant as it helps direct and organize work.<</if>>//
	<</if>>

	 Currently, this facility can employ $researchLab.maxSpace people.
	<<if $researchLab.maxSpace == 5>>
		[[Expand facility|Research Lab][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $researchLab.maxSpace = 10]]
		//Costs <<print cashFormat(Math.trunc(5000*$upgradeMultiplierArcology))>>//
	<<elseif $researchLab.maxSpace == 10>>
		[[Expand facility|Research Lab][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $researchLab.maxSpace = 20]]
		//Costs <<print cashFormat(Math.trunc(10000*$upgradeMultiplierArcology))>>//
	<<elseif $researchLab.maxSpace == 20>>
		[[Expand facility|Research Lab][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $researchLab.maxSpace = 30]]
		//Costs <<print cashFormat(Math.trunc(15000*$upgradeMultiplierArcology))>>//
	<<elseif $researchLab.maxSpace == 30>>
		[[Expand facility|Research Lab][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $researchLab.maxSpace = 40]]
		//Costs <<print cashFormat(Math.trunc(20000*$upgradeMultiplierArcology))>>//
	<<elseif $researchLab.maxSpace == 40>>
		[[Expand facility|Research Lab][$cash -= Math.trunc(5000*$upgradeMultiplierArcology), $researchLab.maxSpace = 50]]
		//Costs <<print cashFormat(Math.trunc(25000*$upgradeMultiplierArcology))>>//
	<<elseif $researchLab.maxSpace == 50>>
		//Facility is fully expanded.//
	<</if>>

	<<if ($researchLab.hired + $researchLab.menials) < $researchLab.maxSpace>>
		Hire [[x1|Research Lab][$researchLab.hired += 1,$cash -= 5000]]
		<<if ($researchLab.maxSpace - ($researchLab.hired + $researchLab.menials)) >= 5>>
			| [[x5|Research Lab][$researchLab.hired += 5,$cash -= 25000]]
		<</if>>
		<<if ($researchLab.maxSpace - ($researchLab.hired + $researchLab.menials)) >= 10>>
			| [[x10|Research Lab][$researchLab.hired += 10,$cash -= 50000]]
		<</if>>
		scientists.

		    //Each scientist will require an initial fee of <<print cashFormat(5000)>> and incur <<print cashFormat(300)>> weekly.//

		 <<if $helots > 0>>
			Assign [[x1|Research Lab][$researchLab.menials += 1,$helots -= 1]]
			<<if ($researchLab.maxSpace - ($researchLab.hired + $researchLab.menials)) >= 5 && $helots >= 5>>
				| [[x5|Research Lab][$researchLab.menials += 5,$helots -= 5]]
			<</if>>
			<<if ($researchLab.maxSpace - ($researchLab.hired + $researchLab.menials)) >= 10 && $helots >= 10>>
				| [[x10|Research Lab][$researchLab.menials += 10,$helots -= 10]]
			<</if>>
			menial slaves to lab.

		<<else>>You do not own any <<if $researchLab.menials != 0>>unassigned <</if>>menial slaves.

		<</if>>
		   //Using menial slaves is much cheaper than hiring scientists, but they are less effective. <<print cashFormat(100)>> per slave each week.//

	<<else>>
		   //Facility is fully staffed.//
	<</if>>

	<<if $researchLab.hired > 0>>
		Fire [[x1|Research Lab][$researchLab.hired -= 1]]
		<<if $researchLab.hired >= 5>>
			| [[x5|Research Lab][$researchLab.hired -= 5]]
		<</if>>
		<<if $researchLab.hired >= 10>>
			| [[x10|Research Lab][$researchLab.hired -= 10]]
		<</if>>
		| [[All|Research Lab][$researchLab.hired = 0]]
		scientists.
	<</if>>
	<<if $researchLab.menials > 0>>

		Dismiss [[x1|Research Lab][$researchLab.menials -= 1,$helots += 1]]
		<<if $researchLab.menials >= 5>>
			| [[x5|Research Lab][$researchLab.menials -= 5,$helots += 5]]
		<</if>>
		<<if $researchLab.menials >= 10>>
			| [[x10|Research Lab][$researchLab.menials -= 10,$helots += 10]]
		<</if>>
		| [[All|Research Lab][$helots += $researchLab.menials,$researchLab.menials = 0]]
		menial slaves.
	<</if>>

	__Research__

	<<if $researchLab.research != "none">>
		//Your lab staff is currently researching @@.yellow;$researchLab.research@@.//

		[[Cancel Research|Research Lab][$researchLab.productionTime = 0,$researchLab.research = "none"]]
	<<elseif $researchLab.manufacture != "none">>
		//Your lab staff is currently busy with other projects.//
	<<else>>
		//No research active.//

		<<if $researchLab.basicPLimbInterface == 0 && $stockpile.basicPLimbInterface > 0>>

			[[Reverse engineer basic prosthetics interface|Research Lab][$researchLab.productionTime = 80,$researchLab.research = "Basic prosthetics interface"]]
		<</if>>
		<<if $researchLab.basicPLimbInterface != 0 && $researchLab.advPLimbInterface == 0 && $stockpile.advPLimbInterface > 0>>

			[[Reverse engineer advanced prosthetics interface|Research Lab][$researchLab.productionTime = 120,$researchLab.research = "Advanced prosthetics interface"]]
		<</if>>
		<<if $researchLab.basicPLimb == 0 && $stockpile.basicPLimb > 0>>

			[[Reverse engineer basic prosthetic limbs|Research Lab][$researchLab.productionTime = 80,$researchLab.research = "Basic prosthetic limbs"]]
		<</if>>
		<<if $researchLab.advSexPLimb == 0 && $stockpile.advSexPLimb > 0>>

			[[Reverse engineer advanced sex limbs|Research Lab][$stockpile.advSexPLimb -= 1,$researchLab.productionTime = 100,$researchLab.research = "Advanced sex limbs"]]
		<</if>>
		<<if $researchLab.advGracePLimb == 0 && $stockpile.advGracePLimb > 0>>

			[[Reverse engineer advanced beauty limbs|Research Lab][$stockpile.advGracePLimb -= 1,$researchLab.productionTime = 100,$researchLab.research = "Advanced beauty limbs"]]
		<</if>>
		<<if $researchLab.advCombatPLimb == 0 && $stockpile.advCombatPLimb > 0>>

			[[Reverse engineer advanced combat limbs|Research Lab][$stockpile.advCombatPLimb -= 1,$researchLab.productionTime = 100,$researchLab.research = "Advanced combat limbs"]]
		<</if>>
		<<if $researchLab.cyberneticPLimb == 0 && $researchLab.advPLimbInterface == 1 && ($researchLab.advSexPLimb + $researchLab.advGracePLimb + $researchLab.advCombatPLimb) >= 1>>

			[[Develop cybernetic limbs|Research Lab][$researchLab.productionTime = 300,$researchLab.research = "Cybernetic limbs"]]
		<</if>>
		<<if $researchLab.ocularImplant == 0 && $stockpile.ocularImplant > 0>>

			[[Reverse engineer ocular implants|Research Lab][$stockpile.ocularImplant -= 1,$researchLab.productionTime = 100,$researchLab.research = "Ocular implants"]]
		<</if>>
		<<if $researchLab.cochlearImplant == 0 && $stockpile.cochlearImplant > 0>>

			[[Reverse engineer cochlear implants|Research Lab][$stockpile.cochlearImplant -= 1,$researchLab.productionTime = 80,$researchLab.research = "Cochlear implants"]]
		<</if>>
		<<if $researchLab.electrolarynx == 0 && $stockpile.electrolarynx > 0>>

			[[Reverse engineer electrolarynx|Research Lab][$stockpile.electrolarynx -= 1,$researchLab.productionTime = 80,$researchLab.research = "Electrolarynx"]]
		<</if>>
		<<if $researchLab.erectileImplant == 0 && $stockpile.erectileImplant > 0>>

			[[Reverse engineer erectile implant|Research Lab][$stockpile.erectileImplant -= 1,$researchLab.productionTime = 100,$researchLab.research = "Erectile implant"]]
		<</if>>
	<</if>>

	__Manufacture__

	<<if $researchLab.research != "none">>
		//Your lab staff is currently busy with research.//
	<<elseif $researchLab.manufacture != "none">>
		//Your lab staff is currently building @@.yellow;$researchLab.manufacture@@.//
		[[Cancel Project|Research Lab][$researchLab.productionTime = 0,$researchLab.manufacture = "none"]]
	<<else>>
		//No projects currently active.//

		<<if $researchLab.basicPLimbInterface == 1>>

			[[Build basic prosthetics interface|Research Lab][$researchLab.productionTime = 50,$researchLab.manufacture = "Basic prosthetics interface"]] // Currently have: $stockpile.basicPLimbInterface//
		<</if>>
		<<if $researchLab.advPLimbInterface == 1>>

			[[Build advanced prosthetics interface|Research Lab][$researchLab.productionTime = 80,$researchLab.manufacture = "Advanced prosthetics interface"]] // Currently have: $stockpile.advPLimbInterface//
		<</if>>
		<<if $researchLab.basicPLimb == 1>>

			[[Build basic prosthetic limbs|Research Lab][$researchLab.productionTime = 20,$researchLab.manufacture = "Basic prosthetic limbs"]] // Currently have: $stockpile.basicPLimb//
		<</if>>
		<<if $researchLab.advSexPLimb == 1>>

			[[Build advanced sex limbs|Research Lab][$researchLab.productionTime = 100,$researchLab.manufacture = "Advanced sex limbs"]] // Currently have: $stockpile.advSexPLimb//
		<</if>>
		<<if $researchLab.advGracePLimb == 1>>

			[[Build advanced beauty limbs|Research Lab][$researchLab.productionTime = 100,$researchLab.manufacture = "Advanced beauty limbs"]] // Currently have: $stockpile.advGracePLimb//
		<</if>>
		<<if $researchLab.advCombatPLimb == 1>>

			[[Build advanced combat limbs|Research Lab][$researchLab.productionTime = 100,$researchLab.manufacture = "Advanced combat limbs"]] // Currently have: $stockpile.advCombatPLimb//
		<</if>>
		<<if $researchLab.cyberneticPLimb == 1>>

			[[Build cybernetic limbs|Research Lab][$researchLab.productionTime = 150,$researchLab.manufacture = "Cybernetic limbs"]] // Currently have: $stockpile.cyberneticPLimb//
		<</if>>
		<<if $researchLab.ocularImplant == 1>>

			[[Build ocular implants|Research Lab][$researchLab.productionTime = 80,$researchLab.manufacture = "Ocular implants"]] // Currently have: $stockpile.ocularImplant//
		<</if>>
		<<if $researchLab.cochlearImplant == 1>>

			[[Build cochlear implants|Research Lab][$researchLab.productionTime = 60,$researchLab.manufacture = "Cochlear implants"]] // Currently have: $stockpile.cochlearImplant//
		<</if>>
		<<if $researchLab.electrolarynx == 1>>

			[[Build electrolarynx|Research Lab][$researchLab.productionTime = 60,$researchLab.manufacture = "Electrolarynx"]] // Currently have: $stockpile.electrolarynx//
		<</if>>
		<<if $researchLab.erectileImplant == 1>>

			[[Build erectile implant|Research Lab][$researchLab.productionTime = 50,$researchLab.manufacture = "Erectile implant"]] // Costs <<print cashFormat(25000)>>. Currently have: $stockpile.erectileImplant//
		<</if>>
	<</if>>

<<case 1>>
	<<set $temp = 0>>
	<<set $nextLink = "Research Lab">>
	//You contact a representative of one of the larger cybernetics companies and inquire about their products.
 This is what they have to offer://

	__Hardware__

	[[Basic prosthetics interface|Research Lab][$temp = 1, $cash -= 25000, $stockpile.basicPLimbInterface += 1]] //Costs <<print cashFormat(25000)>>. Currently have: $stockpile.basicPLimbInterface//

	[[Advanced prosthetics interface|Research Lab][$temp = 1, $cash -= 60000, $stockpile.advPLimbInterface += 1]] //Costs <<print cashFormat(60000)>>. Currently have: $stockpile.advPLimbInterface//

	[[Basic prosthetic limbs|Research Lab][$temp = 1, $cash -= 15000, $stockpile.basicPLimb += 1]] //Costs <<print cashFormat(15000)>>. Currently have: $stockpile.basicPLimb//

	[[Advanced sex limbs|Research Lab][$temp = 1, $cash -= 30000, $stockpile.advSexPLimb += 1]] //Costs <<print cashFormat(30000)>>. Currently have: $stockpile.advSexPLimb//

	[[Advanced beauty limbs|Research Lab][$temp = 1, $cash -= 30000, $stockpile.advGracePLimb += 1]] //Costs <<print cashFormat(30000)>>. Currently have: $stockpile.advGracePLimb//

	[[Advanced combat limbs|Research Lab][$temp = 1, $cash -= 30000, $stockpile.advCombatPLimb += 1]] //Costs <<print cashFormat(30000)>>. Currently have: $stockpile.advCombatPLimb//

	[[Ocular implants|Research Lab][$temp = 1, $cash -= 35000, $stockpile.ocularImplant += 1]] //Costs <<print cashFormat(35000)>>. Currently have: $stockpile.ocularImplant//

	[[Cochlear implants|Research Lab][$temp = 1, $cash -= 15000, $stockpile.cochlearImplant += 1]] //Costs <<print cashFormat(15000)>>. Currently have: $stockpile.cochlearImplant//

	[[Electrolarynx|Research Lab][$temp = 1, $cash -= 50000, $stockpile.electrolarynx += 1]] //Costs <<print cashFormat(50000)>>. Currently have: $stockpile.electrolarynx//

	/*[[Erectile implant|Research Lab][$temp = 1, $cash -= 25000, $stockpile.erectileImplant += 1]] //Costs <<print cashFormat(25000)>>. Currently have: $stockpile.erectileImplant//*/

__Schematics__

	<<if $researchLab.basicPLimbInterface != 1 && $researchLab.research != "Basic prosthetics interface">>
		[[Basic prosthetics interface|Research Lab][$temp = 1, $cash -= 85000, $researchLab.basicPLimbInterface = 1]] //Costs <<print cashFormat(85000)>>.//

	<</if>>
	<<if $researchLab.advPLimbInterface != 1 && $researchLab.research != "Advanced prosthetics interface">>
	[[Advanced prosthetics interface|Research Lab][$temp = 1, $cash -= 260000, $researchLab.advPLimbInterface = 1]] //Costs <<print cashFormat(260000)>>.//

	<</if>>
	<<if $researchLab.basicPLimb != 1 && $researchLab.research != "Basic prosthetic limbs">>
	[[Basic prosthetic limbs|Research Lab][$temp = 1, $cash -= 60000, $researchLab.basicPLimb = 1]] //Costs <<print cashFormat(60000)>>.//

	<</if>>
	<<if $researchLab.advSexPLimb != 1 && $researchLab.research != "Advanced sex limbs">>
	[[Advanced sex limbs|Research Lab][$temp = 1, $cash -= 120000, $researchLab.advSexPLimb = 1]] //Costs <<print cashFormat(120000)>>.//

	<</if>>
	<<if $researchLab.advGracePLimb != 1 && $researchLab.research != "Advanced beauty limbs">>
	[[Advanced beauty limbs|Research Lab][$temp = 1, $cash -= 120000, $researchLab.advGracePLimb = 1]] //Costs <<print cashFormat(120000)>>.//

	<</if>>
	<<if $researchLab.advCombatPLimb != 1 && $researchLab.research != "Advanced combat limbs">>
	[[Advanced combat limbs|Research Lab][$temp = 1, $cash -= 120000, $researchLab.advCombatPLimb = 1]] //Costs <<print cashFormat(120000)>>.//

	<</if>>
	<<if $researchLab.ocularImplant != 1 && $researchLab.research != "Ocular implants">>
	[[Ocular implants|Research Lab][$temp = 1, $cash -= 160000, $researchLab.ocularImplant = 1]] //Costs <<print cashFormat(160000)>>.//

	<</if>>
	<<if $researchLab.cochlearImplant != 1 && $researchLab.research != "Cochlear implants">>
	[[Cochlear implants|Research Lab][$temp = 1, $cash -= 125000, $researchLab.cochlearImplant = 1]] //Costs <<print cashFormat(125000)>>.//

	<</if>>
	<<if $researchLab.electrolarynx != 1 && $researchLab.research != "Electrolarynx">>
	[[Electrolarynx|Research Lab][$temp = 1, $cash -= 125000, $researchLab.electrolarynx = 1]] //Costs <<print cashFormat(200000)>>.//

	<</if>>
	/*<<if $researchLab.erectileImplant != 1 && $researchLab.research != "Erectile implant">>
	[[Erectile implant|Research Lab][$temp = 1, $cash -= 95000, $researchLab.erectileImplant = 1]] //Costs <<print cashFormat(95000)>>.//
	<</if>>*/

<</switch>>