code:
:: Arcology Management [nobr]

<<if $useTabs == 0>>__Arcology Management__<</if>>

<<set _flux = random(20,40)>>
<<if $arcologies[0].FSPaternalist != "unset">>
	Poor citizens can rely on their better-off peers in $arcologies[0].name.
	<<set _flux -= Math.trunc($arcologies[0].FSPaternalist/10)>>
<<elseif $arcologies[0].FSDegradationist != "unset">>
	The arcology is a cutthroat place in which falling into slavery is very easy.
	<<set _flux += Math.trunc($arcologies[0].FSDegradationist/10)>>
<</if>>
<<if $arcologies[0].FSEgyptianRevivalist != "unset">>
	Egyptian Revivalism is benevolent in some ways, and charity is common here.
	<<set _flux -= Math.trunc($arcologies[0].FSEgyptianRevivalist/10)>>
<<elseif $arcologies[0].FSRomanRevivalist != "unset">>
	Your citizens take pride in looking after each other.
	<<set _flux -= Math.trunc($arcologies[0].FSRomanRevivalist/10)>>
<</if>>
<<if $arcologies[0].FSChattelReligionist != "unset">>
	Chattel Religionism helps some poor citizens see slavery as a spiritually pure fate.
	<<set _flux += Math.trunc($arcologies[0].FSChattelReligionist/10)>>
<<elseif $arcologies[0].FSNull != "unset">>
	Your arcology's vibrant, open culture helps everyone succeed, preventing many struggling citizens from falling into slavery.
	<<set _flux -= Math.trunc($arcologies[0].FSNull/5)>>
<</if>>
<<if $arcologies[0].FSPastoralist != "unset">>
	The pastoralization of $arcologies[0].name helps concentrate wealth in the hands of a few.
	<<set _flux += Math.trunc($arcologies[0].FSPastoralist/10)>>
<</if>>
<<if $AntiEnslavementCash == 1>>
	Your charity purse prevents a few citizens from falling into slavery.
	<<set _flux -= 10>>
<<elseif $ProEnslavementCash == 1>>
	You @@.yellowgreen;take kickbacks@@ for ignoring enslavement of citizens.
	<<set _flux += 10>>
	<<set $cash += random(500,1500)>>
<</if>>
<<if $AntiEnslavementRep == 1>>
	You use your personal influence to help struggling citizens.
	<<set _flux -= 10, $rep -= 100>>
<<elseif $ProEnslavementRep == 1>>
	You @@.green;make friends@@ by tacitly supporting enslavement of upstart citizens.
	<<set _flux += 10, $rep += 100>>
<</if>>
<<if $enslavementRights == 1>>
	As the only legal entity in the arcology able to declare the status of a person as enslaved, you are able to @@.yellowgreen;collect fees@@ over enslavement of your citizens. Many, however, consider this move an intromission in private affairs, @@.red;damaging your authority.@@
	<<set $authority -= 10>>
	<<set $cash += _flux * 100>>
<</if>>
<<set $oldFlux = _flux>>
<<set $ACitizens -= _flux, $ASlaves += _flux>>
This week, <<if _flux >= 20>>many<<elseif _flux >= 5>>some<<else>>few to none<</if>> of $arcologies[0].name's citizens fell into slavery.

<<if $ACitizens < $ACitizenLimit>>
	<<if $AntiImmigrationCash == 1>>
		You covertly @@.yellowgreen;sell@@ the private information of potential arcology immigrants on the old world black market.
		<<set $cash += random(500,1500), $ACitizens -= random(5,15)>>
	<</if>>
	<<if $AntiImmigrationRep == 1>>
		You allow citizens input on potential immigrants, a @@.green;popular@@ program.
		<<set $rep += 100, $ACitizens -= random(5,15)>>
	<</if>>
	<<if $arcologies[0].FSRestartLaw == 1>>
		Your sterilization program drives several disloyal citizens out of the arcology.
		<<set $ACitizens -= random(3,10)>>
	<</if>>
<</if>>

<<set $oldACitizens = $ACitizens>>
 <<set _immigrants = 0>>
<<if $ACitizens >= $ACitizenLimit>>
	<<set $ACitizens = $ACitizenLimit>>
	Your arcology is currently home to as many citizens as it can house; unless the living areas are reconfigured, the citizen population will not increase.
<<else>>
	<<set _immigrants += random(-10,10)>>
	<<if $ProImmigrationRep == 1>>
		Your welcome program for new citizens helps encourage wealthy people from the old world to immigrate, but @@.red;annoys some longstanding citizens.@@
		<<set _immigrants += random(10,20), $rep -= 100>>
	<</if>>
	<<if $ProImmigrationCash == 1>>
		The rent promotion for new immigrants brings new citizens to the arcology.
		<<set _immigrants += random(10,20)>>
	<</if>>
	<<if $arcologies[0].FSRepopulationFocusLaw == 1>>
		The rent promotion for pregnant women attracts several gravid ladies and a few girls eager to become mothers to enroll as citizens in your arcology.
		<<set _immigrants += random(5,10)>>
	<</if>>
	<<if $ACitizens < $ACitizenLimit*0.6>>
		The availability of a large number of apartments encourages many new citizens to immigrate.
		<<set _immigrants += random(10,20)>>
	<</if>>
	<<if $secExp == 1>>
		<<if $crime > 80>>
			Crime is a widespread phenomenon in your arcology, many potential immigrants are scared away.
			<<set _immigrants -= random(5,10)>>
		<<elseif $crime < 20>>
			Crime is a distant issue within the walls of your arcology, many immigrants are attracted to such safe shores.
			<<set _immigrants += random(5,10)>>
		<</if>>
		<<if $limitSubhumans == 1>>
			Subhumans are stopped and turned away as soon as they dare petition for citizenship in your arcology, slightly lowering immigrants numbers.
			<<set _immigrants -= random(5,10)>>
		<</if>>
		<<if $openBorders == 1>>
			The very liberal attitude towards immigration calls many hopeful immigrants to your arcology.
			<<set _immigrants += random(10,20)>>
		<</if>>
		<<if $propCampaign >= 1 && $propFocus == "immigration">>
			Your advertisement campaign outside the free city brings more people to the gates of your arcology.
			<<if $propCampaignBoost == 0>>
				<<set _immigrants += random(1,2) * $propCampaign>>
			<<else>>
				<<set _immigrants += random(1,4) * $propCampaign>>
			<</if>>
		<</if>>
		<<if $limitImmigration == 1>>
			The strict limits on immigration keep the number of people coming in the arcology limited.
			<<if _immigrants > 40>>
				<<set _immigrants = 40>>
			<</if>>
		<</if>>
		<<if $garrison.waterwayTime > 0>>
			The damage caused to the water supply of the arcology discourages immigration and causes the death of some of the poorest residents.
			It will still take <<if $garrison.waterwayTime > 1>>$garrison.waterwayTime weeks<<else>>a week<</if>> to finish repair works.
			 <<set _immigrants = Math.clamp(_immigrants - random(40,60), 0 , _immigrants)>>
			 <<set $ACitizens -= random(10,20), $ASlaves -= random(10,20)>>
			 <<set $garrison.waterwayTime-->>
			 <<set $PC.engineering += .1>>
		<</if>>
	<</if>>
