code:
App.Events.REArcologyInspection = class REArcologyInspection extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => this.validArcologies().length > 0
		];
	}

	validArcologies() {
		// use any arcology with either trustee or agent government
		return V.arcologies.filter((a) => (a.government === "your trustees") || (a.government === "your agent"));
	}

	actorPrerequisites() {
		return []; // no actor casting for this event
	}

	get weight() {
		return Math.ceil(Math.sqrt(this.validArcologies().length)); // more likely if you control more arcologies
	}

	execute(node) {
		const home = V.arcologies[0];
		const arcology = this.validArcologies().random();
		const agent = (arcology.government === "your agent") ? getSlave(arcology.leaderID) : undefined;
		const {He, him, himself, his, he} = agent ? getPronouns(agent) : getPronouns({pronoun: App.Data.Pronouns.Kind.plural});
		const Master = agent ? getEnunciation(agent).title : (V.PC.title ? "Sir" : "Madam");
		const BG = S.Bodyguard;
		const agentLover = agent ? V.slaves.find(s => (s.ID === agent.relationshipTarget && s.assignment === Job.AGENTPARTNER)) : undefined;

		App.Events.drawEventArt(node, [BG, agent, agentLover].filter(x => !!x));

		let t = [];
		t.push(`Although your primary day-to-day responsibility is to ${home.name}, you are careful not to completely ignore your other interests in the Free City. This week you've decided to pay a surprise visit to ${arcology.name}, which is being governed in your stead by`);
		if (agent) {
			t.push(App.UI.DOM.combineNodes(contextualIntro(V.PC, agent, true), "."));
		} else {
			t.push("a group of trustees you've appointed.");
		}
		t.push(`You can easily monitor ${arcology.name} remotely, but there's nothing like an impromptu personal visit to make sure it's clear you'll hold ${him} accountable.`);
		App.Events.addParagraph(node, t);

		t = [];
		t.push(`Before you go, you ask ${V.assistant.name} about the weather forecast.`);
		if (V.weatherToday.severity <= 1) {
			t.push(`"${V.weatherToday.name}" is pretty pleasant, as things go these days, so you decide to take a walk through the Free City along one of the surface paths to get to your neighbor.`);
		} else {
			t.push(`"${V.weatherToday.name}" is not something you want to be out and about in, so you head down to one of the ${V.terrain !== "oceanic" ? "underground" : "undersea"}, climate-controlled transport tunnels that connect the major buildings of the Free City. You could easily take a transit pod, but today you feel like walking.`);
		}
		if (BG) {
			const {hisBG} = getPronouns(BG).appendSuffix("BG");
			t.push(`As is ${hisBG} habit and duty,`, contextualIntro(V.PC, BG, true), `accompanies you wherever you go, armed to the teeth.`);
		} else {
			t.push(`You feel a bit exposed, so you ask ${V.assistant.name} to loan you a couple of security drones for protection, and make a note that you should probably assign a devoted slave to Bodyguard duty.`);
		}
		App.Events.addParagraph(node, t);

		t = [];
		if (V.weatherToday.severity <= 1) {
			t.push(`You enter ${arcology.name} through the main surface entrance, beneath the reinforced solar panel curtain. A security drone scans you at the door, as it does every unexpected visitor. You can't help but grin as you imagine the effect that your surprise arrival is having on ${agent ? agent.slaveName : "your trustees"}, and stroll into the main atrium.`);
		} else {
			t.push(`You enter ${arcology.name} through the transport tunnel, emerging directly into the main atrium. A security drone scans you as you exit, as it does every unexpected visitor. You can't help but grin as you imagine the effect that your surprise arrival is having on ${agent ? agent.slaveName : "your trustees"}.`);
		}
		App.Events.addParagraph(node, t);

		const dipFSes = FutureSocieties.diplomaticFSes(home, arcology);
		const arcFSes = FutureSocieties.activeFSes(arcology);
		const uniqueFSes = _.difference(arcFSes, dipFSes.shared);
		t = [];
		t.push(`You're sure someone will be down to meet you very shortly, but you take a few moments to watch a few of the large public video screens in the atrium.`);
		if (uniqueFSes.length) {
			t.push(`You pay special attention to the ones that are most different from what you've configured in ${home.name}, like`);
			const diffShows = this.getShows(uniqueFSes, arcology);
			t.push(toSentence(diffShows) + ".");
		}
		if (dipFSes.shared.length) {
			if (!uniqueFSes.length) {
				t.push(`All of the programs running on them are familiar to you, in type if not in specific substance, such as`);
			} else {
				t.push(`Most of the rest seem a lot like what you'd find in ${home.name}, such as`);
			}
			const diffShows = this.getShows(dipFSes.shared, arcology);
			t.push(toSentence(diffShows) + ".");
			if (!uniqueFSes.length) {
				t.push(`${arcology.name}, while different than ${home.name}, still manages to feel a bit like home.`);
			}
		}
		App.Events.addParagraph(node, t);

		t = [];
		t.push(`After a few minutes, ${agent ? agent.slaveName : "a member of your trustee board"} rushes over to you.`);
		if (agent) {
			t.push(Spoken(agent, `"${Master}, it's so good to see you in ${arcology.name}!"`));
			t.push(`${He} embraces you eagerly`);
		} else {
			t.push(`"${Master}, welcome to ${arcology.name}!" He reaches out to shake your hand`);
		}
		if (BG) {
			t.push(`under ${BG.slaveName}'s ever-watchful gaze.`);
		} else {
			t.push(`as one of your security drones hovers nearby.`);
		}
		App.Events.addParagraph(node, t);

		t = [];
		t.push(`You take a brief tour around the arcology, taking notes on things you could learn and giving ${agent ? agent.slaveName : "your trustee representative"} a bit of advice, before winding up in the penthouse suite. It's nowhere near as opulent as yours,`);
		if (!agent) {
			t.push(`and currently doesn't have a permanent occupant,`);
		}
		t.push(`but it's nicely appointed and comfortable. Your gracious host suggests some other things that you could do while you're here, but you know you'll only really have time for one before you head back to ${home.name}.`);
		App.Events.addParagraph(node, t);

		const chosenFS = dipFSes.shared.filter(fs => arcology[fs] < 80).random();
		const refreshment = this.refreshmentInContainer();

		App.Events.addResponses(node, [
			(chosenFS && V.rep > 2000) ? new App.Events.Result(`Help promote ${FutureSocieties.displayName(chosenFS)} progress`, () => promoteFS(chosenFS)) : new App.Events.Result(),
			agent ? new App.Events.Result(`Spend time with ${agent.slaveName}${agentLover ? ` and ${agentLover.slaveName}` : ''}`, fuckAgent, virginityWarning()) : new App.Events.Result(),
			new App.Events.Result(`Discipline some dissidents`, discipline),
			new App.Events.Result(`Visit the ${arcology.name} Club`, club),
			new App.Events.Result(`It's been a long day; just head home`, goHome)
		]);

		/** @param {FC.FutureSociety} fs */
		function promoteFS(fs) {
			t = [];
			t.push(`${arcology.name} and ${home.name} share an interest in promoting ${FutureSocieties.displayName(fs)}, and strengthening it here will help boost trade and diplomatic relations between your arcologies.`);

			const actionMap = new Map([
				["FSSupremacist", `examining fine specimens of ${arcology.FSSupremacistRace} slaves`],
				["FSSubjugationist", `publicly demonstrating the inferiority of ${arcology.FSSubjugationistRace} slaves`],
				["FSIntellectualDependency", `throwing an orgy for bimbos`],
				["FSSlaveProfessionalism", `teaching classes for slave prostitutes`],
				["FSRepopulationFocus", `examining slaves in various states of gravidity`],
				["FSRestart", `meeting with the Social Elite`],
				["FSGenderFundamentalist", `being served by barefoot, submissive slave girls`],
				["FSGenderRadicalist", `fucking some traps and futas`],
				["FSPaternalist", `touring the local clinics and slave schools`],
				["FSDegradationist", `publicly degrading slaves in new and creative ways`],
				["FSBodyPurist", `doing nude yoga`],
				["FSTransformationFetishist", `giving slaveowners advice about what tattoos and piercings might suit their slaves`],
				["FSYouthPreferentialist", `playing volleyball with some cute young girls`],
				["FSMaturityPreferentialist", `playing bridge with some matronly beauties`],
				["FSStatuesqueGlorification", `shooting pornography with very tall slaves`],
				["FSPetiteAdmiration", `shooting pornography with short slaves`],
				["FSSlimnessEnthusiast", `dancing with lithe, graceful partners`],
				["FSAssetExpansionist", `having fun with some busty slaves`],
				["FSPastoralist", `sampling high-quality milk and ice cream`],
				["FSPhysicalIdealist", `playing sports and working out`],
				["FSHedonisticDecadence", `lounging around spas and visiting restaurants`],
				["FSChattelReligionist", `officiating slave religious services`],
				["FSRomanRevivalist", `engaging in Roman discourse and debate`],
				["FSNeoImperialist", `conducting simulated battles with the Imperial Knights`],
				["FSAztecRevivalist", `attending a bloodletting ceremony`],
				["FSEgyptianRevivalist", `reenacting an ancient Egyptian ceremony`],
				["FSEdoRevivalist", `attending a kabuki theater performance`],
				["FSArabianRevivalist", `training citizens' harem slaves`],
				["FSChineseRevivalist", `reviewing the administrative bureaucracy`],
				["FSNull", `attending a multicultural festival`],
			]);
			t.push(`You and ${agent ? agent.slaveName : "your trustee representative"} spend the rest of the day ${actionMap.get(fs)}, making sure that the news cameras are rolling.`);
			if (V.rep > 12000) {
				t.push(`Your impressive reputation draws extra attention, and ${arcology.name} reaps the benefits.`);
			} else if (V.rep > 6000) {
				t.push(`Your modest reputation draws some attention, and ${arcology.name} benefits.`);
			} else {
				t.push(`Your poor reputation can only help ${arcology.name} so much, though.`);
			}
			// @ts-ignore - we know that it's already adopted
			arcology[fs] += Math.trunc(V.rep / 1000);
			return t;
		}

		function fuckAgent() {
			const frag = document.createDocumentFragment();

			t = [];
			t.push(`${agent.slaveName} takes your hand and leads you${agentLover ? ` and ${contextualIntro(agent, agentLover)}` : ``} into ${his} bedroom. ${He} might be the leader of an entire arcology now, but ${he}'s still got ${his} instincts as a sex slave, and ${he} knew exactly what you meant when you said you wanted to spend some time with ${him}.`);
			App.Events.addParagraph(frag, t);

			t = [];
			if (agentLover) {
				// Threesome
				const {his2, himself2} = getPronouns(agentLover).appendSuffix('2');
				t.push(`${agent.slaveName} and ${agentLover.slaveName} start by undressing themselves and you, teasing you all the while.`);
				if (agent.fetish === "submissive") {
					t.push(`Impatient, you show ${agent.slaveName} ${his} place by pushing ${him} back onto ${his} bed and mounting ${him}. You and ${agentLover.slaveName} take turns dominating the confirmed sub as ${he} screams in pleasure.`);
					if (agent.vagina >= 0) {
						t.push(VCheck.Vaginal(agent, 2));
						seX(agent, "vaginal", agentLover, "penetrative", 2);
					} else {
						t.push(VCheck.Anal(agent, 2));
						seX(agent, "anal", agentLover, "penetrative", 2);
					}
				} else if (agent.fetish === "cumslut") {
					if (V.PC.dick > 0) {
						t.push(`Impatient, you push ${agent.slaveName} and ${agentLover.slaveName} down to their knees and have them give you a double blowjob. Always the cumslut, ${agent.slaveName} eagerly sucks and licks your cock, and ${agentLover.slaveName} is more than happy to help.`);
						seX(agent, "oral", V.PC, "penetrative");
						seX(agentLover, "oral", V.PC, "penetrative");
					} else {
						t.push(`Impatient, you push ${agent.slaveName} and ${agentLover.slaveName} down to their knees and have them lick your pussy. Double cunnilingus is always a treat, and ${agent.slaveName} almost reaches orgasm ${himself} the first time you spill your girlcum over ${his} face.`);
						seX(agent, "oral", V.PC, "vaginal");
						seX(agentLover, "oral", V.PC, "vaginal");
					}
				} else if (agent.fetish === "humiliation") {
					t.push(`Impatient, you order ${agent.slaveName} to dance for you while you fuck ${agentLover.slaveName}, which ${he}'s very happy to do, especially once you toggle the penthouse windows to transparent.`);
					if (canDoVaginal(agentLover)) {
						t.push(VCheck.Vaginal(agentLover));
					} else {
						t.push(VCheck.Anal(agentLover));
					}
				} else if (agent.fetish === "buttslut") {
					t.push(`Impatient, you order ${agentLover.slaveName} to lie back on the bed while you bend ${agent.slaveName} over the end of it, pushing ${his} head into ${his2} crotch as you start out the evening by fucking ${his} ass.`);
					t.push(VCheck.Anal(agent));
					if (canPenetrate(agentLover)) {
						seX(agent, "oral", agentLover, "penetrative");
					} else if (canDoVaginal(agentLover)) {
						seX(agent, "oral", agentLover, "vaginal");
					} else if (agentLover.clit > 1 || agentLover.dick > 0) {
						seX(agent, "oral", agentLover, "penetrative");
					}
				} else if (agent.fetish === "boobs") {
					if (agent.nipples === "fuckable" && V.PC.dick > 0) {
						t.push(`Impatient, you push ${agent.slaveName} back on ${his} bed and kneel over ${him}, sliding your hard cock into ${his} soft breast as ${agentLover.slaveName} begins to eat out ${his} other nipple.`);
						seX(agent, "mammary", V.PC, "penetrative");
						seX(agent, "mammary", agentLover, "oral");
					} else if (agent.boobs >= 400 && V.PC.dick > 0) {
						t.push(`Impatient, you push ${agent.slaveName} back on ${his} bed and kneel over ${him}, sliding your hard cock between ${his} soft breasts as ${agentLover.slaveName} plants kisses all over your joined bodies.`);
						seX(agent, "mammary", V.PC, "penetrative");
					} else if (V.PC.boobs >= 300) {
						t.push(`Partway through undressing you, though, ${agent.slaveName} finds ${himself} terribly distracted by your breasts, and begins fondling and kissing them, leaving ${agentLover.slaveName} to finish undressing everyone ${himself2}. It's the start of a great evening.`);
						SimpleSexAct.Player(agent);
						SimpleSexAct.Player(agentLover);
						SimpleSexAct.Slaves(agentLover, agent);
					} else {
						t.push(`Partway through the shedding of clothing, though, ${agent.slaveName} finds ${himself} terribly distracted by all the exposed chests, and begins groping and kissing them, leaving ${agentLover.slaveName} to finish undressing everyone ${himself2}. It's the start of a great evening.`);
						SimpleSexAct.Player(agent);
						SimpleSexAct.Player(agentLover);
						SimpleSexAct.Slaves(agentLover, agent);
					}
				} else if (agent.fetish === "pregnancy") {
					if (V.PC.dick > 0 && (agent.vagina >= 0 || agent.mpreg === 1)) {
						t.push(`Impatient, you push ${agent.slaveName} back on the bed and slide into ${his} ${agent.mpreg === 1 ? "eager rear" : "wet pussy"}. ${He} begs you to put a baby in ${him}, and over the course of the evening you fill ${him} up several times, with ${agentLover.slaveName} "helping."`);
						if (canImpreg(agent, V.PC)) {
							t.push(knockMeUp(agent, 25, 2, V.PC.ID));
						} else {
							t.push(`Both of you know, of course, that you can't actually get ${him} pregnant, but the fantasy is fun anyway.`);
						}
						if (agent.mpreg === 1) {
							t.push(VCheck.Anal(agent, 4));
						} else {
							t.push(VCheck.Vaginal(agent, 4));
						}
					} else if (canPenetrate(agent) && V.PC.vagina > 0) {
						t.push(`Impatient, you push ${agent.slaveName} back on the bed and slide ${his} dick into your wet pussy. ${He} begs you to let ${him} put a baby in you${V.PC.bellyPreg >= 1500 ? `, even as ${he} eagerly paws at your current pregnancy` : ""}, and over the course of the evening ${he} fills you up several times, with ${agentLover.slaveName} "helping."`);
						if (canImpreg(V.PC, agent)) {
							t.push(knockMeUp(V.PC, 25, 2, agent.ID));
						} else {
							t.push(`All three of you know, of course, that ${he} can't actually get you pregnant, but the fantasy is fun anyway.`);
						}
						seX(V.PC, "vaginal", agent, "penetrative", 4);
					} else if (V.PC.pregKnown === 1) {
						t.push(`Partway through undressing you, though, ${agent.slaveName} finds ${himself} terribly distracted by the bun${V.PC.pregType > 1 ? "s" : ""} in your oven, and begins fondling and kissing your gravid swell, leaving ${agentLover.slaveName} to finish undressing everyone ${himself2}. It's the start of a great evening.`);
						SimpleSexAct.Player(agent);
						SimpleSexAct.Player(agentLover);
						SimpleSexAct.Slaves(agentLover, agent);
					} else {
						t.push(`${agent.slaveName} steps out for the briefest of moments, only to return with`);
						if (agent.belly < 2000 || agentLover.belly < 2000) {
							t.push(`several large fake pregnant bellies for everyone to wear.`);
						} else {
							t.push(`a rather enormous fake pregnant belly for you to wear to bed.`);
						}
						t.push(`It's the start of a great, if a little awkward, evening.`);
						SimpleSexAct.Player(agent);
						SimpleSexAct.Player(agentLover);
						SimpleSexAct.Slaves(agentLover, agent);
					}
				} else if (agent.fetish === "dom") {
					t.push(`${agent.slaveName} quickly runs out of patience, though, and pushes you back on ${his} bed and`);
					if (V.PC.dick > 0) {
						t.push(`slides onto your hard dick.`);
						if (agent.vagina >= 0) {
							t.push(VCheck.Vaginal(agent));
						} else {
							t.push(VCheck.Anal(agent));
						}
					} else if (canPenetrate(agent) && (V.PC.vagina > 0 || V.PC.anus > 0)) {
						t.push(`mounts you.`);
						if (V.PC.vagina > 0) {
							seX(V.PC, "vaginal", agent, "penetrative");
						} else {
							seX(V.PC, "anal", agent, "penetrative");
						}
					} else if (agent.vagina >= 0) {
						t.push(`sits on your face; of course, getting you to eat ${him} out won't be so easy.`);
						SimpleSexAct.Player(agent);
					} else if (agent.dick > 0) {
						t.push(`sticks ${his} dick in your face; of course, getting you to suck ${him} off won't be so easy.`);
						SimpleSexAct.Player(agent);
					} else {
						t.push(`slides ${his} tongue into your mouth.`);
					}
					t.push(`${He} and you struggle playfully for dominance throughout the evening, both using a willing ${agentLover.slaveName} for your pleasure.`);
					SimpleSexAct.Player(agentLover, 2);
					SimpleSexAct.Slaves(agentLover, agent, 2);
				} else if (agent.fetish === "sadist") {
					t.push(`${agent.slaveName} runs out of patience before long, though, forcefully pushing you back onto ${his} bed. ${agentLover.slaveName} quickly slides between you, taking a hard slap that ${agent.slaveName} unthinkingly directed at you. Rather than taking offense, you join in the fun and help ${him} abuse ${agentLover.slaveName}.`);
					SimpleSexAct.Player(agentLover, 2);
					SimpleSexAct.Slaves(agentLover, agent, 2);
				} else if (agent.fetish === "masochist") {
					t.push(`Impatient, and knowing how much ${agent.slaveName} likes to be manhandled, you throw ${him} back onto ${his} bed, and you and ${agentLover.slaveName} use ${him} brutally.`);
					SimpleSexAct.Player(agent, 2);
					SimpleSexAct.Slaves(agent, agentLover, 2);
				} else {
					t.push(`Impatient, you pull them onto ${agent.slaveName}'s oversized bed. You take ${agent.slaveName} first, but give ${agentLover.slaveName} ${his2} fair share of loving too.`);
					SimpleSexAct.Player(agent);
					SimpleSexAct.Player(agentLover);
					SimpleSexAct.Slaves(agentLover, agent);
				}
				t.push(`After a couple hours of playtime, the three of you collapse, exhausted, into a satisfied pile.`);
			} else {
				// Agent alone
				t.push(`${agent.slaveName} starts by undressing ${himself} and you, teasing you all the while.`);
				if (agent.fetish === "submissive") {
					t.push(`Impatient, you show ${him} ${his} place by pushing ${him} back onto ${his} bed and mounting ${him}. You know ${his} submissive tendencies and leverage them to your mutual pleasure.`);
					if (agent.vagina >= 0) {
						t.push(VCheck.Vaginal(agent, 3));
					} else {
						t.push(VCheck.Anal(agent, 3));
					}
				} else if (agent.fetish === "cumslut") {
					if (V.PC.dick > 0) {
						t.push(`Impatient, you push ${him} down to ${his} knees and have ${him} give you a blowjob. Always the cumslut, ${agent.slaveName} eagerly sucks and licks your cock.`);
						seX(agent, "oral", V.PC, "penetrative");
					} else {
						t.push(`Impatient, you push ${him} down to ${his} knees and have ${him} lick your pussy. Cunnilingus is always a treat, and ${agent.slaveName} almost reaches orgasm ${himself} the first time you spill your girlcum over ${his} face.`);
						seX(agent, "oral", V.PC, "vaginal");
					}
				} else if (agent.fetish === "humiliation") {
					t.push(`You toggle the penthouse windows to transparent and repeatedly fuck the exhibitionist ${agent.slaveName} in full view of all ${his} slaves and citizens.`);
					if (canDoVaginal(agent)) {
						t.push(VCheck.Vaginal(agent));
					} else {
						t.push(VCheck.Anal(agent));
					}
				} else if (agent.fetish === "buttslut") {
					t.push(`Impatient, you bend ${him} over the end of the bed and start by sliding ${V.PC.dick > 0 ? "your hard cock" : `a strapon you found in ${his} nightstand`} into ${his} ass.`);
					t.push(VCheck.Anal(agent, 2));
				} else if (agent.fetish === "boobs") {
					if (agent.nipples === "fuckable" && V.PC.dick > 0) {
						t.push(`Impatient, you push ${him} back on ${his} bed and kneel over ${him}, sliding your hard cock into ${his} soft breast, making good use of ${his} fuckable nipple.`);
						seX(agent, "mammary", V.PC, "penetrative", 2);
					} else if (agent.boobs >= 400 && V.PC.dick > 0) {
						t.push(`Impatient, you push ${him} back on ${his} bed and kneel over ${him}, sliding your hard cock between ${his} soft breasts.`);
						seX(agent, "mammary", V.PC, "penetrative", 2);
					} else if (V.PC.boobs >= 300) {
						t.push(`Partway through the process, though, ${he} finds ${himself} terribly distracted by your breasts, and begins fondling and kissing them. It's the start of a great evening.`);
						SimpleSexAct.Player(agent, 2);
					} else {
						t.push(`${He} steps out for the briefest of moments, only to return with two pairs of gigantic fake tits for you both to wear. It's the start of a great, rather bouncy, evening`);
						SimpleSexAct.Player(agent, 2);
					}
				} else if (agent.fetish === "pregnancy") {
					if (V.PC.dick > 0 && (agent.vagina >= 0 || agent.mpreg === 1)) {
						t.push(`Impatient, you push ${him} back on the bed and slide into ${his} wet pussy. ${He} begs you to put a baby in ${him}, and over the course of the evening you fill ${him} up several times.`);
						if (canImpreg(agent, V.PC)) {
							t.push(knockMeUp(agent, 25, 2, V.PC.ID));
						} else {
							t.push(`Both of you know, of course, that you can't actually get ${him} pregnant, but the fantasy is fun anyway.`);
						}
						if (agent.mpreg === 1) {
							t.push(VCheck.Anal(agent, 4));
						} else {
							t.push(VCheck.Vaginal(agent, 4));
						}
					} else if (canPenetrate(agent) && V.PC.vagina > 0) {
						t.push(`Impatient, you push ${him} back on the bed and slide ${his} dick into your wet pussy. ${He} begs you to let ${him} put a baby in you, and over the course of the evening ${he} fills you up several times.`);
						if (canImpreg(V.PC, agent)) {
							t.push(knockMeUp(V.PC, 25, 0, agent.ID));
						} else {
							t.push(`Both of you know, of course, that ${he} can't actually get you pregnant, but the fantasy is fun anyway.`);
						}
						seX(V.PC, "vaginal", agent, "penetrative", 4);
					} else if (V.PC.pregKnown === 1) {
						t.push(`Partway through the process, though, ${he} finds ${himself} terribly distracted by the bun${V.PC.pregType > 1 ? "s" : ""} in your oven, and begins fondling and kissing your gravid swell. It's the start of a great evening.`);
						SimpleSexAct.Player(agent, 2);
					} else {
						t.push(`${He} steps out for the briefest of moments, only to return with`);
						if (agent.belly < 2000) {
							t.push(`a pair of big fake pregnant bellies for the two of you to wear.`);
						} else {
							t.push(`a completely ridiculous oversized pregnant belly for you to wear.`);
						}
						t.push(`It's the start of a great, if a little awkward, evening.`);
						SimpleSexAct.Player(agent, 2);
					}
				} else if (agent.fetish === "dom") {
					t.push(`${He} quickly runs out of patience, though, and pushes you back on ${his} bed`);
					if (V.PC.dick > 0) {
						t.push(`slides onto your hard dick.`);
						if (agent.vagina >= 0) {
							t.push(VCheck.Vaginal(agent, 2));
						} else {
							t.push(VCheck.Anal(agent, 2));
						}
					} else if (canPenetrate(agent) && (V.PC.vagina > 0 || V.PC.anus > 0)) {
						t.push(`mounts you.`);
						if (V.PC.vagina > 0) {
							seX(V.PC, "vaginal", agent, "penetrative");
						} else {
							seX(V.PC, "anal", agent, "penetrative");
						}
					} else if (agent.vagina >= 0) {
						t.push(`sits on your face; of course, getting you to eat ${him} out won't be so easy.`);
						SimpleSexAct.Player(agent, 2);
					} else if (agent.dick > 0) {
						t.push(`sticks ${his} dick in your face; of course, getting you to suck ${him} off won't be so easy.`);
						SimpleSexAct.Player(agent, 2);
					} else {
						t.push(`slides ${his} tongue into your mouth.`);
						SimpleSexAct.Player(agent, 2);
					}
					t.push(`${He} and you struggle playfully for dominance throughout the evening, and you know you've made a great choice for administering ${arcology.name}.`);
				} else if (agent.fetish === "sadist") {
					t.push(`${He} runs out of patience before long, though, forcefully pushing you back onto ${his} bed. ${He} raises ${his} hand as if to strike you, before ${he} realizes what ${he}'s doing. ${He} makes it a point to temper ${his} sadistic tendencies for the evening.`);
					SimpleSexAct.Player(agent, 2);
				} else if (agent.fetish === "masochist") {
					t.push(`Impatient, and knowing how much ${he} likes to be manhandled, you throw ${him} back onto his bed and use him brutally.`);
					SimpleSexAct.Player(agent, 2);
				} else {
					t.push(`Impatient, you pull ${him} onto ${his} bed and show ${him} how much you've missed having ${him} easily accessible in ${home.name}.`);
					SimpleSexAct.Player(agent, 2);
				}
				t.push(`After a couple hours of playtime, both of you collapse, exhausted, with ${agent.slaveName} affectionately wrapped around your side.`);
			}
			t.push(`You rest for an hour or so before heading back to ${home.name} with ${BG ? BG.slaveName : "your drone escort"}.`);
			App.Events.addParagraph(frag, t);

			return frag;
		}

		function virginityWarning() {
			const virgins = [];
			if (agent && (agent.vagina === 0 || agent.anus === 0)) {
				virgins.push(agent.slaveName);
			}
			if (agentLover && (agentLover.vagina === 0 || agentLover.anus === 0)) {
				virgins.push(agentLover.slaveName);
			}
			if (virgins.length > 0) {
				return `This option may take ${toSentence(virgins)}'s virginity.`;
			}
			return null;
		}

		function discipline() {
			t = [];
			t.push(`Every arcology has its share of dissidents; it's one of the inevitable results of the semi-anarchic nature of the Free Cities. You have an opportunity to build your own <span class="reputation inc">reputation</span> and also help secure ${agent ? `${agent.slaveName}'s` : `your indirect`} <span class="darkviolet">authority</span> over ${arcology.name}, and it would be a shame to let it pass unheeded. You spend the rest of the day helping pass judgement, and even administer a few whippings and assfuckings yourself, just for good measure.`);
			repX(100, "event");
			if (V.secExpEnabled) {
				App.SecExp.authorityX(250);
			}
			return t;
		}

		function club() {
			t = [];
			t.push(`Although you have no shortage of sex slaves willing to service you in ${home.name}, you've come all the way out to ${arcology.name} and visiting the club sounds like a great idea.`);
			if (agent) {
				t.push(agent.slaveName);
				if (agentLover) {
					t.push(`and ${agentLover.slaveName}`);
				}
				t.push(`accompany you, which you appreciate since you rarely see them in ${home.name}.`);
			}
			const {slave: DJ} = generateMarketSlave("neighbor", V.arcologies.findIndex(a => a.direction === arcology.direction));
			const {heDJ, hisDJ} = getPronouns(DJ).appendSuffix("DJ");
			t.push(`The DJ, a talented ${V.seeRace ? DJ.race : ``} dancer with ${App.Desc.eyesColor(DJ)} who looks about ${num(DJ.visualAge)}, starts up a hopping groove, and you enjoy dancing for a little while before ${heDJ} comes over and asks you to use ${hisDJ} body. Your ensuing public display of vigor <span class="reputation inc">boosts your reputation</span> among the clubgoers.`);
			repX(150, "event");
			actX(V.PC, "penetrative");
			return t;
		}

		function goHome() {
			t = [];
			t.push(`After a long day at ${arcology.name}, you`);
			if (BG) {
				t.push(`and ${BG.slaveName}`);
			}
			t.push(`head home to ${home.name} and your waiting stable of sex slaves. You're looking forward to a nice ${refreshment} and some oral sex to round out the evening.`);
			return t;
		}
	}

	/** Get vidscreen shows based on a list of FSes
	 * @param {FC.FutureSociety[]} fses
	 * @param {FC.ArcologyState} arc
	 * @returns {string[]} shows
	 */
	getShows(fses, arc) {
		/** @type {Map<FC.FutureSociety, string>} */
		const showMap = new Map([
			["FSSupremacist", `talk shows supporting ${arc.FSSupremacistRace} supremacy`],
			["FSSubjugationist", `pseudoscientific programs explaining ${arc.FSSubjugationistRace} inferiority`],
			["FSIntellectualDependency", `simple, sexual programs made for slow slaves`],
			["FSSlaveProfessionalism", `self-improvement shows for professional slaves`],
			["FSRepopulationFocus", `medical programs about pregnancy`],
			["FSRestart", `propaganda urging free citizens to join the Societal Elite`],
			["FSGenderFundamentalist", `pornography starring perfectly feminine girls`],
			["FSGenderRadicalist", `pornography starring girls with dicks`],
			["FSPaternalist", `educational programs for the edification of slaves`],
			["FSDegradationist", `violent, nonconsensual pornography`],
			["FSBodyPurist", `sports programs featuring fit, healthy slaves`],
			["FSTransformationFetishist", `medical programs about surgical transformation`],
			["FSYouthPreferentialist", `pornography with young-looking slaves`],
			["FSMaturityPreferentialist", `MILF pornography`],
			["FSStatuesqueGlorification", `pornography starring very tall slaves`],
			["FSPetiteAdmiration", `infomercials for products targeted at short slaves`],
			["FSSlimnessEnthusiast", `programs featuring slim, lithe slaves`],
			["FSAssetExpansionist", `pornography starring slaves with huge assets`],
			["FSPastoralist", `advertisements for dairy products`],
			["FSPhysicalIdealist", `athletic competitions`],
			["FSHedonisticDecadence", `advertisements for spas and gourmet restaurants`],
			["FSChattelReligionist", `religious services for slaves`],
			["FSRomanRevivalist", `state media announcements and readings of Latin poetry`],
			["FSNeoImperialist", `propaganda featuring the Imperial Knights`],
			["FSAztecRevivalist", `shows glorifying the Five Suns and human sacrifice`],
			["FSEgyptianRevivalist", `scientific and cultural programs often featuring cats`],
			["FSEdoRevivalist", `historical dramas set in Edo Japan`],
			["FSArabianRevivalist", `dramatic retellings of traditional Bedouin fables`],
			["FSChineseRevivalist", `ancient Chinese operas`],
			["FSNull", `documentaries from cultures around the world`],
			// NPC FSes too
			["FSIncestFetishist", `pornography featuring closely-related actors`],
			["FSCummunism", `body-building programs featuring ripped slaves with giant packages`],
		]);
		return fses.map(fs => showMap.get(fs)).filter(show => !!show);
	}

	refreshmentInContainer() {
		if (V.PC.refreshmentType === 0) {
			return V.PC.refreshment;
		} else if (V.PC.refreshmentType === 1) {
			return `glass of ${V.PC.refreshment}`;
		} else if (V.PC.refreshmentType === 2) {
			return `plate of ${V.PC.refreshment}`;
		} else if (V.PC.refreshmentType === 3) {
			return `pouch of ${V.PC.refreshment}`;
		} else if (V.PC.refreshmentType === 4) {
			return `syringe of ${V.PC.refreshment}`;
		} else if (V.PC.refreshmentType === 5) {
			return `bottle of ${V.PC.refreshment}`;
		} else if (V.PC.refreshmentType === 6) {
			return `sheet of ${V.PC.refreshment}`;
		}
	}
};


