code:
:: Multiple Organ Implant [nobr]

You head down to your <<if $surgeryUpgrade == 1>>heavily upgraded and customized remote surgery<<else>>remote surgery<</if>> and start having the slaves with <<if ($completedOrgans.length > 0) && ($limbsCompleted > 0)>>organs or limbs <<elseif ($completedOrgans.length > 1)>>organs <<elseif ($limbsCompleted > 1)>>sets of limbs <</if>>that are ready be sent down.

/* builds a list for each slave and adds the appropriate organs to it */
<<for _i = 0; _i < $slaves.length; _i++>>
	<<set $activeSlave = $slaves[_i]>>
	<<set _slaveOrgans = {
		penis: 0,
		testicles: 0,
		scrotum: 0,
		pigTesticles: 0,
		canineTesticles: 0,
		horseTesticles: 0,
		cowTesticles: 0,
		foreskin: 0,
		ovaries: 0,
		freshOvaries: 0,
		prostate: 0,
		pigOvaries: 0,
		canineOvaries: 0,
		horseOvaries: 0,
		cowOvaries: 0,
		eyes: 0,
		cochleae: 0,
		voicebox: 0,
		mpreg: 0,
		mpregPig: 0,
		mpregCanine: 0,
		mpregHorse: 0,
		mpregCow: 0
		}>>
	<<for _j = 0; _j < $completedOrgans.length; _j++>>
		<<if $activeSlave.ID == $completedOrgans[_j].ID>>
			<<if $completedOrgans[_j].type == "penis">>
				<<set _slaveOrgans.penis = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "testicles">>
				<<set _slaveOrgans.testicles = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "scrotum">>
				<<set _slaveOrgans.scrotum = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "pigTesticles">>
				<<set _slaveOrgans.pigTesticles = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "canineTesticles">>
				<<set _slaveOrgans.canineTesticles = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "horseTesticles">>
				<<set _slaveOrgans.horseTesticles = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "cowTesticles">>
				<<set _slaveOrgans.cowTesticles = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "foreskin">>
				<<set _slaveOrgans.foreskin = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "ovaries">>
				<<set _slaveOrgans.ovaries = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "freshOvaries">>
				<<set _slaveOrgans.freshOvaries = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "prostate">>
				<<set _slaveOrgans.prostate = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "pigOvaries">>
				<<set _slaveOrgans.pigOvaries = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "canineOvaries">>
				<<set _slaveOrgans.canineOvaries = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "horseOvaries">>
				<<set _slaveOrgans.horseOvaries = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "cowOvaries">>
				<<set _slaveOrgans.cowOvaries = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "eyes">>
				<<set _slaveOrgans.eyes = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "cochleae">>
				<<set _slaveOrgans.cochleae = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "voicebox">>
				<<set _slaveOrgans.voicebox = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "mpreg">>
				<<set _slaveOrgans.mpreg = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "mpregPig">>
				<<set _slaveOrgans.mpregPig = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "mpregCanine">>
				<<set _slaveOrgans.mpregCanine = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "mpregHorse">>
				<<set _slaveOrgans.mpregHorse = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<elseif $completedOrgans[_j].type == "mpregCow">>
				<<set _slaveOrgans.mpregCow = $completedOrgans[_j]>>
				<<set $completedOrgans.deleteAt(_j),_j-->>
			<<else>>