<</if>>
<<if !isInt(_immigrants)>>

@@.red;Error: immigrants is outside accepted range, please report this issue@@
<</if>>
<<set $ACitizens += _immigrants>>
<<if $ACitizens <= 100>>
		Your arcology is home to an extremely small number of very wealthy citizens; wealth is as concentrated as possible and the citizen population will not decrease further.
		<<set $ACitizens = 100>>
<</if>>

<<if $ASlaves >= $ASlaveLimit>>
	<<set $ASlaves = $ASlaveLimit>>
	The living areas of the arcology are packed with sex slaves; your citizens cannot find space for any more.
<<else>>
	<<set $ASlaves -= random(1,10)+Math.trunc(10*(1-$slaveCostFactor))>>
	<<if $slaveCostFactor >= 1.1>>
		With the price of slaves so high, some of your citizens make money by selling a few of their girls.
	<<elseif $slaveCostFactor <= 0.9>>
		With the price of slaves so low, some of your citizens gratify themselves with new purchases.
	<</if>>
	<<if $ASlaves < $ASlaveLimit*0.8>>
		<<if $ASlaves < $ASlaveLimit*0.6>>
			Since there's a lot of space for sex slaves in the living areas, it's fashionable for your citizens to buy up cheap girls and fill their apartments.
			<<set $ASlaves += random(1,10)+Math.trunc($arcologies[0].prosperity/5)>>
		<<else>>
			Since the living areas can comfortably house more sex slaves, it's fashionable for your citizens to buy more girls.
			<<set $ASlaves += random(1,10)+Math.trunc($arcologies[0].prosperity/10)>>
		<</if>>
		<<if $arcologies[0].prosperity > 200>>
			$arcologies[0].name is extremely prosperous, and they can afford to buy many of the best.
		<<elseif $arcologies[0].prosperity > 100>>
			$arcologies[0].name is quite prosperous, and they can afford to buy many pretty slaves.
		<</if>>
	<</if>>
	<<if $liveTargets == 1>>
		Disobedient slaves are used as live targets in the shooting ranges of the arcology<<if $secBarracks != 0>> and the barracks.<<else>>.<</if>>
		<<set $ASlaves -= random(10,20)>>
	<</if>>
	<<if $ASlaves <= 1000>><<set $ASlaves = 1000>><</if>>
<</if>>

<<if !isInt($ACitizens)>>

@@.red;Error: ACitizens is outside accepted range, please report this issue@@
<</if>>
<<if !isInt($ASlaves)>>

@@.red;Error: ASlaves is outside accepted range, please report this issue@@
<</if>>

<<print commaNum($ACitizens)>> citizens and <<print commaNum($ASlaves+$helots+$slaves.length)>> slaves now live in your arcology.
<<if $arcologies[0].FSSupremacistLawME == 1>>The citizenry is entirely $arcologies[0].FSSupremacistRace.<</if>>
<<if $arcologies[0].FSRomanRevivalistLaw == 1>>The citizens take pride in their martial duties, preferring to wear utilitarian clothing even when off duty.<</if>>
<<if $arcologies[0].FSGenderRadicalistDecoration == 100>>Every single one of the slaves is female by virtue of her fuckable asshole.
<<elseif $arcologies[0].FSGenderFundamentalistSMR == 1>>Almost every citizen is an upstanding man, while the slave population is almost completely female.<</if>>
<<if $arcologies[0].FSEgyptianRevivalistLaw == 1>>Close relationships between citizens and slaves, especially slave siblings, are common.<<elseif $arcologies[0].FSEgyptianRevivalistIncestPolicy == 1>>Close relationships between citizens, slaves and siblings are common.<</if>>
<<if $arcologies[0].FSSubjugationistLawME == 1>>$arcologies[0].FSSubjugationistRace subhumans form a majority of the slaves.<</if>>
<<if $arcologies[0].FSChattelReligionistLaw == 1>>The slave population as a whole is unusually accepting of its station.<</if>>
<<if $arcologies[0].FSPaternalistLaw == 1>>The slaves are well cared for, and it can sometimes be difficult to tell slaves from citizens.
<<elseif $arcologies[0].FSDegradationistLaw == 1>>Most of the slaves are recent captures, since the vicious society that's taken root here uses people up quickly.<</if>>
<<if $arcologies[0].FSBodyPuristLaw == 1>>The average slave is quite healthy.
<<elseif $arcologies[0].FSTransformationFetishistLaw == 1>>
	<<if $arcologies[0].FSTransformationFetishistResearch == 1>>
		Breast implants are almost universal; <<if $arcologies[0].FSSlimnessEnthusiast == "unset">>an M cup bust is below average among the slave population<<else>>even the most lithe slave sports a pair of overly round chest balloons<</if>>.
	<<else>>
		Breast implants are almost universal; <<if $arcologies[0].FSSlimnessEnthusiast == "unset">>a D cup bust is below average among the slave population.<<else>>even the most lithe slave sports a pair of overly round chest balloons<</if>>.
	<</if>>
