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

	actorPrerequisites() {
		return [[
			(s) => s.assignment === "work in the dairy",
			(s) => s.boobs > 48000,
			(s) => (s.balls === 0 || s.balls >= 10),
			(s) => s.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));
		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;
			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.`]);
	}
};

repo_name: Elohiem/fc

license: mit


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"); // TODO: does assistant actually have gender at this point?
		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."`]);
	}
};


code:
App.Events.PInvasion = class PInvasion extends App.Events.BaseEvent {
	execute(node) {
		let r = [];
		V.nextButton = "Continue";
		const newSlaves = [];
		V.invasionVictory = 1;
		V.peacekeepers = 0;
		const {
			HeA, HisA,
			heA, hisA, womanA
		} = getPronouns(assistant.pronouns().main).appendSuffix("A");

		r.push(`The day that wasn't supposed to come is here. The troubled little country next door is falling apart. Last month, its stock market collapsed. Last week, its government fell. Yesterday, there was open looting in its cities. And today, a faction of disaffected citizens that blames the Free Cities for siphoning off business and causing the collapse seized weapons from unguarded army depots${(V.terrain === "marine" || V.terrain === "oceanic") ? ", armed merchant ships and private vessels, and are approaching the Free City over the water." : "and advanced towards your home."}`);

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

		r.push(`Sirens are blaring; there is a crump far above as ${V.arcologies[0].name}'s defensive systems knock down one of the first mortar rounds fired into the Free City. The lights in your office changed to a harsh emergency scheme as soon as the attack became a certainty.`);
		if (V.assistant.personality <= 0) {
			r.push(`Your personal assistant offers terse reports on the efficiency of the point defense fire.`);
		} else {
			r.push(`You get a report on the artillery battle from ${V.assistant.name}, whose avatar is showing off ${hisA} prowess at point defense.`);
			switch (V.assistant.appearance) {
				case "monstergirl":
					r.push(`${HisA} tentacle hair is spread out and forward, forming a concave shape around ${hisA} face, and ${heA}'s firing beams from ${hisA} eyes`);
					break;
				case "shemale":
					r.push(`${HeA}'s using both hands to aim ${hisA} massive erection, and is firing blasts of cum`);
					break;
				case "amazon":
					r.push(`${HeA}'s holding a hide shield and a club, which ${heA}'s using to swat`);
					break;
				case "businesswoman":
					r.push(`${HeA} looks as immaculate as ever. The stern little business${womanA} is cradling an expensive fowling piece, which ${heA}'s using to fire`);
					break;
				case "fairy":
					r.push(`${HeA} zips around in the air, getting in close to fire a barrage of little balls of light`);
					break;
				case "pregnant fairy":
					r.push(`Striking a match almost half as long as ${heA} is, ${heA} happily skips along a line of fireworks and lights them as ${heA} goes. One by one they blast off and fly into the sky`);
					break;
				case "goddess":
					r.push(`${HisA} expression is one of affronted maternal protectiveness, and ${heA}'s using outstretched hands to project beams of pure light`);
					break;
				case "hypergoddess":
					r.push(`${HisA} expression is one of affronted maternal protectiveness, and ${heA}'s using outstretched hands to project beams of pure light`);
					break;
				case "loli":
					r.push(`${HeA}'s wearing an annoyed expression and is pretending to shoot ${hisA} fingers`);
					break;
				case "preggololi":
					r.push(`${HeA}'s wearing a tired expression and is pretending to shoot ${hisA} fingers`);
					break;
				case "schoolgirl":
					r.push(`${HeA}'s wearing a fierce expression and holding a baseball bat, using it to swat`);
					break;
				case "angel":
					r.push(`${HeA} has ${hisA} wings spread to safeguard your arcology and firing beams of holy light`);
					break;
				case "cherub":
					r.push(`${HeA} is darting around, firing beams of holy light`);
					break;
				case "incubus":
					r.push(`${HeA} is carefully aiming ${hisA} cumshots`);
					break;
				case "succubus":
					r.push(`${HeA} is flying around, using ${hisA} rear to catch depictions of projectiles and moaning lewdly with each hit.`);
					break;
				case "imp":
					r.push(`${HeA} is darting around, throwing balls of darkness`);
					break;
				case "witch":
					r.push(`${HeA} is using a broom to swat`);
					break;
				case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
					r.push(`${HeA} has split into countless fleshy tendrils and is rapidly swinging`);
					break;
				default:
					r.push(`The symbol radiates readouts of ammunition, power, and targeting, clean lines flashing`);
			}
			if (V.assistant.appearance !== "succubus") {
				r.push(`at depictions of projectiles.`);
			}
		}
		r.push(`It's going well. Whoever's in command of the attackers sees that their fire is having no effect, and orders an advance. The mortars and other artillery systems maintain their fire, trying to occupy as many guns as possible.`);

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

		r.push(`The loose militia lately organized by the arcology owners has been called out to defend the city. Its commander, seeing that the attackers have more passion than tactical skill, orders an immediate counterattack by anyone able${(V.terrain === "marine" || V.terrain === "oceanic") ? " to push the invaders landing in the dock areas back into the sea" : ""}. Technology has advanced to the point that rich militiamen who buy their own gear can form a powerful fighting force. With luck, the counterattack should shatter the enemy.`);

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

		if (V.personalArms === 0) {
			r.push(`Since you are not well armed or armored, you stay back and oversee the defense of your own arcology.`);
		} else if (V.personalArms === 1) {
			r.push(`Since you are well armed and armored, you take part in the counterattack. Your exoskeleton mounts a smart mortar system that independently targets and eliminates enemy groups even as you lay down fire from the guns mounted on your forearms.`);
		} else {
			r.push(`Since you are well armed and armored and your drones are combat ready, you take part in the counterattack. You are preceded into combat by a wedge of your drones, which lack the intelligence to take good cover but are remorseless and highly accurate. Your exoskeleton mounts a smart mortar system that independently targets and eliminates enemy groups even as you lay down fire from the guns mounted on your forearms.`);
		}

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

		if (V.mercenaries === 0) {
			r.push(`You are alone in contributing to the defense of your home.`);
		} else if (V.mercenaries === 1) {
			r.push(`Your mercenaries see to the defense of ${V.arcologies[0].name}, ensuring that nothing that gets through will do truly serious damage.`);
		} else {
			r.push(`Your mercenaries see to the defense of ${V.arcologies[0].name}, ensuring that nothing that gets through will do truly serious damage. There are enough of them that they can even spare a squad to accompany the counterattack. They're mostly old veterans of many bitter brush wars, and they go about the bloody business with the air of men and women who saw their first battlefield long before their hair was shot with grey.`);
		}

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

		if (V.mercenaries + V.personalArms < 2) {
			r.push(`The counterattack fails. The enemy is eventually defeated, but only after they get mired in urban combat in the streets of the Free City. ${V.arcologies[0].name} takes considerable damage from`);
			if (V.terrain === "ravine") {
				r.push(`cliffside fire,`);
			} else {
				r.push(`stray fire,`);
			}
			r.push(`and many supplies have been lost or stolen.</span> The repairs will be extremely costly.`);
			if (V.terrain === "ravine") {
				cashX(forceNeg(Math.trunc(V.cash * 0.8)), "war");
				cashX(-50000, "war");
			} else {
				cashX(forceNeg(Math.trunc(V.cash * 0.9)), "war");
				cashX(-10000, "war");
			}
		} else if (V.mercenaries + V.personalArms < 6) {
			r.push(`The counterattack succeeds. ${V.arcologies[0].name} takes minor damage from stray fire, but the repairs are not too costly. Your participation in the counterattack that saved the Free City was noted, and you are acclaimed as a protector of its people.`);
			V.invasionVictory = 2;
			cashX(forceNeg(Math.trunc(V.cash * 0.2)), "war");
			cashX(-5000, "war");
			repX(5000, "event");
		} else {
			r.push(`The counterattack is a crushing success. Your mercenary squad and your drones form an irresistible phalanx around you that smashes everything it touches. The enemy is put to flight, and you send your drones racing ahead to take captives. By law these are shared among the militia. There is talk that your contributions deserve more than a few wretched slaves in reward. A public subscription pays for the damage ${V.arcologies[0].name} took from stray fire, and you are acclaimed a hero.`);
			V.invasionVictory = 3;
			repX(10000, "event");

			for (let i = 0; i < 3; i++) {
				const slave = GenerateNewSlave((random(0, 99) < V.seeDicks) ? "XY" : "XX", {disableDisability: 1});
				slave.origin = "$He is an enslaved prisoner of war.";
				newSlaves.push(slave);
			}

			V.menials += 5;
			V.trinkets.push("a shot-torn flag of the failed nation whose militants attacked the Free City");

			App.Events.addParagraph(node, r);

			App.Events.addResponses(node, [
				new App.Events.Result(`Sell your prisoners immediately`, sell),
				new App.Events.Result(`Give your prisoners to citizens who displayed bravery during the counterattack`, give),
				new App.Events.Result(`Enslave all of your prisoners`, enslave),
			]);
		}
		function sell() {
			for (const s of newSlaves) {
				cashX(slaveCost(s), "slaveTransfer");
			}
			return `Prisoners sold.`;
		}

		function give() {
			for (const s of newSlaves) {
				repX(Math.trunc(slaveCost(s) / 2), "event");
			}
			return `Prisoners <span class="green">given away.</span>`;
		}

		function enslave() {
			for (const s of newSlaves) {
				newSlave(s); /* skip New Slave Intro */
			}
			return `You simply enslave all of your prisoners yourself. These slaves will regret attacking your arcology.`;
		}
	}
};