Error: unrecognized organ.
			<</if>>
		<</if>>
	<</for>>
	/* read _slaveOrgans and install them when appropriate */
	/* order here is important, do not change it without good reason */
	/* eyes */
	<<if _slaveOrgans.eyes != 0>>
		<<if ($activeSlave.eyes == -2) && $activeSlave.origEye != "implant">>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.eyes = 1>>
			<<set $activeSlave.eyeColor = $activeSlave.origEye>>
			/* no way to salvage original eye color */
			<<set $activeSlave.health -= 20>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<set $surgeryType = "unblind">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.origEye == "implant">>
			<<set $cash -= $surgeryCost>>
			<<set $stockpile.ocularImplant++>>
			<<set $activeSlave.eyes = 1>>
			<<set _oldEyes = $genePool.find(function(s) { return s.ID = $activeSlave.ID; })>>
			<<set $activeSlave.origEye = _oldEyes.origEye>>
			<<set $activeSlave.eyeColor = $activeSlave.origEye>>
			<<set $activeSlave.health -= 20>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<set $surgeryType = "newEyes">>
			<<include "Surgery Degradation">>
		<<else>>

			@@.red;Could not implant eyes on $activeSlave.slaveName: she is not blind.@@
			<<set $completedOrgans.push(_slaveOrgans.eyes)>>
		<</if>>
	<</if>>
	/* cochleae */
	<<if _slaveOrgans.cochleae != 0>>
		<<if ($activeSlave.hears == -2) && $activeSlave.earImplant != 1>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.hears = 0>>
			<<set $activeSlave.health -= 20>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<set $surgeryType = "undeafen">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.earImplant == 1>>
			<<set $cash -= $surgeryCost>>
			<<set $stockpile.cochlearImplant++>>
			<<set $activeSlave.hears = 0>>
			<<set $activeSlave.health -= 20>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<set $surgeryType = "newEars">>
			<<include "Surgery Degradation">>
		<<else>>

			@@.red;Could not implant cochleae on $activeSlave.slaveName: she is not deaf.@@
			<<set $completedOrgans.push(_slaveOrgans.cochleae)>>
		<</if>>
	<</if>>
	/* voice */
	<<if _slaveOrgans.voicebox != 0>>
		<<if ($activeSlave.voice == 0)>>
			<<set $cash -= $surgeryCost>>
			<<if $activeSlave.ovaries == 1 && $activeSlave.hormoneBalance >= 200>>
				<<set $activeSlave.voice = 3>>
			<<elseif ($activeSlave.balls > 0) || ($activeSlave.hormoneBalance < -20)>>
				<<set $activeSlave.voice = 1>>
			<<else>>
				<<set $activeSlave.voice = 2>>
			<</if>>
			<<set $activeSlave.health -= 10>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 10>>
			<</if>>
			<<set $surgeryType = "restoreVoice">>

			<<run Enunciate($activeSlave)>>
			<<include "Surgery Degradation">>
		<<else>>

			@@.red;Could not implant vocal cords on $activeSlave.slaveName: she is not mute.@@
			<<set $completedOrgans.push(_slaveOrgans.voicebox)>>
		<</if>>
	<</if>>
	/* foreskin */
	<<if _slaveOrgans.foreskin != 0>>
		<<if ($activeSlave.foreskin == 0)>>
			<<set $cash -= $surgeryCost>>
			<<if $activeSlave.dick > 0>>
				<<set $activeSlave.foreskin = $activeSlave.dick>>
			<<else>>
				<<set $activeSlave.foreskin = $activeSlave.clit>>
			<</if>>
			<<set $activeSlave.health -= 10>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 10>>
			<</if>>
			<<set $surgeryType = "addForeskin">>

			<<include "Surgery Degradation">>
		<<else>>

			@@.red;Could not implant <<if $activeSlave.dick > 0>>foreskin<<else>>clitoral hood<</if>> on $activeSlave.slaveName: she already has one.@@
			<<set $completedOrgans.push(_slaveOrgans.foreskin)>>
		<</if>>
	<</if>>
	/* prostate */
	<<if _slaveOrgans.prostate != 0>>
		<<if ($activeSlave.prostate == 0)>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.prostate = 1>>
			<<set $activeSlave.health -= 20>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<set $surgeryType = "addProstate">>

			<<include "Surgery Degradation">>
		<<else>>

			@@.red;Could not implant prostate on $activeSlave.slaveName: she already has a prostate.@@
			<<set $completedOrgans.push(_slaveOrgans.prostate)>>
		<</if>>
	<</if>>
	/* ovaries */
	<<if _slaveOrgans.ovaries != 0>>
		<<if ($activeSlave.ovaries == 0) && ($activeSlave.vagina >= 0) && ($activeSlave.mpreg == 0) && ($activeSlave.bellyImplant == -1)>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.ovaries = 1>>
			<<set $activeSlave.eggType = "human">>
			<<set $activeSlave.preg = 0>>
			<<set $activeSlave.health -= 20>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<if $activeSlave.pubertyXX == 0>>
				<<if $precociousPuberty == 1>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyAgeXX = ($activeSlave.physicalAge+1)>>
					<</if>>
				<<else>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyXX = 1>>
					<</if>>
				<</if>>
			<</if>>
			<<set $surgeryType = "addOvaries">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.ovaries == 1>>

			@@.red;Could not implant ovaries on $activeSlave.slaveName: she already has ovaries.@@
			<<set $completedOrgans.push(_slaveOrgans.ovaries)>>
		<<elseif $activeSlave.vagina < 0>>

			@@.red;Could not implant ovaries on $activeSlave.slaveName: she lacks a vagina.@@
			<<set $completedOrgans.push(_slaveOrgans.ovaries)>>
		<<elseif $activeSlave.bellyImplant >= 0>>

			@@.red;Could not implant ovaries on $activeSlave.slaveName: she has a fillable abdominal implant.@@
			<<set $completedOrgans.push(_slaveOrgans.ovaries)>>
		<<elseif $activeSlave.mpreg != 0>>

			@@.red;Could not implant ovaries on $activeSlave.slaveName: she has an anal womb.@@
			<<set $completedOrgans.push(_slaveOrgans.ovaries)>>
		<</if>>
	<</if>>
	/* pig ovaries */
	<<if _slaveOrgans.pigOvaries != 0>>
		<<if ($activeSlave.ovaries == 0) && ($activeSlave.vagina >= 0) && ($activeSlave.mpreg == 0) && ($activeSlave.bellyImplant == -1)>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.ovaries = 1>>
			<<set $activeSlave.eggType = "pig">>
			<<set $activeSlave.preg = 0>>
			<<set $activeSlave.health -= 20>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<if $activeSlave.pubertyXX == 0>>
				<<if $precociousPuberty == 1>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyAgeXX = ($activeSlave.physicalAge+1)>>
					<</if>>
				<<else>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyXX = 1>>
					<</if>>
				<</if>>
			<</if>>
			<<set $surgeryType = "addAnimalOvaries">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.ovaries == 1>>

			@@.red;Could not implant pig ovaries on $activeSlave.slaveName: she already has ovaries.@@
			<<set $completedOrgans.push(_slaveOrgans.pigOvaries)>>
		<<elseif $activeSlave.vagina < 0>>

			@@.red;Could not implant pig ovaries on $activeSlave.slaveName: she lacks a vagina.@@
			<<set $completedOrgans.push(_slaveOrgans.pigOvaries)>>
		<<elseif $activeSlave.bellyImplant >= 0>>

			@@.red;Could not implant pig ovaries on $activeSlave.slaveName: she has a fillable abdominal implant.@@
			<<set $completedOrgans.push(_slaveOrgans.pigOvaries)>>
		<<elseif $activeSlave.mpreg != 0>>

			@@.red;Could not implant pig ovaries on $activeSlave.slaveName: she has an anal womb.@@
			<<set $completedOrgans.push(_slaveOrgans.pigOvaries)>>
		<</if>>
	<</if>>
	/* dog ovaries */
	<<if _slaveOrgans.canineOvaries != 0>>
		<<if ($activeSlave.ovaries == 0) && ($activeSlave.vagina >= 0) && ($activeSlave.mpreg == 0) && ($activeSlave.bellyImplant == -1)>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.ovaries = 1>>
			<<set $activeSlave.eggType = "dog">>
			<<set $activeSlave.preg = 0>>
			<<set $activeSlave.health -= 20>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<if $activeSlave.pubertyXX == 0>>
				<<if $precociousPuberty == 1>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyAgeXX = ($activeSlave.physicalAge+1)>>
					<</if>>
				<<else>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyXX = 1>>
					<</if>>
				<</if>>
			<</if>>
			<<set $surgeryType = "addAnimalOvaries">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.ovaries == 1>>

			@@.red;Could not implant dog ovaries on $activeSlave.slaveName: she already has ovaries.@@
			<<set $completedOrgans.push(_slaveOrgans.canineOvaries)>>
		<<elseif $activeSlave.vagina < 0>>

			@@.red;Could not implant dog ovaries on $activeSlave.slaveName: she lacks a vagina.@@
			<<set $completedOrgans.push(_slaveOrgans.canineOvaries)>>
		<<elseif $activeSlave.bellyImplant >= 0>>

			@@.red;Could not implant dog ovaries on $activeSlave.slaveName: she has a fillable abdominal implant.@@
			<<set $completedOrgans.push(_slaveOrgans.canineOvaries)>>
		<<elseif $activeSlave.mpreg != 0>>

			@@.red;Could not implant dog ovaries on $activeSlave.slaveName: she has an anal womb.@@
			<<set $completedOrgans.push(_slaveOrgans.canineOvaries)>>
		<</if>>
	<</if>>
	/* horse ovaries */
	<<if _slaveOrgans.horseOvaries != 0>>
		<<if ($activeSlave.ovaries == 0) && ($activeSlave.vagina >= 0) && ($activeSlave.mpreg == 0) && ($activeSlave.bellyImplant == -1)>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.ovaries = 1>>
			<<set $activeSlave.eggType = "horse">>
			<<set $activeSlave.preg = 0>>
			<<set $activeSlave.health -= 20>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<if $activeSlave.pubertyXX == 0>>
				<<if $precociousPuberty == 1>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyAgeXX = ($activeSlave.physicalAge+1)>>
					<</if>>
				<<else>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyXX = 1>>
					<</if>>
				<</if>>
			<</if>>
			<<set $surgeryType = "addAnimalOvaries">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.ovaries == 1>>

			@@.red;Could not implant horse ovaries on $activeSlave.slaveName: she already has ovaries.@@
			<<set $completedOrgans.push(_slaveOrgans.horseOvaries)>>
		<<elseif $activeSlave.vagina < 0>>

			@@.red;Could not implant horse ovaries on $activeSlave.slaveName: she lacks a vagina.@@
			<<set $completedOrgans.push(_slaveOrgans.horseOvaries)>>
		<<elseif $activeSlave.bellyImplant >= 0>>

			@@.red;Could not implant horse ovaries on $activeSlave.slaveName: she has a fillable abdominal implant.@@
			<<set $completedOrgans.push(_slaveOrgans.horseOvaries)>>
		<<elseif $activeSlave.mpreg != 0>>

			@@.red;Could not implant horse ovaries on $activeSlave.slaveName: she has an anal womb.@@
			<<set $completedOrgans.push(_slaveOrgans.horseOvaries)>>
		<</if>>
	<</if>>
	/* cow ovaries */
	<<if _slaveOrgans.cowOvaries != 0>>
		<<if ($activeSlave.ovaries == 0) && ($activeSlave.vagina >= 0) && ($activeSlave.mpreg == 0) && ($activeSlave.bellyImplant == -1)>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.ovaries = 1>>
			<<set $activeSlave.eggType = "cow">>
			<<set $activeSlave.preg = 0>>
			<<set $activeSlave.health -= 20>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<if $activeSlave.pubertyXX == 0>>
				<<if $precociousPuberty == 1>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyAgeXX = ($activeSlave.physicalAge+1)>>
					<</if>>
				<<else>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyXX = 1>>
					<</if>>
				<</if>>
			<</if>>
			<<set $surgeryType = "addAnimalOvaries">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.ovaries == 1>>

			@@.red;Could not implant cow ovaries on $activeSlave.slaveName: she already has ovaries.@@
			<<set $completedOrgans.push(_slaveOrgans.cowOvaries)>>
		<<elseif $activeSlave.vagina < 0>>

			@@.red;Could not implant cow ovaries on $activeSlave.slaveName: she lacks a vagina.@@
			<<set $completedOrgans.push(_slaveOrgans.cowOvaries)>>
		<<elseif $activeSlave.bellyImplant >= 0>>

			@@.red;Could not implant cow ovaries on $activeSlave.slaveName: she has a fillable abdominal implant.@@
			<<set $completedOrgans.push(_slaveOrgans.cowOvaries)>>
		<<elseif $activeSlave.mpreg != 0>>

			@@.red;Could not implant cow ovaries on $activeSlave.slaveName: she has an anal womb.@@
			<<set $completedOrgans.push(_slaveOrgans.cowOvaries)>>
		<</if>>
	<</if>>
	/* male preg */
	<<if _slaveOrgans.mpreg != 0>>
		<<if ($activeSlave.ovaries == 0) && ($activeSlave.vagina < 0) && ($activeSlave.mpreg == 0) && ($activeSlave.bellyImplant == -1)>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.mpreg = 1>>
			<<set $activeSlave.eggType = "human">>
			<<set $activeSlave.preg = 0>>
			<<set $activeSlave.health -= 40>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<if $activeSlave.pubertyXX == 0>>
				<<if $precociousPuberty == 1>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyAgeXX = ($activeSlave.physicalAge+1)>>
					<</if>>
				<<else>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyXX = 1>>
					<</if>>
				<</if>>
			<</if>>
			<<set $surgeryType = "mpreg">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.ovaries == 1>>

			@@.red;Could not implant anal womb on $activeSlave.slaveName: she has ovaries.@@
			<<set $completedOrgans.push(_slaveOrgans.mpreg)>>
		<<elseif $activeSlave.vagina < 0>>

			@@.red;Could not implant anal womb on $activeSlave.slaveName: she has a vagina.@@
			<<set $completedOrgans.push(_slaveOrgans.mpreg)>>
		<<elseif $activeSlave.bellyImplant >= 0>>

			@@.red;Could not implant anal womb on $activeSlave.slaveName: she has a fillable abdominal implant.@@
			<<set $completedOrgans.push(_slaveOrgans.mpreg)>>
		<<elseif $activeSlave.mpreg == 1>>

			@@.red;Could not implant anal womb on $activeSlave.slaveName: she already has an anal womb.@@
			<<set $completedOrgans.push(_slaveOrgans.mpreg)>>
		<</if>>
	<</if>>
	/* male pig preg */
	<<if _slaveOrgans.mpregPig != 0>>
		<<if ($activeSlave.ovaries == 0) && ($activeSlave.vagina < 0) && ($activeSlave.mpreg == 0) && ($activeSlave.bellyImplant == -1)>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.mpreg = 1>>
			<<set $activeSlave.eggType = "pig">>
			<<set $activeSlave.preg = 0>>
			<<set $activeSlave.health -= 40>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<if $activeSlave.pubertyXX == 0>>
				<<if $precociousPuberty == 1>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyAgeXX = ($activeSlave.physicalAge+1)>>
					<</if>>
				<<else>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyXX = 1>>
					<</if>>
				<</if>>
			<</if>>
			<<set $surgeryType = "mpregAnimal">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.ovaries == 1>>

			@@.red;Could not implant pig anal womb on $activeSlave.slaveName: she has ovaries.@@
			<<set $completedOrgans.push(_slaveOrgans.mpregPig)>>
		<<elseif $activeSlave.vagina < 0>>

			@@.red;Could not implant pig anal womb on $activeSlave.slaveName: she has a vagina.@@
			<<set $completedOrgans.push(_slaveOrgans.mpregPig)>>
		<<elseif $activeSlave.bellyImplant >= 0>>

			@@.red;Could not implant pig anal womb on $activeSlave.slaveName: she has a fillable abdominal implant.@@
			<<set $completedOrgans.push(_slaveOrgans.mpregPig)>>
		<<elseif $activeSlave.mpreg != 0>>

			@@.red;Could not implant pig anal womb on $activeSlave.slaveName: she already has an anal womb.@@
			<<set $completedOrgans.push(_slaveOrgans.mpregPig)>>
		<</if>>
	<</if>>
	/* male dog preg */
	<<if _slaveOrgans.mpregCanine != 0>>
		<<if ($activeSlave.ovaries == 0) && ($activeSlave.vagina < 0) && ($activeSlave.mpreg == 0) && ($activeSlave.bellyImplant == -1)>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.mpreg = 1>>
			<<set $activeSlave.eggType = "dog">>
			<<set $activeSlave.preg = 0>>
			<<set $activeSlave.health -= 40>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<if $activeSlave.pubertyXX == 0>>
				<<if $precociousPuberty == 1>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyAgeXX = ($activeSlave.physicalAge+1)>>
					<</if>>
				<<else>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyXX = 1>>
					<</if>>
				<</if>>
			<</if>>
			<<set $surgeryType = "mpregAnimal">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.ovaries == 1>>

			@@.red;Could not implant dog anal womb on $activeSlave.slaveName: she has ovaries.@@
			<<set $completedOrgans.push(_slaveOrgans.mpregCanine)>>
		<<elseif $activeSlave.vagina < 0>>

			@@.red;Could not implant dog anal womb on $activeSlave.slaveName: she has a vagina.@@
			<<set $completedOrgans.push(_slaveOrgans.mpregCanine)>>
		<<elseif $activeSlave.bellyImplant >= 0>>

			@@.red;Could not implant dog anal womb on $activeSlave.slaveName: she has a fillable abdominal implant.@@
			<<set $completedOrgans.push(_slaveOrgans.mpregCanine)>>
		<<elseif $activeSlave.mpreg != 0>>

			@@.red;Could not implant dog anal womb on $activeSlave.slaveName: she already has an anal womb.@@
			<<set $completedOrgans.push(_slaveOrgans.mpregCanine)>>
		<</if>>
	<</if>>
	/* male horse preg */
	<<if _slaveOrgans.mpregHorse != 0>>
		<<if ($activeSlave.ovaries == 0) && ($activeSlave.vagina < 0) && ($activeSlave.mpreg == 0) && ($activeSlave.bellyImplant == -1)>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.mpreg = 1>>
			<<set $activeSlave.eggType = "horse">>
			<<set $activeSlave.preg = 0>>
			<<set $activeSlave.health -= 40>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<if $activeSlave.pubertyXX == 0>>
				<<if $precociousPuberty == 1>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyAgeXX = ($activeSlave.physicalAge+1)>>
					<</if>>
				<<else>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyXX = 1>>
					<</if>>
				<</if>>
			<</if>>
			<<set $surgeryType = "mpregAnimal">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.ovaries == 1>>

			@@.red;Could not implant horse anal womb on $activeSlave.slaveName: she has ovaries.@@
			<<set $completedOrgans.push(_slaveOrgans.mpregHorse)>>
		<<elseif $activeSlave.vagina < 0>>

			@@.red;Could not implant horse anal womb on $activeSlave.slaveName: she has a vagina.@@
			<<set $completedOrgans.push(_slaveOrgans.mpregHorse)>>
		<<elseif $activeSlave.bellyImplant >= 0>>

			@@.red;Could not implant horse anal womb on $activeSlave.slaveName: she has a fillable abdominal implant.@@
			<<set $completedOrgans.push(_slaveOrgans.mpregHorse)>>
		<<elseif $activeSlave.mpreg != 0>>

			@@.red;Could not implant horse anal womb on $activeSlave.slaveName: she already has an anal womb.@@
			<<set $completedOrgans.push(_slaveOrgans.mpregHorse)>>
		<</if>>
	<</if>>
	/* male cow preg */
	<<if _slaveOrgans.mpregCow != 0>>
		<<if ($activeSlave.ovaries == 0) && ($activeSlave.vagina < 0) && ($activeSlave.mpreg == 0) && ($activeSlave.bellyImplant == -1)>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.mpreg = 1>>
			<<set $activeSlave.eggType = "cow">>
			<<set $activeSlave.preg = 0>>
			<<set $activeSlave.health -= 40>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<if $activeSlave.pubertyXX == 0>>
				<<if $precociousPuberty == 1>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyAgeXX = ($activeSlave.physicalAge+1)>>
					<</if>>
				<<else>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyXX = 1>>
					<</if>>
				<</if>>
			<</if>>
			<<set $surgeryType = "mpregAnimal">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.ovaries == 1>>

			@@.red;Could not implant cow anal womb on $activeSlave.slaveName: she has ovaries.@@
			<<set $completedOrgans.push(_slaveOrgans.mpregCow)>>
		<<elseif $activeSlave.vagina < 0>>

			@@.red;Could not implant cow anal womb on $activeSlave.slaveName: she has a vagina.@@
			<<set $completedOrgans.push(_slaveOrgans.mpregCow)>>
		<<elseif $activeSlave.bellyImplant >= 0>>

			@@.red;Could not implant cow anal womb on $activeSlave.slaveName: she has a fillable abdominal implant.@@
			<<set $completedOrgans.push(_slaveOrgans.mpregCow)>>
		<<elseif $activeSlave.mpreg != 0>>

			@@.red;Could not implant cow anal womb on $activeSlave.slaveName: she already has an anal womb.@@
			<<set $completedOrgans.push(_slaveOrgans.mpregCow)>>
		<</if>>
	<</if>>
	/* ovary renewal */
	<<if _slaveOrgans.freshOvaries != 0>>
		<<if (($activeSlave.ovaries == 1) || ($activeSlave.mpreg == 1)) && ($activeSlave.bellyImplant == -1) && ($activeSlave.physicalAge < 60)>>
			<<set $cash -= $surgeryCost>>
			<<if $activeSlave.ovaryAge >= 47>>
				<<set $activeSlave.ovaryAge = 45>>
			<<else>>
				<<set $activeSlave.ovaryAge -= 2>> /* It shouldn't matter if this goes negative as it is just a signal for menopause to occur. */
			<</if>>
			<<if $activeSlave.preg < 0>>
				<<set $activeSlave.preg = 0>>
			<</if>>
			<<set $activeSlave.health -= 20>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<if $activeSlave.pubertyXX == 0>>
				<<if $precociousPuberty == 1>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyAgeXX = ($activeSlave.physicalAge+1)>>
					<</if>>
				<<else>>
					<<if $activeSlave.physicalAge >= $fertilityAge>>
						<<set $activeSlave.pubertyXX = 1>>
					<</if>>
				<</if>>
			<</if>>
			<<set $surgeryType = "freshOvaries">>

			<<include "Surgery Degradation">>
		<<elseif ($activeSlave.physicalAge >= 70)>>

			@@.red;This slave's body is too old to handle pregnancy.@@
		<<elseif ($activeSlave.mpreg == 0 && $activeSlave.ovaries == 0) || $activeSlave.bellyImplant != -1>>

			@@.red;This slave lacks a viable womb to accept fertile ovaries.@@
			<<set $completedOrgans.push(_slaveOrgans.freshOvaries)>>
		<</if>>
	<</if>>
	/* penis */
	<<if _slaveOrgans.penis != 0>>
		<<if $activeSlave.dick == 0>>
			<<set $cash -= $surgeryCost>>
			<<if $activeSlave.prostate == 0>>
				<<set $activeSlave.prostate = 1>>
			<</if>>
			<<set $activeSlave.dick = 2>>
			<<set $activeSlave.clit = 0>>
			<<set $activeSlave.foreskin = $activeSlave.dick>>
			<<set $activeSlave.health -= 20>>
			<<set $surgeryType = "addDick">>

			<<include "Surgery Degradation">>
		<<else>>
			@@.red;Could not implant penis on $activeSlave.slaveName: she already has a penis.@@
			<<set $completedOrgans.push(_slaveOrgans.penis)>>
		<</if>>
	<</if>>
	/* testicles */
	<<if _slaveOrgans.testicles != 0>>
		<<if ($activeSlave.dick >= 1) && ($activeSlave.balls == 0)>>
			<<set $cash -= $surgeryCost>>
			<<if $activeSlave.prostate == 0>>
				<<set $activeSlave.prostate = 1>>
			<</if>>
			<<set $activeSlave.balls = 2>>
			<<set $activeSlave.ballType = "human">>
			<<set $activeSlave.scrotum = 2>>
			<<set $activeSlave.health -= 20>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<if $activeSlave.pubertyXY == 0>>
				<<if $precociousPuberty == 1>>
					<<if $activeSlave.physicalAge >= $potencyAge>>
						<<set $activeSlave.pubertyAgeXY = ($activeSlave.physicalAge+1)>>
					<</if>>
				<<else>>
					<<if $activeSlave.physicalAge >= $potencyAge>>
						<<set $activeSlave.pubertyXY = 1>>
					<</if>>
				<</if>>
			<</if>>
			<<set $surgeryType = "addBalls">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.dick == 0>>

			@@.red;Could not implant testicles on $activeSlave.slaveName: she lacks a penis.@@
			<<set $completedOrgans.push(_slaveOrgans.testicles)>>
		<<else>>

			@@.red;Could not implant testicles on $activeSlave.slaveName: she already has testicles.@@
			<<set $completedOrgans.push(_slaveOrgans.testicles)>>
		<</if>>
	<</if>>
	/* pig testicles */
	<<if _slaveOrgans.pigTesticles != 0>>
		<<if ($activeSlave.dick >= 1) && ($activeSlave.balls == 0)>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.balls = 3>>
			<<set $activeSlave.scrotum = 3>>
			<<set $activeSlave.ballType = "pig">>
			<<set $activeSlave.health -= 20>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<if $activeSlave.pubertyXY == 0>>
				<<if $precociousPuberty == 1>>
					<<if $activeSlave.physicalAge >= $potencyAge>>
						<<set $activeSlave.pubertyAgeXY = ($activeSlave.physicalAge+1)>>
					<</if>>
				<<else>>
					<<if $activeSlave.physicalAge >= $potencyAge>>
						<<set $activeSlave.pubertyXY = 1>>
					<</if>>
				<</if>>
			<</if>>
			<<set $surgeryType = "addAnimalBalls">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.dick == 0>>

			@@.red;Could not implant pig testicles on $activeSlave.slaveName: she lacks a penis.@@
			<<set $completedOrgans.push(_slaveOrgans.pigTesticles)>>
		<<else>>

			@@.red;Could not implant pig testicles on $activeSlave.slaveName: she already has testicles.@@
			<<set $completedOrgans.push(_slaveOrgans.pigTesticles)>>
		<</if>>
	<</if>>
	/* dog testicles */
	<<if _slaveOrgans.canineTesticles != 0>>
		<<if ($activeSlave.dick >= 0) && ($activeSlave.balls == 0)>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.balls = 2>>
			<<set $activeSlave.ballType = "dog">>
			<<set $activeSlave.scrotum = 2>>
			<<set $activeSlave.health -= 20>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<if $activeSlave.pubertyXY == 0>>
				<<if $precociousPuberty == 1>>
					<<if $activeSlave.physicalAge >= $potencyAge>>
						<<set $activeSlave.pubertyAgeXY = ($activeSlave.physicalAge+1)>>
					<</if>>
				<<else>>
					<<if $activeSlave.physicalAge >= $potencyAge>>
						<<set $activeSlave.pubertyXY = 1>>
					<</if>>
				<</if>>
			<</if>>

			<<set $surgeryType = "addAnimalBalls">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.dick == 0>>

			@@.red;Could not implant dog testicles on $activeSlave.slaveName: she lacks a penis.@@
			<<set $completedOrgans.push(_slaveOrgans.canineTesticles)>>
		<<else>>

			@@.red;Could not implant dog testicles on $activeSlave.slaveName: she already has testicles.@@
			<<set $completedOrgans.push(_slaveOrgans.canineTesticles)>>
		<</if>>
	<</if>>
	/* horse testicles */
	<<if _slaveOrgans.horseTesticles != 0>>
		<<if ($activeSlave.dick >= 1) && ($activeSlave.balls == 0)>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.balls = 3>>
			<<set $activeSlave.scrotum = 3>>
			<<set $activeSlave.ballType = "horse">>
			<<set $activeSlave.health -= 20>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<if $activeSlave.pubertyXY == 0>>
				<<if $precociousPuberty == 1>>
					<<if $activeSlave.physicalAge >= $potencyAge>>
						<<set $activeSlave.pubertyAgeXY = ($activeSlave.physicalAge+1)>>
					<</if>>
				<<else>>
					<<if $activeSlave.physicalAge >= $potencyAge>>
						<<set $activeSlave.pubertyXY = 1>>
					<</if>>
				<</if>>
			<</if>>
			<<set $surgeryType = "addAnimalBalls">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.dick == 0>>

			@@.red;Could not implant horse testicles on $activeSlave.slaveName: she lacks a penis.@@
			<<set $completedOrgans.push(_slaveOrgans.horseTesticles)>>
		<<else>>

			@@.red;Could not implant horse testicles on $activeSlave.slaveName: she already has testicles.@@
			<<set $completedOrgans.push(_slaveOrgans.horseTesticles)>>
		<</if>>
	<</if>>
	/* cow testicles */
	<<if _slaveOrgans.cowTesticles != 0>>
		<<if ($activeSlave.dick >= 1) && ($activeSlave.balls == 0)>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.balls = 3>>
			<<set $activeSlave.scrotum = 3>>
			<<set $activeSlave.ballType = "cow">>
			<<set $activeSlave.health -= 20>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 20>>
			<</if>>
			<<if $activeSlave.pubertyXY == 0>>
				<<if $precociousPuberty == 1>>
					<<if $activeSlave.physicalAge >= $potencyAge>>
						<<set $activeSlave.pubertyAgeXY = ($activeSlave.physicalAge+1)>>
					<</if>>
				<<else>>
					<<if $activeSlave.physicalAge >= $potencyAge>>
						<<set $activeSlave.pubertyXY = 1>>
					<</if>>
				<</if>>
			<</if>>
			<<set $surgeryType = "addAnimalBalls">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.dick == 0>>

			@@.red;Could not implant cow testicles on $activeSlave.slaveName: she lacks a penis.@@
			<<set $completedOrgans.push(_slaveOrgans.cowTesticles)>>
		<<else>>

			@@.red;Could not implant cow testicles on $activeSlave.slaveName: she already has testicles.@@
			<<set $completedOrgans.push(_slaveOrgans.cowTesticles)>>
		<</if>>
	<</if>>
	/* scrotum */
	<<if _slaveOrgans.scrotum != 0>>
		<<if ($activeSlave.scrotum == 0) && ($activeSlave.balls >= 1)>>
			<<set $cash -= $surgeryCost>>
			<<set $activeSlave.scrotum = $activeSlave.balls>>
			<<set $activeSlave.health -= 10>>
			<<if $organFarmUpgrade == 2>>
				<<set $activeSlave.chem += 10>>
			<</if>>
			<<set $surgeryType = "addScrotum">>

			<<include "Surgery Degradation">>
		<<elseif $activeSlave.balls == 0>>

			@@.red;Could not implant scrotum on $activeSlave.slaveName: she lacks testicles.@@
			<<set $completedOrgans.push(_slaveOrgans.scrotum)>>
		<<else>>

			@@.red;Could not implant scrotum on $activeSlave.slaveName: she already has a scrotum.@@
			<<set $completedOrgans.push(_slaveOrgans.scrotum)>>
		<</if>>
	<</if>>
	/* finished checking _slaveOrgans */
	/* limbs */
	<<if $activeSlave.amp != 0>>
		<<for _l = 0; _l < $limbs.length; _l++>>
			<<if ($limbs[_l].ID == $activeSlave.ID) && ($limbs[_l].weeksToCompletion <= 0)>>
				<<if $activeSlave.PLimb != 0>>
					<<if $activeSlave.amp < 0>>
						<<set _oldLimbs = {type: 0, armsTat: 0, legsTat: 0}>>
						<<set _oldLimbs.type = $activeSlave.amp, _oldLimbs.armsTat = $activeSlave.armsTat, _oldLimbs.legsTat = $activeSlave.legsTat>>
						<<set $activeSlave.readyLimbs.push(_oldLimbs)>>
					<</if>>

					<<switch $limbs[_l].type>>
					<<case "simple">>
						<<set $activeSlave.amp = -1>>
						<<set $surgeryType = "basicPLimbs">>
					<<case "sex">>
						<<set $activeSlave.amp = -2>>
						<<set $surgeryType = "sexPLimbs">>
					<<case "beauty">>
						<<set $activeSlave.amp = -3>>
						<<set $surgeryType = "beautyPLimbs">>
					<<case "combat">>
						<<set $activeSlave.amp = -4>>
						<<set $surgeryType = "combatPLimbs">>
					<<case "cyber">>
						<<set $activeSlave.amp = -5>>
						<<set $surgeryType = "cyberPLimbs">>
					<</switch>>

					<<include "Surgery Degradation">>
					<<set $limbs.deleteAt(_l)>>
					<<set $activeSlave.armsTat = 0, $activeSlave.legsTat = 0>>
				<<else>>

					@@.red;Could not install prosthetic limbs on $activeSlave.slaveName: she lacks a prosthetic interface.@@ They have been moved into storage for later installation.
					<<set _oldLimbs = {type: 0, armsTat: 0, legsTat: 0}>>
					<<switch $limbs[_l].type>>
					<<case "simple">>
						<<set _oldLimbs.type = -1>>
					<<case "sex">>
						<<set _oldLimbs.type = -2>>
					<<case "beauty">>
						<<set _oldLimbs.type = -3>>
					<<case "combat">>
						<<set _oldLimbs.type = -4>>
					<<case "cyber">>
						<<set _oldLimbs.type = -5>>
					<</switch>>
					<<set $activeSlave.readyLimbs.push(_oldLimbs)>>
					<<set $limbs.deleteAt(_l)>>
				<</if>>
				<<break>>
			<</if>>
		<</for>>
	<</if>>
	/* updates the interrogated slave */
	<<set $slaves[_i] = $activeSlave>>
