code:
App.Events.REFullBed = class REFullBed extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => fuckSlavesLength() >= 2,
		];
	}

	actorPrerequisites() {
		const req = [
			s => s.devotion > 50,
			s => s.fuckdoll === 0,
			s => ["please you", "serve in the master suite", "be your Concubine"].includes(s.assignment),
			s => s.rules.release.master === 1,
			canMove,
		];

		return [
			req,
			req,
		];
	}

	execute(node) {
		let bedSlaves = this.actors.map(getSlave);

		const {
			He, he, his, him, girl
		} = getPronouns(bedSlaves[0]);

		const {
			He2, he2, his2, him2
		} = getPronouns(bedSlaves[1]).appendSuffix('2');

		let virgin0 = (bedSlaves[0].mpreg === 1 && bedSlaves[0].anus === 0) || (bedSlaves[0].mpreg === 0 && bedSlaves[0].vagina === 0);
		let virgin1 = (bedSlaves[1].mpreg === 1 && bedSlaves[1].anus === 0) || (bedSlaves[1].mpreg === 0 && bedSlaves[1].vagina === 0);

		App.Events.drawEventArt(node, bedSlaves.slice(0, 2), "no clothing");

		let t = [
			`You have the luxury of being attended to by a coterie of devoted sex slaves. Tonight, ${bedSlaves[0].slaveName} and ${contextualIntro(bedSlaves[0], bedSlaves[1])} are with you when it's time for bed, so they strip naked and climb under the sheets with you, one on either side. They snuggle in under both of your arms so that each can rest their head on your shoulder,`
		];
		if (hasAnyArms(bedSlaves[0]) && hasAnyArms(bedSlaves[1])) {
			if (V.PC.boobs > 1000) {
				t.push(`a hand under your breast,`);
			} else if (V.PC.boobs > 500) {
				t.push(`a hand beneath your breast,`);
			} else {
				t.push(`a hand on your chest,`);
			}
		}
		if (bedSlaves[1].boobs > 300 && bedSlaves[0].boobs > 300) {
			t.push(`their breasts against your flank,`);
		}
		if (bedSlaves[1].belly > 5000 && bedSlaves[0].belly > 5000) {
			t.push(`their swollen bellies against yours,`);
		} else if (bedSlaves[1].weight > 95 && bedSlaves[0].weight > 95) {
			t.push(`their soft bellies against yours,`);
		}
		t.push(`and the warmth between their legs against your hip.`);
		App.Events.addParagraph(node, t);

		t = [
			`Today was an unusually relaxing day, and you aren't particularly tired.`,
		];
		App.Events.addParagraph(node, t);

		App.Events.addResponses(node, [
			new App.Events.Result("Take a slave in each hand", eachhand),
			(bedSlaves[0].bellyPreg >= 5000 && bedSlaves[1].bellyPreg >= 5000 && V.PC.dick !== 0) ? new App.Events.Result("Fondle their pregnancies", fondlepreg) : new App.Events.Result(),
			(canImpreg(bedSlaves[0], V.PC) && canImpreg(bedSlaves[1], V.PC)) ? new App.Events.Result("Tire yourself out with some babymaking", babymaking, fuckNote()) : new App.Events.Result(),
			new App.Events.Result("Pull up the sheets and wrestle", pullsheets),
		]);

		function eachhand() {
			const frag = document.createDocumentFragment();

			let t = [
				`With each of your arms around a slave, you begin to run your hands across their bodies. They snuggle closer to you, their nipples growing hard and their hips grinding against you. As your grasp runs lower and lower, cupping and massaging their buttocks, they begin to kiss the`
			];
			if (V.PC.boobs > 300) {
				t.push(`breasts`);
			} else {
				t.push(`chest`);
			}
			t.push(`against which their adoring faces are pressed, and reach down`);
			if (V.PC.dick !== 0 && V.PC.vagina !== -1) {
				t.push(`towards your cock and cunt.`);
			} else if (V.PC.vagina !== -1) {
				t.push(`to your pussy.`);
			} else if (V.PC.dick !== 0) {
				t.push(`for your member.`);
			} else if (V.PC.scrotum !== 0) {
				t.push(`for your balls.`);
			} else {
				t.push(`towards your smooth crotch.`);
			}
			t.push(`The more manually skilled begins to give you a gentle stroke, while the other softly massages your`);
			if (V.PC.scrotum > 0) {
				t.push(`testicles`);
			} else {
				t.push(`mons`);
			}
			if (canDoVaginal(bedSlaves[1]) && canDoVaginal(bedSlaves[0]) && ((bedSlaves[0].vagina > 0 && bedSlaves[1].vagina > 0) || (bedSlaves[0].clit > 0 && bedSlaves[1].clit > 0))) {
				if (bedSlaves[0].vagina > 0 && bedSlaves[1].vagina > 0) {
					t.push(`They stiffen in unison when you slip two fingers into each pussy, but immediately relax and begin to work you harder. They orgasm one after the other, their passages clenching against your intruding fingers, and then eagerly clean`);
				} else {
					t.push(`They stiffen in unison when you pinch each clit, but immediately relax and begin to work you harder. They orgasm one after the other from your manipulations, before eagerly cleaning`);
				}
				actX(bedSlaves[0], "vaginal");
				actX(bedSlaves[1], "vaginal");
			} else if (canDoAnal(bedSlaves[1]) && canDoAnal(bedSlaves[0])) {
				t.push(`They stiffen in unison when you hook two fingers up each asshole, but immediately relax and begin to work you harder. They orgasm one after the other, their butts clenching against your intruding fingers, and then eagerly clean`);
				actX(bedSlaves[0], "anal");
				actX(bedSlaves[1], "anal");
			} else if (bedSlaves[1].dick > 0 && bedSlaves[1].chastityPenis === 0 && bedSlaves[0].dick > 0 && bedSlaves[0].chastityPenis === 0) {
				t.push(`They stiffen in unison when you take hold of each prick, but immediately relax and begin to work you harder. They cum one after the other from your manipulations, before eagerly cleaning`);
				actX(bedSlaves[0], "penetrative");
				actX(bedSlaves[1], "penetrative");
			} else {
				t.push(`They stiffen as your hands get more adventurous, but immediately relax and begin to work you harder. They orgasm one after the other from your manipulations, before eagerly cleaning`);
				/** @type {FC.SlaveActs} */
				let hole;
				bedSlaves.forEach(s => {
					if (canDoVaginal(s)) {
						hole = "vaginal";
					} else if (canDoAnal(s)) {
						hole = "anal";
					} else if (s.dick > 0 && s.chastityPenis === 0) {
						hole = "penetrative";
					} else {
						hole = "mammary";
					}
					actX(s, hole);
				});
			}
			t.push(`you with their mouths when you climax yourself. They have become <span class="devotion inc">still more devoted to you.</span>`);
			bedSlaves[0].devotion += 4;
			bedSlaves[1].devotion += 4;
			App.Events.addParagraph(frag, t);

			return frag;
		}

		function fondlepreg() {
			const frag = document.createDocumentFragment();

			let t = [
				`With your arms each around a slave, you begin to run your hands across their bodies, focusing your attention on their full pregnancies. They snuggle closer to you, their nipples growing hard and their hips grinding against you. As they move, your rising cock catches between their gravid middles, giving you an idea. Shifting your arms under and around their backs, you pull them together over your erect member and begin using their taut stomachs to pleasure yourself. They quickly catch on and push closer to each other, trapping your dick between them. Once they begin rubbing, and you humping, the skin surrounding you is quickly coated in precum. They smile at you as they feel your penis tense, and with one final thrust you coat their bellies in a layer of cum. They love your discovery of a new way to enjoy their bodies and become even more devoted to you.`
			];

			App.Events.addParagraph(frag, t);
			bedSlaves.forEach(s => (s.devotion += 5));

			return frag;
		}

		function babymaking() {
			const frag = document.createDocumentFragment();

			let t = [
				`Without warning, you roll on top of ${bedSlaves[0].slaveName} and slip your dick right into ${his}`,
			];
			if (bedSlaves[0].mpreg === 1) {
				t.push(`${bedSlaves[0].anus === 0 ? "virgin " : ""}anus.`);
			} else {
				t.push(`${bedSlaves[0].vagina === 0 ? "virgin " : ""}pussy.`);
			}
			t.push(`Once the surprise wears off and the pleasure sets in, ${he} wraps ${his}`);
			if (hasAnyArms(bedSlaves[0])) {
				t.push(`arm${hasBothArms(bedSlaves[0]) ? `s` : ""}`);
			} else {
				t.push(`leg${hasBothLegs(bedSlaves[0]) ? `s` : ""}`);
			}
			t.push(`around you and basks in your attention. Feeling left out, ${bedSlaves[1].slaveName} slides over to tease ${his2} bucking bedmate. Drawing close to the moaning ${girl},`);
			if (hasAnyArms(bedSlaves[1])) {
				t.push(`${he2} reaches for ${his} bouncing tits, only to cop a feel of your cock thrusting deep inside ${him}.`);
			} else {
				t.push(`${he2} pushes towards ${his} bouncing tits, only to feel your cock thrusting deep inside ${him}.`);
			}
			if (canSee(bedSlaves[1])) {
				t.push(`${He2} watches, eyes wide with lust,`);
			} else {
				t.push(`${He2} pauses, mouth agape with lust,`);
			}
			t.push(`as the bulge of your penis pistons beneath ${his} lower belly. You make sure to give ${him2} a show before you cum, thrusting as hard and deep as you can. ${He2} gasps at the`);
			if (canSee(bedSlaves[1])) {
				t.push(`sight`);
			} else {
				t.push(`sensation`);
			}
			if (hasAnyArms(bedSlaves[1])) {
				t.push(`and brings ${his2} hand`);
			} else {
				t.push(`and brings ${his2} cheek`);
			}
			t.push(`to the lump just in time to feel you ejaculate deep inside ${bedSlaves[0].slaveName}.`);
			if (V.PC.balls >= 30) {
				t.push(`${He2} ${bedSlaves[1].voice !== 0 ? "squeaks" : "gasps"} in shock as ${he2} feels ${bedSlaves[0].slaveName}'s belly swell under ${his2} ${hasAnyArms(bedSlaves[1]) ? "hand" : "face"} with your massive load.`);
				if (hasBothArms(bedSlaves[1])) {
					t.push(`${He2} quickly brings ${his2} other hand to massage it as the orgasming cumballoon squirms in pleasure.`);
				} else {
					t.push(`${He2} nuzzles it as the orgasming cumballoon squirms in pleasure.`);
				}
			} else if (V.PC.balls >= 14) {
				t.push(`${He2} ${bedSlaves[1].voice !== 0 ? "squeaks" : "gasps"} in surprise as ${he2} feels ${bedSlaves[0].slaveName}'s belly swell slightly under ${his2} ${hasAnyArms(bedSlaves[1]) ? "hand" : "face"} with your huge load.`);
			} else if (V.PC.balls >= 9) {
				t.push(`${He2}'s amazed by how big the load felt under ${his2} ${hasAnyArms(bedSlaves[1]) ? "hand" : "face"}.`);
			}
			t.push(`You`);
			if (canSee(bedSlaves[1])) {
				t.push(`beckon ${him2} to lie`);
			} else if (canHear(bedSlaves[1])) {
				t.push(`order ${him2} to lie`);
			} else {
				t.push(`push ${him2}`);
			}
			t.push(`down next to exhausted ${girl} and spread ${his2} leg${hasBothLegs(bedSlaves[1]) ? `s` : ""} for ${his2} seeding. As you take ${him2}, ${bedSlaves[0].slaveName} leans over and pulls ${him2} into a deep kiss. You make sure to not blow your next load too quickly, instead savoring the sight of your soon-to-be-mothers making out, but you can only hold out so long before you paint the depths of ${bedSlaves[1].slaveName}'s`);
			if (bedSlaves[1].mpreg === 1) {
				t.push(`${bedSlaves[1].anus === 0 ? "once virgin " : ""}anus`);
			} else {
				t.push(`${bedSlaves[1].vagina === 0 ? "once virgin " : ""}pussy`);
			}
			t.push(`with your potent baby`);
			if (V.PC.balls >= 30) {
				t.push(`batter until ${his2} stomach is distended and wobbling with cum.`);
			} else if (V.PC.balls >= 14) {
				t.push(`batter until ${his2} womb is stuffed with seed.`);
			} else {
				t.push(`batter.`);
			}
			t.push(`You switch off with the two of them, fucking them in turn, until both pass out`);
			if (hasAnyArms(bedSlaves[0]) && hasAnyArms(bedSlaves[1])) {
				t.push(`with a hand on`);
			} else {
				t.push(`pressed against`);
			}
			t.push(`the other's`);
			if (V.PC.balls >= 30) {
				t.push(`massively bloated`);
			} else if (V.PC.balls >= 14) {
				t.push(`bloated`);
			} else if (V.PC.balls >= 9) {
				t.push(`swollen`);
			}
			t.push(`belly and cum pooling from their thoroughly seeded holes. You slide back in between them for a well earned`);
			if (V.PC.balls >= 30) {
				t.push(`sleep, their middles resting on your own, their cum stuffed wombs a testament to your virility.`);
			} else if (V.PC.balls >= 14) {
				t.push(`sleep, their middles resting on your own, their cum filled wombs a testament to your virility.`);
			} else {
				t.push(`sleep.`);
			}

			bedSlaves.forEach(s => {
				s.devotion += 3;
				s.trust += 3;
			});

			t.push(`${bedSlaves[0].slaveName} is <span class="devotion inc">honored to bear your children</span> and <span class="trust inc">snuggles even closer.</span>`);
			if (virgin0) {
				t.push(`Your endeavors have <span class="lime">taken ${his} ${bedSlaves[0].mpreg === 1 ? "anal " : ""}virginity.</span> <span class="devotion inc">${He} couldn't be happier.</span>`);
				bedSlaves[0].devotion += 10;
			}
			if (bedSlaves[0].mpreg === 1) {
				VCheck.Anal(bedSlaves[0], 3);
			} else {
				VCheck.Vaginal(bedSlaves[0], 3);
			}
			knockMeUp(bedSlaves[0], 100, bedSlaves[0].mpreg, -1);

			t.push(`${bedSlaves[1].slaveName} is <span class="devotion inc">thrilled to carry your child</span> and <span class="trust inc">happily embraces the gift inside ${him2}.</span>`);
			if (virgin1) {
				t.push(`Your endeavors have <span class="lime">taken ${his} ${bedSlaves[1].mpreg === 1 ? "anal " : ""}virginity.</span> <span class="devotion inc">${He} couldn't be happier.</span>`);
				bedSlaves[1].devotion += 10;
			}
			if (bedSlaves[1].mpreg === 1) {
				VCheck.Anal(bedSlaves[1], 3);
			} else {
				VCheck.Vaginal(bedSlaves[1], 3);
			}
			knockMeUp(bedSlaves[1], 100, bedSlaves[1].mpreg, -1);

			App.Events.addParagraph(frag, t);

			return frag;
		}

		function fuckNote() {
			if (virgin0 || virgin1) {
				return `This option will break in any fertile holes`;
			}
			return null;
		}

		function pullsheets() {
			const frag = document.createDocumentFragment();

			let t = [
				`Without warning, you jerk the sheets all the way up and pin them at the head of the bed. They giggle as you seize first the one and then the other, groping and tickling. ${bedSlaves[1].slaveName} and ${bedSlaves[0].slaveName} catch the spirit of fun, and rove around in the soft darkness under the sheets. You're`
			];
			if (V.PC.dick !== 0) {
				t.push(`rock hard`);
				if (V.PC.vagina !== 0) {
					t.push(`and`);
				}
			}
			if (V.PC.vagina !== -1) {
				t.push(`soaking wet`);
			}
			t.push(`in no time, wrestling with two naked slaves, and begin to fuck the first one you can grab and hold. When you`);
			if (V.PC.dick === 0) {
				t.push(`finish with ${him},`);
			} else {
				t.push(`come inside ${him},`);
			}
			t.push(`you`);
			if (canWalk(bedSlaves[0])) {
				t.push(`release ${him} and ${he} slides out of bed to wash; by the time ${he} gets back under the sheets, clean and fresh, you're on the point of fucking`);
			} else {
				t.push(`shoulder ${his} helpless body out of bed to the washroom; by the time ${he} crawls back under the sheets, clean and fresh, you're on the point of fucking`);
			}
			t.push(`the other. You switch off with the two of them, fucking them in turn, until everyone falls asleep in an exhausted pile. They have become <span class="trust inc">still more trusting of you.</span>`);

			bedSlaves.forEach(s => {
				s.trust += 4;
				SimpleSexAct.Player(s, 3);
			});

			App.Events.addParagraph(frag, t);

			return frag;
		}
	}
};


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

	actorPrerequisites() {
		return [[
			(s) => s.ID !== V.HeadGirlID,
			(s) => s.rules.speech !== "restrictive",
			(s) => s.trust > 75,
			(s) => s.devotion > 50,
			(s) => s.vagina > 0,
			(s) => s.intelligence + s.intelligenceImplant >= S.HeadGirl.intelligence + S.HeadGirl.intelligenceImplant,
			(s) => s.skill.vaginal > S.HeadGirl.skill.vaginal,
			(s) => s.assignment !== Job.QUARTER,
			(s) => s.fetish !== "mindbroken",
			canSee,
			canHear,
			canWalk,
			hasAnyArms,
			canTalk,
			(s) => canDoVaginal(s) || (s.dick > 0 && s.chastityPenis === 0)
		]];
	}

	get weight() {
		return (V.rep-10000 > random(1, 10000)) ? 1 : 0;
	}

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

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

		const {
			He, His,
			he, his, him, girl
		} = getPronouns(slave);
		const {say, title:Master} = getEnunciation(slave);
		const {
			He2,
			he2, him2, his2, himself2, wife2,
		} = getPronouns(S.HeadGirl).appendSuffix("2");
		const {say:say2} = getEnunciation(S.HeadGirl);

		r.push(`There's a constant traffic of slaves in and out of your office as your chattel comes in and out for instructions, inspections, and sex. Your Head Girl ${S.HeadGirl.slaveName} is one of the most frequent visitors, since although you trust ${him2}, ${he2}'s still a slave and has to check with you before acting on some matters.`);
		if (S.HeadGirl.relationship === -3) {
			r.push(`(${He2}'s also your ${wife2}, making ${his2} visits a pleasant diversion.)`);
		} else if (V.arcologies[0].FSEgyptianRevivalistLaw === 1) {
			r.push(`(${He2}'s also your Consort, making ${his2} visits a pleasant diversion.)`);
		}
		r.push(
			`During one of ${his2} visits,`,
			contextualIntro(S.HeadGirl, slave, true),
			`happens to come in for ${his} scheduled inspection. ${He} perches politely on the couch, waiting ${his} turn like a good ${girl}. ${His} ${App.Desc.eyesColor(slave)} are watchful, however, and ${he} seems to be paying very close attention to your conversation with your Head Girl.`
		);

		r.push(
			`When ${S.HeadGirl.slaveName} leaves, ${he} clears ${his} throat nervously. ${He} gathers ${his} courage, and ${say}s,`,
			Spoken(slave, `"${Master}, I think I would make a better Head Girl than ${him}."`),
			`${He} takes a deep breath and plunges on.`,
			Spoken(slave, `"I'm just as smart as ${he2} is. And, ${Master}, I'm sure you've noticed ${he2} isn't very good at teaching other girls vaginal skills.`)
		);
		if (S.HeadGirl.vagina > 0) {
			r.push(Spoken(slave, `I could do it much better than ${he2} does,`));
		} else if (S.HeadGirl.vagina === 0) {
			r.push(Spoken(slave, `How could ${he2} be? ${He2}'s a virgin! I can manage it,`));
		} else {
			r.push(Spoken(slave, `How could ${he2} be? ${He2} doesn't have a pussy! I can manage it,`));
		}

		r.push(
			Spoken(slave, `${Master}. Please, give me a try."`),
			`${He} goes on like this for a while, slowly degenerating into repetition of ${his} points as your failure to give ${him} an immediate positive or negative response starts to worry ${him}.`
		);

		App.Events.addParagraph(node, r);

		const choices = [];
		choices.push(new App.Events.Result(`${He}'s right`, yes));
		choices.push(new App.Events.Result(`Pretend you didn't hear ${him}`, ignore));
		choices.push(new App.Events.Result(`Let your Head Girl sort this out however ${he2} sees fit`, tattle));
		App.Events.addResponses(node, choices);

		function yes() {
			const frag = new DocumentFragment();
			let r = [];
			r.push(`After giving the matter some consideration, you agree, instructing ${V.assistant.name} that ${slave.slaveName} is now the Head Girl. ${slave.slaveName} is overjoyed, and bounces to ${his} feet, clearly very eager to begin. You caution ${him} that ${he} is not to undermine ${S.HeadGirl.slaveName} by letting anyone know why you decided to change Head Girls. ${He} nods obediently. As far as ${S.HeadGirl.slaveName} knows, it's just a standard change of Head Girls, and ${he2}'s too good a slave to let it affect ${him2} seriously.`);
			slave.devotion += 5;
			assignJob(slave, Job.HEADGIRL); // should we be removing the old HG here?
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function ignore() {
			const frag = new DocumentFragment();
			let r = [];
			r.push(
				`You pretend you didn't hear ${him}, and go about your business. ${He} quickly catches on, and shuts ${his} mouth, sitting stiffly on the couch and waiting for you to say something. After letting ${him} wait for a good long while, you steeple your fingers and look over them at ${him}. ${He} quails at your gaze, but does not look away from you. You tell ${him} that, for ${his} general information, you prefer to make decisions about what slaves do which job yourself, and are not interested in input from the slaves themselves on the matter. You continue to observe that if any slave were to offer input, ${he} might suggest to you that ${he} thought ${his} own judgment superior to yours. Then, you dismiss ${him}.`,
				Spoken(slave, `"Yes ${Master}, thank you, ${Master},"`),
				`${he} ${say}s, and flees.`
			);
			slave.trust -= 4;
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function tattle() {
			const frag = new DocumentFragment();
			let r = [];
			r.push(`You page ${S.HeadGirl.slaveName}, telling ${him2} to get back up to your office. ${slave.slaveName} hears you, of course, and stiffens with fear. ${He} knows ${he}'s in trouble, but ${he} doesn't yet know how much. You tell ${S.HeadGirl.slaveName} to have a seat next to ${slave.slaveName} on the couch, and instruct ${V.assistant.name} to replay the last five minutes of the feeds from your office on a wallscreen. ${slave.slaveName}'s`);
			if (slave.lips > 40) {
				r.push(`pillowlike`);
			}
			r.push(`lower lip begins to tremble at this, and ${he} can barely manage to keep ${his} gaze on the fatal replay of ${his} attempt to convince you to replace ${S.HeadGirl.slaveName} with ${him}. ${S.HeadGirl.slaveName}, who is no fool, is not surprised by this, but the replay still angers ${him2}. As it rolls on, ${his2} hand${hasBothArms(S.HeadGirl) ? "s" : ""} begin to roam across ${slave.slaveName}, who winces at ${his2} touch. About halfway through, ${S.HeadGirl.slaveName} looks straight at you and cruelly pinches one of ${slave.slaveName}'s nipples. You respond to the nonverbal question with a silent nod, and ${S.HeadGirl.slaveName} smiles briefly at you. Then, ${he2} sticks ${his2} tongue in ${slave.slaveName}'s ear. The poor slave starts at the warm, wet intrusion, but knows better than to try to resist. ${He} closes ${his} eyes tight.`);

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

			r.push(`${S.HeadGirl.slaveName} hops off the couch, gets down in front of ${his2} victim,`);
			if (slave.belly >= 5000 || slave.weight > 95) {
				r.push(`shoves ${his} legs apart, and buries ${himself2} beneath ${his} belly.`);
			} else {
				r.push(`and shoves ${his} legs apart.`);
			}
			r.push(`${slave.slaveName} scrunches up ${his} face, expecting something agonizing to happen to ${his}`);
			if (canDoVaginal(slave)) {
				r.push(`pussy, but ${S.HeadGirl.slaveName} shocks ${him} by starting to hungrily eat ${him} out.`);
			} else {
				r.push(`cock, but ${S.HeadGirl.slaveName} shocks ${him} by giving ${him} a lush blowjob.`);
			}
			r.push(`${slave.slaveName} clearly expects a trap, but ${S.HeadGirl.slaveName}'s attentions slowly distract ${him}. When ${he}'s on the very verge of orgasm, your Head Girl suddenly stops and`);
			if (canDoVaginal(slave)) {
				r.push(`pinches the ${girl}'s pussylips,`);
			} else {
				r.push(`tugs the ${girl}'s cock downward by its head,`);
			}
			r.push(
				`not painfully, but hard enough to communicate threat. ${slave.slaveName}, shocked out of ${his} pleasure, looks down at ${him2}. ${S.HeadGirl.slaveName} ${say2}s menacingly,`,
				Spoken(S.HeadGirl, `"Bitch, if you orgasm, I'm going to fucking destroy you."`),
				`Then ${he2} goes back to giving ${slave.slaveName} oral. ${slave.slaveName} begins to cry, realizing how comprehensively fucked ${he} is.`
			);
			App.Events.addParagraph(frag, r);
			r = [];
			r.push(`Eventually, ${he} climaxes. ${S.HeadGirl.slaveName} has a talented tongue. ${S.HeadGirl.slaveName} does not begrudge the slave ${his} pleasure,`);
			if (canDoVaginal(slave)) {
				r.push(`tonguing ${his} clit all the way through ${his} orgasm.`);
				seX(slave, "vaginal", S.HeadGirl, "oral");
			} else {
				r.push(`industriously sucking ${his} cock until ${he2}'s swallowed every last drop of cum.`);
				seX(slave, "penetrative", S.HeadGirl, "oral");
			}
			r.push(
				`${He2} stands up and seizes ${slave.slaveName} by the ear, ${say}ing,`,
				Spoken(S.HeadGirl, `"And now, slut, you are fucked."`),
				`${slave.slaveName}'s weeping stopped during ${his} climax, but now ${he} starts to sob with terror, and ${he} cries harder as your Head Girl hauls ${him} out of your office by ${his} ear. ${S.HeadGirl.slaveName} waves cheerfully to you as ${he2} leaves with ${his2} victim.`
			);
			SimpleSexAct.Slaves(slave, S.HeadGirl, 5);
			S.HeadGirl.trust += 4;
			slave.trust -= 4;
			App.Events.addParagraph(frag, r);
			return frag;
		}
	}
};

