code:
App.Events.PMilitia = class PMilitia extends App.Events.BaseEvent {
	constructor(actors, params) {
		super(actors, params);
	}

	get eventName() {
		return "Militia";
	}

	execute(node) {
		let r = [];
		const dronesTooCost = 5000;
		const selfAloneCost = 2000;
		r.push(`The outside world continues to deteriorate. The Free Cities are a popular target for old world demagogues looking for a convenient scapegoat for the restive populate to hate. The Free Cities were originally founded without much thought towards how they might be defended, should it come to that. But recently, the leading citizens have begun to worry that there might one day be barbarians at the gates. It has been suggested that citizens of means should form a militia.`);
		App.Events.addParagraph(node, r);
		r = [];

		r.push(`This is a less ludicrous suggestion than it might sound. Your arcology's security drones alone could form a formidable means of defense if adapted for that purpose. However, it's not likely that the anarchic Free Cities are going to ever make this anything more than a polite suggestion.`);
		App.Events.addParagraph(node, r);
		r = [];

		r.push(App.UI.DOM.makeElement("span", `This is a unique opportunity.`, "bold"));
		r.push(`Without this security scare, it's unlikely you could convince any of your free-spirited tenants to even stay near lethally armed drones.`);
		App.Events.addParagraph(node, r);

		const responses = [];
		if (V.arcologyUpgrade.drones === 1) {
			responses.push(new App.Events.Result(`Arm yourself and your drones`, armDrones, `This will cost ${cashFormat(dronesTooCost)}`));
		}
		responses.push(new App.Events.Result(`Arm yourself`, armOnlySelf, `This will cost ${cashFormat(selfAloneCost)}`));
		responses.push(new App.Events.Result(`Ignore this foolishness`, ignore));

		App.Events.addResponses(node, responses);

		function armDrones() {
			let r = [];
			r.push(`In a time of uncertainty, the public adores people who protect them. So, in addition to publicly procuring yourself the latest weapons and armor, you update the arcology's drone systems. The security drones' riot cannons can be replaced for easy maintenance, so it's rather easy to provide them with alternate, lethal weaponry that they can switch to if it becomes necessary. ${V.arcologies[0].name} becomes known as one of the best-protected in the Free Cities. Your reputation has greatly improved.`);
			unlock();
			repX(4000, "event");
			cashX(-dronesTooCost, "event");
			V.personalArms = 3;
			V.PC.skill.combat = Math.max(V.PC.skill.combat, 30);
			return r;
		}

		function armOnlySelf() {
			let r = [];
			r.push(`In a time of uncertainty, the public looks up to people who project strength. So, you purchase yourself some of the latest armor and weapons, and make sure they are visible in a glass-walled cabinet in your office. Many of your wealthier tenants follow suit. A few of them even emulate your example and practice using these implements once a week. Your reputation has improved.`);
			unlock();
			repX(1500, "event");
			cashX(-selfAloneCost, "event");
			V.personalArms = 1;
			V.PC.skill.combat = Math.max(V.PC.skill.combat, 30);
			return r;
		}

		function ignore() {
			let r = [];
			r.push(`No doubt this panicky fad will pass. You ignore the controversy. In a few days, the subject of a militia passes from the public mind.`);
			unlock();
			V.personalArms = 0;
			return r;
		}

		function unlock() {
			V.nextButton = "Continue";
			App.Utils.scheduleSidebarRefresh();
		}
	}
};