<</for>> /* end of the $slaves loop */

/* This needs to be down here to over-ride any Surgery Degradation calls */
<<set $nextButton = "Continue">>
<<set $nextLink = "Main">>

/* Clean-up */
<<set $limbsCompleted = 0>>
<<for _i = 0; _i < $limbs.length; _i++>>
	<<if $limbs[_i].weeksToCompletion <= 0>>
		<<set $limbsCompleted++>>
	<</if>>
<</for>>


code:
:: Neighbor Description [nobr]

'' $arcologies[$i].name'' is located to the $arcologies[$i].direction of your arcology. It is governed by
<<switch $arcologies[$i].government>>
<<case "elected officials">>
	elected officials, periodically paralyzing its development.
<<case "a committee">>
	a committee, hindering its development.
<<case "an oligarchy">>
	a small group of leading citizens, making its development very unpredictable.
<<case "your trustees">>
	a small group of leading citizens who are serving as @@.mediumseagreen;your trustees@@.
<<case "an individual">>
	@@.cyan;an individual,@@ making its development vibrant but unpredictable.
<<case "your agent">>
	@@.deeppink;your agent,@@ who is directing the arcology in your stead.
<<case "a corporation">>
	a corporation, making its development steady and unspectacular.
<<default>>
	direct democracy, making its development dangerously unstable.