code:
App.Events.REBoomerang = class REBoomerang extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => !!V.boomerangSlave,
			() => V.boomerangWeeks > 5
		];
	}

	actorPrerequisites() {
		return [];
	}

	get weight() {
		return Math.trunc(V.boomerangWeeks / 5);
	}

	execute(node) {
		V.encyclopedia = "Enslaving People";

		if (V.boomerangSlave === 0 || V.boomerangBuyer === 0) { // purely for typing
			return node;
		}
		const slave = V.boomerangSlave;
		const weeks = V.boomerangWeeks - 1;
		const pregWeeks = V.boomerangWeeks - 1;
		V.boomerangWeeks = 0;
		const buyer = V.boomerangBuyer;
		V.boomerangBuyer = 0;

		SetBellySize(slave);
		let r = [];
		const {
			He, His,
			he, his, him, himself, girl
		} = getPronouns(slave);
		const {say} = getEnunciation(slave);

		const {
			HeA,
			heA
		} = getPronouns(assistant.pronouns().main).appendSuffix("A");

		const {himU, girlU} = getNonlocalPronouns(V.seeDicks).appendSuffix("U");

		r.push(`Your work is interrupted by ${V.assistant.name} with an alert from the entrance to the penthouse.`);
		if (V.assistant) {
			r.push(Spoken(slave, `"${properTitle()}," ${heA} says, "you're going to want to see this."`));
		} else {
			r.push(`${HeA}'s got the incident flagged as not fitting into any of the usual categories of disturbance, and requests your attention.`);
		}
		r.push(`${HeA} brings up the relevant feeds. There's a naked body crumpled pathetically against one wall of the entryway, beneath the communications panel. It's ${SlaveFullName(slave)}, whom you sold ${weeks} weeks ago. ${He}'s looking up into one of the cameras plaintively.`);
		r.push(Spoken(slave, `"Please take me back,"`));
		r.push(`${he} whispers, not wanting to draw the attention of passersby, and knowing that ${his} faint words will be picked up and amplified for you.`);

		slave.collar = "none";
		slave.faceAccessory = "none";
		slave.mouthAccessory = "none";
		slave.choosesOwnClothes = 0;
		slave.clothes = "no clothing";
		slave.buttplug = "none";
		slave.vaginalAccessory = "none";
		slave.dickAccessory = "none";
		slave.chastityAnus = 0;
		slave.chastityPenis = 0;
		slave.chastityVagina = 0;
		setHealth(slave, jsRandom(-40, -25), slave.health.shortDamage + jsRandom(0, 10), slave.health.longDamage + jsRandom(0, 10), undefined, 100);

		/* ------------------ pregnancy setup start here----------------- */

		WombProgress(slave, pregWeeks, pregWeeks);/* In all cases should be done */
		WombUpdatePregVars(slave);
		if (slave.broodmother > 0) { /* Broodmother implant is assumed as removed.*/
			slave.preg = -1;
			slave.counter.birthsTotal += WombBirthReady(slave, 37);
			slave.broodmother = 0;
			slave.broodmotherFetuses = 0;
			WombFlush(slave);
		} else if (WombBirthReady(slave, slave.pregData.normalBirth) > 0) { /* normal birth case, partial birthers not supported*/
			slave.preg = -1;
			slave.counter.birthsTotal += WombBirthReady(slave, slave.pregData.normalBirth);
			WombFlush(slave);
		} else { /* still pregnant slave */
			slave.preg = WombMaxPreg(slave);/* most ready fetus is a base*/
			slave.pregWeek = WombMaxPreg(slave);/* most ready fetus is a base*/
		}
		SetBellySize(slave);/* In any case it's useful to do.*/

		/* ------------------ pregnancy setup end here-----------------
			r.push(`As no broodmother cases in code below, it's no need to setup every case of impregnation through new system. Backup mechanic will do it for normal pregnancies.`);
		*/

		if (slave.hStyle !== "shaved" && slave.bald !== 1) {
			if (slave.hLength < 150) {
				slave.hLength += weeks;
			}
		}
		ageSlaveWeeks(slave, weeks);

		switch (buyer) {
			case "buttbreaker":
				r.push(Spoken(slave, `"All my Master cares about is raping my ass until I scream. I can't get used to it. I'm loose and ruined, but he just uses a dildo big enough to hurt me."`));
				r.push(`${He}'s sitting over on one buttock, and shifts uncomfortably.`);
				slave.anus = 4;
				slave.sexualFlaw = "hates anal";
				break;
			case "cow trainer":
			case "D hucow":
			case "D milky herm":
			case "factory farm":
			case "free range":
			case "pastoralist arcology":
				switch (buyer) {
					case "free range":
						r.push(Spoken(slave, `"The nice free range dairy you sold me to failed, and a horrible factory farm bought everyone. It's horrible."`));
						r.push(`The`);
						break;
					case "pastoralist arcology":
						r.push(Spoken(slave, `"After they finished showing me off, they just hooked me up to a milking machine and forgot about me."`));
						r.push(`You sold ${him} to a Pastoralist arcology as a prize heifer; it's nothing short of incredible that ${he} managed to get back here. ${He} must have sold and traded ${himself} without hesitation. The`);
						break;
					case "D hucow":
						r.push(Spoken(slave, `"My new owner got bored of me as a human cow, and he was in debt, so he resold me to a dairy. A horrible dairy."`));
						r.push(`The`);
						break;
					case "cow trainer":
						r.push(Spoken(slave, `"Once the trainer was satisfied with my tits, he resold me to a dairy. A horrible dairy."`));
						r.push(`The`);
						break;
					case "D milky herm":
						r.push(Spoken(slave, `"I got resold me to a dairy. A horrible dairy. They said I'm valuable because I give two kinds of milk."`));
						r.push(`The`);
						break;
					default:
						r.push(`You sold ${him} to a factory farm, and the`);
				}
				r.push(`effects of living there have changed ${his} body greatly. It's surprising ${he} managed to make it up here at all.`);
				r.push(Spoken(slave, `"Please,"`));
				r.push(`${he} begs.`);
				r.push(Spoken(slave, `"I d-don't want to spend the r-rest of my life being raped by a machine."`));
				if (hasAnyNaturalLegs(slave)) {
					r.push(`${He} shifts uncomfortably on ${his}`);
					if (!hasBothLegs(slave)) {
						r.push(`foot.`);
					} else {
						r.push(`feet.`);
					}
					r.push(`The soles of the feet are a convenient place to beat a whore, since it's agonizingly painful, doesn't bruise badly, and won't inconvenience a slave that spends all ${his} time kneeling or lying down.`);
				}
				slave.anus = 4;
				slave.lactation = 2;
				slave.lactationDuration = 2;
				slave.lactationAdaptation = 100;
				slave.boobs = Math.clamp(slave.boobs + 2000 + 50 * random(-20, 20), 0, 10000);
				slave.boobShape = "saggy";
				if (V.seePreg !== 0) {
					if (slave.ovaries) {
						slave.preg = random(5, pregWeeks - 1);
						slave.pregType = random(2, 4);
						slave.vagina = 4;
						slave.pregWeek = slave.preg;
						slave.pregKnown = 1;
						SetBellySize(slave);
					}
				}
				if (slave.balls) {
					slave.balls = Math.clamp(slave.balls + random(1, 2), 0, 10);
					if (slave.dick) {
						slave.dick = Math.clamp(slave.dick + random(1, 2), 0, 10);
					}
				}
				slave.intelligence = Math.clamp(slave.intelligence - 50, -100, 100);
				break;
			case "preg fetishist":
			case "volume breeder":
				switch (buyer) {
					case "preg fetishist":
						r.push(Spoken(slave, `"My nice Master had a d-debt. And he had to sell me t-to a volume breeder. I was pregnant when I got there b-but they s-started o-over."`));
						r.push(`${He} swallows.`);
						break;
					default:
						r.push(`${He} tearfully describes life at a volume breeder like the one you sold ${him} to.`);
				}

				r.push(Spoken(slave, `"They ran an IV line into me and then put me in a cage with a male slave who raped me for a week. Then they switched me into a smaller cage and forgot about me. I can feel my belly swelling. It's horrible."`));
				slave.preg = pregWeeks - 1;
				slave.vagina = 4;
				slave.pregWeek = slave.preg;
				slave.pregKnown = 1;
				if (V.seeHyperPreg === 1) {
					slave.pregType = random(10, 40);
				} else {
					slave.pregType = 5;
				}
				SetBellySize(slave);
				break;
			case "porn studio":
				r.push(Spoken(slave, `"They're crazy. At first it was all the same, just make more smut and reap the attention, but soon they started wanting me to do more and more extreme shit."`));
				r.push(`${He} gags at the thought.`);
				r.push(Spoken(slave, `"While they were running a train on me, I`));
				if (canHear(slave)) {
					r.push(Spoken(slave, `overheard them talking`));
				} else if (canSee(slave)) {
					r.push(Spoken(slave, `caught a glimpse of some memo between the bosses`));
				} else {
					r.push(Spoken(slave, `felt the words one of them wrote on my skin`));
				}
				r.push(Spoken(slave, `... saying they wanted to end my career in an 'unforgettable experience', and given what they'd been having me do, I ran."`));
				r.push(`You suspected the porn studio you sold ${him} to would try to spice up ${his} content to attract more views, but you never bothered to think of how far they would take it.`);
				slave.anus = 4;
				if (slave.vagina > -1 && slave.vagina < 4) {
					slave.vagina = 4;
				}
				actX(slave, "publicUse", 500);
				break;
			case "obsessed fan":
				r.push(Spoken(slave, `"It was really nice, at first,"`));
				r.push(`${he} sniffles,`);
				r.push(Spoken(slave, `"and I'm a little sad it had to end the way it d-did."`));
				r.push(`You sold ${him} to a die-hard fan who offered up a rather large sum of money for ownership of ${him}.`);
				r.push(Spoken(slave, `"He took out too big of a loan and when they came to collect, he let me loose and told me to run, run far away. I d-didn't know where else to g-go."`));
				r.push(`${He} breaks down in tears.`);
				if (V.seePreg !== 0 && canGetPregnant(slave)) {
					r.push(Spoken(slave, `"In the short time we spent together, he left me a gift..."`));
					r.push(`${He} runs a hand across ${his} stomach.`);
					r.push(Spoken(slave, `"While I wouldn't say I was in love with him, I feel like I have to keep them safe for what he did. I can't even think of where I'd have ended up if they had taken me."`));
					if (slave.mpreg === 1 && slave.anus === 0) {
						slave.anus = 1;
					} else if (slave.ovaries === 1 && slave.vagina === 0) {
						slave.vagina = 1;
					}
					slave.preg = random(5, pregWeeks - 1);
					slave.pregType = random(2, 4);
					slave.pregWeek = slave.preg;
					slave.pregKnown = 1;
					slave.pregSource = -2;
					SetBellySize(slave);
				}
				break;
			case "pain fetishist":
				r.push(Spoken(slave, `"They whip me. A-actually,"`));
				r.push(`${he} sniffles,`);
				r.push(Spoken(slave, `"I'm glad when they whip me b-because e-everything else they d-do is w-worse. The only break I get i-is when I'm hurt bad and th-they have to f-fix me."`));
				r.push(`After all, you did sell ${him} into a life as a pain slave.`);
				slave.behavioralFlaw = "odd";
				slave.sexualFlaw = "apathetic";
				setHealth(slave, jsRandom(-50, -30), slave.health.shortDamage + normalRandInt(20, 4), slave.health.longDamage + normalRandInt(15, 3), undefined, 100);
				break;
			case "sadism fetishist":
				r.push(Spoken(slave, `"I-it's t-too much."`));
				r.push(`${He} shudders. You sold ${him} to a sadist who planned to use ${him} to abuse other slaves.`);
				r.push(Spoken(slave, `"I c-can't d-do it anymore. I used to fantasize about d-doing h-horrible things, but, but, the screaming."`));
				r.push(`${He} squeezes ${his} eyes shut.`);
				r.push(Spoken(slave, `"If I don't do it I'll h-have it d-done t-to me."`));
				slave.behavioralFlaw = "odd";
				slave.sexualFlaw = "apathetic";
				slave.fetish = "none";
				slave.fetishStrength = 0;
				break;
			case "dom fetishist":
				r.push(Spoken(slave, `"I,"`));
				r.push(`${he} mutters, and then loses ${his} way.`);
				r.push(Spoken(slave, `"I lost,"`));
				r.push(`${he} grates out after a while.`);
				r.push(Spoken(slave, `"I was supposed to be the Head Girl after you sold me. But a new girl came, and, and she's the Head Girl now."`));
				r.push(`${He} looks down. "It should have been me."`);
				slave.behavioralFlaw = "hates women";
				break;
			case "sub fetishist":
				r.push(Spoken(slave, `"I thought I'd be happy to be a sub forever."`));
				r.push(`You sold ${him} to a determined dom, extreme even by Free Cities standards.`);
				r.push(Spoken(slave, `"But, but, I haven't, um, had a break since I left. I never talk. I never, well, I never do anything. I just obey."`));
				r.push(`${He} looks down.`);
				r.push(Spoken(slave, `"I'm going insane."`));
				slave.behavioralFlaw = "odd";
				slave.sexualFlaw = "apathetic";
				slave.fetish = "none";
				slave.fetishStrength = 0;
				break;
			case "supremacist arcology":
				r.push(Spoken(slave, `"It was horrible."`));
				r.push(`You sold ${him} to a Supremacist arcology; it's nothing short of incredible that ${he} managed to get back here. ${He} must have sold and traded ${himself} without hesitation.`);
				r.push(Spoken(slave, `"The things they made me do to other girls just because of who they were."`));
				r.push(`${He} swallows.`);
				r.push(Spoken(slave, `"I tried not to. And they punished me."`));
				slave.behavioralFlaw = "odd";
				slave.sexualFlaw = "repressed";
				break;
			case "subjugationist arcology":
				r.push(Spoken(slave, `"They were breeding me with idiots."`));
				r.push(`You sold ${him} to a Subjugationist arcology; it's nothing short of incredible that ${he} managed to get back here. ${He} must have sold and traded ${himself} without hesitation.`);
				r.push(Spoken(slave, `"I d-don't want this pregnancy."`));
				slave.preg = pregWeeks - 1;
				slave.pregType = random(2, 4);
				slave.pregWeek = slave.preg;
				slave.pregKnown = 1;
				SetBellySize(slave);
				WombFatherRace(slave, slave.race);
				break;
			case "gender radicalist arcology":
				r.push(Spoken(slave, `"They`));
				if (slave.balls) {
					r.push(Spoken(slave, `cut my balls off and then`));
				}
				r.push(Spoken(slave, `j-just kind of t-turned me loose in the corridors,"`));
				r.push(`${he} moans. You sold ${him} to a Gender Radicalist arcology.`);
				r.push(Spoken(slave, `"Naked, so everyone could use my ass. Please, I don't want to be an entire arcology's bitch."`));
				slave.balls = 0;
				if (slave.dick) {
					slave.dick = Math.clamp(slave.dick - random(1, 2), 0, 10);
				}
				break;
			case "gender fundamentalist arcology":
				r.push(Spoken(slave, `"It was horrible."`));
				r.push(`You sold ${him} to a Gender Fundamentalist arcology; it's nothing short of incredible that ${he} managed to get back here. ${He} must have sold and traded ${himself} without hesitation.`);
				r.push(Spoken(slave, `"I'm, I'm, not an idiot. At least, not just because I'm a girl."`));
				slave.behavioralFlaw = "hates men";
				break;
			case "paternalist arcology":
				r.push(Spoken(slave, `"It was horrible."`));
				r.push(`You sold ${him} to a Paternalist arcology, but ${he} explains the apparent contradiction.`);
				r.push(Spoken(slave, `"The arcology got a new owner."`));
				r.push(`${He} shudders.`);
				r.push(Spoken(slave, `"I guess the nice one was weak, and, and the new one is changing things. There's cages, and spikes, and whips, and rape."`));
				r.push(`It's nothing short of incredible that ${he} managed to get back here. ${He} must have sold and traded ${himself} without hesitation.`);
				slave.behavioralFlaw = "hates men";
				break;
			case "degradationist arcology":
				r.push(Spoken(slave, `"It was horrible."`));
				r.push(`You sold ${him} to a Degradationist arcology; it's nothing short of incredible that ${he} managed to get back here. ${He} must have sold and traded ${himself} without hesitation.`);
				if (slave.ovaries) {
					slave.ovaries = 0;
					WombFlush(slave);
					slave.vagina = 4;
					SetBellySize(slave);
					r.push(Spoken(slave, `"They f-fixed me, t-to 'save on maintenance of my cunt,'`));
				} else if (slave.balls) {
					slave.balls = 0;
					slave.anus = 4;
					r.push(Spoken(slave, `"They c-cut my b-balls off, to 'keep me docile,'`));
				} else {
					slave.anus = 4;
					r.push(Spoken(slave, `"They whipped me,`));
				}
				r.push(Spoken(slave, `and then used me to satisfy labor menials. Ten an hour."`));
				slave.behavioralFlaw = "odd";
				slave.sexualFlaw = "hates penetration";
				break;
			case "slimness enthusiast arcology":
				r.push(Spoken(slave, `"It was horrible."`));
				r.push(`You sold ${him} to a pleasant Slimness Enthusiast arcology, but somehow ${he}'s acquired grotesque implants.`);
				r.push(Spoken(slave, `"The arcology got a new owner."`));
				r.push(`${He} shudders.`);
				r.push(Spoken(slave, `"I guess the nice one was weak, and, and the new one is changing things. Sh-she l-likes t-to ruin the slim ones."`));
				r.push(`It's nothing short of incredible that ${he} managed to get back here. ${He} must have sold and traded ${himself} without hesitation.`);
				slave.boobsImplant = 200 * random(2, 4);
				slave.boobs += slave.boobsImplant;
				slave.boobsImplantType = "normal";
				if (slave.boobsImplant / slave.boobs >= 0.90) {
					slave.boobShape = "spherical";
					slave.nipples = "flat";
				}
				slave.buttImplant = random(2, 4);
				slave.butt = Math.clamp(slave.butt + slave.buttImplant, 0, 10);
				slave.buttImplantType = "normal";
				slave.lipsImplant = 10 * random(1, 3);
				slave.lips = Math.clamp(slave.lips + slave.lipsImplant, 0, 100);
				break;
			case "asset expansionist arcology":
				r.push(Spoken(slave, `"It was horrible."`));
				r.push(`You sold ${him} to an Asset Expansionist arcology; it's nothing short of incredible that ${he} managed to get back here. ${He} must have sold and traded ${himself} without hesitation.`);
				if (slave.hips > 0) {
					slave.butt = Math.clamp(slave.butt + random(2, 4), 0, 10);
					r.push(Spoken(slave, `"They said, since I've got broad hips, I'd be a 'buttslave'."`));
					r.push(`The meaning is obvious; ${his} ass has grown unbelievably.`);
				} else {
					slave.boobs = Math.clamp(slave.boobs + 50 * random(20, 40), 0, 10000);
					r.push(Spoken(slave, `"They said they'd start with my boobs."`));
					r.push(`It's true; they've grown unbelievably.`);
				}
				r.push(`${He} shivers.`);
				r.push(Spoken(slave, `"The side effects are terrible. I can't sleep. I can barely eat. They had to feed me with a tube."`));
				slave.behavioralFlaw = "anorexic";
				break;
			case "transformation fetishist arcology":
				r.push(Spoken(slave, `"It was horrible."`));
				r.push(`You sold ${him} to a Transformation Fetishist arcology; it's nothing short of incredible that ${he} managed to get back here. ${He} must have sold and traded ${himself} without hesitation.`);
				r.push(Spoken(slave, `"They were giving me new boob implants every two weeks. I ran away before another set. I c-couldn't take any more s-surgery."`));
				slave.boobsImplant = 200 * random(9, 12);
				slave.boobs += slave.boobsImplant;
				slave.boobsImplantType = "normal";
				if (slave.boobsImplant / slave.boobs >= 0.90) {
					slave.boobShape = "spherical";
					slave.nipples = "flat";
				}
				break;
			case "physical idealist arcology":
				r.push(Spoken(slave, `"It was horrible."`));
				r.push(`You sold ${him} to a Physical Idealist arcology; it's nothing short of incredible that ${he} managed to get back here. ${He} must have sold and traded ${himself} without hesitation.`);
				r.push(Spoken(slave, `"It should have been called a Steroid Enthusiast arcology."`));
				r.push(`${He} shivers.`);
				r.push(Spoken(slave, `"The side effects are terrible. I can't sleep. I can barely eat. They had to feed me with a tube."`));
				slave.muscles = 100;
				slave.weight = random(-85, -75);
				slave.behavioralFlaw = "anorexic";
				break;
			case "chattel religionist arcology":
				r.push(Spoken(slave, `"It was horrible."`));
				r.push(`You sold ${him} to a Chattel Religionist arcology; it's nothing short of incredible that ${he} managed to get back here. ${He} must have sold and traded ${himself} without hesitation.`);
				r.push(Spoken(slave, `"There were, um, cults there, along with the Faith. They were going to devote me to something called She Who Thirsts. Nobody ever hears of girls after that."`));
				slave.behavioralFlaw = "devout";
				slave.sexualFlaw = "crude";
				break;
			case "roman revivalist arcology":
				r.push(Spoken(slave, `"It was horrible."`));
				r.push(`You sold ${him} to a Roman Revivalist arcology; it's nothing short of incredible that ${he} managed to get back here. ${He} must have sold and traded ${himself} without hesitation.`);
				r.push(Spoken(slave, `"I had to kill a girl,"`));
				r.push(`${he} adds in a small voice.`);
				r.push(Spoken(slave, `"In the arena."`));
				r.push(`Then, even more quietly:`);
				r.push(Spoken(slave, `"I had to kill, um, girls. I, I can't. Couldn't. Not again."`));
				slave.behavioralFlaw = "odd";
				slave.sexualFlaw = "crude";
				slave.skill.combat = 1;
				break;
			case "aztec revivalist arcology":
				r.push(Spoken(slave, `"It was horrible."`));
				r.push(`You sold ${him} to an Aztec Revivalist arcology; it's nothing short of incredible that ${he} managed to get back here. ${He} must have sold and traded ${himself} without hesitation.`);
				r.push(Spoken(slave, `"They told me by blood would feed the Sun."`));
				r.push(`${He} shudders.`);
				r.push(Spoken(slave, `"I, they, um, do that to hundreds of girls. I had to help."`));
				slave.behavioralFlaw = "odd";
				slave.sexualFlaw = "apathetic";
				break;
			case "egyptian revivalist arcology":
				r.push(Spoken(slave, `"It was horrible."`));
				r.push(`You sold ${him} to an Egyptian Revivalist arcology; it's nothing short of incredible that ${he} managed to get back here. ${He} must have sold and traded ${himself} without hesitation.`);
				r.push(Spoken(slave, `"My new owner was old, and he was really into some of the tomb stuff. If he died, I'd have been buried with him."`));
				break;
			case "body purist arcology":
				r.push(Spoken(slave, `"It was horrible."`));
				r.push(`You sold ${him} to a pleasant Body Purist arcology, but somehow ${he}'s acquired grotesque implants.`);
				r.push(Spoken(slave, `"The arcology got a new owner."`));
				r.push(`${He} shudders.`);
				r.push(Spoken(slave, `"I guess the nice one was weak, and, and the new one is changing things. Sh-she l-likes t-to ruin the pure ones."`));
				r.push(`It's nothing short of incredible that ${he} managed to get back here. ${He} must have sold and traded ${himself} without hesitation.`);
				slave.boobsImplant = 200 * random(2, 4);
				slave.boobs += slave.boobsImplant;
				slave.boobsImplantType = "normal";
				if (slave.boobsImplant / slave.boobs >= 0.90) {
					slave.boobShape = "spherical";
					slave.nipples = "flat";
				}
				slave.buttImplant = random(2, 4);
				slave.butt = Math.clamp(slave.butt + slave.buttImplant, 0, 10);
				slave.buttImplantType = "normal";
				slave.lipsImplant = 10 * random(1, 3);
				slave.lips = Math.clamp(slave.lips + slave.lipsImplant, 0, 100);
				break;
			case "D milf staffing":
			case "trainer staffing":
				r.push(Spoken(slave, `"I'm a good slave trainer, just like you sold me to be. Too good."`));
				r.push(`${His} eyes look hollow.`);
				r.push(Spoken(slave, `"I can't get what I'm doing to these ${girlU}s out of my head. Every young ${girlU} I meet, I get to know ${himU} and understand ${himU}. And then I break ${himU} down and turn ${himU} into a brainless little fuckpuppet."`));
				r.push(`${He} swallows.`);
				r.push(Spoken(slave, `"I can't. Not anymore."`));
				slave.fetish = "dom";
				slave.fetishStrength = 100;
				slave.behavioralFlaw = "arrogant";
				slave.sexualFlaw = "crude";
				break;
			case "teaching trainer":
				r.push(Spoken(slave, `"I'm just a mannequin now,"`));
				r.push(`${he} ${say}s hollowly. ${His} buyer planned to use ${him} as a teaching tool.`);
				r.push(Spoken(slave, `"There's nothing. No joy, no fun. Just the same thing, over, and over. Inside me."`));
				slave.fetish = "submissive";
				slave.fetishStrength = 100;
				slave.behavioralFlaw = "bitchy";
				slave.sexualFlaw = "apathetic";
				break;
			case "implanting trainer":
				r.push(Spoken(slave, `"I d-don't want to be c-cut again,"`));
				r.push(`${he} ${say}s hollowly. ${His} buyer planned to use ${him} as a surgical teaching tool.`);
				r.push(Spoken(slave, `"E-every time I'm healed, they implant me again. B-bigger."`));
				slave.boobsImplant = 200 * random(8, 12);
				slave.boobs += slave.boobsImplant;
				slave.boobsImplantType = "advanced fillable";
				if (slave.boobsImplant / slave.boobs >= 0.90) {
					slave.boobShape = "spherical";
					slave.nipples = "flat";
				}
				slave.buttImplant = random(2, 4);
				slave.butt = Math.clamp(slave.butt + slave.buttImplant, 0, 10);
				slave.buttImplantType = "normal";
				slave.lipsImplant = 10 * random(1, 3);
				slave.lips = Math.clamp(slave.lips + slave.lipsImplant, 0, 100);
				break;
			case "purifying trainer":
				r.push(Spoken(slave, `"It w-wasn't like I thought it would be,"`));
				r.push(`${he} ${say}s.`);
				r.push(Spoken(slave, `"The trainer you sold me to took out my implants. B-but then they said my boobs had to be rebuilt, only with drugs this time."`));
				r.push(`${He} shivers.`);
				r.push(Spoken(slave, `"The side effects are terrible. I can't sleep. I can barely eat. They had to feed me with a tube."`));
				if (slave.boobShape === "spherical") {
					slave.boobShape = "saggy";
				}
				if (slave.nipples === "flat") {
					slave.nipples = "cute";
				}
				slave.boobs -= slave.boobsImplant;
				slave.boobsImplant = 0;
				slave.boobsImplantType = "none";
				slave.butt -= slave.buttImplant;
				slave.buttImplant = 0;
				slave.buttImplantType = "none";
				slave.lips -= slave.lipsImplant;
				slave.lipsImplant = 0;
				slave.boobs = Math.clamp(slave.boobs + 50 * random(20, 40), 0, 10000);
				break;
			case "D startled the witch":
				r.push(`You sold ${him} to a buyer interested in ${him} because of ${his} sharp teeth, among other things.`);
				r.push(Spoken(slave, `"It was horrible,"`));
				r.push(`${he} whispers. Then ${he} gags, dry heaves, and vomits slightly. ${He} wipes ${his} mouth with the back of ${his} hand, staring upward vacantly.`);
				r.push(Spoken(slave, `"Horrible."`));
				slave.behavioralFlaw = "odd";
				slave.sexualFlaw = "crude";
				break;
			case "vampire clan":
				r.push(`You sold ${him} to a buyer interested in ${him} because of ${his} fangs, among other things.`);
				r.push(Spoken(slave, `"It was horrible,"`));
				r.push(`${he} whispers. Then ${he} gags, dry heaves, and vomits slightly. ${He} wipes ${his} mouth with the back of ${his} hand, staring upward vacantly.`);
				r.push(Spoken(slave, `"Horrible."`));
				slave.behavioralFlaw = "odd";
				slave.weight = Math.clamp(slave.weight - 75, -100, 100);
				break;
			case "slimming trainer":
				r.push(Spoken(slave, `"It's horrible."`));
				r.push(`You sold ${him} to a trainer who specializes in slimming slaves down, and if anything, they seem to have gone too far. ${He}'s emaciated.`);
				r.push(Spoken(slave, `"I'm h-hungry all the time, and when I'm not p-perfect, I d-don't get to eat at all."`));
				slave.boobs = Math.clamp(slave.boobs - 50 * random(5, 10), 0, 10000);
				slave.butt = Math.clamp(slave.butt - random(1, 2), 0, 10);
				slave.waist = Math.clamp(slave.waist - random(20, 50), -100, 100);
				slave.weight = -100;
				break;
			case "broadening trainer":
			case "D cannibal":
			case "hedonistic decadence arcology":
				switch (buyer) {
					case "D cannibal":
						r.push(Spoken(slave, `"M-my new owner is going t-to do something horrible to me. H-he keeps me in a tiny cage and f-feeds me, and I have to stay still and eat or I'll spoil the meat."`));
						r.push(`You did sell ${him} to a citizen widely rumored to be a cannibal. ${He} whispers,`);
						r.push(Spoken(slave, `"I'm going to die."`));
						break;
					case "hedonistic decadence arcology":
						r.push(`You sold ${him} to a Hedonistic arcology; it's nothing short of incredible that ${he} managed to get back here. ${He} must have sold and traded ${himself} without hesitation.`);
						r.push(Spoken(slave, `"It's horrible."`));
						r.push(`You sold ${him} to an arcology that loves fattening slaves up, and if anything, they seem to have gone too far too fast. ${He}'s bloated, and ${his} stomach is distended.`);
						r.push(Spoken(slave, `"T-they beat me if I ever stopped eating, and they fed my butt too. I'm gross and ugly. Even when they mounted me, they'd still shove food down my throat."`));
						break;
					default:
						r.push(Spoken(slave, `"It's horrible."`));
						r.push(`You sold ${him} to a trainer who specializes in fattening slaves up, and if anything, they seem to have gone too far. ${He}'s bloated, and ${his} stomach is distended.`);
						r.push(Spoken(slave, `"T-they beat me if I ever stop eating, and they feed my butt too. I'm gross and ugly."`));
				}
				slave.boobs = Math.clamp(slave.boobs + 50 * random(5, 10), 0, 10000);
				slave.butt = Math.clamp(slave.butt + random(1, 2), 0, 10);
				slave.waist = Math.clamp(slave.waist - random(20, 50), -100, 100);
				slave.weight = Math.clamp(slave.weight + random(50, 100), -100, 200);
				break;
			case "clipping trainer":
				r.push(Spoken(slave, `"All I do is suck dicks and get fucked in the butt."`));
				r.push(`You sold ${him} to a trainer who specializes in clipping and improving overly masculine slaves, and ${he}'s definitely more feminine, if bitterly unhappy.`);
				r.push(Spoken(slave, `"They're going to sell me to a bitch brothel soon, I know it. Please, nobody's even said anything to me other than 'suck my cock' or 'bend over bitch' in weeks."`));
				slave.boobsImplant = 200 * random(2, 4);
				slave.boobs += slave.boobsImplant;
				slave.boobsImplantType = "normal";
				if (slave.boobsImplant / slave.boobs >= 0.90) {
					slave.boobShape = "spherical";
				}
				slave.buttImplant = random(1, 2);
				slave.butt = Math.clamp(slave.butt + slave.buttImplant, 0, 10);
				slave.buttImplantType = "normal";
				slave.lipsImplant = 10 * random(1, 2);
				slave.lips = Math.clamp(slave.lips + slave.lipsImplant, 0, 100);
				slave.waist = Math.clamp(slave.waist + random(20, 50), -100, 100);
				slave.balls = 0;
				slave.scrotum = 0;
				slave.dick = Math.clamp(slave.dick - random(1, 2), 0, 10);
				slave.behavioralFlaw = "hates men";
				slave.sexualFlaw = "hates anal";
				if (slave.faceShape === "masculine") {
					slave.faceShape = "androgynous";
				}
				break;
			case "reassignment trainer":
				r.push(Spoken(slave, `"I m-miss my dick."`));
				r.push(`You sold ${him} to a trainer who specializes in gender reassignment, and ${he}'s definitely more feminine, if bitterly unhappy.`);
				r.push(Spoken(slave, `"P-please, even if you won't f-fix me, please take me back. I'll b-be a sex slave, I just don't want to be a woman."`));
				slave.boobsImplant = 200 * random(2, 4);
				slave.boobs += slave.boobsImplant;
				slave.boobsImplantType = "normal";
				slave.buttImplant = random(1, 2);
				slave.butt = Math.clamp(slave.butt + slave.buttImplant, 0, 10);
				slave.buttImplantType = "normal";
				slave.lipsImplant = 10 * random(1, 2);
				slave.lips = Math.clamp(slave.lips + slave.lipsImplant, 0, 100);
				slave.waist = Math.clamp(slave.waist + random(20, 50), -100, 100);
				slave.balls = 0;
				slave.scrotum = 0;
				slave.dick = 0;
				slave.vagina = 3;
				slave.behavioralFlaw = "hates men";
				slave.sexualFlaw = "hates penetration";
				if (slave.faceShape === "masculine") {
					slave.faceShape = "androgynous";
				}
				break;
			case "arcade":
				r.push(Spoken(slave, `"Take me back, or kill me,"`));
				r.push(`${he} ${say}s. You sold ${him} to an arcade, and it's surprising ${he} managed to make it up here at all.`);
				r.push(Spoken(slave, `"Please,"`));
				r.push(`${he} begs.`);
				r.push(Spoken(slave, `"I will do literally anything. I c-can feel myself going c-crazy. I'd rather die."`));
				slave.anus = 4;
				if (slave.vagina !== -1) {
					slave.vagina = 4;
				}
				slave.intelligence = Math.clamp(slave.intelligence - 50, -100, 100);
				slave.behavioralFlaw = "odd";
				slave.sexualFlaw = "apathetic";
				break;
			case "harvester":
				r.push(Spoken(slave, `"I'm just kept in a pen unless they're d-doing surgery on me."`));
				r.push(`It's not surprising; you did sell ${him} to an organ farm. What's unexpected is that ${he}'s still alive. They must be removing the less essential parts gradually.`);
				r.push(Spoken(slave, `"I'm going to die,"`));
				r.push(`${he} ${say}s hollowly.`);
				r.push(Spoken(slave, `"Next surgery, I won't wake up."`));
				slave.balls = 0;
				slave.prostate = 0;
				slave.ovaries = 0;
				slave.preg = -2;
				WombFlush(slave);
				SetBellySize(slave);
				if (V.seeExtreme === 1) {
					if (hasBothNaturalEyes(slave)) {
						eyeSurgery(slave, "left", "remove");
					}
					if (hasBothNaturalArms(slave)) {
						removeLimbs(slave, "right arm");
					}
				}
				slave.behavioralFlaw = "hates men";
				slave.sexualFlaw = "crude";
				break;
			case "D butt bury":
				r.push(Spoken(slave, `"My kind butt loving Master had to sell me, and the brothel who bought me uses my behind as an advertisement."`));
				r.push(`${He} shifts uncomfortably. "I can barely feel my anus."`);
				slave.anus = 4;
				slave.behavioralFlaw = "hates men";
				slave.sexualFlaw = "hates anal";
				break;
			case "D shorty breeder":
				r.push(Spoken(slave, `"My kind Master had to sell me, and the brothel who bought me got rid of his, um, they got rid of my pregnancy, and now I'm just a short slut."`));
				slave.behavioralFlaw = "hates men";
				slave.sexualFlaw = "crude";
				break;
			case "fuckdoll":
				r.push(`${His} appearance is surprising; you sold ${him} to a dealer who planned to encase ${him} in a Fuckdoll suit and thereby transform ${him} into a living sex toy. Apparently they decided to extract a bit of fun out of ${him} first.`);
				r.push(Spoken(slave, `"I've b-been chained up in their b-bathroom ever since you sold me," ${he} ${say}s hollowly.`));
				r.push(Spoken(slave, `"They're g-getting bored of me."`));
				slave.behavioralFlaw = "hates men";
				slave.sexualFlaw = "hates penetration";
				break;
			case "stuffer chef":
				r.push(Spoken(slave, `"They finished."`));
				r.push(`${His} appearance is not that surprising; you sold ${him} to a chef who enjoyed stuffing ${his} face till ${he} was bloated. Apparently he sold ${him} off after ${he} got too fat for his stuffings to show.`);
				r.push(Spoken(slave, `"He stretched my belly out so much and when I got so fat he couldn't see a difference with his feasts, he got rid of me." ${He}`));
				if (hasAnyArms(slave)) {
					r.push(`lowers ${his} ${hasBothArms(slave) ? "arms" : "arm"},`);
				} else {
					r.push(`straightens ${his} back,`);
				}
				r.push(`allowing ${his} grotesquely sagging belly to hang free.`);
				r.push(Spoken(slave, `"I'm gross. I'm fat, saggy, and gross."`));
				slave.boobs = Math.clamp(slave.boobs + 50 * random(5, 10), 0, 10000);
				slave.butt = Math.clamp(slave.butt + random(1, 2), 0, 10);
				slave.waist = Math.clamp(slave.waist - random(20, 50), -100, 100);
				slave.weight = Math.clamp(slave.weight + random(50, 100), -100, 200);
				slave.bellySag = 80;
				slave.behavioralFlaw = "anorexic";
				break;
			case "concert hall":
				r.push(`You sold ${him} to a local concert venue to help relieve the stage crew's stress.`);
				r.push(Spoken(slave, `"All of the roadies, from out of town, from other arcologies, treat like some sort of punching bag, or, or like a side of meat. I just can't go b-back there, anymore."`));
				if (slave.vagina > -1) {
					slave.vagina = 3;
				}
				slave.anus = 3;
				if (V.seePreg !== 0) {
					if (slave.ovaries) {
						slave.preg = random(5, pregWeeks - 1);
						slave.pregType = random(1, 2);
						slave.pregSource = either(-2, 0);
						slave.pregWeek = slave.preg;
						slave.pregKnown = 1;
						SetBellySize(slave);
					}
				}
				break;
			case "etiquette coach":
				r.push(Spoken(slave, `"The etiquette t-trainer I was sold to was an excellent teacher indeed,"`));
				r.push(`${he} ${say}s with a grimace,`);
				r.push(Spoken(slave, `"H-however, I find that he had some rather old-f-fashioned views on educational methods, to be quite b-blunt."`));
				r.push(`You look ${him} over; ${he} has numerous caning marks all over ${his} body, and appears to have been starved.`);
				slave.weight = random(-80, -70);
				setHealth(slave, jsRandom(-60, -40), slave.health.shortDamage + normalRandInt(10, 3), slave.health.longDamage + normalRandInt(10, 3), undefined, 100);
				slave.behavioralFlaw = "odd";
				slave.sexualFlaw = either("idealistic", "repressed", "self hating", "shamefast");
				break;
			case "sex double":
				r.push(`You sold ${him} to a film studio to act as a double for a famous actress where ${he} was used for a sex scene.`);
				r.push(Spoken(slave, `"They didn't stop after the shoot. They just kept fucking me and fucking me until they just tossed me aside, since that bitch`));
				if (V.seePreg !== 0 && slave.ovaries === 1 && (slave.preg === 0 || slave.preg === -1) && slave.bellyImplant < 0) {
					r.push(`'isn't a bloated whore like you'. Like I even had a choice in getting pregnant."`);
				} else {
					r.push(`'isn't a blown out whore like you'."`);
				}
				slave.vagina = 3;
				slave.anus = 3;
				if (V.seePreg !== 0) {
					if (slave.ovaries) {
						slave.preg = random(5, pregWeeks - 1);
						slave.pregType = 1;
						slave.pregSource = 0;
						slave.pregWeek = slave.preg;
						slave.pregKnown = 1;
						SetBellySize(slave);
					}
				}
				break;
			case "monster movie":
				r.push(`You sold ${him} to a film studio to act as a double for a famous actress where ${he} was installed with a massive fake pregnancy for the ending.`);
				r.push(Spoken(slave, `"It's too big... Can't breath right... Was going to be sold... Since I was a disposable prop... I'd rather be your prop."`));
				r.push(`${He} returns to wheezing against the solid mass bulging from ${his} middle.`);
				healthDamage(slave, random(60, 70));
				if (V.seeHyperPreg !== 1) {
					slave.bellyImplant = 120000;
					slave.belly = 120000;
				} else {
					slave.bellyImplant = 300000;
					slave.belly = 300000;
				}
				break;
			case "sniper spotter":
				r.push(`You sold ${him} to a mercenary sniper to act as his spotter.`);
				r.push(Spoken(slave, `"When the job was done, he just left me behind, in the middle of a war zone. He said it was cheaper to hire a new slave spotter than to get both of us to safety."`));
				r.push(`${He} looks emaciated; it's nothing short of a miracle ${he} was able to find ${his} way back to your arcology.`);
				slave.weight = random(-85, -80);
				setHealth(slave, jsRandom(-50, -45), slave.health.shortDamage + normalRandInt(10, 3), slave.health.longDamage + normalRandInt(10, 3), undefined, 100);
				break;
			default:
				switch (buyer) {
					case "housekeeper":
						r.push(Spoken(slave, `"My kind Master passed away, and his heir sold me`));
						break;
					case "nice brothel":
						r.push(Spoken(slave, `"The nice brothel you sold me to failed, and their ${girl}s went`));
						break;
					case "virgin trader":
						r.push(Spoken(slave, `"After I couldn't pass as a virgin any more, they sold me`));
						break;
					case "D virgin asspussy":
						r.push(Spoken(slave, `"My new owner loved my asspussy because my front hole was virgin. B-but i-it got b-broken by accid-dent, I swear, and then he sold me`));
						break;
					default:
						r.push(Spoken(slave, `"Please. I've been resold`));
				}
				r.push(`to a sh-shitty brothel on the lower levels. It's h-horrible there. I live in a tiny little room, and the only people I ever`);
				if (canSee(slave)) {
					r.push(`see`);
				} else {
					r.push(`meet`);
				}
				r.push(`just fuck me and leave. N-nobody ever t-talks to me. And they beat me."`);
				if (hasAnyNaturalLegs(slave)) {
					r.push(`${He} shifts uncomfortably on ${his}`);
					if (!hasBothLegs(slave)) {
						r.push(`foot.`);
					} else {
						r.push(`feet.`);
					}
					r.push(`The soles of the feet are a convenient place to beat a whore, since it's agonizingly painful, doesn't bruise badly, and won't inconvenience a slave that spends all ${his} time kneeling or lying down.`);
				}
				slave.anus = 3;
				if (slave.vagina > -1) {
					slave.vagina = 3;
				}
				slave.sexualFlaw = either("hates anal", "hates oral", "hates penetration");
		}

		App.Events.addParagraph(node, r);
		r = [];
		r.push(`It isn't obvious how ${he} managed to escape, though no doubt you could review the arcology surveillance logs and find out. For right now, though, the question is what to do with ${him}.`);
		if (slave.trust > 95) {
			r.push(Spoken(slave, `"Please,"`));
			r.push(`${he} sobs, breaking down at last.`);
			r.push(Spoken(slave, `"I th-thought I w-was a g-good ${girl}. T-take me b-back and I'll p-pretend I n-never left. I'll d-do anything you ask. I'll worship the ground you walk on. Please."`));
			slave.devotion = 100;
		} else if (slave.intelligence + slave.intelligenceImplant < -15) {
			r.push(Spoken(slave, `"Please,"`));
			r.push(`${he} sobs, breaking down at last.`);
			r.push(Spoken(slave, `"I d-don't know where else to go."`));
			r.push(`That much you believe; ${he}'s an idiot.`);
		} else {
			r.push(Spoken(slave, `"I know I'll be caught,"`));
			r.push(`${he} sobs, breaking down at last.`);
			r.push(Spoken(slave, `"I know you'd f-find me. So I came here. Please."`));
			r.push(`${He}'s right about that much. This is literally the only chance ${he} has of getting away from ${his} current owners.`);
		}

		const contractCost = 5000;
		const cost = slaveCost(slave) - contractCost;

		App.Events.addParagraph(node, r);

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		const choices = [];
		choices.push(new App.Events.Result(`Return ${him}`, returnSlave));
		if (V.cash >= contractCost) {
			choices.push(new App.Events.Result(`Obfuscate ${his} appearance and re-enslave ${him}`, reSlave, `This will cost ${cashFormat(contractCost)}.`));
			choices.push(new App.Events.Result(`Sell ${him} immediately`, sell, `This will bring in ${cashFormat(cost)}.`));
		} else {
			choices.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}.`));
		}

		App.Events.addResponses(node, choices);

		function returnSlave() {
			const frag = new DocumentFragment();
			let r = [];
			repX(Math.trunc(cost / 2), "event", slave);
			r.push(`${slave.slaveName} keeps waiting, but the doors to the penthouse never open. When ${his} owners arrive a few minutes later to collect ${him}, ${he} cries harder, but does not resist. ${His} weeping has the peculiar ring of utter hopelessness as they restrain ${him} and drag ${him} off. A few minutes after that, you receive a businesslike note <span class="green">expressing gratitude</span> for your assistance in this matter.`);
			V.boomerangStats = 0;
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function reSlave() {
			const frag = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			if (V.boomerangStats.PCpregSource > 0 && V.PC.preg > 0 && V.PC.pregSource === 0) {
				V.PC.pregSource = slave.ID;
			}
			if (V.boomerangStats.PCmother > 0) {
				V.PC.mother = slave.ID;
			}
			if (V.boomerangStats.PCfather > 0) {
				V.PC.father = slave.ID;
			}
			for (const s of V.slaves) {
				if (V.boomerangStats.boomerangMother.includes(s.ID)) {
					s.mother = slave.ID;
				}
				if (V.boomerangStats.boomerangFather.includes(s.ID)) {
					s.father = slave.ID;
				}
				if (V.boomerangStats.boomerangPregSources.includes(s.ID) && s.preg > 0 && s.pregSource === 0) {
					s.pregSource = slave.ID;
				}
				WombChangeID(s, slave.missingParentTag, slave.ID);
				WombChangeGeneID(s, slave.missingParentTag, slave.ID);
			}
			if (V.incubator.capacity > 0) {
				for (let tank of V.incubator.tanks) {
					if (V.boomerangStats.boomerangMotherTank.includes(tank.ID)) {
						tank.mother = slave.ID;
					}
					if (V.boomerangStats.boomerangFatherTank.includes(tank.ID)) {
						tank.father = slave.ID;
					}
				}
			}
			if (V.nursery > 0) {
				for (let crib of V.cribs) {
					if (V.boomerangStats.boomerangMotherTank.includes(crib.ID)) {
						crib.mother = slave.ID;
					}
					if (V.boomerangStats.boomerangFatherTank.includes(crib.ID)) {
						crib.father = slave.ID;
					}
				}
			}
			if (V.boomerangStats.boomerangRelationship > 0) {
				const boomerangRelationship = getSlave(V.boomerangStats.boomerangRelationship);
				if (boomerangRelationship) {
					boomerangRelationship.relationship = slave.relationship;
					boomerangRelationship.relationshipTarget = slave.ID;
				} else {
					slave.relationship = 0;
					slave.relationshipTarget = 0;
				}
			}
			if (V.boomerangStats.boomerangRivalry > 0) {
				const boomerangRivalry = getSlave(V.boomerangStats.boomerangRivalry);
				if (boomerangRivalry) {
					boomerangRivalry.rivalry = slave.rivalry;
					boomerangRivalry.rivalryTarget = slave.ID;
				} else {
					slave.rivalry = 0;
					slave.rivalryTarget = 0;
				}
			}
			if (V.boomerangStats.boomerangBody > 0) {
				const boomerangBody = getSlave(V.boomerangStats.boomerangBody);
				if (boomerangBody) {
					boomerangBody.origBodyOwnerID = slave.ID;
				}
			}
			V.boomerangStats = 0;
			r.push(`The penthouse opens, and ${slave.slaveName} stumbles inside, sobbing ${his} thanks. ${He}'s immediately conducted to the autosurgery for some quick cosmetic surgery, while you and ${V.assistant.name} do the necessary work to falsify the arcology records and conceal ${his} origins. Even so, it would probably be wise to keep ${him} off public assignments for a while. In no time at all, ${he}'s standing in front of your desk like any other new slave. ${He} waits obediently, knowing that it's in ${his} best interests not to mention anything out of the ordinary.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function sell() {
			const frag = new DocumentFragment();
			let r = [];
			cashX(cost, "slaveTransfer");
			r.push(`The penthouse opens, and ${slave.slaveName} stumbles inside, sobbing ${his} thanks. ${He}'s immediately conducted to the autosurgery for some quick cosmetic surgery, while you and ${V.assistant.name} do the necessary work to falsify the arcology records and conceal ${his} origins. Before ${he}'s even out from under anesthesia, ${he}'s bundled off into one of the hundreds of slave shipments that move between arcologies every day. This time ${he}'ll be sold far enough away that no matter how much of an escape artist ${he} is, you won't be seeing any more of ${him}. ${He} can whine elsewhere.`);
			V.boomerangStats = 0;
			App.Events.addParagraph(frag, r);
			return frag;
		}
	}
};

