code:
App.Events.pFoodCrisisUpperClass = class pFoodCrisisUpperClass extends App.Events.BaseEvent {
	actorPrerequisites() {
		return [];
	}

	eventPrerequisites() {
		return [];
	}

	execute(node) {
		const discount = V.PC.skill.trading >= 50 && ["capitalist", "entrepreneur", "business kid"].includes(V.PC.career) || V.PC.skill.trading >= 100;
		const price = discount ? 7500 : 10000;

		App.Events.addParagraph(node, [`Another few weeks has passed since your last meeting with your citizens regarding rationing, and things have only deteriorated further since then. It was only a matter of time before the wealthier citizens of ${V.arcologies[0].name} paid you a visit one afternoon. While being able to afford food wasn't exactly difficult for them as of yet, they could read the writing on the wall, and knew it would only be a matter of time before the prices of food were so high that even they would be forced to beg for handouts.`]);
		App.Events.addParagraph(node, [`Seeing the progress you had made since taking control of the arcology, they decided their best course of action was to come to you with a proposition. They would allow you to take full control of the food supply in ${V.arcologies[0].name}, and in return you would keep them well-fed. This is a unique opportunity. If you turn their offer down, the citizens of your arcology will find another way of surviving.`]);

		App.Events.addResponses(node, [
			new App.Events.Result(`Set up a food market`, foodMarket, `This will cost an initial investment of ${cashFormat(price * 15)}${discount ? `, reduced by your knowledge of trading` : ``}.`),
			new App.Events.Result(`Politely decline their offer, but continue giving them rations`, enough, `This will cost ${cashFormat(price)} and ${discount ? `some upkeep, reduced by your knowledge of trading` : `will incur significant upkeep costs`}.`),
			new App.Events.Result(`Turn down their offer and end rationing completely`, refuse),
		]);

		function foodMarket() {
			V.mods.food.market = true;
			V.mods.food.rations = 0;
			cashX(forceNeg(price * 15), "farmyard");
			repX(5000, "event");
			return `You know that a proposition like this wouldn't have been easy for your citizens to make, and you also know that there is no one better suited to a task like this than you. You announce that you will be setting up a market to buy, sell, and store food in, and that you'll make sure that the citizens will continue to be well-fed. Your citizens are glad to hear that you are looking out for their best interests.`;
		}

		function enough() {
			V.mods.food.rations = 5;
			cashX(forceNeg(price), "farmyard");
			repX(1500, "event");
			return `Things have been going fairly well for you, but not that well — setting up an entirely new place to buy, sell, and store food would no doubt be an expensive undertaking. You tell the citizens that while you can't spare the resources to create a new market at the moment, you will honor your past agreement and continue giving them free rations. The people initially seem a bit disappointed that you don't seem to want to expand ${V.arcologies[0].name}, but are ultimately glad to hear that you'll continue taking care of them.`;
		}

		function refuse() {
			V.mods.food.rations = 0;
			repX(-1500, "event");
			return `While a new place to buy, sell, and store food in ${V.arcologies[0].name} would most likely come in quite handy in the future, you ultimately decide that you simply cannot spare the resources required. In fact, giving rations at all was a costly venture, and after not having seen any sort of return-on-investment, you decide that you are unable to continue giving out rations anymore. Your citizens are angry at the fact that you seem not to care about them at all, but that's their problem.`;
		}
	}
};


code:
// cSpell:ignore Corbaci