code:
App.Events.pRaped = class pRaped 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) {
		let r = [];
		const {
			hisP, womanP, girlP
		} = getPronouns(V.PC).appendSuffix("P");
		V.raped = 1;

		const genParam = {minAge: 16, race: "nonslave", disableDisability: 1};
		let rapist;
		const contractCost = 1000;
		if (V.PC.vagina >= 0) {
			rapist = GenerateNewSlave("XY", genParam);
			rapist.dick = 6;
			rapist.balls = 5;
			rapist.boobs = 100;
			rapist.waist = 50;
			rapist.skill.oral = 0;
			rapist.skill.anal = 0;
		} else {
			rapist = GenerateNewSlave("XX", genParam);
			rapist.vagina = 1;
			rapist.preg = 0;
			rapist.weight = random(-20, 30);
			rapist.waist = -20;
		}
		rapist.muscles = Math.max(rapist.muscles, 10);
		rapist.origin = `You sentenced $him to enslavement for the attempted rape of a free ${womanP}.`;
		rapist.devotion = -100;
		rapist.trust = -100;
		setHealth(rapist, jsRandom(-40, -20), normalRandInt(15, 3), undefined, 1, jsRandom(30, 80));
		rapist.anus = 0;
		rapist.behavioralFlaw = "arrogant";
		rapist.sexualFlaw = "judgemental";

		const {
			He,
			his, he, him, himself, woman
		} = getPronouns(rapist);
		const {say} = getEnunciation(rapist);

		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.`);

		if (isPCCareerInCategory("mercenary") || V.PC.skill.warfare >= 85) {
			r.push(`The moment you hear the sound of the knife unsheathe your reflexes take`);
			if (!isHindered(V.PC)) {
				r.push(`over. With a single strike, the ${woman} tailing you lies in a heap on the ground.`);
				V.raped = 0;
			} else {
				r.push(`over, but your body has grown a bit too unwieldy as of late, so you find yourself quickly outmaneuvered and held with a knife to your throat.`);
			}
		} else if (isPCCareerInCategory("slaver") || V.PC.skill.warfare >= 45) {
			r.push(`The moment you notice an arm coming around from behind you does your training kick in.`);
			if (!isHindered(V.PC)) {
				r.push(`You quickly disarm the assailant and knock them to the floor before placing them in a choke-hold. Once they are subdued, you stand back to decide what to do next.`);
				V.raped = 0;
			} else {
				r.push(`You quickly try to disarm your assailant, but find your body has become a bit too ponderous as of late. After a short struggle, it is you that ends up pinned with a knife to the throat.`);
			}
		} else if (isPCCareerInCategory("gang")) {
			r.push(`The moment you hear the sound of the knife unsheathe your reflexes take over.`);
			if (!isHindered(V.PC)) {
				r.push(`With a single stab, your own shiv is buried in ${his} chest, incapacitating ${him}.`);
				V.raped = 0;
			} else {
				r.push(`You try to draw your shiv and stab ${him}, but your body has grown a bit too unwieldy as of late, so you find yourself quickly outmaneuvered and held with a knife to your throat.`);
			}
		} else {
			r.push(`You stifle a`);
			if (V.PC.title === 1) {
				r.push(`swear`);
			} else {
				r.push(`scream`);
			}
			r.push(`when you feel your arm grabbed and the knife pressed to your throat, knowing that it will only end badly for you in this place.`);
		}
		App.Events.addParagraph(node, r);
		if (V.raped === 1) {
			r = [];
			V.fcnn.push("...plans for increased security measures, but refused to answer questions regarding...");
			if (V.PC.vagina >= 0) {
				r.push(Spoken(rapist, `"Well, well, well, look what ${(V.PC.belly >= 5000 || V.PC.preg >= 20 || V.PC.weight >= 130) ? `waddled` : `walked`} into my territory. If it isn't ${V.PC.slaveName}, come to grace me with ${hisP} presence."`));
			} else {
				r.push(Spoken(rapist, `"I've been watching you ever since you first moved in, ${V.PC.slaveName}, waiting for the perfect moment to make you mine. We are going to have a little fun, you and I."`));
			}
			r.push(`The ${woman} binds your hands behind you, all the while keeping the knife to your throat.`);
			r.push(Spoken(rapist, `"Smart keeping your mouth shut; maybe I won't have to hurt you. Heh, I know what you're thinking, that you'll find out who I am and punish me. Don't worry, I made sure to not to leave you any trails to follow${V.PC.visualAge < V.minimumSlaveAge ? ", especially with you being so sinfully delectable" : ""}. Now let's see what we have here."`));

			if (V.PC.vagina >= 0) {
				if (V.PC.butt > 4) {
					r.push(Spoken(rapist, `"God, the way your fat ass is hugging my dick, you were just made to be bent over, weren't you?"`));
					r.push(`he states matter of factly as ${he} pulls you closer.`);
				}
				r.push(`With ${his} free hand, ${he} begins to explore your vulnerable body.`);
				if (V.PC.weight > 130) {
					r.push(Spoken(rapist, `"Normally I don't go for fatties, but for you, I think I can make an exception,"`));
					r.push(`he chides as grinds against your soft form.`);
				} else if (V.PC.weight > 95) {
					r.push(Spoken(rapist, `"Bit soon to be letting yourself go, isn't it?"`));
					r.push(`he chides as grinds against your soft form.`);
				} else if (V.PC.weight > 30) {
					r.push(Spoken(rapist, `"Nothing wrong with carrying a little extra weight,"`));
					r.push(`he teases as grinds against your soft form.`);
				}
				if (isPCCareerInCategory("wealth")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"Nice and supple. How much did you have to pay for these babies?"`));
						r.push(`he smirks as he gropes your breasts.`);
					}
					if (V.PC.preg >= 20 || V.PC.belly >= 5000) {
						r.push(Spoken(rapist, `"Couldn't afford an abortion after you took over? How sad,"`));
						r.push(`he chuckles as he rubs your pregnant belly.`);
					}
					if (V.PC.dick > 0) {
						r.push(Spoken(rapist, `"Went with the full package didn't you?"`));
						r.push(`he mocks as he flicks the tip of your stiffening cock.`);
					}
				} else if (isPCCareerInCategory("capitalist")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"Nice and supple. Bet these got you some great deals with guys, didn't they?"`));
						r.push(`he smirks as he gropes your breasts.`);
					}
					if (V.PC.preg >= 20 || V.PC.belly >= 5000) {
						r.push(Spoken(rapist, `"Sleeping with guys to close deals? Such a slut,"`));
						r.push(`he chuckles as he rubs your pregnant belly.`);
					}
					if (V.PC.dick > 0) {
						r.push(Spoken(rapist, `"Guess you fuck people over in more ways than one, don't you?"`));
						r.push(`he mocks as he flicks the tip of your stiffening cock.`);
					}
				} else if (isPCCareerInCategory("mercenary")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"So did you ever actually see combat, or did you just spend all your days in the barracks servicing the real soldiers?"`));
						r.push(`he smirks as he gropes your breasts.`);
					}
					if (V.PC.preg >= 20 || V.PC.belly >= 5000) {
						r.push(Spoken(rapist, `"Well now I know why you aren't serving still,"`));
						r.push(`he chuckles as he rubs your pregnant belly.`);
					}
					if (V.PC.dick > 0) {
						r.push(Spoken(rapist, `"Got a little surgery between missions, eh?"`));
						r.push(`he mocks as he flicks the tip of your stiffening cock.`);
					}
				} else if (isPCCareerInCategory("engineer")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"Nice and supple. Did the other engineers care about your designs or just your tits?"`));
						r.push(`he smirks as he gropes your breasts.`);
					}
					if (V.PC.preg >= 20 || V.PC.belly >= 5000) {
						r.push(Spoken(rapist, `"I can see why your designs were so popular, you fucked your way into the spotlight!"`));
						r.push(`he chuckles as he rubs your pregnant belly.`);
					}
					if (V.PC.dick > 0) {
						r.push(Spoken(rapist, `"Well you do know how to erect things, don't you?"`));
						r.push(`he mocks as he flicks the tip of your stiffening cock.`);
					}
				} else if (isPCCareerInCategory("medicine")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"Nice and supple. Did you implant them yourself?"`));
						r.push(`he smirks as he gropes your breasts.`);
					}
					if (V.PC.preg >= 20 || V.PC.belly >= 5000) {
						if (V.PC.dick > 0) {
							r.push(Spoken(rapist, `"Look at that belly! I bet you inseminated yourself with your own seed,"`));
							r.push(`he chuckles as he rubs your pregnant belly.`);
						} else {
							r.push(Spoken(rapist, `"I see how you work. Mess up a surgery and give the guy a pity fuck. Surprised you couldn't get their spawn out of your belly though. Guess you aren't that good of a surgeon,"`));
							r.push(`he chuckles as he rubs your pregnant belly.`);
						}
					}
					if (V.PC.dick > 0) {
						r.push(Spoken(rapist, `"I'm impressed. Your woman impression is quite good. Did you do the surgery yourself?"`));
						r.push(`he mocks as he flicks the tip of your stiffening cock.`);
						r.push(Spoken(rapist, `"Still going to fuck you though."`));
					}
				} else if (isPCCareerInCategory("slaver")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"With tits like these, I bet you were the bait used to lure them in,"`));
						r.push(`he smirks as he gropes your breasts.`);
					}
					if (V.PC.preg >= 20 || V.PC.belly >= 5000) {
						r.push(Spoken(rapist, `"Did a slave beat me to you?"`));
						r.push(`he chuckles as he rubs your pregnant belly.`);
					}
					if (V.PC.dick > 0) {
						r.push(Spoken(rapist, `"Bet you raped a bunch of girls with this, didn't you? Consider what's coming karma,"`));
						r.push(`he mocks as he flicks the tip of your stiffening cock.`);
					}
				} else if (isPCCareerInCategory("celebrity")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"Nice and supple. I wonder how many guys jacked off to your pictures?"`));
						r.push(`he smirks as he gropes your breasts.`);
					}
					if (V.PC.preg >= 20 || V.PC.belly >= 5000) {
						r.push(Spoken(rapist, `"I can see how you got so popular!"`));
						r.push(`he chuckles as he rubs your pregnant belly.`);
					}
					if (V.PC.dick > 0) {
						r.push(Spoken(rapist, `"How much tape did it take to hold this guy down?"`));
						r.push(`he mocks as he flicks the tip of your stiffening cock.`);
					}
				} else if (isPCCareerInCategory("escort")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"Nice and soft. How many dicks have been between these babies?"`));
						r.push(`he smirks as he gropes your breasts.`);
					}
					if (V.PC.preg >= 20 || V.PC.belly >= 5000) {
						r.push(Spoken(rapist, `"What kind of whore doesn't know about protection?"`));
						r.push(`he chuckles as he rubs your pregnant belly.`);
					}
					if (V.PC.dick > 0) {
						r.push(Spoken(rapist, `"So, did you ever get to use this when you were a prostitute?"`));
						r.push(`he mocks as he flicks the tip of your stiffening cock.`);
					}
				} else if (isPCCareerInCategory("gang")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"I bet I'm not the first person to do this to you, am I?"`));
						r.push(`he smirks as he gropes your breasts.`);
					}
					if (V.PC.preg >= 20 || V.PC.belly >= 5000) {
						r.push(Spoken(rapist, `"Ah, now I get it. Your role in the gang was to lie on your back and take dick all day, wasn't it?"`));
						r.push(`he chuckles as he rubs your pregnant belly.`);
					}
					if (V.PC.dick > 0) {
						r.push(Spoken(rapist, `"Fuck or be fucked world; today, it's gonna be you,"`));
						r.push(`he mocks as he flicks the tip of your stiffening cock.`);
					}
				} else if (isPCCareerInCategory("servant")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"Nice and supple. Bet your Master spent a fortune making these so nice,"`));
						r.push(`he smirks as he gropes your breasts.`);
					}
					if (V.PC.preg >= 20 || V.PC.belly >= 5000) {
						r.push(Spoken(rapist, `"Holding on to your Master's final gift are you?"`));
						r.push(`he chuckles as he rubs your pregnant belly.`);
					}
					if (V.PC.dick > 0) {
						r.push(Spoken(rapist, `"When your Master first undressed you, what did he think of his 'girl'?"`));
						r.push(`he mocks as he flicks the tip of your stiffening cock.`);
					}
				} else if (isPCCareerInCategory("BlackHat")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"Nice and supple. What are the odds that I can find these babies on the internet?"`));
						r.push(`he smirks as he gropes your breasts.`);
					}
					if (V.PC.preg >= 20 || V.PC.belly >= 5000) {
						r.push(Spoken(rapist, `"You'd think someone so skilled at breaking security would understand protection themselves. Or did you trade your pussy for information?"`));
						r.push(`he chuckles as he rubs your pregnant belly.`);
					}
					if (V.PC.dick > 0) {
						r.push(Spoken(rapist, `"Trying to catch a signal with that?"`));
						r.push(`he mocks as he flicks the tip of your stiffening cock.`);
					}
				}
				r.push(`Finally he reaches your moistening pussy.`);
				r.push(Spoken(rapist, `"Already wet are we? Glad you know your place,"`));
				r.push(`he states as he pulls your clothes off and bends you over.`);
				if (V.PC.vagina === 0) {
					r.push(Spoken(rapist, `"And you still have your innocence, how delightful!"`));
				}
				App.Events.addParagraph(node, r);
				r = [];
				r.push(`You can feel the head of his cock teasing your`);
				if (V.PC.vagina === 0) {
					r.push(`virgin pussy; you grit your teeth knowing what will come next. Without mercy, he tears through your hymen and forces himself as deep as your tight pussy lets him. You choke back a sob as he struggles to hilt himself in you. He must have undergone surgery or something because there is no way your body can handle such a monster. You're in agony already - you can't fathom what will happen when he loses his patience.`);
				} else {
					r.push(`pussy lips; you hope it feels bigger than it really is. As he struggles to force it into you, you regret thinking about it. He must have undergone surgery or something because he fills you completely. You feel weak just from him sticking it in, you can't fathom what will happen once he starts thrusting.`);
				}
				r.push(`You soon find out as he wastes no time starting slow. He violently rams his oversized cock deep into you, threatening to penetrate your cervix with each thrust. He quickens his pace, fucking you like a beast.`);
				if (V.PC.preg < 1) {
					if (random(1, 100) > 60) {
						r.push(`His hand rises to your lips and forces something into your mouth.`);
						r.push(Spoken(rapist, `"Swallow it."`));
						r.push(`You obey, hoping to just get this over with.`);
						V.PC.forcedFertDrugs += 3;
					}
					r.push(`With one final thrust, he forces through your battered cervix and unloads in the depths of your`);
					if (canGetPregnant(V.PC)) {
						r.push(`fertile`);
					}
					r.push(`womb.`);
				} else {
					r.push(`With one final thrust, he forces it in as deep as he can into you and blows his seed deep in your aching cunt.`);
				}
				if (V.PC.preg >= 20 || V.PC.belly >= 5000) {
					r.push(Spoken(rapist, `"Now your ${(V.PC.pregType > 1) ? `children` : `child`} will know what a real man's sperm is like!"`));
				}
				r.push(`He shoves you to the ground, pussy gaping from the size of his shaft and leaking his huge load all over yourself. By the time you loosen your bindings, he is long gone.`);
				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. Such a thing, happening to you. You can't allow such an indignity to happen again,`);
				if (V.PC.vagina === 0) {
					r.push(`not that you'll ever get your first time back,`);
				} else {
					r.push(`you think to yourself,`);
				}
				r.push(`as you try to coax his sperm from your abused pussy.`);
				if (canGetPregnant(V.PC)) {
					r.push(`For some reason your body feels really satisfied, despite`);
					if (V.PC.vagina === 0) {
						r.push(`what transpired...`);
					} else {
						r.push(`not climaxing...`);
					}
					r.push(`Is this what it feels like to be bred by someone so dominant? You should take a pregnancy test right away and make sure he didn't knock you up.`);
					knockMeUp(V.PC, 100, 0, -2);
				}
				if (V.PC.vagina === 0) {
					V.PC.vagina++;
				}
			} else {
				if (V.PC.weight > 95) {
					r.push(Spoken(rapist, `"I don't mind a little weight, so long as it doesn't get in the way. And even if it did, it won't stop me."`));
					r.push(`${he} chuckles as ${he} embraces your soft form.`);
				}
				r.push(`With ${his} free hand, ${he} begins to explore your bound body.`);
				if (V.PC.preg >= 20 || V.PC.belly >= 5000) {
					r.push(Spoken(rapist, `"Can't say I've ever had sex with a pregnant ${womanP} before... I'll figure it out, don't you worry!"`));
					r.push(`${he} teases as he rubs your pregnant belly.`);
					r.push(Spoken(rapist, `"I won't be far behind you..."`));
					r.push(`${he} thinks out loud, much to your chagrin.`);
				}
				if (isPCCareerInCategory("wealth")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"Spared no expenses for these babies, did you?"`));
						r.push(`${he} smirks as ${he} gropes your breasts.`);
					}
					r.push(`${He} slips ${his} hand down your pants.`);
					r.push(Spoken(rapist, `"Now there's the money maker!"`));
					if (V.PC.balls >= 9) {
						r.push(`It's impossible to hide the two firm globes beneath your dick, so you can only wince as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"And apparently the bank too!"`));
						r.push(`${He} ${say}s excitedly, rubbing your sizeable balls while licking ${his} lips.`);
					} else if (V.PC.balls >= 5) {
						r.push(`${He} no doubt noticed your bulge as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"And loaded in the virility department too!"`));
						r.push(`${He} ${say}s, licking ${his} lips lustfully while cupping your balls.`);
					}
				} else if (isPCCareerInCategory("capitalist")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"Ever wonder if they were listening to you or just ogling the man with the breasts?"`));
						r.push(`${he} smirks as ${he} gropes your breasts.`);
					}
					r.push(`${He} slips ${his} hand down your pants.`);
					r.push(Spoken(rapist, `"Now that explains how you were so successful!"`));
					if (V.PC.balls >= 9) {
						r.push(`It's impossible to hide the two firm globes beneath your dick, so you can only wince as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"And you're positively loaded!"`));
						r.push(`${He} ${say}s excitedly, rubbing your sizeable balls while licking ${his} lips.`);
					} else if (V.PC.balls >= 5) {
						r.push(`${He} no doubt noticed your bulge as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"And you've got a nice investment for me too!"`));
						r.push(`${He} ${say}s, licking ${his} lips lustfully while cupping your balls.`);
					}
				} else if (isPCCareerInCategory("mercenary")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"Must have been pretty tight in your body armor, huh?"`));
						r.push(`${he} smirks as ${he} gropes your breasts.`);
					}
					r.push(`${He} slips ${his} hand down your pants.`);
					r.push(Spoken(rapist, `"I guess they do let you keep your rifle!"`));
					if (V.PC.balls >= 9) {
						r.push(`It's impossible to hide the two firm globes beneath your dick, so you can only wince as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"I'd have been worried lugging these into combat, but I'm so glad you made it through unscathed!"`));
						r.push(`${He} ${say}s excitedly, rubbing your sizeable balls while licking ${his} lips.`);
					} else if (V.PC.balls >= 5) {
						r.push(`${He} no doubt noticed your bulge as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"Glad to see these made it through unharmed!"`));
						r.push(`${He} ${say}s, licking ${his} lips lustfully while cupping your balls.`);
					}
				} else if (isPCCareerInCategory("engineer")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"How did you get any work done with these hanging over your designs?"`));
						r.push(`${he} smirks as ${he} gropes your breasts.`);
					}
					r.push(`${He} slips ${his} hand down your pants.`);
					r.push(Spoken(rapist, `"I see what kind of tools you like. Big and strong!"`));
					if (V.PC.balls >= 9) {
						r.push(`It's impossible to hide the two firm globes beneath your dick, so you can only wince as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"Oh my! I must have been tight squeezed into your work attire! I hope I can handle such a large-scale construction job!"`));
						r.push(`${He} ${say}s excitedly, rubbing your sizeable balls while licking ${his} lips.`);
					} else if (V.PC.balls >= 5) {
						r.push(`${He} no doubt noticed your bulge as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"Ah! It looks like you have a nice construction crew all ready for me!"`));
						r.push(`${He} ${say}s, licking ${his} lips lustfully while cupping your balls.`);
					}
				} else if (isPCCareerInCategory("medicine")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"I'm sure you had quite the number of clients after a pair of these,"`));
						r.push(`${he} smirks as ${he} gropes your breasts.`);
					}
					r.push(`${He} slips ${his} hand down your pants.`);
					r.push(Spoken(rapist, `"Huh, I wonder if that's real..."`));
					if (V.PC.balls >= 9) {
						r.push(`It's impossible to hide the two firm globes beneath your dick, so you can only wince as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"Hitting the experimental drugs a little, are we? Let me help you with your research!"`));
						r.push(`${He} ${say}s excitedly, rubbing your sizeable balls while licking ${his} lips.`);
					} else if (V.PC.balls >= 5) {
						r.push(`${He} no doubt noticed your bulge as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"Heh, access to such lovely virility aids did wonders for you and I."`));
						r.push(`${He} ${say}s, licking ${his} lips lustfully while cupping your balls.`);
					}
				} else if (isPCCareerInCategory("slaver")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"A lovely pair of deployable distractions,"`));
						r.push(`${he} smirks as ${he} gropes your breasts.`);
					}
					r.push(`${He} slips ${his} hand down your pants.`);
					r.push(Spoken(rapist, `"Did you have a nickname for him? Like 'the discipliner' or something?"`));
					if (V.PC.balls >= 9) {
						r.push(`It's impossible to hide the two firm globes beneath your dick, so you can only wince as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"Pump me full, like all those fresh captures you broke in!"`));
						r.push(`${He} ${say}s excitedly, rubbing your sizeable balls while licking ${his} lips.`);
					} else if (V.PC.balls >= 5) {
						r.push(`${He} no doubt noticed your bulge as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"I wonder how many slaves you had to empty these bad boys out into."`));
						r.push(`${He} ${say}s, licking ${his} lips lustfully while cupping your balls.`);
					}
				} else if (isPCCareerInCategory("celebrity")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"Nice and supple. Just like I'd expect from a man sporting tits."`));
						r.push(`${he} smirks as ${he} gropes your breasts.`);
					}
					r.push(`${He} slips ${his} hand down your pants;`);
					r.push(Spoken(rapist, `"Oh, now those tabloids make sense."`));
					if (V.PC.balls >= 9) {
						r.push(`It's impossible to hide the two firm globes beneath your dick, so you can only wince as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"You certainly stole the show, no matter what you wore!"`));
						r.push(`${He} ${say}s excitedly, rubbing your sizeable balls while licking ${his} lips.`);
					} else if (V.PC.balls >= 5) {
						r.push(`${He} no doubt noticed your bulge as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"Heh, I always loved the sight of these in your fine clothes."`));
						r.push(`${He} ${say}s, licking ${his} lips lustfully while cupping your balls.`);
					}
				} else if (isPCCareerInCategory("escort")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"With these hanging out, how many men tried to pick you up?"`));
						r.push(`${he} smirks as ${he} gropes your breasts.`);
					}
					r.push(`${He} slips ${his} hand down your pants.`);
					r.push(Spoken(rapist, `"Now there's the money maker!"`));
					if (V.PC.balls >= 9) {
						r.push(`It's impossible to hide the two firm globes beneath your dick, so you can only wince as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"I bet these made you quite popular with those little sluts looking to get knocked up! Can't wait to join them!"`));
						r.push(`${He} ${say}s excitedly, rubbing your sizeable balls while licking ${his} lips.`);
					} else if (V.PC.balls >= 5) {
						r.push(`${He} no doubt noticed your bulge as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"And his two fine friends as well!"`));
						r.push(`${He} ${say}s, licking ${his} lips lustfully while cupping your balls.`);
					}
				} else if (isPCCareerInCategory("gang")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"You're a lot less threatening with these,"`));
						r.push(`${he} smirks as ${he} gropes your breasts.`);
					}
					r.push(`${He} slips ${his} hand down your pants.`);
					r.push(Spoken(rapist, `"I bet he's seen a lot of action, hasn't he?"`));
					if (V.PC.balls >= 9) {
						r.push(`It's impossible to hide the two firm globes beneath your dick, so you can only wince as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"I'd have been worried, carrying around jewels like these. Glad they're healthy and soon to be very happy!"`));
						r.push(`${He} ${say}s excitedly, rubbing your sizeable balls while licking ${his} lips.`);
					} else if (V.PC.balls >= 5) {
						r.push(`${He} no doubt noticed your bulge as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"Your coin purse is looking a little heavy. How bout I help you empty it?"`));
						r.push(`${He} ${say}s, licking ${his} lips lustfully while cupping your balls.`);
					}
				} else if (isPCCareerInCategory("servant")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"Did your Master even ask before he stuck you with these?"`));
						r.push(`${he} smirks as ${he} gropes your breasts.`);
					}
					r.push(`${He} slips ${his} hand down your pants.`);
					if (V.PC.dick >= 3) {
						r.push(Spoken(rapist, `"Now that's surprising. I expected something smaller."`));
					} else {
						r.push(Spoken(rapist, `"Can't say I'm surprised. Wouldn't want another rooster in the henhouse after all."`));
					}
					if (V.PC.balls >= 9) {
						r.push(`It's impossible to hide the two firm globes beneath your dick, so you can only wince as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"Did not expect them to be so, profound... Compensating for all the years you weren't allowed to use them?"`));
						r.push(`${He} ${say}s excitedly, rubbing your sizeable balls while licking ${his} lips.`);
					} else if (V.PC.balls >= 5) {
						r.push(`${He} no doubt noticed your bulge as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"And then there's these! Such lovely baby makers!"`));
						r.push(`${He} ${say}s, licking ${his} lips lustfully while cupping your balls.`);
					}
				} else if (isPCCareerInCategory("BlackHat")) {
					if (V.PC.boobs >= 300) {
						r.push(Spoken(rapist, `"Nice and supple. What are the odds that I can find these babies on the internet?"`));
						r.push(`${he} smirks as ${he} gropes your breasts.`);
					}
					r.push(`${He} slips ${his} hand down your pants.`);
					r.push(Spoken(rapist, `"You wouldn't mind if I download a few files now would you? Well, not that it matters."`));
					if (V.PC.balls >= 9) {
						r.push(`It's impossible to hide the two firm globes beneath your dick, so you can only wince as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"You really should dig a little deeper into the drugs you find online, not that I'm complaining!"`));
						r.push(`${He} ${say}s excitedly, rubbing your sizeable balls while licking ${his} lips.`);
					} else if (V.PC.balls >= 5) {
						r.push(`${He} no doubt noticed your bulge as ${he} reaches a little lower.`);
						r.push(Spoken(rapist, `"I bet you're proud of these, with as many as you've seen out there."`));
						r.push(`${He} ${say}s, licking ${his} lips lustfully while cupping your balls.`);
					}
				}
				r.push(`Satisfied, ${he} pulls your cock out of its increasingly cramped confines.`);
				r.push(Spoken(rapist, `"Look at him grow, he knows what comes next..."`));
				r.push(`${He} teases as ${he} pushes you to the ground and climbs on top of you.`);
				App.Events.addParagraph(node, r);
				r = [];
				r.push(`${He} lines ${himself} up with the tip of your dick before taking its entire length into ${himself}. ${He} lets out a lust filled moan as ${he} begins to bounce on your traitorous member. You can do nothing to stop ${him} from riding you to climax, so you just enjoy the sight of ${his} breasts bouncing to ${his} pace. As you feel your orgasm approaching, you try to time it so you can slip out of ${him} just before you blow your load, but you have no such luck.`);
				r.push(Spoken(rapist, `"You really think I'd let you spoil my plans?"`));
				r.push(`${he} asks as ${he} grinds against you, making sure you cum deep in ${his} pussy. ${He} leans back and massages ${his}`);
				if (V.PC.balls >= 20) {
					r.push(`taut`);
				}
				r.push(`stomach, savoring the sensation of your seed seeping into ${him}.`);
				r.push(Spoken(rapist, `"That's it, make me a mommy."`));
				r.push(`${He} leans in close and you pop free of ${his} snatch.`);
				r.push(Spoken(rapist, `"Be a good ${girlP} and make this arcology a nice place for your bastard. I want to retire in luxury."`));
				r.push(`${He} blows you a kiss as ${he} stuffs a plug up ${his} vagina, redresses and heads on ${his} way. By the time you loosen your bindings, ${he} is long gone.`);
				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 can't allow such an indignity to happen again, nor do you need the stress of a bastard trying to seize control of your estate when you want to retire, but you wouldn't mind having your way with ${him} if you get the chance.`);
				App.Events.addParagraph(node, r);
			}
		} else {
			App.UI.DOM.appendNewElement("div", node, `Now the only question is what to do with the would-be rapist. You could toss them out of the arcology, but it might be more fun to turn the tables on ${him}.`);

			let slaveCosts = slaveCost(rapist);
			slaveCosts -= contractCost;
			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(slaveCosts)}.`, "note");

			node.append(App.Desc.longSlave(rapist, {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);
		}

		function enslave() {
			const el = new DocumentFragment();
			cashX(forceNeg(contractCost), "slaveTransfer", rapist);
			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(rapist));
			return el;
		}

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

			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${(rapist.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(rapist));
			App.Events.addParagraph(el, r);
			return el;
		}

		function arcade() {
			assignJob(rapist, "be confined in the arcade");
			rapist.sentence = 4;
			cashX(forceNeg(contractCost), "slaveTransfer", rapist);
			newSlave(rapist);/* 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(rapist, "work in the dairy");
			cashX(forceNeg(contractCost), "slaveTransfer", rapist);
			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.`);
			}
			rapist.boobs += 300;
			newSlave(rapist); /* skip New Slave Intro */
			App.Events.addNode(el, r);
			return el;
		}

		function farmyard() {
			const el = new DocumentFragment();
			const r = [];
			assignJob(rapist, "work as a farmhand");
			cashX(forceNeg(contractCost), "slaveTransfer", rapist);
			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 working the fields`);
			if (V.farmyardShows === 1) {
				r.push(`and`);
				if (V.seeBestiality === 1) {
					r.push(`getting fucked by animals.`);
				} else {
					r.push(`putting on shows with animals.`);
				}
			}
			newSlave(rapist);/* skip New Slave Intro */
			App.Events.addNode(el, r);
			return el;
		}

		function amputate() {
			const el = new DocumentFragment();
			const r = [];
			healthDamage(rapist, 20);
			removeLimbs(rapist, "all");
			rapist.behavioralFlaw = "odd";
			cashX(forceNeg(contractCost), "slaveTransfer", rapist);
			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 touch you again without arms and legs.`);
			if (rapist.balls > 0) {
				const geld = function() {
					const el = new DocumentFragment();
					const r = [];
					healthDamage(rapist, 20);
					rapist.balls = 0;
					rapist.devotion -= 25;
					rapist.trust -= 25;
					cashX(forceNeg(contractCost), "slaveTransfer", rapist);
					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(rapist));
					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;
		}
	}
};