repo_name: CloudyCoffee/fc

license: mit


code:
App.Events.REBrothelFunction = class REBrothelFunction extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => App.Entity.facilities.brothel.employeesIDs().size > 5,
		];
	}

	execute(node) {
		const largeCash = 10000;
		const mediumCash = 2000;
		const smallCash = 1000;

		const brothelNameCaps = capFirstChar(V.brothelName);

		App.Events.addParagraph(node, [
			`${brothelNameCaps} is a reputable establishment in ${V.arcologies[0].name}, a veritable bedrock to sexual life in your arcology. As is befitting of its position, requests to rent out your brothel for one function or another come across your desk with some regularity. On this particular day, ${V.assistant.name} has laid out a number of potential clients for your perusal. Given the importance of ${brothelNameCaps} in the arcology's sex trade, it would be unwise to indulge more than one of these requests at this time.`
		]);
		App.Events.addParagraph(node, [
			`One request comes to you written on a letterhead featuring the logo of a fellow arcology owner. She describes her husband's preference for your hard working brothel whores, whom he patronizes on his regular business trips to your arcology. Such indulgences have been a distraction to her husband of late, and she has dispatched him to undertake a task in your arcology that simply cannot go poorly. With this in mind, she beseeches you to close down your brothel for a single day out of solidarity for a fellow arcology owner — and for the significant sum of ${cashFormat(largeCash)}.`
		]);
		App.Events.addParagraph(node, [
			`Another of these bids for your brothel comes in the form of a curious video call. The video comes from an infamous lothario in your arcology, a seducer of powerful and prominent women citizens. Indeed, the recording was surreptitiously recorded in the bedroom of one such influential woman, with the Casanova describing his request in hushed tones while his wealthy host minces about unknowingly in the background. He explains that he is finally ready to hang up his coat and end his days of debauchery and copious casual sex, but that he would like to do so by engaging in a full day of indulgence at ${V.brothelName}.`
		]);
		App.Events.addParagraph(node, [
			`The last of these requests comes in the form of a letter, stamped with the herald of a prominent arcology family. It seems the eldest son of the family, known to you largely as a spoiled child riding on the coattails of his parents, is about to reach the age of majority. At his behest, his parents have contacted you to reserve your brothel for a day so that their son may become a man in true Free Cities fashion — amongst a roil of writhing flesh and wanton debauchery.`
		]);

		App.Events.addResponses(node, [
			new App.Events.Result(`Acquiesce to the arcology owner's request`, arcOwner, `This will earn you ${cashFormat(largeCash)}`),
			new App.Events.Result(`Give this lady-killing rake a proper send off into retirement`, rake, `This will earn you ${cashFormat(mediumCash)}`),
			new App.Events.Result(`Welcome the boy into manhood in Free Cities fashion`, boy, `This will earn you ${cashFormat(smallCash)}`)
		]);

		function arcOwner() {
			const frag = new DocumentFragment();
			let r = [];
			r.push(`Though you close down ${brothelNameCaps} for a day, it's far from a day off for your hard-working brothel slaves. In the absence of the convenient center for the sale of sexual services that a brothel represents, you disperse them onto the streets to sell their bodies the old fashioned way. At the end of the day you receive a brief message of gratitude from your fellow arcology owner while your whores appreciate the opportunity to stretch their legs on the street for a change of pace.`);
			for (const slave of V.slaves.filter(s => s.assignment === Job.BROTHEL)) {
				slave.devotion += 4;
			}
			cashX(largeCash, "event");
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function rake() {
			const frag = new DocumentFragment();
			let r = [];
			r.push(`Though a citizen he may be, this serial seducer may have more notches on his proverbial bedpost than even your oldest slaves. Though you are not present to view his mastery of the sexual craft first-hand, the dreamy fucked-out looks of exhaustion and gratified satisfaction painting every single one of your slaves' faces at the end of the day speak volumes. Indeed, all of your brothel slaves with any room for improvement in their whoring skills learn from his skillful coupling, while even those with nothing to learn from him gain confidence from the intensity of their sexual congress.`);
			for (const slave of V.slaves.filter(s => s.assignment === Job.BROTHEL)) {
				if (slave.skill.whoring < 100) {
					slave.skill.whoring += 10;
				} else {
					slave.devotion += 4;
				}
				if (canDoVaginal(slave) && canDoAnal(slave)) {
					actX(slave, "vaginal", 3);
					actX(slave, "anal", 3);
				} else if (canDoAnal(slave)) {
					actX(slave, "anal", 5);
				} else {
					actX(slave, "oral", 10);
				}
			}
			cashX(mediumCash, "event");
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function boy() {
			const frag = new DocumentFragment();
			let r = [];
			r.push(`Though he was but a boy yesterday, none can say that this newly made man entered his manhood with anything less than a sterling display of enthusiasm and virility, though he is somewhat lacking in general technique. Nevertheless, any man able to fuck his way through an entire brothel of sex slaves and back again is clearly capable of bearing the mantle of citizenry in ${V.arcologies[0].name}. The story of a boy entering manhood in such a spectacular manner spreads rapidly and reflects well in the court of public opinion, with many citizens recalling their own passage past the age of majority. However, a lifetime of indulgence and spoiling have rendered this new citizen unable to understand the concept of being refused — not that your slaves could refuse him, in any case. His rough treatment has left your poor slave whores battered by his brutally selfish lovemaking.`);
			for (const slave of V.slaves.filter(s => s.assignment === Job.BROTHEL)) {
				healthDamage(slave, 5);
				if (canDoVaginal(slave) && canDoAnal(slave)) {
					actX(slave, "vaginal");
					actX(slave, "anal");
				} else if (canDoAnal(slave)) {
					actX(slave, "anal", 2);
				} else {
					actX(slave, "oral", 4);
				}
			}
			cashX(smallCash, "event");
			repX(2500, "event");
			App.Events.addParagraph(frag, r);
			return frag;
		}
	}
};


code:
App.Events.REBusyClub = class REBusyClub extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => App.Entity.facilities.club.employeesIDs().size > 3
		];
	}

	execute(node) {
		App.Events.addParagraph(node, [`The original designers of the modern arcology did not realize how inseparable from slavery their work would become. The club at the social heart of ${V.arcologies[0].name} was not meant as a center of the more friendly kind of sexual slavery, but that is what it has become. Free whores of the highest quality work there, and they are accompanied by a flock of your slaves who have simple orders to dance, add cheer, and perform sexual favors wherever they can.`]);
		App.Events.addParagraph(node, [`Offering slaves for free sex would become unmanageable if the club where your public servants work was open to the unwashed masses, but it is not. The arcology is already selective, and only good citizens can party, dance, and fuck the night away in ${V.clubName}. The upper classes recognize your contributions to arcology culture, which you could probably parlay into an even greater benefit.`]);

		repX(500, "event");

		App.Events.addResponses(node, [
			new App.Events.Result("Sponsor a special event in the club", sponsor, `This will cost ${cashFormat(2000)}`),
			new App.Events.Result("Host a business exposition", host, `This will cost ${cashFormat(5000)}`),
		]);

		function sponsor() {
			cashX(-2000, "event");
			repX(2500, "event");
			return `The Free Cities are new, and so is their culture. There are new traditions, new expectations, and now, new holidays. One morning, the upper classes of the arcology are surprised and gratified to find that the club has been specially decorated, and all the club sluts are nude. The floor of the club is typically meant for dirty dancing and some light sex, not public penetrative intercourse. Not today; today is special. The festivities greatly improve your renown; you have set a high bar for what a wealthy arcology owner should do.`;
		}
		function host() {
			cashX(-5000, "event");
			V.arcologies[0].prosperity += 2;
			repX(2500, "event");
			return `With the world economy in a perilous state, the Free Cities are one of the few remaining areas where innovation and new business opportunities still appear. The novel markets associated with the slave trade only reinforce this trend, offering a cornucopia of opportunities for the clear-eyed investor with liquid assets. Every other week there is news of a new fortune being made from smart investments in leather, in human growth hormones, or in psychoactive drugs. You host an exposition for slave services centered on the club, with your slaves serving as greeters who are eager to ensure that all the little wants of visiting notables are thoroughly satisfied. The optimistic outlook projected by this event improves ${V.arcologies[0].name}'s business prospects and even reflects well on you personally.`;
		}
	}
};