code:
App.Events.pAbducted = class pAbducted extends App.Events.BaseEvent {
	constructor(actors, params) {
		super(actors, params);
	}

	eventPrerequisites() {
		return [
			() => App.Events.effectiveWeek() === 12,
			() => V.raped === -1,
			() => V.arcologyUpgrade.drones !== 1,
			() => V.BodyguardID === 0,
			() => V.PC.career !== "arcology owner",
			() => V.PC.visualAge < 14
		];
	}

	execute(node) {
		V.nextButton = " "; // disable Continue
		let r = [];
		const {
			girlP
		} = getPronouns(V.PC).appendSuffix("P");
		V.raped = 1;

		const contractCost = 1000;
		const genParam = {minAge: 22, race: "nonslave", disableDisability: 1};
		const abductor = GenerateNewSlave("XY", genParam);
		abductor.boobs = 100;
		abductor.skill.oral = 0;
		abductor.skill.anal = 0;
		abductor.muscles = Math.max(abductor.muscles, 40);
		abductor.origin = `You sentenced $him to enslavement for the attempted abduction of a child - you, to be exact.`;
		abductor.devotion = -100;
		abductor.trust = -100;
		setHealth(abductor, jsRandom(-40, -20), normalRandInt(15, 3), undefined, 1, random(30, 80));
		abductor.anus = 0;
		abductor.behavioralFlaw = "arrogant";
		abductor.sexualFlaw = "judgemental";

		const {
			He,
			his, he, him, himself, woman
		} = getPronouns(abductor);

		r.push(`While returning from a meeting with a prospective investor, an unfortunate wrong turn has led you into a rather seedy area of your arcology. You feel distinctly uncomfortable for some reason. Your suspicions are quickly confirmed as a bag is swung over your head. Your grab your assailant's wrists and struggle to keep them from completely engulfing you,`);

		if (overpowerCheck(abductor, V.PC) >= random(1, 100)) {
			r.push(`only to find that you're quite capable of keeping them at bay.`);
			V.raped = 0;
		} else {
			r.push(`only to find that you're far too outmatched to be able to hold them back.`);
		}
		if (V.raped === 0) { // fought back and got stabbed
			App.Events.addParagraph(node, r);
			r = [];
			V.fcnn.push("...is stable after altercation and plans for increased security measures following...");

			r.push(`You quickly manage to gain the upper hand, pulling yourself out of the bag and getting a good look at the would-be kidnapper. Being bested by a child was not in his plans and, short of options, draws a knife and drives it into your stomach. Realizing what he just did, he panics and flees, leaving you bleeding, his blade still stuck in you.`);
			if (V.PC.skill.medicine < 0) {
				r.push(`You cry out as you yank the weapon from your body, and clutching the gushing wound, hobble back the way you came — the way back to safety. The world spins as you lose consciousnesses.`);
				App.Events.addParagraph(node, r);
				r = [];
				r.push(`You awaken on a hard cot, staring face to face with a rather haggard looking man. You leap in shock, sending the man swearing and tearing your stitches open. As you regain your composure, and get restitched, you realize that you are in a particularly shitty clinic known for their outrageous treatment fees. The wound was minor and should heal readily, but it will keep you out of commission for a little. `);
				if (V.PC.preg > 2 && V.PC.pregKnown) {
					r.push(`You're just glad it didn't harm your womb. This could have been a lot worse.`);
				}
				App.Events.addParagraph(node, r);
				r = [];
				r.push(`It would be prudent to up security in your arcology. That or take a guard along when you leave the penthouse. Your wallet might actually hurt more than your injury does, ${cashFormatColor(5000, true)} for crappy stitches, but at least you'll be on your feet again in a week.`);
				App.Events.addParagraph(node, r);
				cashX(-5000, "event");
			} else {
				r.push(`As much as it hurts, you steel yourself and apply pressure to the wound around the weapon before slowly hobbling back the way you came. It doesn't take long before someone comes rushing to your aid, and you've managed to keep your composure long enough to convey where you should be taken for medical treatment.`);
				App.Events.addParagraph(node, r);
				r = [];
				r.push(`You awaken in a nice, warm bed and are immediately greeted by a lovely buxom nurse; both familiar aspects of the clinic you've chosen for any serious medical emergencies. The wound was minor, only requiring some stitches, and should heal readily, but it will keep you out of commission for a little. At least the bill of ${cashFormatColor(1000, true)} isn't that bad.`);
				if (V.PC.preg > 2 && V.PC.pregKnown) {
					r.push(`You're just glad it didn't harm your womb. This could have been a lot worse.`);
				}
				App.Events.addParagraph(node, r);
				r = [];
				r.push(`It would be prudent to up security in your arcology. That or take a guard along when you leave the penthouse. You are undeniably a high-value target for wealthy collectors and would rather avoid any future attempts and or stabbings. Even with a full description of him, your assailant got away; there was just nobody interested in tracking him down.`);
				App.Events.addParagraph(node, r);
				cashX(-1000, "event");
			}
			node.append(App.UI.DOM.passageLink("Continue", V.nextLink));
			V.nextButton = "Continue";
			App.Utils.scheduleSidebarRefresh();
			V.PC.health.shortDamage = 2;
			V.PC.health.longDamage = 1;
		} else {
			r.push(`Once your vision is obscured, your attacker sweeps your legs and tosses you into a waiting crate.`);
			r.push(Spoken(abductor, `"Be a good little ${girlP} and keep quiet. Wouldn't want anything bad to happen to ya, eh? I'd really hate to damage the merchandise."`));
			r.push(`With nothing holding you, you slip the bag off yourself and assess the situation. Peeking from an airhole, you can see that you're being loaded on a dolly destined for the loading docks.`);
			App.Events.addParagraph(node, r);

			App.Events.addResponses(node, [
				new App.Events.Result("Scream for help", badEnd),
				new App.Events.Result("Remain calm", scream),
			]);
		}

		function badEnd() {
			const node = new DocumentFragment();
			let r = [];
			r.push(`You let loose a deafening shriek, desperate for someone to hear you.`);
			r.push(Spoken(abductor, `"I said SHUT IT you little bitch!"`));
			r.push(`Your head is bashed into the side of the box as your kidnapper kicks it, sending it and you tumbling to the floor.`);
			r.push(Spoken(abductor, `"Shit!"`));
			r.push(`Your abductor cursing and spitting is the last thing you hear before you lose consciousness.`);
			App.Events.addParagraph(node, r);

			r = [];
			r.push(`Once the realization strikes that you've gone missing, your arcology descends into lawlessness as the less than reputable clash to see who can seize control of building, at least until a new owner arrives to clean them out. An indeterminate amount of time later, a slave that looks a lot like the lost owner of ${V.arcologies[0].name} is seen; who's to say if it is you, or somebody else though? The story of your new life may be worth telling, but it must be told elsewhere.`);
			App.Events.addParagraph(node, r);

			App.Events.addParagraph(node, ["GAME OVER"]);
			V.ui = "start";
			App.Utils.scheduleSidebarRefresh();
			return node;
		}

		function scream() {
			const node = new DocumentFragment();
			const bounty = 500 * random(3, 6);
			let r = [];
			r.push(`Calling for help when it's just you and your abductor is nothing short of an invitation for trouble, so you keep your mouth shut and wait for an opportunity. There's only so many ways in and out of the arcology, and there's bound to be people going about their business through them at this hour. After an uncomfortably cramped ride and having to put up with your captive merrily humming to himself and arriving at a suitably populated loading dock, the thought occurs to you: what if they don't believe you are anything more than an unbroken slave?`);
			if (V.PC.actualAge < V.minimumSlaveAge) {
				r.push(`Fortunately, you are actually underage, so your screams for help quickly attract concerned workers. They corner the man and pry the lid off your box, allowing you to clamber back onto solid ground. Your would-be captor makes a short lived escape attempt straight into a fist once he realizes his plans are ruined. He's quickly tied up and presented to you for revenge.`);
				abductor.minorInjury = "black eye";
			} else {
				r.push(`Sometimes simple is better, so you scream out that you're being kidnapped and will give ${cashFormat(bounty)} to anyone that assures your return to safety. The prospect of easy money quickly has your captor tackled, you freed and helped to your feet. It may have costed you ${cashFormatColor(bounty, true)}, but the sight of the man groveling at your feet for mercy is worth it.`);
				cashX(-bounty, "event");
			}
			App.Events.addParagraph(node, r);
			r = [];
			r.push(`It would be prudent to up security in your arcology. That or take a guard along when you leave the penthouse. You are undeniably a high-value target for wealthy collectors and would rather avoid the indignity of being crammed in a box again.`);
			App.Events.addParagraph(node, r);
			V.nextButton = "Continue";
			App.Utils.scheduleSidebarRefresh();
			V.fcnn.push("...plans for increased security measures following the unsuccessful abduction of...");

			App.UI.DOM.appendNewElement("div", node, `Now the only remaining question is what to do with the would-be kidnapper. You could toss ${him} out of the arcology, but it might be more fun to turn the tables on ${him}.`);
			App.UI.DOM.appendNewElement("div", node, `Applying enslavement as punishment will cost ${cashFormat(contractCost)}. Doing so and then selling ${him} immediately will bring in approximately ${cashFormat(slaveCost(abductor) - contractCost)}.`, ["note"]);

			node.append(App.Desc.longSlave(abductor, {market: "generic"}));
			const choices = [];
			if (V.cash >= contractCost) {
				choices.push(new App.Events.Result(`Enslave ${him}`, enslave));
				choices.push(new App.Events.Result(`Sentence ${him} to a day in the stocks, then enslave ${him}`, stocks));
				if (V.arcade > 0) {
					choices.push(new App.Events.Result(`Enslave ${him} and sentence ${him} to a month in the arcade`, arcade));
				}
				if (V.dairy > 0 && V.dairyRestraintsSetting > 1) {
					choices.push(new App.Events.Result(`Enslave ${him} and send ${him} straight to the industrial dairy`, dairy));
				}
				if (V.farmyard > 0) {
					choices.push(new App.Events.Result(`Enslave ${him} and send ${him} straight to the farmyard`, farmyard));
				}
				if (V.seeExtreme > 0) {
					choices.push(new App.Events.Result(`Punitively amputate ${his} limbs, and then enslave ${him}`, amputate));
				}
			} else {
				choices.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}.`));
			}
			choices.push(new App.Events.Result(`Publicly flog the criminal`, flog));
			App.Events.addResponses(node, choices);
			return node;

			function enslave() {
				const el = new DocumentFragment();
				cashX(forceNeg(contractCost), "slaveTransfer", abductor);
				el.append(`You complete the legalities and biometric scanning quickly and without fuss. The idiot will regret crossing you when ${he} wakes in the penthouse for basic slave induction.`);
				el.append(App.UI.newSlaveIntro(abductor));
				return el;
			}

			function stocks() {
				const el = new DocumentFragment();
				const r = [];
				healthDamage(abductor, 10);
				abductor.behavioralFlaw = "odd";
				abductor.sexualFlaw = "hates penetration";
				abductor.anus = 2;
				seX(abductor, "oral", "public", "penetrative", 23);
				seX(abductor, "anal", "public", "penetrative", 12);
				if (abductor.vagina > -1) {
					abductor.vagina = 2;
					seX(abductor, "vaginal", "public", "penetrative", 12);
					if (random(1, 100) > 60 && isFertile(abductor)) {
						knockMeUp(abductor, 100, 0, -2);
					}
				} else {
					seX(abductor, "anal", "public", "penetrative", 12);/* even more anal */
				}
				cashX(forceNeg(contractCost), "slaveTransfer", abductor);

				r.push(`You declare ${his} holes fair game for the entire arcology. ${He} spends a torturous day in the stocks before being hauled in for enslavement, somewhat the worse for wear and acting oddly due to ${his} ordeal, bruises all over ${his} body, cum leaking from ${his} loosened anus${(abductor.vagina > -1) ? ` and <span class="lime">fucked-out</span> pussy` : ``}. The public enjoys the fun.`);
				repX(500, "event");
				V.arcologies[0].prosperity += 2;
				r.push(App.UI.newSlaveIntro(abductor));
				App.Events.addParagraph(el, r);
				return el;
			}

			function arcade() {
				assignJob(abductor, "be confined in the arcade");
				abductor.sentence = 4;
				cashX(forceNeg(contractCost), "slaveTransfer", abductor);
				newSlave(abductor);/* skip New Slave Intro */
				return `You complete the legalities and biometric scanning quickly and cautiously. The idiot will be in for a surprise when ${he} awakes to find ${he} can't move and a dick is in ${his} ass.`;
			}

			function dairy() {
				const el = new DocumentFragment();
				const r = [];
				assignJob(abductor, "work in the dairy");
				cashX(forceNeg(contractCost), "slaveTransfer", abductor);
				r.push(`You complete the legalities and biometric scanning quickly and cautiously. The idiot will wake up`);
				if (V.dairyStimulatorsSetting > 1) {
					r.push(`in agony as ${his} anus takes the rectal hydration dildo.`);
				} else {
					r.push(`to find ${his} chest has begun swelling with milk.`);
				}
				abductor.boobs += 300;
				newSlave(abductor); /* skip New Slave Intro */
				App.Events.addNode(el, r);
				return el;
			}

			function farmyard() {
				const el = new DocumentFragment();
				const actions = [`${V.seeBestiality ? 'getting fucked by' : 'putting on shows with'} animals`];
				if (V.farmyardShows < 2) {
					actions.push(`working the fields`);
				}
				const r = [];
				assignJob(abductor, "work as a farmhand");
				cashX(forceNeg(contractCost), "slaveTransfer", abductor);
				r.push(`You complete the legalities and biometric scanning quickly and cautiously. The idiot will wake up in ${V.farmyardName}, where ${he} will spend the rest of ${his} days ${toSentence(actions)}.`);
				newSlave(abductor);/* skip New Slave Intro */
				App.Events.addNode(el, r);
				return el;
			}

			function amputate() {
				const el = new DocumentFragment();
				const r = [];
				healthDamage(abductor, 20);
				removeLimbs(abductor, "all");
				abductor.behavioralFlaw = "odd";
				cashX(forceNeg(contractCost), "slaveTransfer", abductor);
				r.push(`You want ${him} to suffer for what ${he} tried to pull on you. You make sure ${he} is fully awake as ${he} is strapped into the autosurgery. You take great pleasure in watching ${him} struggle as ${his} limbs are taken, one by one. Of course, ${his} health is affected and the horrible experience has left ${him} acting oddly. After ${he} has stabilized, it's off to the penthouse for basic slave induction. You'd like to see ${him} try and carry you off again without arms and legs.`);
				if (abductor.balls > 0) {
					const geld = function() {
						const el = new DocumentFragment();
						const r = [];
						healthDamage(abductor, 20);
						abductor.balls = 0;
						abductor.devotion -= 25;
						abductor.trust -= 25;
						cashX(forceNeg(contractCost), "slaveTransfer", abductor);
						r.push(`You want ${him} to suffer for what ${he} tried to pull on you. You make sure ${he} is fully awake as ${he} is strapped into the autosurgery, taking the time to roughly fondle ${his} balls. You take great pleasure in watching ${him} struggle as ${his} testicles are removed. Once ${he} can stand again, it's off to the penthouse for basic slave induction.`);
						r.push(App.UI.newSlaveIntro(abductor));
						App.Events.addNode(el, r);
						return el;
					};
					App.Events.addResponses(el, [new App.Events.Result(`Enslave the criminal and geld ${him}`, geld)]);
				}
				App.Events.addNode(el, r);
				return el;
			}

			function flog() {
				const el = new DocumentFragment();
				const r = [];
				r.push(`Naturally, the wretch will be thrown out of the arcology, but an example must first be made. Free people must understand that criminals who commit outrages against them will be severely punished. The protesting malefactor is stripped and flogged on the promenade before being escorted bleeding from the arcology. The public approves of this harshness.`);
				repX(500, "event");
				App.Events.addNode(el, r);
				return el;
			}
		}
	}
};

repo_name: DontAskDontTell/fc

license: mit