<</if>>
<<if $arcologies[0].FSSlimnessEnthusiastSMR == 1>>Most of the slave population is quite slim and physically fit.
<<elseif $arcologies[0].FSAssetExpansionistSMR == 1>>The arcology's consumption of pharmaceuticals is impressive, since slave growth hormones are nearly ubiquitous.<</if>>
<<if $arcologies[0].FSRepopulationFocusLaw == 1>>Many of the women in the arcology are pregnant.<<elseif $arcologies[0].FSRepopulationFocusSMR == 1>>Most of the slaves in the arcology are pregnant.<<elseif $arcologies[0].FSRestartLaw == 1>>Many of your civilians have agreed to be sterilized.<<elseif $arcologies[0].FSRestartSMR == 1>>Many of slave slaves in your arcology are infertile.<</if>>
<<if $arcologies[0].FSPastoralistLaw == 1>>Much of the menial slave labor force works to service the arcology's hundreds of human cattle.<</if>>
<<if $arcologies[0].FSPhysicalIdealistSMR == 1>>The arcology must import a very large quantity of nutritive protein to nourish its slaves.<</if>>
<<if $arcologies[0].FSHedonisticDecadenceSMR == 1>>The arcology must import a very large quantity of fattening food to plump up its slaves.<</if>>

<<if $ACitizens > $ASlaves*2>>
	Since most citizens do not own sex slaves, @@.yellowgreen;demand for sexual services is intense.@@
<<elseif $ACitizens > $ASlaves>>
	Since many citizens do not own sex slaves, @@.yellowgreen;demand for sexual services is healthy.@@
<<elseif $ACitizens > $ASlaves*0.5>>
	Since many citizens keep a personal sex slave, @@.yellow;demand for sexual services is only moderate.@@
<<elseif $ACitizens > $ASlaves*0.25>>
	Since most citizens keep at least one sex slave, @@.gold;local demand for sexual services is low,@@ though visitors to the arcology will always keep it above a certain minimum.
<<else>>
	Since most of your citizens now keep private harems of sex slaves, @@.gold;local demand for sexual services is very low,@@ though visitors to the arcology will always keep it above a certain minimum.
<</if>>

<<set $rents = random(1,100)>>
<<for _i = 1; _i < $sectors.length; _i++>>
	<<if $sectors[_i].ownership == 1>>
		<<if $sectors[_i].type != "Brothel">>
		<<if $sectors[_i].type != "Club">>
		<<if $sectors[_i].type != "Arcade">>
		<<if $sectors[_i].type != "Dairy">>
		<<if $sectors[_i].type != "Pit">>
		<<if $sectors[_i].type != "Sweatshops">>
		<<if $sectors[_i].type != "Pens">>
		<<if $sectors[_i].type != "Barracks">>
		<<if $sectors[_i].type != "weapManu">>
			<<set $rents += $arcologies[0].prosperity*10>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
		<</if>>
	<</if>>
<</for>>
<<set $rentalMultiplier = 1>>
<<if $arcologies[0].FSPaternalistLaw == 1>>
	<<set $rentalMultiplier -= 0.1>>
	Tenants who can prove that they abstain from certain practices are given a reduction to their rent.
<</if>>
<<if $arcologies[0].FSYouthPreferentialistLaw == 1>>
	<<set $rentalMultiplier -= 0.1>>
	Younger citizens are offered subsidized rent to encourage young people to join the free population of your arcology.
<</if>>
<<if $arcologies[0].FSMaturityPreferentialistLaw == 1>>
	<<set $rentalMultiplier -= 0.1>>
	Older citizens are offered subsidized rent to encourage mature people to join the free population of your arcology.
<</if>>
<<if $arcologies[0].FSRepopulationFocusLaw == 1>>
	<<set $rentalMultiplier -= 0.1>>
	Pregnant citizens are offered subsidized rent to encourage free women to become pregnant and pregnant women to join the free population of your arcology.
<<elseif $arcologies[0].FSRestartLaw == 1>>
	<<set $rentalMultiplier += 0.1>>
	Non-elite citizens who refuse to be sterilized face a moderate tax and the looming possibility of expulsion or enslavement.
<</if>>
<<if $arcologies[0].FSHedonisticDecadenceLaw == 1>>
	<<set $rentalMultiplier -= 0.1>>
	Food vendors are offered subsidized rent and operating expenses to set up shop in your arcology.
<</if>>
<<if $alternativeRents == 1>>
	Your citizens are allowed to pay their rents in slaves rather than cash and a few financially challenged individuals make use of this.
	<<set $rentalMultiplier -= 0.1>>
	<<set $helots += random(0,3)>>
<</if>>
<<if $discountMercenaries == 1>>
	Mercenaries willing to come to your arcology are given a discount on rent.
	<<set $rentalMultiplier -= 0.05>>
<</if>>
<<if $militiaSoldierPrivilege == 1>>
	Citizens in the militia are exempt from rent payment.
	<<set $rentalMultiplier -= 0.05>>