<</switch>>
<<if $arcologies[$i].direction == 0>>
	<<set $economicUncertainty = 5>>
<<else>>
	<<set $economicUncertainty = 10>>
<</if>>
<<if $arcologies[$i].government != "your trustees">>
	<<if $arcologies[$i].government != "your agent">>
		Its leadership has control of approximately @@.orange;<<print Math.trunc(($arcologies[$i].ownership*random(100-$economicUncertainty,100+$economicUncertainty))/100)>>%@@ of the arcology<<if $arcologies[$i].minority > $arcologies[$i].ownership-10>>, a dangerously narrow margin over competition with a @@.tan;<<print Math.trunc(($arcologies[$i].minority*random(100-$economicUncertainty,100+$economicUncertainty))/100)>>%@@ share<</if>>.
	<</if>>
<</if>>
<<if $arcologies[$i].PCminority > 0>>You own @@.lime;$arcologies[$i].PCminority%@@ of this arcology<<if (($arcologies[$i].government == "your trustees") || ($arcologies[$i].government == "your agent")) && $arcologies[$i].minority > $arcologies[$i].PCminority-10>>, a dangerously narrow margin over competition with a @@.red;<<print Math.trunc(($arcologies[$i].minority*random(100-$economicUncertainty,100+$economicUncertainty))/100)>>%@@ share<</if>>.<</if>>
<<set $economicUncertainty -= 2*$assistantPower>>
The arcology has an estimated GSP of @@.yellowgreen;<<print cashFormat(Math.trunc((0.1*$arcologies[$i].prosperity*random(100-$economicUncertainty,100+$economicUncertainty))/100))>>m,@@
<<if Math.abs($arcologies[$i].prosperity - $averageProsperity) < 5>>
	average among
<<elseif $arcologies[$i].prosperity > $averageProsperity>>
	ahead of
<<else>>
	behind
<</if>>
its neighbors.