code:
App.Events.pAidInvitation = class pAidInvitation extends App.Events.BaseEvent {
	constructor(actors, params) {
		super(actors, params);
	}

	actorPrerequisites() {
		return [];
	}

	eventPrerequisites() {
		return [
			() => V.plot === 1,
			() => V.week >= 29,
			() => !V.eventResults.aid
		];
	}

	execute(node) {
		const trapped = [];
		let r = [];
		V.eventResults.aid = -2; // Mark event as seen.
		if (V.seeDicks <= 75) {
			trapped.push("convent");
			trapped.push("school");
			trapped.push("housewives");
			trapped.push("volleyballTeam");
			if (V.seePreg !== 0) {
				trapped.push("maternity");
				if (V.continent === "Africa") {
					trapped.push("seizedMission");
				}
			}
		}
		if (V.seeDicks >= 25) {
			trapped.push("conversion");
		}
		trapped.push("gradeSchool");
		V.eventResults.aidTarget = trapped.random();

		r.push(`A small old world country near the arcology is experiencing serious unrest. Its corrupt government is doing an even poorer job than most of addressing chronic joblessness and general malaise. Thus far, it's been a fertile source of people in poverty for slavers to target, and little else. Lately, though, it's been showing signs worse may be to come. You've instructed ${V.assistant.name} to flag communications from the area; there's always a possibility that business opportunities may arise from the benighted country, and the situation is becoming so unstable it's prudent to keep a personal eye on it anyway. You receive just such a call from`);
		if (V.eventResults.aidTarget === "convent") {
			r.push(`the leader of a female-oriented religious retreat`);
		} else if (V.eventResults.aidTarget === "school") {
			r.push(`the principal of a preparatory school for girls`);
		} else if (V.eventResults.aidTarget === "housewives") {
			r.push(`the queen bee of a small group of suburban housewives`);
		} else if (V.eventResults.aidTarget === "maternity") {
			r.push(`the maternity ward of a hospital`);
		} else if (V.eventResults.aidTarget === "conversion") {
			r.push(`the owner of a religious sexual orientation therapy camp`);
		} else if (V.eventResults.aidTarget === "gradeSchool") {
			r.push(`a student stranded`);
		} else if (V.eventResults.aidTarget === "volleyballTeam") {
			r.push(`a student athlete`);
		} else if (V.eventResults.aidTarget === "seizedMission") {
			r.push(`the leader of a group of missionaries`);
		}
		r.push(`in the capital city.`);
		App.Events.addParagraph(node, r);
		r = [];
		if (V.eventResults.aidTarget !== "seizedMission") {
			r.push(`They are deeply worried by the situation. There have been large riots over the past week, and yesterday they became seriously violent. The unrest is targeting`);
			if (V.eventResults.aidTarget === "convent") {
				r.push(`better-off citizens, including the caller. Though most of the nuns have already left, the leader and a few of her women are now stuck in the area and are running out of options as the riots lock down transportation.`);
			} else if (V.eventResults.aidTarget === "school") {
				r.push(`better-off citizens, including the caller. Though most of the students and faculty have already made it out, the principal and a few students are now stuck in the area and are running out of options as the riots lock down transportation.`);
			} else if (V.eventResults.aidTarget === "housewives") {
				r.push(`better-off citizens, including the caller. Though most of them have taken flights out, the leader and a few of them are now stuck in the area and are running out of options as the riots lock down transportation.`);
			} else if (V.eventResults.aidTarget === "maternity") {
				r.push(`better-off citizens, including the caller. Though most of the patients have already left, several of the most pregnant are now stuck in the area and are running out of options as the riots lock down transportation.`);
			} else if (V.eventResults.aidTarget === "conversion") {
				r.push(`better-off citizens, including the caller. Though most of the camp's inmates have already left, a few of them and the owner are now stuck in the area and are running out of options as the riots lock down transportation.`);
			} else if (V.eventResults.aidTarget === "gradeSchool") {
				r.push(`better-off citizens, including the caller. Though most of the other students and faculty escaped, a few of the students are now stuck in the school and are running out of options as the riots steadily creep closer to the grounds.`);
			} else if (V.eventResults.aidTarget === "volleyballTeam") {
				r.push(`vulnerable citizens, including the caller. Their bus broke down on the way to the championship game and all those that have left to get help have not returned. She and her several remaining teammates are running out of options as those looking for easy targets creep ever closer.`);
			}
		} else {
			r.push(`After years of constant rape and abuse, an opening finally arrived for escape when a rival faction raided the decaying church they were stored in, however the situation outside isn't much better. Violent riots are taking place and the mobs are eagerly snatching up what ever loot and women they can get their hands on. She and the remaining women are trapped and in no condition to run; most particularly the youngest of the group who is ripe with child, though she herself and one of the others are also carrying their rapists' babies. They are completely out of options as the looters work their way down the city streets.`);
		}
		r.push(`They beg you to help evacuate them, and promise to pay you once they're out.`);
		App.Events.addParagraph(node, r);
		const price = 10000;

		App.Events.addResponses(node, [
			new App.Events.Result(`Agree`, agree),
			new App.Events.Result(`Do it for free`, free),
			new App.Events.Result(`Airlift them into slavery`, enslave, `This will cost ${cashFormat(price)}`),
		]);

		function agree() {
			const r = [];
			const el = new DocumentFragment();
			cashX(2000, "event");
			repX(1000, "event");
			r.push(`You dispatch your personal VTOL bird immediately. It lands`);
			if (V.eventResults.aidTarget === "volleyballTeam") {
				r.push(`beside the bus`);
			} else {
				r.push(`on the roof of the building`);
			}
			r.push(`they're sheltering in, and brings them across the closest border and into a more functional country. You receive a call expressing their heartfelt thanks and promising to spread the word about how you helped them escape, and a wire transfer of their payment for the airlift.`);
			V.eventResults.aid = -1;
			App.Events.addParagraph(el, r);
			return el;
		}

		function free() {
			const r = [];
			const el = new DocumentFragment();
			repX(2500, "event");
			r.push(`You dispatch your personal VTOL bird immediately. It lands`);
			if (V.eventResults.aidTarget === "volleyballTeam") {
				r.push(`beside the bus`);
			} else {
				r.push(`on the roof of the building`);
			}
			r.push(`they're sheltering in, and brings them across the closest border and into a more functional country. You receive a call expressing their heartfelt thanks, and when you refuse their payment for the airlift, they tearfully promise to tell the story of how you extended charity to those in need, belying the rumors about slaveowners.`);
			V.eventResults.aid = -1;
			App.Events.addParagraph(el, r);
			return el;
		}

		function enslave() {
			const r = [];
			const el = new DocumentFragment();
			r.push(`You send your personal VTOL bird to the shop for some immediate and very expensive modifications to its cargo and passenger area. Since this will take several days, you stall the supplicants.`);
			if (V.eventResults.aidTarget === "volleyballTeam") {
				r.push(`A few of the girls decide to leave, but the sight of them pushed against the wall of a nearby building, toned bodies glistening with sweat and seed as their captors rape them into submission, keep the rest happy to stay on the bus. Those that remained`);
			} else {
				r.push(`Their situation isn't truly dire yet, and they can wait. They`);
			}
			r.push(`are extremely grateful, though they would be less hopeful if they knew the true nature of the aircraft coming to retrieve them.`);
			V.eventResults.aid = 1;
			App.Events.queueEvent(1, new App.Events.pAidResult());
			cashX(forceNeg(price), "event");
			App.Events.addParagraph(el, r);
			return el;
		}
		return node;
	}
};