App.Events.PCitizensAndCivilians = class PCitizensAndCivilians extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => V.mercenaries >= 3,
		];
	}

	execute(node) {
		V.nextButton = " "; // hide button until user makes a selection

		let r = [];
		const mercDiscount = (V.PC.skill.warfare >= 100 || V.PC.career === "arcology owner");
		const cost = mercDiscount ? 10000 : 20000;

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

		if (V.assistant.personality > 0) {
			r.push(`While working at your desk, you are accompanied by the luscious sound of ${V.assistant.name} humming to ${himselfA}, which ${heA} does to indicate ${heA}'s working on a difficult task. After this goes on for a while,`);
			switch (V.assistant.appearance) {
				case "monstergirl":
					r.push(`${hisA} monster${girlA} avatar uses ${hisA} tentacle hair to wave for your attention`);
					break;
				case "shemale":
					r.push(`${hisA} avatar helicopters ${hisA} dick until ${heA} has your attention`);
					break;
				case "amazon":
					r.push(`${hisA} avatar jumps up and down for your attention, hooting cheerfully,`);
					break;
				case "hypergoddess":
					r.push(`${hisA} avatar leans onto ${hisA} massive belly, allowing ${hisA} tits to flop onto the ground to get your attention,`);
					break;
				case "loli":
					r.push(`${hisA} avatar eagerly jumps up and down to get your attention`);
					break;
				case "preggololi":
					r.push(`${hisA} avatar eagerly waves ${hisA} hands to get your attention`);
					break;
				case "businesswoman":
					r.push(`${hisA} avatar takes off ${hisA} reading glasses, straightens ${hisA} suit jacket,`);
					break;
				case "cherub":
				case "fairy":
				case "imp":
				case "pregnant fairy":
					r.push(`${hisA} avatar flies up to your face and waves ${hisA} arms`);
					break;
				case "goddess":
					r.push(`${hisA} avatar hefts up ${hisA} gravid body, glowing brighter than usual to get your attention,`);
					break;
				case "schoolgirl":
					r.push(`${hisA} school${girlA} avatar bounces up and down for your attention`);
					break;
				case "angel":
					r.push(`${hisA} avatar flaps ${hisA} wings to grab your attention`);
					break;
				case "incubus":
					r.push(`${hisA} avatar blows a huge load of cum to get your attention`);
					break;
				case "succubus":
					r.push(`${hisA} avatar lets loose a huge moan to get your attention`);
					break;
				case "witch":
					r.push(`${hisA} avatar summons a number of explosions, searing perfectly placed holes on ${hisA} robe, to get your attention`);
					break;
				case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
					r.push(`${hisA} avatar explodes into a twisted being of flesh and blood, reforms into ${hisA} usual shape,`);
					break;
				default:
					r.push(`${hisA} symbol glows to get your attention`);
			}
			r.push(`and says, "${properTitle()}, I have a suggestion. At your request I have been reviewing historical slave societies for parallels with our current situation. I calculate it would be very advantageous to bind your mercenaries more closely to the arcology. It would be expensive, but if they were all given slaves, better weapons, and some sort of title, they would defend this place to the death."`);
		} else {
			r.push(`${capFirstChar(V.assistant.name)} catches your attention as you work at your desk. ${HeA} says, "${properTitle()}, a suggestion. Review of historical slave societies for parallels with your current situation is complete. Analysis indicates it would be advantageous to increase the loyalty of your mercenaries. It would be expensive, but if they were given slaves, better weapons, and an honorary title, they would defend the arcology with increased effectiveness."`);
		}

		App.Events.addParagraph(node, r);
		r = [];
		r.push(
			App.UI.DOM.makeElement("span", "This is a unique and very important opportunity", "bold"),
			"and must not be taken lightly.",
			App.UI.DOM.makeElement("span", "All of these choices have the same gameplay effect, and only differ in theme.", "note"),
		);
		App.Events.addParagraph(node, r);

		function costDesc() {
			if (mercDiscount) {
				return App.UI.DOM.combineNodes(
					`This will cost ${cashFormat(cost)} and some upkeep, `,
					App.UI.DOM.makeElement("span", "reduced by your mercenary contacts", ["skill", "player"])
				);
			} else {
				return `This will cost ${cashFormat(cost)} and incur significant upkeep costs`;
			}
		}

		const choices = [];
		choices.push(new App.Events.Result(`Decline`, decline));
		choices.push(new App.Events.Result(`They shall be my Knights`, generic, costDesc()));

		if (V.arcologies[0].FSRomanRevivalist >= 10) {
			choices.push(new App.Events.Result(`They shall be my Evocati`, FSRomanRevivalist, costDesc()));
		}
		if (V.arcologies[0].FSNeoImperialist >= 10) {
			choices.push(new App.Events.Result(`They shall be my Black Eagles`, FSNeoImperialist, costDesc()));
		}
		if (V.arcologies[0].FSAztecRevivalist >= 10) {
			choices.push(new App.Events.Result(`They shall be my Shorn Ones`, FSAztecRevivalist, costDesc()));
		}
		if (V.arcologies[0].FSChineseRevivalist >= 10) {
			choices.push(new App.Events.Result(`They shall be my Imperial Guards`, FSChineseRevivalist, costDesc()));
		}
		if (V.arcologies[0].FSEgyptianRevivalist >= 10) {
			choices.push(new App.Events.Result(`They shall be my Medjay`, FSEgyptianRevivalist, costDesc()));
		}
		if (V.arcologies[0].FSEdoRevivalist >= 10) {
			choices.push(new App.Events.Result(`Naturally, they shall be the Samurai`, FSEdoRevivalist, costDesc()));
		}
		if (V.arcologies[0].FSArabianRevivalist >= 10) {
			choices.push(new App.Events.Result(`They shall be my Janissaries`, FSArabianRevivalist, costDesc()));
		}
		if (V.arcologies[0].FSAntebellumRevivalist >= 10) {
			choices.push(new App.Events.Result(`They shall be my Knights of the White Camelia`, FSAntebellumRevivalist, costDesc()));
		}
		if (V.arcologies[0].FSChattelReligionist >= 10) {
			choices.push(new App.Events.Result(`They shall be the Knights Templar`, FSChattelReligionist, costDesc()));
		}
		if (V.arcologies[0].FSDegradationist >= 10) {
			choices.push(new App.Events.Result(`They shall be my Immortals`, FSDegradationist, costDesc()));
		}
		if (V.arcologies[0].FSAssetExpansionist >= 10) {
			choices.push(new App.Events.Result(`They shall be the Vast Legions`, FSAssetExpansionist, costDesc()));
		}
		if (V.arcologies[0].FSTransformationFetishist >= 10) {
			choices.push(new App.Events.Result(`They shall be the Surgical Corps`, FSTransformationFetishist, costDesc()));
		}
		if (V.arcologies[0].FSGenderRadicalist >= 10) {
			choices.push(new App.Events.Result(`They shall be the Inglorious Bitches`, FSGenderRadicalist, costDesc()));
		}
		if (V.arcologies[0].FSGenderFundamentalist >= 10) {
			choices.push(new App.Events.Result(`They shall be the Thousand Sons`, FSGenderFundamentalist, costDesc()));
		}
		if (V.arcologies[0].FSRepopulationFocus >= 10) {
			choices.push(new App.Events.Result(`They shall be the Guardians of the Unborn`, FSRepopulationFocus, costDesc()));
		}
		if (V.arcologies[0].FSRestart >= 10) {
			choices.push(new App.Events.Result(`They shall be my Shadowed Hand`, FSRestart, costDesc()));
		}
		if (V.arcologies[0].FSPhysicalIdealist >= 10) {
			choices.push(new App.Events.Result(`They shall be the Asgardians`, FSPhysicalIdealist, costDesc()));
		}
		if (V.arcologies[0].FSHedonisticDecadence >= 10) {
			choices.push(new App.Events.Result(`They shall be the Tasters`, FSHedonisticDecadence, costDesc()));
		}
		if (V.arcologies[0].FSSupremacist >= 10) {
			choices.push(new App.Events.Result(`They shall be the Knights of the Blood`, FSSupremacist, costDesc()));
		}
		if (V.arcologies[0].FSSubjugationist >= 10) {
			choices.push(new App.Events.Result(`They shall be the Knights of the Purge`, FSSubjugationist, costDesc()));
		}
		if (V.arcologies[0].FSPaternalist >= 10) {
			choices.push(new App.Events.Result(`They shall be the Wardens`, FSPaternalist, costDesc()));
		}
		if (V.arcologies[0].FSIntellectualDependency >= 10) {
			choices.push(new App.Events.Result(`They shall be the Shepherds`, FSIntellectualDependency, costDesc()));
		}
		if (V.arcologies[0].FSSlaveProfessionalism >= 10) {
			choices.push(new App.Events.Result(`They shall be the Geniuses`, FSSlaveProfessionalism, costDesc()));
		}
		if (V.arcologies[0].FSBodyPurist >= 10) {
			choices.push(new App.Events.Result(`They shall be the Purifiers`, FSBodyPurist, costDesc()));
		}
		if (V.arcologies[0].FSSlimnessEnthusiast >= 10) {
			choices.push(new App.Events.Result(`They shall be the Abstemious`, FSSlimnessEnthusiast, costDesc()));
		}
		if (V.arcologies[0].FSPetiteAdmiration >= 10) {
			choices.push(new App.Events.Result(`They shall be the Caretakers`, FSPetiteAdmiration, costDesc()));
		}
		if (V.arcologies[0].FSStatuesqueGlorification >= 10) {
			choices.push(new App.Events.Result(`They shall be the Titans`, FSStatuesqueGlorification, costDesc()));
		}
		if (V.arcologies[0].FSPastoralist >= 10) {
			choices.push(new App.Events.Result(`They shall be the Rangers`, FSPastoralist, costDesc()));
		}

		App.Events.addResponses(node, choices);

		function decline() {
			unlock();
			return `The suggestion is absurd; no historical lessons are necessary for a world where drones and supercomputers rule the day. Your mercenaries will doubtless perform well enough as mercenaries.`;
		}

		function setConsequences(title){
			repX(5000, "event");
			cashX(forceNeg(cost), "mercenaries");
			V.mercenaries = 5;
			V.mercenariesTitle = title;
			unlock();
		}
		function generic() {
			setConsequences("Knights");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Knight-Captain reporting for duty, ${properTitle()}." The mercenaries — no, the Knights — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of prototype armor equipped with the latest weapons. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSRomanRevivalist() {
			setConsequences("Evocati");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Centurion reporting for duty, ${properTitle()}." The mercenaries — no, the Evocati — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of prototype armor equipped with the latest weapons and bearing a Roman standard. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSNeoImperialist() {
			setConsequences("Black Eagles");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Black Marshal reporting for duty, ${properTitle()}." The mercenaries — no, the Black Eagles — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of prototype armor equipped with the latest weapons and bearing a standard with your Imperial crest. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSAztecRevivalist() {
			setConsequences("Shorn Ones");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Centurion reporting for duty, ${properTitle()}." The mercenaries — no, the Shorn Ones — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of prototype armor equipped with the latest weapons and bearing an Aztec standard adorned on a spear. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSChineseRevivalist() {
			setConsequences("Imperial Guards");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "General of the Imperial Guard, reporting for duty, ${properTitle()}." The mercenaries — no, the Imperial Guards — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of prototype armor equipped with the latest weapons and bearing an Imperial Chinese war banner. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSEgyptianRevivalist() {
			setConsequences("Medjay");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "First Medjay reporting for duty, ${properTitle()}." The mercenaries — no, the Medjay — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of prototype armor equipped with the latest weapons and bearing a faux cheetah cloak. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSEdoRevivalist() {
			setConsequences("Samurai");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Your Samurai-Lord reports for duty, ${properTitle()}." The mercenaries — no, the Samurai — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of prototype armor equipped with the latest weapons, exterior plates styled after lacquered Samurai armor, and an enraged mask covering the face. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSArabianRevivalist() {
			setConsequences("Janissaries");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Corbaci reporting for duty, ${properTitle()}." The mercenaries — no, the Janissaries — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of prototype armor equipped with the latest weapons and cloaked in an outer garment of fine oriental silks. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSAntebellumRevivalist() {
			setConsequences("Knights of the White Camelia");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Knight-Commander reporting for duty, ${properTitle()}." The mercenaries — no, the Knights of the White Camelia — are well looked after. They are each assigned a nice apartment, and a suit of prototype armor equipped with the latest weapons, enamelled with white and gold, and emblazoned with a white-and-yellow camellia flower. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSChattelReligionist() {
			setConsequences("Knights Templar");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Inquisitor-General reporting for duty, ${properTitle()}." The mercenaries — no, the Knights Templar — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of prototype armor equipped with the latest weapons and bearing a cloak emblazoned with the symbol of God. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSDegradationist() {
			setConsequences("Immortals");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Satrap reporting for duty, ${properTitle()}." The mercenaries — no, the Immortals — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of prototype armor equipped with the latest weapons and more than one wicked, curved blade. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSAssetExpansionist() {
			setConsequences("Vast Legions");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "The Vast Legions reporting for duty, ${properTitle()}." The mercenaries — no, the Vast Legions — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of bulky, heavily armored prototype armor. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSTransformationFetishist() {
			setConsequences("Surgical Corps");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Surgeon-General reporting for duty, ${properTitle()}." The mercenaries — no, the Surgical Corps — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of prototype armor equipped with the latest medical equipment. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSGenderRadicalist() {
			setConsequences("Inglorious Bitches");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Guess that makes me a bitch, ${properTitle()}." The mercenaries — no, the Inglorious Bitches — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of prototype armor slathered in garish neon paint. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSGenderFundamentalist() {
			setConsequences("Thousand Sons");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Allfather reporting for duty, ${properTitle()}." The mercenaries — no, the Thousand Sons — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, a private gym, and a suit of prototype armor that preserves a sample of the wearer's genetic material in the event of death. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSRepopulationFocus() {
			setConsequences("Guardians of the Unborn");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Fetal Guardian reporting for duty, ${properTitle()}." The mercenaries — no, the Guardians of the Unborn — are well looked after. They are each assigned a nice apartment, three fertile slavegirls for the men, assured maternity leave for the ladies, and a suit of prototype armor designed to keep even the most heavily pregnant mercenary's child safe and sound. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSRestart() {
			setConsequences("Shadowed Hand");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Your Right Hand reporting for duty, ${properTitle()}." The mercenaries — no, the Shadowed Hand of the Societal Elite — are well looked after. They are each assigned a glorious apartment, a slave of their choice, what ever luxuries they can think of, and a suit of prototype armor equipped with the latest weapons and defenses. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSPhysicalIdealist() {
			setConsequences("Asgardians");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Foehammer reporting for duty, ${properTitle()}." The mercenaries — no, the Asgardians — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, a private gym, and a suit of prototype armor equipped with the latest weapons. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSHedonisticDecadence() {
			setConsequences("Tasters");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Lead Foodie reporting for duty, ${properTitle()}." The mercenaries — no, the Tasters — are well looked after. They are each assigned a comfy apartment, a freshly enslaved, plush servant, all the food and drink they can want (while off duty), and a suit of self-propelling prototype armor designed for maximum comfort without sacrificing protection. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSSupremacist() {
			setConsequences("Knights of the Blood");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Knights of the Blood reporting for duty, ${properTitle()}." The mercenaries — no, the Knights of the Blood — are well looked after. They are each assigned a nice apartment, three freshly enslaved servants of inferior races, and a suit of prototype armor equipped with the latest weapons. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSSubjugationist() {
			setConsequences("Knights of the Purge");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Knights of the Purge reporting for duty, ${properTitle()}." The mercenaries — no, the Knights of the Purge — are well looked after. They are each assigned a nice apartment, three freshly enslaved servants of the inferior race, and a suit of prototype armor equipped with the latest weapons. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSPaternalist() {
			setConsequences("Wardens");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a redesigned contract between you. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "First Warden reporting for duty, ${properTitle()}." The mercenaries — no, the Wardens — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of prototype armor equipped with the latest weapons and a collapsible riot shield. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSIntellectualDependency() {
			setConsequences("Shepherds");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how needed this was. Just the other day I saw a half dozen bimbos waiting for a broken elevator. When I walked past an hour later, they were still waiting." He rises and gives you a short bow. "Shepherd of the slow reporting for duty, ${properTitle()}." The mercenaries — no, the Shepherds — are well looked after. They are each assigned a nice apartment, a very horny servant to stake their lust, and a suit of prototype armor equipped with the latest of weapons and a bevy of toys to lure wayward slaves with. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSSlaveProfessionalism() {
			setConsequences("Geniuses");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Chief brain reporting for duty, ${properTitle()}." The mercenaries — no, the Geniuses — are well looked after. They are each assigned a nice apartment, a skilled courtesan, and a suit of prototype armor equipped with cutting edge weaponry and combat systems. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSBodyPurist() {
			setConsequences("Purifiers");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Master Purifier reporting for duty, ${properTitle()}." The mercenaries — no, the Purifiers — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of prototype armor equipped with a cleansing flamethrower. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSSlimnessEnthusiast() {
			setConsequences("Abstemious");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Lord-Abstinent reporting for duty, ${properTitle()}." The mercenaries — no, the Abstemious — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of sleek prototype armor equipped with advanced restraining weapons. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSPetiteAdmiration() {
			setConsequences("Caretakers");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "I'm ready to make a path for our little toys, ${properTitle()}." The mercenaries — no, the Caretakers — are well looked after. They are each assigned a nice apartment, a trio of tiny servants, and a suit of prototype armor capable of carrying multiple petite slaves in time of need. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSStatuesqueGlorification() {
			setConsequences("Titans");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Tallest Titan reporting for duty, ${properTitle()}." The mercenaries — no, the Titans — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a towering suit of prototype armor to make their presence known. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		function FSPastoralist() {
			setConsequences("Rangers");
			return `You ask for a meeting with your mercenaries' captain and lay out a proposal for a new contract between you over ${V.PC.refreshment}. As he reviews the terms, he looks skeptical, then surprised, then interested, and finally, he breaks out into laughter. "${properTitle()}," he says, "you have no idea how fun this is going to be." He rises and gives you a short bow. "Lead Ranger reporting for duty, ${properTitle()}." The mercenaries — no, the Rangers — are well looked after. They are each assigned a nice apartment, a freshly enslaved servant, and a suit of prototype armor equipped with the latest weapons — and an improbably massive revolver on the hip. Word of the innovation runs through the Free Cities like wildfire.`;
		}
		/** unlock Continue button */
		function unlock() {
			V.nextButton = "Continue";
			App.Utils.updateUserButton();
		}
	}
};

repo_name: Ducati/fc

license: mit


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

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

		let price = 5000;
		if (V.PC.skill.warfare >= 100) {
			price = 2500;
		} else if (V.PC.skill.warfare >= 50) {
			price = 3725;
		}

		App.Events.addParagraph(node, [`Another wave of security hysteria is sweeping the Free Cities. And this time, it's not based on rumor and alarmism. On the other side of the globe, a Free City was sacked by an old world army today. The Free City's handful of high-technology defenders and multitude of drones caused heavy casualties among the attackers, but eventually sheer weight of numbers wore them down.`]);

		App.Events.addParagraph(node, [`Your Free City is on good terms with the nations that border it, unlike the unfortunate sacked city, which was next to a nation suffering total collapse and looking for a convenient target. However, there's no telling how long this will last. The situation in the small, troubled country close to the arcology you've been monitoring grows worse by the day${(V.nationHate > 0) ? ", and if rumor of your enslavement of some of their vulnerable citizens got out, its people may have cause to hate you" : ""}.`]);

		App.Events.addParagraph(node, [
			`The budgetary difficulty many old world countries are in has resulted in unemployed soldiers looking for mercenary work. You could easily hire some of them to protect the arcology and fight in the militia if necessary.`,
			App.UI.DOM.makeElement("span", "This is a unique opportunity.", "bold"),
			`Without this security scare, it's unlikely you could convince any of your free-spirited tenants to even stay near a permanent armed presence.`
		]);
		const discount = (V.PC.skill.warfare >= 50 || V.PC.career === "arcology owner");
		const choices = [];
		choices.push(new App.Events.Result(
			`Quarter a squad in the arcology`, quarter,
			App.Events.makeNode([
				`This will cost ${cashFormat(price)} ${discount
					? `and some upkeep, <span class="skill player">reduced by your mercenary contacts.</span>`
					: `and incur significant upkeep costs.`}`
			])
		));
		choices.push(new App.Events.Result(
			`Quarter a platoon in the arcology`, platoon,
			App.Events.makeNode([
				`This will cost ${cashFormat(price * 2)} ${discount
					? `and some upkeep, <span class="skill player">reduced by your mercenary contacts.</span>`
					: `and incur significant upkeep costs.`}`
			])
		));
		choices.push(new App.Events.Result(`Do not quarter troops in your arcology`, plead3rd));
		App.Events.addResponses(node, choices);

		function quarter() {
			repX(-100, "event");
			cashX(forceNeg(price), "mercenaries");
			V.mercenaries = 1;
			if (V.secExpEnabled > 0) {
				V.SecExp.units.mercs.free = 15;
			}
			return `You hire some reputable mercenaries, kit them in excellent gear, and quarter them in ${V.arcologies[0].name}. The sight of armed men on patrol has offended some of the more free-spirited citizens of ${V.arcologies[0].name}.`;
		}

		function platoon() {
			repX(-500, "event");
			cashX(forceNeg(price * 2), "mercenaries");
			V.mercenaries = 3;
			if (V.secExpEnabled > 0) {
				V.SecExp.units.mercs.free = 30;
			}
			return `You hire a full platoon of reputable mercenaries with a veteran officer to command them, kit them in excellent gear, and quarter them in ${V.arcologies[0].name}. The sight of many armed men on patrol has deeply offended some of the more free-spirited citizens of ${V.arcologies[0].name}.`;
		}

		function plead3rd() {
			V.mercenaries = 0;
			return `Having armed men on permanent watch is a step too far. ${V.arcologies[0].name}'s security systems are formidable and will have to serve.`;
		}
	}
};


code:
App.Events.PMercenaryRomeo = class PMercenaryRomeo extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => App.Events.effectiveWeek() >= 44,
			() => V.mercenaries > 0,
			() => V.mercRomeo !== 1,
		];
	}

	// custom casting, in two stages
	castActors() {
		this.actors = [];
		const juliet =
			// first try - find an available sex worker
			V.slaves.filter(s => s.fetish !== Fetish.MINDBROKEN && s.fuckdoll === 0 && ["serve in the club", "serve the public", "whore", "work in the brothel"].includes(s.assignment)).random() ||
			// second try - find a slave who had public exposure and is hopefully not important to the PC personally
			V.slaves.filter(s => (s.counter.publicUse > 0) && (s.newGamePlus === 0) && (s.relationship > -3) && !["be your Concubine", "serve in the master suite"].includes(s.assignment)).random();
		if (juliet) {
			this.actors.push(juliet.ID);
			return true;
		}
		return false;
	}

	execute(node) {
		V.mercRomeo = 1;
		let r = [];
		V.nextButton = "Continue";
		const juliet = getSlave(this.actors[0]);

		let cost = slaveCost(juliet);
		cost = (random(60, 70) * Math.trunc(cost / 100));
		cost = 100 * Math.trunc(cost / 100);

		const {
			He, His,
			he, his, him, girl
		} = getPronouns(juliet ? juliet : {pronoun: App.Data.Pronouns.Kind.neutral});
		const {girlU} = getNonlocalPronouns(V.seeDicks).appendSuffix("U");

		r.push(`One of your mercenaries requests an interview. He's a worn, grey-haired tank of a man, made bulkier still by heavy ceramic plate armor and lots of ammunition and gear. The murderous submachine gun favored for city fighting looks like a toy in his hands. But as he sits at your invitation and accepts a ${generalRefreshment()} proffered by an attentive slave ${girlU}, he seems almost bashful.`);

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

		r.push(`"${properTitle()}, I'll say this straight. I'd like to buy one of your slaves.`);

		if (["serve in the club", "serve the public", "whore", "work in the brothel"].includes(juliet.assignment)) {
			r.push(
				`I've been seeing`,
				App.UI.DOM.slaveDescriptionDialog(juliet),
				`a lot, and ${he} makes the years sit a little lighter on me.`
			);
		} else {
			r.push(
				`I've seen`,
				App.UI.DOM.slaveDescriptionDialog(juliet),
				`here and there and I can't stop thinking about ${him}. I feel ${he}'d make the years sit a little lighter on me.`
			);
		}
		r.push(`I've scraped together what I can, and I can pay ${cashFormat(cost)}." It's a decent price, probably a little less than you could get at auction. It's a huge sum for a mercenary; it's probably his entire savings. You ask what he would do with ${him}. "Well," he says, actually blushing, "I'd free ${him}. And marry ${him}, if ${he}'d have me."`);

		App.Events.addParagraph(node, r);
		const choices = [];
		choices.push(new App.Events.Result(`Decline, and tell ${him} not to see him`, declineAndForbid));
		choices.push(new App.Events.Result(`Politely decline`, declinePolitely));
		choices.push(new App.Events.Result(`Accept`, accept));
		choices.push(new App.Events.Result(`Give ${him} to him as a gift`, gift));

		App.Events.addResponses(node, choices);

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

		function declineAndForbid() {
			repX(-1000, "event");
			return `${juliet.slaveName} obeys your orders not to see the old mercenary. Though neither he or ${juliet.slaveName} says a word about it, his squadmates are not so closemouthed. Soon the tragic story of The Mercenary and the slave${girl} is being told in bars and brothels across the Free City, with you naturally playing the role of the villain.`;
		}

		function declinePolitely() {
			let r = [];
			r.push(`"Ah well," he says, "didn't think you would, but I had to ask. If you'd be so kind as to keep ${him} assigned so's I can see ${him}, I would be grateful. That was a fine victory, ${properTitle()}; come down to the bar and join the boys and I. We'll buy you a drink. Devil knows, thanks to you we can afford to."`);
			if (juliet.relationship === -3 && juliet.fetish !== Fetish.MINDBROKEN && juliet.devotion + juliet.trust > 190) {
				r.push(`${juliet.slaveName} politely thanks you for not letting him take ${him} away.`);
			}
			return r;
		}

		function accept() {
			let r = [];
			r.push(`The mercenary leaves to collect his purchase. On the video feeds, you see that ${juliet.slaveName} can hardly believe what's`);
			if (juliet.relationship === -3 && juliet.fetish !== Fetish.MINDBROKEN && juliet.devotion + juliet.trust > 190) {
				r.push(`happening. You can't hear what he says as he takes out a ring, but ${his} reaction speaks clearly. ${He} says "No."`);
				if (canWalk(juliet) && hasAnyArms(juliet)) {
					r.push(`${He} points back into your penthouse and returns to ${his} home.`);
				} else {
					r.push(`${He} gestures towards the nearest camera and he helps ${him} back into your penthouse.`);
				}
				r.push(`The only thing ${he} wants after being freed is to return to your side. "I thought I was giving ${him} a better life... But ${he} already had everything ${he} wanted. I'm sorry for putting you in such a position." You can hear the sadness in his voice. "Thank you for your time. I'm sorry to have bothered you." Since ${he} returned to slavery, it's only fair to return the credits he paid for ${him}. He thanks you hollowly before heading on his way.`);
			} else {
				r.push(`happened.`);
				if (hasAnyArms(juliet) && hasBothLegs(juliet)) {
					r.push(`${He} hugs him, sobbing into his shoulder. As they walk hand in hand down towards his quarters,`);
				} else {
					r.push(`As he`);
					if (!isAmputee(juliet)) {
						r.push(`gives`);
					} else {
						r.push(`picks up ${his} limbless form to give`);
					}
					r.push(`${him} a hug,`);
				}
				r.push(`${he} gives the nearest camera a little nod and silently mouths the words "Thank you, ${getWrittenTitle(juliet)}." Soon the romantic story of The Mercenary and the slave${girl} is being told in bars and brothels across the Free City, with you naturally playing a supporting role.`);
				repX(1000, "slaveTransfer");
				cashX(cost, "slaveTransfer");
				removeSlave(juliet);
			}
			return r;
		}

		function gift() {
			let r = [];
			r.push(`The mercenary cannot believe his ears. After you repeat yourself twice, he leaves to collect your gift, thanking you clumsily. On the video feeds, you see that ${juliet.slaveName} can hardly believe what's`);
			if (juliet.relationship === -3 && juliet.fetish !== Fetish.MINDBROKEN && juliet.devotion + juliet.trust > 190) {
				r.push(`happening. You can't hear what he says as he takes out a ring, but ${his} reaction speaks clearly. ${He} says "No."`);
				if (canWalk(juliet) && hasAnyArms(juliet)) {
					r.push(`${He} points back into your penthouse and returns to ${his} home.`);
				} else {
					r.push(`${He} gestures towards the nearest camera and he helps ${him} back into your penthouse.`);
				}
				r.push(`The only thing ${he} wants after being freed is to return to your side. "I thought I was giving ${him} a better life... But ${he} already had everything ${he} wanted. I'm sorry for putting you in such a position." You can hear the sadness in his voice. "Thank you for your time. I'm sorry to have bothered you."`);
			} else {
				r.push(`happened.`);
				if (hasAnyArms(juliet) && hasAnyLegs(juliet)) {
					r.push(`${He} hugs him, sobbing into his shoulder. As they walk hand in hand down towards his quarters,`);
				} else {
					r.push(`As he`);
					if (!isAmputee(juliet)) {
						r.push(`gives`);
					} else {
						r.push(`picks up ${his} limbless form to give`);
					}
					r.push(`${him} a hug,`);
				}
				r.push(`${he} gives the nearest camera a little nod and silently mouths the words "Thank you, ${getWrittenTitle(juliet)}." You smile to yourself; when they get there they'll find flowers and a paid reservation at the arcology's best restaurant. Soon the story is being told in bars and brothels across the Free City, with you naturally playing a starring role. Some days later, you hear a dramatization is being filmed, with an aging action star playing the mercenary, a rising starlet playing ${juliet.slaveName}, and a noted character actor playing you.`);
				if (isShelterSlave(juliet)) {
					r.push(`${juliet.slaveName}'s rescue by the Slave Shelter is positively portrayed in the movie, and you're greeted with smiles next time you stop in.`);
					V.shelterAbuse -= 1;
				}
				repX(15000, "event");
				addTrinket(`a poster for the movie that was made about the love between one of your mercenaries and`, {
					name: juliet.slaveName,
					id: juliet.ID
				});
				removeSlave(juliet);
			}
			return r;
		}
	}
};


