code:
App.Events.RESSPermittedMasturbation = class RESSPermittedMasturbation extends App.Events.BaseEvent {
	eventPrerequisites() {
		return []; // always valid if sufficient actors can be cast successfully
	}

	actorPrerequisites() {
		return [
			[ // single event slave
				s => s.fetish !== "mindbroken",
				hasBothArms,
				canMove,
				canHear,
				s => s.devotion > 50,
				s => (canDoAnal(s) || canDoVaginal(s)),
				s => s.assignment !== Job.QUARTER,
				s => s.assignment !== Job.CONCUBINE,
				s => s.assignment !== Job.MASTERSUITE,
				s => s.rules.release.masturbation === 1,
				s => s.energy > 80,
			]
		];
	}

	execute(node) {
		const [eventSlave] = this.actors.map(a => getSlave(a));
		const {
			His, He, he, his, him, himself, hers
		} = getPronouns(eventSlave);
		const {title: Master} = getEnunciation(eventSlave);
		const belly = bellyAdjective(eventSlave);
		let didAnal = false;
		let didVaginal = false;

		App.Events.drawEventArt(node, eventSlave, "no clothing");

		let r = [];
		r.push(`Strolling through the penthouse late at night, thinking over a business problem, you pass`);
		if (eventSlave.ID === V.HeadGirlID && V.HGSuite > 0) {
			r.push(`the door of your Head Girl's suite`);
		} else if (eventSlave.rules.living === "luxurious") {
			r.push(`the door to one of the cozy little slave bedrooms`);
		} else {
			r.push(`through the cavernous slave dormitory`);
		}
		r.push(`and see`);
		r.push(App.UI.DOM.combineNodes(contextualIntro(V.PC, eventSlave, true), ","));
		r.push(`alone in bed tonight. ${He}'s nude, of course, and has not pulled the sheets up over ${himself}. ${He}'s lying face-down,`);
		if (eventSlave.belly >= 10000) {
			r.push(`though ${his} bulbous middle forces ${him} to twist awkwardly,`);
		} else if (eventSlave.boobs > 10000) {
			r.push(`though ${his} titanic tits prop ${his} torso up awkwardly,`);
		} else if (eventSlave.boobs > 1600) {
			r.push(`with ${his} huge boobs squashed out to either side of ${his} ${eventSlave.skin} torso,`);
		}
		r.push(`humping the sheets`);
		if (eventSlave.vagina === -1 && eventSlave.dick === 0) {
			r.push(`and using a hand to rub ${his} perineum and asspussy.`);
		} else if (eventSlave.belly >= 10000) {
			r.push(`as best ${he} can with ${his} ${belly} belly in the way.`);
		} else if (eventSlave.chastityVagina) {
			r.push(`uselessly through ${his} chastity belt.`);
		} else if (eventSlave.chastityPenis === 1) {
			r.push(`uselessly with ${his} caged dick.`);
		} else if (eventSlave.dick > 15 && !canAchieveErection(eventSlave)) {
			r.push(`with ${his} soft python of a cock.`);
		} else if (eventSlave.dick > 6 && !canAchieveErection(eventSlave)) {
			r.push(`with ${his} giant dick as engorged as ${he} can manage.`);
		} else if (eventSlave.dick > 0 && !canAchieveErection(eventSlave)) {
			r.push(`with ${his} sad, soft cock.`);
		} else if (eventSlave.dick > 3) {
			r.push(`with the huge up and down pumps ${his} impressive cock requires.`);
		} else if (eventSlave.dick > 0) {
			r.push(`with ${his} stiff dick.`);
		} else {
			r.push(`with ${his} needy pussy.`);
		}
		r.push(`${He}'s using ${his} right arm to`);
		if (canDoVaginal) {
			if (eventSlave.vagina > 2) {
				r.push(`pound ${himself} with a big dildo, and`);
			} else if (eventSlave.vagina > 0) {
				r.push(`fuck ${himself} with a dildo, and`);
			} else {
				r.push(`finger ${himself}, and`);
			}
		} else {
			if (eventSlave.anus > 2) {
				r.push(`pound ${himself} in the ass with a big dildo, and`);
			} else if (eventSlave.anus > 1) {
				r.push(`fuck ${his} own ass with a dildo, and`);
			} else if (eventSlave.anus > 0) {
				r.push(`fuck ${his} own anus with two fingers, and`);
			} else {
				r.push(`tease ${his} virgin anus, and`);
			}
		}
		if (eventSlave.fetish === "cumslut" && eventSlave.fetishKnown) {
			r.push(`is giving two fingers of ${his} left hand a blowjob.`);
		} else if (eventSlave.fetish === "masochist" && eventSlave.fetishKnown) {
			r.push(`has ${his} left hand trapped under ${his} chest to cruelly`);
			if (eventSlave.nipples !== "fuckable") {
				r.push(`twist`);
			} else {
				r.push(`finger`);
			}
			r.push(`${his} own nipples.`);
		} else if (eventSlave.fetish === "pregnancy" && eventSlave.fetishKnown && eventSlave.bellyPreg >= 1500) {
			r.push(`is using ${his} left hand to massage ${his} ${belly} gravid belly.`);
		} else if (eventSlave.fetish === "buttslut" && eventSlave.fetishKnown) {
			r.push(`is using ${his} left hand to massage that buttock sensually, pulling it to the side to stimulate ${his} anus even more.`);
		} else if (eventSlave.fetish === "boobs" && eventSlave.fetishKnown) {
			r.push(`is using ${his} left hand to grope ${his} own breasts.`);
		} else {
			r.push(`is using ${his} left hand to`);
			if (eventSlave.nipples !== "fuckable") {
				r.push(`stimulate`);
			} else {
				r.push(`finger`);
			}
			r.push(`a nipple.`);
		}
		r.push(`Slaves with powerful sex drives like ${hers} often find it necessary to masturbate in order to sleep. ${He}'s fully preoccupied, and has not noticed you.`);

		App.Events.addParagraph(node, r);
		App.Events.addResponses(node, [
			new App.Events.Result(`Sleep with ${him}`, sleep),
			new App.Events.Result(`Exhaust ${him}`, exhaust, virginityWarning()),
			(eventSlave.fetishKnown === 1 && eventSlave.fetish !== "none")
				? new App.Events.Result(`Play into ${his} fetish at bedtime`, bedtime, virginityWarning())
				: new App.Events.Result(),
		]);

		function sleep(){
			r = [];
			r.push(`${He} starts with surprise when ${he} feels your hand on ${his}`);
			if (eventSlave.weight > 160) {
				r.push(`rippling`);
			} else if (eventSlave.weight > 95) {
				r.push(`soft`);
			} else if (eventSlave.muscles > 95) {
				r.push(`ripped`);
			} else if (eventSlave.muscles > 30) {
				r.push(`muscular`);
			} else if (eventSlave.muscles > 5) {
				r.push(`toned`);
			} else {
				r.push(`soft`);
			}
			r.push(`back, but is accustomed to your touch and knows who you are. ${He} does not pause ${his} masturbation, knowing that if you want ${him} to, you'll tell ${him}. You massage ${his} warm skin, enjoying the animal energy of the onanistic spectacle laid out before you. ${He} builds toward climax, turning ${his} head`);
			if (canSee(eventSlave)) {
				r.push(`to glance at`);
			} else {
				r.push(`to listen to`);
			}
			r.push(`you once or twice, but eventually realizing that you're just here to watch. ${He} turns over hurriedly for ${his} climax, efficiently`);
			if (eventSlave.dick > 0 && !canAchieveErection(eventSlave)) {
				r.push(`dribbling ${his} weak orgasm out onto ${his}`);
				if (eventSlave.belly >= 1500) {
					r.push(`${belly}`);
					if (eventSlave.bellyPreg >= 1500) {
						r.push(`pregnant`);
					}
				}
				r.push(`belly`);
			} else if (eventSlave.balls > 3) {
				r.push(`blowing ${his} massive load all over ${his}`);
				if (eventSlave.belly >= 1500) {
					r.push(`${belly}`);
					if (eventSlave.bellyPreg >= 1500) {
						r.push(`pregnant`);
					}
				}
				r.push(`belly`);
				if (eventSlave.belly < 10000) {
					r.push(`and chest`);
				}
			} else if (eventSlave.balls > 0) {
				r.push(`blowing cum up onto ${his} own`);
				if (eventSlave.belly >= 1500) {
					r.push(`${belly}`);
					if (eventSlave.bellyPreg >= 1500) {
						r.push(`pregnant`);
					}
				}
				r.push(`belly`);
			} else if (eventSlave.vagina === -1) {
				r.push(`jerking ${his} tiny little front hole sideways`);
			} else {
				r.push(`jerking ${his} wet pussy upward`);
			}
			r.push(`to avoid having to change the sheets. ${He} gets up carefully and heads off for a quick shower. When ${he} returns, it's to`);
			if (canSee(eventSlave)) {
				r.push(`a sight`);
			} else {
				r.push(`a sound`);
			}
			r.push(`that brings ${him} to a shocked standstill: you're in ${his} bed, sound asleep. You had a long day, and the soft bed, warmed by ${his} pretty body, felt very nice. After some deliberation, ${he} crawls in beside you, snuggling up to offer you more of ${his} body heat, direct from the source. ${He} is impressed almost to tears at the trust you display in ${him}, and relaxes completely as you, dominant even when unconscious, encircle ${his}`);
			if (eventSlave.preg > 20) {
				r.push(`pregnant belly`);
			} else if (eventSlave.belly >= 100000) {
				r.push(`${belly} middle`);
			} else if (eventSlave.boobs > 2000) {
				r.push(`massive mammaries`);
			} else {
				r.push(`shoulders`);
			}
			r.push(`with your arms and pull ${him} in close.`);
			eventSlave.trust += 5;
			return r;
		}

		function exhaust() {
			const prick = V.PC.dick !== 0 ? "prick" : "strap-on";
			r = [];
			r.push(`${He} starts with surprise when ${he} feels your hand on ${his}`);
			if (eventSlave.weight > 160) {
				r.push(`rippling`);
			} else if (eventSlave.weight > 95) {
				r.push(`soft`);
			} else if (eventSlave.muscles > 95) {
				r.push(`ripped`);
			} else if (eventSlave.muscles > 30) {
				r.push(`muscular`);
			} else if (eventSlave.muscles > 5) {
				r.push(`toned`);
			} else {
				r.push(`soft`);
			}
			r.push(`back, but is accustomed to your touch and knows who you are. ${He} does not pause ${his} masturbation, knowing that if you want ${him} to, you'll tell ${him}. You take a moment to enjoy the warmth of the working slave's body before gently taking the hand ${he}'s using to`);
			if (canDoVaginal(eventSlave) || eventSlave.anus === 0) {
				r.push(`pleasure ${himself},`);
				if (eventSlave.vagina > 0 || !canDoAnal(eventSlave) || eventSlave.anus === 0) {
					didVaginal = true;
				} else {
					didAnal = true;
				}
			} else {
				r.push(`buttfuck ${himself},`);
				didAnal = true;
			}
			if (didAnal) {
				if (eventSlave.anus > 2) {
					r.push(`pulling the dildo free of ${his} relaxed asshole, and replacing it with your ${prick} before its gape can close.`);
				} else if (eventSlave.anus > 1) {
					r.push(`pulling the dildo free of ${his} loose anus, and replacing it with your ${prick} before its gape can close.`);
				} else if (eventSlave.anus > 0) {
					r.push(`pulling ${his} fingers free of ${his} tight little ass, and replacing them with your ${prick} while it's still relaxed.`);
				} else {
					r.push(`removing it from ${his} untouched rear, and replacing it with your ${prick} while it's still receptive.`);
				}
				r.push(VCheck.Anal(eventSlave, 5));
			} else {
				if (eventSlave.vagina > 2) {
					r.push(`pulling the dildo free of ${his} mature pussy, and replacing it with your ${prick} before its gape can close.`);
				} else if (eventSlave.vagina > 0) {
					r.push(`pulling the dildo free of ${his} tight pussy, and replacing them with your ${prick} while it's still receptive.`);
				} else {
					r.push(`pulling ${his} fingers free of ${his} pure vagina, and replacing them with your ${prick} while ${he}'s still warmed up.`);
				}
				r.push(VCheck.Vaginal(eventSlave, 5));
			}
			r.push(`${He} moans into the pillow and pats around blindly with ${his} freed hand before finding your thigh and rubbing it affectionately. ${He} steps up ${his} humping and soon shudders,`);
			if (eventSlave.dick > 0 && !canAchieveErection(eventSlave)) {
				r.push(`releasing a pathetic spurt onto`);
			} else if (eventSlave.balls > 3) {
				r.push(`shooting a big jet of cum all over ${his} own`);
				if (eventSlave.belly >= 1500) {
					r.push(`${belly}`);
					if (eventSlave.bellyPreg >= 1500) {
						r.push(`pregnant`);
					}
					r.push(`stomach`);
				} else {
					r.push(`chest`);
				}
				r.push(`and`);
			} else if (eventSlave.balls !== 0) {
				r.push(`orgasming messily onto`);
			} else {
				r.push(`going limp and slumping down onto`);
			}
			r.push(`the sheets beneath ${him}. When you climax soon after, ${he} expects you to get off ${him} so ${he} can clean up, but instead, the`);
			if (didAnal) {
				if (V.PC.dick !== 0) {
					r.push(`cock up ${his} butt returns to rock hardness`);
					if (V.PC.vagina !== -1) {
						r.push(`as you use a little manual stimulation of your own cunt to get yourself stiff again`);
					}
					r.push(`and`);
				} else {
					r.push(`strap-on up ${his} butt`);
				}
			} else {
				if (V.PC.dick !== 0) {
					r.push(`cock hilted in ${him} returns to rock hardness`);
					if (V.PC.vagina !== -1) {
						r.push(`as you use a little manual stimulation of your own cunt to get yourself stiff again`);
					}
					r.push(`and`);
				} else {
					r.push(`strap-on buried in ${him}`);
				}
			}
			r.push(`goes back to pumping in and out of ${him}. ${He} slides a hand under ${himself} to`);
			if (eventSlave.vagina === -1) {
				r.push(`jerk off`);
			} else {
				r.push(`rub ${himself}`);
			}
			r.push(`this time. When you finally finish, a long time later, the exhausted slave is lying on a bed wet with lube,`);
			if (V.PC.dick !== 0 || eventSlave.dick > 0) {
				r.push(`ejaculate,`);
			}
			if (V.PC.dick === 0 || eventSlave.vagina > -1) {
				r.push(`girlcum,`);
			}
			r.push(`drool, and sweat. ${He} doesn't care, and you let ${him} curl up in ${his} sex-soaked nest. As you leave, you think ${he}'s asleep already, but`);
			if (!canSee(eventSlave)) {
				r.push(`as you go`);
			} else {
				r.push(`${his} ${App.Desc.eyesColor(eventSlave)} open a slit as you go and`);
			}
			if (canTalk(eventSlave)) {
				const Thanks = Spoken(eventSlave, "Thanks");
				r.push(`${he} murmurs, <span class="devotion inc">"${Thanks},</span> ${Master}."`);
			} else {
				r.push(`${he} struggles to sign <span class="devotion inc">"thank you"</span> before passing out.`);
			}
			eventSlave.devotion += 5;
			return r;
		}

		function bedtime() {
			const {himU, hisU, girlU} = getNonlocalPronouns(0).appendSuffix('U');
			r = [];
			r.push(`${He} starts with surprise when ${he} feels your hands seize ${him} by ${his}`);
			if (eventSlave.weight > 160) {
				r.push(`fat`);
			} else if (eventSlave.weight > 130) {
				r.push(`chubby`);
			} else if (eventSlave.weight > 95) {
				r.push(`soft`);
			} else if (eventSlave.muscles > 95) {
				r.push(`ripped`);
			} else if (eventSlave.muscles > 30) {
				r.push(`muscular`);
			} else if (eventSlave.muscles > 5) {
				r.push(`toned`);
			} else {
				r.push(`soft`);
			}
			r.push(`shoulders,`);
			if (eventSlave.fetish === "submissive") {
				r.push(`but ${he} relaxes into submissive compliance as you slide them up to the nape of ${his} neck, grinding ${his} face deeper into the pillow. ${He} gives muffled whines of happiness as you give ${him} some light spanks before`);
				if (canDoVaginal(eventSlave) && (eventSlave.vagina > 0 || !canDoAnal(eventSlave) || eventSlave.anus === 0)) {
					r.push(`hilting yourself in ${him}`);
					didVaginal = true;
				} else {
					r.push(`using ${his} butt`);
					didAnal = true;
				}
				r.push(`without regard for ${his} pleasure. ${He} does not climax, but when you roll ${his} unresisting body over to give ${his}`);
				if (eventSlave.belly >= 1500) {
					r.push(`mouth, swollen belly and breasts`);
				} else {
					r.push(`mouth and breasts`);
				}
				r.push(`some attention, ${he}'s clearly enjoying ${himself}.`);

				seX(eventSlave, "oral", V.PC, "penetrative");
				seX(eventSlave, "mammary", V.PC, "penetrative");
			} else if (eventSlave.fetish === "cumslut") {
				r.push(`but ${he} is already licking ${his} lips with anticipation as you roll ${him} over and straddle ${his} chest so ${he} can`);
				if (V.PC.dick !== 0) {
					r.push(`suck you off`);
					if (V.PC.vagina !== -1) {
						r.push(`and`);
					}
				}
				if (V.PC.vagina !== -1) {
					r.push(`eat you out`);
				}
				r.push(r.pop() + ".");
				r.push(`The orally fixated slut concentrates on the oral to a fault, so you take ${his} arms and straddle them too so ${he} can reach ${himself} and get back to masturbating. ${He} hums happily, a very fine sensation on`);
				if (V.PC.dick !== 0) {
					r.push(`shaft`);
					if (V.PC.vagina !== -1) {
						r.push(`and`);
					}
				}
				if (V.PC.vagina !== -1) {
					r.push(`pussylips`);
				}
				r.push(r.pop() + ".");
				seX(eventSlave, "oral", V.PC, "penetrative");
			} else if (eventSlave.fetish === "humiliation") {
				r.push(`but ${he} complies as you pull ${him} up to kneel and`);
				if (canDoVaginal(eventSlave) && (eventSlave.vagina > 0 || !canDoAnal(eventSlave) || eventSlave.anus === 0)) {
					r.push(`slip yourself inside ${him}.`);
					didVaginal = true;
				} else {
					r.push(`take an assfuck.`);
					didAnal = true;
				}
				r.push(`You let ${him} get used to it and then wordlessly turn ${his} head so ${he} can`);
				if (canSee(eventSlave)) {
					r.push(`see the screen in the room: it's now on, and it's showing a public live feed of your`);
					if (V.PC.dick !== 0) {
						r.push(`cock`);
					} else {
						r.push(`strap-on`);
					}
					r.push(`penetrating ${didVaginal ? `${him}` : `${his} anus`}. ${He} recognizes ${himself} immediately,`);
				} else {
					r.push(`listen to the screen in the room: it's now on, and it's showing a public live feed of your`);
					if (V.PC.dick !== 0) {
						r.push(`cock`);
					} else {
						r.push(`strap-on`);
					}
					r.push(`penetrating ${didVaginal ? `${him}` : `${his} anus`}. ${He} realizes the sounds of you fucking ${his} sync up with it,`);
				}
				r.push(`the sheer humiliation of having ${didVaginal ? `${himself}` : `${his} rectum`} penetrated on camera brings ${him} to an indecently quick climax.`);
			} else if (eventSlave.fetish === "buttslut") {
				r.push(`but ${he} eagerly complies as you pull ${him} up to kneel and take an assfuck. You shove ${his} arms up over ${his} head to stop ${his} masturbation, confident that the anal whore can climax from nothing but your`);
				if (V.PC.dick !== 0) {
					r.push(`cock`);
				} else {
					r.push(`strap-on`);
				}
				r.push(`pumping in and out of ${his} butt. You're right, and ${his} ${canDoAnal(eventSlave) ? "sphincter tightens" : "buttocks clench"} with orgasm even sooner than you expected it to. You roll ${him} over and go again,`);
				if (eventSlave.chastityVagina || eventSlave.chastityPenis === 1) {
					r.push(`the evidence of ${his} first orgasm leaking out from behind ${his} chastity belt.`);
				} else if (eventSlave.dick > 0 && !canAchieveErection(eventSlave)) {
					r.push(`${his} soft cock still releasing little spurts of ejaculate onto ${his}`);
					if (eventSlave.belly >= 1500) {
						r.push(`${belly}`);
						if (eventSlave.bellyPreg >= 1500) {
							r.push(`pregnant`);
						}
					}
					r.push(`belly.`);
				} else if (eventSlave.dick > 0) {
					r.push(`${his} hard dick scattering the evidence of ${his} orgasm around as it flops around with the buttsex.`);
				} else if (eventSlave.vagina === -1) {
					r.push(`${his} tiny front hole dribbling a little fluid down ${his} legs.`);
				} else {
					r.push(`${his} pussy soaking wet with arousal.`);
				}
				if (canDoAnal) {
					didAnal = true;
				}
				seX(eventSlave, "anal", V.PC, "penetrative");
			} else if (eventSlave.fetish === "boobs") {
				r.push(`but ${he} giggles with anticipation as you flip ${him} over. ${His} cute giggling turns into a gasp of arousal when you`);
				if (eventSlave.nipples !== "fuckable") {
					r.push(`seize both of ${his} hard`);
				} else {
					r.push(`sink your fingers into ${his}`);
				}
				r.push(`nipples and tug them upward to pull ${him} into a half-sitting position. You hold ${his} boobs for ${him} to accomplish a messy titfuck and let ${him} masturbate at the same time. With ${his} nipples providing second and third loci of pleasure, ${he} climaxes quickly; you flip ${him} over and do ${him} doggy style, holding ${his} shoulders down so the rough fuck drags ${his} sensitive nipples`);
				if (eventSlave.belly >= 100000) {
					r.push(`and ${belly} belly`);
				}
				r.push(`across the sheets with every stroke.`);
				if (canDoVaginal(eventSlave) && (eventSlave.vagina > 0 || !canDoAnal(eventSlave) || eventSlave.anus === 0)) {
					didVaginal = true;
				} else {
					didAnal = true;
				}
				seX(eventSlave, "mammary", V.PC, "penetrative");
			} else if (eventSlave.fetish === "pregnancy") {
				r.push(`but ${he} complies as you pull ${him} up`);
				if (eventSlave.belly >= 300000) {
					r.push(`onto ${his} ${belly} dome of a middle and take ${him} over it.`);
				} else {
					r.push(`to kneel and take it doggy style.`);
				}
				r.push(`After getting things going, you use one hand to begin groping ${his}`);
				if (eventSlave.bellyPreg >= 1500) {
					r.push(`pregnant`);
				} else if (eventSlave.belly >= 1500) {
					r.push(`${belly}`);
				}
				r.push(`belly. Bending forward to whisper into ${his} ear, you begin to describe how`);
				if (eventSlave.belly >= 750000) {
					r.push(`${he}'s nothing more than a giant egg just waiting for ${his} children to hatch, how ${he}'s so close to bursting with life that just a few more babies should do it.`);
				} else if (eventSlave.belly >= 600000) {
					r.push(`if ${he} grows any larger with child, ${he}'ll practically be nothing more than an overswollen womb.`);
				} else if (eventSlave.belly >= 450000) {
					r.push(`it must feel to be so obscenely pregnant that anyone and everyone can see the life distending ${his} struggling body.`);
				} else if (eventSlave.belly >= 300000) {
					r.push(`full ${he} would feel if ${he} got any more pregnant and how hard it would be to do even the most simple of tasks.`);
				} else if (eventSlave.belly >= 150000) {
					r.push(`with a few more babies in ${him}, ${his} obscene womb would reach the floor.`);
				} else if (eventSlave.belly >= 100000) {
					r.push(`obscene it would be if ${he} were swollen with more than a dozen children.`);
				} else if (eventSlave.belly >= 15000) {
					r.push(`full and heavy ${he}'d be with octuplets crowding ${his} womb.`);
				} else if (eventSlave.pregKnown === 1) {
					r.push(`${he}'d look and feel swollen with multiple children.`);
				} else {
					r.push(`it might feel if ${his} belly were to grow heavy with pregnancy.`);
				}
				r.push(`${He} gasps with sudden shocked arousal at the idea, moaning with desire as you describe your hot seed jetting into ${him}, racing towards ${his} core, turning ${his} body into nothing more than a breeding machine.`);
				if (canDoVaginal(eventSlave) && (eventSlave.vagina > 0 || !canDoAnal(eventSlave) || eventSlave.anus === 0)) {
					didVaginal = true;
				} else {
					r.push(`It's ${his} butt you're fucking, but ${he} doesn't care.`);
					didAnal = true;
				}
			} else if (eventSlave.fetish === "dom") {
				r.push(`but ${he} keeps masturbating even as you flip ${him} over. You tell ${him} to keep going, and leave ${him} there for a moment. ${He} obeys, looking mystified, but is pleased to`);
				if (canSee(eventSlave)) {
					r.push(`see you return with another slave.`);
				} else {
					r.push(`hear your footsteps return accompanied by a second set.`);
				}
				r.push(`You push the other ${girlU} unceremoniously down onto ${eventSlave.slaveName}, making ${himU} give ${eventSlave.slaveName} some oral while you roughly fuck ${hisU} ass. ${eventSlave.slaveName} enjoys ${himself} immensely, jerking with pleasure every time you pound the poor ${girlU} hard enough to make ${himU} moan into ${eventSlave.slaveName}.`);
				seX(eventSlave, "oral", V.PC, "penetrative");
			} else if (eventSlave.fetish === "sadist") {
				r.push(`but ${he} keeps masturbating even as you flip ${him} over. You tell ${him} to keep going, and leave ${him} there for a moment. ${He} obeys, looking mystified, but is pleased to`);
				if (canSee(eventSlave)) {
					r.push(`see you return with another slave.`);
				} else {
					r.push(`hear your footsteps return accompanied by a second set.`);
				}
				r.push(`You push the other ${girlU} unceremoniously down onto ${eventSlave.slaveName}, making ${himU} give ${eventSlave.slaveName} some oral while you spank ${himU} and then roughly fuck ${hisU} ass. ${eventSlave.slaveName} enjoys ${himself} immensely, jerking with pleasure every time you strike or sodomize the poor ${girlU} hard enough to make ${himU} scream into ${eventSlave.slaveName}.`);
				seX(eventSlave, "oral", V.PC, "penetrative");
			} else if (eventSlave.fetish === "masochist") {
				r.push(`but ${he} relaxes into submissive compliance as you slide them up to the nape of ${his} neck, grinding ${his} face deeper into the pillow. ${He} gives muffled whines of mixed pain and pleasure as you give ${him} some hard spanks before`);
				if (canDoVaginal(eventSlave) && (eventSlave.vagina > 0 || !canDoAnal(eventSlave) || eventSlave.anus === 0)) {
					r.push(`ramming it in so hard you nearly pierce through ${his} cervix and start relentlessly pounding. ${He} climaxes repeatedly to the pain, screaming helplessly as ${his} orgasms force ${him} to unwillingly buck against the invading phallus.`);
					didVaginal = true;
				} else {
					r.push(`sodomizing ${him} right up to the edge of what ${his} poor anus can take without damage. ${He} climaxes repeatedly to the pain, screaming helplessly as ${his} orgasms force ${his} abused sphincter to tighten spastically against the phallus invading it.`);
					didAnal = true;
				}
			}
			if (didAnal) {
				if (eventSlave.anus === 0) {
					eventSlave.anus++;
				}
				r.push(VCheck.Anal(eventSlave, 1));
			} else if (didVaginal) {
				if (eventSlave.vagina === 0) {
					eventSlave.vagina++;
				}
				r.push(VCheck.Vaginal(eventSlave, 1));
			}
			r.push(`${He}'s surprised but not displeased to find you standing over ${him} the next night at exactly the same time. By the third night, ${he}'s masturbating in anticipation of your visit to ${his} bed.`);
			if (eventSlave.fetishStrength > 95) {
				r.push(`Since ${he}'s totally sure of what gets ${him} off, this consistent proof that you know it too makes ${him} <span class="trust inc">trust you.</span>`);
				eventSlave.trust += 5;
			} else {
				r.push(`Since ${he}'s developing ${his} kinks, this consistent reinforcement <span class="fetish inc">advances ${his} fetish.</span>`);
				eventSlave.fetishStrength += 4;
			}
			return r;
		}

		function virginityWarning() {
			if (eventSlave.vagina === 0 && canDoVaginal(eventSlave) && (!canDoAnal(eventSlave) || eventSlave.anus === 0)) {
				return `This option will take ${his} virginity`;
			} else if (!canDoVaginal(eventSlave) && eventSlave.anus === 0) {
				return `This option will take ${his} anal virginity`;
			}
		}
	}
};