<</if>>
<<if $arcologies[0].FSArabianRevivalistLaw == 1>>
	<<set $rentalMultiplier += 0.1>>
	Those of your citizens who have not yet subscribed to the society you are building are permitted to live and do business here, but must pay a moderate jizya tax for the privilege as part of their rent.
<</if>>
<<set $rents = Math.trunc($rents*$rentalMultiplier)>>
<<if !isInt($rents)>>

@@.red;Error: rents is outside accepted range, please report this issue@@
<</if>>
<<set $cash += $rents>>

This week, rents from $arcologies[0].name came to
<<if $rents > 0>>
	@@.yellowgreen;<<print cashFormat($rents)>>.@@
<<else>>
	@@.red;<<print cashFormat($rents)>>.@@
<</if>>

<<if $economy > 1>>
	<<set $rents = ($week*100)+random(-100,100)>>
	<<if $cash > 1000>>
			<<set $rents += Math.trunc($cash*0.02)>>
	<</if>>
	The @@.red;degenerating world economy@@ makes supplying and maintaining $arcologies[0].name extremely difficult. This week, bribes and other costs to keep it running came to @@.yellowgreen;<<print cashFormat($rents)>>.@@
	<<set $cash -= $rents>>
<</if>>

<<if $helots+$menialBioreactors+$fuckdolls > 0>>
<<set _earnings = 0>>
You own
<<if $helots > 0>>
	<<set _earnings += $helots*10>>
	<<if $Sweatshops > 0>>
		<<if $Sweatshops*500 <= $helots>>
			<<set _earnings += $Sweatshops*7000>>
			<<set _earnings += ($helots-$Sweatshops*500)*10>>
		<<else>>
			<<set _earnings += $helots*10>>
		<</if>>
	<</if>>
	<<if $helots > 1>> <<print commaNum($helots)>> menial slaves<<if ($menialBioreactors > 0) && ($fuckdolls == 0)>> and<<else>>,<</if>><<else>>one menial slave<<if ($menialBioreactors > 0) && ($fuckdolls == 0)>> and<<else>>,<</if>><</if>>
<</if>>
<<if $menialBioreactors > 0>>
	<<set _earnings += $menialBioreactors*(10+(10*$arcologies[0].FSPastoralistLaw))>>
	<<if $dairy && $dairyUpgradeMenials>><<set _earnings += $menialBioreactors*5>><</if>>
	<<if $menialBioreactors > 1>> <<print commaNum($menialBioreactors)>> standard bioreactors,<<else>>one standard bioreactor,<</if>>
	<<if $fuckdolls > 0>>and<</if>>
<</if>>
<<if $fuckdolls > 0>>
	<<set _earnings += $fuckdolls*(15+(10*$arcologies[0].FSDegradationistLaw))>>
	<<if $arcade && $arcadeUpgradeMenials>><<set _earnings += $fuckdolls*5>><</if>>
	<<if $fuckdolls > 1>> <<print commaNum($fuckdolls)>> standard fuckdolls,<<else>>one fuckdoll,<</if>>
<</if>>
<<set _earnings += random(1,10)>>

<<set $cash += _earnings>>
earning you @@.yellowgreen;<<print cashFormat(_earnings)>>.@@
<</if>>

<<set _refugees = 0>>
<<if $terrain == "urban">>
	<<set _refugees += random(0,5)>>
<<elseif $terrain == "rural">>
	<<set _refugees += random(0,3)>>
<<elseif $terrain == "marine">>
	<<set _refugees += random(0,1)>>
<</if>>
<<if $ProRefugees == 1>>
	<<set _refugees += random(0,1)>>
<</if>>
<<for $i = 0; $i < 3; $i++>>
	<<if $rep > random(0,30000)>>
	<<set _refugees += 1>>
	<</if>>
<</for>>
<<if _refugees > 0>>
	Some desperate people filtered into the arcology during the
	<<if $propCampaign >= 1 && $propFocus == "enslavement">>
		week, many attracted by your advertisement campaigns
		<<if $propCampaignBoost == 0>>
			<<set _refugees += random(0,2)>>
		<<else>>
			<<set _refugees += random(0,4)>>
		<</if>>
	<<else>>
		week.
	<</if>>
	As owner, you were able to enslave _refugees of them.
	<<set $helots += _refugees>>
<</if>>

<<set _AWeekGrowth = $AGrowth>>
<<if _AWeekGrowth+$arcologies[0].prosperity > $AProsperityCap>>
	@@.yellow;$arcologies[0].name is at its maximum prosperity, so rents will not increase until it is improved.@@
<<elseif (2*_AWeekGrowth)+$arcologies[0].prosperity >= $AProsperityCap>>
	@@.yellow;Your arcology is nearly at its maximum prosperity.@@
	<<set $arcologies[0].prosperity += _AWeekGrowth>>