<<set $desc = 0>>
<<set _neighborDescription = []>>
<<if $arcologies[$i].FSSubjugationist != "unset">>
	<<if $arcologies[$i].FSSubjugationist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSSubjugationist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;racial Subjugationism,@@ and is ">>
	<<if $arcologies[$i].FSSubjugationist > 95>>
		<<set $desc = $desc + "the home of an advanced project to create a subservient race of ">>
		<<set $desc = $desc + $arcologies[$i].FSSubjugationistRace>>
		<<set $desc = $desc + " slaves.">>
	<<elseif $arcologies[$i].FSSubjugationist > 40>>
		<<set $desc = $desc + "working to refine ">>
		<<set $desc = $desc + $arcologies[$i].FSSubjugationistRace>>
		<<set $desc = $desc + " slavery.">>
	<<else>>
		<<set $desc = $desc + "an excellent dumping ground for low quality ">>
		<<set $desc = $desc + $arcologies[$i].FSSubjugationistRace>>
		<<set $desc = $desc + " slaves.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSSupremacist != "unset">>
	<<if $arcologies[$i].FSSubjugationist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSSubjugationist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;racial Supremacy,@@ and is ">>
	<<if $arcologies[$i].FSSubjugationist > 95>>
		<<set $desc = $desc + "a global magnet for ">>
		<<set $desc = $desc + $arcologies[$i].FSSupremacistRace>>
		<<set $desc = $desc + " nationalists.">>
	<<elseif $arcologies[$i].FSSubjugationist > 40>>
		<<set $desc = $desc + "becoming increasingly free of ">>
		<<set $desc = $desc + $arcologies[$i].FSSupremacistRace>>
		<<set $desc = $desc + " slaves.">>
	<<else>>
		<<set $desc = $desc + "the site of a furious debate over existing ">>
		<<set $desc = $desc + $arcologies[$i].FSSupremacistRace>>
		<<set $desc = $desc + " slaves.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSRepopulationFocus != "unset">>
	<<if $arcologies[$i].FSRepopulationFocus > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSRepopulationFocus > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Repopulation,@@ and is ">>
	<<if $arcologies[$i].FSRepopulationFocus > 95>>
		<<set $desc = $desc + "notorious for the size and number of pregnancies among its population.">>
	<<elseif $arcologies[$i].FSRepopulationFocus > 40>>
		<<set $desc = $desc + "known to be a good place to find slavegirls heavy with children.">>
	<<else>>
		<<set $desc = $desc + "actively importing fertile slave girls.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSRestart != "unset">>
	<<if $arcologies[$i].FSRestart > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSRestart > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Eugenics,@@ and is ">>
	<<if $arcologies[$i].FSRestart > 95>>
		<<set $desc = $desc + "notorious for the number of powerful civilians inhabiting it.">>
	<<elseif $arcologies[$i].FSRestart > 40>>
		<<set $desc = $desc + "known to be a good place make connections.">>
	<<else>>
		<<set $desc = $desc + "actively importing sterilization supplies.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSGenderRadicalist != "unset">>
	<<if $arcologies[$i].FSGenderRadicalist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSGenderRadicalist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Gender Radicalism,@@ and is ">>
	<<if $arcologies[$i].FSGenderRadicalist > 95>>
		<<set $desc = $desc + "notorious for the openness with which its citizens fuck its slavegirls in the ass until they cum.">>
	<<elseif $arcologies[$i].FSGenderRadicalist > 40>>
		<<set $desc = $desc + "known to be a good place to find slavegirls who cum when buttfucked.">>
	<<else>>
		<<set $desc = $desc + "actively importing a wider variety of slave girls.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSGenderFundamentalist != "unset">>
	<<if $arcologies[$i].FSGenderFundamentalist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSGenderFundamentalist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Gender Fundamentalism,@@ and is ">>
	<<if $arcologies[$i].FSGenderFundamentalist > 95>>
		<<set $desc = $desc + "famous for its slave schools, crowded with a future generation of world class slaves.">>
	<<elseif $arcologies[$i].FSGenderFundamentalist > 40>>
		<<set $desc = $desc + "remarkable for its crowds of hugely pregnant slave women.">>
	<<else>>
		<<set $desc = $desc + "importing increasing numbers of fertile slaves.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSPaternalist != "unset">>
	<<if $arcologies[$i].FSPaternalist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSPaternalist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Paternalism,@@ and is ">>
	<<if $arcologies[$i].FSPaternalist > 95>>
		<<set $desc = $desc + "the home of an educated, enlightened caste of slaves more productive than some arcologies' citizens.">>
	<<elseif $arcologies[$i].FSPaternalist > 40>>
		<<set $desc = $desc + "becoming known for its unusually cheerful atmosphere.">>
	<<else>>
		<<set $desc = $desc + "starting to demand abused slaves whose lives can be turned around.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSDegradationist != "unset">>
	<<if $arcologies[$i].FSDegradationist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSDegradationist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Degradationism,@@ and is ">>
	<<if $arcologies[$i].FSDegradationist > 95>>
		<<set $desc = $desc + "renowned and feared by slaves worldwide, as a place of blood and steel from which few ever leave.">>
	<<elseif $arcologies[$i].FSDegradationist > 40>>
		<<set $desc = $desc + "becoming dreaded by slaves, since the few it exports are full of unbelievably awful stories.">>
	<<else>>
		<<set $desc = $desc + "importing a rapidly increasing number of slaves, for some reason.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSBodyPurist != "unset">>
	<<if $arcologies[$i].FSBodyPurist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSBodyPurist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Body Purism,@@ and is ">>
	<<if $arcologies[$i].FSBodyPurist > 95>>
		<<set $desc = $desc + "a world leader in the drug industry due to its pharmaceutical research breakthroughs.">>
	<<elseif $arcologies[$i].FSBodyPurist > 40>>
		<<set $desc = $desc + "pouring an ever increasing amount of money into drug research.">>
	<<else>>
		<<set $desc = $desc + "setting up research programs to develop better slave drugs.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSTransformationFetishist != "unset">>
	<<if $arcologies[$i].FSTransformationFetishist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSTransformationFetishist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Transformation Fetishism,@@ and is ">>
	<<if $arcologies[$i].FSTransformationFetishist > 95>>
		<<set $desc = $desc + "renowned as the source of some of the world's most unbelievable surgical transformations.">>
	<<elseif $arcologies[$i].FSTransformationFetishist > 40>>
		<<set $desc = $desc + "rapidly moving from mere breast expansion to more esoteric surgical fetishism.">>
	<<else>>
		<<set $desc = $desc + "receiving daily shipments of silicone and surgical necessities.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSYouthPreferentialist != "unset">>
	<<if $arcologies[$i].FSYouthPreferentialist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSYouthPreferentialist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Youth Preferentialism,@@ and is ">>
	<<if $arcologies[$i].FSYouthPreferentialist > 95>>
		<<set $desc = $desc + "famous for the intense celebratory attention slaves receive there once reaching their majorities.">>
	<<elseif $arcologies[$i].FSYouthPreferentialist > 40>>
		<<set $desc = $desc + "moving virginity and the taking of virginity ever higher in the public estimation.">>
	<<else>>
		<<set $desc = $desc + "starting to get a reputation as an excellent place to get a good price for a virgin.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSMaturityPreferentialist != "unset">>
	<<if $arcologies[$i].FSMaturityPreferentialist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSMaturityPreferentialist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Maturity Preferentialism,@@ and is ">>
	<<if $arcologies[$i].FSMaturityPreferentialist > 95>>
		<<set $desc = $desc + "world famous among mature slaves, who see it as a paradise in which MILFs are the most valuable girls around.">>
	<<elseif $arcologies[$i].FSMaturityPreferentialist > 40>>
		<<set $desc = $desc + "striking for the variety of well-preserved beauties that can be seen there.">>
	<<else>>
		<<set $desc = $desc + "displaying an increasing demand for enslaved housewives and professional women.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSSlimnessEnthusiast != "unset">>
	<<if $arcologies[$i].FSSlimnessEnthusiast > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSSlimnessEnthusiast > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Slimness Enthusiasm,@@ and is ">>
	<<if $arcologies[$i].FSSlimnessEnthusiast > 95>>
		<<set $desc = $desc + "very well known for the wonderful variety of nubile bodies that can be seen there.">>
	<<elseif $arcologies[$i].FSSlimnessEnthusiast > 40>>
		<<set $desc = $desc + "becoming known as an arcology that slims slaves down rather than turning them into piles of tits and ass.">>
	<<else>>
		<<set $desc = $desc + "starting to display unusual fashions regarding breasts and butts.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSAssetExpansionist != "unset">>
	<<if $arcologies[$i].FSAssetExpansionist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSAssetExpansionist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Asset Expansionism,@@ and is ">>
	<<if $arcologies[$i].FSAssetExpansionist > 95>>
		<<set $desc = $desc + "widely considered an interior design masterpiece for its adaptations to slaves with fifty kilos of tits.">>
	<<elseif $arcologies[$i].FSAssetExpansionist > 40>>
		<<set $desc = $desc + "a popular tourist destination just for the view, which features some truly spectacular bare boobs.">>
	<<else>>
		<<set $desc = $desc + "demanding fatter slaves, since its citizens are learning they absorb growth hormones better.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSPastoralist != "unset">>
	<<if $arcologies[$i].FSPastoralist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSPastoralist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Pastoralist,@@ and is ">>
	<<if $arcologies[$i].FSPastoralist > 95>>
		<<set $desc = $desc + "a world-renowned producer of cowgirl dairy products of all kinds.">>
	<<elseif $arcologies[$i].FSPastoralist > 40>>
		<<set $desc = $desc + "devoting more and more of its slaves to work as cowgirls, or to the service and upkeep of cowgirls.">>
	<<else>>
		<<set $desc = $desc + "displaying an increasing public appetite for dairy, and yet imports almost no true cow's milk.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSCummunism != "unset">>
	<<if $arcologies[$i].FSCummunism > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSCummunism > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Cummunism,@@ and is ">>
	<<if $arcologies[$i].FSCummunism > 95>>
		<<set $desc = $desc + "a world-renowned producer of cum-based products of all kinds.">>
	<<elseif $arcologies[$i].FSCummunism > 40>>
		<<set $desc = $desc + "devoting more and more of its slaves to work as cumtanks, or to the service, upkeep and milking of ballgirls.">>
	<<else>>
		<<set $desc = $desc + "displaying an increasing public appetite for cum, and has begun importing more and more specialized milkers.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSPhysicalIdealist != "unset">>
	<<if $arcologies[$i].FSPhysicalIdealist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSPhysicalIdealist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Physical Idealism,@@ and is ">>
	<<if $arcologies[$i].FSPhysicalIdealist > 95>>
		<<set $desc = $desc + "a constant standout at international athletic competitions, where both its citizens and slaves do very well.">>
	<<elseif $arcologies[$i].FSPhysicalIdealist > 40>>
		<<set $desc = $desc + "quite a sight, since its citizens and slaves all lift. Constantly.">>
	<<else>>
		<<set $desc = $desc + "the site of a musclegirl fetish community.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSHedonisticDecadence != "unset">>
	<<if $arcologies[$i].FSHedonisticDecadence > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSHedonisticDecadence > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Hedonistic Decadence,@@ and is ">>
	<<if $arcologies[$i].FSHedonisticDecadence > 95>>
		<<set $desc = $desc + "very well known as a place where every imaginable desire and fantasy can be fulfilled.">>
	<<elseif $arcologies[$i].FSHedonisticDecadence > 40>>
		<<set $desc = $desc + "importing huge amounts of food and alcohol">>
	<<else>>
		<<set $desc = $desc + "the site of a large number of lazy individuals.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSIncestFetishist != "unset">>
	<<if $arcologies[$i].FSIncestFetishist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSIncestFetishist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Incest Fetishism,@@ and is ">>
	<<if $arcologies[$i].FSIncestFetishist > 95>>
		<<set $desc = $desc + "highly recommended as a place to stop by if you like threesomes with twins or familial gangbangs.">>
	<<elseif $arcologies[$i].FSIncestFetishist > 40>>
		<<set $desc = $desc + "attracting a substantial number of families.">>
	<<else>>
		<<set $desc = $desc + "devoting more and more of its resources into genealogy.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSChattelReligionist != "unset">>
	<<if $arcologies[$i].FSChattelReligionist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSChattelReligionist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Chattel Religionism,@@ and is ">>
	<<if $arcologies[$i].FSChattelReligionist > 95>>
		<<set $desc = $desc + "a significant force in the global development of Chattel Religionist dogma.">>
	<<elseif $arcologies[$i].FSChattelReligionist > 40>>
		<<set $desc = $desc + "a popular destination for devout old world citizens engaging in sex tourism.">>
	<<else>>
		<<set $desc = $desc + "in the throes of public dissention over its religious laws.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSRomanRevivalist != "unset">>
	<<if $arcologies[$i].FSRomanRevivalist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSRomanRevivalist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Roman Revivalism,@@ and is ">>
	<<if $arcologies[$i].FSRomanRevivalist > 95>>
		<<set $desc = $desc + "hugely famous for its broadcasts of gladiatorial combat, popular even in the old world.">>
	<<elseif $arcologies[$i].FSRomanRevivalist > 40>>
		<<set $desc = $desc + "almost obnoxiously aspirational, with citizens competing to serve the state best.">>
	<<else>>
		<<set $desc = $desc + "working its way through sword and sandals fashion towards proper historicity.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSAztecRevivalist != "unset">>
	<<if $arcologies[$i].FSAztecRevivalist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSAztecRevivalist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Aztec Revivalism,@@ and is ">>
	<<if $arcologies[$i].FSAztecRevivalist > 95>>
		<<set $desc = $desc + "world famous for its incredible architecture and highly qualified leading caste and military.">>
	<<elseif $arcologies[$i].FSAztecRevivalist > 40>>
		<<set $desc = $desc + "constructing great pyramids and statues with equally weighty costs.">>
	<<else>>
		<<set $desc = $desc + "struggling to embrace the amount of blood sacrifice and prayer involved.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSEgyptianRevivalist != "unset">>
	<<if $arcologies[$i].FSEgyptianRevivalist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSEgyptianRevivalist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Egyptian Revivalism,@@ and is ">>
	<<if $arcologies[$i].FSEgyptianRevivalist > 95>>
		<<set $desc = $desc + "a world famous tourist destination for the traditional festival in its plaza, which never stops.">>
	<<elseif $arcologies[$i].FSEgyptianRevivalist > 40>>
		<<set $desc = $desc + "very much under renovation, as vast blocks of stone are imported around the clock.">>
	<<else>>
		<<set $desc = $desc + "struggling with the fashion implications of so much white linen everywhere.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSEdoRevivalist != "unset">>
	<<if $arcologies[$i].FSEdoRevivalist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSEdoRevivalist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Edo Revivalism,@@ and is ">>
	<<if $arcologies[$i].FSEdoRevivalist > 95>>
		<<set $desc = $desc + "visibly trailing cherry blossoms, blown off its balconies by the wind.">>
	<<elseif $arcologies[$i].FSEdoRevivalist > 40>>
		<<set $desc = $desc + "becoming a notable cultural center, even in the old world.">>
	<<else>>
		<<set $desc = $desc + "the object of considerable debate among socially awkward teenagers worldwide.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSArabianRevivalist != "unset">>
	<<if $arcologies[$i].FSArabianRevivalist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSArabianRevivalist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
	<<set $desc = "just establishing ">>
		<</if>>
	<<set $desc = $desc + "@@.gold;Arabian Revivalism,@@ and is ">>
	<<if $arcologies[$i].FSArabianRevivalist > 95>>
		<<set $desc = $desc + "a famous center of Arabian romanticism, since it has the wisdom not to be historically perfect.">>
	<<elseif $arcologies[$i].FSArabianRevivalist > 40>>
		<<set $desc = $desc + "working through which parts of Arabian romanticism to adopt and which to discard.">>
	<<else>>
		<<set $desc = $desc + "eagerly reveling in the most romantic parts of superficial Arabian romanticism.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>
<<if $arcologies[$i].FSChineseRevivalist != "unset">>
	<<if $arcologies[$i].FSChineseRevivalist > 80>>
		<<set $desc = "committed to ">>
	<<elseif $arcologies[$i].FSChineseRevivalist > 20>>
		<<set $desc = "pursuing ">>
	<<else>>
		<<set $desc = "just establishing ">>
	<</if>>
	<<set $desc = $desc + "@@.gold;Chinese Revivalism,@@ and is ">>
	<<if $arcologies[$i].FSChineseRevivalist > 95>>
		<<set $desc = $desc + "now confidently mature about its possession of the Mandate of Heaven.">>
	<<elseif $arcologies[$i].FSChineseRevivalist > 40>>
		<<set $desc = $desc + "often aggressive about its status as the middle kingdom to the point that it betrays uncertainty.">>
	<<else>>
		<<set $desc = $desc + "moving towards a stage of refinement that will allow it to present itself properly.">>
	<</if>>
	<<set _neighborDescription.push($desc)>>
<</if>>