code:
App.Events.RESSPlimbHelp = class RESSPlimbHelp extends App.Events.BaseEvent {
	eventPrerequisites() {
		return []; // always valid if sufficient actors can be cast successfully
	}

	actorPrerequisites() {
		return [
			[ // single event slave
				s => s.fetish !== "mindbroken",
				s => s.devotion > 50,
				s => s.trust > 20,
				s => s.assignment !== Job.CONCUBINE,
				s => s.assignment !== Job.MASTERSUITE,
				s => (getLimbCount(s, 102) === 4) // all limbs are prosthetics, and all limbs are present
			]
		];
	}

	execute(node) {
		const [eventSlave] = this.actors.map(a => getSlave(a));
		const {
			His, He, he, his, him, himself
		} = getPronouns(eventSlave);
		const {title: Master} = getEnunciation(eventSlave);
		const belly = bellyAdjective(eventSlave);
		const {heA} = getPronouns(assistant.pronouns().main).appendSuffix("A");

		let artDiv = document.createElement("div");
		if (V.seeImages === 1) {
			const tempClone = clone(eventSlave); // Figured it would be safest not to mess with the actual slave, and instead amputate a temporary clone
			removeLimbs(tempClone, "all");
			App.Events.drawEventArt(artDiv, tempClone, "no clothing");
			node.appendChild(artDiv);
		}

		let r = [];
		r.push(`First thing in the morning,`);
		if (eventSlave.ID === V.BodyguardID) {
			r.push(`before you've even gotten out of bed, you hear`);
			r.push(App.UI.DOM.combineNodes(contextualIntro(V.PC, eventSlave, true), "'s"));
			r.push(`voice coming up from where ${he} sleeps,`);
			if (V.dojo >= 1) {
				r.push(`in the armory watching over your suite.`);
			} else {
				r.push(`on ${his} own bedroll in your suite.`);
			}
			r.push(`There's a distinctly plaintive note in ${his} voice, and as soon as you sit up and look in ${his} direction, it's obvious why. ${He} sleeps out of ${his} P-Limbs, since it's good to rest the anchor points implanted into ${his} torso. They're held in actuators over ${his} bedroll, which can swing down and attach them to ${him} the instant ${he}'s awake. Except today, they're staying obstinately up near the ceiling.`);
			if (V.assistant.personality !== 0) {
				r.push(`${V.assistant.name} tells you ${heA}'s`);
			} else {
				r.push(`Your personal assistant informs you ${heA}'s`);
			}
			r.push(`troubleshooting the problem, but in the meantime, poor`);
		} else {
			r.push(`${V.assistant.name} informs you that there's a minor problem with`);
			r.push(App.UI.DOM.combineNodes(contextualIntro(V.PC, eventSlave, true), ","));
			r.push(`and asks whether you'd like it to be handled without you. ${He} sleeps out of ${his} P-Limbs, since it's good to rest the anchor points implanted into ${his} torso. When ${he} wakes up, ${he} usually asks whichever slave is nearest to attach ${his} dominant arm, at which point ${he} can do the rest ${himself}. Due to an unexpected change in the slaves' schedules, though, ${he}'s all alone today. Poor`);
		}
		r.push(`${eventSlave.slaveName} is left as a helpless,`);
		if (eventSlave.bellyImplant >= 100000) {
			r.push(`limbless, ${belly} womb.`);
		} else if (eventSlave.bellyFluid >= 100000) {
			r.push(`limbless, ${belly} balloon.`);
		} else if (eventSlave.bellyPreg >= 10000) {
			r.push(`limbless, heavily pregnant torso.`);
		} else if (eventSlave.bellyImplant >= 10000) {
			r.push(`limbless, nearly spherical torso.`);
		} else if (eventSlave.bellyFluid >= 10000) {
			r.push(`limbless, ${eventSlave.inflationType}-balloon.`);
		} else if (eventSlave.weight >= 130) {
			r.push(`limbless pile of flab.`);
		} else {
			r.push(`limbless torso.`);
		}

		App.Events.addParagraph(node, r);
		App.Events.addResponses(node, [
			new App.Events.Result(`Help ${him} into ${his} P-Limbs`, help),
			(canDoAnal(eventSlave) || canDoVaginal(eventSlave))
				? new App.Events.Result(`Fuck ${him} before you help ${him}`, fuck, ((eventSlave.vagina === 0 && canDoVaginal(eventSlave)) || (eventSlave.anus === 0 && canDoAnal(eventSlave))) && V.PC.dick !== 0 ? `This option will take ${his} virginity` : null)
				: new App.Events.Result(),
			(canPenetrate(eventSlave) && (eventSlave.toyHole === "dick" || V.policies.sexualOpenness === 1))
				? new App.Events.Result(`Ride ${him} before you help ${him}`, ride, `This option will penetrate you`)
				: new App.Events.Result(),
		]);

		function help() {
			// replace slave art with limbs attached
			$(artDiv).empty();
			App.Events.drawEventArt(artDiv, eventSlave);
			const frag = document.createDocumentFragment();
			r = [];
			r.push(`You decide to help ${him} yourself rather than having a slave do it.`);
			if (eventSlave.ID === V.BodyguardID) {
				r.push(`Swinging your legs out of bed and heading towards ${him},`);
			} else {
				r.push(`Heading towards ${his} part of the sleeping area,`);
			}
			r.push(`you're struck by how`);
			if (eventSlave.belly >= 5000) {
				r.push(`round`);
			} else {
				r.push(`small`);
			}
			r.push(`${he} looks without ${his} prosthetics. Just a little ${eventSlave.skin} thing, without the`);
			if (getLimbCount(eventSlave, 3) > 2) {
				r.push(`sexy artificial limbs that let ${him} delight anyone who fucks ${him} with vibrating fingertips.`);
			} else if (getLimbCount(eventSlave, 4) > 2) {
				r.push(`incredible artificial limbs so perfect that many mistake them for the real thing.`);
			} else if (getLimbCount(eventSlave, 5) > 2) {
				r.push(`armored artificial limbs that make ${him} a deadly war machine.`);
			} else if (getLimbCount(eventSlave, 6) > 2) {
				r.push(`advanced artificial limbs that let ${him} delight sexual partners, fight enemies, and even live a normal life.`);
			} else {
				r.push(`artificial limbs that allow ${him} a semblance of a normal life.`);
			}
			r.push(`${He}'s not frightened, trusting`);
			if (eventSlave.ID === V.BodyguardID) {
				r.push(`you to help ${him}, or detail a slave to do so.`);
			} else {
				r.push(`${V.assistant.name} to bring help.`);
			}
			r.push(`When ${he}`);
			if (canSee(eventSlave)) {
				r.push(`sees`);
			} else {
				r.push(`notices`);
			}
			r.push(`that you mean to assist ${him} yourself, ${he} breaks out in a huge grateful smile and thanks you profusely.`);
			App.Events.addParagraph(frag, r);

			r = [];
			if (eventSlave.ID === V.BodyguardID) {
				r.push(`First, you extricate ${his} limbs from the malfunctioning machine.`);
			}
			r.push(`As you take up ${his} first arm and kneel down to attach it to ${him}, ${he} rolls and hoists that shoulder up towards it, ${his}`);
			if (eventSlave.belly >= 5000) {
				if (eventSlave.bellyPreg >= 3000) {
					r.push(`pregnant`);
				} else {
					r.push(`bloated`);
				}
				r.push(`body straining to twist`);
			} else if (eventSlave.muscles > 30) {
				r.push(`strong body easily twisting`);
			} else if (eventSlave.muscles > 5) {
				r.push(`toned body readily twisting`);
			} else {
				r.push(`soft body straining to twist`);
			}
			r.push(`on the sheet despite ${his} limblessness. When the gleaming halves of the attachment are`);
			if (V.showInches === 2) {
				r.push(`half an inch`);
			} else {
				r.push(`a few millimeters`);
			}
			r.push(`apart, the magnetic seals take over and pull them into perfect alignment. Acting out of pure habit, ${he} actuates all the muscle group equivalents on the arm, one by one, testing function.`);
			App.Events.addParagraph(frag, r);

			r = [];
			r.push(`With one arm and the remaining three limbs within reach, ${he} can take care of ${himself}, but ${he} reaches out to touch your leg lightly from ${his} place on the ground.`);
			if (getRightArmID(eventSlave) === 4 || getRightArmID(eventSlave) === 6) {
				r.push(`The hand is just as soft and warm as ${his} original would have been.`);
			} else {
				r.push(`${His} hand is smooth and cool.`);
			}
			if (!canTalk(eventSlave)) {
				r.push(`${He} uses ${his} one hand to rapidly spell out a polite request. ${He} asks you to attach the rest of ${his} limbs, too.`);
			} else {
				r.push(Spoken(eventSlave, `"${Master}, would you please attach the rest of them for me?"`));
				r.push(`${he} asks politely.`);
			}
			r.push(`A transitory nervousness crosses ${his} ${eventSlave.faceShape} face as ${he} asks, but clears into trusting happiness when you nod and pick up ${his} other arm. ${He} tests each limb as it's attached, and then tests them all by getting up into a kneel and giving you a hug.`);
			eventSlave.trust += 4;
			App.Events.addParagraph(frag, r);
			return frag;
		}

		function fuck() {
			const frag = document.createDocumentFragment();
			r = [];
			r.push(`You decide to have some fun with the temporarily helpless slave. You`);
			if (eventSlave.ID === V.BodyguardID) {
				r.push(`get out of bed`);
			} else {
				r.push(`head to where ${he}'s waiting for help`);
			}
			r.push(`and scoop ${him} up, ${his} limblessness making it comically easy. With ${his} torso cradled in your grasp and ${his} head nestled into the crook of your arm, you carry ${him}`);
			if (eventSlave.ID === V.BodyguardID) {
				r.push(`back towards your bed.`);
			} else {
				r.push(`back towards your suite.`);
			}
			r.push(`When ${he}`);
			if (canSee(eventSlave)) {
				r.push(`sees`);
			} else {
				r.push(`figures out`);
			}
			r.push(`what you're doing, ${he} turns ${his} head and gives your`);
			if (V.PC.boobs >= 300) {
				r.push(`breast on that side`);
			} else {
				r.push(`chest`);
			}
			r.push(`an anticipatory kiss. When you set ${him} down on the bed, ${he}`);
			if (canSee(eventSlave)) {
				r.push(`stares`);
			} else {
				r.push(`smiles`);
			}
			r.push(`up at you invitingly and gives ${his} four P-Limb anchor points a glinting wiggle, a gesture that might mean anything. ${His}`);
			if (canDoVaginal(eventSlave)) {
				r.push(`pussy,`);
			} else {
				r.push(`asshole,`);
			}
			r.push(`in any case, is presented openly for your use.`);
			App.Events.addParagraph(frag, r);

			r = [];
			r.push(`After fingering your helpless toy experimentally, you`);
			if (V.PC.dick !== 0) {
				if (canDoVaginal(eventSlave)) {
					r.push(`slide yourself inside ${him} and start fucking ${him}.`);
					r.push(VCheck.Vaginal(eventSlave, 1));
				} else {
					r.push(`push yourself up ${his} butt and start fucking ${him}.`);
					r.push(VCheck.Anal(eventSlave, 1));
				}
			} else {
				r.push(`straddle ${his} face, riding ${his} eager mouth while you use your hands on ${his}`);
				if (canDoVaginal(eventSlave)) {
					r.push(`cunt.`);
				} else {
					r.push(`hole.`);
				}
				seX(eventSlave, "oral", V.PC, "penetrative");
			}
			r.push(`${He} has no control at all, but ${he} trusts you not to hurt ${him} and is soon enjoying ${himself}. ${He} can't seem to stop ${himself} from trying to move P-Limbs that aren't there, forgetting that ${he}'s not wearing them whenever the arousal builds high enough to make ${him} forgetful. Eventually ${he} stops trying to restrain ${himself}, realizing that you're enjoying ${his} delicious wriggling beneath you. ${He} orgasms hard,`);
			if (V.PC.dick !== 0) {
				if (canDoVaginal(eventSlave)) {
					r.push(`the walls of ${his} pussy squeezing your shaft.`);
				} else {
					r.push(`${his} anus tightening around the base of your dick.`);
				}
			} else {
				r.push(`moaning ${his} climax into your pussy with abandon.`);
			}
			App.Events.addParagraph(frag, r);
			App.Events.addParagraph(frag, [`When you've climaxed yourself, ${he} looks back towards where ${his} P-Limbs are waiting, but you're not done with ${his} yet. You pick ${him} up again and bring ${him} into the shower. ${He} tries to help you, but again, ${he} gives up after a while, letting you wash ${him}. As you're rinsing the soap off ${him}, ${he} thanks you devotedly. With the water streaming down ${his} face, you barely notice ${his} gentle tears.`]);
			eventSlave.devotion += 4;
			return frag;
		}

		function ride() {
			const frag = document.createDocumentFragment();
			r = [];
			r.push(`You decide to have some fun with the temporarily helpless slave. You`);
			if (eventSlave.ID === V.BodyguardID) {
				r.push(`get out of bed`);
			} else {
				r.push(`head to where ${he}'s waiting for help`);
			}
			r.push(`and kneel over ${him}, bringing yourself low enough that ${his} flaccid dick is nestled between your ${V.PC.vagina >= 0 ? "lips" : "cheeks"}. When ${he}`);
			if (canSee(eventSlave)) {
				r.push(`sees`);
			} else {
				r.push(`figures out`);
			}
			r.push(`what you're doing, ${he}`);
			if (canSee(eventSlave)) {
				r.push(`stares`);
			} else {
				r.push(`smiles`);
			}
			r.push(`up at you longingly and gives ${his} four P-Limb anchor points a glinting wiggle, a gesture that might mean anything. In any case, ${he}'s openly hard and ready for your use.`);
			App.Events.addParagraph(frag, r);

			r = [];
			r.push(`After tormenting your helpless toy with some more grinding, you pick yourself up before slamming back down, spearing your`);
			if (V.PC.vagina >= 0) {
				r.push(`pussy`);
				seX(eventSlave, "penetrative", V.PC, "vaginal");
				if (canImpreg(V.PC, eventSlave)) {
					knockMeUp(V.PC, 20, 0, eventSlave.ID);
				}
			} else {
				r.push(`asshole`);
				seX(eventSlave, "penetrative", V.PC, "anal");
				if (canImpreg(V.PC, eventSlave)) {
					knockMeUp(V.PC, 20, 1, eventSlave.ID);
				}
			}
			r.push(`on ${his} stiff rod and taking ${him} for a ride. ${He} has no control at all, but ${he} trusts you not to hurt ${him} and is soon enjoying ${himself}. ${He} can't seem to stop ${himself} from trying to move P-Limbs that aren't there, forgetting that ${he}'s not wearing them whenever the arousal builds high enough to make ${him} forgetful. Eventually ${he} stops trying to restrain ${himself}, realizing that you're enjoying ${his} delicious wriggling beneath you. ${He} orgasms hard,`);
			if (V.PC.vagina >= 0) {
				r.push(`painting the walls of your vagina white.`);
			} else {
				r.push(`flooding your rectum with cum.`);
			}
			App.Events.addParagraph(frag, r);
			App.Events.addParagraph(frag, [`When you've climaxed yourself, ${he} looks towards ${his} waiting P-Limbs, but you're not done with ${him} yet. You pick ${him} up again and bring ${him} into the shower. ${He} tries to help you, but again, ${he} gives up after a while, letting you wash ${him}. As you're rinsing the soap off ${him}, ${he} thanks you devotedly. With the water streaming down ${his} face, you barely notice ${his} gentle tears.`]);
			eventSlave.devotion += 4;
			return frag;
		}
	}
};