repo_name: CloudyCoffee/fc

license: mit


code:
App.Events.RELegendaryBalls = class RELegendaryBalls extends App.Events.BaseEvent {
	actorPrerequisites() {
		return [[
			(s) => s.fetish !== "mindbroken",
			hasAnyArms,
			hasAnyLegs,
			canTalk,
			(s) => s.devotion > 50,
			(s) => s.prestige === 0,
			(s) => (s.balls > 5 || (s.balls > 4 && s.prostate > 1)), // should probably have a cumAmount() check?
			(s) => s.dick !== 0,
			(s) => [Job.DAIRY, Job.MILKED].includes(s.assignment)
		]];
	}

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

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

		App.Events.drawEventArt(node, slave);

		slave.devotion += 4;

		r.push(
			App.UI.DOM.slaveDescriptionDialog(slave),
			`is an incredible producer of cum. ${He}'s producing in volumes that would have been unthinkable in the days when it was illegal to restrain a slave so that ${he} could have every drop of ${his} ejaculate milked out by a machine. A nascent slave stock organization will be holding a public livestock show tomorrow, and since they're aware you're experimenting with cockmilking, they've sent you an invitation to enter an especially productive slave to be judged.`
		);

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

		r.push(`This is a rare opportunity. The idea of cockmilking is new and understandably fascinating to many, so the livestock show is likely to draw some serious press. Were ${slave.slaveName} to win, ${he} would probably be remembered for a long time as a special slave.`);

		App.Events.addParagraph(node, r);

		const cashSmall = 5000;
		const cashLarge = 10000;
		const choices = [];
		choices.push(new App.Events.Result(`Fairly enter ${him} in the livestock show`, enterFairly));
		if (V.cash > cashSmall) {
			choices.push(new App.Events.Result(`Spend ${cashFormat(cashSmall)} bribing the judges`, bribeLow));
		} else {
			choices.push(new App.Events.Result(null, null, `You do not have enough cash to bribe the judges`));
		}
		if (V.cash > cashLarge) {
			choices.push(new App.Events.Result(`Spend ${cashFormat(cashLarge)} bribing the judges and sabotaging the competition`, bribeHigh));
		} else {
			choices.push(new App.Events.Result(null, null, `You do not have enough cash to bribe the judges and sabotage the competition`));
		}
		App.Events.addResponses(node, choices);

		function enterFairly() {
			const frag = new DocumentFragment();
			let r = [];
			if (random(1, 100) > 90) {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then publicly cockmilked. It's likely there was some bribery behind the scenes, but ${his} massive junk wins the day. Against all odds ${he} is named best in show, and will be remembered as cock stock of the highest pedigree. As ${his} owner, your reputation has also increased.`);
				repX(500, "event", slave);
				slave.prestige = 1;
				slave.prestigeDesc = "$He is remembered for winning best in show as a cockmilker.";
				V.trinkets.push(`a best in show ribbon awarded to ${slave.slaveName} for ${getPronouns(slave).possessive} balls`);
			} else {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then publicly cockmilked. It's likely there was some bribery behind the scenes, and it is fatal to ${his} chances of winning. Though ${his} junk is easily the most impressive on display, another stock owner who was more open-handed with the judges took best in show. The public is impressed with ${slave.slaveName}'s nuts anyway; as you are ${his} owner, your reputation has increased a little.`);
				repX(500, "event", slave);
			}
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function bribeLow() {
			const frag = new DocumentFragment();
			let r = [];
			cashX(-cashSmall, "event", slave);
			repX(500, "event", slave);
			if (random(1, 100) > 50) {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then publicly cockmilked. Several of the judges cannot resist giving you a wink as they look ${him} over. ${slave.slaveName} is unsurprisingly named best in show, and will be remembered as cock stock of the highest pedigree. As ${his} owner, your reputation has also increased.`);
				slave.prestige = 1;
				slave.prestigeDesc = "$He is remembered for winning best in show as a cockmilker.";
				V.trinkets.push(`a best in show ribbon awarded to ${slave.slaveName} for ${getPronouns(slave).possessive} balls`);
			} else {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then publicly cockmilked. Several of the judges cannot resist giving you a wink as they look ${him} over, but others look disapprovingly at them; it seems some of your competitors also forwarded money to the committee. After furious wrangling, ${slave.slaveName} loses to another milker. The public is impressed with ${slave.slaveName}'s balls anyway; as you are ${his} owner, your reputation has increased a little.`);
			}
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function bribeHigh() {
			const frag = new DocumentFragment();
			let r = [];
			cashX(-cashLarge, "event", slave);
			if (random(1, 100) > 10) {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then publicly cockmilked. After ${he}'s put through ${his} paces, the most unfortunate series of accidents somehow befalls ${his} fellow cows. One is taken ill, another seems drugged, and someone seems to have slipped a finger of raw ginger up another's urethra, making them whine and squeal when cockmilked. ${slave.slaveName} is unsurprisingly named best in show, and will be remembered as cock stock of the highest pedigree. As ${his} owner, your reputation has also increased.`);
				repX(500, "event", slave);
				slave.prestige = 1;
				slave.prestigeDesc = "$He is remembered for winning best in show as a cockmilker.";
				V.trinkets.push(`a best in show ribbon awarded to ${slave.slaveName} for ${his} balls`);
			} else {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then publicly cockmilked. You are surprised to see that the judging committee has been changed at the last minute. They choose another cow as best in show. There are persistent rumors after the show that there was an absolute massacre of firings at the stock organization headquarters the night before the show after it was discovered that someone, widely thought to be you, had been corrupting the judges.`);
				repX(-100, "event", slave);
			}
			App.Events.addParagraph(frag, r);
			return frag;
		}
	}
};