code:
App.Events.PSchoolSuggestion = class PSchoolSuggestion extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => V.arcologies[0].prosperity > 80,
			() => V.schoolSuggestion === 0,
			() => App.Utils.schoolCounter() === 0,
		];
	}

	execute(node) {
		V.nextButton = "Continue";
		V.nextLink = "Scheduled Event";
		const startFee = 10000;

		V.schoolSuggestion = 1;
		App.Events.addParagraph(node, [`You entertain your most prominent citizens on a regular basis; it's expected, it's good business, and it's occasionally interesting. You're fashionably late again tonight, but these affairs are usually informal, and your knot of guests start without you with no offense given or taken. They know you're busy, they respect you for it, and they know you'll make an appearance if and when you can. The drinks will be just as good either way.`]);

		App.Events.addParagraph(node, [`When you do appear, you get an even greater acclamation than usual. It seems your best citizens have discovered that they're unanimous in the belief that the arcology would benefit if a reputable slave school opened a branch campus here. Now they're deep in debate over which of the prominent schools is the best, and it's turned into a friendly but spirited dispute over the schools' merits.`]);

		App.Events.addParagraph(node, [`It seems a young, thin woman in a modern business suit was concluding her own argument when you arrived. "In summation, I propose we offer our support for Nueva Universidad de Libertad," says the woman, who you now realize is a very feminine man. "Nullification may seem extreme, but serves to expand the potential market amongst more... traditional slaveowners," says the man, who you now realize is a woman who merely looks like a very feminine man.`]);

		App.Events.addParagraph(node, [`"I believe what you need in a slave is a good base. As such, The Utopian Orphanage is the best. They offer slaves who were raised with careful attention; they're beautiful, smart, well-educated and unspoiled." The young surgeon continues. "No traumas, a happy childhood, obedient and trusting. You can then mold them to your will as you please, I have enough faith in my skills to achieve the results I desire myself."`]);

		if (V.seeDicks !== 100) {
			App.Events.addParagraph(node, [`"The Slave School for me," says a portly man with a thriving slave breaking business down in the markets. "Their girls are pretty, skilled, and innocent, without any of that weird crap the other schools go in for. Besides, all that special stuff drives up the prices. TSS girls are cheap for what you get. When you're tired of one, just buy another." He turns to his friend and business partner, a much thinner man. "Though I'm sure you disagree with me."`]);
			App.Events.addParagraph(node, [`"Of course I do, we've been having this debate every day for ten years." The thin man laughs. "Hasn't hurt our company, though. Anyway, I'm a GRI man. It's much harder to change a girl's body than it is to train her mind. The Growth Research Institute might sell their girls with no training and some nasty flaws, but you can fix those faster than you can grow a well-trained skinny girl's tits out to here," and he gestures far out in front of his own chest.`]);

			App.Events.addParagraph(node, [`An older woman standing across from him sniffs. "St. Claver's knows how to do both. They train them right, and if they aren't perfectly made, well, that's what plastic surgery is for." She favors the group with a sharp smile. "The best part is that between the silicone and their, ahem, strict training, they're all the same. Once you get used to their girls, you can always rely on them to give you more of what you like."`]);
		}

		if (V.seeDicks !== 0) {
			App.Events.addParagraph(node, [`"That's what I like about L'École," her neighbor puts in.${(V.language !== "French") ? ` "Bad French, I know: Le Eycole Dess Encoolees."` : ``} Less articulate than the others, he makes a vague motion down near his waist, as though he were fucking something, and then stops himself. "Anyway. If you like butts, they're the best. You can train slaves for years and not get them as eager to take it up the ass as that place makes 'em. Their girls come as soon as you stick it in 'em."`]);

			App.Events.addParagraph(node, [`"Eugh." His neighbor rolls his eyes. "If your taste is a bit more refined, the Gymnasium-Academy makes their, ha, girls more well-rounded than just that. Not that they aren't delightfully entertaining when it comes to that, either. But they're also fit, well-trained, and even skilled at martial arts. They're perfect if you like hot young things all ready to be your bodyguard."`]);

			App.Events.addParagraph(node, [`The unusually competent young heiress standing next to him snickers. "If you're going to bring up refinement, um, hello, the Futanari Sisters. I have four futas in my apartment having sex with each other right now. How do I know? Because they're always having sex with each other. They never stop." Her eyes take on a faraway look and she pauses. "Um, haha, I know what I'm doing later."`]);
		}

		App.Events.addParagraph(node, [`"If you like them soft and mellow, you got to go with The Cattle Ranch," a buff man blurts loudly while slamming down his empty mug. "I've got a pair of 'em for my bedroom; they are so loving after a good milking. Taste good too." His drinking buddy retorts, "Too much work is what they are. They might as well be animals with how they act.${(V.seePreg === 0) ? " In addition, hope you like pregnant pussies, 'cause you need to keep them gravid or their milk dries up." : ""}"`]);

		App.Events.addParagraph(node, [`"I see good taste is scarce within this walls," suddenly stated a young man previously quiet in his corner. "I say quality and strength is where the game should be played and there's nothing better than the girls from the Hippolyta Academy."`]);

		App.Events.addParagraph(node, [`The older gentleman who seems to have been acting as unofficial moderator before you came in turns to you. "In any case, ${(V.PC.title === 1) ? "sir" : "madam"}, we agreed before you came in. We'd like to get together and pay half the cost of encouraging a slave school to set up a branch campus here, if you'd be willing to pay the other half and choose which. I think ${cashFormat(startFee)} from you would cover it." He looks around the group. "Before we started this little debate, we all agreed to chip in regardless of which you chose."`]);

		App.UI.DOM.appendNewElement("div", node, `Selecting a school will cost ${cashFormat(startFee)} and add minor upkeep costs`, "note");

		const choices = [];
		if (V.seeDicks !== 100) {
			choices.push(new App.Events.Result(`The Slave School`, TSS));
			choices.push(new App.Events.Result(`The Utopian Orphanage`, TUO));
			choices.push(new App.Events.Result(`The Growth Research Institute`, GRI));
			choices.push(new App.Events.Result(`St. Claver Preparatory`, SCP));
			if (V.seePreg !== 0) {
				choices.push(new App.Events.Result(`The Cattle Ranch`, TCR));
			}
			choices.push(new App.Events.Result(`The Hippolyta Academy`, HA));
		}
		if (V.seeDicks !== 0) {
			choices.push(new App.Events.Result(`L'École des Enculées`, LDE));
			choices.push(new App.Events.Result(`The Gymnasium-Academy`, TGA));
			choices.push(new App.Events.Result(`The Futanari Sisters`, TFS));
			choices.push(new App.Events.Result(`Nueva Universidad de Libertad`, NUL));
		}
		App.Events.addResponses(node, choices);

		function TSS() {
			V.TSS.schoolPresent = 1;
			cashX(-startFee, "policies");
			return `You thank your leading citizens and announce your decision: you'll be contacting The Slave School about opening a branch campus here, immediately.`;
		}

		function TUO() {
			V.TUO.schoolPresent = 1;
			cashX(-startFee, "policies");
			return `You thank your leading citizens and announce your decision: you'll be contacting The Utopian Orphanage about opening a branch campus here, immediately.`;
		}

		function GRI() {
			V.GRI.schoolPresent = 1;
			cashX(-startFee, "policies");
			return `You thank your leading citizens and announce your decision: you'll be contacting the Growth Research Institute about opening a branch campus here, immediately.`;
		}

		function SCP() {
			V.SCP.schoolPresent = 1;
			cashX(-startFee, "policies");
			return `You thank your leading citizens and announce your decision: you'll be contacting St. Claver Preparatory about opening a branch campus here, immediately.`;
		}

		function TCR() {
			V.TCR.schoolPresent = 1;
			cashX(-startFee, "policies");
			return `You thank your leading citizens and announce your decision: you'll be contacting the Cattle Ranch about opening a local pasture, immediately.`;
		}

		function HA() {
			V.HA.schoolPresent = 1;
			cashX(-startFee, "policies");
			return `You thank your leading citizens and announce your decision: you'll be contacting the Hippolyta Academy about opening a local branch, immediately.`;
		}

		function LDE() {
			V.LDE.schoolPresent = 1;
			cashX(-startFee, "policies");
			return `You thank your leading citizens and announce your decision: you'll be contacting L'École des Enculées about opening a branch campus here, immediately.`;
		}

		function TGA() {
			V.TGA.schoolPresent = 1;
			cashX(-startFee, "policies");
			return `You thank your leading citizens and announce your decision: you'll be contacting the Gymnasium-Academy about opening a branch campus here, immediately.`;
		}

		function TFS() {
			V.TFS.schoolPresent = 1;
			cashX(-startFee, "policies");
			return `You thank your leading citizens and announce your decision: you'll be contacting the Futanari Sisters about moving a harem of futas here, immediately.`;
		}

		function NUL() {
			V.NUL.schoolPresent = 1;
			cashX(-startFee, "policies");
			return `You thank your leading citizens and announce your decision: you'll be contacting Nueva Universidad de Libertad about opening a branch campus here, immediately.`;
		}
	}
};


