code:
App.Neighbor.Interact = (function() {
	let nd = new App.Neighbor.Display((id) => replaceDetails(id));

	/** Output the arcology list
	 * @returns {DocumentFragment}
	 */
	function list() {
		V.arcologies.forEach((a) => a.prosperity = Math.clamp(a.prosperity, 1, 400));
		if (!V.activeArcologyIdx) {
			V.activeArcologyIdx = 0;
		}

		let frag = document.createDocumentFragment();

		// set up the neighbor display list itself
		frag.append(nd.render());
		$(document).one(':passagedisplay', () => nd.select(V.activeArcologyIdx));

		// empty container for details
		const detailSpan = App.UI.DOM.appendNewElement("span", frag);
		detailSpan.id = "neighbor-details";

		return frag;
	}

	/** Replace the details block with an updated one for the given arcology
	 * Used both as a refresh and as a selection handler
	 * @param {number} arcID
	 */
	function replaceDetails(arcID) {
		V.activeArcologyIdx = arcID;
		const container = $("#neighbor-details").empty();
		container.append(description(arcID));
		container.append(details(arcID));
	}

	/** Re-render most of the page because some important arcology property (FS, government, ownership) may have changed
	 * @param {number} arcID for reselection
	 */
	function arcChanged(arcID) {
		nd.rerender();
		nd.select(arcID);
	}

	/** Create a div containing the neighbor's description
	 * @param {number} arcID
	 * @returns {Element}
	 */
	function description(arcID) {
		// still in Twine for now
		let container = document.createElement("div");
		V.i = arcID;
		App.UI.DOM.includePassage(container, "Neighbor Description");
		return container;
	}

	/** Create a fragment containing all the details for a given arcology
	 * @param {number} arcID
	 * @returns {DocumentFragment}
	 */
	function details(arcID) {
		let frag = document.createDocumentFragment();
		if (arcID === 0) {
			const desc = FutureSocieties.activeFSes(0).map((f) => FutureSocieties.displayName(f));
			if (desc.length === 0) {
				App.UI.DOM.appendNewElement("p", frag, `Your arcology's culture has not developed to the point where it can meaningfully influence other arcologies.`);
			} else if (desc.length > 2) {
				App.UI.DOM.appendNewElement("p", frag, `Your arcology's mature culture is capable of exerting great cultural sway over other arcologies. It can readily project ${desc.reduce((res, ch, i, arr) => res + (i === arr.length - 1 ? ' and ' : ', ') + ch)}.`);
			} else if (desc.length === 2) {
				App.UI.DOM.appendNewElement("p", frag, `Your arcology's culture is capable of exerting some cultural sway over other arcologies. It can effectively project ${desc[0]} and ${desc[1]}.`);
			} else {
				App.UI.DOM.appendNewElement("p", frag, `Your arcology's culture is capable of starting to exert cultural sway over other arcologies. It can project ${desc[0]}.`);
			}
		} else {
			const ownershipCost = 500*Math.trunc(V.arcologies[arcID].prosperity*(1+(V.arcologies[arcID].demandFactor/100)));
			frag.append(`A 1% interest in this arcology is worth ${cashFormat(ownershipCost)}. `);
			if (V.arcologies[arcID].ownership + V.arcologies[arcID].PCminority + V.arcologies[arcID].minority < 100) {
				frag.append(`The transaction fee is ${cashFormat(10000)}.`);
			}

			if (V.arcologies[arcID].ownership + V.arcologies[arcID].PCminority + V.arcologies[arcID].minority < 100) {
				let links = [];
				links.push(App.UI.DOM.link("Buy", (f) => {
					cashX(forceNeg(ownershipCost), "war");
					cashX(-10000, "war");
					V.arcologies[arcID].PCminority += 1;
					V.arcologies[arcID].demandFactor += 2;
				}, [], "Neighbor Interact"));
				if (V.arcologies[arcID].ownership + V.arcologies[arcID].PCminority + V.arcologies[arcID].minority <= 90) {
					if (V.cash > ownershipCost*10) {
						const link = App.UI.DOM.link("10%", (f) => {
							cashX(forceNeg(ownershipCost*10), "war");
							cashX(-10000, "war");
							V.arcologies[arcID].PCminority += 10;
							V.arcologies[arcID].demandFactor += 20;
						}, [], "Neighbor Interact");
						links.push(link);
					}
				}
				const div = App.UI.DOM.appendNewElement("div", frag, App.UI.DOM.generateLinksStrip(links));
				if (links.length > 1) {
					App.UI.DOM.appendNewElement("span", div, "Transaction costs will only be paid once.", "detail");
				}
			}

			if (V.arcologies[arcID].PCminority > 0) {
				let links = [];
				links.push(App.UI.DOM.link("Sell", (f) => {
					cashX(ownershipCost, "war");
					V.arcologies[arcID].PCminority -= 1;
					V.arcologies[arcID].demandFactor -= 2;
					if (V.arcologies[arcID].government !== "your agent" && V.arcologies[arcID].government !== "your trustees" && V.arcologies[arcID].rival !== 1) {
						if (V.arcologies[arcID].ownership + V.arcologies[arcID].PCminority + V.arcologies[arcID].minority < 10) {
							V.arcologies[arcID].ownership += 10;
						}
					}
					arcChanged(arcID);
				}, [], "Neighbor Interact"));
				if (V.arcologies[arcID].PCminority >= 10) {
					links.push(App.UI.DOM.link("10%", (f) => {
						cashX((ownershipCost*10), "war");
						V.arcologies[arcID].PCminority -= 10;
						V.arcologies[arcID].demandFactor -= 20;
						if (V.arcologies[arcID].government !== "your agent" && V.arcologies[arcID].government !== "your trustees" && V.arcologies[arcID].rival !== 1) {
							if (V.arcologies[arcID].ownership + V.arcologies[arcID].PCminority + V.arcologies[arcID].minority < 10) {
								V.arcologies[arcID].ownership += 10;
							}
						}
					}, [], "Neighbor Interact"));
				}
				App.UI.DOM.appendNewElement("div", frag, App.UI.DOM.generateLinksStrip(links));
			}

			if (V.arcologies[arcID].direction !== V.arcologies[0].embargoTarget) {
				frag.append(document.createElement("br"));
				frag.append(App.UI.DOM.passageLink("Target them for economic warfare", "Neighbor Interact", () => V.arcologies[0].embargoTarget = V.arcologies[arcID].direction));
			}

			if (V.PC.skill.hacking > 0) {
				if (V.arcologies[arcID].direction !== V.arcologies[0].CyberEconomicTarget) {
					frag.append(document.createElement("br"));
					frag.append(App.UI.DOM.passageLink("Target them for cyber economic warfare", "Neighbor Interact", () => V.arcologies[0].CyberEconomicTarget = V.arcologies[arcID].direction));
				}
				if (V.arcologies[arcID].direction !== V.arcologies[0].CyberReputationTarget) {
					frag.append(document.createElement("br"));
					frag.append(App.UI.DOM.passageLink("Target their leadership for character assassination", "Neighbor Interact", () => V.arcologies[0].CyberReputationTarget = V.arcologies[arcID].direction));
				}
			}
			if (FutureSocieties.influenceSources(0).length > 0) {
				if (V.arcologies[arcID].direction !== V.arcologies[0].influenceTarget) {
					frag.append(document.createElement("br"));
					frag.append(App.UI.DOM.passageLink("Set as influence target", "Neighbor Interact", () => V.arcologies[0].influenceTarget = V.arcologies[arcID].direction));
				}
			}

			if (V.arcologies[arcID].government === "your trustees" || V.arcologies[arcID].government === "your agent") {
				frag.append(controlActions(arcID));
			}

			frag.append(fsGoods(arcID));
		}
		return frag;
	}

	/** Create a div containing actions specific to arcologies that are under the player's control
	 * @param {number} arcID
	 * @returns {Element}
	 */
	function controlActions(arcID) {
		const container = document.createElement("div");
		const agent = App.currentAgent(arcID);
		const him = agent ? getPronouns(agent).him : "them";
		container.append(document.createElement("br"));
		if (V.arcologies[arcID].government === "your trustees") {
			container.append(App.UI.DOM.passageLink("Appoint an agent", "Agent Select"));
		} else {
			let linkText = `Recall and reenslave ${him}`;
			const residentList = [agent.ID];
			const agentPartner = V.slaves.find((s) => s.assignment === Job.AGENTPARTNER && s.relationshipTarget === agent.ID);
			if (agentPartner) {
				linkText = `Recall them and reenslave your agent`;
				residentList.push(agentPartner.ID);
			}
			container.append(App.UI.SlaveList.render(residentList, [], App.UI.SlaveList.SlaveInteract.stdInteract));
			container.append(App.UI.DOM.link(linkText, (f) => { removeJob(agent, "be your agent"); arcChanged(arcID); }));
		}
		container.append(" | ");
		const rename = App.UI.DOM.appendNewElement("span", container, '');
		rename.id = "rename";
		rename.append(App.UI.DOM.link(`Instruct ${him} to rename the arcology`, () => $("#rename").replaceWith([
			App.UI.DOM.makeTextBox(V.arcologies[arcID].name, (s) => { V.arcologies[arcID].name = s; }, false),
			App.UI.DOM.link("Confirm name", arcChanged, [arcID])
		])));

		if (V.arcologies[arcID].government === "your agent") {
			const {His, his, he, himself /* him is already set */} = getPronouns(agent);
			let r = [];
			r.push(`${His} ${agent.intelligence > 95 ? `brilliance` : `intelligence`} and education are the most important qualities for ${him}.`);
			if (agent.actualAge > 35) {
				r.push(`As with the Head Girl position, ${his} age and experience lend ${him} leadership weight.`);
			}
			if (agent.career === "an arcology owner") {
				r.push(`${His} career as an arcology owner ${himself} is, obviously, useful to ${him}.`);
			} else if (setup.HGCareers.includes(agent.career)) {
				r.push(`${His} career in leadership helps ${him}.`);
			}
			if (agent.fetishStrength > 95) {
				if ((agent.fetish === "dom") || (agent.fetish === "sadist")) {
					r.push(`${His} sexually dominant fetish helps ${him} fill a leadership role.`);
				} else if ((agent.fetish === "submissive") || (agent.fetish === "masochist")) {
					r.push(`Unfortunately, ${he} has an inappropriate fetish for a leader.`);
				} else {
					r.push(`${His} sexual fetishes will influence how ${he} leads the arcology.`);
				}
			}
			if (agent.energy > 95) {
				r.push(`Finally, ${his} sexual depravity lets ${him} fit into arcology society naturally.`);
			}
			App.UI.DOM.appendNewElement("div", container, r.join(' ' ));
		}

		container.append(document.createElement("br"));
		const forceAbandonment = (fs) => { V.arcologies[arcID][fs] = "unset"; arcChanged(arcID); };
		for (const fs of FutureSocieties.activeFSes(arcID)) {
			App.UI.DOM.appendNewElement("div", container, App.UI.DOM.link(`Force abandonment of ${FutureSocieties.displayName(fs)}`, forceAbandonment, [fs]));
		}

		return container;
	}

	/** Create an element containing all the society-dependent stuff you can buy from this arcology.
	 * @param {number} arcID
	 * @returns {Element}
	 */
	function fsGoods(arcID) {
		const container = document.createElement("div");
		let r = [];
		r.push(`If ${V.arcologies[arcID].name} has developed enough to begin exporting worthwhile goods, it may be of interest to acquire some.`);
		const opinionDiscount = App.Neighbor.opinion(arcID, 0)*10;
		const basePrice = Math.trunc((7500-opinionDiscount)*V.upgradeMultiplierTrade);
		const controlled = (V.arcologies[arcID].government === "your trustees") || (V.arcologies[arcID].government === "your agent");
		if (controlled) {
			r.push(`Since it is under your control, it is no problem at all to request the transfer of goods to ${V.arcologies[0].name}.`);
		} else if (V.PC.skill.hacking >= 50) {
			r.push(`It is within your skills to redirect an outgoing shipment to ${V.arcologies[0].name} for your retrieval.`);
		} else if (V.arcologies[arcID].direction === V.arcologies[0].embargoTarget) {
			r.push(`However, due to your active embargo, trade with ${V.arcologies[arcID].name} is not possible.`);
		}
		App.UI.DOM.appendNewElement("p", container, r.join(' '));

		let exports = 0;

		/** Build a link or text block describing how to acquire a specific good from this arcology
		 * @param {string} fsRequired - the FS that the arcology has to have for this block to appear
		 * @param {string} itemName - the item name to check to see if the player already has this item
		 * @param {string} category - the category to check to see if the player already has this item
		 * @param {string} itemDisplay - a display name for a group of the item; as in, "a shipment of XXX" or "enough XXX"
		 * @param {function(): void} property - adjusts the global property controlling whether this item has been acquired
		 * @param {number} [itemPrice] - the price the player should pay for the item; by default, basePrice (computed above)
		 */
		function addAcquisitionBlock(fsRequired, itemName, category, itemDisplay, property, itemPrice = basePrice) {
			if (V.arcologies[arcID][fsRequired] > 95) {
				if (!isItemAccessible.entry(itemName, category)) {
					if (controlled) {
						const link = App.UI.DOM.link(`Request a shipment of ${itemDisplay}`, (f) => {
							property();
							replaceDetails(arcID);
						});
						App.UI.DOM.appendNewElement("div", container, link);
					} else if (V.PC.skill.hacking >= 50) {
						const link = App.UI.DOM.link(`Divert an outgoing shipment of ${itemDisplay}`, (f) => {
							property();
							replaceDetails(arcID);
						});
						App.UI.DOM.appendNewElement("div", container, link);
					} else if (V.arcologies[arcID].direction !== V.arcologies[0].embargoTarget) {
						const link = App.UI.DOM.link(`Divert an outgoing shipment of ${itemDisplay}`, (f) => {
							property();
							cashX(forceNeg(itemPrice), "capEx");
							replaceDetails(arcID);
						});
						const div = App.UI.DOM.appendNewElement("div", container, link);
						App.UI.DOM.appendNewElement("span", div, `Will cost ${cashFormat(itemPrice)}`, "detail");
					}
				} else {
					App.UI.DOM.appendNewElement("div", container, `You already have enough ${itemDisplay}.`);
				}
				exports = 1;
			}
		}

		addAcquisitionBlock("FSRomanRevivalist", "a toga", "clothing", "togas", () => { V.boughtItem.clothing.toga = 1; });
		addAcquisitionBlock("FSEdoRevivalist", "a kimono", "clothing", "kimonos", () => { V.boughtItem.clothing.kimono = 1; });
		addAcquisitionBlock("FSArabianRevivalist", "harem gauze", "clothing", "silken harem garb", () => { V.boughtItem.clothing.harem = 1; });
		addAcquisitionBlock("FSAztecRevivalist", "a huipil", "clothing", "huipils", () => { V.boughtItem.clothing.huipil = 1; });
		addAcquisitionBlock("FSChineseRevivalist", "a slutty qipao", "clothing", "skimpy qipaos", () => { V.boughtItem.clothing.qipao = 1; });
		addAcquisitionBlock("FSEgyptianRevivalist", "ancient Egyptian", "collar", "Egyptian necklace replicas", () => { V.boughtItem.clothing.egypt = 1; });
		addAcquisitionBlock("FSPaternalist", "conservative clothing", "clothing", "conservative clothing", () => { V.boughtItem.clothing.conservative = 1; });
		addAcquisitionBlock("FSDegradationist", "chains", "clothing", "binding chains", () => { V.boughtItem.clothing.chains = 1; });
		addAcquisitionBlock("FSGenderFundamentalist", "a bunny outfit", "clothing", "bunny suits", () => { V.boughtItem.clothing.bunny = 1; });
		addAcquisitionBlock("FSIntellectualDependency", "a bimbo outfit", "clothing", "bimbo attire", () => { V.boughtItem.clothing.bimbo = 1; });
		addAcquisitionBlock("FSSlaveProfessionalism", "a courtesan dress", "clothing", "courtesan dresses", () => { V.boughtItem.clothing.courtesan = 1; });
		// addAcquisitionBlock("FSPetiteAdmiration", "petite dress", "clothing", "petite-sized dresses", () => { V.boughtItem.clothing.petite = 1; });
		addAcquisitionBlock("FSPhysicalIdealist", "body oil", "clothing", "body oil", () => { V.boughtItem.clothing.oil = 1; });
		addAcquisitionBlock("FSHedonisticDecadence", "stretch pants and a crop-top", "clothing", "stretch pants and crop-tops", () => { V.boughtItem.clothing.lazyClothes = 1; });
		addAcquisitionBlock("FSChattelReligionist", "a chattel habit", "clothing", "chattel religionist habits", () => { V.boughtItem.clothing.habit = 1; });
		addAcquisitionBlock("FSPastoralist", "Western clothing", "clothing", "Western clothing", () => { V.boughtItem.clothing.western = 1; });
		addAcquisitionBlock("FSRepopulationFocus", "a maternity dress", "clothing", "maternity dresses", () => { V.boughtItem.clothing.maternityDress = 1; });
		addAcquisitionBlock("FSRepopulationFocus", "attractive lingerie for a pregnant woman", "clothing", "maternity lingerie", () => { V.boughtItem.clothing.maternityLingerie = 1; });
		addAcquisitionBlock("FSRepopulationFocus", "a small empathy belly", "bellyAccessory", "empathy bellies", () => { V.boughtItem.clothing.belly = 1; });
		addAcquisitionBlock("FSStatuesqueGlorification", "platform heels", "shoes", "platform shoes", () => { V.boughtItem.shoes.heels = 1; });

		if (exports !== 1) {
			const luck = (V.arcologies[arcID].direction === V.arcologies[0].embargoTarget) ? `Fortunately` : `Unfortunately`;
			App.UI.DOM.appendNewElement("p", container, `${luck}, they have nothing of value.`);
		}

		return container;
	}

	return list;
})();


