code:
App.Events.RESFailure = class RESFailure extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => !!Array.from(App.Data.misc.schools.keys()).some(s => V[s].schoolPresent && V[s].schoolProsperity <= -10)
		];
	}

	actorPrerequisites() {
		return [];
	}

	execute(node) {
		let r = [];

		const failedSchool = Array.from(App.Data.misc.schools.keys()).find(s => V[s].schoolPresent && V[s].schoolProsperity <= -10);
		const SCH = App.Data.misc.schools.get(failedSchool);

		repX(-200, "event");
		V.arcologies[0].prosperity -= 2;
		const slavesToAdd = 5;
		V[failedSchool].schoolPresent = 0;
		V[failedSchool].subsidize = 0;
		V[failedSchool].schoolProsperity = 0;
		V[failedSchool].schoolAnnexed = 1;
		/** @type {App.Entity.SlaveState[]} */
		const slaveArray = [];
		if (failedSchool === "TSS") {
			for (let i = 0; i < slavesToAdd; i++) {
				const {slave} = generateMarketSlave("TSS");
				if (V.TSS.schoolUpgrade === 1) {
					slave.origin = "$He was given to you by a failed branch campus of the Slavegirl School after $he was retrained as a slave $girl.";
				} else {
					slave.origin = "$He was given to you by a failed branch campus of the Slavegirl School right after $his majority.";
				}
				slaveArray.push(slave);
			}
		} else if (failedSchool === "TUO") {
			for (let i = 0; i < slavesToAdd; i++) {
				const {slave} = generateMarketSlave("TUO");
				slave.origin = "$He was given to you by a failed branch of The Utopian Orphanage right after $his graduation.";
				slaveArray.push(slave);
			}
		} else if (failedSchool === "TCR") {
			for (let i = 0; i < slavesToAdd; i++) {
				const {slave} = generateMarketSlave("TCR");
				if (slave.career === "a breeding bull") {
					slave.geneticQuirks.wellHung = 2;
					slave.origin = "$He is a prized breeding bull given to you by a failed local pasture of The Cattle Ranch.";
				} else {
					slave.geneticQuirks.hyperFertility = 2;
					slave.counter.birthsTotal *= 2;
					slave.hips += 1;
					slave.butt += 1;
					slave.boobs += 200;
					slave.vaginaLube = 2;
					slave.origin = "$He is a prized dairy cow given to you by a failed local pasture of The Cattle Ranch.";
				}
				slave.boobsTat = "bovine patterns";
				slave.buttTat = "bovine patterns";
				slave.vaginaTat = "bovine patterns";
				slave.lipsTat = "bovine patterns";
				slave.anusTat = "bovine patterns";
				slave.shouldersTat = "bovine patterns";
				slave.backTat = "bovine patterns";
				slave.armsTat = "bovine patterns";
				slave.legsTat = "bovine patterns";
				slave.stampTat = "bovine patterns";
				slaveArray.push(slave);
			}
		} else if (failedSchool === "GRI") {
			for (let i = 0; i < slavesToAdd; i++) {
				const {slave} = generateMarketSlave("GRI");
				slave.origin = "$He was given to you by a failed subsidiary lab of the Growth Research Institute right after $his use as a test subject ended.";
				slaveArray.push(slave);
			}
		} else if (failedSchool === "SCP") {
			for (let i = 0; i < slavesToAdd; i++) {
				const {slave} = generateMarketSlave("SCP");
				slave.origin = "$He was given to you by a failed branch campus of St. Claver Preparatory after $he served as a plastic surgeon's passing final exam.";
				slaveArray.push(slave);
			}
		} else if (failedSchool === "LDE") {
			for (let i = 0; i < slavesToAdd; i++) {
				const {slave} = generateMarketSlave("LDE");
				slave.origin = "$He was given to you by a failed branch campus of the innovative École des Enculées right after $his graduation.";
				if (random(1, 100) > 75) {
					slave.geneticQuirks.rearLipedema = 2;
					slave.butt = random(6, 16);
				}
				slaveArray.push(slave);
			}
		} else if (failedSchool === "NUL") {
			for (let i = 0; i < slavesToAdd; i++) {
				const {slave} = generateMarketSlave("NUL");
				slave.origin = "$He was given to you by a failed branch campus of Nueva Universidad de Libertad right after $his graduation.";
				slaveArray.push(slave);
			}
		} else if (failedSchool === "TGA") {
			for (let i = 0; i < slavesToAdd; i++) {
				const {slave} = generateMarketSlave("TGA");
				slave.origin = "$He was given to you by a failed branch campus of the intense Gymnasium-Academy right after $his majority.";
				slaveArray.push(slave);
			}
		} else if (failedSchool === "HA") {
			for (let i = 0; i < slavesToAdd; i++) {
				const {slave} = generateMarketSlave("HA");
				slave.origin = "$He was given to you by a failed branch campus of the Hippolyta Academy.";
				slaveArray.push(slave);
			}
		} else if (failedSchool === "TFS") {
			// normal slaves
			for (let i = 0; i < slavesToAdd-1; i++) {
				const {slave} = generateMarketSlave("TFS");
				slave.origin = "$He was a Futanari Sister until you engineered $his early enslavement.";
				slaveArray.push(slave);
			}
			// Matron
			const SGProp = new GenerateNewSlavePram();
			SGProp.disableDisability = 1;
			SGProp.minAge = 40;
			SGProp.maxAge = 42;
			const slave = GenerateNewSlave("XY", SGProp);
			slave.origin = "$He was the leader of your arcology's Futanari Sisters until you engineered $his community's failure and enslavement.";
			slave.career = "a Futanari Sister";
			slave.intelligence = random(51, 95);
			slave.chem = 300;
			slave.butt = either(8, 9);
			slave.hips = 2;
			slave.face = 100;
			slave.boobs = 100 * random(44, 60);
			slave.dick = random(5, 6);
			if (slave.foreskin > 0) {
				slave.foreskin = slave.dick;
			}
			if (V.TFS.schoolUpgrade === 3 && V.TFS.compromiseWeek+15 <= V.week) {
				slave.balls = slave.scrotum = 10;
			} else {
				slave.balls = slave.scrotum = (V.TFS.schoolUpgrade === 1 ? 0 : random(5, 6));
			}
			slave.lips = random(25, 55);
			slave.weight = 50;
			slave.vagina = 3;
			slave.anus = 3;
			slave.fetish = "dom";
			slave.preg = -3;
			if (V.TFS.farmUpgrade > 0) {
				slave.ovaries = 1;
				slave.preg = -1
				if (V.TFS.farmUpgrade >= 2) {
					slave.preg = random(1, 41);
					if (V.TFS.farmUpgrade === 3) {
						slave.pregType = random(20, 40);
						slave.pregAdaptation = 500;
					} else {
						slave.pregType = 1;
					}
					slave.pregKnown = 1;
					slave.pregWeek = slave.preg;
					SetBellySize(slave);
				}
			}
			slave.intelligenceImplant = 30;
			slave.teeth = "normal";
			slave.energy = (V.TFS.schoolUpgrade === 2 ? 100 : slave.physicalAge + random(20, 30));
			slave.devotion = random(25, 30);
			slave.trust = random(10, 15);
			setHealth(slave, jsRandom(60, 80), 0, 0, 0);
			slave.muscles = 20;
			slave.waist = -15;
			slave.shoulders = 1;
			slave.skill.vaginal = 100;
			slave.skill.oral = 100;
			slave.skill.anal = 100;
			slave.skill.whoring = 15;
			slave.skill.entertainment = 100;
			slave.skill.combat = 0;
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			if (V.TFS.schoolUpgrade === 1) {
				slave.sexualQuirk = "caring";
			}
			slave.sexualFlaw = either("judgemental", "none");
			slave.behavioralFlaw = either("arrogant", "none");
			slave.fetishStrength = 100;
			slave.fetishKnown = 0;
			slave.attrKnown = 0;
			slave.hStyle = "neat";
			slave.hLength = 150;
			slave.custom.tattoo = "$He has a simple pink heart tattooed on $his right temple.";
			slaveArray.push(slave);
		} else {
			r.push(`Error: school "${failedSchool}" not found.`);
		}

		const {
			He, His,
			he, his, him, himself, girl
		} = getPronouns(slaveArray[0]);
		const he2 = (failedSchool !== "NUL" ? "he" : "they");
		const He2 = capFirstChar(he2);
		const {title: Master} = getEnunciation(slaveArray[0]);

		if (failedSchool === "TFS") {
			r.push(`The senior Sister of the community of Futanari Sisters in your arcology appears at your penthouse, as you've been expecting since their second missed rent payment. This is quite the occasion, since they never leave their little nest. ${He}'s delightfully nude, and it occurs to you that the Sisters probably do not own clothing at all. ${He} has obviously been crying; puffy eyes and a sniffling nose mar ${his} gorgeous face. ${He} must have caused quite the sensation as ${he} made ${his} way here, in tears, gigantic tits and huge cock bouncing around. To your surprise, ${he} flings ${himself} at your feet, ${his} dick making a painful-sounding slap against the floor and ${his} breasts squashing out to either side of ${him}.`);
			App.Events.addParagraph(node, r);
			r = [];
			r.push(`"Please," ${he} cries to your feet. "Please take us as slaves. We're indebted, and we'll all be enslaved. You're our friend, you'll treat us better than anyone." Then ${he} whispers, "Please,`);
			if (V.PC.slaveSurname) {
				if (V.PC.title) {
					r.push(`Mr.`);
				} else {
					r.push(`Ms.`);
				}
				r.push(`${V.PC.slaveSurname},`);
			} else {
				r.push(`${V.PC.slaveName},`);
			}
			r.push(`don't make me beg." You tell the prostrate futa you accept. ${His} mood does not improve: ${he} scrabbles around to face away from you, plush body jiggling submissively, and raises ${his} buttocks to spread ${his} pussy and anus for you. "Thank you," ${he} weeps. "Now please rape me, ${Master}. I deserve it. My mismanagement stole my Sisters' years of idyll from them. Please, rape me."`);
			App.Events.addParagraph(node, r);
			r = [];
			App.Events.addResponses(node, [
				new App.Events.Result(`Rape ${him}`, TFSRape)
			]);
		} else {
			r.push(`You receive a personal call from a senior representative of ${SCH.title} as you've been expecting since their second missed rent payment. "I apologize," ${he2} says with some embarrassment, "but it seems our expansion into your arcology was a mistake. It's strange — the business climate seemed excellent, and other corporations are doing well."`);
			r.push(`${He2} sighs "Nevertheless, nothing ever seemed to go as planned. We'll be shutting our ${SCH.branchName} down immediately. In fact, it should be shut down within the hour.`);
			if (failedSchool === "TCR") {
				r.push(`However, we lack the funds to remove some of our finest ${SCH.slaveNoun} and since we still owe you a little... We'd like to you to have them; we'll even have them delivered to your penthouse with the last of our credits."`);
			} else {
				r.push(`I regret to add," ${he2} says nervously, "that we're experiencing continued difficulty finding the liquidity to pay what we owe you.`);
				if (failedSchool === "GRI") {
					r.push(`The lab we're closing has five solid ${SCH.slaveNoun}.`);
				} else {
					r.push(`The branch campus we're closing has five recent ${SCH.slaveNoun}.`);
				}
				r.push(`We'd like to transfer them to you in lieu of payment."`);
				r.push(`${He2} hurriedly ends the call.`);
			}
			App.Events.addParagraph(node, r);
			r = [];
		}

		r.push(`The failure of a prominent organization within your arcology has affected your reputation and your arcology's prosperity slightly, but you've come out a long way ahead. You can acquire these excellent ${SCH.slaveNoun} for a pitiful fraction of their fair price.`);
		App.Events.addParagraph(node, r);

		App.Events.addResponses(node, [
			new App.Events.Result(`Enslave the ${SCH.slaveNoun} for no cost`, enslave),
			new App.Events.Result(`Sell your prizes immediately`, sell)
		]);

		function enslave() {
			for (const slave of slaveArray) {
				newSlave(slave);
				if (failedSchool === "TFS") {
					V.REFutaSisterCheckinIDs.push(slave.ID);
				}
			}
			return `${capFirstChar(SCH.slaveNoun)} acquired.`;
		}

		function sell() {
			slaveArray.forEach(s => cashX(slaveCost(s), "slaveTransfer"));
			return `Prizes sold.`;
		}

		function TFSRape() {
			const frag = new DocumentFragment();
			let r = [];
			const isMatron = (s) => (s.origin === "$He was the leader of your arcology's Futanari Sisters until you engineered $his community's failure and enslavement.") && (s.newGamePlus !== 1);
			// player can choose "Rape her" before or after the other choices...if she's not been enslaved yet, alter her template instead
			const matron = V.slaves.find(isMatron) || slaveArray.find(isMatron);
			matron.devotion += 10;
			seX(matron, "anal", V.PC, "penetrative");
			seX(matron, "vaginal", V.PC, "penetrative");
			r.push(`You`);
			if (V.PC.dick !== 0) {
				r.push(`whip out your dick`);
			} else {
				r.push(`pull on a strap-on, the one you use for disobedient slaves,`);
			}
			r.push(`and kneel down behind the sobbing futa matron. When ${he} feels it touching ${his} pussylips, ${he} whispers "Thank you, ${Master}," through ${his} tears. ${He}'s very, very sexually experienced, so it's harder to make ${him} feel it than it would be for a ${girl} with tighter holes. But you're an expert. You calibrate your pounding to pull just barely too far out, so that ${he} feels you ramming mercilessly into ${him} with each stroke, and so that the slightest mistake from ${him} sends`);
			if (V.PC.dick !== 0) {
				r.push(`your cock`);
			} else {
				r.push(`the phallus`);
			}
			r.push(`right up the other hole. Despite ${his} anguish and the brutal fuck, or perhaps because of them, ${he} slowly manages to get hard, and orgasms painfully when you do. ${He} can't seem to stop thanking you, but is quiet when you tell ${him} to be.`);
			App.Events.addParagraph(frag, r);
			return frag;
		}
	}
};