repo_name: Fekenol/fc

license: mit


code:
App.Events.RESSPlugDisobedience = class RESSPlugDisobedience extends App.Events.BaseEvent {
	eventPrerequisites() {
		return []; // always valid if sufficient actors can be cast successfully
	}

	actorPrerequisites() {
		return [
			[ // single event slave
				s => s.fetish !== "mindbroken",
				canMove,
				s => plugWidth(s) > 1 || plugLength(s) > 0,
				s => s.devotion <= 20,
				s => s.trust >= -50,
				s => s.anus < 3,
				s => s.assignment !== Job.CONFINEMENT,
				isSlaveAvailable,
			]
		];
	}

	execute(node) {
		const [eventSlave] = this.actors.map(a => getSlave(a));
		const {
			He, he, his, him, girl
		} = getPronouns(eventSlave);
		const {title: Master} = getEnunciation(eventSlave);
		const belly = bellyAdjective(eventSlave);

		App.Events.drawEventArt(node, eventSlave);

		let r = [];
		r.push(`One morning, you see`);
		r.push(contextualIntro(V.PC, eventSlave, true));
		if (!canWalk(eventSlave)) {
			r.push(`crawl`);
		} else if (canMove(eventSlave) && eventSlave.rules.mobility === "permissive") {
			r.push(`hobble`);
		} else if (shoeHeelCategory(eventSlave) > 1) {
			r.push(`totter`);
		} else if (eventSlave.belly >= 10000) {
			r.push(`waddle`);
		} else {
			r.push(`walk`);
		}
		r.push(`hurriedly past your door, as though ${he} doesn't want you to notice ${him}. Of course, this only makes you notice ${him}, and you order ${him} in. As ${he} reluctantly obeys, you notice something off about ${his} ${canWalk(eventSlave) ? "gait" : "movements"}. ${He} should be quite uncomfortable from the`);
		if (plugWidth(eventSlave) > 1 && plugLength(eventSlave) > 0) {
			r.push(`massive`);
		} else if (plugLength(eventSlave) > 0) {
			r.push(`long`);
		} else {
			r.push(`big`);
		}
		r.push(`buttplug ${he} is required to wear, but ${he} doesn't seem to be.`);
		App.Events.addParagraph(node, r);

		r = [];
		r.push(`Your order ${him} to turn around and present ${his} anus for inspection. ${He} doesn't refuse, exactly, but neither does ${he} obey. ${He} keeps ${his} butt pointed resolutely away from you, and backs away a little. You cover the distance between you in three steps and run a clinical hand`);
		if (plugLength(eventSlave) > 0) {
			r.push(`across the terrified slave's lower belly.`);
		} else {
			r.push(`between the terrified slave's buttocks.`);
		}
		r.push(`As you suspected, ${he} isn't wearing ${his} buttplug.`);
		if (!canTalk(eventSlave)) {
			r.push(`${He} gestures pitifully, complaining that the plug hurts.`);
		} else {
			r.push(`${He} whines pitifully,`);
			r.push(Spoken(eventSlave, `"That thing hurts, ${Master}. It's too big for my asshole. Please don't make me wear it."`));
		}

		App.Events.addParagraph(node, r);
		App.Events.addResponses(node, [
			new App.Events.Result(`It's ${his} role to hurt`, hurt),
			new App.Events.Result(`Punish ${him} for disobedience, but address ${his} anal pain`, punish),
			new App.Events.Result(`Address ${his} worrisome anal pain`, address),
		]);

		function hurt() {
			r = [];
			r.push(`Without a word, you`);
			if (V.PC.dick === 0) {
				r.push(`don a cruelly knobby strap-on,`);
			}
			r.push(`throw ${him} onto the couch, take both ${his} ankles in one hand, and force them back over ${his} head so ${his} poor, doomed asshole is completely defenseless. You then spit on ${his} hole, seize your`);
			if (V.PC.dick === 0) {
				r.push(`instrument,`);
			} else {
				r.push(`rock-hard dick,`);
				if (V.PC.vagina !== -1) {
					r.push(`gather a little of your own pussyjuice and rub it on your cockhead,`);
				}
			}
			r.push(`and shove it up the wriggling slave ${girl}'s spasming rectum. You've got the necessary skill to judge exactly where the line between anal pain and anal injury is, and you take ${his} right up to it. Halfway through the long anal rape ${he} gives up struggling and just goes limp, sobbing. ${He} fears you, and has also begun to hate buttsex.`);
			eventSlave.trust -= 5;
			eventSlave.sexualFlaw = "hates anal";
			seX(eventSlave, "anal", V.PC, "penetrative");
			return r;
		}

		function punish() {
			r = [];
			r.push(`You patiently and calmly explain to ${him} that disobeying orders isn't acceptable, but that too much pain from ${his} buttplug is a sign that something isn't right. First, you inform ${him}, ${he} will have to be punished for the disobedience, since ${he} should have brought ${his} trouble to you instead of disobeying. ${He}'s almost willing as you bend ${him} over`);
			if (eventSlave.belly >= 300000) {
				r.push(`${his} ${belly} middle`);
			} else {
				r.push(`the desk`);
			}
			r.push(`and spank ${his} buttocks severely, unsure whether to resent the corporal punishment or appreciate your measured response. When you're done tanning ${his} ass, ${he}'s surprised to feel a cool, lubricated digit working its way into ${his} anus. ${He} stiffens a little but eventually relaxes enough to take the finger, then two, and finally three, before you gently and slowly emplace ${his} plug. You instruct ${him} kindly on how to relax in the future when ${he} inserts it on ${his} own. ${He} appreciates your approach.`);
			eventSlave.devotion += 4;
			return r;
		}

		function address() {
			eventSlave.trust += 4;
			return `You kindly explain how to relax and prepare one's asshole for such insertions. ${He}'s been told already, but you make ${him} fetch ${his} plug and go through the steps in front of you so you can check ${his} approach. ${He} leaves reminded how to wear ${his} plug, but secretly relieved ${he} got away with disobedience with nothing more than a lecture.`;
		}
	}
};