code:
:: Neighbor Interact [nobr jump-to-safe jump-from-safe]

<<set $averageProsperity = _.mean($arcologies.map((a) => a.prosperity))>>

<<if $cheatMode == 1>>
	[[Cheat Edit Neighboring Arcologies|MOD_Edit Neighbor Arcology Cheat]]

<</if>>

<<set $nextLink = "Main", $nextButton = "Back">>
You have <<print $arcologies.length-1>> neighbors.

<<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>>
	| [[Cancel|Neighbor Interact][$arcologies[0].embargoTarget = -1]]
<</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.
	[[Stop|Neighbor Interact][$arcologies[0].influenceTarget = -1]]
<</if>>

<<if $PC.skill.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>>
		| [[Revert|Neighbor Interact][$arcologies[0].CyberEconomicTarget = -1]]
	<</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>>
		| [[Abort|Neighbor Interact][$arcologies[0].CyberReputationTarget = -1]]
	<</if>>
<</if>>

<<includeDOM App.Neighbor.Interact()>>

repo_name: Welptard/fc

license: mit


code:
:: Acquisition [nobr]

<<set $encyclopedia = "How to Play">>
<<unset $showSGNationalities>>

<<if $saveImported == 1>><<set _valueOwed = 5000>><<else>><<set _valueOwed = 50000>><</if>>
<<if $freshPC == 1 || $saveImported == 0>>
	<<set $PC.birthName = $PC.slaveName>>
	<<if $PC.slaveSurname>><<set $PC.birthSurname = $PC.slaveSurname>><</if>>
	<<if $PC.title == 1>>
		<<set $PC.muscles = 50>>
	<<else>>
		<<set $PC.hLength = 15>>
		<<set $PC.waist = -20>>
		<<set $PC.voice = 2>>
		<<set $PC.shoulders = -1>>
		<<set $PC.hips = 1>>
		<<set $PC.muscles = 30>>
	<</if>>
	<<if $PC.career == "escort">>
		<<set $PC.anus = 1>>
		<<set $PC.clothes = "a slutty outfit">>
		<<set $PC.intelligenceImplant = 15>>
	<<elseif $PC.career == "servant">>
		<<set $PC.geneticQuirks.fertility = 1>>
		<<set $PC.clothes = "a nice maid outfit">>
		<<set $PC.intelligenceImplant = 0>>
	<</if>>
	<<if $PC.vagina == -1>>
		<<set $PC.ovaries = 0>>
	<<elseif $PC.vagina > 0>>
		<<set $PC.vaginaLube = 1>>
		<<set $PC.counter.birthsTotal = 0>>
		<<if $PC.career == "servant">>
			<<if $PC.pregType != 8>>
				<<if $PC.actualAge >= 50>>
					<<set $PC.counter.birthsTotal = 9>>
					<<set $PC.counter.birthMaster = 9>>
				<<elseif $PC.actualAge >= 35>>
					<<set $PC.counter.birthsTotal = 6>>
					<<set $PC.counter.birthMaster = 6>>
				<<else>>
					<<set $PC.counter.birthsTotal = 3>>
					<<set $PC.counter.birthMaster = 3>>
				<</if>>
			<<else>> /* Master kept you pregged up */
				<<if $PC.actualAge >= 50>>
					<<set $PC.counter.birthsTotal = 70>>
					<<set $PC.counter.birthMaster = 70>>
				<<elseif $PC.actualAge >= 35>>
					<<set $PC.counter.birthsTotal = 40>>
					<<set $PC.counter.birthMaster = 40>>
				<<else>>
					<<set $PC.counter.birthsTotal = 16>>
					<<set $PC.counter.birthMaster = 16>>
				<</if>>
			<</if>>
			<<set $PC.geneticQuirks.fertility = 2>>
			<<for $i = 0; $i < $slaves.length; $i++>>
				<<if $slaves[$i].mother == -1>>
					<<set $PC.counter.birthsTotal += 1>>
					<<if $slaves[$i].father == -1>>
						<<set $PC.counter.birthSelf += 1>>
					<<else>>
						<<set $slaves[$i].father = -3>>
						<<set $PC.counter.birthMaster += 1>>
					<</if>>
				<</if>>
			<</for>>
		<<elseif $PC.career == "escort">>
			<<for $i = 0; $i < $slaves.length; $i++>>
				<<if $slaves[$i].mother == -1>>
					<<set $PC.counter.birthsTotal += 1>>
					<<if $slaves[$i].father == -1>>
						<<set $PC.counter.birthSelf += 1>>
					<<else>>
						<<set $slaves[$i].father = -5>>
						<<set $PC.counter.birthClient += 1>>
					<</if>>
				<<elseif $slaves[$i].father == -1>>
					<<set $slaves[$i].mother = -5>>
				<</if>>
			<</for>>
		<<else>>
			<<for $i = 0; $i < $slaves.length; $i++>>
				<<if $slaves[$i].mother == -1>>
					<<set $PC.counter.birthsTotal += 1>>
					<<if $slaves[$i].father == -1>>
						<<set $PC.counter.birthSelf += 1>>
					<<else>>
						<<set $PC.counter.birthOther += 1>>
					<</if>>
				<</if>>
			<</for>>
		<</if>>
		<<if $PC.preg > 0>>
			<<set $PC.pregWeek = $PC.preg>>
			<<if $PC.pregType != 8>>
				<<set $PC.pregType = 1>>
			<<else>>
				<<set $PC.geneticQuirks.hyperFertility = 2>>
			<</if>>
			<<if $PC.career == "servant">>
				<<set $PC.pregSource = -3>>
				<<if $PC.pregType != 8>>
					<<set $PC.pregType += random(0,0,1)>>
				<</if>>
			<<elseif $PC.career == "escort">>
				<<set $PC.pregSource = -5>>
			<</if>>
			<<set $PC.pregKnown = 1>>
			<<set $PC.belly = getPregBellySize($PC)>>
			<<set WombImpregnate($PC, $PC.pregType, $PC.pregSource, $PC.preg)>>
		<</if>>
	<</if>>
	<<if $PC.dick != 0>>
		<<set $PC.geneticQuirks.wellHung = 2>>
	<<else>>
		<<set $PC.balls = 0>>
		<<set $PC.scrotum = 0>>
		<<set $PC.prostate = 0>>
	<</if>>
	<<set $PC.ovaryAge = $PC.physicalAge>>
<</if>>
<<set _pcMomFound = 0, _pcDadFound = 0>>
<<if def $slaveIndices[$PC.mother]>>
	<<set _pcMomFound = 1>>
<</if>>
<<if def $slaveIndices[$PC.father]>>
	<<set _pcDadFound = 1>>
<</if>>
<<if _pcMomFound == 0 && $PC.mother > 0>>
	<<set _lostMom = $PC.mother>>
	<<set $PC.mother = $missingParentId>>
	<<for _i = 0; _i < $slaves.length; _i++>>
		<<if $slaves[_i].mother == _lostMom>>
			<<set $slaves[_i].mother = $missingParentId>>
		<</if>>
	<</for>>
	<<set $missingParentId-->>