<<if _neighborDescription.length > 0>>
	<<if _neighborDescription.length > 2>>
		Its culture is complex. First, it is _neighborDescription[0]
		<<for $j = 1; $j < _neighborDescription.length; $j++>>
			<<if $j < _neighborDescription.length-1>>It is<<else>>Finally, the arcology is<</if>> _neighborDescription[$j]
		<</for>>
	<<elseif _neighborDescription.length == 2>>
		Its culture is developing along two lines. First, it is _neighborDescription[0] Second, it is _neighborDescription[1]
	<<else>>
		Its culture is diverging from the old world: it is _neighborDescription[0]
	<</if>>
<</if>>


code:
:: Neighbor Interact [nobr]

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

<<set _nei = $arcologies.findIndex(function(s) { return s.direction == $activeArcology.direction; })>>
<<if _nei != -1>>
	<<set $arcologies[_nei] = $activeArcology>>
<<else>>
	//Neighbor not found, something has gone wrong!//
<</if>>

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

<<if $buyArcologyDirection != 0 && def $buyArcologyDirection>>
	<<set _nei = $arcologies.findIndex(function(s) { return s.direction == $buyArcologyDirection; })>>
	<<set $cash -= $transaction*(500*Math.trunc($arcologies[_nei].prosperity*(1+($arcologies[_nei].demandFactor/100))))>>
	<<set $cash -= 10000>>
	<<set $arcologies[_nei].PCminority += $transaction>>
	<<set $arcologies[_nei].demandFactor += $transaction*5>>
<</if>>
<<set $buyArcologyDirection = 0>>
<<if $sellArcologyDirection != 0 && def $sellArcologyDirection>>
	<<set _nei = $arcologies.findIndex(function(s) { return s.direction == $sellArcologyDirection; })>>
	<<set $cash += $transaction*(500*Math.trunc($arcologies[_nei].prosperity*(1+($arcologies[_nei].demandFactor/100))))>>
	<<set $arcologies[_nei].PCminority -= $transaction>>
	<<set $arcologies[_nei].demandFactor -= $transaction*2>>
	<<if $arcologies[_nei].government != "your agent" && $arcologies[_nei].government != "your trustees" && $arcologies[_nei].rival != 1>>
		<<if $arcologies[_nei].ownership + $arcologies[_nei].PCminority + $arcologies[_nei].minority < 10>>
			<<set $arcologies[_nei].ownership += 10>>
		<</if>>
	<</if>>
<</if>>
<<set $sellArcologyDirection = 0>>
<<set $transaction = 0>>

<<if $arcologies[0].embargoTarget == -1>>
	You are not engaged in economic warfare against a neighboring arcology.
<<else>>
	<<set _nei = $arcologies.findIndex(function(s) { return s.direction == $arcologies[0].embargoTarget; })>>
	You have targeted '' $arcologies[_nei].name'' for economic warfare.

    Its planned impacts will be
	<<if $arcologies[0].embargo == 3>>
		''widespread.'' [[Moderate|Neighbor Interact][$arcologies[0].embargo -= 1]]
	<<elseif $arcologies[0].embargo == 2>>
		''limited.'' [[Intensify|Neighbor Interact][$arcologies[0].embargo += 1]] | [[Moderate|Neighbor Interact][$arcologies[0].embargo -= 1]]
	<<else>>
		''nominal.'' [[Intensify|Neighbor Interact][$arcologies[0].embargo += 1]]
	<</if>>
<</if>>

<<if $arcologies[0].influenceTarget == -1>>
	You are not using your arcology's culture to attempt to influence neighboring arcologies' development.
<<else>>
	<<set _nei = $arcologies.findIndex(function(s) { return s.direction == $arcologies[0].influenceTarget; })>>
	You have targeted '' $arcologies[_nei].name'' for cultural influence.
<</if>>

<<if $PC.hacking > 0>>

	<<if $arcologies[0].CyberEconomicTarget == -1>>
		You are not engaged in cyber warfare against a neighboring arcology.
	<<else>>
		<<set _nei = $arcologies.findIndex(function(s) { return s.direction == $arcologies[0].CyberEconomicTarget; })>>
		You have targeted ''$arcologies[_nei].name'' for cyber economic warfare.

    Its planned impacts will be
		<<if $arcologies[0].CyberEconomic == 3>>
			''widespread.'' [[Moderate|Neighbor Interact][$arcologies[0].CyberEconomic -= 1]]
		<<elseif $arcologies[0].CyberEconomic == 2>>
			''limited.'' [[Intensify|Neighbor Interact][$arcologies[0].CyberEconomic += 1]] | [[Moderate|Neighbor Interact][$arcologies[0].CyberEconomic -= 1]]
		<<else>>
			''nominal.'' [[Intensify|Neighbor Interact][$arcologies[0].CyberEconomic += 1]]
		<</if>>
	<</if>>

	<<if $arcologies[0].CyberReputationTarget == -1>>
		You are not engaged in character assassination against a neighboring arcology.
	<<else>>
		<<set _nei = $arcologies.findIndex(function(s) { return s.direction == $arcologies[0].CyberReputationTarget; })>>
		You have targeted the leadership of ''$arcologies[_nei].name'' for character assassination.

    Its planned impacts will be
		<<if $arcologies[0].CyberReputation == 3>>
			''widespread.'' [[Moderate|Neighbor Interact][$arcologies[0].CyberReputation -= 1]]
		<<elseif $arcologies[0].CyberReputation == 2>>
			''limited.'' [[Intensify|Neighbor Interact][$arcologies[0].CyberReputation += 1]] | [[Moderate|Neighbor Interact][$arcologies[0].CyberReputation -= 1]]
		<<else>>
			''nominal.'' [[Intensify|Neighbor Interact][$arcologies[0].CyberReputation += 1]]
		<</if>>
	<</if>>
<</if>>

<<set $desc = []>>
<<if $arcologies[0].FSSubjugationist > 60>>
	<<set $desc.push("Racial Subjugation")>>
<</if>>
<<if $arcologies[0].FSSupremacist > 60>>
	<<set $desc.push("Racial Supremacy")>>
<</if>>
<<if $arcologies[0].FSRepopulationFocus > 60>>
	<<set $desc.push("Repopulation Focus")>>
<</if>>
<<if $arcologies[0].FSRestart > 60>>
	<<set $desc.push("Eugenics")>>
<</if>>
<<if $arcologies[0].FSGenderRadicalist > 60>>
	<<set $desc.push("Gender Radicalism")>>
<</if>>
<<if $arcologies[0].FSGenderFundamentalist > 60>>
	<<set $desc.push("Gender Fundamentalism")>>
<</if>>
<<if $arcologies[0].FSPaternalist > 60>>
	<<set $desc.push("Paternalism")>>
<</if>>
<<if $arcologies[0].FSDegradationist > 60>>
	<<set $desc.push("Degradationism")>>
<</if>>
<<if $arcologies[0].FSBodyPurist > 60>>
	<<set $desc.push("Body Purism")>>
<</if>>
<<if $arcologies[0].FSTransformationFetishist > 60>>
	<<set $desc.push("Transformation Fetishism")>>
<</if>>
<<if $arcologies[0].FSYouthPreferentialist > 60>>
	<<set $desc.push("Youth Preferentialism")>>
<</if>>
<<if $arcologies[0].FSMaturityPreferentialist > 60>>
	<<set $desc.push("Maturity Preferentialism")>>
<</if>>
<<if $arcologies[0].FSSlimnessEnthusiast > 60>>
	<<set $desc.push("Slimness Enthusiasm")>>
<</if>>
<<if $arcologies[0].FSAssetExpansionist > 60>>
	<<set $desc.push("Asset Expansionism")>>
<</if>>
<<if $arcologies[0].FSPastoralist > 60>>
	<<set $desc.push("Pastoralism")>>
<</if>>
<<if $arcologies[0].FSCummunism > 60>>
	<<set $desc.push("Cummunism")>>
<</if>>
<<if $arcologies[0].FSPhysicalIdealist > 60>>
	<<set $desc.push("Physical Idealism")>>
<</if>>
<<if $arcologies[0].FSHedonisticDecadence > 60>>
	<<set $desc.push("Hedonistic Decadence")>>
<</if>>
<<if $arcologies[0].FSIncestFetishist > 60>>
	<<set $desc.push("Incest Fetishism")>>
<</if>>
<<if $arcologies[0].FSChattelReligionist > 60>>
	<<set $desc.push("Chattel Religionism")>>
<</if>>
<<if $arcologies[0].FSRomanRevivalist > 60>>
	<<set $desc.push("Roman Revivalism")>>
<</if>>
<<if $arcologies[0].FSAztecRevivalist > 60>>
	<<set $desc.push("Aztec Revivalism")>>
<</if>>
<<if $arcologies[0].FSEgyptianRevivalist > 60>>
	<<set $desc.push("Egyptian Revivalism")>>
<</if>>
<<if $arcologies[0].FSEdoRevivalist > 60>>
	<<set $desc.push("Edo Revivalism")>>
<</if>>
<<if $arcologies[0].FSArabianRevivalist > 60>>
	<<set $desc.push("Arabian Revivalism")>>
<</if>>
<<if $arcologies[0].FSChineseRevivalist > 60>>
	<<set $desc.push("Chinese Revivalism")>>
<</if>>

<<if $desc.length == 0>>
	Your arcology's culture has not developed to the point where it can meaningfully influence other arcologies.
<<elseif $desc.length > 2>>
	Your arcology's mature culture is capable of exerting great cultural sway over other arcologies. It can readily project $desc[0],
	<<for $i = 1; $i < $desc.length; $i++>>
		<<if $i < $desc.length-1>>
		$desc[$i],
	<<else>>
		and $desc[$i].
	<</if>>
	<</for>>
<<elseif $desc.length == 2>>
	Your arcology's culture is capable of exerting some cultural sway over other arcologies. It can effectively project $desc[0] and $desc[1].
<<else>>
	Your arcology's culture is capable of starting to exert cultural sway over other arcologies. It can project $desc[0].
<</if>>

<<for $i = 0; $i < $arcologies.length; $i++>>
	<<if $arcologies[$i].direction == $activeArcology.direction>>
		<<include "Neighbor Description">>
	<</if>>
<</for>>

    [[Target for economic warfare|Neighbor Interact][$arcologies[0].embargoTarget = $activeArcology.direction]]
<<if $PC.hacking > 0>>
	| [[Target for cyber economic warfare|Neighbor Interact][$arcologies[0].CyberEconomicTarget = $activeArcology.direction]]
	| [[Target their leadership for character assassination|Neighbor Interact][$arcologies[0].CyberReputationTarget = $activeArcology.direction]]
<</if>>
<<if $desc.length > 0>>
	| [[Set as influence target|Neighbor Interact][$arcologies[0].influenceTarget = $activeArcology.direction]]
<</if>>

    You own ''$activeArcology.PCminority%'' of $activeArcology.name.
<<set _ownershipCost = 500*Math.trunc($activeArcology.prosperity*(1+($activeArcology.demandFactor/100)))>>
A 1% interest in $activeArcology.name is worth <<print cashFormat(_ownershipCost)>> and will require a transaction cost of <<print cashFormat(10000)>> to acquire.
<<if ($activeArcology.ownership + $activeArcology.PCminority + $activeArcology.minority < 100)>>
	[[Buy|Neighbor Interact][$buyArcologyDirection = $activeArcology.direction, $transaction = 1]]
	<<if ($activeArcology.ownership + $activeArcology.PCminority + $activeArcology.minority <= 90)>>
		<<if $cash > 10*(_ownershipCost)>>
			| [[10%|Neighbor Interact][$buyArcologyDirection = $activeArcology.direction, $transaction = 10]]
			//Transaction costs will only be paid once//
		<</if>>
	<</if>>