code:
App.Events.RELegendaryCow = class RELegendaryCow extends App.Events.BaseEvent {
	actorPrerequisites() {
		return [[
			(s) => s.fetish !== "mindbroken",
			hasAnyArms,
			hasAnyLegs,
			canTalk,
			(s) => s.devotion > 50,
			(s) => s.prestige === 0,
			(s) => s.lactation > 0,
			(s) => (s.boobs - s.boobsImplant - s.boobsMilk) > 6000, // should probably have a milkAmount() check?
			(s) => [Job.DAIRY, Job.MILKED].includes(s.assignment)
		]];
	}

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

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

		App.Events.drawEventArt(node, slave);

		slave.devotion += 4;

		r.push(
			App.UI.DOM.slaveDescriptionDialog(slave),
			`is an incredible producer of milk. ${He}'s lactating in volumes that would have been unthinkable in the days when drug treatments were limited by consent. A nascent slave dairy trade organization will be holding a public stock show tomorrow, and since they're aware you keep cows, they've sent you an invitation to enter stock to be judged.`
		);

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

		r.push(`This is a rare opportunity. The idea of human dairy is new and understandably fascinating to many, so the stock show is likely to draw some serious press. Were ${slave.slaveName} to win, ${he} would probably be remembered for a long time as a special cow.`);

		App.Events.addParagraph(node, r);

		const cashSmall = 5000;
		const cashLarge = 10000;
		const choices = [];
		choices.push(new App.Events.Result(`Fairly enter ${him} in the stock show`, enterFairly));
		if (V.cash > cashSmall) {
			choices.push(new App.Events.Result(`Spend ${cashFormat(cashSmall)} bribing the judges`, bribeLow));
		} else {
			choices.push(new App.Events.Result(null, null, `You do not have enough cash to bribe the judges`));
		}
		if (V.cash > cashLarge) {
			choices.push(new App.Events.Result(`Spend ${cashFormat(cashLarge)} bribing the judges and sabotaging the competition`, bribeHigh));
		} else {
			choices.push(new App.Events.Result(null, null, `You do not have enough cash to bribe the judges and sabotage the competition`));
		}
		App.Events.addResponses(node, choices);

		function enterFairly() {
			const frag = new DocumentFragment();
			let r = [];
			if (random(1, 100) > 90) {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then publicly milked. It's likely there was some bribery behind the scenes, but ${his} massive tits win the day. Against all odds ${he} is named best in show, and will be remembered as dairy stock of the highest pedigree. As ${his} owner, your reputation has also increased.`);
				repX(500, "event", slave);
				slave.prestige = 1;
				slave.prestigeDesc = "$He is remembered for winning best in show as a dairy cow.";
				V.trinkets.push(`a best in show ribbon awarded to ${slave.slaveName} as a milk cow`);
			} else {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then publicly milked. It's likely there was some bribery behind the scenes, and it is fatal to ${his} chances of winning. Though ${his} tits are easily the most impressive on display, another stock owner who was more open-handed with the judges took best in show. The public is impressed with ${slave.slaveName}'s tits anyway; as you are ${his} owner, your reputation has increased a little.`);
				repX(500, "event", slave);
			}

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

		function bribeLow() {
			const frag = new DocumentFragment();
			let r = [];
			cashX(-cashSmall, "event", slave);
			repX(500, "event", slave);
			if (random(1, 100) > 50) {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then publicly milked. Several of the judges cannot resist giving you a wink as they look ${him} over. ${slave.slaveName} is unsurprisingly named best in show, and will be remembered as dairy stock of the highest pedigree. As ${his} owner, your reputation has also increased.`);
				slave.prestige = 1;
				slave.prestigeDesc = "$He is remembered for winning best in show as a dairy cow.";
				V.trinkets.push(`a best in show ribbon awarded to ${slave.slaveName} as a milk cow`);
			} else {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then publicly milked. Several of the judges cannot resist giving you a wink as they look ${him} over, but others look disapprovingly at them; it seems some of your competitors also forwarded money to the committee. After furious wrangling, ${slave.slaveName} loses to another cow. The public is impressed with ${slave.slaveName}'s tits anyway; as you are ${his} owner, your reputation has increased a little.`);
			}
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function bribeHigh() {
			const frag = new DocumentFragment();
			let r = [];
			cashX(-cashLarge, "event", slave);
			if (random(1, 100) > 10) {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then publicly milked. After ${he}'s put through ${his} paces, the most unfortunate series of accidents somehow befalls ${his} fellow cows. One is taken ill, another seems drugged, and someone seems to have slipped a finger of raw ginger up another's ass, making them whine and squeal constantly. ${slave.slaveName} is unsurprisingly named best in show, and will be remembered as dairy stock of the highest pedigree. As ${his} owner, your reputation has also increased.`);
				repX(500, "event", slave);
				slave.prestige = 1;
				slave.prestigeDesc = "$He is remembered for winning best in show as a dairy cow.";
				V.trinkets.push(`a best in show ribbon awarded to ${slave.slaveName} as a milk cow`);
			} else {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then publicly milked. You are surprised to see that the judging committee has been changed at the last minute. They choose another cow as best in show. There are persistent rumors after the show that there was an absolute massacre of firings at the dairy organization headquarters the night before the show after it was discovered that someone, widely thought to be you, had been corrupting the judges.`);
				repX(-100, "event", slave);
			}
			App.Events.addParagraph(frag, r);
			return frag;
		}
	}
};


