code:
:: Neighbors Development [nobr]

<<set $averageProsperity = 0, _agentBonus = 0>>
<<for $i = 0; $i < $arcologies.length; $i++>>
	<<if $arcologies[$i].prosperity < 10>>
		<<set $arcologies[$i].prosperity = 10>>
	<</if>>
	<<set $averageProsperity += $arcologies[$i].prosperity>>
<</for>>
<<set $averageProsperity = $averageProsperity/$arcologies.length>>

<<if $corp.Incorporated == 1>>
	<<set _corpBonus = Math.trunc(1000 * Math.pow(App.Corporate.value, 0.1))>>
<</if>>

<<if $useTabs == 0>>__Arcologies in the Free City__<</if>>

<<for $i = 0; $i < $arcologies.length; $i++>>

<br>
'' $arcologies[$i].name'', your <<if $arcologies[$i].direction == 0>>arcology<<else>>neighbor to the $arcologies[$i].direction<</if>>,

/* PROSPERITY */

<<if $arcologies[$i].direction != 0>>
	<<switch $arcologies[$i].government>>
	<<case "elected officials">>
		<<set $arcologies[$i].prosperity += random(-1,1)>>
	<<case "a corporation" "an oligarchy">>
		<<set $arcologies[$i].prosperity += random(-1,2)>>
	<<case "a committee" "your trustees">>
		<<set $arcologies[$i].prosperity += random(0,2)>>
	<<case "an individual">>
		<<set $arcologies[$i].prosperity += random(0,3)>>
	<<case "your agent">>
		<<set _agentBonus = agentBonus($i)>>
		<<set $arcologies[$i].prosperity += random(0,3) + _agentBonus>>
	<<default>>
		<<set $arcologies[$i].prosperity += random(-1,1)>>
	<</switch>>
	<<set $arcologies[$i].prosperity = Math.clamp($arcologies[$i].prosperity, 1, 300)>>
<</if>>

<<if $arcologies[$i].honeymoon > 0>>
	<<set $arcologies[$i].honeymoon -= 1>>
<</if>>

<<if $arcologies[$i].government == "your agent">>
	<<set _Agent = App.currentAgent($i)>>
	<<setLocalPronouns _Agent>>
	is being run by your agent @@.deeppink;<<= SlaveFullName(_Agent)>>.@@
	<<set _agentIndex = $slaveIndices[_Agent.ID]>>
	<<if (def _agentIndex) && $slaves[_agentIndex].assignment != "be your agent">>
		@@.red;BUG: $slaves[_agentIndex].slaveName also was <<print $slaves[_agentIndex].assignment>>!@@
		<<= assignJob($slaves[_agentIndex], "be your agent")>>
	<</if>>
	<<if _agentBonus > 0>>@@.green;$He does an excellent job this week.@@<</if>>
	The arcology
<<elseif $arcologies[$i].government == "your trustees">>
	is being run by @@.mediumseagreen;your trustees.@@ The arcology
<</if>>

<<if $arcologies[$i].direction == 0>>
	<<set _error = 5>>
<<else>>
	<<set _error = 10>>
<</if>>
<<set _error -= Math.min(2*$assistant.power, _error)>>
<<set _prosperity = (Math.trunc((0.1*$arcologies[$i].prosperity*random(100-_error,100+_error))/100))>>
has an estimated GSP of @@.yellowgreen;<<print cashFormat(_prosperity)>><<if $showNumbers != 2>><<if ($showNumbers == 1) && (_prosperity > $showNumbersMax)>>m<<else>> million<</if>><<else>>m<</if>>,@@

<<if ($arcologies[$i].rival == 1) && ($arcologies[$i].government != "an individual")>>
	but it is undergoing some internal turmoil. @@.red;Resentment that has been quietly building among the arcology's elite turns into open rebellion!@@
	<<if $arcologies[$i].PCminority > 0>>
		@@.red;Your ownership interest in $arcologies[$i].name has been annulled!@@
		<<set $arcologies[$i].PCminority = 0>>
	<</if>>
	@@.yellow;After a brief power struggle, it undergoes a change of government.@@
	<<if (def _agentIndex) && _agentIndex != -1>>
		<<setLocalPronouns $slaves[_agentIndex]>>
		@@.deeppink;$slaves[_agentIndex].slaveName@@ manages to escape with the help of a few loyal citizens and returns to you @@.gold;fearing your displeasure at $his failure.@@
		<<set $slaves[_agentIndex].trust -= 40>>
		<<= assignJob($slaves[_agentIndex], "rest")>> /* this takes care of necessary cleanup for agent and agent companion (if any) */
	<</if>>
	A controlling interest has been taken by a single individual, leaving the arcology ruled like yours is.
	<<set $arcologies[$i].government = "an individual">>
	<<set $arcologies[$i].ownership = random(51,61), $arcologies[$i].minority = 100 - $arcologies[$i].ownership - random(1,19), $arcologies[$i].honeymoon += 10>>
<<elseif ($arcologies[$i].government != "your trustees") && ($arcologies[$i].government != "your agent") && ($arcologies[$i].ownership < $arcologies[$i].PCminority) && ($arcologies[$i].direction != 0) && ($arcologies[$i].rival != 1)>>
	undergoing a leadership struggle in which you are deeply concerned, since you now own more of it than its current leadership.
	<<if random(0,10) < $arcologies[$i].PCminority - $arcologies[$i].ownership>>
		@@.yellow;You successfully execute a hostile takeover and now control the arcology.@@ Trustees from among its leading citizens will exercise local control at your direction until you make other arrangements.
		<<set $arcologies[$i].honeymoon += 10>>
		<<set $arcologies[$i].ownership = 0>>
		<<set $arcologies[$i].government = "your trustees">>
	<<else>>
		The current leadership has not yet exhausted its legalistic recourses, and retains control for the moment, causing considerable disruption.
		<<set $arcologies[$i].prosperity -= 3>>
	<</if>>
<<elseif ($arcologies[$i].ownership == 0) && ($arcologies[$i].PCminority > 0) && ($arcologies[$i].minority > $arcologies[$i].PCminority)>>
	undergoing a leadership struggle in which you are deeply concerned, since your ownership share has diminished to a dangerously low point.
	<<if random(0,10) < $arcologies[$i].minority - $arcologies[$i].PCminority>>
		@@.yellow;It undergoes a change of government.@@
		<<set $arcologies[$i].honeymoon += 10>>
		<<set $arcologies[$i].ownership = $arcologies[$i].minority>>
		<<set $arcologies[$i].minority = 0>>
		<<switch $arcologies[$i].government>>
		<<case "your trustees">>
			<<if random(0,2) == 0>>
				Its leading citizens form a corporation to run the arcology more efficiently.
				<<set $arcologies[$i].government = "a corporation">>
			<<else>>
				A power struggle is won by a single individual, leaving the arcology ruled like yours is.
				<<set $arcologies[$i].government = "an individual">>
			<</if>>
		<<default>>
			<<if random(0,2) == 0>>
				The failed individual who led it is run out and replaced by direct democracy.
				<<set $arcologies[$i].government = "direct democracy">>
			<<else>>
				The failed individual who led it is bought out by a corporation.
				<<set $arcologies[$i].government = "a corporation">>
			<</if>>
		<</switch>>
	<<else>>
		The arcology is paralyzed by dissension over how to respond.
		<<set $arcologies[$i].prosperity -= 3>>
	<</if>>
<<elseif ($arcologies[$i].ownership != 0) && (($arcologies[$i].ownership < $arcologies[$i].minority) || ($arcologies[$i].ownership < 10)) && ($arcologies[$i].direction != 0) && ($arcologies[$i].rival != 1)>>
	undergoing a leadership struggle, since its current government owns less of it than its largest rival for control.
	<<if random(0,10) < $arcologies[$i].minority - $arcologies[$i].ownership>>
		@@.yellow;It undergoes a change of government.@@
		<<set $arcologies[$i].honeymoon += 10>>
		<<set $arcologies[$i].ownership = $arcologies[$i].minority>>
		<<set $arcologies[$i].minority = 0>>
		<<switch $arcologies[$i].government>>
		<<case "elected officials">>
			<<if random(0,2) == 0>>
				Its elected officials surrender power to a small group of leading citizens.
				<<set $arcologies[$i].government = "an oligarchy">>
			<<else>>
				Its elected officials are forced to give way to a committee of public safety.
				<<set $arcologies[$i].government = "a committee">>
			<</if>>
		<<case "a committee">>
			<<if random(0,2) == 0>>
				Its ruling committee forms it into a corporation in the hope this will spur growth.
				<<set $arcologies[$i].government = "a corporation">>
			<<else>>
				A power struggle within its ruling committee leaves only a few leading citizens in power.
				<<set $arcologies[$i].government = "an oligarchy">>
			<</if>>
		<<case "an oligarchy">>
			<<if random(0,2) == 0>>
				Its leading citizens form a corporation to run the arcology more efficiently.
				<<set $arcologies[$i].government = "a corporation">>
			<<else>>
				A power struggle is won by a single individual, leaving the arcology ruled like yours is.
				<<set $arcologies[$i].government = "an individual">>
			<</if>>
		<<case "an individual">>
			<<if random(0,2) == 0>>
				The failed individual who led it is run out and replaced by direct democracy.
				<<set $arcologies[$i].government = "direct democracy">>
			<<else>>
				The failed individual who led it is bought out by a corporation.
				<<set $arcologies[$i].government = "a corporation">>
			<</if>>
		<<case "a corporation">>
			<<if random(0,2) == 0>>
				A power struggle within the corporation that runs it is won by a single person.
				<<set $arcologies[$i].government = "an individual">>
			<<else>>
				The corporation that runs it collapses and is replaced by an oligarchy of rich shareholders.
				<<set $arcologies[$i].government = "an oligarchy">>
			<</if>>
		<<default>>
			Its direct democracy votes to empower some elected officials in the hope they can lead the arcology out of its problems.
			<<set $arcologies[$i].government = "elected officials">>
		<</switch>>
		<<set _desc = FutureSocieties.decay($i).map((fs) => FutureSocieties.displayName(fs))>>
		<<if _desc.length > 2>>
			Its citizens take the opportunity to make radical social changes, @@.cyan;purging the <<= _desc.reduce((res, ch, i, arr) => res + (i === arr.length - 1 ? ' and ' : ', ') + ch)>>@@ favored by the old government.
		<<elseif _desc.length == 2>>
			Its citizens take the opportunity to make social changes, @@.cyan;discarding the _desc[0] and _desc[1]@@ favored by the old government.
		<<elseif _desc.length == 1>>
			Its citizens take the opportunity to make social change and @@.cyan;abandon the _desc[0]@@ favored by the old government.
		<</if>>
	<<else>>
		The arcology is paralyzed by internal dissension over how to respond.
		<<set $arcologies[$i].prosperity -= 3>>
	<</if>>
