code:
:: Intro Summary [nobr]

<<set $neighboringArcologies = variableAsNumber($neighboringArcologies, 0, 8, 3)>>
<<set $FSCreditCount = variableAsNumber($FSCreditCount, 4, 7, 5)>>
<<set $PC.actualAge = variableAsNumber($PC.actualAge, 14, 80, 35)>>
<<set $PC.birthWeek = variableAsNumber($PC.birthWeek, 0, 51, 0)>>

You may review your settings before clicking "Continue" to begin.

<<link "Continue" "Starting Girls">>
	<<if $freshPC == 1 || $saveImported == 0>>
		<<switch $PC.career>>
		<<case "wealth">>
			<<if $PC.vagina == 1>>
				<<set $PC.vagina = 2>>
			<</if>>
		<<case "capitalist">>
			<<set $PC.skill.trading = 100>>
		<<case "mercenary">>
			<<set $PC.skill.warfare = 100>>
		<<case "slaver">>
			<<set $PC.skill.slaving = 100>>
		<<case "engineer">>
			<<set $PC.skill.engineering = 100>>
		<<case "medicine">>
			<<set $PC.skill.medicine = 100>>
		<<case "celebrity">>
			<<if $PC.vagina == 1>>
				<<set $PC.vagina = 2>>
			<</if>>
		<<case "BlackHat">>
			<<set $PC.skill.hacking = 100>>
		<<case "arcology owner">>
			<<set $PC.skill.trading = 100, $PC.skill.warfare = 100, $PC.skill.hacking = 100, $PC.skill.slaving = 100, $PC.skill.engineering = 100, $PC.skill.medicine = 100>>
		<<case "escort">>
			<<if $PC.vagina == 1>>
				<<set $PC.vagina = 4>>
			<</if>>
			<<set $PC.anus = 1>>
			<<set $PC.clothes = "a slutty outfit">>
			<<set $PC.education = 15>>
			<<set $PC.skill.trading = 50, $PC.skill.warfare = -100, $PC.skill.slaving = -100, $PC.skill.engineering = -100, $PC.skill.medicine = 10, $PC.skill.hacking = 10>>
		<<case "servant">>
			<<set $PC.clothes = "a nice maid outfit">>
			<<set $PC.education = 0>>
			<<if $PC.vagina == 1>>
				<<set $PC.vagina = 4>>
			<</if>>
			<<set $PC.skill.trading = -100, $PC.skill.warfare = -100, $PC.skill.slaving = -100, $PC.skill.engineering = -100, $PC.skill.medicine = -100, $PC.skill.hacking = -100>>
		<<case "gang">>
			<<if $PC.vagina == 1>>
				<<set $PC.vagina = 2>>
			<</if>>
			<<set $PC.skill.trading = 50, $PC.skill.warfare = 50, $PC.skill.slaving = 50, $PC.skill.engineering = -100, $PC.skill.medicine = 0, $PC.skill.hacking = 50>>
		<</switch>>
	<</if>>
	<<if $saveImported == 1 && $freshPC == 0 && $PC.rules.living != "luxurious">>
		<<if $PC.rules.living == "spare">>
			<<set $PC.rules.living = "normal">>
		<<else>>
			<<set $PC.rules.living = "luxurious">>
		<</if>>
	<<elseif $PC.career == "wealth" || $PC.career == "celebrity">>
		<<set $PC.rules.living = "normal">>
	<<else>>
		<<set $PC.rules.living = "spare">>
	<</if>>
	<<if $secExpEnabled > 0>>
		<<set $wasToggledBefore = 1>>
	<</if>>
	<<run App.Intro.initNationalities()>>
<</link>>
<<if ($economy != 100) || ($seeDicks != 25) || ($continent != "North America") || ($internationalTrade != 1) || ($internationalVariety != 1) || ($seeRace != 1) || ($seeNationality != 1) || ($seeExtreme != 0) || ($seeCircumcision != 1) || ($seeAge != 1) || ($plot != 1)>>
	| [[restore defaults|Intro Summary][$seeDicks = 25, $economy = 100, $continent = "North America", $internationalTrade = 1, $internationalVariety = 1, $seeRace = 1, $seeNationality = 1, $seeExtreme = 0, $seeCircumcision = 1, $seeAge = 1, $plot = 1]]
<</if>>
	| [[Cheat Start|Starting Girls][cashX(1000000, "cheating"), $PC.rules.living = "luxurious",repX(20000, "cheating"), $dojo += 1, $cheatMode = 1, $seeDesk = 0, $seeFCNN = 0, $sortSlavesBy = "devotion", $sortSlavesOrder = "descending", $sortSlavesMain = 0, $rulesAssistantMain = 1, $UI.slaveSummary.abbreviation = {devotion: 1, rules: 1, clothes: 2, health: 1, diet: 1, drugs: 1, race: 1, nationality: 1, genitalia: 1, physicals: 1, skills: 1, mental: 2}, $PC.skill.trading = 100, $PC.skill.warfare = 100, $PC.skill.slaving = 100, $PC.skill.engineering = 100, $PC.skill.medicine = 100, $PC.skill.hacking = 100, App.Intro.initNationalities()]] //Intended for debugging: may have unexpected effects//

<<set $minimumSlaveAge = variableAsNumber($minimumSlaveAge, 3, 18, 18)>>
<<set $retirementAge = variableAsNumber($retirementAge, 25, 120, 45)>>
<<set $fertilityAge = variableAsNumber($fertilityAge, 3, 18, 13)>>
<<set $potencyAge = variableAsNumber($potencyAge, 3, 18, 13)>>
<<set $PC.mother = Number($PC.mother)>>
<<set $PC.father = Number($PC.father)>>
<<if $freshPC == 1 || $saveImported == 0>>
	<<set $PC.origRace = $PC.race>>
	<<set $PC.origSkin = $PC.skin>>
	<<set $PC.origEye = $PC.eye.right.iris>> /* needed for compatibility */
	<<set $PC.origHColor = $PC.hColor>>
<</if>>

<<run App.UI.tabbar.handlePreSelectedTab($tabChoice.introSummary)>>

	<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'World')" id="tab World">World</button>
	<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'slaves')" id="tab slaves">Slaves</button>
	<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'PC')" id="tab PC">Player Character</button>
	<button class="tablinks" onclick="App.UI.tabbar.openTab(event, 'UI')" id="tab UI">UI</button>

	<<set _options = new App.UI.OptionsGroup()>>

	<<run _options.addOption("Help tooltips are", "tooltipsEnabled")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
	.addComment("This is mostly for new players. @@.exampleTooltip.noteworthy;Colored text@@ can have tooltips.")>>

	<<run _options.addOption("Accordion effects on weekly reports are", "useAccordion")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Economic Tabs on weekly reports are", "useTabs")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<includeDOM _options.render()>>

Images

	<<set _options = new App.UI.OptionsGroup()>>

	<<run _options.addOption("Images are", "seeImages")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<includeDOM _options.render()>>

	<<if $seeImages > 0>>

			<<= SlaveArt(BaseSlave(), 0, 0)>>

		<<set _options = new App.UI.OptionsGroup()>>

		<<run _options.addOption("", "imageChoice")
		.addValueList([["Revamped embedded vector art", 3], ["Non-embedded vector art", 2], ["NoX/Deepmurk's vector art", 1], ["Shokushu's rendered imagepack", 0]])>>

		<<if $imageChoice === 1>>
			<<run _options.addOption("").addComment('Git compiled only, no exceptions.')>>

			<<run _options.addOption("Face artwork is", "seeFaces")
			.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

			<<run _options.addOption("Highlights on shiny clothing are", "seeVectorArtHighlights")
			.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

			<<run _options.addOption("Height scaling", "seeHeight")
			.addValue("All images", 2).on().addValue("Small images", 1).neutral().addValue("Disabled", 0).off()>>

			<<run _options.addOption("Clothing erection bulges are", "showClothingErection")
			.addValue("Enabled", true).on().addValue("Disabled", false).off()>>
		<<elseif $imageChoice === 0>>
			<<run _options.addOption("").addComment(`You need """to"""
				download the image pack
				"""and""" put the 'renders' folder into the resources/ folder where this html file is.`
			)>>

			<<run _options.addOption("Slave summary fetish images are", "seeMainFetishes")
			.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>
		<<elseif $imageChoice === 3>>
			<<run _options.addOption("").addComment('Git compiled only, no exceptions.')>>

			<<run _options.addOption("Clothing erection bulges are", "showClothingErection")
			.addValue("Enabled", true).on().addValue("Disabled", false).off()>>
		<</if>>

		<<run _options.addOption("PA avatar art is", "seeAvatar")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Slave images in lists are", "seeSummaryImages")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<run _options.addOption("Slave images in the weekly report are", "seeReportImages")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		<<includeDOM _options.render()>>
	<</if>>

Economy

	<<set _options = new App.UI.OptionsGroup()>>

	<<set $localEcon = $economy>>
	<<run _options.addOption("Economic climate", "baseDifficulty")
	.addValue("Very Easy", 1, () => V.economy = 200).addValue("Easy", 2, () => V.economy = 125)
	.addValue("Default Difficulty", 3, () => V.economy = 100).addValue("Hard", 4, () => V.economy = 80)
	.addValue("Very Hard", 5, () => V.economy = 67)>>

	<<if $difficultySwitch == 1>><<set $econAdvantage = -2>><</if>>
	<<if $difficultySwitch == 0>><<set $econRate = 0>><</if>>
	<<run _options.addOption("Economic forecast", "econRate").addComment("Some economic content requires this to be set to harder than vanilla")
	.addValue("Vanilla", 0, () => V.difficultySwitch = 0).addValue("Easy", 1, () => V.difficultySwitch = 1)
	.addValue("Default", 2, () => V.difficultySwitch = 1).addValue("Hard", 3, () => V.difficultySwitch = 1)>>

	/* Not functional yet
	All the things you need to run your arcology are getting more expensive
	<<if $incomeMod == 0>>
		while all forms of income ''remain static''.
			[[Easier|Intro Summary][$incomeMod = 1]]
	<<elseif $incomeMod == 1>>
		while all forms of income ''rise but cannot keep pace''.
		[[Harder|Intro Summary][$incomeMod = 0]] | [[Easier|Intro Summary][$incomeMod = 2]]
	<<else>>
		but luckily all forms of income ''rise in lockstep''.
		[[Harder|Intro Summary][$incomeMod = 1]]
	<</if>>
	*/

	<<set $foodCost = Math.trunc(2500/$economy)>>
	<<set $drugsCost = Math.trunc(10000/$economy)>>
	<<set $rulesCost = Math.trunc(10000/$economy)>>
	<<set $modCost = Math.trunc(5000/$economy)>>
	<<set $surgeryCost = Math.trunc(30000/$economy)>>

	<<if ndef $customVariety>>
		<<run _options.addOption("You are using standardized slave trading channels.")
		.customButton("Customize the slave trade", () => {V.customVariety = 1; V.customWA = 0}, "Customize Slave Trade")>>

		<<run _options.addOption("", "internationalTrade")
		.addValue("Allow intercontinental trade", 1).on().customDescription("The slave trade is ''international,'' so a wider variety of slaves will be available.")
		.addValue("Restrict the trade to continental", 0).off().customDescription("The slave trade is ''continental,'' so a narrower variety of slaves will be available.")>>

		<<if $internationalTrade == 1>>
			<<run _options.addOption("International slave variety is", "internationalVariety")
			.addValue("Normalized national variety", 1).customDescription("''normalized,'' so small nations will appear nearly as much as large ones.")
			.addValue("Semi-realistic national variety", 0).customDescription("''semi-realistic,'' so more populous nations will be more common.")>>
		<</if>>
	<<else>>
		<<run _options.addOption("Nationality distributions are customized.")
		.customButton("Adjust the slave trade", () => {V.customWA = 0; V.customVariety = 1}, "Customize Slave Trade")
		.customButton("Stop customizing", () => {delete V.customVariety})>>

		<<if ndef $nationalitiescheck>> /* NGP: regenerate $nationalitiescheck from previous game's $nationalities array */

<<include "Customize Slave Trade">>

		<</if>>
		<<run _options.addOption("").addCustomElement(`

			<<set _len = Object.keys($nationalitiescheck).length>>
			<<set _j = 0>>
			<<for _nation, _i range $nationalitiescheck>>
				<<print _nation>> @@.orange;<<print (($nationalities[_nation]/hashSum($nationalities))*100).toFixed(2)>>%@@
				<<set _j++>>
				<<if _j < _len>> |	<</if>>
			<</for>>

		`)>>
	<</if>> /* closes $customVariety is defined */

	<<run _options.addOption("", "plot")
	.addValue("Enable non-erotic events", 1).on().customDescription("Game mode: ''two-handed''. Includes non-erotic events concerning the changing world.")
	.addValue("Disable non-erotic events", 0).off().customDescription("Game mode: ''one-handed''. No non-erotic events concerning the changing world.")>>

	<<includeDOM _options.render()>>

