code:
App.Events.RERoyalBlood = class RERoyalBlood extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => ((V.rep - 10000 > random(1, 12500)) || (V.debugMode > 0 && V.debugModeEventSelection > 0))
		];
	}

	execute(el) {
		const activeSF = V.SF.Toggle && V.SF.Active >= 1;

		const queen = generateQueen(); // Queen first to get an ID for her children to relate to.
		const {
			He3,
			his3, he3, him3, himself3, wife3
		} = getPronouns(queen).appendSuffix('3');

		const princess = generatePrincess();
		const {
			His,
			his, he, him, girl
		} = getPronouns(princess);

		const prince = (V.seeDicks > 0) ? generatePrince() : undefined;
		const {
			His2,
			his2, he2, himself2
		} = getPronouns(prince || {pronoun: 1}).appendSuffix('2');

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

		let r = [];
		r.push(`One unfortunate consequence of existing in a global world is that business opportunities continue to crop up unabated by the onset of night in one corner of the world or another, an inconsiderate phenomenon for arcology owners who happen to be asleep when an event of importance takes place outside the walls of their arcology. This particular evening you are awoken by an alert from ${V.assistant.name}, unusually intense for this late hour.`);
		if (V.assistant.personality > 0) {
			r.push(`"${properMaster()}, there is a time sensitive enslavement opportunity available if you're interested." ${HeA} pauses before continuing. "You're going to want to see this one ${properMaster()}."`);
		} else {
			r.push(`${HeA} informs you that there is a time sensitive enslavement opportunity for you to peruse, and that ${heA} has calculated the potential rewards are worthy of your consideration even in the middle of the night.`);
		}
		App.Events.addParagraph(el, r);

		App.Events.addParagraph(el, [`A convenient video feed is brought up, displaying a quick visual summary of the opportunity at hand.`]);

		App.Events.addParagraph(el, [`It seems a bastion of the old world has fallen, a royal family of ancient blood and reputation has been overthrown by a local populist leader and his fellow revolutionaries. Furthermore, the leader of the revolution has designs to transform the outmoded monarchy into an arcology of his own, and has transmitted a request for aid to his new peers in the Free Cities.`]);

		App.Events.addParagraph(el, [`Of course, nothing in the Free Cities is free and international aid is no exception. This new arcology owner is no fool, however, and has outlined a number of rewards to be delivered to his most generous benefactors.`]);

		App.Events.addParagraph(el, [`Though the King himself is dead, murdered in his bed by bloodthirsty revolutionaries, the rest of his family and the majority of his court have been captured and enslaved by their former subjects. The new arcology owner, having decided that a large injection of credits or a shipment of goods is superior to deflowering a royal pussy or asshole, has directed his followers to slake their lust and vengeance on the King's ${wife3} and court rather than his children, though they too are past the age of majority.`]);

		App.Events.addParagraph(el, [`Time is short, but you are well placed to acquire some choice slaves. With an adequate donation${(activeSF) ? `, or the use of ${V.SF.Lower}` : ``}, of course.`]);

		const choices = [];
		choices.push(new App.Events.Result(
			"Go back to sleep",
			() => {
				return `You inform your personal assistant that you aren't planning to take any action. It's not every day that a monarchy collapses in the old world, but it's also not particularly uncommon either.`;
			}
		));

		// PRINCESS
		const princessCashCost = 50000;
		const princessRepCost = 2000;
		const princessSF = 18000;
		if (V.cash >= princessCashCost && V.rep >= princessRepCost) {
			choices.push(new App.Events.Result(
				"Leverage your reputation and credits to aid the new arcology in exchange for a pretty princess",
				getPrincess,
				`You will need to utilize a portion of your reputation and ${cashFormat(princessCashCost)} to enslave ${him}.`
			));
		} else {
			choices.push(new App.Events.Result(null, null, `You lack the necessary funds and reputation to enslave a princess.`));
		}

		if (activeSF) {
			if (V.rep > princessSF) {
				choices.push(new App.Events.Result(
					`Dispatch a ${V.SF.Lower} on a night time raid to acquire a pretty princess`,
					() => getPrincess(false),
					`You will be despised for this action, and trade will be greatly damaged.`));
			} else {
				choices.push(new App.Events.Result(null, null, `You lack the reputation to enslave a princess.`));
			}
		}

		const princeCost = 35000;
		const princeSF = 18000;
		const princeAndPrincessCash = 100000;
		const princeAndPrincessRep = 10000;
		const princeAndPrincessSF = 18000;
		if (V.seeDicks > 0) {
			// PRINCE
			if (V.cash >= princeCost) {
				choices.push(new App.Events.Result(
					`Dispatch a sizable amount of aid in exchange for the crown prince`,
					getPrince,
					`Purchasing the goods and hiring the VTOLs will cost about ${cashFormat(princeCost)}.`
				));
			} else {
				choices.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave a crown prince.`));
			}

			if (activeSF) {
				if (V.rep > princeSF) {
					choices.push(new App.Events.Result(
						`Dispatch ${V.SF.Lower} on a night time raid to acquire the crown prince`,
						() => getPrince(false),
						`You will be despised for this action, and trade will be greatly damaged.`
					));
				} else {
					choices.push(new App.Events.Result(null, null, `You lack the necessary reputation to enslave a crown prince.`));
				}
			}

			// PRINCE AND PRINCESS
			if (V.cash >= princeAndPrincessCash && V.rep >= princeAndPrincessRep) {
				choices.push(new App.Events.Result(
					`Leverage your substantial reputation and a huge sum of credits to aid the new arcology in exchange for both the prince and princess`,
					getPrinceAndPrincess,
					`You will need to utilize a sizable portion of your reputation and ${cashFormat(princeAndPrincessCash)} to enslave them.`
				));
			} else {
				choices.push(new App.Events.Result(null, null, `You lack the necessary funds and reputation to enslave both the crown prince and princess.`));
			}

			if (activeSF) {
				if (V.rep > princeAndPrincessSF) {
					choices.push(new App.Events.Result(
						`Dispatch ${V.SF.Lower} on a night time raid to acquire both the prince and princess`,
						() => getPrinceAndPrincess(false),
						`You will be despised for this action, and trade will be greatly damaged.`
					));
				} else {
					choices.push(new App.Events.Result(null, null, `You lack the necessary reputation to enslave both the crown prince and princess.`));
				}
			}
		}

		// COURT LADIES
		const courtLadiesCost = 25000;
		const courtLadiesCostSF = 10000;
		if (V.cash >= courtLadiesCost) {
			choices.push(new App.Events.Result(
				`Transfer a respectable quantity of credits for a handful of court ladies`,
				getCourtLadies,
				`It will cost about ${cashFormat(courtLadiesCost)} to enslave them.`
			));
		} else {
			choices.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave a handful of court ladies.`));
		}

		if (activeSF) {
			if (V.rep > courtLadiesCostSF) {
				choices.push(new App.Events.Result(
					`Dispatch ${V.SF.Lower} on a night time raid to acquire a handful of court ladies`,
					() => getCourtLadies(false),
					`You will be disliked for this action and trade will be damaged.`
				));
			} else {
				choices.push(new App.Events.Result(null, null, `You lack the necessary reputation to enslave a handful of court ladies.`));
			}
		}

		// HOLD THE QUEEN ALONE
		const queenCash = 15000;
		const queenSF = 12000;
		if (V.cash >= queenCash) {
			choices.push(new App.Events.Result(
				`Transfer a modest quantity of credits for the Queen ${himself3}`,
				getQueen,
				`It will cost about ${cashFormat(queenCash)} to enslave ${him3}.`
			));
		} else {
			choices.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave a Queen.`));
		}

		if (activeSF) {
			if (V.rep >= queenSF) {
				choices.push(new App.Events.Result(
					`Dispatch ${V.SF.Lower} on a night time raid to acquire the Queen ${himself3}`,
					() => getQueen(false),
					`You will be despised for this action, and trade will be greatly damaged.`
				));
			} else {
				choices.push(new App.Events.Result(null, null, `You lack the necessary reputation to enslave a Queen.`));
			}
		}

		// PRINCESS AND QUEEN
		// repX is called within the get* function
		const princessAndQueenCash = 500000;
		const princessAndQueenSF = 13000;
		if (V.cash >= princessAndQueenCash) {
			choices.push(new App.Events.Result(
				`Send a large amount of credits and goods to retrieve both the princess and Queen.`,
				getPrincessAndQueen,
				`It will cost about ${cashFormat(princessAndQueenCash)} to enslave both the princess and Queen.`
			));
		} else {
			choices.push(new App.Events.Result(null, null, `You lack the necessary funds and reputation to enslave both the Queen and princess.`));
		}

		if (activeSF) {
			if (V.rep >= princessAndQueenSF) {
				choices.push(new App.Events.Result(
					`Dispatch ${V.SF.Lower} on a night time raid to acquire both the princess and Queen`,
					() => getPrincessAndQueen(false),
					`You will be despised for this action, and trade will be greatly damaged.`
				));
			} else {
				choices.push(new App.Events.Result(null, null, `You lack the necessary reputation to enslave both the Queen and princess.`));
			}
		}

		// QUEEN AND COURT
		const queenAndCourtCost = 500000;
		const queenAndCourtSF = 13000;
		if (V.cash >= queenAndCourtCost) {
			choices.push(new App.Events.Result(
				`Offer a generous amount of cash in exchange for both the Queen and ${his3} court ladies.`,
				getQueenAndCourt,
				`It will cost about ${cashFormat(queenAndCourtCost)} to enslave the Queen and ${his3} court ladies.`
			));
		} else {
			choices.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave the Queen and ${his3} ladies.`));
		}

		if (activeSF) {
			if (V.rep >= queenAndCourtSF) {
				choices.push(new App.Events.Result(
					`Dispatch ${V.SF.Lower} on a night time raid to acquire the Queen and ${his3} court ladies`,
					() => getQueenAndCourt(false),
					`You will be despised for this action, and trade will be greatly damaged.`
				));
			} else {
				choices.push(new App.Events.Result(null, null, `You lack the necessary reputation to enslave the Queen and ${his3} ladies.`));
			}
		}

		// ENTIRE COURT
		const entireCourtCost = 2500000;
		if (V.limitFamilies !== 1) {
			if (V.cash >= entireCourtCost) {
				choices.push(new App.Events.Result(
					`Send an unheard amount of credits and goods to retrieve the entire court.`,
					getEntireCourt,
					`It will cost about ${cashFormat(entireCourtCost)} to enslave the entire court.`
				));
			}

			if (activeSF) {
				choices.push(new App.Events.Result(
					`Dispatch ${V.SF.Lower} on a night time raid to take everything of value`,
					() => getEntireCourt(false),
					`You will be loathed for this action and trade will be crippled.`
				));
			}
		}

		App.Events.addResponses(el, choices);
		return el;

		function getPrincess(buy = true) {
			const text = new DocumentFragment();
			if (buy) {
				App.UI.DOM.appendNewElement("p", text, `You seize a tablet and practically roll out of your bed, working furiously and using every feature of ${V.assistant.name} to the utmost. It's not easy, but you call in a number of favors and grease a handful of palms, and soon a flight of VTOLs are landing in the new arcology laden with goods. When they take off again they have the princess aboard clad in chains, and make a direct course towards your waiting penthouse.`);

				// Princess
				cashX(-princessCashCost, "slaveTransfer", princess);
				repX(-princessRepCost, "event", princess);
			} else {
				App.UI.DOM.appendNewElement("p", text, `Seizing a tablet, you quickly send a message to ${App.SF.SFC()}. After dark, a flight of VTOLs land in the new arcology laden with troops. When they take off again they have the princess aboard clad in chains and make a direct course towards your waiting penthouse.`);
				V.arcologies[0].prosperity -= 15;

				// Princess
				repX(-princessSF, "event", princess);
			}
			App.UI.DOM.appendNewElement("p", text, `Eventually ${he} arrives in your penthouse, the perfect image of a demure yet composed princess. ${His} clearly practiced façade of poise and grace fades under scrutiny, however. ${princessArrives()}`);

			text.append(App.UI.newSlaveIntro(princess));

			return text;
		}

		function getPrince(buy = true) {
			const text = new DocumentFragment();
			if (buy) {
				App.UI.DOM.appendNewElement("p", text, `You seize a tablet and practically roll out of your bed, working vigorously and using every feature of ${V.assistant.name} to the utmost. It's not easy, but your credits pave your way to sending a flight of VTOLs laden with goods to the new arcology. They take off again with the crown prince aboard and in chains, where ${he2} rails against the uncaring metal walls of the VTOL for the breadth of ${his2} journey to your penthouse.`);

				// Prince
				cashX(-princeCost, "slaveTransfer", prince);
			} else {
				App.UI.DOM.appendNewElement("p", text, `Seizing a tablet, you quickly send a message to The Colonel. After dark, a flight of VTOLs land in the new arcology laden with troops. They take off again with the crown prince aboard and in chains, where ${he2} rails against the uncaring metal walls of the VTOL for the breadth of ${his2} journey to your penthouse.`);
				App.UI.DOM.appendNewElement("p", text, princeArrives());
				prince.origin = `$He was the crown prince of a royal kingdom, till $his family was overthrown and $he was acquired by ${V.SF.Lower}.`;
				V.arcologies[0].prosperity -= 15;
				// Prince
				repX(-princeSF, "event", prince);
			}

			App.UI.DOM.appendNewElement("p", text, princeArrives());

			text.append(App.UI.newSlaveIntro(prince));

			return text;
		}

		function getPrinceAndPrincess(buy = true) {
			const text = new DocumentFragment();
			if (buy) {
				App.UI.DOM.appendNewElement("p", text, `You seize a tablet and practically roll out of your bed, working furiously and using every feature of ${V.assistant.name} to the utmost. It's not easy, but you call in a number of favors and grease a handful of palms, and soon a flight of VTOLs are landing in the new arcology laden with goods. When they take off again they have the prince and princess aboard, clad in chains and bound face to face in a forced embrace, and make a direct course towards your waiting penthouse.`);
				App.UI.DOM.appendNewElement("p", text, `Eventually they arrive in your penthouse, faces flushed with embarrassment of their compromising position. The former prince is beside ${himself2} with rage, but seems to be holding ${himself2} back for ${his2} little ${relativeTerm(prince, princess)}'s sake, while ${he} struggles to maintain a façade of poise and grace. ${princessArrives()} However, the prince's submission to life as a slave is another question entirely.`);
				const cashShares = princeAndPrincessCash / 5;
				const repShares = princeAndPrincessRep / 5;

				// Princess
				cashX(-cashShares * 3, "slaveTransfer", princess);
				repX(-repShares * 3, "event", princess);
				newSlave(princess); // skip New Slave Intro

				// Prince
				cashX(-cashShares * 2, "slaveTransfer", prince);
				repX(-repShares * 2, "event", prince);
				newSlave(prince); // skip New Slave Intro
			} else {
				App.UI.DOM.appendNewElement("p", text, `Seizing a tablet, you quickly send a message to The Colonel. After dark, a flight of VTOLs land in the new arcology laden with troops. When they take off again they have the prince and princess aboard, clad in chains and bound face to face in a forced embrace, and make a direct course towards your waiting penthouse.`);
				App.UI.DOM.appendNewElement("p", text, `Eventually they arrive in your penthouse, faces flushed with embarrassment of their compromising position. The former prince is beside ${himself2} with rage, but seems to be holding ${himself2} back for ${his2} little ${relativeTerm(prince, princess)}'s sake, while ${he} struggles to maintain a façade of poise and grace. ${princessArrives()} However, the prince's submission to life as a slave is another question entirely.`);
				prince.origin = `$He was the crown prince of a royal kingdom, till $his family was overthrown and $he was acquired by ${V.SF.Lower}.`;
				V.arcologies[0].prosperity -= 15;
				const shares = princeAndPrincessSF / 9;

				// Princess
				repX(-shares * 5, "event", princess);
				newSlave(princess); // skip New Slave Intro

				// Prince
				repX(-shares * 4, "event", prince);
				newSlave(prince); // skip New Slave Intro
			}

			return text;
		}

		function getCourtLadies(buy = true) {
			const text = new DocumentFragment();
			if (buy) {
				App.UI.DOM.appendNewElement("p", text, `You take a tablet and peruse the various court ladies on offer by the fledgling arcology. You single out a few interesting individuals for purchase that might suit your tastes, but the slapdash descriptions provided for each slave by the revolutionaries make it likely that any similarities to your aesthetic leanings will be coincidental. Once you are satisfied with your selection, you electronically transfer the credits to the new arcology and soon receive a receipt for your donation and an estimated delivery schedule.`);
				App.UI.DOM.appendNewElement("p", text, `When the ladies arrive at your penthouse, they seem almost relieved at the opulence of their new surroundings. ${ladiesArrive()}`);
				const share = Math.trunc(courtLadiesCost / 3);

				// Ladies
				for (let i = 0; i < 3; i++) {
					const slave = generateOneCourtLady();
					cashX(-share, "slaveTransfer", slave);
					newSlave(slave); // skip New Slave Intro
				}
			} else {
				App.UI.DOM.appendNewElement("p", text, `You take a tablet and peruse the various court ladies on offer by the fledgling arcology. You single out a few interesting individuals for acquisition that might suit your tastes, but the slapdash descriptions provided for each by ${V.SF.Lower} Intelligence make it likely that any similarities to your aesthetic leanings will be coincidental. Once you are satisfied with your selection, you electronically transfer the order to The Colonel and soon receive a mission success notice along with an estimated delivery schedule.`);
				App.UI.DOM.appendNewElement("p", text, `When the ladies arrive at your penthouse, they seem almost relieved at the opulence of their new surroundings. ${ladiesArrive()}`);
				const share = Math.trunc(courtLadiesCostSF / 3);

				// Ladies
				for (let i = 0; i < 3; i++) {
					const slave = generateOneCourtLady();
					repX(-share, "event", slave);
					newSlave(slave); // skip New Slave Intro
				}
				V.arcologies[0].prosperity -= 10;
			}

			return text;
		}

		function getQueen(buy = true) {
			const text = new DocumentFragment();
			if (buy) {
				App.UI.DOM.appendNewElement("p", text, `You take a tablet and transmit a communication request to the new arcology owner. It doesn't take long for him to accept but when his video feed connects on your screen, you find yourself staring at the pained expression of the Queen ${himself3}. It becomes abundantly clear that someone is mounting ${him3} from behind as ${his3} body shakes and spasms from the intensity of their thrusts. You note that the Queen appears to be getting fucked on an extravagant, yet bloodstained, four-poster bed, likely the site of ${his3} former husband's demise. The mysterious individual unsurprisingly turns out to be the new arcology owner, revealing himself by shoving the Queen's face down against the stained bed sheets as he lowers his own face into frame. "How can I help you?"`);
				App.UI.DOM.appendNewElement("p", text, `The man seems somewhat surprised that you want to purchase the Queen, given the breadth and quality of his other merchandise available, but not unduly so. Soon enough negotiations begin and a short time later an equitable price is agreed upon. Your new peer even throws in a slight discount, in exchange for allowing him to use the Queen himself for the remainder of the night.`);
				App.UI.DOM.appendNewElement("p", text, `When the Queen arrives at your penthouse, ${he3} seems almost relieved and almost basks in the opulence of ${his3} new surroundings. `);

				// Queen
				cashX(-queenCash, "slaveTransfer", queen);
			} else {
				App.UI.DOM.appendNewElement("p", text, `Seizing a tablet, you quickly send a message to The Colonel. After dark, a flight of VTOLs land in the new arcology laden with troops. When they take off again they have the Queen aboard and make a direct course towards your waiting penthouse.`);
				App.UI.DOM.appendNewElement("p", text, `When the Queen arrives at your penthouse, ${he3} seems almost relieved and almost basks in the opulence of ${his3} new surroundings. ${queenArrives()}`);
				V.arcologies[0].prosperity -= 12;

				// Queen
				repX(-queenSF, "event", queen);
			}
			newSlave(queen); // skip New Slave Intro

			text.append(App.UI.newSlaveIntro(queen));

			return text;
		}

		function getPrincessAndQueen(buy = true) {
			const text = new DocumentFragment();
			if (buy) {
				App.UI.DOM.appendNewElement("p", text, `You take a tablet and transmit a communication request to the new arcology owner with your intent. Once his shock wears off, he readily accepts with little need for negotiation. Soon, a flight of VTOLs land in the new arcology laden with goods. When they take off again they have the princess and the Queen, who is resigned to ${his3} fate, clad in chains then bound face to face in a forced embrace.`);
				App.UI.DOM.appendNewElement("p", text, `Eventually they both arrive in your penthouse. The princess is flushed with embarrassment in ${his} compromising position, struggling to maintain a façade of poise and grace. ${princessArrives()} The Queen, on the other hand, seems almost relieved and basks in the opulence of ${his3} new surroundings. ${queenArrives()}`);
				const shares = princessAndQueenCash / 5;

				// Princess
				cashX(-shares * 4, "slaveTransfer", princess);
				newSlave(princess); // skip New Slave Intro

				// Queen
				cashX(-shares, "slaveTransfer", queen);
				newSlave(queen); // skip New Slave Intro
			} else {
				App.UI.DOM.appendNewElement("p", text, `Seizing a tablet, you quickly send a message to The Colonel. After dark, a flight of VTOLs land in the new arcology laden with troops. When they take off again they have the princess and Queen aboard, making a direct course towards your waiting penthouse.`);
				App.UI.DOM.appendNewElement("p", text, `Eventually they both arrive in your penthouse. The princess is flushed with embarrassment in ${his} compromising position, struggling to maintain a façade of poise and grace. ${princessArrives()} The Queen, on the other hand, seems almost relieved and basks in the opulence of ${his3} new surroundings. ${queenArrives()}`);
				V.arcologies[0].prosperity -= 13;
				const shares = princessAndQueenSF / 13;

				// Princess
				repX(-shares * 10, "event", princess);
				newSlave(princess);

				// Queen
				repX(-shares * 3, "event", queen);
				newSlave(queen);
			}

			return text;
		}

		function getQueenAndCourt(buy = true) {
			const text = new DocumentFragment();
			if (buy) {
				App.UI.DOM.appendNewElement("p", text, `You take a tablet and transmit a communication request to the new arcology owner with your intent. Once his shock wears off, he readily accepts with little need for negotiation. Soon, a flight of VTOLs land in the new arcology laden with goods. When they take off again they have the Queen, who is resigned to ${his3} fate, and a gaggle of terrified court ladies chained together.`);
				App.UI.DOM.appendNewElement("p", text, `Eventually they all arrive in your penthouse. The Queen seems almost relieved and basks in the opulence of ${his3} new surroundings. ${queenArrives()} Meanwhile, the ladies seem comforted by the opulence of their new surroundings. ${ladiesArrive()}`);
				const costShare = queenAndCourtCost / 5;

				// Ladies
				for (let i = 0; i < 3; i++) {
					const slave = generateOneCourtLady();
					cashX(-costShare, "slaveTransfer", slave);
					newSlave(slave); // skip New Slave Intro
				}

				// Queen
				cashX(-costShare * 2, "slaveTransfer", queen);
				newSlave(queen); // skip New Slave Intro
			} else {
				App.UI.DOM.appendNewElement("p", text, `Seizing a tablet, you quickly send a message to The Colonel. After dark, a flight of VTOLs land in the new arcology laden with troops. When they take off again they have the Queen, who is resigned to ${his3} fate, and a gaggle of terrified court ladies chained together.`);
				App.UI.DOM.appendNewElement("p", text, `Eventually they all arrive in your penthouse. The Queen seems almost relieved and basks in the opulence of ${his3} new surroundings. ${queenArrives()} Meanwhile, the ladies seem comforted by the opulence of their new surroundings. `);
				V.arcologies[0].prosperity -= 13;
				const share = queenAndCourtSF / 13;

				// Ladies
				for (let i = 0; i < 3; i++) {
					const slave = generateOneCourtLady();
					repX(-share*3, "event", slave);
					newSlave(slave); // skip New Slave Intro
				}

				// Queen
				repX(-share*4, "event", queen);
				newSlave(queen); /* skip New Slave Intro */
			}

			return text;
		}

		function getEntireCourt(buy = true) {
			function everyoneArrives() {
				let r = [];
				r.push(`Eventually they all arrive in your penthouse. The`);
				if (V.seeDicks > 0) {
					r.push(`prince and princess`);
				} else {
					r.push(`princess and queen`);
				}
				r.push(`are flushed with embarrassment in their compromising position.`);
				if (V.seeDicks > 0) {
					r.push(`The former prince is beside ${himself2} with rage, but seems to be holding ${himself2} back for ${his2} little ${relativeTerm(prince, princess)}'s sake, while ${he} struggles to maintain a façade of poise and grace.`);
				} else {
					r.push(`The princess struggles to maintain a façade of poise and grace.`);
				}
				r.push(princessArrives());
				if (V.seeDicks > 0) {
					r.push(`However, the prince's submission to life as a slave is another question entirely. The Queen, on the other hand,`);
				} else {
					r.push(`The Queen`);
				}
				r.push(`seems almost relieved and basks in the opulence of ${his3} new surroundings. ${queenArrives()} Lastly, the ladies seem comforted by the opulence of their new surroundings. ${ladiesArrive()}`);
				return r;
			}

			const text = new DocumentFragment();
			let r = [];
			if (buy) {
				r.push(`You take a tablet and transmit a communication request to the new arcology owner with your intent. Once his shock wears off, he readily accepts with little need for negotiation. Soon, a flight of VTOLs land in the new arcology laden with goods. When they take off again they have the`);
				if (V.seeDicks > 0) {
					r.push(`prince and princess, clad in chains and bound face to face in a forced embrace, the Queen, who is resigned to ${his3} fate,`);
				} else {
					r.push(`princess and ${his} mother, clad in chains and bound face to face in a forced embrace,`);
				}
				r.push(`and a gaggle of terrified court ladies.`);
				App.Events.addParagraph(text, r);
				App.Events.addParagraph(text, everyoneArrives());
				const costShare = entireCourtCost/250;

				// Princess
				cashX(-costShare*110, "slaveTransfer", princess);
				newSlave(princess); // skip New Slave Intro

				// Prince
				if (V.seeDicks > 0) {
					cashX(-costShare*75, "slaveTransfer", prince);
					newSlave(prince); // skip New Slave Intro
				}

				// Queen
				cashX(-costShare*25, "slaveTransfer", queen);
				newSlave(queen); /* skip New Slave Intro */

				// Ladies
				const ladiesCost = Math.trunc(costShare*40/3);
				for (let i = 0; i < 3; i++) {
					const slave = generateOneCourtLady();
					cashX(-ladiesCost, "slaveTransfer", slave);
					newSlave(slave); // skip New Slave Intro
				}
			} else {
				const loot = random(10, 300) * 100;
				r.push(`Seizing a tablet, you quickly send a message to The Colonel. After dark, a flight of VTOLs land in the new arcology laden with troops. When they take off again they have the`);
				if (V.seeDicks > 0) {
					r.push(`prince and princess, clad in chains and bound face to face in a forced embrace, the Queen, who is resigned to ${his3} fate,`);
				} else {
					r.push(`princess and ${his} mother, clad in chains and bound face to face in a forced embrace,`);
				}
				r.push(`a gaggle of terrified court ladies, and as much loot as they could carry.`);
				App.Events.addParagraph(text, r);
				App.Events.addParagraph(text, [...everyoneArrives(), `You also scored <span class="cash inc">${cashFormat(loot)}</span> in valuables from the raid.`]);

				V.arcologies[0].prosperity = 2;
				cashX(loot, "event");
				const repShares = Math.trunc(V.rep / -15);
				/* this event is supposed to end in reputation at 0. In order to slice up that pie, we find shares of "everything" here and give them out later, before finally setting leftovers to 0. 3 ladies at one share each, +3 for prince, +4 for queen, +5 for princess is 15 shares.*/

				// Ladies
				for (let i = 0; i < 3; i++) {
					const slave = generateOneCourtLady();
					repX(repShares, "event", slave);
					newSlave(slave); // skip New Slave Intro
				}
				// Princess
				repX((5 * repShares), "event", princess);
				newSlave(princess); // skip New Slave Intro

				// Prince
				if (V.seeDicks > 0) {
					repX((3 * repShares), "event", prince);
					newSlave(prince); /* skip New Slave Intro */
				}

				// Queen
				repX((4 * repShares), "event", queen);
				newSlave(queen); /* skip New Slave Intro */

				repX(0 - V.rep, "event"); /* Round off any remaining rep due to the trunc on shares*/
			}

			return text;
		}

		function generateTemplate() {
			let slave;

			if (V.realRoyalties === 1) {
				/** @type {FC.Race} */
				let race;
				const nationality = App.Data.misc.royalNationalities.random();
				switch (nationality) {
					case "Japanese":
					case "Cambodian":
					case "Bhutanese":
					case "Thai":
						race = "asian";
						break;
					case "Luxembourgian":
					case "Belgian":
					case "Danish":
					case "Dutch":
					case "Swedish":
					case "Norwegian":
					case "British":
					case "Monégasque":
						race = "white";
						break;
					case "Spanish":
						race = "southern european";
						break;
					case "Moroccan":
					case "Omani":
					case "Jordanian":
					case "Bahraini":
					case "Kuwaiti":
					case "Qatari":
					case "Saudi":
						race = "middle eastern";
						break;
					case "Bruneian":
					case "Malaysian":
						race = "malay";
						break;
					case "Emirati":
						race = "indo-aryan";
						break;
					case "Tongan":
						race = "pacific islander";
						break;
					case "Swazi":
					case "Mosotho":
						race = "black";
						break;
				}
				slave = GenerateNewSlave("XX", {
					minAge: V.fertilityAge + V.minimumSlaveAge + 1, maxAge: (V.pedo_mode === 1 ? 24 : 43), disableDisability: 1, nationality: nationality, race: race
				});
				if (slave.nationality === "Japanese") {
					slave.birthSurname = "Yamato";
				} else if (slave.nationality === "Luxembourgian") {
					slave.birthSurname = "Luxembourg-Nassau";
				} else if (slave.nationality === "Belgian") {
					slave.birthSurname = "Saxe-Coburg and Gotha";
				} else if (slave.nationality === "Danish") {
					slave.birthSurname = "Glücksburg";
				} else if (slave.nationality === "Dutch") {
					slave.birthSurname = "Orange-Nassau";
				} else if (slave.nationality === "Swedish") {
					slave.birthSurname = "Bernadotte";
				} else if (slave.nationality === "Spanish") {
					slave.birthSurname = "Bourbon";
				} else if (slave.nationality === "Norwegian") {
					slave.birthSurname = "Glücksburg";
				} else if (slave.nationality === "Cambodian") {
					slave.birthSurname = "Norodom";
				} else if (slave.nationality === "Moroccan") {
					slave.birthSurname = "Alawi";
				} else if (slave.nationality === "Omani") {
					slave.birthSurname = "Al Said";
				} else if (slave.nationality === "Jordanian") {
					slave.birthSurname = "Hāshim";
				} else if (slave.nationality === "Bruneian") {
					slave.birthSurname = "Bolkiah";
				} else if (slave.nationality === "Emirati") {
					slave.birthSurname = "Al Nahyan";
				} else if (slave.nationality === "Bahraini") {
					slave.birthSurname = "Al Khalifah";
				} else if (slave.nationality === "Kuwaiti") {
					slave.birthSurname = "Al Sabah";
				} else if (slave.nationality === "Malaysian") {
					slave.birthSurname = "Pahang";
				} else if (slave.nationality === "Qatari") {
					slave.birthSurname = "Al Thani";
				} else if (slave.nationality === "Saudi") {
					slave.birthSurname = "Al Saud";
				} else if (slave.nationality === "Tongan") {
					slave.birthSurname = "Tupou";
				} else if (slave.nationality === "Swazi") {
					slave.birthSurname = "Dlamini";
				} else if (slave.nationality === "Mosotho") {
					slave.birthSurname = "Moshesh";
				} else if (slave.nationality === "British") {
					slave.birthSurname = "Windsor";
				} else if (slave.nationality === "Monégasque") {
					slave.birthSurname = "Grimaldi";
				} else if (slave.nationality === "Bhutanese") {
					slave.birthSurname = "Wangchuck";
				} else if (slave.nationality === "Thai") {
					slave.birthSurname = "Chakri";
				}
				slave.slaveSurname = slave.birthSurname;
			} else {
				slave = GenerateNewSlave("XX", {minAge: V.fertilityAge + V.minimumSlaveAge + 1, maxAge: (V.pedo_mode === 1 ? 24 : 43), disableDisability: 1});
			}
			slave.anus = 0;
			slave.weight = 0;
			slave.prestige = 2;
			slave.skill.whoring = 0;
			slave.canRecruit = 0;

			return slave;
		}

		/** @returns {App.Entity.SlaveState} */
		function generatePrincess() {
			const slave = generateRelatedSlave(queen, "daughter");
			slave.career = "a princess";
			slave.origin = "$He was a princess of a royal kingdom, till $his family was overthrown and $he was sold to you in exchange for aid.";
			slave.prestigeDesc = "$He was the princess of an ancient kingdom.";
			slave.devotion = random(-80, -60);
			slave.trust = random(-50, -60);
			slave.face = random(25, 100);
			slave.boobs = Math.min(slave.boobs, 400);
			slave.vagina = 0;
			slave.preg = -1;
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			slave.hips = 0;
			slave.butt = random(1, 2);
			slave.intelligence = random(15, 100);
			slave.intelligenceImplant = 15;
			slave.skill.entertainment = 45;
			slave.skill.anal = 0;
			slave.skill.oral = 0;
			setHealth(slave, jsRandom(30, 60), 0, 0, 0, 0);
			slave.behavioralFlaw = either("arrogant", "bitchy");
			setMissingParents(slave); // set .father so the prince will be a full sibling

			return slave;
		}

		/** @returns {App.Entity.SlaveState} */
		function generatePrince() {
			const slave = generateRelatedSlave(princess, "older brother");
			slave.career = "a prince";
			slave.origin = "$He was the crown prince of a royal kingdom, till $his family was overthrown and $he was sold to you in exchange for aid.";
			slave.prestigeDesc = "$He was the crown prince of an ancient kingdom.";
			slave.devotion = random(-80, -60);
			slave.trust = random(-50, -60);
			slave.butt = random(0, 1);
			slave.muscles = 50;
			slave.intelligence = random(15, 100);
			slave.intelligenceImplant = 15;
			slave.skill.anal = 0;
			slave.skill.oral = 0;
			slave.skill.combat = 1;
			setHealth(slave, jsRandom(30, 60), 0, 0, 0, 0);
			slave.behavioralFlaw = either("arrogant", "bitchy");

			return slave;
		}

		/** @returns {App.Entity.SlaveState} */
		function generateQueen() {
			const slave = generateTemplate();
			slave.career = "a Queen";
			slave.origin = "$He was the Queen of a royal kingdom, till $his husband was overthrown and $he was sold to you in exchange for credits.";
			slave.prestigeDesc = "$He was the Queen of an ancient kingdom.";
			slave.face = random(25, 100);
			slave.faceImplant = 0;
			slave.devotion = random(10, 20);
			slave.trust = random(-20, -30);
			slave.boobs = random(3, 10) * 100;
			slave.vagina = 2;
			if (V.seePreg !== 0) {
				slave.preg = 7;
				slave.pregType = 1;
				slave.pregWeek = 7;
				slave.pregKnown = 1;
				SetBellySize(slave);
			}
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			slave.shoulders = random(-1, 1);
			slave.hips = 1;
			slave.butt = random(2, 4);
			slave.intelligence = random(15, 100);
			slave.intelligenceImplant = 30;
			slave.skill.entertainment = 45;
			slave.counter.birthsTotal = 2;
			setHealth(slave, jsRandom(30, 60), 0, 0, 0, 0);
			slave.behavioralFlaw = either("arrogant", "bitchy");

			return slave;
		}

		/** @returns {App.Entity.SlaveState} */
		function generateOneCourtLady() {
			const slave = GenerateNewSlave("XX", {
				minAge: 21, maxAge: V.retirementAge - 2, disableDisability: 1, nationality: princess.nationality
			});
			slave.origin = "$He was a member of the court in an ancient kingdom, till it was overthrown and $he was sold to you in exchange for credits.";
			slave.career = "a lady courtier";
			slave.prestige = 1;
			slave.prestigeDesc = "$He was once a lady of the court of an ancient kingdom.";
			slave.face = random(25, 76);
			slave.devotion = random(10, 20);
			slave.trust = random(-20, -30);
			slave.boobs = random(3, 10) * 100;
			slave.vagina = Math.min(slave.vagina, 1);
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			slave.shoulders = random(-1, 1);
			slave.hips = 1;
			slave.butt = 1;
			slave.anus = 0;
			slave.weight = 0;
			slave.intelligence = random(-50, 70);
			slave.intelligenceImplant = 15;
			slave.skill.entertainment = 25;
			slave.skill.whoring = 0;
			setHealth(slave, jsRandom(30, 60), 0, 0, 0, 0);
			slave.canRecruit = 0;
			slave.behavioralFlaw = either("arrogant", "bitchy");
			return slave;
		}

		function queenArrives() {
			return `Yet, it seems likely that ${his3} relief has more to do with saving ${him3} from a lifetime of gang rape at the mercy of ${his3} former subjects, than it does the familiar luxury. ${He3} submits to biometric scanning obediently and without ${(V.seePreg !== 0) ? `fuss, during which you discover to ${his3} surprise that ${he3} is pregnant. Since ${he3} hasn't begun to show yet, it's unclear whether the child is the former King's or the new arcology owner's. You don't have the means to discern the father of the child, but you notice ${he3} cradles ${his3} ever so slightly rounded stomach protectively nonetheless.` : `fuss.`}`;
		}

		function princessArrives() {
			return `The slightest trembling of ${his} balled up fists, the minute tremors that mar ${his} immaculate posture, ${his} inability to meet your eyes with ${his} own — all signs that ${he} is still a scared ${girl} despite all ${his} royal trappings. Nonetheless, though the princess's court training is unlikely to be very beneficial to ${him} in ${his} new life in the penthouse, it does stand in stark contrast to ${his} more common slave peers.`;
		}

		function princeArrives() {
			return `When ${he2} arrives in your penthouse, the former prince is beside ${himself2} with rage. When ${he2} is brought to be modified in the remote surgery, ${he2} breaks free and attempts to fight ${his2} way out of your penthouse. ${His2} attempt at freedom is futile, however, and ${he2} is soon overwhelmed by your guards and dragged back to the remote surgery. It doesn't take long for the valiant prince to become a new dickgirl, though ${his2} submission to life as a slave is another question entirely.`;
		}

		function ladiesArrive() {
			return `Though they still retain much of their aristocratic arrogance, they each submit to biometric scanning with relative obedience. It seems likely that their obedience is borne out of a delusional rationalization that enslavement by one wealthy master is better than enslavement by the unwashed masses they once lorded over.`;
		}
	}
};


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

	actorPrerequisites() {
		return [[
			(s) => s.devotion <= 50,
			(s) => s.anus !== 0,
			(s) => s.fetish !== "mindbroken",
			canDoAnal,
			hasAnyLegs,
			hasAnyArms,
			canTalk,
		]];
	}

	execute(node) {
		const r = new SpacedTextAccumulator(node);
		const slave = getSlave(this.actors[0]);

		const {
			He,
			he, his, him, himself, girl, women
		} = getPronouns(slave);

		const {title: Master} = getEnunciation(slave);

		const {
			He2, His2,
			he2, his2, him2, woman2, girl2
		} = getPronouns(S.HeadGirl).appendSuffix("2");

		App.Events.drawEventArt(node, [slave, S.HeadGirl], "no clothing");

		if (V.HGSuite === 1) {
			r.push(`Looking in on your Head Girl in ${his2} suite, you hear ${his2} private shower running and head that way. Through the thick steam the shower makes on its hottest setting, you see`);
		} else {
			r.push(`Passing by the showers, you see, through the steam of a very hot shower,`);
		}
		r.push(`a`);
		if (slave.height > 180) {
			r.push(`tall,`);
		} else if (slave.height < 150) {
			r.push(`tiny,`);
		}
		r.push(
			`${slave.skin} form moving busily around a ${S.HeadGirl.skin} figure, which is standing confidently in the middle of the warm, moist space. As you draw nearer, you identify the stationary slave as your Head Girl,`,
			App.UI.DOM.combineNodes(App.UI.DOM.slaveDescriptionDialog(S.HeadGirl), "."),
			`${His2} attendant is`,
			App.UI.DOM.combineNodes(contextualIntro(S.HeadGirl, slave, true), `,`),
			`and ${he}'s washing ${his} superior with a big sponge.`,
		);

		if (V.HGSeverity > 0) {
			r.push(`By virtue of not being rape, this is an unusually mild punishment by your Head Girl, if indeed that's what it is. But perhaps ${he2}'s saving that for later. And to go by the cringing, frightened mien of the busy little bath bitch, that's probably it.`);
		} else if (V.HGSeverity === 0) {
			r.push(`Your Head Girl does ${his2} best to fit the punishment to the crime, so ${slave.slaveName}'s failure was likely minor. With ${S.HeadGirl.slaveName}'s penchant for poetic justice, probably some little deficiency of personal cleanliness.`);
		} else {
			r.push(`This is the sort of mild punishment that your regime of respect and dignity requires ${him2} to use for all but the most egregious fault. Thus restricted, ${he2} does ${his2} best to come up with novel little degradations to keep ${his2} charges on their toes.`);
		}
		r.toParagraph();
		r.push(`${slave.slaveName} is being very thorough. When you first appeared, ${he} was working ${his} way up ${S.HeadGirl.slaveName}'s `);
		if (S.HeadGirl.muscles > 30) {
			r.push(`muscle-corded`);
		} else if (S.HeadGirl.weight > 10) {
			r.push(`soft`);
		} else if (S.HeadGirl.vagina > -1) {
			r.push(`feminine`);
		} else {
			r.push(`pretty`);
		}
		r.push(`thighs, having obviously started at the bottom. ${He} skips over ${S.HeadGirl.slaveName}'s crotch, probably under instructions to leave it for last. It's late in your Head Girl's busy day, and you hear ${his2} groan of relaxation over the running water when the stiff sponge begins to scrub back and forth across ${his2}`);
		if (S.HeadGirl.belly >= 60000) {
			r.push(`enormously`);
			if (S.HeadGirl.preg > 0) {
				r.push(`pregnant`);
			} else {
				r.push(`rounded`);
			}
			r.push(`belly.`);
		} else if (S.HeadGirl.weight > 190) {
			r.push(`massively fat gut.`);
		} else if (S.HeadGirl.belly >= 10000) {
			r.push(`hugely`);
			if (S.HeadGirl.preg > 0) {
				r.push(`pregnant`);
			} else {
				r.push(`rounded`);
			}
			r.push(`belly.`);
		} else if (S.HeadGirl.weight > 95) {
			r.push(`big soft belly.`);
		} else if (S.HeadGirl.belly >= 5000) {
			if (S.HeadGirl.preg > 0) {
				r.push(`pregnant`);
			} else {
				r.push(`round`);
			}
			r.push(`belly.`);
		} else if (S.HeadGirl.weight > 30) {
			r.push(`soft belly.`);
		} else if (S.HeadGirl.belly >= 1500) {
			r.push(`bloated belly.`);
		} else if (S.HeadGirl.muscles > 30) {
			r.push(`shredded abs.`);
		} else if (S.HeadGirl.weight > 10) {
			r.push(`plush belly.`);
		} else if (S.HeadGirl.piercing.navel.weight > 0) {
			r.push(`pierced belly button.`);
		} else if (S.HeadGirl.waist < -10) {
			if (S.HeadGirl.waist < -95) {
				r.push(`absurdly`);
			}
			r.push(`narrow waist.`);
		} else {
			r.push(`belly.`);
		}
		r.toParagraph();

		const choices = [];
		choices.push(new App.Events.Result(`Just spectate`, spectate));
		choices.push(new App.Events.Result(`Get a scrub down too`, scrub));
		choices.push(new App.Events.Result(`Focus on your Head Girl`, HG));
		App.Events.addResponses(node, choices);

		function spectate() {
			const r = new SpacedTextAccumulator();
			r.push(`You could strip off your suit, walk into the steam, and enjoy your slaves' ministrations, but sometimes the artistry of tastefully nude bodies is a welcome change of pace. You lean against the wall, far enough away that they remain unaware of your presence, and take in the sight. ${S.HeadGirl.slaveName} makes the penitent ${girl} do the job with Brahmanical thoroughness, cleaning ${his} superior's ${S.HeadGirl.race} body down to its very last pore. As ${slave.slaveName} circles the Head Girl laboriously, doing ${his} best to ingratiate ${himself} by diligence, the pair of naked`);
			if (girl === girl2) {
				r.push(`${women}`);
			} else {
				r.push(`slaves`);
			}
			r.push(`present a fascinating contrast. They are unclothed alike, the water streaming off their bodies without any distinction, but even an old world fool could not mistake the immense gulf between them.`);
			r.toParagraph();
			r.push(`When ${slave.slaveName} is finally done, ${S.HeadGirl.slaveName}'s`);
			if (V.HGSeverity > 0) {
				r.push(`hands seize ${him} by the ears and pull ${his} head in for a kiss that is dominance distilled into the form of a loving gesture. Then ${he2} pokes ${his2} bitch in the side, forcing the slave to collapse in just the right way.`);
			} else if (V.HGSeverity === 0) {
				r.push(`arms encircle ${him} in an embrace that is simultaneously controlling, comforting, and sexually insistent. The slave does not resist, allowing the Head Girl to run ${his2} hands over the warm, wet sex slave.`);
			} else {
				r.push(`arousal is obvious. Though the respectful regime you require secures ${him} from the fear of being used, ${slave.slaveName} nonverbally offers ${his} superior oral, out of obvious gratitude that whatever ${he} did is being treated so leniently, and perhaps out of a desire to be in ${S.HeadGirl.slaveName}'s good graces.`);
			}
			r.push(`In no time at all, ${slave.slaveName}'s ${slave.hColor} head descends to obscure ${S.HeadGirl.slaveName}'s groin. The`);
			if (S.HeadGirl.face > 95) {
				r.push(`heartrendingly gorgeous`);
			} else if (S.HeadGirl.face <= 95) {
				r.push(`wonderfully pretty`);
			} else if (S.HeadGirl.face <= 40) {
				r.push(`approachably lovely`);
			} else if (S.HeadGirl.face <= 10) {
				r.push(`not unattractive`);
			} else {
				r.push(`homely`);
			}
			if (S.HeadGirl.physicalAge > 25) {
				r.push(`${woman2}'s`);
			} else {
				r.push(`${girl2}'s`);
			}
			r.push(`head cranes back with orgasm before long; that diligent scrub must have been quite stimulating.`);
			r.toParagraph();
			r.push(`${slave.slaveName} stays in the shower to clean ${himself}, so ${S.HeadGirl.slaveName} exits to see you watching the denouement. ${He2} smiles, murmuring a greeting, and hurries over to give you a peck on the cheek, leaning in as best ${he2} can to keep ${his2} moist body away from your suit. "This is the life, ${Master}," ${he2} whispers.`);
			seX(slave, "oral", S.HeadGirl, "penetrative");
			S.HeadGirl.devotion += 4;
			r.toParagraph();

			return r.container();
		}

		function scrub() {
			const r = new SpacedTextAccumulator();
			r.push(`You strip off your suit and enter the shower. By the time you get in, ${S.HeadGirl.slaveName}'s sponge scrub is almost done. ${He2} turns to greet you with half-lidded eyes, well pleased with ${his2} thorough scrubbing. ${His2} ${S.HeadGirl.skin} skin shines with wet cleanliness, and ${his2} ${S.HeadGirl.nipples} nipples begin to`);
			if (S.HeadGirl.nipples === "fuckable") {
				r.push(`swell with arousal`);
			} else {
				r.push(`stiffen`);
			}
			r.push(`as ${he2} sees your gaze take in ${his2} nude body. ${He2} brusquely orders ${slave.slaveName} to scrub you, too, anticipating your intention. The rough, exfoliating sensation of the sponge is indeed delightful, and you close your eyes to savor the feeling as the slave rubs it up and down your calves and then the backs of your knees.`);
			r.toParagraph();
			if (V.HGSeverity > 0) {
				r.push(`You detect tremors of fear in the`);
				if (hasAnyArms(slave)) {
					r.push(`slave's ${hasBothArms(slave) ? "hands" : "hand"};`);
				} else {
					r.push(`slave;`);
				}
				r.push(`${he} knows that ${he} hasn't extirpated ${his} misbehavior, whatever it was, just yet. You let your Head Girl manage that, however, and ${he2} does. When ${slave.slaveName} is stuck in one position for a short time by the need to wash your thighs, you hear a gasp and open your eyes to the sight of your Head Girl crouched behind ${him}, giving ${him} an anal fingerfuck. When ${slave.slaveName} is done washing you, your Head Girl holds the slave's head to your`);
			} else {
				r.push(`When the washing reaches your shoulders, it becomes clumsier, and ${slave.slaveName}'s wet body begins to bump gently against your torso. Opening your eyes, you see that your Head Girl is taking ${him} as ${he} finishes your bath. ${slave.slaveName} is doing ${his} best to do a good job as ${he}'s fucked, and ${he} manages it reasonably well. When ${he}'s done, ${S.HeadGirl.slaveName} pushes ${his} head down towards your`);
			}
			if (V.PC.dick !== 0) {
				r.push(`groin so ${he} can suck you off${(V.PC.vagina !== -1) ? "and stroke your cunt" : ""}.`);
			} else {
				r.push(`cunt so ${he} can eat you out.`);
			}
			r.push(`${slave.slaveName} complies, and afterward, ${he} seems to feel that <span class="trust inc">${he} came off reasonably well;</span> it could have been worse.`);
			seX(slave, "anal", S.HeadGirl, "penetrative");
			seX(slave, "oral", V.PC, "penetrative");
			r.push(knockMeUp(slave, 10, 1, V.HeadGirlID));
			slave.trust += 4;
			r.toParagraph();
			return r.container();
		}

		function HG() {
			const r = new SpacedTextAccumulator();
			const {hersP} = getPronouns(V.PC).appendSuffix("P");
			r.push(`You strip off your suit and walk into the steam, producing a surprised but welcoming greeting from your Head Girl and a muffled, submissive noise from ${slave.slaveName}. ${S.HeadGirl.slaveName} is held more or less stationary by the slave ${he2}'s straddling, so you step in, hook a dominant arm around ${his2} waist, and kiss ${him2}. There's precisely one person in this arcology who's allowed to treat ${him2} as ${hersP}, and it's you. ${He2} relaxes into you with gratitude as you shoulder the burden of being the leader in this little area of your empire, lifting it from ${his2} shoulders for now.`);
			r.toParagraph();
			r.push(`You run a hand up the side of ${his2} neck, bringing it to rest with your fingers cupping ${him2} under the ear and your thumb running up along ${his2} temple. ${He2} shivers, unable to concentrate despite all ${his2} poise, the ongoing oral service blending into your intense closeness. Right now, ${he2}'s the`);
			if (S.HeadGirl.physicalAge > 25) {
				r.push(`${woman2}`);
			} else {
				r.push(`${girl2}`);
			}
			r.push(`for you, so you snap your fingers next to the ear of the slave`);
			if (S.HeadGirl.vagina > -1) {
				r.push(`eating ${him2} out,`);
			} else {
				r.push(`blowing ${him2},`);
			}
			r.push(`point at the dropped sponge, and then point at yourself. The oral stops as ${slave.slaveName} hurries to scrub you, starting at your feet, but your Head Girl doesn't care. You're kissing ${him2}.`);
			r.toParagraph();
			r.push(`${He2} gently strokes your `);
			if (V.PC.dick !== 0) {
				r.push(`rapidly hardening member, smiling into your mouth at the speed with which it stiffens${(V.PC.vagina !== -1) ? ", and teases your pussylips with mischievous fingers" : ""}.`);
			} else {
				r.push(`flushed cunt, smiling into your mouth at the moisture that instantly coats ${his2} fingertips.`);
			}
			r.push(`You reach out in turn,`);
			if (S.HeadGirl.vagina > -1) {
				r.push(`caressing ${his2} pussylips before slowly inserting a digit inside ${his2} warmth while nuzzling ${his2} clit with the knuckle of your thumb. At the first real brush against ${his2} clitoris, the overstimulated ${S.HeadGirl.slaveName} climaxes, pulling ${his2} mouth away from you to shout your name and then sobbing thanks into your ear.`);
			} else {
				r.push(`hooking your fingers up underneath ${his2} taint to grope ${his2} anus. After teasing ${his2} asspussy for a moment you bring your hand slowly across ${his2} perineum${(S.HeadGirl.scrotum > 0) ? `until ${his2} ballsack rests against your wrist` : ""}. The overstimulated ${S.HeadGirl.slaveName} cums the instant the butt of your hand touches the base of ${his2} cock. ${He2} screams your name.`);
			}
			r.toParagraph();
			r.push(`${He2} isn't terribly affected by loving shower sex with you; after all, it isn't exactly novel for ${him2}. ${slave.slaveName} was there to bear witness, though, scrubbing your back as ${S.HeadGirl.slaveName} clung to it with orgasm. ${He} can't help but be impressed. Maybe, just maybe, that could be ${him} someday. ${He} seems distinctly uncomfortable.`);

			seX(slave, "oral", S.HeadGirl, "oral");

			slave.devotion += 4;

			r.toParagraph();
			return r.container();
		}
	}
};