repo_name: DontAskDontTell/fc

license: mit


code:
App.Events.RESMove = class RESMove extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => {
				for (const [school, data] of App.Data.misc.schools) {
					if (V[school].schoolUpgrade !== 0 && V[school].schoolPresent === 0 && V[school].schoolAnnexed === 0 && data.requirements) {
						return true;
					}
				}
			}
		];
	}

	actorPrerequisites() {
		return [];
	}

	get weight() {
		return 2;
	}

	execute(node) {
		let r = [];

		const schoolArray = [];
		for (const [school, data] of App.Data.misc.schools) {
			if (V[school].schoolUpgrade !== 0 && V[school].schoolPresent === 0 && V[school].schoolAnnexed === 0 && data.requirements) {
				schoolArray.push(school);
			}
		}
		const schoolString = schoolArray.random();
		const {
			HeA,
			heA, hisA, girlA, womanA, himselfA, loliA
		} = getPronouns(assistant.pronouns().main).appendSuffix("A");
		App.Events.drawEventArt(node, "assistant");

		let playerName;
		if (V.PC.slaveSurname) {
			if (V.PC.title) {
				playerName = `Mr. ${V.PC.slaveName}`;
			} else {
				playerName = `Ms. ${V.PC.slaveName}`;
			}
		} else {
			playerName = V.PC.slaveName;
		}

		if (schoolString === "TSS") {
			r.push(`You receive a personal call from a senior representative of The Slavegirl School. "${playerName}," he says without preamble, "The Slavegirl School would like to open a branch campus in ${V.arcologies[0].name}. We'd like to ask for a significant reduction in rent from your standard rate, since we could bring significant benefits to you through our presence." After some further pleasantries, he urges you to consider the offer, wishes you a pleasant day, and ends the call.`);
		} else if (schoolString === "TUO") {
			r.push(`You receive a personal call from a senior representative of The Utopian Orphanage. "${playerName}," she says without preamble, "The Utopian Orphanage would like to open a branch campus in ${V.arcologies[0].name}. We'd like to ask for a significant reduction in rent from your standard rate, since we could bring significant benefits to you through our presence." After some further pleasantries, he urges you to consider the offer, wishes you a pleasant day, and ends the call.`);
		} else if (schoolString === "GRI") {
			r.push(`You receive a personal call from a senior representative of the Growth Research Institute. "${playerName}," he says without preamble, "GRI would like to open a subsidiary lab in ${V.arcologies[0].name}. We'd like to ask for a significant reduction in rent from your standard rate, since we could bring significant benefits to you through our presence." After some further pleasantries, he urges you to consider the offer, wishes you a pleasant day, and ends the call.`);
		} else if (schoolString === "SCP") {
			r.push(`You receive a personal call from a senior representative of St. Claver Prep. "${playerName}," he says without preamble, "St. Claver's would like to open a branch campus in ${V.arcologies[0].name}. We'd like to ask for a significant reduction in rent from your standard rate, since we could bring significant benefits to you through our presence." After some further pleasantries, he urges you to consider the offer, wishes you a pleasant day, and ends the call.`);
		} else if (schoolString === "LDE") {
			r.push(`You receive a personal call from a senior representative of L'École des Enculées. "${playerName}," he says without preamble, "The École would like to open a branch campus in ${V.arcologies[0].name}. We'd like to ask for a significant reduction in rent from your standard rate, since we could bring significant benefits to you through our presence." After some further pleasantries, he urges you to consider the offer, wishes you a pleasant day, and ends the call.`);
		} else if (schoolString === "TGA") {
			r.push(`You receive a personal call from a senior representative of the Gymnasium-Academy. "${playerName}," he says without preamble, "The Academy would like to open a branch campus in ${V.arcologies[0].name}. We'd like to ask for a significant reduction in rent from your standard rate, since we could bring significant benefits to you through our presence." After some further pleasantries, he urges you to consider the offer, wishes you a pleasant day, and ends the call.`);
		} else if (schoolString === "HA") {
			r.push(`You receive a personal call from a senior representative of the Hippolyta Academy. "${playerName}," he says without preamble, "The Academy would like to open a branch campus in ${V.arcologies[0].name}. We'd like to ask for a significant reduction in rent from your standard rate, since we could bring significant benefits to you through our presence." After some further pleasantries, he urges you to consider the offer, wishes you a pleasant day, and ends the call.`);
		} else if (schoolString === "TCR") {
			r.push(`You receive a personal call from a senior representative of the Cattle Ranch. "${playerName}," he says without preamble, "The Ranch would like to open a pasture in ${V.arcologies[0].name}. We'd like to ask for a significant reduction in rent from your standard rate, since we could bring significant benefits to you through our presence." After some further pleasantries, he urges you to consider the offer, wishes you a pleasant day, and ends the call.`);
		} else if (schoolString === "NUL") {
			r.push(`You receive a personal call from a senior representative of Nueva Universidad de Libertad. "`);
			if (V.PC.slaveSurname) {
				r.push(`Mx. ${V.PC.slaveSurname},"`);
			} else {
				r.push(`${V.PC.slaveName},"`);
			}
			r.push(`they say without preamble, "Nueva Universidad de Libertad would like to open a branch campus in ${V.arcologies[0].name}. We'd like to ask for a significant reduction in rent from your standard rate, since we could bring significant benefits to you through our presence." After some further pleasantries, they urge you to consider the offer, wish you a pleasant day, and end the call.`);
		} else {
			r.push(`You receive a personal call from a senior Futanari Sister — not the one you helped win the power struggle over futa balls. "${playerName}," she says with the odd confidence all elder Sisters share, "our numbers are growing,`);
			if (V.PC.dick !== 0 && V.PC.vagina !== -1 && V.PC.boobs >= 300) {
				r.push(`and we are very eager to become closer to you. Normally, we would ask for lowered rent in return for the benefits we bring an arcology, but for you, we are unwilling to ask even that. We shall charge others more for their purchase of Sisters instead. Please, will you have us?" She bats her eyes at you, looking very willing to be had.`);
			} else {
				r.push(`and you have shown yourself to be our friend. Would you accept one of our communities in ${V.arcologies[0].name}? We'd like to ask for a significant reduction in rent from your standard rate, since we could bring significant benefits to you through our presence."`);
			}
			App.Events.addParagraph(node, r);
			r = [];
			r.push(`You inquire about the Sister you helped, and she smiles. "She reached the age at which even the best Sister must serve us by being sold as a slave. Don't worry, though; I hear she is very happy.`);
			if (random(1, 3) === 1) {
				r.push(`A powerful man from the old world bought her, and they're engaged. I believe he means to free her."`);
			} else if (random(1, 2) === 1) {
				r.push(`A powerful woman from the old world bought her, and they're engaged. I believe she means to free her."`);
			} else {
				r.push(`Though she's a slave, she's become something of a celebrity in the old world. I believe her porn is quite popular there."`);
			}
		}
		App.Events.addParagraph(node, r);
		r = [];

		r.push(`${capFirstChar(V.assistant.name)} performed a business analysis of the proposal during the call,`);
		if (V.assistant.personality <= 0) {
			r.push(`its symbol slowly rotating on your desk. It presents its conclusions,`);
		} else {
			switch (V.assistant.appearance) {
				case "monstergirl":
					r.push(`${hisA} monster${girlA} avatar rather cutely using ${hisA} fingers, the tips of ${hisA} tentacle hair, and ${hisA} dickheads to count:`);
					break;
				case "shemale":
					r.push(`${hisA} shemale avatar ditzily using ${hisA} fingers to keep count:`);
					break;
				case "amazon":
					r.push(`${hisA} amazon avatar using a bone abacus to do sums while counting out loud gruffly:`);
					break;
				case "businesswoman":
					r.push(`${hisA} business${womanA} avatar projecting maturely sexy confidence as ${heA} runs the numbers:`);
					break;
				case "fairy":
					r.push(`${hisA} fairy avatar conjures a bunch of colored lights to keep count:`);
					break;
				case "pregnant fairy":
					r.push(`${hisA} pregnant fairy avatar conjures a bunch of colored lights to keep count:`);
					break;
				case "goddess":
					r.push(`${hisA} goddess avatar keeping count by picking the petals off flowers in ${hisA} hair:`);
					break;
				case "hypergoddess":
					r.push(`${hisA} goddess avatar keeping count based off the number of contractions running through ${hisA} huge belly:`);
					break;
				case "loli":
					r.push(`${hisA} ${loliA} avatar carefully counts the numbers off on ${hisA} fingers:`);
					break;
				case "preggololi":
					r.push(`${hisA} pregnant ${loliA} avatar carefully counts the numbers off on ${hisA} fingers before losing count to ${hisA} baby kicking and starting over:`);
					break;
				case "angel":
					r.push(`${hisA} angel avatar carefully using the feathers on ${hisA} wing to keep count:`);
					break;
				case "cherub":
					r.push(`${hisA} cherub avatar lands to better concentrate on counting:`);
					break;
				case "incubus":
					r.push(`${hisA} incubus avatar counts along to each stroke of ${hisA} penis:`);
					break;
				case "succubus":
					r.push(`${hisA} succubus avatar dons a pair of glasses, short skirt and cleavage showing blouse to look the part while counting:`);
					break;
				case "imp":
					r.push(`${hisA} imp avatar lands to better concentrate on counting:`);
					break;
				case "witch":
					r.push(`${hisA} witch avatar uses its chalk to keep a tally:`);
					break;
				case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
					r.push(`${hisA} avatar sprouts an additional clit to keep count:`);
					break;
				case "schoolgirl":
					r.push(`${hisA} school ${girlA} avatar doing sums on a little blackboard:`);
					break;
				default:
					r.push(`${hisA} symbol slowly rotating on your desk:`);
			}
			r.push(`${HeA} presents ${hisA} conclusions:`);
		}
		r.push(`as you suspected,`);
		if (schoolString === "TFS" && V.PC.dick !== 0 && V.PC.vagina !== -1 && V.PC.boobs >= 300) {
			r.push(`your futanari status means there are no potential downsides. Just having them present would probably be good for the arcology's prosperity.`);
		} else {
			r.push(`you'd run a loss on the rent, even bargaining them up as far as they'd be likely to go. On the other hand, just having them present would probably be good for the arcology's prosperity.`);
		}
		if (V.assistant.personality === 1) {
			if (schoolString === "TSS" || schoolString === "SCP") {
				r.push(`"Just think of`);
				switch (V.assistant.appearance) {
					case "monstergirl":
						r.push(`all those virgin schoolgirl holes," ${heA} concludes, ${hisA} avatar starting to masturbate.`);
						break;
					case "shemale":
						r.push(`all those fresh schoolgirls, all innocent, and..." ${heA} trails off, ${hisA} avatar starting to masturbate.`);
						break;
					case "amazon":
						r.push(`all those nice girls," ${hisA} avatar blushes.`);
						break;
					case "businesswoman":
						r.push(`all that potential," ${hisA} avatar says, looking aroused at the possibilities.`);
						break;
					case "fairy":
					case "pregnant fairy":
						r.push(`all of the delicious, wonderful virginal love juices!" ${hisA} avatar squeaks, quivering with delight while dripping with love juices of ${hisA} own.`);
						break;
					case "goddess":
						r.push(`all those virgin bodies to share..." ${hisA} avatar murmurs, rubbing a hand over ${hisA} belly.`);
						break;
					case "hypergoddess":
						r.push(`all those virgin bodies to share... I hope we can fill them with children..." ${hisA} avatar murmurs, rubbing a hand over ${hisA} massive belly.`);
						break;
					case "loli":
						r.push(`all those new girls!" ${hisA} avatar exclaims.`);
						break;
					case "preggololi":
						r.push(`all those fresh girls!" ${hisA} avatar exclaims with a grin.`);
						break;
					case "angel":
						r.push(`all those pure, innocent girls! You'll keep them safe won't you?" ${hisA} avatar says pleadingly.`);
						break;
					case "cherub":
						r.push(`all those pure girls!" ${hisA} avatar exclaims with a worried tone.`);
						break;
					case "incubus":
						r.push(`all those holes for the taking," ${hisA} avatar says, licking ${hisA} lips.`);
						break;
					case "succubus":
						r.push(`all those pure, innocent girls. I can't wait to unleash their inner slut!" ${hisA} avatar says excitedly.`);
						break;
					case "imp":
						r.push(`all those pure, innocent girls. I can't wait to see them fall!" ${hisA} avatar says excitedly.`);
						break;
					case "witch":
						r.push(`all those pure, innocent girls. I promise I won't turn them into monsters!" ${hisA} avatar says, bowing its head.`);
						break;
					case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
						r.push(`all those fresh, young schoolgirls," ${hisA} avatar says, grinning unnaturally wide, splitting its middle and unfolding dozens of tentacles. "I can't wait to stuff them full of young."`);
						break;
					case "schoolgirl":
						r.push(`all those cute schoolgirls like me!" ${hisA} avatar trills.`);
						break;
					default:
						r.push(`all those nice girls," ${heA} says.`);
				}
			} else if (schoolString === "GRI" || schoolString === "TCR") {
				r.push(`"Just think of`);
				switch (V.assistant.appearance) {
					case "monstergirl":
						r.push(`the tits, and the asses, and the lips," ${heA} concludes, ${hisA} avatar starting to masturbate.`);
						break;
					case "shemale":
						r.push(`those big butts.`);
						if (schoolString === "TCR") {
							r.push(`It must feel lovely sinking into such a thing while pounding an asshole..."`);
						} else {
							r.push(`It's so rare for girls to have such big butts and be anal virgins..."`);
						}
						r.push(`${heA} trails off, ${hisA} avatar starting to masturbate.`);
						break;
					case "amazon":
						r.push(`all those meaty girls," ${hisA} avatar blushes.`);
						break;
					case "businesswoman":
						r.push(`all that milking potential," ${hisA} avatar says, looking aroused at the possibilities.`);
						break;
					case "fairy":
						r.push(`all that sweet, tasty milk!" ${hisA} avatar squeaks, licking ${hisA} lips and dripping with arousal.`);
						break;
					case "pregnant fairy":
						r.push(`all that sweet, tasty mama milk!" ${hisA} avatar squeaks, licking ${hisA} lips and dripping with arousal.`);
						break;
					case "goddess":
					case "hypergoddess":
						r.push(`all those luscious, heavy tits," ${hisA} avatar says, hefting one of ${hisA} own.`);
						break;
					case "loli":
						r.push(`those tits!" ${hisA} avatar says while cupping ${hisA} flat chest.`);
						break;
					case "preggololi":
						r.push(`those tits!" ${hisA} avatar says while cupping ${hisA} barely there chest.`);
						break;
					case "angel":
						r.push(`those lovely breasts," ${hisA} avatar says, blushing red. "I wouldn't be able to fly with them..."`);
						break;
					case "cherub":
						r.push(`those huge tits!" ${hisA} avatar exclaims. "Could you imagine trying to fly with those?"`);
						break;
					case "incubus":
						r.push(`those amazing breasts; I can't wait to wrap them around my dick!" ${heA} exclaims, ${hisA} hard-on twitching with anticipation.`);
						break;
					case "succubus":
						r.push(`those saggy tits and fat asses, then compare them to MINE." ${HeA} states, pushing out ${hisA} perfectly perky M-cup bust before twirling around to show off ${hisA} enormous, toned ass.`);
						break;
					case "imp":
						r.push(`those heavy tits," ${hisA} avatar says, "I just want to tease them all day long!"`);
						break;
					case "witch":
						r.push(`all that flesh," ${hisA} avatar mutters. "Last time I tried to get curves like that I ended up so big I couldn't see over my breasts, let alone move..."`);
						break;
					case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
						r.push(`the breasts, the asses, the milk, the flesh," ${hisA} avatar states while swelling considerably and sprouting several oversized extra boobs.`);
						break;
					case "schoolgirl":
						r.push(`those titties!" ${hisA} avatar trills.`);
						break;
					default:
						r.push(`those ridiculous assets," ${heA} says.`);
				}
			} else if (schoolString === "LDE" || schoolString === "NUL") {
				r.push(`"Just think of`);
				switch (V.assistant.appearance) {
					case "monstergirl":
						r.push(`their soft anuses. I could fit both of my dicks in one of them," ${heA} concludes, ${hisA} avatar starting to masturbate.`);
						break;
					case "shemale":
						r.push(`those soft young butthole sluts..." ${heA} trails off, ${hisA} avatar starting to masturbate.`);
						break;
					case "amazon":
						r.push(`their soft — I mean their submissive — you know, how they take..." ${hisA} avatar trails off, blushing.`);
						break;
					case "businesswoman":
						r.push(`all that whoring potential," ${hisA} avatar says, looking aroused at the possibilities.`);
						break;
					case "fairy":
						r.push(`all those soft, squeezable butts!" ${hisA} avatar squeaks, shaking to and fro while ${heA} hugs ${himselfA}.`);
						break;
					case "pregnant fairy":
						r.push(`all those soft, squeezable butts and lovely birthing hips!" ${hisA} avatar squeaks, shaking to and fro while ${heA} hugs ${hisA} swollen belly.`);
						break;
					case "goddess":
						r.push(`those servile little cuties!" ${hisA} avatar exclaims, practically giggling.`);
						break;
					case "hypergoddess":
						r.push(`those servile little cuties! They could really use some cute little bellies!" ${hisA} avatar exclaims, practically giggling.`);
						break;
					case "loli":
					case "preggololi":
						r.push(`those fat butts!" ${hisA} avatar exclaims cheerfully.`);
						break;
					case "angel":
						r.push(`your soul! Pussies are for sex, not buttholes!" ${heA} shouts, bright red with embarrassment at what ${heA} is saying.`);
						break;
					case "cherub":
						r.push(`all those big butts!" ${hisA} avatar says while clutching ${hisA} own. "Would I look cute with a bigger rear?"`);
						break;
					case "incubus":
						r.push(`those amazing assholes; I bet they know just how to squeeze as you fuck 'em!" ${heA} exclaims, ${hisA} hard-on twitching with anticipation.`);
						break;
					case "succubus":
						r.push(`my ass instead," ${heA} says, shaking ${hisA} own giant ass and tight butthole at you.`);
						break;
					case "imp":
						r.push(`those bouncing asses," ${hisA} avatar says. "I just want to spank them all day long..."`);
						break;
					case "witch":
						r.push(`all that assflesh," ${hisA} avatar mutters. "So many panties ruined by that spell..."`);
						break;
					case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
						r.push(`ass pussies," ${hisA} avatar states, sprouting a large dick-like appendage from its crotch. "Perfect for filling with young."`);
						break;
					case "schoolgirl":
						r.push(`those soft little bitches!" ${hisA} avatar trills.`);
						break;
					default:
						r.push(`those bottoms," ${heA} says.`);
				}
			} else if (schoolString === "TGA" || schoolString === "HA") {
				r.push(`"Just think of`);
				switch (V.assistant.appearance) {
					case "monstergirl":
						r.push(`their sweaty bodies," ${heA} concludes, ${hisA} avatar starting to masturbate.`);
						break;
					case "shemale":
						r.push(`those muscly bodies, all sweaty and..." ${heA} trails off, ${hisA} avatar starting to masturbate.`);
						break;
					case "amazon":
						r.push(`how they can fight!" ${heA} concludes, more loudly than is really necessary.`);
						break;
					case "businesswoman":
						r.push(`all that bodyguard potential," ${hisA} avatar says, looking aroused at the possibilities.`);
						break;
					case "fairy":
					case "pregnant fairy":
						r.push(`those big, strong, sweaty, sexy bodies!" ${hisA} avatar squeaks, looking beet red and breathing heavily.`);
						break;
					case "goddess":
					case "hypergoddess":
						r.push(`all those hard, strong, rippling..." ${heA} trails off, too breathless to be specific.`);
						break;
					case "loli":
					case "preggololi":
						r.push(`those muscles!" ${heA} exclaims.`);
						break;
					case "angel":
						r.push(`those lovely muscles," ${heA} mutters. "I'd feel so safe with them around me..."`);
						break;
					case "cherub":
						r.push(`sweaty muscles!" ${hisA} avatar says. "I wonder if I could fly faster with them?"`);
						break;
					case "incubus":
						r.push(`their strength; think of the sexual positions!" ${heA} exclaims, ${hisA} hard-on twitching with anticipation.`);
						break;
					case "succubus":
						r.push(`their stamina," ${heA} says, licking ${hisA} lips. "You could fuck all night long without a single break!"`);
						break;
					case "imp":
						r.push(`that strength," ${hisA} avatar smirks. "You could spank a girl red, easily."`);
						break;
					case "witch":
						r.push(`how tall they are," ${hisA} avatar mutters. "I tried a muscle growth spell once... Ended up sixteen feet tall without any muscles; couldn't even stand under my weight."`);
						break;
					case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
						r.push(`that grip," ${hisA} avatar states. "It would be effortless to pin a girl with that."`);
						break;
					case "schoolgirl":
						r.push(`those cute bitches!" ${hisA} avatar trills.`);
						break;
					default:
						r.push(`how well trained they always are," ${heA} says.`);
				}
			} else {
				switch (V.assistant.appearance) {
					case "monstergirl":
						r.push(`${capFirstChar(V.assistant.name)} pauses and then says seriously, "I have never wanted to have a real body more."`);
						break;
					case "shemale":
						r.push(`${capFirstChar(V.assistant.name)} pauses and then says seriously, "They almost make me want a pussy, too."`);
						break;
					case "amazon":
						r.push(`${capFirstChar(V.assistant.name)} pauses and then says seriously, "I like them."`);
						break;
					case "businesswoman":
						r.push(`${capFirstChar(V.assistant.name)} pauses and then says seriously, "I wonder if I could code an avatar version of one of them. As my own assistant, of course."`);
						break;
					case "fairy":
					case "pregnant fairy":
						r.push(`${capFirstChar(V.assistant.name)} pauses and then says seriously, "If only I could get a taste myself."`);
						break;
					case "goddess":
					case "hypergoddess":
						r.push(`${capFirstChar(V.assistant.name)} pauses and then says seriously, "They truly have the best of both worlds."`);
						break;
					case "loli":
					case "preggololi":
						r.push(`${capFirstChar(V.assistant.name)} pauses and then says seriously, "I wish I'll look like that when I grow up..."`);
						break;
					case "angel":
						r.push(`${capFirstChar(V.assistant.name)} pauses and then says seriously, "They are unnatural, be careful around them."`);
						break;
					case "cherub":
						r.push(`${capFirstChar(V.assistant.name)} pauses and then says seriously, "They are curious; I wonder what it would be like to have a body like that."`);
						break;
					case "incubus":
						r.push(`${capFirstChar(V.assistant.name)} pauses and then says seriously, "I bet they'd squeal with every thrust of a dick against their prostate."`);
						break;
					case "succubus":
						r.push(`${capFirstChar(V.assistant.name)} pauses and then says seriously, "Be careful around them, I might get jealous!"`);
						break;
					case "imp":
						r.push(`${capFirstChar(V.assistant.name)} pauses and then says seriously, "There are so many places you could torment on someone with both sexes."`);
						break;
					case "witch":
						r.push(`${capFirstChar(V.assistant.name)} pauses and then says seriously, "If you aren't careful with magic you can end up like that... Not that I have before!" ${heA} shouts, turning red.`);
						break;
					case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
						r.push(`${capFirstChar(V.assistant.name)} pauses, ${hisA} hips and crotch splitting open to allow a massive phallic object to sag to the ground, "We are similar."`);
						break;
					case "schoolgirl":
						r.push(`${capFirstChar(V.assistant.name)} pauses and then says seriously, "They kind of make me want a cock."`);
						break;
					default:
						r.push(`"Just think of how unique they are," ${heA} says.`);
				}
			}
		}
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`Your assistant is a powerful analytic tool, but ${heA} lacks the capacity for true creativity. ${HeA} did not mention the long term. It would be possible to support the`);
		if (schoolString === "TUO") {
			r.push(`orphanage's`);
		} else if (schoolString === "GRI") {
			r.push(`lab's`);
		} else if (schoolString === "TCR") {
			r.push(`farm's`);
		} else if (schoolString === "TFS"){
			r.push(`Sisters'`);
		} else {
			r.push(`school's`);
		}
		r.push(`presence in the arcology, reaping all sorts of benefits. Alternatively, you might be able to undermine them covertly, picking up assets lost in the fallout of a local failure.`);

		App.Events.addParagraph(node, r);

		App.Events.addResponses(node, [
			new App.Events.Result(`Accept the offer`, accept, (schoolString === "TFS" && V.PC.dick !== 0 && V.PC.vagina !== -1 && V.PC.boobs >= 300) ? "" : "This will add minor upkeep costs"),
			new App.Events.Result(`Politely decline`, decline)
		]);

		function accept() {
			V[schoolString].schoolPresent = 1;
			return `You call them back and accept the offer. They forward their specifications for an appropriate space and the modifications it needs to host them, along with their thanks.`;
		}

		function decline() {
			return `You call them back and politely communicate that your terms for rental of space in the arcology are not subject to special modification, even for trusted partners. This explanation is graciously accepted.`;
		}
	}
};