code:
App.Events.RESSRefreshmentDelivery = class RESSRefreshmentDelivery extends App.Events.BaseEvent {
	eventPrerequisites() {
		return []; // always valid if sufficient actors can be cast successfully
	}

	actorPrerequisites() {
		return [
			[ // single event slave
				s => s.fetish !== "mindbroken",
				hasAnyArms,
				canWalk,
				s => s.devotion > 20,
				s => s.trust > -10,
				s => s.ID !== V.HeadGirlID,
				s => s.ID !== V.ConcubineID,
			]
		];
	}

	execute(node) {
		const [eventSlave] = this.actors.map(a => getSlave(a));
		const {
			His, He, he, his, him, himself, girl
		} = getPronouns(eventSlave);
		const belly = bellyAdjective(eventSlave);
		const children = eventSlave.pregType > 1 ? "children" : "child";

		App.Events.drawEventArt(node, eventSlave);

		let r = [];
		r.push(
			`When it's time for refreshments, ${V.assistant.name} directs the closest unoccupied slave capable of bringing them in to do so. This has the added advantage of bringing an enjoyably unpredictable variety of slaves under your eyes. This time,`,
			contextualIntro(V.PC, eventSlave, true),
			`comes through the door of your office, carrying`
		);
		if (V.PC.refreshmentType === 0) {
			r.push(`a selection of ${V.PC.refreshment} brands and the necessary implements`);
		} else if (V.PC.refreshmentType === 1) {
			r.push(`a bottle of ${V.PC.refreshment} with a glass in your favorite style`);
		} else if (V.PC.refreshmentType === 2) {
			r.push(`a selection of ${V.PC.refreshment} on a plate of your favored style`);
		} else if (V.PC.refreshmentType === 3) {
			r.push(`a line of ${V.PC.refreshment} and the necessary implements`);
		} else if (V.PC.refreshmentType === 4) {
			r.push(`a syringe of ${V.PC.refreshment} and the necessary implements`);
		} else if (V.PC.refreshmentType === 5) {
			r.push(`a bottle of ${V.PC.refreshment}`);
		} else if (V.PC.refreshmentType === 6) {
			r.push(`several sheets of ${V.PC.refreshment}`);
		}
		if (eventSlave.preg > eventSlave.pregData.normalBirth / 1.33) {
			r.push(`on a tray carefully held against ${his} pregnant belly, doing ${his} best to will ${his} ${children} to not kick the tray off balance.`);
		} else if (eventSlave.belly >= 10000) {
			r.push(`on a tray carefully held against ${his} ${belly}`);
			if (eventSlave.bellyPreg >= 3000) {
				r.push(`pregnant`);
			}
			r.push(`belly.`);
		} else {
			r.push(`on a tray.`);
		}
		App.Events.addParagraph(node, r);

		r = [];
		r.push(`${He} comes to a stop right beside your elbow, waiting for further direction, just as ${he}'s been trained to do in these cases.`);
		if (getLimbCount(eventSlave, 102) > 2) {
			r.push(`As ${he} maintains ${his} posture obediently, ${his} P-Limbs produce minute machine noises. They allow ${him} good coordination, but their gyros and servomotors are constantly working to maintain it, which means that when ${he} stands still, they're not perfectly quiet.`);
		} else if (eventSlave.boobs > 4000) {
			r.push(`${His} breasts are so massive that ${he}'s got the tray more or less balanced on top of them. As ${he} breathes, ${his} tits rise and fall slightly,`);
			if (V.PC.refreshmentType === 0) {
				r.push(`causing the ${V.PC.refreshment} collection to roll from side to side.`);
			} else if (V.PC.refreshmentType === 1) {
				r.push(`causing ripples in the bottle of ${V.PC.refreshment}.`);
			} else if (V.PC.refreshmentType === 2) {
				r.push(`threatening to knock the ${V.PC.refreshment} from it's plate.`);
			} else if (V.PC.refreshmentType === 3) {
				r.push(`disturbing the lines of ${V.PC.refreshment}.`);
			} else if (V.PC.refreshmentType === 4) {
				r.push(`causing the syringes of ${V.PC.refreshment} to roll from side to side.`);
			} else if (V.PC.refreshmentType === 5) {
				r.push(`rattling the ${V.PC.refreshment} in its bottle.`);
			} else if (V.PC.refreshmentType === 6) {
				r.push(`threatening to knock the sheets of ${V.PC.refreshment} off the tray.`);
			}
		} else if (eventSlave.preg > eventSlave.pregData.normalBirth / 1.33) {
			r.push(`${He} keeps the tray balanced atop ${his} ${belly} pregnancy, though the weight encourages ${his} ${children} to begin kicking. As you glance over at ${him}, ${he} lets out a minute, tired sigh, as kicks from ${his} ${children}`);
			if (V.PC.refreshmentType === 0) {
				r.push(`cause the ${V.PC.refreshment} collection to roll from side to side.`);
			} else if (V.PC.refreshmentType === 1) {
				r.push(`cause ripples in the bottle of ${V.PC.refreshment}.`);
			} else if (V.PC.refreshmentType === 2) {
				r.push(`threaten to knock the ${V.PC.refreshment} from it's plate.`);
			} else if (V.PC.refreshmentType === 3) {
				r.push(`disturb the lines of ${V.PC.refreshment}.`);
			} else if (V.PC.refreshmentType === 4) {
				r.push(`cause the syringes of ${V.PC.refreshment} to roll from side to side.`);
			} else if (V.PC.refreshmentType === 5) {
				r.push(`rattle the ${V.PC.refreshment} in its bottle.`);
			} else if (V.PC.refreshmentType === 6) {
				r.push(`threaten to knock the sheets of ${V.PC.refreshment} off the tray.`);
			}
		} else if (eventSlave.belly >= 10000) {
			r.push(`${His}`);
			if (eventSlave.bellyPreg >= 3000) {
				r.push(`pregnant`);
			}
			r.push(`belly is big enough that ${he}'s got the tray more or less balanced on top of it. As you glance over at ${him}, ${he} lets out a minute, tired sigh,`);
			if (V.PC.refreshmentType === 0) {
				r.push(`causing the ${V.PC.refreshment} collection to roll from side to side.`);
			} else if (V.PC.refreshmentType === 1) {
				r.push(`causing ripples in the bottle of ${V.PC.refreshment}.`);
			} else if (V.PC.refreshmentType === 2) {
				r.push(`nearly rocking the ${V.PC.refreshment} from it's plate.`);
			} else if (V.PC.refreshmentType === 3) {
				r.push(`disturbing the lines of ${V.PC.refreshment}.`);
			} else if (V.PC.refreshmentType === 4) {
				r.push(`causing the syringes of ${V.PC.refreshment} to roll from side to side.`);
			} else if (V.PC.refreshmentType === 5) {
				r.push(`nearly tipping the bottle of ${V.PC.refreshment}.`);
			} else if (V.PC.refreshmentType === 6) {
				r.push(`threatening to blow the sheets of ${V.PC.refreshment} off the tray.`);
			}
		} else if (eventSlave.muscles > 30) {
			r.push(`With ${his} incredible musculature, ${he}'s able to maintain utter stillness in the perfect posture of an obedient slave. A naturally standing human makes some small movements, but ${his} strength allows ${him} to suppress them by setting muscle groups against each other. This has the ancillary benefit of making them stand out nicely.`);
		} else if (eventSlave.muscles < -30) {
			r.push(`${He} is so physically frail that ${he} can barely manage to hold the tray steady. As ${he} rapidly tires, ${his} ${hasBothArms(eventSlave) ? "arms begin slightly shaking" : "arm begins to slightly shake"},`);
			if (V.PC.refreshmentType === 0) {
				r.push(`causing the ${V.PC.refreshment} collection to roll from side to side.`);
			} else if (V.PC.refreshmentType === 1) {
				r.push(`causing ripples in the bottle of ${V.PC.refreshment}.`);
			} else if (V.PC.refreshmentType === 2) {
				r.push(`threatening to knock the ${V.PC.refreshment} from it's plate.`);
			} else if (V.PC.refreshmentType === 3) {
				r.push(`disturbing the lines of ${V.PC.refreshment}.`);
			} else if (V.PC.refreshmentType === 4) {
				r.push(`causing the syringes of ${V.PC.refreshment} to roll from side to side.`);
			} else if (V.PC.refreshmentType === 5) {
				r.push(`rattling the ${V.PC.refreshment} in its bottle.`);
			} else if (V.PC.refreshmentType === 6) {
				r.push(`threatening to knock the sheets of ${V.PC.refreshment} off the tray.`);
			}
		} else if (eventSlave.energy > 95) {
			r.push(`${He}'s controlling ${his} absurd sex drive for the moment, but ${he} clearly wouldn't mind some sex as part of the delivery.`);
			if (eventSlave.dick > 0) {
				if (canAchieveErection(eventSlave)) {
					r.push(`${His} cock is painfully erect,`);
				} else {
					r.push(`${His} soft dick is dribbling precum,`);
				}
			} else if (eventSlave.vagina === -1) {
				r.push(`${He}'s unconsciously presenting ${his} bottom,`);
			} else {
				r.push(`${His} pussy is visibly soaked,`);
			}
			r.push(`showing unmistakably how badly ${he} needs release.`);
		} else {
			r.push(`${He} keeps ${his}`);
			if (canSee(eventSlave)) {
				r.push(App.Desc.eyesColor(eventSlave));
			} else {
				r.push(`face`);
			}
			r.push(`slightly downcast, ${his} back arched, ${his} chest pressed outward, and ${his} bottom stuck out a bit. ${He}'s the perfect picture of an obedient little sex slave`);
			if (eventSlave.height > 185) {
				r.push(`(though, of course, ${he}'s anything but physically small)`);
			}
			r.push(r.pop() + `.`);
		}

		App.Events.addParagraph(node, r);
		App.Events.addResponses(node, [
			new App.Events.Result(`Enjoy some oral with your refreshments`, oral),
			canDoAnal(eventSlave)
				? new App.Events.Result(`Show ${him} a special way to enjoy refreshments`, special)
				: new App.Events.Result(),
			V.PC.refreshmentType === 0
				? new App.Events.Result(`Put your ${V.PC.refreshment} out on ${him}`, put)
				: new App.Events.Result(),
		]);

		function oral() {
			r = [];
			r.push(`There were many things about being an arcology owner you didn't properly understand before you became one. One of the smallest and yet most enjoyable is the unlimited availability of`);
			if (V.PC.refreshmentType === 0) {
				r.push(`a good ${V.PC.refreshment}`);
			} else if (V.PC.refreshmentType === 1) {
				r.push(`a glass of ${V.PC.refreshment}`);
			} else if (V.PC.refreshmentType === 2) {
				r.push(`a plate of ${V.PC.refreshment}`);
			} else if (V.PC.refreshmentType === 3) {
				r.push(`${V.PC.refreshment}`);
			} else if (V.PC.refreshmentType === 4) {
				r.push(`a syringe of ${V.PC.refreshment}`);
			} else if (V.PC.refreshmentType === 5) {
				r.push(`bottles of ${V.PC.refreshment}`);
			} else if (V.PC.refreshmentType === 6) {
				r.push(`tabs of ${V.PC.refreshment}`);
			}
			r.push(`and`);
			if (V.PC.dick !== 0) {
				r.push(`a blowjob`);
				if (V.PC.vagina !== -1) {
					r.push(`and`);
				}
			}
			if (V.PC.vagina !== -1) {
				r.push(`some cunnilingus`);
			}
			r.push(r.pop() + ".");
			r.push(`Turning to ${eventSlave.slaveName}, you`);
			if (V.PC.refreshmentType === 0) {
				r.push(`select a ${V.PC.refreshment},`);
			} else if (V.PC.refreshmentType === 1) {
				r.push(`pour yourself some ${V.PC.refreshment},`);
			} else if (V.PC.refreshmentType === 2) {
				r.push(`serve yourself a plate of ${V.PC.refreshment},`);
			} else if (V.PC.refreshmentType === 3) {
				r.push(`prepare a line of ${V.PC.refreshment},`);
			} else if (V.PC.refreshmentType === 4) {
				r.push(`select a syringe of ${V.PC.refreshment},`);
			} else if (V.PC.refreshmentType === 5) {
				r.push(`carefully tap out enough pills of ${V.PC.refreshment} to satisfy you,`);
			} else if (V.PC.refreshmentType === 6) {
				r.push(`carefully pick up a tab of ${V.PC.refreshment},`);
			}
			r.push(`relieve the slave of the tray, and`);
			if (!canSee(eventSlave) && canHear(eventSlave)) {
				r.push(`audibly`);
			}
			r.push(`widen your legs slightly`);
			if (V.PC.belly >= 5000) {
				r.push(`as you slide forward`);
			}
			r.push(`in your chair. ${He}`);
			if (!canSee(eventSlave) && !canHear(eventSlave)) {
				r.push(`needs a little tug to catch your order, but ${he}`);
			}
			if (eventSlave.belly >= 300000) {
				r.push(`gently leans onto ${his} ${belly}`);
				if (eventSlave.bellyPreg >= 3000) {
					r.push(`pregnant`);
				}
				r.push(`belly`);
			} else if (eventSlave.belly >= 5000) {
				r.push(`gently lowers ${his}`);
				if (eventSlave.bellyPreg >= 3000) {
					r.push(`pregnant`);
				} else {
					r.push(`swollen`);
				}
				r.push(`body to its knees`);
			} else {
				r.push(`immediately drops to ${his} knees`);
			}
			r.push(`and gets to work,`);
			if (eventSlave.skill.oral >= 100) {
				r.push(`using all of ${his} mastery in giving oral pleasure.`);
			} else if (eventSlave.skill.oral > 60) {
				r.push(`using all of ${his} skills in giving oral pleasure.`);
			} else {
				r.push(`doing ${his} best despite ${his} mediocre oral skills.`);
			}
			if (eventSlave.teeth === "pointy") {
				r.push(`You can feel the extreme care ${he} has to take to keep ${his} shark-like teeth clear of you.`);
			} else if (eventSlave.lips > 40) {
				r.push(`${His} huge lips are soft and pillowy against you.`);
			} else if (eventSlave.teeth === "fangs") {
				r.push(`You can feel the slight hesitations as ${he} takes care to not poke you with ${his} fangs.`);
			} else if (eventSlave.teeth === "fang") {
				r.push(`${His} fang adds some thrill as it rubs against you.`);
			} else if (eventSlave.teeth === "gapped") {
				r.push(`You can feel the slight hesitations as ${he} takes care to not pinch you between ${his} front teeth.`);
			} else if (eventSlave.teeth === "straightening braces" || eventSlave.teeth === "cosmetic braces") {
				r.push(`You can feel the slight hesitations as ${he} takes care to keep ${his} braces off you.`);
			}
			r.push(`You take your time,`);
			if (V.PC.refreshmentType === 0) {
				r.push(`smoking meditatively`);
			} else if (V.PC.refreshmentType === 1) {
				r.push(`taking meditative sips`);
			} else if (V.PC.refreshmentType === 2) {
				r.push(`taking meditative bites`);
			} else if (V.PC.refreshmentType === 3) {
				r.push(`enjoying your ${V.PC.refreshment} high`);
			} else if (V.PC.refreshmentType === 4) {
				r.push(`injecting a fix into your arm`);
			} else if (V.PC.refreshmentType === 5) {
				r.push(`popping a few ${V.PC.refreshment}`);
			} else if (V.PC.refreshmentType === 6) {
				r.push(`holding the tab under your tongue`);
			}
			r.push(`and running a thoughtful hand`);
			if (eventSlave.hLength > 1) {
				r.push(`through ${eventSlave.slaveName}'s ${eventSlave.hColor} hair`);
			} else {
				r.push(`across ${eventSlave.slaveName}'s scalp`);
			}
			r.push(`while you look at the view out your office windows. This isn't the first time you've done this, nor will it be the last, and ${eventSlave.slaveName} is used to being used as a serving ${girl}.`);
			eventSlave.devotion += 4;
			seX(eventSlave, "oral", V.PC, "penetrative");
			return r;
		}

		function special() {
			r = [];
			if (V.PC.refreshmentType !== 2) {
				r.push(`You tell ${him} to hop up on the desk. ${He} obeys promptly,`);
				if (eventSlave.energy > 95) {
					r.push(`already starting to pant.`);
				} else {
					if (canSee(eventSlave)) {
						r.push(`watching you closely`);
					} else if (canHear(eventSlave)) {
						r.push(`listening closely`);
					} else {
						r.push(`waiting`);
					}
					r.push(`for further instructions.`);
				}
				r.push(`To ${his} complete lack of surprise, you tell ${him} to pull ${his} legs back and spread ${his} ${canDoVaginal(eventSlave) ? `holes` : "hole"}. As ${he} opens ${himself} for you, ${he}`);
				if (canSee(eventSlave)) {
					r.push(`sees`);
				} else if (canHear(eventSlave)) {
					r.push(`hears`);
				} else {
					r.push(`senses`);
				}
				r.push(`that you're doing something with`);
				if (V.PC.refreshmentType === 0) {
					r.push(`the ${V.PC.refreshment},`);
				} else if (V.PC.refreshmentType === 1) {
					r.push(`the bottle of ${V.PC.refreshment},`);
				} else if (V.PC.refreshmentType === 2) {
					r.push(`the plate of ${V.PC.refreshment},`);
				} else if (V.PC.refreshmentType === 3) {
					r.push(`the bag of ${V.PC.refreshment},`);
				} else if (V.PC.refreshmentType === 4) {
					r.push(`the syringe of ${V.PC.refreshment},`);
				} else if (V.PC.refreshmentType === 5) {
					r.push(`the bottle of ${V.PC.refreshment},`);
				} else if (V.PC.refreshmentType === 6) {
					r.push(`the tabs of ${V.PC.refreshment},`);
				}
				r.push(`and`);
				if (eventSlave.trust > 50) {
					r.push(`relaxes, trusting you completely.`);
				} else {
					r.push(`does ${his} best to relax.`);
				}
				r.push(`${He} gasps when ${he} feels`);
				if (V.PC.refreshmentType === 0) {
					r.push(`the head of the lit ${V.PC.refreshment}, warm from your mouth, being gently inserted into ${his}`);
					if (eventSlave.vagina > 0 && canDoVaginal(eventSlave)) {
						r.push(`pussy.`);
					} else {
						r.push(`asshole.`);
					}
					r.push(`You give ${him} precise muscular instructions, which ${he} does ${his} best to obey, and before long, ${he}'s slowly smoking it using ${his} fuckhole. ${His} body is very permeable there, and the effects of the it hit ${him} very quickly.`);
				} else if (V.PC.refreshmentType === 1) {
					r.push(`the cool tip of a small enema bulb being gently inserted into ${his} ass. You press the ${V.PC.refreshment} into ${him} slowly. You didn't give ${him} much, but ${his} body is very permeable there, and the effects hit ${him} very quickly.`);
				} else if (V.PC.refreshmentType === 3) {
					r.push(`${V.PC.refreshment} being gently inserted into ${his} ass. You didn't give ${him} much, but ${his} body is very permeable there, and the effects hit ${him} very quickly.`);
				} else if (V.PC.refreshmentType === 4) {
					r.push(`the tip of the syringe penetrate ${his}`);
					if (eventSlave.dick > 0) {
						r.push(`cock head`);
					} else if (eventSlave.vagina === -1) {
						r.push(`tiny front hole`);
					} else {
						r.push(`clit`);
					}
					r.push(`and the sting of the contents being forced into ${his} sex organ. You didn't give ${him} much, but ${his} body is very sensitive there, and the effects hit ${him} very quickly.`);
				} else if (V.PC.refreshmentType === 5) {
					r.push(`your finger pushing a pill deep into ${his}`);
					if (eventSlave.vagina > 0 && canDoVaginal(eventSlave)) {
						r.push(`pussy.`);
					} else {
						r.push(`asshole.`);
					}
					r.push(`You didn't give ${him} much, but ${his} body is very sensitive there, and the effects hit ${him} very quickly.`);
				} else if (V.PC.refreshmentType === 6) {
					r.push(`finger pushing a tab into ${his}`);
					if (eventSlave.vagina > 0 && canDoVaginal(eventSlave)) {
						r.push(`pussy.`);
					} else {
						r.push(`asshole.`);
					}
					r.push(`You didn't give ${him} much, but it quickly dissolves and ${his} body is very sensitive there, so the effects hit ${him} very quickly.`);
				}
				r.push(`You go back to work, letting the slave loll around on your desk, enjoying the effects. You reflect that it's probably some kind of milestone in wealth that you're willing to throw the good stuff around like this. When ${he}'s had time to reflect on the strange incident, ${he} resolves to trust you more in the future, since it can be fun.`);
			} else {
				r.push(`You tell ${him} to hop up on the desk and face you. ${He} obeys promptly,`);
				if (eventSlave.energy > 95) {
					r.push(`already starting to pant.`);
				} else {
					if (canSee(eventSlave)) {
						r.push(`watching you closely`);
					} else if (canHear(eventSlave)) {
						r.push(`listening closely`);
					} else {
						r.push(`waiting`);
					}
					r.push(`for further instructions.`);
				}
				r.push(`To ${his} surprise, you`);
				if (V.PC.boobs >= 300) {
					r.push(`unfasten your top, freeing your breasts, and`);
				}
				r.push(`uncover your`);
				if (V.PC.dick !== 0) {
					r.push(`stiffening cock`);
					if (V.PC.vagina !== -1) {
						r.push(`and moistening pussy`);
					}
				} else {
					r.push(`moistening pussy`);
				}
				r.push(r.pop() + ".");
				r.push(`Taking some ${V.PC.refreshment} in your fingers, you massage it onto your erect`);
				if (V.PC.dick !== 0 && V.PC.boobs >= 300) {
					r.push(`nipples and dick`);
				} else if (V.PC.vagina !== -1 && V.PC.boobs >= 300) {
					r.push(`nipples and clit`);
				} else if (V.PC.dick !== 0) {
					r.push(`dick`);
				} else {
					r.push(`clit`);
				}
				r.push(`making sure to cover yourself completely. You recline in your seat, beckoning to ${eventSlave.slaveName} to lick you clean. ${He} eagerly complies, eager to get a`);
				if (canTaste(eventSlave)) {
					r.push(`taste`);
				} else {
					r.push(`bit`);
				}
				r.push(`of ${V.PC.refreshment} after nothing but slave food for so long.`);
				if (eventSlave.skill.oral > 60) {
					r.push(`${He} is extremely skilled with ${his} tongue; before long, not only are you completely cleaned, but you can barely feel your crotch from ${his} masterful sucking.`);
				} else if (eventSlave.skill.oral > 30) {
					r.push(`${He} is quite skilled with ${his} tongue; before long, you are both cleaned off and enjoying some ${V.PC.refreshment} after the powerful orgasm ${he} coaxed out of you.`);
				} else if (eventSlave.skill.oral > 10) {
					r.push(`${He} has basic skill with ${his} tongue; before long, you are nearly cleaned of all the ${V.PC.refreshment}. With one final lick, ${he} takes the last`);
					if (canTaste(eventSlave)) {
						r.push(`taste`);
					} else {
						r.push(`drop`);
					}
					r.push(`of it and brings you to climax at the same time.`);
				} else {
					r.push(`${He} has no idea how to make this pleasurable; ${he} is merely greedily lapping up the ${V.PC.refreshment} off your body. As ${he} nears finishing your crotch, you grab ${his} head and hold ${him} to yourself until you are satisfied with ${his} licking.`);
				}
				r.push(`You go back to work, letting the slave sit back on your desk, licking ${his} lips of the combined`);
				if (canTaste(eventSlave)) {
					r.push(`taste`);
				} else {
					r.push(`feeling`);
				}
				r.push(`of you and ${V.PC.refreshment}. You reflect that it's probably some kind of milestone in wealth that you're willing to throw the good stuff around like this. When ${he}'s had time to reflect on the strange incident, ${he} resolves to trust you more in the future, since it can be fun`);
				if (canTaste(eventSlave)) {
					r.push(`and tasty`);
				}
				r.push(r.pop() + `.`);
				if (V.PC.dick !== 0) {
					seX(eventSlave, "oral", V.PC, "penetrative");
				}
				if (V.PC.vagina >= 0) {
					seX(eventSlave, "oral", V.PC, "vaginal");
				}
			}
			eventSlave.trust += 4;
			return r;
		}

		function put() {
			r = [];
			r.push(`You select a ${V.PC.refreshment} and start smoking, ordering ${him} to stick around and get ${his} tits out. ${He} sees nothing too unusual about this, and obeys complaisantly, standing beside you with ${his} breasts bare. You reach over and play with ${him} as you smoke, teasing ${his}`);
			if (eventSlave.nipples === "huge") {
				r.push(`massive, erect nipples.`);
			} else if (eventSlave.nipples === "inverted") {
				r.push(`painfully tender inverted nipples.`);
			} else if (eventSlave.nipples === "partially inverted") {
				r.push(`tender, partially inverted nipples.`);
			} else if (eventSlave.nipples === "fuckable") {
				r.push(`nipplecunts with your fingers.`);
			} else if (eventSlave.lactation > 0) {
				r.push(`motherly nipples.`);
			} else {
				r.push(`nipples and playing with ${his} boobs.`);
			}
			r.push(`Deciding that you're done with the ${V.PC.refreshment}, you pull a long draw of smoke into your mouth, bringing the coal at its foot to a fine glow. Then you pull it out of your mouth and press it against the slave's defenseless ${eventSlave.skin}`);
			if (eventSlave.preg > eventSlave.pregData.normalBirth / 2) {
				r.push(`pregnant belly.`);
			} else {
				r.push(`breast.`);
			}
			if (eventSlave.voice === 0) {
				r.push(`${He} makes the horrible rasping noise that ${his} mute throat substitutes for screams of agony,`);
			} else {
				r.push(`${He} shrieks with agony,`);
			}
			r.push(`flinching away instinctively, and collapses to the`);
			if (eventSlave.fetish === "masochist") {
				r.push(`ground, orgasming from the sudden rush of stimulation`);
			} else {
				r.push(`ground.`);
			}
			r.push(`Writhing in pain, ${he} cherishes the burn on ${his}`); // TODO: Add chance of scarring?
			if (eventSlave.preg > eventSlave.pregData.normalBirth / 2) {
				r.push(`stomach`);
			} else {
				r.push(`breast`);
			}
			r.push(`with`);
			if (hasBothArms(eventSlave)) {
				r.push(`both hands,`);
			} else {
				r.push(`${his} hand,`);
			}
			r.push(`${his} sobbing only interrupted by ragged gasps for breath. You order ${him} to go get ${his} burn looked at, and go back to your work. ${He} scrabbles toward the door, weeping,`);
			if (eventSlave.fetish === "masochist") {
				r.push(`horrified at ${himself} for getting off to that, <span class="devotion inc">more convinced than ever that ${he}'s a pain slut,</span> and yet`);
				eventSlave.devotion += 4;
				eventSlave.fetishKnown = 1;
			}
			r.push(`<span class="trust dec">eager to get away.</span>`);
			eventSlave.trust -= 5;
			return r;
		}
	}
};