<</if>>
<<if _pcDadFound == 0 && $PC.father > 0>>
	<<set _lostDad = $PC.father>>
	<<set $PC.father = $missingParentId>>
	<<for _i = 0; _i < $slaves.length; _i++>>
		<<if $slaves[_i].father == _lostDad>>
			<<set $slaves[_i].father = $missingParentId>>
		<</if>>
	<</for>>
	<<set $missingParentId-->>
<</if>>
<<for _i = 0; _i < $slaves.length; _i++>>
	<<set _slaveMomFound = 0, _slaveDadFound = 0>>
	<<if def $slaveIndices[$slaves[_i].mother]>>
		<<set _slaveMomFound = 1>>
	<</if>>
	<<if def $slaveIndices[$slaves[_i].father]>>
		<<set _slaveDadFound = 1>>
	<</if>>
	<<if _pcMomFound == 0 && $PC.mother > 0>>
		<<set _lostMom = $PC.mother>>
		<<set $PC.mother = $missingParentID>>
		<<for _i = 0; _i < $slaves.length; _i++>>
			<<if $slaves[_i].mother == _lostMom>>
				<<set $slaves[_i].mother = $missingParentID>>
			<</if>>
		<</for>>
		<<set $missingParentID-->>
	<</if>>
	<<if _pcDadFound == 0 && $PC.father > 0>>
		<<set _lostDad = $PC.father>>
		<<set $PC.father = $missingParentID>>
		<<for _i = 0; _i < $slaves.length; _i++>>
			<<if $slaves[_i].father == _lostDad>>
				<<set $slaves[_i].father = $missingParentID>>
			<</if>>
		<</for>>
		<<set $missingParentID-->>
	<</if>>
<</for>>
<<set _coeffSlaves = []>>
<<set _genePoolMap = {}>>
<<for _i = 0; _i < $genePool.length; _i++>>
	<<set _genePoolMap[$genePool[_i].ID] = $genePool[_i]>>
<</for>>
<<for _i = 0; _i < $slaves.length; _i++>>
	<<if $slaves[_i].newGamePlus == 0>>
		<<set $slaves[_i].inbreedingCoeff = -1>>
		<<set _genePoolMap[$slaves[_i].ID].inbreedingCoeff = -1>>
		<<run _coeffSlaves.push($slaves[_i])>>
	<</if>>
<</for>>
<<set _ibcoeffs = ibc.coeff_slaves(_coeffSlaves)>>
<<for _i = 0; _i < _coeffSlaves.length; _i++>>
	<<set _coeffSlaves[_i].inbreedingCoeff = _ibcoeffs[_coeffSlaves[_i].ID]>>
	<<set _genePoolMap[_coeffSlaves[_i].ID].inbreedingCoeff = _ibcoeffs[_coeffSlaves[_i].ID]>>
<</for>>
<<if $plot == 1 && $neighboringArcologies > 0>>
	<<set _bestProsperity = 0, _bestProsperityIndex = 1>>
	<<for _acq = 1; _acq < $arcologies.length; _acq++>>
		<<if $arcologies[_acq].prosperity > _bestProsperity>>
			<<set _bestProsperity = $arcologies[_acq].prosperity>>
			<<set _bestProsperityIndex = _acq>>
		<</if>>
	<</for>>
	<<set $rivalSet = 1>>
	<<set $arcologies[_bestProsperityIndex].rival = 1>>
<</if>>
<<set $targetAge = $minimumSlaveAge>>
<<set $targetAgeNursery = $minimumSlaveAge>>
<<run resetFamilyCounters()>>

You've done it.

You arrive at your new arcology, $arcologies[0].name, and head straight to the penthouse to enter the access codes that will tell the $arcologies[0].name systems to recognize you as their owner. The penthouse office is ready to receive the codes, and they authenticate. A voice activates in your earpiece.

//Congratulations. I am a personal assistant program, and it is my pleasure to assist you,
<<= PlayerName()>>
the new owner of $arcologies[0].name. I will offer useful information whenever possible in italics. Your new arcology has some unusual equipment. The previous owner kept a small stable of sex slaves. The penthouse therefore has a body modification studio for tattooing, bleaching and piercing, and an auto salon for more prosaic things like hair care. It also has a remote surgery, a small surgical theater that can be operated remotely by a qualified surgeon if you can pay the fee. Finally, it has a slave nutrition system connected to the arcology's hydroponics bays. This system produces a tasty protein-rich drink that provides the physically active female body all its necessary nutrients while leaving the lower digestive tract extremely clean. It even causes a mild increase in sex drive.

The previous owner seems to have left in something of a hurry.
<<set _valueGiven = 0>>
<<set _heroSlaves = App.Utils.buildHeroArray().shuffle()>>
<<if $cheatMode == 1>>
	Since you've elected to take over an arcology with special advantages, you've acquired a very special group of slaves.
	<<include [[Cheatmode Database]]>>
<<elseif $saveImported == 1>>
	Since it took some time for you to ensure that your existing stable of slaves were safely moved to $arcologies[0].name, the previous owner had the time to get most of their things away.
