code:
:: Neighbors FS Adoption [nobr]

'' $arcologies[$i].name'', your <<if $arcologies[$i].direction == 0>>arcology<<else>>neighbor to the $arcologies[$i].direction<</if>>,
is prosperous enough that
<<switch $arcologies[$i].government>>
<<case "elected officials">>
	its elected officials consider
<<case "a committee">>
	the committee that controls it considers
<<case "an oligarchy" "your trustees">>
	its leading citizens consider
<<case "an individual">>
	its owner and its citizens consider
<<case "your agent">>
	@@.deeppink;your agent@@ and its citizens consider
<<case "a corporation">>
	its board of directors considers
<<default>>
	its citizens consider
<</switch>>
societal development.
<<set _adopted = 0>>

<<set _validFSes = FutureSocieties.validAdoptions($i)>>

/* PRIME RIVALRY FS ADOPTION - IGNORES VALIDITY */

<<if $arcologies[$i].rival == 1>>
<<if $arcologies[$i].government == "an individual">>
<<if $rivalryFSAdopted == 0>>

	<<set $rivalryFSAdopted = 1>>
	<<set $desc = "Its owner is">>
	<<switch $rivalryFS>>
	<<case "Racial Subjugationism">>
		<<if $arcologies[$i].FSSubjugationist != "unset">><<set $arcologies[$i].FSSubjugationist = "unset">><</if>>
		$desc preoccupied by belief in the superiority of the $arcologies[0].FSSubjugationistRace race, leading the arcology to @@.yellow;adopt $arcologies[0].FSSubjugationistRace Supremacy.@@
		<<set $arcologies[$i].FSSupremacist = 5>><<set _adopted = 1>>
		<<set $arcologies[$i].FSSupremacistRace = $arcologies[0].FSSubjugationistRace>>
	<<case "Racial Supremacism">>
		<<if $arcologies[$i].FSSupremacist != "unset">><<set $arcologies[$i].FSSupremacist = "unset">><</if>>
		$desc preoccupied by a racial animus towards $arcologies[0].FSSupremacistRace people, leaving the arcology to @@.yellow;adopt $arcologies[0].FSSupremacistRace Subjugation.@@
		<<set $arcologies[$i].FSSubjugationist = 5>><<set _adopted = 1>>
		<<set $arcologies[$i].FSSubjugationistRace = $arcologies[0].FSSupremacistRace>>
	<<case "Repopulation Focus">>
		<<if $arcologies[$i].FSRepopulationFocus != "unset">><<set $arcologies[$i].FSRepopulationFocus = "unset">><</if>>
		$desc obsessed with building a new society based on its Societal Elite, leading the arcology to @@.yellow;adopt Eugenics.@@
		<<set $arcologies[$i].FSRestart = 5>><<set _adopted = 1>>
	<<case "Eugenics">>
		<<if $arcologies[$i].FSRestart != "unset">><<set $arcologies[$i].FSRestart = "unset">><</if>>
		$desc obsessed with breeding a new society, leading the arcology to @@.yellow;adopt Repopulationism.@@
		<<set $arcologies[$i].FSRepopulationFocus = 5>><<set _adopted = 1>>
	<<case "Gender Radicalism">>
		<<if $arcologies[$i].FSGenderRadicalist != "unset">><<set $arcologies[$i].FSGenderRadicalist = "unset">><</if>>
		$desc enthusiastic about knocking slaves up, leading the arcology to @@.yellow;adopt Gender Fundamentalism.@@
		<<set $arcologies[$i].FSGenderFundamentalist = 5>><<set _adopted = 1>>
	<<case "Gender Fundamentalism">>
		<<if $arcologies[$i].FSGenderFundamentalist != "unset">><<set $arcologies[$i].FSGenderFundamentalist = "unset">><</if>>
		$desc enthusiastic about fucking slaves in the butt, leading the arcology to @@.yellow;adopt Gender Radicalism.@@
		<<set $arcologies[$i].FSGenderRadicalist = 5>><<set _adopted = 1>>
	<<case "Paternalism">>
		<<if $arcologies[$i].FSPaternalist != "unset">><<set $arcologies[$i].FSPaternalist = "unset">><</if>>
		$desc partial to screaming and struggling, leading the arcology to @@.yellow;adopt Degradationism.@@
		<<set $arcologies[$i].FSDegradationist = 5>><<set _adopted = 1>>
	<<case "Degradationism">>
		<<if $arcologies[$i].FSDegradationist != "unset">><<set $arcologies[$i].FSDegradationist = "unset">><</if>>
		$desc devoted to their slaves' advancement, leading the arcology to @@.yellow;adopt Paternalism.@@
		<<set $arcologies[$i].FSPaternalist = 5>><<set _adopted = 1>>
	<<case "Intellectual Dependency">>
		<<if $arcologies[$i].FSIntellectualDependency != "unset">><<set $arcologies[$i].FSIntellectualDependency = "unset">><</if>>
		$desc obsessed with crafting the perfect slave, leading the arcology to @@.yellow;adopt Slave Professionalism.@@
		<<set $arcologies[$i].FSSlaveProfessionalism = 5>><<set _adopted = 1>>
	<<case "Slave Professionalism">>
		<<if $arcologies[$i].FSSlaveProfessionalism != "unset">><<set $arcologies[$i].FSSlaveProfessionalism = "unset">><</if>>
		$desc worried that they may one day be outsmarted by their chattel, leading the arcology to @@.yellow;adopt Intellectual Dependency.@@
		<<set $arcologies[$i].FSIntellectualDependency = 5>><<set _adopted = 1>>
	<<case "Body Purism">>
		<<if $arcologies[$i].FSBodyPurist != "unset">><<set $arcologies[$i].FSBodyPurist = "unset">><</if>>
		$desc fascinated with extreme surgery, leading the arcology to @@.yellow;adopt Transformation Fetishism.@@
		<<set $arcologies[$i].FSTransformationFetishist = 5>><<set _adopted = 1>>
	<<case "Transformation Fetishism">>
		<<if $arcologies[$i].FSTransformationFetishist != "unset">><<set $arcologies[$i].FSTransformationFetishist = "unset">><</if>>
		$desc concerned by trends in their slaves' health, leading the arcology to @@.yellow;adopt Body Purism.@@
		<<set $arcologies[$i].FSBodyPurist = 5>><<set _adopted = 1>>
	<<case "Youth Preferentialism">>
		<<if $arcologies[$i].FSYouthPreferentialist != "unset">><<set $arcologies[$i].FSYouthPreferentialist = "unset">><</if>>
		$desc devoted to time in bed with their MILF slaves, leading the arcology to @@.yellow;adopt Maturity Preferentialism.@@
		<<set $arcologies[$i].FSMaturityPreferentialist = 5>><<set _adopted = 1>>
	<<case "Maturity Preferentialism">>
		<<if $arcologies[$i].FSMaturityPreferentialist != "unset">><<set $arcologies[$i].FSMaturityPreferentialist = "unset">><</if>>
		$desc devoted to fucking nubile young slaves, leading the arcology to @@.yellow;adopt Youth Preferentialism.@@
		<<set $arcologies[$i].FSYouthPreferentialist = 5>><<set _adopted = 1>>
	<<case "Petite Admiration">>
		<<if $arcologies[$i].FSPetiteAdmiration != "unset">><<set $arcologies[$i].FSPetiteAdmiration = "unset">><</if>>
		$desc convinced that tall equals beauty, leading the arcology to @@.yellow;adopt Statuesque Glorification.@@
		<<set $arcologies[$i].FSSlaveProfessionalism = 5>><<set _adopted = 1>>
	<<case "Statuesque Glorification">>
		<<if $arcologies[$i].FSStatuesqueGlorification != "unset">><<set $arcologies[$i].FSStatuesqueGlorification = "unset">><</if>>
		$desc enamored by those shorter than them, leading the arcology to @@.yellow;adopt Petite Admiration.@@
		<<set $arcologies[$i].FSPetiteAdmiration = 5>><<set _adopted = 1>>
	<<case "Slimness Enthusiasm">>
		<<if $arcologies[$i].FSSlimnessEnthusiast != "unset">><<set $arcologies[$i].FSSlimnessEnthusiast = "unset">><</if>>
		$desc loves boobs, the bigger, the better, leading the arcology to @@.yellow;adopt Asset Expansionism.@@
		<<set $arcologies[$i].FSAssetExpansionist = 5>><<set _adopted = 1>>
	<<case "Asset Expansionism">>
		<<if $arcologies[$i].FSAssetExpansionist != "unset">><<set $arcologies[$i].FSAssetExpansionist = "unset">><</if>>
		$desc loves a slim slave with tight holes, leading the arcology to @@.yellow;adopt Slimness Enthusiasm.@@
		<<set $arcologies[$i].FSSlimnessEnthusiast = 5>><<set _adopted = 1>>
	<<case "Pastoralism">>
		<<if $arcologies[$i].FSPastoralist != "unset">><<set $arcologies[$i].FSPastoralist = "unset">><</if>>
		$desc loves cum, leading the arcology to @@.yellow;adopt Cummunism.@@
		<<set $arcologies[$i].FSCummunism = 5>><<set _adopted = 1>>
	<<case "Cummunism">>
		<<if $arcologies[$i].FSCummunism != "unset">><<set $arcologies[$i].FSCummunism = "unset">><</if>>
		$desc addicted to breast milk straight from the nipple, leading the arcology to @@.yellow;adopt Pastoralism.@@
		<<set $arcologies[$i].FSPastoralist = 5>><<set _adopted = 1>>
	<<case "Hedonistic Decadence">>
		<<if $arcologies[$i].FSHedonisticDecadence != "unset">><<set $arcologies[$i].FSHedonisticDecadence = "unset">><</if>>
		$desc devoted to spending time in the gym, leading the arcology to @@.yellow;adopt Physical Idealism.@@
		<<set $arcologies[$i].FSPhysicalIdealist = 5>><<set _adopted = 1>>
	<<case "Physical Idealism">>
		<<if $arcologies[$i].FSPhysicalIdealist != "unset">><<set $arcologies[$i].FSPhysicalIdealist = "unset">><</if>>
		$desc addicted to pleasure, leading the arcology to @@.yellow;adopt Decadent Hedonism.@@
		<<set $arcologies[$i].FSHedonisticDecadence = 5>><<set _adopted = 1>>
	<<case "Chattel Religionism">>
		<<if $arcologies[$i].FSChattelReligionist != "unset">><<set $arcologies[$i].FSChattelReligionist = "unset">><</if>>
		$desc open minded, leading the arcology to @@.yellow;permit cultural freedom.@@
		<<set $arcologies[$i].FSNull = 5>><<set _adopted = 1>>
	<<case "Multiculturalism">>
		<<if $arcologies[$i].FSNull != "unset">><<set $arcologies[$i].FSNull = "unset">><</if>>
		$desc devoutly religious, and interested in a reformation, leading the arcology to @@.yellow;adopt Chattel Religionism.@@
		<<set $arcologies[$i].FSChattelReligionist = 5>><<set _adopted = 1>>
	<<case "Roman Revivalism">>
		<<if $arcologies[$i].FSRomanRevivalist != "unset">><<set $arcologies[$i].FSRomanRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSEgyptianRevivalist != "unset">><<set $arcologies[$i].FSEgyptianRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSEdoRevivalist != "unset">><<set $arcologies[$i].FSEdoRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSArabianRevivalist != "unset">><<set $arcologies[$i].FSArabianRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSChineseRevivalist != "unset">><<set $arcologies[$i].FSChineseRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSNeoImperialist != "unset">><<set $arcologies[$i].FSNeoImperialist = "unset">><</if>>
		$desc fascinated by ancient Aztec history, leading the arcology to @@.yellow;adopt Aztec Revivalism.@@
		<<set $arcologies[$i].FSAztecRevivalist = 5>><<set _adopted = 1>>
	<<case "Neo-Imperialism" "Egyptian Revivalism">>
		<<if $arcologies[$i].FSEgyptianRevivalist != "unset">><<set $arcologies[$i].FSEgyptianRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSRomanRevivalist != "unset">><<set $arcologies[$i].FSRomanRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSEdoRevivalist != "unset">><<set $arcologies[$i].FSEdoRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSChineseRevivalist != "unset">><<set $arcologies[$i].FSChineseRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSAztecRevivalist != "unset">><<set $arcologies[$i].FSAztecRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSNeoImperialist != "unset">><<set $arcologies[$i].FSNeoImperialist = "unset">><</if>>
		$desc fascinated by Arabian romanticism, leading the arcology to @@.yellow;adopt Arabian Revivalism.@@
		<<set $arcologies[$i].FSArabianRevivalist = 5>><<set _adopted = 1>>
	<<case "Edo Revivalism">>
		<<if $arcologies[$i].FSEdoRevivalist != "unset">><<set $arcologies[$i].FSEdoRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSRomanRevivalist != "unset">><<set $arcologies[$i].FSRomanRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSEgyptianRevivalist != "unset">><<set $arcologies[$i].FSEgyptianRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSArabianRevivalist != "unset">><<set $arcologies[$i].FSArabianRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSAztecRevivalist != "unset">><<set $arcologies[$i].FSAztecRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSNeoImperialist != "unset">><<set $arcologies[$i].FSNeoImperialist = "unset">><</if>>
		$desc fascinated by the long tale of Chinese history, leading the arcology to @@.yellow;adopt Chinese Revivalism.@@
		<<set $arcologies[$i].FSChineseRevivalist = 5>><<set _adopted = 1>>
	<<case "Arabian Revivalism">>
		<<if $arcologies[$i].FSArabianRevivalist != "unset">><<set $arcologies[$i].FSArabianRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSRomanRevivalist != "unset">><<set $arcologies[$i].FSRomanRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSEdoRevivalist != "unset">><<set $arcologies[$i].FSEdoRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSChineseRevivalist != "unset">><<set $arcologies[$i].FSChineseRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSAztecRevivalist != "unset">><<set $arcologies[$i].FSAztecRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSNeoImperialist != "unset">><<set $arcologies[$i].FSNeoImperialist = "unset">><</if>>
		$desc fascinated by ancient Egyptian history, leading the arcology to @@.yellow;adopt Egyptian Revivalism.@@
		<<set $arcologies[$i].FSEgyptianRevivalist = 5>><<set _adopted = 1>>
	<<case "Chinese Revivalism">>
		<<if $arcologies[$i].FSChineseRevivalist != "unset">><<set $arcologies[$i].FSChineseRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSRomanRevivalist != "unset">><<set $arcologies[$i].FSRomanRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSEgyptianRevivalist != "unset">><<set $arcologies[$i].FSEgyptianRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSArabianRevivalist != "unset">><<set $arcologies[$i].FSArabianRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSAztecRevivalist != "unset">><<set $arcologies[$i].FSAztecRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSNeoImperialist != "unset">><<set $arcologies[$i].FSNeoImperialist = "unset">><</if>>
		$desc fascinated by Japanese history, leading the arcology to @@.yellow;adopt Edo Revivalism.@@
		<<set $arcologies[$i].FSEdoRevivalist = 5>><<set _adopted = 1>>
	<<case "Aztec Revivalism">>
		<<if $arcologies[$i].FSAztecRevivalist != "unset">><<set $arcologies[$i].FSAztecRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSEgyptianRevivalist != "unset">><<set $arcologies[$i].FSEgyptianRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSEdoRevivalist != "unset">><<set $arcologies[$i].FSEdoRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSArabianRevivalist != "unset">><<set $arcologies[$i].FSArabianRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSChineseRevivalist != "unset">><<set $arcologies[$i].FSChineseRevivalist = "unset">><</if>>
		<<if $arcologies[$i].FSNeoImperialist != "unset">><<set $arcologies[$i].FSNeoImperialist = "unset">><</if>>
		$desc fascinated by classical Roman history, leading the arcology to @@.yellow;adopt Roman Revivalism.@@
		<<set $arcologies[$i].FSRomanRevivalist = 5>><<set _adopted = 1>>
	<<default>>
		<<set $rivalryFSAdopted = 0>>
	<</switch>>