code:
App.Events.pAidResult = class pAidResult extends App.Events.BaseEvent {
	constructor(actors, params) {
		super(actors, params);
	}

	eventPrerequisites() {
		return []; // always run if queued
	}

	execute(node) {
		let r = [];
		V.eventResults.aid = 2;
		V.nationHate += 2;
		r.push(`You watch on the feeds from your VTOL craft as it settles`);
		if (V.eventResults.aidTarget === "volleyballTeam") {
			r.push(`beside`);
		} else {
			r.push(`onto the roof of`);
		}
		r.push(`the`);
		if (V.eventResults.aidTarget === "convent") {
			r.push(`convent whose remaining women`);
		} else if (V.eventResults.aidTarget === "school") {
			r.push(`girls' school whose remaining students and principal`);
		} else if (V.eventResults.aidTarget === "housewives") {
			r.push(`mansion of the leader of the group of housewives`);
		} else if (V.eventResults.aidTarget === "maternity") {
			r.push(`maternity ward whose remaining patients`);
		} else if (V.eventResults.aidTarget === "conversion") {
			r.push(`religious sexual orientation therapy camp whose inmates and owner`);
		} else if (V.eventResults.aidTarget === "gradeSchool") {
			r.push(`school whose students`);
		} else if (V.eventResults.aidTarget === "volleyballTeam") {
			r.push(`bus whose athletes`);
		} else if (V.eventResults.aidTarget === "seizedMission") {
			r.push(`building the raped missionaries`);
		}
		r.push(`you promised to rescue${(V.eventResults.aidTarget === "seizedMission") ? ` were holed up in` : ``}. Its side doors retract, allowing the escapees to hustle aboard with their bundles of personal possessions. Once they're on board and strapped into their seats, the turbofans howl and the craft peels smoothly off the roof, the hot jet wash setting it alight. Once it transitions fully into level flight, the true plan goes into operation. At a carefully selected moment, injectors concealed within each seat lance into the passengers' buttocks, knocking them out. It works flawlessly, the drugs precisely calibrated to each body based on the weight added to the VTOL as each climbed aboard. This avoids the potential for over- or under-dosage present when using gas or darts to subdue groups. In perfect unison, the passengers slump against the harnesses holding them against the seats.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`When the aircraft lands at your penthouse pad, the would-be escapees are still unconscious. This makes putting them through enslavement physically laborious, though it does cut down on the usual whining; fortunately, you reserved the credits necessary to obscure their questionably legitimate enslavement. By the time they awake, they'll be indistinguishable from any other new slave in the arcology. The possibility remains, however that rumor of the incident will leak out. Your VTOL bird's entry and exit from the capital city was likely noticed and remarked upon.`);
		App.Events.addParagraph(node, r);
		r = [];
		const newSlaves = [];
		let slave;
		if (V.eventResults.aidTarget === "convent") {
			slave = GenerateNewSlave("XX", {minAge: 30, maxAge: 42, disableDisability: 1});
			slave.origin = "$He was the head of a religious community of women you enslaved.";
			slave.career = "a nun";
			slave.devotion = -20;
			slave.trust = random(-90, -75);
			setHealth(slave, jsRandom(-10, 10), undefined, undefined, undefined, 0);
			slave.face = 15;
			slave.anus = 0;
			slave.vagina = 0;
			slave.weight = random(20, 140);
			slave.attrXX = random(60, 90);
			slave.attrXY = random(10, 50);
			slave.energy = random(60, 80);
			slave.skill.vaginal = 0;
			slave.skill.oral = 35;
			slave.skill.anal = 0;
			slave.skill.whoring = 0;
			slave.skill.entertainment = 0;
			slave.pubicHStyle = "bushy";
			slave.fetish = "dom";
			slave.behavioralFlaw = "devout";
			slave.sexualFlaw = "repressed";
			slave.sexualQuirk = "perverted";
			newSlaves.push(slave);
			const {His} = getPronouns(slave);
			r.push(`In any case, you've enslaved a fine group. The leader is on the older side, but not unattractive. ${His} girls are younger, and probably have all sorts of delightful repressed tendencies to be manipulated.`);
			for (let i = 0; i < 3; i++) {
				slave = GenerateNewSlave("XX", {minAge: 18, maxAge: 24});
				slave.origin = "$He was an initiate in a religious community of women you enslaved.";
				slave.career = "a nun";
				slave.devotion = random(-90, -75);
				slave.trust = -20;
				setHealth(slave, jsRandom(-10, 10), undefined, undefined, undefined, 20);
				slave.anus = 0;
				slave.vagina = 0;
				slave.weight = random(-20, -100);
				slave.attrXX = random(10, 50);
				slave.attrXY = random(10, 50);
				slave.energy = random(5, 20);
				slave.skill.vaginal = 0;
				slave.skill.oral = 15;
				slave.skill.anal = 0;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 0;
				slave.pubicHStyle = "bushy";
				slave.behavioralFlaw = "devout";
				slave.sexualFlaw = "repressed";
				newSlaves.push(slave);
			}
		} else if (V.eventResults.aidTarget === "school") {
			slave = GenerateNewSlave("XX", {minAge: 26, maxAge: 42, disableDisability: 1});
			slave.origin = "$He was the principal of a girls' school whose remnants you enslaved. A strap-on and a large quantity of personal lubricant were found in $his possession when $he was enslaved.";
			slave.intelligence = random(16, 80);
			slave.intelligenceImplant = 15;
			slave.teeth = "normal";
			slave.career = "a principal";
			slave.devotion = -20;
			slave.trust = random(-90, -75);
			setHealth(slave, jsRandom(-10, 10), undefined, undefined, undefined, 0);
			slave.anus = 1;
			slave.vagina = 1;
			slave.weight = random(20, 80);
			slave.attrXX = random(60, 90);
			slave.attrXY = random(10, 50);
			slave.energy = random(60, 80);
			slave.skill.vaginal = 15;
			slave.skill.oral = 15;
			slave.skill.anal = 15;
			slave.skill.whoring = 0;
			slave.skill.entertainment = 15;
			slave.pubicHStyle = "waxed";
			slave.fetish = "dom";
			slave.behavioralFlaw = either("arrogant", "bitchy", "hates men", "hates men", "liberated");
			slave.sexualFlaw = "shamefast";
			newSlaves.push(slave);
			const {his} = getPronouns(slave);
			r.push(`In any case, you've enslaved a fine group. The principal is on the older side, and seems to have paid unusually close attention to ${his} appearance, for the female principal of a girls' school. And for whatever reason, the school's uniform skirt seems to have been rather short in back.`);
			for (let i = 0; i < 3; i++) {
				slave = GenerateNewSlave("XX", {maxAge: 18, disableDisability: 1});
				slave.origin = "$He was a student at a girls' school whose remnants you enslaved.";
				slave.career = "a student";
				generateSalonModifications(slave);
				slave.devotion = random(-90, -75);
				slave.trust = -20;
				setHealth(slave, jsRandom(-10, 10), undefined, undefined, undefined, 10);
				slave.anus = 1;
				slave.vagina = either(0, 0, 1);
				slave.weight = random(-50, 0);
				slave.attrXX = 70;
				slave.attrXY = random(10, 70);
				slave.energy = random(50, 70);
				slave.skill.vaginal = 0;
				slave.skill.oral = 0;
				slave.skill.anal = 15;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 0;
				slave.fetish = "buttslut";
				slave.behavioralFlaw = either("anorexic", "arrogant", "bitchy");
				slave.sexualFlaw = either("hates anal", "idealistic", "shamefast");
				newSlaves.push(slave);
			}
		} else if (V.eventResults.aidTarget === "maternity") {
			for (let i = 0; i < 4; i++) {
				const pram = {mature: 0, disableDisability: 1, ageOverridesPedoMode: 1};
				if (V.pedo_mode === 1) {
					pram.minAge = V.fertilityAge;
				} else {
					pram.minAge = 20;
					pram.maxAge = 39;
				}
				slave = GenerateNewSlave("XX", pram);
				slave.origin = "$He was an expectant mother you enslaved when you evacuated $him from a threatened old world hospital.";
				slave.career = "a housewife";
				slave.devotion = random(-90, -75);
				slave.trust = -20;
				slave.preg = random(28, 40);
				slave.pregType = either(1, 1, 1, 1, 1, 1, 2);
				slave.pregKnown = 1;
				slave.pregWeek = slave.preg;
				SetBellySize(slave);
				setHealth(slave, jsRandom(-10, 10), undefined, undefined, undefined, 50);
				slave.vagina = random(1, 3);
				slave.boobs += 100 * random(0, 2);
				slave.lactation = 1;
				slave.lactationDuration = 2;
				slave.nipples = either("cute", "inverted", "partially inverted", "puffy");
				newSlaves.push(slave);
			}
			r.push(`In any case, you've enslaved a fine group. The expectant mothers vary widely; the only thing they have in common is their gravid bellies. None of them are in really serious condition, either, and they should bear the transition to slave life reasonably well despite their pregnancies.`);
		} else if (V.eventResults.aidTarget === "gradeSchool") {
			r.push(`In any case, you've enslaved a fine group. The girls are all within a similar age range, young, and healthy. Their youth and vigor should make them quite popular.`);
			for (let i = 0; i < 4; i++) {
				const pram = {disableDisability: 1, ageOverridesPedoMode: 1};
				if (V.minimumSlaveAge <= 7) {
					pram.minAge = 7;
					pram.maxAge = 10;
				} else if (V.minimumSlaveAge <= 11) {
					pram.minAge = 11;
					pram.maxAge = 14;
				} else if (V.minimumSlaveAge <= 15) {
					pram.minAge = 15;
					pram.maxAge = 18;
				} else {
					pram.minAge = 18;
					pram.maxAge = 18;
				}
				slave = GenerateNewSlave(null, pram);
				slave.origin = "$He was a student you enslaved when you evacuated $him from a threatened old world grade school.";
				slave.career = "a student";
				generateSalonModifications(slave);
				slave.devotion = random(-90, -75);
				slave.trust = random(-90, -75);
				setHealth(slave, jsRandom(-10, 10), undefined, undefined, 0, jsRandom(40, 70));
				newSlaves.push(slave);
			}
		} else if (V.eventResults.aidTarget === "conversion") {
			r.push(`In any case, you've enslaved a fine group. Certain religious groups persist in the hilarious delusion that it's possible to alter sexual orientation through prayer. In your experience, hormones, drugs, and compliance training are far more effective.`);
			slave = GenerateNewSlave("XY", {disableDisability: 1, minAge: 26, maxAge: 42});
			slave.origin = "$He was the owner of a religious orientation conversion therapy camp whose remnants you enslaved.";
			slave.career = "a business owner";
			slave.devotion = -20;
			slave.trust = random(-90, -75);
			setHealth(slave, jsRandom(-10, 10), undefined, undefined, undefined, 0);
			slave.anus = random(2, 3);
			slave.weight = random(20, 80);
			slave.attrXX = random(10, 50);
			slave.attrXY = 90;
			slave.energy = random(30, 80);
			slave.skill.oral = random(50, 100);
			slave.skill.anal = random(50, 100);
			slave.skill.whoring = 0;
			slave.skill.entertainment = random(15, 40);
			slave.pubicHStyle = "waxed";
			slave.fetish = either("submissive", "cumslut", "buttslut");
			slave.fetishStrength = random(1, 2);
			slave.behavioralFlaw = either("arrogant", "bitchy", "hates women", "odd", "liberated");
			slave.sexualFlaw = either("repressed", "shamefast");
			newSlaves.push(slave);
			for (let i = 0; i < 3; i++) {
				slave = GenerateNewSlave("XY", {disableDisability: 1, minAge: 16, maxAge: 18});
				slave.origin = "$He was an inmate at a religious orientation conversion therapy camp whose remnants you enslaved.";
				slave.career = "a student";
				slave.devotion = random(-90, -75);
				slave.trust = -20;
				setHealth(slave, jsRandom(-10, 10), undefined, undefined, undefined, 20);
				slave.anus = 1;
				slave.weight = random(-50, 0);
				slave.attrXX = random(10, 50);
				slave.attrXY = random(60, 90);
				slave.energy = random(30, 70);
				slave.skill.oral = random(15, 40);
				slave.skill.anal = random(15, 40);
				slave.skill.whoring = 0;
				slave.skill.entertainment = 0;
				slave.fetish = "buttslut";
				slave.behavioralFlaw = either("anorexic", "bitchy", "devout", "odd");
				slave.sexualFlaw = either("apathetic", "repressed", "shamefast");
				newSlaves.push(slave);
			}
		} else if (V.eventResults.aidTarget === "volleyballTeam") {
			r.push(`In any case, you've enslaved a fine group. The girls are in fine health, fit and just past their majority, likely the reason any that stepped off the bus were promptly abducted. Their youth and vigor should make them quite popular, as will their experience with handling balls.`);
			for (let i = 0; i < 4; i++) {
				slave = GenerateNewSlave("XX", {
					disableDisability: 1, ageOverridesPedoMode: 1, minAge: 18, maxAge: 18
				});
				slave.height = Height.random(slave, {skew: 1, limitMult: [0, 2]});
				slave.origin = "$He was a volleyball player you enslaved when you evacuated $him from a broken down bus.";
				slave.career = "a student athlete";
				generateSalonModifications(slave);
				slave.devotion = random(-90, -75);
				slave.trust = random(-90, -75);
				setHealth(slave, jsRandom(20, 60), 0, 0, undefined, 90);
				slave.muscles = random(20, 40);
				slave.weight = random(-10, 5);
				slave.waist = random(-40, 0);
				slave.boobs = random(3, 5) * 100;
				slave.butt = random(1, 2);
				newSlaves.push(slave);
			}
		} else if (V.eventResults.aidTarget === "seizedMission") {
			/* leader */
			let pram = new GenerateNewSlavePram();
			pram.mature = 0;
			pram.disableDisability = 1;
			pram.ageOverridesPedoMode = 1;
			pram.race = "white";
			if (V.pedo_mode === 1) {
				pram.minAge = 18;
				pram.maxAge = 24;
			} else {
				pram.minAge = 25;
				pram.maxAge = 39;
			}
			let missLeader = GenerateNewSlave("XX", pram);
			missLeader.origin = "$He was the head nun of a conquered mission. Once claimed, $he was reduced to nothing more than a cum dump for $his black masters.";
			missLeader.career = "a nun";
			missLeader.intelligence = random(16, 80);
			missLeader.intelligenceImplant = 15;
			missLeader.devotion = 40;
			missLeader.trust = random(0, 40);
			setHealth(missLeader, jsRandom(-50, 10), normalRandInt(15, 3), undefined, undefined, 60);
			missLeader.anus = 3;
			missLeader.vagina = 5;
			missLeader.weight = random(-80, -20);
			missLeader.muscles = random(-20, 0);
			missLeader.waist = random(-40, 0);
			missLeader.attrXY = random(0, 10);
			missLeader.energy = random(0, 20);
			missLeader.skill.vaginal = 50;
			missLeader.skill.oral = 75;
			missLeader.skill.anal = 25;
			missLeader.pubicHStyle = "bushy";
			missLeader.underArmHStyle = "bushy";
			missLeader.preg = random(15, 25);
			missLeader.pregType = 1;
			missLeader.pregKnown = 1;
			missLeader.pregWeek = missLeader.preg;
			SetBellySize(missLeader);
			WombFatherRace(missLeader, "black");
			missLeader.counter.birthsTotal = 3;
			missLeader.bellySag = 5;
			missLeader.bellySagPreg = 5;
			missLeader.boobs += 100 * random(1, 3);
			missLeader.lactation = 1;
			missLeader.lactationDuration = 2;
			missLeader.boobShape = "saggy";
			missLeader.nipples = "huge";
			newSlaves.push(missLeader);

			/* preggo */
			if (V.pedo_mode === 1) {
				pram.minAge = 16;
				pram.maxAge = 18;
			} else {
				pram.minAge = 18;
				pram.maxAge = 24;
			}
			slave = GenerateNewSlave("XX", pram);
			slave.origin = "$He was a nun in a felled mission. Once claimed, $he was reduced to nothing more than a cum dump for $his black masters.";
			slave.career = "a nun";
			slave.intelligenceImplant = 15;
			slave.devotion = 30;
			slave.trust = random(-20, 20);
			setHealth(slave, jsRandom(-60, -10), normalRandInt(15, 3), undefined, undefined, 40);
			slave.anus = 3;
			slave.vagina = 4;
			slave.weight = random(-90, -20);
			slave.muscles = random(-50, -20);
			slave.waist = random(-40, 0);
			slave.attrXY = random(0, 10);
			slave.energy = random(0, 20);
			slave.skill.vaginal = 50;
			slave.skill.oral = 75;
			slave.skill.anal = 25;
			slave.pubicHStyle = "bushy";
			slave.underArmHStyle = "bushy";
			slave.preg = random(30, 35);
			slave.pregType = 1;
			slave.pregKnown = 1;
			slave.pregWeek = slave.preg;
			SetBellySize(slave);
			WombFatherRace(slave, "black");
			slave.counter.birthsTotal = 3;
			slave.bellySag = 5;
			slave.bellySagPreg = 5;
			slave.boobs += 100 * random(0, 2);
			slave.lactation = 1;
			slave.lactationDuration = 2;
			slave.boobShape = "saggy";
			slave.nipples = either("cute", "puffy");
			newSlaves.push(slave);

			/* post preggo */
			if (V.pedo_mode === 1) {
				pram.minAge = 16;
				pram.maxAge = 18;
			} else {
				pram.minAge = 19;
				pram.maxAge = 22;
			}
			slave = GenerateNewSlave("XX", pram);
			slave.origin = "$He was a nun in a felled mission. Once claimed, $he was reduced to nothing more than a cum dump for $his black masters.";
			slave.career = "a nun";
			slave.devotion = 50;
			slave.trust = random(0, 50);
			setHealth(slave, jsRandom(-90, -50), normalRandInt(15, 3), undefined, undefined, 80);
			slave.anus = 3;
			slave.vagina = 5;
			slave.weight = random(-90, -60);
			slave.muscles = random(-70, -20);
			slave.waist = random(-10, 0);
			slave.attrXY = random(0, 10);
			slave.energy = random(0, 20);
			slave.skill.vaginal = 50;
			slave.skill.oral = 75;
			slave.skill.anal = 25;
			slave.pubicHStyle = "bushy";
			slave.underArmHStyle = "bushy";
			slave.preg = 0;
			slave.pregWeek = -3;
			slave.counter.birthsTotal = 2;
			slave.bellySag = 5;
			slave.bellySagPreg = 5;
			slave.boobs += 100 * random(1, 3);
			slave.lactation = 1;
			slave.lactationDuration = 1;
			slave.boobsMilk = 200;
			slave.boobs += slave.boobsMilk;
			slave.boobShape = "saggy";
			slave.nipples = either("cute", "puffy");
			newSlaves.push(slave);

			/* young preggo*/
			if (V.minimumSlaveAge < V.fertilityAge) {
				if (V.minimumSlaveAge < 8) {
					pram.minAge = 8;
					pram.maxAge = 8;
				} else {
					pram.minAge = V.fertilityAge;
					pram.maxAge = V.fertilityAge;
				}
			} else {
				if (V.fertilityAge < 8) {
					pram.minAge = 8;
					pram.maxAge = 8;
				} else {
					pram.minAge = V.minimumSlaveAge;
					pram.maxAge = V.minimumSlaveAge;
				}
			}
			const missLoli = GenerateNewSlave("XX", pram);
			missLoli.origin = "$He was a fucktoy held in a felled mission. $He was nothing more than a cum dump to $his black masters.";
			missLoli.career = "an orphan";
			missLoli.devotion = -20;
			missLoli.trust = random(-100, -80);
			setHealth(missLoli, jsRandom(-90, -70), normalRandInt(25, 3), undefined, undefined, 100);
			missLoli.anus = 3;
			missLoli.vagina = 5;
			missLoli.pubertyXX = 1;
			missLoli.weight = random(-100, -60);
			missLoli.muscles = random(-100, -80);
			missLoli.waist = random(-40, -10);
			missLoli.attrXY = random(0, 10);
			missLoli.energy = random(0, 20);
			missLoli.skill.vaginal = 75;
			missLoli.skill.oral = 75;
			missLoli.skill.anal = 50;
			missLoli.pubicHStyle = "bushy";
			missLoli.underArmHStyle = "bushy";
			missLoli.preg = 40;
			missLoli.pregType = 1;
			missLoli.pregKnown = 1;
			missLoli.pregWeek = missLoli.preg;
			SetBellySize(missLoli);
			WombFatherRace(missLoli, "black");
			missLoli.counter.birthsTotal = 0;
			missLoli.bellySag = 5;
			missLoli.bellySagPreg = 5;
			if (missLoli.boobs < 300) {
				missLoli.boobs = 400;
			} else {
				missLoli.boobs += 100;
			}
			missLoli.lactation = 1;
			missLoli.lactationDuration = 2;
			missLoli.boobShape = either("perky", "torpedo-shaped");
			missLoli.nipples = either("cute", "puffy");
			newSlaves.push(missLoli);
			const {he, his, him} = getPronouns(missLeader);
			const {he2, his2, him2, girl2} = getPronouns(missLoli).appendSuffix("2");
			r.push(`In any case, you've enslaved a fine group. The women will clean up nicely and are already accustomed to being raped and abused, so they should bear the transition to slave life reasonably well. The leader is a little older than the rest and clearly has been pregnant several times given the sag to ${his} breasts and the stretch marks coating ${his} swollen belly; it's clear ${he} has a rape baby growing inside ${him}. The next two are younger, but no better off; one is hugely pregnant and the other shows signs of a recent birth. The last, however, is the most eye-catching;`);
			if (V.minimumSlaveAge < 8 && V.fertilityAge < 8) {
				r.push(`${he2} is just a little ${girl2} and a massively pregnant one at that. The leader was right to worry about ${his2} well-being; there is no way ${he2} would survive giving birth.`);
			} else if (V.fertilityAge < 18 && V.minimumSlaveAge < 18) {
				r.push(`${he2} is in no way prepared to be as pregnant as ${he2} is. The leader was right to worry about ${his2} well-being; birth is going to be a struggle for ${him2}.`);
			} else {
				r.push(`${his2} stomach has already dropped and ${he2} clearly has no experience with pregnancy. The leader was right to worry about ${his2} well-being; ${his2} body is ill-suited for childbirth.`);
			}
		} else {
			r.push(`In any case, you've enslaved a fine group. The women seem to have banded together when they were left to fend for themselves in their suburban neighborhood. They're older than many slaves, but they seem to have had rich husbands; they're conventionally pretty, and have lived soft lives that have left them healthy.`);
			for (let i = 0; i < 4; i++) {
				slave = GenerateNewSlave("XX", {disableDisability: 1, minAge: 26, maxAge: 42});
				slave.origin = "$He was a wealthy housewife who you enslaved as $he fled societal collapse.";
				slave.career = "a housewife";
				slave.devotion = -20;
				slave.trust = random(-10, 10);
				setHealth(slave, jsRandom(30, 50), 0, 0, 0);
				slave.anus = 1;
				slave.vagina = random(1, 2);
				slave.weight = random(-20, 20);
				slave.boobs += 100 * random(0, 3);
				slave.butt += random(0, 2);
				slave.attrXX = random(10, 50);
				slave.attrXY = random(60, 90);
				slave.energy = random(20, 80);
				slave.skill.vaginal = 15;
				slave.skill.oral = 15;
				slave.skill.anal = 0;
				slave.skill.whoring = 0;
				slave.skill.entertainment = 15;
				slave.behavioralFlaw = either("anorexic", "arrogant", "bitchy", "liberated");
				slave.sexualFlaw = either("apathetic", "hates anal", "hates oral", "idealistic", "shamefast");
				newSlaves.push(slave);
			}
		}
		App.Events.addParagraph(node, r);

		App.Events.addResponses(node, [
			new App.Events.Result(`Sell your captures immediately`, sell),
			new App.Events.Result(`Enslave them all`, enslave),
		]);
		return node;

		function sell() {
			for (const s of newSlaves) {
				cashX(slaveCost(s), "slaveTransfer");
			}
			return `Prisoners <span class="green">sold.</span>`;
		}

		function enslave() {
			for (const s of newSlaves) {
				newSlave(s); // skip New Slave Intro — TODO: use Bulk Slave Intro
			}
			return `You simply enslave all of the escapees yourself. These slaves will more than make up for the costs you expended, in the long run.`;
		}
	}
};