<</if>>
<<if ($activeArcology.ownership + $activeArcology.PCminority + $activeArcology.minority < 100) && ($activeArcology.PCminority > 0)>>|<</if>>
<<if $activeArcology.PCminority > 0>>
	[[Sell|Neighbor Interact][$sellArcologyDirection = $activeArcology.direction, $transaction = 1]]
	<<if $activeArcology.PCminority >= 10>>
		| [[10%|Neighbor Interact][$sellArcologyDirection = $activeArcology.direction, $transaction = 10]]
	<</if>>
<</if>>

<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>
	<<if $activeArcology.government == "your trustees">>

		[[Appoint an agent|Agent Select]]
		 | <<link "Instruct them to rename the arcology">><<replace #rename>> | <<textbox "$activeArcology.name" $activeArcology.name>> [[Confirm name|Neighbor Interact]]<</replace>><</link>>
	<<else>>

		<<for $j = 0; $j < $leaders.length; $j++>>
		<<if $activeArcology.leaderID == $leaders[$j].ID>>
			<<setLocalPronouns $leaders[$j]>>
			Your agent @@.deeppink;<<= SlaveFullName($leaders[$j])>>@@ is running this arcology. [["Recall and reenslave " + $him|Agent Retrieve]]
			 | <<link "Instruct $him to rename the arcology">><<replace #rename>> | <<textbox "$activeArcology.name" $activeArcology.name>> [[Confirm name|Neighbor Interact]]<</replace>><</link>>

$His <<if $leaders[$j].intelligence > 95>>brilliance<<else>>intelligence<</if>> and education are the most important qualities for $him.
			<<if $leaders[$j].actualAge > 35>>
				As with the Head Girl position, $his age and experience lend $him leadership weight.
			<</if>>
			<<if $leaders[$j].career == "an arcology owner">>
				$His career as an arcology owner $himself is, obviously, useful to $him.
			<<elseif setup.HGCareers.includes($leaders[$j].career)>>
				$His career in leadership helps $him.
			<</if>>
			<<if $leaders[$j].fetishStrength > 95>>
			<<if ($leaders[$j].fetish == "dom") || ($leaders[$j].fetish == "sadist")>>
				$His sexually dominant fetish helps $him fill a leadership role.
			<<elseif ($leaders[$j].fetish == "submissive") || ($leaders[$j].fetish == "masochist")>>
				Unfortunately, $he has an inappropriate fetish for a leader.
			<<else>>
				$His sexual fetishes will influence how $he leads the arcology.
			<</if>>
			<</if>>
			<<if $leaders[$j].energy > 95>>
				Finally, $his sexual depravity lets $him fit into arcology society naturally.
			<</if>>
		<</if>>
		<</for>>
	<</if>>
	<<if $activeArcology.FSSubjugationist != "unset">>

<<link "Force Abandonment of Racial Subjugation">><<set $activeArcology.FSSubjugationist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSSupremacist != "unset">>

<<link "Force Abandonment of Racial Supremacy">><<set $activeArcology.FSSupremacist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSRepopulationFocus != "unset">>

<<link "Force Abandonment of Repopulationism">><<set $activeArcology.FSRepopulationFocus = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSRestart != "unset">>

<<link "Force Abandonment of Eugenics">><<set $activeArcology.FSRestart = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSGenderRadicalist != "unset">>

<<link "Force Abandonment of Gender Radicalism">><<set $activeArcology.FSGenderRadicalist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSGenderFundamentalist != "unset">>

<<link "Force Abandonment of Gender Fundamentalism">><<set $activeArcology.FSGenderFundamentalist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSPaternalist != "unset">>

<<link "Force Abandonment of Paternalism">><<set $activeArcology.FSPaternalist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSDegradationist != "unset">>

<<link "Force Abandonment of Degradationism">><<set $activeArcology.FSDegradationist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSBodyPurist != "unset">>

<<link "Force Abandonment of Body Purism">><<set $activeArcology.FSBodyPurist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSTransformationFetishist != "unset">>

<<link "Force Abandonment of Transformation Fetishism">><<set $activeArcology.FSTransformationFetishist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSYouthPreferentialist != "unset">>

<<link "Force Abandonment of Youth Preferentialism">><<set $activeArcology.FSYouthPreferentialist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSMaturityPreferentialist != "unset">>

<<link "Force Abandonment of Maturity Preferentialism">><<set $activeArcology.FSMaturityPreferentialist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSSlimnessEnthusiast != "unset">>

<<link "Force Abandonment of Slimness Enthusiasm">><<set $activeArcology.FSSlimnessEnthusiast = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSAssetExpansionist != "unset">>

<<link "Force Abandonment of Asset Expansionism">><<set $activeArcology.FSAssetExpansionist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSPastoralist != "unset">>

<<link "Force Abandonment of Pastoralism">><<set $activeArcology.FSPastoralist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSCummunism != "unset">>

<<link "Force Abandonment of Cummunism">><<set $activeArcology.FSCummunism = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSPhysicalIdealist != "unset">>

<<link "Force Abandonment of Physical Idealism">><<set $activeArcology.FSPhysicalIdealist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSHedonisticDecadence != "unset">>

<<link "Force Abandonment of Hedonistic Decadence">><<set $activeArcology.FSHedonisticDecadence = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSIncestFetishist != "unset">>

<<link "Force Abandonment of Incest Fetishism">><<set $activeArcology.FSIncestFetishist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSChattelReligionist != "unset">>

<<link "Force Abandonment of Chattel Religionism">><<set $activeArcology.FSChattelReligionist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSRomanRevivalist != "unset">>

<<link "Force Abandonment of Roman Revivalism">><<set $activeArcology.FSRomanRevivalist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSAztecRevivalist !== "unset">>

<<link "Force Abandonment of Aztec Revivalism">><<set $activeArcology.FSAztecRevivalist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSEgyptianRevivalist != "unset">>

<<link "Force Abandonment of Egyptian Revivalism">><<set $activeArcology.FSEgyptianRevivalist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSEdoRevivalist != "unset">>

<<link "Force Abandonment of Edo Revivalism">><<set $activeArcology.FSEdoRevivalist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSArabianRevivalist != "unset">>

<<link "Force Abandonment of Arabian Revivalism">><<set $activeArcology.FSArabianRevivalist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
	<<if $activeArcology.FSChineseRevivalist != "unset">>

<<link "Force Abandonment of Chinese Revivalism">><<set $activeArcology.FSChineseRevivalist = "unset">><<goto "Neighbor Interact">><</link>>
	<</if>>
<</if>>

If $activeArcology.name has developed enough to begin exporting worthwhile goods, it may be of interest to acquire some.
<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>
	Since it is under your control, it is no problem at all to request the transfer of goods to $arcologies[0].name.
<<elseif $PC.hacking >= 50>>
	It is within your skills to redirect an outgoing shipment to $arcologies[0].name for your retrieval.
<<elseif $activeArcology.direction == $arcologies[0].embargoTarget>>
	Due to your active embargo, trade with $activeArcology.name is not possible.
<<else>>
	<<set $targetArcology = $arcologies[0], _tempArc = $activeArcology>><<include "Arcology Opinion">><<set _prices = $opinion*10, $activeArcology = _tempArc>>
<</if>>
<<if $activeArcology.FSRomanRevivalist > 95>>
	<<if !isItemAccessible("a toga")>>
		<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>

<<link "Request a shipment of togas" "Neighbor Interact">>
				<<set $clothesBoughtToga = 1>>
			<</link>>
		<<elseif $PC.hacking >= 50>>

<<link "Divert an outgoing shipment of togas" "Neighbor Interact">>
				<<set $clothesBoughtToga = 1>>
			<</link>>
		<<elseif $activeArcology.direction != $arcologies[0].embargoTarget>>

<<link "Purchase a shipment of togas" "Neighbor Interact">>
				<<set $clothesBoughtToga = 1, $cash -= Math.trunc(7500-_prices)>>
			<</link>> //Will cost <<print cashFormat(Math.trunc(7500-_prices))>>//
		<</if>>
	<<else>>

You already have enough togas.
	<</if>>
	<<set _exports = 1>>
<<elseif $activeArcology.FSEdoRevivalist > 95>>
	<<if !isItemAccessible("a kimono")>>
		<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>

<<link "Request a shipment of kimonos" "Neighbor Interact">>
				<<set $clothesBoughtKimono = 1>>
			<</link>>
		<<elseif $PC.hacking >= 50>>

<<link "Divert an outgoing shipment of kimonos" "Neighbor Interact">>
				<<set $clothesBoughtKimono = 1>>
			<</link>>
		<<elseif $activeArcology.direction != $arcologies[0].embargoTarget>>

<<link "Purchase a shipment of kimonos" "Neighbor Interact">>
				<<set $clothesBoughtKimono = 1, $cash -= Math.trunc(7500-_prices)>>
			<</link>> //Will cost <<print cashFormat(Math.trunc(7500-_prices))>>//
		<</if>>
	<<else>>

You already have enough kimonos.
	<</if>>
	<<set _exports = 1>>
<<elseif $activeArcology.FSArabianRevivalist > 95>>
	<<if !isItemAccessible("harem gauze")>>
		<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>

<<link "Request a shipment of silken harem garb" "Neighbor Interact">>
				<<set $clothesBoughtHarem = 1>>
			<</link>>
		<<elseif $PC.hacking >= 50>>

<<link "Divert an outgoing shipment of silken harem garb" "Neighbor Interact">>
				<<set $clothesBoughtHarem = 1>>
			<</link>>
		<<elseif $activeArcology.direction != $arcologies[0].embargoTarget>>

<<link "Purchase a shipment of silken harem garb" "Neighbor Interact">>
				<<set $clothesBoughtHarem = 1, $cash -= Math.trunc(7500-_prices)>>
			<</link>> //Will cost <<print cashFormat(Math.trunc(7500-_prices))>>//
		<</if>>
	<<else>>

You already have enough silk.
	<</if>>
	<<set _exports = 1>>
<<elseif $activeArcology.FSAztecRevivalist > 95>>
	<<if !isItemAccessible("a huipil")>>
		<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>

<<link "Request a shipment of huipils" "Neighbor Interact">>
				<<set $clothesBoughtHuipil = 1>>
			<</link>>
		<<elseif $PC.hacking >= 50>>

<<link "Divert an outgoing shipment of huipils" "Neighbor Interact">>
				<<set $clothesBoughtHuipil = 1>>
			<</link>>
		<<elseif $activeArcology.direction != $arcologies[0].embargoTarget>>

<<link "Purchase a shipment of huipils" "Neighbor Interact">>
				<<set $clothesBoughtHuipil = 1, $cash -= Math.trunc(7500-_prices)>>
			<</link>> //Will cost <<print cashFormat(Math.trunc(7500-_prices))>>//
		<</if>>
	<<else>>

You already have enough huipils.
	<</if>>
	<<set _exports = 1>>
<<elseif $activeArcology.FSChineseRevivalist > 95>>
	<<if !isItemAccessible("a slutty qipao")>>
		<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>

<<link "Request a shipment of qipaos" "Neighbor Interact">>
				<<set $clothesBoughtQipao = 1>>
			<</link>>
		<<elseif $PC.hacking >= 50>>

<<link "Divert an outgoing shipment of qipaos" "Neighbor Interact">>
				<<set $clothesBoughtQipao = 1>>
			<</link>>
		<<elseif $activeArcology.direction != $arcologies[0].embargoTarget>>

<<link "Purchase a shipment of qipaos" "Neighbor Interact">>
				<<set $clothesBoughtQipao = 1, $cash -= Math.trunc(7500-_prices)>>
			<</link>> //Will cost <<print cashFormat(Math.trunc(7500-_prices))>>//
		<</if>>
	<<else>>

You already have enough skimpy qipaos.
	<</if>>
	<<set _exports = 1>>