code:
App.Events.PMercsHelpCorp = class PMercsHelpCorp extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => V.corp.Incorporated > 0,
			() => V.rival.state > 2,
			() => V.mercenaries >= 3,
			() => V.mercenariesHelpCorp === 0,
			() => V.corp.DivExtra > 0,
			() => App.Events.effectiveWeek() > 70,
		];
	}

	execute(node) {
		let r = [];
		V.nextButton = "Decline"; /* hide button until user makes a selection */
		V.mercenariesHelpCorp = -1;

		r.push(`Your weekly meeting with your ${V.mercenariesTitle} commander finishes with unusual speed. With the arcology owner who set the Daughters on you enslaved, all other immediate threats defused or smashed,`);
		if (V.arcologies[0].FSRomanRevivalistLaw > 0) {
			r.push(`your citizens serving in the urban cohorts with enthusiasm,`);
		}
		if (V.arcologies[0].FSNeoImperialistLaw1 > 0) {
			r.push(`your Knights vigilantly watching the streets for any possible threat,`);
		}
		if (V.arcologies[0].FSAntebellumRevivalistLaw2 === 1) {
			r.push(`your citizens' militias still scouring every corner of the arcology for stragglers,`);
		}
		r.push(`and the ${V.mercenariesTitle} in excellent fighting condition, there just weren't enough concerns from either of your perspectives to fill the time. You sit across your desk from each other, discussing the global situation over ${V.PC.refreshment}.`);

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

		r.push(`"You know, ${properTitle()}," the scarred man says thoughtfully. "Threat board's pretty sparse these days. I mean, not for those poor bastards." He`);
		if (V.PC.refreshmentType === 0) {
			r.push(`waves his ${V.PC.refreshment}`);
		} else if (V.PC.refreshmentType === 1) {
			r.push(`uses his glass to point`);
		} else if (V.PC.refreshmentType === 2) {
			r.push(`points a piece of ${V.PC.refreshment}`);
		} else if (V.PC.refreshmentType === 3) {
			r.push(`finishes arranging a line before pointing`);
		} else if (V.PC.refreshmentType === 4) {
			r.push(`using his syringe to point`);
		} else if (V.PC.refreshmentType === 5) {
			r.push(`shaking the bottle of ${V.PC.refreshment}`);
		} else if (V.PC.refreshmentType === 6) {
			r.push(`using the sheet of ${V.PC.refreshment} to point`);
		}
		r.push(`at a screen showing a live news feed from a war on the other side of the world. A huge cloud in an unmistakable, malevolent shape, a broad rising head atop a dirty column of vapor, is towering above a large city.`);

		App.Events.addParagraph(node, r);
		App.Events.addParagraph(node, [`"But in our immediate area, there's just not much that can threaten us. Most trouble on the horizon's going to come from economics and supply and the climate, but that stuff doesn't shoot back. I think we can afford a little dispersal of military effort. Why don't I second squads to your corporation, when we've got the availability? Your corporate guys are already pulling meat out of the conflict zones. No offense to them, they're pretty good, but they're not quite at the level of my boys and girls. And don't worry, I'd keep 'em clear of shit like that." He indicates the on-screen mushroom cloud again.`]);
		r = [];

		r.push(
			App.UI.DOM.makeElement("span", "This is a unique opportunity", "bold"),
			`and will not reoccur.`
		);
		App.Events.addParagraph(node, r);

		App.Events.addResponses(node, [
			new App.Events.Result(`Decline`, decline),
			new App.Events.Result(`Make it so`, makeItSo)
		]);

		function decline() {
			return `Best to keep the ${V.mercenariesTitle} in reserve. You decline, and the commander chuckles. "Well ${properTitle()}, if you insist, I suppose we could find ways to keep busy around the arcology. I mean, we're a little starved for ${V.seeDicks !== 0 ? "female" : "intimate"} company here, but we can make do."`;
		}

		function makeItSo() {
			V.nextButton = "Continue";
			App.Utils.updateUserButton();
			const {girlU, heU} = getNonlocalPronouns(V.seeDicks).appendSuffix("U");
			V.mercenariesHelpCorp = 1;
			return `It's a fine idea, and you agree. The commander looks so enthused that you feel obliged to ask that he not risk himself unduly. He laughs. "There are no old, bold mercs, ${properTitle()}, and I am sure as hell old. I'll be sure to grow even older under contract with you. Now, unless there's anything else, I've just bought a nice ${girlU} to add to the commander's suite, and ${heU} makes me feel a bit younger."`;
		}
	}
};


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

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

		App.Events.addParagraph(node, [
			`The former country whose citizens launched the ultimately futile attack on the arcology has continued to degenerate. After a series of civil disturbances and minor natural disasters, the nearest major city is being abandoned by its few remaining residents. A regional warlord is threatening the area, so they are streaming in small parties towards another city that is not yet under his shadow.`
		]);

		App.Events.addParagraph(node, [
			`The citizens of ${V.arcologies[0].name} view their discomfiture without much pity. These people almost certainly would have abused them just as much as they are now in danger of being abused themselves, had the attack on the Free City been a success. There would be little to no criticism if you and your mercenary contingent were to take this unique opportunity to corral one of the refugee groups. They are refugees, after all; no one will miss them.`
		]);

		const raidCost = 5000;
		App.Events.addParagraph(node, [`Fund a quick raid on the refugees with ${cashFormat(raidCost)}, targeting:`]);

		const choices = [];
		if (V.cash > raidCost) {
			choices.push(new App.Events.Result(`Ex-soldiers`, exSoldiers));
			choices.push(new App.Events.Result(`Healthy civilians`, healthyCiv));
			choices.push(new App.Events.Result(`The largest possible group of slaves`, slaveDotMax));
		} else {
			choices.push(new App.Events.Result(null, null, `You can't even afford ${cashFormat(raidCost)}`));
		}
		choices.push(new App.Events.Result(`Or, just let them go`, free));
		App.Events.addResponses(node, choices);

		function exSoldiers() {
			cashX(-raidCost, "war");
			App.Events.queueEvent(1, new App.Events.PRaidResult(), {raidTarget: 1});
			return `Your mercenaries probably would have been enthusiastic even before the recent combat, but now they're positively eager. The split agreed upon is that they keep the proceeds from the sale of anything that isn't sex slave material, while you keep anything that is.`;
		}

		function healthyCiv() {
			cashX(-raidCost, "war");
			App.Events.queueEvent(1, new App.Events.PRaidResult(), {raidTarget: 2});
			return `Your mercenaries probably would have been enthusiastic even before the recent combat, but now they're positively eager. The split agreed upon is that they keep the proceeds from the sale of anything that isn't sex slave material, while you keep anything that is.`;
		}

		function slaveDotMax() {
			cashX(-raidCost, "war");
			App.Events.queueEvent(1, new App.Events.PRaidResult(), {raidTarget: 3});
			return `Your mercenaries probably would have been enthusiastic even before the recent combat, but now they're positively eager. The split agreed upon is that they keep the proceeds from the sale of anything that isn't sex slave material, while you keep anything that is.`;
		}

		function free() {
			return `Some of the refugees make it to safety. Some do not.`;
		}
	}
};