code:
App.Events.pBadBreasts = class pBadBreasts extends App.Events.BaseEvent {
	constructor(actors, params) {
		super(actors, params);
	}

	actorPrerequisites() {
		return [[
			(s) => ["breast injections", "intensive breast injections", "hyper breast injections"].includes(s.drugs)
		]];
	}

	eventPrerequisites() {
		return [
			() => V.plot === 1,
			() => V.badB !== 1,
			() => App.Events.effectiveWeek() >= 52,
			() => V.seeHyperPreg === 1,
			() => V.seePreg !== 0,
		];
	}

	execute(node) {
		const [slave] = this.actors.map(a => getSlave(a));
		const {He, him} = getPronouns(slave);

		cashX(500 * V.slaves.length, "event");
		V.badB = 1;
		V.slaves.forEach(function(s) {
			if (["breast injections", "hyper breast injections", "intensive breast injections"].includes(s.drugs)) {
				healthDamage(s, Math.floor(Math.random() * 2 + 1));
			}
		});
		let r = [];
		r.push(`Early one morning, you hear heaving coming from one of the bathrooms. On investigation, it seems that ${slave.slaveName} woke up feeling terribly nauseous. ${He}'s in no danger, but you've hardly checked ${him} over before more slaves stagger in. Every one of your slaves on breast-focused A-HGH has been struck by the mysterious malady and has sickened.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`It doesn't take much investigation before you find other slaveowners reporting the same thing. Elementary detective work fingers a particular drug supplier as the culprit, and before long the unfortunate pharmaceutical concern is drowning under a rain of harsh public comment and harsher private contract warfare. As the day wears on, the poor slaves feel much better, and appear positively glowing. However, their breasts swell slightly and their bellies bulge, pointing to the issue being the contamination of the A-HGH production line with fertility agents.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`The firm promptly pays  a large compensation for potentially ruining your slaves. However, you're left with the matter of all the growing bellies to deal with. Over the week, all of your slaves on breast injections show signs of early pregnancy, and hyper pregnancy at that, save those who aren't fertile. They just experienced some hip and ass growth. You have no idea how much fertility agent was in the enhancers but you feel they may become a problem if left alone!`);
		App.Events.addParagraph(node, r);

		App.Events.addResponses(node, [
			new App.Events.Result(`The emotional distress isn't worth the trouble`, keepPreg),
			new App.Events.Result(`Demand further compensation`, wantMoney),
			new App.Events.Result(`Force surgical repairs and compensation`, repair),
		]);

		return node;

		function keepPreg() {
			for (const slave of V.slaves) {
				if (slave.drugs.includes("breast injections")) {
					const isIntense = slave.drugs.includes("intensive");
					const isHyper = slave.drugs.includes("hyper");
					if (canGetPregnant(slave) && slave.vagina !== 0) {
						slave.preg = 1;
						if (isIntense) {
							slave.pregType = random(15, 35);
						} else if (isHyper) {
							slave.pregType = random(20, 45);
						} else {
							slave.pregType = random(10, 25);
						}
						slave.pregKnown = 1;
						slave.pregWeek = 1;
						SetBellySize(slave);
					} else {
						slave.lactation = 1;
						slave.lactationDuration = 2;
						if (slave.geneMods.NCS === 0 && slave.hips < 1) {
							slave.hips++;
							if (isHyper) {
								slave.butt += 2;
							} else {
								slave.butt++;
							}
						}
						if (V.precociousPuberty === 1) {
							if (slave.pubertyXX === 0 && (slave.ovaries === 1 || slave.mpreg === 1)) {
								if (isIntense) {
									slave.pubertyAgeXX -= 1.5;
								} else if (isHyper) {
									slave.pubertyAgeXX -= 2;
								} else {
									slave.pubertyAgeXX--;
								}
								if (slave.geneMods.NCS === 1) {
									if (isIntense) {
										slave.pubertyAgeXX -= 0.75;
									} else if (isHyper) {
										slave.pubertyAgeXX -= 1;
									} else {
										slave.pubertyAgeXX -= 0.5;
									}
								}
							}
							if (slave.pubertyXY === 0 && slave.balls > 0) {
								if (isIntense) {
									slave.pubertyAgeXY += 1.5;
								} else if (isHyper) {
									slave.pubertyAgeXY += 2;
								} else {
									slave.pubertyAgeXY += 1;
								}
								// NCS reduces the male puberty slowing affects
								if (slave.geneMods.NCS === 1) {
									if (isIntense) {
										slave.pubertyAgeXY -= 0.75;
									} else if (isHyper) {
										slave.pubertyAgeXY -= 1;
									} else {
										slave.pubertyAgeXY -= 0.5;
									}
								}
							}
						}
						if (slave.geneMods.NCS === 0) {
							slave.boobs += 300;
						} else {
							slave.boobs += 150;
						}
					}
				}
			}
			return `Since subjecting all the affected slaves to abortions would cause you severe losses, you've decided to let them keep the pregnancies. You hope you are prepared for all the children you'll be producing. Those who couldn't become pregnant gained some breast, hip and ass size, as well as began lactating.`;
		}

		function wantMoney() {
			cashX(2000 * V.slaves.length, "event");
			return `You muster all the contractual remedies available to you and join the crowd of slaveowners laying into the hapless manufacturer. Of course, with so many attackers, there is as much infighting between them as conflict with the helpless enemy, since everyone knows the business will go bankrupt before everyone gets paid. Nevertheless you approximately double the money you make out of the situation, plenty to deal with the pregnancies.`;
		}

		function repair() {
			for (const s of V.slaves) {
				if (canGetPregnant(s)) {
					if (s.drugs === "breast injections") {
						if (s.geneMods.NCS > 0) {
							s.boobs += Math.floor(Math.random() * 10 + 1) * 50;
						} else {
							s.boobs += Math.floor(Math.random() * 10 + 1) * 100;
						}
					} else if (s.drugs === "intensive breast injections") {
						if (s.geneMods.NCS > 0) {
							s.boobs += Math.floor(Math.random() * 10 + 1) * 100;
						} else {
							s.boobs += Math.floor(Math.random() * 10 + 1) * 150;
						}
					} else if (s.drugs === "hyper breast injections") {
						if (s.geneMods.NCS > 0) {
							s.boobs += Math.floor(Math.random() * 10 + 1) * 200;
						} else {
							s.boobs += Math.floor(Math.random() * 10 + 1) * 300;
						}
					}
				}
			}

			return `The hapless manufacturer eventually goes bankrupt. However, you do manage to force surgical correction of the pregnancies before they do. As additional compensation, they agree to naturally enhance your afflicted slaves' busts knowing full well that most buyers are not interested in slaves that have been knocked up. At the managers expense, your slaves move through a top-flight surgeons care and are pregnancy free and sporting larger breasts.`;
		}
	}
};


code:
App.Events.pBadCuratives = class pBadCuratives extends App.Events.BaseEvent {
	constructor(actors, params) {
		super(actors, params);
	}

	actorPrerequisites() {
		return [[
			(s) => { return s.curatives > 1 || s.inflationType === "curative"; }
		]];
	}

	eventPrerequisites() {
		return [
			() => V.plot === 1,
			() => V.badC !== 1,
			() => App.Events.effectiveWeek() >= 14
		];
	}

	execute(node) {
		const [slave] = this.actors.map(a => getSlave(a));
		const {He, him} = getPronouns(slave);

		cashX(500 * V.slaves.length, "event");
		V.badC = 1;
		let r = [];
		r.push(`Early one morning, you hear convulsive dry heaving coming from one of the bathrooms. On investigation, it seems that ${slave.slaveName} woke up feeling terribly nauseous. ${He}'s in no danger, but you've hardly checked ${him} over before more slaves stagger in. Every one of your slaves on curatives has been struck by the mysterious malady and has sickened.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`It doesn't take much investigation before you find other slaveowners reporting the same thing. Elementary detective work fingers a particular drug supplier as the culprit, and before long the unfortunate pharmaceutical concern is drowning under a rain of harsh public comment and harsher private contract warfare. As the day wears on, the poor slaves feel a bit better, but begin to report discomfort in their breasts. Apparently the problem has to do with contamination of the curative production line with A-HGH production reactants.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`The firm promptly pays fair compensation for the minor damage to your slaves' health. However, you're left with the matter of the boobs to deal with. Over the week, all your slaves on curatives experience at least a little breast growth, and some gain several cup sizes.${(V.boughtItem.toys.medicalEnema === 1) ? ` Those with bellies full of curative mixture, on the other hand, have not stopped growing yet and won't until they've completely absorb their load. They will likely end up sporting enormous tits by the end of this.` : ``}`);
		App.Events.addParagraph(node, r);

		App.Events.addResponses(node, [
			new App.Events.Result(`Free breast growth is acceptable`, freeGrowth),
			new App.Events.Result(`Demand further compensation`, wantMoney),
			new App.Events.Result(`Force surgical repairs`, repair),
		]);

		return node;

		function freeGrowth() {
			for (const s of V.slaves) {
				if (s.curatives > 1) {
					if (s.geneMods.NCS > 0) {
						s.boobs += Math.floor(Math.random() * 10 + 1) * 50;
					} else {
						s.boobs += Math.floor(Math.random() * 10 + 1) * 100;
					}
				}
				if (s.inflationType === "curative") {
					if (s.geneMods.NCS > 0) {
						s.boobs += Math.floor(Math.random() * 10 + 1) * 150 * s.inflation;
					} else {
						s.boobs += Math.floor(Math.random() * 10 + 1) * 300 * s.inflation;
					}
				}
				if (s.geneticQuirks.macromastia === 3) {
					s.geneticQuirks.macromastia = 2;
				}
				if (s.geneticQuirks.gigantomastia === 3) {
					s.geneticQuirks.gigantomastia = 2;
				}
			}
			return `Since you're not displeased with the breast expansion, you accept the health compensation and even make discreet inquiries to see of the effect can perhaps be replicated. Unfortunately, it seems that the result that occurred was as much due to luck as anything else. The process cannot be safely marketed.`;
		}

		function wantMoney() {
			cashX(500 * V.slaves.length, "event");
			return `You muster all the contractual remedies available to you and join the crowd of slaveowners laying into the hapless manufacturer. Of course, with so many attackers, there is as much infighting between them as conflict with the helpless enemy, since everyone knows the business will go bankrupt before everyone gets paid. Nevertheless you approximately double the money you make out of the situation.`;
		}

		function repair() {
			return `The hapless manufacturer eventually goes bankrupt. However, you do manage to force surgical repair of the breast expansion before they do. At the manager's expense, your slaves move through a top-flight surgeon's care and are reduced to their former sizes.`;
		}
	}
};


code:
App.Events.PBioreactorPerfected = class PBioreactorPerfected extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => V.bioreactorPerfectedID !== 0,
			() => V.bioreactorsAnnounced !== 1,
		];
	}

	actorPrerequisites() {
		return [[
			(s) => s.assignment === Job.DAIRY,
			(s) => s.boobs > 48000,
			(s) => (s.balls === 0 || s.balls >= 10),
			(s) => s.fetish === Fetish.MINDBROKEN,
		]];
	}

	execute(node) {
		let r = [];

		V.nextButton = "Continue";
		V.bioreactorsAnnounced = 1;

		const bioSlave = getSlave(this.actors[0]);

		let bioreactorsXX = 0;
		let bioreactorsXY = 0;
		let bioreactorsHerm = 0;
		let bioreactorsBarren = 0;
		if (bioSlave.ovaries === 1) {
			if (bioSlave.balls === 0) {
				bioreactorsXX = 1;
			} else {
				bioreactorsHerm = 1;
			}
		} else {
			if (bioSlave.balls === 0) {
				bioreactorsBarren = 1;
			} else {
				bioreactorsXY = 1;
			}
		}
		const {
			His, He,
			his, he, him,
		} = getPronouns(bioSlave);
		const {
			HeA, HisA,
			heA, hisA, girlA, himselfA, womanA
		} = getPronouns(assistant.pronouns().main).appendSuffix("A");

		r.push(`When you need peace and quiet to work through a difficult problem, you sometimes take a few minutes to pace through ${V.dairyName}. The massive, gently swaying breasts are always an encouraging sight, and the faint, rhythmic sounds of machine milking, machine feeding, and machine sodomy have a stimulating effect on one's thought processes. When you reach the end of the row of machines for the first time today, you turn to walk back again, and then notice that ${V.assistant.name}'s`);
		if (V.assistant.personality <= 0) {
			r.push(`symbol is visible on a screen across the last cow in the row from you, glowing gently to get your attention.`);
		} else {
			switch (V.assistant.appearance) {
				case "monstergirl":
					r.push(`monster ${girlA} avatar is visible on a screen across the last cow in the row from you, waving cheerfully for your attention with one of ${hisA} hands and a couple of ${hisA} hair-tentacles.`);
					break;
				case "shemale":
					r.push(`shemale avatar is visible on a screen across the last cow in the row from you, waving for your attention. (${HisA} bouncy waving makes ${hisA} ever-erect cock wave too.)`);
					break;
				case "amazon":
					r.push(`amazon avatar is visible on a screen across the last cow in the row from you, jumping up and down for your attention.`);
					break;
				case "businesswoman":
					r.push(`business ${womanA} avatar is visible on a screen across the last cow in the row from you, waving politely for your attention and pointing to a tablet in ${hisA} hand.`);
					break;
				case "fairy":
					r.push(`fairy avatar is visible on a screen across the last cow in the row from you, waving energetically and pointing to a tablet that ${heA}'s sitting on.`);
					break;
				case "pregnant fairy":
					r.push(`pregnant fairy avatar is visible on a screen across the last cow in the row from you, waving energetically and pointing to a tablet that ${heA}'s sitting on.`);
					break;
				case "goddess":
					r.push(`goddess avatar is visible on a screen across the last cow in the row from you, waving demurely for your attention and holding up one of ${hisA} dribbling breasts.`);
					break;
				case "hypergoddess":
					r.push(`goddess avatar is visible on a screen across the last cow in the row from you; ${heA} is aggressively milking ${himselfA} trying to get your attention.`);
					break;
				case "loli":
					r.push(`child avatar is visible on a screen across the last cow in the row from you, jumping up and down for your attention.`);
					break;
				case "preggololi":
					r.push(`child avatar is visible on a screen across the last cow in the row from you, waving ${hisA} arms over ${hisA} head.`);
					break;
				case "angel":
					r.push(`angel avatar is visible on a screen across the last cow in the row from you, waving ${hisA} arms and flapping ${hisA} wings.`);
					break;
				case "cherub":
					r.push(`cherub avatar is visible on a screen across the last cow in the row from you, fluttering back and forth while waving ${hisA} hands.`);
					break;
				case "incubus":
					r.push(`incubus avatar is visible on a screen across the last cow in the row from you, idly rubbing ${hisA} dick with one hand and beckoning you with the other.`);
					break;
				case "succubus":
					r.push(`succubus avatar is visible on a screen across the last cow in the row from you; ${heA} is happily mooning you.`);
					break;
				case "imp":
					r.push(`impish avatar is visible on a screen across the last cow in the row from you, flying back and forth while waving ${hisA} hands.`);
					break;
				case "witch":
					r.push(`witch avatar is visible on a screen across the last cow in the row from you, hopping up and down while waving ${hisA} arms over ${hisA} head.`);
					break;
				case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
					r.push(`avatar is visible on a screen across the last cow in the row from you; ${heA} has produced countless flashing tubercles across ${hisA} body.`);
					break;
				case "schoolgirl":
					r.push(`school${girlA} avatar is visible on a screen across the last cow in the row from you, waving cutely for your attention and pointing to a tablet in ${hisA} hand.`);
					break;
				default:
					r.push(`symbol is visible on a screen across the last cow in the row from you, spinning and glowing gently to get your attention.`);
			}
		}
		App.Events.addParagraph(node, r);
		r = [];
		if (V.assistant.personality <= 0) {
			if (V.PC.title === 1) {
				r.push(`"Sir,"`);
			} else {
				r.push(`"Madam,"`);
			}
			r.push(`${heA} says, "I have a matter for your attention, concerning this slave."`);
		} else {
			if (V.PC.title === 1) {
				r.push(`"Sir,"`);
			} else {
				r.push(`"Ma'am,"`);
			}
			r.push(`${heA} says, "I'd like to ask you something about this slave."`);
		}
		r.push(`You stop and consider the cow, from ${his} titanic breasts to ${his}`);
		if (bioSlave.balls >= 10 && bioSlave.scrotum > 0) {
			r.push(`swollen balls`);
		} else if (bioSlave.vagina > -1) {
			r.push(`slavering cunt`);
		} else {
			r.push(`distended stomach`);
		}
		r.push(`to ${his} dildo-filled anus.`);
		if (V.assistant.personality <= 0) {
			r.push(`"This slave is permanently dependent on ${his} milking machine," it continues. "${He} cannot be removed without uneconomical expenditures, and is unlikely to be useful elsewhere. Additionally, there is nothing more that can be done to make ${his} breasts any`);
			if (bioSlave.balls >= 10) {
				r.push(`bigger or ${his} testicles any more productive.`);
			} else if (bioSlave.ovaries === 1) {
				r.push(`bigger or ${his} womb any more productive.`);
			} else {
				r.push(`bigger.`);
			}
			r.push(`${His} development is essentially final, and that status can be made official. ${He} could be redesignated as equipment. Other than ${his} designation, this would make little difference: the machine would be slightly less cautious with ${his} drugs, future intubations, and such. ${He} would be removed from the slave lists."`);
		} else {
			r.push(`"${He}'s never leaving here, not without surgery. And even then, ${he}'s forgotten almost everything, and ${he} won't be getting it back."`);
			switch (V.assistant.appearance) {
				case "monstergirl":
					r.push(`The monster${girlA} positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s gently petting the slave's shoulders. ${HeA} looks meditative.`);
					break;
				case "shemale":
					r.push(`The shemale positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s gently petting the slave's shoulders. ${HeA} looks uncharacteristically meditative.`);
					break;
				case "amazon":
					r.push(`The amazon positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s gently petting the slave's shoulders. ${HeA} looks meditative.`);
					break;
				case "businesswoman":
					r.push(`The business${womanA} positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s gently petting the slave's shoulders. ${HeA} looks meditative.`);
					break;
				case "fairy":
					r.push(`The fairy positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s standing on ${his} shoulder and hugging ${his} cheek.`);
					break;
				case "pregnant fairy":
					r.push(`The pregnant fairy positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s standing on ${his} shoulder and hugging ${his} cheek.`);
					break;
				case "goddess":
					r.push(`The goddess positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s gently caressing the slave's shoulders. ${HeA} looks meditative.`);
					break;
				case "hypergoddess":
					r.push(`The goddess positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s gently caressing the slave's shoulders. ${HeA} looks meditative.`);
					break;
				case "loli":
					r.push(`The little ${girlA} positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s gently petting the slave's shoulders. ${HeA} looks meditative.`);
					break;
				case "preggololi":
					r.push(`The little ${girlA} positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s gently petting the slave's shoulders. ${HeA} looks meditative.`);
					break;
				case "angel":
					r.push(`The angel positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s gently caressing the slave. ${HeA} looks meditative.`);
					break;
				case "cherub":
					r.push(`The cherub positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s gently petting the slave's shoulders while hovering over them. ${HeA} looks meditative.`);
					break;
				case "incubus":
					r.push(`The incubus positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s gently groping the slave's rear. ${HeA} looks uncharacteristically meditative.`);
					break;
				case "succubus":
					r.push(`The succubus positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s resting ${hisA} breasts on the slave's head. ${HeA} looks uncharacteristically meditative.`);
					break;
				case "imp":
					r.push(`The imp positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s gently rubbing the slave's shoulders while hovering over them. ${HeA} looks uncharacteristically meditative.`);
					break;
				case "witch":
					r.push(`The witch positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s gently caressing the slave's shoulders. ${HeA} looks meditative.`);
					break;
				case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
					r.push(`It positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s gently caressing the slave's breasts and groin with fleshy tentacles. ${HeA} looks uncharacteristically meditative.`);
					break;
				case "schoolgirl":
					r.push(`The school${girlA} positions ${himselfA} on the screen to create an optical illusion that makes it look like ${heA}'s gently petting the slave's shoulders. ${HeA} looks uncharacteristically meditative.`);
					break;
				default:
					r.push(`The symbol on the screen dissolves down to create a gentle backlight behind the slave.`);
			}
			r.push(`"${He}'s beautiful, isn't ${he}? Perfect. There's nothing more that can be done, to make ${his} udders any`);
			if (bioSlave.balls >= 10) {
				r.push(`bigger or ${his} balls any more productive`);
			} else if (bioSlave.ovaries === 1) {
				r.push(`bigger or ${his} womb any more productive`);
			} else {
				r.push(`bigger.`);
			}
			r.push(`${He}'s complete, and ${he}'s part of this machine now, and that's all ${he}'ll ever be. I can make that status official,`);
			if (V.PC.title === 1) {
				r.push(`Sir.`);
			} else {
				r.push(`Ma'am.`);
			}
			r.push(`I'd redesignate ${him} as equipment. It wouldn't change much, other than a designation. I'd just be a little less cautious with ${his} drugs, future intubations, things like that. But for slave purposes, ${he}'d be gone. Just a part of ${V.dairyName}, forever. Or, until ${he} wears out in`);
			if (V.retirementAge - bioSlave.physicalAge <= 3) {
				r.push(`in a few years."`);
			} else if (V.retirementAge - bioSlave.physicalAge <= 10) {
				r.push(`in a decade or so."`);
			} else if (V.retirementAge - bioSlave.physicalAge >= 20) {
				r.push(`in a couple of decades."`);
			} else {
				r.push(`in."`);
			}
		}

		App.Events.addParagraph(node, r);

		const choices = [];
		choices.push(new App.Events.Result(`Do it, and do it to all maximized dairy slaves`, doAll, isShelterSlave(bioSlave) ? `This will violate your contract with the Slave Shelter.` : ``));
		choices.push(new App.Events.Result(`No, leave ${him} as ${he} is`, no));
		App.Events.addResponses(node, choices);

		function doAll() {
			const frag = new DocumentFragment();
			let r = [];
			r.push(`Your assistant pauses, and then says, "Redesignation complete, ${properTitle()}. This milking machine has been equipped with biological components. This combination is projected to produce approximately`);
			if (bioSlave.balls > 0) {
				r.push(`${1000 * Math.trunc((3 * 52 * (V.retirementAge - bioSlave.physicalAge)) / 1000)} liters of cum,`);
			}
			if (bioSlave.ovaries === 1) {
				r.push(`${100 * Math.trunc((52 * (V.retirementAge - bioSlave.physicalAge)) / 100)} liters of vaginal secretions,`);

				r.push(`${5 * (V.retirementAge - bioSlave.physicalAge)} slaves,`);
			}
			r.push(`and ${1000 * Math.trunc((300 * 52 * (V.retirementAge - bioSlave.physicalAge)) / 1000)} liters of milk over a ${V.retirementAge - bioSlave.physicalAge} year period before its biological components must be replaced."`);
			if (V.assistant.personality > 0) {
				switch (V.assistant.appearance) {
					case "monstergirl":
						r.push(`${HisA} avatar watches the new equipment with almost motherly affection, ${hisA} tentacle hair writhing obscurely.`);
						break;
					case "shemale":
						r.push(`${HisA} avatar sits down and produces a glass of milk. ${HeA} drains it in one long chug, and then begins to jerk off.`);
						break;
					case "amazon":
						r.push(`${HisA} avatar sits down with a clatter of bone ornaments, produces a skin of milk, and takes a long pull.`);
						break;
					case "businesswoman":
						r.push(`${HisA} avatar stands on the screen, watching the new equipment with an air of satisfaction.`);
						break;
					case "fairy":
						r.push(`${HisA} avatar hovers around, humming a tune while checking the new equipment.`);
						break;
					case "pregnant fairy":
						r.push(`${HisA} avatar hovers around, humming a soft tune while checking the new equipment.`);
						break;
					case "goddess":
						r.push(`${HisA} avatar sits down, kneading ${hisA} milky tits in empathy, a hint of simulated jealousy in the way ${heA} watches the new equipment.`);
						break;
					case "hypergoddess":
						r.push(`${HisA} avatar sits down, kneading ${hisA} milky tits in empathy, a hint of simulated jealousy in the way ${heA} watches the new equipment.`);
						break;
					case "loli":
						r.push(`${HisA} avatar sits down, rubbing ${hisA} flat chest sadly as ${heA} watches the new equipment.`);
						break;
					case "preggololi":
						r.push(`${HisA} avatar sits down, pinching ${hisA} milky nipples in empathy, a hint of simulated jealousy in the way ${heA} watches the new equipment.`);
						break;
					case "angel":
						r.push(`${HisA} avatar blushes as ${heA} watches the new equipment. "${He}'ll feed so many hungry mouths..."`);
						break;
					case "cherub":
						r.push(`${HisA} avatar blushes at the sight of the new equipment. ${HeA} quickly buries ${hisA} face in ${hisA} palms at the perversion.`);
						break;
					case "incubus":
						r.push(`${HisA} avatar starts jerking off to the sight of the new bioreactor. ${HeA} throws you a smirk, "But you like MY milk best, don't you?"`);
						break;
					case "succubus":
						r.push(`${HisA} avatar rubs ${hisA} breasts, steadily swelling them until a gush of milk escapes ${hisA} nipples. "Mine will always be your favorite."`);
						break;
					case "imp":
						r.push(`${HisA} avatar licks ${hisA} lips at the new equipment, longing to taste it.`);
						break;
					case "witch":
						r.push(`${HisA} avatar sits down and brings ${hisA} hands to ${hisA} breasts wondering if ${heA} could make them big and milky for you too.`);
						break;
					case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
						r.push(`${HisA} avatar's breasts steadily begin swelling, ${hisA} belly following not long after. Once it is similar in size to the new equipment, a pair of tentacles extend from ${hisA} back and clamp onto ${hisA} nipples, eagerly suckling milk from ${hisA} unnatural udders.`);
						break;
					case "schoolgirl":
						r.push(`${HisA} avatar sits down, watching the new equipment with an air of embarrassment. The school${girlA} blushes, and begins to masturbate.`);
						break;
					default:
						r.push(`${HisA} avatar symbol returns to gentle spinning, doing so in synchrony with the undulations of the new equipment's breasts.`);
				}
			}
			r.push(`"Future redesignations can always be disabled from ${V.dairyName} interface."`);
			V.bioreactorsXX += bioreactorsXX;
			V.bioreactorsXY += bioreactorsXY;
			V.bioreactorsHerm += bioreactorsHerm;
			V.bioreactorsBarren += bioreactorsBarren;
			if (isShelterSlave(bioSlave)) {
				V.shelterAbuse++;
			}
			removeSlave(bioSlave);
			V.createBioreactors = 1;
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function no() {
			const frag = new DocumentFragment();
			let r = [];
			r.push(`"Yes, ${(V.PC.title === 1) ? "sir" : "ma'am"}," your assistant confirms. "This option will remain accessible from ${V.dairyName}'s control interface, if you reconsider."`);

			App.Events.addParagraph(frag, r);
			return frag;
		}

		App.UI.DOM.appendNewElement("h3", node, `${His} records...`);
		/* Copied and modified from dairyReport, should be kept in sync manually to be*/

		/* Income section */
		let cash = 0;

		/* Cum */
		let seed = (100 * bioreactorsXY) + (100 * bioreactorsHerm);
		if (V.arcologies[0].FSPastoralistLaw === 1) {
			cash += seed * random(40, 50);
		} else if (V.arcologies[0].FSPastoralist !== "unset") {
			cash += seed * (random(25, 35) + Math.trunc(V.arcologies[0].FSPastoralist / 10));
		} else {
			cash += seed * random(25, 35);
		}

		/* FemCum */
		seed = (2 * bioreactorsXX) + (2 * bioreactorsHerm);
		if (V.arcologies[0].FSPastoralistLaw === 1) {
			cash += seed * random(40, 50);
		} else if (V.arcologies[0].FSPastoralist !== "unset") {
			cash += seed * (random(25, 35) + Math.trunc(V.arcologies[0].FSPastoralist / 10));
		} else {
			cash += seed * random(25, 35);
		}

		/* Milk */
		seed = (800 * bioreactorsXX) + (700 * bioreactorsBarren) + (600 * bioreactorsXY) + (600 * bioreactorsHerm);
		if (V.arcologies[0].FSPastoralist !== "unset") {
			if (V.arcologies[0].FSPastoralistLaw === 1) {
				cash += seed * (13 + Math.trunc(V.arcologies[0].FSPastoralist / 30));
			} else {
				cash += seed * (8 + Math.trunc(V.arcologies[0].FSPastoralist / 30));
			}
		} else {
			cash += seed * 9;
		}
		App.UI.DOM.appendNewElement("p", node,
			App.Events.makeNode([`As a bioreactor, she might gross ${cashFormatColor(cash)} and cost just ${cashFormatColor(-100)}, bringing in ${cashFormatColor(cash - 100)}`]),
			["indent", "note"]
		);

		App.UI.DOM.appendNewElement("p", node, `${His} current task is to ${bioSlave.assignment}${(V.assignmentRecords[bioSlave.ID]) ? `, and before that to ${V.assignmentRecords[bioSlave.ID]}` : ""}.`, "indent");

		node.append(slaveExpenses(bioSlave));
	}
};