<<elseif $activeArcology.FSEgyptianRevivalist > 95>>
	<<if !isItemAccessible("ancient Egyptian")>>
		<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>

<<link "Request a shipment of Egyptian necklace replicas" "Neighbor Interact">>
				<<set $clothesBoughtEgypt = 1>>
			<</link>>
		<<elseif $PC.hacking >= 50>>

<<link "Divert an outgoing shipment of Egyptian necklace replicas" "Neighbor Interact">>
				<<set $clothesBoughtEgypt = 1>>
			<</link>>
		<<elseif $activeArcology.direction != $arcologies[0].embargoTarget>>

<<link "Purchase a shipment of Egyptian necklace replicas" "Neighbor Interact">>
				<<set $clothesBoughtEgypt = 1, $cash -= Math.trunc(7500-_prices)>>
			<</link>> //Will cost <<print cashFormat(Math.trunc(7500-_prices))>>//
		<</if>>
	<<else>>

You already have enough replicas of Egyptian necklaces.
	<</if>>
	<<set _exports = 1>>
<</if>>
<<if $activeArcology.FSPaternalist > 95>>
	<<if !isItemAccessible("conservative clothing")>>
		<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>

<<link "Request a shipment of conservative clothing" "Neighbor Interact">>
				<<set $clothesBoughtConservative = 1>>
			<</link>>
		<<elseif $PC.hacking >= 50>>

<<link "Divert an outgoing shipment of conservative clothing" "Neighbor Interact">>
				<<set $clothesBoughtConservative = 1>>
			<</link>>
		<<elseif $activeArcology.direction != $arcologies[0].embargoTarget>>

<<link "Purchase a shipment of conservative clothing" "Neighbor Interact">>
				<<set $clothesBoughtConservative = 1, $cash -= Math.trunc(7500-_prices)>>
			<</link>> //Will cost <<print cashFormat(Math.trunc(7500-_prices))>>//
		<</if>>
	<<else>>

You already have enough modest clothing.
	<</if>>
	<<set _exports = 1>>
<<elseif $activeArcology.FSDegradationist > 95>>
	<<if !isItemAccessible("chains")>>
		<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>

<<link "Request a shipment of binding chains" "Neighbor Interact">>
				<<set $clothesBoughtChains = 1>>
			<</link>>
		<<elseif $PC.hacking >= 50>>

<<link "Divert an outgoing shipment of binding chains" "Neighbor Interact">>
				<<set $clothesBoughtChains = 1>>
			<</link>>
		<<elseif $activeArcology.direction != $arcologies[0].embargoTarget>>

<<link "Purchase a shipment of binding chains" "Neighbor Interact">>
				<<set $clothesBoughtChains = 1, $cash -= Math.trunc(7500-_prices)>>
			<</link>> //Will cost <<print cashFormat(Math.trunc(7500-_prices))>>//
		<</if>>
	<<else>>

You already have enough chains.
	<</if>>
	<<set _exports = 1>>
<</if>>
<<if $activeArcology.FSGenderFundamentalist > 95>>
	<<if !isItemAccessible("a bunny outfit")>>
		<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>

<<link "Request a shipment of bunny suits" "Neighbor Interact">>
				<<set $clothesBoughtBunny = 1>>
			<</link>>
		<<elseif $PC.hacking >= 50>>

<<link "Divert an outgoing shipment of bunny suits" "Neighbor Interact">>
				<<set $clothesBoughtBunny = 1>>
			<</link>>
		<<elseif $activeArcology.direction != $arcologies[0].embargoTarget>>

<<link "Purchase a shipment of bunny suits" "Neighbor Interact">>
				<<set $clothesBoughtBunny = 1, $cash -= Math.trunc(7500-_prices)>>
			<</link>> //Will cost <<print cashFormat(Math.trunc(7500-_prices))>>//
		<</if>>
	<<else>>

You already have enough bunny suits and bowties.
	<</if>>
	<<set _exports = 1>>
<</if>>
<<if $activeArcology.FSPhysicalIdealist > 95>>
	<<if !isItemAccessible("body oil")>>
		<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>

<<link "Request a shipment of body oil" "Neighbor Interact">>
				<<set $clothesBoughtOil = 1>>
			<</link>>
		<<elseif $PC.hacking >= 50>>

<<link "Divert an outgoing shipment of body oil" "Neighbor Interact">>
				<<set $clothesBoughtOil = 1>>
			<</link>>
		<<elseif $activeArcology.direction != $arcologies[0].embargoTarget>>

<<link "Purchase a shipment of body oil" "Neighbor Interact">>
				<<set $clothesBoughtOil = 1, $cash -= Math.trunc(7500-_prices)>>
			<</link>> //Will cost <<print cashFormat(Math.trunc(7500-_prices))>>//
		<</if>>
	<<else>>

You already have enough body oil.
	<</if>>
	<<set _exports = 1>>
<<elseif $activeArcology.FSHedonisticDecadence > 95>>
	<<if !isItemAccessible("stretch pants and a crop-top")>>
		<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>

<<link "Request a shipment of stretch pants and crop-tops" "Neighbor Interact">>
				<<set $clothesBoughtLazyClothes = 1>>
			<</link>>
		<<elseif $PC.hacking >= 50>>

<<link "Divert an outgoing shipment of stretch pants and crop-tops" "Neighbor Interact">>
				<<set $clothesBoughtLazyClothes = 1>>
			<</link>>
		<<elseif $activeArcology.direction != $arcologies[0].embargoTarget>>

<<link "Purchase a shipment of stretch pants and crop-tops" "Neighbor Interact">>
				<<set $clothesBoughtLazyClothes = 1, $cash -= Math.trunc(7500-_prices)>>
			<</link>> //Will cost <<print cashFormat(Math.trunc(7500-_prices))>>//
		<</if>>
	<<else>>

You already have enough elastic waistbands and tight tops.
	<</if>>
	<<set _exports = 1>>
<</if>>
<<if $activeArcology.FSChattelReligionist > 95>>
	<<if !isItemAccessible("a chattel habit")>>
		<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>

<<link "Request a shipment of chattel religionist habits" "Neighbor Interact">>
				<<set $clothesBoughtHabit = 1>>
			<</link>>
		<<elseif $PC.hacking >= 50>>

<<link "Divert an outgoing shipment of chattel religionist habits" "Neighbor Interact">>
				<<set $clothesBoughtHabit = 1>>
			<</link>>
		<<elseif $activeArcology.direction != $arcologies[0].embargoTarget>>

<<link "Purchase a shipment of chattel religionist habits" "Neighbor Interact">>
				<<set $clothesBoughtHabit = 1, $cash -= Math.trunc(7500-_prices)>>
			<</link>> //Will cost <<print cashFormat(Math.trunc(7500-_prices))>>//
		<</if>>
	<<else>>

You already have enough chattel religionist habits.
	<</if>>
	<<set _exports = 1>>
<</if>>
<<if $activeArcology.FSPastoralist > 95>>
	<<if !isItemAccessible("Western clothing")>>
		<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>

<<link "Request a shipment of western clothing" "Neighbor Interact">>
				<<set $clothesBoughtWestern = 1>>
			<</link>>
		<<elseif $PC.hacking >= 50>>

<<link "Divert an outgoing shipment of western clothing" "Neighbor Interact">>
				<<set $clothesBoughtWestern = 1>>
			<</link>>
		<<elseif $activeArcology.direction != $arcologies[0].embargoTarget>>

<<link "Purchase a shipment of western clothing" "Neighbor Interact">>
				<<set $clothesBoughtWestern = 1, $cash -= Math.trunc(7500-_prices)>>
			<</link>> //Will cost <<print cashFormat(Math.trunc(7500-_prices))>>//
		<</if>>
	<<else>>

You already have enough rancher outfits.
	<</if>>
	<<set _exports = 1>>
<</if>>
<<if $activeArcology.FSRepopulationFocus > 95>>
	<<if !isItemAccessible("a maternity dress")>>
		<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>

<<link "Request a shipment of maternity clothing" "Neighbor Interact">>
				<<set $clothesBoughtMaternityDress = 1>>
			<</link>>
		<<elseif $PC.hacking >= 50>>

<<link "Divert an outgoing shipment of maternity clothing" "Neighbor Interact">>
				<<set $clothesBoughtMaternityDress = 1>>
			<</link>>
		<<elseif $activeArcology.direction != $arcologies[0].embargoTarget>>

<<link "Purchase a shipment of maternity clothing" "Neighbor Interact">>
				<<set $clothesBoughtMaternityDress = 1, $cash -= Math.trunc(7500-_prices)>>
			<</link>> //Will cost <<print cashFormat(Math.trunc(7500-_prices))>>//
		<</if>>
	<<else>>

You already have enough maternity dresses.
	<</if>>
	<<if !isItemAccessible("attractive lingerie for a pregnant woman")>>
		<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>

<<link "Request a shipment of maternity lingerie" "Neighbor Interact">>
				<<set $clothesBoughtMaternityLingerie = 1>>
			<</link>>
		<<elseif $PC.hacking >= 50>>

<<link "Divert an outgoing shipment of maternity lingerie" "Neighbor Interact">>
				<<set $clothesBoughtMaternityLingerie = 1>>
			<</link>>
		<<elseif $activeArcology.direction != $arcologies[0].embargoTarget>>

<<link "Purchase a shipment of maternity lingerie" "Neighbor Interact">>
				<<set $clothesBoughtMaternityLingerie = 1, $cash -= Math.trunc(7500-_prices)>>
			<</link>> //Will cost <<print cashFormat(Math.trunc(7500-_prices))>>//
		<</if>>
	<<else>>

You already have enough lingerie suited for pregnant women.
	<</if>>
	<<if !isItemAccessible("a small empathy belly")>>
		<<if ($activeArcology.government == "your trustees") || ($activeArcology.government == "your agent")>>

<<link "Request a shipment of empathy bellies" "Neighbor Interact">>
				<<set $clothesBoughtBelly = 1>>
			<</link>>
		<<elseif $PC.hacking >= 50>>

<<link "Divert an outgoing shipment of empathy bellies" "Neighbor Interact">>
				<<set $clothesBoughtBelly = 1>>
			<</link>>
		<<elseif $activeArcology.direction != $arcologies[0].embargoTarget>>

<<link "Purchase a shipment of empathy bellies" "Neighbor Interact">>
				<<set $clothesBoughtBelly = 1, $cash -= Math.trunc(15000-(_prices*2))>>
			<</link>> //Will cost <<print cashFormat(Math.trunc(15000-(_prices*2)))>>//
		<</if>>
	<<else>>

You already have enough fake baby bumps.
	<</if>>
	<<set _exports = 1>>
<</if>>
<<if _exports != 1>>
	<<if $activeArcology.direction == $arcologies[0].embargoTarget>>
		Fortunately,
	<<else>>
		Unfortunately,
	<</if>>
	they have nothing of value.
<</if>>

<<if $arcologies[0].embargoTarget != -1>>

	[[Cancel economic warfare|Neighbor Interact][$arcologies[0].embargoTarget = -1]]
<</if>>
<<if $arcologies[0].influenceTarget != -1>>

	[[Stop trying to influence neighboring arcologies|Neighbor Interact][$arcologies[0].influenceTarget = -1]]
<</if>>
<<if $arcologies[0].CyberEconomicTarget != -1>>

	[[Cancel cyber economic warfare|Neighbor Interact][$arcologies[0].CyberEconomicTarget = -1]]
<</if>>
<<if $arcologies[0].CyberReputationTarget != -1>>

	[[Cancel character assassination|Neighbor Interact][$arcologies[0].CyberReputationTarget = -1]]
<</if>>