<<elseif ($targetArcology.fs != "New") && ($targetArcology.fs != "Multiculturalist")>>
	<<for $j = 0; $j < 5; $j++>>
		<<if _valueOwed - _valueGiven <= 5000>>
			<<break>>
		<</if>>
		<<switch $targetArcology.fs>>
		<<case "Supremacist">>
			<<set $oneTimeDisableDisability = 1>>
			<<set $fixedRace = $arcologies[0].FSSupremacistRace>><<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = random(25,45), _slave.trust = random(-25,-45)>>
			<<run setHealth(_slave, jsRandom(0, 20), 0, 0, 0, 0)>>
			<<set _slave.face = random(15,100)>>
			<<set _slave.skill.oral = random(15,35), _slave.skill.anal = random(15,35)>>
			<<if _slave.vagina > -1>>
				<<if _slave.vagina == 0>><<set _slave.vagina++>><</if>>
				<<set _slave.skill.vaginal = random(15,35)>>
			<</if>>
			<<set _slave.skill.entertainment = random(15,35)>>
			<<set _slave.clothes = "uncomfortable straps", _slave.collar = "uncomfortable leather", _slave.shoes = "flats">>
			<<set _slave.assignment = "please you">>
		<<case "Subjugationist">>
			<<set $oneTimeDisableDisability = 1>>
			<<set $fixedRace = $arcologies[0].FSSubjugationistRace>><<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = random(25,45), _slave.trust = random(-25,-45)>>
			<<run setHealth(_slave, jsRandom(0, 20), 0, 0, 0, 0)>>
			<<set _slave.face = random(15,100)>>
			<<set _slave.skill.oral = random(15,35), _slave.skill.anal = random(15,35)>>
			<<if _slave.vagina > -1>>
				<<if _slave.vagina == 0>><<set _slave.vagina++>><</if>>
				<<set _slave.skill.vaginal = random(15,35)>>
			<</if>>
			<<set _slave.skill.whoring = random(15,35)>>
			<<set _slave.clothes = "uncomfortable straps", _slave.collar = "uncomfortable leather", _slave.shoes = "flats">>
			<<set _slave.assignment = "whore">>
		<<case "GenderRadicalist">>
			<<set $activeSlaveOneTimeMaxAge = 25>>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave("XY")>>
			<<set _slave.devotion = random(25,45), _slave.trust = random(15,-15)>>
			<<run setHealth(_slave, 100, 0, 0, 0, jsRandom(0, 20))>>
			<<set _slave.face = random(0,55)>>
			<<set _slave.boobs += 100*random(2,4)>>
			<<set _slave.butt += random(1,2)>>
			<<set _slave.attrXY = random(70,90), _slave.attrXX = 0>>
			<<set _slave.skill.oral = random(35,65), _slave.skill.anal = random(35,65), _slave.skill.whoring = random(35,65)>>
			<<run SoftenSexualFlaw(_slave)>>
			<<set _slave.clothes = "uncomfortable straps", _slave.collar = "stylish leather", _slave.shoes = "heels">>
			<<set _slave.assignment = "whore">>
		<<case "GenderFundamentalist">>
			<<set $activeSlaveOneTimeMinAge = $fertilityAge>>
			<<set $activeSlaveOneTimeMaxAge = 25>>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave("XX")>>
			<<set _slave.devotion = random(25,45), _slave.trust = random(-25,-45)>>
			<<run setHealth(_slave, jsRandom(55, 65), 0, 0, 0, 0)>>
			<<set _slave.face = random(15,100)>>
			<<set _slave.preg = random(1,40), _slave.lactation = 1, _slave.lactationDuration = 2>>
			<<run SetBellySize(_slave)>>
			<<if _slave.vagina > -1>>
				<<if _slave.vagina == 0>><<set _slave.vagina++>><</if>>
				<<set _slave.skill.vaginal = random(15,35)>>
			<</if>>
			<<set _slave.clothes = "a nice maid outfit", _slave.collar = "tight steel", _slave.shoes = "flats">>
			<<set _slave.assignment = "be a servant">>
		<<case "Paternalist">>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = random(25,45), _slave.trust = random(55,65)>>
			<<run setHealth(_slave, jsRandom(55, 65), 0, 0, 0, 0)>>
			<<set _slave.face = random(15,100)>>
			<<set _slave.intelligence = random(0,100), _slave.intelligenceImplant = 30>>
			<<set _slave.skill.entertainment = random(15,35)>>
			<<set _slave.clothes = "conservative clothing", _slave.collar = "none", _slave.shoes = "flats">>
			<<set _slave.assignment = "be a servant">>
		<<case "Degradationist">>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = 25, _slave.trust = -25>>
			<<run setHealth(_slave, jsRandom(0, 15), 0, 0, 0, 0)>>
			<<set _slave.fuckdoll = 100>>
			<<set _slave.career = "a Fuckdoll">>
			<<set _slave.fetish = "mindbroken">>
			<<set _slave.boobs += 100*random(10,20)>>
			<<set _slave.butt += random(2,3)>>
			<<set _slave.lips = random(2,4)>>
			<<set _slave.weight = random(-15,15)>>
			<<set _slave.skill.oral = 0, _slave.skill.anal = 0, _slave.skill.vaginal = 0, _slave.skill.entertainment = 0, _slave.skill.whoring = 0>>
			<<set _slave.behavioralFlaw = "none", _slave.sexualFlaw = "none">>
			<<set _slave.clothes = "a Fuckdoll suit">>
			<<set _slave.assignment = "please you">>
		<<case "AssetExpansionist">>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = random(25,45), _slave.trust = random(-15,15)>>
			<<run setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0)>>
			<<set _slave.chem = 50>>
			<<set _slave.face = random(15,100)>>
			<<set _slave.boobs += 100*random(10,20)>>
			<<set _slave.butt += random(2,3)>>
			<<set _slave.lips += random(0,1)>>
			<<if _slave.balls > 0>><<set _slave.balls++>><</if>>
			<<if _slave.dick > 0>><<set _slave.dick++>><</if>>
			<<set _slave.weight = random(15,90)>>
			<<set _slave.skill.oral = random(15,35), _slave.skill.anal = 0, _slave.anus = 0>>
			<<if _slave.vagina > -1>>
				<<if _slave.vagina == 0>><<set _slave.vagina++>><</if>>
				<<set _slave.skill.vaginal = random(15,35)>>
			<</if>>
			<<set _slave.skill.entertainment = random(15,35)>>
			<<set _slave.clothes = "slutty jewelry", _slave.collar = "pretty jewelry", _slave.shoes = "heels">>
			<<set _slave.assignment = "please you">>
		<<case "SlimnessEnthusiast">>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = random(25,45), _slave.trust = random(55,65)>>
			<<run setHealth(_slave, jsRandom(55, 65), 0, 0, 0, 0)>>
			<<set _slave.face = random(15,100)>>
			<<set _slave.boobs = 100*random(1,4)>>
			<<set _slave.butt = random(1,2)>>
			<<set _slave.weight = random(-25,-15)>>
			<<set _slave.skill.oral = random(15,35), _slave.skill.anal = 0, _slave.anus = 0>>
			<<if _slave.vagina > -1>>
				<<if _slave.vagina == 0>><<set _slave.vagina++>><</if>>
				<<set _slave.skill.vaginal = random(15,35)>>
			<</if>>
			<<set _slave.skill.entertainment = random(15,35)>>
			<<set _slave.clothes = "a leotard", _slave.collar = "pretty jewelry", _slave.shoes = "flats">>
			<<set _slave.assignment = "please you">>
		<<case "TransformationFetishist">>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = random(25,45), _slave.trust = random(-15,15)>>
			<<run setHealth(_slave, jsRandom(-15, 0), Math.max(normalRandInt(5, 3), 0), Math.max(normalRandInt(5, 3), 0), 0, 0)>>
			<<set _slave.faceImplant = random(40,70)>>
			<<set _slave.face = Math.trunc(_slave.face+_slave.faceImplant/2,-100,100)>>
			<<set _slave.boobsImplant = 200*random(4,8)>>
			<<set _slave.boobs += _slave.boobsImplant>>
			<<set _slave.boobsImplantType = "normal">>
			<<set _slave.buttImplant = random(2,4)>>
			<<set _slave.butt += _slave.buttImplant>>
			<<set _slave.buttImplant = "normal">>
			<<set _slave.lipsImplant = random(1,2)>>
			<<set _slave.lips = Math.trunc(_slave.lipsImplant+2,-3,3)>>
			<<set _slave.weight = random(-25,-15)>>
			<<set _slave.skill.oral = random(15,35), _slave.skill.anal = random(15,35)>>
			<<if _slave.vagina > -1>>
				<<if _slave.vagina == 0>><<set _slave.vagina++>><</if>>
				<<set _slave.skill.vaginal = random(15,35)>>
			<</if>>
			<<set _slave.clothes = "a string bikini", _slave.collar = "shock punishment", _slave.shoes = "extreme heels">>
			<<set _slave.assignment = "whore">>
		<<case "BodyPurist">>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = random(55,65), _slave.trust = random(25,45)>>
			<<run setHealth(_slave, 100, 0, 0, 0, jsRandom(0, 20))>>
			<<set _slave.face = random(15,100)>>
			<<set _slave.weight = random(-5,5)>>
			<<set _slave.muscles = random(10,25)>>
			<<set _slave.skill.oral = random(15,35), _slave.skill.anal = random(15,35)>>
			<<if _slave.vagina > -1>>
				<<if _slave.vagina == 0>><<set _slave.vagina++>><</if>>
				<<set _slave.skill.vaginal = random(15,35)>>
			<</if>>
			<<set _slave.clothes = "a nice maid outfit", _slave.collar = "pretty jewelry", _slave.shoes = "heels">>
			<<set _slave.assignment = "be a servant">>
		<<case "MaturityPreferentialist">>
			<<set $activeSlaveOneTimeMinAge = 36>>
			<<set $activeSlaveOneTimeMaxAge = 39>>
			<<set $one_time_age_overrides_pedo_mode = 1>>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = random(55,65), _slave.trust = random(-15,15)>>
			<<run setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0)>>
			<<set _slave.face = random(15,100)>>
			<<set _slave.boobs += 100*random(1,4)>>
			<<set _slave.butt += random(1,2)>>
			<<set _slave.weight = random(-5,90)>>
			<<set _slave.skill.oral = random(15,35), _slave.skill.anal = random(15,35)>>
			<<if _slave.vagina > -1>>
				<<if _slave.vagina == 0>><<set _slave.vagina++>><</if>>
				<<set _slave.skill.vaginal = random(15,35)>>
			<</if>>
			<<run SoftenBehavioralFlaw(_slave)>>
			<<set _slave.clothes = "a slutty maid outfit", _slave.collar = "pretty jewelry", _slave.shoes = "heels">>
			<<set _slave.assignment = "be a servant">>
		<<case "YouthPreferentialist">>
			<<set $activeSlaveOneTimeMaxAge = 19>>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = random(25,45), _slave.trust = random(55,65)>>
			<<run setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0)>>
			<<set _slave.face = random(15,100)>>
			<<set _slave.boobs = 100*random(1,4)>>
			<<set _slave.butt = random(1,3)>>
			<<set _slave.weight = random(-25,25)>>
			<<set _slave.skill.oral = random(15,35), _slave.skill.anal = 0, _slave.anus = 0>>
			<<if _slave.vagina > -1>><<set _slave.skill.vaginal = 0, _slave.vagina = 0>><</if>>
			<<set _slave.skill.entertainment = random(15,35)>>
			<<set _slave.clothes = "a schoolgirl outfit", _slave.collar = "pretty jewelry", _slave.shoes = "heels">>
			<<set _slave.assignment = "be a servant">>
		<<case "Pastoralist">>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = random(25,45), _slave.trust = random(-25,-45)>>
			<<run setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0)>>
			<<set _slave.boobs += 100*random(10,20)>>
			<<if _slave.balls > 0>><<set _slave.balls++>><</if>>
			<<set _slave.lactation = 2, _slave.lactationDuration = 2>>
			<<set _slave.clothes = "Western clothing", _slave.collar = "leather with cowbell", _slave.shoes = "flats">>
			<<set _slave.assignment = "get milked">>
		<<case "PhysicalIdealist">>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = random(25,45), _slave.trust = random(25,45)>>
			<<run setHealth(_slave, 100, 0, 0, 0, jsRandom(10, 40))>>
			<<set _slave.muscles = random(50,100)>>
			<<set _slave.skill.oral = random(15,35), _slave.skill.anal = random(15,35)>>
			<<if _slave.vagina > -1>>
				<<if _slave.vagina == 0>><<set _slave.vagina++>><</if>>
				<<set _slave.skill.vaginal = random(15,35)>>
			<</if>>
			<<set _slave.skill.whoring = random(15,35)>>
			<<set _slave.clothes = "body oil", _slave.collar = "none", _slave.shoes = "none">>
			<<set _slave.assignment = "whore">>
		<<case "ChattelReligionist">>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = random(55,65), _slave.trust = random(55,65)>>
			<<run setHealth(_slave, jsRandom(0, 15), 0, 0, 0, 0)>>
			<<if _slave.vagina == 0>><<set _slave.vagina++>><</if>>
			<<set _slave.skill.whoring = random(10,20)>>
			<<set _slave.behavioralFlaw = "none", _slave.behavioralQuirk = "sinful">>
			<<set _slave.clothes = "a chattel habit", _slave.collar = "heavy gold", _slave.shoes = "flats">>
			<<set _slave.assignment = "whore">>
		<<case "RomanRevivalist">>
			<<set $activeSlaveOneTimeMaxAge = 19>>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = 100, _slave.trust = random(55,65)>>
			<<run setHealth(_slave, 100, 0, 0, 0, jsRandom(10, 30))>>
			<<set _slave.face = random(0,55)>>
			<<set _slave.muscles = random(25,50)>>
			<<set _slave.skill.combat = 1>>
			<<set _slave.behavioralFlaw = "none", _slave.behavioralQuirk = "fitness">>
			<<set _slave.behavioralFlaw = "none">>
			<<set _slave.clothes = "a toga", _slave.collar = "pretty jewelry", _slave.shoes = "flats">>
			<<set _slave.assignment = "guard you", $BodyguardID = _slave.ID>>
		<<case "NeoImperialist">>
			<<set $activeSlaveOneTimeMinAge = 16>>
			<<set $activeSlaveOneTimeMaxAge = 28>>
			<<set $oneTimeDisableDisability = 1>>
			<<set $fixedRace = "white">>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = 100, _slave.trust = random(55,65)>>
			<<run setHealth(_slave, 100, 0, 0, 0, jsRandom(10, 30))>>
			<<set _slave.face = random(20,75)>>
			<<set _slave.muscles = random(25,60)>>
			<<set _slave.skill.combat = 1>>
			<<set _slave.behavioralFlaw = "none", _slave.behavioralQuirk = "fitness">>
			<<set _slave.behavioralFlaw = "none">>
			<<set _slave.skill.entertainment = random(15,35)>>
			<<set _slave.clothes = "a tight Imperial bodysuit", _slave.shoes = "flats">>
			<<set _slave.assignment = "guard you", $BodyguardID = _slave.ID>>
		<<case "AztecRevivalist">>
			<<set $oneTimeDisableDisability = 1>>
			<<set $fixedRace = "latina">>
			<<set _slave = GenerateNewSlave(null, {nationality: "Mexican"})>>
			<<set _slave.accent = 0>>
			<<set _slave.devotion = 75, _slave.trust = 75>>
			<<run setHealth(_slave, jsRandom(-20, 20), 0, 0, 0, 0)>>
			<<set _slave.muscles = random(50,75)>>
			<<set _slave.skill.combat = 1>>
			<<set _slave.behavioralFlaw = "malicious", _slave.behavioralQuirk = "none">>
			<<set _slave.clothes = "a huipil", _slave.collar = "pretty jewelry", _slave.shoes = "none">>
			<<set _slave.assignment = "be your Head Girl", $HeadGirlID = _slave.ID>>
		<<case "EgyptianRevivalist">>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = random(25,45), _slave.trust = random(25,45)>>
			<<run setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0)>>
			<<set _slave.face = random(15,100)>>
			<<set _slave.skill.oral = random(15,35), _slave.skill.anal = random(15,35)>>
			<<if _slave.vagina > -1>>
				<<if _slave.vagina == 0>><<set _slave.vagina++>><</if>>
				<<set _slave.skill.vaginal = random(15,35)>>
			<</if>>
			<<set _slave.skill.entertainment = random(15,35)>>
			<<run SoftenSexualFlaw(_slave)>>
			<<set _slave.clothes = "slutty jewelry", _slave.collar = "ancient Egyptian", _slave.shoes = "flats">>
			<<set _slave.assignment = "please you">>
		<<case "EdoRevivalist">>
			<<set $oneTimeDisableDisability = 1>>
			<<set $fixedRace = "asian">>
			<<set _slave = GenerateNewSlave(null, {nationality: "Japanese"})>>
			<<set _slave.accent = 0>>
			<<set _slave.devotion = random(25,45), _slave.trust = random(25,45)>>
			<<run setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0)>>
			<<set _slave.face = random(15,100)>>
			<<set _slave.intelligence = random(0,100), _slave.intelligenceImplant = 30>>
			<<set _slave.skill.entertainment = 100>>
			<<set _slave.clothes = "a kimono", _slave.collar = "satin choker", _slave.shoes = "heels">>
			<<set _slave.assignment = "serve the public">>
		<<case "ArabianRevivalist">>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = random(25,45), _slave.trust = random(-15,15)>>
			<<run setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0)>>
			<<set _slave.face = random(15,100)>>
			<<set _slave.intelligence = random(-15,80), _slave.intelligenceImplant = 0>>
			<<set _slave.clothes = "harem gauze", _slave.collar = "uncomfortable leather", _slave.shoes = "flats">>
			<<set _slave.assignment = "take classes">>
		<<case "ChineseRevivalist">>
			<<set $activeSlaveOneTimeMinAge = 36>>
			<<set $activeSlaveOneTimeMaxAge = 38>>
			<<set $one_time_age_overrides_pedo_mode = 1>>
			<<set $oneTimeDisableDisability = 1>>
			<<set $fixedRace = "asian">>
			<<set _slave = GenerateNewSlave(null, {nationality: "Chinese"})>>
			<<set _slave.devotion = random(55,65), _slave.trust = random(25,45)>>
			<<run setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0)>>
			<<set _slave.face = random(0,55)>>
			<<set _slave.accent = 0>>
			<<set _slave.intelligence = 100, _slave.intelligenceImplant = 30>>
			<<set _slave.skill.oral = 100, _slave.skill.anal = 100>>
			<<if _slave.vagina > -1>>
				<<if _slave.vagina == 0>><<set _slave.vagina++>><</if>>
				<<set _slave.skill.vaginal = 100>>
			<</if>>
			<<set _slave.skill.entertainment = 100, _slave.skill.whoring = 100>>
			<<run SoftenBehavioralFlaw(_slave)>>
			<<run SoftenSexualFlaw(_slave)>>
			<<set _slave.clothes = "a slutty qipao", _slave.collar = "pretty jewelry", _slave.shoes = "heels">>
			<<set _slave.assignment = "be your Head Girl", $HeadGirlID = _slave.ID>>
		<<case "Eugenics">>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = -100, _slave.trust = -100>>
			<<run setHealth(_slave, jsRandom(80, 90), 0, 0, 0, 0)>>
			<<set _slave.intelligence = 100>>
			<<set _slave.intelligenceImplant = 30>>
			<<set _slave.face = 100>>
			<<set _slave.faceShape = "sensual">>
			<<set _slave.skill.oral = random(35,75), _slave.skill.anal = random(35,75)>>
			<<if _slave.vagina > -1>>
				<<if _slave.vagina == 0>><<set _slave.vagina++>><</if>>
				<<set _slave.skill.vaginal = random(35,75)>>
			<</if>>
			<<set _slave.skill.entertainment = random(15,35)>>
			<<set _slave.skill.whoring = 0>>
			<<run SoftenSexualFlaw(_slave)>>
			<<set _slave.clothes = "a ball gown", _slave.shoes = "flats">>
			<<set _slave.assignment = "rest">>
		<<case "Repopulationist">>
			<<set $activeSlaveOneTimeMinAge = $fertilityAge+3>>
			<<set $activeSlaveOneTimeMaxAge = 25>>
			<<set $one_time_age_overrides_pedo_mode = 1>>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave("XX")>>
			<<set _slave.devotion = random(25,45), _slave.trust = random(-25,-45)>>
			<<run setHealth(_slave, jsRandom(55, 65), 0, 0, 0, 0)>>
			<<set _slave.face = random(15,100)>>
			<<set _slave.preg = random(10,40), _slave.pregType = random(3,8), _slave.lactation = 1, _slave.lactationDuration = 2>>
			<<run SetBellySize(_slave)>>
			<<set _slave.counter.birthsTotal = 5>>
			<<set _slave.bellySag = 20, _slave.bellySagPreg = 20>>
			<<if _slave.vagina > -1>>
				<<set _slave.vagina = 4>>
				<<set _slave.skill.vaginal = random(15,35)>>
			<</if>>
			<<set _slave.clothes = "a nice maid outfit", _slave.shoes = "flats">>
			<<set _slave.assignment = "please you">>
		<<case "HedonisticDecadence">>
			<<set $activeSlaveOneTimeMaxAge = 25>>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave("XX")>>
			<<set _slave.devotion = random(25,45), _slave.trust = random(-25,-45)>>
			<<run setHealth(_slave, jsRandom(-20, 20), 0, 0, 0, 0)>>
			<<set _slave.face = random(15,40)>>
			<<set _slave.boobs += 100*random(3,6)>>
			<<set _slave.butt += random(2,5)>>
			<<set _slave.weight = random(100,200)>>
			<<set _slave.skill.oral = random(15,35), _slave.skill.anal = random(15,35), _slave.anus = 2>>
			<<if _slave.vagina > -1>><<set _slave.skill.vaginal = random(15,35), _slave.vagina = 3>><</if>>
			<<set _slave.skill.entertainment = 0>>
			<<set _slave.energy = random(60,80)>>
			<<set _slave.behavioralFlaw = "gluttonous">>
			<<set _slave.clothes = "attractive lingerie", _slave.shoes = "flats">>
			<<set _slave.diet = "fattening">>
			<<set _slave.rules.living = "luxurious">>
			<<set _slave.assignment = "rest">>
		<<case "IntellectualDependency">>
			<<set $activeSlaveOneTimeMinAge = 14>>
			<<set $activeSlaveOneTimeMaxAge = 18>>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<run setHealth(_slave, jsRandom(55, 65), 0, 0, 0, 0)>>
			<<set _slave.devotion = random(45,65), _slave.trust = random(-15,45)>>
			<<set _slave.face = random(30,100)>>
			<<set _slave.energy = 100>>
			<<set _slave.weight = random(-25,-15)>>
			<<set _slave.skill.oral = 0, _slave.skill.anal = 0, _slave.skill.vaginal = 0, _slave.skill.entertainment = 0, _slave.skill.whoring = 0>>
			<<set _slave.intelligence = -100>>
			<<set _slave.intelligenceImplant = 0>>
			<<if _slave.vagina == 0>><<set _slave.vagina++>><</if>>
			<<set _slave.anus++>>
		<<case "SlaveProfessionalism">>
			<<set $activeSlaveOneTimeMinAge = 18>>
			<<set $activeSlaveOneTimeMaxAge = 25>>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = 100, _slave.trust = 20>>
			<<run setHealth(_slave, 80, 0, 0, 0, jsRandom(10, 30))>>
			<<set _slave.face = random(30,100)>>
			<<set _slave.energy = 10>>
			<<set _slave.weight = random(-15,5)>>
			<<set _slave.skill.oral = 100, _slave.skill.anal = 100, _slave.skill.vaginal = 100, _slave.skill.entertainment = 100, _slave.skill.whoring = 100>>
			<<set _slave.intelligence = 100>>
			<<set _slave.intelligenceImplant = 30>>
			<<set _slave.accent = 0>>
			<<run SoftenBehavioralFlaw(_slave)>>
			<<run SoftenSexualFlaw(_slave)>>
			<<set _slave.clothes = "a nice maid outfit", _slave.collar = "pretty jewelry">>
			<<set _slave.assignment = "be your Head Girl", $HeadGirlID = _slave.ID>>
		<<case "PetiteAdmiration">>
			<<set $activeSlaveOneTimeMinAge = 14>>
			<<set $activeSlaveOneTimeMaxAge = 18>>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = random(55,65), _slave.trust = random(-15,15)>>
			<<run setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0)>>
			<<set _slave.face = random(15,100)>>
			<<if _slave.height >= 150>>
				<<set _slave.height = Math.trunc(Height.random(_slave, {limitMult: [-3, -1]}))>>
				<<if _slave.height >= 150>>
					<<set _slave.height = Math.trunc(Height.random(_slave, {limitMult: [-4, -2]}))>>
					<<if _slave.height >= 150>>
						<<set _slave.height = random(90,130)>>
						<<set _slave.geneticQuirks.dwarfism = 2>>
					<</if>>
				<</if>>
			<</if>>
			<<set _slave.skill.oral = random(35,65), _slave.skill.anal = random(15,35)>>
			<<if _slave.vagina > -1>>
				<<if _slave.vagina == 0>><<set _slave.vagina++>><</if>>
				<<set _slave.skill.vaginal = random(15,35)>>
			<</if>>
			<<set _slave.clothes = "a succubus outfit", _slave.legAccessory = "long stockings">>
			<<set _slave.assignment = "please you">>
		<<case "StatuesqueGlorification">>
			<<set $activeSlaveOneTimeMinAge = 18>>
			<<set $activeSlaveOneTimeMaxAge = 30>>
			<<set $one_time_age_overrides_pedo_mode = 1>>
			<<set $oneTimeDisableDisability = 1>>
			<<set _slave = GenerateNewSlave()>>
			<<set _slave.devotion = random(55,65), _slave.trust = random(-15,15)>>
			<<run setHealth(_slave, jsRandom(25, 45), 0, 0, 0, 0)>>
			<<set _slave.face = random(15,100)>>
			<<set _slave.weight = random(-5,5)>>
			<<set _slave.muscles = random(20,40)>>
			<<if _slave.height < 185>>
				<<set _slave.height = Math.trunc(Height.random(_slave, {limitMult: [1, 3]}))>>
				<<if _slave.height < 185>>
					<<set _slave.height = Math.trunc(Height.random(_slave, {limitMult: [2, 4]}))>>
					<<if _slave.height < 185>>
						<<set _slave.height = random(200,264)>>
						<<set _slave.geneticQuirks.gigantism = 2>>
					<</if>>
				<</if>>
			<</if>>
			<<set _slave.skill.oral = random(15,35), _slave.skill.anal = random(15,35)>>
			<<if _slave.vagina > -1>>
				<<if _slave.vagina == 0>><<set _slave.vagina++>><</if>>
				<<set _slave.skill.vaginal = random(15,35)>>
			<</if>>
			<<set _slave.clothes = "slutty business attire", _slave.shoes = "heels">>
			<<set _slave.assignment = "please you">>
		<<default>>
			ERROR: bad arcology type
		<</switch>>
		<<set _slave.origin = "You acquired $him along with the arcology.", _slave.career = "a slave">>
		<<set _slaveCost = slaveCost(_slave)>>
		<<if ["AztecRevivalist", "ChineseRevivalist", "NeoImperialist", "Eugenics", "SlaveProfessionalism"].includes($targetArcology.fs)>>
			<<set _valueGiven += _slaveCost*4>>
		<<else>>
			<<set _valueGiven += _slaveCost>>
		<</if>>
		<<run newSlave(_slave)>>
	<</for>>
	<<run App.Utils.setLocalPronouns(_slave)>>
	<<switch $targetArcology.fs>>
	<<case "Supremacist">>
		They kept a personal stable of fearful $arcologies[0].FSSupremacistRace sex slaves, but their sexual training is incomplete. Several of them are still here.
	<<case "Subjugationist">>
		They made it a special goal to enslave and whore out as many $arcologies[0].FSSubjugationistRace people as possible. Several of them are still here.
	<<case "GenderRadicalist">>
		They were in the process of building a stable of pretty young shemale whores. Several of them are still here. They're are all very attracted to men, and skilled at pleasing them.
	<<case "GenderFundamentalist">>
		They kept a personal stable of slaves for breeding purposes. Several of them are still here. They've been kept pregnant, and work as servants when they aren't being bred.
	<<case "Paternalist">>
		Their slaves were all very well treated. Several of them are still here. They were allowed to work as maids, and weren't even forced to have sex.
	<<case "Degradationist">>
		Their personal slaves were all Fuckdolls, slaves who have been permanently encased in advanced latex suits and converted into living sex toys. Several of them are still here.
	<<case "AssetExpansionist">>
		They kept a collection of bejeweled boobs for company, but they focused on breast expansion to the exclusion the slaves' emotional training. Several of them are still here.
	<<case "SlimnessEnthusiast">>
		They kept a harem of slim, pretty girls, and treated them very well. Several of them are still here. They should be very trusting of a new owner.
	<<case "TransformationFetishist">>
		They were just putting the finishing touches on a planned brothel's worth of surgically enhanced whores. Several of them are still here. They are already used to prostitution.
	<<case "BodyPurist">>
		Their slaves were trained for sexual use, but their health, fitness, and natural appearance were the main priorities. Several of them are still here.
	<<case "MaturityPreferentialist">>
		They preferred to keep their MILFs as scantily clad servants. Several of them are still here. They aren't all happy to be sex objects, but they're used to it.
	<<case "YouthPreferentialist">>
		They treated their young slaves very well. Several of them are still here. Virgins have been carefully preserved, but have learned to use their mouths through experience.
	<<case "Pastoralist">>
		Their herd of cow girls was progressing nicely, though more progress had been made on milk production than on training. Several of them are still here.
	<<case "PhysicalIdealist">>
		Their slaves worked as prostitutes, but mostly to fund a program of muscle building for all of them, which was nearing completion. Several of them are still here.
	<<case "ChattelReligionist">>
		They were recruiting a stable of slave whores by targeting people with religious complexes that made them particularly vulnerable to recruitment. Several of them are still here.
	<<case "RomanRevivalist">>
		The only one of their slaves left is the bodyguard. $He should be very willing to transfer $his loyalty to you, as $his new owner.
	<<case "NeoImperialist">>
		This arcology kept their Knights as actively enslaved and docile servants; you find one of them remaining here. $He immediately pledges $his loyalty over to you.
	<<case "AztecRevivalist">>
		They maintained a combination of disobedient slaves, deemed incorrigible and blood priestesses. Since they offer themselves as slaves willingly, one has remained loyal to the owner of the arcology.
	<<case "EgyptianRevivalist">>
		They kept a harem of beautiful slave girls, who have been well-treated and well-trained. They should be very willing to serve you in turn.
	<<case "EdoRevivalist">>
		They put considerable effort into creating modern slave geisha, elegant Japanese slaves who were assigned to serve the public. Several of them are still here.
	<<case "ArabianRevivalist">>
		They trained slaves personally, and never kept slaves for very long. The slaves they left are all partway through being trained.
	<<case "ChineseRevivalist">>
		The only one of their slaves left is the Head Girl. $He should be willing to transfer $his loyalty to you, as $his proper superior.
	<<case "Eugenics">>
		The only one of their slaves left is an absolute beauty of a $girl. $He is too smart for $his own good and will likely not trust you.
	<<case "Repopulationist">>
		They kept a personal stable of slaves for breeding purposes. Several of them are still here. They've been kept heavily pregnant, and are used to being used whilst so.
	<<case "HedonisticDecadence">>
		Their slaves were heavily pampered; free to lie about, fuck, and eat as much as they wanted. Several of them are still here, too lazy and spoiled to leave. They eagerly paw at you upon your arrival, begging for their bellies to be filled with food and for a good, hard fucking.
	<<case "IntellectualDependency">>
		They kept several vapid sluts, who are now desperately begging you for sex. It seems they've drained the life out of every toy left behind and have no idea how to recharge them.
	<<case "SlaveProfessionalism">>
		The only one of their slaves left has made it $his mission to have the penthouse ready for whomever should come to own it. $He greets you cordially, hands you a detailed summary of $his skills and information on your new arcology, and calmly awaits further orders.
	<<case "PetiteAdmiration">>
		They had quite the impish little harem. Several of them are still here and immediately swarm you as a welcome, eager to see someone taller again.
	<<case "StatuesqueGlorification">>
		They had quite the collection of towering slaves. Several of them are still here. They gaze down on you, evaluating how best to serve their new owner.
	<<default>>
		ERROR: bad arcology type
	<</switch>>