repo_name: Pecanus/fc

license: mit


code:
App.Events.RESiblingPlease = class RESiblingPlease extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => V.seePreg !== 0,
			() => V.seeIncest !== 0, // daughter participates in sex scenes
			() => isFullyPotent(V.PC), // natural impregnation of slave's mother by potent PC; other paths are potentially possible but not written
			() => V.arcologies[0].FSRestart === "unset" // in a Eugenics arcology this event would require extra checks and special dialog that hasn't been written
		];
	}

	actorPrerequisites() {
		return [
			[ // requesting slave (daughter) is devoted, trusting, and relatively independent
				canTalk,
				canHear,
				canMove,
				s => s.fetish !== "mindbroken",
				s => s.devotion > 50,
				s => s.trust > 50,
				hasAnyEyes, // for winking
			],
			[ // and her mother, who has only the one child, but is capable of bearing another for the PC
				s => s.ID === getSlave(this.actors[0]).mother,
				s => s.daughters === 1, // note that the requesting slave CAN have half-sisters on her *father's* side, so a male PC's children are eligible to ask for a full sibling
				this.impregCheck,
				s => s.womb.length === 0 // and not already expecting another child...no begging for superfet babies in this event
			]
		];
	}

	/** @param {App.Entity.SlaveState} slave */
	impregCheck(slave) {
		// we can't just ask for canGetPregnant here, because of contraceptives and chastity devices, which the PC can remove
		return isFertile(slave) && ((slave.ovaries === 1 && slave.vagina >= 0) || slave.mpreg === 1) && canBreed(slave, V.PC);
	}

	execute(node) {
		const [dau, mom] = this.actors.map(a => getSlave(a));

		const {He, His, he, him, his, himself, daughter} = getPronouns(dau);
		const {He2, he2, him2, his2, himself2} = getPronouns(mom).appendSuffix('2');
		const {title: Master} = getEnunciation(dau);

		App.Events.drawEventArt(node, [dau, mom]);

		const t = new SpacedTextAccumulator(node);
		t.push(`After you complete your weekly inspection of`);
		t.push(App.UI.DOM.combineNodes(contextualIntro(V.PC, dau, true), `, your instincts tell you that the ${SlaveTitle(dau)} has something more on ${his} mind.`));
		t.push(`You take a moment to look at ${him}, ${canStand(dau) ? "standing" : "sitting"} there in front of your desk. ${He}'s devoted to you, willing to please you for the sake of pleasing you, rather than to avoid punishment or to make ${his} own life easier, and ${he} trusts you implicitly. With that in mind, you ask what's bothering ${him}.`);
		t.toParagraph();

		t.push(Spoken(dau, `"I...I was thinking about family, and mom. Can...can I have a little sister, ${Master}? We could do all sorts of things together!"`));
		t.push(`${He} winks seductively at you, and suddenly you're thinking about all the fun things you could do with them. And with a bit of patience it's definitely workable;`, contextualIntro(dau, mom, true), `could bear ${mom.counter.births > 0 ? `another` : `a`} child for you, without a doubt.`);
		t.toParagraph();

		App.Events.addResponses(node, [
			new App.Events.Result(`Bring ${mom.slaveName} up and impregnate ${him2} now`, impregMom, virginityCheck(mom)),
			this.impregCheck(dau) ? new App.Events.Result(`Give ${him} a daughter, instead of a sister`, impregDau, virginityCheck(dau)) : new App.Events.Result(),
			this.impregCheck(dau) ? new App.Events.Result(`Get them both pregnant, for extra family fun`, impregBoth, virginityCheck(mom, dau)) : new App.Events.Result(),
			new App.Events.Result(`${He}'s fine as an only child`, decline)
		]);

		/** @param {App.Entity.SlaveState[]} slaves */
		function virginityCheck(...slaves) {
			const vir = [];
			for (const slave of slaves) {
				if (canDoVaginal(slave) && slave.vagina === 0) {
					vir.push(`${slave.slaveName}'s virginity`);
				} else if (slave.mpreg === 1 && canDoAnal(slave) && slave.anus === 0) {
					vir.push(`${slave.slaveName}'s anal virginity`);
				}
			}
			if (vir.length > 0) {
				return `This option will take ${toSentence(vir)}.`;
			}
		}

		/** Prepare and actually fuck the mom
		 * @param {SpacedTextAccumulator} t
		 * @param {boolean} disobedient
		 */
		function fuckMom(t, disobedient) {
			const mobile = canMove(mom);
			if (!mobile) {
				t.push(`You have ${mom.slaveName} brought up to your office, stripped, and placed on the couch.`);
			} else {
				t.push(`You order ${mom.slaveName} to come up to your office immediately. ${He2} presents ${himself2} in a suitably short time, and strips when ordered, perhaps expecting a surprise inspection.`);
			}
			t.push(`You explain the situation briefly; upon`);
			if (canHear(mom)) {
				t.push(`hearing`);
			} else {
				t.push(`learning`);
			}
			t.push(`that you intend to impregnate ${him2}, ${he2}`);
			if (disobedient) {
				t.push(`starts to struggle.`);
				if (mobile) {
					t.push(`You throw ${him2} down on the couch, and at`);
				} else {
					 t.push(`At`);
				}
				t.push(`your word, ${dau.slaveName} holds ${him2} down so you can rape ${him2}. ${mom.slaveName}'s face registers shock at ${his2} ${daughter}'s betrayal, and replaces ${his2} struggling with sobbing.`);
			} else if (mom.fetish === "pregnancy") {
				t.push(`smiles broadly and begins to shed tears of joy as ${dau.slaveName} embraces ${him2}`);
				if (mobile) {
					t.push(`before guiding ${him2} to lay down on the couch`);
				}
				t.addToLast('.');
			} else if (mom.devotion > 50) {
				t.push(`seems eager to use ${his2} body to make you another slave, and ${dau.slaveName} a new sibling.`);
				if (mobile) {
					t.push(`${He2} lays on the couch, presenting ${his2} ${mom.mpreg ? 'ass' : 'vagina'} to you.`);
				}
			} else {
				if (mobile) {
					t.push(`compliantly lays on the couch awaiting the inevitable.`);
				} else {
					t.push(`indicates ${his2} compliance.`);
				}
			}

			t.toParagraph();

			if ((!mom.mpreg && mom.chastityVagina) || (mom.mpreg && mom.chastityAnus)) {
				t.push(`You remove ${mom.slaveName}'s chastity belt and set it aside; it won't do to have it in the way right now.`);
			}

			if (mom.vaginaLube === 2 && !mom.mpreg) {
				t.push(`Even though ${mom.slaveName}'s sopping cunt is already dripping on the couch, you order ${dau.slaveName} to use ${his} mouth to get ${him2} ready for you, and ${he} dives in eagerly.`);
				seX(dau, "oral", mom, "vaginal", 1);
			} else if (mom.mpreg) {
				t.push(`As you briefed ${him}, ${dau.slaveName} uses ${his} mouth and tongue to clean and lubricate the entrance to ${his} mother's anal womb as preparation.`);
				seX(dau, "oral", mom, "anal", 1);
			} else {
				t.push(`As you briefed ${him}, ${dau.slaveName} eagerly goes down on ${his} mother's cunt, to get ${him2} good and ready for your cock.`);
				seX(dau, "oral", mom, "vaginal", 1);
			}
			if (mom.devotion > 50) {
				t.push(`Knowing just how receptive ${his} mother is, ${dau.slaveName} straddles ${mom.slaveName}'s face and allows ${him2} to return the favor.`);
			}
			t.toParagraph();

			t.push(`You move over to the couch to do your part of the work knocking up ${mom.slaveName}.`);
			if (!mom.mpreg) {
				const vcheckText = VCheck.Vaginal(mom, 7);
				if (vcheckText) {
					t.push(vcheckText);
				} else {
					t.push(`You push yourself into ${his}`);
					if (mom.vagina > 2) {
						t.push("gaping");
					} else if (mom.vagina === 1) {
						t.push("tight");
					}
					t.push(`pussy, working away at ${him} vigorously.`);
				}
				knockMeUp(mom, 100, 0, -1);
			} else { // mpreg
				const vcheckText = VCheck.Anal(mom, 7);
				if (vcheckText) {
					t.push(vcheckText);
				} else {
					t.push(`You push yourself into ${his}`);
					if (mom.anus > 2) {
						t.push("gaping");
					} else if (mom.anus === 1) {
						t.push("tight");
					}
					t.push(`anus, working away at ${him} vigorously.`);
				}
				knockMeUp(mom, 100, 1, -1);
			}
			if (disobedient) {
				t.push(`Meanwhile, ${dau.slaveName} watches transfixed as ${he} holds ${mom.slaveName} in place.`);
			} else {
				const helping = [];
				if (V.PC.scrotum > 1 && V.PC.balls > 1) {
					helping.push("sucking your balls");
				}
				if (V.PC.boobs >= 300) {
					helping.push("massaging your breasts");
				}
				if (mom.dick > 0) {
					helping.push(`sliding ${his} hand up and down ${mom.slaveName}'s dick`);
				} else if (mom.clit > 0) {
					helping.push(`rubbing ${mom.slaveName}'s clit`);
				}
				helping.push("licking your nipples");
				if (helping.length < 2) {
					helping.push("so on");
				}
				t.push(`Meanwhile, ${dau.slaveName} "helps" any way ${he} can...running ${his} hands over both your bodies, ${toSentence(helping)}.`);
			}
			t.push(`Eventually, you come deep inside ${him2}, filling ${his2}${mom.mpreg ? ` anal` : ``} womb with your seed.`);
			t.toParagraph();
		}

		/** Actually fuck the daughter
		 * @param {SpacedTextAccumulator} t
		 */
		function fuckDau(t) {
			t.push(`You move over to a convenient leather chair and sit down, signalling to ${dau.slaveName} that ${he} should climb on top`);
			if ((!dau.mpreg && dau.chastityVagina) || (dau.mpreg && dau.chastityAnus)) {
				t.push(`after removing ${his} chastity belt, which you've unlocked`);
			}
			t.addToLast(`.`);
			t.push(`${He} rushes to obey, almost jumping on you in ${his} eagerness.`);
			if (!dau.mpreg) {
				const vcheckText = VCheck.Vaginal(dau, 7);
				if (vcheckText) {
					t.push(vcheckText);
				} else {
					t.push(`${He} faces you, sliding ${himself} down over your turgid cock, and gradually building up a rhythm.`);
				}
				knockMeUp(dau, 100, 0, -1);
			} else { // mpreg
				const vcheckText = VCheck.Anal(dau, 7);
				if (vcheckText) {
					t.push(vcheckText);
				} else {
					t.push(`${He} faces away from you,`);
					if (dau.anus > 2) {
						t.push(`sliding ${his} gaping`);
					} else if (dau.anus === 1) {
						t.push(`forcing ${his} tight`);
					} else {
						t.push(`pushing ${his} practiced`);
					}
					t.push(`butt down over your turgid cock, and gradually building up a rhythm.`);
				}
				knockMeUp(dau, 100, 1, -1);
			}
			t.push(`It doesn't take long before you explode within ${him}. ${He} kisses you before climbing off, your seed dripping down ${his} leg.`);
			t.toParagraph();
		}

		function impregMom() {
			const t = new SpacedTextAccumulator();

			t.push(`You explain to ${dau.slaveName} that you'll want ${his} help, and ${he} agrees eagerly.`);
			t.toParagraph();

			const disobedient = (disobedience(mom) > random(0, 100));
			fuckMom(t, disobedient);

			if (mom.preg === -1) {
				t.push(`You know it probably won't take today, but you've already ordered ${V.assistant.name} to discontinue ${his2} contraceptive regimen, and you'll be repeating this ritual all week. ${He2}'s bound to end up pregnant.`);
			} else {
				t.push(`You won't know if it's taken right away, but you'll be repeating this ritual all week, so ${he2}'s <span class="pregnant">going to end up pregnant.</span>`);
			}
			t.toParagraph();

			dau.devotion += 2;
			dau.trust += 5;
			t.push(`${dau.slaveName} is <span class="devotion inc">excited</span> to have a sibling on the way and <span class="trust inc">grateful</span> that you fulfilled ${his} request,`);
			if (disobedient) {
				mom.devotion -= 4;
				mom.trust -= 4;
				t.push(`but ${mom.slaveName} <span class="devotion dec">hates that it's yours</span> and is <span class="trust dec">terrified</span> of your control over ${his2} body.`);
			} else if (mom.devotion > 50 || mom.fetish === "pregnancy") {
				mom.devotion += 4;
				t.push(`and ${mom.slaveName} is <span class="devotion inc">even more excited</span> that ${he2} gets to carry it.`);
			} else {
				mom.devotion += 1;
				mom.trust -= 1;
				t.push(`and while ${mom.slaveName} fears your arbitrary control of ${his2} body, ${he2} feels closer to you because ${he2}'s carrying the child that ${dau.slaveName} wanted so badly.`);
			}
			t.toParagraph();

			return t.container();
		}

		function impregDau() {
			const t = new SpacedTextAccumulator();

			t.push(`You pause for a moment. You could, of course, grant ${his} request, but you have a better idea. You inform ${him} that ${he}'ll soon have a daughter of ${his} own, so ${he} won't be needing a baby sister.`);
			if (dau.intelligence + dau.intelligenceImplant > 50) {
				t.push(`${He}'s a sharp slave, and immediately grasps your meaning. ${He}`);
			} else {
				t.push(`It takes ${him} a couple of seconds before ${he} grasps your meaning. When ${he} does, ${he}`);
			}
			t.push(`grins and ${hasBothArms(dau) ? `clasps ${his} hands in front of ${himself}, bouncing` : `bounces`} eagerly.`);
			t.push(Spoken(dau, `"Oh, that's even better, ${Master}! Can we do it now?"`));
			t.toParagraph();

			fuckDau(t);

			if (dau.preg === -1) {
				t.push(`You know it probably won't take today, but you've already ordered ${V.assistant.name} to discontinue ${his} contraceptive regimen, and you'll be repeating this ritual all week. ${He}'s bound to end up pregnant.`);
			} else {
				t.push(`You won't know if it's taken right away, but you'll be repeating this ritual all week, so ${he}'s <span class="pregnant">going to end up pregnant.</span>`);
			}
			t.toParagraph();

			dau.devotion += 5;
			dau.trust += 5;
			t.push(`${dau.slaveName} is overjoyed to be carrying a child, and grateful that you understood the heart of ${his} request, even if you didn't fulfil it exactly the way ${he} was originally hoping.`);
			if (dau.fetish === "pregnancy") {
				if (!dau.fetishKnown) {
					t.push(`In fact, ${he}'s <em>so</em> excited that you've begun to understand ${his} sexuality better; ${he}'s a <span class="fetish gain">pregnancy fetishist!</span>`);
					dau.fetishKnown = 1;
					if (dau.fetishStrength < 90) {
						dau.fetishStrength += 10;
					}
				} else if (dau.fetishStrength < 90) {
					t.push(`${His} pregnancy fetish <span class="fetish inc">has strengthened</span> since you put a new baby in ${him}.`);
					dau.fetishStrength += 10;
				}
			} else if (fetishChangeChance(dau) > jsRandom(0, 100)) {
				t.push(`This week has a lasting impact on ${dau.slaveName}; ${he} starts to develop an ongoing <span class="fetish gain">pregnancy fetish.</span>`);
				dau.fetish = "pregnancy";
				dau.fetishKnown = 1;
				dau.fetishStrength = 20;
			}
			t.toParagraph();

			return t.container();
		}

		function impregBoth() {
			const t = new SpacedTextAccumulator();

			/* Por qué no los dos? */

			t.push(`You explain to ${dau.slaveName} that you're more than willing to get ${mom.slaveName} pregnant, but you want ${him} to carry a child for you as well. ${He} grins and ${hasBothArms(dau) ? `clasps ${his} hands in front of ${himself}, bouncing` : `bounces`} eagerly.`);
			t.push(Spoken(dau, `"When can we start, ${Master}?"`));
			t.push(`You spend a few moments letting ${him} know what you expect from ${him} during the upcoming session; ${he} knows what's coming, but ${his} mother doesn't yet.`);
			t.toParagraph();

			const disobedient = (disobedience(mom) > random(0, 100));
			fuckMom(t, disobedient);

			if (!disobedient) {
				t.push(`You decide to let ${mom.slaveName} watch while you impregnate ${his2} ${daughter}.`);
				if (mom.devotion > 50 || mom.energy > 80) {
					t.push(`${He2} sits up a bit, beginning to lazily masturbate as you get to work.`);
				}
			} else {
				t.push(`You order ${mom.slaveName} to stay and watch while you impregnate ${his2} ${daughter}.`);
			}
			t.toParagraph();

			fuckDau(t);

			if (dau.preg === -1 || mom.preg === -1) {
				t.push(`You've already ordered ${V.assistant.name} to discontinue their contraceptive regimens, and you're`);
			} else {
				t.push(`You won't know if they've taken right away, but you're`);
			}
			t.push(`sure that repeating this ritual all week will result in <span class="pregnant">both of them getting pregnant</span> with your children.`);
			t.toParagraph();

			dau.devotion += 2;
			dau.trust += 5;
			t.push(`${dau.slaveName} is <span class="devotion inc">excited</span> to have both a sibling and a child on the way and <span class="trust inc">grateful</span> that you fulfilled ${his} request,`);
			if (disobedient) {
				mom.devotion -= 5;
				mom.trust -= 8;
				t.push(`but ${mom.slaveName} hates that you're the father of both children and is terrified of your control over ${his2} and ${his2} ${daughter}'s bodies.`);
			} else if (mom.devotion > 50 || mom.fetish === "pregnancy") {
				mom.devotion += 4;
				mom.trust += 2;
				t.push(`while ${mom.slaveName} is just as excited about ${his2} upcoming child and grandchild, and hopes and trusts you'll allow ${him2} to provide good advice for ${his2} pregnant ${daughter}.`);
			} else {
				mom.trust -= 4;
				t.push(`but ${mom.slaveName} <span class="trust dec">fears your arbitrary control</span> of ${his2} and ${his2} ${daughter}'s bodies.`);
			}
			t.toParagraph();

			return t.container();
		}

		function decline() {
			dau.trust += 2;
			return [`You tell ${dau.slaveName} that you're satisfied with ${his} service for you as an only child, and you aren't going to knock up ${mom.slaveName}${dau.father === -1 ? " again" : ""} just to make a sibling for ${him}. Like the good slave ${he} is, ${he} accepts your decision and appreciates your attention.`];
		}
	}
};