code:
App.Events.PBodyswapReveal = class PBodyswapReveal extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => App.Events.effectiveWeek() > 45,
			() => V.bodyswapAnnounced === 0,
			() => V.surgeryUpgrade === 1,
		];
	}

	execute(node) {
		V.nextButton = "Continue";

		V.bodyswapAnnounced = 1;
		App.Events.addParagraph(node, [`You receive countless messages throughout the day; mostly worthless spam, several uninteresting business offers and the occasional enslavement request. This one catches your eye however. It's an offer from a top surgeon who has recently been experimenting with radical new surgeries. You've been loosely following their work for the last few weeks, ever since they successfully swapped the consciousness from one slave to another with minimal side effects, assuming they are kept on a special suppressant, and it seems they are now offering their work to anyone with a surgical suite capable of performing the surgery and willing to undertake the risk.`]);

		App.Events.addParagraph(node, [`It's an interesting offer and your remote surgery will suffice should you want to change up your slaves' bodies more than any drug or implant ever could. You'll need a slave to swap them with, however. Perhaps one of the mindless slaves from the Flesh Heap will suit your needs, should you not wish to use your own stock.`]);
	}
};


code:
App.Events.PCorpAnnouncement = class PCorpAnnouncement extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => V.cash > 120000,
			() => V.rep > 4000,
			() => V.corp.Announced === 0,
		];
	}

	execute(node) {
		V.nextButton = "Continue";

		V.corp.Announced = 1;
		App.Events.addParagraph(node, [`You never understood the power of money until accumulating so much of it yourself. If you were to try to explain it to someone without that power, you would emphasize the access it buys you. You can speak to anyone, about anything; propose anything, to anyone. And recently, you have begun to encounter the trouble of being too powerful.`]);

		App.Events.addParagraph(node, [`Good investment opportunities are hard to come by in the uncertain world of today. The days of government bonds providing steady yields are ending. Markets are volatile, and under attack by forces they cannot begin to control or anticipate. In places, the very consensus on modern capitalism that has held for nearly fifty years is under siege. There's one reliable growth market in the Free Cities: slaves. And there's too much capital chasing too few investment opportunities in that market.`]);

		App.Events.addParagraph(node, [`Reviewing the situation from your desk, the nerve center of your growing empire, you think to yourself: why not? You have the reputation and the capital to become a major player in the slave market, just for the asking. If you announced the incorporation of a publicly traded company dedicated to the industry of slavery, Free Cities investors would be lining up, cash in hand, ready to buy stock.`]);
	}
};