<<elseif $arcologies[$i].prosperity >= 300>>
	at the maximum possible prosperity.
<<elseif $arcologies[$i].prosperity > $averageProsperity + 10>>
	much more prosperous than the rest of the Free City, limiting its economic development.
	<<set $arcologies[$i].prosperity -= 1>>
<<elseif $arcologies[$i].prosperity >= $averageProsperity - 10>>
	about as prosperous as the rest of the Free City.
<<else>>
	<<if ($arcologies[$i].honeymoon > 0)>>
		far behind the rest of the Free City, making it a good investment and spurring its economic development. It remains in the @@.lightgreen;honeymoon period@@ after its recent change of government, suppressing dissension and further encouraging growth.
		<<set $arcologies[$i].prosperity += 2>>
		<<if ($arcologies[$i].ownership != 0) && ($arcologies[$i].ownership < 40)>>
			<<set $arcologies[$i].ownership += 1>>
		<</if>>
	<<else>>
		not as prosperous as the rest of the Free City, spurring its economic development.
		<<set $arcologies[$i].prosperity += 1>>
	<</if>>
<</if>>

/* NATURAL CHANGES TO MINORITY SHARE */
<<if ($arcologies[$i].government == "your agent") || ($arcologies[$i].government == "your trustees")>>
	<<set $arcologies[$i].ownership = 0>>
<</if>>
<<set _owned = $arcologies[$i].minority+$arcologies[$i].ownership+$arcologies[$i].PCminority>>
<<if $arcologies[$i].minority < 10>>
	<<set $arcologies[$i].minority = 0>>
<<elseif $arcologies[$i].minority < $arcologies[$i].PCminority>>
	<<set $arcologies[$i].minority = 0>>
<<elseif _owned >= 95>>
	<<set $arcologies[$i].minority -= random(3,5)>>
<<elseif $arcologies[$i].minority > (100 - _owned)*5>>
	<<set $arcologies[$i].minority -= random(3,5)>>
<<elseif $arcologies[$i].minority < (100 - _owned)*4>>
	<<if $arcologies[$i].minority < 10>>
		<<if $arcologies[$i].ownership + $arcologies[$i].PCminority <= 90>>
			<<set $arcologies[$i].minority = 10>>
		<</if>>
	<<else>>
		<<if $arcologies[$i].ownership + $arcologies[$i].PCminority <= 98>>
			<<if $arcologies[$i].prosperity < random(0,300)>>
				<<set $arcologies[$i].minority += random(0,2)>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[$i].direction != 0>>

/* AI ARCOLOGY SHARE BUYING AND SELLING */
<<set _economicUncertainty = App.Utils.economicUncertainty($i)>>
<<if $arcologies[$i].government != "your agent">>
	<<if $arcologies[$i].government != "your trustees">>
		<<if $arcologies[$i].minority + $arcologies[$i].ownership + $arcologies[$i].PCminority < 100>>
			<<set _prosperityDiff = $arcologies[$i].prosperity-$averageProsperity>>
			<<if _prosperityDiff > random(-10,50)>>
				Its leadership acquires an increased share of its ownership.
				<<set $arcologies[$i].ownership += 1>>
				<<set $arcologies[$i].prosperity -= 5>>
				This places its government in control of approximately @@.orange;<<print Math.trunc($arcologies[$i].ownership*_economicUncertainty)>>%@@ of the arcology<<if $arcologies[$i].minority > 0>>, against its most prominent competition with a @@.tan;<<print Math.trunc($arcologies[$i].minority*_economicUncertainty)>>%@@ share<</if>>.
			<<elseif _prosperityDiff < random(-50,10)>>
				<<if $arcologies[$i].ownership > 0>>
					<<if $arcologies[$i].rival != 1 || ($arcologies[$i].rival == 1 && $arcologies[$i].ownership > 51 && random(1,2) == 1)>>
						Its leadership sells off some of its ownership to stay afloat.
						<<set $arcologies[$i].ownership -= 1>>
						<<set $arcologies[$i].prosperity += 5>>
						This leaves its government in control of approximately @@.orange;<<print Math.trunc($arcologies[$i].ownership*_economicUncertainty)>>%@@ of the arcology<<if $arcologies[$i].minority > 0>>, against its most prominent competition, with a @@.tan;<<print Math.trunc($arcologies[$i].minority*_economicUncertainty)>>%@@ share<</if>>.
					<</if>>
				<</if>>
			<</if>>
			<<if $arcologies[$i].minority+$arcologies[$i].ownership > 100>>
				<<set $arcologies[$i].minority = 100-$arcologies[$i].ownership>>
			<</if>>
		<<else>>
			<<if (($arcologies[$i].ownership + $arcologies[$i].PCminority) >= 99) && ($arcologies[$i].rival != 1)>>
				<<set $arcologies[$i].ownership = 98 - $arcologies[$i].PCminority>>
			<<else>>
				<<set $arcologies[$i].minority = Math.clamp(98 - $arcologies[$i].ownership - $arcologies[$i].PCminority, 0, 98)>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

/* AI ARCOLOGY RENTS TO PC */

<<if $arcologies[$i].PCminority > 0>>
	<<set _rents = ($arcologies[$i].prosperity*$arcologies[$i].PCminority*2)+random(1,100)>>
	<<run cashX(_rents, "rents")>>
	This week, you made @@.yellowgreen;<<print cashFormat(_rents)>>@@ from your holdings in this arcology.
<</if>>

/* CYBER ECONOMIC WARFARE */
<<if $arcologies[$i].direction == $arcologies[0].CyberEconomicTarget>>
	<<if $PC.skill.hacking == -100>>
		<<set _Catchchance = 10>>
	<<elseif $PC.skill.hacking <= -75>>
		<<set _Catchchance = 30>>
	<<elseif $PC.skill.hacking <= -50>>
		<<set _Catchchance = 40>>
	<<elseif $PC.skill.hacking <= -25>>
		<<set _Catchchance = 45>>
	<<elseif $PC.skill.hacking == 0>>
		<<set _Catchchance = 50>>
	<<elseif $PC.skill.hacking <= 25>>
		<<set _Catchchance = 60>>
	<<elseif $PC.skill.hacking <= 50>>
		<<set _Catchchance = 70>>
	<<elseif $PC.skill.hacking <= 75>>
		<<set _Catchchance = 85>>
	<<elseif $PC.skill.hacking >= 100>>
		<<set _Catchchance = 100>>
	<</if>>
	<<set _weekModifier = Math.max(1, (100-($week*2)))>>
	<<set $arcologies[$i].prosperity -= $arcologies[0].CyberEconomic*2, _WarSpoils = Math.ceil(10+Math.max(((100/_weekModifier)*$arcologies[$i].prosperity*$arcologies[0].CyberEconomic),0))>>
	<<set $arcologies[$i].prosperity = Math.clamp($arcologies[$i].prosperity, 1, $AProsperityCap)>>
	<<if random(0,100) >= _Catchchance-(10*$arcologies[0].CyberEconomic)>>
		<<set $arcologies[0].prosperity -= $arcologies[0].CyberEconomic*3, _redHanded = 1>>
		<<run repX(forceNeg(random(100,200)), "war")>>
		<<if $secExpEnabled > 0>>
			<<set $SecExp.core.authority -= random(100,500)*$arcologies[0].CyberEconomic, $SecExp.core.crimeLow += random(10,25)>>
		<</if>>
		<<set $arcologies[0].prosperity = Math.clamp($arcologies[0].prosperity, 1, $AProsperityCap)>>
	<</if>>
	You target $arcologies[$i].name for @@.yellow;digital economic warfare,@@ successfully raiding its coffers for @@.yellowgreen;<<print cashFormat(_WarSpoils)>>@@ this week.
	<<run cashX(_WarSpoils, "war")>>
	<<if _redHanded == 1>>
		A successful trace back to your arcology has exposed your actions, @@.red;damaging your reputation@@ and @@.red;scaring away potential investors.@@
		<<if $secExpEnabled > 0>>
			To add insult to injury, @@.red;your authority has been weakened@@ and your actions have painted your arcology as a @@.red;haven for crime.@@
		<</if>>
	<</if>>