code:
App.Events.PRaidResult = class PRaidResult extends App.Events.BaseEvent {
	execute(node) {
		let r = [];

		V.nextButton = "Continue";

		App.Events.addParagraph(node, [`As your VTOL craft carries you and your mercenaries out towards an area ideal for a quick raid on the refugee bands, the sensors begin to reveal that there are actually many more bands than you originally suspected. The single aircraft does not carry enough mercenaries to target more than one group, or have the cargo capacity to haul more than one back to the arcology before they disperse. Your mercenary commander makes a selection based on your instructions.`]);

		App.Events.addParagraph(node, [`Out ahead of the main body of refugees there is a small knot moving quickly and in good order, carrying weapons. Farther back, there is a larger group separated from the main body who could be easily isolated. And finally, it seems a group of sick and injured refugees have clustered around a tent where there must be medical assistance of some kind.`]);

		const newSlaves = [];
		if (this.params.raidTarget === 1) {
			r.push(`Under orders to target resistance, your mercenaries target the leading group. They even manage to direct a little small arms fire at the VTOL craft as it circles them, dropping mercenaries and plying its nonlethal weapons, but they are of course rapidly defeated. Your share is two slaves in good physical condition, who prove to have been survivors of the defeated attack on the arcology. The mercenaries find after a data search that one of the prisoners whose part of their share was a minor leader in the anti-Free Cities movement. After a quick consultation over their radios, the mercenaries decide that a summary execution out here would be too quick for the wretch, and bring their prize back to the arcology for more thorough punishment. Between the successful raid and the capture of this public enemy, the citizens are quite impressed by you.`);
			repX(2500, "event");
			for (let prr = 0; prr < 3; prr++) {
				if (V.seeDicks > 0) {
					const slave = GenerateNewSlave("XY");
					slave.origin = "$He is an enslaved refugee who participated in the defeated attack on your arcology.";
					newSlaves.push(slave);
				} else {
					const slave = GenerateNewSlave("XX");
					slave.origin = "$He is an enslaved refugee who participated in the defeated attack on your arcology.";
					newSlaves.push(slave);
				}
			}
		} else if (this.params.raidTarget === 2) {
			r.push(`Under orders to target civilians, your mercenaries head for the isolated group. When the VTOL descends to circle around the large group of refugees, it becomes obvious that it won't even be necessary to expend nonlethal ammunition. A few of the refugees throw themselves down in bitterness, but most just subside into the catatonia of helplessness. They stand quiescent as they are searched, tagged, and loaded onto the VTOL like the wretched human refuse they are. The successful raid is the talk of the Free City.`);
			repX(1000, "event");
			for (let prr = 0; prr < 4; prr++) {
				const slave = GenerateNewSlave();
				slave.origin = "$He is an enslaved refugee.";
				newSlaves.push(slave);
			}
		} else {
			const {
				heU, hisU, himU
			} = getNonlocalPronouns(V.seeDicks === 100 ? 100 : 0).appendSuffix("U"); /* nurse gender is female unless seeDicks is 100 */
			r.push(`Under orders to target the largest possible group of people, your mercenaries head for the sick and injured. As the VTOL settles, it becomes apparent that most of the injuries are from combat, almost certainly in the defeat at ${V.arcologies[0].name}. The tent proves to contain a harassed nurse, almost without medical supplies and at the end of ${hisU} rope. When ${heU} sees the mercenaries push through the tent flap, ${heU} heaves a sigh of mixed defeat and relief and wordlessly offers ${hisU} wrists. The mercenaries give you a larger share of the other slaves in return for ${himU}: they tell you in confidence that ${heU}'ll be a medical asset to them as well as the usual amusement. The successful raid is the talk of the Free City.`);
			App.Events.queueEvent(1, new App.Events.PSlaveMedic());
			repX(1000, "event");
			for (let prr = 0; prr < 5; prr++) {
				const slave = GenerateNewSlave();
				slave.origin = "$He is an enslaved refugee who was wounded in the defeated attack on your arcology.";
				setHealth(slave, jsRandom(-50, 40), normalRandInt(20, 3), normalRandInt(15, 3), Math.max(normalRandInt(0, 1), 0), jsRandom(40, 80));
				newSlaves.push(slave);
			}
		}
		App.Events.addParagraph(node, r);

		const choices = [];
		choices.push(new App.Events.Result(`Sell your prisoners immediately`, sell));
		choices.push(new App.Events.Result(`Give your prisoners to citizens injured in the recent invasion`, give));
		choices.push(new App.Events.Result(`Enslave all of the refugees`, enslave));
		App.Events.addResponses(node, choices);

		function sell() {
			for (const slave of newSlaves) {
				cashX(slaveCost(slave), "slaveTransfer");
			}
			return `Prisoners sold.`;
		}

		function give() {
			for (const slave of newSlaves) {
				const cost = slaveCost(slave);
				repX(Math.trunc(cost / 10), "event");
			}
			return `Prisoners <span class="reputation inc">given away.</span>`;
		}

		function enslave() {
			for (const slave of newSlaves) {
				newSlave(slave);
			}
			return `You simply enslave all of the refugees yourself. They would have been worse off had you not intervened.`;
		}
	}
};


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

	execute(node) {
		let r = [];
		V.nextButton = "Continue";
		V.eventResults.snatch = 0;

		App.Events.addParagraph(node, [`${capFirstChar(V.assistant.name)} forwards a discreet message from the leader of your mercenaries.`]);
		App.Events.addParagraph(node, [`"${properTitle()}, I've just become aware of a... business opportunity through some old friends. There's an unregistered lab doing illegal gene therapy work. At least two agencies are onto them, which is how I heard of it. Word is, they're packing up and moving out. I believe me and my people can appropriate that shipment. Catch is, to make this work I need to pay some serious bribes, and I need to pay them today. We'll cut you in as an equal partner for ${cashFormat(10000)} cash, right now. One share should come to one of the lab rats, more or less. Are you in or out?"`]);
		if (V.assistant.personality === 1) {
			const {
				HeA,
				heA, hisA, himselfA
			} = getPronouns(assistant.pronouns().main).appendSuffix("A");
			r.push(`${capFirstChar(V.assistant.name)}'s ${V.assistant.appearance} avatar appears on your desk next to the message.`);
			switch (V.assistant.appearance) {
				case "monstergirl":
					r.push(`"I vote yes. Even though whatever that lab is producing can't possibly be as interesting as me," ${heA} says haughtily, and twirls a strand of tentacle hair.`);
					break;
				case "shemale":
					r.push(`"I vote yes," ${heA} says sweetly. "Whatever they're doing, it's probably interesting. I'd love to fuck something interesting."`);
					break;
				case "amazon":
					r.push(`"I vote yes!" ${heA} shouts. "Whatever they're doing, their girls are probably valuable. And everything's more fun if you loot it instead of buying it."`);
					break;
				case "businesswoman":
					r.push(`"I vote yes," ${heA} says. "The likelihood that the lab is producing something valuable is overwhelming. The potential profits are," and ${heA} pauses to fan ${himselfA}, "exciting."`);
					break;
				case "fairy":
				case "pregnant fairy":
					r.push(`"I vote yes," ${heA} says. "They could be up to something really cool!"`);
					break;
				case "goddess":
					r.push(`"I vote yes," ${heA} says. "Whatever is in that lab deserves some loving attention and... more variety is always appreciated."`);
					break;
				case "hypergoddess":
					r.push(`"I vote yes," ${heA} says. "Whatever is in that lab deserves some loving attention and... more variety is always appreciated."`);
					break;
				case "loli":
					r.push(`"I vote yeah," ${heA} says. "I wanna see what's inside!"`);
					break;
				case "preggololi":
					r.push(`"I vote yeah," ${heA} says. "I wanna see what's inside!"`);
					break;
				case "schoolgirl":
					r.push(`"I vote yeah," ${heA} says. "I just wanna see what that lab is doing. Could be cool!"`);
					break;
				case "angel":
					r.push(`"I vote yes," ${heA} says. "Whatever is in that lab deserves a better life under your care."`);
					break;
				case "cherub":
					r.push(`"I vote yeah," ${heA} says. "I'm really curious what could be inside."`);
					break;
				case "incubus":
					r.push(`"I vote yes," ${heA} says. "I can't wait to get my dick in it!"`);
					break;
				case "succubus":
					r.push(`"I vote no," ${heA} says. "You're all mine!"`);
					break;
				case "imp":
					r.push(`"I vote yeah," ${heA} says. "I can't wait to tease and torment whatever's inside!"`);
					break;
				case "witch":
					r.push(`"I vote yes," ${heA} says. "It can't be worse than some of my fuckups."`);
					break;
				case "ERROR_1606_APPEARANCE_FILE_CORRUPT":
					r.push(`${HeA} doesn't comment, though a large, toothy grin spreads across the entirety of ${hisA} head revealing ${hisA} thoughts on the subject.`);
					break;
				default:
					r.push(`"I would suggest agreement," ${heA} says. "Even if the prize does not appeal to you personally, it's likely to be quite valuable. Selling it could net you quite a profit."`);
			}
			App.Events.addParagraph(node, r);
		}

		const choices = [
			new App.Events.Result(`Bankroll the snatch and grab`, bankroll),
			new App.Events.Result(`Politely decline`, decline)
		];
		App.Events.addResponses(node, choices);

		function bankroll() {
			cashX(-10000, "slaveTransfer");
			V.eventResults.snatch = 1;
			App.Events.queueEvent(1, new App.Events.PSnatchAndGrabResult());
			return `You receive no response whatsoever. Twenty minutes later, however, a liaison VTOL aircraft that the mercenaries sometimes hire arrives, loads a party of armed men and women, and leaves.`;
		}

		function decline() {
			return `You receive no response whatsoever. That's how it is with professionals: the offer was never made, you never declined, and no further discussion is necessary or desired.`;
		}
	}
};