code:
App.Events.RELegendaryEntertainer = class RELegendaryEntertainer extends App.Events.BaseEvent {
	actorPrerequisites() {
		return [[
			(s) => s.fetish !== "mindbroken",
			hasAnyArms,
			canWalk,
			canTalk,
			(s) => s.devotion > 50,
			(s) => s.trust > 50,
			(s) => s.prestige === 0,
			(s) => s.skill.entertainment >= 100,
			(s) => (canDoAnal(s) && s.anus > 0) || (canDoVaginal(s) && s.vagina > 0),
			(s) => [Job.CLUB, Job.DJ].includes(s.assignment)
		]];
	}

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

		const {
			His,
			he, his, him
		} = getPronouns(slave);

		App.Events.drawEventArt(node, slave);

		slave.devotion += 4;

		r.push(
			`The Free Cities fashion scene extends to slave bodies, of course; stopping at mere clothes and behaviors is an old world conceit. This week,`,
			App.UI.DOM.slaveDescriptionDialog(slave),
			`is in vogue. Such a crowd of gawkers and hangers-on follows ${him} around the club that the fine citizens who have a chance at an hour of ${his} time must shoulder their way through the throng.`
		);

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

		r.push(`This is a rare opportunity. Such popularity and fame is here today, and gone tomorrow. It might be possible, with a serious investment of funds in publicity, to really fix ${him} in the public mind as a courtesan of note. There's no guarantee of success, but if you are successful, ${his} value will increase a great deal.`);

		App.Events.addParagraph(node, r);

		const cashSmall = 5000;
		const cashBig = 10000;
		const choices = [];
		choices.push(new App.Events.Result(`Just capitalize on ${his} popularity as it is`, asIs));
		if (V.cash > cashSmall) {
			choices.push(new App.Events.Result(`Invest ${cashFormat(cashSmall)} in ${his} notoriety`, investSmall));
			if (V.cash > cashBig) {
				choices.push(new App.Events.Result(`Lavish ${cashFormat(cashBig)} on ${his} fame`, investBig));
			} else {
				choices.push(new App.Events.Result(null, null, `Not enough cash to lavishly invest`));
			}
		} else {
			choices.push(new App.Events.Result(null, null, `Not enough cash to invest`));
		}

		App.Events.addResponses(node, choices);

		function asIs() {
			const frag = new DocumentFragment();
			let r = [];
			r.push(`You decide to limit your advantage on ${his} temporary popularity to a little publicity and some advertising. You've gained a little <span class="green">notoriety.</span>`);
			repX(1000, "event", slave);
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function investSmall() {
			const frag = new DocumentFragment();
			let r = [];
			cashX(-cashSmall, "event", slave);
			repX(1000, "event", slave);
			if (random(1, 100) > 50) {
				r.push(`You buy media coverage of ${him}, invest in an ad campaign, and even arrange for persons of influence and taste to sample and review ${his} gentle caresses. Your efforts are a success. ${His} current extreme popularity will fade in time, but you have managed to arrange for ${him} a permanent place as a respected and famous courtesan. As ${his} owner, your reputation has also increased.`);
				if (slave.prestige <= 1) {
					slave.prestige = 1;
					slave.prestigeDesc = "$He is a famed Free Cities slut, and can please anyone.";
				}
				V.trinkets.push(`a framed article written about ${slave.slaveName} when ${he} debuted as a famous courtesan`);
			} else {
				r.push(`You buy media coverage of ${him}, invest in an ad campaign, and even arrange for persons of influence and taste to sample and review ${his} gentle caresses. Unfortunately, popularity remains an art, not a science; though you do your best, the public mind's fancy eludes your grasp. As ${his} owner, your reputation has increased, but in a week ${he}'ll be forgotten.`);
			}

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

		function investBig() {
			const frag = new DocumentFragment();
			let r = [];
			cashX(-cashBig, "event", slave);
			if (random(1, 100) > 10) {
				r.push(`You buy prime media coverage of ${him}, invest in a lavish ad campaign, and even arrange for persons of great influence and fine taste to sample and review ${his} gentle caresses. Your efforts are a success. ${His} current extreme popularity will fade in time, but you have managed to arrange for ${him} a permanent place as a respected and famous courtesan. As ${his} owner, your reputation has also increased.`);
				repX(2000, "event", slave);
				if (slave.prestige <= 1) {
					slave.prestige = 1;
					slave.prestigeDesc = "$He is a famed Free Cities slut, and can please anyone.";
				}
				V.trinkets.push(`a framed article written about ${slave.slaveName} when ${he} debuted as a famous courtesan`);
			} else {
				r.push(`You buy prime media coverage of ${him}, invest in a lavish ad campaign, and even arrange for persons of great influence and fine taste to sample and review ${his} gentle caresses. Unfortunately, popularity remains an art, not a science; though you do your best, the public mind's fancy eludes your grasp. As ${his} owner, your reputation has increased, but in a week ${he}'ll be forgotten.`);
				repX(2000, "event", slave);
			}
			App.Events.addParagraph(frag, r);
			return frag;
		}
	}
};


code:
App.Events.RELegendaryFormerAbolitionist = class RELegendaryFormerAbolitionist extends App.Events.BaseEvent {
	actorPrerequisites() {
		return [[
			(s) => s.fetish !== "mindbroken",
			hasAnyArms,
			canWalk,
			canTalk,
			(s) => s.devotion > 95,
			(s) => s.trust > 50,
			(s) => s.prestige === 0,
			(s) =>
				[
					"You sentenced $him to enslavement as a punishment for attempted theft of a slave.",
					"$He is an enslaved Daughter of Liberty.",
					"You got $him at the Slave Shelter. $He is an enslaved Daughter of Liberty, caught some weeks after the failed coup. $His previous owner used $him as a punching bag and dart board, then when he was bored of $him tattooed obscenities all over $his body and threw $him away.",
					"$He is an enslaved member of an anti-slavery extremist group.",
				].includes(s.origin) ||
				s.career === "an antislavery activist",
			(s) => s.newGamePlus === 0,
			(s) => [Job.MASTERSUITE, Job.CONCUBINE, Job.FUCKTOY].includes(s.assignment)
		]];
	}

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

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

		App.Events.drawEventArt(node, slave);

		App.Events.addParagraph(node, [
			`Crime is extremely rare in ${V.arcologies[0].name}, and some would say justice rarer still, but if there's one thing that unites the citizens of ${V.arcologies[0].name}, it's a mutual outrage towards attempted abolitionists. Slaveownership is the cornerstone of the society that protects and enriches them, and they see those who would attempt to unlawfully free slaves not just as thieves of property but as anarchists trying to bring down everything they have worked to build. While a brutal flogging or surgical mutilation soothes their outrage, nothing warms the collective heart of ${V.arcologies[0].name}'s mob like the sight of a former abolitionist well and truly broken.`,
			App.UI.DOM.slaveDescriptionDialog(slave),
			`is one such shining example, and ${his} borderline worship of you is doing wonders for your reputation lately as ${he} becomes a local celebrity and a popular topic of discussion. This is a rare opportunity. While the mob is quick to pat itself on the back for withstanding attacks from abolitionists, before long they will tire of remembering those dangers and turn their attention elsewhere. It might be possible, with a serious investment of funds in publicity, to really fix ${him} in the public mind as a shining example of your slave-breaking prowess.`
		]);

		const smallCash = 5000;
		const mediumCash = 10000;
		const largeCash = 25000;
		const choices = [];
		choices.push(new App.Events.Result(`Just capitalize on ${his} popularity to increase your reputation`, yourRep));
		choices.push(new App.Events.Result(`Just capitalize on ${his} popularity by renting out ${his} mouth`, rentMouth));
		if (V.cash >= smallCash) {
			choices.push(new App.Events.Result(`Invest ${cashFormat(smallCash)} in making ${him} locally famous`, locallyFamous));
		} else {
			choices.push(new App.Events.Result(null, null, `You do not have enough cash to make ${him} locally famous`));
		}

		if (V.cash >= mediumCash) {
			choices.push(new App.Events.Result(`Lavish ${cashFormat(mediumCash)} on making ${him} locally famous`, locallyFamousLavish));
		} else {
			choices.push(new App.Events.Result(null, null, `You do not have enough cash to lavish on making ${him} locally famous`));
		}

		if (V.cash >= largeCash) {
			choices.push(new App.Events.Result(`Spend ${cashFormat(largeCash)} on an attempt to make ${him} world famous`, worldFamous));
		} else {
			choices.push(new App.Events.Result(null, null, `You do not have enough cash to make ${him} world famous`));
		}

		App.Events.addResponses(node, choices);

		function yourRep() {
			repX(1000, "event", slave);
			return `You spend the week parading ${slave.slaveName} around in public, letting everyone get a good look at ${his} fawning adoration of you. A variety of public sex acts really nails the point home in the psyche of your citizens and increases your reputation, and after a few days you start to receive a sincere golf clap from onlookers every time you cum in or on ${slave.slaveName}.`;
		}

		function rentMouth() {
			const frag = new DocumentFragment();
			let r = [];
			r.push(`You fasten ${slave.slaveName} in a kneeling position in the center of your club, secured by shackles around ${his}`);
			if (hasAnyArms(slave)) {
				r.push(hasBothArms(slave) ? "wrists" : "wrist");
				if (hasAnyLegs(slave)) {
					r.push(`and`);
				}
			}
			if (hasAnyLegs(slave)) {
				r.push(hasBothLegs(slave) ? "ankles" : "ankle");
			}
			r.push(`— purely decorative, since ${he}'s so devoted ${he}'d perform ${his} role in this if you just hinted it would please you if ${he} did. In front of ${him}, you place a sign: "Fuck the mouth that preached abolitionism, ${cashFormat(5)}." In a few moments, the morning crowd will begin to arrive, and you have no doubt that ${slave.slaveName} will be very, very popular. And ${he} is. Even with an extra dose of curatives and a check-up every night, the strain of a week of dicks and a diet of cum has taken a toll on ${his} health. But even after you pay to have the area that ${slave.slaveName} worked thoroughly cleaned, you have made a tidy profit.`);
			healthDamage(slave, 10);
			seX(slave, "oral", "public", "penetrative", random(410, 440));
			cashX(2000, "event", slave);

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

		function locallyFamous() {
			const frag = new DocumentFragment();
			let r = [];
			if (random(1, 100) > 50) {
				r.push(`You buy media coverage of ${him}, invest in an ad campaign, and even arrange for ${him} to give a speech denouncing the abolitionist movement and praising your efforts in fighting against them. Your efforts are a success. ${His} current extreme popularity will fade in time, but you have managed to arrange for ${him} a permanent place as an example of your slave-breaking skills.`);
				slave.prestige = 1;
				slave.prestigeDesc = "$He is notorious as a former abolitionist turned devoted slave.";
			} else {
				r.push(`You buy media coverage of ${him}, invest in an ad campaign, and even arrange for ${him} to give a speech denouncing the abolitionist movement and praising your efforts in fighting against them. Unfortunately, popularity remains an art, not a science; though you do your best, the public mind's fancy eludes your grasp. As ${his} owner, your reputation has increased, but in a week ${he}'ll be forgotten.`);
			}
			cashX(-smallCash, "event", slave);
			repX(1000, "event", slave);

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

		function locallyFamousLavish() {
			const frag = new DocumentFragment();
			let r = [];
			if (random(1, 100) > 10) {
				r.push(`You buy prime media coverage of ${him}, invest in a lavish ad campaign, and even arrange for ${him} to give a speech denouncing the abolitionist movement and praising your efforts in fighting against them that is broadcast around the world. Your efforts are a success. ${His} current extreme popularity will fade in time, but you have managed to arrange for ${him} a permanent place as an example of your slave-breaking skills.`);
				slave.prestige = 1;
				slave.prestigeDesc = "$He is notorious as a former abolitionist turned devoted slave.";
			} else {
				r.push(`You buy prime media coverage of ${him}, invest in a lavish ad campaign, and even arrange for ${him} to give a speech denouncing the abolitionist movement and praising your efforts in fighting against them that is broadcast around the world. Unfortunately, popularity remains an art, not a science; though you do your best, the public mind's fancy eludes your grasp. As ${his} owner, your reputation has increased, but in a week ${he}'ll be forgotten.`);
			}
			cashX(-mediumCash, "event", slave);
			repX(2000, "event", slave);

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

		function worldFamous() {
			const frag = new DocumentFragment();
			let r = [];
			if (random(1, 100) > 50) {
				r.push(`The world is in love with ${slave.slaveName}. ${His} face graces magazine covers the world over and ${his} passionate arguments (ghostwritten by the best spin doctors money can buy) spark debate everywhere they're heard. ${He} is mentioned by name in strident denunciations about the immorality of the present day from religious leaders. ${He} appears on the internet with all sorts of attempts at humor superimposed on ${his} image. ${His} loving and overblown descriptions of you spark a new trend in protagonists of badly-written romance novels. When a very popular talk show host attempts to call ${his} bluff and receives oral sex in front of a live studio audience, you know for sure that ${his} fame has stuck.`);
				repX(3000, "event", slave);
				slave.prestige = 2;
				slave.prestigeDesc = "$He is world famous as an anti-abolitionist, and has told the world at length of the joys of slavery in general and slavery to you in particular.";
			} else {
				r.push(`The world seems temporarily enamored with ${slave.slaveName} as ${he} appears on talk shows and in political debates with millions of watchers, but before long ${his} fifteen minutes of fame peter out and the only offers coming in are from pornography magnates and local talk radio shows. Though ${he} achieved local fame for appearing on the world stage, the rest of the world seems to have gotten bored with ${slave.slaveName}.`);
				slave.prestige = 1;
				slave.prestigeDesc = "$He is notorious as a former abolitionist turned devoted slave.";
				repX(2000, "event", slave);
			}
			cashX(-largeCash, "event", slave);

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


code:
App.Events.RELegendaryWhore = class RELegendaryWhore extends App.Events.BaseEvent {
	actorPrerequisites() {
		return [[
			(s) => s.fetish !== "mindbroken",
			hasAnyArms,
			canWalk,
			canTalk,
			(s) => s.devotion > 50,
			(s) => s.trust > 50,
			(s) => s.prestige === 0,
			(s) => s.skill.whoring >= 100,
			(s) => (canDoAnal(s) && s.anus > 0) || (canDoVaginal(s) && s.vagina > 0),
			(s) => [Job.WHORE, Job.BROTHEL].includes(s.assignment)
		]];
	}

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

		const {
			His,
			he, his, him
		} = getPronouns(slave);

		App.Events.drawEventArt(node, slave);

		slave.devotion += 4;

		r.push(
			`The Free Cities red light areas are so overcharged with cheap and easy sex that the fashion in whores is comically unstable. This week,`,
			App.UI.DOM.slaveDescriptionDialog(slave),
			`is in vogue. So many customers are interested in renting ${his} body that it's necessary to assign other whores to take some of the load off ${him} by diverting less important customers away from ${him}.`
		);

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

		r.push(`This is a rare opportunity. Such popularity and fame is here today, and gone tomorrow. It might be possible, with a serious investment of funds in publicity, to really fix ${him} in the public mind as a whore of note. There's no guarantee of success, but if you are successful, ${his} value will increase a great deal.`);

		App.Events.addParagraph(node, r);

		const cashSmall = 5000;
		const cashBig = 10000;
		const choices = [];
		choices.push(new App.Events.Result(`Just capitalize on ${his} popularity as it is`, asIs));
		if (V.cash > cashSmall) {
			choices.push(new App.Events.Result(`Invest ${cashFormat(cashSmall)} in ${his} notoriety`, investSmall));
			if (V.cash > cashBig) {
				choices.push(new App.Events.Result(`Lavish ${cashFormat(cashBig)} on ${his} fame`, investBig));
			} else {
				choices.push(new App.Events.Result(null, null, `Not enough cash to lavishly invest`));
			}
		} else {
			choices.push(new App.Events.Result(null, null, `Not enough cash to invest`));
		}

		App.Events.addResponses(node, choices);

		function asIs() {
			const frag = new DocumentFragment();
			let r = [];
			r.push(`You decide to limit your advantage on ${his} temporary popularity to a little marketing and some minor price increases. You've made some unexpected profits, and gained a little notoriety.`);
			cashX(1000, "event", slave);
			repX(500, "event", slave);
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function investSmall() {
			const frag = new DocumentFragment();
			let r = [];
			cashX(-cashSmall, "event", slave);
			repX(500, "event", slave);
			if (random(1, 100) > 50) {
				r.push(`You buy media coverage of ${him}, invest in an ad campaign, and even arrange for persons of influence and taste to sample and review ${his} many delights. Your efforts are a success. ${His} current extreme popularity will fade in time, but you have managed to arrange for ${him} a permanent place as a notorious and very popular prostitute. As ${his} owner, your reputation has also increased.`);
				slave.prestige = 1;
				slave.prestigeDesc = "$He is a famed Free Cities whore, and commands top prices.";
				V.trinkets.push(`a framed pornographic advertisement for ${slave.slaveName} from the week ${he} became a famous whore`);
			} else {
				r.push(`You buy media coverage of ${him}, invest in an ad campaign, and even arrange for persons of influence and taste to sample and review ${his} many delights. Unfortunately, popularity remains an art, not a science; though you do your best, the public mind's fancy eludes your grasp. As ${his} owner, your reputation has increased, but in a week ${he}'ll be forgotten.`);
			}
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function investBig() {
			const frag = new DocumentFragment();
			let r = [];
			cashX(-cashBig, "event", slave);
			if (random(1, 100) > 10) {
				r.push(`You buy prime media coverage of ${him}, invest in a lavish ad campaign, and even arrange for persons of great influence and fine taste to sample and review ${his} many delights. Your efforts are a success. ${His} current extreme popularity will fade in time, but you have managed to arrange for ${him} a permanent place as a notorious and very popular prostitute. As ${his} owner, your reputation has also increased.`);
				repX(1000, "event", slave);
				slave.prestige = 1;
				slave.prestigeDesc = "$He is a famed Free Cities whore, and commands top prices.";
				V.trinkets.push(`a framed pornographic advertisement for ${slave.slaveName} from the week ${he} became a famous whore`);
			} else {
				r.push(`You buy prime media coverage of ${him}, invest in a lavish ad campaign, and even arrange for persons of great influence and fine taste to sample and review ${his} many delights. Unfortunately, popularity remains an art, not a science; though you do your best, the public mind's fancy eludes your grasp. As ${his} owner, your reputation has increased, but in a week ${he}'ll be forgotten.`);
				repX(1000, "event", slave);
			}
			App.Events.addParagraph(frag, r);
			return frag;
		}
	}
};


code:
App.Events.RELegendaryWomb = class RELegendaryWomb extends App.Events.BaseEvent {
	actorPrerequisites() {
		return [[
			(s) => s.fetish !== "mindbroken",
			hasAnyArms,
			canMove,
			canTalk,
			(s) => s.devotion > 50,
			(s) => s.trust > 50,
			(s) => s.broodmother === 0,
			(s) => s.eggType === "human",
			(s) => s.counter.births > 10,
			(s) => s.preg > s.pregData.normalBirth / 1.33,
			(s) => s.bellyPreg >= 14000,
			(s) => [Job.WHORE, Job.BROTHEL, Job.PUBLIC, Job.CLUB].includes(s.assignment),
		]];
	}

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

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

		App.Events.drawEventArt(node, slave);

		slave.devotion += 4;

		r.push(
			App.UI.DOM.slaveDescriptionDialog(slave),
			`is an incredible mother. ${He}'s given birth to numbers that would have been considered absurd in the days when drug treatments were limited by consent. A nascent organization will be holding a pageant for pregnant slaves tomorrow, and since they're aware you keep breeders, they've sent you an invitation to enter a heavily pregnant slave to be judged.`
		);

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

		r.push(`This is a rare opportunity. The idea of a pregnancy pageant isn't new but it is undeniably going to attract attention, so the pageant is likely to draw some serious press. Were ${slave.slaveName} to win, ${he} would probably be remembered for a long time as a special mother.`);

		const cashSmall = 5000;
		const cashLarge = 10000;
		const choices = [];
		choices.push(new App.Events.Result(`Fairly enter ${him} in the pregnancy pageant`, enterFairly));
		if (V.cash > cashSmall) {
			choices.push(new App.Events.Result(`Spend ${cashFormat(cashSmall)} bribing the judges`, bribeLow));
		} else {
			choices.push(new App.Events.Result(null, null, `You do not have enough cash to bribe the judges`));
		}
		if (V.cash > cashLarge) {
			choices.push(new App.Events.Result(`Spend ${cashFormat(cashLarge)} bribing the judges and sabotaging the competition`, bribeHigh));
		} else {
			choices.push(new App.Events.Result(null, null, `You do not have enough cash to bribe the judges and sabotage the competition`));
		}
		App.Events.addResponses(node, choices);

		function enterFairly() {
			const frag = new DocumentFragment();
			let r = [];
			if (random(1, 100) > 90) {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then asked to demonstrate how to pleasure a man while so heavily pregnant. It's likely there was some bribery behind the scenes, but ${his} heavy belly and creative positions win the day. Against all odds ${he} is named best in show, and will be remembered as a breeder of the highest pedigree. As ${his} owner, your reputation has also increased.`);
				repX(500, "event", slave);
				slave.prestige = 1;
				slave.prestigeDesc = "$He is remembered for winning best in show as a breeder.";
				V.trinkets.push(`a best in show ribbon awarded to ${slave.slaveName} as a breeder`);
			} else {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then asked to demonstrate how to pleasure a man while so heavily pregnant. It's likely there was some bribery behind the scenes, and it is fatal to ${his} chances of winning. Though ${his} pregnant body is the most impressive on display, another slaveowner who was more open-handed with the judges took best in show. The public is impressed with ${slave.slaveName}'s reproductive capability anyway; as you are ${his} owner, your reputation has increased a little.`);
				repX(500, "event", slave);
			}
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function bribeLow() {
			const frag = new DocumentFragment();
			let r = [];
			cashX(-cashSmall, "event", slave);
			repX(500, "event", slave);
			if (random(1, 100) > 50) {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then asked to demonstrate how to pleasure a man while so heavily pregnant. Several of the judges cannot resist giving you a wink as they look ${him} over. ${slave.slaveName} is unsurprisingly named best in show, and will be remembered as a breeder of the highest pedigree. As ${his} owner, your reputation has also increased.`);
				slave.prestige = 1;
				slave.prestigeDesc = "$He is remembered for winning best in show as a breeder.";
				V.trinkets.push(`a best in show ribbon awarded to ${slave.slaveName} as a breeder`);
			} else {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then asked to demonstrate how to pleasure a man while so heavily pregnant. Several of the judges cannot resist giving you a wink as they look ${him} over, but others look disapprovingly at them; it seems some of your competitors also forwarded money to the committee. After furious wrangling, ${slave.slaveName} loses to another mother. The public is impressed with ${slave.slaveName}'s reproductive capability anyway; as you are ${his} owner, your reputation has increased a little.`);
			}
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function bribeHigh() {
			const frag = new DocumentFragment();
			let r = [];
			cashX(-cashLarge, "event", slave);
			if (random(1, 100) > 10) {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then asked to demonstrate how to pleasure a man while so heavily pregnant. After ${he}'s put through ${his} paces, the most unfortunate series of accidents somehow befalls ${his} fellow mothers. One is taken ill, another seems drugged, and another went into labor and gave birth, disqualifying her. ${slave.slaveName} is unsurprisingly named best in show, and will be remembered as a breeder of the highest pedigree. As ${his} owner, your reputation has also increased.`);
				repX(500, "event", slave);
				slave.prestige = 1;
				slave.prestigeDesc = "$He is remembered for winning best in show as a breeder.";
				V.trinkets.push(`a best in show ribbon awarded to ${slave.slaveName} as a breeder`);
			} else {
				r.push(`${slave.slaveName} is shown in public, closely inspected by the judging committee, and then asked to demonstrate how to pleasure a man while so heavily pregnant. You are surprised to see that the judging committee has been changed at the last minute. They choose another breeder as best in show. There are persistent rumors after the show that there was an absolute massacre of firings at the dairy organization headquarters the night before the show after it was discovered that someone, widely thought to be you, had been corrupting the judges.`);
				repX(-100, "event", slave);
			}
			App.Events.addParagraph(frag, r);
			return frag;
		}
	}
};