<<else>>
	They could not get all of their personal effects away. Since they <<if $targetArcology.fs == "Multiculturalist">>tried to sample different kinds of sexual slavery<<else>>did not have the time in control of the arcology to develop a specific stable of sex slaves<</if>>, their slaves were quite varied.
	<<for $j = 0; $j < _heroSlaves.length; $j++>>
		<<if _valueOwed - _valueGiven <= 5000>>
			<<break>>
		<</if>>
		<<set _slave = App.Utils.getHeroSlave(_heroSlaves[$j])>>
		<<run _heroSlaves.splice($j,1)>>
		<<set _slaveCost = slaveCost(_slave)>>
		<<if _valueGiven + _slaveCost < _valueOwed*2>>
			<<run nationalityToAccent(_slave)>>
			<<set _slave.oldDevotion = _slave.devotion>>
			<<set _slave.oldTrust = _slave.trust>>
			<<set _slave.health.tired = 0>>
			<<set _valueGiven += _slaveCost>>
			<<run newSlave(_slave)>>
			<<run App.Utils.setLocalPronouns(_slave)>>
			<<if _slave.fetish == "mindbroken">>
				_slave.slaveName is, sadly, not mentally competent, and is wandering through the penthouse at the moment.
			<<elseif isAmputee(_slave)>>
				_slave.slaveName is a quadruple amputee and is quite helpless, so you can attend to $him at your leisure.
			<<elseif _slave.devotion < -50>>
				_slave.slaveName is quite rebellious and was attempting to escape, so I have locked $him in the slave quarters.
			<<elseif _slave.devotion < -20>>
				_slave.slaveName resists my orders and was considering escape, so I have locked $him in the slave quarters.
			<<elseif _slave.devotion <= 20>>
				_slave.slaveName is reasonably obedient, and is waiting for you in the dormitory, I believe in the hope of making a good impression.
			<<elseif _slave.energy > 95>>
				_slave.slaveName is a remarkable sexual addict, and I believe $he will be very happy to meet you.
			<<elseif _slave.fetish == "pregnancy">>
				<<if _slave.bellyPreg >= 500>>
					_slave.slaveName is currently in the dormitory masturbating over $his growing pregnancy, and <<if $PC.belly >= 5000>>will certainly be eager to meet you<<else>>I believe $he will be happy to show it to you<</if>>.
				<<else>>
					_slave.slaveName is currently in the dormitory examining $himself to try to discern $his fertility, and I believe $he will be <<if $PC.belly >= 5000>>eager to get acquainted with you<<else>>happy to meet you<</if>>.
				<</if>>
			<<elseif _slave.belly >= 5000>> /*had to be placed after pregnancy or it would intercept*/
				_slave.slaveName is currently in the dormitory massaging $his greatly distended belly.
			<<elseif _slave.fetish == "buttslut">>
				_slave.slaveName is currently in the dormitory masturbating anally, and I believe $he will be happy to meet you.
			<<elseif _slave.fetish == "cumslut">>
				_slave.slaveName is currently in the dormitory exhibiting oral fixation, and I believe $he will be happy to meet you.
			<<elseif _slave.fetish == "boobs">>
				_slave.slaveName is currently in the dormitory playing with $his nipples, and I believe $he will be happy to meet you.
			<<elseif _slave.fetish == "humiliation">>
				_slave.slaveName is currently in the entryway flashing passersby, and I believe $he will be happy to meet you.
			<<elseif _slave.fetish == "submissive">>
				_slave.slaveName is currently in the dormitory, experimenting with self-bondage using the sheets; I believe $he will be happy to meet you.
			<<elseif _slave.fetish == "dom">>
				_slave.slaveName is currently in the exercise area keeping fit; $he likes to take an active role sexually and is using this down time to work out.
			<<elseif _slave.fetish == "sadist">>
				_slave.slaveName is currently outside your office; $he enjoys being superior to other slaves and I believe $he means to ingratiate $himself to you.
			<<elseif _slave.fetish == "masochist">>
				_slave.slaveName is a sexual masochist; $he is currently in the bathroom, experimenting with auto-flagellation with a wet towel.
			<<else>>
				_slave.slaveName is currently outside your office, and I believe $he is attempting to maintain sexual arousal to make a good first impression on you.
			<</if>>
		<</if>>
	<</for>>