<<else>>
	<<if $arcologies[0].ownership >= 100>>
		Your controlling interest in $arcologies[0].name allows you to lead it economically, @@.green;supercharging growth.@@
		<<set _AWeekGrowth += 3>>
	<<elseif $arcologies[0].ownership >= random(40,100)>>
		Your interest in $arcologies[0].name allows you to lead it economically, @@.green;boosting growth.@@
		<<set _AWeekGrowth++>>
	<</if>>
	<<if $arcologies[0].prosperity < ($rep/100)>>
		Your impressive reputation relative to $arcologies[0].name's prosperity @@.green;drives an increase in business.@@
		<<set _AWeekGrowth++>>
	<<elseif $rep > 18000>>
	<<elseif $arcologies[0].prosperity > ($rep/60)>>
		Your low reputation relative to $arcologies[0].name's prosperity @@.red;seriously impedes business growth.@@
		<<set _AWeekGrowth -= 2>>
	<<elseif $arcologies[0].prosperity > ($rep/80)>>
		Your unimpressive reputation relative to $arcologies[0].name's prosperity @@.yellow;slows business growth.@@
		<<set _AWeekGrowth-->>
	<</if>>
	<<if $secExp == 1>>
		<<if $trade <= 20>>
			<<set _AWeekGrowth += 1>>
		<<elseif $trade <= 40>>
			<<set _AWeekGrowth += 2>>
		<<elseif $trade <= 60>>
			<<set _AWeekGrowth += 3>>
		<<elseif $trade <= 80>>
			<<set _AWeekGrowth += 4>>
		<<else>>
			<<set _AWeekGrowth += 5>>
		<</if>>

		<<if $smilingManFate == 0>>
			The ex-criminal known to the world as The Smiling Man puts her impressive skills to work, improving the financial situation of the arcology with ease.
			<<set _AWeekGrowth++>>
		<</if>>
	<</if>>
	<<if $personalAttention == "business">>
		<<if ($PC.trading >= 100) || ($PC.career == "arcology owner")>>
			Your @@.springgreen;business focus and your experience@@ allow you to greatly assist in advancing the arcology's prosperity.
			<<set _AWeekGrowth += 2>>
		<<else>>
			Your business focus allows you to help improve the arcology's prosperity.
			<<set _AWeekGrowth++>>
		<</if>>
		<<if $PC.actualAge >= 50>>
			<<if $arcologies[0].FSMaturityPreferentialistLaw == 1>>
				You are able to leverage your long seniority in the business community using the arcology's favorable laws to further advance prosperity.
				<<set _AWeekGrowth++>>
			<</if>>
		<<elseif $PC.actualAge < 35>>
			<<if $arcologies[0].FSYouthPreferentialistLaw == 1>>
				You are able to leverage your freshness in the business community using the arcology's favorable laws to further advance prosperity.
				<<set _AWeekGrowth++>>
			<</if>>
		<</if>>
	<</if>>
	<<if $arcologies[0].FSNull != "unset">>
		Your cultural openness is a powerful driver of economic activity.
		<<set _AWeekGrowth += Math.trunc($arcologies[0].FSNull/25)>>
	<</if>>
	<<if $arcologies[0].FSRestart != "unset">>
		Your powerful connections open many avenues of economic expansion.
		<<set _AWeekGrowth += Math.trunc($arcologies[0].FSRestart/10)>>
	<</if>>
	<<if $arcologies[0].FSPaternalist >= random(1,100)>>
		This week, the careful attention to slave welfare your new society emphasizes has been a driver of prosperity.
		<<set _AWeekGrowth++>>
	<</if>>
	<<if $arcologies[0].FSHedonisticDecadence >= random(1,100)>>
		This week, several new businesses opened local branches or broke ground, greatly increasing prosperity.
		<<set _AWeekGrowth += 2>>
	<</if>>
	<<if $arcologies[0].FSChattelReligionistCreed == 1>>
	<<if $nicaeaFocus == "owners">>
		The focus on slaveowners' whims in the creed of $nicaeaName interests the rich and powerful, increasing prosperity.
		<<set _AWeekGrowth += $nicaeaPower>>
	<</if>>
	<</if>>
	<<if $arcologies[0].FSRomanRevivalist >= random(1,100)>>
		This week, intense interest in your project to revive Roman values has driven prosperity.
		<<set _AWeekGrowth++>>
	<<elseif $arcologies[0].FSChineseRevivalist != "unset">>
		<<if ($HeadGirl != 0) && ($Recruiter != 0) && ($Bodyguard != 0)>>
			This week, your imperial administration, staffed with a Head Girl, a Recruiter, and a Bodyguard, has improved prosperity.
			<<set _AWeekGrowth += 2>>
		<</if>>
	<</if>>
	<<if $PC.trading >= 100>>
		Your @@.springgreen;business skills@@ drive increased prosperity.
		<<set _AWeekGrowth++>>
	<<elseif $PC.career == "arcology owner">>
		Your @@.springgreen;experience in the Free Cities@@ helps increase prosperity.
		<<set _AWeekGrowth++>>
	<</if>>
	<<set _schools = $TSS.schoolPresent+$GRI.schoolPresent+$SCP.schoolPresent+$LDE.schoolPresent+$TGA.schoolPresent+$TFS.schoolPresent+$TCR.schoolPresent+$HA.schoolPresent>>
	<<if _schools == 1>>
		The presence of a slave school in the arcology improves the local economy.
	<<elseif _schools > 0>>
		The presence of slave schools in the arcology greatly improves the local economy.
	<<elseif $arcologies[0].prosperity > 80>>
		The lack of a branch campus from a reputable slave school is slowing further development of the local economy.
		<<set _AWeekGrowth-->>
	<</if>>
	<<set _AWeekGrowth += _schools>>
	<<if $arcologies[0].FSDegradationistLaw == 1>>
		Requiring menials to be given time to fuck human sex toys in the arcade reduces labor efficiency, slowing growth.
		<<set _AWeekGrowth-->>
	<</if>>
	<<if $arcologies[0].FSBodyPuristLaw == 1>>
		The drug surcharge used to fund the purity regime reduces growth.
		<<set _AWeekGrowth-->>
	<</if>>
	<<if $arcologies[0].FSPastoralistLaw == 1>>
		Prosperity improvement is slowed by the regulations on animal products.
		<<set _AWeekGrowth-->>
	<</if>>
	<<if $arcologies[0].FSPaternalistSMR == 1>>
		Your slave market regulations slow the flow of chattel through the arcology.
		<<set _AWeekGrowth-->>
	<</if>>

	/* deactivated with sec Exp as they are modifiers for the trade mechanic */
	<<if $secExp == 0>>
		<<if $terrain == "urban">>
			Since your arcology is located in the heart of an urban area, its commerce is naturally vibrant.
			<<set _AWeekGrowth++>>
		<</if>>
		<<if $terrain == "ravine">>
			Since your arcology is located in the heart of a ravine, its commerce is hindered by a lack of accessibility.
			<<set _AWeekGrowth-->>
		<</if>>
	<</if>>

	<<if def $arcologies[0].embargoTarget && $arcologies[0].embargoTarget != -1>>
		The local economy is hurt by the double edged sword of your economic warfare.
		<<set _AWeekGrowth -= $arcologies[0].embargo*2>>
	<</if>>

	<<set $desc = []>>
	<<set $descNeg = []>>
	<<for $i = 1; $i < $arcologies.length; $i++>>
		<<set $activeArcology = $arcologies[0]>>
		<<set $targetArcology = $arcologies[$i]>>
		<<include "Arcology Opinion">>
		<<if $opinion >= 100>>
			<<set $desc.push($arcologies[$i].name)>>
		<<elseif $opinion <= -100>>
			<<set $descNeg.push($arcologies[$i].name)>>
		<</if>>
	<</for>>
	<<if $desc.length > 0>>
		Your arcology's economy benefits from close social alignment with
		<<if $desc.length > 2>>
		''$desc[0]'',
		<<for $k = 1; $k < $desc.length; $k++>>
			<<if $k < $desc.length-1>>
			''$desc[$k]'',
			<<else>>
			and ''$desc[$k]''<<if $descNeg.length > 0>>, but<<else>>.<</if>>
			<</if>>
		<</for>>
		<<elseif $desc.length == 2>>
		''$desc[0]'' and ''$desc[1]''<<if $descNeg.length > 0>>, but<<else>>.<</if>>
		<<else>>
		''$desc[0]''<<if $descNeg.length > 0>>, but<<else>>.<</if>>
		<</if>>
		<<set _AWeekGrowth += $desc.length>>
	<</if>>
	<<if $descNeg.length > 0>>
		<<if $desc.length == 0>>Your arcology's economy<</if>>
		is hindered by social conflicts with
		<<if $descNeg.length > 2>>
		''$descNeg[0]'',
		<<for $k = 1; $k < $descNeg.length; $k++>>
			<<if $k < $descNeg.length-1>>
			''$descNeg[$k]'',
			<<else>>
			and ''$descNeg[$k]''.
			<</if>>
		<</for>>
		<<elseif $descNeg.length == 2>>
		''$descNeg[0]'' and ''$descNeg[1]''.
		<<else>>
		''$descNeg[0]''.
		<</if>>
		<<set _AWeekGrowth -= $descNeg.length>>
	<</if>>
	<<if $alwaysSubsidizeGrowth == 1>>
		Growth was subsidized as planned.
		<<set _AWeekGrowth++>>
	<</if>>
	<<if $secExp == 1>>
		<<if $authority > 18000>>
			Your authority is so high it discourages new business, slowing down the economic growth of the arcology.
			<<set _AWeekGrowth-->>
		<</if>>
		<<if $security > 80>>
			Your arcology is extremely safe and stable. Many businesses are attracted to it because of this.
			<<set _AWeekGrowth++>>
		<<elseif $security < 20>>
			Your arcology's low security is an instability factor simply too dangerous to be ignored. Many businesses avoid your arcology because of this.
			<<set _AWeekGrowth-->>
		<</if>>
		<<if $weaponsLaw == 3>>
			The free flow of weapons in your arcology has a positive impact on its economy.
			<<set _AWeekGrowth++>>
		<<elseif $weaponsLaw == 2>>
			The fairly liberal flow of weapons in your arcology has a positive impact on its economy.
			<<set _AWeekGrowth++>>
		<</if>>
		<<if $controlLeaks == 1>>
			The authenticity department prepares extremely accurate, but false financial reports, misleading many of your competitors, allowing your arcology more space to grow undisturbed.
			<<set _AWeekGrowth++>>
		<</if>>
		<<if $globalCrisisWeeks > 0>>
			The great global crisis ignited by The Smiling Man plan is a great weight on the shoulders of everyone, causing great harm to the prosperity of the arcology.
			<<set _AWeekGrowth -= random(2,4)>>
			<<set $globalCrisisWeeks-->>
		<<elseif $smilingManProgress >= 3>>
			With the global economy recovering from the great crisis unleashed by the Smiling Man, there is plenty of room to grow. Your arcology's prosperity benefits from this greatly.
			<<set _AWeekGrowth++>>
		<</if>>
		<<if $garrison.reactorTime > 0>>
			The damage to the reactor caused by the last rebellion is extensive. Businesses and private citizens struggle to operate with the unreliable and limited energy production offered by the auxiliary generators.
			It will still take <<if $garrison.reactorTime> 1>>$garrison.reactorTime weeks<<else>>a week<</if>> to finish repair works.
			<<set _AWeekGrowth -= random(1,2)>>
			<<set $garrison.reactorTime--, $PC.engineering += .1>>
		<</if>>
	<</if>>
	<<set _AWeekGrowth = Math.trunc(0.5*_AWeekGrowth)>>
	<<if _AWeekGrowth > 0>>
		Since $arcologies[0].name can support more citizens and more activity, @@.green;its prosperity improved this week.@@
	<<elseif _AWeekGrowth == 0>>
		Though $arcologies[0].name can support more citizens and more activity, @@.yellow;growth was moribund this week.@@
	<<else>>
		Though $arcologies[0].name can support more citizens and more activity, @@.red;it lost prosperity this week.@@
	<</if>>
	<<if isNaN(_AWeekGrowth)>>

