code:
App.Events.REFSNonconformist = class REFSNonconformist extends App.Events.BaseEvent {
	eventPrerequisites() {
		return [
			() => !!(this.getNonconformistFS())
		];
	}

	getNonconformistFS() {
		const permittedFSes = Object.keys(App.Data.FutureSociety.records);
		permittedFSes.delete("FSNull"); // Multiculturalism doesn't have nonconformity
		return permittedFSes.filter(fs => V.arcologies[0][fs] < 95 && V.arcologies[0][fs] > 50).random();
	}

	actorPrerequisites() {
		return [];
	}

	execute(node) {
		let r = [];
		V.nextButton = " ";

		/** @type {FC.FutureSocietyAdj} */
		const FSNonconformist = App.Data.FutureSociety.records[this.getNonconformistFS()].adj;
		if (FutureSocieties.isActive('FSRestart')) {
			r.push(`A group of the Societal Elite arrives at your penthouse and is quickly ushered into your office. They're among the best members of the society you're building, uniformly wealthy, influential, and deeply`);
		} else {
			r.push(`A deputation of your citizens arrives at your penthouse and asks to see you. They're among the best members of the society you're building, uniformly wealthy, influential, and deeply`);
		}
		if (FSNonconformist === "Pastoralist") {
			r.push(`committed to making the future of the arcology a creamy one. They're looking quite grim, an unusual mood for a group of oligarchs more inclined to spend their time planning milk orgies,`);
		} else if (FSNonconformist === "Supremacist") {
			r.push(`committed to the ascendancy of the ${V.arcologies[0].FSSupremacistRace} race. They're looking quite grim, an unusual mood for a group of oligarchs more inclined to spend their time eagerly debating revisionist histories,`);
		} else if (FSNonconformist === "Subjugationist") {
			r.push(`involved in the subjugation of the ${V.arcologies[0].FSSubjugationistRace} race. They're looking quite grim, an unusual mood for a group of oligarchs more inclined to spend their time competing to come up with ever more extreme ways to degrade mongrels,`);
		} else if (FSNonconformist === "Repopulationist") {
			r.push(`committed to perpetuating humanity. They're looking quite grim, an unusual mood for a group of oligarchs more inclined to spend their time impregnating fertile women,`);
		} else if (FSNonconformist === "Eugenics") {
			r.push(`committed to restarting humanity. They're looking quite furious, an unusual mood for those with power second only to yours,`);
		} else if (FSNonconformist === "Gender Radicalist") {
			r.push(`committed to the redefinition of gender around power. They're looking quite grim, an unusual mood for a group of oligarchs more inclined to spend their time cheerfully sodomizing their slaves,`);
		} else if (FSNonconformist === "Gender Fundamentalist") {
			r.push(`committed to traditional gender roles. They're looking quite grim, an unusual mood for a group of oligarchs more inclined to spend their time basking in the attentions of their women,`);
		} else if (FSNonconformist === "Paternalist") {
			r.push(`committed to slave advancement. They're looking quite grim, an unusual mood for a group of oligarchs whose various projects to improve the lives of their chattel makes them quite self-assured,`);
		} else if (FSNonconformist === "Degradationist") {
			r.push(`committed to the comprehensive degradation of slaves. They're looking quite grim, an unusual mood for a group of oligarchs more inclined to spend their time cheerfully raping their slaves,`);
		} else if (FSNonconformist === "Intellectual Dependency") {
			r.push(`committed to slave advancement. They're looking quite grim, an unusual mood for a group of oligarchs more inclined to spend their time being fawned over by horny sluts,`);
		} else if (FSNonconformist === "Slave Professional") {
			r.push(`committed to crafting perfect slaves. They're looking quite grim, an unusual mood for a group of oligarchs with nothing short of masterful sources of stress release,`);
		} else if (FSNonconformist === "Body Purist") {
			r.push(`committed to body purism. They're looking quite grim, an unusual mood for a group of oligarchs whose various projects to improve the health of their chattel make them quite self-righteous,`);
		} else if (FSNonconformist === "Transformation Fetishist") {
			r.push(`committed to extreme transformation. They're looking quite grim, an unusual mood for a group of oligarchs more inclined to spend their time obsessing over improvements to their favorite slaves,`);
		} else if (FSNonconformist === "Slimness Enthusiast") {
			r.push(`addicted to slim female bodies. They're looking quite grim, an unusual mood for a group of oligarchs more inclined to spend their time cavorting with their harems,`);
		} else if (FSNonconformist === "Asset Expansionist") {
			r.push(`addicted to tits and ass. They're looking quite grim, an unusual mood for a group of oligarchs more inclined to spend their time having sex with their grandiosely endowed girls,`);
		} else if (FSNonconformist === "Youth Preferentialist") {
			r.push(`committed to the fashion for young girls. They're looking quite grim, an unusual mood for a group of oligarchs more inclined to spend their time enjoying their slaves' fresh bodies,`);
		} else if (FSNonconformist === "Maturity Preferentialist") {
			r.push(`committed to the fashion for mature slaves. They're looking quite grim, an unusual mood for a group of oligarchs more inclined to spend their time enjoying their slaves' experience,`);
		} else if (FSNonconformist === "Petite Admiration") {
			r.push(`committed to the fashion for short slaves. They're looking quite grim, an unusual mood for a group of oligarchs more inclined to spend their time enjoying their fun-sized slaves,`);
		} else if (FSNonconformist === "Statuesque Glorification") {
			r.push(`obsessed with tallness. They're looking quite grim, an unusual mood for a group of oligarchs more inclined to spend their time flaunting their stature,`);
		} else if (FSNonconformist === "Physical Idealist") {
			r.push(`involved in physical idealism. They're looking quite grim, an unusual mood for a group of oligarchs more inclined to spend their time lifting, tanning, and giving each other fist-bumps and bro-nods,`);
		} else if (FSNonconformist === "Decadent Hedonist") {
			r.push(`committed to hedonistic decadence. They're looking quite grim, an unusual mood for a group of oligarchs who spend most of their time indulging themselves by any, and every, means possible,`);
		} else if (FSNonconformist === "Chattel Religionist") {
			r.push(`committed to the new faith. They're looking quite grim, an unusual mood for a group of oligarchs who occupy favored places in a new religious hierarchy that affords them ample pleasure,`);
		} else if (FSNonconformist === "Roman Revivalist") {
			r.push(`involved in your Revivalist vision. They're looking quite grim, an unusual mood for a group of oligarchs who compete with each other to project the upper-class Roman virtues of stoicism and self-possession,`);
		} else if (FSNonconformist === "Neo-Imperialist") {
			r.push(`involved in your new Imperial vision. They're looking quite grim, an unusual mood for a group of noble oligarchs in a society that views them and their children as socially, physically, and even religiously superior to the serf-like masses,`);
		} else if (FSNonconformist === "Aztec Revivalist") {
			r.push(`involved in your Revivalist vision. They're looking quite grim, an unusual mood for a group of oligarchs who compete with each other to project the bloody virtues of their proud society,`);
		} else if (FSNonconformist === "Edo Revivalist") {
			r.push(`involved in your Revivalist vision. They're looking quite grim, an unusual mood for a group of oligarchs who compete with each other to project the traditional Japanese virtue of stoicism,`);
		} else if (FSNonconformist === "Arabian Revivalist") {
			r.push(`involved in your Revivalist vision. They're looking quite grim, an unusual mood for a group of oligarchs who do their best to embody the confidence of the early Caliphate,`);
		} else if (FSNonconformist === "Chinese Revivalist") {
			r.push(`involved in your Revivalist vision. They're looking quite grim, an unusual mood for a group of oligarchs who do their best to project complete confidence that the arcology possesses the Mandate of Heaven,`);
		} else if (FSNonconformist === "Egyptian Revivalist") {
			r.push(`involved in your Revivalist vision. They're looking quite grim, an unusual mood for a group of oligarchs who partake of your serene confidence that your arcology is coming into a place as stable and long-lived as that of Ancient Egypt,`);
		} else if (FSNonconformist === "Antebellum Revivalist") {
			r.push(`involved in your Revivalist vision. They're looking quite grim, an unusual mood for a group of oligarchs who do their best embody the virtues of Southern gentry,`);
		} else {
			throw Error(`FS "${FSNonconformist}" not found `);
		}
		if (FutureSocieties.isActive('FSRestart')) {
			r.push(`so you hear them out. Apparently, they're here about a peer, another member of the Elite, who has chosen to perform certain undesirable actions. ${capFirstChar(V.assistant.name)} helpfully supplies a biography, but you were previously aware of the situation.`);
		} else {
			r.push(`so you hear them out. Apparently, they're here about a peer, a fellow citizen with money and power who does not support your vision for the arcology's future. ${capFirstChar(V.assistant.name)} helpfully supplies a biography, but you were previously aware of the situation.`);
		}
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`The nonconformist`);
		if (FSNonconformist === "Pastoralist") {
			r.push(`has long been a vocal skeptic of the tastefulness of grown citizens drinking milk from slaves' breasts. Unfortunately, it seems that they've now edged over into open revolt against pastoralism. They're planning to publish an exposé that purports to reveal abuses in the human milk industry.`);
		} else if (FSNonconformist === "Supremacist") {
			r.push(`is a hardline egalitarianist who believes that all men are created equal, even if some then become slaves. They themselves are not ${V.arcologies[0].FSSupremacistRace}, and they insist on flaunting their ${V.arcologies[0].FSSupremacistRace} slaves. Unfortunately, it seems that they've now edged over into open revolt against ${V.arcologies[0].FSSupremacistRace} supremacism. After a brutal but deserved public punishment of a non-${V.arcologies[0].FSSupremacistRace} slave by one of the group of concerned citizens, the nonconformist is planning on visiting the same horrors on one of their ${V.arcologies[0].FSSupremacistRace} slaves, on a very weak pretext.`);
		} else if (FSNonconformist === "Subjugationist") {
			r.push(`is a hardline egalitarianist who believes that all men are created equal, even if some then become slaves. They themselves are ${V.arcologies[0].FSSubjugationistRace}, and they insist on flaunting their non-${V.arcologies[0].FSSubjugationistRace} slaves. Unfortunately, it seems that they've now edged over into open revolt against ${V.arcologies[0].FSSubjugationistRace} inferiority. After a brutal but deserved public punishment of a ${V.arcologies[0].FSSubjugationistRace} slave by one of the group of concerned citizens, the nonconformist is planning on visiting the same horrors on one of their non-${V.arcologies[0].FSSubjugationistRace} slaves, on a very weak pretext.`);
		} else if (FSNonconformist === "Repopulationist") {
			r.push(`has long been skeptical of the point of your repopulation efforts when the world is not stable and the arcology only so big. They plan to publish information regarding overpopulation, the negatives of chain pregnancies, the dangers of inbreeding and the risks of having so high a concentration of slaves.`);
		} else if (FSNonconformist === "Eugenics") {
			r.push(`has recently knocked up his favorite pet, and instead of responsibly aborting the bastard, has freed and married her. Allowing such actions to come to the public's attention will create a huge scandal and massive trouble for the Societal Elite, as well as undoing much of the progress you've made towards a better future.`);
		} else if (FSNonconformist === "Gender Radicalist") {
			r.push(`has never been quiet about their belief that slaves with dicks are not girls. Unfortunately, it seems that they've now edged over into open revolt against gender radicalism. They've purchased a highly feminized slave one of the group of concerned citizens sold to a third party, and are rumored to be returning the slave to her natural state. The oligarchs are worried that they plan to publicize this project, or worse, possibly even free the slave.`);
		} else if (FSNonconformist === "Gender Fundamentalist") {
			r.push(`has never been quiet about their belief that anything with an asshole counts as a slave girl. Unfortunately, it seems that they've now edged over into open revolt against gender traditionalism. They've been accumulating a number of sexually skilled slaves with dicks, and the oligarchs are worried that some sort of public event involving free sex with these slaves is planned to sway lower class opinion.`);
		} else if (FSNonconformist === "Paternalist") {
			r.push(`has never been shy about their belief that true trust between slave and master is impossible. Unfortunately, it seems that they've now edged over into open revolt against paternalism. They're rumored to run a household in which slaves are required to beat miscreants without mercy or be savaged themselves. There are indications that they may intend to make these spectacles public.`);
		} else if (FSNonconformist === "Degradationist") {
			r.push(`has never been shy about their belief that slaves are people too, and should be treated with respect. Unfortunately, it seems that they've now edged over into open revolt against degradationism. They're rumored to allow their slaves to decline sex. This perversion is bad enough, but the oligarchs are concerned that they may intend to take this practice public, setting favored slaves up with their own apartments and livelihoods.`);
		} else if (FSNonconformist === "Intellectual Dependency") {
			r.push(`has never been quiet about their grievances with having such a concentration of morons in one place. Unfortunately, it seems that they've now edged over into open revolt against intellectual dependency. They're planning to publish an exposé that reveals that the recent rise in prices is directly related to the number of accidents caused by the sheer lack of brains in the slave population.`);
		} else if (FSNonconformist === "Slave Professional") {
			r.push(`has never been shy about their paranoia over the dangers of a smart slave population. Unfortunately, it seems that they've now edged out of sanity and into open revolt against slave professionalism. They're rumored to be training slaves to carry out their fears. There are indications that they may intend to set loose these slaves to wreak havoc and prove their point.`);
		} else if (FSNonconformist === "Body Purist") {
			r.push(`has always been known for their harem of implant-filled silicone dolls. Unfortunately, it seems that they've now edged over into open revolt against body purism. They've purchased a wonderfully healthy and pure slave one of the group of concerned citizens sold to a third party, and it's rumored that the slave has been outfitted with cutting-edge gradually expanding breast implants with no effective maximum size. The oligarchs are disgusted and mortified lest this project become public.`);
		} else if (FSNonconformist === "Transformation Fetishist") {
			r.push(`has always been known for their harem of natural girls. Unfortunately, it seems that they've now edged over into open revolt against transformation. They've purchased a heavily implanted slave one of the group of concerned citizens sold to a third party, and it's rumored that the slave is being painstakingly returned to her natural, implant-free appearance. The oligarchs are concerned that the nonconformist may be planning some sort of public reveal of her naturalist makeover.`);
		} else if (FSNonconformist === "Slimness Enthusiast") {
			r.push(`has always been known for their harem of disgusting hambeasts. Unfortunately, it seems that they've now edged over into open revolt against the fashion for slimness. They've purchased a notoriously graceful slave one of the group of concerned citizens sold to a third party, and it's rumored that the slave is being force-fed in private as preparation for some kind of insulting public reveal. The oligarchs are mortally offended without even seeing the final product.`);
		} else if (FSNonconformist === "Asset Expansionist") {
			r.push(`has always been known for their harem of disgusting beanpoles. Unfortunately, it seems that they've now edged over into open revolt against the fashion for big tits. They've purchased a slave with famously magnificent boobs one of the group of concerned citizens sold to a third party, and it's rumored that the slave has undergone a radical breast reduction as preparation for some kind of insulting public reveal. The oligarchs are mortally offended without even seeing the final product.`);
		} else if (FSNonconformist === "Youth Preferentialist") {
			r.push(`has never missed an opportunity to share their belief that a mature woman who knows her way around a dick is a better fuck than a virgin. Unfortunately, it seems that they've now edged over into open revolt against the fashion for youth and freshness. They're holed up in their luxurious apartments, preparing a large number of older, sexually experienced slaves for something big. The oligarchs suspect that some sort of event involving free sex may be planned to sway lower class opinion.`);
		} else if (FSNonconformist === "Maturity Preferentialist") {
			r.push(`has never missed an opportunity to share their belief that a fresh girl is infinitely preferable to an old whore. Unfortunately, it seems that they've now edged over into open revolt against the fashion for maturity and experience. They're holed up in their luxurious apartments, preparing a large number of virgin slaves for something big. The oligarchs suspect that some sort of event involving free sex may be planned to sway lower class opinion.`);
		} else if (FSNonconformist === "Petite Admiration") {
			r.push(`has never missed an opportunity to share their belief that being able to look into your lover's eyes while you fuck is the greatest thing in the world. Unfortunately, it seems that they've now edged over into open revolt against the fashion for mixing big and small. They're holed up in their luxurious apartments, preparing a large number of tall, undeniably gorgeous slaves for something big. The oligarchs suspect that some sort of event involving free sex may be planned to sway lower class opinion.`);
		} else if (FSNonconformist === "Statuesque Glorification") {
			r.push(`is an advocate for short slaves. They themselves stand barely over the acceptable threshold, and they insist on flaunting their midget slaves. Unfortunately, it seems that they've now edged over into open revolt against tall superiority. After a brutal but deserved public humiliation of a slave owner caught lying about their chattel's height by a group of concerned citizens, the nonconformist is planning on visiting the same horrors on some of their gorgeously tall slaves, on a very weak pretext.`);
		} else if (FSNonconformist === "Physical Idealist") {
			r.push(`rarely misses a chance to lecture on the perils of toxic masculinity and excessive public standards of beauty. Unfortunately, it seems that they've now edged over into open revolt against the Valhalla of physical perfection the arcology is rapidly becoming. They're rumored to be preparing a manifesto on beauty at any size, along with the necessary funds to bribe neutral third parties into going along.`);
		} else if (FSNonconformist === "Decadent Hedonist") {
			r.push(`has long been a vocal opponent of over-indulgence and its effects on society. Unfortunately, it seems that they've now edged over into open revolt against hedonism. They're planning to publish an exposé that reveals numerous statistics regarding average health and lifespans, the rising maintenance costs to accommodate the widening population, and a rather alarming report that the arcology has in fact <i>sunk</i> several`);
			if (V.showInches === 2) {
				r.push(`inches`);
			} else {
				r.push(`centimeters`);
			}
			r.push(`since hedonism became commonplace among the citizenry.`);
		} else if (FSNonconformist === "Chattel Religionist") {
			r.push(`originally moved to the Free Cities to get away from religion entirely, and has never missed a chance to register disdain for the new faith. Unfortunately, it seems that they've now edged over into open heresy. Typically, they're going about it in a hypocritical way. It's rumored that they've engaged the services of a charismatic itinerant preacher of one of the more popular old world faiths, and intend to bring him to the arcology to inveigh against the chattel religion.`);
		} else if (FSNonconformist === "Roman Revivalist") {
			r.push(`has been a longtime skeptic of historical revivalism, publicly deploring it as a childish game of dress-up. This never got much traction, since Rome has become quite fashionable here. Frustrated, they're rumored to be planning a change of approach. Despairing of getting the population to give up the Roman project, they're going to set up a competing Gaulish Revivalism. The quixotic effort is almost certainly doomed to fail, but the oligarchs fear it will be a distraction.`);
		} else if (FSNonconformist === "Neo-Imperialist") {
			r.push(`has been a staunch and lifelong egalitarian, despite holding slaves for most of their later life, committed to the tenets of a free democratic society. They have loudly and openly criticized Imperial society and its relegation of the lower classes to serfdom and subservience for the benefit of your Knights and Barons; now you hear they're planning to set up a competing societal design they call Neo-Republicanism, modifying the old world Republican style into a directly democratic arcology governance. The Barons fear that this might rile up a number of serfs against Imperial society.`);
		} else if (FSNonconformist === "Aztec Revivalist") {
			r.push(`has been a longtime skeptic of historical revivalism, publicly deploring it as a childish game of dress-up. This never got much traction, since Aztec has become quite fashionable here. Frustrated, they're rumored to be planning a change of approach. Despairing of getting the population to give up the Aztec project, they're going to set up a competing Spanish Revivalism. The quixotic effort is almost certainly doomed to fail, but the oligarchs fear it will be a distraction.`);
		} else if (FSNonconformist === "Edo Revivalist") {
			r.push(`has been a longtime skeptic of historical revivalism, publicly deploring it as a childish game of dress-up. This never got much traction, since Edo Japan has become quite fashionable here. Frustrated, they're rumored to be planning a change of approach. Despairing of getting the population to give up the Japanese project, they're going to set up a competing Korean Revivalism. The quixotic effort is almost certainly doomed to fail, but the oligarchs fear it will be a distraction.`);
		} else if (FSNonconformist === "Arabian Revivalist") {
			r.push(`has been a longtime skeptic of historical revivalism, publicly deploring it as a childish game of dress-up. This never got much traction, since the golden age of the Caliphate has become quite fashionable here. Frustrated, they're rumored to be planning a change of approach. Despairing of getting the population to give up the Arabian project, they're going to set up a competing Byzantine Revivalism. The quixotic effort is almost certainly doomed to fail, but the oligarchs fear it will be a distraction.`);
		} else if (FSNonconformist === "Chinese Revivalist") {
			r.push(`has been a longtime skeptic of historical revivalism, publicly deploring it as a childish game of dress-up. This never got much traction, since ancient China has become quite fashionable here. Frustrated, they're rumored to be planning a change of approach. Despairing of getting the population to give up the imperial project, they're going to set up a competing Mongol Revivalism. The quixotic effort is almost certainly doomed to fail, but the oligarchs fear it will be a distraction.`);
		} else if (FSNonconformist === "Egyptian Revivalist"){
			r.push(`has been a longtime skeptic of historical revivalism, publicly deploring it as a childish game of dress-up. This never got much traction, since the land of the Pharaohs has become quite fashionable here. Frustrated, they're rumored to be planning a change of approach. Despairing of getting the population to give up the Egyptian project, they're going to set up a competing Ancient Greek Revivalism. The quixotic effort is almost certainly doomed to fail, but the oligarchs fear it will be a distraction.`);
		} else if (FSNonconformist === "Antebellum Revivalist"){
			r.push(`has held a longtime grudge against the Antebellum era, publicly declaring it to be a caricature of the old South and, indeed, seems to loathe the Southron code of honor. Most citizens openly disagree, some going as far as demanding to duel for the honor of the arcology. Now, it's rumored that they're going to set up a competing Gilded Age Revivalism. The choice was is poignant one; the Gilded Age was birthed from the defeat of the South in the Civil War. While the North was flourishing, the South languished in post-war ruins.`);
		} else {
			throw Error(`FS "${FSNonconformist}" not found `);
		}
		if (FutureSocieties.isActive('FSRestart')) {
			r.push(`Faced with such a threat, the Elite naturally came to you. They ask you, as leader of the arcology, to both cover up the event and deal with the disgraced Elite.`);
		} else {
			r.push(`Faced with such a threat, the citizens naturally came to you. They ask you, as leader of the arcology, to both prevent the plan and get the nonconformist to move out.`);
		}
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`The nonconformist is far too prominent and prosperous to make this an easy dilemma to resolve. Your societal goals are at stake, as is your reputation among some of your best citizens, but the nonconformist has significant sway in the arcology's economy. Merely forcing them out of the arcology would damage its prosperity, and more decisive action could have more serious consequences still.`);
		App.Events.addParagraph(node, r);

		const choices = [];
		choices.push(new App.Events.Result(`Ignore the situation`, ignore));
		choices.push(new App.Events.Result(`Throw the nonconformist out of the arcology`, throwOut));
		if (V.PC.rumor === "force") {
			choices.push(new App.Events.Result(`Leverage your reputation with some credible threats`, leverage));
		} else if (V.cash > 10000) {
			choices.push(new App.Events.Result(`Quickly manage a nuanced response`, nuance, `This will cost ${cashFormat(10000)}`));
		} else {
			choices.push(new App.Events.Result(null, null, `You lack the necessary ready cash to manage a nuanced solution`));
		}

		App.Events.addResponses(node, choices);

		function ignore() {
			const frag = new DocumentFragment();
			let r = [];
			repX(-250, "event");
			r.push(`You communicate polite concern, but offer no specific plans. The prominent citizens go away muttering, <span class="red">very disappointed</span> that you are not taking their concerns seriously. The nonconformist`);
			if (FSNonconformist === "Pastoralist") {
				r.push(`publishes the exposé, <span class="red">setting back adoption</span> of pastoralism.`);
				V.arcologies[0].FSPastoralist -= 10;
			} else if (FSNonconformist === "Supremacist") {
				r.push(`publicly flogs one of their ${V.arcologies[0].FSSupremacistRace} slaves halfway to exsanguination, <span class="red">setting back acceptance</span> of ${V.arcologies[0].FSSupremacistRace} supremacy.`);
				V.arcologies[0].FSSupremacist -= 10;
			} else if (FSNonconformist === "Subjugationist") {
				r.push(`publicly flogs one of their non-${V.arcologies[0].FSSubjugationistRace} slaves halfway to exsanguination, <span class="red">setting back acceptance</span> of ${V.arcologies[0].FSSubjugationistRace} inferiority.`);
				V.arcologies[0].FSSubjugationist -= 10;
			} else if (FSNonconformist === "Gender Radicalist") {
				r.push(`reveals the defeminized slave and then frees her, completing her return to maleness according to Gender Radicalism's own tenets, <span class="red">setting back acceptance</span> of the society model.`);
				V.arcologies[0].FSGenderRadicalist -= 10;
			} else if (FSNonconformist === "Repopulationist") {
				r.push(`publishes his information, <span class="red">greatly hindering</span> the adoption of mass reproduction.`);
				if (V.PC.belly >= 1000) {
					r.push(`Your own fecundity is brought into question as well, <span class="red">hurting your public opinion.</span>`);
					repX(forceNeg(V.PC.preg*10), "event");
				}
				V.arcologies[0].FSRepopulationFocus -= 10;
			} else if (FSNonconformist === "Eugenics") {
				r.push(`hosts a public wedding commemorating their love. This <span class="red">sets back acceptance</span> of your class system and hinders Eugenics.`);
				if (V.eugenicsFullControl !== 1) {
					r.push(`The Societal Elite are <span class="red">furious</span> at your inaction.`);
					V.failedElite += 100;
				}
				V.arcologies[0].FSRestart -= 20;
			} else if (FSNonconformist === "Gender Fundamentalist") {
				r.push(`hosts a huge public party in a lower-class area of the arcology, staffing it with a large number of slaves with dicks. They're so filled with aphrodisiacs that they orgasm constantly when citizens use their asses. This <span class="red">setts back acceptance</span> of gender traditionalism.`);
				V.arcologies[0].FSGenderFundamentalist -= 10;
			} else if (FSNonconformist === "Paternalist") {
				r.push(`begins requiring his slaves to beat each other in public for the entertainment of passersby, <span class="red">setting back acceptance</span> of paternalism.`);
				V.arcologies[0].FSPaternalist -= 10;
			} else if (FSNonconformist === "Degradationist") {
				r.push(`begins building independent little lives for a few of their best slaves, <span class="red">setting back acceptance</span> of degradationism.`);
				V.arcologies[0].FSDegradationist -= 10;
			} else if (FSNonconformist === "Intellectual Dependency") {
				r.push(`publishes the exposé, <span class="red">setting back acceptance</span> of a totally dependent slave population as citizens scramble to slave-proof their homes.`);
				V.arcologies[0].FSIntellectualDependency -= 10;
			} else if (FSNonconformist === "Slave Professional") {
				r.push(`hosts a public display of just how easy it would be to turn a slave into an effective assassin, striking fear into the citizenry and <span class="red">setting back acceptance</span> of slave professionalism.`);
				V.arcologies[0].FSSlaveProfessionalism -= 10;
			} else if (FSNonconformist === "Body Purist") {
				r.push(`is soon accompanied around the arcology by a slave with ten-liter breast implants, <span class="red">setting back acceptance</span> of body purism.`);
				V.arcologies[0].FSBodyPurist -= 10;
			} else if (FSNonconformist === "Transformation Fetishist") {
				r.push(`is soon accompanied around the arcology by the successfully made-over slave, whose transformation they never tire of extolling. This <span class="red">setting back acceptance</span> of transformation.`);
				V.arcologies[0].FSTransformationFetishist -= 10;
			} else if (FSNonconformist === "Slimness Enthusiast") {
				r.push(`soon reveals their little project. The once-beautiful slave is now so fat she can scarcely walk; the unanswered insult <span class="red">sets back the fashion</span> for slim slaves.`);
				V.arcologies[0].FSSlimnessEnthusiast -= 10;
			} else if (FSNonconformist === "Asset Expansionist") {
				r.push(`soon reveals their little project. A pair of the arcology's finest tits are gone forever; the unanswered insult <span class="red">sets back the fashion</span> for stacked slaves.`);
				V.arcologies[0].FSAssetExpansionist -= 10;
			} else if (FSNonconformist === "Youth Preferentialist") {
				r.push(`hosts a huge public party in a lower-class area of the arcology, staffing it with a large number of older slaves. They're so filled with aphrodisiacs that they eagerly fuck anyone who shows the slightest interest. This <span class="red">dims the fashion</span> for fresh slaves.`);
				V.arcologies[0].FSYouthPreferentialist -= 10;
			} else if (FSNonconformist === "Maturity Preferentialist") {
				r.push(`hosts a huge public party in a lower-class area of the arcology, staffing it with a large number of young slaves. They're virgins, though not for very long. This <span class="red">dims the fashion</span> for mature slaves.`);
				V.arcologies[0].FSMaturityPreferentialist -= 10;
			} else if (FSNonconformist === "Petite Admiration") {
				r.push(`hosts a fancy ball in a lower-class area of the arcology, staffing it with a large number of tall slaves. After a pleasant dance with a partner actually capable of it, many opt to share a second dance beneath the sheets. This <span class="red">dims the fashion</span> for short slaves.`);
				V.arcologies[0].FSPetiteAdmiration -= 10;
			} else if (FSNonconformist === "Statuesque Glorification") {
				r.push(`publicly berates each of their tall slaves to complete tears. As the group begins to gleefully join in, glorification of the tall <span class="red">becomes more a joke than a fashion.</span>`);
				V.arcologies[0].FSStatuesqueGlorification -= 10;
			} else if (FSNonconformist === "Physical Idealist") {
				r.push(`publishes their screed, and spreads money around to ensure its widespread dissemination. This <span class="red">sets back acceptance</span> of physical idealism.`);
				V.arcologies[0].FSPhysicalIdealist -= 10;
			} else if (FSNonconformist === "Decadent Hedonist") {
				r.push(`publishes their findings causing a tremendous panic, several heart attacks and a large number of clogged hallways, but ultimately a resurgence of healthy living practices. This <span class="red">sets back acceptance</span> of hedonistic decadence.`);
				V.arcologies[0].FSHedonisticDecadence -= 10;
			} else if (FSNonconformist === "Chattel Religionist") {
				r.push(`brings in their pet dissenting preacher, whose clever invectives <span class="red">set back acceptance</span> of the new religion.`);
				V.arcologies[0].FSChattelReligionist -= 10;
			} else if (FSNonconformist === "Roman Revivalist") {
				r.push(`offers their Gaulish Revivalism alternative with great fanfare. It fizzles out within a week, mostly because its main backer is privately against all revivalism, but during that time it serves as a focal point for many citizens who are privately impatient with Roman revivalism. This imbroglio <span class="red">sets back acceptance</span> of your revivalist project.`);
				V.arcologies[0].FSRomanRevivalist -= 10;
			} else if (FSNonconformist === "Neo-Imperialist") {
				r.push(`presents their Neo-Republicanism to society with great fanfare. While the slave population is much too indoctrinated to pay these ridiculous precepts much heed, Republican ideals stir debate and rabblerousing among a portion of the free serfs, before your guards brusquely push their preachers off the street and tear down the Republican posters littered around the arcology. This imbroglio <span class="red">sets back acceptance</span> of your Imperial Society.`);
				V.arcologies[0].FSNeoImperialist -= 10;
			} else if (FSNonconformist === "Aztec Revivalist") {
				r.push(`offers their Spanish Revivalism alternative with great fanfare. It fizzles out within a week, mostly because its main backer is privately against all revivalism, but during that time it serves as a focal point for many citizens who are privately impatient with Aztec revivalism. This imbroglio <span class="red">sets back acceptance</span> of your revivalist project.`);
				V.arcologies[0].FSAztecRevivalist -= 10;
			} else if (FSNonconformist === "Edo Revivalist") {
				r.push(`offers their Korean Revivalism alternative with great fanfare. It fizzles out within a week, mostly because its main backer is privately against all revivalism, but during that time it serves as a focal point for many citizens who are privately impatient with Edo revivalism. This imbroglio <span class="red">sets back acceptance</span> of your revivalist project.`);
				V.arcologies[0].FSEdoRevivalist -= 10;
			} else if (FSNonconformist === "Arabian Revivalist") {
				r.push(`offers their Byzantine Revivalism alternative with great fanfare. It fizzles out within a week, mostly because its main backer is privately against all revivalism, but during that time it serves as a focal point for many citizens who are privately impatient with Arabian revivalism. This imbroglio <span class="red">sets back acceptance</span> of your revivalist project.`);
				V.arcologies[0].FSArabianRevivalist -= 10;
			} else if (FSNonconformist === "Chinese Revivalist") {
				r.push(`offers their Mongol Revivalism alternative with great fanfare. It fizzles out within a week, mostly because its main backer is privately against all revivalism, but during that time it serves as a focal point for many citizens who are privately impatient with Chinese revivalism. This imbroglio <span class="red">sets back acceptance</span> of your revivalist project.`);
				V.arcologies[0].FSChineseRevivalist -= 10;
			} else if (FSNonconformist === "Antebellum Revivalist") {
				r.push(`offers their Gilded Age Revivalism alternative with great fanfare. It fizzles out within a week, mostly because its main backer is privately against all revivalism, but during that time it serves as a focal point for many citizens who are privately impatient with Antebellum revivalism. This imbroglio <span class="red">sets back acceptance</span> of your revivalist project.`);
				V.arcologies[0].FSAntebellumRevivalist -= 10;
			} else {
				r.push(`offers their Ancient Greek Revivalism alternative with great fanfare. It fizzles out within a week, mostly because its main backer is privately against all revivalism, but during that time it serves as a focal point for many citizens who are privately impatient with Egyptian revivalism. This imbroglio <span class="red">sets back acceptance</span> of your revivalist project.`);
				V.arcologies[0].FSEgyptianRevivalist -= 10;
			}
			V.nextButton = "Continue";
			App.Utils.updateUserButton();/* unlock Continue button */

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

		function throwOut() {
			const frag = new DocumentFragment();
			let r = [];
			V.arcologies[0].prosperity -= 10;
			r.push(`You agree with the prominent citizens, and promise to apply all of your considerable contractual and business power to get the nonconformist out of the arcology before they can put their plan into action. You manage it, but only just. Opinion on your actions is mixed: the oligarchs who came to you are pleased you satisfied their requests, but your maneuvers were offensive to the general preference for freedom. The impact on the arcology's economy on the other hand is entirely negative, since the sudden loss of a major player within the arcology's business field <span class="red">damages its prosperity.</span>`);
			V.nextButton = "Continue";
			App.Utils.updateUserButton();/* unlock Continue button */

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

		function leverage() {
			const frag = new DocumentFragment();
			let r = [];
			repX(500, "event");
			r.push(`Resolving the situation takes you one call. Exactly what happened to your predecessor as owner of the arcology has never become publicly known, but your method of replacing them is rumored to have been somewhat ballistic in nature. It doesn't take much inflection in your voice to communicate threat, and the nonconformist hastily promises to abandon their plans and be less annoying in the future. The oligarchs are somewhat frightened by the rapidity with which you sorted things out, but they can't argue with the results and their <span class="green">respect for you deepens.</span>`);
			V.nextButton = "Continue";
			App.Utils.updateUserButton();/* unlock Continue button */
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function nuance() {
			const frag = new DocumentFragment();
			let r = [];
			cashX(-10000, "event");
			if (FutureSocieties.isActive('FSRestart')) {
				r.push(`You promise to deal with the situation. The Societal Elite trust you to not fail, and they are not disappointed. The fallen Elite`);
			} else {
				r.push(`You promise to deal with the situation. The prominent citizens trust you enough to leave the problem in your hands, and they are not disappointed. The nonconformist`);
			}
			if (FSNonconformist === "Pastoralist") {
				r.push(`publishes the exposé, but finds it effectively defused by a nuanced pro-dairy campaign leveraging your dominance of the arcology's media.`);
			} else if (FSNonconformist === "Supremacist") {
				r.push(`is intent on publicly flogging the unfortunate ${V.arcologies[0].FSSupremacistRace} slave, but quickly finds that you've manipulated their contracts with you to forbid such displays. Frustrated, they subside for now.`);
			} else if (FSNonconformist === "Subjugationist") {
				r.push(`is intent on publicly flogging the unfortunate non-${V.arcologies[0].FSSubjugationistRace} slave, but quickly finds that you've manipulated their contracts with you to forbid such displays. Frustrated, they subside for now.`);
			} else if (FSNonconformist === "Repopulationist") {
				r.push(`publishes their information about pregnancy, but it has little effect thanks to a preemptive campaign leveraging your dominance over the arcology's media. Your reputation is protected by the promises of a large stock of future slaves, securing both money and ensuring a stable population in case of disaster. You also pointed out all the other slaveowners also partaking in the pleasures of a pregnant woman. Plus, what could a flock of heavily pregnant slaves do to overthrow their masters?`);
			} else if (FSNonconformist === "Eugenics") {
				r.push(`is ejected from the elite class following a leak of evidence proving he wasn't fit to be a member of the Societal Elite. Evidence tailored by you. Unfortunately, he was ready for this move; he and his wife had already fled the arcology. You did your job adequately, and managed to suppress any possible outrage in the city.`);
			} else if (FSNonconformist === "Gender Radicalist") {
				r.push(`finds that you've manipulated their contracts with you to forbid them from showing off nonconforming slaves within the arcology. Frustrated, they subside for now.`);
			} else if (FSNonconformist === "Gender Fundamentalist") {
				r.push(`hosts a huge public party in a lower-class area of the arcology, staffing it with a large number of slaves with dicks. However, they're surprised by an unexpected lack of interest in the event, which is only explained when they find that you've organized a much superior event featuring real girls in the main plaza, at the same time.`);
			} else if (FSNonconformist === "Paternalist") {
				r.push(`finds that you've manipulated their contracts with you to forbid them from displaying public slave beatings within the arcology. Frustrated, they subside for now.`);
			} else if (FSNonconformist === "Degradationist") {
				r.push(`discovers that you've hastily set up subtle clauses within the rental contracts that make it all but inevitable that girls sent out on their own would be confiscated. Frustrated, they subside for now.`);
			} else if (FSNonconformist === "Intellectual Dependency") {
				r.push(`publishes the exposé, but finds it effectively ignored while the public's attention is focused on a record breaking slave orgy. Some fruity drinks and club music were all it took.`);
			} else if (FSNonconformist === "Slave Professional") {
				r.push(`hosts a public display of just how easy it would be to turn a slave into an effective assassin, but finds you've prepared a counter for each of his arguments. He's no fool and backs down before he makes things worse for himself.`);
			} else if (FSNonconformist === "Body Purist") {
				r.push(`finds that a mysterious actor has raised serious safety concerns about the new implant technology, causing a minor public outcry against them. The altered slave is not publicly displayed.`);
			} else if (FSNonconformist === "Transformation Fetishist") {
				r.push(`finds that you've manipulated their contracts with you to forbid them from showing off nonconforming slaves within the arcology. Frustrated, they subside for now.`);
			} else if (FSNonconformist === "Slimness Enthusiast") {
				r.push(`finds that you've manipulated their contracts with you to forbid them from showing off fat-bodied slaves within the arcology. Frustrated, they subside for now.`);
			} else if (FSNonconformist === "Asset Expansionist") {
				r.push(`finds that you've manipulated their contracts with you to forbid them from showing off ruined slaves within the arcology. Frustrated, they subside for now.`);
			} else if (FSNonconformist === "Youth Preferentialist") {
				r.push(`hosts a huge public party in a lower-class area of the arcology, staffing it with a large number of older slaves. However, they're surprised by an unexpected lack of interest in the event, which is only explained when they find that you've organized a much superior event featuring fresh virgins in the main plaza, at the same time.`);
			} else if (FSNonconformist === "Maturity Preferentialist") {
				r.push(`hosts a huge public party in a lower-class area of the arcology, staffing it with a large number of young slaves. However, they're surprised by an unexpected lack of interest in the event, which is only explained when they find that you've organized a much superior event featuring famous MILF whores in the main plaza, at the same time.`);
			} else if (FSNonconformist === "Petite Admiration") {
				r.push(`hosts a huge public ball in a lower-class area of the arcology, staffing it with a large number of tall slaves. However, they're surprised by an unexpected lack of interest in the event, which is only explained when they find that you've organized a much superior event featuring famous shortstacks in the main plaza, at the same time.`);
			} else if (FSNonconformist === "Statuesque Glorification") {
				r.push(`is intent on publicly berating the unfortunate giants into mental breakdowns, but quickly finds that you've manipulated their contracts with you to forbid such displays. Frustrated, but thankful you kept their true height out of it, they subside for now.`);
			} else if (FSNonconformist === "Physical Idealist") {
				r.push(`publishes their screed, and soon receives a challenge from you to a brief public debate. They offer a brief rant, to which you respond by removing your suit jacket and flexing, which almost pops the seams of your formal shirt. The public loses interest in the manifesto in the amusement.`);
			} else if (FSNonconformist === "Decadent Hedonist") {
				r.push(`publishes their report and immediately hosts a speech. This is easily countered; you throw a massive party for the arcology's citizens complete with all you can eat buffets, a variety of drugs and a massive orgy to top it off. While the citizens are distracted, the nonconformist's words go unheard and their report is quietly swept under the rug. Not that your population will care as long as there is adequate entertainment to keep their minds off any potential problems.`);
			} else if (FSNonconformist === "Chattel Religionist") {
				r.push(`brings in their pet dissenting preacher, who finds himself caught in a duel from the pulpit with a noted cleric of the slave religion, brought in from outside the arcology on short notice. The debate receives a great deal of attention, and is generally agreed to have been a close-fought draw.`);
			} else if (FSNonconformist === "Roman Revivalist") {
				r.push(`offers their Gaulish Revivalism alternative with fanfare, but fanfare is something that the Romans could certainly manage. The nasty little attempt is forgotten in a day of public gladiatorial combat, chariot racing, and giveaways for the poorer citizens.`);
			} else if (FSNonconformist === "Neo-Imperialist") {
				r.push(`offers their Neo-Republican alternative with fanfare, but their fanfare pales before the magnificence of your Imperial rule. The well-trained, heavily-armored, and socially pampered Imperial Knights of your arcology react to the mere proposal with an outrage so intense that the backers almost immediately retreat into hiding from your furious citizens.`);
			} else if (FSNonconformist === "Aztec Revivalist") {
				r.push(`offers their Spanish Revivalism alternative with fanfare, but fanfare is something that the Aztecs would never acknowledge. The nasty little attempt does nothing after a day of prayer, bloodletting and slave sacrifice.`);
			} else if (FSNonconformist === "Edo Revivalist") {
				r.push(`offers their Korean Revivalism alternative with fanfare, but fanfare is inelegant next to Edo revivalism. The nasty little attempt has its day, but looks gauche next to the stately grace of your project.`);
			} else if (FSNonconformist === "Arabian Revivalist") {
				r.push(`offers their Byzantine Revivalism alternative with fanfare, but jihad may be waged with diplomacy as much as with the sword. The nasty little attempt founders on the growing conservatism of the arcology, whose citizens rally to you as their proper leader.`);
			} else if (FSNonconformist === "Chinese Revivalist") {
				r.push(`offers their Mongol Revivalism alternative with fanfare, but judicious strengthening of your imperial authority sees it off without trouble. The influence of Confucian ideas is spreading through your arcology, making it resistant to radical departures.`);
			} else if (FSNonconformist === "Antebellum Revivalist") {
				r.push(`offers their Gilded Age Revivalism alternative with fanfare, but fanfare rings empty compared to the rock-solid resolve of the Southron peoples. The nasty little attempt is shrugged off in a few days.`);
			} else {
				r.push(`offers their Ancient Greek Revivalism alternative with fanfare, but fanfare is something that the Egyptians could certainly manage. The nasty little attempt is barely noticed over the perfume and noise of a long and beautiful festival.`);
			}
			r.push(`The oligarchy is pleased by how you managed to defuse the situation without causing a spectacle. They're disappointed that you permitted their nonconforming peer to remain in the arcology's upper echelons for the time being, but they accept your solution to the problem.`);
			V.nextButton = "Continue";
			App.Utils.updateUserButton();/* unlock Continue button */

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


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;
		}
	}
};

repo_name: Ducati/fc

license: mit


code:
// cSpell:ignore REHGReplacement

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) => Math.min(s.skill.vaginal, 100) > Math.min(S.HeadGirl.skill.vaginal, 100), // skills can rarely exceed 100 temporarily during endWeek, so this is clamped to ensure accuracy
			(s) => s.assignment !== Job.QUARTER,
			(s) => s.fetish !== 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`,
			App.UI.DOM.slaveDescriptionDialog(S.HeadGirl),
			`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;
		}
	}
};