code:
App.Events.PDefenseFears = class PDefenseFears extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => V.mercenaries < 3
		];
	}

	execute(node) {
		V.nextButton = " "; /* hide button until user makes a selection */
		V.fcnn.push("...hiring mercenaries to act as a defensive force against the old world...");

		App.Events.addParagraph(node, [`A deputation of slaveowning citizens comes to see you. Though they haven't experienced anything so disturbing as your dealings with the Daughters of Liberty, rumors of unrest and revolution are running through the Free Cities. They are upset with the lack of troops to protect the arcology. This is quite a development in the young history of Free Cities society; only a few months ago, the idea of collective defense would have been a bitterly controversial one. It's still an employer's market for mercenaries; you could easily hire some. Alternatively, your citizens would probably agree to fund them by subscription — the word "taxes" would be impolitic.`]);

		App.Events.addParagraph(node, [
			App.UI.DOM.makeElement("span", "This is a unique and very important opportunity", "bold"),
			`and must not be taken lightly.`
		]);

		const choices = [];
		choices.push(new App.Events.Result(`Install a full platoon by subscription`, subscription));
		choices.push(
			new App.Events.Result(
				`Install a full platoon at your expense`, yourExpense, `This will cost ${cashFormat(10000)} and ${(V.PC.skill.warfare >= 100 || V.PC.career === "arcology owner") ? `some upkeep, reduced by your mercenary contacts` : `incur significant upkeep costs`}`
			)
		);
		choices.push(new App.Events.Result(`Refuse to quarter so many troops in your arcology`, plead3rd));
		App.Events.addResponses(node, choices);

		function subscription() {
			V.nextButton = "Continue";
			App.Utils.updateUserButton();/* unlock Continue button */
			repX(-500, "event");
			V.mercenaries = 3;
			return `You hire a full platoon of reputable mercenaries and a veteran officer to command them, kit them in excellent gear, and quarter them in the arcology. Their pay is on an escrow basis; the huge lump sum you paid will serve to secure them, and its interest will constitute their pay. The sight of many armed men on patrol has reassured the worried slaveowners, but they are resentful of having to take this step themselves.`;
		}

		function yourExpense() {
			V.nextButton = "Continue";
			App.Utils.updateUserButton();/* unlock Continue button */
			repX(2500, "event");
			cashX(-10000, "mercenaries");
			V.mercenaries = 3;
			return `You hire a full platoon of reputable mercenaries and a veteran officer to command them, kit them in excellent gear, and quarter them in the arcology. Their pay is on an escrow basis; the huge lump sum you paid will serve to secure them, and its interest will constitute their pay. The sight of many armed men on patrol has reassured the worried slaveowners, and they are grateful to you for seeing to their defense.`;
		}

		function plead3rd() {
			V.nextButton = "Continue";
			App.Utils.updateUserButton();/* unlock Continue button */
			V.arcologies[0].prosperity = Math.trunc(V.arcologies[0].prosperity * 0.8);
			repX(-1000, "event");
			return `The consensus that the arcology is vulnerable triggers an <span class="red">exodus</span> of your most wealthy and valuable citizens, and your reputation <span class="red">suffers</span> grievously.`;
		}
	}
};