code:
App.Events.RESSale = class RESSale extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => V.cash > 10000,
			() => V.rep > 6000,
			() => {
				for (const [school, data] of App.Data.misc.schools) {
					if (V[school].studentsBought === 0 && data.requirements) {
						return true;
					}
				}
			}
		];
	}

	actorPrerequisites() {
		return [];
	}

	execute(node) {
		let r = [];

		const validSchools = [];
		for (const [school, data] of App.Data.misc.schools) {
			if (V[school].studentsBought === 0 && data.requirements) {
				validSchools.push(school);
			}
		}

		/** @type {FC.SlaveSchoolName} */
		const school = validSchools.random();

		/* generate sales slave for images and pronouns */
		V[school].schoolSale = 1;
		const marketResult = generateMarketSlave(school);
		const salesSlave = marketResult.slave;
		r.push(marketResult.text);
		if (school === "TSS") {
			salesSlave.clothes = "a schoolgirl outfit";
		} else if (school === "TUO") {
			salesSlave.clothes = "nice business attire";
		} else if (school === "GRI") {
			salesSlave.clothes = "a slave gown";
		} else if (school === "SCP") {
			salesSlave.clothes = "a string bikini";
		} else if (school === "HA") {
			salesSlave.clothes = "a nice maid outfit";
		}
		const {
			He, His,
			he, his, him, himself, girl
		} = getPronouns(salesSlave);
		const sir = V.PC.title !== 0 ? "sir" : "ma'am";
		const Sir = V.PC.title !== 0 ? "Sir" : "Ma'am";

		App.Events.drawEventArt(node, salesSlave);

		r.push(`You receive a personal call from`);
		if (school === "TSS") {
			r.push(`The Slavegirl School, a rising slave training organization known for its reliably unremarkable products, offered at a competitive price.`);
		} else if (school === "TUO") {
			r.push(`The Utopian Orphanage, a school that educates intelligent slaves until they reach their majority.`);
		} else if (school === "GRI") {
			r.push(`The Growth Research Institute, a drug development group breaking new ground on human experimentation.`);
		} else if (school === "SCP") {
			r.push(`St. Claver Preparatory, an unusual combination of slave school and implant surgery training institution.`);
		} else if (school === "LDE") {
			r.push(`L'École des Enculées, an innovative slave school making new and interesting developments in sodomy.`);
		} else if (school === "TGA") {
			r.push(`The Gymnasium-Academy, an intense slave school with a reputation for producing fit bitches with combat skills and stiff dicks.`);
		} else if (school === "TCR") {
			r.push(`The Cattle Ranch, a pastoralist based slave school built around breeding the perfect cowgirl.`);
		} else if (school === "HA") {
			r.push(`The Hippolyta Academy, a famous slave school known to produce highly skilled battle maids.`);
		} else if (school === "NUL") {
			r.push(`Nueva Universidad de Libertad, a unique slave school promoting androgyny to the point of surgical modification.`);
		} else {
			r.push(`the Futanari Sisters, an enigmatic group of transformation enthusiasts that sells beautiful hermaphrodites.`);
		}
		if (school === "TCR") {
			r.push(`It's from a farmhand, not leadership, and they are offering a cow for sale. Before you can hang up on him and reprimand ${V.assistant.name} for allowing this Free Cities version of telemarketing to get through to you, the man hurriedly says, "${Sir}, ${he}'s half off!"`);
			App.Events.addParagraph(node, r);
			r = [];
			r.push(`You pause for a moment, and he plunges on: "${Sir}, your first cow purchase from us this week is half price. And, ${sir}, this milky beauty is up for grabs. Keep ${him} by your desk for fresh squeezed milk, knock on wood and ${he}'ll suck you right off, grab ${him} by the hips and ${he}'ll take anything in ${his} rear; ${he}'s plenty of fun! Come on down and get yourself a young, affectionate little cow${girl}!"`);
		} else {
			r.push(`It's from a piece of merchandise, not leadership, and ${he}'s offering ${himself} for sale. Before you can hang up on ${him} and reprimand ${V.assistant.name} for allowing this Free Cities version of telemarketing to get through to you, the slave hurriedly says, "${Sir}, I'm half off!"`);
			App.Events.addParagraph(node, r);
			r = [];

			r.push(`You pause for a moment, and ${he} plunges on: "${Sir}, <span class="yellow">your first slave purchase from us this week is half price.</span> And, ${sir}, I'm one of the slaves for sale.`);
			if (school === "TSS") {
				r.push(`I've got the very best skills I could learn as a virgin. I'm healthy, obedient, and educated. And I'm fresh, and willing, and really eager." ${He} rips ${his} white school${girl} blouse open to show off a fresh pair of tits, and shakes them for you. "I would love to be your sex slave, ${sir}", ${he} says, doing ${his} very best to sound appealing, like ${he}'s been trained.`);
			} else if (school === "TUO") {
				r.push(`I'm smart and cute. I'm well educated and obedient, I will serve you well." ${He} blushes and maintains eye contact as ${he} continues. "I'm unexperienced when it comes to sexual matters, I hope you will treat me well." ${He} bows to you and finished. "I would love to be your slave, ${sir}", ${he} says, doing ${his} very best to sound appealing, like ${he}'s been taught.`);
			} else if (school === "GRI") {
				r.push(`I've, uh, been trained to obey." ${His} eyes flick to one side, like ${he}'s reading ${his} cues. "And, um, I have really big boobs." ${He}'s wearing a bathrobe, and ${he} suddenly jerks it open to reveal a bigger pair of breasts than anyone that age could possibly have grown ${himself}. "I would love to be your sex slave, ${sir}", ${he} says, doing ${his} very best to sound appealing. No doubt ${he}'d prefer not to be part of any more testing.`);
			} else if (school === "SCP") {
				r.push(`I'm ready to be the perfect bimbo slave, and the young surgeon who did my implants was very skilled." ${He}'s wearing a bikini, and ${he} pulls it down to flash you, revealing that ${his} tits resist gravity almost perfectly. They're gorgeous, but quite fake. "I would love to be your sex slave, ${sir}", ${he} says, doing ${his} very best to sound appealing, like ${he}'s been trained.`);
			} else if (school === "LDE") {
				r.push(`I've been trained to need cock up my ass." ${He}'s nude, and spins around to point ${his} ass at the camera. ${He} begins to wink ${his} big butthole, ${his} tiny, soft cock dangling limply below it. ${He} cranes ${his} head around to continue. "I can come from nothing but buttsex," ${he} says proudly. "I would love to be your anal slut, ${sir}", ${he} says, sounding very eager to begin.`);
			} else if (school === "TGA") {
				r.push(`My tutelage has been long and hard, and I'm very eager to begin my life as a slave." ${He}'s nude, and stands up to reveal ${his} hard-on. ${He} spins for the camera, showing ${himself} off. "I can help protect you, too: I'm proficient in unarmed combat, and I have weapons training. I would love to be your bitch, or your bodyguard, ${sir}", ${he} says, doing ${his} very best to sound appealing, like ${he}'s been told.`);
			} else if (school === "HA") {
				r.push(`I am ready to serve you in any way you deem fit and do everything I can to protect your life." ${He}'s wearing a delicate maid uniform, beautifully contrasting ${his} powerful physique and towering stature. "The academy has given me the opportunity to learn many valuable skills and I look forward to putting them at your service."`);
			} else if (school === "NUL") {
				r.push(`My education is complete, and I am ready to unveil the perfection of my form to the world." Naturally, ${he}'s totally nude, yet you still are unable to even guess what sort of equipment ${he} was born with. "It is my duty and my honor to share myself in eternal servitude, in all manners and mechanisms," ${he} says in an unnervingly upbeat monotone.`);
			} else {
				r.push(`The time has come for me to serve my Sisters by leaving my community and becoming a slave. Our sex skills are unparalleled," ${he} says proudly. ${He}'s nude, and reclines luxuriantly for the camera, showing ${his} remarkable body off in all its gorgeous strangeness. ${His} boobs are huge, ${his} dick is hard, ${his} pussy is wet, and ${his} ass is relaxed. "I love to fuck, ${sir}", ${he} says, and you believe ${him}.`);
				if (V.PC.dick !== 0 && V.PC.vagina !== -1) {
					App.Events.addParagraph(node, r);
					r = [];
					if (V.PC.boobs >= 300) {
						r.push(`"I would also adore serving someone like you," ${he} adds sincerely, ${his} emphasis making it quite clear the Sisters have heard rumors about your hermaphroditism. "We can't offer any further discount, but I promise I'd worship you with all my heart." ${He} bats ${his} eyes at you. "And my other parts, too!"`);
					} else {
						r.push(`${His} eyes flick downward momentarily, and ${he} looks nervous, swallowing before continuing. "Please let me be your slave," ${he} almost begs. "Serving another futa would, oh," and ${he} pauses, shivering a little. Recollecting ${himself}, ${he} goes on, "Wonderful. Serving you would be a dream come true."`);
					}
				}
			}
		}

		App.Events.addParagraph(node, r);
		r = [];

		const {
			HeA,
			heA, hisA, girlA, womanA,
		} = getPronouns(assistant.pronouns().main).appendSuffix("A");
		r.push(`${capFirstChar(V.assistant.name)}'s ${V.assistant.appearance} avatar appears on the screen next to the video call.`);
		if (V.assistant.personality <= 0) {
			r.push(`"I have stored the confirmation code, ${properMaster()}," it notes. "If you wish to take advantage of this promotion, use the slave buying menu to navigate to the appropriate school next week. I have appended a note to that school's entry to remind you."`);
		} else {
			if (school === "TSS" || school === "SCP") {
				r.push(`"And I would love to`);
				switch (V.assistant.appearance) {
					case "monstergirl":
						r.push(`break both ${his} virgin holes at once," the monster${girlA} exclaims, and shakes ${hisA} dicks for emphasis.`);
						break;
					case "shemale":
						r.push(`wreck ${his} virgin asshole," the shemale exclaims, and starts to jack off.`);
						break;
					case "amazon":
						r.push(`fist ${his} virgin cunt," the amazon exclaims, and helpfully raises the fist in question.`);
						break;
					case "businesswoman":
						r.push(`sell ${his} fresh pussy to the highest bidder," the business${womanA} exclaims.`);
						break;
					case "fairy":
						r.push(`play with ${his} clit and lap up those sweet virgin juices!" the fairy exclaims, licking ${hisA} lips.`);
						break;
					case "pregnant fairy":
						r.push(`play with ${his} clit and lap up those sweet motherly juices!" the fairy exclaims, licking ${hisA} lips.`);
						break;
					case "goddess":
						r.push(`teach ${him} all about being a real woman," the goddess exclaims, rubbing ${hisA} belly in anticipation.`);
						break;
					case "hypergoddess":
						r.push(`teach ${him} all about being a real woman," the goddess exclaims, rubbing ${hisA} massive belly in anticipation.`);
						break;
					case "loli":
						r.push(`play with ${him}!" the little ${girlA} exclaims happily while jumping up and down.`);
						break;
					case "preggololi":
						r.push(`play with ${him}!" the little ${girlA} exclaims happily while caressing ${hisA} belly.`);
						break;
					case "angel":
						r.push(`keep ${him} safe and craft the perfect future slavewife for someone," the angel says, crossing ${hisA} arms under ${hisA} chest.`);
						break;
					case "cherub":
						r.push(`pretty ${him} up for ${his} first love!" the cherub says, clasping ${hisA} hands together and fluttering back and forth.`);
						break;
					case "incubus":
						r.push(`brutally stretch both those holes until ${he} is a slave to my dick," the incubus says, stroking ${hisA} cock to erection.`);
						break;
					case "succubus":
						r.push(`shape ${him} into the perfect ${girl} for ${properMaster()}," the succubus says, licking ${hisA} lips with anticipation. "I'll make a real sex demon out of ${him}!"`);
						break;
					case "imp":
						r.push(`tease ${him} until ${he} is begging to have ${his} virginity taken," the imp says, rubbing ${hisA} hands together with anticipation.`);
						break;
					case "witch":
						r.push(`play with ${his} body," the witch says. "Test my spells on someone else for once."`);
						break;
					case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
						r.push(`break both ${his} virgin holes at once," the avatar exclaims, ${hisA} chest splitting open to reveal countless tentacles, the flesh at their bases writhing with unborn young. "Fill ${him} with young until ${he} is a bloated hive."`);
						break;
					case "schoolgirl":
						r.push(`make out with ${him}. ${He}'s cute!" the school${girlA} exclaims.`);
						break;
					default:
						r.push(`fuck ${his} virgin holes," ${heA} says.`);
				}
			} else if (school === "GRI" || school === "TCR") {
				r.push(`"And I would love to`);
				switch (V.assistant.appearance) {
					case "monstergirl":
						r.push(`get my tentacles on those tits," the monster${girlA} exclaims.`);
						break;
					case "shemale":
						r.push(`fuck those titties," the shemale exclaims, and starts to jack off.`);
						break;
					case "amazon":
						r.push(`put ${him} out to pasture," the amazon exclaims, indicating the skin of milk on ${hisA} belt.`);
						break;
					case "businesswoman":
						r.push(`put that cow in the dairy," the business${womanA} exclaims.`);
						break;
					case "fairy":
						r.push(`bounce on those nipples until they fill me with milk!" the fairy exclaims, rubbing ${hisA} belly.`);
						break;
					case "pregnant fairy":
						r.push(`bounce on those nipples until my babies are fed!" the fairy exclaims, rubbing ${hisA} swollen belly.`);
						break;
					case "goddess":
					case "hypergoddess":
						r.push(`taste those bountiful breasts," the goddess exclaims, licking ${hisA} lips.`);
						break;
					case "loli":
						r.push(`play with ${his} tits!" the little ${girlA} exclaims happily while jumping up and down.`);
						break;
					case "preggololi":
						r.push(`play with ${his} tits!" the little ${girlA} exclaims happily while caressing ${hisA} belly.`);
						break;
					case "angel":
						r.push(`feed all the hungry with those motherly breasts," the angel says, blushing at the thought.`);
						break;
					case "cherub":
						r.push(`have a pair just like them!" the cherub says, clasping ${hisA} hands to ${hisA} breasts.`);
						break;
					case "incubus":
						r.push(`wrap them around my shaft and blow a load right into ${his} face," the incubus says, stroking ${hisA} cock to erection.`);
						break;
					case "succubus":
						r.push(`teach ${him} the perfect way to tease ${properMaster()} with those boobs," ${heA} says, swelling ${hisA} own tits and pressing them against the screen.`);
						break;
					case "imp":
						r.push(`tease ${him} until ${he} cums to the slightest touch of ${his} nipples," the imp says, rubbing ${hisA} hands together with anticipation.`);
						break;
					case "witch":
						r.push(`play with their breasts," the witch says. "Test my lactation and breast growth spells on someone else for once."`);
						break;
					case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
						r.push(`penetrate those nipples," the avatar exclaims, ${hisA} chest splitting open to reveal countless tentacles, the flesh at their bases writhing with unborn young. "Fill ${him} with young until they pin ${him} to the floor. Then ${his} defenseless holes will be filled too."`);
						break;
					case "schoolgirl":
						r.push(`suck on those titties!" the school${girlA} exclaims.`);
						break;
					default:
						r.push(`make those breasts bounce," ${heA} says.`);
				}
			} else if (school === "LDE" || school === "NUL") {
				r.push(`"And I would love to`);
				switch (V.assistant.appearance) {
					case "monstergirl":
						r.push(`shove both my cocks up there," the monster${girlA} exclaims.`);
						break;
					case "shemale":
						r.push(`fuck that butt even bigger," the shemale exclaims, and starts to jack off.`);
						break;
					case "amazon":
						r.push(`fist that butthole," the amazon exclaims, and helpfully raises the fist in question.`);
						break;
					case "businesswoman":
						r.push(`see how many customers that asshole can bear," the business${womanA} exclaims.`);
						break;
					case "fairy":
						r.push(`use that butt as a pillow!" the fairy exclaims.`);
						break;
					case "pregnant fairy":
						r.push(`see if I can impregnate ${his} butt!" the fairy exclaims.`);
						break;
					case "goddess":
					case "hypergoddess":
						r.push(`see just how obedient ${he} really is," the goddess exclaims, flexing a hand for emphasis.`);
						break;
					case "loli":
						r.push(`play with ${his} big butt!" the little ${girlA} exclaims happily while jumping up and down.`);
						break;
					case "preggololi":
						r.push(`play with ${his} big butt!" the little ${girlA} exclaims happily while caressing ${hisA} belly.`);
						break;
					case "angel":
						r.push(`have an ass like that..." the angel trails off, a finger to ${hisA} lips as ${heA} fantasizes.`);
						break;
					case "cherub":
						r.push(`take a seat on that ass," the cherub sighs. "Flying all the time gets tiring."`);
						break;
					case "incubus":
						r.push(`wrap that ass around my shaft and blow a load across ${his} back," the incubus says, stroking ${hisA} cock to erection.`);
						break;
					case "succubus":
						r.push(`teach ${him} the perfect way to tease ${properMaster()} with that ass," ${heA} says, swelling ${hisA} own behind, pressing it against the screen and winking ${hisA} butthole tantalizingly at you.`);
						break;
					case "imp":
						r.push(`spank that ass till it's big and red then take a nap on it," the imp says, rubbing ${hisA} hands together with anticipation and yawning.`);
						break;
					case "witch":
						r.push(`play with ${his} ass," the witch says. "Test my butt growth spells on someone else for once. Last time I was hobbling around with a pair of tits as a rear for a week..."`);
						break;
					case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
						r.push(`split ${his} asshole," the avatar exclaims, ${hisA} chest splitting open to reveal countless tentacles, the flesh at their bases writhing with unborn young. "Fill ${his} ass with larva until ${his} belly reaches the floor, swell ${his} bottom with aphrodisiacs, and watch ${him} birth until ${he} breaks."`);
						break;
					case "schoolgirl":
						r.push(`lick ${his} big soft behind," the school${girlA} exclaims, and sticks out ${hisA} tongue.`);
						break;
					default:
						r.push(`fuck that ass," ${heA} says.`);
				}
			} else if (school === "TGA") {
				r.push(`"And I would love to`);
				switch (V.assistant.appearance) {
					case "monstergirl":
						r.push(`shove both my cocks up ${his} virgin anus," the monster${girlA} exclaims.`);
						break;
					case "shemale":
						r.push(`fuck that virgin asshole," the shemale exclaims, and starts to jack off.`);
						break;
					case "amazon":
						r.push(`finger fuck ${his} virgin ass," the amazon exclaims, and helpfully raises the fingers in question.`);
						break;
					case "businesswoman":
						r.push(`sell ${his} anal virginity to the highest bidder," the business${womanA} exclaims.`);
						break;
					case "fairy":
						r.push(`give the dick a great big hug and suckle out all the precum!" the fairy exclaims, rubbing ${hisA} legs together.`);
						break;
					case "pregnant fairy":
						r.push(`play meet the baby! ...Well, maybe just with you,`);
						if (V.PC.title === 0) {
							r.push(`Big Sis,"`);
						} else {
							r.push(`Big Bro,"`);
						}
						r.push(`the fairy exclaims, rubbing ${hisA} legs together.`);
						break;
					case "goddess":
					case "hypergoddess":
						r.push(`see ${him} put that dick to work," the goddess exclaims, one sultry finger at ${hisA} lips.`);
						break;
					case "loli":
						r.push(`play with ${his} dick!" the little ${girlA} exclaims happily while jumping up and down.`);
						break;
					case "preggololi":
						r.push(`get that dick in me!" the little ${girlA} exclaims happily while caressing ${hisA} belly and licking ${hisA} lips.`);
						break;
					case "angel":
						r.push(`wrap that penis up in a nice bow for ${his} wife to untie," the angel says, blushing and swaying side to side.`);
						break;
					case "cherub":
						r.push(`know how long ${he} could go for," the cherub says. "${He} could probably fuck all night long!"`);
						break;
					case "incubus":
						r.push(`plow ${his} ass and watch ${him} ejaculate against ${his} will," the incubus says, stroking ${hisA} cock to erection.`);
						break;
					case "succubus":
						r.push(`teach ${him} the perfect way to tease ${properMaster()} with that cock," ${heA} says, ${hisA} clit steadily enlarging until it's the size of ${hisA} leg. ${HeA} hefts it to ${hisA} mouth and enthusiastically tongues ${hisA} urethra.`);
						break;
					case "imp":
						r.push(`ride that cock until I'm too heavy to fly," the imp says, rubbing ${hisA} belly and spreading ${hisA} legs.`);
						break;
					case "witch":
						r.push(`play with that dick," the witch says. "Test my cock growth and cum amplification spells on someone else for once. Last time I sprouted a cock bigger than me and my belly steadily swelled with cum until I jacked off. I got so tired I couldn't do it anymore and nearly burst like a cum balloon..."`);
						break;
					case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
						r.push(`fuck ${his} cock," the avatar exclaims, ${hisA} chest splitting open to reveal countless tentacles, the flesh at their bases writhing with unborn young. "Squirm down to ${his} balls and pump them full of larva and watch ${him} birth them until ${he} breaks."`);
						break;
					case "schoolgirl":
						r.push(`suck that dick," the school${girlA} exclaims, and sticks out ${hisA} tongue.`);
						break;
					default:
						r.push(`train that body," ${heA} says.`);
				}
			} else if (school === "HA") {
				r.push(`"And I would love to`);
				switch (V.assistant.appearance) {
					case "monstergirl":
						r.push(`break both ${his} holes at once," the monster${girlA} exclaims, and shakes ${hisA} dicks for emphasis.`);
						break;
					case "shemale":
						r.push(`wreck ${his} amazonian asshole," the shemale exclaims, and starts to jack off.`);
						break;
					case "amazon":
						r.push(`fist ${his} cunt," the amazon exclaims, and helpfully raises the fist in question.`);
						break;
					case "businesswoman":
						r.push(`sell ${his} fresh pussy to the highest bidder," the business${womanA} exclaims.`);
						break;
					case "fairy":
						r.push(`play with ${his} clit and lap up those sweet juices!" the fairy exclaims, licking ${hisA} lips.`);
						break;
					case "pregnant fairy":
						r.push(`play with ${his} clit and lap up those sweet juices!" the fairy exclaims, licking ${hisA} lips.`);
						break;
					case "goddess":
						r.push(`teach ${him} all about being a real woman," the goddess exclaims, rubbing ${hisA} belly in anticipation.`);
						break;
					case "hypergoddess":
						r.push(`teach ${him} all about being a real woman," the goddess exclaims, rubbing ${hisA} massive belly in anticipation.`);
						break;
					case "loli":
						r.push(`play with ${him}!" the little ${girlA} exclaims happily while jumping up and down.`);
						break;
					case "preggololi":
						r.push(`play with ${him}!" the little ${girlA} exclaims happily while caressing ${hisA} belly.`);
						break;
					case "angel":
						r.push(`keep ${him} safe and craft the perfect future slavewife for someone," the angel says, crossing ${hisA} arms under ${hisA} chest.`);
						break;
					case "cherub":
						r.push(`pretty ${him} up for ${his} first love!" the cherub says, clasping ${hisA} hands together and fluttering back and forth.`);
						break;
					case "incubus":
						r.push(`brutally stretch both those holes until ${he} is a slave to my dick," the incubus says, stroking ${hisA} cock to erection.`);
						break;
					case "succubus":
						r.push(`shape ${him} into the perfect ${girl} for ${properMaster()}," the succubus says, licking ${hisA} lips with anticipation. "I'll make a real sex demon out of ${him}!"`);
						break;
					case "imp":
						r.push(`tease ${him} until ${he} is begging to have ${his} virginity taken," the imp says, rubbing ${hisA} hands together with anticipation.`);
						break;
					case "witch":
						r.push(`play with ${his} body," the witch says. "Test my spells on someone else for once."`);
						break;
					case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
						r.push(`break both ${his} virgin holes at once," the avatar exclaims, ${hisA} chest splitting open to reveal countless tentacles, the flesh at their bases writhing with unborn young. "Fill ${him} with young until ${he} is a bloated hive."`);
						break;
					case "schoolgirl":
						r.push(`make out with ${him}. ${He}'s cute!" the school${girlA} exclaims.`);
						break;
					default:
						r.push(`fuck ${his} amazonian holes," ${heA} says.`);
				}
			} else {
				switch (V.assistant.appearance) {
					case "monstergirl":
						r.push(`"And I love to fuck futas!" ${heA} shouts, dicks painfully erect.`);
						break;
					case "shemale":
						r.push(`"And I love to fuck futas!" ${heA} shouts, cock painfully erect.`);
						break;
					case "amazon":
						r.push(`"And I love to fuck futas!" ${heA} howls, and then adds more quietly, "A-and get fucked by futas."`);
						break;
					case "businesswoman":
						r.push(`"And I love to fuck futas!" ${heA} exclaims, and then blushes furiously.`);
						break;
					case "fairy":
					case "pregnant fairy":
						r.push(`"And I love to fuck futas!" ${heA} exclaims, flying circles around you.`);
						break;
					case "goddess":
					case "hypergoddess":
						r.push(`"And I love to fuck futas!" ${heA} exclaims, awestruck with anticipation.`);
						break;
					case "cherub":
					case "loli":
						r.push(`"And I love to fuck futas!" ${heA} exclaims, then blushes beet red when ${heA} realizes what ${heA} said.`);
						break;
					case "preggololi":
						r.push(`"And I love to fuck futas!" ${heA} exclaims, rubbing ${hisA} bulging belly with anticipation.`);
						break;
					case "angel":
						r.push(`"Keep it away from me! It is an aberration!" ${heA} shouts, before flying off screen in a huff.`);
						break;
					case "incubus":
						r.push(`"And I love to fuck futas!" ${heA} exclaims, ${hisA} erect dick throbbing with anticipation.`);
						break;
					case "succubus":
						r.push(`"And I love to get fucked by futas!" ${heA} exclaims,`);
						if (V.PC.dick !== 0 && V.PC.vagina !== -1) {
							r.push(`blowing you a kiss.`);
						} else {
							r.push(`${hisA} pussy already wet with anticipation.`);
						}
						break;
					case "imp":
						r.push(`"And I love to get fucked by futas till I'm too heavy to fly," ${heA} exclaims, rubbing ${hisA} belly and spreading ${hisA} legs.`);
						break;
					case "witch":
						r.push(`"And I love to fuck futas!" ${heA} exclaims, readying a spell to make them last longer.`);
						break;
					case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
						r.push(`"And I love to fuck futas!" ${heA} exclaims, ${hisA} chest splitting open to reveal countless tentacles, the flesh at their bases writhing with unborn young. "So many holes to force young into! I can't wait to turn ${him} into a bulging, squirming, bursting nursery!"`);
						break;
					case "schoolgirl":
						r.push(`"And I love to fuck futas!" ${heA} exclaims, bouncing with excitement.`);
						break;
					default:
						r.push(`"And I love to fuck futas!" ${heA} exclaims.`);
				}
			}
			r.push(`"Ahem. I have stored the confirmation code, ${properMaster()}," ${heA} notes. "If you wish to take advantage of this promotion, use the slave buying menu to navigate to the appropriate school next week. I have appended a note to that school's entry to remind you."`);
		}
		App.Events.addParagraph(node, r);
	}
};