@@.red;Error: AWeekGrowth is NaN
	<<else>>
		<<set $arcologies[0].prosperity += _AWeekGrowth>>
	<</if>>
<</if>>

<<if $secExp == 1>>

	<<include "tradeReport">>
<</if>>

<<if $TSS.schoolPresent+$GRI.schoolPresent+$SCP.schoolPresent+$LDE.schoolPresent+$TGA.schoolPresent+$TFS.schoolPresent+$TCR.schoolPresent+$HA.schoolPresent > 0>>

<<if $TSS.schoolPresent == 1>>

The Slave School has a <<if $TSS.schoolProsperity > 4>>very prosperous<<elseif $TSS.schoolProsperity < -4>>struggling<<else>>thriving<</if>> branch campus in $arcologies[0].name.
<<if $TSS.schoolProsperity >= 10>>
	It is one of the finest slave schools in the world<<if $rep > 19000>>.<<else>>, @@.green;improving your reputation.@@<<set $rep += 200>><</if>>
	<<set $TSS.subsidize = 0>>
	<<set $TSS.schoolProsperity = 10>>
<</if>>
<<if $TSS.subsidize == 1>>
	You have a policy of subsidizing them.
	<<set $TSS.schoolProsperity++>>
<<elseif $TSS.subsidize == -1>>
	You have a policy of covertly undermining them.
	<<set $TSS.schoolProsperity-->>