code:
App.Events.PPeacekeepersDeficit = class PPeacekeepersDeficit extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => V.peacekeepers !== 0,
			() => V.peacekeepers.attitude >= 0
		];
	}

	execute(node) {
		if (V.peacekeepers === 0) { // Do not remove (exists for typing support)
			return node;
		}

		V.nextButton = "Continue";

		App.Events.addParagraph(node, [`General ${V.peacekeepers.generalName}'s peacekeeping force has stabilized the neighboring region somewhat. True to his word, the general has indeed concentrated on his peacekeeping mandate, and hasn't done anything that might be construed as a move against the Free City or its interests. There are somewhat fewer refugees available from that area, and it's a less complete refuge for bad actors, but other than that, there hasn't been much reason for you to take notice. Until today, when General ${V.peacekeepers.generalName} gives you a call.`]);
		App.Events.addParagraph(node, [`It's a video link, and the general is in the field somewhere, wearing scuffed armor with his insignia of rank on the neck protector. He looks tired, and stress worse than simple fatigue is etched on his face, but he looks at you directly and gets on with it. "${PlayerName()}," he says, "to start, I'd like to assure you this is a secure line from my end. We rely on structural security more than you in the Free Cities, with your cutting-edge computing power, but it's effective." He's in what looks like a field command post, in what's almost certainly an improvised secure communications booth. "The situation is this," he explains. "I have two problems, and I hope you may be able to solve them both at once in a way that will be beneficial to you."`]);
		App.Events.addParagraph(node, [`"First," he says sharply, "I'm not getting the support I need out here." It obviously pains him to admit this, and the muscles along his jaw tense as he does, as though he's chewing on the words. "And I'm not giving anything away by telling you that. It's obvious enough, if you compare what I'm being asked to do here with the resources the politicians back home are willing to provide." At this, ${V.assistant.name} displays a quick summary of the political developments in the general's home country. General ${V.peacekeepers.generalName} is right; the expensive peacekeeping force is unpopular, and its support is being reduced by opportunistic politicians. "It isn't bad yet," he says, "but if this keeps up, I'm going to be rationing the most modern medical supplies for my wounded men and women. That's hard."`]);
		App.Events.addParagraph(node, [`"And second," he continues, "I'm having difficulty housing the prisoners we're taking. We're the only functioning law and order in this area, and in order to keep control I'm having to lock up everyone from armed bandits to petty looters. I don't have the resources to imprison them decently. I'm already getting flak about conditions in our main prison camp here." He arches an eyebrow. "Some people back home seem to care more about keeping prisoners comfortable than they care about getting my wounded men and women the best possible care. And I can't just reduce the prisoner population, either. There are too many of them. Word would get out, and there'd be hell to pay back home."`]);
		App.Events.addParagraph(node, [`The singular solution to the two problems is obvious. It's equally obvious that General ${V.peacekeepers.generalName} isn't going to be the one to propose it. He's not stupid.`]);

		const assistCash = 100000;
		const choices = [];
		if (V.cash >= assistCash) {
			choices.push(new App.Events.Result(`Offer to assist`, assist, `This will cost ${cashFormat(assistCash)} and provide a number of menial slaves`));
		} else {
			choices.push(new App.Events.Result(null, null, `You lack the funds to buy the prisoners.`));
		}
		choices.push(new App.Events.Result(`Connect the general with Free Cities pharmaceutical sources`, pharmaceutical));
		choices.push(new App.Events.Result(`Tell him his situation is untenable`, decline));

		App.Events.addResponses(node, choices);

		function assist() {
			const frag = new DocumentFragment();
			if (V.peacekeepers === 0) { // Do not remove (exists for typing support)
				return;
			}
			App.Events.addParagraph(frag, [`Understanding that the general needs to couch the situation in a way he can justify in public, and perhaps in a way he can justify to himself, you offer to house the prisoners on a contract basis, with immediate payment to the general so he can meet his forces' immediate needs. Naturally, the prisoners will be kept busy while you keep them; menial labor seems appropriate. It's unlikely that the situation will ever stabilize to the point where they can be released, so for safety, they should all be detained indefinitely. And of course, each prisoner's individual detention will be available for resale. Just like any other slave's.`]);
			V.peacekeepers.attitude += 5;
			V.menials += 200;
			cashX(-assistCash, "peacekeepers");
			App.Events.addParagraph(frag, [`The general is unable to keep from smiling slightly when he hears that you understand perfectly and are willing and able to assist. There's some bitterness there, but not much. The two of you adjust the terms. The new menial slaves will be delivered immediately, several hundred of them; the general prefers to have this be a one-time transfer. After all, having an ongoing prisoner pipeline between his prisoner pens and the Free City might draw unwanted political attention. For now, he has the funds he needs, not to mention an empty prison camp.`]);
			return frag;
		}

		function pharmaceutical() {
			if (V.peacekeepers === 0) { // Do not remove (exists for typing support)
				return;
			}
			let r = [];
			if (V.cash < 100000) {
				r.push(`Unfortunately, you lack the funds to buy the prisoners.`);
			}
			r.push(`It would be very expensive to provide the general with the kind of money necessary to make a difference in the medical supply situation of a military force sufficient to keep what used to be a small country pacified. You express your regrets at your inability to help directly. You offer to connect the general with Free Cities pharmaceutical resources that will probably be able to get him what his infirmaries need at a lower price. "Interesting," he says, considering the offer. "The usual providers at home will scream bloody murder when it gets out. But it's a good idea," he admits. "Though that does nothing for the prison camps." Part of his reluctance is probably due to an unspoken hesitation to do business with the Free Cities directly. But he's coming around.`);
			V.peacekeepers.attitude += 5;
			return r;
		}
		function decline() {
			if (V.peacekeepers === 0) { // Do not remove (exists for typing support)
				return;
			}
			V.peacekeepers.attitude -= 10;
			repX(5000, "event");
			return `You decide to use this as an object lesson in the limits of old world power projection, and tell his situation is untenable and that he should withdraw. If he doesn't have the political firepower necessary to get proper support and supply, he's better off cutting his losses. "That's not for you to say," he responds bitterly. "And that's not for me to say, either. I still go where I'm told and do what I'm told. Thank you for your time." He ends the call brusquely. Word of your verbal defense of the Free City's sphere of influence gets around, greatly improving your reputation.`;
		}
	}
};