code:
App.Events.PFSAnnouncement = class PFSAnnouncement extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => App.Events.effectiveWeek() > 5,
			() => V.rep > 3000,
			() => V.FSAnnounced === 0
		];
	}

	execute(node) {
		V.nextButton = "Continue";

		V.FSAnnounced = 1;
		V.FSGotRepCredits = 1;

		App.Events.drawEventArt(node, "assistant");

		const {heA} = getPronouns(assistant.pronouns().main).appendSuffix("A"); // Assistant Awakens doesn't have a rep requirement, but this event does. It's possible for them to trigger in either order.
		App.Events.addParagraph(node, [`The simple pleasure of power has to be experienced to be understood. You often take a moment to stand on a balcony overlooking an interior atrium, watching the living, breathing, flowing current of your demesne. ${capFirstChar(V.assistant.name)} knows to allow you these moments of peace.`]);

		App.Events.addParagraph(node, [`You immediately pay attention, therefore, when ${heA} interrupts. "${properTitle()}," ${heA} says, "this is an appropriate moment to bring a serious matter to your attention. I monitor conversations, social media, and general opinion within the arcology where I can. You are respected, and the inhabitants of this arcology are starting to look to you to give direction to society."`]);

		App.Events.addParagraph(node, [`"This is not a situation that requires your attention," ${heA} continues. "You can continue to lead them by simple example. Or, you can take a more active role in defining the future. The rewards could be considerable. I will make the necessary additions to the arcology management interface to support societal modification."`]);
	}
};