<</if>>
<</if>>

<<if $GRI.schoolPresent == 1>>

The Growth Research Institute has a <<if $GRI.schoolProsperity > 4>>very prosperous<<elseif $GRI.schoolProsperity < -4>>struggling<<else>>thriving<</if>> subsidiary lab in $arcologies[0].name.
<<if $GRI.schoolProsperity >= 10>>
	It is one of the finest research facilities in the world<<if $rep > 19000>>.<<else>>, @@.green;improving your reputation.@@<<set $rep += 200>><</if>>
	<<set $GRI.subsidize = 0, $GRI.schoolProsperity = 10>>
<</if>>
<<if $GRI.subsidize == 1>>
	You have a policy of subsidizing them.
	<<set $GRI.schoolProsperity++>>
<<elseif $GRI.subsidize == -1>>
	You have a policy of covertly undermining them.
	<<set $GRI.schoolProsperity-->>
<</if>>
<</if>>

<<if $TCR.schoolPresent == 1>>

The Cattle Ranch has a <<if $TCR.schoolProsperity > 4>>very prosperous<<elseif $TCR.schoolProsperity < -4>>struggling<<else>>thriving<</if>> local pasture in $arcologies[0].name.
<<if $TCR.schoolProsperity >= 10>>
	It is one of the finest slave schools in the world<<if $rep > 19000>>.<<else>>, @@.green;improving your reputation.@@<<set $rep += 200>><</if>>
	<<set $TCR.subsidize = 0, $TCR.schoolProsperity = 10>>
<</if>>
<<if $TCR.subsidize == 1>>
	You have a policy of subsidizing them.
	<<set $TCR.schoolProsperity++>>
<<elseif $TCR.subsidize == -1>>
	You have a policy of covertly undermining them.
	<<set $TCR.schoolProsperity-->>
<</if>>
<</if>>

<<if $SCP.schoolPresent == 1>>

St. Claver Preparatory has a <<if $SCP.schoolProsperity > 4>>very prosperous<<elseif $SCP.schoolProsperity < -4>>struggling<<else>>thriving<</if>> branch campus in $arcologies[0].name.
<<if $SCP.schoolProsperity >= 10>>
	It is one of the finest slave schools in the world<<if $rep > 19000>>.<<else>>, @@.green;improving your reputation.@@<<set $rep += 200>><</if>>
	<<set $SCP.subsidize = 0, $SCP.schoolProsperity = 10>>
<</if>>
<<if $SCP.subsidize == 1>>
	You have a policy of subsidizing them.
	<<set $SCP.schoolProsperity++>>
<<elseif $SCP.subsidize == -1>>
	You have a policy of covertly undermining them.
	<<set $SCP.schoolProsperity-->>
<</if>>
<</if>>

<<if $LDE.schoolPresent == 1>>

L'École des Enculées has a <<if $LDE.schoolProsperity > 4>>very prosperous<<elseif $LDE.schoolProsperity < -4>>struggling<<else>>thriving<</if>> branch campus in $arcologies[0].name.
<<if $LDE.schoolProsperity >= 10>>
	It is one of the finest slave schools in the world<<if $rep > 19000>>.<<else>>, @@.green;improving your reputation.@@<<set $rep += 200>><</if>>
	<<set $LDE.subsidize = 0, $LDE.schoolProsperity = 10>>
<</if>>
<<if $LDE.subsidize == 1>>
	You have a policy of subsidizing them.
	<<set $LDE.schoolProsperity++>>
<<elseif $LDE.subsidize == -1>>
	You have a policy of covertly undermining them.
	<<set $LDE.schoolProsperity-->>
<</if>>
<</if>>

<<if $TGA.schoolPresent == 1>>

The Gymnasium-Academy has a <<if $TGA.schoolProsperity > 4>>very prosperous<<elseif $TGA.schoolProsperity < -4>>struggling<<else>>thriving<</if>> branch campus in $arcologies[0].name.
<<if $TGA.schoolProsperity >= 10>>
	It is one of the finest slave schools in the world<<if $rep > 19000>>.<<else>>, @@.green;improving your reputation.@@<<set $rep += 200>><</if>>
	<<set $TGA.subsidize = 0, $TGA.schoolProsperity = 10>>
<</if>>
<<if $TGA.subsidize == 1>>
	You have a policy of subsidizing them.
	<<set $TGA.schoolProsperity++>>
<<elseif $TGA.subsidize == -1>>
	You have a policy of covertly undermining them.
	<<set $TGA.schoolProsperity-->>
<</if>>
<</if>>

<<if $TFS.schoolPresent == 1>>