<</if>>
<<if _valueOwed-_valueGiven > 0>>
	There are some valuables present, worth <<print cashFormat(_valueOwed-_valueGiven)>>.
	<<run cashX((_valueOwed-_valueGiven), "event", _slave)>>
<</if>>
//

<<set $averageTrust = 0>>
<<set $averageDevotion = 0>>
<<set _slavesContributing = 0>>
<<for $i = 0; $i < $slaves.length; $i++>>
    <<run updateHealth($slaves[$i])>>
	<<set $slaves[$i].oldDevotion = $slaves[$i].devotion>>
	<<set $slaves[$i].oldTrust = $slaves[$i].trust>>
	/* AVERAGE VALUES UPDATE */
	<<if assignmentVisible($slaves[$i])>>
		<<set $averageTrust += $slaves[$i].trust, $averageDevotion += $slaves[$i].devotion, _slavesContributing += 1>>
	<<else>>
		<<if $slaves[$i].assignment != "be confined in the cellblock">>
			<<if $slaves[$i].assignment != "be confined in the arcade">>
				<<if ($slaves[$i].assignment != "work in the dairy") || ($dairyRestraintsSetting < 2)>>
					<<set $averageTrust += $slaves[$i].trust*0.5, $averageDevotion += $slaves[$i].devotion*0.5, _slavesContributing += 0.5>>
				<</if>>
			<</if>>
		<</if>>
	<</if>>
<</for>>
<<if _slavesContributing != 0>>
	<<set $averageTrust = $averageTrust/_slavesContributing>>
	<<set $averageDevotion = $averageDevotion/_slavesContributing>>
<</if>>
<<set $enduringTrust = $averageTrust>>
<<set $enduringDevotion = $averageDevotion>>
<<run App.UI.SlaveSummary.settingsChanged()>>

<<link "Continue">>
	<<set $ui = "main">>
	<<if $terrain == "urban">>
		<<set $slaveCostFactor = 0.85>>
		<<set $menialSupplyFactor = 30000>>
		<<set $menialDemandFactor = -30000>>
	<<elseif $terrain == "marine">>
		<<set $slaveCostFactor = 1>>
	<<else>>
		<<set $slaveCostFactor = 1.15>>
		<<set $menialDemandFactor = 30000>>
		<<set $menialSupplyFactor = -30000>>
	<</if>>
	<>
	<<goto "Main">>
<</link>>


code:
:: Agent Company [nobr]

<<set $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Neighbor Interact">>

<<= assignJob(getSlave($AS), "live with your agent")>>

<<if getSlave($AS).rivalry > 0>>
	<<set _i = $slaveIndices[getSlave($AS).rivalryTarget]>>
	<<if def _i>>
		<<set $slaves[_i].rivalry = 0, $slaves[_i].rivalryTarget = 0>>
	<<else>>
		@@.red;Error, slave rival not found.@@
	<</if>>
	<<set getSlave($AS).rivalry = 0, getSlave($AS).rivalryTarget = 0>>
<</if>>

<<set _neighborArcology = $arcologies.find(function(s) { return $subSlave.ID == s.leaderID; })>>

<<setLocalPronouns $subSlave 2>>

Working in _neighborArcology.name's penthouse office, $subSlave.slaveName gets a video call from you. Naturally, _his2 personal assistant program has been instructed to give these the highest priority, and your face appears in front of _him2 immediately. _He2 greets you properly, and asks you what _he2 can do to serve you. You tell _him2 you're planning to send one of your slaves over to _his2 arcology to assist _him2. Exchanges of this kind are neither unusual nor particularly interesting, so a slight look of perplexity clouds $subSlave.slaveName's face as _he2 wonders why this merits a personal call. Normally, <<if $HeadGirlID>>_S.HeadGirl.slaveName<<else>>$assistant.name<</if>> would handle it with _him2 directly.

_His2 question is answered when you bring <<= contextualIntro($subSlave, getSlave($AS))>> in close, putting $him in $subSlave.slaveName's view. $subSlave.slaveName's <<= App.Desc.eyesColor($subSlave)>> fly open with pleased surprise, but before _he2 can speak, <<= getSlave($AS).slaveName>> goes first.
<<if !canTalk(getSlave($AS))>>
	Unable to speak $himself, $he simply makes a heart shape with $his hand<<if hasBothArms(getSlave($AS))>>s<</if>> in view of the video call, and blows $his <<if getSlave($AS).relationship == 4>>lover<<else>>_wife2<</if>> a kiss.
<<else>>
	<<run Enunciate(getSlave($AS))>>
	"Hi <<if getSlave($AS).relationship == 4>>lover<<else>><<s>>weetheart<</if>>," $he <<say>>s in a syrupy tone. "Mi<<ss>> me?"
<</if>>

$subSlave.slaveName smiles back at $him, glowing with pleasure, and responds with exaggerated arousal.

<<run Enunciate($subSlave)>>

<<switch $subSlave.fetish>>
<<case "submissive">>
	"Looking forward to <<s>>leeping in your arm<<s>>, babe," the submissive
<<case "cumslut">>
	"Can't wait to ki<<ss>> you, babe," the orally fixated
<<case "humiliation">>
	"Can't wait to take you right in the middle of the pla<<z>>a here," the exhibitionist
<<case "buttslut">>
	"I can't wait to fuck you in your hot little a<<ss>>," the anally fixated
<<case "boobs">>
	"Looking forward to feeling your brea<<s>>t<<s>> again," the boob-loving
<<case "pregnancy">>
	"Can't wait to <<sh>>are all the pregnant girl<<s>> here with you," the impregnation fetishist
<<case "dom">>
	"Looking forward to <<sh>>oving you fa<<c>>edown, bitch," the dominant
<<case "sadist">>
	"Looking forward to making you bite the pillow again, bitch," the sadistic
<<case "masochist">>
	"Can't wait to feel you hurt me again, babe," the masochistic
<<default>>
	"Babe, I can't wait to <<if hasAnyArms($subSlave)>>give you a hug and <</if>>tell you about _neighborArcology.name," the loving
<</switch>>
leader of an entire arcology <<say>>s.


code:
App.Data.Facilities.arcologyAgent = {
	baseName: "arcology",
	genericName: null,
	jobs: {
		agentsSlave: {
			position: "agent's toy",
			assignment: Job.AGENTPARTNER,
			publicSexUse: true,
			fuckdollAccepted: false
		}
	},
	defaultJob: "agentsSlave",
	manager: {
		position: "agent",
		assignment: Job.AGENT,
		careers: "an arcology owner",
		skill: "headGirl",
		publicSexUse: true,
		fuckdollAccepted: false,
		broodmotherAccepted: false,
		shouldWalk: true,
		shouldHold: true,
		shouldSee: true,
		shouldHear: true,
		shouldTalk: true,
		shouldThink: true,
		requiredDevotion: 21
	}
};

App.Entity.Facilities.AgentJob = class extends App.Entity.Facilities.ManagingJob {
	/**
	 * @param {App.Entity.SlaveState} slave
	 * @returns {string[]}
	 */
	checkRequirements(slave) {
		let r = super.checkRequirements(slave);
		if (slave.intelligence + slave.intelligenceImplant <= 15) {
			r.push(`${slave.slaveName} is not intelligent enough to be your agent.`);
		}
		return r;
	}
};

App.Entity.facilities.arcologyAgent = new App.Entity.Facilities.Facility(
	App.Data.Facilities.arcologyAgent,
	new App.Entity.Facilities.AgentJob()
);