The Free City

	<<set _options = new App.UI.OptionsGroup()>>

	<<run _options.addOption("The Free City features ''$neighboringArcologies'' arcologies in addition to your own.", "neighboringArcologies")
	.showTextBox().addComment("Setting this to 0 will disable most content involving the rest of the Free City.")>>

	<<if $targetArcology.fs == "New">>
		<<run _options.addOption("The Free City is located on ''$terrain'' terrain.", "terrain")
		.addValueList([["Urban", "urban"], ["Rural", "rural"], ["Ravine", "ravine"], ["Marine", "marine"], ["Oceanic", "oceanic"]])>>

		<<if $terrain !== "oceanic">>
			<<set _option = _options.addOption("The Free City is located in ''$continent''.", "continent")
			.addValue("North America").addCallback(() => V.language = "English")
			.addValue("South America").addCallback(() => V.language = "Spanish")
			.addValue("Brazil").addCallback(() => V.language = "Portuguese")
			.addValue("Europe").addCallback(() => V.language = "English")
			.addValue("the Middle East").addCallback(() => V.language = "Arabic")
			.addValue("Africa").addCallback(() => V.language = "Arabic")
			.addValue("Asia").addCallback(() => V.language = "Chinese")
			.addValue("Australia").addCallback(() => V.language = "English")
			.addValue("Japan").addCallback(() => V.language = "Japanese")>>
		<</if>>

		<<run _options.addOption("The lingua franca of your arcology is", "language")
		.showTextBox()>>
	<<elseif !["ArabianRevivalist", "AztecRevivalist", "ChineseRevivalist", "EdoRevivalist", "EgyptianRevivalist", "RomanRevivalist"].includes($targetArcology.fs)>>
		<<run _options.addOption("The lingua franca of your arcology is", "language")
		.addValueList(["English", "Spanish", "Arabic"]).showTextBox()>>
	<</if>>

	<<run _options.addOption("The Free City could develop as many as ''$FSCreditCount'' future societies.", "FSCreditCount")
	.showTextBox().addComment("5 is default, 4 behaves the same as pre-patch 0.9.9.0, max is 7. This option cannot be changed during the game.")>>

	<<includeDOM _options.render()>>

Content

	<<set _options = new App.UI.OptionsGroup()>>

	<<run _options.addOption("Proportion of slave girls with dicks", "seeDicks")
	.addValueList([["None (0%)", 0], ["A few (10%)", 10], ["Some (25%)", 25], ["Half (50%)", 50], ["Most (75%)", 75], ["Almost all (90%)", 90], ["All (100%)", 100]])>>

	<<if $seeDicks === 0>>
		<<run _options.addOption("Should you be able to surgically attach a penis to your female slaves and starting girls?", "makeDicks")
		.addValue("Yes", 1).on().addValue("No", 0).off()>>
	<</if>>

	<<run _options.addOption("Slaves getting sick is", "seeIllness")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Pregnancy related content is", "seePreg")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Children born in game strictly adhering to dick content settings is", "seeDicksAffectsPregnancy")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<if $seeDicksAffectsPregnancy === 0>>
		<<run _options.addOption("XX slaves only fathering daughters is", "adamPrinciple")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>
	<</if>>

	<<run _options.addOption("Extreme pregnancy content like broodmothers is", "seeHyperPreg")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Advanced pregnancy complications such as miscarriage and premature birth are", "dangerousPregnancy")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Extreme content like amputation is", "seeExtreme")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Bestiality content is", "seeBestiality")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Watersports content is", "seePee")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Incest is", "seeIncest")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<if $seeDicks !== 0>>
		<<run _options.addOption("Circumcision is", "seeCircumcision")
		.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>
	<</if>>

	<<includeDOM _options.render()>>

Mods

	<<set _options = new App.UI.OptionsGroup()>>

	<<run _options.addOption("The Special Force Mod is", "Toggle", $SF).addComment("This mod is initially from anon1888 but expanded by SFanon offers a lategame special (started out as security but changed to special in order to try and reduce confusion with CrimeAnon's separate Security Expansion (SecExp) mod) force, that is triggered after week 80. It is non-canon where it conflicts with canonical updates to the base game.")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

		/*The support facility is
		<<if $SF.Facility.Toggle < 1>>
				@@.red;DISABLED.@@ [[Enable|Intro Summary][$SF.Facility.Toggle = 1]]
		<<else>>
				@@.cyan;ENABLED.@@ [[Disable|Intro Summary][$SF.Facility.Toggle = 0]]
		<</if>> //Prep for future content.*/

	<<run _options.addOption("The Security Expansion Mod is", "secExpEnabled").addComment("This mod introduces security and crime in the arcology, as well as attacks and battles.")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<includeDOM _options.render()>>

	<<set _options = new App.UI.OptionsGroup()>>

	<<run _options.addOption("Master Suite report details such as slave changes are", "verboseDescriptions")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Slaves can have alternate titles", "newDescriptions")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Mention ethnicity", "seeRace")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Mention nationality", "seeNationality")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Dynasties of enslaved royalities are", "realRoyalties")
	.addValueList([["Historical", 1], ["Random", 0]])>>

	<<run _options.addOption("New slaves may have male names", "allowMaleSlaveNames").addComment("This only affects slave generation and not your ability to name your slaves.")
	.addValue("Enabled", true).on().addValue("Disabled", false).off()>>

	<<run _options.addOption("Schema for ordering slave names is", "surnameOrder")
	.addValueList([["Country of origin", 0], ["Name Surname", 1], ["Surname Name", 2]])>>

	<<run _options.addOption("Family size", "limitFamilies").addComment("Controls acquisition of additional relatives, by means other than birth, for slaves with families.")
	.addValue("Allow extended families", 0).on().addValue("Restrict family size (Vanilla Emulation)", 1).off()>>

	<<run _options.addOption("Tracking distant relatives is", "showDistantRelatives")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Successive breeding resulting in sub-average slaves is", "inbreeding")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Family titles for relatives", "allowFamilyTitles")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Slave assets affected by weight is", "weightAffectsAssets")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()
	.addComment("Diet will still affect asset size.")>>

	<<run _options.addOption("Curative side effects are", "curativeSideEffects")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Slaves with fat lips or heavy oral piercings may lisp", "disableLisping")
	.addValue("Yes", 0).on().addValue("No", 1).off()>>

	<<includeDOM _options.render()>>