<<elseif $arcologies[$i].direction == $arcologies[0].CyberReputationTarget>> /* REPUTATION WARFARE */
	<<if $PC.skill.hacking == -100>>
		<<set _Catchchance = 10>>
	<<elseif $PC.skill.hacking <= -75>>
		<<set _Catchchance = 30>>
	<<elseif $PC.skill.hacking <= -50>>
		<<set _Catchchance = 40>>
	<<elseif $PC.skill.hacking <= -25>>
		<<set _Catchchance = 45>>
	<<elseif $PC.skill.hacking == 0>>
		<<set _Catchchance = 50>>
	<<elseif $PC.skill.hacking <= 25>>
		<<set _Catchchance = 60>>
	<<elseif $PC.skill.hacking <= 50>>
		<<set _Catchchance = 70>>
	<<elseif $PC.skill.hacking <= 75>>
		<<set _Catchchance = 85>>
	<<elseif $PC.skill.hacking >= 100>>
		<<set _Catchchance = 100>>
	<</if>>
	<<set $arcologies[$i].prosperity -= $arcologies[0].CyberReputation>>
	<<if $arcologies[$i].rival != 1>>
		<<set $arcologies[$i].ownership -= $arcologies[0].CyberReputation>>
	<</if>>
	<<set $arcologies[$i].prosperity = Math.clamp($arcologies[$i].prosperity, 1, 300)>>
	<<set $arcologies[$i].ownership = Math.clamp($arcologies[$i].ownership, 0, 100)>>
	<<if random(0,100) >= _Catchchance-(10*$arcologies[0].CyberReputation)>>
		<<set $arcologies[0].prosperity -= $arcologies[0].CyberReputation*3, _redHanded = 1>>
		<<run repX(forceNeg(random(100,200)), "war")>>
		<<if $secExpEnabled > 0>>
			<<set $SecExp.core.authority -= random(100,500)*$arcologies[0].CyberReputation, $SecExp.core.crimeLow += random(10,25)>>
		<</if>>
		<<set $arcologies[0].prosperity = Math.clamp($arcologies[0].prosperity, 1, 300)>>
	<</if>>
	You target $arcologies[$i].name's leadership for @@.yellow;character assassination@@ in an attempt to destabilize the arcology.
	<<if _redHanded == 1>>
		A successful trace back to your arcology has exposed your actions, @@.red;damaging your reputation@@ and @@.red;scaring away potential investors.@@
		<<if $secExpEnabled > 0>>
			To add insult to injury, @@.red;your authority has been weakened@@ and your actions have painted your arcology as a @@.red;haven for crime.@@
		<</if>>
	<</if>>
<</if>>

/* AI ARCOLOGY RENAMING */
<<for $j = 0; $j < $arcologies.length; $j++>>
	<<if $arcologies[$i].direction != $arcologies[$j].direction>>
		<<if $arcologies[$i].name == $arcologies[$j].name>>
			<<set $arcologies[$i].name = "Arcology X-"+($i < 4 ? $i : $i + 1)>> /* X-4 is reserved for player's arcology, so X-1 is available */
			It resumes its original name, '' $arcologies[$i].name'', since the arcology to the $arcologies[$i].direction of yours is also named $arcologies[$j].name.
			<<break>>
		<</if>>
	<</if>>
<</for>>

<</if>>

/* ECONOMIC WARFARE */

<<for $j = 0; $j < $arcologies.length; $j++>>
	<<if $arcologies[$i].direction == $arcologies[$j].embargoTarget>>
		<<set $arcologies[$i].prosperity -= $arcologies[$j].embargo*2>>
		<<if $arcologies[$j].direction != 0>>
			<<set $arcologies[$j].prosperity -= $arcologies[$j].embargo*2>>
		<</if>>
		<<set $arcologies[$i].prosperity = Math.clamp($arcologies[$i].prosperity, 1, 300)>>
		$arcologies[$j].name targets $arcologies[$i].name for @@.red;economic warfare.@@
	<</if>>
<</for>>

/* FUTURE SOCIETY PROGRESS */

<<set _societiesAdopted = FutureSocieties.activeCount($i)>>
<<switch $arcologies[$i].government>>
<<case "elected officials">>
	<<set _efficiency = random(-2,2)>>
<<case "a committee">>
	<<set _efficiency = random(-1,2)>>
<<case "an oligarchy" "your trustees">>
	<<set _efficiency = random(-1,3)>>
<<case "an individual">>
	<<set _efficiency = random(-1,5)>>
<<case "your agent">>
	<<set _efficiency = _agentBonus + random(-1,1)>>
<<case "a corporation">>
	<<set _efficiency = random(1,2)>>
<<default>>
	<<set _efficiency = random(-3,3)>>
<</switch>>

<<if $arcologies[$i].rival == 1>>
	<<set _efficiency += random(0,2)>>
<</if>>

<<if $arcologies[$i].direction != 0>>
	<<run FutureSocieties.applyBroadProgress($i, _efficiency)>>