code:
:: Agent Select [nobr jump-from-safe]

<<set $nextButton = "Back", $nextLink = "Neighbor Interact", $encyclopedia = "Agents">>
''Appoint an Agent from your devoted slaves:''

<<includeDOM App.UI.SlaveList.slaveSelectionList(
		s => (s.fuckdoll === 0 && s.devotion > 20 && s.intelligence + s.intelligenceImplant > 15 && s.intelligenceImplant >= 15 && canWalk(s) && canSee(s) && canHear(s) && canTalk(s) && s.broodmother < 2 && (s.breedingMark !== 1 || V.propOutcome === 0 || V.eugenicsFullControl === 1 || V.arcologies[0].FSRestart === "unset")),
		(slave) => App.UI.DOM.passageLink(SlaveFullName(slave), 'Agent Workaround',
			() => { V.i = V.slaves.findIndex((s) => s.ID === slave.ID); }),
		s => App.Entity.facilities.arcologyAgent.manager.slaveHasExperience(s)
	)>>


code:
:: Agent Workaround [nobr jump-from-safe]

<<set $nextButton = "Continue", $nextLink = "Neighbor Interact">>

<<= assignJob($slaves[$i], "be your agent")>>

<<if $slaves[$i].rivalry > 0>>
	<<set _i = $slaveIndices[$slaves[$i].rivalryTarget]>>
	<<if def _i>>
		<<set $slaves[_i].rivalry = 0, $slaves[_i].rivalryTarget = 0>>
	<<else>>
		@@.red;Error, rival not found.@@
	<</if>>
	<<set $slaves[$i].rivalry = 0, $slaves[$i].rivalryTarget = 0>>
<</if>>

<<if $slaves[$i].relationship > 0 && $slaves[$i].relationship < 4>>
	<<set _i = $slaveIndices[$slaves[$i].relationshipTarget]>>
	<<if def _i>>
		<<set $slaves[_i].relationship = 0, $slaves[_i].relationshipTarget = 0>>
	<<else>>
		@@.red;Error, relationshipTarget not found.@@
	<</if>>
	<<set $slaves[$i].relationship = 0, $slaves[$i].relationshipTarget = 0>>
<</if>>

<<set $desc = SlaveTitle($slaves[$i])>>
<<setLocalPronouns $slaves[$i]>>

You order $slaves[$i].slaveName to come into your office for orders. The devoted $desc has no prior warning that this is anything unusual, and from the <<if $slaves[$i].energy > 95>>horny glint<<else>>glow of sexual availability<</if>> in $his <<= App.Desc.eyesColor($slaves[$i])>> as $he <<if canWalk($slaves[$i])>>enters<<else>>is helped in<</if>>, $he <<if $slaves[$i].energy > 95>>seems to be hoping<<else>>wouldn't mind hearing<</if>> that you've called $him in for a quick fuck. In fact, the matter at hand is about as far as it could possibly be from that, on the spectrum of interactions between <<= properMaster()>> and slave.

You offer $him, without preamble, agency on your behalf in <<=App.activeArcology().name>>. As a $woman of intelligence, $he knows the basics of such an arrangement, but $he's stunned into silence by the offer, so you outline it briefly. Having a slave lead an arcology would be too much, even for the most open minded of Free Cities societies. So, $he would be freed, albeit subject to a set of private, restrictive contracts that would allow you to recall $him if you wish, and require $him to follow your directions, if you give $him any. But other than that, $he would be the effective leader of an entire arcology. It's an unusual arrangement, but one that's becoming more common as multiple arcologies come under united control.

$He's intelligent and confident of $his place within society as a valued slave, and knows that with your resources behind $him, this is likely something $he's capable of succeeding at. Nevertheless, $his feelings are obviously mixed. It will be a challenge,
<<switch $slaves[$i].fetish>>
<<case "submissive">>
	especially for a sexual submissive like $him.
<<case "cumslut">>
	and $he'll have to find dominant ways to sate $his oral appetites.
<<case "humiliation">>
	especially for a humiliation addict like $him.
<<case "buttslut">>
	though $he'll probably be able to live $his anal life vicariously by buttfucking others.
<<case "boobs">>
	but $he'll have a practically infinite procession of breasts to judge and fondle.
<<case "pregnancy">>
	but the potential for impregnation of hundreds of slaves excites $him.
<<case "dom">>
	but the prospect of having more slaves at $his whim than even $he could possibly use is incredibly exciting to $him.
<<case "sadist">>
	but the prospect of having more slaves at $his whim than even $he could possibly break is incredibly exciting to $him.
<<case "masochist">>
	especially for a masochist like $him.
<<default>>
	though one $he's willing to take on.
<</switch>>
It will mean that $he'll see much less of you, something such a devoted slave may struggle with. Oppressed by the confusion and strength of $his feelings, $he begins to cry.

"Thank you, <<Master $slaves[$i]>>," $he gasps out. "I'll do my be<<s>>t."


code:
:: AS Dump [no-history]

<<if (ndef $activeSlave) || ($activeSlave == 0)>>

	@@.red;ERROR:@@ AS Dump, activeSlave invalid, returnTo is '$returnTo', previous passage was '<<print previous()>>'. Please report this.

	<<link "Continue">><<goto $returnTo>><</link>> | [[Go Back|previous()]]

<<else>>

	<<silently>>

	<<set _SL = $slaves.length, _ID = $activeSlave.ID>>

	<<if $i >= 0 && $i < _SL && $slaves[$i].ID == _ID>> /* shortcut if $i is already pointing to this slave */
		<<set $slaves[$i] = $activeSlave>>
	<<else>>
		<<set $i = $slaveIndices[_ID]>> /* find $i if exists */
		<<if ndef $i>> /* not found, so new slave */
			<<run newSlave($activeSlave)>>
		<<else>>
			<<set $slaves[$i] = $activeSlave>>
		<</if>>
	<</if>>

	<</silently>>

	<<goto $returnTo>>

<</if>>


code:
/**
 * @param {App.Entity.SlaveState} slave
 * @returns {string}
 */