code:
App.Events.RELegendaryBalls = class RELegendaryBalls extends App.Events.BaseEvent {
	actorPrerequisites() {
		return [[
			(s) => s.fetish !== 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.";
				addTrinket(`best in show balls`, {
					name: slave.slaveName,
					id: slave.ID
				});
			} 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.";
				addTrinket(`best in show balls`, {
					name: slave.slaveName,
					id: slave.ID
				});
			} 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.";
				addTrinket(`best in show balls`, {
					name: slave.slaveName,
					id: slave.ID
				});
			} 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 !== Fetish.MINDBROKEN,
			hasAnyArms,
			hasAnyLegs,
			canTalk,
			(s) => s.devotion > 50,
			(s) => s.prestige === 0,
			(s) => s.lactation > 0,
			(s) => App.Medicine.fleshSize(s, 'boobs') > 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 ${slave.milkFlavor === "none" ? `` : `${slave.milkFlavor}-flavored `}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.";
				addTrinket(`best in show milk cow`, {
					name: slave.slaveName,
					id: slave.ID
				});
			} 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.";
				addTrinket(`best in show milk cow`, {
					name: slave.slaveName,
					id: slave.ID
				});
			} 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.";
				addTrinket(`best in show milk cow`, {
					name: slave.slaveName,
					id: slave.ID
				});
			} 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 !== 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.";
				}
				addTrinket(`famous courtesan`, {
					name: slave.slaveName,
					id: slave.ID
				});
			} 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.";
				}
				addTrinket(`famous courtesan`, {
					name: slave.slaveName,
					id: slave.ID
				});
			} 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;
		}
	}
};