The Futanari Sisters have a <<if $TFS.schoolProsperity > 4>>very prosperous<<elseif $TFS.schoolProsperity < -4>>struggling<<else>>thriving<</if>> community in $arcologies[0].name.
<<if $TFS.schoolProsperity >= 10>>
	They are one of the most renowned futa societies in the world<<if $rep > 19000>>.<<else>>, @@.green;improving your reputation.@@<<set $rep += 200>><</if>>
	<<set $TFS.subsidize = 0, $TFS.schoolProsperity = 10>>
<</if>>
<<if $TFS.subsidize == 1>>
	You have a policy of subsidizing them<<if ($PC.dick == 1) && ($PC.vagina == 1) && ($PC.boobs == 1)>>, which is more effective due to your close relationship with them and your physical resemblance to them<<set $TFS.schoolProsperity++>><</if>>.
	<<set $TFS.schoolProsperity++>>
<<elseif $TFS.subsidize == -1>>
	You have a policy of covertly undermining them.
	<<set $TFS.schoolProsperity-->>
<</if>>
<</if>>

<<if $HA.schoolPresent == 1>>

The Hippolyta Academy have a <<if $HA.schoolProsperity > 4>>very prosperous<<elseif $HA.schoolProsperity < -4>>struggling<<else>>thriving<</if>> branch in $arcologies[0].name.
<<if $HA.schoolProsperity >= 10>>
	They are one of the most famous schools in the world<<if $rep > 19000>>.<<else>>, @@.green;improving your reputation.@@<<set $rep += 200>><</if>>
	<<set $HA.subsidize = 0, $HA.schoolProsperity = 10>>
<</if>>
<<if $HA.subsidize == 1>>
	You have a policy of subsidizing them.
	<<set $HA.schoolProsperity++>>
<<elseif $HA.subsidize == -1>>
	You have a policy of covertly undermining them.
	<<set $HA.schoolProsperity-->>
<</if>>
<</if>>

<</if>>

<<if $marketAssistantLimit != 0>>
<<silently>><<MenialPopCap>><</silently>>
<<set $seed = menialSlaveCost()>>

Your ''business assistant'' manages the menial slave market.
<<if $seed <= 900+$marketAssistantAggressiveness>>/* BUY */
	<<if $helots+$fuckdolls+$menialBioreactors >= $PopCap>>
	There is no room in the parts of your arcology you own for more menial slaves.
	<<else>>
		<<if $cash > $marketAssistantLimit+$seed>>
			<<if $assistant == 0>>It<<else>>She<</if>> acquires more chattel, since it's a buyers' market.
			<<if ($arcologies[0].FSPastoralist != "unset") && ($arcologies[0].FSPaternalist == "unset")>>
				<<set $menialBioreactors += Math.trunc(($cash-$marketAssistantLimit)/($seed)), $menialDemandFactor += Math.trunc(($cash-$marketAssistantLimit)/($seed)), $cash -= Math.trunc(($cash-$marketAssistantLimit)/($seed))*($seed)>>
			<<elseif ($arcologies[0].FSDegradationist != "unset")>>
				<<set $fuckdolls += Math.trunc(($cash-$marketAssistantLimit)/(($seed+100)*2)), $menialDemandFactor += Math.trunc(($cash-$marketAssistantLimit)/(($seed+100)*2)), $cash -= Math.trunc(($cash-$marketAssistantLimit)/(($seed+100)*2))*(($seed+100)*2)>>
			<<else>>
				<<set $helots += Math.trunc(($cash-$marketAssistantLimit)/($seed+100)), $menialDemandFactor += Math.trunc(($cash-$marketAssistantLimit)/($seed+100)), $cash -= Math.trunc(($cash-$marketAssistantLimit)/($seed+100))*($seed+100)>>
			<</if>>
		<</if>>
	<</if>>
<<elseif $seed >= 1100-$marketAssistantAggressiveness>>/* SELL */
	<<if $helots+$fuckdolls+$menialBioreactors > 0>>
		<<if $assistant == 0>>It<<else>>She<</if>> liquidates your chattel holdings, since it's a sellers' market.
	<</if>>
	<<if $helots > 0>>
		<<set $cash += $helots*($seed), $menialDemandFactor -= $helots, $helots = 0>>
	<</if>>
	<<if $fuckdolls > 0>>
		<<set $cash += $fuckdolls*($seed*2), $menialDemandFactor -= $fuckdolls, $fuckdolls = 0>>
	<</if>>
	<<if $menialBioreactors > 0>>
		<<set $cash += $menialBioreactors*($seed-100), $menialDemandFactor -= $menialBioreactors, $menialBioreactors = 0>>
	<</if>>
<<else>>
	Prices are average, so <<if $assistant == 0>>it<<else>>she<</if>> does not make any significant moves.
<</if>>
<<silently>><<MenialPopCap>><</silently>>
<</if>>


code:
:: Arcology Opinion [nobr]

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

<<set $opinion = 0>>

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

<<set $opinion = Number($opinion) || 0>>

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

repo_name: Akane/fc


code:
:: Assign [nobr]

<<if $i >= 0 && $i < $slaves.length && ((ndef $activeSlave) || $activeSlave.ID != $slaves[$i].ID)>> /* don't overwrite activeSlave unnecessarily */
	<<set $activeSlave = $slaves[$i]>>
<</if>>

<<if (ndef $activeSlave)>>
	@@.red;ERROR: $activeSlave undefined in Assign.tw, $$i = $i, previous passage was '<<print previous()>>'@@ <<link "Continue">><<goto $returnTo>><</link>>
<<else>>

	<<switch $assignTo>>
	<<case "Pit">>
		<<set $fighterIDs.push($activeSlave.ID)>>
		<<goto $returnTo>>

	<<case "Coursing Association">>
		<<set $Lurcher = $activeSlave>>
		<<goto $returnTo>>

	<<default>>
		<<assignJob $activeSlave $assignTo>>

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

<</if>>