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

	eventPrerequisites() {
		return [
			() => V.seeDicks !== 100
		];
	}

	get eventName() {
		return "Desperate University MILF";
	}

	execute(node) {
		const slave = makeSlave();
		const {
			He,
			he, his, him, woman, mother,
		} = getPronouns(slave);
		const title = (V.PC.title !== 0) ? `Sir` : `Ma'am`;
		let r = [];

		r.push(`A call comes in from an old world household. The caller appears on your screen, a worn down matronly ${woman} flanked by ${his} two daughters. The middle-aged ${mother} addresses you in a formal yet halting manner, as if rehearsing an unfamiliar speech.`);
		r.push(Spoken(slave, `"I don't know how closely you watch the old world from where you are, but finding steady work without an education is becoming increasingly difficult".`));
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`The ${mother} pauses to glance at ${his} daughters before continuing.`);
		r.push(Spoken(slave, `"I want my daughters to have a chance to make a life for themselves. I know that if I can pay their way towards attending university, then I will have succeeded as a parent."`));
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`${He} begins to weep quietly, but continues after ${his} daughters lay their hands supportively on ${his} shoulder.`);
		r.push(Spoken(slave, `"Could you enslave me, ${title.toLowerCase()}? It's the only way I have to pay for their tuition."`));

		App.Events.addParagraph(node, r);
		const contractCost = 1000;
		const cost = slaveCost(slave) - contractCost;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		responses.push(new App.Events.Result(`Sell ${him} immediately`, sell, `This will bring in ${cashFormat(cost)}`));

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`${He} cooperates as the biometric scanners scrupulously record ${his} every particular as belonging not to a person but to a piece of human property. ${He} willingly places ${his} biometric signature in testament to the truth of ${his} voluntary enslavement. The process is completed with a distinct anticlimax: ${he} is one of your slaves now. ${He} looks almost relaxed, content in the knowledge that ${his} daughters' education has been paid in full.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function sell() {
			const el = new DocumentFragment();
			let r = [];
			cashX(cost, "slaveTransfer");
			r.push(`${He} cooperates as the biometric scanners scrupulously record ${his} every particular as belonging not to a person but to a piece of human property. ${He} willingly places ${his} biometric signature in testament to the truth of ${his} voluntary enslavement. A purchasing agent appears to take ${him} away, which ${he} accepts resignedly, though ${he} does ask you who purchased ${him}. Amused, you tell ${him} that ${his} reverence of education convinced you to sell ${him} to a brothel catering to inexperienced men.`);
			r.push(Spoken(slave, `"I'm going to be a little bit like a teacher?"`));
			r.push(`${He} contemplates this unexpected turn of events.`);
			r.push(Spoken(slave, `"Well, that's very thoughtful of you. Thank you."`));
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const slave = GenerateNewSlave("XX", {
				minAge: 30, maxAge: 43,
				ageOverridesPedoMode: 1, disableDisability: 1
			});
			slave.origin = "$He sold $himself into slavery to pay for $his children's education.";
			slave.devotion = random(0, 15);
			slave.trust = random(0, 15);
			slave.boobs += 650;
			slave.butt++;
			slave.anus++;
			slave.face = 20;
			slave.fetish = "none";
			slave.fetishKnown = 0;
			setHealth(slave, jsRandom(-70, -60), undefined, undefined, undefined, 0);
			slave.intelligence = random(-50, 0);
			slave.intelligenceImplant = 0;
			slave.career = App.Data.Careers.General.uneducated.random();
			slave.counter.birthsTotal = 2;
			return slave;
		}
	}
};


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

	eventPrerequisites() {
		return [
			() => V.seeDicks !== 0,
			() => V.mercenaries >= 5
		];
	}

	get eventName() {
		return "Dickgirl Runaway";
	}

	execute(node) {
		const slave = makeSlave();
		const {
			He,
			he, his, him, girl
		} = getPronouns(slave);
		let r = [];

		r.push(`A report about a successful operation by your mercenaries waits at your desk when you come in the office this morning. Turns out they tracked a brutal gang that was waylaying travelers near the Free City and stormed their hideout last night. All of the criminals were killed in the process, preventing proper punishments or more... creative uses for them. From the videos of the raid and the fanatic way the men fought to the last man, it seems that this was unavoidable, so you send a quick note of approval to their commander.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`After the fighting died down, they found a dickgirl inside the compound, harshly used and seemingly the center of many gangbangs there. A scan of ${his} biometric data revealed that ${he} is in fact a slave that ran away about two months ago — into a much worse situation after being caught by the gang, as it turns out. Countless dicks have stretched ${his} ass wide, ${he} has been crudely gelded, and they've decorated ${him} with numerous piercings. As you notify the owner that her property has been retrieved, the woman is distraught at the state of her merchandise, grumbling that a once quite valuable ${girl} is now worth almost nothing. Seems she's unwilling to invest her time and money in caring for the slave. With a sigh, the slave-mistress whips out her smartphone and starts to set up a selling offer in one of the popular slave trading apps.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(App.UI.DOM.makeElement("span", `The young dickgirl has been used and abused quite a bit, making ${him} deathly terrified about what might happen to ${him} next. ${He} has partially resigned to be nothing but a fuckhole. You can get ${him} cheap from the owner, it'll be just ${cashFormat(1000)}.`, "note"));

		App.Events.addParagraph(node, r);
		const contractCost = 1000;
		const cost = slaveCost(slave) - contractCost;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		responses.push(new App.Events.Result(`Sell ${him} immediately`, sell, `This will bring in ${cashFormat(cost)}`));

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`With a few keystrokes, you wire the payment to the slave${girl}'s owner, then have your guardsmen bring ${him} from the station infirmary to your penthouse. ${He} is led to stand before you, shivering in terror and looking at ${his} feet. Only after an insistent command does ${he} look up long enough to be biometrically scanned and registered as your property.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function sell() {
			const el = new DocumentFragment();
			let r = [];
			cashX(cost, "slaveTransfer");
			r.push(`With a few keystrokes, you wire the payment to the slave${girl}'s owner, then have your guardsmen bring ${him} from the station infirmary to your penthouse. ${He} is led to stand before you, shivering in terror and looking at ${his} feet. Only after an insistent command does ${he} look up long enough to be biometrically scanned and registered as your property. Frowning at the emotional state the gang left ${him} in, you're relieved when your guards take ${him} away a moment later, to be transported to the office of a slave broker you know well. Oh well, now ${he}'ll be someone else's problem to fix up.`);
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const slave = GenerateNewSlave("XY", {maxAge: 24});
			slave.origin = "$He was a runaway slave captured by a gang outside your arcology. You bought $him cheap after $he was harshly used by them.";
			slave.devotion = random(0, 25);
			slave.trust = -20;
			generateSalonModifications(slave);
			setHealth(slave, jsRandom(-50, -30), normalRandInt(10, 3), normalRandInt(10, 3), Math.max(normalRandInt(1, 0.5), 50));
			slave.face = random(0, 20);
			slave.skill.vaginal = 0;
			slave.skill.anal = 15;
			slave.skill.oral = 15;
			slave.skill.whoring = 0;
			slave.boobs = random(2, 6) * 100;
			slave.vagina = -1;
			slave.labia = 1;
			slave.ovaries = 0;
			slave.preg = 0;
			slave.dick = random(1, 3);
			slave.balls = 0;
			slave.weight = random(-80, 20);
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			slave.anus = 3;
			slave.intelligence = random(-50, 50);
			slave.career = "a slave";
			slave.fetish = "submissive";
			slave.behavioralFlaw = "hates men";
			slave.behavioralQuirk = "insecure";
			slave.sexualFlaw = "apathetic";
			slave.piercing.lips.weight = 1;
			slave.piercing.tongue.weight = 1;
			slave.piercing.ear.weight = 1;
			slave.piercing.nose.weight = 2;
			slave.piercing.navel.weight = 1;
			slave.piercing.nipple.weight = 2;
			slave.piercing.genitals.weight = 2;
			slave.custom.tattoo = "$He has a barcode tattooed on $his neck.";
			slave.attrXY = 20;
			return slave;
		}
	}
};

repo_name: Fekenol/fc

license: mit


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

	eventPrerequisites() {
		return [
			() => V.seeDicks !== 100,
			() => V.seePreg !== 0,
			() => V.PC.skill.medicine > 50,
			() => V.PC.skill.hacking > 75,
			() => (random(0, 100) > 75) || (V.debugMode > 0 && V.debugModeEventSelection > 0)
		];
	}

	get eventName() {
		return "Embryo Appropriation";
	}

	execute(node) {
		const slave = makeSlave();
		const {
			He,
			he, his, him, himself, girl, woman,
		} = getPronouns(slave);
		let r = [];

		r.push(`While perusing the confidential documents in a nearby hospital's databases, you come across a particularly interesting medical record with a rather lovely face attached to it. It would seem an incredibly attractive`);
		if (slave.actualAge > 17) {
			r.push(`young ${woman}`);
		} else if (slave.actualAge > 12) {
			r.push(`teenager`);
		} else {
			r.push(`little ${girl}`);
		}
		r.push(`with desirable genes has been has been receiving frequent prenatal checkups`);
		if (V.seeHyperPreg === 0) {
			r.push(`for ${his} growing pregnancy.`);
		} else {
			r.push(`for the multiples crowding ${his} womb.`);
		}
		r.push(`Judging by ${his} payment plan, the worrisome mother is driving ${himself} into a steep debt and doesn't even realize it. You could easily buy ${him} out and make a tidy profit off ${his} likely to be valuable ${(V.seeHyperPreg === 1) ? `children, or keep them` : `child, or keep it`} for yourself, if you wanted.`);

		App.Events.addParagraph(node, r);
		const contractCost = 10000;
		const cost = slaveCost(slave) - contractCost;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		responses.push(new App.Events.Result(`Sell ${him} immediately`, sell, `This will bring in ${cashFormat(cost)}`));

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`${He} sobs as the biometric scanners scrupulously record ${his} every particular as belonging not to a person but to a piece of human property. ${He} tries to resist placing ${his} biometric signature in testament to the truth of ${his} debt, but when you observe that the alternative is the death of ${him} and ${his} unborn, ${he} complies. The process is completed with a distinct anticlimax: ${he} is one of your slaves now, and soon so shall ${his} spawn.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function sell() {
			const el = new DocumentFragment();
			let r = [];
			cashX(cost, "slaveTransfer");
			const profit = cost * slave.pregType;
			cashX(profit, "slaveTransfer");
			r.push(`${He} sobs as the biometric scanners scrupulously record ${his} every particular as belonging not to a person but to a piece of human property. ${He} tries to resist placing ${his} biometric signature in testament to the truth of ${his} debt, but when you observe that the alternative is the death of ${him} and ${his} unborn, ${he} complies. A purchasing agent appears to take ${him} away, but not after the slave breeder that bought ${him} paid a ludicrous amount of ¤ per child. An additional ${cashFormat(profit)} overall.`);
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const pram = new GenerateNewSlavePram();
			pram.minAge = Math.max(V.fertilityAge, 8);
			pram.maxAge = (V.pedo_mode === 1 ? 16 : 22);
			pram.ageOverridesPedoMode = 1;
			pram.race = "nonslave";
			const slave = GenerateNewSlave("XX", pram);
			slave.origin = "$His womb held a baby you desired.";
			slave.face = 100;
			slave.intelligence = random(96, 100);
			if (slave.vagina < 1) {
				slave.vagina = 1;
			}

			// block all genetic quirks not marked with goodTrait - can this be condensed by consulting goodTrait?
			slave.geneticQuirks.gigantism = 0;
			slave.geneticQuirks.dwarfism = 0;
			slave.geneticQuirks.neoteny = 0;
			slave.geneticQuirks.progeria = 0;
			slave.geneticQuirks.androgyny = 0;
			slave.geneticQuirks.uFace = 0;
			slave.geneticQuirks.superfetation = 0;
			slave.geneticQuirks.polyhydramnios = 0;
			slave.geneticQuirks.uterineHypersensitivity = 0;
			slave.geneticQuirks.macromastia = 0;
			slave.geneticQuirks.gigantomastia = 0;
			slave.geneticQuirks.galactorrhea = 0;
			slave.geneticQuirks.rearLipedema = 0;
			slave.geneticQuirks.wGain = 0;
			slave.geneticQuirks.wLoss = 0;
			slave.geneticQuirks.mGain = 0;
			slave.geneticQuirks.mLoss = 0;
			slave.geneticQuirks.girlsOnly = 0;
			// 50% chance of an active goodTrait genetic quirk, except wellHung
			const geneRoll = random(1, 10);
			if (geneRoll === 10) {
				slave.geneticQuirks.pFace = 2;
			} else if (geneRoll === 9) {
				slave.geneticQuirks.albinism = 2;
				slave.albinismOverride = makeAlbinismOverride(slave.race);
				applyGeneticColor(slave);
			} else if (geneRoll === 8) {
				slave.geneticQuirks.heterochromia = 2;
				setHeterochromia(slave);
			} else if (geneRoll === 7) {
				slave.geneticQuirks.fertility = 2;
			} else if (geneRoll === 6) {
				slave.geneticQuirks.hyperFertility = 2;
			}

			slave.pubertyXX = 1;
			slave.preg = 20;
			slave.pregWeek = 20;
			slave.pregKnown = 1;
			if (V.seeHyperPreg === 0) {
				slave.pregType = 1;
			} else {
				slave.pregType = random(2, 8);
			}
			SetBellySize(slave);
			return slave;
		}

		// stripped-down copy of generateRacialTraits() from generateNewSlaveJS.js
		function setHeterochromia(slave) {
			switch (slave.race) {
				case "black":
				case "malay":
				case "pacific islander":
				case "amerindian":
					eyeColor(["brown"]);
					break;
				case "white":
					if (["German", "Polish", "Danish", "Estonian", "Latvian", "Lithuanian"].includes(slave.nationality)) {
						eyeColor(["light grey", "blue", "blue", "blue", "blue", "blue", "blue", "brown", "brown", "green"]);
					} else if (["Icelandic", "Norwegian"].includes(slave.nationality)) {
						eyeColor(["light grey", "blue", "blue", "blue", "blue", "blue", "blue", "blue", "brown", "green"]);
					} else if (["Swedish", "Finnish"].includes(slave.nationality)) {
						eyeColor(["light grey", "blue", "blue", "blue", "blue", "blue", "blue", "blue", "blue", "blue", "brown", "green"]);
					} else if (["Irish", "Scottish"].includes(slave.nationality)) {
						eyeColor(["light grey", "blue", "blue", "blue", "brown", "brown", "green", "green", "green"]);
					} else {
						eyeColor(["light grey", "blue", "blue", "blue", "blue", "blue", "blue", "brown", "brown", "brown", "green"]);
					}
					break;
				case "latina":
					eyeColor(["blue", "brown", "brown", "brown", "brown", "brown", "brown", "brown", "brown", "brown", "green"]);
					break;
				case "indo-aryan":
					if (["Iranian", "Pakistani", "Tajik", "Kazakh", "Kurdish", "Azerbaijani", "Syrian", "Kyrgyz", "Afghan", "Mongolian", "Turkmen", "Turkish", "Uzbek"].includes(slave.nationality) || (jsRandom(1, 8) === 1)) {
						if (jsRandom(1, 10) === 1) {
							eyeColor(["light grey", "blue", "blue", "brown", "green", "green"]);
						} else {
							eyeColor(["brown", "brown", "brown", "brown", "brown", "brown", "green"]);
						}
					} else {
						eyeColor(["brown"]);
					}
					break;
				case "catgirl":
					eyeColor(["light grey", "blue", "blue", "brown", "brown", "brown", "green"]);
					break;
				case "asian":
					eyeColor(["blue", "brown", "green"]);
					break;
				case "middle eastern":
				case "semitic":
					eyeColor(["blue", "brown", "brown", "brown", "brown", "brown", "brown", "brown", "brown", "brown", "brown", "brown", "green"]);
					break;
				case "southern european":
					eyeColor(["blue", "brown", "brown", "brown", "brown", "brown", "green"]);
					break;
				default:
					eyeColor(["blue", "brown", "green"]);
			}

			/**
			 * @param {string[]} colors
			 */
			function eyeColor(colors) {
				setGeneticEyeColor(slave, jsEither(colors), true);
			}
		}
	}
};


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

	eventPrerequisites() {
		return [
			() => V.seeDicks !== 0
		];
	}

	get eventName() {
		return "Farm Bull";
	}

	execute(node) {
		const slave = makeSlave();
		const {
			He,
			he, his, him,
		} = getPronouns(slave);
		let r = [];

		r.push(`As you're working on some boring administrative matters, a courier comes to your office, delivering a satchel of documents. Opening it up to check who would go through the trouble of having something hand-delivered, you find out that the Free Cities Farmers Association (FCFA) has chosen your arcology to hold the next of their semi-regular conventions, in which prominent members of the industry will gather and new developments be presented. Sounds like a mixture of a conference and a trade show, and the association has rented out the convention center in the mid-levels of your demesne for more than a week. That'll certainly boost the local economy a bit.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`From the looks of all the brochures and extra information included, the association's president is well-versed in how the Free Cities are run... leading him to promote his group directly to you. And not only that — in an effort to curry favor, he included a slave's records, including an offer to buy the obedient breeding bull (a dickgirl) from his own stable for an almost ridiculously low price.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(App.UI.DOM.makeElement("span", `Checking ${his} stats and the videos included, you see the dickgirl is healthy and well cared for, fitting for a prized breeder of countless milk cows. ${He}'s fathered countless offspring already and will yield quite a bit of cum if ${his} cock is milked. With the registration and all, it'll still just take ${cashFormat(2500)} to buy ${him} and add ${him} to your own slave lineup.`, "note"));

		App.Events.addParagraph(node, r);

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		const contractCost = 2500;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`Making a video call to tell the association president you accept the asking price for ${slave.slaveName}, you're drawn into a conversation with the skillful speaker, at the end of which you agree to be the honored guest for their convention. Who knows, new developments in the slave farming industry might actually prove interesting to learn about, and the pleasure of acquiring a new slave will make it worth your while even if it turns out to be boring. In short notice, the dickgirl you just bought is brought to your penthouse where ${he} obediently strips and stands ready for your inspection, a sizable cock swinging between ${his} legs.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const pram = new GenerateNewSlavePram();
			pram.maxAge = 15;
			pram.disableDisability = 1;
			if (V.pedo_mode === 1) {
				pram.minAge = V.potencyAge;
				pram.ageOverridesPedoMode = 1;
			} else {
				pram.minAge = 21;
			}
			const slave = GenerateNewSlave("XY", pram);
			slave.origin = "$He was a breeding bull in the stable of a slaveholding farmer before being sold to you.";
			slave.devotion = random(25, 50);
			slave.trust = random(25, 50);
			setHealth(slave, jsRandom(30, 60), undefined, undefined, 0, 0);
			slave.face = random(-30, 30);
			slave.skill.vaginal = 0;
			slave.skill.anal = 35;
			slave.skill.oral = 15;
			slave.skill.entertainment = 0;
			slave.skill.whoring = 0;
			slave.boobs = 0;
			slave.vagina = -1;
			slave.vaginaLube = 1;
			slave.labia = 1;
			slave.ovaries = -1;
			slave.dick = random(4, 5);
			slave.balls = random(3, 4);
			slave.scrotum = slave.balls;
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			slave.hips = random(1, 2);
			slave.butt = random(2, 5);
			slave.anus = 2;
			slave.weight = random(-80, 20);
			slave.muscles = random(10, 50);
			slave.shoulders = random(1, 2);
			slave.intelligence = random(-95, 50);
			slave.piercing.nose.weight = 2;
			slave.career = "a slave";
			slave.fetish = "pregnancy";
			slave.behavioralQuirk = "adores women";
			slave.sexualQuirk = "size queen";
			return slave;
		}
	}
};


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

	eventPrerequisites() {
		return [
			() => V.seeDicks !== 100,
			() => V.seePreg !== 0
		];
	}

	get eventName() {
		return "Farm Cow";
	}

	execute(node) {
		const slave = makeSlave();
		const {
			He,
			he, his, him, woman,
		} = getPronouns(slave);
		let r = [];

		r.push(`As you're working on some boring administrative matters, a courier comes to your office, delivering a satchel of documents. Opening it up to check who would go through the trouble of having something hand-delivered, you find out that the Free Cities Farmers Association (FCFA) has chosen your arcology to hold the next of their semi-regular conventions, in which prominent members of the industry will gather and new developments be presented. Sounds like a mixture of a conference and a trade show, and the association has rented out the convention center in the mid-levels of your demesne for more than a week. That'll certainly boost the local economy a bit.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`From the looks of all the brochures and extra information included, the association's president is well-versed in how the Free Cities are run... leading him to promote his group directly to you. And not only that — in an effort to curry favor, he included a slave's records, including an offer to buy the obedient milking cow from his own stable for an almost ridiculously low price.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(App.UI.DOM.makeElement("span", `Checking ${his} stats and the videos included, you see the ${woman} is healthy and well cared for, fitting for a prized milk-producer. ${He}'s a mother of three already and has got another baby on the way, making ${his} lactation an all natural one. With the registration and all, it'll still just take ${cashFormat(2500)} to buy ${him} and add ${him} to your own slave lineup.`, "note"));

		App.Events.addParagraph(node, r);

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		const contractCost = 2500;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`Making a video call to tell the association president you accept the asking price for ${slave.slaveName}, you're drawn into a conversation with the skillful speaker, at the end of which you agree to be the honored guest for their convention. Who knows, new developments in the slave farming industry might actually prove interesting to learn about, and the pleasure of acquiring a new slave will make it worth your while even if it turns out to be boring. In short notice, the ${woman} you just bought is brought to your penthouse where ${he} obediently strips and stands ready for your inspection.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const pram = new GenerateNewSlavePram();
			pram.maxAge = 30;
			pram.disableDisability = 1;
			if (V.pedo_mode === 1) {
				pram.minAge = V.fertilityAge + 4;
				pram.ageOverridesPedoMode = 1;
			} else {
				pram.minAge = 24;
			}
			const slave = GenerateNewSlave("XX", pram);
			slave.origin = "$He was a milk cow in the stable of a slaveholding farmer before being sold to you.";
			slave.devotion = random(25, 50);
			slave.trust = random(25, 50);
			setHealth(slave, jsRandom(30, 60), undefined, undefined, 0, 0);
			slave.face = random(-30, 30);
			slave.skill.vaginal = 15;
			slave.skill.anal = 15;
			slave.skill.oral = 15;
			slave.skill.entertainment = 0;
			slave.skill.whoring = 0;
			slave.boobs = random(8, 20) * 100;
			slave.vagina = 2;
			slave.vaginaLube = 1;
			slave.labia = 2;
			slave.ovaries = 1;
			slave.preg = 15;
			slave.pregType = either(1, 2);
			slave.pregWeek = slave.preg;
			slave.pregKnown = 1;
			SetBellySize(slave);
			slave.counter.birthsTotal += 3;
			slave.lactation = 1;
			slave.lactationDuration = 2;
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			slave.hips = random(0, 2);
			slave.butt = random(2, 5);
			slave.anus = 2;
			slave.weight = random(-80, 20);
			slave.muscles = random(0, 15);
			slave.shoulders = random(0, 2);
			slave.intelligence = random(-95, 50);
			slave.piercing.nose.weight = 2;
			slave.career = "a slave";
			slave.fetish = "pregnancy";
			slave.behavioralQuirk = "advocate";
			slave.sexualQuirk = "caring";
			return slave;
		}
	}
};


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

	eventPrerequisites() {
		return [
			() => V.seeDicks !== 100
		];
	}

	get eventName() {
		return "Farm Virgin Cow";
	}

	execute(node) {
		const slave = makeSlave();
		const {
			His,
			he, his, him, woman,
		} = getPronouns(slave);
		let r = [];

		r.push(`As you're working on some boring administrative matters, a courier comes to your office, delivering a satchel of documents. Opening it up to check who would go through the trouble of having something hand-delivered, you find out that the Free Cities Farmers Association (FCFA) has chosen your arcology to hold the next of their semi-regular conventions, in which prominent members of the industry will gather and new developments be presented. Sounds like a mixture of a conference and a trade show, and the association has rented out the convention center in the mid-levels of your demesne for more than a week. That'll certainly boost the local economy a bit.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`From the looks of all the brochures and extra information included, the association's president is well-versed in how the Free Cities are run... leading him to promote his group directly to you. And not only that — in an effort to curry favor, he included a slave's records, including an offer to buy the fresh and yet unused virgin cow from his own stable for an almost ridiculously low price.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(App.UI.DOM.makeElement("span", `Checking ${his} stats and the videos included, you see the young ${woman} is healthy and well cared for, with a nice pair of tits. ${His} records indicate that ${he} is very fertile and has excellent genes, promising a nice line of slaves to be bred in ${his} womb. With the registration and all, it'll still just take ${cashFormat(1500)} to buy ${him} and add ${him} to your own slave lineup.`, "note"));

		App.Events.addParagraph(node, r);

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		const contractCost = 1500;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`Making a video call to tell the association president you accept the asking price for ${slave.slaveName}, you're drawn into a conversation with the skillful speaker, at the end of which you agree to be the honored guest for their convention. Who knows, new developments in the slave farming industry might actually prove interesting to learn about, and the pleasure of acquiring a new slave will make it worth your while even if it turns out to be boring. In short notice, the young ${woman} you just bought is brought to your penthouse where ${he} obediently strips and stands ready for your inspection.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const slave = GenerateNewSlave("XX", {maxAge: 19, disableDisability: 1});
			slave.origin = "$He was a virgin cow in the stable of a slaveholding farmer before being sold to you.";
			slave.devotion = random(25, 50);
			slave.trust = random(25, 50);
			setHealth(slave, jsRandom(30, 60), undefined, undefined, 0, 0);
			slave.face = random(-30, 30);
			slave.skill.vaginal = 0;
			slave.skill.anal = 15;
			slave.skill.oral = 15;
			slave.skill.entertainment = 0;
			slave.skill.whoring = 0;
			slave.boobs = random(6, 12) * 100;
			slave.vagina = 0;
			slave.trueVirgin = 1;
			slave.vaginaLube = 1;
			slave.labia = 2;
			slave.ovaries = 1;
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			slave.hips = random(0, 2);
			slave.butt = random(1, 4);
			slave.anus = 1;
			slave.weight = random(-80, 20);
			slave.muscles = random(0, 40);
			slave.shoulders = random(-1, 2);
			slave.intelligence = random(-95, 50);
			slave.piercing.nose.weight = 2;
			slave.career = "a slave";
			slave.fetish = "pregnancy";
			slave.behavioralQuirk = "insecure";
			slave.sexualQuirk = "tease";
			return slave;
		}
	}
};


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

	eventPrerequisites() {
		return [
			() => V.seeDicks !== 100
		];
	}

	get eventName() {
		return "Female Debtor";
	}

	execute(node) {
		const slave = makeSlave();
		const {
			He,
			he, his, him,
		} = getPronouns(slave);
		let r = [];
		r.push(`One of the tenants in your arcology has not paid rent in some time. In the Free Cities, debtors may be enslaved once their debt reaches a fair price for their enslavement. Your tenant has reached this point. ${He} comes to see you, sobbing in terror; you are pleased to see that ${he} is female and of appropriate age.`);
		App.Events.addParagraph(node, r);
		const contractCost = 1000;
		const cost = slaveCost(slave) - contractCost;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		responses.push(new App.Events.Result(`Sell ${him} immediately`, sell, `This will bring in ${cashFormat(cost)}`));

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`${He} sobs as the biometric scanners scrupulously record ${his} every particular as belonging not to a person but to a piece of human property. ${He} tries to resist placing ${his} biometric signature in testament to the truth of ${his} debt, but when you observe that the alternative is death, ${he} complies. The process is completed with a distinct anticlimax: ${he} is one of your slaves now.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function sell() {
			const el = new DocumentFragment();
			let r = [];
			cashX(cost, "slaveTransfer");
			r.push(`${He} sobs as the biometric scanners scrupulously record ${his} every particular as belonging not to a person but to a piece of human property. ${He} tries to resist placing ${his} biometric signature in testament to the truth of ${his} debt, but when you observe that the alternative is death, ${he} complies. A purchasing agent appears to take ${him} away.`);
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const slave = GenerateNewSlave("XX", {minAge: 15, disableDisability: 1, race: "nonslave"});
			slave.origin = "$He was enslaved after $he fell into debt to you.";
			slave.devotion = random(-45, -25);
			slave.trust = random(-15, 0);
			return slave;
		}
	}
};


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

	eventPrerequisites() {
		return [
			() => !!S.HeadGirl,
			() => S.HeadGirl.devotion > 50,
			() => S.HeadGirl.skill.entertainment >= 100,
		];
	}

	get eventName() {
		return "Female Recruit";
	}

	execute(node) {
		const slave = makeSlave();
		const {
			He,
			he, his, him, himself, girl,
		} = getPronouns(slave);
		const {title: Master} = getEnunciation(slave);
		const {he2, him2} = getPronouns(S.HeadGirl || {pronoun: 1}).appendSuffix("2");
		const title = (V.PC.title !== 0) ? `Sir` : `Ma'am`;
		let r = [];
		r.push(`Your Head Girl sends you a discreet message that ${he2} may have found a slave for you. ${S.HeadGirl.slaveName} duly ushers a ${girl} into your office. ${He} looks very young, like a dissolute party ${girl}. ${He} bites ${his} lip nervously when ${he} sees you, and looks to ${S.HeadGirl.slaveName} for guidance. ${S.HeadGirl.slaveName} nods at ${him} reassuringly, so ${he} explains ${himself}.`);
		App.Events.addParagraph(node, r);
		r = [];

		r.push(Spoken(slave, `"${title}, my name is ${slave.slaveName}. I'm, um, bored, I guess. I go to clubs and get drunk and fuck guys and it's just kinda boring. I thought it would be different when I turned ${num(slave.actualAge)}, but that was a couple months ago and, well, nothing's different. I saw ${S.HeadGirl.slaveName} and ${he2} was just so graceful and beautiful and ${he2} seemed so confident in what ${he2} was doing and who ${he2} was and I talked to ${him2} and ${he2} said ${he2} was your Head Girl and... I want to be like ${him2}. Can I be your slave? I'd be good, I'm good at sucking dicks and stuff."`));
		r.push(`${He} seems to be a little naïve about sexual slavery, but there's no need to tell ${him} that.`);
		App.Events.addParagraph(node, r);

		const contractCost = 1000;
		const cost = slaveCost(slave) - contractCost;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		responses.push(new App.Events.Result(`Sell ${him} immediately`, sell, `This will bring in ${cashFormat(cost)}`));

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`You complete the legalities and biometric scanning quickly and without fuss. ${slave.slaveName} bounces nervously on ${his} heels. Finally ${he} works up ${his} courage and asks,`);
			if (App.Data.clothes.get(S.HeadGirl.clothes).exposure <= 3) {
				r.push(Spoken(slave, `"Can I have ${S.HeadGirl.clothes} like ${S.HeadGirl.slaveName}?"`));
			} else {
				r.push(Spoken(slave, `"Can I work with ${S.HeadGirl.slaveName}?"`));
			}
			r.push(`Your sternly tell ${him} to call you ${properMaster()}, to ask questions only with permission, and to strip. ${He} looks at ${S.HeadGirl.slaveName}, but ${S.HeadGirl.slaveName} returns ${his} look with no compassion at all and tells ${him} to do what you say. Looking suddenly fearful, ${slave.slaveName} strips. Once your inspection of ${his} body reaches ${his} anus, ${he} becomes suddenly nervous.`);
			r.push(Spoken(slave, `"A-am I going to have t-to do butt stuff, ${Master}?"`));
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function sell() {
			const el = new DocumentFragment();
			let r = [];
			cashX(cost, "slaveTransfer");
			r.push(`You complete the legalities and biometric scanning quickly and without fuss. ${slave.slaveName} bounces nervously on ${his} heels. Finally ${he} works up ${his} courage and asks,`);
			if (App.Data.clothes.get(S.HeadGirl.clothes).exposure <= 3) {
				r.push(Spoken(slave, `"Can I have ${S.HeadGirl.clothes} like ${S.HeadGirl.slaveName}?"`));
			} else {
				r.push(Spoken(slave, `"Can I work with ${S.HeadGirl.slaveName}?"`));
			}
			r.push(`Your answer appears in the form of a purchasing agent, here to take ${him} away. As he restrains the disbelieving ${girl}, you tell ${him} ${he}'s been purchased by a brothel, so ${he}'s going to be fucked about 70,000 times before ${he} gets to be too old and is retired, so ${he} can be sure ${he} won't be bored. ${He} releases a wail of utter despair, quickly cut off by a sturdy bag being fastened over ${his} head.`);
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const pram = new GenerateNewSlavePram();
			pram.minAge = (V.pedo_mode === 1 ? 11 : 16);
			pram.maxAge = 19;
			pram.ageOverridesPedoMode = 1;
			pram.disableDisability = 1;
			pram.race = "nonslave";
			const slave = GenerateNewSlave("XX", pram);
			slave.origin = "$He offered $himself to you as a slave to escape a life of boredom.";
			slave.career = "a party girl";
			slave.devotion = random(25, 45);
			slave.trust = random(25, 45);
			setHealth(slave, jsRandom(0, 20), undefined, undefined, undefined, 0);
			slave.anus = 0;
			slave.vagina = 1;
			slave.skill.vaginal = 15;
			slave.skill.oral = 15;
			slave.skill.anal = 0;
			slave.piercing.ear.weight = 1;
			slave.piercing.nose.weight = 1;
			slave.piercing.eyebrow.weight = 1;
			slave.piercing.navel.weight = 1;
			slave.behavioralFlaw = "arrogant";
			if (["apathetic", "hates oral", "repressed"].includes(slave.sexualFlaw)) {
				slave.sexualFlaw = "none";
			}
			slave.energy = random(60, 90);
			//TODO: make sexual orientation dependent on HG appearance?
			slave.attrXX = random(60, 90);
			slave.attrXY = random(60, 90);
			generateSalonModifications(slave);
			slave.hStyle = "undercut";
			//Replaced custom hairstyle with a near-identical standard one that plays nice with images. Original custom hairstyle below.
			//slave.hStyle = "fashionable for a Free Cities girl, long, with the left half shaved";
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			return slave;
		}
	}
};


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

	eventPrerequisites() {
		return [
			() => V.seeDicks !== 100,
			() => V.mercenaries >= 5,
			() => V.seePreg !== 0
		];
	}

	get eventName() {
		return "Female Runaway";
	}

	execute(node) {
		const slave = makeSlave();
		const {
			He,
			he, his, him, girl, woman,
		} = getPronouns(slave);
		let r = [];

		r.push(`A report about a successful operation by your mercenaries waits at your desk when you come in the office this morning. Turns out they tracked a brutal gang that was waylaying travelers near the Free City and stormed their hideout last night. All of the criminals were killed in the process, preventing proper punishments or more... creative uses for them. From the videos of the raid and the fanatic way the men fought to the last man, it seems that this was unavoidable, so you send a quick note of approval to their commander.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`After the fighting died down, they found a ${woman} inside the compound, harshly used and seemingly the center of many gangbangs there. A scan of ${his} biometric data revealed that ${he} is in fact a slave that ran away about two months ago — into a much worse situation after being caught by the gang, as it turns out. Countless dicks have stretched ${his} pussy and ass wide,`);
		if (slave.physicalAge >= slave.pubertyAgeXX) {
			r.push(`${he} is pregnant with some dead criminal bastard's offspring,`);
		}
		r.push(`and they've decorated ${him} with numerous piercings. As you notify the owner that her property has been retrieved, the woman is distraught at the state of her merchandise, grumbling that a once quite valuable ${girl} is now worth almost nothing. Seems she's unwilling to invest her time and money in caring for the slave. With a sigh, the slave-mistress whips out her smartphone and starts to set up a selling offer in one of the popular slave trading apps.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(App.UI.DOM.makeElement("span", `The young ${woman} has been used and abused quite a bit, making ${him} deathly terrified about what might happen to ${him} next. ${He} has partially resigned to be nothing but a fuckhole. You can get ${him} cheap from the owner, it'll be just ${cashFormat(1000)}.`, "note"));

		App.Events.addParagraph(node, r);
		const contractCost = 1000;
		const cost = slaveCost(slave) - contractCost;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		responses.push(new App.Events.Result(`Sell ${him} immediately`, sell, `This will bring in ${cashFormat(cost)}`));

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`With a few keystrokes, you wire the payment to the slave${girl}'s owner, then have your guardsmen bring ${him} from the station infirmary to your penthouse. ${He} is led to stand before you, shivering in terror and looking at ${his} feet. Only after an insistent command does ${he} look up long enough to be biometrically scanned and registered as your property.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function sell() {
			const el = new DocumentFragment();
			let r = [];
			cashX(cost, "slaveTransfer");
			r.push(`With a few keystrokes, you wire the payment to the slave${girl}'s owner, then have your guardsmen bring ${him} from the station infirmary to your penthouse. ${He} is led to stand before you, shivering in terror and looking at ${his} feet. Only after an insistent command does ${he} look up long enough to be biometrically scanned and registered as your property. Frowning at the emotional state the gang left ${him} in, you're relieved when your guards take ${him} away a moment later, to be transported to the office of a slave broker you know well. Oh well, now ${he}'ll be someone else's problem to fix up.`);
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const slave = GenerateNewSlave("XX", {maxAge: 24});
			slave.origin = "$He was a runaway slave captured by a gang outside your arcology. You bought $him cheap after $he was harshly used by them.";
			slave.devotion = random(0, 25);
			slave.trust = -20;
			generateSalonModifications(slave);
			setHealth(slave, jsRandom(-50, -30), normalRandInt(10, 3), normalRandInt(10, 3), Math.max(normalRandInt(1, 0.5), 50));
			slave.face = random(0, 20);
			slave.skill.vaginal = 15;
			slave.skill.anal = 15;
			slave.skill.oral = 15;
			slave.skill.whoring = 0;
			slave.boobs = random(3, 7) * 100;
			slave.vagina = 3;
			slave.labia = 1;
			slave.ovaries = 1;
			if (slave.physicalAge >= slave.pubertyAgeXX) {
				slave.preg = 7;
				slave.pregType = 1;
				slave.pregWeek = slave.preg;
				slave.pregKnown = 1;
				SetBellySize(slave);
			}
			slave.weight = random(-80, 20);
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			slave.anus = 3;
			slave.intelligence = random(-50, 50);
			slave.career = "a slave";
			slave.fetish = "submissive";
			slave.behavioralFlaw = "hates men";
			slave.behavioralQuirk = "insecure";
			slave.sexualFlaw = "apathetic";
			slave.piercing.lips.weight = 1;
			slave.piercing.tongue.weight = 1;
			slave.piercing.ear.weight = 1;
			slave.piercing.nose.weight = 2;
			slave.piercing.navel.weight = 1;
			slave.piercing.nipple.weight = 2;
			slave.piercing.genitals.weight = 2;
			slave.custom.tattoo = "$He has a barcode tattooed on $his neck.";
			slave.attrXY = 20;
			return slave;
		}
	}
};


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

	eventPrerequisites() {
		return [
			() => V.seeDicks !== 100,
		];
	}

	get eventName() {
		return "Female Sold Debt";
	}

	execute(node) {
		const slave = makeSlave();
		const {
			He, His,
			he, his, him, woman,
		} = getPronouns(slave);
		let r = [];

		r.push(`Your desk flags a report of the arcology security service for your immediate attention. As it turns out, a number of pretty liberal students from`);
		if (slave.actualAge >= 18) {
			r.push(`a college`);
		} else if (slave.actualAge >= 14) {
			r.push(`a high school`);
		} else if (slave.actualAge >= 11) {
			r.push(`a junior high school`);
		} else {
			r.push(`an elementary school`);
		}
		r.push(`in your arcology led a protest earlier today in the financial district several levels up from their institution. Seems to have been against slavery, for environmentalism, or some other nonsense that you skip over reading. The really interesting thing is what happened during the protest anyways. Things became a bit unruly between protesters and some counter-protesters — and at some point rocks started to fly... all of which would barely be worth a mention, if the vintage sports car of a prominent resident hadn't been parked on the same street.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`One dented hood and smashed windshield later, someone was in big trouble. The ever-present camera surveillance in your arcology made it easy to track the rock to the hand of the person who threw it — a quite pretty young ${woman}, who immediately got arrested and is awaiting sentencing in the lock-up right now. The video of ${him} getting booked — complete with a thorough strip-search (since all the officers agreed ${he} 'had to be hiding something') is definitively worth saving to a private folder.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`Given the damage to an expensive classic car and the meager balance of ${his} bank accounts, this student is definitively up for enslavement. There's no way ${he} or even anyone related to ${him} could come up with the cash. All of which leaves you with an opportunity... the car's owner hasn't seen ${him} yet, so you could conceivably approach him and buy the debt for this beauty off him. Better be quick, if he realizes what is waiting in a cell for him, you doubt he'd sell ${him} at all.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(App.UI.DOM.makeElement("span", `${His} debt will cost ${cashFormat(5000)} to pay off, with the usual ${cashFormat(1000)} in registration fees afterward. Alternatively, you could buy ${him} and sell ${him}.`, "note"));

		App.Events.addParagraph(node, r);
		const contractCost = 6000;
		const cost = slaveCost(slave) - contractCost;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		responses.push(new App.Events.Result(`Sell ${him} immediately`, sell, `This will bring in ${cashFormat(cost)}`));

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`Contacting the wealthy resident, you apologize for his inconvenience and offer to 'deal with' the matter personally. He is content with not having the hassle and agrees with little thought, leaving you owning the debt of the unfortunate student. Making your way to the guard station where ${he} is being kept, you tell the young ${woman} ${he}'s getting out of jail right away. ${He} cooperates to having ${his} biometric readings taken and logged, only later realizing this isn't for ${his} release but to register ${him} as a slave. In shock and with tears in ${his} eyes, ${he} dejectedly follows the guard you summon to have ${him} brought to the slave quarters.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function sell() {
			const el = new DocumentFragment();
			let r = [];
			cashX(cost, "slaveTransfer");
			r.push(`Contacting the wealthy resident, you apologize for his inconvenience and offer to 'deal with' the matter personally. He is content with not having the hassle and agrees with little thought, leaving you owning the debt of the unfortunate student. Making your way to the guard station where ${he} is being kept, you tell the young ${woman} ${he}'s getting out of jail right away. ${He} cooperates to having ${his} biometric readings taken and logged, only later realizing this isn't for ${his} release but to register ${him} as a slave. In shock and with tears in ${his} eyes, ${he} dejectedly follows the guard you summon to have ${him} brought to the slave broker you sold ${him} to.`);
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const slave = GenerateNewSlave("XX", {
				minAge: 13, maxAge: 21, disableDisability: 1, race: "nonslave"
			});
			generateSalonModifications(slave);
			slave.origin = "$He got into debt for damaging someone's property during a student protest and you bought out $his debt.";
			slave.devotion = random(-25, 0);
			slave.trust = random(-20, -5);
			setHealth(slave, jsRandom(20, 40), undefined, undefined, undefined, 10);
			slave.face = random(20, 60);
			slave.skill.vaginal = random(0, 15);
			slave.skill.anal = 0;
			slave.skill.oral = random(0, 15);
			slave.skill.whoring = 0;
			slave.boobs = random(2, 6) * 100;
			slave.vagina = 1;
			slave.labia = 0;
			slave.clit = 0;
			slave.ovaries = 1;
			slave.preg = -1;
			slave.anus = 0;
			slave.weight = 0;
			slave.muscles = 20;
			slave.intelligence = random(16, 90);
			slave.intelligenceImplant = 15;
			slave.teeth = "normal";
			slave.career = "a student";
			slave.behavioralFlaw = "liberated";
			return slave;
		}
	}
};


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

	eventPrerequisites() {
		return [
			() => V.seeDicks !== 100,
		];
	}

	get eventName() {
		return "Female Sold Debt";
	}

	execute(node) {
		const slave = makeSlave();
		const {
			He, His,
			he, his, him, himself, woman,
		} = getPronouns(slave);
		let r = [];

		r.push(`Your desk flags a report of the arcology security service for your immediate attention. As it turns out, a number of rather liberal students from`);
		if (slave.actualAge >= 18) {
			r.push(`a college`);
		} else if (slave.actualAge >= 14) {
			r.push(`a high school`);
		} else if (slave.actualAge >= 11) {
			r.push(`a junior high school`);
		} else {
			r.push(`an elementary school`);
		}
		r.push(`in your arcology led a protest earlier today in the financial district several levels up from their institution. Seems to have been against slavery, for environmentalism, or some other nonsense that you skip over reading. The really interesting thing is what happened during the protest anyways. Things became a bit unruly between protesters and some counter-protesters — and at some point rocks started to fly... all of which would barely be worth a mention, if the vintage sports car of a prominent resident hadn't been parked on the same street.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`One dented hood and smashed windshield later, someone was in big trouble. The ever-present camera surveillance in your arcology made it easy to track the rock to the hand of the person who threw it — a rather fat young ${woman}, who immediately got arrested and is awaiting sentencing in the lock-up right now. The video of ${him} getting booked — complete with a thorough strip-search by a new recruit (since all the officers agreed ${he} 'had to be hiding something') was definitely amusing. ${His} reaction was priceless.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`Given the damage to an expensive classic car and the meager balance of ${his} bank accounts, this student is definitively up for enslavement. There's no way ${he} or even anyone related to ${him} could come up with the cash.`);
		if (V.arcologies[0].FSHedonisticDecadence !== "unset") {
			r.push(`All of which leaves you with an opportunity... the car's owner hasn't seen ${him} yet, so you could conceivably approach him and buy the debt for this beauty off him. Better be quick, if he realizes what is waiting in a cell for him, you doubt he'd sell ${him} at all.`);
		} else {
			r.push(`Most slavers wouldn't give such a bloated slave a second look, but your eyes are keen; there is a rather pretty face buried under all that flab. With a bit of work, ${he} can be turned into a rather valuable asset; also it's always fun to break a haughty bitch into an obedient slut.`);
		}
		App.Events.addParagraph(node, r);
		r = [];
		r.push(App.UI.DOM.makeElement("span", `${His} debt will cost ${cashFormat(5000)} to pay off, with the usual ${cashFormat(1000)} in registration fees afterward. Alternatively, you could buy ${him} and sell ${him}.`, "note"));

		App.Events.addParagraph(node, r);
		const contractCost = 6000;
		const cost = slaveCost(slave) - contractCost;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		responses.push(new App.Events.Result(`Sell ${him} immediately`, sell, `This will bring in ${cashFormat(cost)}`));

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`Contacting the wealthy resident, you apologize for his inconvenience and offer to 'deal with' the matter personally. He is content with not having the hassle and agrees with little thought, leaving you owning the debt of the unfortunate student. Making your way to the guard station where ${he} is being kept, you tell the young ${woman} ${he}'s getting out of jail right away. ${He} cooperates to having ${his} biometric readings taken and logged, only later realizing this isn't for ${his} release but to register ${him} as a slave. ${He} makes a poor decision to rebel against you on the way to the slave quarters, but ${his} jiggling mass makes it a pathetically short distance before tiring and dejectedly following the guard the rest of the way.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function sell() {
			const el = new DocumentFragment();
			let r = [];
			cashX(cost, "slaveTransfer");
			r.push(`Contacting the wealthy resident, you apologize for his inconvenience and offer to 'deal with' the matter personally. He is content with not having the hassle and agrees with little thought, leaving you owning the debt of the unfortunate student. Making your way to the guard station where ${he} is being kept, you tell the young ${woman} ${he}'s getting out of jail right away. ${He} cooperates to having ${his} biometric readings taken and logged, only later realizing this isn't for ${his} release but to register ${him} as a slave. ${He} makes a poor decision to rebel against ${his} guard you summoned to have ${him} brought to the slave broker you sold ${him} to, earning ${himself} a taser shock and a degrading cart ride with ${his} ass bare for all to see.`);
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const slave = GenerateNewSlave("XX", {
				minAge: 13, maxAge: 27, disableDisability: 1, race: "nonslave"
			});
			slave.origin = "$He got into debt for damaging someone's property during a student protest and you bought out $his debt.";
			slave.devotion = -100;
			slave.trust = 60;
			setHealth(slave, jsRandom(-20, 20), undefined, undefined, undefined, 10);
			slave.face = random(80, 100);
			slave.faceShape = "sensual";
			slave.skill.vaginal = 0;
			slave.skill.anal = 0;
			slave.skill.oral = random(0, 30);
			slave.skill.whoring = 0;
			slave.boobs = random(2, 4) * 100;
			slave.vagina = 0;
			slave.labia = 0;
			slave.clit = 0;
			slave.ovaries = 1;
			slave.preg = -1;
			slave.anus = 0;
			slave.weight = random(100, 180);
			slave.muscles = random(-20, 0);
			slave.intelligence = random(-50, 90);
			slave.intelligenceImplant = 15;
			slave.teeth = "normal";
			slave.career = "a student";
			slave.behavioralFlaw = "hates men";
			slave.sexualFlaw = "hates penetration";
			slave.hStyle = "strip";
			slave.hLength = 5;
			slave.pubicHStyle = "very bushy";
			slave.underArmHStyle = "bushy";
			slave.piercing.nose.weight = 1;
			slave.piercing.tongue.weight = 1;
			slave.piercing.ear.weight = 2;
			slave.piercing.nipple.weight = 1;
			slave.piercing.lips.weight = 1;
			slave.piercing.vagina.weight = 1;
			slave.piercing.eyebrow.weight = 1;
			slave.piercing.navel.weight = 1;
			slave.override_H_Color = 1;
			slave.hColor = either("blue", "green", "purple");
			return slave;
		}
	}
};


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

	eventPrerequisites() {
		return [
			() => V.seeDicks !== 100,
		];
	}

	get eventName() {
		return "Female Self Enslave";
	}

	execute(node) {
		const slave = makeSlave();
		const {he, his, him, girl, woman} = getPronouns(slave);
		let r = [];

		r.push(`A (quite unrealistic) blockbuster movie took your arcology by storm recently, causing some curious side effects among the more idealistic type of young people here. The movie plot is about a young woman who sells herself into slavery to be close to a love interest... then wins his adoration and her freedom in the process. Of course, just because it works like that in a movie doesn't mean real life will be the same — which didn't seem to occur to several young women who actually try to put such a plan in action. Mostly, the sudden spike of self-enslavement does lead to a number of handsome college students getting their dicks wet as they enjoy their new status as slaveowners — and not a one freed his love-sick slavegirl either.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`The situation does yield a few business opportunities too, as not all of the guys think just with their dicks. One of them is currently offering his free ${girl} for sale, which your assistant instantly flags for your attention. A video attached to the offer does look quite nice, as the slave${girl} happily poses in the nude for ${his} 'beloved', not knowing that he's planning to sell ${him}.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(App.UI.DOM.makeElement("span", `The young ${woman} will be auctioned off, but you think you should be able to get ${him} for about ${cashFormat(4000)} or so... ${he}'s pretty and a virgin, but the nonexistent sex skills will keep the price relatively low in the end.`, "note"));

		App.Events.addParagraph(node, r);

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		const contractCost = 4000;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`Bidding for the ${girl} and winning ${him} in the auction, you await ${him} and the student selling ${him} in your penthouse. As the young man guides ${him} in, ${he} gives you a properly deferential greeting, then looks wide-eyed at the décor and wealth presented all around. Yet as ${his} 'lover' informs the ${woman} that ${he}'ll belong to you now, tears start flowing down ${his} cheeks as ${his} heart almost audibly breaks. Smiling at the man over the sobbing shape of your newly acquired virgin slave${girl}, you casually push a button to approve the money transfer and he strides out of the room after checking his smartphone for the transfer. On your orders, ${he} strips and submits to biometric scanning, registering ${him} as your property.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const slave = GenerateNewSlave("XX", {maxAge: 21, disableDisability: 1, race: "nonslave"});
			slave.origin = "$He enslaved $himself to be with a man $he loved, only to be sold to you afterward.";
			slave.devotion = random(-30, -5);
			slave.trust = random(-25, -5);
			setHealth(slave, jsRandom(10, 30), undefined, undefined, 0, 0);
			slave.face = random(20, 60);
			slave.faceImplant = 0;
			slave.skill.vaginal = 0;
			slave.skill.anal = 0;
			slave.skill.oral = random(15, 40);
			slave.skill.whoring = 0;
			slave.boobs = random(2, 6) * 100;
			slave.vagina = 0;
			slave.skill.vaginal = 0;
			slave.labia = random(0, 1);
			slave.clit = 0;
			slave.ovaries = 1;
			slave.preg = -1;
			slave.anus = 0;
			slave.weight = 0;
			slave.muscles = 20;
			slave.intelligence = random(-50, 50);
			slave.intelligenceImplant = 15;
			if (slave.physicalAge >= 12) {
				slave.teeth = "normal";
			}
			slave.career = "a student";
			slave.behavioralFlaw = "devout";
			slave.sexualFlaw = "idealistic";
			return slave;
		}
	}
};


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

	eventPrerequisites() {
		return [
			() => V.seeDicks !== 0,
			() => V.rep > 16000,
			() => (random(1, 100) < V.rep/1000) || (V.debugMode > 0 && V.debugModeEventSelection > 0),
			() => V.cash >= 100000
		];
	}

	get eventName() {
		return "Forbidden Love";
	}

	execute(node) {
		const slave = makeSlave();
		const {he, his, him, daughter} = getPronouns(slave);
		const {HeA} = getPronouns(assistant.pronouns().main).appendSuffix("A");
		let r = [];

		r.push(`You receive so many messages, as a noted titan of the new Free Cities world, that ${V.assistant.name} has to be quite draconian in culling them. ${HeA} lets only the most important through to you. One category of message that always gets through regardless of content, though, are lucrative deals with powerful individuals.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`This call is coming from a public kiosk, which is usually an indication that the person on the other end is a transient individual who has decided to take slavery over homelessness and not someone of high society. This call, as you would expect, is different. The moment the person on the other end introduces themselves you immediately recognize why your assistant brought this to your attention. The caller is the King of an old world kingdom, contacting you by an untraceable means due of the conspiratorial nature of his proposal.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`He explains that his ${daughter}, the princess, attempted to marry a man of improper station, and was deflowered by him. For this, ${his} would-be fiancé was executed and ${he} confined to a cell. Finding his ${daughter} impossible to deal with after killing ${his} boyfriend, he's decided he'd rather just be rid of ${him} than have to continue carrying the shame of having such an unruly slut as a member of the royal family.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(App.UI.DOM.makeElement("span", `His offer stands at a firm ${cashFormat(100000)}, but you've seen ${his} exploits; you stand to gain quite the addition to your chattel should you take the offer.`, "note"));

		App.Events.addParagraph(node, r);

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		const contractCost = 100000;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`You agree to purchase the princess and wire the money. The next day, a rather expensive-looking VTOL comes and drops off an angry slave wearing fine clothing and a pair of shackles on each set of limbs. You truly wish ${he} came gagged after the string of insults and slurs ${he} hurls at you during the enslavement process.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const slave = GenerateNewSlave("XX", {minAge: 14, maxAge: 22, disableDisability: 1});
			slave.face = random(90, 100);
			slave.intelligence = random(60, 100);
			slave.intelligenceImplant = 30;
			slave.origin = "You purchased $him as a favor to $his father.";
			slave.career = "a princess";
			slave.prestige = 2;
			slave.prestigeDesc = "$He was once the princess of an old world kingdom up until $his loose habits caught up with $him and $he was exiled.";
			slave.devotion = random(-100, -90);
			slave.trust = random(25, 85);
			setHealth(slave, jsRandom(0, 20), 0, 0, 0, 0);
			slave.skill.vaginal = 30;
			slave.skill.anal = 0;
			slave.skill.oral = 50;
			slave.skill.entertainment = 0;
			slave.skill.whoring = 50;
			slave.vagina = 1;
			slave.vaginaLube = random(1, 2);
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			slave.anus = 0;
			slave.weight = random(-20, 0);
			slave.waist = random(-40, 0);
			slave.muscles = 0;
			slave.shoulders = random(-2, 0);
			slave.behavioralFlaw = "arrogant";
			slave.canRecruit = 0;
			return slave;
		}
	}
};


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

	eventPrerequisites() {
		return [
			() => V.seeDicks !== 0
		];
	}

	get eventName() {
		return "Gang Leader";
	}

	execute(node) {
		const slave = makeSlave();
		const {
			He,
			he, his, him,
		} = getPronouns(slave);
		const {womanP} = getPronouns(V.PC).appendSuffix("P");
		let r = [];

		r.push(`Your desk flags a video message as coming from an... interesting source. It is from one of the minor gangs on the lower levels of your arcology — or not so minor any more, as a pop-up tells you of the power-grab they made barely an hour ago. Curious what they might want, you take the call.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`A tough-looking man with multiple tattoos and a wife-beater shirt on appears on the screen, nodding in recognition. "Hey there, boss-${(V.PC.customTitle) ? V.PC.customTitle : womanP}! Just calling to pay my respects. Those weak-ass punks that were squatting in this section won't bother you any more... we took care of 'em. Now it's just all law-abiding citizens and shit down here — so you don't have to send your security goons to check us out, you know." Your assistant throws up a list of the gang's numerous criminal activities, as well as the estimates what other enterprises they've just taken over. Nothing much out of the ordinary and with the shape the world is in, you've got bigger problems. The recommendation is to observe but mostly ignore them, which you casually confirm with a flick of your finger.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`Clearing his throat, the new gang leader on level twenty-five continues, "But that's not all; we got a bit of tribute for ya." Waving his hand, he makes room for two muscular bruisers carrying the unconscious form of another man — easily recognizable from ${his} muscled build and numerous tattoos as a hardened criminal. The face-recognition software tells you ${he} is the now overthrown gangster boss in that area of the arcology. "Everyone knows what fun things you do with your slaves, so we thought it'd fit for this guy. Gonna throw ${him} in an elevator in a minute and send it up, 'kay? If you make ${him} into a proper brainless slut, you'll have quite a few guys standing in line to have a go. And well, ${he}'d make a capable gladiator in a pit fight too. Have fun with the bastard."`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`The signal is cut suddenly, and just a few moments later, your assistant flags an elevator going up containing a person needing medical attention. Anticipating your wishes, the planning interface of the remote surgery opens up right away, indicating available options for the criminal's feminized face, should you desire.`);

		App.Events.addParagraph(node, r);

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		const contractCost = 1000;
		const cost = slaveCost(slave) - contractCost;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
			responses.push(new App.Events.Result(`Enslave ${him} and arrange immediate feminization surgery`, feminize));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		responses.push(new App.Events.Result(`Sell ${him} immediately`, sell, `This will bring in ${cashFormat(cost)}`));

		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`Opening a voice-link, you call in two security guards to await the elevator and have your new property brought to`);
			if (V.clinic > 0) {
				r.push(`${V.clinicName}`);
			} else {
				r.push(`the remote surgery`);
			}
			r.push(`for treatment; ${his} usurpers banged ${him} up pretty effectively. By the time ${he} comes to after the operation and quick-heal treatment, the legalities of enslavement are completed, leaving you with another slave registered as your property. ${He} is, of course, horrified and furious at ${his} enslavement; when you show ${him} the feminine face ${he} could have woken up with, ${he} redoubles ${his} blustering rage, but you can sense a cowed fear in the set of ${his} broad shoulders and square jaw as ${he} realizes how much control you have over ${him} now.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function feminize() {
			const node = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`Opening a voice-link, you call in two security guards to await the elevator and have your new property brought to the remote surgery. After some fun playing with various sliders and buttons in its settings, you have the machine start on modding the man into a new dickgirl with a pleasing set of features. By the time ${he} comes to after the operation and quick-heal treatment, the legalities of enslavement are completed too, leaving you with another slave registered as your property. Of course, ${he} is naturally horrified and furious with you; where there was once a tough young man's square jaw, there is now a definitively feminine face which looks rather cute when angry. The rest of ${him} is still broad-shouldered and muscular, with all the tattoos and a well-sized dick — but you can always mod that later if you want to.`);
			slave.origin = "$He was formerly the (male) leader of a gang on the lower levels of your arcology, until $he was overthrown and given to you as 'tribute' by a rival gang who wished to see $him stripped of $his manhood.";
			slave.faceImplant = 15;
			slave.face = Math.clamp(slave.face + slave.faceImplant, -100, 100);
			slave.faceShape = "normal";
			surgeryDamage(slave, 10);
			slave.devotion = Math.clamp(slave.devotion - 5, -100, 100);
			slave.trust = Math.clamp(slave.trust - 10, -100, 100);
			App.Events.addNode(node, r);
			node.append(App.UI.newSlaveIntro(slave));
			return node;
		}

		function sell() {
			const el = new DocumentFragment();
			let r = [];
			cashX(cost, "slaveTransfer");
			r.push(`Opening a voice-link, you call in two security guards to await the elevator and have your new property brought to the remote surgery. After some fun playing with various sliders and buttons in its settings, you have the machine start on modding the man into a new dickgirl with a pleasing set of features. By the time ${he} comes to after the operation and quick-heal treatment, the legalities of enslavement are completed too, leaving you with another slave registered as your property. Of course, ${he} is naturally horrified and furious with you, but this is nothing to the terror that dawns when a purchasing agent appears to take ${him} away.`);
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const slave = GenerateNewSlave("XY", {minAge: 17, maxAge: 25, disableDisability: 1});
			generateSalonModifications(slave);
			slave.origin = "$He was the leader of a gang in the lower levels of your arcology, until $he was overthrown and given to you as 'tribute' by a rival gang.";
			slave.devotion = random(-70, -40);
			slave.trust = random(-20, -5);
			setHealth(slave, jsRandom(0, 20));
			slave.faceShape = "masculine";
			slave.skill.anal = 0;
			slave.skill.oral = 0;
			slave.skill.whoring = 0;
			slave.skill.combat = 1;
			slave.hLength = random(10, 30);
			slave.boobs = 150;
			slave.vagina = -1;
			slave.clit = 0;
			slave.ovaries = 0;
			slave.preg = 0;
			slave.dick = random(3, 5);
			slave.balls = random(2, 4);
			slave.scrotum = slave.balls;
			slave.anus = 0;
			slave.weight = 0;
			slave.muscles = 50;
			slave.shoulders = Math.max(slave.shoulders, 1);
			slave.career = "a criminal";
			slave.sexualFlaw = "hates oral";
			slave.behavioralFlaw = "arrogant";
			slave.piercing.tongue.weight = 1;
			slave.piercing.eyebrow.weight = 1;
			slave.custom.tattoo = "$He has a tear tattooed under $his left eye.";
			return slave;
		}
	}
};


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

	eventPrerequisites() {
		return [
			() => V.PC.dick !== 0,
			() => V.PC.vagina === -1,
			() => V.PC.boobs < 300,
			() => V.PC.title === 1,
			() => ((V.rep/250) > random(1, 100)) || (V.debugMode > 0 && V.debugModeEventSelection > 0),
		];
	}

	get eventName() {
		return "Handsome PC";
	}

	get weight() { return 2; }

	execute(node) {
		const slave = makeSlave();
		const {
			He, His,
			he, his, him, girl,
		} = getPronouns(slave);
		const {heA, himselfA} = getPronouns(assistant.pronouns().main).appendSuffix("A");
		let r = [];
		r.push(`${capFirstChar(V.assistant.name)} alerts you that a supplicant has arrived at the door to the penthouse. A constant stream of hopefuls appear at your door, and ${V.assistant.name} makes ${himselfA} invaluable by filtering them. One of the few categories of applicant that is always admitted is people willing to be enslaved for some reason; this is just such a ${girl}.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`The young ${girl} who is admitted to your office quails a bit at the sight of you, and you believe you can detect a bit of infatuation there, too. You wordlessly query ${V.assistant.name}, and ${heA} turns to the massive task of sorting through arcology records to come up with a possible explanation. Meanwhile, you start interviewing the potential slave. It appears that ${he} left home, in a settlement near the arcology, right after ${his} ${ordinalSuffix(slave.actualAge)} birthday and came straight here. ${He}'s no innocent, and not destitute, and you're surprised ${he}'s done something this foolish.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`After a short while, your assistant whispers in your earpiece,`);
		if (V.assistant.personality <= 0) {
			r.push(`${properTitle()},`);
		} else {
			r.push(`"Sweetheart,`);
		}
		r.push(`${he} doesn't live here. Look at this." ${heA} pulls up footage of a public event several weeks ago, and the ${girl} is in the crowd, staring at you with limpid eyes. Rather than confronting ${him} directly, you probe the subject, and after some evasion ${he} admits that yes, ${he} did come here out of infatuation with you.`);
		r.push(Spoken(slave, `"Pretty fuckin' stupid,"`));
		r.push(`${he} admits.`);
		r.push(Spoken(slave, `"But I've come too far now. I just really want to live here. With you, I guess. If that means being your slave, that's okay. Can I be your house servant, maybe?"`));
		App.Events.addParagraph(node, r);

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		const contractCost = 1000;
		const cost = slaveCost(slave) - contractCost;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		responses.push(new App.Events.Result(`Sell ${him} immediately`, sell, `This will bring in ${cashFormat(cost)}`));
		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`You put ${him} through the enslavement procedures. ${He} looks doubtful, obviously wondering whether ${he}'s made a huge mistake. ${He}'s legally your property, now; you can fulfill ${his} wishes for a gentler assignment near you, or not. ${His} suspicion that ${he}'s blundered into something terrible no longer matters.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function sell() {
			const el = new DocumentFragment();
			let r = [];
			cashX(cost, "slaveTransfer");
			r.push(`You put ${him} through the enslavement procedures. ${He} only realizes ${his} mistake when ${his} purchaser's agent appears to take ${him} away. ${He} looks at you in total unwillingness to believe you'd do such a thing; you observe politely that ${he}'s likely to receive an easy assignment like being a house servant in about twenty years. In the meantime, you continue, ${he}'s been purchased by a brothel, so ${he}'s going to be fucked about 70,000 times before then. ${He} releases a wail of utter despair, quickly cut off by a sturdy bag being fastened over ${his} head.`);
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const slave = GenerateNewSlave("XX", {
				minAge: random(12, 16), maxAge: 19, disableDisability: 1, race: "nonslave"
			});
			generateSalonModifications(slave);
			slave.origin = "$He asked to be enslaved out of naïve infatuation with you.";
			slave.devotion = random(25, 30);
			slave.trust = random(-15, -10);
			setHealth(slave, jsRandom(0, 20), undefined, undefined, 0, 0);
			slave.anus = 1;
			slave.skill.anal = 15;
			slave.skill.oral = 15;
			if (slave.vagina > 0) {
				slave.vagina = 1;
				slave.skill.vaginal = 15;
			}
			slave.birthWeek = random(0, 2);
			slave.piercing.ear.weight = either(0, 1);
			return slave;
		}
	}
};


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

	eventPrerequisites() {
		return [
			() => V.seeDicks !== 100,
			() => V.PC.skill.hacking >= 50,
			() => (random(0, 100) < V.PC.skill.hacking) || (V.debugMode > 0 && V.debugModeEventSelection > 0)
		];
	}

	get eventName() {
		return "Held POW";
	}

	execute(node) {
		const slave = makeSlave();
		const {
			He, His,
			he, his, him,
		} = getPronouns(slave);
		let r = [];

		r.push(`While digging through the database of a POW camp for anything of value, you find records of a`);
		if (slave.actualAge > 17) {
			r.push(`rather attractive`);
		} else if (slave.actualAge > 12) {
			r.push(`teenage`);
		} else {
			r.push(`child`);
		}
		r.push(`soldier long abandoned by ${his} nation. You forge false orders to have ${him} transported to a new location, a location that would be trivial for you to obtain ${him} from.`);

		App.Events.addParagraph(node, r);
		r = [];
		r.push(`Upon ${his} inevitable arrival in your penthouse, you see`);
		if (V.seeExtreme === 1) {
			r.push(`the traces of ${his} wounds, that ${he} has been greatly modified for war, and that ${he} had been raped, repeatedly, despite ${his} powerful body.`);
			slave.teeth = "pointy";
			slave.muscles = random(30, 70);
			slave.height = Height.random(slave, {skew: 3, spread: .2, limitMult: [1, 4]});
			slave.chem = 1000;
			slave.attrXX = 0;
			slave.attrXY = 0;
			configureLimbs(slave, "all", 6);
		} else {
			r.push(`the traces of ${his} wounds, that ${he} had been left bound long enough for ${his} body to atrophy, and that ${he} had been raped, repeatedly.`);
		}
		if (V.seePreg === 1) {
			slave.preg = 2;
			slave.pregType = 1;
			slave.pregWeek = 2;
			SetBellySize(slave);
		}
		r.push(`${His} odd behavior suggests that ${his} will to live has nearly been snuffed out. ${He} likely wouldn't have lasted much longer, though it's questionable if ${he} still will if you let ${him} walk free.`);

		App.Events.addParagraph(node, r);
		const contractCost = 5000;
		const cost = slaveCost(slave) - contractCost;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		responses.push(new App.Events.Result(`Sell ${him} immediately`, sell, `This will bring in ${cashFormat(cost)}`));

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`You complete the legalities and biometric scanning quickly and without fuss; ${his} will to fight has long since broken.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function sell() {
			const el = new DocumentFragment();
			let r = [];
			cashX(cost, "slaveTransfer");
			r.push(`You complete the legalities and biometric scanning quickly and without fuss; ${his} will to fight has long since broken. Although you do catch a faint glimmer of joy in ${his} eyes as you tell ${him} ${he}'s been purchased by a notorious Pit Master and will likely spend the rest of ${his} life in combat.`);
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const slave = GenerateNewSlave("XX", {
				minAge: Math.max(V.fertilityAge, 8), maxAge: 22,
				ageOverridesPedoMode: 1, disableDisability: 1
			});
			configureLimbs(slave, "all", 2);
			slave.origin = "You helped free $him from a POW camp after being abandoned by $his country, leaving $him deeply indebted to you.";
			slave.devotion = random(0, 20);
			slave.trust = random(0, 20);
			setHealth(slave, -50, normalRandInt(15, 4), normalRandInt(15, 4), Math.max(normalRandInt(1, 0.5), 0), jsRandom(30, 80));
			slave.muscles = random(-80, 0);
			slave.weight = random(-80, -60);
			slave.waist = random(-40, -20);
			slave.skill.combat = 1;
			slave.boobs = random(3, 6) * 100;
			slave.behavioralFlaw = "odd";
			slave.behavioralQuirk = "insecure";
			slave.sexualFlaw = "self hating";
			slave.sexualQuirk = "unflinching";
			slave.fetish = "masochist";
			slave.fetishStrength = 100;
			slave.fetishKnown = 0;
			slave.vaginaLube = 0;
			slave.collar = "shock punishment";
			slave.energy = 0;
			if (slave.actualAge < 13) {
				slave.career = "a child soldier";
			} else if (random(1, 100) > 50) {
				slave.career = "a mercenary";
			} else {
				slave.career = "a soldier";
			}
			slave.vagina = 3;
			slave.anus = 2;
			return slave;
		}
	}
};


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

	eventPrerequisites() {
		return [
			() => V.seeDicks !== 0,
			() => V.mercenaries >= 5,
			() => V.seePreg !== 0
		];
	}

	get eventName() {
		return "Herm Runaway";
	}

	execute(node) {
		const slave = makeSlave();
		const {
			He,
			he, his, him, girl, woman,
		} = getPronouns(slave);
		let r = [];

		r.push(`A report about a successful operation by your mercenaries waits at your desk when you come in the office this morning. Turns out they tracked a brutal gang that was waylaying travelers near the Free City and stormed their hideout last night. All of the criminals were killed in the process, preventing proper punishments or more... creative uses for them. From the videos of the raid and the fanatic way the men fought to the last man, it seems that this was unavoidable, so you send a quick note of approval to their commander.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`After the fighting died down, they found a ${woman} inside the compound, harshly used and seemingly the center of many gangbangs there. A scan of ${his} biometric data revealed that ${he} is in fact a slave that ran away about two months ago — into a much worse situation after being caught by the gang, as it turns out. Countless dicks have stretched ${his} pussy and ass wide,`);
		if (slave.physicalAge >= slave.pubertyAgeXX) {
			r.push(`${he} is pregnant with some dead criminal's offspring,`);
		}
		r.push(`${he} has been crudely gelded, and they've decorated ${him} with numerous piercings. As you notify the owner that her property has been retrieved, the woman is distraught at the state of her merchandise, grumbling that a once quite valuable ${girl} is now worth almost nothing. Seems she's unwilling to invest her time and money in caring for the slave. With a sigh, the slave-mistress whips out her smartphone and starts to set up a selling offer in one of the popular slave trading apps.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(App.UI.DOM.makeElement("span", `The young dickgirl has been used and abused quite a bit, making ${him} deathly terrified about what might happen to ${him} next. ${He} has partially resigned to be nothing but a fuckhole. You can get ${him} cheap from the owner, it'll be just ${cashFormat(1000)}.`, "note"));

		App.Events.addParagraph(node, r);
		const contractCost = 1000;
		const cost = slaveCost(slave) - contractCost;
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		responses.push(new App.Events.Result(`Sell ${him} immediately`, sell, `This will bring in ${cashFormat(cost)}`));

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`With a few keystrokes, you wire the payment to the slave${girl}'s owner, then have your guardsmen bring ${him} from the station infirmary to your penthouse. ${He} is led to stand before you, shivering in terror and looking at ${his} feet. Only after an insistent command does ${he} look up long enough to be biometrically scanned and registered as your property.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function sell() {
			const el = new DocumentFragment();
			let r = [];
			cashX(cost, "slaveTransfer");
			r.push(`With a few keystrokes, you wire the payment to the slave${girl}'s owner, then have your guardsmen bring ${him} from the station infirmary to your penthouse. ${He} is led to stand before you, shivering in terror and looking at ${his} feet. Only after an insistent command does ${he} look up long enough to be biometrically scanned and registered as your property. Frowning at the emotional state the gang left ${him} in, you're relieved when your guards take ${him} away a moment later, to be transported to the office of a slave broker you know well. Oh well, now ${he}'ll be someone else's problem to fix up.`);
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const slave = GenerateNewSlave("XY", {maxAge: 24});
			slave.origin = "$He was a runaway slave captured by a gang outside your arcology. You bought $him cheap after $he was harshly used by them.";
			slave.devotion = random(0, 25);
			slave.trust = -20;
			generateSalonModifications(slave);
			setHealth(slave, jsRandom(-50, -30), normalRandInt(10, 3), normalRandInt(10, 3), Math.max(normalRandInt(1, 0.5), 50));
			slave.face = random(0, 20);
			slave.skill.vaginal = 15;
			slave.skill.anal = 15;
			slave.skill.oral = 15;
			slave.skill.whoring = 0;
			slave.boobs = random(3, 7) * 100;
			slave.vagina = 3;
			slave.labia = 1;
			slave.ovaries = 1;
			if (slave.physicalAge >= slave.pubertyAgeXX) {
				slave.preg = 7;
				slave.pregType = 1;
				slave.pregWeek = slave.preg;
				slave.pregKnown = 1;
				SetBellySize(slave);
			}
			slave.dick = random(1, 3);
			slave.balls = 0;
			slave.weight = random(-80, 20);
			slave.pubicHStyle = "waxed";
			slave.underArmHStyle = "waxed";
			slave.anus = 3;
			slave.intelligence = random(-50, 50);
			slave.career = "a slave";
			slave.fetish = "submissive";
			slave.behavioralFlaw = "hates men";
			slave.behavioralQuirk = "insecure";
			slave.sexualFlaw = "apathetic";
			slave.piercing.lips.weight = 1;
			slave.piercing.tongue.weight = 1;
			slave.piercing.ear.weight = 1;
			slave.piercing.nose.weight = 2;
			slave.piercing.navel.weight = 1;
			slave.piercing.nipple.weight = 2;
			slave.piercing.genitals.weight = 2;
			slave.custom.tattoo = "$He has a barcode tattooed on $his neck.";
			slave.attrXY = 20;
			return slave;
		}
	}
};


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

	eventPrerequisites() {
		return [
			() => V.week > 46,
			() => ((V.rep/100) > random(1, 100)) || (V.debugMode > 0 && V.debugModeEventSelection > 0)
		];
	}

	get eventName() {
		return "Homeless Break-in";
	}

	execute(node) {
		const slave = makeSlave();
		const {
			He, His,
			he, his, him,
		} = getPronouns(slave);
		let r = [];

		r.push(`As you work at your desk over some of the economic reports regarding the state of housing in your arcology, you happen to spot an unusual notification during the early morning hours. As it turns out, the cooks at one of the more trendy restaurants woke up to find the backdoor left wide open. It wouldn't have been interesting to anyone save for the fact that a large amount of their stock had been thoroughly ravaged by a few opportunist homeless residents.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`Most of the individuals who broke in had the intelligence to not only evade suspicion on their way in, but scamper away before dawn, with the sole exception of a single one of them, discovered amongst a pile of half-eaten luxury dishes with a huge belly contrasting ${his} thin frame.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(`Given the damage ${his} fine dining experience has cost the eatery, and the complete lack of any significant funds to ${his} name, this individual ended up, unsurprisingly, enslaved by the property's owner. Judging by the few low resolution images you glanced over along the horrible security footage, your keen eyes recognize the looks hidden beneath the grime of ${his} lifestyle. The price is rather cheap, as the restaurant staff seem more intent on punishing them rather than reimbursing their losses, while the owner wants nothing more than to be rid of the gluttonous thief, so surely they would be more than happy to have ${him} taken off of their hands.`);
		App.Events.addParagraph(node, r);
		r = [];
		r.push(App.UI.DOM.makeElement("span", `${His} price is a measly ${cashFormat(1000)} credits. Alternatively, you could buy ${him} and sell ${him} for a bit of profit.`, "note"));

		App.Events.addParagraph(node, r);

		node.append(App.Desc.longSlave(slave, {market: "generic"}));

		const contractCost = 1000;
		const cost = slaveCost(slave) - contractCost - 1000; // -1000 just for homeless peep :(
		const responses = [];
		if (V.cash >= contractCost) {
			responses.push(new App.Events.Result(`Enslave ${him}`, enslave));
		} else {
			responses.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}`));
		}
		responses.push(new App.Events.Result(`Sell ${him} immediately`, sell, `This will bring in ${cashFormat(cost)}`));
		App.Events.addResponses(node, responses);

		function enslave() {
			const el = new DocumentFragment();
			let r = [];
			cashX(forceNeg(contractCost), "slaveTransfer", slave);
			r.push(`You eclipse the few low offers bidding for ${him} with something far above the usual rate of menial slaves. Not that unusual in the Free Cities, thanks to the many strange interests of its denizens. A few hours pass until you have ${him} brought up to your penthouse to finish the process, letting ${him} enter with a slow waddle as ${his} belly remains firmly rounded by ${his} escapade. A look of resigned apprehension rests over ${his} face as ${he} slowly follows the scanners instructions, perhaps thanks to the slight comfort of having experienced quite the night before. ${He}'ll be experiencing quite the discomfort over the following days, however, when ${he}'ll realize that ${he}'ll be staying stuffed full of food until you say otherwise.`);
			r.push(App.UI.newSlaveIntro(slave));
			App.Events.addNode(el, r);
			return el;
		}

		function sell() {
			const el = new DocumentFragment();
			let r = [];
			cashX(cost, "slaveTransfer");
			r.push(`You have ${him} released from custody and brought up to your penthouse, where ${he} wearily submits to biometric scanning to be registered as your slave. When the purchasing agent arrives, you clarify that you have sold ${him} to a proper slave trader who will handle the rest. ${His} reaction doesn't evoke much of any emotion, if maybe a little hint of wonder about what could have happened if ${he} stayed with you.`);
			App.Events.addNode(el, r);
			return el;
		}

		function makeSlave() {
			const slave = GenerateNewSlave(null, {race: "nonslave"});
			generateSalonModifications(slave);
			slave.origin = "$He was sold after eating $himself into debt.";
			slave.career = "homeless";
			setHealth(slave, jsRandom(-30, 10));
			slave.weight = -40;
			slave.muscles = random(-40, 20);
			slave.intelligence = random(0, 100);
			slave.behavioralFlaw = "gluttonous";
			slave.face = random(20, 100);
			slave.boobs = Math.min(slave.boobs, 300);
			slave.butt = Math.min(slave.butt, 2);
			slave.hStyle = "messy";
			slave.pubicHStyle = "bushy";
			slave.underArmHStyle = "bushy";
			slave.clothes = "an oversized t-shirt and boyshorts";
			slave.inflation = 3;
			slave.inflationType = "food";
			slave.inflationMethod = 1;
			SetBellySize(slave);
			return slave;
		}
	}
};