App.Desc.bodyguard = function(slave) {
	const r = [];
	const {
		his, He, he
	} = getPronouns(slave);
	if (slave.fuckdoll !== 0 || slave.ID !== V.BodyguardID) {
		return "";
	}
	r.push(`${He} is your bodyguard.`);
	r.push(bgWeapon());

	if (slave.skill.combat > 0) {
		r.push(`${He} is <span class="aquamarine">skilled at combat:</span> ${he} is comfortable with the use of modern firearms and edged weapons, and ${his} hands`);
		if (!hasBothArms(slave)) {
			r.push(`would be deadly weapons if ${he} had`);
			if (!hasAnyArms(slave)) {
				r.push(`any.`);
			} else {
				r.push(`more than one.`);
			}
		} else {
			if ((getArmCount(slave, 5) + getArmCount(slave, 6) > 1)) {
				r.push(`would be deadly weapons even if they weren't full of deadly weapons already.`);
			} else {
				r.push(`are deadly weapons.`);
			}
		}
	}

	return r.join(" ");

	function bgWeapon() {
		const w = [];
		if ((slave.muscles + slave.height - 100) / 25 > 5) {
			w.push(`${He} has a long ceramic sword strapped to ${his} back,`);
			switch (slave.nationality) {
				case "American":
					w.push(`and, in keeping with ${his} heritage, a US Ordnance Mk43 Mod.1 GPMG`);
					break;
				case "Armenian":
				case "Belarusian":
				case "Cuban":
				case "Hungarian":
				case "Kazakh":
				case "Uzbek":
					w.push(`and, in keeping with ${his} heritage, a PKM GPMG`);
					break;
				case "Australian":
					w.push(`and, in keeping with ${his} heritage, a Lithgow F89 Maximi GPMG`);
					break;
				case "Austrian":
					w.push(`and, in keeping with ${his} heritage, a Steyr MG 74 GPMG`);
					break;
				case "Belgian":
					w.push(`and, in keeping with ${his} heritage, a FN Minimi M3 LMG`);
					break;
				case "British":
				case "Scottish":
					w.push(`and, in keeping with ${his} heritage, an L7A2 GPMG`);
					break;
				case "Canadian":
					w.push(`and, in keeping with ${his} heritage, a Colt Canada 5.56-LSW LMG`);
					break;
				case "Chilean":
				case "German":
					w.push(`and, in keeping with ${his} heritage, a Rheinmetall MG3 GPMG`);
					break;
				case "Chinese":
					w.push(`and, in keeping with ${his} heritage, a Norinco QJY-88 LMG`);
					break;
				case "Czech":
				case "Slovak":
					w.push(`and, in keeping with ${his} heritage, a ZVI Uk vz.59 Rachot GPMG`);
					break;
				case "Filipina":
					w.push(`and, in keeping with ${his} heritage, a Government Arsenal M60E4 GPMG`);
					break;
				case "Finnish":
					w.push(`and, in keeping with ${his} heritage, a Valmet KvKK 62 LMG`);
					break;
				case "French":
					w.push(`and, in keeping with ${his} heritage, a MAS AAT-F1 GPMG`);
					break;
				case "Indian":
					w.push(`and, in keeping with ${his} heritage, an OFB MG 2A1 GPMG`);
					break;
				case "Indonesian":
					w.push(`and, in keeping with ${his} heritage, a Pindad SM2 LMG`);
					break;
				case "Iranian":
					w.push(`and, in keeping with ${his} heritage, a DIO MGA3 GPMG`);
					break;
				case "Israeli":
					w.push(`and, in keeping with ${his} heritage, an IWI Negev NG7 GPMG`);
					break;
				case "Japanese":
					w.push(`and, in keeping with ${his} heritage, a Sumitomo Type 62 GPMG`);
					break;
				case "Korean":
					w.push(`and, in keeping with ${his} heritage, a S&T K12 GPMG`);
					break;
				case "Mexican":
					w.push(`and, in keeping with ${his} heritage, a SEDENA MG-21 GPMG`);
					break;
				case "Polish":
					w.push(`and, in keeping with ${his} heritage, a ZMT UKM-2000 GPMG`);
					break;
				case "Romanian":
					w.push(`and, in keeping with ${his} heritage, a FACSA PM md.93 LMG`);
					break;
				case "Russian":
					w.push(`and, in keeping with ${his} heritage, a PKP Pecheneg GPMG`);
					break;
				case "Serbian":
					w.push(`and, in keeping with ${his} heritage, a Zastava M09 LMG`);
					break;
				case "South African":
					w.push(`and, in keeping with ${his} heritage, a Vektor SS-77 GPMG`);
					break;
				case "Spanish":
					w.push(`and, in keeping with ${his} heritage, a CETME MG 82 Ameli LMG`);
					break;
				case "Swiss":
					w.push(`and, in keeping with ${his} heritage, a W+F-Bern MG51 GPMG`);
					break;
				case "Turkish":
					w.push(`and, in keeping with ${his} heritage, a MKEK MG3 GPMG`);
					break;
				case "Ukrainian":
					w.push(`and, in keeping with ${his} heritage, a Fort-401 LMG`);
					break;
				case "Vietnamese":
					w.push(`and, in keeping with ${his} heritage, a Z111 RPK LMG`);
					break;
				case "Zimbabwean":
					if (slave.race === "white") {
						w.push(`and, in keeping with ${his} heritage, a FN MAG-58 GPMG`);
					} else {
						w.push(`and a FN MAG 60.20 GPMG`);
					}
					break;
				default:
					w.push(`and a FN MAG 60.20 GPMG`);
			}
			w.push(`slung crosswise on ${his} chest.`);
		} else if ((slave.muscles + slave.height - 100) / 25 > 4) {
			w.push(`${He} has a ceramic sword strapped to ${his} back`);
			switch (slave.nationality) {
				case "American":
					w.push(`and, in keeping with ${his} heritage, a Colt M16A4 assault rifle`);
					break;
				case "Argentinian":
					w.push(`and, in keeping with ${his} heritage, a FMAP FARA-83 assault rifle`);
					break;
				case "Armenian":
				case "Belarusian":
				case "Kazakh":
				case "Uzbek":
					w.push(`and, in keeping with ${his} heritage, a Kalashnikov AK-74M assault rifle`);
					break;
				case "Australian":
					w.push(`and, in keeping with ${his} heritage, a Lithgow EF88 Austeyr bullpup assault rifle`);
					break;
				case "Austrian":
					w.push(`and, in keeping with ${his} heritage, a Steyr AUG A3 bullpup assault rifle`);
					break;
				case "Belgian":
					w.push(`and, in keeping with ${his} heritage, a FN FNC M2 assault rifle`);
					break;
				case "Brazilian":
					w.push(`and, in keeping with ${his} heritage, an IMBEL IA2 assault rifle`);
					break;
				case "British":
				case "Scottish":
					w.push(`and, in keeping with ${his} heritage, an L85A3 bullpup assault rifle`);
					break;
				case "Canadian":
					w.push(`and, in keeping with ${his} heritage, a Colt Canada MRR assault rifle`);
					break;
				case "Chilean":
					w.push(`and, in keeping with ${his} heritage, a FAMAE ACE 22NC assault rifle`);
					break;
				case "Chinese":
					w.push(`and, in keeping with ${his} heritage, a Norinco QBZ-95-1 bullpup assault rifle`);
					break;
				case "Colombian":
					w.push(`and, in keeping with ${his} heritage, an Indumil ACE 22 assault rifle`);
					break;
				case "Croatian":
					w.push(`and, in keeping with ${his} heritage, an HS Produkt VHS-2 bullpup assault rifle`);
					break;
				case "Cuban":
					w.push(`and, in keeping with ${his} heritage, an AKM assault rifle`);
					break;
				case "Czech":
				case "Slovak":
					w.push(`and, in keeping with ${his} heritage, a CZUB CZ-806 BREN-2 assault rifle`);
					break;
				case "Filipina":
					w.push(`and, in keeping with ${his} heritage, an Elitool M653P carbine`);
					break;
				case "Finnish":
					w.push(`and, in keeping with ${his} heritage, a SAKO Rk 95 TP assault rifle`);
					break;
				case "French":
					w.push(`and, in keeping with ${his} heritage, a Nexter FAMAS G2 bullpup assault rifle`);
					break;
				case "German":
					w.push(`and, in keeping with ${his} heritage, a H&K G36A2 assault rifle`);
					break;
				case "Hungarian":
					w.push(`and, in keeping with ${his} heritage, a FEG AMD-65M assault rifle`);
					break;
				case "Indian":
					w.push(`and, in keeping with ${his} heritage, an OFB MCIWS assault rifle`);
					break;
				case "Indonesian":
					w.push(`and, in keeping with ${his} heritage, a Pindad SS2 assault rifle`);
					break;
				case "Iranian":
					w.push(`and, in keeping with ${his} heritage, a DIO KH-2002 Khaybar bullpup assault rifle`);
					break;
				case "Israeli":
					w.push(`and, in keeping with ${his} heritage, an IWI MTAR-21 bullpup assault rifle`);
					break;
				case "Italian":
					w.push(`and, in keeping with ${his} heritage, a Beretta ARX-160 assault rifle`);
					break;
				case "Japanese":
					w.push(`and, in keeping with ${his} heritage, a Howa Type 89 assault rifle`);
					break;
				case "Korean":
					w.push(`and, in keeping with ${his} heritage, a Daewoo K2C1 assault rifle`);
					break;
				case "Mexican":
					w.push(`and, in keeping with ${his} heritage, a DGIM FX-05 Xiuhcoatl assault rifle`);
					break;
				case "Peruvian":
					w.push(`and, in keeping with ${his} heritage, a SIMA FAD bullpup assault rifle`);
					break;
				case "Polish":
					w.push(`and, in keeping with ${his} heritage, a FB MSBS assault rifle`);
					break;
				case "Romanian":
					w.push(`and, in keeping with ${his} heritage, a ROMARM PA md.86 assault rifle`);
					break;
				case "Russian":
					w.push(`and, in keeping with ${his} heritage, an Izhmash AN-94 Abakan assault rifle`);
					break;
				case "Serbian":
					w.push(`and, in keeping with ${his} heritage, a Zastava M21A assault rifle`);
					break;
				case "South African":
					w.push(`and, in keeping with ${his} heritage, a Vektor R4 assault rifle`);
					break;
				case "Spanish":
					w.push(`and, in keeping with ${his} heritage, a CETME Model C battle rifle`);
					break;
				case "Swedish":
					w.push(`and, in keeping with ${his} heritage, a Bofors Ak-5C assault rifle`);
					break;
				case "Swiss":
					w.push(`and, in keeping with ${his} heritage, a SIG SG 550 assault rifle`);
					break;
				case "Thai":
					w.push(`and, in keeping with ${his} heritage, a MND Type 11 assault rifle`);
					break;
				case "Turkish":
					w.push(`and, in keeping with ${his} heritage, a MKEK MPT-76 assault rifle`);
					break;
				case "Ukrainian":
					w.push(`and, in keeping with ${his} heritage, a Fort-227 assault rifle`);
					break;
				case "Vietnamese":
					w.push(`and, in keeping with ${his} heritage, a Z111 AKM assault rifle`);
					break;
				case "Zimbabwean":
					if (slave.race === "white") {
						w.push(`and, in keeping with ${his} heritage, a FN FAL battle rifle`);
					} else {
						w.push(`and a FN F2000 bullpup assault rifle`);
					}
					break;
				default:
					w.push(`and a FN F2000 bullpup assault rifle`);
			}
			w.push(`slung across ${his} chest.`);
		} else if ((slave.muscles + slave.height - 100) / 25 > 3) {
			w.push(`${He} has a straight ceramic sword strapped to ${his} back`);
			switch (slave.nationality) {
				case "American":
					w.push(`and, in keeping with ${his} heritage, a KRISS Vector SMG`);
					break;
				case "Argentinian":
					w.push(`and, in keeping with ${his} heritage, a Halcon ML-63 SMG`);
					break;
				case "Armenian":
				case "Belarusian":
				case "Kazakh":
				case "Uzbek":
					w.push(`and, in keeping with ${his} heritage, a Kalashnikov AKS-74U PDW`);
					break;
				case "Austrian":
					w.push(`and, in keeping with ${his} heritage, a Steyr AUG A3 Para XS bullpup SMG`);
					break;
				case "Belgian":
					w.push(`and, in keeping with ${his} heritage, a FN P90 bullpup PDW`);
					break;
				case "Brazilian":
					w.push(`and, in keeping with ${his} heritage, a Taurus MT40 G2 SMG`);
					break;
				case "British":
				case "Scottish":
					w.push(`and, in keeping with ${his} heritage, an L91A1 SMG`);
					break;
				case "Chilean":
					w.push(`and, in keeping with ${his} heritage, a FAMAE SAF-200 SMG`);
					break;
				case "Chinese":
					w.push(`and, in keeping with ${his} heritage, a Norinco QCQ-05 SMG`);
					break;
				case "Croatian":
					w.push(`and, in keeping with ${his} heritage, a PM Agram 2000 SMG`);
					break;
				case "Filipina":
					w.push(`and, in keeping with ${his} heritage, a Ferfrans SCW7 PDW`);
					break;
				case "German":
					w.push(`and, in keeping with ${his} heritage, an H&K MP7A1 PDW`);
					break;
				case "Indian":
					w.push(`and, in keeping with ${his} heritage, an OFB MSMC SMG`);
					break;
				case "Indonesian":
					w.push(`and, in keeping with ${his} heritage, a Pindad PM1A1 SMG`);
					break;
				case "Iranian":
					w.push(`and, in keeping with ${his} heritage, a DIO MPT-9 Tondar SMG`);
					break;
				case "Israeli":
					w.push(`and, in keeping with ${his} heritage, an IWI Uzi SMG`);
					break;
				case "Italian":
					w.push(`and, in keeping with ${his} heritage, a Beretta MX4 SMG`);
					break;
				case "Korean":
					w.push(`and, in keeping with ${his} heritage, a Daewoo K1A PDW`);
					break;
				case "Mexican":
					w.push(`and, in keeping with ${his} heritage, a Mendoza Cobra SMG`);
					break;
				case "Polish":
					w.push(`and, in keeping with ${his} heritage, a FB PM-06 Glauberyt SMG`);
					break;
				case "Romanian":
					w.push(`and, in keeping with ${his} heritage, a UM Cugir LP7 SMG`);
					break;
				case "Russian":
					w.push(`and, in keeping with ${his} heritage, a KBP PP-90M1 SMG`);
					break;
				case "Serbian":
					w.push(`and, in keeping with ${his} heritage, a Zastava Master FLG SMG`);
					break;
				case "South African":
					w.push(`and, in keeping with ${his} heritage, a Milkor BXP SMG`);
					break;
				case "Spanish":
					w.push(`and, in keeping with ${his} heritage, a Star Z84 SMG`);
					break;
				case "Swedish":
					w.push(`and, in keeping with ${his} heritage, a Carl Gustav m/45 SMG`);
					break;
				case "Swiss":
					w.push(`and, in keeping with ${his} heritage, a SIG MPX SMG`);
					break;
				case "Turkish":
					w.push(`and, in keeping with ${his} heritage, a Sarsilmaz SAR 109 SMG`);
					break;
				case "Ukrainian":
					w.push(`and, in keeping with ${his} heritage, a Fort-224 bullpup SMG`);
					break;
				case "Vietnamese":
					w.push(`and, in keeping with ${his} heritage, a Z111 K-50M LMG`);
					break;
				case "Zimbabwean":
					if (slave.race === "white") {
						w.push(`and, in keeping with ${his} heritage, a Sterling Mk.IV SMG`);
					} else {
						w.push(`and a H&K MP5 SMG`);
					}
					break;
				default:
					w.push(`and a H&K MP5 SMG`);
			}
			w.push(`slung across ${his} chest.`);
		} else {
			w.push(`${He} has a short ceramic sword strapped to ${his} back`);
			switch (slave.nationality) {
				case "American":
					w.push(`and, in keeping with ${his} heritage, a MAC-10 machine pistol`);
					break;
				case "Armenian":
				case "Belarusian":
				case "Cuban":
				case "Kazakh":
				case "Ukrainian":
				case "Uzbek":
					w.push(`and, in keeping with ${his} heritage, a Molot Ordnance Stechkin APS machine pistol`);
					break;
				case "Austrian":
					w.push(`and, in keeping with ${his} heritage, a Steyr TMP machine pistol`);
					break;
				case "Belgian":
					w.push(`and, in keeping with ${his} heritage, a VBR-Belgium PDW machine pistol`);
					break;
				case "Chinese":
					w.push(`and, in keeping with ${his} heritage, a Chongqing Changfeng CF-05 machine pistol`);
					break;
				case "Czech":
				case "Slovak":
					w.push(`and, in keeping with ${his} heritage, a CZUB CZ 75 Automatic machine pistol`);
					break;
				case "German":
					w.push(`and, in keeping with ${his} heritage, a H&K VP70 machine pistol`);
					break;
				case "Hungarian":
					w.push(`and, in keeping with ${his} heritage, a FEG KGP-9 machine pistol`);
					break;
				case "Israeli":
					w.push(`and, in keeping with ${his} heritage, an IWI Uzi Pro machine pistol`);
					break;
				case "Italian":
					w.push(`and, in keeping with ${his} heritage, a Beretta 93R machine pistol`);
					break;
				case "Japanese":
					w.push(`and, in keeping with ${his} heritage, a Minebea PM-9 machine pistol`);
					break;
				case "Mexican":
					w.push(`and, in keeping with ${his} heritage, a Trejo Modelo 2 Especial machine pistol`);
					break;
				case "Peruvian":
					w.push(`and, in keeping with ${his} heritage, a SIMA MGP-87 machine pistol`);
					break;
				case "Polish":
					w.push(`and, in keeping with ${his} heritage, a WITU PMM machine pistol`);
					break;
				case "Romanian":
					w.push(`and, in keeping with ${his} heritage, a UMS Pistolul md.98 Dracula machine pistol`);
					break;
				case "Russian":
					w.push(`and, in keeping with ${his} heritage, a KBP OTs-33 Pernach machine pistol`);
					break;
				case "Swedish":
					w.push(`and, in keeping with ${his} heritage, a Saab Bofors Dynamics CBJ-MS machine pistol`);
					break;
				case "Swiss":
					w.push(`and, in keeping with ${his} heritage, a B+T MP9 machine pistol`);
					break;
				case "Turkish":
					w.push(`and, in keeping with ${his} heritage, a TiSAS Zigana F machine pistol`);
					break;
				default:
					w.push(`and a Glock 18 machine pistol`);
			}
			w.push(`at ${his} side.`);
		}

		return w.join(" ");
	}
};