code:
App.Events.RESSRestrictedSmart = class RESSRestrictedSmart extends App.Events.BaseEvent {
	eventPrerequisites() {
		return []; // always valid if sufficient actors can be cast successfully
	}

	actorPrerequisites() {
		return [
			[ // single event slave
				s => s.fetish !== "mindbroken",
				canTalk,
				canHear,
				s => s.assignment !== Job.QUARTER,
				s => s.rules.speech === "restrictive",
				s => s.intelligence > 15,
				s => s.trust >= -20,
				s => s.devotion <= 20,
			]
		];
	}

	execute(node) {
		const [eventSlave] = this.actors.map(a => getSlave(a));
		const {
			His, He, he, his, him, himself, girl
		} = getPronouns(eventSlave);
		const {title: Master, say} = getEnunciation(eventSlave);
		const belly = bellyAdjective(eventSlave);

		App.Events.drawEventArt(node, eventSlave, "no clothing");

		let r = [];
		r.push(`During a routine inspection of`);
		r.push(App.UI.DOM.combineNodes(contextualIntro(V.PC, eventSlave, true), ","));
		r.push(`you notice that ${he}'s behaving a little strangely. ${He}'s participating in the inspection with almost manic attention, trying to anticipate your directions and hanging desperately on your every word. After a moment, you reflect that ${he}'s a smart ${girl}, and is probably suffering for a lack of conversation. As you regard ${him}`);
		if (!hasAnyLegs(eventSlave)) {
			r.push(`sitting`);
			if (hasAnyArms(eventSlave)) {
				r.push(`helplessly`);
			} else {
				r.push(`limblessly`);
			}
		} else if (!canStand(eventSlave)) {
			r.push(`kneeling`);
		} else {
			r.push(`standing`);
		}
		r.push(`there, ${his}`);
		if (canSee(eventSlave)) {
			r.push(`eyes almost scream`);
		} else {
			r.push(`face almost screams`);
		}
		r.push(`at you for some sort of stimulation. ${His} life is not without mental interest, but talking is one of the quintessential human behaviors, and having it taken away is very difficult for someone as intelligent as ${him}. A mute almost might have it easier, for ${he} is also denied the volubility through sign language that mute slaves under less restrictive rules often enjoy.`);

		App.Events.addParagraph(node, r);
		App.Events.addResponses(node, [
			new App.Events.Result(`Discuss ${his} future with ${him}`, discuss),
			canDoAnal(eventSlave)
				? new App.Events.Result(`Let ${him} talk during a rough buttfuck`, buttfuck, eventSlave.anus === 0 ? `This option will take ${his} anal virginity` : null)
				: new App.Events.Result(),
			canDoVaginal(eventSlave)
				? new App.Events.Result(`Let ${him} try to talk during a vigorous fucking`, fucking, eventSlave.vagina === 0 ? `This option will take ${his} virginity` : null)
				: new App.Events.Result(),
		]);

		function discuss() {
			r = [];
			r.push(`You announce matter-of-factly that ${he}'s allowed to speak temporarily, and that you'll be discussing where ${he} is and where ${he} sees ${himself} in the near future. ${He}'s disconcerted by the subject but so desperate for conversation that ${he}'s overjoyed anyway.`);
			r.push(Spoken(eventSlave, `"I understand what you're doing, ${Master},"`), `${he} ${say}s forthrightly.`, Spoken(eventSlave, `"I'm to be broken down into a devoted slave."`), `${He} looks thoughtful.`, Spoken(eventSlave, `"I'll help you with that. It'll be easier if I do, won't it?"`), `${He} looks up, and you`);
			if (canSee(eventSlave)) {
				r.push(`nod in affirmation`);
			} else {
				r.push(`acknowledge ${him}`);
			}
			r.push(`${he} gives you a rueful smile.`, Spoken(eventSlave, `"A good slut would offer to give you oral now, I think. So, ${Master}, may I please be allowed to ${V.PC.dick === 0 ? "lick your pussy" : "suck your cock"}"?`));
			if (canSee(eventSlave)) {
				r.push(`You nod,`);
			} else {
				r.push(`You acknowledge,`);
			}
			r.push(`and tell ${him} that the rules are back in effect.`);
			if (isAmputee(eventSlave)) {
				r.push(`As you get ${his} helpless form into position,`);
			} else if (eventSlave.belly >= 300000) {
				r.push(`As ${he} struggles to get into position with ${his} ${belly} stomach in the way,`);
			} else if (!canStand(eventSlave)) {
				r.push(`As ${he} shifts into position,`);
			} else if (eventSlave.belly >= 10000) {
				r.push(`As ${he} gently lowers ${his}`);
				if (eventSlave.bellyPreg >= 3000) {
					r.push(`gravid`);
				} else {
					r.push(`bloated`);
				}
				r.push(`form to`);
				if (hasBothLegs(eventSlave)) {
					r.push(`its knees,`);
				} else {
					r.push(`the ground,`);
				}
			} else {
				r.push(`As ${he} gets down on`);
				if (hasBothLegs(eventSlave)) {
					r.push(`${his} knees,`);
				} else {
					r.push(`the ground,`);
				}
			}
			r.push(`${he} focuses on the task in front of ${him} with all ${his} considerable intelligence, clearly having decided to make things easier on ${himself} by conforming to ${his} new life.`);
			eventSlave.devotion += 4;
			seX(eventSlave, "oral", V.PC, "penetrative");
			return r;
		}

		function buttfuck() {
			r = [];
			if (isAmputee(eventSlave)) {
				r.push(`You lay ${his} fuckpuppet torso across`);
			} else if (!canStand(eventSlave)) {
				r.push(`You help ${him} lie back on`);
			} else if (eventSlave.belly >= 5000) {
				r.push(`You tip ${his}`);
				if (eventSlave.bellyPreg >= 3000) {
					r.push(`motherly`);
				} else {
					r.push(`swollen`);
				}
				r.push(`body backwards onto`);
			} else {
				r.push(`You push ${him} backwards onto`);
			}
			r.push(`your desk, groping ${his}`);
			if (eventSlave.butt > 15) {
				r.push(`absurd`);
			} else if (eventSlave.butt > 10) {
				r.push(`immense`);
			} else if (eventSlave.butt > 7) {
				r.push(`huge`);
			} else if (eventSlave.butt > 4) {
				r.push(`big`);
			} else if (eventSlave.butt > 1) {
				r.push(`moderate`);
			} else {
				r.push(`meager`);
			}
			r.push(`butt. You instruct ${him} that ${he}'ll be allowed to talk if ${he} wants, but not yet, as you`);
			if (V.PC.dick === 0) {
				r.push(`push a couple of fingers up`);
			} else {
				r.push(`line your cock up with`);
			}
			if (eventSlave.anus > 2) {
				r.push(`${his} gaping asshole.`);
			} else if (eventSlave.anus > 1) {
				r.push(`${his} sizable asshole.`);
			} else {
				r.push(`${his} tight asshole.`);
			}
			r.push(`As you penetrate ${him}, you tell ${him} that the time to talk is now.`);
			if (eventSlave.anus > 2) {
				r.push(`To make the sex sufficiently uncomfortable, you`);
				if (V.PC.dick === 0) {
					r.push(`finger fuck`);
				} else {
					r.push(`dick`);
				}
				r.push(`${him} without mercy.`);
			} else if (eventSlave.anus > 1) {
				r.push(`To make the sex sufficiently uncomfortable, you pull yourself out with every stroke, putting ${him} through initial anal penetration over and over.`);
			} else {
				r.push(`${His} butt is so tight that just a simple assfuck makes ${him} uncomfortable enough.`);
			}
			r.push(`${He} opens ${his} mouth, closes it again, grunts at the burning sensation of your rough use of ${his} poor ass, and then shuts up. You ask ${him} if ${he}'s sure ${he} doesn't have anything to say, and ${he} makes ${his} one verbal comment of the day:`, Spoken(eventSlave, `"No, ${Master}."`), `${He} understands the lesson here: fail to conform, get assraped. It's as simple as that.`);
			eventSlave.devotion += 3;
			eventSlave.trust -= 3;
			r.push(VCheck.Anal(eventSlave, 1));
			return r;
		}

		function fucking() {
			r = [];
			if (isAmputee(eventSlave)) {
				r.push(`You lay ${his} fuckpuppet torso across`);
			} else if (!canStand(eventSlave)) {
				r.push(`You help ${him} lie back on`);
			} else if (eventSlave.belly >= 5000) {
				r.push(`You tip ${his}`);
				if (eventSlave.bellyPreg >= 3000) {
					r.push(`motherly`);
				} else {
					r.push(`swollen`);
				}
				r.push(`body backwards onto`);
			} else {
				r.push(`You push ${him} backwards onto`);
			}
			r.push(`your desk, groping ${his}`);
			if (eventSlave.butt > 15) {
				r.push(`absurd`);
			} else if (eventSlave.butt > 10) {
				r.push(`immense`);
			} else if (eventSlave.butt > 7) {
				r.push(`huge`);
			} else if (eventSlave.butt > 4) {
				r.push(`big`);
			} else if (eventSlave.butt > 1) {
				r.push(`moderate`);
			} else {
				r.push(`meager`);
			}
			r.push(`butt. You instruct ${him} that ${he}'ll be allowed to talk if ${he} wants, but not yet, as you`);
			if (V.PC.dick === 0) {
				r.push(`push a dildo into`);
			} else {
				r.push(`line your cock up with`);
			}
			r.push(`${his}`);
			if (eventSlave.anus > 2) {
				r.push(`gaping`);
			} else if (eventSlave.anus > 1) {
				r.push(`sizable`);
			} else {
				r.push(`tight`);
			}
			r.push(`pussy. As you penetrate ${him}, you tell ${him} that the time to talk is now.`);
			if (eventSlave.vagina > 2) {
				r.push(`To make the sex sufficiently overwhelming, you`);
				if (V.PC.dick === 0) {
					r.push(`ram`);
				} else {
					r.push(`dick`);
				}
				r.push(`${him} without mercy.`);
			} else if (eventSlave.vagina > 1) {
				r.push(`To make the sex sufficiently overwhelming, you pull yourself out with every stroke, putting ${him} through initial penetration over and over.`);
			} else {
				r.push(`${His} cunt is so tight that just a simple fucking overwhelms ${him} with pleasure.`);
			}
			r.push(`${He} opens ${his} mouth, closes it again, groaning at the sensation of your rough use of ${his} body, and then stops trying. You ask ${him} if ${he}'s sure ${he} doesn't have anything to say, and ${he} lets off an orgasmic moan. There's no need to talk when your owner is fucking your brains out.`);
			eventSlave.devotion += 3;
			eventSlave.trust += 3;
			r.push(VCheck.Vaginal(eventSlave, 1));
			return r;
		}
	}
};


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

	actorPrerequisites() {
		return [
			[
				s => s.fetish !== "mindbroken",
				s => s.assignment !== "work as a servant",
				canStand,
				hasAnyArms,
				s => s.dietCum > 0,
				s => s.devotion <= 20,
				s => (s.fetish !== "cumslut" && s.fetish !== "masochist" && s.fetishStrength < 60) || s.fetishKnown === 0,
			]
		];
	}

	execute(node) {
		const [eventSlave] = this.actors.map(a => getSlave(a));
		const {
			He, he, His, his, him, girl
		} = getPronouns(eventSlave);

		App.Events.drawEventArt(node, eventSlave, "no clothing");

		let t = [];
		t.push(`You are inspecting the slave feeding area early in the week, watching your slaves as they come and go to get their required nourishment for the morning, and`);
		t.push(contextualIntro(V.PC, eventSlave, true));
		t.push(`catches your attention.`);
		if (V.cockFeeder === 1) {
			t.push(`You see as ${he} kneels in front of the feeder`);
			t.push(canSee(eventSlave) ? `phallus, staring at it with disgust plainly written on ${his} face.` : `phallus with a look of disgust on ${his} face.`);
		} else if (canSee(eventSlave)) {
			t.push(`You see ${him} staring into ${his} cup of nutritional fluid with a look of disgust on ${his} face.`);
		} else {
			t.push(`You see ${him} grimacing at ${his} cup of nutritional fluid.`);
		}
		t.push(`You quickly check your records and ${V.assistant.name} confirms that ${eventSlave.slaveName} is required to ingest`);
		t.push(eventSlave.dietCum === 2 ? `an extreme diet based almost entirely on human ejaculate.` : `a large amount of human ejaculate as part of ${his} diet.`);
		App.Events.addParagraph(node, t);

		t = [];
		t.push(`You watch ${eventSlave.slaveName} as ${he} retches unpleasantly,`);
		t.push(V.cockFeeder === 1 ? `stimulating the feeder phallus with ${his} mouth` : `tentatively drinking from ${his} cup`);
		t.push(`and choking ${his} food down. ${He} knows that if ${he} doesn't eat it willingly, ${he}'ll will be forced to, and you can almost see ${his}`);
		t.push(eventSlave.intelligence + eventSlave.intelligenceImplant > 15 ? `intelligent mind` : `stupid mind`);
		t.push(`working through the reality of what ${his} life has become. ${He} is now a receptacle for`);
		if (eventSlave.dietCum === 2) {
			t.push(`concentrated`);
		}
		t.push(`human ejaculate, and for no other reason than the perverse amusement of ${his} owner. Almost as soon as ${he} swallows ${his} food, ${he} whimpers, burps, and then`);
		t.push(eventSlave.belly >= 10000 ? `hastily waddles` : `quickly runs`);
		t.push(`to a nearby bathroom to vomit it back up. This is a common reaction for unbroken slaves on cum diets,`);
		t.push(eventSlave.weight > 0 ? `and can also be an effective, if unhealthy, way of forcing them to lose weight.` : `but it can also prevent slaves that are already too thin from gaining weight.`);

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

		App.Events.addResponses(node, [
			new App.Events.Result(`Have mercy on the poor ${girl} and take ${him} off ${his} cum diet for now`, mercy),
			(eventSlave.dietCum === 1)
				? new App.Events.Result(`Force ${him} onto a heavy cum diet, and double up on ${his} ejaculate intake`, heavy)
				: new App.Events.Result(),
			(eventSlave.dietCum === 2)
				? new App.Events.Result(`Give the poor ${girl} a break and reduce ${his} cum intake to a more modest level`, reduce)
				: new App.Events.Result(),
			new App.Events.Result(`Suppress ${his} gag reflex and double ${his} cum intake for a week`, double),
			(V.arcade > 0)
				? new App.Events.Result(`Sentence ${him} to a day in ${V.arcadeName} for cum injection therapy`, arcade)
				: new App.Events.Result(),
		]);

		function mercy() {
			eventSlave.devotion -= 5;
			eventSlave.trust += 5;
			eventSlave.dietCum = 0;
			return `You see how ${eventSlave.slaveName} is suffering and you decide to reconsider ${his} dietary prescription. You instruct ${V.assistant.name} to change ${eventSlave.slaveName}'s diet to exclude cum for now. Slaves who can't eat are unhealthy, and unhealthy slaves are unprofitable slaves. ${He} is now more confident that ${he} can resist you and get ${his} way, ${he} also trusts you a little more to look after ${his} well being.`;
		}
		function heavy() {
			eventSlave.devotion -= 3;
			eventSlave.trust -= 3;
			eventSlave.dietCum = 2;
			return `You instruct ${V.assistant.name} to double down on ${eventSlave.slaveName}'s cum diet. Ungrateful little sluts who retch up their expensive food sometimes need tough love. Making ${his} cum-food thicker and more concentrated might help ${him} to learn that no matter how bad things seem, you can always make them worse. Initially ${his} new heavy cum diet makes no difference in ${his} ability to keep it down, but you tell ${him} to give it some time. Eventually ${he} will learn to appreciate cum as the primary ingredient in everything ${he} ingests. All of your future cumsluts do, sooner or later. ${His} pathetic tears reveal how helpless ${he} feels, but they don't hide the streak of rebelliousness that remains burning inside ${him}.`;
		}

		function reduce() {
			eventSlave.devotion += 2;
			eventSlave.trust += 2;
			eventSlave.dietCum = 1;
			return `${eventSlave.slaveName} is on a very heavy cum diet, and it's possible you're forcing ${him} to take too much, too soon. You decide to give ${him} a break and instruct ${V.assistant.name} to reduce, but not eliminate the amount of cum in ${his} diet. Although it doesn't immediately make ${him} hate cum any less, ${he} appreciates your willingness to make things a little less unpleasant for ${him}. ${He} is a little less afraid of you too, although not as much as if you'd taken ${him} off ${his} cum diet altogether.`;
		}

		function double() {
			t = [];
			t.push(`${He} is already on a very heavy cum-based diet, and there's only so much ejaculate you can force a slut to ingest before it negatively affects ${his} health. However, as a temporary measure, you still have options. You instruct ${V.assistant.name} to re-double the amount of ejaculate in ${eventSlave.slaveName}'s diet for the week. You also have ${him} closely monitored and injected with anti-nausea drugs to help ${his} hold down ${his} food. Although the idea of being forced to eat large amounts of human reproductive fluid still disgusts ${him}, the week of having a super-concentrated cum-diet, along with the suppressed reflex to purge it has its effect. Knowing that you monitor and control every aspect of ${his} life breaks down ${his} resistance to your will, and by the end of the week, ${he} is grateful that you return ${him} to a more nutritionally viable regimen — even if its cum content is still overwhelmingly high.`);
			if (eventSlave.fetishKnown === 1) {
				t.push(`<span class="lightcoral">${His} brain has now begun to accept the sexual perversity of ${his} food as a turn on.</span>`);
			} else {
				t.push(`${He} is now able to eat and digest ${his} prescribed diet without pharmacological assistance.`);
			}
			eventSlave.devotion += 5;
			eventSlave.fetish = "cumslut";
			if (eventSlave.fetishKnown === 1) {
				eventSlave.fetishStrength = 10;
			}
			return t;
		}
		function arcade() {
			t = [];
			t.push(`You have ${V.assistant.name} inform ${eventSlave.slaveName} of ${his} unacceptable behavior and sentence ${him} to a day in ${V.arcadeName}. ${He} cries and pleads for mercy, and even begs to be allowed to suck a cock, any cock, so ${he} can prove ${his} newfound enthusiasm for cum, but you are unmerciful as two other slaves drag ${him} off to serve ${his} sentence. ${He} is forced to wear`);
			t.push(eventSlave.vagina !== -1 ? `a combined vaginal and` : `an`);
			t.push(`anal chastity belt so that the only hole available is ${his} mouth, and is then confined in ${V.arcadeName} with ${his} mouth spread open by a ring gag and ${his} head sticking through the hole in the wall. A sign below ${his} mouth proclaims ${him} to be a "cum extraction tube" and ${he} is used that way for the duration of ${his} stay — a grueling, 18-hour marathon of relentless throat fucking.`);
			if (eventSlave.sexualFlaw !== "hates oral") {
				t.push(`${His} ordeal is so extreme that ${he} now <span class="red">hates oral sex,</span>`);
			} else {
				t.push(`${His} hatred of oral sex makes ${his} ordeal that much more horrific,`);
			}
			t.push(`but it breaks down ${his} resistance. ${He} now better understands the terrifying power you have over ${him}, and the sheer amount of cum ${he} is forced to ingest negatively effects ${his} health. Your other cum-fed slaves take note of what you do to those who can't hold down their assigned diet.`);
			eventSlave.devotion += 5;
			eventSlave.trust -= 5;
			eventSlave.sexualFlaw = "hates oral";
			eventSlave.fetish = "masochist";
			seX(eventSlave, "oral", "public", "penetrative", 55);
			healthDamage(eventSlave, 5);
			return t;
		}
	}
};