Age

	<<set _options = new App.UI.OptionsGroup()>>

	<<run _options.addOption("Slave aging", "seeAge")
	.addValue("Enabled", 1).on().addValue("Celebrate birthdays, but don't age.", 2).neutral().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Slave age distribution", "pedo_mode").addComment("In loli mode most new slaves are under the age of 18. May not apply to custom slaves and slaves from specific events.")
	.addValue("Loli mode", 1, () => V.minimumSlaveAge = 5).addValue("Normal mode", 0)>>

	<<set $minimumSlaveAge = Math.clamp($minimumSlaveAge, 3, 18)>>
	<<run _options.addOption("Girls appearing in the game will be no younger than", "minimumSlaveAge").showTextBox()>>

	<<run _options.addOption("Molestation of slaves younger than $minimumSlaveAge is", "extremeUnderage")
	.addValue("Permitted", 1).on().addValue("Forbidden", 0).off()>>

	<<set $retirementAge = Math.clamp($retirementAge, $minimumSlaveAge + 1, 120)>>
	<<run _options.addOption("Initial retirement age will be at", "retirementAge")
	.addComment("May cause issues with New Game and initial slaves if set below 45.").showTextBox()>>

	<<set $fertilityAge = Math.clamp($fertilityAge, 3, 18)>>
	<<run _options.addOption("Girls will not be able to become pregnant if their age is under", "fertilityAge").showTextBox()>>

	<<set $potencyAge = Math.clamp($potencyAge, 3, 18)>>
	<<run _options.addOption("Girls will not be able to impregnate others if their age is under", "potencyAge").showTextBox()>>

	<<run _options.addOption("Precocious puberty is", "precociousPuberty").addComment("Under certain conditions they can become pregnant or inseminate others younger then normal age - $fertilityAge, though they may also experience delayed puberty.")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Age penalties are", "AgePenalty").addComment("Job and career penalties due to age.")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<run _options.addOption("Children growing as they age is", "loliGrow")
	.addValue("Enabled", 1).on().addValue("Disabled", 0).off()>>

	<<includeDOM _options.render()>>

	<<set _options = new App.UI.OptionsGroup()>>

	<<if $freshPC == 1 || $saveImported == 0>>
		<<run _options.addOption("You are a", "title", $PC)
		.addValue("Masculine Master", 1, () => V.PC.genes = "XY").addValue("Feminine Mistress", 0, () => V.PC.genes = "XX")>>

		<<run _options.addOption("Everyone calls you ''<<= PlayerName()>>.''")>>
		<<run _options.addOption("Your given name is", "slaveName", $PC).showTextBox()>>

		<<if $PC.slaveSurname === 0>>
			<<run _option = _options.addOption("And no surname", "slaveSurname", $PC)
			.addValue("Add a surname", "Anon")
			.addComment("Surnames cannot be changed during the game outside of special circumstances.")>>
		<<else>>
			<<run _option = _options.addOption("And your surname is", "slaveSurname", $PC).showTextBox()
			.addValue("Go by a single name", 0)
			.addComment("Surnames cannot be changed during the game outside of special circumstances.")>>
		<</if>>

		<<set $PC.physicalAge = $PC.actualAge, $PC.visualAge = $PC.actualAge>>
		<<run _options.addOption("You are", "actualAge", $PC).showTextBox()
		.addRange(25, 35, "<", "Surprisingly young").addRange(40, 50, "<", "Entering middle age")
		.addRange(55, 65, "<", "Well into middle age").addRange(70, 65, ">=", "Old")>>

		<<run _options.addOption("Your birthday was ''$PC.birthWeek'' weeks ago.", "birthWeek", $PC).showTextBox()>>

		<<run _options.addOption("Player aging is", "playerAging")
		.addValue("Enabled", 2).on().addValue("Celebrate birthdays, but don't age.", 1).neutral().addValue("Disabled", 0).off()
		.addComment("This option cannot be changed during the game.")>>

		<<if def $PC.customTitle>>
			<<run _options.addOption("Custom title", "customTitle", $PC).showTextBox()
			.addValue("Reset to default", "", () => {delete $PC.customTitle; delete $PC.customTitleLisp;})>>

			<<run _options.addOption("Lisped custom title", "customTitleLisp", $PC).showTextBox()
			.addComment('If using a custom title, select Master or Mistress to set the gender of your title. Make sure to replace your "s"s with "th"s to have working lisps in your lisped title.')>>
		<<else>>
			<<run _options.addOption("Custom title", "customTitle", $PC)
			.addValue("Set custom title", "Master", () => $PC.customTitleLisp = 'Mather')>>
		<</if>>

		<<run _options.addOption("Your nationality is", "nationality", $PC).showTextBox()
		.addComment("For best result capitalize it.")>>

		<<run _options.addOption("Your race is", "race", $PC).showTextBox()
		.addValueList([["White", "white"], ["Asian", "asian"], ["Latina", "latina"], ["Middle Eastern", "middle eastern"],
			["Black", "black"], ["Semetic", "semetic"], ["Southern European", "southern european"], ["Indo-Aryan", "indo-aryan"],
			["Amerindian", "amerindian"], ["Pacific Islander", "pacific islander"], ["Malay", "malay"], ["Mixed Race", "mixed race"]])>>

		<<run _options.addOption("Your skin tone is", "skin", $PC).showTextBox()
		.addValueList([["Pure White", "pure white"], ["Ivory", "ivory"], ["White", "white"], ["Extremely Pale", "extremely pale"],
			["Very Pale", "very pale"], ["Pale", "pale"], ["Extremely Fair", "extremely fair"], ["Very Fair", "very fair"],
			["Fair", "fair"], ["Light", "light"], ["Light Olive", "light olive"], ["Tan", "tan"], ["Olive", "olive"], ["Bronze", "bronze"],
			["Dark Olive", "dark olive"], ["Dark", "dark"], ["Light Beige", "light beige"], ["Beige", "beige"],
			["Dark Beige", "dark beige"], ["Light Brown", "light brown"], ["Brown", "brown"], ["Dark Brown", "dark brown"],
			["Black", "black"], ["Ebony", "ebony"], ["Pure Black", "pure black"]])>>

		<<run _options.addOption("Your body", "markings", $PC)
		.addValueList([["Is clear of blemishes", "none"], ["Has light freckling", "freckles"], ["Has heavy freckling", "heavily freckled"]])>>

		<<run _options.addOption("Your eyes are", "origColor", $PC.eye).showTextBox()>>

		<<run _options.addOption("Your hair is", "hColor", $PC).showTextBox()>>

		<<run _options.addOption("Your face is", "faceShape", $PC)
		.addValueList([["Normal", "normal"], ["Androgynous", "androgynous"], ["Masculine", "masculine"], ["Cute", "cute"], ["Sensual", "sensual"], ["Exotic", "exotic"]])>>

		<<run _options.addOption("Your preferred refreshment is", "refreshment", $PC).showTextBox()
		.addValue("Cigars", "cigar", () => {V.PC.refreshmentType = 0})
		.addValue("Whiskey", "whiskey", () => {V.PC.refreshmentType = 1})>>

		<<set _option = _options.addOption("Which you", "refreshmentType", $PC)
		.addValueList([["Smoke", 0], ["Drink", 1], ["Eat", 2], ["Snort", 3], ["Inject", 4], ["Pop", 5], ["Orally dissolve", 6]])>>

		<<if $PC.refreshmentType == 0>>
			<<run _option.addComment('"Smoked" must fit into the following sentence: "I smoked a $PC.refreshment" to fit events properly.')>>
		<<elseif $PC.refreshmentType == 5>>
			<<run _option.addComment('"Popped" must fit into the following sentence: "I shook the bottle of $PC.refreshment" to fit events properly.')>>
		<<elseif $PC.refreshmentType == 6>>
			<<run _option.addComment('"Orally Dissolved" must fit into the following sentence: "I placed a tab of $PC.refreshment under my tongue" to fit events properly.')>>
		<</if>>

		<<set _option = _options.addOption("Before you came to the Free Cities, you were a", "career", $PC)>>
		<<if $PC.career == "arcology owner">>
			<<run _option.addValue("Arcology owner", "arcology owner")>>
		<<else>>
			<<run _option.addValueList([["Member of the idle wealthy", "wealth"], ["Business leader", "capitalist"],
				["Mercenary", "mercenary"], ["Slaver", "slaver"], ["Engineer", "engineer"], ["Doctor", "medicine"], ["Hacker", "BlackHat"],
				["Minor celebrity", "celebrity"], ["Escort", "escort"], ["Servant", "servant"], ["Gang leader", "gang"]]
			)>>
			<<if $secExpEnabled > 0>>
				<<switch $PC.career>>
				<<case "capitalist">>
					<<run _option.addComment("
@@.yellowgreen;The propaganda hub's upgrades will be cheaper.@@
")>>
				<<case "mercenary">>
					<<run _option.addComment("
@@.green;Easier to maintain security@@ and @@.yellowgreen;the security HQ's upgrades will be cheaper.@@
")>>
				<<case "slaver">>
					<<run _option.addComment("
@@.green;Easier to maintain authority@@ and @@.yellowgreen;the security HQ's upgrades will be cheaper.@@
")>>
				<<case "engineer">>
					<<run _option.addComment("
@@.yellowgreen;construction and upgrade of facilities will be cheaper.@@
")>>
				<<case "medicine">>
					<<run _option.addComment("
@@.yellowgreen;Drug upgrades will be cheaper.@@
")>>
				<<case "celebrity">>
					<<run _option.addComment("
@@.yellowgreen;The propaganda hub's upgrades will be cheaper.@@
")>>
				<<case "escort">>
					<<run _option.addComment("
@@.red;Harder to maintain authority.@@
")>>
				<<case "servant">>
					<<run _option.addComment("
@@.red;Harder to maintain authority.@@
")>>
				<<case "gang">>
					<<run _option.addComment("
@@.green;Easier to maintain authority@@ and @@.yellowgreen;the security HQ's upgrades will be cheaper.@@
")>>
				<<case "BlackHat">>
					<<run _option.addComment("
@@.red;Harder to maintain authority.@@
")>>
				<<default>>
					<<run _option.addComment("
@@.red;Harder to maintain authority,@@ but @@.yellowgreen;the propaganda hub's upgrades will be cheaper.@@
")>>
				<</switch>>
			<</if>>
		<</if>>

		<<run _options.addOption("It is rumored that you acquired your arcology through", "rumor", $PC)
		.addValueList([["Wealth", "wealth"], ["Hard work", "diligence"], ["Force", "force"], ["Social engineering", "social engineering"],
			["Blind luck", "luck"]]
		)>>

		<<includeDOM _options.render()>>

Sexuality

		<<set _options = new App.UI.OptionsGroup()>>

		<<if $PC.vagina !== -1 && $PC.dick !== 0>>
			<<set _vagina_penis = 2>>
		<<elseif $PC.vagina !== -1>>
			<<set _vagina_penis = 1>>
		<<else>>
			<<set _vagina_penis = 0>>
		<</if>>

		<<set _option = _options.addOption("You have a", "vagina_penis", State.temporary)
		.addValue("Penis", 0, () => {
			V.PC.preg = 0;
			V.PC.pregType = 0;
			V.PC.dick = 4;
			V.PC.balls = 3;
			V.PC.scrotum = 3;
			V.PC.prostate = 1;
			V.PC.vagina = -1;
			V.PC.ovaries = 0;
		}).addValue("Vagina", 1, () => {
			V.PC.dick = 0;
			V.PC.balls = 0;
			V.PC.scrotum = 0;
			V.PC.prostate = 0;
			V.PC.vagina = 1;
			V.PC.ovaries = 1
		}).addValue("Penis and Vagina", 2, () => {
			V.PC.dick = 4;
			V.PC.balls = 3;
			V.PC.scrotum = 3;
			V.PC.prostate = 1;
			V.PC.vagina = 1;
			V.PC.ovaries = 1
		})>>
		<<if _vagina_penis === 0>>
			<<run _option.addComment("Standard sex scenes; easiest reputation maintenance.")>>
		<<elseif _vagina_penis === 1>>
			<<run _option.addComment("Sex scene variations; most difficult reputation maintenance.")>>
		<<else>>
			<<run _option.addComment("Sex scene variations; more difficult reputation maintenance; some unique opportunities, especially with breasts.")>>
		<</if>>

		<<if $PC.vagina !== -1>>
			<<set _option = _options.addOption("You are", "preg", $PC)
			.addValue("Taking contraceptives", -1, () => {V.PC.pregType = 0; V.PC.labor = 0;})
			.addValue("Not taking contraceptives", 0, () => {V.PC.pregType = 0; V.PC.labor = 0;})
			.addRange(16, 37, "<=", "Pregnant").addCallback(() => {V.PC.pregType = 1; V.PC.labor = 0;})
			.addRange(40, 42, "<=", "Ready to drop").addCallback(() => {V.PC.pregType = 1; V.PC.labor = 0;})
			.addRange(43, 42, ">", "Ready to drop with octuplets").addCallback(() => {V.PC.pregType = 8; V.PC.labor = 1;})>>
			<<if $PC.preg == -1>>
				<<run _option.addComment("You can't get pregnant, however there will be a slight increase to living expenses.")>>
			<</if>>

			<<if $PC.counter.birthsTotal > 0>>
				<<run _options.addOption("").addComment("You have given birth to ''$PC.counter.birthsTotal'' babies.")>>
			<</if>>

			<<set _option = _options.addOption("Hormone effects", "pregMood", $PC)
			.addValueList([["None", 0], ["Caring and motherly", 1], ["Aggressive and domineering", 2]])>>
			<<if $PC.pregMood === 1>>
				<<run _option.addComment("Sex scene alterations; slaves will trust you more, but may try to take advantage of your mercy.")>>
			<<elseif $PC.pregMood === 2>>
				<<run _option.addComment("Sex scene alterations; slaves will fear you more, but will become more submissive to you.")>>
			<</if>>
		<</if>>

		<<if $PC.title === 1 && $PC.boobs <= 100>>
			<<set _option = _options.addOption("Your chest is", "boobs", $PC).addValue("Manly", 100, () => V.PC.boobsImplant = 0)>>
		<<else>>
			<<set _option = _options.addOption("Your breasts are", "boobs", $PC).addValue("Flat", 100, () => V.PC.boobsImplant = 0)>>
		<</if>>
		<<run _option.addValueList([["C-cups", 500], ["DD-cups", 900], ["F-cups", 1100], ["G-cups", 1300]])>>

		<<if $PC.boobs >= 500>>
			<<run _options.addOption("Your breasts are", "boobsImplant", $PC)
			.addValueList([["All natural", 0], ["Fake", 400]])>>
		<</if>>

		<<includeDOM _options.render()>>
	<<else>>

		You are a
		<<if $PC.title == 1>>
			masculine ''Master''
		<<else>>
			feminine ''Mistress'
		<</if>>
		and everyone that matters calls you	<<= PlayerName()>>.

		You are $PC.actualAge years old which is
		<<if $PC.actualAge >= 65>>
			''old''.
		<<elseif $PC.actualAge >= 50>>
			''well into middle age''.
		<<elseif $PC.actualAge >= 35>>
			''entering middle age''.
		<<else>>
			''surprisingly young''.
		<</if>>

		<<run _options.addOption("Player aging is", "playerAging")
		.addValue("Enabled", 2).on().addValue("Celebrate birthdays, but don't age.", 1).neutral().addValue("Disabled", 0).off()
		.addComment("This option cannot be changed during the game.")>>

			Your custom title is ''<<textbox2 "$PC.customTitle" $PC.customTitle "Intro Summary">>''
			and when lisped it is ''<<textbox2 "$PC.customTitleLisp" $PC.customTitleLisp "Intro Summary">>''.
			//If using a custom title, select Master or Mistress to set the gender of your title.//
			//Make sure to replace your "s"s with "th"s to have working lisps in your lisped title.//

			You are a $PC.nationality $PC.race with	<<if $PC.markings == "heavily freckled">>heavily freckled<<elseif $PC.markings == "freckles">>lightly freckled<<else>>clear<</if>> $PC.skin skin, $PC.hColor hair and	<<print App.Desc.eyesColor($PC)>>. You have a $PC.faceShape face.

			Your preferred refreshment is	<<textbox2 "$PC.refreshment" $PC.refreshment "Intro Summary">> [[Cigars|Intro Summary][$PC.refreshment = "cigar",$PC.refreshmentType = 0]] | [[Whiskey|Intro Summary][$PC.refreshment = "whiskey",$PC.refreshmentType = 1]]

			and you consume it by ''<<if $PC.refreshmentType == 0>>Smoking<<elseif $PC.refreshmentType == 1>>Drink<<elseif $PC.refreshmentType == 2>>Eating<<elseif $PC.refreshmentType == 3>>Snorting<<elseif $PC.refreshmentType == 4>>Injection<<elseif $PC.refreshmentType == 5>>Popping<<else>>Orally Dissolving<</if>>''.

		[[Smoked|Intro Summary][$PC.refreshmentType = 0]] | [[Drank|Intro Summary][$PC.refreshmentType = 1]] | [[Eaten|Intro Summary][$PC.refreshmentType = 2]] | [[Snorted|Intro Summary][$PC.refreshmentType = 3]] | [[Injected|Intro Summary][$PC.refreshmentType = 4]] | [[Popped|Intro Summary][$PC.refreshmentType = 5]] | [[Orally Dissolved|Intro Summary][$PC.refreshmentType = 6]]

		<<if $PC.refreshmentType == 0>>//"Smoked" must fit into the following sentence: "I smoked a $PC.refreshment" to fit events properly
		<<elseif $PC.refreshmentType == 5>>//"Popped" must fit into the following sentence: "I shook the bottle of $PC.refreshment" to fit events properly
		<<elseif $PC.refreshmentType == 6>>//"Orally Dissolved" must fit into the following sentence: "I placed a tab of $PC.refreshment under my tongue" to fit events properly
		<</if>>

		<<switch $PC.career>>
		<<case "wealth">>
			Prior to being an arcology owner, you were a member of the idle wealthy.
		<<case "capitalist">>
			Prior to being an arcology owner, you were a business leader.
		<<case "mercenary">>
			Prior to being an arcology owner, you were a mercenary.
		<<case "slaver">>
			Prior to being an arcology owner, you were a slaver.
		<<case "engineer">>
			Prior to being an arcology owner, you were an engineer.
		<<case "medicine">>
			Prior to being an arcology owner, you were a surgeon.
		<<case "celebrity">>
			Prior to being an arcology owner, you were a minor celebrity.
		<<case "BlackHat">>
			Prior to being an arcology owner, you specialized in cracking databases and making mockeries of cyber security.
		<<case "arcology owner">>
			Being an arcology owner defines your life now.
		<<case "escort">>
			Prior to being an arcology owner, you knew how to survive off your looks and body.
		<<case "servant">>
			Prior to being an arcology owner, you served a well-off master<<if $PC.counter.birthMaster >= 2>> and bore him several children<</if>>.
		<<case "gang">>
			Prior to being an arcology owner, you were the leader of a ruthless gang.
		<</switch>>

		Word in the arcology is you acquired it through
		<<switch $PC.rumor>>
		<<case "wealth">>
			a rather ridiculous amount of money.
		<<case "diligence">>
			sheer effort.
		<<case "force">>
			brutal force.
		<<case "social engineering">>
			clever social manipulation.
		<<case "luck">>
			blind luck.
		<</switch>>

		You have a
		<<if $PC.vagina != -1 && $PC.dick != 0>>
			penis and vagina
		<<elseif $PC.dick != 0>>
			penis.
		<<elseif $PC.vagina != -1>>
			vagina
		<</if>>
		<<if $PC.vagina != -1>>
			and are
			<<if $PC.pregWeek < 0>>
				recovering from your last pregnancy.
			<<elseif $PC.preg == -2>>
				infertile.
			<<elseif $PC.preg == -1>>
				taking contraceptives.
			<<elseif $PC.preg == 0>>
				fertile.
			<<elseif $PC.preg > 37>>
				extremely pregnant.
			<<elseif $PC.preg > 0>>
				pregnant.
			<</if>>
			<<if $PC.preg > 20 || $PC.counter.birthsTotal > 0>>
				<<if $PC.pregMood == 1>>
					You tend to be caring and motherly when you're pregnant.
					[[Change to no change|Intro Summary][$PC.pregMood = 0]] | [[Change to aggressive|Intro Summary][$PC.pregMood = 2]]
				<<elseif $PC.pregMood == 0>>
					Pregnancy doesn't really affect your mood.
					[[Change to motherly|Intro Summary][$PC.pregMood = 1]] | [[Change to aggressive|Intro Summary][$PC.pregMood = 2]]
				<<else>>
					You tend to be very demanding and aggressive when you're pregnant.
					[[Change to no change|Intro Summary][$PC.pregMood = 0]] | [[Change to motherly|Intro Summary][$PC.pregMood = 1]]
				<</if>>
			<<else>>
				<<if $PC.pregMood == 1>>
					You tend to be caring and motherly when you're hormonal.
					[[Change to no change|Intro Summary][$PC.pregMood = 0]] | [[Change to aggressive|Intro Summary][$PC.pregMood = 2]]
				<<elseif $PC.pregMood == 0>>
					Your mood isn't tied to your hormones.
					[[Change to motherly|Intro Summary][$PC.pregMood = 1]] | [[Change to aggressive|Intro Summary][$PC.pregMood = 2]]
				<<else>>
					You tend to be very demanding and aggressive when you're hormonal.
					[[Change to no change|Intro Summary][$PC.pregMood = 0]] | [[Change to motherly|Intro Summary][$PC.pregMood = 1]]
				<</if>>
			<</if>>
			<<if $PC.counter.birthsTotal > 0>>
				You have given birth to $PC.counter.birthsTotal babies.
			<</if>>
		<</if>>

		<<if $PC.boobs >= 300>>
			You have a	<<if $PC.title > 0>>masculine<<else>>feminine<</if>> body with
			<<if $PC.boobs >= 1400>>
				giant<<if $PC.boobsImplant != 0>>, fake<</if>> cow tits.
			<<elseif $PC.boobs >= 1200>>
				huge	<<if $PC.boobsImplant != 0>>fake	<</if>>breasts.
			<<elseif $PC.boobs >= 1000>>
				big	<<if $PC.boobsImplant != 0>>fake	<</if>>breasts.
			<<elseif $PC.boobs >= 800>>
				noticeable breasts.
			<<elseif $PC.boobs >= 650>>
				unremarkable breasts.
			<<elseif $PC.boobs >= 500>>
				average breasts.
			<<else>>
				small breasts.
			<</if>>
		<<else>>
			<<if $PC.title > 0>>
				You have a manly chest.
			<<else>>
				You are flat as a board.
			<</if>>
		<</if>>
	<</if>>


code:
:: Location Intro [nobr]

	As the old countries crumble and technology stagnates, the gap between rich and poor increases. In order to continue living a good life without having their property taken by the mob, many of the wealthy and powerful come together to form 'Free Cities.' These are new cities on undeveloped land, in remote areas, or even afloat, fully free of any allegiance or law. These new cities are built on new ideas, with most buildings designed as futuristic, self-contained 'arcologies.' An arcology and everything in it is usually owned by a single person. And you're determined that you will soon be one of those single people.
	In what part of the world is your new arcology going to be located?

	[[North America|Intro Summary][$continent = "North America", $language = "English"]]
	| [[South America|Intro Summary][$continent = "South America", $language = "Spanish"]]
	| [[Brazil|Intro Summary][$continent = "Brazil", $language = "Portuguese"]]
	| [[Europe|Intro Summary][$continent = "Europe", $language = "German"]]
	| [[the Middle East|Intro Summary][$continent = "the Middle East", $language = "Arabic"]]
	| [[Africa|Intro Summary][$continent = "Africa", $language = "Arabic"]]
	| [[Asia|Intro Summary][$continent = "Asia", $language = "Chinese"]]
	| [[Japan|Intro Summary][$continent = "Japan", $language = "Japanese"]]
	| [[Australia|Intro Summary][$continent = "Australia", $language = "English"]]

		//Slaves from countries in the selected continent will appear more frequently.//

repo_name: KnightBoulegard/fc

license: mit


code:
:: PC Appearance Intro [nobr]

	Race and appearance are largely irrelevant in the Free Cities; there are only the free and the enslaved.

		Appearance only, no effect on gameplay (unless you make a big deal out of it).

		What nationality are you?

		You are $PC.nationality.

		<<textbox "$PC.nationality" $PC.nationality "PC Appearance Intro">>

			Capitalize it

		What race are you?

		You're $PC.race.

	<<link "White">>
		<<set $PC.race = "white">>
		<<PlayerRace>>
	<</link>>
	|
	<<link "Asian">>
		<<set $PC.race = "asian">>
		<<PlayerRace>>
	<</link>>
	|
	<<link "Latina">>
		<<set $PC.race = "latina">>
		<<PlayerRace>>
	<</link>>
	|
	<<link "Middle Eastern">>
		<<set $PC.race = "middle eastern">>
		<<PlayerRace>>
	<</link>>
	|
	<<link "Black">>
		<<set $PC.race = "black">>
		<<PlayerRace>>
	<</link>>
	|
	<<link "Semitic">>
		<<set $PC.race = "semitic">>
		<<PlayerRace>>
	<</link>>
	|
	<<link "Southern European">>
		<<set $PC.race = "southern european">>
		<<PlayerRace>>
	<</link>>
	|
	<<link "Indo-Aryan">>
		<<set $PC.race = "indo-aryan">>
		<<PlayerRace>>
	<</link>>
	|
	<<link "Amerindian">>
		<<set $PC.race = "amerindian">>
		<<PlayerRace>>
	<</link>>
	|
	<<link "Pacific Islander">>
		<<set $PC.race = "pacific islander">>
		<<PlayerRace>>
	<</link>>
	|
	<<link "Malay">>
		<<set $PC.race = "malay">>
		<<PlayerRace>>
	<</link>>
	|
	<<link "Mixed Race">>
		<<set $PC.race = "mixed race">>
		<<PlayerRace>>
	<</link>>

		What is your skin tone?

		You have $PC.skin skin.

	<<link "Pure White">>
		<<set $PC.skin = "pure white">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Ivory">>
		<<set $PC.skin = "ivory">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "White">>
		<<set $PC.skin = "white">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Extremely Pale">>
		<<set $PC.skin = "extremely pale">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Very Pale">>
		<<set $PC.skin = "very pale">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Pale">>
		<<set $PC.skin = "pale">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Extremely Fair">>
		<<set $PC.skin = "extremely fair">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Very Fair">>
		<<set $PC.skin = "very fair">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Fair">>
		<<set $PC.skin = "fair">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Light">>
		<<set $PC.skin = "light">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Light Olive">>
		<<set $PC.skin = "light olive">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Tan">>
		<<set $PC.skin = "tan">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Olive">>
		<<set $PC.skin = "olive">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Bronze">>
		<<set $PC.skin = "bronze">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Dark Olive">>
		<<set $PC.skin = "dark olive">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Dark">>
		<<set $PC.skin = "dark">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Light Beige">>
		<<set $PC.skin = "light beige">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Beige">>
		<<set $PC.skin = "beige">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Dark Beige">>
		<<set $PC.skin = "dark beige">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Light Brown">>
		<<set $PC.skin = "light brown">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Brown">>
		<<set $PC.skin = "brown">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Dark Brown">>
		<<set $PC.skin = "dark brown">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Black">>
		<<set $PC.skin = "black">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Ebony">>
		<<set $PC.skin = "ebony">>
		<<PlayerSkin>>
	<</link>>
	|
	<<link "Pure Black">>
		<<set $PC.skin = "pure black">>
		<<PlayerSkin>>
	<</link>>

		Some people have freckles.

		<<if $PC.markings == "none">>
			Your skin is pure and clear of any freckles.
		<<elseif $PC.markings == "freckles">>
			You have some freckles on your cheeks and elsewhere.
		<<elseif $PC.markings == "heavily freckled">>
			You have dense freckles on your cheeks and elsewhere.
		<</if>>

	<<link "No Freckles">>
		<<set $PC.markings = "none">>
		<<PlayerMarkings>>
	<</link>>
	|
	<<link "Light Freckles">>
		<<set $PC.markings = "freckles">>
		<<PlayerMarkings>>
	<</link>>
	|
	<<link "Heavy Freckles">>
		<<set $PC.markings = "heavily freckled">>
		<<PlayerMarkings>>
	<</link>>

		What color are your eyes?

		You have $PC.eye.origColor eyes.

		<<textbox "$PC.eye.origColor" $PC.eye.origColor "PC Appearance Intro">>

		What color is your hair?

		You have $PC.hColor hair.

		<<textbox "$PC.hColor" $PC.hColor "PC Appearance Intro">>

	[[Finish player character customization|PC Experience Intro][resetEyeColor($PC)]]


code:
:: PC Body Intro [nobr]

	Most slaveowners in the Free Cities are male. The preexisting power structures of the old world have mostly migrated to the new, and it can often be very hard to be a free woman in the Free Cities. Some manage to make their way, but in many arcologies, men are the owners, and women are the owned. You'll cut a striking figure as the owner and leader of your arcology, but

		what's under your business attire?

<<set $PC.actualAge = Math.clamp($PC.actualAge, 14, 80)>>

		<<if $PC.title > 0>>
			You are a <<if $PC.genes == "XX">>wo<</if>>man with a masculine figure and will be referred to as

				Master.

			[[Switch to a feminine appearance|PC Body Intro][$PC.title = 0]]
		<<else>>
			You are a <<if $PC.genes == "XX">>wo<</if>>man with a feminine figure and will be referred to as

				Mistress.

			[[Switch to a masculine appearance|PC Body Intro][$PC.title = 1]]
		<</if>>

		This option will affect scenes. Femininity may increase difficulty in the future, but for now only your chest and junk matter.

		Under my suit jacket,
		<<if $PC.boobs > 300>>

				feminine breasts.

			[[Remove breasts|PC Body Intro][$PC.boobs = 100]]
		<<else>>
			<<if $PC.title > 0>>

					masculine muscles.

				[[Add breasts|PC Body Intro][$PC.boobs = 900]]
			<<else>>

					a flat chest.

				[[Add breasts|PC Body Intro][$PC.boobs = 900]]
			<</if>>
		<</if>>

			These options will affect scenes. Sporting breasts will increase difficulty.

		Behind the front of my tailored
		<<if $PC.dick != 0>>
			<<if $PC.vagina != -1>>
				slacks,

					both a penis and a vagina.

				[[Remove the penis|PC Body Intro][$PC.dick = 0, $PC.balls = 0, $PC.scrotum = 0, $PC.prostate = 0]] | [[Remove the vagina|PC Body Intro][$PC.vagina = -1, $PC.ovaries = 0]]
			<<else>>
				slacks, a

					penis.

				[[Switch to vagina|PC Body Intro][$PC.dick = 0, $PC.balls = 0, $PC.scrotum = 0, $PC.prostate = 0, $PC.genes = "XX", $PC.vagina = 1, $PC.ovaries = 1]] | [[Add a vagina|PC Body Intro][$PC.vagina = 1, $PC.ovaries = 1]]
			<</if>>
		<<else>>
			skirt, a

				vagina.

			[[Switch to penis|PC Body Intro][$PC.dick = 4, $PC.balls = 3, $PC.scrotum = 3, $PC.prostate = 1, $PC.genes = "XY", $PC.vagina = -1, $PC.ovaries = 0]] | [[Add a penis|PC Body Intro][$PC.dick = 4, $PC.balls = 3, $PC.scrotum = 3, $PC.prostate = 1]]
		<</if>>

		These options will affect sex scenes. Feminine options will increase difficulty.

		How old are you?

		I'm
		<<if $PC.actualAge >= 65>>
			getting up in years. I've made a legacy for myself, and I'm not done yet.
		<<elseif $PC.actualAge >= 50>>
			well into middle age. I've made a name for myself, and I've still got it.
		<<elseif $PC.actualAge >= 35>>
			entering middle age. I'm accomplished, and I retain some youthful vigor.
		<<else>>
			surprisingly young. I'll need to prove myself, but I've got energy to burn.
		<</if>>
		My age:

			<<textbox "$PC.actualAge" $PC.actualAge "PC Body Intro">>

		<<set $PC.physicalAge = $PC.actualAge, $PC.visualAge = $PC.actualAge>>

		Older player characters start with more reputation and maintain reputation somewhat more easily, but have slightly less sexual energy.

		What is your name and alternate indulgence?

		Name your character: <<textbox "$PC.slaveName" $PC.slaveName "PC Body Intro">> (surname)
		<<if $PC.slaveSurname>>
			<<textbox "$PC.slaveSurname" $PC.slaveSurname "PC Body Intro">>
			<<link "Go by a single name">><<set $PC.slaveSurname = 0, $PC.birthSurname = "">><<goto "PC Body Intro">><</link>>
		<<else>>
			<<textbox "$PC.slaveSurname" "" "PC Body Intro">>
		<</if>>

		As with all text boxes in FC, press the enter key to commit your changes.

		Preferred refreshment: <<textbox "$PC.refreshment" $PC.refreshment "PC Body Intro">> [[Cigars|PC Body Intro][$PC.refreshment = "cigar",$PC.refreshmentType = 0]] | [[Whiskey|PC Body Intro][$PC.refreshment = "whiskey",$PC.refreshmentType = 1]]

		Preferred method of consumption:
		<<if $PC.refreshmentType == 0>>Smoked<<elseif $PC.refreshmentType == 1>>Drank<<elseif $PC.refreshmentType == 2>>Eaten<<elseif $PC.refreshmentType == 3>>Snorted<<elseif $PC.refreshmentType == 4>>Injected<<elseif $PC.refreshmentType == 5>>Popped<<elseif $PC.refreshmentType == 6>>Dissolved orally<</if>>.

	[[Smoked|PC Body Intro][$PC.refreshmentType = 0]] | [[Drank|PC Body Intro][$PC.refreshmentType = 1]] | [[Eaten|PC Body Intro][$PC.refreshmentType = 2]] | [[Snorted|PC Body Intro][$PC.refreshmentType = 3]] | [[Injected|PC Body Intro][$PC.refreshmentType = 4]] | [[Popped|PC Body Intro][$PC.refreshmentType = 5]] | [[Orally Dissolved|PC Body Intro][$PC.refreshmentType = 6]]

		Flavor only; no mechanical effect. If entering a custom refreshment, please assign proper usage.
		<<if $PC.refreshmentType == 0>>"Smoke" must fit into the following sentence: "I smoked a $PC.refreshment" to fit events properly
		<<elseif $PC.refreshmentType == 5>>"Popped" must fit into the following sentence: "I shook the bottle of $PC.refreshment" to fit events properly
		<<elseif $PC.refreshmentType == 6>>"Orally Dissolved" must fit into the following sentence: "I placed a tab of $PC.refreshment under my tongue" to fit events properly
		<</if>>

	<<if $PC.vagina != -1>>
		[[Confirm player character customization|PC Preg Intro]]
	<<else>>
		[[Confirm player character customization|PC Appearance Intro]]
	<</if>>


code:
:: PC Experience Intro [nobr]

<<if $PC.career == "arcology owner">>
	<<goto "PC Rumor Intro">>
<<else>>

		You're a relative unknown in the Free Cities, but it's clear you're already accomplished. The meek and average cannot aspire to acquire arcologies. You've got all the necessary skills to take over an arcology and succeed as its owner, but you should be able to leverage the skills and experience you retain from your past, too.

			What career brought you to the Free Cities?

		[[Idle wealth|PC Rumor Intro][$PC.career = "wealth"]]

		Start with extra money.
		<<if $showSecExp == 1>>
			However, you will find it @@.red;harder to maintain authority,@@ but propaganda hub upgrades will be cheaper.
		<</if>>
		Your starting slaves will have two free levels of @@.cyan;sex skills@@ available.

		[[Venture capitalism|PC Rumor Intro][$PC.career = "capitalist"]]

		You will be more @@.green;effective at business pursuits.@@
		<<if $showSecExp == 1>>
			In addition, propaganda hub upgrades will be cheaper.
		<</if>>
		Your starting slaves will have a free level of @@.cyan;prostitution skill@@ available.

		[[Private military work|PC Rumor Intro][$PC.career = "mercenary"]]

		You retain mercenary contacts
		<<if $showSecExp == 1>>
			and your security skills will make it @@.green;easier to keep the arcology safe.@@ Also, security HQ upgrades will be cheaper.
		<<else>>
			and security skills.
		<</if>>
		Your starting slaves will have @@.green;free trust available.@@

		[[Slaving|PC Rumor Intro][$PC.career = "slaver"]]

		Your slave breaking experience will be useful.
		<<if $showSecExp == 1>>
			You will find that authority will be @@.green;easier to maintain@@ and security HQ upgrades will be cheaper.
		<</if>>
		Your starting slaves will have free @@.hotpink;devotion@@ available.

		[[Arcology engineering|PC Rumor Intro][$PC.career = "engineer"]]

		Upgrading the arcology will be cheaper. Also, the arcology will start with basic economic upgrades already installed.

		[[Slave surgery|PC Rumor Intro][$PC.career = "medicine"]]

		Surgery will be cheaper and @@.green;healthier@@ and drug upgrades will be cheaper. Your starting slaves will have free implants available.

		[[Minor celebrity|PC Rumor Intro][$PC.career = "celebrity"]]

		Start with @@.green;extra reputation.@@
		<<if $showSecExp == 1>>
			In addition, propaganda hub upgrades will be cheaper.
		<</if>>
		Your starting slaves will have a free level of @@.cyan;entertainment skill@@ available.

		[[High class escort|PC Rumor Intro][$PC.career = "escort"]]

		As an ex-whore, you will find it @@.red;hard to maintain reputation@@<<if $showSecExp == 1>>, @@.red;in addition to authority@@<</if>>.
		Your starting slaves will have a free level of @@.cyan;sex skills@@ available, along with a free level of @@.cyan;entertainment and prostitution.@@

		[[Servant|PC Rumor Intro][$PC.career = "servant"]]

		As an ex-servant, you will find it @@.red;hard to maintain reputation@@<<if $showSecExp == 1>>, @@.red;in addition to authority@@<</if>>.
		You know how to lower your upkeep, but @@.red;not much else.@@ Your starting slaves will have free @@.mediumaquamarine;trust@@ and @@.hotpink;devotion.@@

		[[Gang Leader|PC Rumor Intro][$PC.career = "gang"]]

		As an ex-gang leader, you know how to haggle slaves.
		<<if $showSecExp == 1>>
			In addition, asserting your authority @@.green;will be easier@@ and security HQ upgrades will be cheaper.
		<</if>>
		However, you will @@.red;find reputation quite hard@@ to maintain. Your starting slaves will be @@.green;fitter@@ and possess a free level of @@.cyan;combat skill.@@

		[[Incursion Specialist|PC Rumor Intro][$PC.career = "BlackHat"]]

		As an ex-hacker for hire, you know how to gain access computer systems and other devices. @@.green;Certain upgrades will be cheaper@@ and you may find alternative approaches to problems.
		<<if $showSecExp == 1>>
			However, you will @@.red;find authority quite hard@@ to maintain.
		<</if>>
		Your starting slaves will have a free level of @@.cyan;intelligence@@.

<</if>>

	<<if $showSecExp == 1>>
		<<link "Hide Security Expansion Mod effects" "PC Experience Intro">>
			<<set $showSecExp = 0>>
		<</link>>
	<<else>>
		<<link "Show Security Expansion Mod effects" "PC Experience Intro">>
			<<set $showSecExp = 1>>
		<</link>>
	<</if>>


code:
:: PC Preg Intro [nobr]

	You have a working female reproductive system, and thus, a menstrual cycle. Women already face hardships as slaveowners and arcology owners, and being with child, coupled with a strong societal aversion to the dominant being penetrated, leads most pregnant owners to find themselves in dire situations. As an added precaution, since nothing stops an owner from hooking up with another owner, contraceptives are common amongst free women.

	What's your stance on taking contraceptives?

	You're
	<<if $PC.preg == -1>>
		not interested in being a mother.
		[[Risky|PC Preg Intro][$PC.preg = 0]]
	<<elseif $PC.preg == 0>>
		fertile and you know the risks.
		[[Safe|PC Preg Intro][$PC.preg = -1]] | [[About that...|PC Preg Intro][$PC.preg = 10]]
	<<elseif $PC.preg > 42>>
		proudly pregnant with octuplets and they are coming right now.
		[[Not pregnant|PC Preg Intro][$PC.preg = 0, $PC.pregType = 0, $PC.labor = 0]]
	<<elseif $PC.preg > 37>>
		<<print $PC.preg>> weeks pregnant and very close to being due.
		[[Not pregnant|PC Preg Intro][$PC.preg = 0, $PC.pregType = 0]]
		| [[Overdid the fertility agents|PC Preg Intro][$PC.preg = 43, $PC.pregType = 8, $PC.labor = 1]]
	<<else>>
		already pregnant.
		[[Fertile|PC Preg Intro][$PC.preg = 0]]
		| [[Make that very pregnant|PC Preg Intro][$PC.preg = 40]]
	<</if>>

		Being or becoming pregnant will raise difficulty.

	Hormones can be an interesting thing, but how do they affect you?

	You're
	<<if $PC.pregMood == 1>>
		gentle and motherly when you're hormonal.
		[[Normal|PC Preg Intro][$PC.pregMood = 0]] | [[Aggressive|PC Preg Intro][$PC.pregMood = 2]]
	<<elseif $PC.pregMood == 0>>
		in complete control of yourself.
		[[Motherly|PC Preg Intro][$PC.pregMood = 1]] | [[Aggressive|PC Preg Intro][$PC.pregMood = 2]]
	<<else>>
		aggressive and domineering when you're hormonal.
		[[Normal|PC Preg Intro][$PC.pregMood = 0]] | [[Motherly|PC Preg Intro][$PC.pregMood = 1]]
	<</if>>

		Hormone induced moods may alter some sex scenes, as well as change slaves' reactions to you.

	[[Confirm player character customization|PC Appearance Intro]]


code:
:: PC Rumor Intro [nobr]

<<unset $showSecExp>>

	Who you are is something that you will have to define for yourself through your actions. Once you own an arcology, no one will be in a position to apply moral scorekeeping to you. In the brave new world of the Free Cities, you will be free to define yourself as the sum of your actions, rather than as the product of your past. The first decision that will define who you are as an arcology owner is your choice of method in acquiring one.

		What approach will you take?

	[[A judicious application of funds|Takeover Target][$PC.rumor = "wealth"]]

	Start with extra money, since you were wealthy enough to buy an arcology.

	[[Hard work and diligence|Takeover Target][$PC.rumor = "diligence"]]

	New slaves will @@.hotpink;hate you less,@@ since it will be known that you worked hard to earn your position.

	[[The remorseless use of force|Takeover Target][$PC.rumor = "force"]]

	New slaves @@.gold;will fear you more,@@ since rumors about your violent takeover will inevitably circulate.

	[[Clever social engineering|Takeover Target][$PC.rumor = "social engineering"]]

	Start with the @@.green;first societal option unlocked,@@ since you manipulated the arcology's citizens.

	[[Blind luck|Takeover Target][$PC.rumor = "luck"]]

	Start with a @@.green;good reputation,@@ since the story of your unlikely accession will be famous.


code:
:: Slave Age Intro [nobr]

	Do you want to see content involving girls younger than 18 in this game?

	[[No.|PC Body Intro][$minimumSlaveAge = 18, $pedo_mode = 0]]

		All slaves will be at least 18 years old, and slavery of children will be illegal in the Free Cities.

	Yes, I wish to see girls as young as <<textbox "$minimumSlaveAge" $minimumSlaveAge "PC Body Intro">> [[Continue|PC Body Intro][$pedo_mode = 0]]

	Yes, and [[I just want lots of lolis.|PC Body Intro][$minimumSlaveAge = 3, $pedo_mode = 1]]

		Nearly all randomly generated slaves will be under the age of 18, although custom slaves and slaves related to specific events may be older.

	Yes, [[I wish to see them grow up and become fertile.|PC Body Intro][$minimumSlaveAge = 3, $pedo_mode = 0, $precociousPuberty = 1, $loliGrow = 1, $fertilityAge = 10, $potencyAge = 12, $seeAge = 1]]

		Preset. Slaves' age will be random from minimal possible age. They can be made fertile younger than normal puberty age (10) in some cases, and grow up naturally.


code:
:: Takeover Target [nobr]

	Before you deploy the
	<<if $PC.rumor == "wealth">>
		financial reserves that
	<<elseif $PC.rumor == "diligence">>
		carefully constructed plan that
	<<elseif $PC.rumor == "force">>
		mercenaries and <<if $continent == "Europe">>//maskirovka//<<else>>cover plan<</if>> that
	<<elseif $PC.rumor == "social engineering">>
		clever social manipulation that
	<<else>>
		optimistic plan you hope
	<</if>>
	will allow you to take over an arcology, you need to select a target. There are a number of vulnerable arcologies that you could
	<<if $PC.rumor == "wealth">>
		attempt a hostile takeover of
	<<elseif $PC.rumor == "diligence">>
		work to take over
	<<elseif $PC.rumor == "force">>
		attack
	<<elseif $PC.rumor == "social engineering">>
		infiltrate
	<<else>>
		aspire to take over
	<</if>>
	with a reasonable chance of success. Free Cities are volatile places, even compared to the troubled state of the rest of the world. There are always arcologies whose owners are on the brink of failure, and you could target one of them.
	<<if $PC.career == "arcology owner">>(Since you've @@.springgreen;owned an arcology before,@@ you identify more potential target arcologies than a novice might.)<</if>>
	Alternatively, arcologies are being built every day, and their owners' control is often uncertain.

		Which arcology will you target?

[[A newly constructed arcology|Terrain Intro][$targetArcology.fs = "New"]]

	With many new arcologies being constructed, you will be able to select which area of the world and type of Free City you'd like your target arcology to be located in.

	Recommended for new players.

<<includeDOM App.Intro.generateEstablishedArcologies()>>


code:
:: Terrain Intro [nobr]

	The Free Cities are located wherever the rule of law is weak enough or permissive enough to allow a small area to secede, and where founders can afford to buy an area on which to build.

	Many Free Cities are therefore located in marginal, rural terrain. Founding a Free City in such an area is easy, and can usually be accomplished with the indifference or even connivance of the old country from which it secedes. After all, the potential commercial benefits are great, and the loss of underused land is only significant in the moral sense.

	Some Free Cities are located on water. Though some areas of shallow sea over the continental shelves hide valuable resources, others are neglected. Arcologies are such massive structures that it is very possible to design them to float anchored to the seabed.

	Finally, a few Free Cities have been carved out from old world cities. Urban decay has left the hearts of many cities ripe for this. Many old world countries resist this kind of secession, but this rarest, smallest, and densest kind of Free City can offer its surrounding nation a great deal of economic advantage.

	Which kind of Free City hosts your arcology?

	[[Urban|Location Intro][$terrain = "urban"]]

Low minimum slave value and initial bear market for slaves.

High ease of commerce with the old world.

High access to refugees and other desperate people.

Low cultural independence.

Unusually compact arcology with few manufacturing sectors.

	[[Rural|Location Intro][$terrain = "rural"]]

High minimum slave value and initial bull market for slaves.

Moderate ease of commerce with the old world.

Moderate access to refugees and other desperate people.

Moderate cultural independence.

Widespread arcology with many manufacturing sectors.

	[[Ravine|Location Intro][$terrain = "ravine"]]

High minimum slave value and initial bull market for slaves.

Low ease of commerce with the old world.

Very low access to refugees and other desperate people.

High cultural independence.

The arcology mostly being hidden inside the ravine leads to an unusual layout.

	[[Marine|Location Intro][$terrain = "marine"]]

Moderate minimum slave value and initially balanced market for slaves.

Moderate ease of commerce with the old world.

Low access to refugees and other desperate people.

High cultural independence.

Large amount of markets and an extra shop sector.

	[[Oceanic|Intro Summary][$terrain = "oceanic"]]

High minimum slave value and initial bull market for slaves.

Moderate ease of commerce with the old world.

Very low access to refugees and other desperate people.

Very high cultural independence.

This unique location attracts the wealthy leading to initial luxury apartments.

Ensures access to slaves from all over the world and will not associate the arcology with a continent.

	<<if $showSecExp == 1>>

Oceanic arcologies will not be subjects of attacks.

	<</if>>

	<<if $showSecExp == 1>>
		<<link "Hide Security Expansion Mod effects" "Terrain Intro">>
			<<set $showSecExp = 0>>
		<</link>>
	<<else>>
		<<link "Show Security Expansion Mod effects" "Terrain Intro">>
			<<set $showSecExp = 1>>
		<</link>>
	<</if>>


code:
:: Trade Intro [nobr]

	Most of the Free Cities are run on radically libertarian or even anarcho-capitalist principles. The first Free Cities experimented with indentured servitude, and this rapidly developed into widespread slavery. By now, the Free Cities collectively are a fundamentally slaveowning society and maintain a thriving slave trade that feeds off the terrible conditions in parts of the old world.

		What attitude have the old world countries generally taken towards this trade?

		[[They've turned a blind eye, or even been complicit.|Extreme Intro][$internationalTrade = 1]]

			Slaves from all across the world will appear.

		[[They've done what little they can to stop it.|Extreme Intro][$internationalTrade = 0]]

			Almost all slaves will be from the continent where the arcology is located.

		<<link "Reactions have been mixed.">>
			<<set $internationalTrade = 0, $customVariety = 1, $customWA = 1>>
			<<goto "Customize Slave Trade">>
		<</link>>

			This will bypass arcology location restrictions, allowing you to adjust the nationalities encountered when buying non-customizable slaves.


code:
:: JS Random Event [nobr]

<<set $nextButton = "Continue">>

<<run html5passage(n => $event.execute(n))>>


code:
/* Note that we use a much more strict delineation between individual and nonindividual events here than in the old event system.
 * Individual events always trigger for the chosen event slave, and the first actor is always the event slave.
 * Nonindividual events are not provided any event slave and should cast one themselves.
 */

/** get a list of possible individual event based on a given available main actor
 * @param {App.Entity.SlaveState} slave
 * @returns {Array<App.Events.BaseEvent>}
 */
App.Events.getIndividualEvents = function(slave) {
	return [
		// instantiate all possible random individual events here
		// example: new App.Events.TestEvent(),
		new App.Events.RESSLazyEvening(),
		new App.Events.RESSMuscles(),
		new App.Events.RESSHotPC(),
		new App.Events.RESSMoistPussy(),
		new App.Events.RESSWaistlineWoes(),
		new App.Events.RESSAssFitting(),
	]
	.filter(e => (e.eventPrerequisites().every(p => p()) && e.castActors(slave)))
	.reduce((res, cur) => res.concat(Array(cur.weight).fill(cur)), []);
};

/** get a list of possible nonindividual events
 * @returns {Array<App.Events.BaseEvent>}
 */
App.Events.getNonindividualEvents = function() {
	return [
		// instantiate all possible random nonindividual events here
		// example: new App.Events.TestEvent(),
		new App.Events.REDevotees(),
		new App.Events.RERelativeRecruiter(),
	]
	.filter(e => (e.eventPrerequisites().every(p => p()) && e.castActors(null)))
	.reduce((res, cur) => res.concat(Array(cur.weight).fill(cur)), []);
};

/* --- below here is a bunch of workaround crap because we have to somehow persist event selection through multiple twine passages. ---
 * eventually all this should go away, and we should use just one simple passage for both selection and execution, so everything can be kept in object form instead of being continually serialized and deserialized.
 * we need to be able to serialize/deserialize the active event anyway so that saves work right, so this mechanism just piggybacks on that capability so the event passages don't need to be reworked all at once
 */

/** get a stringified list of possible individual events as fake passage names - TODO: kill me */
App.Events.getIndividualEventsPassageList = function(slave) {
	const events = App.Events.getIndividualEvents(slave);
	return events.map(e => `JSRE ${e.eventName}:${JSON.stringify(e.toJSON())}`);
};

/** get a stringified list of possible individual events as fake passage names - TODO: kill me */
App.Events.getNonindividualEventsPassageList = function() {
	const events = App.Events.getNonindividualEvents();
	return events.map(e => `JSRE ${e.eventName}:${JSON.stringify(e.toJSON())}`);
};

/** execute a fake event passage from the embedded JSON - TODO: kill me */
App.Events.setGlobalEventForPassageTransition = function(psg) {
	V.event = JSON.parse(psg.slice(psg.indexOf(":") + 1));
};

/** strip the embedded JSON from the fake event passage so it can be read by a human being - TODO: kill me */
App.Events.printEventPassage = function(psg) {
	return psg.slice(0, psg.indexOf(":"));
};


code:
App.Events.REDevotees = class REDevotees extends App.Events.BaseEvent {
	eventPrerequisites() {
		return []; // always valid if sufficient actors can be cast successfully
	}

	actorPrerequisites() {
		const devoteeRequirements = [
			s => s.devotion > 50,
			canWalk,
			isSlaveAvailable
		];
		return [ // total of four actors, identical requirements for each
			devoteeRequirements,
			devoteeRequirements,
			devoteeRequirements,
			devoteeRequirements
		];
	}

	execute(node) {
		let devotees = this.actors.map(a => getSlave(a)); // for this event, they're fine as an array

		V.nextLink = "RIE Eligibility Check";

		App.Events.drawEventArt(node, devotees);

		const slaveList = devotees.map(s => s.slaveName).reduce((res, ch, i, arr) => res + (i === arr.length - 1 ? ' and ' : ', ') + ch);

		let t = [];
		t.push(`You have a mature, well-trained household of slaves. ${slaveList} are all devoted to you. There are all manner of ways you could display this coterie of loyal sex slaves to show off your wealth and power.`);
		App.Events.addParagraph(node, t);

		App.Events.addResponses(node, [
			new App.Events.Result("See an operetta with four attendants", opera),
			new App.Events.Result("Visit a casino in good company", casino),
		]);

		function opera() {
			PCTitle();
			let t = [];
			t.push(`You reserve a box at an upcoming operetta; classical Italian music is enjoying a renaissance these days. The doormen at the fashionable opera house promptly widen the velvet ropes so that you and your party may proceed unimpeded. Their quick thinking is necessary, since there are five of you walking sedately up the steps: you in the middle, impeccable in`);
			if (V.PC.title === 1) {
				t.push(`gentleman's evening wear, complete with gloves and cane;`);
			} else {
				t.push(`a fine and noble lady's tuxedo;`);
			}
			t.push(`and ${slaveList}, all dressed in the gorgeous fashion of the seventeenth century, all plunging necklines, piled hair, and ruffled petticoats. The splendid master of ceremonies clears his throat and announces in a sonorous voice, "${V.PCTitle}." The ostentation turns every head and catches every eye.`);
			for (const s of devotees) {
				repX(600, "event", s);
			}
			return t;
		}

		function casino() {
			let t = [];
			t.push(`The croupiers, bouncers and regulars down at the nearest casino hardly know what to think when you appear with a chit full of cash and twice as many partners as you have arms. You live the night big, starting at the poker table with so many tits and asses on display behind you that, baby, you make a killing. ${slaveList} quickly catch the rhythm of the place: slaves can get away with a little more in the smoky, whiskey soaked, money tinted atmosphere, and they enjoy themselves immensely. They flirt, flash, giggle, kiss each other, and generally destroy the concentration of everyone within twenty ${V.showInches === 2 ? "yards" : "meters"} — except you. Ring-a-ding-ding.`);
			const _cashX = random(30, 100)*3;
			for (const s of devotees) {
				cashX(_cashX, "event", s);
				s.devotion += 4;
			}
			return t;
		}
	}
};


code:
App.Events.RERelativeRecruiter = class RERelativeRecruiter extends App.Events.BaseEvent {
	eventPrerequisites() {
		return []; // always valid if sufficient actors can be cast successfully
	}

	actorPrerequisites() {
		return [
			[ // first actor - recruiter
				s => s.fetish !== "mindbroken",
				s => s.fuckdoll === 0,
				s => s.devotion > 50,
				canWalk, /* TODO: not sure why this requirement exists */
				s => s.canRecruit === 1 && (totalRelatives(s) === 0 || V.limitFamilies !== 1),
				s => this._chooseTargetRelative(s)
			]
		];
	}

	/** pick a target relative and store it in the event parameters
	 * @param {App.Entity.SlaveState} slave who's doing the recruiting (should be first actor)
	 * @returns {boolean} success or failure
	 */
	_chooseTargetRelative(slave) {
		// make sure the slave has a genepool entry (everyone should)
		const gp = V.genePool.find(s => s.ID === slave.ID);
		if (!gp) {
			console.log(`Slave with ID ${slave.ID} is missing her genepool entry.`);
			slave.canRecruit = 0;
			return false;
		}
		const choices = this._getTargetRelativeChoices(slave);
		if (choices.length === 0) {
			slave.canRecruit = 0; // slave has exhausted possible relatives, can't recruit any longer
			return false;
		}
		this.params.relative = choices.random();
		return true;
	}

	/** find all eligible target relatives for a slave; one will be selected randomly (or by cheating)
	 * @param {App.Entity.SlaveState} slave who's doing the recruiting (should be first actor)
	 * @returns {string[]}
	 */
	_getTargetRelativeChoices(slave) {
		let recruit = [];

		const pushWeight = (value, weight=1) => recruit.push(...Array(weight).fill(value));

		if (slave.mother === 0 && slave.actualAge < 24 && V.seeDicks !== 100) {
			pushWeight("mother", 3);
		}
		if (slave.father === 0 && slave.actualAge < 24 && V.seeDicks !== 0) {
			pushWeight("father");
		}

		// TODO: age/fertility/virginity/potency should probably be checking genepool, not current state, since the child would have been born before the event slave was in your possession
		if (slave.daughters < 3 && (slave.actualAge > V.minimumSlaveAge + V.fertilityAge) && isFertile(slave) && slave.trueVirgin !== 1) {
			if (V.seeDicks !== 100) {
				pushWeight("daughter", 2);
			}
			if (V.seeDicks !== 0) {
				pushWeight("son");
			}
		} else if (slave.daughters < 3 && (slave.actualAge > V.minimumSlaveAge + V.potencyAge) && slave.balls > 0) {
			if (V.seeDicks !== 100) {
				pushWeight("daughter", 2);
			}
			if (V.seeDicks !== 0) {
				pushWeight("son");
			}
		}

		if (slave.sisters < 3) {
			if (slave.actualAge < V.retirementAge - 2) {
				if (V.seeDicks !== 100) {
					pushWeight("older sister", 2);
				}
				if (V.seeDicks !== 0) {
					pushWeight("older brother", 2);
				}
			}
			if (slave.actualAge > V.minimumSlaveAge + 1) {
				if (V.seeDicks !== 100) {
					pushWeight("younger sister", 2);
				}
				if (V.seeDicks !== 0) {
					pushWeight("younger brother", 2);
				}
			}
			pushWeight("twin");
		}

		return recruit;
	}

	/** returns a description for a given background
	 * @param {App.Entity.SlaveState} slave (relative)
	 * @param {string} background
	 * @returns {string} description
	 */
	_getBackgroundDescription(slave, background) {
		const {His, he, his} = getPronouns(slave);
		const backgroundDescriptions = {
			"prostitute": `${he} was used as a prostitute by ${his} previous owner`,
			"shemale prostitute": `${he} was used as a shemale prostitute by ${his} previous owner`,
			"bed MILF": `${he} was used as a bed slave by ${his} MILF-loving owner`,
			"gelded servant": `${he} was gelded and used as a house servant`,
			"sex toy": `${he} was kept as a personal sex toy by ${his} previous owner`,
			"flat toy": `${he} was kept as a bedslave by an owner that loves flat chests`,
			"bimbo toy": `${he} was kept as a personal toy by ${his} bimbo-loving owner`,
		};
		if (backgroundDescriptions[background]) {
			return `${His} listing states that ${backgroundDescriptions[background]}.`;
		}
		return ``; // twin, for example, has no specific background
	}

	/** returns the possible backgrounds for a given relative type; one will be selected randomly (or by cheating)
	 * Currently super simple (returns exactly one element) to emulate the old twine event, but may easily be expanded if more backgrounds are written
	 * @param {string} relative
	 * @returns {string[]}
	 */
	_getRelativeBackgrounds(relative) {
		let bgs = [];
		const pushWeight = (value, weight=1) => bgs.push(...Array(weight).fill(value));

		if (relative === "daughter") {
			pushWeight("prostitute");
		} else if (relative === "son") {
			pushWeight("shemale prostitute");
		} else if (relative === "mother") {
			pushWeight("bed MILF");
		} else if (relative === "father") {
			pushWeight("gelded servant");
		} else if (relative === "older sister" || relative === "older brother") {
			pushWeight("sex toy");
		} else if (relative === "younger sister") {
			pushWeight("flat toy");
		} else if (relative === "younger brother") {
			pushWeight("bimbo toy");
		} else if (relative === "twin") {
			pushWeight("twin");
		}
		return bgs;
	}

	execute(node) {
		const [eventSlave] = this.actors.map(a => getSlave(a));
		const {He, he, his} = getPronouns(eventSlave);

		V.nextLink = "RIE Eligibility Check";

		let artDiv = document.createElement("div"); // named container so we can replace it later
		App.Events.drawEventArt(artDiv, eventSlave);
		node.appendChild(artDiv);

		// pick a random background for the selected relative
		this.params.background = this._getRelativeBackgrounds(this.params.relative).random();

		let _this = this; // fuck javascript's halfassed classes
		let cost = 0; // will be filled out later

		let cheatDiv = App.UI.DOM.makeElement("div", (V.cheatMode === 1) ? cheatModeSelectors() : '');
		node.appendChild(cheatDiv);

		let eventTextDiv = App.UI.DOM.makeElement("div", eventText());
		node.appendChild(eventTextDiv);

		/** produce the event text and response links.  might be regenerated by changing slave selection in cheat mode
		 * @returns {DocumentFragment}
		 */
		function eventText() {
			let frag = document.createDocumentFragment();

			V.activeSlave = makeSlave();
			cost = slaveCost(V.activeSlave);
			const {He: He2, him: him2, his: his2, he: he2, daughter: daughter2, sister: sister2} = getPronouns(V.activeSlave);

			const {title: Master} = getEnunciation(eventSlave);

			let t = [];
			t.push(App.UI.DOM.slaveDescriptionDialog(eventSlave));
			t.push(`requests an interview with you. ${He}'s a devoted slave, and you grant it, and are happy you did when you see the troubled expression on ${his} face. ${He} explains`);
			if (!canTalk(eventSlave)) {
				t.push("with desperate gestures");
			}
			t.push(`that`);
			switch (_this.params.relative) {
				case "daughter":
				case "son":
					t.push(`${he} had a ${daughter2}, who was sent to the slave orphanages. ${He}'s heard a rumor through other slaves that ${his} ${daughter2} will go up for sale soon.`);
					break;
				case "mother":
				case "father":
					t.push(`${his} ${_this.params.relative} might be getting sold soon. ${He2} has been a slave for some time. ${He}'s heard a rumor through other slaves that ${his} ${_this.params.relative} will go up for sale soon.`);
					break;
				case "older sister":
				case "older brother":
					t.push(`${his} older ${sister2} is being sold. ${He2} was likely to be enslaved the last ${eventSlave.slaveName} knew of ${him2}, and now ${he}'s heard a rumor through other slaves that ${his} big ${sister2} is going to be sold to a new owner.`);
					break;
				case "younger sister":
				case "younger brother":
					t.push(`${his} younger ${sister2} is being sold. ${He2} was likely to be enslaved the last ${eventSlave.slaveName} knew of ${him2}, and now ${he}'s heard a rumor through other slaves that ${his} little ${sister2} is going to be sold to a new owner.`);
					break;
				case "twin":
					t.push(`${he} has a twin ${sister2}, who was still free the last ${eventSlave.slaveName} knew of ${him2}. ${He}'s heard a rumor through other slaves that ${his} twin has finally been enslaved, and will soon go up for sale.`);
					break;
				default:
					throw `Unknown relative type: ${_this.params.relative}`;
			}

			if (!canTalk(eventSlave)) {
				t.push(`${He} urgently gestures for permission to write. It's unusual, but ${he} seems quite serious, so you grant it. ${He} writes,`);
			}
			t.push(Spoken(eventSlave, `"You've been so good to me, ${Master}. I'm sure ${he2} looks like I did when you bought me. Please, ${Master}, will you buy ${V.activeSlave.slaveName} like you bought me? I'm afraid ${he2}'ll go to a cruel master."`));
			t.push(`${He} bites ${his} lip.`);
			t.push(Spoken(eventSlave, `"And, ${Master}, I'm sure ${he2}'d learn to love`));

			if (eventSlave.fetish === "cumslut") {
				t.push(Spoken(eventSlave, `the taste of your cum`));
			} else if (eventSlave.fetish === "submissive") {
				t.push(Spoken(eventSlave, `submission`));
			} else if (eventSlave.fetish === "humiliation") {
				t.push(Spoken(eventSlave, `being treated like a dirty slut`));
			} else if (eventSlave.fetish === "buttslut") {
				t.push(Spoken(eventSlave, `the feeling of your cock in ${his2} butt`));
			} else if (eventSlave.fetish === "sadist") {
				t.push(Spoken(eventSlave, `hurting your other slaves`));
			} else if (eventSlave.fetish === "pregnancy" && V.activeSlave.genes !== "XY") {
				t.push(Spoken(eventSlave, `being pregnant`));
			} else if (eventSlave.fetish === "masochist") {
				t.push(Spoken(eventSlave, `being beaten`));
			} else if (eventSlave.fetish === "dom") {
				t.push(Spoken(eventSlave, `fucking your other slaves`));
			} else if (eventSlave.energy > 95) {
				t.push(Spoken(eventSlave, `being a good nympho slut`));
			} else if (eventSlave.addict > 2) {
				t.push(Spoken(eventSlave, `being a druggie whore`));
			} else if (eventSlave.counter.birthsTotal > 3 && V.activeSlave.genes !== "XY") {
				t.push(Spoken(eventSlave, `bearing children`));
			} else if (eventSlave.bellyPreg >= 50 && eventSlave.pregKnown === 1 && V.activeSlave.genes !== "XY") {
				t.push(Spoken(eventSlave, `swelling with life`));
			} else if (eventSlave.anus > 2) {
				t.push(Spoken(eventSlave, `getting ${his2} butt stretched out`));
			} else if (eventSlave.boobsImplant > 500) {
				t.push(Spoken(eventSlave, `getting turned into a bimbo slut`));
			} else {
				t.push(Spoken(eventSlave, `the feeling of your cock in ${him2}`)); /* TODO: assumes PC has cock!? */
			}
			t.push(Spoken(eventSlave, `as much as I do.`));

			if (eventSlave.fetish === "cumslut") {
				t.push(Spoken(eventSlave, `We could blow you at the same time, ${Master}! And share cum!"`));
			} else if (eventSlave.fetish === "submissive") {
				t.push(Spoken(eventSlave, `You could use us together, ${Master}!"`));
			} else if (eventSlave.fetish === "humiliation") {
				t.push(Spoken(eventSlave, `You could make us fuck each other in public, ${Master}!"`));
			} else if (eventSlave.fetish === "buttslut") {
				t.push(Spoken(eventSlave, `You could fuck our butts right next to each other, ${Master}!"`));
			} else if (eventSlave.fetish === "pregnancy" && V.activeSlave.genes !== "XY") {
				t.push(Spoken(eventSlave, `You could knock us up next to each other, ${Master}!"`));
			} else if (eventSlave.fetish === "sadist") {
				t.push(Spoken(eventSlave, `I'm sure ${he2}'d love to help me, ${Master}!"`));
			} else if (eventSlave.fetish === "masochist") {
				t.push(Spoken(eventSlave, `You could whip us both, ${Master}!"`));
			} else if (eventSlave.fetish === "dom") {
				t.push(Spoken(eventSlave, `I'm sure ${he2}'d love to help me use other slaves, ${Master}!"`));
			} else if (eventSlave.energy > 95) {
				t.push(Spoken(eventSlave, `I'm sure ${he2}'d love to have threesomes, ${Master}!"`));
			} else if (eventSlave.counter.birthsTotal > 3 && V.activeSlave.genes !== "XY") {
				if (V.PC.dick !== 0) {
					t.push(Spoken(eventSlave, `We could compete over who carried more of your children, ${Master}!"`));
				} else {
					t.push(Spoken(eventSlave, `We could compete over who carried more children for you, ${Master}!"`));
				}
			} else if (eventSlave.bellyPreg >= 50 && eventSlave.pregKnown === 1 && V.activeSlave.genes !== "XY") {
				t.push(Spoken(eventSlave, `You could compare how big our bellies are next to each other, ${Master}!"`));
			} else {
				t.push(Spoken(eventSlave, `You could fuck us together, ${Master}!"`));
			}

			t.push(`${He} waits anxiously for your decision.`);
			App.Events.addParagraph(frag, t);

			t = [];
			t.push(`You look up the ${_this.params.relative}. ${He2} costs ${cashFormat(cost)}, a bargain, but you won't be able to inspect ${him2} beyond his likely resemblance to ${eventSlave.slaveName}.`);
			t.push(_this._getBackgroundDescription(V.activeSlave, _this.params.background));
			App.Events.addParagraph(frag, t);

			App.Events.addResponses(frag, [
				new App.Events.Result(`Buy ${him2}`, buySlave),
			]);

			return frag;
		}

		/** fill in the relationship/background selectors for cheat mode
		 * @returns {DocumentFragment}
		 */
		function cheatModeSelectors() {
			const refreshCallback = (effect) => { effect(); $(cheatDiv).empty().append(cheatModeSelectors); $(eventTextDiv).empty().append(eventText); };

			let relativeTypeLinks = _.uniq(_this._getTargetRelativeChoices(getSlave(_this.actors[0]))).map((choice) =>
					App.UI.DOM.link(choice, refreshCallback, [() => { _this.params.relative = choice; _this.params.background = _this._getRelativeBackgrounds(choice).random(); }])
				);
			let backgroundTypeLinks = _.uniq(_this._getRelativeBackgrounds(_this.params.relative)).map((choice) =>
					App.UI.DOM.link(choice, refreshCallback, [() => { _this.params.background = choice; }])
				);

			let frag = document.createDocumentFragment();
			$(frag).append(
				`Relative Type: <strong>${_this.params.relative}</strong> `, App.UI.DOM.generateLinksStrip(relativeTypeLinks),
				"<br>",
				`Background: <strong>${_this.params.background}</strong> `, App.UI.DOM.generateLinksStrip(backgroundTypeLinks)
			);
			return frag;
		}

		/** make the target relative slave
		 * @returns {App.Entity.SlaveState}
		 */
		function makeSlave() {
			/** @param {App.Entity.SlaveState} slave */
			function clearMods(slave) {
				slave.ageImplant = 0;
				slave.boobsImplant = 0;
				slave.boobsImplantType = "none";
				slave.buttImplant = 0;
				slave.buttImplantType = "none";
				slave.earImplant = 0;
				slave.faceImplant = 0;
				slave.hipsImplant = 0;
				slave.lipsImplant = 0;
				slave.shouldersImplant = 0;
				slave.voiceImplant = 0;
				slave.areolaePiercing = 0;
				slave.anusPiercing = 0;
				slave.clitPiercing = 0;
				slave.corsetPiercing = 0;
				slave.dickPiercing = 0;
				slave.earPiercing = 0;
				slave.eyebrowPiercing = 0;
				slave.lipsPiercing = 0;
				slave.navelPiercing = 0;
				slave.nipplesPiercing = 0;
				slave.nosePiercing = 0;
				slave.tonguePiercing = 0;
				slave.vaginaPiercing = 0;
				slave.anusTat = 0;
				slave.armsTat = 0;
				slave.backTat = 0;
				slave.bellyTat = 0;
				slave.boobsTat = 0;
				slave.buttTat = 0;
				slave.dickTat = 0;
				slave.lipsTat = 0;
				slave.legsTat = 0;
				slave.shouldersTat = 0;
				slave.stampTat = 0;
				slave.vaginaTat = 0;
				if (slave.nipples === "fuckable") {
					slave.nipples = either("cute", "inverted", "partially inverted", "puffy");
				}
			}

			function relativeOrigin() {
				switch (_this.params.relative) {
					case "mother":
					case "father":
						return "$He was recruited into your service by $his child.";
					case "son":
					case "daughter":
						return "$He was recruited into your service by $his parent.";
					case "younger brother":
					case "younger sister":
						return "$He was recruited into your service by $his older sibling.";
					case "older brother":
					case "older sister":
						return "$He was recruited into your service by $his younger sibling.";
					case "twin":
						return "$He was recruited into your service by $his twin.";
				}
				throw `Unknown relative type: ${_this.params.relative}`;
			}

			/** @param {App.Entity.SlaveState} slave */
			function applyBackground(slave) {
				function applyProstitute() { // assumes XX
					slave.boobsImplant = 600;
					slave.boobsImplantType = "normal";
					slave.boobs += slave.boobsImplant;
					slave.skill.oral += random(30, 50);
					slave.skill.vaginal += random(30, 50);
					slave.skill.anal += random(30, 50);
					slave.skill.entertainment += random(0, 20);
					slave.skill.whoring += random(30, 50);
					slave.nipplesPiercing = 1;
					slave.lipsPiercing = 1;
					slave.tonguePiercing = 1;
					slave.vaginaPiercing = 1;
					slave.earPiercing = 1;
					slave.makeup = 1;
					slave.nails = 4;
					slave.hStyle = either("luxurious", "neat", "tails", "up");
					slave.stampTat = "advertisements";
				}

				function applyShemaleWhore() { // assumes XY
					slave.vagina = random(1, 2);
					slave.boobsImplant = 600;
					slave.boobsImplantType = "normal";
					slave.boobs += slave.boobsImplant;
					slave.skill.oral += random(30, 50);
					slave.skill.vaginal += random(30, 50);
					slave.skill.anal += random(30, 50);
					slave.skill.entertainment += random(0, 20);
					slave.skill.whoring += random(30, 50);
					slave.lips = random(60, 90);
					slave.lipsImplant = 40;
					slave.lipsPiercing = 1;
					slave.tonguePiercing = 1;
					slave.vaginaPiercing = 1;
					slave.earPiercing = 1;
					slave.makeup = 1;
					slave.nails = 4;
					slave.hStyle = "tails";
					slave.stampTat = "advertisements";
				}

				function applyBedMILF() { // assumes XX
					slave.anus = 1;
					slave.vagina = 3;
					if (V.seePreg !== 0) {
						slave.preg = random(5, 39);
						slave.pregType = 1;
						slave.pregKnown = 1;
						slave.pregSource = 0;
						slave.pregWeek = slave.preg;
						SetBellySize(slave);
					}
					slave.weight = random(30, 135);
					slave.muscles = random(0, 15);
					slave.skill.oral = 15;
					slave.skill.vaginal = 30;
					slave.skill.anal = 15;
					slave.skill.entertainment = 10;
					slave.skill.whoring = 10;
					slave.boobs = (random(12, 20)*100);
					slave.butt = random(4, 6);
					slave.boobShape = "saggy";
					slave.lactation = 1;
					slave.lactationDuration = 2;
					slave.markings = "birthmark";
					slave.hLength = random(50, 100);
					slave.hStyle = either("bun", "luxurious", "neat", "up");
					slave.voice = 2;
					slave.counter.birthsTotal = 5;
					slave.bellySag = 4;
					slave.bellySagPreg = 4;
					slave.energy = 65;
					slave.bellyTat = "a heart";
				}

				function applyGeldedServant() { // assumes XY
					slave.anus = 2;
					slave.weight = random(70, 180);
					slave.skill.oral = 35;
					slave.skill.anal = 75;
					slave.hLength = random(10, 20);
					slave.hStyle = either("buzzcut", "long", "neat", "trimmed");
					slave.voice = 1;
					slave.energy = 0;
					slave.balls = 0;
				}

				function applySexToy() { // either sex
					slave.tonguePiercing = 1;
					slave.makeup = 1;
					if (slave.balls < 4 && slave.balls > 0) {
						slave.balls = 4;
						slave.scrotum = slave.balls;
					}
					if (slave.dick < 5 && slave.dick > 0) {
						slave.dick = 5;
					}
					if (slave.vagina > -1) {
						slave.vagina = 2;
					}
				}

				function applyFlatToy() { // either sex
					slave.boobs = Math.min(slave.boobs, (random(1, 4)*100));
					slave.butt = random(1, 2);
					slave.hips = random(-2, 0);
					slave.shoulders = random(-2, 0);
					slave.skill.entertainment += random(0, 20);
					if (slave.vagina > -1) {
						slave.anus = 0;
						slave.vagina = 1;
					} else {
						slave.anus = 1;
					}
				}

				function applyBimboToy() { // either sex
					slave.boobsImplant = (random(20, 40)*100);
					slave.boobsImplantType = "string";
					slave.boobs += slave.boobsImplant;
					slave.buttImplant = random(5, 7);
					slave.buttImplantType = "string";
					slave.butt += slave.buttImplant;
					slave.lipsImplant = random(60, 80);
					slave.lips = Math.clamp(slave.lips + slave.lipsImplant, 0, 100);
					slave.nipplesPiercing = 2;
					if (slave.vagina > -1) {
						slave.vagina = 3;
					}
					slave.anus = 3;
					slave.makeup = 3;
					slave.nails = 5;
					slave.skill.anal = 70;
					slave.skill.oral = 70;
					slave.skill.whoring = 100;
					slave.energy = 100;
					slave.skill.entertainment += random(0, 20);
				}

				function applyTwin() {
					// no changes for this case
				}

				const backgroundDispatch = {
					"prostitute": applyProstitute,
					"shemale prostitute": applyShemaleWhore,
					"bed MILF": applyBedMILF,
					"gelded servant": applyGeldedServant,
					"sex toy": applySexToy,
					"flat toy": applyFlatToy,
					"bimbo toy": applyBimboToy,
					"twin": applyTwin
				};
				backgroundDispatch[_this.params.background]();
			}

			/** @param {App.Entity.SlaveState} slave */
			function applyCommon(slave) {
				slave.devotion = random(25, 45);
				slave.trust = random(-15, 15);
				slave.oldDevotion = slave.devotion;
				slave.oldTrust = slave.trust;
				configureLimbs(slave, "all", 1, true);
				slave.career = "a slave";
				setHealth(slave, jsRandom(20, 40));
				slave.skill.combat = 0;
				slave.addict = 0;
				slave.chem = 0;
				slave.weekAcquired = V.week;
				randomizeAttraction(slave); // already randomized by generateRelatedSlave, but energy might have changed, so do it again
			}

			const origSlave = BaseSlave();
			Object.assign(origSlave, V.genePool.find(s => s.ID === getSlave(_this.actors[0]).ID));

			const newSlave = generateRelatedSlave(origSlave, _this.params.relative);
			clearMods(newSlave);
			newSlave.origin = relativeOrigin();
			applyBackground(newSlave);
			if (_this.params.relative === "mother") {
				newSlave.counter.birthsTotal += V.slaves.reduce((acc, cur) => acc + (sameDad(eventSlave, cur) ? 1 : 0), 0);
			}
			applyCommon(newSlave);
			return newSlave;
		}

		function buySlave() {
			// kill the cheat div (no going back now!)
			$(cheatDiv).empty();

			// the new slave is already set up to be related to the exising slave, but we're responsible for making sure the existing slave (and any others in our stable) gets *their* relatives set correctly
			switch (_this.params.relative) {
				case "mother": {
					eventSlave.mother = V.activeSlave.ID;
					for (const slave of V.slaves) {
						if (sameDad(eventSlave, slave) && slave.mother === 0) {
							slave.mother = V.activeSlave.ID;
						}
					}
					break;
				}
				case "father": {
					eventSlave.father = V.activeSlave.ID;
					for (const slave of V.slaves) {
						if (sameMom(eventSlave, slave) && slave.father === 0) {
							slave.father = V.activeSlave.ID;
						}
					}
					break;
				}
				case "older sister":
				case "younger sister":
				case "older brother":
				case "younger brother":
				case "twin": { // siblings
					if (eventSlave.father === 0 && eventSlave.mother === 0) {
						setMissingParents(eventSlave);
						V.activeSlave.mother = eventSlave.mother;
						V.activeSlave.father = eventSlave.father;
					} else if (eventSlave.father === 0) {
						setMissingParents(eventSlave);
						V.activeSlave.father = eventSlave.father;
						for (const slave of V.slaves) {
							if (sameMom(eventSlave, slave) && slave.father === 0) {
								slave.father = eventSlave.father;
							}
						}
					} else if (eventSlave.mother === 0) {
						setMissingParents(eventSlave);
						V.activeSlave.mother = eventSlave.mother;
						for (const slave of V.slaves) {
							if (sameDad(eventSlave, slave) && slave.mother === 0) {
								slave.mother = eventSlave.mother;
							}
						}
					}
					break;
				}
				default: // nothing needed for son/daughter
			}

			cashX(forceNeg(cost), "slaveTransfer", V.activeSlave);

			// replace slave art
			$(artDiv).empty();
			App.Events.drawEventArt(artDiv, [V.activeSlave, eventSlave]);

			const {he: he2} = getPronouns(V.activeSlave);

			let elements = [];
			elements.push(`You complete the legalities and biometric scanning quickly and without fuss. ${V.activeSlave.slaveName} arrives shortly. The two slaves remember each other only dimly — they parted a long time ago — but they embrace. The devoted ${SlaveTitle(eventSlave)} explains the situation and encourages ${his} ${_this.params.relative} to be a good slave to you. ${V.activeSlave.slaveName} looks a little fearful but clearly realizes that ${he2}'s lucky to be here.`);

			V.eventSlave = eventSlave; // New Slave Intro uses global $eventSlave, so set it here
			elements.push(App.UI.DOM.renderPassage("New Slave Intro"));

			return elements;
		}
	}
};