code:
App.Events.RESlaveMarriage = class RESlaveMarriage extends App.Events.BaseEvent {
	actorPrerequisites() {
		return[[
			(s) => s.fetish !== "mindbroken",
			hasAnyArms,
			canMove,
			(s) => s.relationship === 4,
			(s) => s.devotion > 20,
			(s) => s.trust > 20,
		]];
	}

	execute(node) {
		const r = [];

		const groomSlave = getSlave(this.actors[0]);
		const brideSlave = getSlave(groomSlave.relationshipTarget);

		const {
			He, His,
			he, his, him
		} = getPronouns(groomSlave);
		const {title: Master} = getEnunciation(groomSlave);

		const {
			He2, His2,
			he2, his2, him2
		} = getPronouns(brideSlave).appendSuffix("2");

		App.Events.drawEventArt(node, [groomSlave, brideSlave]);

		r.push(
			App.UI.DOM.slaveDescriptionDialog(groomSlave),
			`and`,
			App.UI.DOM.slaveDescriptionDialog(brideSlave),
			`come into your office`
		);
		if (hasAnyArms(groomSlave) && hasAnyArms(brideSlave)) {
			r.push(`holding hands.`);
		} else {
			r.push(`doing their best to stay close to one another despite their physical limitations.`);
		}
		r.push(`${brideSlave.slaveName} looks at ${groomSlave.slaveName} expectantly, but ${he}'s terribly nervous and makes several false starts before beginning. Finally ${groomSlave.slaveName} musters ${his} courage and`);
		if (canTalk(groomSlave)) {
			r.push(
				`asks with ${his} voice cracking,`,
				Spoken(groomSlave, `"${Master}, would you please grant us a slave marriage?"`)
			);
		} else {
			r.push(`asks you with simple gestures to grant the two of them a slave marriage.`);
		}

		App.Events.addParagraph(node, r);

		const choices = [];
		choices.push(new App.Events.Result(`Of course`, yes));
		choices.push(new App.Events.Result(`No`, no));
		App.Events.addResponses(node, choices);

		function yes() {
			const frag = new DocumentFragment();
			let r = [];
			r.push(`You inquire as to whether they understand the Free Cities slave marriage ceremony, and they nod, not trusting themselves to do anything more. You give them a few minutes to get dressed in special outfits you make available. When they come back, they're wearing lacy lingerie designed to resemble old world wedding dresses, but without concealing anything.`);

			App.Events.addParagraph(frag, r);
			r = [];
			if (groomSlave.vagina === 0) {
				r.push(`${groomSlave.slaveName} is a virgin, so ${he}'s wearing white`);
			} else if (groomSlave.pregKnown === 1) {
				r.push(`${groomSlave.slaveName} is pregnant, so ${he}'s wearing light pink`);
			} else if (groomSlave.vagina < 0) {
				r.push(`${groomSlave.slaveName} is a sissy slave, so ${he}'s wearing light blue`);
			} else {
				r.push(`${groomSlave.slaveName} is an experienced sex slave, so ${he}'s wearing light pink`);
			}
			r.push(`against ${his} ${groomSlave.skin} skin.`);
			if (groomSlave.chastityPenis) {
				r.push(`${He} has a little bow on ${his} chastity cage.`);
			} else if (canAchieveErection(groomSlave)) {
				r.push(`The`);
				if (canSee(groomSlave)) {
					r.push(`sight of ${brideSlave.slaveName}`);
				} else {
					r.push(`anticipation`);
				}
				r.push(`has ${him} stiffly erect, and ${he}'s wearing a little bow around ${his} cockhead.`);
			} else if (groomSlave.dick > 0) {
				r.push(`${He}'s impotent, but ${he}'s wearing a little bow around ${his} useless cockhead.`);
			} else if (groomSlave.clit > 0) {
				r.push(`${His} prominent clit is engorged, and ${he}'s wearing a tiny bow on it.`);
			} else {
				r.push(`${He}'s wearing a demure little bow just over ${his} pussy.`);
			}
			if (groomSlave.anus > 1) {
				r.push(`${His} lacy panties are designed to spread ${his} buttocks a little and display ${his} big butthole.`);
			} else if (groomSlave.anus === 0) {
				r.push(`${His} lacy panties cover ${his} virgin anus, for once.`);
			}
			if (groomSlave.boobs > 1000) {
				r.push(`The bra makes no attempt to cover or even support ${his} huge breasts, simply letting them through holes in the lace to jut proudly out.`);
			} else if (groomSlave.boobs > 500) {
				r.push(`The bra supports and presents ${his} big breasts, leaving ${his} stiffening nipples bare.`);
			} else {
				r.push(`The bra supports and presents ${his} breasts, giving ${him} more cleavage than ${he} usually displays.`);
			}
			if (groomSlave.belly >= 1500) {
				r.push(`${His}`);
				if (groomSlave.preg > 0) {
					r.push(`growing pregnancy`);
				} else {
					r.push(`rounded middle`);
				}
				r.push(`prominently bulges from the gap between ${his} lingerie.`);
			}

			App.Events.addParagraph(frag, r);
			r = [];
			if (brideSlave.vagina === 0) {
				r.push(`${brideSlave.slaveName} is a virgin, so ${he2}'s wearing white`);
			} else if (brideSlave.pregKnown === 1) {
				r.push(`${brideSlave.slaveName} is pregnant, so ${he2}'s wearing light pink`);
			} else if (brideSlave.vagina < 0) {
				r.push(`${brideSlave.slaveName} is a sissy slave, so ${he2}'s wearing light blue`);
			} else {
				r.push(`${brideSlave.slaveName} is an experienced sex slave, so ${he2}'s wearing light pink`);
			}
			r.push(`against ${his2} ${brideSlave.skin} skin.`);
			if (brideSlave.chastityPenis) {
				r.push(`${He2} has a little bow on ${his2} chastity cage.`);
			} else if (canAchieveErection(brideSlave)) {
				r.push(`The`);
				if (canSee(brideSlave)) {
					r.push(`sight of ${groomSlave.slaveName}`);
				} else {
					r.push(`anticipation`);
				}
				r.push(`has ${him2} stiffly erect, and ${he2}'s wearing a little bow around ${his2} cockhead.`);
			} else if (brideSlave.dick > 0) {
				r.push(`${He}'s impotent, but ${he2}'s wearing a little bow around ${his2} useless cockhead.`);
			} else if (brideSlave.clit > 0) {
				r.push(`${His2} prominent clit is engorged, and ${he2}'s wearing a tiny bow on it.`);
			} else {
				r.push(`${He2}'s wearing a demure little bow just over ${his2} pussy.`);
			}
			if (brideSlave.anus > 1) {
				r.push(`${His2} lacy panties are designed to spread ${his2} buttocks a little and display ${his2} big butthole.`);
			} else if (brideSlave.anus === 0) {
				r.push(`${His2} lacy panties cover ${his2} virgin anus, for once.`);
			}
			if (brideSlave.boobs > 1000) {
				r.push(`The bra makes no attempt to cover or even support ${his2} huge breasts, simply letting them through holes in the lace to jut proudly out.`);
			} else if (brideSlave.boobs > 500) {
				r.push(`The bra supports and presents ${his2} big breasts, leaving ${his2} stiffening nipples bare.`);
			} else {
				r.push(`The bra supports and presents ${his2} breasts, giving ${him2} more cleavage than ${he2} usually displays.`);
			}
			if (brideSlave.belly >= 1500) {
				r.push(`${His2}`);
				if (brideSlave.preg > 0) {
					r.push(`growing pregnancy`);
				} else {
					r.push(`rounded middle`);
				}
				r.push(`prominently bulges from the gap between ${his2} lingerie.`);
			}

			App.Events.addParagraph(frag, r);
			r = [];
			r.push(`The procedure is simple. The two of them prostrate themselves on the ground and beg your indulgence. You state that you grant it, and hand each of them a simple gold band to be worn on the little finger in advertisement of the inferiority of their union. In turn, each of them gives the other their ring, and they kiss. You pronounce them slave spouses, and offer them the couch for their honeymoon; they thank you profusely through their building tears. It's always touching to see`);
			if (groomSlave.bellyPreg >= 5000 && brideSlave.bellyPreg >= 5000) {
				r.push(`two pregnant slaves`);
				if (hasAnyArms(brideSlave) && hasAnyArms(groomSlave)) {
					r.push(`fingering`);
				} else {
					r.push(`fucking`);
				}
				r.push(`each other`);
			} else {
				r.push(`a 69`);
			}
			r.push(`in which both participants are <span class="devotion inc">softly crying with happiness.</span>`);
			if (groomSlave.pregSource === brideSlave.ID && brideSlave.pregSource === groomSlave.ID) {
				r.push(`When ${groomSlave.slaveName} and ${brideSlave.slaveName} tire, they rest, shoulder to shoulder, with a hand upon each other's bulging belly. Gently, they caress their growing pregnancies, knowing that they carry the other's love child.`);
			} else if (brideSlave.pregSource === groomSlave.ID) {
				r.push(`When they tire, ${groomSlave.slaveName} rests ${his} head upon ${brideSlave.slaveName}'s lap and gently kisses ${his} lover's belly, knowing the child of their love is growing within.`);
			} else if (groomSlave.pregSource === brideSlave.ID) {
				r.push(`When they tire, ${brideSlave.slaveName} rests ${his2} head upon ${groomSlave.slaveName}'s lap and gently kisses ${his2} lover's belly, knowing the child of their love is growing within.`);
			}
			SimpleSexAct.Slaves(groomSlave, brideSlave);
			SimpleSexAct.Slaves(brideSlave, groomSlave);
			groomSlave.devotion += 4;
			brideSlave.devotion += 4;
			groomSlave.trust += 4;
			brideSlave.trust += 4;
			groomSlave.relationship = 5;
			brideSlave.relationship = 5;

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

		function no() {
			return `You decline gently, telling them that their relationship is acceptable to you as it is. They are disappointed, but not surprised, and accept your will without a murmur. They leave as they entered, holding hands.`;
		}
	}
};


code:
App.Events.RESnatchAndGrabFollowup = class RESnatchAndGrabFollowup extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => V.eventResults.snatch === 2,
			() => V.geneticMappingUpgrade === 2,
			() => V.cash > V.surgeryCost * 4
		];
	}

	actorPrerequisites() {
		return [[
			(s) => s.origin === "$He is your share of a raid on an illegal laboratory by your mercenaries.",
			(s) => s.newGamePlus === 0,
			(s) => s.health.condition > 25,
			(s) => s.devotion > 50,
			(s) => s.fetish !== "mindbroken"
		]];
	}

	get weight() { /* only one slave ever qualifies, so give it a bit more weight */
		return 3;
	}

	execute(node) {
		let r = [];

		V.eventResults.snatch = 3;

		const snatched = getSlave(this.actors[0]);
		const {
			He,
			he, his, him
		} = getPronouns(snatched);
		App.Events.drawEventArt(node, snatched, "no clothing");

		r.push(
			App.UI.DOM.slaveDescriptionDialog(snatched),
			`is next on your inspection schedule this morning, and you've finished with the previous slave more quickly than expected, so you find yourself thinking about the circumstances of ${his} acquisition.`
		);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`The laboratory ${he} was recovered from was performing illegal genetic experiments... something with which you now also have some personal experience. It occurs to you that there might be something interesting left unexplored in ${his} genome, so when ${he} arrives, you inform ${him} that you're going to the surgery together.`);
		if (snatched.trust < 50) {
			r.push(`Worried, ${he}`);
			if (!canTalk(snatched)) {
				r.push(`wordlessly`);
			}
			r.push(`asks whether something is wrong, and you fill ${him} in on your thoughts.`);
		} else {
			r.push(`Although ${he} immediately and unquestioningly complies, you occupy a few free moments to fill ${him} in on your thoughts.`);
		}
		if (snatched.behavioralFlaw === "odd") {
			r.push(`${He} has always acted a bit odd, and today ${he} is pretending to play an air harmonica as you`);
			if (canWalk(snatched)) {
				r.push(`walk`);
			} else {
				r.push(`travel`);
			}
			r.push(`together.`);
		} else if (snatched.behavioralQuirk === "funny") {
			r.push(`${He} acted quite odd when you first acquired ${him}, but`);
			if (canWalk(snatched)) {
				r.push(`walking`);
			} else {
				r.push(`traveling`);
			}
			r.push(`with ${him} now, you find that ${he}'s actually very funny.`);
		} else {
			r.push(`${He} acted quite odd when you first acquired ${him}, but you note with some pride that ${he} has learned to behave more normally during ${his} time with you.`);
		}
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`After spending some time prowling around ${his} genome in your genetic sequencer, you find one particularly interesting sequence. ${He} has a unique sequence of genes in a chromosomal region which significantly increases ${his} cognitive ability, but it's only partially activated. You could, with a little bit of time, either completely activate it, or deactivate it entirely, with corresponding dramatic effects on ${his} intelligence. However, such therapy is not free, and the remote surgery software warns that rapid changes to cognition may cause significant changes in behavior.`);
		App.Events.addParagraph(node, r);

		const surgeryCost = V.surgeryCost * 4;
		const choices = [];
		choices.push(new App.Events.Result(`Finish activating the sequence`, finish, `This will cost ${cashFormat(surgeryCost)}`));
		choices.push(new App.Events.Result(`Completely deactivate the sequence`, deactivate, `This will cost ${cashFormat(surgeryCost)}`));
		choices.push(new App.Events.Result(`Let it be`, ignore));
		App.Events.addResponses(node, choices);

		function flawBreak() {
			if (snatched.behavioralQuirk === "none") {
				if (snatched.behavioralFlaw === "odd") {
					snatched.behavioralFlaw = "none";
				}
				snatched.behavioralQuirk = "funny";
				return `Over the next few weeks, you also begin to notice some significant changes in behavior. ${snatched.slaveName} is now <span class="flaw break">funny.</span>`;
			} else if (snatched.sexualQuirk === "none") {
				if (snatched.sexualFlaw === "repressed") {
					snatched.sexualFlaw = "none";
				}
				snatched.sexualQuirk = "perverted";
				return `Over the next few weeks, you also begin to notice some significant changes in behavior. Although ${snatched.slaveName} has always been remarkably horny, ${he} has become much more perverted.`;
			}
		}

		function finish() {
			const r = new SpacedTextAccumulator();
			cashX(forceNeg(surgeryCost), "slaveSurgery", snatched);
			surgeryDamage(snatched, 40);
			snatched.chem += 100;
			snatched.intelligence += Math.min(25, 100 - snatched.intelligence);
			r.push(`The procedure spans the week, with ${him} spending every other day in the surgery room for a series of four sets of injections. A few hours after each session, ${he} feels terribly ill. The process involves`);
			if (V.PC.skill.medicine >= 100) {
				r.push(`you`);
			} else {
				r.push(`the remote surgeon`);
			}
			r.push(`injecting the serum across ${his} entire body, every few`);
			if (V.showInches === 2) {
				r.push(`inches,`);
			} else {
				r.push(`centimeters,`);
			}
			r.push(`leaving small needle marks that fade out within minutes. Despite not leaving lasting evidence, the process is very invasive work, and leaves ${him} feeling weak and tired. Gradually, though, you begin to notice a marked increase in ${his} cognitive function.`);
			r.toParagraph();

			const broken = flawBreak();
			if (broken) {
				r.push(broken);
				r.toParagraph();
			}

			return r.container();
		}

		function deactivate() {
			const r = new SpacedTextAccumulator();
			cashX(forceNeg(V.surgeryCost * 4), "slaveSurgery", snatched);
			surgeryDamage(snatched, 40);
			snatched.chem += 100;
			snatched.intelligence -= Math.min(25, 100 + snatched.intelligence);
			r.push(`The procedure spans the week, with ${him} spending every other day in the surgery room for a series of four sets of injections. A few hours after each session, ${he} feels terribly ill. The process involves`);
			if (V.PC.skill.medicine >= 100) {
				r.push(`you`);
			} else {
				r.push(`the remote surgeon`);
			}
			r.push(`injecting the serum across ${his} entire body, every few`);
			if (V.showInches === 2) {
				r.push(`inches,`);
			} else {
				r.push(`centimeters,`);
			}
			r.push(`leaving small needle marks that fade out within minutes. Despite not leaving lasting evidence, the process is very invasive work, and leaves ${him} feeling weak and tired. Gradually, though, you begin to notice a marked decline in ${his} cognitive function.`);
			r.toParagraph();

			const broken = flawBreak();
			if (broken) {
				r.push(broken);
				r.toParagraph();
			}

			return r.container();
		}

		function ignore() {
			return `You file your findings, and within a few days, both you and ${snatched.slaveName} have forgotten all about them.`;
		}
	}
};