<</if>>
<<set _passive = new App.Neighbor.PassiveFSInfluence($i)>>
<<if $arcologies[$i].FSSupremacist != "unset">>
	<<= _passive.output("FSSupremacist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSSupremacist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Racial Supremacy for $arcologies[$i].FSSupremacistRace people has reached stability and acceptance there. The arcology has been renamed
				<<switch $arcologies[$i].FSSupremacistRace>>
				<<case "white">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSupremacistWhite)>>
				<<case "asian">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSupremacistAsian)>>
				<<case "latina">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSupremacistLatina)>>
				<<case "middle eastern">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSupremacistMiddleEastern)>>
				<<case "black">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSupremacistBlack)>>
				<<case "indo-aryan">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSupremacistIndoAryan)>>
				<<case "pacific islander">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSupremacistPacificIslander)>>
				<<case "malay">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSupremacistMalay)>>
				<<case "amerindian">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSupremacistAmerindian)>>
				<<case "southern european">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSupremacistSouthernEuropean)>>
				<<case "semitic">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSupremacistSemitic)>>
				<<default>>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSupremacistMixedRace)>>
				<</switch>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSSupremacist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on $arcologies[$i].FSSupremacistRace Supremacy.
			<<set $arcologies[$i].FSSupremacist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSSupremacist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if !$corp.SpecRaces.includes($arcologies[$i].FSSupremacistRace)>>
				It's a @@.lightgreen;good market@@ for your corporation's racially inferior slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSSupremacist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[$i].FSSubjugationist != "unset">>
	<<= _passive.output("FSSubjugationist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSSubjugationist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Racial Subjugationism of $arcologies[$i].FSSubjugationistRace people has reached stability and acceptance there. The arcology has been renamed
				<<switch $arcologies[$i].FSSubjugationistRace>>
				<<case "white">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSubjugationistWhite)>>
				<<case "asian">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSubjugationistAsian)>>
				<<case "latina">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSubjugationistLatina)>>
				<<case "middle eastern">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSubjugationistMiddleEastern)>>
				<<case "black">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSubjugationistBlack)>>
				<<case "indo-aryan">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSubjugationistIndoAryan)>>
				<<case "pacific islander">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSubjugationistPacificIslander)>>
				<<case "malay">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSubjugationistMalay)>>
				<<case "amerindian">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSubjugationistAmerindian)>>
				<<case "southern european">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSubjugationistSouthernEuropean)>>
				<<case "semitic">>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSubjugationistSemitic)>>
				<<default>>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSubjugationistMixedRace)>>
				<</switch>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSSubjugationist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on $arcologies[$i].FSSubjugationistRace Subjugationism.
			<<set $arcologies[$i].FSSubjugationist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSSubjugationist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecRaces.includes($arcologies[$i].FSSubjugationistRace)>>
				It's a @@.lightgreen;good market@@ for your corporation's $arcologies[$i].FSSubjugationistRace slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSSubjugationist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[$i].FSRepopulationFocus != "unset">>
	<<= _passive.output("FSRepopulationFocus")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSRepopulationFocus >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Repopulationism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesRepopulationist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSRepopulationFocus < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Repopulationism.
			<<set $arcologies[$i].FSRepopulationFocus = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSRepopulationFocus != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecMilk > 0>>
				It's a @@.lightgreen;good market@@ for your corporation's milky cows, improving sales and helping social progress.
				<<set $arcologies[$i].FSRepopulationFocus += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<<elseif $corp.SpecAge == 1>>
				It's a @@.lightgreen;good market@@ for your corporation's youthful captures, improving sales and helping social progress.
				<<set $arcologies[$i].FSRepopulationFocus += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<<elseif $corp.SpecInjection == 5>>
				It's a @@.lightgreen;good market@@ for your corporation's milky cows, improving sales and helping social progress.
				<<set $arcologies[$i].FSRepopulationFocus += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<<elseif $arcologies[$i].FSRestart != "unset">>
	<<= _passive.output("FSRestart")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSRestart >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				<<set $arcologies[$i].FSRestartResearch = 1>>
				Eugenics has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesEugenics)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSRestart < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Eugenics.
			<<set $arcologies[$i].FSRestart = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSRestart != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecBalls == -1>>
				It's an @@.lightgreen;excellent market@@ for your corporation's neutered slavegirls, improving sales and helping social progress.
				<<set $arcologies[$i].FSRestart += 2>>
				<<run App.Corporate.earnRevenue(_corpBonus*2, 'foreign')>>
			<<elseif $corp.SpecSexEd == 2>>
				It's a @@.lightgreen;good market@@ for your corporation's well trained toys, improving sales and helping social progress.
				<<set $arcologies[$i].FSRestart += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<<elseif $corp.SpecIntelligence == 3>>
				It's a @@.lightgreen;good market@@ for your corporation's smarter captures, improving sales and helping social progress.
				<<set $arcologies[$i].FSRestart += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[$i].FSGenderRadicalist != "unset">>
	<<= _passive.output("FSGenderRadicalist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSGenderRadicalist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				<<set $arcologies[$i].FSGenderRadicalistResearch = 1>>
				Gender Radicalism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesGenderRadicalist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSGenderRadicalist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Gender Radicalism.
			<<set $arcologies[$i].FSGenderRadicalist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSGenderRadicalist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecHormones > 0>>
				It's a @@.lightgreen;good market@@ for your corporation's hormonally treated slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSGenderRadicalist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
			<<if $corp.SpecPussy == 1 && $corp.SpecDick == 1>>
				It's a @@.lightgreen;good market@@ for your corporation's beautiful futanari, improving sales and helping social progress.
				<<set $arcologies[$i].FSGenderRadicalist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<<elseif $corp.SpecBalls == -1>>
				It's a @@.lightgreen;good market@@ for your corporation's clipped buttsluts, improving sales and helping social progress.
				<<set $arcologies[$i].FSGenderRadicalist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
			<<if ($corp.SpecGender == 2) || ($seeDicks == 100)>>
				It's a @@.lightgreen;good market@@ for your corporation's feminized slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSGenderRadicalist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<<elseif $arcologies[$i].FSGenderFundamentalist != "unset">>
	<<= _passive.output("FSGenderFundamentalist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSGenderFundamentalist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Gender Fundamentalism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesGenderFundamentalist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSGenderFundamentalist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Gender Fundamentalism.
			<<set $arcologies[$i].FSGenderFundamentalist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSGenderFundamentalist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if ($corp.SpecGender == 1) || ($seeDicks == 0)>>
				It's a @@.lightgreen;good market@@ for your corporation's enslaved females, improving sales and helping social progress.
				<<set $arcologies[$i].FSGenderFundamentalist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[$i].FSPaternalist != "unset">>
	<<= _passive.output("FSPaternalist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSPaternalist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Paternalism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesPaternalist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSPaternalist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Paternalism.
			<<set $arcologies[$i].FSPaternalist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSPaternalist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecTrust > 3>>
				It's a @@.lightgreen;good market@@ for your corporation's well-treated companions, improving sales and helping social progress.
				<<set $arcologies[$i].FSPaternalist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
			<<if $corp.SpecCosmetics == 1>>
				It's a @@.lightgreen;good market@@ for your corporation's meticulously beautified ladies, improving sales and helping social progress.
				<<set $arcologies[$i].FSPaternalist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<<elseif $corp.SpecEducation > 0>>
				It's a @@.lightgreen;good market@@ for your corporation's educated ladies, improving sales and helping social progress.
				<<set $arcologies[$i].FSPaternalist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<<elseif $arcologies[$i].FSDegradationist != "unset">>
	<<= _passive.output("FSDegradationist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSDegradationist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Degradationism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesDegradationist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSDegradationist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Degradationism.
			<<set $arcologies[$i].FSDegradationist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSDegradationist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecTrust < 3>>
				It's a @@.lightgreen;good market@@ for your corporation's thoroughly terrified slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSDegradationist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
			<<if $corp.SpecIntelligence == 1>>
				It's a @@.lightgreen;good market@@ for your corporation's idiotic sluts, improving sales and helping social progress.
				<<set $arcologies[$i].FSDegradationist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<<elseif $corp.SpecAmputee == 1>>
				It's a @@.lightgreen;good market@@ for your corporation's human sex toys, improving sales and helping social progress.
				<<set $arcologies[$i].FSDegradationist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[$i].FSIntellectualDependency != "unset">>
	<<= _passive.output("FSIntellectualDependency")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSIntellectualDependency >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Intellectual Dependency has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesIntellectualDependency)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSIntellectualDependency < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Intellectual Dependency.
			<<set $arcologies[$i].FSIntellectualDependency = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSIntellectualDependency != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecIntelligence == 1>>
				It's an @@.lightgreen;excellent market@@ for your corporation's idiotic sluts, improving sales and helping social progress.
				<<set $arcologies[$i].FSIntellectualDependency += 2>>
				<<run App.Corporate.earnRevenue(_corpBonus*2, 'foreign')>>
			<<elseif $corp.SpecEducation == 0>>
				It's a @@.lightgreen;good market@@ for your corporation's uneducated slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSIntellectualDependency += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<<elseif $arcologies[$i].FSSlaveProfessionalism != "unset">>
	<<= _passive.output("FSSlaveProfessionalism")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSSlaveProfessionalism >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				<<set $arcologies[$i].FSSlaveProfessionalismResearch = 1>>
				Slave Professionalism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSlaveProfessionalism)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSSlaveProfessionalism < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Slave Professionalism.
			<<set $arcologies[$i].FSSlaveProfessionalism = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSSlaveProfessionalism != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecIntelligence == 3>>
				It's an @@.lightgreen;excellent market@@ for your corporation's smarter captures, improving sales and helping social progress.
				<<set $arcologies[$i].FSSlaveProfessionalism += 2>>
				<<run App.Corporate.earnRevenue(_corpBonus*2, 'foreign')>>
			<</if>>
			<<if $corp.SpecEducation > 1>>
				It's a @@.lightgreen;good market@@ for your corporation's well educated ladies, improving sales and helping social progress.
				<<set $arcologies[$i].FSSlaveProfessionalism += 2>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<<elseif $corp.SpecEducation > 0>>
				It's a @@.lightgreen;good market@@ for your corporation's educated ladies, improving sales and helping social progress.
				<<set $arcologies[$i].FSSlaveProfessionalism += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
			<<if $corp.SpecSexEd == 2>>
				It's a @@.lightgreen;good market@@ for your corporation's well trained toys, improving sales and helping social progress.
				<<set $arcologies[$i].FSSlaveProfessionalism += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<<elseif $corp.SpecAccent == 2>>
				It's a @@.lightgreen;good market@@ for your corporation's linguistically perfect slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSSlaveProfessionalism += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[$i].FSBodyPurist != "unset">>
	<<= _passive.output("FSBodyPurist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSBodyPurist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Body Purism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesBodyPurist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSBodyPurist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Body Purism.
			<<set $arcologies[$i].FSBodyPurist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSBodyPurist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecImplants == 0>>
				<<if $corp.SpecAmputee != 1>>
					It's a @@.lightgreen;good market@@ for your corporation's implant-free slaves, improving sales and helping social progress.
					<<set $arcologies[$i].FSBodyPurist += 1>>
					<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<<elseif $arcologies[$i].FSTransformationFetishist != "unset">>
	<<= _passive.output("FSTransformationFetishist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSTransformationFetishist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				<<set $arcologies[$i].FSTransformationFetishistResearch = 1>>
				Transformation Fetishism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesTransformationFetishist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSTransformationFetishist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Transformation Fetishism.
			<<set $arcologies[$i].FSTransformationFetishist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSTransformationFetishist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecImplants == 1>>
				It's a @@.lightgreen;good market@@ for your corporation's implanted slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSTransformationFetishist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<<elseif $corp.SpecImplants == 2>>
				It's an @@.lightgreen;excellent market@@ for your corporation's absurdly implanted slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSTransformationFetishist += 2>>
				<<run App.Corporate.earnRevenue(_corpBonus*2, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[$i].FSYouthPreferentialist != "unset">>
	<<= _passive.output("FSYouthPreferentialist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSYouthPreferentialist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Youth Preferentialism has reached stability and acceptance there. The arcology has been renamed
				<<if $pedo_mode == 1 || $minimumSlaveAge < 6>>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesYouthPreferentialistLow)>>
				<<elseif $minimumSlaveAge < 14>>
					<<set $arcologies[$i].name = either(setup.ArcologyNamesYouthPreferentialist, setup.ArcologyNamesYouthPreferentialistLow)>>
				<<else>>
					<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesYouthPreferentialist)>>
				<</if>>
				'' $arcologies[$i].name'' to mark the occasion.
				<<set $arcologies[$i].FSYouthPreferentialistResearch = 1>>
			<</if>>
		<<elseif $arcologies[$i].FSYouthPreferentialist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Youth Preferentialism.
			<<set $arcologies[$i].FSYouthPreferentialist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSYouthPreferentialist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecAge == 1>>
				It's a @@.lightgreen;good market@@ for your corporation's young slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSYouthPreferentialist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<<elseif $arcologies[$i].FSMaturityPreferentialist != "unset">>
	<<= _passive.output("FSMaturityPreferentialist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSMaturityPreferentialist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Maturity Preferentialism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesMaturityPreferentialist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSMaturityPreferentialist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Maturity Preferentialism.
			<<set $arcologies[$i].FSMaturityPreferentialist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSMaturityPreferentialist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecAge == 3>>
				It's a @@.lightgreen;good market@@ for your corporation's enslaved MILFs, improving sales and helping social progress.
				<<set $arcologies[$i].FSMaturityPreferentialist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[$i].FSPetiteAdmiration != "unset">>
	<<= _passive.output("FSPetiteAdmiration")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSPetiteAdmiration >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Petite Admiration has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesPetiteAdmiration)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSPetiteAdmiration < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Petite Admiration.
			<<set $arcologies[$i].FSPetiteAdmiration = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSPetiteAdmiration != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecHeight == 1>>
				It's an @@.lightgreen;excellent market@@ for your corporation's minuscule slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSPetiteAdmiration += 2>>
				<<run App.Corporate.earnRevenue(_corpBonus*2, 'foreign')>>
			<<elseif $corp.SpecHeight == 2>>
				It's a @@.lightgreen;good market@@ for your corporation's shorter captures, improving sales and helping social progress.
				<<set $arcologies[$i].FSPetiteAdmiration += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<<elseif $arcologies[$i].FSStatuesqueGlorification != "unset">>
	<<= _passive.output("FSStatuesqueGlorification")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSStatuesqueGlorification >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Statuesque Glorification has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesStatuesqueGlorification)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSStatuesqueGlorification < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Statuesque Glorification.
			<<set $arcologies[$i].FSStatuesqueGlorification = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSStatuesqueGlorification != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecHeight == 5>>
				It's an @@.lightgreen;excellent market@@ for your corporation's gigantic slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSStatuesqueGlorification += 2>>
				<<run App.Corporate.earnRevenue(_corpBonus*2, 'foreign')>>
			<<elseif $corp.SpecHeight == 4>>
				It's a @@.lightgreen;good market@@ for your corporation's taller captures, improving sales and helping social progress.
				<<set $arcologies[$i].FSStatuesqueGlorification += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[$i].FSSlimnessEnthusiast != "unset">>
	<<= _passive.output("FSSlimnessEnthusiast")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSSlimnessEnthusiast >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Slimness Enthusiasm has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesSlimnessEnthusiast)>>
				'' $arcologies[$i].name'' to mark the occasion.
				<<set $arcologies[$i].FSSlimnessEnthusiastResearch = 1>>
			<</if>>
		<<elseif $arcologies[$i].FSSlimnessEnthusiast < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Slimness Enthusiasm.
			<<set $arcologies[$i].FSSlimnessEnthusiast = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSSlimnessEnthusiast != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecInjection < 2>>
				<<if $corp.SpecWeight < 3>>
					It's a @@.lightgreen;good market@@ for your corporation's trim slaves, improving sales and helping social progress.
					<<set $arcologies[$i].FSSlimnessEnthusiast += 1>>
					<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<<elseif $arcologies[$i].FSAssetExpansionist != "unset">>
	<<= _passive.output("FSAssetExpansionist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSAssetExpansionist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				<<set $arcologies[$i].FSAssetExpansionistResearch = 1>>
				Asset Expansionism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesAssetExpansionist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSAssetExpansionist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Asset Expansionism.
			<<set $arcologies[$i].FSAssetExpansionist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSAssetExpansionist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SPecInjection == 4>>
				It's an @@.lightgreen;excellent market@@ for your corporation's world-class tits and ass, improving sales and helping social progress.
				<<set $arcologies[$i].FSAssetExpansionist += 2>>
				<<run App.Corporate.earnRevenue(_corpBonus*2, 'foreign')>>
			<<elseif $corp.SpecInjection == 5>>
				It's a @@.lightgreen;good market@@ for your corporation's hugely endowed cows, improving sales and helping social progress.
				<<set $arcologies[$i].FSAssetExpansionist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<<elseif $corp.SPecInjection == 3>>
				It's a @@.lightgreen;good market@@ for your corporation's stacked slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSAssetExpansionist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[$i].FSPastoralist != "unset">>
	<<= _passive.output("FSPastoralist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSPastoralist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Pastoralism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesPastoralist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSPastoralist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Pastoralism.
			<<set $arcologies[$i].FSPastoralist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSPastoralist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecInjection == 5>>
				It's an @@.lightgreen;excellent market@@ for your corporation's world-class milk producers, improving sales and helping social progress.
				<<set $arcologies[$i].FSPastoralist += 2>>
				<<run App.Corporate.earnRevenue(_corpBonus*2, 'foreign')>>
			<<elseif $corp.SpecMilk > 0>>
				It's an @@.lightgreen;excellent market@@ for your corporation's world-class milk producers, improving sales and helping social progress.
				<<set $arcologies[$i].FSPastoralist += 2>>
				<<run App.Corporate.earnRevenue(_corpBonus*2, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<<elseif $arcologies[$i].FSCummunism != "unset">>
	<<= _passive.output("FSCummunism")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSCummunism >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Cummunism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesCummunism)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSCummunism < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Cummunism.
			<<set $arcologies[$i].FSCummunism = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSCummunism != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecInjection == 5>>
				It's an @@.lightgreen;excellent market@@ for your corporation's world-class cum producers, improving sales and helping social progress.
				<<set $arcologies[$i].FSCummunism += 2>>
				<<run App.Corporate.earnRevenue(_corpBonus*2, 'foreign')>>
			<<elseif $corp.SpecHormones == 2>>
				It's a @@.lightgreen;good market@@ for your corporation's masculinized slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSCummunism += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<<elseif $corp.SpecDick == 1 && $corp.SpecBalls == 1>>
				It's a @@.lightgreen;good market@@ for your corporation's slaves standard dicks and balls, improving sales and helping social progress.
				<<set $arcologies[$i].FSCummunism += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[$i].FSPhysicalIdealist != "unset">>
	<<= _passive.output("FSPhysicalIdealist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSPhysicalIdealist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Physical Idealism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesPhysicalIdealist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSPhysicalIdealist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Physical Idealism.
			<<set $arcologies[$i].FSPhysicalIdealist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSPhysicalIdealist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecMuscle == 5 >>
				It's an @@.lightgreen;excellent market@@ for your corporation's ripped chicks, improving sales and helping social progress.
				<<set $arcologies[$i].FSPhysicalIdealist += 2>>
				<<run App.Corporate.earnRevenue(_corpBonus*2, 'foreign')>>
			<<elseif $corp.SpecMuscle == 4>>
				It's a @@.lightgreen;good market@@ for your corporation's toned ladies, improving sales and helping social progress.
				<<set $arcologies[$i].FSPhysicalIdealist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<<elseif $corp.SpecHeight > 3>>
				It's a @@.lightgreen;good market@@ for your corporation's tall ladies, improving sales and helping social progress.
				<<set $arcologies[$i].FSPhysicalIdealist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<<elseif $arcologies[$i].FSHedonisticDecadence != "unset">>
	<<= _passive.output("FSHedonisticDecadence")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSHedonisticDecadence >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				<<set $arcologies[$i].FSHedonisticDecadenceResearch = 1>>
				Decadent Hedonism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesHedonisticDecadence)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSHedonisticDecadence < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Decadent Hedonism.
			<<set $arcologies[$i].FSHedonisticDecadence = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSHedonisticDecadence != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecTrust > 3>>
				It's an @@.lightgreen;excellent market@@ for your corporation's well kept, happy slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSHedonisticDecadence += 2>>
				<<run App.Corporate.earnRevenue(_corpBonus*2, 'foreign')>>
			<<elseif $corp.SpecSexEd == 2>>
				It's a @@.lightgreen;good market@@ for your corporation's skilled slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSHedonisticDecadence += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[$i].FSIncestFetishist != "unset">>
	<<= _passive.output("FSIncestFetishist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSIncestFetishist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Incest Fetishism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesIncestFetishist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSIncestFetishist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Incest Fetishism.
			<<set $arcologies[$i].FSIncestFetishist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSIncestFetishist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecAge == 3>>
				It's a @@.lightgreen;good market@@ for your corporation's motherly slaves, especially those that look like peoples mothers, improving sales and helping social progress.
				<<set $arcologies[$i].FSIncestFetishist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[$i].FSChattelReligionist != "unset">>
	<<= _passive.output("FSChattelReligionist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSChattelReligionist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Chattel Religionism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesChattelReligionist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSChattelReligionist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Chattel Religionism.
			<<set $arcologies[$i].FSChattelReligionist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSChattelReligionist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecSexEd == 2>>
				It's an @@.lightgreen;excellent market@@ for your corporation's holy sex slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSChattelReligionist += 2>>
				<<run App.Corporate.earnRevenue(_corpBonus*2, 'foreign')>>
			<<elseif $corp.SpecSexEd == 1>>
				It's a @@.lightgreen;good market@@ for your corporation's aspiring sexual acolytes, improving sales and helping social progress.
				<<set $arcologies[$i].FSChattelReligionist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<<if $arcologies[$i].FSRomanRevivalist != "unset">>
	<<= _passive.output("FSRomanRevivalist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSRomanRevivalist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Roman Revivalism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesRomanRevivalist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSRomanRevivalist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Roman Revivalism.
			<<set $arcologies[$i].FSRomanRevivalist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSRomanRevivalist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecEducation > 0>>
				It's a @@.lightgreen;good market@@ for your corporation's properly educated slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSRomanRevivalist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<<elseif $arcologies[$i].FSAztecRevivalist != "unset">>
	<<= _passive.output("FSAztecRevivalist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSAztecRevivalist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Aztec Revivalism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesAztecRevivalist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSAztecRevivalist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Aztec Revivalism.
			<<set $arcologies[$i].FSAztecRevivalist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSAztecRevivalist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecAccent == 1>>
				It's a @@.lightgreen;good market@@ for your corporation's lovely mix of slave accents, improving sales and helping social progress.
				<<set $arcologies[$i].FSAztecRevivalist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<<elseif $arcologies[$i].FSEgyptianRevivalist != "unset">>
	<<= _passive.output("FSEgyptianRevivalist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSEgyptianRevivalist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Egyptian Revivalism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesEgyptianRevivalist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSEgyptianRevivalist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Egyptian Revivalism.
			<<set $arcologies[$i].FSEgyptianRevivalist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSEgyptianRevivalist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecAccent == 1>>
				It's a @@.lightgreen;good market@@ for your corporation's lovely mix of slave accents, improving sales and helping social progress.
				<<set $arcologies[$i].FSEgyptianRevivalist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<<elseif $arcologies[$i].FSEdoRevivalist != "unset">>
	<<= _passive.output("FSEdoRevivalist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSEdoRevivalist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Edo Revivalism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesEdoRevivalist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSEdoRevivalist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Edo Revivalism.
			<<set $arcologies[$i].FSEdoRevivalist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSEdoRevivalist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecAccent == 2>>
				It's a @@.lightgreen;good market@@ for your corporation's linguistically perfect slaves, improving sales and helping social progress.
				<<set $arcologies[$i].FSEdoRevivalist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<<elseif $arcologies[$i].FSArabianRevivalist != "unset">>
	<<= _passive.output("FSArabianRevivalist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSArabianRevivalist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Arabian Revivalism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesArabianRevivalist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSArabianRevivalist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Arabian Revivalism.
			<<set $arcologies[$i].FSArabianRevivalist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSArabianRevivalist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecDevotion == 5>>
				It's an @@.lightgreen;excellent market@@ for your corporation's harem-ready devotees, improving sales and helping social progress.
				<<set $arcologies[$i].FSArabianRevivalist += 2>>
				<<run App.Corporate.earnRevenue(_corpBonus*2, 'foreign')>>
			<<elseif $corp.SpecDevotion == 4>>
				It's a @@.lightgreen;good market@@ for your corporation's properly broken girls, improving sales and helping social progress.
				<<set $arcologies[$i].FSArabianRevivalist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<<elseif $arcologies[$i].FSChineseRevivalist != "unset">>
	<<= _passive.output("FSChineseRevivalist")>>
	<<if $arcologies[$i].direction != 0>>
		<<if $arcologies[$i].FSChineseRevivalist >= $FSLockinLevel>>
			<<if ($arcologies[$i].name.indexOf("Arcology") != -1) && (random(0,2) == 0)>>
				Chinese Revivalism has reached stability and acceptance there. The arcology has been renamed
				<<set $arcologies[$i].name = App.Neighbor.getUnusedName(setup.ArcologyNamesChineseRevivalist)>>
				'' $arcologies[$i].name'' to mark the occasion.
			<</if>>
		<<elseif $arcologies[$i].FSChineseRevivalist < 0>>
			$arcologies[$i].name @@.cyan;has given up@@ on Chinese Revivalism.
			<<set $arcologies[$i].FSChineseRevivalist = "unset">>
		<</if>>
	<</if>>
	<<if $arcologies[$i].FSChineseRevivalist != "unset">>
		<<if $corp.Incorporated == 1>>
			<<if $corp.SpecIntelligence == 3>>
				It's a @@.lightgreen;good market@@ for your corporation's intelligent Head Girl prospects, improving sales and helping social progress.
				<<set $arcologies[$i].FSChineseRevivalist += 1>>
				<<run App.Corporate.earnRevenue(_corpBonus, 'foreign')>>
			<</if>>
		<</if>>
	<</if>>
<</if>>
<<run FutureSocieties.overflowToInfluence($i)>>

/* FUTURE SOCIETY ADOPTION */

<<if $arcologies[$i].direction != 0>>
	<<if _societiesAdopted < $FSCreditCount>>
		<<if ($arcologies[$i].rival == 1) || (_societiesAdopted < ($arcologies[$i].prosperity/25)+($week/25)-3)>>

		<<include "Neighbors FS Adoption">>

		<</if>>
	<</if>>
<</if>> /* CLOSES FUTURE SOCIETY ADOPTION */

/* INFLUENCE RECEPTION */

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

<<set $arcologies[$j].influenceBonus = Math.clamp($arcologies[$j].influenceBonus, 0, $FSLockinLevel)>>
<<set _appliedInfluenceBonus = Math.trunc($arcologies[$j].influenceBonus*0.1)>>
<<set $arcologies[$j].influenceBonus -= _appliedInfluenceBonus*2>>
<<if $policies.culturalOpenness == 1>>
	<<if ($arcologies[$i].direction == 0) || ($arcologies[$j].direction == 0)>>
		<<set _appliedInfluenceBonus *= 2>>
	<</if>>
<<elseif $policies.culturalOpenness == -1>>
	<<if ($arcologies[$i].direction == 0) || ($arcologies[$j].direction == 0)>>
		<<set _appliedInfluenceBonus /= 2>>
	<</if>>
<</if>>
<<if $arcologies[$i].ownership >= 100>>
	<<set _appliedInfluenceBonus /= 2>>
<</if>>
<<set $desc = []>>
<<set _alignment = 0>>

<<if $arcologies[$j].FSSubjugationist > 60>>
	<<if ($arcologies[$i].FSSubjugationist != "unset")>>
		<<if ($arcologies[$j].FSSubjugationistRace == $arcologies[$i].FSSubjugationistRace)>>
			<<set $arcologies[$i].FSSubjugationist += Math.trunc(($arcologies[$j].FSSubjugationist-60)/4)+_appliedInfluenceBonus>>
			<<if $arcologies[$i].FSSubjugationist > $FSLockinLevel>><<set _alignment += 1>><</if>>
			<<set $desc.push("helping to advance its racially aligned Subjugationism")>>
		<<else>>
			<<set $arcologies[$i].FSSubjugationist -= Math.trunc(($arcologies[$j].FSSubjugationist-60)/4)+_appliedInfluenceBonus>>
			<<set $desc.push("attacking its incompatible Subjugationism")>>
		<</if>>
	<<elseif ($arcologies[$i].FSSupremacist != "unset") && ($arcologies[$j].FSSubjugationistRace == $arcologies[$i].FSSupremacistRace)>>
		<<set $arcologies[$i].FSSupremacist -= Math.trunc(($arcologies[$j].FSSubjugationist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its opposing Supremacism")>>
	<</if>>
<</if>>
<<if $arcologies[$j].FSSupremacist > 60>>
	<<if ($arcologies[$i].FSSupremacist != "unset")>>
		<<if ($arcologies[$j].FSSupremacistRace == $arcologies[$i].FSSupremacistRace)>>
			<<set $arcologies[$i].FSSupremacist += Math.trunc(($arcologies[$j].FSSupremacist-60)/4)+_appliedInfluenceBonus>>
			<<if $arcologies[$i].FSSupremacist > $FSLockinLevel>><<set _alignment += 1>><</if>>
			<<set $desc.push("helping to advance its racially aligned Supremacism")>>
		<<else>>
			<<set $arcologies[$i].FSSupremacist -= Math.trunc(($arcologies[$j].FSSupremacist-60)/4)+_appliedInfluenceBonus>>
			<<set $desc.push("attacking its incompatible Supremacism")>>
		<</if>>
	<<elseif ($arcologies[$i].FSSubjugationist != "unset") && ($arcologies[$j].FSSupremacistRace == $arcologies[$i].FSSubjugationistRace)>>
		<<set $arcologies[$i].FSSubjugationist -= Math.trunc(($arcologies[$j].FSSupremacist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its opposing Subjugationism")>>
	<</if>>
<</if>>
<<if $arcologies[$j].FSRepopulationFocus > 60>>
	<<if $arcologies[$i].FSRepopulationFocus != "unset">>
		<<set $arcologies[$i].FSRepopulationFocus += Math.trunc(($arcologies[$j].FSRepopulationFocus-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSRepopulationFocus > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Repopulationism")>>
	<<elseif $arcologies[$i].FSRestart != "unset">>
		<<set $arcologies[$i].FSRestart -= Math.trunc(($arcologies[$j].FSRepopulationFocus-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Eugenics")>>
	<</if>>
<<elseif $arcologies[$j].FSRestart > 60>>
	<<if $arcologies[$i].FSRestart != "unset">>
		<<set $arcologies[$i].FSRestart += Math.trunc(($arcologies[$j].FSRestart-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSRestart > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Eugenics")>>
	<<elseif $arcologies[$i].FSRepopulationFocus != "unset">>
		<<set $arcologies[$i].FSRepopulationFocus -= Math.trunc(($arcologies[$j].FSRestart-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Repopulation Efforts")>>
	<</if>>
<</if>>
<<if $arcologies[$j].FSGenderRadicalist > 60>>
	<<if $arcologies[$i].FSGenderRadicalist != "unset">>
		<<set $arcologies[$i].FSGenderRadicalist += Math.trunc(($arcologies[$j].FSGenderRadicalist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSGenderRadicalist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Gender Radicalism")>>
	<<elseif $arcologies[$i].FSGenderFundamentalist != "unset">>
		<<set $arcologies[$i].FSGenderFundamentalist -= Math.trunc(($arcologies[$j].FSGenderRadicalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Gender Fundamentalism")>>
	<</if>>
<<elseif $arcologies[$j].FSGenderFundamentalist > 60>>
	<<if $arcologies[$i].FSGenderFundamentalist != "unset">>
		<<set $arcologies[$i].FSGenderFundamentalist += Math.trunc(($arcologies[$j].FSGenderFundamentalist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSGenderFundamentalist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Gender Fundamentalism")>>
	<<elseif $arcologies[$i].FSGenderRadicalist != "unset">>
		<<set $arcologies[$i].FSGenderRadicalist -= Math.trunc(($arcologies[$j].FSGenderFundamentalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Gender Radicalism")>>
	<</if>>
<</if>>
<<if $arcologies[$j].FSPaternalist > 60>>
	<<if $arcologies[$i].FSPaternalist != "unset">>
		<<set $arcologies[$i].FSPaternalist += Math.trunc(($arcologies[$j].FSPaternalist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSPaternalist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Paternalism")>>
	<<elseif $arcologies[$i].FSDegradationist != "unset">>
		<<set $arcologies[$i].FSDegradationist -= Math.trunc(($arcologies[$j].FSPaternalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Degradationism")>>
	<</if>>
<<elseif $arcologies[$j].FSDegradationist > 60>>
	<<if $arcologies[$i].FSDegradationist != "unset">>
		<<set $arcologies[$i].FSDegradationist += Math.trunc(($arcologies[$j].FSDegradationist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSDegradationist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Degradationism")>>
	<<elseif $arcologies[$i].FSPaternalist != "unset">>
		<<set $arcologies[$i].FSPaternalist -= Math.trunc(($arcologies[$j].FSDegradationist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Paternalism")>>
	<</if>>
<</if>>
<<if $arcologies[$j].FSIntellectualDependency > 60>>
	<<if $arcologies[$i].FSIntellectualDependency != "unset">>
		<<set $arcologies[$i].FSIntellectualDependency += Math.trunc(($arcologies[$j].FSIntellectualDependency-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSIntellectualDependency > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Intellectual Dependency")>>
	<<elseif $arcologies[$i].FSSlaveProfessionalism != "unset">>
		<<set $arcologies[$i].FSSlaveProfessionalism -= Math.trunc(($arcologies[$j].FSIntellectualDependency-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Slave Professionalism")>>
	<</if>>
<<elseif $arcologies[$j].FSSlaveProfessionalism > 60>>
	<<if $arcologies[$i].FSSlaveProfessionalism != "unset">>
		<<set $arcologies[$i].FSSlaveProfessionalism += Math.trunc(($arcologies[$j].FSSlaveProfessionalism-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSSlaveProfessionalism > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Slave Professionalism")>>
	<<elseif $arcologies[$i].FSIntellectualDependency != "unset">>
		<<set $arcologies[$i].FSIntellectualDependency -= Math.trunc(($arcologies[$j].FSSlaveProfessionalism-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Intellectual Dependency")>>
	<</if>>
<</if>>
<<if $arcologies[$j].FSBodyPurist > 60>>
	<<if $arcologies[$i].FSBodyPurist != "unset">>
		<<set $arcologies[$i].FSBodyPurist += Math.trunc(($arcologies[$j].FSBodyPurist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSBodyPurist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Body Purism")>>
	<<elseif $arcologies[$i].FSTransformationFetishist != "unset">>
		<<set $arcologies[$i].FSTransformationFetishist -= Math.trunc(($arcologies[$j].FSBodyPurist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Transformation Fetishism")>>
	<</if>>
<<elseif $arcologies[$j].FSTransformationFetishist > 60>>
	<<if $arcologies[$i].FSTransformationFetishist != "unset">>
		<<set $arcologies[$i].FSTransformationFetishist += Math.trunc(($arcologies[$j].FSTransformationFetishist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSTransformationFetishist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Transformation Fetishism")>>
	<<elseif $arcologies[$i].FSBodyPurist != "unset">>
		<<set $arcologies[$i].FSBodyPurist -= Math.trunc(($arcologies[$j].FSTransformationFetishist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Body Purism")>>
	<</if>>
<</if>>
<<if $arcologies[$j].FSYouthPreferentialist > 60>>
	<<if $arcologies[$i].FSYouthPreferentialist != "unset">>
		<<set $arcologies[$i].FSYouthPreferentialist += Math.trunc(($arcologies[$j].FSYouthPreferentialist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSYouthPreferentialist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Youth Preferentialism")>>
	<<elseif $arcologies[$i].FSMaturityPreferentialist != "unset">>
		<<set $arcologies[$i].FSMaturityPreferentialist -= Math.trunc(($arcologies[$j].FSYouthPreferentialist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Maturity Preferentialism")>>
	<</if>>
<<elseif $arcologies[$j].FSMaturityPreferentialist > 60>>
	<<if $arcologies[$i].FSMaturityPreferentialist != "unset">>
		<<set $arcologies[$i].FSMaturityPreferentialist += Math.trunc(($arcologies[$j].FSMaturityPreferentialist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSMaturityPreferentialist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Maturity Preferentialism")>>
	<<elseif $arcologies[$i].FSYouthPreferentialist != "unset">>
		<<set $arcologies[$i].FSYouthPreferentialist -= Math.trunc(($arcologies[$j].FSMaturityPreferentialist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Youth Preferentialism")>>
	<</if>>
<</if>>
<<if $arcologies[$j].FSPetiteAdmiration > 60>>
	<<if $arcologies[$i].FSPetiteAdmiration != "unset">>
		<<set $arcologies[$i].FSPetiteAdmiration += Math.trunc(($arcologies[$j].FSPetiteAdmiration-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSPetiteAdmiration > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Petite Admiration")>>
	<<elseif $arcologies[$i].FSStatuesqueGlorification != "unset">>
		<<set $arcologies[$i].FSStatuesqueGlorification -= Math.trunc(($arcologies[$j].FSPetiteAdmiration-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Statuesque Glorification")>>
	<</if>>
<<elseif $arcologies[$j].FSStatuesqueGlorification > 60>>
	<<if $arcologies[$i].FSStatuesqueGlorification != "unset">>
		<<set $arcologies[$i].FSStatuesqueGlorification += Math.trunc(($arcologies[$j].FSStatuesqueGlorification-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSStatuesqueGlorification > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Statuesque Glorification")>>
	<<elseif $arcologies[$i].FSPetiteAdmiration != "unset">>
		<<set $arcologies[$i].FSPetiteAdmiration -= Math.trunc(($arcologies[$j].FSStatuesqueGlorification-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Petite Admiration")>>
	<</if>>
<</if>>
<<if $arcologies[$j].FSSlimnessEnthusiast > 60>>
	<<if $arcologies[$i].FSSlimnessEnthusiast != "unset">>
		<<set $arcologies[$i].FSSlimnessEnthusiast += Math.trunc(($arcologies[$j].FSSlimnessEnthusiast-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSSlimnessEnthusiast > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Slimness Enthusiasm")>>
	<<elseif $arcologies[$i].FSAssetExpansionist != "unset">>
		<<set $arcologies[$i].FSAssetExpansionist -= Math.trunc(($arcologies[$j].FSSlimnessEnthusiast-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Asset Expansionism")>>
	<</if>>
<<elseif $arcologies[$j].FSAssetExpansionist > 60>>
	<<if $arcologies[$i].FSAssetExpansionist != "unset">>
		<<set $arcologies[$i].FSAssetExpansionist += Math.trunc(($arcologies[$j].FSAssetExpansionist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSAssetExpansionist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Asset Expansionism")>>
	<<elseif $arcologies[$i].FSSlimnessEnthusiast != "unset">>
		<<set $arcologies[$i].FSSlimnessEnthusiast -= Math.trunc(($arcologies[$j].FSAssetExpansionist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Slimness Enthusiasm")>>
	<</if>>
<</if>>
<<if $arcologies[$j].FSPastoralist > 60>>
	<<if $arcologies[$i].FSPastoralist != "unset">>
		<<set $arcologies[$i].FSPastoralist += Math.trunc(($arcologies[$j].FSPastoralist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSPastoralist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Pastoralism")>>
	<<elseif $arcologies[$i].FSCummunism != "unset">>
		<<set $arcologies[$i].FSCummunism -= Math.trunc(($arcologies[$j].FSPastoralist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Cummunism")>>
	<</if>>
<<elseif $arcologies[$j].FSCummunism > 60>>
	<<if $arcologies[$i].FSCummunism != "unset">>
		<<set $arcologies[$i].FSCummunism += Math.trunc(($arcologies[$j].FSCummunism-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSCummunism > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Cummunism")>>
	<<elseif $arcologies[$i].FSPastoralist != "unset">>
		<<set $arcologies[$i].FSPastoralist -= Math.trunc(($arcologies[$j].FSCummunism-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Pastoralism")>>
	<</if>>
<</if>>
<<if $arcologies[$j].FSPhysicalIdealist > 60>>
	<<if $arcologies[$i].FSPhysicalIdealist != "unset">>
		<<set $arcologies[$i].FSPhysicalIdealist += Math.trunc(($arcologies[$j].FSPhysicalIdealist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSPhysicalIdealist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Physical Idealism")>>
	<<elseif $arcologies[$i].FSHedonisticDecadence != "unset">>
		<<set $arcologies[$i].FSHedonisticDecadence -= Math.trunc(($arcologies[$j].FSPhysicalIdealist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Hedonism")>>
	<</if>>
<<elseif $arcologies[$j].FSHedonisticDecadence > 60>>
	<<if $arcologies[$i].FSHedonisticDecadence != "unset">>
		<<set $arcologies[$i].FSHedonisticDecadence += Math.trunc(($arcologies[$j].FSHedonisticDecadence-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSHedonisticDecadence > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Hedonism")>>
	<<elseif $arcologies[$i].FSPhysicalIdealist != "unset">>
		<<set $arcologies[$i].FSPhysicalIdealist -= Math.trunc(($arcologies[$j].FSHedonisticDecadence-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its Physical Idealism")>>
	<</if>>
<</if>>
<<if $arcologies[$j].FSIncestFetishist > 60>>
	<<if $arcologies[$i].FSIncestFetishist != "unset">>
		<<set $arcologies[$i].FSIncestFetishist += Math.trunc(($arcologies[$j].FSIncestFetishist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSIncestFetishist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Incest Fetishism")>>
	<</if>>
<</if>>
<<if $arcologies[$j].FSChattelReligionist > 60>>
	<<if $arcologies[$i].FSChattelReligionist != "unset">>
		<<set $arcologies[$i].FSChattelReligionist += Math.trunc(($arcologies[$j].FSChattelReligionist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSChattelReligionist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Chattel Religionism")>>
	<</if>>
<</if>>
<<if $arcologies[$j].FSRomanRevivalist > 60>>
	<<if $arcologies[$i].FSRomanRevivalist != "unset">>
		<<set $arcologies[$i].FSRomanRevivalist += Math.trunc(($arcologies[$j].FSRomanRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSRomanRevivalist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Roman Revivalism")>>
	<<elseif $arcologies[$i].FSAztecRevivalist != "unset">>
		<<set $arcologies[$i].FSAztecRevivalist -= Math.trunc(($arcologies[$j].FSRomanRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSEgyptianRevivalist != "unset">>
		<<set $arcologies[$i].FSEgyptianRevivalist -= Math.trunc(($arcologies[$j].FSRomanRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSEdoRevivalist != "unset">>
		<<set $arcologies[$i].FSEdoRevivalist -= Math.trunc(($arcologies[$j].FSRomanRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSArabianRevivalist != "unset">>
		<<set $arcologies[$i].FSArabianRevivalist -= Math.trunc(($arcologies[$j].FSRomanRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSChineseRevivalist != "unset">>
		<<set $arcologies[$i].FSChineseRevivalist -= Math.trunc(($arcologies[$j].FSRomanRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<</if>>
<<elseif $arcologies[$j].FSAztecRevivalist > 60>>
	<<if $arcologies[$i].FSAztecRevivalist != "unset">>
		<<set $arcologies[$i].FSAztecRevivalist += Math.trunc(($arcologies[$j].FSAztecRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSAztecRevivalist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Aztec Revivalism")>>
	<<elseif $arcologies[$i].FSRomanRevivalist != "unset">>
		<<set $arcologies[$i].FSRomanRevivalist -= Math.trunc(($arcologies[$j].FSAztecRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSEgyptianRevivalist != "unset">>
		<<set $arcologies[$i].FSEgyptianRevivalist -= Math.trunc(($arcologies[$j].FSAztecRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSEdoRevivalist != "unset">>
		<<set $arcologies[$i].FSEdoRevivalist -= Math.trunc(($arcologies[$j].FSAztecRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSArabianRevivalist != "unset">>
		<<set $arcologies[$i].FSArabianRevivalist -= Math.trunc(($arcologies[$j].FSAztecRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSChineseRevivalist != "unset">>
		<<set $arcologies[$i].FSChineseRevivalist -= Math.trunc(($arcologies[$j].FSAztecRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<</if>>
<<elseif $arcologies[$j].FSEgyptianRevivalist > 60>>
	<<if $arcologies[$i].FSEgyptianRevivalist != "unset">>
		<<set $arcologies[$i].FSEgyptianRevivalist += Math.trunc(($arcologies[$j].FSEgyptianRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSEgyptianRevivalist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Egyptian Revivalism")>>
	<<elseif $arcologies[$i].FSRomanRevivalist != "unset">>
		<<set $arcologies[$i].FSRomanRevivalist -= Math.trunc(($arcologies[$j].FSEgyptianRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSAztecRevivalist != "unset">>
		<<set $arcologies[$i].FSAztecRevivalist -= Math.trunc(($arcologies[$j].FSEgyptianRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSEdoRevivalist != "unset">>
		<<set $arcologies[$i].FSEdoRevivalist -= Math.trunc(($arcologies[$j].FSEgyptianRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSArabianRevivalist != "unset">>
		<<set $arcologies[$i].FSArabianRevivalist -= Math.trunc(($arcologies[$j].FSEgyptianRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSChineseRevivalist != "unset">>
		<<set $arcologies[$i].FSChineseRevivalist -= Math.trunc(($arcologies[$j].FSEgyptianRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<</if>>
<<elseif $arcologies[$j].FSEdoRevivalist > 60>>
	<<if $arcologies[$i].FSEdoRevivalist != "unset">>
		<<set $arcologies[$i].FSEdoRevivalist += Math.trunc(($arcologies[$j].FSEdoRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSEdoRevivalist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Edo Revivalism")>>
	<<elseif $arcologies[$i].FSEgyptianRevivalist != "unset">>
		<<set $arcologies[$i].FSEgyptianRevivalist -= Math.trunc(($arcologies[$j].FSEdoRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSRomanRevivalist != "unset">>
		<<set $arcologies[$i].FSRomanRevivalist -= Math.trunc(($arcologies[$j].FSEdoRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSAztecRevivalist != "unset">>
		<<set $arcologies[$i].FSAztecRevivalist -= Math.trunc(($arcologies[$j].FSEdoRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSArabianRevivalist != "unset">>
		<<set $arcologies[$i].FSArabianRevivalist -= Math.trunc(($arcologies[$j].FSEdoRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSChineseRevivalist != "unset">>
		<<set $arcologies[$i].FSChineseRevivalist -= Math.trunc(($arcologies[$j].FSEdoRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<</if>>
<<elseif $arcologies[$j].FSArabianRevivalist > 60>>
	<<if $arcologies[$i].FSArabianRevivalist != "unset">>
		<<set $arcologies[$i].FSArabianRevivalist += Math.trunc(($arcologies[$j].FSArabianRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSArabianRevivalist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Arabian Revivalism")>>
	<<elseif $arcologies[$i].FSEgyptianRevivalist != "unset">>
		<<set $arcologies[$i].FSEgyptianRevivalist -= Math.trunc(($arcologies[$j].FSArabianRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSEdoRevivalist != "unset">>
		<<set $arcologies[$i].FSEdoRevivalist -= Math.trunc(($arcologies[$j].FSArabianRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSRomanRevivalist != "unset">>
		<<set $arcologies[$i].FSRomanRevivalist -= Math.trunc(($arcologies[$j].FSArabianRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSAztecRevivalist != "unset">>
		<<set $arcologies[$i].FSAztecRevivalist -= Math.trunc(($arcologies[$j].FSArabianRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSChineseRevivalist != "unset">>
		<<set $arcologies[$i].FSChineseRevivalist -= Math.trunc(($arcologies[$j].FSArabianRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<</if>>
<<elseif $arcologies[$j].FSChineseRevivalist > 60>>
	<<if $arcologies[$i].FSChineseRevivalist != "unset">>
		<<set $arcologies[$i].FSChineseRevivalist += Math.trunc(($arcologies[$j].FSChineseRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<if $arcologies[$i].FSChineseRevivalist > $FSLockinLevel>><<set _alignment += 1>><</if>>
		<<set $desc.push("helping to advance its Chinese Revivalism")>>
	<<elseif $arcologies[$i].FSEgyptianRevivalist != "unset">>
		<<set $arcologies[$i].FSEgyptianRevivalist -= Math.trunc(($arcologies[$j].FSChineseRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSEdoRevivalist != "unset">>
		<<set $arcologies[$i].FSEdoRevivalist -= Math.trunc(($arcologies[$j].FSChineseRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSArabianRevivalist != "unset">>
		<<set $arcologies[$i].FSArabianRevivalist -= Math.trunc(($arcologies[$j].FSChineseRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSRomanRevivalist != "unset">>
		<<set $arcologies[$i].FSRomanRevivalist -= Math.trunc(($arcologies[$j].FSChineseRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<<elseif $arcologies[$i].FSAztecRevivalist != "unset">>
		<<set $arcologies[$i].FSAztecRevivalist -= Math.trunc(($arcologies[$j].FSChineseRevivalist-60)/4)+_appliedInfluenceBonus>>
		<<set $desc.push("attacking its incompatible Revivalism")>>
	<</if>>
<</if>>

<<if $desc.length == 0>>
	'' $arcologies[$j].name'' attempts to influence it, but has no significant impacts.
<<elseif $desc.length > 2>>
	'' $arcologies[$j].name'''s mature culture influences $arcologies[$i].name, $desc[0],
	<<for _k = 1; _k < $desc.length; _k++>>
		<<if _k < $desc.length-1>>
			$desc[_k],
		<<else>>
			and $desc[_k].
		<</if>>
	<</for>>
<<elseif $desc.length == 2>>
	'' $arcologies[$j].name'''s culture influences $arcologies[$i].name's $desc[0] and $desc[1].
<<else>>
	'' $arcologies[$j].name'''s culture is beginning to influence $arcologies[$i].name's $desc[0].
<</if>>

<<if _appliedInfluenceBonus > 0>>
	<<if _appliedInfluenceBonus < 5>>
		$arcologies[$j].name is societally advanced, giving it extra influence.
	<<else>>
		$arcologies[$j].name is societally fanatical, lending it great influence.
	<</if>>
<</if>>
<<if $arcologies[$i].ownership >= 100>>
	<<if _appliedInfluenceBonus > 0>>However, <</if>>$arcologies[$i].name is under completely unified control, making it resistant to change.
<</if>>

<<if $arcologies[$j].direction != 0>>
	<<if $desc.length == 0>>
		'' $arcologies[$j].name'' is not satisfied with the impact its directed influence is having, and withdraws it with the intention of targeting it elsewhere.
		<<set $arcologies[$j].influenceTarget = -1>>
	<<elseif _alignment >= 4>>
		'' $arcologies[$j].name'' is satisfied that its influence has brought $arcologies[$i].name into alignment, and withdraws its direct influence with the intention of targeting it elsewhere.
		<<set $arcologies[$j].influenceTarget = -1>>
	<</if>>
<</if>>

<</if>>
<</if>>
<</for>> /* CLOSES INFLUENCE RECEPTION */

<<if $arcologies[$i].direction != 0>>
	<<if $arcologies[$i].influenceTarget == -1>>
		<<run App.Neighbor.selectInfluenceTarget($i)>>
	<</if>>
<</if>>

<<if $arcologies[$i].direction != 0>>
	<<set $arcologies[$i].prosperity = Math.clamp($arcologies[$i].prosperity, 1, 300)>>
	<<set $arcologies[$i].ownership = Math.clamp($arcologies[$i].ownership, 0, 100)>>
	<<set $arcologies[$i].PCminority = Math.clamp($arcologies[$i].PCminority, 0, 100)>>
	<<set $arcologies[$i].minority = Math.clamp($arcologies[$i].minority, 0, 100)>>
	<<set _owned = $arcologies[$i].ownership + $arcologies[$i].PCminority + $arcologies[$i].minority>>
	<<if $arcologies[$i].government != "your agent" && $arcologies[$i].government != "your trustees" && $arcologies[$i].rival != 1>>
		<<if _owned < 10>>
			<<set $arcologies[$i].ownership += 10>> /* Someone needs to own something */
		<<elseif _owned > 100>>
			<<set $arcologies[$i].minority = Math.clamp(100 - $arcologies[$i].ownership - $arcologies[$i].PCminority, 0, 100)>>
			<<if $arcologies[$i].ownership + $arcologies[$i].PCminority > 100>>
				<<set $arcologies[$i].ownership = 100 - $arcologies[$i].PCminority>>
			<</if>>
		<</if>>
	<</if>>
<</if>>

<br>
<</for>>

/* PEACEKEEPERS */

<<if $plot>>
	<<if $peacekeepers != 0>>
		<br>
		<<if $peacekeepers.strength >= 50>>
			<<set _prisoners = Math.trunc($peacekeepers.attitude/10)+random(0,10)>>
			General $peacekeepers.generalName's little empire near the arcology
			<<if $peacekeepers.attitude >= 100>>
				offers _prisoners menial slaves as tribute; having the area as an avowed client state @@.green;improves your reputation.@@
				<<set $peacekeepers.attitude = 100>>
				<<run repX(100, "peacekeepers")>>
			<<else>>
				delivers _prisoners menial slaves to you in payment for your past support.
			<</if>>
			<<set $menials += _prisoners>>
		<<elseif $peacekeepers.strength < 0>>
			@@.yellow;The peacekeeping force led by General $peacekeepers.generalName in the troubled area near the Free City has been withdrawn.@@
			<<if $peacekeepers.undermining>>
				Your misinformation campaign against it in the old world media was successful. Before long, everyone in the Free City is confident that you're somehow responsible, @@.green;greatly improving your reputation.@@
				<<set $peacekeepers = 0, $peacekeepersGone = 1>>
				<<run repX(2000, "peacekeepers")>>
			<<else>>
				The cost was ultimately too high. The time when old world countries could afford to waste billions on military adventurism is gone. It will not return.
				<<set $peacekeepers = 0, $peacekeepersGone = 1>>
			<</if>>
		<<else>>
			There's a peacekeeping force led by General $peacekeepers.generalName in the troubled area near the Free City.
			<<if $peacekeepers.undermining>>
				You're paying for a media misinformation campaign in the old world country that sent him. It
				<<set $peacekeepers.strength -= $peacekeepers.undermining/10000>>
				<<if $peacekeepers.strength < 10>>
					has had a significant impact; one of the nation's two major political parties now favors withdrawing the peacekeepers.
				<<else>>
					has not had a significant impact yet; only a few fringe figures are arguing against the mission.
				<</if>>
			<</if>>
			Unfortunately, the presence of so much old world military power near the Free City causes @@.red;public concern.@@
			<<run repX(-100, "peacekeepers")>>
		<</if>>
		<br>
	<</if>>
<</if>>