code:
App.Events.PSnatchAndGrabResult = class PSnatchAndGrabResult extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => V.eventResults.snatch === 1
		];
	}

	execute(node) {
		let r = [];

		V.nextButton = "Continue";
		V.eventResults.snatch = 2;

		const snatched = GenerateNewSlave("XX", {maxAge: (V.pedo_mode === 1 ? V.minimumSlaveAge : 18), disableDisability: 1});
		if (V.pedo_mode === 1) {
			snatched.boobShape = "saggy";
			snatched.nipples = "partially inverted";
			snatched.areolae = 3;
			snatched.lips = 15;
			snatched.voice = 2;
			snatched.weight = 60;
			snatched.muscles = 0;
			snatched.shoulders = -2;
			snatched.hips = 0;
			snatched.waist = 10;
		} else {
			if (snatched.lips < 10) {
				snatched.lips += 5;
			}
			snatched.height = Height.random(snatched, {skew: 1, limitMult: [0, 2]});
			snatched.weight = 0;
			snatched.muscles = 20;
			snatched.waist = -75;
		}

		snatched.faceShape = (V.pedo_mode === 1 ? "exotic" : "androgynous");
		snatched.anus = 0;
		if (V.seeDicks !== 100) {
			snatched.vagina = 0;
			snatched.ovaries = 1;
		}
		if (V.seeDicks === 0) {
			snatched.dick = 0;
			snatched.balls = 0;
			snatched.scrotum = 0;
		} else if (V.seeDicks > 75) {
			snatched.dick = (V.pedo_mode === 1 ? 2 : 6);
			if (snatched.foreskin > 0) {
				snatched.foreskin = snatched.dick;
			}
			snatched.balls = 1;
			snatched.scrotum = snatched.balls;
		} else {
			snatched.dick = 1;
			snatched.foreskin = 1;
			snatched.balls = 1;
			snatched.scrotum = snatched.balls;
		}

		snatched.boobs += (V.pedo_mode === 1 ? 6000 : 200);
		snatched.butt += (V.pedo_mode === 1 ? 1 : 2);
		snatched.origin = "$He is your share of a raid on an illegal laboratory by your mercenaries.";
		snatched.career = "a slave";
		snatched.devotion = 100;
		snatched.trust = 100;
		setHealth(snatched, 250, 0, 0, 0, 0);
		snatched.face = 15;
		snatched.skill.vaginal = 0;
		snatched.skill.penetrative = 0;
		snatched.skill.oral = 0;
		snatched.skill.anal = 0;
		snatched.skill.whoring = 0;
		snatched.skill.entertainment = 0;
		snatched.birthWeek = 0;
		snatched.hStyle = "shaved";
		snatched.hLength = 0;
		snatched.custom.desc = "$His skin is unnaturally perfect, totally without blemishes. $He radiates unnatural health and resilience.";
		snatched.custom.tattoo = "$He has a barcode tattooed on the top of $his head.";
		snatched.behavioralFlaw = "odd";
		snatched.fetish = "none";
		snatched.energy = 100;
		snatched.fetishKnown = 1;
		snatched.attrKnown = 1;
		if (snatched.physicalAge >= 12) {
			snatched.teeth = "normal";
		}
		snatched.pubicHStyle = "hairless";
		snatched.underArmHStyle = "hairless";

		snatched.slaveCost = -10000;

		const {
			he, himself
		} = getPronouns(snatched);

		r.push(`In the middle of the night, there is a polite knock on your penthouse door. You are alerted by ${V.assistant.name}, who observes`);
		if (V.assistant.personality === 1) {
			r.push(`with some irritation`);
		}
		r.push(`that the mercenary who knocked has gone, has left a large case outside the door, and has satisfied the security systems that the case contains nothing hazardous.`);

		r.push(`The case prompts you for a handprint code; your hand works just fine. It contains a naked, hairless, perfectly healthy young body in the fetal position. This person awakens as the case opens, looks you confidently in the eye, and says "Are you my`);
		if (V.PC.title !== 0) {
			r.push(`Master?"`);
		} else {
			r.push(`Mistress?"`);
		}

		r.push(`When you state that, apparently, you are, ${he} climbs out of the case, prostrates ${himself} in the hall before you, and says reverentially into the floor, "I love you,`);
		if (V.PC.title !== 0) {
			r.push(`Master."`);
		} else {
			r.push(`Mistress."`);
		}

		App.Events.addParagraph(node, r);
		node.append(App.Desc.longSlave(snatched));
		node.append(App.UI.newSlaveIntro(snatched));
	}
};


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

	get eventName() {
		return "Militia";
	}

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

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

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

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

		App.Events.addResponses(node, responses);

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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