<<else>>

/* RIVAL ADOPTION */

	<<set $desc = "Its owner is">>
	<<if $arcologies[0].FSSubjugationist > random(5,60)>>
		<<if _validFSes.includes("FSSupremacist") && ($arcologies[$i].FSSubjugationist == "unset") || ($arcologies[$i].FSSubjugationistRace !== $arcologies[0].FSSubjugationistRace)>>
			$desc preoccupied by belief in the superiority of the $arcologies[0].FSSubjugationistRace race, leading the arcology to @@.yellow;adopt $arcologies[0].FSSubjugationistRace Supremacy.@@
			<<set $arcologies[$i].FSSupremacist = 5>><<set _adopted = 1>>
			<<set $arcologies[$i].FSSupremacistRace = $arcologies[0].FSSubjugationistRace>>
		<</if>>
	<</if>>
	<<if $arcologies[0].FSSupremacist > random(5,60)>>
		<<if (_validFSes.includes("FSSubjugationist") && ($arcologies[$i].FSSupremacist == "unset") || ($arcologies[$i].FSSupremacistRace !== $arcologies[0].FSSupremacistRace)>>
			$desc preoccupied by a racial animus towards $arcologies[0].FSSupremacistRace people, leading the arcology to @@.yellow;adopt $arcologies[0].FSSupremacistRace Subjugation.@@
			<<set $arcologies[$i].FSSubjugationist = 5>><<set _adopted = 1>>
			<<set $arcologies[$i].FSSubjugationistRace = $arcologies[0].FSSupremacistRace>>
		<</if>>
	<</if>>
	<<if $arcologies[0].FSRestart > random(5,60)>>
		<<if _validFSes.includes("FSRepopulationFocus")>>
			$desc obsessed with breeding a new society, leading the arcology to @@.yellow;adopt Repopulationism.@@
			<<set $arcologies[$i].FSRepopulationFocus = 5>><<set _adopted = 1>>
		<</if>>
	<<elseif $arcologies[0].FSRepopulationFocus > random(5,60)>>
		<<if _validFSes.includes("FSRestart")>>
			$desc obsessed with creating a new, better society, leading the arcology to @@.yellow;adopt Eugenics.@@
			<<set $arcologies[$i].FSRestart = 5>><<set _adopted = 1>>
		<</if>>
	<</if>>
	<<if $arcologies[0].FSGenderRadicalist > random(5,60)>>
		<<if _validFSes.includes("FSGenderFundamentalist")>>
			$desc enthusiastic about knocking slaves up, leading the arcology to @@.yellow;adopt Gender Fundamentalism.@@
			<<set $arcologies[$i].FSGenderFundamentalist = 5>><<set _adopted = 1>>
		<</if>>
	<<elseif $arcologies[0].FSGenderFundamentalist > random(5,60)>>
		<<if _validFSes.includes("FSGenderRadicalist")>>
			$desc enthusiastic about fucking slaves in the butt, leading the arcology to @@.yellow;adopt Gender Radicalism.@@
			<<set $arcologies[$i].FSGenderRadicalist = 5>><<set _adopted = 1>>
		<</if>>
	<</if>>
	<<if $arcologies[0].FSPaternalist > random(5,60)>>
		<<if _validFSes.includes("FSDegradationist")>>
			$desc partial to screaming and struggling, leading the arcology to @@.yellow;adopt Degradationism.@@
			<<set $arcologies[$i].FSDegradationist = 5>><<set _adopted = 1>>
		<</if>>
	<<elseif $arcologies[0].FSDegradationist > random(5,60)>>
		<<if _validFSes.includes("FSPaternalist")>>
			$desc devoted to their slaves' advancement, leading the arcology to @@.yellow;adopt Paternalism.@@
			<<set $arcologies[$i].FSPaternalist = 5>><<set _adopted = 1>>
		<</if>>
	<</if>>
	<<if $arcologies[0].FSIntellectualDependency > random(5,60)>>
		<<if _validFSes.includes("FSSlaveProfessionalism")>>
			$desc obsessed with crafting the perfect slave, leading the arcology to @@.yellow;adopt Slave Professionalism.@@
			<<set $arcologies[$i].FSSlaveProfessionalism = 5>><<set _adopted = 1>>
		<</if>>
	<<elseif $arcologies[0].FSSlaveProfessionalism > random(5,60)>>
		<<if _validFSes.includes("FSIntellectualDependency")>>
			$desc worried that they may one day be outsmarted by their chattel, leading the arcology to @@.yellow;adopt Intellectual Dependency.@@
			<<set $arcologies[$i].FSIntellectualDependency = 5>><<set _adopted = 1>>
		<</if>>
	<</if>>
	<<if $arcologies[0].FSBodyPurist > random(5,60)>>
		<<if _validFSes.includes("FSTransformationFetishist")>>
			$desc fascinated with extreme surgery, leading the arcology to @@.yellow;adopt Transformation Fetishism.@@
			<<set $arcologies[$i].FSTransformationFetishist = 5>><<set _adopted = 1>>
		<</if>>
	<<elseif $arcologies[0].FSTransformationFetishist > random(5,60)>>
		<<if _validFSes.includes("FSBodyPurist")>>
			$desc concerned by trends in their slaves' health, leading the arcology to @@.yellow;adopt Body Purism.@@
			<<set $arcologies[$i].FSBodyPurist = 5>><<set _adopted = 1>>
		<</if>>
	<</if>>
	<<if $arcologies[0].FSYouthPreferentialist > random(5,60)>>
		<<if _validFSes.includes("FSMaturityPreferentialist")>>
			$desc devoted to time in bed with their MILF slaves, leading the arcology to @@.yellow;adopt Maturity Preferentialism.@@
			<<set $arcologies[$i].FSMaturityPreferentialist = 5>><<set _adopted = 1>>
		<</if>>
	<<elseif $arcologies[0].FSMaturityPreferentialist > random(5,60)>>
		<<if _validFSes.includes("FSYouthPreferentialist")>>
			$desc devoted to fucking nubile young slaves, leading the arcology to @@.yellow;adopt Youth Preferentialism.@@
			<<set $arcologies[$i].FSYouthPreferentialist = 5>><<set _adopted = 1>>
		<</if>>
	<</if>>
	<<if $arcologies[0].FSPetiteAdmiration > random(5,60)>>
		<<if _validFSes.includes("FSStatuesqueGlorification")>>
			$desc convinced that tall equals beautiful, leading the arcology to @@.yellow;adopt Statuesque Glorification.@@
			<<set $arcologies[$i].FSStatuesqueGlorification = 5>><<set _adopted = 1>>
		<</if>>
	<<elseif $arcologies[0].FSStatuesqueGlorification > random(5,60)>>
		<<if _validFSes.includes("FSPetiteAdmiration")>>
			$desc enamored by those shorter than them, leading the arcology to @@.yellow;adopt Petite Admiration.@@
			<<set $arcologies[$i].FSPetiteAdmiration = 5>><<set _adopted = 1>>
		<</if>>
	<</if>>
	<<if $arcologies[0].FSSlimnessEnthusiast > random(5,60)>>
		<<if _validFSes.includes("FSAssetExpansionist")>>
			$desc loves boobs, the bigger, the better, leading the arcology to @@.yellow;adopt Asset Expansionism.@@
			<<set $arcologies[$i].FSAssetExpansionist = 5>><<set _adopted = 1>>
		<</if>>
	<<elseif $arcologies[0].FSAssetExpansionist > random(5,60)>>
		<<if _validFSes.includes("FSSlimnessEnthusiast")>>
			$desc loves a slim slave with tight holes, leading the arcology to @@.yellow;adopt Slimness Enthusiasm.@@
			<<set $arcologies[$i].FSSlimnessEnthusiast = 5>><<set _adopted = 1>>
		<</if>>
	<</if>>
	<<if $arcologies[0].FSPastoralist > random(5,60)>>
		<<if _validFSes.includes("FSPastoralist")>>
			$desc addicted to breast milk straight from the nipple, leading the arcology to @@.yellow;adopt Pastoralism.@@
			<<set $arcologies[$i].FSPastoralist = 5>><<set _adopted = 1>>
		<</if>>
	<<elseif $arcologies[0].FSCummunism > random(5,60)>>
		<<if _validFSes.includes("FSCummunism")>>
			$desc obsessed with cum, leading the arcology to @@.yellow;adopt Cummunism.@@
			<<set $arcologies[$i].FSCummunism = 5>><<set _adopted = 1>>
		<</if>>
	<</if>>
	<<if $arcologies[0].FSPhysicalIdealist > random(5,60)>>
		<<if _validFSes.includes("FSPhysicalIdealist")>>
			$desc pretty devoted to spending time in the gym, leading the arcology to @@.yellow;adopt Physical Idealism.@@
			<<set $arcologies[$i].FSPhysicalIdealist = 5>><<set _adopted = 1>>
		<</if>>
	<<elseif $arcologies[0].FSHedonisticDecadence > random(5,60)>>
		<<if _validFSes.includes("FSHedonisticDecadence")>>
			$desc pretty devoted to indulging their every whim, leading the arcology to @@.yellow;adopt Decadent Hedonism.@@
			<<set $arcologies[$i].FSHedonisticDecadence = 5>><<set _adopted = 1>>
		<</if>>
	<</if>>
	<<if $arcologies[0].FSRomanRevivalist > random(5,60)>>
		<<if _validFSes.includes("FSAztecRevivalist")>>
			$desc fascinated by ancient Aztec history, leading the arcology to @@.yellow;adopt Aztec Revivalism.@@
			<<set $arcologies[$i].FSAztecRevivalist = 5>><<set _adopted = 1>>
		<</if>>
	<<elseif $arcologies[0].FSAztecRevivalist > random(5,60)>>
		<<if _validFSes.includes("FSRomanRevivalist")>>
			$desc fascinated by classical Roman history, leading the arcology to @@.yellow;adopt Roman Revivalism.@@
			<<set $arcologies[$i].FSRomanRevivalist = 5>><<set _adopted = 1>>
		<</if>>
	<<elseif $arcologies[0].FSEgyptianRevivalist > random(5,60) || $arcologies[0].FSNeoImperialist > random(5, 60)>>
		<<if _validFSes.includes("FSArabianRevivalist")>>
			$desc fascinated by Arabian romanticism, leading the arcology to @@.yellow;adopt Arabian Revivalism.@@
			<<set $arcologies[$i].FSArabianRevivalist = 5>><<set _adopted = 1>>
		<</if>>
	<<elseif $arcologies[0].FSEdoRevivalist > random(5,60)>>
		<<if _validFSes.includes("FSChineseRevivalist")>>
			$desc fascinated by the long tale of Chinese history, leading the arcology to @@.yellow;adopt Chinese Revivalism.@@
			<<set $arcologies[$i].FSChineseRevivalist = 5>><<set _adopted = 1>>
		<</if>>
	<<elseif $arcologies[0].FSArabianRevivalist > random(5,60)>>
		<<if _validFSes.includes("FSEgyptianRevivalist")>>
			$desc fascinated by ancient Egyptian history, leading the arcology to @@.yellow;adopt Egyptian Revivalism.@@
			<<set $arcologies[$i].FSEgyptianRevivalist = 5>><<set _adopted = 1>>
		<</if>>
	<<elseif $arcologies[0].FSChineseRevivalist > random(5,60)>>
		<<if _validFSes.includes("FSEdoRevivalist")>>
			$desc fascinated by Japanese history, leading the arcology to @@.yellow;adopt Edo Revivalism.@@
			<<set $arcologies[$i].FSEdoRevivalist = 5>><<set _adopted = 1>>
		<</if>>
	<</if>>

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

/* AGENT ADOPTION*/

<<for _adopted == 0>>
<<if ($arcologies[$i].government == "your agent")>>
<<set _adopted = 1>> /* breaking out of the for loop will preserve this */
<<set _leader = App.currentAgent($i)>>
<<setLocalPronouns _leader>>

<<if _validFSes.includes("FSRepopulationFocus") && _leader.fetish == "pregnancy" && $seePreg == 1>>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Repopulationism,@@ since as a pregnancy fetishist, $he can't wait to see the female population's bellies swell with life.
	<<set $arcologies[$i].FSRepopulationFocus = 5>><<break>>
<<elseif _validFSes.includes("FSRestart") && (_leader.preg < -1 || (_leader.ovaries == 0 && _leader.mpreg != 1)) && _leader.genes == "XX">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Eugenics,@@ since if no-one can get pregnant, $he won't be alone.
	<<set $arcologies[$i].FSRestart = 5>><<break>>
<</if>>
<<if _validFSes.includes("FSGenderRadicalist") && _leader.dick > 0>>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Gender Radicalism,@@ since $he's a walking, swinging argument for dickgirls.
	<<set $arcologies[$i].FSGenderRadicalist = 5>><<break>>
<<elseif _validFSes.includes("FSGenderFundamentalist") &&_leader.pregKnown == 1 || _leader.bellyPreg > 1500>>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Gender Fundamentalism,@@ since its citizens find leadership by a pregnant $woman fascinating.
	<<set $arcologies[$i].FSGenderFundamentalist = 5>><<break>>
<</if>>
<<if _validFSes.includes("FSPaternalist") && _leader.behavioralQuirk == "advocate">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Paternalism,@@ since as an advocate for slavery, $he believes in its benefits.
	<<set $arcologies[$i].FSPaternalist = 5>><<break>>
<<elseif _validFSes.includes("FSDegradationist") && _leader.fetish == "sadist">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Degradationism,@@ since as a sexual sadist, $he's excited by the idea of leading a society that applauds $his cruelest impulses.
	<<set $arcologies[$i].FSDegradationist = 5>><<break>>
<</if>>
<<if _validFSes.includes("FSSlaveProfessionalism") && (_leader.intelligence+_leader.intelligenceImplant >= 120) && (_leader.skill.vagina+_leader.skill.oral+_leader.skill.anal+_leader.skill.whoring+_leader.skill.entertainment >= 400)>>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Slave Professionalism,@@ since $he wishes to produce slaves you can be proud of.
	<<set $arcologies[$i].FSSlaveProfessionalism = 5>><<break>>
<<elseif _validFSes.includes("FSIntellectualDependency") && (_leader.intelligence+_leader.intelligenceImplant >= 120) && (_leader.behavioralFlaw == "arrogant" || _leader.behavioralQuirk == "insecure")>>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Intellectual Dependency,@@
	<<if _leader.behavioralQuirk == "insecure">>
		since, due to $his own insecurities, needs to be frequently reassured that $he is smarter than the masses.
	<<else>>
		since $he absolutely needs to feel intellectually superior to $his chattel.
	<</if>>
	<<set $arcologies[$i].FSIntellectualDependency = 5>><<break>>
<</if>>
<<if _validFSes.includes("FSBodyPurist") && _leader.chem > 50>>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Body Purism,@@ since $he knows what long term drug damage feels like, and doesn't want any slave to ever experience it again.
	<<set $arcologies[$i].FSBodyPurist = 5>><<break>>
<<elseif _validFSes.includes("FSTransformationFetishist") && _leader.boobsImplant > 1000>>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Transformation Fetishism,@@ out of a perverse desire to subject all slaves to massive implants like $hers.
	<<set $arcologies[$i].FSTransformationFetishist = 5>><<break>>
<</if>>
<<if _validFSes.includes("FSYouthPreferentialist") && _leader.actualAge <= 25>>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Youth Preferentialism,@@ to buttress acceptance of $his own young age.
	<<set $arcologies[$i].FSYouthPreferentialist = 5>><<break>>
<<elseif _validFSes.includes("FSMaturityPreferentialist") && _leader.actualAge > 35>>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Maturity Preferentialism,@@ since $he has a certain personal interest in promoting the idea that MILFs are sexy.
	<<set $arcologies[$i].FSMaturityPreferentialist = 5>><<break>>
<</if>>
<<if _validFSes.includes("FSSlimnessEnthusiast") && _leader.behavioralQuirk == "insecure">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Slimness Enthusiasm,@@ since $his history of anorexia has deeply impacted $his idea of beauty.
	<<set $arcologies[$i].FSSlimnessEnthusiast = 5>><<break>>
<<elseif _validFSes.includes("FSAssetExpansionist") && _leader.fetish == "boobs">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Asset Expansionism,@@ since $he's a breast expansion fetishist in addition to being a mere breast fetishist.
	<<set $arcologies[$i].FSAssetExpansionist = 5>><<break>>
<<elseif _validFSes.includes("FSAssetExpansionist") && _leader.sexualQuirk == "size queen" && _leader.vagina > 3>>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Asset Expansionism,@@ since $he's a stickler for big dicks and seeks to find one large enough to push $him to $his very limit.
	<<set $arcologies[$i].FSAssetExpansionist = 5>><<break>>
<</if>>
<<if _validFSes.includes("FSCummunism") && _leader.fetish == "cumslut">> /* this will become the cum focused condition, being replaced with breast focus for milk */
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Cummunism,@@ since $he already loves sucking down huge loads of cum.
	<<set $arcologies[$i].FSCummunism = 5>><<break>>
<<elseif _validFSes.includes("FSPastoralist") && _leader.fetish == "boobs">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Pastoralism,@@ since $he loves boobs and adores suckling them.
	<<set $arcologies[$i].FSPastoralist = 5>><<break>>
<</if>>
<<if _validFSes.includes("FSHedonisticDecadence") && _leader.behavioralFlaw == "gluttonous">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Decadent Hedonism,@@ since $he already loves over-eating.
	<<set $arcologies[$i].FSHedonisticDecadence = 5>><<break>>
<<elseif _validFSes.includes("FSPhysicalIdealist") && _leader.behavioralQuirk == "fitness">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Physical Idealism,@@ since $he's a fitness fanatic $himself.
	<<set $arcologies[$i].FSPhysicalIdealist = 5>><<break>>
<<elseif _validFSes.includes("FSHedonisticDecadence") && _leader.fetish != "none" && _leader.fetishStrength >= 100>>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Decadent Hedonism,@@ since $he seeks to satisfy $his powerful fetish.
	<<set $arcologies[$i].FSHedonisticDecadence = 5>><<break>>
<</if>>
<<if _validFSes.includes("FSStatuesqueGlorification") && _leader.height >= 200>>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Statuesque Glorification,@@ since $he is tired of being one of the tallest in arcology.
	<<set $arcologies[$i].FSStatuesqueGlorification = 5>><<break>>
<<elseif _validFSes.includes("FSPetiteAdmiration") && _leader.height >= 170 && _leader.fetish == "dom">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Petite Admiration,@@ since it is far easier to dominate someone much smaller than oneself.
	<<set $arcologies[$i].FSPetiteAdmiration = 5>><<break>>
<</if>>
<<if _validFSes.includes("FSIncestFetishist")>>
	<<set _lover = $slaves.find(function(s) { return s.ID == _leader.relationshipTarget && areRelated(s, _leader) && s.assignment == "live with your agent"; })>>
	<<if (_leader.behavioralQuirk == "sinful" || _leader.sexualQuirk == "perverted") && def _lover && $seeIncest == 1>>
		Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Incest Festishism,@@ to share the love and joy $he holds with $his <<print relativeTerm(_leader, _lover)>>.
		<<set $arcologies[$i].FSIncestFetishist = 5>><<break>>
	<</if>>
<</if>>
<<if _validFSes.includes("FSChattelReligionist") && _leader.behavioralQuirk == "devout">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Chattel Religionism,@@ to share and spread $his deeply held beliefs about the holiness of sexual service.
	<<set $arcologies[$i].FSChattelReligionist = 5>><<break>>
<<elseif _validFSes.includes("FSChattelReligionist") && _leader.behavioralQuirk == "sinful">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Chattel Religionism,@@ since $he's excited by the prospect of getting away with horrible sins against old religions in public.
	<<set $arcologies[$i].FSChattelReligionist = 5>><<break>>
<</if>>
<<if (_validFSes.includes("FSEgyptianRevivalist") && _leader.relationshipTarget != 0)>>
	<<set _lover = getSlave(_leader.relationshipTarget)>>
	<<if (def _lover) && areRelated(_leader, _lover)>>
		Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Egyptian Revivalism,@@ since $he's already part of a gloriously incestuous relationship.
		<<set $arcologies[$i].FSEgyptianRevivalist = 5>><<break>>
	<</if>>
<<elseif _validFSes.includes("FSChineseRevivalist") && _leader.nationality == "Chinese">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Chinese Revivalism,@@ since $he's Chinese $himself and can claim high honor in such a society.
	<<set $arcologies[$i].FSChineseRevivalist = 5>><<break>>
<<elseif _validFSes.includes("FSEdoRevivalist") && _leader.nationality == "Japanese">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Edo Revivalism,@@ since $he's Japanese $himself and can claim high honor in such a society.
	<<set $arcologies[$i].FSEdoRevivalist = 5>><<break>>
<<elseif _validFSes.includes("FSAztecRevivalist") && _leader.nationality == "Mexican">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Aztec Revivalism,@@ since $he's Mexican $himself and can claim high honor in such a society.
	<<set $arcologies[$i].FSAztecRevivalist = 5>><<break>>
<<elseif _validFSes.includes("FSNeoImperialist") && _leader.nationality == "German">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Neo-Imperialism,@@ since $he's German $himself and can easily cement $his rule with Imperial directives in your name.
	<<set $arcologies[$i].FSNeoImperialist = 5>><<break>>
<<elseif _validFSes.includes("FSNeoImperialist") && _leader.nationality == "French">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Neo-Imperialism,@@ since $he's French $himself and can easily cement $his rule with Imperial directives in your name.
	<<set $arcologies[$i].FSNeoImperialist = 5>><<break>>
<<elseif _validFSes.includes("FSNeoImperialist") && _leader.nationality == "Spanish">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Neo-Imperialism,@@ since $he's Spanish $himself and can easily cement $his rule with Imperial directives in your name.
	<<set $arcologies[$i].FSNeoImperialist = 5>><<break>>
<<elseif _validFSes.includes("FSNeoImperialist") && _leader.nationality == "English">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Neo-Imperialism,@@ since $he's English $himself and can easily cement $his rule with Imperial directives in your name.
	<<set $arcologies[$i].FSNeoImperialist = 5>><<break>>
<<elseif _validFSes.includes("FSRomanRevivalist") && _leader.behavioralQuirk == "confident">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Roman Revivalism,@@ since it appeals to $his confident, patrician nature.
	<<set $arcologies[$i].FSRomanRevivalist = 5>><<break>>
<<elseif _validFSes.includes("FSArabianRevivalist") && _leader.fetish == "dom">>
	Your agent @@.pink;_leader.slaveName@@ successfully pushes it to @@.yellow;adopt Arabian Revivalism,@@ since $he's sexually dominant and quite likes the idea of overseeing slave bazaars.
	<<set $arcologies[$i].FSArabianRevivalist = 5>><<break>>
<</if>>

<<set _adopted = 0>> /* did not break out of the for loop, so no FS was adopted */
<</if>>
<<break>>
<</for>>

/* CROSS-FS ADOPTION*/

<<for _adopted == 0>>
<<set _adopted = 1>> /* breaking out of the for loop will preserve this */

<<if $arcologies[$i].FSSubjugationist > random(50,200)>>
	<<if _validFSes.includes("FSDegradationist")>>
		The arcology's racial Subjugationist culture @@.yellow;pushes it towards Degradationism.@@
		<<set $arcologies[$i].FSDegradationist = 5>><<break>>
	<<elseif (_validFSes.includes("FSAztecRevivalist") && _validFSes.includes("FSEgyptianRevivalist"))>>
		<<if random(0,1) == 0>>
			The arcology's racial Subjugationist culture @@.yellow;pushes it towards Egyptian Revivalism,@@ since the Ancient Egyptians are famous for keeping a race of slaves.
			<<set $arcologies[$i].FSEgyptianRevivalist = 5>><<break>>
		<<else>>
			The arcology's racial Supremacist culture @@.yellow;pushes it towards Aztec Revivalism,@@ since the enslavement and sacrifice of slaves was fundamental to the culture.
			<<set $arcologies[$i].FSAztecRevivalist = 5>><<break>>
		<</if>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSRestart > random(50,200)>>
	<<if _validFSes.includes("FSNeoImperialist")>>
			The arcology's elitist, eugenicist culture @@.yellow;pushes it towards Neo-Imperialism,@@ since the societal elite view themselves as the only appropriate rulers of their society.
			<<set $arcologies[$i].FSNeoImperialist = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSSupremacist > random(50,200)>>
	<<if _validFSes.includes("FSPaternalist")>>
		The arcology's racial Supremacist culture @@.yellow;pushes it towards Paternalism.@@
		<<set $arcologies[$i].FSPaternalist = 5>><<break>>
	<<elseif (_validFSes.includes("FSEdoRevivalist") && _validFSes.includes("FSChineseRevivalist") && ($arcologies[$i].FSSupremacistRace == "asian")>>
		<<if random(0,1) == 0>>
			The arcology's racial Supremacist culture @@.yellow;pushes it towards Edo Revivalism,@@ since the beauty and grace of the Japanese people are watchwords there.
			<<set $arcologies[$i].FSEdoRevivalist = 5>><<break>>
		<<else>>
			The arcology's racial Supremacist culture @@.yellow;pushes it towards Chinese Revivalism,@@ since the wisdom of the Middle Kingdom is admired there.
			<<set $arcologies[$i].FSChineseRevivalist = 5>><<break>>
		<</if>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSRepopulationFocus > random(50,200)>>
	<<if _validFSes.includes("FSAssetExpansionist")>>
		The arcology's Repopulationist culture @@.yellow;pushes it towards Asset Expansionism,@@ since big pregnant bellies go great with huge tits and asses.
		<<set $arcologies[$i].FSAssetExpansionist = 5>><<break>>
	<<elseif _validFSes.includes("FSGenderFundamentalist")>>
		The arcology's Repopulationist culture @@.yellow;pushes it towards Gender Fundamentalism,@@ since traditional women make better mothers.
		<<set $arcologies[$i].FSGenderFundamentalist = 5>><<break>>
	<<elseif _validFSes.includes("FSPetiteAdmiration")>>
		The arcology's Repopulationist culture @@.yellow;pushes it towards Petite Admiration,@@ since shorter women tend to have an easier time with childbirth.
		<<set $arcologies[$i].FSPetiteAdmiration = 5>><<break>>
	<</if>>
<<elseif $arcologies[$i].FSRestart > random(50,200)>>
	<<if _validFSes.includes("FSDegradationist")>>
		The arcology's elite focused culture @@.yellow;pushes it towards Degradationism,@@ since its lowest class deserves nothing but misery.
		<<set $arcologies[$i].FSDegradationist = 5>><<break>>
	<<elseif _validFSes.includes("FSSlaveProfessionalism")>>
		The arcology's elite focused culture @@.yellow;pushes it towards Slave Professionalism,@@ since the highest class deserve nothing less than the best slaves.
		<<set $arcologies[$i].FSSlaveProfessionalism = 5>><<break>>
	<<elseif _validFSes.includes("FSHedonisticDecadence")>>
		The arcology's wide range of imports @@.yellow;pushes it towards Decadent Hedonism,@@ since it has access to so many undiscovered pleasures.
		<<set $arcologies[$i].FSHedonisticDecadence = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSGenderRadicalist > random(50,200)>>
	<<if _validFSes.includes("FSTransformationFetishist")>>
		The arcology's Gender Radicalist culture @@.yellow;pushes it towards Transformation Fetishism,@@ since surgery can turn a slave into anything.
		<<set $arcologies[$i].FSTransformationFetishist = 5>><<break>>
	<<elseif _validFSes.includes("FSSlimnessEnthusiast")>>
		The arcology's Gender Radicalist culture @@.yellow;pushes it towards Slimness Enthusiasm,@@ since that's the kind of body many of its slaves have.
		<<set $arcologies[$i].FSSlimnessEnthusiast = 5>><<break>>
	<<elseif _validFSes.includes("FSCummunism")>>
		The arcology's Gender Radicalist culture @@.yellow;pushes it towards Cummunism,@@ since many of its slaves are capable of giving cum.
		<<set $arcologies[$i].FSCummunism = 5>><<break>>
	<</if>>
<<elseif $arcologies[$i].FSGenderFundamentalist > random(50,200)>>
	<<if _validFSes.includes("FSPastoralist")>>
		The arcology's Gender Fundamentalist culture @@.yellow;pushes it towards Pastoralism,@@ since its pregnant slaves are already giving milk.
		<<set $arcologies[$i].FSPastoralist = 5>><<break>>
	<<elseif _validFSes.includes("FSIntellectualDependency")>>
		The arcology's Gender Fundamentalist culture @@.yellow;pushes it towards Intellectual Dependency,@@ since women don't need to think to serve men.
		<<set $arcologies[$i].FSYouthPreferentialist = 5>><<break>>
	<<elseif _validFSes.includes("FSYouthPreferentialist")>>
		The arcology's Gender Fundamentalist culture @@.yellow;pushes it towards Youth Preferentialism,@@ since younger slaves are beautiful and fertile.
		<<set $arcologies[$i].FSYouthPreferentialist = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSPaternalist > random(50,200)>>
	<<if _validFSes.includes("FSChattelReligionist")>>
		The arcology's Paternalist culture @@.yellow;pushes it towards Chattel Religionism,@@ since many of its slaves are already worshipful.
		<<set $arcologies[$i].FSChattelReligionist = 5>><<break>>
	<<elseif _validFSes.includes("FSBodyPurist")>>
		The arcology's Paternalist culture @@.yellow;pushes it towards Body Purism,@@ since giving slaves dangerous drugs is hardly good for them.
		<<set $arcologies[$i].FSBodyPurist = 5>><<break>>
	<<elseif _validFSes.includes("FSRomanRevivalist")>>
		The arcology's Paternalist culture @@.yellow;pushes it towards Roman Revivalism,@@ since loyal service to the res publica bears similarity to their existing mores.
		<<set $arcologies[$i].FSRomanRevivalist = 5>><<break>>
	<</if>>
<<elseif $arcologies[$i].FSDegradationist > random(50,200)>>
	<<if _validFSes.includes("FSTransformationFetishist")>>
		The arcology's Degradationist culture @@.yellow;pushes it towards Transformation Fetishism,@@ the ultimate expression of power over slave bodies.
		<<set $arcologies[$i].FSTransformationFetishist = 5>><<break>>
	<<elseif _validFSes.includes("FSGenderRadicalist")>>
		The arcology's Degradationist culture @@.yellow;pushes it towards Gender Radicalism,@@ since the joy of forcing a gender role on a slave is already popular.
		<<set $arcologies[$i].FSGenderRadicalist = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSIntellectualDependency > random(50,200)>>
	<<if _validFSes.includes("FSTransformationFetishist")>>
		The arcology's Intellectual Dependency culture @@.yellow;pushes it towards Transformation Fetishism,@@ to give its bimbos a body most fitting.
		<<set $arcologies[$i].FSTransformationFetishist = 5>><<break>>
	<<elseif _validFSes.includes("FSYouthPreferentialist")>>
		The arcology's Intellectual Dependency culture @@.yellow;pushes it towards Youth Preferentialism,@@ since the young have more energy to party.
		<<set $arcologies[$i].FSYouthPreferentialist = 5>><<break>>
	<<elseif _validFSes.includes("FSHedonisticDecadence")>>
		The arcology's Intellectual Dependency culture @@.yellow;pushes it towards Decadent Hedonism,@@ since base instinct already rules slaves' lives.
		<<set $arcologies[$i].FSHedonisticDecadence = 5>><<break>>
	<<elseif _validFSes.includes("FSRepopulationFocus")>>
		The arcology's Intellectual Dependency culture @@.yellow;pushes it towards Repopulationism,@@ since there has been an epidemic of unplanned pregnancies among the slave population.
		<<set $arcologies[$i].FSRepopulationFocus = 5>><<break>>
	<</if>>
<<elseif $arcologies[$i].FSSlaveProfessionalism > random(50,200)>>
	<<if _validFSes.includes("FSMaturityPreferentialist")>>
		The arcology's Slave Professionalism culture @@.yellow;pushes it towards Maturity Preferentialist,@@ since with age comes experience.
		<<set $arcologies[$i].FSMaturityPreferentialist = 5>><<break>>
	<<elseif _validFSes.includes("FSPaternalist")>>
		The arcology's Slave Professionalism culture @@.yellow;pushes it towards Paternalism,@@ since happy slaves are much more willing to be molded in to shape.
		<<set $arcologies[$i].FSPaternalist = 5>><<break>>
	<<elseif _validFSes.includes("FSPhysicalIdealist")>>
		The arcology's Slave Professionalism culture @@.yellow;pushes it towards Physical Idealism,@@ since a fitting body is required to house the perfect mind.
		<<set $arcologies[$i].FSPhysicalIdealist = 5>><<break>>
	<<elseif _validFSes.includes("FSChattelReligionist")>>
		The arcology's Slave Professionalism culture @@.yellow;pushes it towards Chattel Religionism,@@ since skilled service is already a part of a slave's daily life.
		<<set $arcologies[$i].FSChattelReligionist = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSBodyPurist > random(50,200)>>
	<<if _validFSes.includes("FSPhysicalIdealist")>>
		The arcology's Body Purist culture @@.yellow;pushes it towards Physical Idealism,@@ since it already takes an intense interest in bodily perfection.
		<<set $arcologies[$i].FSPhysicalIdealist = 5>><<break>>
	<<elseif _validFSes.includes("FSPaternalist")>>
		The arcology's Body Purist culture @@.yellow;pushes it towards Paternalism,@@ since it's become obvious that happiness is a necessary part of wellness.
		<<set $arcologies[$i].FSPaternalist = 5>><<break>>
	<</if>>
<<elseif $arcologies[$i].FSTransformationFetishist > random(50,200)>>
	<<if _validFSes.includes("FSAssetExpansionist")>>
		The arcology's Transformation Fetishist culture @@.yellow;pushes it towards Asset Expansionism,@@ since it's already overrun with massive tits and asses.
		<<set $arcologies[$i].FSAssetExpansionist = 5>><<break>>
	<<elseif _validFSes.includes("FSDegradationist")>>
		The arcology's Transformation Fetishist culture @@.yellow;pushes it towards Degradationism,@@ since it's already used to slaves whining about their latest surgeries.
		<<set $arcologies[$i].FSDegradationist = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSYouthPreferentialist > random(50,200)>>
	<<if _validFSes.includes("FSSlimnessEnthusiast")>>
		The arcology's Youth Preferentialist culture @@.yellow;pushes it towards Slimness Enthusiasm,@@ since that's the kind of body many of its slaves have.
		<<set $arcologies[$i].FSSlimnessEnthusiast = 5>><<break>>
	<<elseif _validFSes.includes("FSRepopulationFocus")>>
		The arcology's Youth Preferentialist culture @@.yellow;pushes it towards Repopulationism,@@ since many of its slaves are deliciously ripe for breeding.
		<<set $arcologies[$i].FSRepopulationFocus = 5>><<break>>
	<</if>>
<<elseif $arcologies[$i].FSMaturityPreferentialist > random(50,200)>>
	<<if _validFSes.includes("FSAssetExpansionist")>>
		The arcology's Maturity Preferentialist culture @@.yellow;pushes it towards Asset Expansionism,@@ since that's the kind of body many of its slaves have.
		<<set $arcologies[$i].FSAssetExpansionist = 5>><<break>>
	<<elseif _validFSes.includes("FSPaternalist")>>
		The arcology's Maturity Preferentialist culture @@.yellow;pushes it towards Paternalism,@@ since its many older slaves have skills best applied by a happy $woman.
		<<set $arcologies[$i].FSPaternalist = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSPetiteAdmiration > random(50,200)>>
	<<if _validFSes.includes("FSAssetExpansionist")>>
		The arcology's Petite Admiration culture @@.yellow;pushes it towards Asset Expansionist,@@ since a $girl with tits wider than $he is tall attracts quite some attention.
		<<set $arcologies[$i].FSAssetExpansionist = 5>><<break>>
	<<elseif _validFSes.includes("FSPaternalist")>>
		The arcology's Petite Admiration culture @@.yellow;pushes it towards Paternalism,@@ since such tiny <<= $girl>>s need extra special attention.
		<<set $arcologies[$i].FSPaternalist = 5>><<break>>
	<<elseif _validFSes.includes("FSIncestFetishist")>>
		The arcology's Petite Admiration culture @@.yellow;pushes it towards Incest Fetishism,@@ since age play often goes hand-in-hand with size play.
		<<set $arcologies[$i].FSIncestFetishist = 5>><<break>>
	<</if>>
<<elseif $arcologies[$i].FSStatuesqueGlorification > random(50,200)>>
	<<if _validFSes.includes("FSPhysicalIdealist")>>
		The arcology's Statuesque Glorification culture @@.yellow;pushes it towards Physical Idealism,@@ since being ripped complements being tall.
		<<set $arcologies[$i].FSPhysicalIdealist = 5>><<break>>
	<<elseif _validFSes.includes("FSDegradationist")>>
		The arcology's Statuesque Glorification culture @@.yellow;pushes it towards Degradationism,@@ since those that don't measure up deserve only suffering.
		<<set $arcologies[$i].FSDegradationist = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSSlimnessEnthusiast > random(50,200)>>
	<<if _validFSes.includes("FSYouthPreferentialist")>>
		The arcology's Slimness Enthusiast culture @@.yellow;pushes it towards Youth Preferentialism,@@ since younger slaves are often attractively slim.
		<<set $arcologies[$i].FSYouthPreferentialist = 5>><<break>>
	<<elseif _validFSes.includes("FSBodyPurist")>>
		The arcology's Slimness Enthusiast culture @@.yellow;pushes it towards Body Purism,@@ since the last thing they want is prettily slender girls with health trouble.
		<<set $arcologies[$i].FSBodyPurist = 5>><<break>>
	<</if>>
<<elseif $arcologies[$i].FSAssetExpansionist > random(50,200)>>
	<<if _validFSes.includes("FSMaturityPreferentialist")>>
		The arcology's Asset Expansionist culture @@.yellow;pushes it towards Maturity Preferentialism,@@ since MILF slaves tend to come with nice big tits.
		<<set $arcologies[$i].FSMaturityPreferentialist = 5>><<break>>
	<<elseif _validFSes.includes("FSBodyPurist")>>
		The arcology's Asset Expansionist culture @@.yellow;pushes it towards Body Purism,@@ since slaves on curatives are slaves not on growth hormones.
		<<set $arcologies[$i].FSBodyPurist = 5>><<break>>
	<<elseif _validFSes.includes("FSPetiteAdmiration") && _validFSes.includes("FSStatuesqueGlorification")>>
		<<if random(0,1) == 1>>
			The arcology's Asset Expansionist culture @@.yellow;pushes it towards Petite Admiration,@@ since the smaller a slave's body is, the bigger their breasts will look.
			<<set $arcologies[$i].FSPetiteAdmiration = 5>><<break>>
		<<else>>
			The arcology's Asset Expansionist culture @@.yellow;pushes it towards Statuesque Glorification,@@ as the love of all things huge is rather indiscriminate.
			<<set $arcologies[$i].FSStatuesqueGlorification = 5>><<break>>
		<</if>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSPastoralist > random(50,200)>>
	<<if _validFSes.includes("FSBodyPurist")>>
		The arcology's Pastoralist culture @@.yellow;pushes it towards Body Purism,@@ since there have been concerns about milk purity.
		<<set $arcologies[$i].FSBodyPurist = 5>><<break>>
	<<elseif _validFSes.includes("FSAssetExpansionist")>>
		The arcology's Pastoralist culture @@.yellow;pushes it towards Asset Expansionism,@@ since they're convinced that there's no such thing as udders that are too big.
		<<set $arcologies[$i].FSAssetExpansionist = 5>><<break>>
	<<elseif _validFSes.includes("FSRepopulationFocus")>>
		The arcology's Pastoralist culture @@.yellow;pushes it towards Repopulationism,@@ since pregnancy stimulates milk flow.
		<<set $arcologies[$i].FSRepopulationFocus = 5>><<break>>
	<</if>>
<<elseif $arcologies[$i].FSCummunism > random(50,200)>>
	<<if _validFSes.includes("FSPhysicalIdealist")>>
		The arcology's Cummunist culture @@.yellow;pushes it towards Physical Idealism,@@ since big balls and huge loads go hand in hand with masculine muscles.
		<<set $arcologies[$i].FSPhysicalIdealist = 5>><<break>>
	<<elseif _validFSes.includes("FSAssetExpansionist")>>
		The arcology's Cummunist culture @@.yellow;pushes it towards Asset Expansionism,@@ since they're convinced that there's no such thing as balls that are too big.
		<<set $arcologies[$i].FSAssetExpansionist = 5>><<break>>
	<<elseif _validFSes.includes("FSBodyPurist")>>
		The arcology's Cummunist culture @@.yellow;pushes it towards Body Purism,@@ since there have been concerns about cum purity.
		<<set $arcologies[$i].FSBodyPurist = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSHedonisticDecadence > random(50,200)>>
	<<if _validFSes.includes("FSPastoralist")>>
		The arcology's Hedonistic culture @@.yellow;pushes it towards Pastoralism,@@ since nothing beats a nice glass of fresh squeezed milk with your cake.
		<<set $arcologies[$i].FSPastoralist = 5>><<break>>
	<<elseif _validFSes.includes("FSIntellectualDependency")>>
		The arcology's Hedonistic culture @@.yellow;pushes it towards Intellectual Dependency,@@ since higher thought is unneeded when you have everything you want.
		<<set $arcologies[$i].FSIntellectualDependency = 5>><<break>>
	<<elseif _validFSes.includes("FSPaternalist")>>
		The arcology's Hedonistic culture @@.yellow;pushes it towards Paternalism,@@ since happiness is infectious.
		<<set $arcologies[$i].FSPaternalist = 5>><<break>>
	<</if>>
<<elseif $arcologies[$i].FSPhysicalIdealist > random(50,200)>>
	<<if _validFSes.includes("FSBodyPurist")>>
		The arcology's Physical Idealist culture @@.yellow;pushes it towards Body Purism,@@ since it's already used to treating slaves' bodies as temples.
		<<set $arcologies[$i].FSBodyPurist = 5>><<break>>
	<<elseif _validFSes.includes("FSYouthPreferentialist")>>
		The arcology's Physical Idealist culture @@.yellow;pushes it towards Youth Preferentialism,@@ since beauty and athletic prowess do tend to peak early.
		<<set $arcologies[$i].FSYouthPreferentialist = 5>><<break>>
	<<elseif _validFSes.includes("FSStatuesqueGlorification")>>
		The arcology's Physical Idealist culture @@.yellow;pushes it towards Statuesque Glorification,@@ to better emulate the titans of legend.
		<<set $arcologies[$i].FSStatuesqueGlorification = 5>><<break>>
	<<elseif _validFSes.includes("FSCummunism")>>
		The arcology's Physical Idealist culture @@.yellow;pushes it towards Cummunism,@@ since muscular, testosterone filled slaves make admirable cumshots.
		<<set $arcologies[$i].FSCummunism = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSIncestFetishist > random(50,200)>>
	<<if _validFSes.includes("FSRepopulationFocus")>>
		The arcology's Incest Fetishizing culture @@.yellow;pushes it towards Repopulationism,@@ in order to create many new future loving couples.
		<<set $arcologies[$i].FSRepopulationFocus = 5>><<break>>
	<<elseif _validFSes.includes("FSBodyPurist")>>
		The arcology's Incest Fetishizing culture @@.yellow;pushes it towards Body Purism,@@ in order to keep its bloodlines pure.
		<<set $arcologies[$i].FSBodyPurist = 5>><<break>>
	<<elseif _validFSes.includes("FSPaternalist")>>
		The arcology's Incest Fetishizing culture @@.yellow;pushes it towards Paternalism,@@ as healthy slaves live longer allowing relationships to span generations.
		<<set $arcologies[$i].FSPaternalist = 5>><<break>>
	<<elseif _validFSes.includes("FSEgyptianRevivalist")>>
		The arcology's Incest Fetishizing culture @@.yellow;pushes it towards Egyptian Revivalism,@@ as they naturally seek even more incestuous fun.
		<<set $arcologies[$i].FSEgyptianRevivalist = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSChattelReligionist > random(50,200)>>
	<<if _validFSes.includes("FSPaternalist")>>
		The arcology's Chattel Religionist culture @@.yellow;pushes it towards Paternalism,@@ since charitable care for slaves' welfare has become widespread.
		<<set $arcologies[$i].FSPaternalist = 5>><<break>>
	<<elseif _validFSes.includes("FSArabianRevivalist")>>
		The arcology's Chattel Religionist culture @@.yellow;pushes it towards Arabian Revivalism,@@ since such an intermingling of slavery and faith fascinates them.
		<<set $arcologies[$i].FSArabianRevivalist = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSRomanRevivalist > random(50,200)>>
	<<if _validFSes.includes("FSPaternalist")>>
		The arcology's Roman Revivalist culture @@.yellow;pushes it towards Paternalism,@@ since some Roman slaves were traditionally permitted limited rights.
		<<set $arcologies[$i].FSPaternalist = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSNeoImperialist > random(50,200)>>
	<<if _validFSes.includes("FSRestart")>>
		The arcology's Neo-Imperialist culture @@.yellow;pushes it towards Eugenics,@@ since their hegemonic, noble culture naturally views itself as genetically superior to the unwashed masses.
		<<set $arcologies[$i].FSRestart = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSAztecRevivalist > random(50,200)>>
	<<if _validFSes.includes("FSDegradationist")>>
		The arcology's Aztec Revivalist culture @@.yellow;pushes it towards Degradation,@@ since most Aztec war slaves were tortured and sacrificed.
		<<set $arcologies[$i].FSDegradationist = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSEgyptianRevivalist > random(50,200)>>
	<<if _validFSes.includes("FSChattelReligionist")>>
		The arcology's Egyptian Revivalist culture @@.yellow;pushes it towards Chattel Religionism,@@ since worship is already becoming an established part of its life.
		<<set $arcologies[$i].FSChattelReligionist = 5>><<break>>
	<<elseif _validFSes.includes("FSIncestFetishist")>>
		The arcology's Egyptian Revivalist culture @@.yellow;pushes it towards Incest Fetishism,@@ since more incest is only a good thing in its eyes.
		<<set $arcologies[$i].FSIncestFetishist = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSEdoRevivalist > random(50,200)>>
	<<if _validFSes.includes("FSSlimnessEnthusiast")>>
		The arcology's Edo Revivalist culture @@.yellow;pushes it towards Slimness Enthusiasm,@@ since slim and elegant slaves are already fashionable there.
		<<set $arcologies[$i].FSSlimnessEnthusiast = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSArabianRevivalist > random(50,200)>>
	<<if _validFSes.includes("FSChattelReligionist")>>
		The arcology's Arabian Revivalist culture @@.yellow;pushes it towards Chattel Religionism,@@ since the word of God is already a matter of daily significance there.
		<<set $arcologies[$i].FSChattelReligionist = 5>><<break>>
	<</if>>
<</if>>
<<if $arcologies[$i].FSChineseRevivalist > random(50,200)>>
	<<if _validFSes.includes("FSPaternalist")>>
		The arcology's Chinese Revivalist culture @@.yellow;pushes it towards Paternalism,@@ since traditional beliefs about duty and order have become accepted.
		<<set $arcologies[$i].FSPaternalist = 5>><<break>>
	<</if>>
<</if>>

<<set _adopted = 0>> /* did not break out of the for loop, so no FS was adopted */
<<break>>
<</for>>

/* NEIGHBOR ADOPTION*/

<<if _adopted == 0>>
<<for $j = 0; $j < $arcologies.length; $j++>>
	<<if $arcologies[$i].direction != $arcologies[$j].direction>>

		<<set _influenceBonus = 0>>
		<<if $arcologies[$i].direction == $arcologies[$j].influenceTarget>>
			$arcologies[$j].name's directed cultural influence gives it some input over $arcologies[$i].name's choice of direction.
			<<set _influenceBonus = 20>>
		<</if>>

		<<set _opinion = App.Neighbor.opinion($i, $j)>>
		<<if _opinion >= 50>>
			$arcologies[$i].name is aligned with $arcologies[$j].name socially, encouraging it to consider adopting all its cultural values.
			<<set _influenceBonus += _opinion-50>>
		<<elseif _opinion <= -50>>
			$arcologies[$i].name is culturally opposed to $arcologies[$j].name, encouraging it to resist adopting its cultural values.
			<<set _influenceBonus += _opinion+50>>
		<</if>>

		<<for _candidate range _validFSes>>
			<<if _candidate === "FSSubjugationist">>
				<<if ($arcologies[$i].FSSupremacist == "unset") || ($arcologies[$i].FSSupremacistRace != $arcologies[$j].FSSubjugationistRace)>>
					<<if $arcologies[$j].FSSubjugationist > random(0,200)-_influenceBonus>>
						It @@.yellow;adopts $arcologies[$j].FSSubjugationistRace Subjugation@@ due to influence from its trading partner $arcologies[$j].name.
						<<set $arcologies[$i].FSSubjugationist = 5>><<set _adopted = 1>>
						<<set $arcologies[$i].FSSubjugationistRace = $arcologies[$j].FSSubjugationistRace>>
						<<break>>
					<</if>>
				<</if>>
			<<elseif _candidate === "FSSupremacist">>
				<<if ($arcologies[$i].FSSubjugationist == "unset") || ($arcologies[$i].FSSubjugationistRace != $arcologies[$j].FSSupremacistRace)>>
					<<if $arcologies[$j].FSSupremacist > random(0,200)-_influenceBonus>>
						It @@.yellow;adopts $arcologies[$j].FSSupremacistRace Supremacy@@ due to influence from its trading partner $arcologies[$j].name.
						<<set $arcologies[$i].FSSupremacist = 5>><<set _adopted = 1>>
						<<set $arcologies[$i].FSSupremacistRace = $arcologies[$j].FSSupremacistRace>>
						<<break>>
					<</if>>
				<</if>>
			<<else>>
				<<if $arcologies[$j][_candidate] > random(0,200)-_influenceBonus>>
					It @@.yellow;adopts <<= FutureSocieties.displayName(_candidate)>>@@ due to influence from its trading partner $arcologies[$j].name.
					<<set $arcologies[$i][_candidate] = 5>><<set _adopted = 1>>
					<<break>>
				<</if>>
			<</if>>
		<</for>>
		<<if _adopted == 1>>
			<<break>>
		<</if>>
	<</if>>
<</for>>
<</if>>

/* RANDOM ADOPTION*/

<<if _adopted == 0>>
<<if random(0,4) == 1>>
<<switch $arcologies[$i].government>>
<<case "elected officials">>
	<<set $desc = "Its elected leaders are">>
<<case "a committee">>
	<<set $desc = "A majority of its ruling committee is">>
<<case "an oligarchy" "your trustees">>
	<<set $desc = "Its leading citizens are">>
<<case "an individual">>
	<<set $desc = "Its owner is">>
<<case "your agent">>
	<<set $desc = "Your agent and its citizens are">>
<<case "a corporation">>
	<<set $desc = "Most of its board of directors are">>
<<default>>
	<<set $desc = "Its citizens are">>
<</switch>>
<<switch _validFSes.random()>>
<<case "FSSubjugationist">>
	<<set _subjugationRace = setup.filterRacesLowercase.random()>>
	<<if ($arcologies[$i].FSSupremacist == "unset") || (_subjugationRace != $arcologies[$i].FSSupremacistRace)>>
		$desc preoccupied by a racial animus towards _subjugationRace people, leading the arcology to @@.yellow;adopt _subjugationRace Subjugation.@@
		<<set $arcologies[$i].FSSubjugationist = 5>><<set _adopted = 1>>
		<<set $arcologies[$i].FSSubjugationistRace = _subjugationRace>>
	<</if>>
<<case "FSSupremacist">>
	<<set _supremacistRace = setup.filterRacesLowercase.random()>>
	<<if ($arcologies[$i].FSSubjugationist == "unset") || (_supremacistRace != $arcologies[$i].FSSubjugationistRace)>>
		$desc preoccupied by belief in the superiority of the _supremacistRace race, leading the arcology to @@.yellow;adopt _supremacistRace Supremacy.@@
		<<set $arcologies[$i].FSSupremacist = 5>><<set _adopted = 1>>
		<<set $arcologies[$i].FSSupremacistRace = _supremacistRace>>
	<</if>>
<<case "FSGenderRadicalist">>
	$desc enthusiastic about fucking slaves in the butt, leading the arcology to @@.yellow;adopt Gender Radicalism.@@
	<<set $arcologies[$i].FSGenderRadicalist = 5>><<set _adopted = 1>>
<<case "FSGenderFundamentalist">>
	$desc enthusiastic about knocking slaves up, leading the arcology to @@.yellow;adopt Gender Fundamentalism.@@
	<<set $arcologies[$i].FSGenderFundamentalist = 5>><<set _adopted = 1>>
<<case "FSPaternalist">>
	$desc devoted to their slaves' advancement, leading the arcology to @@.yellow;adopt Paternalism.@@
	<<set $arcologies[$i].FSPaternalist = 5>><<set _adopted = 1>>
<<case "FSDegradationist">>
	$desc partial to screaming and struggling, leading the arcology to @@.yellow;adopt Degradationism.@@
	<<set $arcologies[$i].FSDegradationist = 5>><<set _adopted = 1>>
<<case "FSBodyPurist">>
	$desc concerned by trends in their slaves' health, leading the arcology to @@.yellow;adopt Body Purism.@@
	<<set $arcologies[$i].FSBodyPurist = 5>><<set _adopted = 1>>
<<case "FSTransformationFetishist">>
	$desc fascinated with extreme surgery, leading the arcology to @@.yellow;adopt Transformation Fetishism.@@
	<<set $arcologies[$i].FSTransformationFetishist = 5>><<set _adopted = 1>>
<<case "FSYouthPreferentialist">>
	$desc devoted to fucking nubile young slaves, leading the arcology to @@.yellow;adopt Youth Preferentialism.@@
	<<set $arcologies[$i].FSYouthPreferentialist = 5>><<set _adopted = 1>>
<<case "FSMaturityPreferentialist">>
	$desc devoted to time in bed with their MILF slaves, leading the arcology to @@.yellow;adopt Maturity Preferentialism.@@
	<<set $arcologies[$i].FSMaturityPreferentialist = 5>><<set _adopted = 1>>
<<case "FSSlimnessEnthusiast">>
	$desc partial to a slim slave with tight holes, leading the arcology to @@.yellow;adopt Slimness Enthusiasm.@@
	<<set $arcologies[$i].FSSlimnessEnthusiast = 5>><<set _adopted = 1>>
<<case "FSAssetExpansionist">>
	$desc enthusiastic about boobs, the bigger, the better, leading the arcology to @@.yellow;adopt Asset Expansionism.@@
	<<set $arcologies[$i].FSAssetExpansionist = 5>><<set _adopted = 1>>
<<case "FSPastoralist">>
	$desc addicted to breast milk straight from the nipple, leading the arcology to @@.yellow;adopt Pastoralism.@@
	<<set $arcologies[$i].FSPastoralist = 5>><<set _adopted = 1>>
<<case "FSPhysicalIdealist">>
	$desc pretty devoted to spending time in the gym, leading the arcology to @@.yellow;adopt Physical Idealism.@@
	<<set $arcologies[$i].FSPhysicalIdealist = 5>><<set _adopted = 1>>
<<case "FSChattelReligionist">>
	$desc devoutly religious, and interested in a reformation, leading the arcology to @@.yellow;adopt Chattel Religionism.@@
	<<set $arcologies[$i].FSChattelReligionist = 5>><<set _adopted = 1>>
<<case "FSRomanRevivalist">>
	$desc fascinated by classical Roman history, leading the arcology to @@.yellow;adopt Roman Revivalism.@@
	<<set $arcologies[$i].FSRomanRevivalist = 5>><<set _adopted = 1>>
<<case "FSAztecRevivalist">>
	$desc fascinated by ancient Aztec history, leading the arcology to @@.yellow;adopt Aztec Revivalism.@@
	<<set $arcologies[$i].FSAztecRevivalist = 5>><<set _adopted = 1>>
<<case "FSEgyptianRevivalist">>
	$desc fascinated by ancient Egyptian history, leading the arcology to @@.yellow;adopt Egyptian Revivalism.@@
	<<set $arcologies[$i].FSEgyptianRevivalist = 5>><<set _adopted = 1>>
<<case "FSEdoRevivalist">>
	$desc fascinated by Japanese history, leading the arcology to @@.yellow;adopt Edo Revivalism.@@
	<<set $arcologies[$i].FSEdoRevivalist = 5>><<set _adopted = 1>>
<<case "FSArabianRevivalist">>
	$desc fascinated by Arabian romanticism, leading the arcology to @@.yellow;adopt Arabian Revivalism.@@
	<<set $arcologies[$i].FSArabianRevivalist = 5>><<set _adopted = 1>>
<<case "FSChineseRevivalist">>
	$desc fascinated by the long tale of Chinese history, leading the arcology to @@.yellow;adopt Chinese Revivalism.@@
	<<set $arcologies[$i].FSChineseRevivalist = 5>><<set _adopted = 1>>
<<case "FSRepopulationFocus">>
	$desc concerned for the future, and partial to watching bellies swell, leading the arcology to @@.yellow;adopt Repopulation Efforts.@@
	<<set $arcologies[$i].FSRepopulationFocus = 5>><<set _adopted = 1>>
<<case "FSRestart">>
	$desc concerned for the future, and believing their elite could do a better job, leading the arcology to @@.yellow;adopt Eugenics.@@
	<<set $arcologies[$i].FSRestart = 5>><<set _adopted = 1>>
<<case "FSHedonisticDecadence">>
	$desc obsessed with indulging their every desire, leading the arcology to @@.yellow;adopt Decadent Hedonism.@@
	<<set $arcologies[$i].FSHedonisticDecadence = 5>><<set _adopted = 1>>
<<case "FSCummunism">>
	$desc obsessed with cum, leading the arcology to @@.yellow;adopt Cummunism.@@
	<<set $arcologies[$i].FSCummunism = 5>><<set _adopted = 1>>
<<case "FSIncestFetishist">>
	$desc obsessed with their relatives, leading the arcology to @@.yellow;adopt Incest Fetishism.@@
	<<set $arcologies[$i].FSIncestFetishist = 5>><<set _adopted = 1>>
<<case "FSIntellectualDependency">>
	$desc partial to airheaded horny bimbos, leading the arcology to @@.yellow;adopt Intellectual Dependency.@@
	<<set $arcologies[$i].FSIntellectualDependency = 5>><<set _adopted = 1>>
<<case "FSSlaveProfessionalism">>
	$desc obsessed with crafting the perfect slave, leading the arcology to @@.yellow;adopt Slave Professionalism.@@
	<<set $arcologies[$i].FSSlaveProfessionalism = 5>><<set _adopted = 1>>
<<case "FSPetiteAdmiration">>
	$desc enamored by those shorter than them, leading the arcology to @@.yellow;adopt Petite Admiration.@@
	<<set $arcologies[$i].FSPetiteAdmiration = 5>><<set _adopted = 1>>
<<case "FSStatuesqueGlorification">>
	$desc convinced that tall equals beauty, leading the arcology to @@.yellow;adopt Statuesque Glorification.@@
	<<set $arcologies[$i].FSStatuesqueGlorification = 5>><<set _adopted = 1>>
<<case "FSNeoImperialist">>
	$desc fascinated by the long rule of ancient European monarchs, leading the arcology to @@.yellow;adopt Neo-Imperialism.@@
	<<set $arcologies[$i].FSNeoImperialist = 5>><<set _adopted = 1>>
<</switch>>
<</if>>
<</if>>

<<if _adopted == 0>>
	Its future is bitterly controversial, and no side is predominant this week. The dissension reduces the arcology's prosperity.
	<<set $arcologies[$i].prosperity -= 1>>
<</if>>


code:
:: New Game Plus [nobr]

<<set $ui = "start">> <<unset $SlaveSummaryFiler>>
<<if ndef $slavesToImportMax>><<set $slavesToImportMax = 5>><</if>>

<<set _fee = 50000+($slavesToImportMax*10000)>>
<<run setupLastWeeksCash()>>
<<run setupLastWeeksRep()>>

You have decided to start over and will be able to take a few things with you: a few slaves, a small fraction of your current reserves of money, and possibly even your experience as an arcology owner, which will give you a very powerful career background. Many of your other customizations and settings will be carried over as the defaults for your new game, but can be revised freely.

<<if $cash >= _fee>>
	You have allocated funds to bring up to $slavesToImportMax slaves with you (or your equivalent) to a new arcology. It will cost @@.yellowgreen;<<print cashFormat(_fee)>>@@ to insure another slave's safe transfer.  You have @@.yellowgreen;<<print cashFormat($cash)>>@@ to spend.

[[Increase slave import capacity by 1.|New Game Plus][cashX(forceNeg(_fee), "capEx"), $slavesToImportMax++]]
<<else>>
	You lack the @@.yellowgreen;<<= cashFormat(_fee)>>@@ needed to bring any more than $slavesToImportMax slaves with you (or your equivalent) to a new arcology.
<</if>>

<<set $ngpParams = { nationality: getRevivalistNationality(), prosperity: (250 * $arcologies[0].prosperity * $arcologies[0].ownership) }>>
<<if $freshPC == 0>>
	<<if $retainCareer == 1 && $PC.career != "arcology owner">>
		<<if $week > 52 || ($PC.skill.slaving >= 100 && $PC.skill.trading >= 100 && $PC.skill.warfare >= 100 && $PC.skill.engineering >= 100 && $PC.skill.medicine >= 100 && $PC.skill.hacking >= 100)>>
			You have acquired a fair amount of knowledge regarding arcologies and their day-to-day management in your time spent as one's owner qualifying you as an @@.orange;"arcology owner"!@@ Benefits include:

@@.lime;20% reduced cost of construction.@@

@@.lime;Free additional starting rep along with easy rep maintenance.@@

@@.lime;Reduced mercenary costs.@@

@@.lime;An eye for gingered slaves.@@

@@.lime;An edge in all things data.@@

			<<set $oldCareer = $PC.career>>
			<<if $retainCareer === 1>>
				[[Change career.|New Game Plus][$retainCareer = 0,$PC.career = "arcology owner"]]
			<</if>>
		<<else>>
			You lack the experience needed to qualify for a career change to "arcology owner".
		<</if>>
	<</if>>
	<<if $retainCareer === 0 && $PC.career === "arcology owner">>
		[[Don't change career.|New Game Plus][$retainCareer = 1,$PC.career = $oldCareer]]
	<</if>>

[[Start over with a new player character.|New Game Plus][$freshPC = 1, $retainCareer = 1]]
<<else>>
	[[Use existing player character.|New Game Plus][$freshPC = 0]]
<</if>>

<<if $cheatMode == 1>> <<link "DEBUG: Add all slaves to import list" "New Game Plus">> <<for _ngi = 0; _ngi < $slaves.length; _ngi++>> <<= assignJob($slaves[_ngi], Job.IMPORTED)>> <</for>> <</link>>
 <</if>>

Select up to $slavesToImportMax slaves to be imported into a new game and then click [[here.|init][$saveImported = 1,$oldCareer = "undefined"]]

<<includeDOM App.UI.SlaveList.listNGPSlaves()>>

repo_name: Welptard/fc

license: mit


code:
:: Next Week [nobr]

<<set $HackingSkillMultiplier = upgradeMultiplier('hacking')>>
<<set $upgradeMultiplierArcology = upgradeMultiplier('engineering')>>
<<set $upgradeMultiplierMedicine = upgradeMultiplier('medicine')>>
<<set $upgradeMultiplierTrade = upgradeMultiplier('trading')>>

<<if $rivalOwner != 0>>
	<<set _rival = $arcologies.find(function(s) { return s.rival == 1; })>>
	<<if def _rival>>
		<<set $rivalOwner = _rival.prosperity>>
	<</if>>
<</if>>

<<if $playerAging != 0>>
	<<set $PC.birthWeek += 1>>
	<<if $PC.ovaryAge >= 47 && $PC.ovaries == 1 && ($PC.preg == -1 || $PC.preg == 0)>>
		<<set $PC.preg = -2>>
	<</if>>
	<<if $PC.birthWeek >= 52>>
		<<set $PC.birthWeek = 0>>
		<<if $playerAging == 2>>
			<<set $PC.physicalAge++, $PC.actualAge++, $PC.visualAge++, $PC.ovaryAge++>>
			<<AgePCEffects>>
		<</if>>
	<</if>>
<</if>>
<<if $menstruation == 1>>
<<elseif $PC.geneticQuirks.superfetation == 2 && $PC.womb.length > 0>>
	<<if $PC.fertPeak == 0>>
		<<set $PC.fertPeak = 1>>
	<</if>>
	<<set $PC.fertPeak-->>
<<elseif $PC.fertPeak != 0>>
	<<set $PC.fertPeak = 0>>
<</if>>

/*Adding random changes to the economy*/
<<if $difficultySwitch == 1>>
	<<set _globalEconSeed = random(1,100)>>
	<<if _globalEconSeed > 98>>
		<<set $economy += 2>>
	<<elseif _globalEconSeed > 85>>
		<<set $economy += 1>>
	<<elseif _globalEconSeed <= 2>>
		<<set $economy -= 2>>
	<<elseif _globalEconSeed <= 25 + $econRate * 10>>
		<<set $economy -= 1>>
	<</if>>
	<<if $economy < 20>>
		<<set $economy = 20>>
	<</if>>
	<<set _localEconSeed = random(1,100)>>
	<<if $localEcon <= ($economy + $econAdvantage)>>
		<<if _localEconSeed > 95>>
			<<set $localEcon += 2>>
		<<elseif _localEconSeed > 50>>
			<<set $localEcon += 1>>
		<<elseif _localEconSeed <= 1>>
			<<set $localEcon -= 2>>
		<<elseif _localEconSeed <= 10>>
			<<set $localEcon -= 1>>
		<</if>>
	<<elseif $localEcon <= ($economy + $econAdvantage + 5)>>
		<<if _localEconSeed > 98>>
			<<set $localEcon += 2>>
		<<elseif _localEconSeed > 66>>
			<<set $localEcon += 1>>
		<<elseif _localEconSeed <= 2>>
			<<set $localEcon -= 2>>
		<<elseif _localEconSeed <= 33>>
			<<set $localEcon -= 1>>
		<</if>>
	<<elseif _localEconSeed > 99>>
		<<set $localEcon += 2>>
	<<elseif _localEconSeed > 90>>
		<<set $localEcon += 1>>
	<<elseif _localEconSeed <= 5>>
		<<set $localEcon -= 2>>
	<<elseif _localEconSeed <= 50>>
		<<set $localEcon -= 1>>
	<</if>>
	<<if $localEcon < 20>>
		<<set $localEcon = 20>>
	<</if>>

	<<if $experimental.food == 1>>
		<<if $localEcon > 100>>
			<<set $farmyardFoodCost = Math.max(5 / (1 + (Math.trunc(1000-100000/$localEcon)/10)/100), 3.125)>>
		<<elseif $localEcon == 100>>
			<<set $farmyardFoodCost = 5 >>
		<<else>>
			<<set $farmyardFoodCost = Math.min(5 * (1 + 1.5 * Math.sqrt(Math.trunc(100000/$localEcon-1000)/10)/100), 6.5)>>
		<</if>>
	<</if>>
	<<set $foodCost = Math.trunc(2500/$localEcon)>>
	<<set $drugsCost = Math.trunc(10000/$localEcon)>>
	<<set $rulesCost = Math.trunc(10000/$localEcon)>>
	<<set $modCost = Math.trunc(5000/$localEcon)>>
	<<set $surgeryCost = Math.trunc(30000/($localEcon * ($PC.career === "medicine" ? 2 : 1)))>>
<</if>>

<<set $arcologies[0].prosperity = Math.clamp($arcologies[0].prosperity, 1, $AProsperityCap)>>

<<set $averageTrust = 0, $averageDevotion = 0, _slavesContributing = 0, _OldHG = -1, _NewHG = -1, _SL = $slaves.length>>
<<if $studio == 1>>
	<<for _genre range App.Porn.getAllGenres()>>
		<<set $pornStars[_genre.fameVar].p1count = 0>>
	<</for>>
<</if>>
<<for _i = 0; _i < _SL; _i++>>
	<<if def $slaves[_i].curBabies>>
		<<run delete $slaves[_i].curBabies>>
	<</if>>
	<<run ageSlaveWeeks($slaves[_i])>>
	<<if $slaves[_i].indenture > 0>>
		<<set $slaves[_i].indenture -= 1>>
	<</if>>
	<<if $slaves[_i].induceLactation > 0>>
		<<set $slaves[_i].induceLactation-->>
	<</if>>
	<<if ($slaves[_i].lactation == 1)>>
		<<if $slaves[_i].lactationDuration == 1>>
			<<set $slaves[_i].boobsMilk = 10*$slaves[_i].lactationAdaptation>>
			<<set $slaves[_i].boobs += $slaves[_i].boobsMilk>>
		<</if>>
	<</if>>
	<<if $menstruation == 1>>
	<<elseif $slaves[_i].geneticQuirks.superfetation == 2 && $slaves[_i].womb.length > 0>>
		<<if $slaves[_i].fertPeak == 0>>
			<<set $slaves[_i].fertPeak = 1>>
		<</if>>
		<<set $slaves[_i].fertPeak-->>
	<<elseif $slaves[_i].fertPeak != 0>>
		<<set $slaves[_i].fertPeak = 0>>
	<</if>>
	<<set $slaves[_i].trust = Number($slaves[_i].trust.toFixed(1)), $slaves[_i].devotion = Number($slaves[_i].devotion.toFixed(1))>>
	<<set $slaves[_i].oldDevotion = $slaves[_i].devotion, $slaves[_i].oldTrust = $slaves[_i].trust, $slaves[_i].minorInjury = 0>>
	<<if $slaves[_i].sentence > 1>>
		<<set $slaves[_i].sentence -= 1>>
	<<elseif $slaves[_i].sentence == 1>>
		<<= removeJob($slaves[_i], $slaves[_i].assignment)>>
	<</if>>
	<<if $slaves[_i].weekAcquired < 0>>
		<<set $slaves[_i].weekAcquired = 0>>
	<</if>>
	<<if $slaves[_i].relationship == 0>>
		<<set $slaves[_i].relationshipTarget = 0>>
	<</if>>
	<<if $slaves[_i].rivalry == 0>>
		<<set $slaves[_i].rivalryTarget = 0>>
	<<elseif $slaves[_i].rivalry < 0>>
		<<set $slaves[_i].rivalryTarget = 0, $slaves[_i].rivalry = 0>>
	<</if>>
	<<if $slaves[_i].vagina < 0>>
		<<set $slaves[_i].vaginalAccessory = "none", $slaves[_i].chastityVagina = 0, $slaves[_i].vaginaPiercing = 0>>
	<</if>>
	<<if $slaves[_i].dick == 0>>
		<<set $slaves[_i].dickAccessory = "none", $slaves[_i].chastityPenis = 0, $slaves[_i].dickTat = 0, $slaves[_i].dickPiercing = 0>>
	<</if>>
	/* I don't trust these */
	<<if !hasAnyArms($slaves[_i])>>
		<<set $slaves[_i].armsTat = 0, $slaves[_i].nails = 0, $slaves[_i].armAccessory = "none">>
	<</if>>
	<<if !hasAnyLegs($slaves[_i])>>
		<<set $slaves[_i].heels = 0, $slaves[_i].shoes = "none", $slaves[_i].legAccessory = "none", $slaves[_i].legsTat = 0>>
	<</if>>
	/* irregular leptin production weight gain/loss setter */
	<<if $slaves[_i].geneticQuirks.wGain == 2 && $slaves[_i].geneticQuirks.wLoss == 2>>
		<<set $slaves[_i].weightDirection = either(-1, 1)>>
	<<elseif $slaves[_i].geneticQuirks.wGain == 2>>
		<<set $slaves[_i].weightDirection = 1>>
	<<elseif $slaves[_i].geneticQuirks.wLoss == 2>>
		<<set $slaves[_i].weightDirection = -1>>
	<<else>>
		<<set $slaves[_i].weightDirection = 0>>
	<</if>>
	/% Fix some possible floating point rounding errors, and bring precision to one decimal place. %/
	<<run SlaveStatClamp($slaves[_i])>>
	<<set $slaves[_i].energy = Math.clamp($slaves[_i].energy.toFixed(1), 0, 100)>>
	<<set $slaves[_i].attrXY = Math.clamp($slaves[_i].attrXY.toFixed(1), 0, 100)>>
	<<set $slaves[_i].attrXX = Math.clamp($slaves[_i].attrXX.toFixed(1), 0, 100)>>
	<<if $slaves[_i].fetishStrength > 95>>
		<<set $slaves[_i].fetishStrength = 100>>
	<<else>>
		<<set $slaves[_i].fetishStrength = Math.clamp($slaves[_i].fetishStrength.toFixed(1), 0, 100)>>
	<</if>>
	<<set $slaves[_i].weight = Math.clamp($slaves[_i].weight.toFixed(1), -100, 200)>>
	<<set $slaves[_i].butt = Number($slaves[_i].butt.toFixed(1))>>
	<<set $slaves[_i].muscles = Math.clamp($slaves[_i].muscles.toFixed(1), -100, 100)>>
	<<set $slaves[_i].face = Math.clamp($slaves[_i].face.toFixed(1), -100, 100)>>
	<<set $slaves[_i].lips = Math.clamp($slaves[_i].lips.toFixed(1), 0, 100)>>
	<<set $slaves[_i].skill.oral = Math.clamp($slaves[_i].skill.oral.toFixed(1), 0, 100)>>
	<<set $slaves[_i].skill.vaginal = Math.clamp($slaves[_i].skill.vaginal.toFixed(1), 0, 100)>>
	<<set $slaves[_i].skill.anal = Math.clamp($slaves[_i].skill.anal.toFixed(1), 0, 100)>>
	<<set $slaves[_i].skill.whoring = Math.clamp($slaves[_i].skill.whoring.toFixed(1), 0, 100)>>
	<<set $slaves[_i].skill.entertainment = Math.clamp($slaves[_i].skill.entertainment.toFixed(1), 0, 100)>>
	<<set $slaves[_i].lactationAdaptation = Math.clamp($slaves[_i].lactationAdaptation.toFixed(1), 0, 100)>>
	<<set $slaves[_i].intelligenceImplant = Number($slaves[_i].intelligenceImplant.toFixed(1), 0, 30)>>
	<<set $slaves[_i].prematureBirth = 0>>
	<<if ($HGSuiteEquality == 1) && ($HeadGirlID != 0) && ($slaves[_i].devotion > 50)>>
		<<if ($slaves[_i].assignment == "live with your Head Girl")>>
			<<set _NewHG = _i>>
		<<elseif ($slaves[_i].ID == $HeadGirlID)>>
			<<set _OldHG = _i>>
		<</if>>
	<</if>>
	/* AVERAGE VALUES UPDATE */
	<<if assignmentVisible($slaves[_i])>>
		<<set $averageTrust += $slaves[_i].trust, $averageDevotion += $slaves[_i].devotion, _slavesContributing++>>
	<<elseif ($slaves[_i].assignment != "be confined in the cellblock") && ($slaves[_i].assignment != "be confined in the arcade") && (($slaves[_i].assignment != "work in the dairy") || ($dairyRestraintsSetting < 2)) && $slaves[_i].assignment != "labor in the production line">>
		<<set $averageTrust += $slaves[_i].trust*0.5, $averageDevotion += $slaves[_i].devotion*0.5, _slavesContributing += 0.5>>
	<</if>>
	<<if $studio == 1>>
		<<set _activeGenres = App.Porn.getAllGenres().filter((g) => $slaves[_i].porn.fame[g.fameVar] > 0)>>
		<<for _genre range _activeGenres>>
			<<set $pornStars[_genre.fameVar].p1count++>>
		<</for>>
	<</if>>
	<<if $slaves[_i].choosesOwnAssignment > 0>>
		<<= assignJob($slaves[_i], "choose her own job")>>
	<</if>>
<</for>>
<<if _slavesContributing != 0>>
	<<set $averageTrust = $averageTrust/_slavesContributing>>
	<<set $averageDevotion = $averageDevotion/_slavesContributing>>
<</if>>
<<set $enduringTrust = ($averageTrust+($enduringTrust*3))/4>>
<<set $enduringDevotion = ($averageDevotion+($enduringDevotion*3))/4>>

<<if (_OldHG != -1) && (_NewHG != -1)>>
	<<set _oldTimeInGrade = $HGTimeInGrade>> /* preserve time in grade during HG swaps */
	<<if $personalAttention == "HG">>
		/* keep removeJob from clearing PC HG supporting. */
		<<set _keepHelpingHG = 1>>
	<</if>>
	<<= removeJob($slaves[_NewHG], "live with your Head Girl")>>
	<<= assignJob($slaves[_OldHG], "live with your Head Girl")>>
	<<= assignJob($slaves[_NewHG], "be your Head Girl")>>
	<<set $slaves[_NewHG].diet = "healthy", $HGTimeInGrade = _oldTimeInGrade>>
	<<if _keepHelpingHG>>
		<<set $personalAttention = "HG">>
	<</if>>
<</if>>

<<set _toSearch = $PC.refreshment.toLowerCase()>>
<<if _toSearch.indexOf("fertility") != -1>>
	<<set $PC.forcedFertDrugs = 1>>
<<elseif $PC.forcedFertDrugs > 0>>
	<<set $PC.forcedFertDrugs-->>
<</if>>

<<if $FCTV.receiver > 0>>
	<<if $FCTV.pcViewership.frequency != -1>>
		<<set $FCTV.pcViewership.count++>>
		<<if $FCTV.pcViewership.count >= $FCTV.pcViewership.frequency>>
			<<set $FCTV.pcViewership.count = 0>>
		<</if>>
	<</if>>
<</if>>

<<set $week++>>

<<if $playerSurgery > 0>>
	<<set $playerSurgery-->>
<</if>>

<<if $secExpEnabled > 0>>
	<<if $foughtThisWeek == 1>>
		<<set $foughtThisWeek = 0>>
	<</if>>

	<<if $SecExp.buildings.riotCenter && $SecExp.buildings.riotCenter.sentUnitCooldown > 0>>
		<<set $SecExp.buildings.riotCenter.sentUnitCooldown-->>
	<</if>>
	<<if $SecExp.proclamation.cooldown > 0>>
		<<set $SecExp.proclamation.cooldown-->>
	<</if>>
<</if>>

<<include "Weather">>

<<if $boomerangWeeks>><<set $boomerangWeeks++>><<else>><<set $boomerangSlave = 0>><</if>>
<<if $traitorWeeks>><<set $traitorWeeks++>><</if>>

<<set $thisWeeksFSWares = $merchantFSWares.randomMany(2)>>
<<set $thisWeeksIllegalWares = $merchantIllegalWares.randomMany(1)>>
<<set $prisonCircuitIndex++>><<if $prisonCircuitIndex >= $prisonCircuit.length>><<set $prisonCircuitIndex = 0>><</if>>

<<set $coursed = 0, $prestigeAuctioned = 0, $eliteAuctioned = 0, $shelterSlave = 0, $shelterSlaveBought = 0, $slaveMarketLimit = 10 + ($rep / 1000), $slavesSeen = 0, $slavesSacrificedThisWeek = 0, $subSlaves = 0>>

<<if $pit>>
	<<set $pit.fought = false>>
<</if>>

/% These are variables that either should be made into _temp vars or should be Zeroed out once done with them instead of here. This can also interfere with debugging or hide NaN's as zeroing things out would clear a NaN. Also could stop from NaN's getting worse? %/
/% Integer and float variables. No real need to zero them out but doesn't hurt to have them in a known state, though this might mask variables NaN'ing out. Takes up the least amount of Memory besides a "" string. %/
<<set $i = 0, $j = 0, $averageProsperity = 0, $motherSlave = -1, $daughterSlave = -1, $devMother = -1, $devDaughter = -1, $alphaTwin = -1, $betaTwin = -1, $youngerSister = -1, $olderSister = -1>>
<<set $boobsID = -1, $boobsInterestTargetID = -1, $buttslutID = -1, $buttslutInterestTargetID = -1, $cumslutID = -1, $cumslutInterestTargetID = -1, $humiliationID = -1, $humiliationInterestTargetID = -1, $sadistID = -1, $sadistInterestTargetID = -1, $masochistID = -1, $masochistInterestTargetID = -1, $domID = -1, $dominantInterestTargetID = -1, $subID = -1, $submissiveInterestTargetID = -1, $shelterGirlID = -1>>

/% Other arrays %/
<<set $events = [], $RESSevent = [], $RESSTRevent = [], $RETSevent = [], $RECIevent = [], $RecETSevent = [], $REFIevent = [], $REFSevent = [], $PESSevent = [], $PETSevent = [], $FSAcquisitionEvents = [], $FSNonconformistEvents = [], $REAnalCowgirlSubIDs = [], $REButtholeCheckinIDs = [], $recruit = [], $RETasteTestSubIDs = [], $rebelSlaves = [], $REBoobCollisionSubIDs = [], $REIfYouEnjoyItSubIDs = [], $RESadisticDescriptionSubIDs = [], $REShowerForceSubIDs = [], $RECockmilkInterceptionIDs = [], $REInterslaveBeggingIDs = [], $bedSlaves = [], $eligibleSlaves = []>>

/% Slave Objects using 0 instead of null. Second most memory eaten up. %/
<<set $activeSlave = 0, $eventSlave = 0, $subSlave = 0, $milkTap = 0, $relation = 0, $relative = 0, $relative2 = 0>>

/% Slave Objects that never get zeroed so null them here. Second most memory eaten up. %/
<<set $beforeGingering = null>>

/% Strings Memory varies. %/
<<set $buyer = "", $desc = "", $event = "", $goto = "", $malefactor = "">>
/% Done with zeroing out, what should be for the most part Temps %/

<<if $autosave != 0>>
	<<script>>Save.autosave.save("Week Start Autosave")<</script>>
<</if>>

<<if $SF.Toggle && $SF.FS.Tension > 100>>
	<<if ($rep > 17500)>> <<set $rep = 17500>> <</if>>
<</if>>
<<set $NaNArray = findNaN()>>
<<goto "Main">>


code:
:: Nonrandom Event

<<set $activeSlave = 0, $eventSlave = 0>>

<<if $plot>>

<<set _effectiveWeek = $week-$nationHate>>
<<if (_effectiveWeek == 4) && ($arcologies[0].name.indexOf("Arcology ") != -1)>>
	<<set $Event = "arcology naming">>
	<<goto "Generic Plot Events">>
<<elseif (_effectiveWeek >= 5 && $FCTV.receiver == -1)>>
	<<goto "SE FCTV Install">>
<<elseif (_effectiveWeek == 6)>>
	<<set $Event = "strip club closing">>
	<<goto "Generic Plot Events">>
<<elseif (_effectiveWeek == 8)>>
	<<set $Event = "strip club aftermath">>
	<<goto "Generic Plot Events">>
<<elseif (_effectiveWeek == 11)>>
	<<set $Event = "assistant">>
	<<goto "Assistant Events">>
<<elseif (_effectiveWeek == 12) && $raped == -1 && $arcologyUpgrade.drones != 1 && $BodyguardID == 0 && $PC.career != "arcology owner">>
	<<goto "P raped">>
<<elseif (_effectiveWeek == 14) && $badC != 1>>
	<<set _valid = $slaves.find(function(s) { return s.curatives > 1 || s.inflationType == "curative"; })>>
	<<if def _valid>>
		<<set $badC = 1, $Event = "bad curatives">>
		<<goto "Generic Plot Events">>
	<<else>>
		<<set $badC = 1>>
		<<goto "Nonrandom Event">>
	<</if>>
<<elseif (_effectiveWeek >= 15) && ($arcologies[0].FSNeoImperialistLaw1 == 1) && $assholeKnight != 1>>
	<<set $assholeKnight = 1>>
	<<set $imperialEventweek = _effectiveWeek>>
	<<goto "SE assholeknight">>
<<elseif (_effectiveWeek == 17)>>
	<<set $Event = "shoot invitation">>
	<<goto "Generic Plot Events">>
<<elseif (_effectiveWeek == 20)>>
	<<set $Event = "slave food">>
	<<goto "Generic Plot Events">>
<<elseif (_effectiveWeek == 24)>>
	<<set $Event = "militia">>
	<<goto "Generic Plot Events">>
<<elseif ($week == 29)>>
	<<set $Event = "aid invitation">>
	<<goto "Generic Plot Events">>
<<elseif (_effectiveWeek == 31) && ($mercenaries == 0)>>
	<<goto "P mercenaries">>
<<elseif (_effectiveWeek == 35) && ($mercenaries > 0)>>
	<<goto "P snatch and grab">>
<<elseif (_effectiveWeek == 43)>>
	<<goto "P invasion">>
<<elseif (_effectiveWeek == 44) && ($mercenaries > 0) && $mercRomeo != 1>>
	<<set _valid = $slaves.find(function(s) { return (["serve the public", "serve in the club", "whore", "work in the brothel"].includes(s.assignment) || s.counter.publicUse >= 50) && s.fetish != "mindbroken" && s.fuckdoll == 0; })>>
	<<set $mercRomeo = 1>>
	<<if def _valid>>
		<<goto "P mercenary romeo">>
	<<else>>
		<<goto "Nonrandom Event">>
	<</if>>
<<elseif (_effectiveWeek == 46) && ($mercenaries > 0)>>
	<<goto "P raid invitation">>
<<elseif (_effectiveWeek == 48) && ($experimental.food == 1)>>
	<<set $foodCrisis = 1>>
	<<goto "P food crisis">>
<<elseif (_effectiveWeek == 50) && ($rations > 0)>>
	<<set $foodCrisis = 2>>
	<<goto "P food crisis">>
<<elseif (_effectiveWeek == 52) && ($seeHyperPreg == 1) && $seePreg != 0 && $badB != 1>>
	<<set _valid = $slaves.find(function(s) { return s.drugs == "breast injections" || s.drugs == "hyper breast injections" || s.drugs == "intensive breast injections"; })>>
	<<if def _valid>>
		<<set $badB = 1, $Event = "bad breasts">>
		<<goto "Generic Plot Events">>
	<<else>>
		<<set $badB = 1>>
		<<goto "Nonrandom Event">>
	<</if>>
<<elseif _effectiveWeek == 54 && (def $peacekeepers) && $peacekeepers.attitude >= 0>>
	<<goto "P peacekeepers deficit">>
<<elseif (_effectiveWeek == 56)>>
	<<set $collaboration = 0>>
	<<set $traitor = 0>>
	<<set $hackerSupport = 0>>
	<<goto "P underground railroad">>
<<elseif (_effectiveWeek == 58) && ($traitor == 0)>>
	<<goto "P bombing">>
<<elseif (_effectiveWeek == 60) && ($rations > 0)>>
	<<set $foodCrisis = 3>>
	<<goto "P food crisis">>
<<elseif (_effectiveWeek == 61) && ($traitor != 0)>>
	<<goto "P traitor message">>
<<elseif (_effectiveWeek == 62) && ($mercenaries < 3)>>
	<<goto "P defense fears">>
<<elseif (_effectiveWeek == 65) && ($mercenaries >= 3)>>
	<<goto "P citizens and civilians">>
<<elseif (_effectiveWeek == 67) && ($traitor != 0)>>
	<<goto "P collaboration choice">>
<<elseif (_effectiveWeek == 69)>>
	<<goto "P hacker support">>
<<elseif (_effectiveWeek == 70) && ($collaboration == 1) && $traitorType != "trapper">>
	<<goto "P coup collaboration">>
<<elseif (_effectiveWeek == 71)>>
	<<if $traitorType != "agent" && $traitorType != "trapper">>
		<<set _doubleAgent = 0>>
	<<else>>
		<<set _doubleAgent = 1>>
	<</if>>
	<<if $traitorType == "trapper">>
		<<goto "P coup betrayal">>
	<<elseif $mercenaries + $personalArms + $hackerSupport + _doubleAgent < 5>>
		<<goto "P coup loss">>
	<<else>>
		<<goto "P coup attempt">>
	<</if>>
<<elseif (_effectiveWeek == 72)>>
	<<goto "P coup aftermath">>
<<elseif $SF.Toggle && $SF.Active === -1 && _effectiveWeek >= 72>>
	<<goto "Security Force Proposal">>
<<elseif $arcologies[0].FSRestart != "unset" && $failedElite > 300 && $eugenicsFullControl != 1>>
	<<goto "eliteTakeOver">>
<<elseif (_effectiveWeek > 5) && ($rep > 3000) && ($FSAnnounced == 0)>>
	<<goto "P FS Announcement">>
<<elseif _effectiveWeek > 18 && $assistant.personality > 0 && !$assistant.options>>
	<<set $Event = "assistant SP">>
	<<goto "Assistant Events">>
<<elseif (_effectiveWeek > 45) && ($bodyswapAnnounced == 0) && ($surgeryUpgrade == 1)>>
	<<goto "P Bodyswap Reveal">>
<<elseif _effectiveWeek > 48 && $invasionVictory > 0 && $peacekeepers == 0 && $peacekeepersGone != 1>>
	<<goto "P peacekeepers intro">>
<<elseif ($arcologies[0].prosperity > 80) && (App.Utils.schoolCounter() == 0) && ($schoolSuggestion == 0)>>
	<<goto "P school suggestion">>
<<elseif ($assistant.fsOptions !== 1) && $assistant.personality > 0 && $assistant.appearance != "normal" && FutureSocieties.HighestDecoration() >= 40>>
	<<set $Event = "assistant FS">>
	<<goto "Assistant Events">>
<<elseif $assistant.personality > 0 && !$assistant.announcedName && $assistant.power > 0>>
	<<set $Event = "assistant name">>
	<<goto "Assistant Events">>
<<elseif !$assistant.market && $assistant.power > 1>>
	<<set $Event = "market assistant">>
	<<goto "Assistant Events">>
<<elseif (_effectiveWeek > 70) && ($corp.Incorporated > 0) && ($rivalOwnerEnslaved > 0) && ($mercenaries >= 3) && ($mercenariesHelpCorp == 0) && ($corp.DivExtra > 0)>>
	<<goto "P Mercs Help Corp">>
<<elseif _effectiveWeek > 75 && (def $peacekeepers) && $peacekeepers.strength < 50 && $rivalOwner == 0 && $peacekeepersFate != 1>>
	<<goto "P peacekeepers independence">>
<<elseif (def $peacekeepers) && $peacekeepers.strength >= 50 && $peacekeepers.influenceAnnounced == 0>>
	<<goto "P peacekeepers influence">>
<<elseif ($cash > 120000) && ($rep > 4000) && ($corp.Announced == 0)>>
	<<goto "P Corp Announcement">>
<<elseif ($rivalOwner > 0)>>
	<<if $hostageAnnounced == 0 && $rivalSet != 0>>
		<<goto "P rivalry hostage">>
	<<elseif ($rivalOwner-$rivalryPower+10)/$arcologies[0].prosperity < 0.5>>
		<<goto "P rivalry victory">>
	<<elseif $peacekeepers.attitude > 5 && $rivalryDuration > 1>>
		<<goto "P rivalry peacekeepers">>
	<<else>>
		<<goto "P rivalry actions">>
	<</if>>
<<elseif ($arcologies[0].FSPaternalistDecoration == 100) && ($swanSong == 2) && ($week-$swanSongWeek >= 3)>>
	<<goto "RE The Siren Strikes Back">>
<<elseif ($eventResults.shoot == 1)>>
	<<set $Event = "shoot result">>
	<<goto "Generic Plot Events">>
<<elseif ($eventResults.snatch == 1)>>
	<<goto "P snatch and grab result">>
<<elseif ($eventResults.raid == 1)>>
	<<goto "P raid result">>
<<elseif ($eventResults.aid == 1)>>
	<<set $Event = "aid result">>
	<<goto "Generic Plot Events">>
<<elseif ($eventResults.slaveMedic > 0)>>
	<<goto "P slave medic">>
<<elseif ($eventResults.pit == 1) && ($BodyguardID != 0)>>
	<<goto "PE pit fight">>
<<elseif (_effectiveWeek >= 37) && ($arcologies[0].FSNeoImperialistLaw1 == 1) && ($arcologies[0].FSNeoImperialistLaw2 == 1) && $poorKnight != 1 && _effectiveWeek >= $imperialEventWeek+3>>
	<<set $poorKnight = 1>>
	<<set $imperialEventweek = _effectiveWeek>>
	<<goto "SE poorknight">>
<<elseif (_effectiveWeek >= 40) && ($arcologies[0].prosperity > 80) && ($arcologies[0].FSNeoImperialistLaw2 == 1) && $newBaron != 1 && _effectiveWeek >= $imperialEventWeek+3>>
	<<set $newBaron = 1>>
	<<set $imperialEventweek = _effectiveWeek>>
	<<goto "SE newBaron">>
<<elseif $rivalOwner == 0 && $secExpEnabled > 0 && (_effectiveWeek >= 74 && $SecExp.smilingMan.progress === 0 || _effectiveWeek >= 77 && $SecExp.smilingMan.progress === 1 || _effectiveWeek >= 82 && $SecExp.smilingMan.progress === 2 || $SecExp.smilingMan.progress === 3)>>
	<<goto "secExpSmilingMan">>
<<elseif ($rivalOwner == 0) && ($seeFCNN == 1) && ($FCNNstation == 0) && ($week > 95) && ($cash > 200000) && ($rep > 7500)>>
	<<goto "SE FCNN Station">>
<<elseif _effectiveWeek >= $murderAttemptWeek>>
	<<goto "Murder Attempt">>
<<elseif $illegalDeals.slave !== 0 && $illegalDeals.slave !== -1>>
	<<set $event = "slave trade">>
	<<goto "Murder Attempt">>
<<elseif $illegalDeals.trade !== 0 && $illegalDeals.trade !== -1 && _effectiveWeek >= $illegalDeals.trade.week>>
	<<set $event = "trade deal">>
	<<goto "Murder Attempt">>
<<elseif $illegalDeals.military !== 0 && $illegalDeals.military !== -1 && _effectiveWeek >= $illegalDeals.military.week>>
	<<set $event = "military deal">>
	<<goto "Murder Attempt">>
<<else>>
	<<if random(1,100) > _effectiveWeek+25>>
		<<goto "RIE Eligibility Check">>
	<<else>>
		<<goto "Random Nonindividual Event">>
	<</if>>
<</if>>

<<else>>

<<if random(1,200) > _effectiveWeek+100 || $hostageRescued == 1>>
	<<goto "RIE Eligibility Check">>
<<else>>
	<<goto "Random Nonindividual Event">>
<</if>>

<</if>>


code:
:: Nurse Select [nobr jump-to-safe jump-hidden jump-from-safe]

<<set $nextButton = "Back", $nextLink = "Clinic", $encyclopedia = "Nurse">>
<<if _S.Nurse>>
	<<setLocalPronouns _S.Nurse>>
	<<= SlaveFullName(_S.Nurse)>> is serving as your Nurse.

$He will help heal your slaves.
<<else>>
	You have not selected a Nurse.
<</if>>

''Appoint a Nurse from your devoted slaves:''

[[None|Clinic][removeJob(_S.Nurse, "be the Nurse")]]

<<includeDOM App.UI.SlaveList.facilityManagerSelection(App.Entity.facilities.clinic, "Clinic")>>