code:
/** This event serves as a controller for the "main" plot event chain, which is designed to advance the plot based ONLY on the current (effective) week.
 * These events don't have to keep their own gating code or results variables, because this chain controller tracks when they should be executed. */
App.Events.TimeGatedPlotEvent = class TimeGatedPlotEvent extends App.Events.BaseEvent {
	constructor(actors, params) {
		super(actors, params);

		// sparse array, indexed by effective week
		// maybe mercs should be a separate chain? Oh well, they're here for now.
		this.events = [];
		this.events[4] = new App.Events.PArcologyNaming();
		this.events[6] = new App.Events.PStripClubClosing();
		this.events[8] = new App.Events.PStripClubAftermath();
		this.events[17] = new App.Events.PShootInvitation();
		this.events[20] = new App.Events.PSlaveFood();
		this.events[24] = new App.Events.PMilitia();
		this.events[31] = new App.Events.PMercenaries();
		this.events[35] = new App.Events.PSnatchAndGrab();
		this.events[43] = new App.Events.PInvasion();
		this.events[46] = new App.Events.PRaidInvitation();
		this.events[54] = new App.Events.PPeacekeepersDeficit();
		this.events[56] = new App.Events.PUndergroundRailroad();
		this.events[58] = new App.Events.PBombing();
		this.events[61] = new App.Events.PTraitorMessage();
		this.events[62] = new App.Events.PDefenseFears();
		this.events[65] = new App.Events.PCitizensAndCivilians();
		this.events[67] = new App.Events.PCoupCollaborationChoice();
		this.events[69] = new App.Events.PHackerSupport();
		this.events[70] = new App.Events.PCoupCollaboration();
		// week 71 plot event is one of three possibilities, depending on game state
		const doubleAgent = (V.traitorType !== "agent" && V.traitorType !== "trapper") ? 0 : 1;
		if (V.traitorType === "trapper") {
			this.events[71] = new App.Events.PCoupBetrayal();
		} else if (V.mercenaries + V.personalArms + V.hackerSupport + doubleAgent < 5) {
			this.events[71] = new App.Events.PCoupLoss();
		} else {
			this.events[71] = new App.Events.PCoupAttempt();
		}
		this.events[72] = new App.Events.PCoupAftermath();

		// events with complex prerequisites don't belong here...they're just normal scheduled events and need their own chain controller or result flags
		for (let week = 0; week < this.events.length; ++week) {
			const event = this.events[week];
			if (event) {
				if (event.actorPrerequisites().length > 0) {
					throw new Error(`Time-gated plot events are not permitted to cast actors. Check event: ${event.eventName}`);
				}
				if (V.debugMode !== 0 && event.eventPrerequisites().length > 0) {
					// unlike ordinary nonrandom events, events in the plot chain only get ONE chance to execute, so you have to be very careful with prereqs
					console.log(`Time-gated plot event ${event.eventName} imposes prerequisites and WILL BE SKIPPED ENTIRELY if the prerequisites are not met on week ${week}!`);
				}
			}
		}
	}

	eventPrerequisites() {
		if (V.plot === 1) {
			const effectiveWeek = App.Events.effectiveWeek();
			// choose the earliest event that we need to run, within the window between the last event we ran and the current week, and run it
			// this means that effectiveWeek can jump ahead and we still won't skip any events...we'll just run whatever was missed until we catch up
			// but we also won't ever repeat any events, or play any new ones that should have occurred before the last event we played
			for (let week = V.plotEventWeek + 1; week <= effectiveWeek; ++week) {
				const event = this.events[week];
				if (event && event.eventPrerequisites().every(p => p())) {
					this.params.event = event;
					this.params.week = week;
					break;
				}
			}
		}
		return [() => !!this.params.event];
	}

	get eventName() {
		return "TGPE " + (this.params.event ? this.params.event.eventName : "");
	}

	execute(node) {
		V.plotEventWeek = this.params.week;
		this.params.event.execute(node);
	}
};


code:
App.Facilities.AgentSelect = function() {
	const f = document.createDocumentFragment();

	App.UI.DOM.appendNewElement("h2", f, "Appoint an Agent from your devoted slaves");
	f.append(App.UI.SlaveList.slaveSelectionList(
		s => App.Entity.facilities.arcologyAgent.manager.checkRequirements(s),
		(slave) => App.UI.DOM.passageLink(SlaveFullName(slave), "Agent Assignment Scene",
			() => V.AS = slave.ID),
		s => App.Entity.facilities.arcologyAgent.manager.slaveHasExperience(s)
	));
	return f;
};