From 029a962f55380de541edbba0fa49d615a4e277df Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 11 Jul 2021 21:42:46 -0400
Subject: [PATCH 01/13] start recruiter

---
 src/events/nonRandomEvent.js               |   5 +-
 src/events/scheduled/seRecruiterSuccess.js | 209 +++++++++++++++++++++
 src/events/scheduled/seRecruiterSuccess.tw | 183 ------------------
 3 files changed, 210 insertions(+), 187 deletions(-)
 create mode 100644 src/events/scheduled/seRecruiterSuccess.js
 delete mode 100644 src/events/scheduled/seRecruiterSuccess.tw

diff --git a/src/events/nonRandomEvent.js b/src/events/nonRandomEvent.js
index 785c417f9f3..1b3f9a304f3 100644
--- a/src/events/nonRandomEvent.js
+++ b/src/events/nonRandomEvent.js
@@ -40,10 +40,7 @@ App.Events.getNonrandomEvents = function() {
 		new App.Events.pBadCuratives(),
 		new App.Events.pBadBreasts(),
 		new App.Events.pAidInvitation(),
-		new App.Events.TwineEvent().wrapPassage([
-			() => V.RecruiterID !== 0,
-			() => V.recruiterProgress >= (13 + (V.recruiterEugenics === 1 ? policies.countEugenicsSMRs() * 6 : 0))
-		], "SE recruiter success"),
+		new App.Events.SERecruiterSuccess(),
 		new App.Events.SEcustomSlaveDelivery(),
 		new App.Events.JobFulfillmentCenterDelivery(),
 		new App.Events.TwineEvent().wrapPassage([
diff --git a/src/events/scheduled/seRecruiterSuccess.js b/src/events/scheduled/seRecruiterSuccess.js
new file mode 100644
index 00000000000..456d5746692
--- /dev/null
+++ b/src/events/scheduled/seRecruiterSuccess.js
@@ -0,0 +1,209 @@
+App.Events.SERecruiterSuccess = class SERecruiterSuccess extends App.Events.BaseEvent {
+	eventPrerequisites() {
+		return [
+			() => V.RecruiterID !== 0,
+			() => V.recruiterProgress >= (13 + (V.recruiterEugenics === 1 ? policies.countEugenicsSMRs() * 6 : 0))
+		];
+	}
+
+	execute(node) {
+		let r = [];
+
+		V.nextButton = "Continue";
+		V.nextLink = "Scheduled Event";
+		V.encyclopedia = "Enslaving People";
+		V.recruiterProgress = 0;
+		let slave;
+		if (V.recruiterTarget === "young migrants") {
+			slave = GenerateNewSlave(null, {maxAge: 22, disableDisability: 1});
+			generateSalonModifications(slave);
+			slave.origin = "$He submitted to enslavement for a better chance at survival than $he had as a migrant.";
+			slave.devotion = random(-15, 5);
+			slave.trust = random(-10, 10);
+			setHealth(slave, jsRandom(-80, 20));
+			slave.anus = 0;
+			if (slave.vagina > 0) {
+				slave.vagina = random(1, 3);
+				slave.skill.vaginal = random(15, 40);
+			}
+			slave.skill.anal = 0;
+			slave.earPiercing = random(0, 1);
+		} else if (V.recruiterTarget === "recent divorcees") {
+			slave = GenerateNewSlave(null, {minAge: 30, maxAge: 45, disableDisability: 1});
+			slave.origin = "$He submitted to enslavement for a better quality of life than $he had as a recent divorcee.";
+			slave.devotion = random(-15, 5);
+			slave.trust = random(-10, 10);
+			setHealth(slave, jsRandom(-40, 20));
+			slave.anus = random(1, 3);
+			if (slave.vagina > 0) {
+				slave.vagina = random(1, 3);
+				slave.skill.vaginal = random(15, 40);
+			}
+			slave.skill.anal = 0;
+			slave.earPiercing = random(0, 1);
+		} else if (V.recruiterTarget === "reassignment candidates") {
+			slave = GenerateNewSlave("XY", {disableDisability: 1});
+			generateSalonModifications(slave);
+			slave.origin = "$He submitted to enslavement as $his only way to obtain surgery to transform $him into a woman.";
+			slave.devotion = random(-15, 5);
+			slave.trust = random(-10, 10);
+			setHealth(slave, jsRandom(-40, 20));
+			if (slave.balls === 0) {
+				slave.balls = random(1, 3);
+			}
+
+			slave.tonguePiercing = random(0, 1);
+			slave.earPiercing = random(0, 1);
+			slave.nosePiercing = random(0, 1);
+			slave.sexualFlaw = "hates women";
+		} else if (V.recruiterTarget === "dissolute sissies") {
+			slave = GenerateNewSlave("XY", {disableDisability: 1});
+			generateSalonModifications(slave);
+			slave.origin = "$He submitted to enslavement out of a misguided desire to join a sexually libertine society.";
+			slave.devotion = random(-15, 5);
+			slave.trust = random(-10, 10);
+			setHealth(slave, jsRandom(-40, 20));
+			slave.anus = random(1, 3);
+			if (slave.balls === 0) {
+				slave.balls = random(1, 3);
+			}
+			slave.skill.oral = random(15, 40);
+			slave.skill.anal = random(15, 40);
+			slave.faceImplant = 20*random(0, 1);
+			slave.face = Math.clamp(slave.face+(slave.faceImplant), -100, 100);
+			slave.lipsPiercing = random(0, 1);
+			slave.tonguePiercing = random(0, 1);
+			slave.earPiercing = random(0, 1);
+			slave.nosePiercing = random(0, 1);
+			slave.eyebrowPiercing = random(0, 1);
+			slave.navelPiercing = random(0, 1);
+			slave.nipplesPiercing = random(0, 1);
+			slave.clitPiercing = random(0, 1);
+			slave.sexualFlaw = "hates women";
+		} else if (V.recruiterTarget === "expectant mothers") {
+			slave = GenerateNewSlave("XX", {minAge: Math.max(V.fertilityAge, V.minimumSlaveAge), ageOverridesPedoMode: 1, disableDisability: 1});
+			generateSalonModifications(slave);
+			slave.origin = "$He submitted to enslavement to get access to modern prenatal care.";
+			slave.devotion = random(-15, 5);
+			slave.trust = random(-10, 10);
+			setHealth(slave, jsRandom(-80, 20));
+			slave.vagina = random(1, 3);
+			slave.preg = random(15, 39);
+			slave.pregType = setPregType(slave);
+			WombImpregnate(slave, slave.pregType, 0, slave.preg);
+			slave.pregKnown = 1;
+			slave.pregWeek = slave.preg;
+			SetBellySize(slave);
+			slave.boobs += 50*random(0, 6);
+			slave.lactation = random(0, 1);
+			if (slave.lactation > 0) {
+				slave.lactationDuration = 2;
+			}
+			slave.weight = random(0, 50);
+		} else {
+			slave = GenerateNewSlave(null, {minAge: 11, maxAge: 22, disableDisability: 1});
+			generateSalonModifications(slave);
+			slave.origin = "$He submitted to enslavement to escape the hard life of an old world whore.";
+			slave.career = "a prostitute";
+			slave.devotion = random(-15, 5);
+			slave.trust = random(-10, 10);
+			setHealth(slave, jsRandom(-80, 20));
+			slave.anus = random(1, 3);
+			if (slave.balls > 0) {
+				slave.vagina = random(1, 3);
+				slave.skill.vaginal = random(15, 40);
+			}
+			slave.skill.oral = random(15, 40);
+			slave.skill.anal = random(15, 40);
+			slave.skill.whoring = random(15, 40);
+			slave.boobsImplant = random(0, 3)*200;
+			slave.boobs += slave.boobsImplant;
+			if (slave.boobsImplant > 0) {
+				slave.boobsImplantType = "normal";
+			}
+			slave.buttImplant = random(0, 2);
+			slave.butt = slave.buttImplant;
+			if (slave.buttImplant > 0) {
+				slave.buttImplantType = "normal";
+			}
+			slave.lipsImplant = either(0, 10);
+			slave.lips += slave.lipsImplant;
+			slave.lipsPiercing = random(0, 1);
+			slave.tonguePiercing = random(0, 1);
+			slave.earPiercing = random(0, 1);
+			slave.nosePiercing = random(0, 1);
+			slave.eyebrowPiercing = random(0, 1);
+			slave.navelPiercing = random(0, 1);
+			slave.nipplesPiercing = random(0, 1);
+			slave.clitPiercing = random(0, 1);
+		}
+
+		if (V.recruiterEugenics === 1) {
+			if (V.policies.SMR.eugenics.intelligenceSMR === 1) {
+				slave.intelligence = Intelligence.random({limitIntelligence: [40, 100]});
+			}
+			if (V.policies.SMR.eugenics.heightSMR === 1) {
+				slave.height = Height.mean(slave) + random(15, 30);
+			}
+			if (V.policies.SMR.eugenics.faceSMR === 1) {
+				slave.face = random(40, 100);
+			}
+		}
+
+		const _ContractCost = 1000;
+		let _slaveCost = slaveCost(slave);
+		_slaveCost -= _ContractCost;
+		const {
+			He,
+			he, him, his
+		} = getPronouns(slave);
+		const {
+			he2
+		} = getPronouns(S.Recruiter).appendSuffix("2");
+
+		if (V.recruiterTarget === "young migrants") {
+			r.push(`Your recruiter ${S.Recruiter.slaveName} has succeeded; ${he2}'s convinced a starving young migrant from the old world that ${he}'ll have a better chance at survival as one of your slaves.`);
+		} else if (V.recruiterTarget === "recent divorcees") {
+			r.push(`Your recruiter ${S.Recruiter.slaveName} has succeeded; ${he2}'s convinced a recent divorcee from the old world that ${he}'ll have a better quality of life as one of your slaves.`);
+		} else if (V.recruiterTarget === "reassignment candidates") {
+			r.push(`Your recruiter ${S.Recruiter.slaveName} has succeeded; ${he2}'s convinced an old world person desperate for modern reassignment surgery that you'll provide it if ${he} agrees to be a sex slave after ${he}'s recreated as a female.`);
+		} else if (V.recruiterTarget === "dissolute sissies") {
+			r.push(`Your recruiter ${S.Recruiter.slaveName} has succeeded; ${he2}'s convinced an old world sissy that ${he}'d be better off as a slave in a society that is so totally sexually libertine as to accept as female and respectable anyone who takes cock.`);
+		} else if (V.recruiterTarget === "expectant mothers") {
+			r.push(`Your recruiter ${S.Recruiter.slaveName} has succeeded; ${he2}'s convinced an unhealthy expectant mother that you'll provide ${him} with modern medicine in return for ${his} enslavement.`);
+		} else {
+			r.push(`Your recruiter ${S.Recruiter.slaveName} has succeeded; ${he2}'s convinced a desperate old world whore that ${he}'d be better off as a slave in ${V.arcologies[0].name} than as a free prostitute on the rough streets of a traditional city.`);
+		}
+		App.Events.addParagraph(node, r);
+
+		node.append(App.Desc.longSlave(slave, {market: "generic"}));
+
+		const choices = [];
+		if (V.cash >= _ContractCost) {
+			choices.push(new App.Events.Result(`Enslave ${him}`, enslave, `This will cost ${cashFormat(_ContractCost)}`));
+			choices.push(new App.Events.Result(`Sell ${him} immediately`, sell, `This will bring in ${cashFormat(_slaveCost)}`));
+		} else {
+			choices.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}.`));
+			V.recruiterProgress = 7;
+		}
+		App.Events.addResponses(node, choices);
+
+		function enslave() {
+			cashX(forceNeg(_ContractCost), "slaveTransfer", slave);
+			return App.UI.newSlaveIntro(slave);
+		}
+
+		function sell() {
+			cashX(_slaveCost, "slaveTransfer", S.Recruiter);
+			return `${slave.slaveName} accepts being resold without much fuss. ${He}'s merely exchanged one unknown owner for another. For all ${he} knows ${his} new buyer will be less abusive than you would have been. ${He} would be less complacent if ${he} knew who ${his} buyers are; ${he}'ll be immured in an arcade within the hour.`;
+		}
+
+		/**
+		 * 
+		 * @returns {FC.PiercingType}
+		 */
+		function pierceMe() {
+			return random(0, 1);
+		}
+	}
+};
diff --git a/src/events/scheduled/seRecruiterSuccess.tw b/src/events/scheduled/seRecruiterSuccess.tw
deleted file mode 100644
index 93ab5f5a424..00000000000
--- a/src/events/scheduled/seRecruiterSuccess.tw
+++ /dev/null
@@ -1,183 +0,0 @@
-:: SE recruiter success [nobr]
-
-<<set $nextButton = "Continue", $nextLink = "Scheduled Event", $returnTo = "Scheduled Event", $encyclopedia = "Enslaving People", $recruiterProgress = 0>>
-
-<<if $recruiterTarget == "young migrants">>
-	<<set _slave = GenerateNewSlave(null, {maxAge: 22, disableDisability: 1})>>
-	<<run generateSalonModifications(_slave)>>
-	<<set _slave.origin = "$He submitted to enslavement for a better chance at survival than $he had as a migrant.">>
-	<<set _slave.devotion = random(-15,5)>>
-	<<set _slave.trust = random(-10,10)>>
-	<<run setHealth(_slave, jsRandom(-80,20))>>
-	<<set _slave.anus = 0>>
-	<<if _slave.vagina > 0>>
-		<<set _slave.vagina = random(1,3)>>
-		<<set _slave.skill.vaginal = random(15,40)>>
-	<</if>>
-	<<set _slave.skill.anal = 0>>
-	<<set _slave.earPiercing = random(0,1)>>
-<<elseif $recruiterTarget == "recent divorcees">>
-	<<set _slave = GenerateNewSlave(null, {minAge: 30, maxAge: 45, disableDisability: 1})>>
-	<<set _slave.origin = "$He submitted to enslavement for a better quality of life than $he had as a recent divorcee.">>
-	<<set _slave.devotion = random(-15,5)>>
-	<<set _slave.trust = random(-10,10)>>
-	<<run setHealth(_slave, jsRandom(-40,20))>>
-	<<set _slave.anus = random(1,3)>>
-	<<if _slave.vagina > 0>>
-		<<set _slave.vagina = random(1,3)>>
-		<<set _slave.skill.vaginal = random(15,40)>>
-	<</if>>
-	<<set _slave.skill.anal = 0>>
-	<<set _slave.earPiercing = random(0,1)>>
-<<elseif $recruiterTarget == "reassignment candidates">>
-	<<set _slave = GenerateNewSlave("XY", {disableDisability: 1})>>
-	<<run generateSalonModifications(_slave)>>
-	<<set _slave.origin = "$He submitted to enslavement as $his only way to obtain surgery to transform $him into a woman.">>
-	<<set _slave.devotion = random(-15,5)>>
-	<<set _slave.trust = random(-10,10)>>
-	<<run setHealth(_slave, jsRandom(-40,20))>>
-	<<if _slave.balls == 0>>
-		<<set _slave.balls = random(1,3)>>
-	<</if>>
-
-	<<set _slave.tonguePiercing = random(0,1)>>
-	<<set _slave.earPiercing = random(0,1)>>
-	<<set _slave.nosePiercing = random(0,1)>>
-	<<set _slave.sexualFlaw = "hates women">>
-<<elseif $recruiterTarget == "dissolute sissies">>
-	<<set _slave = GenerateNewSlave("XY", {disableDisability: 1})>>
-	<<run generateSalonModifications(_slave)>>
-	<<set _slave.origin = "$He submitted to enslavement out of a misguided desire to join a sexually libertine society.">>
-	<<set _slave.devotion = random(-15,5)>>
-	<<set _slave.trust = random(-10,10)>>
-	<<run setHealth(_slave, jsRandom(-40,20))>>
-	<<set _slave.anus = random(1,3)>>
-	<<if _slave.balls == 0>>
-		<<set _slave.balls = random(1,3)>>
-	<</if>>
-	<<set _slave.skill.oral = random(15,40)>>
-	<<set _slave.skill.anal = random(15,40)>>
-	<<set _slave.faceImplant = 20*random(0,1)>>
-	<<set _slave.face = Math.clamp(_slave.face+(_slave.faceImplant),-100,100)>>
-	<<set _slave.lipsPiercing = random(0,1)>>
-	<<set _slave.tonguePiercing = random(0,1)>>
-	<<set _slave.earPiercing = random(0,1)>>
-	<<set _slave.nosePiercing = random(0,1)>>
-	<<set _slave.eyebrowPiercing = random(0,1)>>
-	<<set _slave.navelPiercing = random(0,1)>>
-	<<set _slave.nipplesPiercing = random(0,1)>>
-	<<set _slave.clitPiercing = random(0,1)>>
-	<<set _slave.sexualFlaw = "hates women">>
-<<elseif $recruiterTarget == "expectant mothers">>
-	<<set _slave = GenerateNewSlave("XX", {minAge: Math.max($fertilityAge, $minimumSlaveAge), ageOverridesPedoMode: 1, disableDisability: 1})>>
-	<<run generateSalonModifications(_slave)>>
-	<<set _slave.origin = "$He submitted to enslavement to get access to modern prenatal care.">>
-	<<set _slave.devotion = random(-15,5)>>
-	<<set _slave.trust = random(-10,10)>>
-	<<run setHealth(_slave, jsRandom(-80,20))>>
-	<<set _slave.vagina = random(1,3)>>
-	<<set _slave.preg = random(15,39)>>
-	<<set _slave.pregType = setPregType(_slave)>>
-	<<set WombImpregnate(_slave, _slave.pregType, 0, _slave.preg)>>
-	<<set _slave.pregKnown = 1>>
-	<<set _slave.pregWeek = _slave.preg>>
-	<<run SetBellySize(_slave)>>
-	<<set _slave.boobs += 50*random(0,6)>>
-	<<set _slave.lactation = random(0,1)>>
-	<<if _slave.lactation > 0>>
-		<<set _slave.lactationDuration = 2>>
-	<</if>>
-	<<set _slave.weight = random(0,50)>>
-<<else>>
-	<<set _slave = GenerateNewSlave(null, {minAge: 11, maxAge: 22, disableDisability: 1})>>
-	<<run generateSalonModifications(_slave)>>
-	<<set _slave.origin = "$He submitted to enslavement to escape the hard life of an old world whore.">>
-	<<set _slave.career = "a prostitute">>
-	<<set _slave.devotion = random(-15,5)>>
-	<<set _slave.trust = random(-10,10)>>
-	<<run setHealth(_slave, jsRandom(-80,20))>>
-	<<set _slave.anus = random(1,3)>>
-	<<if _slave.balls > 0>>
-		<<set _slave.vagina = random(1,3)>>
-		<<set _slave.skill.vaginal = random(15,40)>>
-	<</if>>
-	<<set _slave.skill.oral = random(15,40)>>
-	<<set _slave.skill.anal = random(15,40)>>
-	<<set _slave.skill.whoring = random(15,40)>>
-	<<set _slave.boobsImplant = random(0,3)*200>>
-	<<set _slave.boobs += _slave.boobsImplant>>
-	<<if _slave.boobsImplant > 0>>
-		<<set _slave.boobsImplantType = "normal">>
-	<</if>>
-	<<set _slave.buttImplant = random(0,2)>>
-	<<set _slave.butt = _slave.buttImplant>>
-	<<if _slave.buttImplant > 0>>
-		<<set _slave.buttImplantType = "normal">>
-	<</if>>
-	<<set _slave.lipsImplant = either(0,10)>>
-	<<set _slave.lips += _slave.lipsImplant>>
-	<<set _slave.lipsPiercing = random(0,1)>>
-	<<set _slave.tonguePiercing = random(0,1)>>
-	<<set _slave.earPiercing = random(0,1)>>
-	<<set _slave.nosePiercing = random(0,1)>>
-	<<set _slave.eyebrowPiercing = random(0,1)>>
-	<<set _slave.navelPiercing = random(0,1)>>
-	<<set _slave.nipplesPiercing = random(0,1)>>
-	<<set _slave.clitPiercing = random(0,1)>>
-<</if>>
-
-<<if $recruiterEugenics == 1>>
-	<<if $policies.SMR.eugenics.intelligenceSMR == 1>>
-		<<set _slave.intelligence = Intelligence.random({limitIntelligence: [40,100]})>>
-	<</if>>
-	<<if $policies.SMR.eugenics.heightSMR == 1>>
-		<<set _slave.height = Height.mean(_slave) + random(15, 30)>>
-	<</if>>
-	<<if $policies.SMR.eugenics.faceSMR == 1>>
-		<<set _slave.face = random(40,100)>>
-	<</if>>
-<</if>>
-
-<<set _ContractCost = 1000>>
-<<set _slaveCost = slaveCost(_slave)>>
-<<set _slaveCost -= _ContractCost>>
-<<run App.Utils.setLocalPronouns(_slave)>>
-<<setLocalPronouns _S.Recruiter 2>>
-
-<<if $recruiterTarget == "young migrants">>
-	Your recruiter _S.Recruiter.slaveName has succeeded; _he2's convinced a starving young migrant from the old world that $he'll have a better chance at survival as one of your slaves.
-<<elseif $recruiterTarget == "recent divorcees">>
-	Your recruiter _S.Recruiter.slaveName has succeeded; _he2's convinced a recent divorcee from the old world that $he'll have a better quality of life as one of your slaves.
-<<elseif $recruiterTarget == "reassignment candidates">>
-	Your recruiter _S.Recruiter.slaveName has succeeded; _he2's convinced an old world person desperate for modern reassignment surgery that you'll provide it if $he agrees to be a sex slave after $he's recreated as a female.
-<<elseif $recruiterTarget == "dissolute sissies">>
-	Your recruiter _S.Recruiter.slaveName has succeeded; _he2's convinced an old world sissy that $he'd be better off as a slave in a society that is so totally sexually libertine as to accept as female and respectable anyone who takes cock.
-<<elseif $recruiterTarget == "expectant mothers">>
-	Your recruiter _S.Recruiter.slaveName has succeeded; _he2's convinced an unhealthy expectant mother that you'll provide $him with modern medicine in return for $his enslavement.
-<<else>>
-	Your recruiter _S.Recruiter.slaveName has succeeded; _he2's convinced a desperate old world whore that $he'd be better off as a slave in $arcologies[0].name than as a free prostitute on the rough streets of a traditional city.
-<</if>>
-
-<br><br>
-<<includeDOM App.Desc.longSlave(_slave, {market: "generic"})>>
-<br><br>
-
-<span id="result">
-<<if $cash >= _ContractCost>>
-<<link "Enslave $him">>
-	<<run cashX(forceNeg(_ContractCost), "slaveTransfer", $slaves[$i])>>
-	<<replace "#result">>
-	<<includeDOM App.UI.newSlaveIntro(_slave)>>
-	<</replace>>
-<</link>> //This will cost <<print cashFormat(_ContractCost)>>//
-<br><<link "Sell $him immediately">>
-	<<run cashX(_slaveCost, "slaveTransfer", _S.Recruiter)>>
-	<<replace "#result">>
-	_slave.slaveName accepts being resold without much fuss. $He's merely exchanged one unknown owner for another. For all $he knows $his new buyer will be less abusive than you would have been. $He would be less complacent if $he knew who $his buyers are; $he'll be immured in an arcade within the hour.
-	<</replace>>
-<</link>> //This will bring in <<print cashFormat(_slaveCost)>>//
-<<else>>
-	//You lack the necessary funds to enslave $him.//
-	<<set $recruiterProgress = 7>>
-<</if>>
-</span>
-- 
GitLab


From e676b1ac0b51eb58b8a12a271a1625fb5950e199 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 11 Jul 2021 21:43:39 -0400
Subject: [PATCH 02/13] piercing

---
 src/events/scheduled/seRecruiterSuccess.js | 51 ++++++++++------------
 1 file changed, 24 insertions(+), 27 deletions(-)

diff --git a/src/events/scheduled/seRecruiterSuccess.js b/src/events/scheduled/seRecruiterSuccess.js
index 456d5746692..1ea09c2dcb9 100644
--- a/src/events/scheduled/seRecruiterSuccess.js
+++ b/src/events/scheduled/seRecruiterSuccess.js
@@ -27,7 +27,7 @@ App.Events.SERecruiterSuccess = class SERecruiterSuccess extends App.Events.Base
 				slave.skill.vaginal = random(15, 40);
 			}
 			slave.skill.anal = 0;
-			slave.earPiercing = random(0, 1);
+			slave.earPiercing = pierceMe();
 		} else if (V.recruiterTarget === "recent divorcees") {
 			slave = GenerateNewSlave(null, {minAge: 30, maxAge: 45, disableDisability: 1});
 			slave.origin = "$He submitted to enslavement for a better quality of life than $he had as a recent divorcee.";
@@ -40,7 +40,7 @@ App.Events.SERecruiterSuccess = class SERecruiterSuccess extends App.Events.Base
 				slave.skill.vaginal = random(15, 40);
 			}
 			slave.skill.anal = 0;
-			slave.earPiercing = random(0, 1);
+			slave.earPiercing = pierceMe();
 		} else if (V.recruiterTarget === "reassignment candidates") {
 			slave = GenerateNewSlave("XY", {disableDisability: 1});
 			generateSalonModifications(slave);
@@ -52,9 +52,9 @@ App.Events.SERecruiterSuccess = class SERecruiterSuccess extends App.Events.Base
 				slave.balls = random(1, 3);
 			}
 
-			slave.tonguePiercing = random(0, 1);
-			slave.earPiercing = random(0, 1);
-			slave.nosePiercing = random(0, 1);
+			slave.tonguePiercing = pierceMe();
+			slave.earPiercing = pierceMe();
+			slave.nosePiercing = pierceMe();
 			slave.sexualFlaw = "hates women";
 		} else if (V.recruiterTarget === "dissolute sissies") {
 			slave = GenerateNewSlave("XY", {disableDisability: 1});
@@ -69,16 +69,16 @@ App.Events.SERecruiterSuccess = class SERecruiterSuccess extends App.Events.Base
 			}
 			slave.skill.oral = random(15, 40);
 			slave.skill.anal = random(15, 40);
-			slave.faceImplant = 20*random(0, 1);
+			slave.faceImplant = 20*pierceMe();
 			slave.face = Math.clamp(slave.face+(slave.faceImplant), -100, 100);
-			slave.lipsPiercing = random(0, 1);
-			slave.tonguePiercing = random(0, 1);
-			slave.earPiercing = random(0, 1);
-			slave.nosePiercing = random(0, 1);
-			slave.eyebrowPiercing = random(0, 1);
-			slave.navelPiercing = random(0, 1);
-			slave.nipplesPiercing = random(0, 1);
-			slave.clitPiercing = random(0, 1);
+			slave.lipsPiercing = pierceMe();
+			slave.tonguePiercing = pierceMe();
+			slave.earPiercing = pierceMe();
+			slave.nosePiercing = pierceMe();
+			slave.eyebrowPiercing = pierceMe();
+			slave.navelPiercing = pierceMe();
+			slave.nipplesPiercing = pierceMe();
+			slave.clitPiercing = pierceMe();
 			slave.sexualFlaw = "hates women";
 		} else if (V.recruiterTarget === "expectant mothers") {
 			slave = GenerateNewSlave("XX", {minAge: Math.max(V.fertilityAge, V.minimumSlaveAge), ageOverridesPedoMode: 1, disableDisability: 1});
@@ -95,7 +95,7 @@ App.Events.SERecruiterSuccess = class SERecruiterSuccess extends App.Events.Base
 			slave.pregWeek = slave.preg;
 			SetBellySize(slave);
 			slave.boobs += 50*random(0, 6);
-			slave.lactation = random(0, 1);
+			slave.lactation = pierceMe();
 			if (slave.lactation > 0) {
 				slave.lactationDuration = 2;
 			}
@@ -128,14 +128,14 @@ App.Events.SERecruiterSuccess = class SERecruiterSuccess extends App.Events.Base
 			}
 			slave.lipsImplant = either(0, 10);
 			slave.lips += slave.lipsImplant;
-			slave.lipsPiercing = random(0, 1);
-			slave.tonguePiercing = random(0, 1);
-			slave.earPiercing = random(0, 1);
-			slave.nosePiercing = random(0, 1);
-			slave.eyebrowPiercing = random(0, 1);
-			slave.navelPiercing = random(0, 1);
-			slave.nipplesPiercing = random(0, 1);
-			slave.clitPiercing = random(0, 1);
+			slave.lipsPiercing = pierceMe();
+			slave.tonguePiercing = pierceMe();
+			slave.earPiercing = pierceMe();
+			slave.nosePiercing = pierceMe();
+			slave.eyebrowPiercing = pierceMe();
+			slave.navelPiercing = pierceMe();
+			slave.nipplesPiercing = pierceMe();
+			slave.clitPiercing = pierceMe();
 		}
 
 		if (V.recruiterEugenics === 1) {
@@ -198,10 +198,7 @@ App.Events.SERecruiterSuccess = class SERecruiterSuccess extends App.Events.Base
 			return `${slave.slaveName} accepts being resold without much fuss. ${He}'s merely exchanged one unknown owner for another. For all ${he} knows ${his} new buyer will be less abusive than you would have been. ${He} would be less complacent if ${he} knew who ${his} buyers are; ${he}'ll be immured in an arcade within the hour.`;
 		}
 
-		/**
-		 * 
-		 * @returns {FC.PiercingType}
-		 */
+		/** @returns {FC.PiercingType} */
 		function pierceMe() {
 			return random(0, 1);
 		}
-- 
GitLab


From 54f0d3d6068c4dac82589310698d403938d3548f Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 11 Jul 2021 21:44:05 -0400
Subject: [PATCH 03/13] polish

---
 src/events/scheduled/seRecruiterSuccess.js | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/events/scheduled/seRecruiterSuccess.js b/src/events/scheduled/seRecruiterSuccess.js
index 1ea09c2dcb9..66c6219a216 100644
--- a/src/events/scheduled/seRecruiterSuccess.js
+++ b/src/events/scheduled/seRecruiterSuccess.js
@@ -150,9 +150,8 @@ App.Events.SERecruiterSuccess = class SERecruiterSuccess extends App.Events.Base
 			}
 		}
 
-		const _ContractCost = 1000;
-		let _slaveCost = slaveCost(slave);
-		_slaveCost -= _ContractCost;
+		const contractCost = 1000;
+		const _slaveCost = slaveCost(slave) - contractCost;
 		const {
 			He,
 			he, him, his
@@ -179,8 +178,8 @@ App.Events.SERecruiterSuccess = class SERecruiterSuccess extends App.Events.Base
 		node.append(App.Desc.longSlave(slave, {market: "generic"}));
 
 		const choices = [];
-		if (V.cash >= _ContractCost) {
-			choices.push(new App.Events.Result(`Enslave ${him}`, enslave, `This will cost ${cashFormat(_ContractCost)}`));
+		if (V.cash >= contractCost) {
+			choices.push(new App.Events.Result(`Enslave ${him}`, enslave, `This will cost ${cashFormat(contractCost)}`));
 			choices.push(new App.Events.Result(`Sell ${him} immediately`, sell, `This will bring in ${cashFormat(_slaveCost)}`));
 		} else {
 			choices.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}.`));
@@ -189,7 +188,7 @@ App.Events.SERecruiterSuccess = class SERecruiterSuccess extends App.Events.Base
 		App.Events.addResponses(node, choices);
 
 		function enslave() {
-			cashX(forceNeg(_ContractCost), "slaveTransfer", slave);
+			cashX(forceNeg(contractCost), "slaveTransfer", slave);
 			return App.UI.newSlaveIntro(slave);
 		}
 
-- 
GitLab


From 150c2e3f31d3b243bfeebc6de937f34a55460bc5 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 11 Jul 2021 22:05:02 -0400
Subject: [PATCH 04/13] swan strikes

---
 src/events/RE/reTheSirenStrikesBack.js | 168 ++++++++++++++++++++++++
 src/events/RE/reTheSirenStrikesBack.tw | 169 -------------------------
 src/events/nonRandomEvent.js           |   4 +-
 3 files changed, 170 insertions(+), 171 deletions(-)
 create mode 100644 src/events/RE/reTheSirenStrikesBack.js
 delete mode 100644 src/events/RE/reTheSirenStrikesBack.tw

diff --git a/src/events/RE/reTheSirenStrikesBack.js b/src/events/RE/reTheSirenStrikesBack.js
new file mode 100644
index 00000000000..43d6772f29f
--- /dev/null
+++ b/src/events/RE/reTheSirenStrikesBack.js
@@ -0,0 +1,168 @@
+App.Events.RETheSirenStrikesBack = class RETheSirenStrikesBack extends App.Events.BaseEvent {
+	eventPrerequisites() {
+		return [
+			() => V.arcologies[0].FSPaternalistDecoration === 100,
+			() => V.swanSong === 2,
+			() => V.week - V.swanSongWeek >= 3,
+		];
+	}
+
+	execute(node) {
+		let r = [];
+
+		V.nextButton = "Continue";
+		V.nextLink = "Random Nonindividual Event";
+		V.encyclopedia = "Enslaving People";
+		V.swanSong = 3;
+
+		const swan = V.slaves.find(function(s) {
+			return s.origin === "$He came to you to escape being sold to a cruel master after $his producer informed $him of $his debt." && s.newGamePlus === 0 && s.fetish !== "mindbroken" && s.fuckdoll === 0;
+		});
+
+		const minAge = (V.pedo_mode === 1) ? 16 : 30;
+		const producer = GenerateNewSlave(null, {
+			minAge: minAge, maxAge: 40, ageOverridesPedoMode: 1, disableDisability: 1
+		});
+		producer.origin = "$He was brought to you to pay for what $he did to one of your slaves.";
+		producer.career = "a producer";
+		producer.devotion = random(-70, 30);
+		producer.trust = random(-100, -70);
+		setHealth(producer, jsRandom(-20, 20), Math.max(normalRandInt(0, 2), 0), Math.max(normalRandInt(0, 2), 0), 0, jsRandom(0, 20));
+		producer.anus = 0;
+		if (producer.vagina > -1) {
+			producer.vagina = 1;
+			producer.preg = -1;
+		}
+		producer.skill.vaginal = 0;
+		producer.skill.oral = 0;
+		producer.skill.anal = 0;
+		producer.behavioralFlaw = "none";
+		producer.hStyle = "neat";
+		producer.pubicHStyle = "waxed";
+		producer.underArmHStyle = "waxed";
+		producer.intelligenceImplant = 30;
+		producer.intelligence = 100;
+		producer.prestige = 3;
+		producer.prestigeDesc = "$He was a well known music producer infamous for constantly having musicians disappear on $his watch.";
+		producer.accent = 1;
+		producer.clothes = "nice business attire";
+		const {
+			He,
+			he, him, his
+		} = getPronouns(swan ? swan : {pronoun: App.Data.Pronouns.Kind.neutral});
+		const {
+			He2,
+			he2, hers2, him2, his2, girl2,
+		} = getPronouns(producer).appendSuffix("2");
+
+		App.Events.drawEventArt(node, producer);
+
+		App.Events.addParagraph(node, [`Several weeks have passed since you gained the musical prodigy and you couldn't help but notice ${his} constant scowl and muttering about "getting revenge one day" or "wishing ${his} producer would pay for what happened" whenever ${he} was not working. You decide to look into the incident and direct ${V.assistant.name} to look into the financial situation of ${his} record label. It turns out that not only should this slave not be eligible for enslavement due to ${his} performance profits, but a certain someone has been taking that money for themselves. You issue a bounty for ${his} producer and await a response. With surprising speed, an answer comes from a bounty hunter. The underhanded producer never left the arcology, instead opting to make use of the guest living arrangements you had set up for the concert. Only when an announcement of the bounty went out did ${he2} realize ${his2} peril and attempt to flee. The bounty hunter literally drags the escapee by the collar into your penthouse and throws ${him2} at your feet. The coward shivers as your eyes meet ${hers2}.`]);
+
+		App.Events.addParagraph(node, [`"Please, don't hurt me! I'll pay for that slave I sent you to be released, even set ${him} up with the life ${he2} would have had if I hadn't embezzled the profits!"`]);
+
+		if (swan) {
+			const {title: Master} = getEnunciation(swan);
+			r.push(`Just as the little weasel at your feet finishes, ${swan.slaveName}`);
+			if (canWalk(swan)) {
+				r.push(`walks in,`);
+			} else {
+				r.push(`is carried in,`);
+			}
+			r.push(`${his} face quickly donning a scowl of pure anger and hatred.`);
+			if (canTalk(swan)) {
+				r.push(`"${Master}, please let me have my revenge on this despicable lowlife," ${he} hisses. "I promise not to kill ${him2}, just hurt ${him2} enough to let ${him2} know the suffering they caused me."`);
+			} else {
+				r.push(`${He} may not be able to talk anymore, but ${his} request of you is very clear across ${his} face.`);
+			}
+
+			App.Events.addParagraph(node, r);
+
+			const choices = [];
+			choices.push(new App.Events.Result(`Enslave ${him2}`, enslave));
+			if (!isAmputee(swan)) {
+				choices.push(new App.Events.Result(`Enslave ${him2} and throw ${him2} to ${swan.slaveName}`, throwTo));
+			}
+			App.Events.addResponses(node, choices);
+		} else {
+			App.Events.addParagraph(node, [`You inform the coward at your feet that the slave in question is long gone, making ${him2} panic even more at ${his2} grim situation.`]);
+
+			App.Events.addResponses(node, [
+				new App.Events.Result(`Enslave ${him2}`, enslaveNoSwan),
+				new App.Events.Result(`Enslave ${him2} and punish ${him2} for their actions`, enslaveAndPunish)
+			]);
+		}
+
+		function enslave() {
+			return [
+				`You decide to spare the coward from ${his2} former subordinate's wrath and simply enslave ${him2}.`,
+				App.UI.newSlaveIntro(producer)
+			];
+		}
+
+		function throwTo() {
+			const frag = new DocumentFragment();
+			let r = [];
+			producer.clothes = "no clothing";
+			healthDamage(producer, 20);
+			swan.devotion += 2;
+			swan.trust += 2;
+			App.Events.drawEventArt(node, producer); // TODO update event art instead, maybe
+
+			r.push(`You decide to give the victimized prodigy a chance for payback. ${He} moves over to ${his} former boss and begins to caress the despicable thief as ${he2} shakes with dread of what is to come. As ${he} moves lower, ${he} applies more pressure, peaking right on the genitals. The cowardly former executive yelps in pain, instinctively trying to get away from the`);
+			if (hasAnyArms(swan)) {
+				r.push(`hand`);
+			} else {
+				r.push(`foot`);
+			}
+			r.push(`crushing the most sensitive spot on ${his2} body. After several minutes of the coward screaming in pain, ${his2} former victim gets up and delivers a hard`);
+			if (hasBothLegs(swan)) {
+				r.push(`kick`);
+			} else if (hasAnyLegs(swan)) {
+				r.push(`stomp`);
+			} else {
+				r.push(`punch`);
+			}
+			r.push(`to the groin, eliciting another scream and causing ${his} former boss to assume the fetal position. You send for another slave to drag the whimpering slave${girl2} to ${his2} feet for inspection. Being given an opportunity for revenge has increased${swan.slaveName}'s <span class="hotpink">devotion</span> and <span class="mediumaquamarine">trust.</span>`);
+			if (swan.fetish !== "sadist" && fetishChangeChance(swan) > jsRandom(0, 100)) {
+				r.push(`Abusing the producer has caused ${him} to <span class="lightcoral">develop a fondness for sadism.</span>`);
+				swan.fetish = "sadist";
+				swan.fetishKnown = 1;
+				swan.fetishStrength = 20;
+			} else if (swan.fetish === "sadist") {
+				if (swan.fetishKnown === 1) {
+					r.push(`Abusing the producer has increased ${his} <span class="lightcoral">fondness of sadism.</span>`);
+					swan.fetishStrength += 5;
+				} else {
+					r.push(`Abusing the producer has revealed ${his} <span class="lightcoral">fondness of sadism!</span>`);
+					swan.fetishKnown = 1;
+				}
+			}
+			r.push(App.UI.newSlaveIntro(producer));
+			App.Events.addParagraph(frag, r);
+			return frag;
+		}
+
+		function enslaveNoSwan() {
+			const frag = new DocumentFragment();
+			let r = [];
+			producer.clothes = "no clothing";
+			App.Events.drawEventArt(node, producer); // TODO update event art instead, maybe
+			r.push(`You spare the coward the pain and humiliation ${he2} deserves and simply enslave ${him2}.`);
+			r.push(App.UI.newSlaveIntro(producer));
+			App.Events.addParagraph(frag, r);
+			return frag;
+		}
+
+		function enslaveAndPunish() {
+			const frag = new DocumentFragment();
+			let r = [];
+			producer.clothes = "no clothing";
+			App.Events.drawEventArt(node, producer); // TODO update event art instead, maybe
+			r.push(`You decide the coward needs more punishment. You order a whip brought to you and give ${him2} several lashes directly across ${his2} exposed genitalia. ${He2} cries out with each lash as ${his2} nethers accumulate angry red welts, some even bleeding slightly. After the yelps stop, you feel enough punishment has been given for now and have the producer turned slave hauled to ${his2} feet for a proper inspection.`);
+			r.push(App.UI.newSlaveIntro(producer));
+			App.Events.addParagraph(frag, r);
+			return frag;
+		}
+	}
+};
diff --git a/src/events/RE/reTheSirenStrikesBack.tw b/src/events/RE/reTheSirenStrikesBack.tw
deleted file mode 100644
index 3504ef4f3d1..00000000000
--- a/src/events/RE/reTheSirenStrikesBack.tw
+++ /dev/null
@@ -1,169 +0,0 @@
-:: RE The Siren Strikes Back [nobr]
-
-<<set $nextButton = "Continue", $nextLink = "Random Nonindividual Event", $returnTo = "Random Nonindividual Event", $encyclopedia = "Enslaving People">>
-<<set $swanSong = 3>>
-
-<<set _ssb = $slaves.find(function(s) { return s.origin == "$He came to you to escape being sold to a cruel master after $his producer informed $him of $his debt." && s.newGamePlus == 0 && s.fetish != "mindbroken" && s.fuckdoll == 0; })>>
-
-<<if $pedo_mode == 1>>
-	<<set _minAge = 16>>
-<<else>>
-	<<set _minAge = 30>>
-<</if>>
-<<set _slave = GenerateNewSlave(null, {minAge: _minAge, maxAge: 40, ageOverridesPedoMode: 1, disableDisability: 1})>>
-<<set _slave.origin = "$He was brought to you to pay for what $he did to one of your slaves.">>
-<<set _slave.career = "a producer">>
-<<set _slave.devotion = random(-70,30)>>
-<<set _slave.trust = random(-100,-70)>>
-<<run setHealth(_slave, jsRandom(-20, 20), Math.max(normalRandInt(0, 2), 0), Math.max(normalRandInt(0, 2), 0), 0, jsRandom(0, 20))>>
-<<set _slave.anus = 0>>
-<<if _slave.vagina > -1>>
-	<<set _slave.vagina = 1>>
-	<<set _slave.preg = -1>>
-<</if>>
-<<set _slave.skill.vaginal = 0>>
-<<set _slave.skill.oral = 0>>
-<<set _slave.skill.anal = 0>>
-<<set _slave.behavioralFlaw = "none">>
-<<set _slave.hStyle = "neat">>
-<<set _slave.pubicHStyle = "waxed">>
-<<set _slave.underArmHStyle = "waxed">>
-<<set _slave.intelligenceImplant = 30>>
-<<set _slave.intelligence = 100>>
-<<set _slave.prestige = 3>>
-<<set _slave.prestigeDesc = "$He was a well known music producer infamous for constantly having musicians disappear on $his watch.">>
-<<set _slave.accent = 1>>
-<<set _slave.clothes = "nice business attire">>
-
-<<setLocalPronouns _slave 2>>
-<<run Enunciate(_slave)>>
-<<setSpokenLocalPronouns _slave _ssb>>
-
-<span id="art-frame">
-	/* 000-250-006 */
-	<<if $seeImages == 1>>
-		<<if $imageChoice == 1>>
-			<div class="imageRef lrgVector"><div class="mask">&nbsp;</div><<SlaveArt _slave 3 0>></div>
-		<<else>>
-			<div class="imageRef lrgRender"><div class="mask">&nbsp;</div><<SlaveArt _slave 3 0>></div>
-		<</if>>
-	<</if>>
-	/* 000-250-006 */
-</span>
-
-Several weeks have passed since you gained the musical prodigy and you couldn't help but notice $his constant scowl and muttering about "getting revenge one day" or "wishing $his producer would pay for what happened" whenever $he was not working. You decide to look into the incident and direct $assistant.name to look into the financial situation of $his record label. It turns out that not only should this slave not be eligible for enslavement due to $his performance profits, but a certain someone has been taking that money for themselves. You issue a bounty for $his producer and await a response. With surprising speed, an answer comes from a bounty hunter. The underhanded producer never left the arcology, instead opting to make use of the guest living arrangements you had set up for the concert. Only when an announcement of the bounty went out did _he2 realize _his2 peril and attempt to flee. The bounty hunter literally drags the escapee by the collar into your penthouse and throws _him2 at your feet. The coward shivers as your eyes meet _hers2.
-<br><br>
-"Plea<<s>>e, don't hurt me! I'll pay for that <<s>>lave I <<s>>ent you to be relea<<s>>ed, even <<s>>et $him up with the life <<he 2>> would have had if I hadn't embe<<zz>>led the profit<<s>>!"
-<br><br>
-
-<<if def _ssb>>
-	<<setLocalPronouns _ssb>>
-	<<run Enunciate(_ssb)>>
-	Just as the little weasel at your feet finishes, _ssb.slaveName
-	<<if canWalk(_ssb)>>
-		walks in,
-	<<else>>
-		is carried in,
-	<</if>>
-	$his face quickly donning a scowl of pure anger and hatred.
-	<<if canTalk(_ssb)>>
-		"<<Master>>, plea<<s>>e let me have my revenge on thi<<s>> de<<s>>picable lowlife," $he hisses. "I promi<<s>>e not to kill _him2, ju<<s>>t hurt _him2 enough to let _him2 know the <<s>>uffering they cau<<s>>ed me."
-	<<else>>
-		$He may not be able to talk anymore, but $his request of you is very clear across $his face.
-	<</if>>
-
-	<br><br>
-
-	<span id="result">
-	<<link "Enslave _him2">>
-		<<replace "#result">>
-		You decide to spare the coward from _his2 former subordinate's wrath and simply enslave _him2.
-		<br>
-		<<includeDOM App.UI.newSlaveIntro(_slave)>>
-		<</replace>>
-	<</link>>
-	<<if !isAmputee(_ssb)>>
-		<br><<link "Enslave _him2 and throw _him2 to _ssb.slaveName">>
-			<<set _slave.clothes = "no clothing">>
-			<<run healthDamage(_slave, 20)>>
-			<<set _ssb.devotion += 2>>
-			<<set _ssb.trust += 2>>
-			<<replace "#art-frame">>
-				/* 000-250-006 */
-				<<if $seeImages == 1>>
-					<div class="imageColumn">
-						<div class="imageRef medImg">
-							<<SlaveArt _slave 2 0>>
-						</div>
-						<div class="imageRef medImg">
-							<<SlaveArt _ssb 2 0>>
-						</div>
-					</div>
-				<</if>>
-				/* 000-250-006 */
-			<</replace>>
-			<<replace "#result">>
-			You decide to give the victimized prodigy a chance for payback. $He moves over to $his former boss and begins to caress the despicable thief as _he2 shakes with dread of what is to come. As $he moves lower, $he applies more pressure, peaking right on the genitals. The cowardly former executive yelps in pain, instinctively trying to get away from the <<if hasAnyArms(_ssb)>>hand<<else>>foot<</if>> crushing the most sensitive spot on _his2 body. After several minutes of the coward screaming in pain, _his2 former victim gets up and delivers a hard <<if hasBothLegs(_ssb)>>kick<<elseif hasAnyLegs(_ssb)>>stomp<<else>>punch<</if>> to the groin, eliciting another scream and causing $his former boss to assume the fetal position. You send for another slave to drag the whimpering slave<<= _girl2>> to _his2 feet for inspection. Being given an opportunity for revenge has increased _ssb.slaveName's @@.hotpink;devotion@@ and @@.mediumaquamarine;trust.@@
-			<<if _ssb.fetish != "sadist" && fetishChangeChance(_ssb) > jsRandom(0,100)>>
-				Abusing the producer has caused $him to @@.lightcoral;develop a fondness for sadism.@@
-				<<set _ssb.fetish = "sadist", _ssb.fetishKnown = 1, _ssb.fetishStrength = 20>>
-			<<elseif _ssb.fetish == "sadist">>
-				<<if _ssb.fetishKnown == 1>>
-					Abusing the producer has increased $his @@.lightcoral;fondness of sadism.@@
-					<<set _ssb.fetishStrength += 5>>
-				<<else>>
-					Abusing the producer has revealed $his @@.lightcoral;fondness of sadism!@@
-					<<set _ssb.fetishKnown = 1>>
-				<</if>>
-			<</if>>
-			<br>
-			<<includeDOM App.UI.newSlaveIntro(_slave)>>
-			<</replace>>
-		<</link>>
-	<</if>>
-	</span>
-<<else>>
-	You inform the coward at your feet that the slave in question is long gone, making _him2 panic even more at _his2 grim situation.
-	<br><br>
-	<span id="result">
-	<<link "Enslave _him2">>
-		<<set _slave.clothes = "no clothing">>
-		<<replace "#art-frame">>
-			/* 000-250-006 */
-			<<if $seeImages == 1>>
-				<<if $imageChoice == 1>>
-					<div class="imageRef lrgVector"><div class="mask">&nbsp;</div><<SlaveArt _slave 3 0>></div>
-				<<else>>
-					<div class="imageRef lrgRender"><div class="mask">&nbsp;</div><<SlaveArt _slave 3 0>></div>
-				<</if>>
-			<</if>>
-			/* 000-250-006 */
-		<</replace>>
-		<<replace "#result">>
-		You spare the coward the pain and humiliation _he2 deserves and simply enslave _him2.
-		<br>
-		<<includeDOM App.UI.newSlaveIntro(_slave)>>
-		<</replace>>
-	<</link>>
-	<br><<link "Enslave _him2 and punish _him2 for their actions">>
-		<<set _slave.clothes = "no clothing">>
-		<<run healthDamage(_slave, 20)>>
-		<<replace "#art-frame">>
-			/* 000-250-006 */
-			<<if $seeImages == 1>>
-				<<if $imageChoice == 1>>
-					<div class="imageRef lrgVector"><div class="mask">&nbsp;</div><<SlaveArt _slave 3 0>></div>
-				<<else>>
-					<div class="imageRef lrgRender"><div class="mask">&nbsp;</div><<SlaveArt _slave 3 0>></div>
-				<</if>>
-			<</if>>
-			/* 000-250-006 */
-		<</replace>>
-		<<replace "#result">>
-		You decide the coward needs more punishment. You order a whip brought to you and give _him2 several lashes directly across _his2 exposed genitalia. _He2 cries out with each lash as _his2 nethers accumulate angry red welts, some even bleeding slightly. After the yelps stop, you feel enough punishment has been given for now and have the producer turned slave hauled to _his2 feet for a proper inspection.
-		<br>
-		<<includeDOM App.UI.newSlaveIntro(_slave)>>
-		<</replace>>
-	<</link>>
-	</span>
-<</if>>
diff --git a/src/events/nonRandomEvent.js b/src/events/nonRandomEvent.js
index 1b3f9a304f3..f81181ea023 100644
--- a/src/events/nonRandomEvent.js
+++ b/src/events/nonRandomEvent.js
@@ -98,6 +98,8 @@ App.Events.getNonrandomEvents = function() {
 
 		// Elite
 		new App.Events.eliteTakeOver(),
+
+		new App.Events.RETheSirenStrikesBack(),
 	];
 };
 
@@ -227,8 +229,6 @@ globalThis.nonRandomEvent = function() {
 			} else {
 				setTimeout(() => Engine.play("P rivalry actions"), Engine.minDomActionDelay);
 			}
-		} else if ((V.arcologies[0].FSPaternalistDecoration === 100) && (V.swanSong === 2) && (V.week - V.swanSongWeek >= 3)) {
-			setTimeout(() => Engine.play("RE The Siren Strikes Back"), Engine.minDomActionDelay);
 		} else if ((effectiveWeek >= 37) && (V.arcologies[0].FSNeoImperialistLaw1 === 1) && (V.arcologies[0].FSNeoImperialistLaw2 === 1) && V.poorKnight !== 1 && effectiveWeek >= V.imperialEventWeek + 3) {
 			V.poorKnight = 1;
 			V.imperialEventWeek = effectiveWeek;
-- 
GitLab


From cb68149ac5dbc9b22f2d2ec879822ae477b45fa2 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 11 Jul 2021 22:19:04 -0400
Subject: [PATCH 05/13] lonely BG

---
 src/events/PE/peLonelyBodyguard.js            | 170 ++++++++++++++++++
 src/events/PE/peLonelyBodyguard.tw            |  80 ---------
 src/events/randomEvent.js                     |   1 +
 src/uncategorized/randomNonindividualEvent.tw |  10 --
 4 files changed, 171 insertions(+), 90 deletions(-)
 create mode 100644 src/events/PE/peLonelyBodyguard.js
 delete mode 100644 src/events/PE/peLonelyBodyguard.tw

diff --git a/src/events/PE/peLonelyBodyguard.js b/src/events/PE/peLonelyBodyguard.js
new file mode 100644
index 00000000000..34b214504c9
--- /dev/null
+++ b/src/events/PE/peLonelyBodyguard.js
@@ -0,0 +1,170 @@
+App.Events.PELonelyBodyguard = class PELonelyBodyguard extends App.Events.BaseEvent {
+	eventPrerequisites() {
+		return [
+			() => !!S.Bodyguard,
+			() => S.Bodyguard.rules.relationship === "permissive",
+			() => S.Bodyguard.fetish !== "mindbroken",
+		];
+	}
+
+	actorPrerequisites() {
+		return [[
+			s => s.ID !== V.BodyguardID,
+			s => s.relationship === 0,
+			s => s.devotion >= -20
+		]];
+	}
+
+	execute(node) {
+		let r = [];
+
+		V.nextButton = "Continue";
+		V.returnTo = "Random Nonindividual Event";
+
+		const BG = S.Bodyguard;
+		const {
+			He, His, Hers,
+			he, his, him, himself, girl, wife, wives
+		} = getPronouns(BG);
+		const {say: say, title: Master} = getEnunciation(BG);
+
+		const crush = getSlave(this.actors[0]);
+		const {
+			He2, His2,
+			he2, him2, his2, wife2
+		} = getPronouns(crush).appendSuffix("2");
+
+		App.Events.drawEventArt(node, [BG, crush]);
+
+		App.Events.addParagraph(node, [`You take an unusually close interest in slave.slaveName's health and mental well-being, since your health and mental well-being may rely on ${his} combat effectiveness. ${He} performs ${his} duties acceptably, difficult though they are. ${Hers} is a life of long hours and constant vigilance, and ${he} has very little time to ${himself}. The daily wear hasn't really affected ${him} yet, but it may.`]);
+
+		r.push(`On a whim, you ask ${him} whether ${he} feels lonely. Caught off guard, ${he}`);
+		if (!canTalk(BG)) {
+			r.push(`says in hesitant gestures that ${he}'s all right, and that ${his} ${getWrittenTitle(BG)}'s companionship is enough for ${him}.`);
+		} else {
+			r.push(`${say}s hesitantly "I'm all right, ${Master}. I love being near you; that's enough for me."`);
+		}
+		r.push(`The slight hesitation is explained the next time ${crush.slaveName} comes to your office. ${BG.slaveName} watches everyone who sees you, of course, but you catch ${his} eye running appreciatively up and down ${crush.slaveName}'s body as ${he2} leaves.`);
+
+		App.Events.addParagraph(node, r);
+
+		const choices = [];
+		choices.push(new App.Events.Result(`Make no mention of it`, no));
+		choices.push(new App.Events.Result(`Set them up`, setUp));
+		choices.push(new App.Events.Result(`Marry them`, marry));
+		App.Events.addResponses(node, choices);
+
+		function no() {
+			return `${BG.slaveName} is a big ${girl} and can look after ${himself}, you reflect. You take no particular action to favor ${his} interest in ${crush.slaveName}.`;
+		}
+
+		function setUp() {
+			const frag = new DocumentFragment();
+			let r = [];
+			r.push(`You decide to amuse yourself by engaging in a game of subtle matchmaking. You carefully rearrange ${crush.slaveName}'s schedule and duties so ${he2} and ${BG.slaveName} spend as much time as possible with one another. At the same time, you gradually reduce crush.slaveName's access to sexual outlets. After letting the situation marinate for a few days, you decide that the time is ripe, and without any further explanation assign ${crush.slaveName} to spend the day in slave.slaveName's armory. It's barely midmorning before they're making out on ${BG.slaveName}'s workout mat, and by the afternoon crush.slaveName is under slave.slaveName's workbench, orally servicing ${his2} new <span class="lightgreen">fuckbuddy</span> as ${he} maintains ${his} machine pistol.`);
+			crush.relationship = 3;
+			crush.relationshipTarget = BG.ID;
+			BG.relationship = 3;
+			BG.relationshipTarget = crush.ID;
+			V.oralTotal += 1;
+			App.Events.addParagraph(frag, r);
+			return frag;
+		}
+
+		function marry() {
+			const frag = new DocumentFragment();
+			let r = [];
+			r.push(`You order ${crush.slaveName} in and brusquely inform ${him2} ${he2}'ll be marrying ${BG.slaveName}. ${crush.slaveName} is too surprised to react much, and even ${BG.slaveName} looks shocked, but there is a gleam of wild glee in ${his} eyes. You give them a few minutes to get dressed in special outfits you make available: they're lacy lingerie designed to resemble old world wedding dresses, but without concealing anything.`);
+			App.Events.addParagraph(frag, r);
+			r = [];
+			r.push(`${BG.slaveName} is`);
+			if (BG.vagina === 0) {
+				r.push(`a virgin, so ${he}'s wearing white`);
+			} else if ((BG.vagina < 0) && (BG.dick > 0)) {
+				r.push(`a sissy slave, so ${he}'s wearing light blue`);
+			} else if ((BG.vagina < 0) && (BG.dick < 1)) {
+				r.push(`a null, so it's wearing black`);
+			} else {
+				r.push(`is an experienced sex slave, so ${he}'s wearing light pink`);
+			}
+			r.push(`against ${his} ${BG.skin} skin.`);
+			if (canPenetrate(BG)) {
+				r.push(`The sight of ${crush.slaveName} has ${him} stiffly erect, and ${he}'s wearing a little bow around ${his} cockhead.`);
+			} else if (canAchieveErection(BG)) {
+				r.push(`${He}'s wearing a little bow over ${his} caged girldick.`);
+			} else if ((BG.dick > 0)) {
+				r.push(`${He}'s impotent, but ${he}'s wearing a little bow around ${his} useless cockhead.`);
+			} else if ((BG.clit > 0)) {
+				r.push(`${His} prominent clit is engorged, and ${he}'s wearing a tiny bow on it.`);
+			} else if ((BG.vagina >= 0)) {
+				r.push(`${He}'s wearing a demure little bow just over ${his} pussy.`);
+			}
+			if (BG.anus > 1) {
+				r.push(`${His} lacy panties are designed to spread ${his} buttocks a little and display ${his} big butthole.`);
+			} else if ((BG.anus === 0)) {
+				r.push(`${His} lacy panties cover ${his} virgin anus, for once.`);
+			}
+			if (BG.boobs > 1000) {
+				r.push(`${His} bra makes no attempt to cover or even support ${his} huge breasts, simply letting them through holes in the lace to jut proudly out.`);
+			} else if ((BG.boobs > 500)) {
+				r.push(`${His} bra supports and presents ${his} big breasts, leaving ${his} stiffening nipples bare.`);
+			} else {
+				r.push(`${His} bra supports and presents ${his} breasts, giving ${him} more cleavage than ${he} usually displays.`);
+			}
+			App.Events.addParagraph(frag, r);
+			r = [];
+			r.push(`${crush.slaveName} is`);
+			if (crush.vagina === 0) {
+				r.push(`a virgin, so ${he2}'s wearing white`);
+			} else if ((crush.vagina < 0) && (crush.dick > 0)) {
+				r.push(`a sissy slave, so ${he2}'s wearing light blue`);
+			} else if ((crush.vagina < 0) && (crush.dick < 1)) {
+				r.push(`a null, so it's wearing black`);
+			} else {
+				r.push(`is an experienced sex slave, so ${he2}'s wearing light pink`);
+			}
+			r.push(`against ${his2} ${crush.skin} skin.`);
+			if (canPenetrate(crush)) {
+				r.push(`The sight of ${BG.slaveName} has ${him2} stiffly erect, and ${he2}'s wearing a little bow around ${his2} cockhead.`);
+			} else if (canAchieveErection(crush)) {
+				r.push(`${He2}'s wearing a little bow over ${his2} caged girldick.`);
+			} else if ((crush.dick > 0)) {
+				r.push(`${He2}'s impotent, but ${he2}'s wearing a little bow around ${his2} useless cockhead.`);
+			} else if ((crush.clit > 0)) {
+				r.push(`${His2} prominent clit is engorged, and ${he2}'s wearing a tiny bow on it.`);
+			} else if ((crush.vagina >= 0)) {
+				r.push(`${He2}'s wearing a demure little bow just over ${his2} pussy.`);
+			}
+			if (crush.anus > 1) {
+				r.push(`${His2} lacy panties are designed to spread ${his2} buttocks a little and display ${his2} big butthole.`);
+			} else if ((crush.anus === 0)) {
+				r.push(`${His2} lacy panties cover ${his2} virgin anus, for once.`);
+			}
+			if (crush.boobs > 1000) {
+				r.push(`${His2} bra makes no attempt to cover or even support ${his2} huge breasts, simply letting them through holes in the lace to jut proudly out.`);
+			} else if ((crush.boobs > 500)) {
+				r.push(`${His2} bra supports and presents ${his2} big breasts, leaving ${his2} stiffening nipples bare.`);
+			} else {
+				r.push(`${His2} bra supports and presents ${his2} breasts, giving ${him2} more cleavage than ${he2} usually displays.`);
+			}
+			App.Events.addParagraph(frag, r);
+			r = [];
+			r.push(`The procedure is simple. The two of them prostrate themselves on the ground and beg your indulgence, though ${crush.slaveName} is running on pure autopilot by this point. You state that you grant it, and hand each of them a simple gold band to be worn on the little finger in advertisement of the inferiority of their union. In turn, each of them gives the other a ring, and ${BG.slaveName} kisses ${his} stunned bride. You pronounce them <span class="lightgreen">slave`);
+			if (wife === wife2) {
+				r.push(`${wives},</span>`);
+			} else {
+				r.push(`spouses,</span>`);
+			}
+			r.push(`and send them to the armory for their honeymoon. ${BG.slaveName} is so enthusiastic that in the coming days ${his} obvious devotion <span class="hotpink">wins ${crush.slaveName} over to the arrangement.</span>`);
+			crush.devotion = Math.max(20, crush.devotion + 10);/* to accepting or better */
+			crush.relationship = 5;
+			crush.relationshipTarget = BG.ID;
+			BG.relationship = 5;
+			BG.relationshipTarget = crush.ID;
+			V.oralTotal += 2;
+
+			App.Events.addParagraph(frag, r);
+			return frag;
+		}
+	}
+};
diff --git a/src/events/PE/peLonelyBodyguard.tw b/src/events/PE/peLonelyBodyguard.tw
deleted file mode 100644
index c7d124250d7..00000000000
--- a/src/events/PE/peLonelyBodyguard.tw
+++ /dev/null
@@ -1,80 +0,0 @@
-:: PE lonely bodyguard [nobr]
-
-<<set $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Random Nonindividual Event">>
-
-<<set $activeSlave =_S.Bodyguard, _targetSlaveIndex = []>>
-<<for _i = 0; _i < $slaves.length; _i++>>
-	<<if $slaves[_i].devotion >= -20 && $slaves[_i].relationship == 0 && $slaves[_i].ID != $BodyguardID>>
-		<<set _targetSlaveIndex.push(_i)>>
-	<</if>>
-<</for>>
-<<set $j = _targetSlaveIndex.random()>>
-<<run Enunciate($activeSlave)>>
-<<run App.Utils.setLocalPronouns($activeSlave)>>
-<<setLocalPronouns $slaves[$j] 2>>
-
-<span id="art-frame">
-	/* 000-250-006 */
-	<<if $seeImages == 1>>
-		<div class="imageColumn">
-			<div class="imageRef medImg">
-				<<SlaveArt $activeSlave 2 0>>
-			</div>
-			<div class="imageRef medImg">
-				<<SlaveArt $slaves[$j] 2 0>>
-			</div>
-		</div>
-	<</if>>
-	/* 000-250-006 */
-</span>
-
-You take an unusually close interest in $activeSlave.slaveName's health and mental well-being, since your health and mental well-being may rely on $his combat effectiveness. $He performs $his duties acceptably, difficult though they are. $Hers is a life of long hours and constant vigilance, and $he has very little time to $himself. The daily wear hasn't really affected $him yet, but it may.
-
-<br><br>
-
-On a whim, you ask $him whether $he feels lonely. Caught off guard, $he <<if !canTalk($activeSlave)>>says in hesitant gestures that $he's all right, and that $his <<= getWrittenTitle($activeSlave)>>'s companionship is enough for $him.<<else>><<say>>s hesitantly "I'm all right, <<Master>>. I love being near you; that'<<s>> enough for me."<</if>> The slight hesitation is explained the next time $slaves[$j].slaveName comes to your office. $activeSlave.slaveName watches everyone who sees you, of course, but you catch $his eye running appreciatively up and down $slaves[$j].slaveName's body as _he2 leaves.
-
-<br><br>
-
-<span id="result">
-<<link "Make no mention of it">>
-	<<replace "#result">>
-	$activeSlave.slaveName is a big $girl and can look after $himself, you reflect. You take no particular action to favor $his interest in $slaves[$j].slaveName.
-	<</replace>>
-<</link>>
-<br><<link "Set them up">>
-	<<replace "#result">>
-	You decide to amuse yourself by engaging in a game of subtle matchmaking. You carefully rearrange $slaves[$j].slaveName's schedule and duties so _he2 and $activeSlave.slaveName spend as much time as possible with one another. At the same time, you gradually reduce $slaves[$j].slaveName's access to sexual outlets. After letting the situation marinate for a few days, you decide that the time is ripe, and without any further explanation assign $slaves[$j].slaveName to spend the day in $activeSlave.slaveName's armory. It's barely midmorning before they're making out on $activeSlave.slaveName's workout mat, and by the afternoon $slaves[$j].slaveName is under $activeSlave.slaveName's workbench, orally servicing _his2 new @@.lightgreen;fuckbuddy@@ as $he maintains $his machine pistol.
-	<<set $slaves[$j].relationship = 3>>
-	<<set $slaves[$j].relationshipTarget = $activeSlave.ID>>
-	<<set $activeSlave.relationship = 3>>
-	<<set $activeSlave.relationshipTarget = $slaves[$j].ID>>
-	<<set $oralTotal += 1>>
-	<</replace>>
-<</link>>
-<br><<link "Marry them">>
-	<<replace "#result">>
-	You order $slaves[$j].slaveName in and brusquely inform _him2 _he2'll be marrying $activeSlave.slaveName. $slaves[$j].slaveName is too surprised to react much, and even $activeSlave.slaveName looks shocked, but there is a gleam of wild glee in $his eyes. You give them a few minutes to get dressed in special outfits you make available: they're lacy lingerie designed to resemble old world wedding dresses, but without concealing anything.
-	<br><br>
-	$activeSlave.slaveName is
-		<<if ($activeSlave.vagina == 0)>>a virgin, so $he's wearing white<<elseif ($activeSlave.vagina < 0) && ($activeSlave.dick > 0)>>a sissy slave, so $he's wearing light blue<<elseif ($activeSlave.vagina < 0) && ($activeSlave.dick < 1)>>a null, so it's wearing black<<else>>is an experienced sex slave, so $he's wearing light pink<</if>> against $his $activeSlave.skin skin.
-		<<if canPenetrate($activeSlave)>>The sight of $slaves[$j].slaveName has $him stiffly erect, and $he's wearing a little bow around $his cockhead.<<elseif canAchieveErection($activeSlave)>>$He's wearing a little bow over $his caged girldick.<<elseif ($activeSlave.dick > 0)>>$He's impotent, but $he's wearing a little bow around $his useless cockhead.<<elseif ($activeSlave.clit > 0)>>$His prominent clit is engorged, and $he's wearing a tiny bow on it.<<elseif ($activeSlave.vagina >= 0)>>$He's wearing a demure little bow just over $his pussy.<</if>>
-		<<if ($activeSlave.anus > 1)>> $His lacy panties are designed to spread $his buttocks a little and display $his big butthole.<<elseif ($activeSlave.anus == 0)>> $His lacy panties cover $his virgin anus, for once.<</if>>
-		<<if ($activeSlave.boobs > 1000)>>$His bra makes no attempt to cover or even support $his huge breasts, simply letting them through holes in the lace to jut proudly out.<<elseif ($activeSlave.boobs > 500)>>$His bra supports and presents $his big breasts, leaving $his stiffening nipples bare.<<else>>$His bra supports and presents $his breasts, giving $him more cleavage than $he usually displays.<</if>>
-	<br><br>
-	$slaves[$j].slaveName is
-		<<if ($slaves[$j].vagina == 0)>>a virgin, so _he2's wearing white<<elseif ($slaves[$j].vagina < 0) && ($slaves[$j].dick > 0)>>a sissy slave, so _he2's wearing light blue<<elseif ($slaves[$j].vagina < 0) && ($slaves[$j].dick < 1)>>a null, so it's wearing black<<else>>is an experienced sex slave, so _he2's wearing light pink<</if>> against _his2 $slaves[$j].skin skin.
-		<<if canPenetrate($slaves[$j])>>The sight of $activeSlave.slaveName has _him2 stiffly erect, and _he2's wearing a little bow around _his2 cockhead.<<elseif canAchieveErection($slaves[$j])>>_He2's wearing a little bow over _his2 caged girldick.<<elseif ($slaves[$j].dick > 0)>>_He2's impotent, but _he2's wearing a little bow around _his2 useless cockhead.<<elseif ($slaves[$j].clit > 0)>>_His2 prominent clit is engorged, and _he2's wearing a tiny bow on it.<<elseif ($slaves[$j].vagina >= 0)>>_He2's wearing a demure little bow just over _his2 pussy.<</if>>
-		<<if ($slaves[$j].anus > 1)>> _His2 lacy panties are designed to spread _his2 buttocks a little and display _his2 big butthole.<<elseif ($slaves[$j].anus == 0)>> _His2 lacy panties cover _his2 virgin anus, for once.<</if>>
-		<<if ($slaves[$j].boobs > 1000)>>_His2 bra makes no attempt to cover or even support _his2 huge breasts, simply letting them through holes in the lace to jut proudly out.<<elseif ($slaves[$j].boobs > 500)>>_His2 bra supports and presents _his2 big breasts, leaving _his2 stiffening nipples bare.<<else>>_His2 bra supports and presents _his2 breasts, giving _him2 more cleavage than _he2 usually displays.<</if>>
-	<br><br>
-	The procedure is simple. The two of them prostrate themselves on the ground and beg your indulgence, though $slaves[$j].slaveName is running on pure autopilot by this point. You state that you grant it, and hand each of them a simple gold band to be worn on the little finger in advertisement of the inferiority of their union. In turn, each of them gives the other a ring, and $activeSlave.slaveName kisses $his stunned bride. You pronounce them @@.lightgreen;slave <<if $wife == _wife2>>$wives<<else>>spouses<</if>>,@@ and send them to the armory for their honeymoon. $activeSlave.slaveName is so enthusiastic that in the coming days $his obvious devotion @@.hotpink;wins $slaves[$j].slaveName over to the arrangement.@@
-	<<set $slaves[$j].devotion = Math.max(20, $slaves[$j].devotion + 10)>> /* to accepting or better */
-	<<set $slaves[$j].relationship = 5>>
-	<<set $slaves[$j].relationshipTarget = $activeSlave.ID>>
-	<<set $activeSlave.relationship = 5>>
-	<<set $activeSlave.relationshipTarget = $slaves[$j].ID>>
-	<<set $oralTotal += 2>>
-	<</replace>>
-<</link>>
-</span>
diff --git a/src/events/randomEvent.js b/src/events/randomEvent.js
index ecfc17a8ba3..fc8086a578b 100644
--- a/src/events/randomEvent.js
+++ b/src/events/randomEvent.js
@@ -125,6 +125,7 @@ App.Events.getNonindividualEvents = function() {
 		new App.Events.PEHeadgirlConcubine(),
 		new App.Events.PEPitFightInvite(),
 		new App.Events.PECombatTraining(),
+		new App.Events.PELonelyBodyguard(),
 
 		new App.Events.REDevotees(),
 		new App.Events.RERelativeRecruiter(),
diff --git a/src/uncategorized/randomNonindividualEvent.tw b/src/uncategorized/randomNonindividualEvent.tw
index e1f2e7b59b9..766a7866e2a 100644
--- a/src/uncategorized/randomNonindividualEvent.tw
+++ b/src/uncategorized/randomNonindividualEvent.tw
@@ -106,16 +106,6 @@
 		<<if (_S.Bodyguard.devotion > 45)>>
 			<<set $PESSevent.push("bodyguard beatdown")>>
 		<</if>>
-
-		<<if (_S.Bodyguard.relationship == 0)>>
-			<<if (_S.Bodyguard.rules.relationship == "permissive")>>
-				<<if (_S.Bodyguard.fetish != "mindbroken")>>
-					<<if $slaves.find(s => s.ID !== $BodyguardID && s.relationship === 0 && s.devotion >= -20)>>
-						<<set $events.push("PE lonely bodyguard")>>
-					<</if>>
-				<</if>>
-			<</if>>
-		<</if>>
 	<</if>>
 
 	<<if _S.Milkmaid && (_L.dairy >= 5) && (_S.Milkmaid.health.condition >= 70)>>
-- 
GitLab


From 2d6930903d964fce409475b7745e72d26a4fe2bd Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 11 Jul 2021 22:19:35 -0400
Subject: [PATCH 06/13] paren fix

---
 src/events/PE/peLonelyBodyguard.js | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/events/PE/peLonelyBodyguard.js b/src/events/PE/peLonelyBodyguard.js
index 34b214504c9..3da902d326d 100644
--- a/src/events/PE/peLonelyBodyguard.js
+++ b/src/events/PE/peLonelyBodyguard.js
@@ -80,9 +80,9 @@ App.Events.PELonelyBodyguard = class PELonelyBodyguard extends App.Events.BaseEv
 			r.push(`${BG.slaveName} is`);
 			if (BG.vagina === 0) {
 				r.push(`a virgin, so ${he}'s wearing white`);
-			} else if ((BG.vagina < 0) && (BG.dick > 0)) {
+			} else if (BG.vagina < 0 && BG.dick > 0) {
 				r.push(`a sissy slave, so ${he}'s wearing light blue`);
-			} else if ((BG.vagina < 0) && (BG.dick < 1)) {
+			} else if (BG.vagina < 0 && BG.dick < 1) {
 				r.push(`a null, so it's wearing black`);
 			} else {
 				r.push(`is an experienced sex slave, so ${he}'s wearing light pink`);
@@ -92,21 +92,21 @@ App.Events.PELonelyBodyguard = class PELonelyBodyguard extends App.Events.BaseEv
 				r.push(`The sight of ${crush.slaveName} has ${him} stiffly erect, and ${he}'s wearing a little bow around ${his} cockhead.`);
 			} else if (canAchieveErection(BG)) {
 				r.push(`${He}'s wearing a little bow over ${his} caged girldick.`);
-			} else if ((BG.dick > 0)) {
+			} else if (BG.dick > 0) {
 				r.push(`${He}'s impotent, but ${he}'s wearing a little bow around ${his} useless cockhead.`);
-			} else if ((BG.clit > 0)) {
+			} else if (BG.clit > 0) {
 				r.push(`${His} prominent clit is engorged, and ${he}'s wearing a tiny bow on it.`);
-			} else if ((BG.vagina >= 0)) {
+			} else if (BG.vagina >= 0) {
 				r.push(`${He}'s wearing a demure little bow just over ${his} pussy.`);
 			}
 			if (BG.anus > 1) {
 				r.push(`${His} lacy panties are designed to spread ${his} buttocks a little and display ${his} big butthole.`);
-			} else if ((BG.anus === 0)) {
+			} else if (BG.anus === 0) {
 				r.push(`${His} lacy panties cover ${his} virgin anus, for once.`);
 			}
 			if (BG.boobs > 1000) {
 				r.push(`${His} bra makes no attempt to cover or even support ${his} huge breasts, simply letting them through holes in the lace to jut proudly out.`);
-			} else if ((BG.boobs > 500)) {
+			} else if (BG.boobs > 500) {
 				r.push(`${His} bra supports and presents ${his} big breasts, leaving ${his} stiffening nipples bare.`);
 			} else {
 				r.push(`${His} bra supports and presents ${his} breasts, giving ${him} more cleavage than ${he} usually displays.`);
@@ -116,9 +116,9 @@ App.Events.PELonelyBodyguard = class PELonelyBodyguard extends App.Events.BaseEv
 			r.push(`${crush.slaveName} is`);
 			if (crush.vagina === 0) {
 				r.push(`a virgin, so ${he2}'s wearing white`);
-			} else if ((crush.vagina < 0) && (crush.dick > 0)) {
+			} else if (crush.vagina < 0 && crush.dick > 0) {
 				r.push(`a sissy slave, so ${he2}'s wearing light blue`);
-			} else if ((crush.vagina < 0) && (crush.dick < 1)) {
+			} else if (crush.vagina < 0 && crush.dick < 1) {
 				r.push(`a null, so it's wearing black`);
 			} else {
 				r.push(`is an experienced sex slave, so ${he2}'s wearing light pink`);
@@ -128,21 +128,21 @@ App.Events.PELonelyBodyguard = class PELonelyBodyguard extends App.Events.BaseEv
 				r.push(`The sight of ${BG.slaveName} has ${him2} stiffly erect, and ${he2}'s wearing a little bow around ${his2} cockhead.`);
 			} else if (canAchieveErection(crush)) {
 				r.push(`${He2}'s wearing a little bow over ${his2} caged girldick.`);
-			} else if ((crush.dick > 0)) {
+			} else if (crush.dick > 0) {
 				r.push(`${He2}'s impotent, but ${he2}'s wearing a little bow around ${his2} useless cockhead.`);
-			} else if ((crush.clit > 0)) {
+			} else if (crush.clit > 0) {
 				r.push(`${His2} prominent clit is engorged, and ${he2}'s wearing a tiny bow on it.`);
-			} else if ((crush.vagina >= 0)) {
+			} else if (crush.vagina >= 0) {
 				r.push(`${He2}'s wearing a demure little bow just over ${his2} pussy.`);
 			}
 			if (crush.anus > 1) {
 				r.push(`${His2} lacy panties are designed to spread ${his2} buttocks a little and display ${his2} big butthole.`);
-			} else if ((crush.anus === 0)) {
+			} else if (crush.anus === 0) {
 				r.push(`${His2} lacy panties cover ${his2} virgin anus, for once.`);
 			}
 			if (crush.boobs > 1000) {
 				r.push(`${His2} bra makes no attempt to cover or even support ${his2} huge breasts, simply letting them through holes in the lace to jut proudly out.`);
-			} else if ((crush.boobs > 500)) {
+			} else if (crush.boobs > 500) {
 				r.push(`${His2} bra supports and presents ${his2} big breasts, leaving ${his2} stiffening nipples bare.`);
 			} else {
 				r.push(`${His2} bra supports and presents ${his2} breasts, giving ${him2} more cleavage than ${he2} usually displays.`);
@@ -156,7 +156,7 @@ App.Events.PELonelyBodyguard = class PELonelyBodyguard extends App.Events.BaseEv
 				r.push(`spouses,</span>`);
 			}
 			r.push(`and send them to the armory for their honeymoon. ${BG.slaveName} is so enthusiastic that in the coming days ${his} obvious devotion <span class="hotpink">wins ${crush.slaveName} over to the arrangement.</span>`);
-			crush.devotion = Math.max(20, crush.devotion + 10);/* to accepting or better */
+			crush.devotion = Math.max(20, crush.devotion + 10); /* to accepting or better */
 			crush.relationship = 5;
 			crush.relationshipTarget = BG.ID;
 			BG.relationship = 5;
-- 
GitLab


From 4202ffbd1185a82b7192f0d84dda3ea1ebc69dbd Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 11 Jul 2021 22:21:54 -0400
Subject: [PATCH 07/13] P rival initiation

---
 .../nonRandom/rival/pRivalInitiation.js       | 125 ++++++++++++++++++
 .../nonRandom/rival/pRivalInitiation.tw       |  75 -----------
 2 files changed, 125 insertions(+), 75 deletions(-)
 create mode 100644 src/events/nonRandom/rival/pRivalInitiation.js
 delete mode 100644 src/events/nonRandom/rival/pRivalInitiation.tw

diff --git a/src/events/nonRandom/rival/pRivalInitiation.js b/src/events/nonRandom/rival/pRivalInitiation.js
new file mode 100644
index 00000000000..b2166583c52
--- /dev/null
+++ b/src/events/nonRandom/rival/pRivalInitiation.js
@@ -0,0 +1,125 @@
+App.Events.PrivalInitiation = class PrivalInitiation extends App.Events.BaseEvent {
+	eventPrerequisites() {
+		return [
+			() => V.arcologies[0].FSPaternalistDecoration === 100,
+			() => V.swanSong === 2,
+			() => V.week - V.swanSongWeek >= 3,
+		];
+	}
+
+	execute(node) {
+		let r = [];
+		
+		:: P rival initiation [nobr]
+
+		V.nextButton = "Continue", V.nextLink = "AS Dump", V.returnTo = "Scheduled Event", V.rivalOwner = 0, V.rivalOwnerEnslaved = 1;
+		if (V.hostageRescued === 1) {
+		V.nextButton = "See to the hostage", V.returnTo = "P hostage acquisition";
+		}
+
+		slave = getSlave(V.rivalID);
+
+		if (ndef slave) {
+			r.push(`/* rival slave is gone */`);
+
+			<<goto V.returnTo>>
+
+		} else {
+
+		App.Utils.setLocalPronouns(slave);
+
+		This is a special week, the week of your victory. 
+		App.UI.slaveDescriptionDialog(slave)
+			r.push(`awaits your pleasure. You could certainly do to ${him} anything and everything you usually do to your chattel. You could also do something special to mark the occasion.`);
+
+		<br><br>
+
+		<span id="result">
+		<<link "Force ${him} to do a public relations tour with you">>
+			<<replace "#result">>
+			r.push(`Though ${he} hates you with all ${his} heart, ${he} knows better than most what happens to slaves who disobey. So, when you describe your public relations plans to ${him}, ${he} promises to obey before you even get to the threats. ${He} finds ${himself} accompanying you to the arcology's finest establishment in a lovely evening dress. The two of you share an understandably quiet meal, with a growing crowd coming to leer at the defeated slaveowner-cum-slave. At a prearranged signal from you, ${he} stands, quickly strips naked, gets down on`);
+		if (hasBothLegs(slave)) {
+			r.push(`${his} knees`);
+		} else {
+			r.push(`the ground`);
+		}
+			r.push(`, and`);
+		if (V.PC.dick !== 0) {
+			r.push(`sucks you off`);
+		if (V.PC.vagina !== -1) {
+			r.push(`and`);
+		}
+		}
+		if (V.PC.vagina !== -1) {
+			r.push(`eats you out`);
+		}
+			r.push(`. Such public humiliation starts ${him} down the path of <span class="hotpink">obedience,</span> and is the <span class="green">talk of the Free Cities.</span>`);
+			slave.devotion += 4, slave.counter.oral += 1, V.oralTotal += 1;
+			repX(2500, "event", slave);
+			V.rivalID = 0;
+			<</replace>>
+		<</link>>
+		<br>
+		<<link "Make ${him} orally service your other slaves in public">>
+			<<replace "#result">>
+			<<setLocalPronouns V.slaves[1] 2>>
+			r.push(`${V.slaves[0].slaveName} leads ${him} out into the arcology's largest atrium, forces ${him} to`);
+		if (hasBothLegs(slave)) {
+			r.push(`${his} knees`);
+		} else {
+			r.push(`the ground`);
+		}
+			r.push(`, and, in full view of the whole arcology, orally rapes someone who was until this week a slaveowner ${himself}. Behind them, ${V.slaves[1].slaveName} is standing ready for ${_his2} turn, and all your other slaves stand behind ${_him2}. Public opinion is divided; the precedent is universally agreed to be bad, but the punishment is generally thought to be terrible and deserved. Your slaves, however, are almost insufferably <span class="hotpink">pleased with you</span> for forcing slave.slaveName, whom they still view as a slaveowner, to pleasure them.`);
+			slave.counter.oral += V.slaves.length*2, V.oralTotal += V.slaves.length*2;
+			V.slaves.forEach(function(s) { s.devotion += 10; });
+			V.rivalID = 0;
+			<</replace>>
+		<</link>>
+		if (slave.anus === 0) {
+			<br>
+		<<link "Break in ${his} asshole and then let the public use it">>
+				<<replace "#result">>
+					r.push(`${slave.slaveName}, who has been fairly dignified up to this point, breaks down when ${he}'s placed in stocks with ${his} ass in the air. ${His} sobs become screams when, for the first time in ${his} life, ${he} feels the burning sensation of a well-lubricated`);
+		if (V.PC.dick !== 0) {
+			r.push(`cockhead`);
+		} else {
+			r.push(`strap-on`);
+		}
+			r.push(`forcing its way past ${his} virgin sphincter. Raping a virgin anus is not a new pleasure for you, but the usual shrieking, struggling and spasming is all the sweeter this time. <span class="green">Half the arcology</span> has used ${his} <span class="health.dec">poor injured butthole</span> by the end of the day; ${he} <span class="gold">is learning to fear you,</span> and hates you <span class="mediumorchid">even more</span> if possible.`);
+					slave.devotion -= 4, slave.trust -= 5, slave.anus = 3;
+					seX(slave, "anal", "public", "penetrative", 47);
+					repX(2500, "event", slave), healthDamage(slave, 10);
+					V.rivalID = 0;
+				<</replace>>
+			<</link>>
+		}
+		if (slave.balls > 0) && (slave.boobs > 300) && (V.seeExtreme === 1) {
+			<br>
+		<<link "Publicly geld ${him}">>
+				<<replace "#result">>
+				r.push(`You announce that since ${slave.slaveName} has spent so much money and effort turning ${himself} into a girl with expensive hormones, you'll take a lower-tech step to bring ${him} further in that regard. An autosurgery is set up in public and the populace is treated to the edifying spectacle of a very large pair of testicles being efficiently removed by the modern surgical art. Unusually, ${he} was not given general anesthesia, but instead given local painkillers and made to watch on a monitor, to ${his} <span class="gold">rage</span> and <span class="mediumorchid">horror.</span> There is <span class="green">applause</span> as the cauterizer seals the surgical site where ${his} massive scrotum used to hang. ${His} cock looks softer already.`);
+				slave.devotion -= 50, slave.trust -= 50, slave.balls = 0;
+				repX(2500, "event", slave), healthDamage(slave, 10);
+				V.rivalID = 0;
+				<</replace>>
+			<</link>>
+		}
+		if (isFertile(slave)) && (V.seePreg === 1) {
+			<br>
+		<<link "Let the public impregnate ${him}">>
+				<<replace "#result">>
+					r.push(`You announce that since ${slave.slaveName} damaged the arcology, ${he} will be taking a leading role in the reconstruction. ${He} will be doing this by replacing one of the residents killed in the violence — by bearing a new slave, to be conceived collectively. The shame and <span class="mediumorchid">horror</span> of ${his} future as breeding stock comes home to ${him} as ${he}'s restrained in a chair with ${his} legs spread. Soon, the stream of fluids is running down ${his} <span class="lime">thoroughly-fucked pussy</span> and over ${his} anus to pool on the floor beneath ${him}. Modern medical imaging reveals ${his} fertile ovum's last, losing battle against a legion of sperm in real time, and the images are projected on large screens.`);
+					seX(slave, "vaginal", "public", "penetrative", 47);
+					slave.preg = 1, slave.pregSource = -2, slave.pregKnown = 1, slave.pregWeek = 1, slave.devotion -= 15;
+					slave.pregType = setPregType(slave);
+					WombImpregnate(slave, slave.pregType, -2, 1);
+					slave.vagina = 3;
+					repX(2500, "event", slave);
+					V.rivalID = 0;
+				<</replace>>
+			<</link>>
+		}
+		</span>
+
+		}
+			r.push(`/* def slave */`);
diff --git a/src/events/nonRandom/rival/pRivalInitiation.tw b/src/events/nonRandom/rival/pRivalInitiation.tw
deleted file mode 100644
index af1698ef868..00000000000
--- a/src/events/nonRandom/rival/pRivalInitiation.tw
+++ /dev/null
@@ -1,75 +0,0 @@
-:: P rival initiation [nobr]
-
-<<set $nextButton = "Continue", $nextLink = "AS Dump", $returnTo = "Scheduled Event", $rivalOwner = 0, $rivalOwnerEnslaved = 1>>
-<<if $hostageRescued == 1>><<set $nextButton = "See to the hostage", $returnTo = "P hostage acquisition">><</if>>
-
-<<set $activeSlave = getSlave($rivalID)>>
-
-<<if ndef $activeSlave>> /* rival slave is gone */
-
-	<<goto $returnTo>>
-
-<<else>>
-
-<<run App.Utils.setLocalPronouns($activeSlave)>>
-
-This is a special week, the week of your victory. <<= App.UI.slaveDescriptionDialog($activeSlave)>> awaits your pleasure. You could certainly do to $him anything and everything you usually do to your chattel. You could also do something special to mark the occasion.
-
-<br><br>
-
-<span id="result">
-<<link "Force $him to do a public relations tour with you">>
-	<<replace "#result">>
-	Though $he hates you with all $his heart, $he knows better than most what happens to slaves who disobey. So, when you describe your public relations plans to $him, $he promises to obey before you even get to the threats. $He finds $himself accompanying you to the arcology's finest establishment in a lovely evening dress. The two of you share an understandably quiet meal, with a growing crowd coming to leer at the defeated slaveowner-cum-slave. At a prearranged signal from you, $he stands, quickly strips naked, gets down on <<if hasBothLegs($activeSlave)>>$his knees<<else>>the ground<</if>>, and <<if $PC.dick != 0>>sucks you off<<if $PC.vagina != -1>> and <</if>><</if>><<if $PC.vagina != -1>>eats you out<</if>>. Such public humiliation starts $him down the path of @@.hotpink;obedience,@@ and is the @@.green;talk of the Free Cities.@@
-	<<set $activeSlave.devotion += 4, $activeSlave.counter.oral += 1, $oralTotal += 1>>
-	<<run repX(2500, "event", $activeSlave)>>
-	<<set $rivalID = 0>>
-	<</replace>>
-<</link>>
-<br><<link "Make $him orally service your other slaves in public">>
-	<<replace "#result">>
-	<<setLocalPronouns $slaves[1] 2>>
-	$slaves[0].slaveName leads $him out into the arcology's largest atrium, forces $him to <<if hasBothLegs($activeSlave)>>$his knees<<else>>the ground<</if>>, and, in full view of the whole arcology, orally rapes someone who was until this week a slaveowner $himself. Behind them, $slaves[1].slaveName is standing ready for _his2 turn, and all your other slaves stand behind _him2. Public opinion is divided; the precedent is universally agreed to be bad, but the punishment is generally thought to be terrible and deserved. Your slaves, however, are almost insufferably @@.hotpink;pleased with you@@ for forcing $activeSlave.slaveName, whom they still view as a slaveowner, to pleasure them.
-	<<set $activeSlave.counter.oral += $slaves.length*2, $oralTotal += $slaves.length*2>>
-	<<run $slaves.forEach(function(s) { s.devotion += 10; })>>
-	<<set $rivalID = 0>>
-	<</replace>>
-<</link>>
-<<if $activeSlave.anus == 0>>
-	<br><<link "Break in $his asshole and then let the public use it">>
-		<<replace "#result">>
-			$activeSlave.slaveName, who has been fairly dignified up to this point, breaks down when $he's placed in stocks with $his ass in the air. $His sobs become screams when, for the first time in $his life, $he feels the burning sensation of a well-lubricated <<if $PC.dick != 0>>cockhead<<else>>strap-on<</if>> forcing its way past $his virgin sphincter. Raping a virgin anus is not a new pleasure for you, but the usual shrieking, struggling and spasming is all the sweeter this time. @@.green;Half the arcology@@ has used $his @@.health.dec;poor injured butthole@@ by the end of the day; $he @@.gold;is learning to fear you,@@ and hates you @@.mediumorchid;even more@@ if possible.
-			<<set $activeSlave.devotion -= 4, $activeSlave.trust -= 5, $activeSlave.anus = 3>>
-			<<run seX($activeSlave, "anal", "public", "penetrative", 47)>>
-			<<run repX(2500, "event", $activeSlave), healthDamage($activeSlave, 10)>>
-			<<set $rivalID = 0>>
-		<</replace>>
-	<</link>>
-<</if>>
-<<if ($activeSlave.balls > 0) && ($activeSlave.boobs > 300) && ($seeExtreme == 1)>>
-	<br><<link "Publicly geld $him">>
-		<<replace "#result">>
-		You announce that since $activeSlave.slaveName has spent so much money and effort turning $himself into a girl with expensive hormones, you'll take a lower-tech step to bring $him further in that regard. An autosurgery is set up in public and the populace is treated to the edifying spectacle of a very large pair of testicles being efficiently removed by the modern surgical art. Unusually, $he was not given general anesthesia, but instead given local painkillers and made to watch on a monitor, to $his @@.gold;rage@@ and @@.mediumorchid;horror.@@ There is @@.green;applause@@ as the cauterizer seals the surgical site where $his massive scrotum used to hang. $His cock looks softer already.
-		<<set $activeSlave.devotion -= 50, $activeSlave.trust -= 50, $activeSlave.balls = 0>>
-		<<run repX(2500, "event", $activeSlave), healthDamage($activeSlave, 10)>>
-		<<set $rivalID = 0>>
-		<</replace>>
-	<</link>>
-<</if>>
-<<if (isFertile($activeSlave)) && ($seePreg == 1)>>
-	<br><<link "Let the public impregnate $him">>
-		<<replace "#result">>
-			You announce that since $activeSlave.slaveName damaged the arcology, $he will be taking a leading role in the reconstruction. $He will be doing this by replacing one of the residents killed in the violence — by bearing a new slave, to be conceived collectively. The shame and @@.mediumorchid;horror@@ of $his future as breeding stock comes home to $him as $he's restrained in a chair with $his legs spread. Soon, the stream of fluids is running down $his @@.lime;thoroughly-fucked pussy@@ and over $his anus to pool on the floor beneath $him. Modern medical imaging reveals $his fertile ovum's last, losing battle against a legion of sperm in real time, and the images are projected on large screens.
-			<<run seX($activeSlave, "vaginal", "public", "penetrative", 47)>>
-			<<set $activeSlave.preg = 1, $activeSlave.pregSource = -2, $activeSlave.pregKnown = 1, $activeSlave.pregWeek = 1, $activeSlave.devotion -= 15>>
-			<<set $activeSlave.pregType = setPregType($activeSlave)>>
-			<<set WombImpregnate($activeSlave, $activeSlave.pregType, -2, 1)>>
-			<<set $activeSlave.vagina = 3>>
-			<<run repX(2500, "event", $activeSlave)>>
-			<<set $rivalID = 0>>
-		<</replace>>
-	<</link>>
-<</if>>
-</span>
-
-<</if>> /* def $activeSlave */
-- 
GitLab


From 8e924578e995f425ad79c517489c1461b63cebc2 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 11 Jul 2021 22:47:29 -0400
Subject: [PATCH 08/13] initiation

---
 .../nonRandom/rival/pRivalInitiation.js       | 219 ++++++++++--------
 src/events/nonRandomEvent.js                  |   4 +-
 2 files changed, 121 insertions(+), 102 deletions(-)

diff --git a/src/events/nonRandom/rival/pRivalInitiation.js b/src/events/nonRandom/rival/pRivalInitiation.js
index b2166583c52..364681ec6bd 100644
--- a/src/events/nonRandom/rival/pRivalInitiation.js
+++ b/src/events/nonRandom/rival/pRivalInitiation.js
@@ -1,125 +1,146 @@
 App.Events.PrivalInitiation = class PrivalInitiation extends App.Events.BaseEvent {
 	eventPrerequisites() {
 		return [
-			() => V.arcologies[0].FSPaternalistDecoration === 100,
-			() => V.swanSong === 2,
-			() => V.week - V.swanSongWeek >= 3,
+			() => V.rivalOwner === -1
 		];
 	}
 
 	execute(node) {
-		let r = [];
-		
-		:: P rival initiation [nobr]
-
-		V.nextButton = "Continue", V.nextLink = "AS Dump", V.returnTo = "Scheduled Event", V.rivalOwner = 0, V.rivalOwnerEnslaved = 1;
+		V.nextButton = "Continue";
+		V.returnTo = "Scheduled Event";
+		V.rivalOwner = 0;
+		V.rivalOwnerEnslaved = 1;
 		if (V.hostageRescued === 1) {
-		V.nextButton = "See to the hostage", V.returnTo = "P hostage acquisition";
+			V.nextButton = "See to the hostage";
+			V.returnTo = "P hostage acquisition";
 		}
 
-		slave = getSlave(V.rivalID);
-
-		if (ndef slave) {
-			r.push(`/* rival slave is gone */`);
-
-			<<goto V.returnTo>>
-
-		} else {
-
-		App.Utils.setLocalPronouns(slave);
-
-		This is a special week, the week of your victory. 
-		App.UI.slaveDescriptionDialog(slave)
-			r.push(`awaits your pleasure. You could certainly do to ${him} anything and everything you usually do to your chattel. You could also do something special to mark the occasion.`);
-
-		<br><br>
+		const slave = getSlave(V.rivalID);
 
-		<span id="result">
-		<<link "Force ${him} to do a public relations tour with you">>
-			<<replace "#result">>
-			r.push(`Though ${he} hates you with all ${his} heart, ${he} knows better than most what happens to slaves who disobey. So, when you describe your public relations plans to ${him}, ${he} promises to obey before you even get to the threats. ${He} finds ${himself} accompanying you to the arcology's finest establishment in a lovely evening dress. The two of you share an understandably quiet meal, with a growing crowd coming to leer at the defeated slaveowner-cum-slave. At a prearranged signal from you, ${he} stands, quickly strips naked, gets down on`);
-		if (hasBothLegs(slave)) {
-			r.push(`${his} knees`);
-		} else {
-			r.push(`the ground`);
+		if (!slave) { /* rival slave is gone */
+			Engine.play(V.returnTo);
 		}
-			r.push(`, and`);
-		if (V.PC.dick !== 0) {
-			r.push(`sucks you off`);
-		if (V.PC.vagina !== -1) {
-			r.push(`and`);
+
+		const {
+			He, His,
+			he, him, his, himself
+		} = getPronouns(slave);
+		App.Events.addParagraph(node, [
+			`This is a special week, the week of your victory.`,
+			App.UI.DOM.slaveDescriptionDialog(slave),
+			`awaits your pleasure. You could certainly do to ${him} anything and everything you usually do to your chattel. You could also do something special to mark the occasion.`
+		]);
+		const choices = [];
+		choices.push(new App.Events.Result(`Force ${him} to do a public relations tour with you`, tour));
+		choices.push(new App.Events.Result(`Make ${him} orally service your other slaves in public`, serveSlaves));
+		if (slave.anus === 0) {
+			choices.push(new App.Events.Result(`Break in ${his} asshole and then let the public use it`, breakAss));
 		}
+		if (slave.balls > 0 && slave.boobs > 300 && V.seeExtreme === 1) {
+			choices.push(new App.Events.Result(`Publicly geld ${him}`, geld));
 		}
-		if (V.PC.vagina !== -1) {
-			r.push(`eats you out`);
+		if (isFertile(slave) && V.seePreg === 1) {
+			choices.push(new App.Events.Result(`Let the public impregnate ${him}`, publicImpreg));
 		}
-			r.push(`. Such public humiliation starts ${him} down the path of <span class="hotpink">obedience,</span> and is the <span class="green">talk of the Free Cities.</span>`);
-			slave.devotion += 4, slave.counter.oral += 1, V.oralTotal += 1;
+		App.Events.addResponses(node, choices);
+
+		function tour() {
+			const frag = new DocumentFragment();
+			let r = [];
+			r.push(`Though ${he} hates you with all ${his} heart, ${he} knows better than most what happens to slaves who disobey. So, when you describe your public relations plans to ${him}, ${he} promises to obey before you even get to the threats. ${He} finds ${himself} accompanying you to the arcology's finest establishment in a lovely evening dress. The two of you share an understandably quiet meal, with a growing crowd coming to leer at the defeated slaveowner-cum-slave. At a prearranged signal from you, ${he} stands, quickly strips naked, gets down on`);
+			if (hasBothLegs(slave)) {
+				r.push(`${his} knees`);
+			} else {
+				r.push(`the ground`);
+			}
+			r.push(`, and`);
+			if (V.PC.dick !== 0) {
+				r.push(`sucks you off`);
+				if (V.PC.vagina !== -1) {
+					r.push(`and`);
+				}
+			}
+			if (V.PC.vagina !== -1) {
+				r.push(`eats you out`);
+			}
+			r.push(
+				r.pop() + ".",
+				`Such public humiliation starts ${him} down the path of <span class="hotpink">obedience,</span> and is the <span class="green">talk of the Free Cities.</span>`
+			);
+			slave.devotion += 4;
+			slave.counter.oral += 1;
+			V.oralTotal += 1;
 			repX(2500, "event", slave);
 			V.rivalID = 0;
-			<</replace>>
-		<</link>>
-		<br>
-		<<link "Make ${him} orally service your other slaves in public">>
-			<<replace "#result">>
-			<<setLocalPronouns V.slaves[1] 2>>
-			r.push(`${V.slaves[0].slaveName} leads ${him} out into the arcology's largest atrium, forces ${him} to`);
-		if (hasBothLegs(slave)) {
-			r.push(`${his} knees`);
-		} else {
-			r.push(`the ground`);
+			App.Events.addParagraph(frag, r);
+			return frag;
 		}
-			r.push(`, and, in full view of the whole arcology, orally rapes someone who was until this week a slaveowner ${himself}. Behind them, ${V.slaves[1].slaveName} is standing ready for ${_his2} turn, and all your other slaves stand behind ${_him2}. Public opinion is divided; the precedent is universally agreed to be bad, but the punishment is generally thought to be terrible and deserved. Your slaves, however, are almost insufferably <span class="hotpink">pleased with you</span> for forcing slave.slaveName, whom they still view as a slaveowner, to pleasure them.`);
-			slave.counter.oral += V.slaves.length*2, V.oralTotal += V.slaves.length*2;
+
+		function serveSlaves() {
+			const frag = new DocumentFragment();
+			let r = [];
+			const {
+				his2, him2,
+			} = getPronouns(V.slaves[1]).appendSuffix("2");
+			r.push(`${V.slaves[0].slaveName} leads ${him} out into the arcology's largest atrium, forces ${him} to`);
+			if (hasBothLegs(slave)) {
+				r.push(`${his} knees`);
+			} else {
+				r.push(`the ground`);
+			}
+			r.push(`, and, in full view of the whole arcology, orally rapes someone who was until this week a slaveowner ${himself}. Behind them, ${V.slaves[1].slaveName} is standing ready for ${his2} turn, and all your other slaves stand behind ${him2}. Public opinion is divided; the precedent is universally agreed to be bad, but the punishment is generally thought to be terrible and deserved. Your slaves, however, are almost insufferably <span class="hotpink">pleased with you</span> for forcing slave.slaveName, whom they still view as a slaveowner, to pleasure them.`);
+			slave.counter.oral += V.slaves.length * 2;
+			V.oralTotal += V.slaves.length * 2;
 			V.slaves.forEach(function(s) { s.devotion += 10; });
 			V.rivalID = 0;
-			<</replace>>
-		<</link>>
-		if (slave.anus === 0) {
-			<br>
-		<<link "Break in ${his} asshole and then let the public use it">>
-				<<replace "#result">>
-					r.push(`${slave.slaveName}, who has been fairly dignified up to this point, breaks down when ${he}'s placed in stocks with ${his} ass in the air. ${His} sobs become screams when, for the first time in ${his} life, ${he} feels the burning sensation of a well-lubricated`);
-		if (V.PC.dick !== 0) {
-			r.push(`cockhead`);
-		} else {
-			r.push(`strap-on`);
+			App.Events.addParagraph(frag, r);
+			return frag;
 		}
+
+		function breakAss() {
+			const frag = new DocumentFragment();
+			let r = [];
+			r.push(`${slave.slaveName}, who has been fairly dignified up to this point, breaks down when ${he}'s placed in stocks with ${his} ass in the air. ${His} sobs become screams when, for the first time in ${his} life, ${he} feels the burning sensation of a well-lubricated`);
+			if (V.PC.dick !== 0) {
+				r.push(`cockhead`);
+			} else {
+				r.push(`strap-on`);
+			}
 			r.push(`forcing its way past ${his} virgin sphincter. Raping a virgin anus is not a new pleasure for you, but the usual shrieking, struggling and spasming is all the sweeter this time. <span class="green">Half the arcology</span> has used ${his} <span class="health.dec">poor injured butthole</span> by the end of the day; ${he} <span class="gold">is learning to fear you,</span> and hates you <span class="mediumorchid">even more</span> if possible.`);
-					slave.devotion -= 4, slave.trust -= 5, slave.anus = 3;
-					seX(slave, "anal", "public", "penetrative", 47);
-					repX(2500, "event", slave), healthDamage(slave, 10);
-					V.rivalID = 0;
-				<</replace>>
-			<</link>>
-		}
-		if (slave.balls > 0) && (slave.boobs > 300) && (V.seeExtreme === 1) {
-			<br>
-		<<link "Publicly geld ${him}">>
-				<<replace "#result">>
-				r.push(`You announce that since ${slave.slaveName} has spent so much money and effort turning ${himself} into a girl with expensive hormones, you'll take a lower-tech step to bring ${him} further in that regard. An autosurgery is set up in public and the populace is treated to the edifying spectacle of a very large pair of testicles being efficiently removed by the modern surgical art. Unusually, ${he} was not given general anesthesia, but instead given local painkillers and made to watch on a monitor, to ${his} <span class="gold">rage</span> and <span class="mediumorchid">horror.</span> There is <span class="green">applause</span> as the cauterizer seals the surgical site where ${his} massive scrotum used to hang. ${His} cock looks softer already.`);
-				slave.devotion -= 50, slave.trust -= 50, slave.balls = 0;
-				repX(2500, "event", slave), healthDamage(slave, 10);
-				V.rivalID = 0;
-				<</replace>>
-			<</link>>
+			slave.devotion -= 4;
+			slave.trust -= 5;
+			slave.anus = 3;
+			seX(slave, "anal", "public", "penetrative", 47);
+			repX(2500, "event", slave);
+			healthDamage(slave, 10);
+			V.rivalID = 0;
+			App.Events.addParagraph(frag, r);
+			return frag;
 		}
-		if (isFertile(slave)) && (V.seePreg === 1) {
-			<br>
-		<<link "Let the public impregnate ${him}">>
-				<<replace "#result">>
-					r.push(`You announce that since ${slave.slaveName} damaged the arcology, ${he} will be taking a leading role in the reconstruction. ${He} will be doing this by replacing one of the residents killed in the violence — by bearing a new slave, to be conceived collectively. The shame and <span class="mediumorchid">horror</span> of ${his} future as breeding stock comes home to ${him} as ${he}'s restrained in a chair with ${his} legs spread. Soon, the stream of fluids is running down ${his} <span class="lime">thoroughly-fucked pussy</span> and over ${his} anus to pool on the floor beneath ${him}. Modern medical imaging reveals ${his} fertile ovum's last, losing battle against a legion of sperm in real time, and the images are projected on large screens.`);
-					seX(slave, "vaginal", "public", "penetrative", 47);
-					slave.preg = 1, slave.pregSource = -2, slave.pregKnown = 1, slave.pregWeek = 1, slave.devotion -= 15;
-					slave.pregType = setPregType(slave);
-					WombImpregnate(slave, slave.pregType, -2, 1);
-					slave.vagina = 3;
-					repX(2500, "event", slave);
-					V.rivalID = 0;
-				<</replace>>
-			<</link>>
+
+		function geld() {
+			slave.devotion -= 50;
+			slave.trust -= 50;
+			slave.balls = 0;
+			repX(2500, "event", slave);
+			healthDamage(slave, 10);
+			V.rivalID = 0;
+			return `You announce that since ${slave.slaveName} has spent so much money and effort turning ${himself} into a girl with expensive hormones, you'll take a lower-tech step to bring ${him} further in that regard. An autosurgery is set up in public and the populace is treated to the edifying spectacle of a very large pair of testicles being efficiently removed by the modern surgical art. Unusually, ${he} was not given general anesthesia, but instead given local painkillers and made to watch on a monitor, to ${his} <span class="gold">rage</span> and <span class="mediumorchid">horror.</span> There is <span class="green">applause</span> as the cauterizer seals the surgical site where ${his} massive scrotum used to hang. ${His} cock looks softer already.`;
 		}
-		</span>
 
+		function publicImpreg() {
+			seX(slave, "vaginal", "public", "penetrative", 47);
+			slave.preg = 1;
+			slave.pregSource = -2;
+			slave.pregKnown = 1;
+			slave.pregWeek = 1;
+			slave.devotion -= 15;
+			slave.pregType = setPregType(slave);
+			WombImpregnate(slave, slave.pregType, -2, 1);
+			slave.vagina = 3;
+			repX(2500, "event", slave);
+			V.rivalID = 0;
+			return `You announce that since ${slave.slaveName} damaged the arcology, ${he} will be taking a leading role in the reconstruction. ${He} will be doing this by replacing one of the residents killed in the violence — by bearing a new slave, to be conceived collectively. The shame and <span class="mediumorchid">horror</span> of ${his} future as breeding stock comes home to ${him} as ${he}'s restrained in a chair with ${his} legs spread. Soon, the stream of fluids is running down ${his} <span class="lime">thoroughly-fucked pussy</span> and over ${his} anus to pool on the floor beneath ${him}. Modern medical imaging reveals ${his} fertile ovum's last, losing battle against a legion of sperm in real time, and the images are projected on large screens.`;
 		}
-			r.push(`/* def slave */`);
+	}
+};
diff --git a/src/events/nonRandomEvent.js b/src/events/nonRandomEvent.js
index f81181ea023..a6dfb109d44 100644
--- a/src/events/nonRandomEvent.js
+++ b/src/events/nonRandomEvent.js
@@ -9,9 +9,7 @@ App.Events.getNonrandomEvents = function() {
 		// instantiate all possible scheduled/nonrandom events here
 		// ORDER MATTERS - if multiple events from this list trigger in a single week, they are executed in this order
 
-		new App.Events.TwineEvent().wrapPassage([
-			() => V.rivalOwner === -1
-		], "P rival initiation"),
+		new App.Events.PrivalInitiation(),
 		new App.Events.TwineEvent().wrapPassage([
 			() => V.secExpEnabled > 0,
 			() => V.SecExp.war.foughtThisWeek === 0,
-- 
GitLab


From 8005a641d3f11d50b4643b459e71a99bd06b7686 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 11 Jul 2021 23:07:18 -0400
Subject: [PATCH 09/13] move pRivalInitiation content into a global function so
 we can see it as a passage and event

---
 src/005-passages/eventsPassages.js            |   6 +
 .../nonRandom/rival/pRivalInitiation.js       | 257 +++++++++---------
 src/events/nonRandomEvent.js                  |   2 +-
 3 files changed, 140 insertions(+), 125 deletions(-)

diff --git a/src/005-passages/eventsPassages.js b/src/005-passages/eventsPassages.js
index e646b2cb119..60af1983113 100644
--- a/src/005-passages/eventsPassages.js
+++ b/src/005-passages/eventsPassages.js
@@ -80,6 +80,12 @@ new App.DomPassage("P hostage acquisition",
 	}
 );
 
+new App.DomPassage("P rival initiation",
+	() => {
+		return pRivalInitiation();
+	}
+);
+
 new App.DomPassage("Gameover",
 	() => {
 		return App.Events.Gameover();
diff --git a/src/events/nonRandom/rival/pRivalInitiation.js b/src/events/nonRandom/rival/pRivalInitiation.js
index 364681ec6bd..2155ca8b7b1 100644
--- a/src/events/nonRandom/rival/pRivalInitiation.js
+++ b/src/events/nonRandom/rival/pRivalInitiation.js
@@ -1,4 +1,4 @@
-App.Events.PrivalInitiation = class PrivalInitiation extends App.Events.BaseEvent {
+App.Events.PRivalInitiation = class PRivalInitiation extends App.Events.BaseEvent {
 	eventPrerequisites() {
 		return [
 			() => V.rivalOwner === -1
@@ -6,141 +6,150 @@ App.Events.PrivalInitiation = class PrivalInitiation extends App.Events.BaseEven
 	}
 
 	execute(node) {
-		V.nextButton = "Continue";
-		V.returnTo = "Scheduled Event";
-		V.rivalOwner = 0;
-		V.rivalOwnerEnslaved = 1;
-		if (V.hostageRescued === 1) {
-			V.nextButton = "See to the hostage";
-			V.returnTo = "P hostage acquisition";
-		}
+		node.append(pRivalInitiation());
+	}
+};
 
-		const slave = getSlave(V.rivalID);
+/**
+ *
+ * @returns {DocumentFragment}
+ */
+globalThis.pRivalInitiation = function() {
+	const node = new DocumentFragment();
+	V.nextButton = "Continue";
+	V.returnTo = "Scheduled Event";
+	V.rivalOwner = 0;
+	V.rivalOwnerEnslaved = 1;
+	if (V.hostageRescued === 1) {
+		V.nextButton = "See to the hostage";
+		V.returnTo = "P hostage acquisition";
+	}
 
-		if (!slave) { /* rival slave is gone */
-			Engine.play(V.returnTo);
-		}
+	const slave = getSlave(V.rivalID);
 
-		const {
-			He, His,
-			he, him, his, himself
-		} = getPronouns(slave);
-		App.Events.addParagraph(node, [
-			`This is a special week, the week of your victory.`,
-			App.UI.DOM.slaveDescriptionDialog(slave),
-			`awaits your pleasure. You could certainly do to ${him} anything and everything you usually do to your chattel. You could also do something special to mark the occasion.`
-		]);
-		const choices = [];
-		choices.push(new App.Events.Result(`Force ${him} to do a public relations tour with you`, tour));
-		choices.push(new App.Events.Result(`Make ${him} orally service your other slaves in public`, serveSlaves));
-		if (slave.anus === 0) {
-			choices.push(new App.Events.Result(`Break in ${his} asshole and then let the public use it`, breakAss));
-		}
-		if (slave.balls > 0 && slave.boobs > 300 && V.seeExtreme === 1) {
-			choices.push(new App.Events.Result(`Publicly geld ${him}`, geld));
-		}
-		if (isFertile(slave) && V.seePreg === 1) {
-			choices.push(new App.Events.Result(`Let the public impregnate ${him}`, publicImpreg));
-		}
-		App.Events.addResponses(node, choices);
+	if (!slave) { /* rival slave is gone */
+		Engine.play(V.returnTo);
+	}
 
-		function tour() {
-			const frag = new DocumentFragment();
-			let r = [];
-			r.push(`Though ${he} hates you with all ${his} heart, ${he} knows better than most what happens to slaves who disobey. So, when you describe your public relations plans to ${him}, ${he} promises to obey before you even get to the threats. ${He} finds ${himself} accompanying you to the arcology's finest establishment in a lovely evening dress. The two of you share an understandably quiet meal, with a growing crowd coming to leer at the defeated slaveowner-cum-slave. At a prearranged signal from you, ${he} stands, quickly strips naked, gets down on`);
-			if (hasBothLegs(slave)) {
-				r.push(`${his} knees`);
-			} else {
-				r.push(`the ground`);
-			}
-			r.push(`, and`);
-			if (V.PC.dick !== 0) {
-				r.push(`sucks you off`);
-				if (V.PC.vagina !== -1) {
-					r.push(`and`);
-				}
-			}
+	const {
+		He, His,
+		he, him, his, himself
+	} = getPronouns(slave);
+	App.Events.addParagraph(node, [
+		`This is a special week, the week of your victory.`,
+		App.UI.DOM.slaveDescriptionDialog(slave),
+		`awaits your pleasure. You could certainly do to ${him} anything and everything you usually do to your chattel. You could also do something special to mark the occasion.`
+	]);
+	const choices = [];
+	choices.push(new App.Events.Result(`Force ${him} to do a public relations tour with you`, tour));
+	choices.push(new App.Events.Result(`Make ${him} orally service your other slaves in public`, serveSlaves));
+	if (slave.anus === 0) {
+		choices.push(new App.Events.Result(`Break in ${his} asshole and then let the public use it`, breakAss));
+	}
+	if (slave.balls > 0 && slave.boobs > 300 && V.seeExtreme === 1) {
+		choices.push(new App.Events.Result(`Publicly geld ${him}`, geld));
+	}
+	if (isFertile(slave) && V.seePreg === 1) {
+		choices.push(new App.Events.Result(`Let the public impregnate ${him}`, publicImpreg));
+	}
+	App.Events.addResponses(node, choices);
+	return node;
+	function tour() {
+		const frag = new DocumentFragment();
+		let r = [];
+		r.push(`Though ${he} hates you with all ${his} heart, ${he} knows better than most what happens to slaves who disobey. So, when you describe your public relations plans to ${him}, ${he} promises to obey before you even get to the threats. ${He} finds ${himself} accompanying you to the arcology's finest establishment in a lovely evening dress. The two of you share an understandably quiet meal, with a growing crowd coming to leer at the defeated slaveowner-cum-slave. At a prearranged signal from you, ${he} stands, quickly strips naked, gets down on`);
+		if (hasBothLegs(slave)) {
+			r.push(`${his} knees`);
+		} else {
+			r.push(`the ground`);
+		}
+		r.push(`, and`);
+		if (V.PC.dick !== 0) {
+			r.push(`sucks you off`);
 			if (V.PC.vagina !== -1) {
-				r.push(`eats you out`);
+				r.push(`and`);
 			}
-			r.push(
-				r.pop() + ".",
-				`Such public humiliation starts ${him} down the path of <span class="hotpink">obedience,</span> and is the <span class="green">talk of the Free Cities.</span>`
-			);
-			slave.devotion += 4;
-			slave.counter.oral += 1;
-			V.oralTotal += 1;
-			repX(2500, "event", slave);
-			V.rivalID = 0;
-			App.Events.addParagraph(frag, r);
-			return frag;
 		}
-
-		function serveSlaves() {
-			const frag = new DocumentFragment();
-			let r = [];
-			const {
-				his2, him2,
-			} = getPronouns(V.slaves[1]).appendSuffix("2");
-			r.push(`${V.slaves[0].slaveName} leads ${him} out into the arcology's largest atrium, forces ${him} to`);
-			if (hasBothLegs(slave)) {
-				r.push(`${his} knees`);
-			} else {
-				r.push(`the ground`);
-			}
-			r.push(`, and, in full view of the whole arcology, orally rapes someone who was until this week a slaveowner ${himself}. Behind them, ${V.slaves[1].slaveName} is standing ready for ${his2} turn, and all your other slaves stand behind ${him2}. Public opinion is divided; the precedent is universally agreed to be bad, but the punishment is generally thought to be terrible and deserved. Your slaves, however, are almost insufferably <span class="hotpink">pleased with you</span> for forcing slave.slaveName, whom they still view as a slaveowner, to pleasure them.`);
-			slave.counter.oral += V.slaves.length * 2;
-			V.oralTotal += V.slaves.length * 2;
-			V.slaves.forEach(function(s) { s.devotion += 10; });
-			V.rivalID = 0;
-			App.Events.addParagraph(frag, r);
-			return frag;
+		if (V.PC.vagina !== -1) {
+			r.push(`eats you out`);
 		}
+		r.push(
+			r.pop() + ".",
+			`Such public humiliation starts ${him} down the path of <span class="hotpink">obedience,</span> and is the <span class="green">talk of the Free Cities.</span>`
+		);
+		slave.devotion += 4;
+		slave.counter.oral += 1;
+		V.oralTotal += 1;
+		repX(2500, "event", slave);
+		V.rivalID = 0;
+		App.Events.addParagraph(frag, r);
+		return frag;
+	}
 
-		function breakAss() {
-			const frag = new DocumentFragment();
-			let r = [];
-			r.push(`${slave.slaveName}, who has been fairly dignified up to this point, breaks down when ${he}'s placed in stocks with ${his} ass in the air. ${His} sobs become screams when, for the first time in ${his} life, ${he} feels the burning sensation of a well-lubricated`);
-			if (V.PC.dick !== 0) {
-				r.push(`cockhead`);
-			} else {
-				r.push(`strap-on`);
-			}
-			r.push(`forcing its way past ${his} virgin sphincter. Raping a virgin anus is not a new pleasure for you, but the usual shrieking, struggling and spasming is all the sweeter this time. <span class="green">Half the arcology</span> has used ${his} <span class="health.dec">poor injured butthole</span> by the end of the day; ${he} <span class="gold">is learning to fear you,</span> and hates you <span class="mediumorchid">even more</span> if possible.`);
-			slave.devotion -= 4;
-			slave.trust -= 5;
-			slave.anus = 3;
-			seX(slave, "anal", "public", "penetrative", 47);
-			repX(2500, "event", slave);
-			healthDamage(slave, 10);
-			V.rivalID = 0;
-			App.Events.addParagraph(frag, r);
-			return frag;
+	function serveSlaves() {
+		const frag = new DocumentFragment();
+		let r = [];
+		const {
+			his2, him2,
+		} = getPronouns(V.slaves[1]).appendSuffix("2");
+		r.push(`${V.slaves[0].slaveName} leads ${him} out into the arcology's largest atrium, forces ${him} to`);
+		if (hasBothLegs(slave)) {
+			r.push(`${his} knees`);
+		} else {
+			r.push(`the ground`);
 		}
+		r.push(`, and, in full view of the whole arcology, orally rapes someone who was until this week a slaveowner ${himself}. Behind them, ${V.slaves[1].slaveName} is standing ready for ${his2} turn, and all your other slaves stand behind ${him2}. Public opinion is divided; the precedent is universally agreed to be bad, but the punishment is generally thought to be terrible and deserved. Your slaves, however, are almost insufferably <span class="hotpink">pleased with you</span> for forcing slave.slaveName, whom they still view as a slaveowner, to pleasure them.`);
+		slave.counter.oral += V.slaves.length * 2;
+		V.oralTotal += V.slaves.length * 2;
+		V.slaves.forEach(function(s) { s.devotion += 10; });
+		V.rivalID = 0;
+		App.Events.addParagraph(frag, r);
+		return frag;
+	}
 
-		function geld() {
-			slave.devotion -= 50;
-			slave.trust -= 50;
-			slave.balls = 0;
-			repX(2500, "event", slave);
-			healthDamage(slave, 10);
-			V.rivalID = 0;
-			return `You announce that since ${slave.slaveName} has spent so much money and effort turning ${himself} into a girl with expensive hormones, you'll take a lower-tech step to bring ${him} further in that regard. An autosurgery is set up in public and the populace is treated to the edifying spectacle of a very large pair of testicles being efficiently removed by the modern surgical art. Unusually, ${he} was not given general anesthesia, but instead given local painkillers and made to watch on a monitor, to ${his} <span class="gold">rage</span> and <span class="mediumorchid">horror.</span> There is <span class="green">applause</span> as the cauterizer seals the surgical site where ${his} massive scrotum used to hang. ${His} cock looks softer already.`;
+	function breakAss() {
+		const frag = new DocumentFragment();
+		let r = [];
+		r.push(`${slave.slaveName}, who has been fairly dignified up to this point, breaks down when ${he}'s placed in stocks with ${his} ass in the air. ${His} sobs become screams when, for the first time in ${his} life, ${he} feels the burning sensation of a well-lubricated`);
+		if (V.PC.dick !== 0) {
+			r.push(`cockhead`);
+		} else {
+			r.push(`strap-on`);
 		}
+		r.push(`forcing its way past ${his} virgin sphincter. Raping a virgin anus is not a new pleasure for you, but the usual shrieking, struggling and spasming is all the sweeter this time. <span class="green">Half the arcology</span> has used ${his} <span class="health.dec">poor injured butthole</span> by the end of the day; ${he} <span class="gold">is learning to fear you,</span> and hates you <span class="mediumorchid">even more</span> if possible.`);
+		slave.devotion -= 4;
+		slave.trust -= 5;
+		slave.anus = 3;
+		seX(slave, "anal", "public", "penetrative", 47);
+		repX(2500, "event", slave);
+		healthDamage(slave, 10);
+		V.rivalID = 0;
+		App.Events.addParagraph(frag, r);
+		return frag;
+	}
 
-		function publicImpreg() {
-			seX(slave, "vaginal", "public", "penetrative", 47);
-			slave.preg = 1;
-			slave.pregSource = -2;
-			slave.pregKnown = 1;
-			slave.pregWeek = 1;
-			slave.devotion -= 15;
-			slave.pregType = setPregType(slave);
-			WombImpregnate(slave, slave.pregType, -2, 1);
-			slave.vagina = 3;
-			repX(2500, "event", slave);
-			V.rivalID = 0;
-			return `You announce that since ${slave.slaveName} damaged the arcology, ${he} will be taking a leading role in the reconstruction. ${He} will be doing this by replacing one of the residents killed in the violence — by bearing a new slave, to be conceived collectively. The shame and <span class="mediumorchid">horror</span> of ${his} future as breeding stock comes home to ${him} as ${he}'s restrained in a chair with ${his} legs spread. Soon, the stream of fluids is running down ${his} <span class="lime">thoroughly-fucked pussy</span> and over ${his} anus to pool on the floor beneath ${him}. Modern medical imaging reveals ${his} fertile ovum's last, losing battle against a legion of sperm in real time, and the images are projected on large screens.`;
-		}
+	function geld() {
+		slave.devotion -= 50;
+		slave.trust -= 50;
+		slave.balls = 0;
+		repX(2500, "event", slave);
+		healthDamage(slave, 10);
+		V.rivalID = 0;
+		return `You announce that since ${slave.slaveName} has spent so much money and effort turning ${himself} into a girl with expensive hormones, you'll take a lower-tech step to bring ${him} further in that regard. An autosurgery is set up in public and the populace is treated to the edifying spectacle of a very large pair of testicles being efficiently removed by the modern surgical art. Unusually, ${he} was not given general anesthesia, but instead given local painkillers and made to watch on a monitor, to ${his} <span class="gold">rage</span> and <span class="mediumorchid">horror.</span> There is <span class="green">applause</span> as the cauterizer seals the surgical site where ${his} massive scrotum used to hang. ${His} cock looks softer already.`;
+	}
+
+	function publicImpreg() {
+		seX(slave, "vaginal", "public", "penetrative", 47);
+		slave.preg = 1;
+		slave.pregSource = -2;
+		slave.pregKnown = 1;
+		slave.pregWeek = 1;
+		slave.devotion -= 15;
+		slave.pregType = setPregType(slave);
+		WombImpregnate(slave, slave.pregType, -2, 1);
+		slave.vagina = 3;
+		repX(2500, "event", slave);
+		V.rivalID = 0;
+		return `You announce that since ${slave.slaveName} damaged the arcology, ${he} will be taking a leading role in the reconstruction. ${He} will be doing this by replacing one of the residents killed in the violence — by bearing a new slave, to be conceived collectively. The shame and <span class="mediumorchid">horror</span> of ${his} future as breeding stock comes home to ${him} as ${he}'s restrained in a chair with ${his} legs spread. Soon, the stream of fluids is running down ${his} <span class="lime">thoroughly-fucked pussy</span> and over ${his} anus to pool on the floor beneath ${him}. Modern medical imaging reveals ${his} fertile ovum's last, losing battle against a legion of sperm in real time, and the images are projected on large screens.`;
 	}
 };
diff --git a/src/events/nonRandomEvent.js b/src/events/nonRandomEvent.js
index a6dfb109d44..bcd4b88946e 100644
--- a/src/events/nonRandomEvent.js
+++ b/src/events/nonRandomEvent.js
@@ -9,7 +9,7 @@ App.Events.getNonrandomEvents = function() {
 		// instantiate all possible scheduled/nonrandom events here
 		// ORDER MATTERS - if multiple events from this list trigger in a single week, they are executed in this order
 
-		new App.Events.PrivalInitiation(),
+		new App.Events.PRivalInitiation(),
 		new App.Events.TwineEvent().wrapPassage([
 			() => V.secExpEnabled > 0,
 			() => V.SecExp.war.foughtThisWeek === 0,
-- 
GitLab


From 80062f78eaddd2e1d9a4a5fbf73e68a3f6d4a85d Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 11 Jul 2021 23:15:07 -0400
Subject: [PATCH 10/13] call directly

---
 src/005-passages/eventsPassages.js            |   3 +-
 .../nonRandom/rival/pRivalInitiation.js       | 255 +++++++++---------
 2 files changed, 125 insertions(+), 133 deletions(-)

diff --git a/src/005-passages/eventsPassages.js b/src/005-passages/eventsPassages.js
index 60af1983113..b1537407888 100644
--- a/src/005-passages/eventsPassages.js
+++ b/src/005-passages/eventsPassages.js
@@ -82,7 +82,8 @@ new App.DomPassage("P hostage acquisition",
 
 new App.DomPassage("P rival initiation",
 	() => {
-		return pRivalInitiation();
+		const node = new DocumentFragment();
+		return new App.Events.PRivalInitiation().execute(node);
 	}
 );
 
diff --git a/src/events/nonRandom/rival/pRivalInitiation.js b/src/events/nonRandom/rival/pRivalInitiation.js
index 2155ca8b7b1..83956e54c58 100644
--- a/src/events/nonRandom/rival/pRivalInitiation.js
+++ b/src/events/nonRandom/rival/pRivalInitiation.js
@@ -6,150 +6,141 @@ App.Events.PRivalInitiation = class PRivalInitiation extends App.Events.BaseEven
 	}
 
 	execute(node) {
-		node.append(pRivalInitiation());
-	}
-};
-
-/**
- *
- * @returns {DocumentFragment}
- */
-globalThis.pRivalInitiation = function() {
-	const node = new DocumentFragment();
-	V.nextButton = "Continue";
-	V.returnTo = "Scheduled Event";
-	V.rivalOwner = 0;
-	V.rivalOwnerEnslaved = 1;
-	if (V.hostageRescued === 1) {
-		V.nextButton = "See to the hostage";
-		V.returnTo = "P hostage acquisition";
-	}
+		V.nextButton = "Continue";
+		V.returnTo = "Scheduled Event";
+		V.rivalOwner = 0;
+		V.rivalOwnerEnslaved = 1;
+		if (V.hostageRescued === 1) {
+			V.nextButton = "See to the hostage";
+			V.returnTo = "P hostage acquisition";
+		}
 
-	const slave = getSlave(V.rivalID);
+		const slave = getSlave(V.rivalID);
 
-	if (!slave) { /* rival slave is gone */
-		Engine.play(V.returnTo);
-	}
+		if (!slave) { /* rival slave is gone */
+			Engine.play(V.returnTo);
+		}
 
-	const {
-		He, His,
-		he, him, his, himself
-	} = getPronouns(slave);
-	App.Events.addParagraph(node, [
-		`This is a special week, the week of your victory.`,
-		App.UI.DOM.slaveDescriptionDialog(slave),
-		`awaits your pleasure. You could certainly do to ${him} anything and everything you usually do to your chattel. You could also do something special to mark the occasion.`
-	]);
-	const choices = [];
-	choices.push(new App.Events.Result(`Force ${him} to do a public relations tour with you`, tour));
-	choices.push(new App.Events.Result(`Make ${him} orally service your other slaves in public`, serveSlaves));
-	if (slave.anus === 0) {
-		choices.push(new App.Events.Result(`Break in ${his} asshole and then let the public use it`, breakAss));
-	}
-	if (slave.balls > 0 && slave.boobs > 300 && V.seeExtreme === 1) {
-		choices.push(new App.Events.Result(`Publicly geld ${him}`, geld));
-	}
-	if (isFertile(slave) && V.seePreg === 1) {
-		choices.push(new App.Events.Result(`Let the public impregnate ${him}`, publicImpreg));
-	}
-	App.Events.addResponses(node, choices);
-	return node;
-	function tour() {
-		const frag = new DocumentFragment();
-		let r = [];
-		r.push(`Though ${he} hates you with all ${his} heart, ${he} knows better than most what happens to slaves who disobey. So, when you describe your public relations plans to ${him}, ${he} promises to obey before you even get to the threats. ${He} finds ${himself} accompanying you to the arcology's finest establishment in a lovely evening dress. The two of you share an understandably quiet meal, with a growing crowd coming to leer at the defeated slaveowner-cum-slave. At a prearranged signal from you, ${he} stands, quickly strips naked, gets down on`);
-		if (hasBothLegs(slave)) {
-			r.push(`${his} knees`);
-		} else {
-			r.push(`the ground`);
+		const {
+			He, His,
+			he, him, his, himself
+		} = getPronouns(slave);
+		App.Events.addParagraph(node, [
+			`This is a special week, the week of your victory.`,
+			App.UI.DOM.slaveDescriptionDialog(slave),
+			`awaits your pleasure. You could certainly do to ${him} anything and everything you usually do to your chattel. You could also do something special to mark the occasion.`
+		]);
+		const choices = [];
+		choices.push(new App.Events.Result(`Force ${him} to do a public relations tour with you`, tour));
+		choices.push(new App.Events.Result(`Make ${him} orally service your other slaves in public`, serveSlaves));
+		if (slave.anus === 0) {
+			choices.push(new App.Events.Result(`Break in ${his} asshole and then let the public use it`, breakAss));
+		}
+		if (slave.balls > 0 && slave.boobs > 300 && V.seeExtreme === 1) {
+			choices.push(new App.Events.Result(`Publicly geld ${him}`, geld));
+		}
+		if (isFertile(slave) && V.seePreg === 1) {
+			choices.push(new App.Events.Result(`Let the public impregnate ${him}`, publicImpreg));
 		}
-		r.push(`, and`);
-		if (V.PC.dick !== 0) {
-			r.push(`sucks you off`);
+		App.Events.addResponses(node, choices);
+
+		function tour() {
+			const frag = new DocumentFragment();
+			let r = [];
+			r.push(`Though ${he} hates you with all ${his} heart, ${he} knows better than most what happens to slaves who disobey. So, when you describe your public relations plans to ${him}, ${he} promises to obey before you even get to the threats. ${He} finds ${himself} accompanying you to the arcology's finest establishment in a lovely evening dress. The two of you share an understandably quiet meal, with a growing crowd coming to leer at the defeated slaveowner-cum-slave. At a prearranged signal from you, ${he} stands, quickly strips naked, gets down on`);
+			if (hasBothLegs(slave)) {
+				r.push(`${his} knees`);
+			} else {
+				r.push(`the ground`);
+			}
+			r.push(`, and`);
+			if (V.PC.dick !== 0) {
+				r.push(`sucks you off`);
+				if (V.PC.vagina !== -1) {
+					r.push(`and`);
+				}
+			}
 			if (V.PC.vagina !== -1) {
-				r.push(`and`);
+				r.push(`eats you out`);
 			}
+			r.push(
+				r.pop() + ".",
+				`Such public humiliation starts ${him} down the path of <span class="hotpink">obedience,</span> and is the <span class="green">talk of the Free Cities.</span>`
+			);
+			slave.devotion += 4;
+			slave.counter.oral += 1;
+			V.oralTotal += 1;
+			repX(2500, "event", slave);
+			V.rivalID = 0;
+			App.Events.addParagraph(frag, r);
+			return frag;
 		}
-		if (V.PC.vagina !== -1) {
-			r.push(`eats you out`);
-		}
-		r.push(
-			r.pop() + ".",
-			`Such public humiliation starts ${him} down the path of <span class="hotpink">obedience,</span> and is the <span class="green">talk of the Free Cities.</span>`
-		);
-		slave.devotion += 4;
-		slave.counter.oral += 1;
-		V.oralTotal += 1;
-		repX(2500, "event", slave);
-		V.rivalID = 0;
-		App.Events.addParagraph(frag, r);
-		return frag;
-	}
 
-	function serveSlaves() {
-		const frag = new DocumentFragment();
-		let r = [];
-		const {
-			his2, him2,
-		} = getPronouns(V.slaves[1]).appendSuffix("2");
-		r.push(`${V.slaves[0].slaveName} leads ${him} out into the arcology's largest atrium, forces ${him} to`);
-		if (hasBothLegs(slave)) {
-			r.push(`${his} knees`);
-		} else {
-			r.push(`the ground`);
+		function serveSlaves() {
+			const frag = new DocumentFragment();
+			let r = [];
+			const {
+				his2, him2,
+			} = getPronouns(V.slaves[1]).appendSuffix("2");
+			r.push(`${V.slaves[0].slaveName} leads ${him} out into the arcology's largest atrium, forces ${him} to`);
+			if (hasBothLegs(slave)) {
+				r.push(`${his} knees`);
+			} else {
+				r.push(`the ground`);
+			}
+			r.push(`, and, in full view of the whole arcology, orally rapes someone who was until this week a slaveowner ${himself}. Behind them, ${V.slaves[1].slaveName} is standing ready for ${his2} turn, and all your other slaves stand behind ${him2}. Public opinion is divided; the precedent is universally agreed to be bad, but the punishment is generally thought to be terrible and deserved. Your slaves, however, are almost insufferably <span class="hotpink">pleased with you</span> for forcing slave.slaveName, whom they still view as a slaveowner, to pleasure them.`);
+			slave.counter.oral += V.slaves.length * 2;
+			V.oralTotal += V.slaves.length * 2;
+			V.slaves.forEach(function(s) { s.devotion += 10; });
+			V.rivalID = 0;
+			App.Events.addParagraph(frag, r);
+			return frag;
 		}
-		r.push(`, and, in full view of the whole arcology, orally rapes someone who was until this week a slaveowner ${himself}. Behind them, ${V.slaves[1].slaveName} is standing ready for ${his2} turn, and all your other slaves stand behind ${him2}. Public opinion is divided; the precedent is universally agreed to be bad, but the punishment is generally thought to be terrible and deserved. Your slaves, however, are almost insufferably <span class="hotpink">pleased with you</span> for forcing slave.slaveName, whom they still view as a slaveowner, to pleasure them.`);
-		slave.counter.oral += V.slaves.length * 2;
-		V.oralTotal += V.slaves.length * 2;
-		V.slaves.forEach(function(s) { s.devotion += 10; });
-		V.rivalID = 0;
-		App.Events.addParagraph(frag, r);
-		return frag;
-	}
 
-	function breakAss() {
-		const frag = new DocumentFragment();
-		let r = [];
-		r.push(`${slave.slaveName}, who has been fairly dignified up to this point, breaks down when ${he}'s placed in stocks with ${his} ass in the air. ${His} sobs become screams when, for the first time in ${his} life, ${he} feels the burning sensation of a well-lubricated`);
-		if (V.PC.dick !== 0) {
-			r.push(`cockhead`);
-		} else {
-			r.push(`strap-on`);
+		function breakAss() {
+			const frag = new DocumentFragment();
+			let r = [];
+			r.push(`${slave.slaveName}, who has been fairly dignified up to this point, breaks down when ${he}'s placed in stocks with ${his} ass in the air. ${His} sobs become screams when, for the first time in ${his} life, ${he} feels the burning sensation of a well-lubricated`);
+			if (V.PC.dick !== 0) {
+				r.push(`cockhead`);
+			} else {
+				r.push(`strap-on`);
+			}
+			r.push(`forcing its way past ${his} virgin sphincter. Raping a virgin anus is not a new pleasure for you, but the usual shrieking, struggling and spasming is all the sweeter this time. <span class="green">Half the arcology</span> has used ${his} <span class="health.dec">poor injured butthole</span> by the end of the day; ${he} <span class="gold">is learning to fear you,</span> and hates you <span class="mediumorchid">even more</span> if possible.`);
+			slave.devotion -= 4;
+			slave.trust -= 5;
+			slave.anus = 3;
+			seX(slave, "anal", "public", "penetrative", 47);
+			repX(2500, "event", slave);
+			healthDamage(slave, 10);
+			V.rivalID = 0;
+			App.Events.addParagraph(frag, r);
+			return frag;
 		}
-		r.push(`forcing its way past ${his} virgin sphincter. Raping a virgin anus is not a new pleasure for you, but the usual shrieking, struggling and spasming is all the sweeter this time. <span class="green">Half the arcology</span> has used ${his} <span class="health.dec">poor injured butthole</span> by the end of the day; ${he} <span class="gold">is learning to fear you,</span> and hates you <span class="mediumorchid">even more</span> if possible.`);
-		slave.devotion -= 4;
-		slave.trust -= 5;
-		slave.anus = 3;
-		seX(slave, "anal", "public", "penetrative", 47);
-		repX(2500, "event", slave);
-		healthDamage(slave, 10);
-		V.rivalID = 0;
-		App.Events.addParagraph(frag, r);
-		return frag;
-	}
 
-	function geld() {
-		slave.devotion -= 50;
-		slave.trust -= 50;
-		slave.balls = 0;
-		repX(2500, "event", slave);
-		healthDamage(slave, 10);
-		V.rivalID = 0;
-		return `You announce that since ${slave.slaveName} has spent so much money and effort turning ${himself} into a girl with expensive hormones, you'll take a lower-tech step to bring ${him} further in that regard. An autosurgery is set up in public and the populace is treated to the edifying spectacle of a very large pair of testicles being efficiently removed by the modern surgical art. Unusually, ${he} was not given general anesthesia, but instead given local painkillers and made to watch on a monitor, to ${his} <span class="gold">rage</span> and <span class="mediumorchid">horror.</span> There is <span class="green">applause</span> as the cauterizer seals the surgical site where ${his} massive scrotum used to hang. ${His} cock looks softer already.`;
-	}
+		function geld() {
+			slave.devotion -= 50;
+			slave.trust -= 50;
+			slave.balls = 0;
+			repX(2500, "event", slave);
+			healthDamage(slave, 10);
+			V.rivalID = 0;
+			return `You announce that since ${slave.slaveName} has spent so much money and effort turning ${himself} into a girl with expensive hormones, you'll take a lower-tech step to bring ${him} further in that regard. An autosurgery is set up in public and the populace is treated to the edifying spectacle of a very large pair of testicles being efficiently removed by the modern surgical art. Unusually, ${he} was not given general anesthesia, but instead given local painkillers and made to watch on a monitor, to ${his} <span class="gold">rage</span> and <span class="mediumorchid">horror.</span> There is <span class="green">applause</span> as the cauterizer seals the surgical site where ${his} massive scrotum used to hang. ${His} cock looks softer already.`;
+		}
 
-	function publicImpreg() {
-		seX(slave, "vaginal", "public", "penetrative", 47);
-		slave.preg = 1;
-		slave.pregSource = -2;
-		slave.pregKnown = 1;
-		slave.pregWeek = 1;
-		slave.devotion -= 15;
-		slave.pregType = setPregType(slave);
-		WombImpregnate(slave, slave.pregType, -2, 1);
-		slave.vagina = 3;
-		repX(2500, "event", slave);
-		V.rivalID = 0;
-		return `You announce that since ${slave.slaveName} damaged the arcology, ${he} will be taking a leading role in the reconstruction. ${He} will be doing this by replacing one of the residents killed in the violence — by bearing a new slave, to be conceived collectively. The shame and <span class="mediumorchid">horror</span> of ${his} future as breeding stock comes home to ${him} as ${he}'s restrained in a chair with ${his} legs spread. Soon, the stream of fluids is running down ${his} <span class="lime">thoroughly-fucked pussy</span> and over ${his} anus to pool on the floor beneath ${him}. Modern medical imaging reveals ${his} fertile ovum's last, losing battle against a legion of sperm in real time, and the images are projected on large screens.`;
+		function publicImpreg() {
+			seX(slave, "vaginal", "public", "penetrative", 47);
+			slave.preg = 1;
+			slave.pregSource = -2;
+			slave.pregKnown = 1;
+			slave.pregWeek = 1;
+			slave.devotion -= 15;
+			slave.pregType = setPregType(slave);
+			WombImpregnate(slave, slave.pregType, -2, 1);
+			slave.vagina = 3;
+			repX(2500, "event", slave);
+			V.rivalID = 0;
+			return `You announce that since ${slave.slaveName} damaged the arcology, ${he} will be taking a leading role in the reconstruction. ${He} will be doing this by replacing one of the residents killed in the violence — by bearing a new slave, to be conceived collectively. The shame and <span class="mediumorchid">horror</span> of ${his} future as breeding stock comes home to ${him} as ${he}'s restrained in a chair with ${his} legs spread. Soon, the stream of fluids is running down ${his} <span class="lime">thoroughly-fucked pussy</span> and over ${his} anus to pool on the floor beneath ${him}. Modern medical imaging reveals ${his} fertile ovum's last, losing battle against a legion of sperm in real time, and the images are projected on large screens.`;
+		}
 	}
 };
-- 
GitLab


From 937b4061b15c1aaa5b0d5f8952abce92566fb2d6 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 11 Jul 2021 23:18:37 -0400
Subject: [PATCH 11/13] fix

---
 src/005-passages/eventsPassages.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/005-passages/eventsPassages.js b/src/005-passages/eventsPassages.js
index b1537407888..6bc374dc415 100644
--- a/src/005-passages/eventsPassages.js
+++ b/src/005-passages/eventsPassages.js
@@ -83,7 +83,8 @@ new App.DomPassage("P hostage acquisition",
 new App.DomPassage("P rival initiation",
 	() => {
 		const node = new DocumentFragment();
-		return new App.Events.PRivalInitiation().execute(node);
+		new App.Events.PRivalInitiation().execute(node);
+		return node;
 	}
 );
 
-- 
GitLab


From 7f53cc4b036c4a79c9ae64e312d8c207dabe169f Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 11 Jul 2021 23:25:17 -0400
Subject: [PATCH 12/13] many punc fixes from regex

---
 .../Catmod/events/nonRandom/bodypuristprotest.js |  6 +-----
 .../Catmod/events/nonRandom/bodypuristriot.js    |  6 +-----
 src/Mods/SecExp/events/attackReport.js           | 10 +++++-----
 src/descriptions/officeDescription.js            |  5 +----
 src/events/RE/reMaleArcologyOwner.js             |  2 +-
 src/events/gameover.js                           |  6 +-----
 src/events/nonRandom/mercs/pSlaveMedic.js        | 12 ++++++------
 src/events/nonRandom/rival/pRivalInitiation.js   | 12 ++++++------
 .../bodyModification/bodyModification.js         |  9 +++++----
 .../aztec/slaveSacrificePenance.js               | 16 +++-------------
 src/npc/interaction/fFeelings.js                 |  1 -
 src/npc/interaction/fNippleFuck.js               | 12 ++++--------
 src/npc/interaction/fVagina.js                   |  6 +-----
 src/npc/interaction/fondleBoobs.js               |  6 +-----
 src/npc/interaction/fondleVagina.js              |  6 +-----
 15 files changed, 37 insertions(+), 78 deletions(-)

diff --git a/src/Mods/Catmod/events/nonRandom/bodypuristprotest.js b/src/Mods/Catmod/events/nonRandom/bodypuristprotest.js
index 657f0b2f6f0..c6b24b21b7f 100644
--- a/src/Mods/Catmod/events/nonRandom/bodypuristprotest.js
+++ b/src/Mods/Catmod/events/nonRandom/bodypuristprotest.js
@@ -25,11 +25,7 @@ App.Events.SEBodyPuristProtest = class SEBodyPuristProtest extends App.Events.Ba
 		}
 
 
-		r.push(`You awake in the morning to the sound of yelling and screaming outside your penthouse. Quickly getting dressed, you grab your handgun`);
-		if (S.Bodyguard) {
-			r.push(`, order your bodyguard to follow behind you,`);
-		}
-		r.push(`and rush outside to find the source of the commotion. As you open the doors to the penthouse, you're greeted with the sight of`);
+		r.push(`You awake in the morning to the sound of yelling and screaming outside your penthouse. Quickly getting dressed, you grab your handgun${(S.Bodyguard) ? ", order your bodyguard to follow behind you," : ""} and rush outside to find the source of the commotion. As you open the doors to the penthouse, you're greeted with the sight of`);
 		if (V.arcologies[0].FSBodyPurist !== "unset") {
 			r.push(`a massive, angry mob holding up signs reading "TRAITOR" and "VERMIN-LOVER", along with emblems of Vitruvian men. You can see what appears to be an effigy of a catgirl burning in the back, and the huge crowd appears to have completely surrounded the penthouse.`);
 		}
diff --git a/src/Mods/Catmod/events/nonRandom/bodypuristriot.js b/src/Mods/Catmod/events/nonRandom/bodypuristriot.js
index f588da8f38f..49fb75e92ea 100644
--- a/src/Mods/Catmod/events/nonRandom/bodypuristriot.js
+++ b/src/Mods/Catmod/events/nonRandom/bodypuristriot.js
@@ -24,11 +24,7 @@ App.Events.SEBodyPuristRiot = class SEBodyPuristRiot extends App.Events.BaseEven
 			V.arcologies[0].prosperity -= 1;
 		}
 
-		r.push(`You awake in the morning to the sound of yelling and screaming outside your penthouse. Quickly getting dressed, you grab your handgun`);
-		if (S.Bodyguard) {
-			r.push(`, order your bodyguard to follow behind you,`);
-		}
-		r.push(`and rush outside to find the source of the commotion. As you open the doors to the penthouse, you're greeted with the sight of`);
+		r.push(`You awake in the morning to the sound of yelling and screaming outside your penthouse. Quickly getting dressed, you grab your handgun${(S.Bodyguard) ? ", order your bodyguard to follow behind you," : ""} and rush outside to find the source of the commotion. As you open the doors to the penthouse, you're greeted with the sight of`);
 		if (V.arcologies[0].FSBodyPurist !== "unset") {
 			r.push(`an enormous, heavily armed mob surrounding you. The sea of shouting, furious faces looks to have completely encircled the penthouse, and almost all of them are holding batons, rifles, and whatever else they seem to have been able to get their hands on. Some are even holding up signs bearing the orange sun logo of the Sons of Sekhmet.`);
 		}
diff --git a/src/Mods/SecExp/events/attackReport.js b/src/Mods/SecExp/events/attackReport.js
index 3b7cd8806c5..7cd063e3443 100644
--- a/src/Mods/SecExp/events/attackReport.js
+++ b/src/Mods/SecExp/events/attackReport.js
@@ -113,16 +113,16 @@ App.Events.attackReport = function() {
 
 	r.push(`Today, ${asDateString(V.week, random(0, 7))}, our arcology was attacked by`);
 	if (V.SecExp.war.attacker.type === "raiders") {
-		r.push(`a band of wild raiders`);
+		r.push(`a band of wild raiders,`);
 	} else if (V.SecExp.war.attacker.type === "free city") {
-		r.push(`a contingent of mercenaries hired by a competing free city`);
+		r.push(`a contingent of mercenaries hired by a competing free city,`);
 	} else if (V.SecExp.war.attacker.type === "freedom fighters") {
-		r.push(`a group of freedom fighters bent on the destruction of the institution of slavery`);
+		r.push(`a group of freedom fighters bent on the destruction of the institution of slavery,`);
 	} else if (V.SecExp.war.attacker.type === "old world") {
-		r.push(`an old world nation boasting a misplaced sense of superiority`);
+		r.push(`an old world nation boasting a misplaced sense of superiority,`);
 	}
 
-	r.push(`, ${num(Math.trunc(V.SecExp.war.attacker.troops))} men strong.`);
+	r.push(`${num(Math.trunc(V.SecExp.war.attacker.troops))} men strong.`);
 	if (V.SecExp.war.result !== 1 && V.SecExp.war.result !== 0 && V.SecExp.war.result !== -1) {
 		r.push(`Our defense forces, ${num(Math.trunc(App.SecExp.battle.troopCount()))} strong, clashed with them`);
 		if (V.SecExp.war.terrain === "urban") {
diff --git a/src/descriptions/officeDescription.js b/src/descriptions/officeDescription.js
index 2fec237146f..eab54f8f23f 100644
--- a/src/descriptions/officeDescription.js
+++ b/src/descriptions/officeDescription.js
@@ -184,10 +184,7 @@ App.Desc.officeDescription = function(lastElement) {
 					} else if ((random(1, 2) === 1) && (modeledSlave.skill.oral >= 100)) {
 						r.push(`${he}'s on ${his} `);
 						if (hasAnyLegs(modeledSlave)) {
-							r.push(`${his} knee`);
-							if (hasBothLegs(modeledSlave)) {
-								r.push(`s`);
-							}
+							r.push(`${his} ${hasBothLegs(modeledSlave) ? "knees" : "knee"}`);
 						} else {
 							r.push(`the ground`);
 						}
diff --git a/src/events/RE/reMaleArcologyOwner.js b/src/events/RE/reMaleArcologyOwner.js
index e079dc37e09..3eda2d673b0 100644
--- a/src/events/RE/reMaleArcologyOwner.js
+++ b/src/events/RE/reMaleArcologyOwner.js
@@ -147,7 +147,7 @@ App.Events.REMaleArcologyOwner = class REMaleArcologyOwner extends App.Events.Ba
 						} else { // 0 and fallback
 							r.push(`${V.PC.refreshment},`);
 						}
-						r.push(`, consoling yourself that you are not exactly starved for company.`);
+						r.push(`consoling yourself that you are not exactly starved for company.`);
 					} else {
 						r.push(`After a few minutes, it becomes clear that something else is on his mind than renewable energy and he politely excuses himself, though not before dropping something into your cleavage. The women watches dejectedly as you fish out his business card. Taking the hint, you scan the room and find him slowly leaving once he makes eye contact; a clear invitation to follow him. As you wander down the hall, you feel a hand cup one of your firm globes and pull you into an embrace. While he seems content to just grope you, you had other plans and begin undoing his belt. You gasp a little as his member pops out into your hands, eager for some attention of its own. He wastes no time in pulling your ample bust downwards and slipping his eager cock between your breasts. You grab his hips for support as he vigorously pistons into your chest, struggling to retake control of the situation before he renders you unable to return to the party. With a joyous groan, he blows his load deep into your bosom and down your dress. As he helps you to your feet, and the stain under your rack grows larger, you give him a kiss on the cheek and head off to change. He returns to the party, and from what your serving slaves tell you later, seems to have boasted about how well you do business. <span class="reputation inc">Your reputation has slightly improved,</span> though nowhere near as much as his.`);
 						repX(100, "event");
diff --git a/src/events/gameover.js b/src/events/gameover.js
index f47db0159fd..e98f0558385 100644
--- a/src/events/gameover.js
+++ b/src/events/gameover.js
@@ -86,11 +86,7 @@ App.Events.Gameover = function() {
 			r.push(`Again and again, you keep bearing down. As you grow more exhausted and are no closer to giving birth, you let out a feeble cry for help.`);
 			App.Events.addParagraph(node, r);
 			r = [];
-			r.push(`Some of your slaves rush to your aid, but they don't know what to do; they helplessly watch as you slowly fade away. If only you had someone you could rely on at your side, perhaps this could have been avoided. At last, the medics arrive at ${V.assistant.name}'s order, but it is too late to save you or your child`);
-			if (V.PC.pregType > 1) {
-				r.push(`ren`);
-			}
-			r.push(`.`);
+			r.push(`Some of your slaves rush to your aid, but they don't know what to do; they helplessly watch as you slowly fade away. If only you had someone you could rely on at your side, perhaps this could have been avoided. At last, the medics arrive at ${V.assistant.name}'s order, but it is too late to save you or your ${(V.PC.pregType > 1) ? "children" : "child"}.`);
 			break;
 		case "ownership":
 			r.push(`Since you no longer possess a controlling interest in an arcology, your time of influence and power in the Free Cities is over. You remain wealthy, and your life after the part of it worth telling is not something worth regretting. A retirement full of decadence awaits you.`);
diff --git a/src/events/nonRandom/mercs/pSlaveMedic.js b/src/events/nonRandom/mercs/pSlaveMedic.js
index 5ff94dceb56..eda90977f37 100644
--- a/src/events/nonRandom/mercs/pSlaveMedic.js
+++ b/src/events/nonRandom/mercs/pSlaveMedic.js
@@ -84,21 +84,21 @@ App.Events.PSlaveMedic = class PSlaveMedic extends App.Events.BaseEvent {
 		if (V.pedo_mode === 1 && V.seeDicks < 100) {
 			r.push(`You make a habit of dropping in on your mercenaries whenever you get the chance. You have regular meetings with their grizzled captain, of course, but turning up unannounced to get to know them is simply a matter of self-preservation. The better they like you, the more likely they are to think of more than their pay when deciding how to hazard themselves on your behalf. When you enter the lounge of their`);
 			if (V.barracks) {
-				r.push(`barracks`);
+				r.push(`barracks,`);
 			} else {
-				r.push(`main living area`);
+				r.push(`main living area,`);
 			}
-			r.push(`, you see ${slave.slaveName} kneeling next to a mercenary with most of his armor stripped off. ${He}'s the ${aNational(slave.nationality)} nurse they captured and enslaved, and ${he} seems to be doing pretty well in ${his} new life. ${He} seems to be checking the sutures on a minor wound to the man's flank. "Don't squirm!" ${he} says with an annoyed tone. "I'll get you off when I've checked this." He chuckles and holds still; ${he} redresses the wound, stands up, and strips off ${his} tank top, allowing ${his} huge tits to swing free. ${He}'s quite young, but ${his} _slave.skin body is appealingly curvy. As ${he} swings one leg across the seated mercenary, ${he} continues, "Please sit still and let me do the work. You need to take it easy for a day or two or you'll pop those sutures." Using ${his} hands, ${he} gently caresses his stiff prick with ${his} pillowy breasts, eliciting a grunt. ${He}'s a strong ${girl}, and pleasures him without letting any of ${his} weight rest on his body at all. When he climaxes, ${he} leans in to clean him with ${his} mouth and then heads off to wash out ${his} cleavage.`);
+			r.push(`you see ${slave.slaveName} kneeling next to a mercenary with most of his armor stripped off. ${He}'s the ${aNational(slave.nationality)} nurse they captured and enslaved, and ${he} seems to be doing pretty well in ${his} new life. ${He} seems to be checking the sutures on a minor wound to the man's flank. "Don't squirm!" ${he} says with an annoyed tone. "I'll get you off when I've checked this." He chuckles and holds still; ${he} redresses the wound, stands up, and strips off ${his} tank top, allowing ${his} huge tits to swing free. ${He}'s quite young, but ${his} _slave.skin body is appealingly curvy. As ${he} swings one leg across the seated mercenary, ${he} continues, "Please sit still and let me do the work. You need to take it easy for a day or two or you'll pop those sutures." Using ${his} hands, ${he} gently caresses his stiff prick with ${his} pillowy breasts, eliciting a grunt. ${He}'s a strong ${girl}, and pleasures him without letting any of ${his} weight rest on his body at all. When he climaxes, ${he} leans in to clean him with ${his} mouth and then heads off to wash out ${his} cleavage.`);
 		} else {
 			r.push(`You make a habit of dropping in on your mercenaries whenever you get the chance. You have regular meetings with their grizzled captain, of course, but turning up unannounced to get to know them is simply a matter of self-preservation. The better they like you, the more likely they are to think of more than their pay when deciding how to hazard themselves on your behalf.`);
 
 			r.push(`When you enter the lounge of their`);
 			if (V.barracks) {
-				r.push(`barracks`);
+				r.push(`barracks,`);
 			} else {
-				r.push(`main living area`);
+				r.push(`main living area,`);
 			}
-			r.push(`, you see ${slave.slaveName} bending over a mercenary with most of his armor stripped off. ${He}'s the ${aNational(slave.nationality)} nurse they captured and enslaved, and ${he} seems to be doing pretty well in ${his} new life. ${He} seems to be checking the sutures on a minor wound to the man's flank. "Don't  squirm," ${he} says quietly. "I'll get you off when I've checked this." He chuckles and holds still; ${he} redresses the wound, stands up, and strips off ${his} fatigue pants.`);
+			r.push(`you see ${slave.slaveName} bending over a mercenary with most of his armor stripped off. ${He}'s the ${aNational(slave.nationality)} nurse they captured and enslaved, and ${he} seems to be doing pretty well in ${his} new life. ${He} seems to be checking the sutures on a minor wound to the man's flank. "Don't  squirm," ${he} says quietly. "I'll get you off when I've checked this." He chuckles and holds still; ${he} redresses the wound, stands up, and strips off ${his} fatigue pants.`);
 			if (V.pedo_mode === 1) {
 				r.push(`${He}'s quite youthful, nimble and knows just how to manage ${his} impressive asset without it touching ${his} charge.`);
 			} else {
diff --git a/src/events/nonRandom/rival/pRivalInitiation.js b/src/events/nonRandom/rival/pRivalInitiation.js
index 83956e54c58..3c405e8756e 100644
--- a/src/events/nonRandom/rival/pRivalInitiation.js
+++ b/src/events/nonRandom/rival/pRivalInitiation.js
@@ -49,11 +49,11 @@ App.Events.PRivalInitiation = class PRivalInitiation extends App.Events.BaseEven
 			let r = [];
 			r.push(`Though ${he} hates you with all ${his} heart, ${he} knows better than most what happens to slaves who disobey. So, when you describe your public relations plans to ${him}, ${he} promises to obey before you even get to the threats. ${He} finds ${himself} accompanying you to the arcology's finest establishment in a lovely evening dress. The two of you share an understandably quiet meal, with a growing crowd coming to leer at the defeated slaveowner-cum-slave. At a prearranged signal from you, ${he} stands, quickly strips naked, gets down on`);
 			if (hasBothLegs(slave)) {
-				r.push(`${his} knees`);
+				r.push(`${his} knees,`);
 			} else {
-				r.push(`the ground`);
+				r.push(`the ground,`);
 			}
-			r.push(`, and`);
+			r.push(`and`);
 			if (V.PC.dick !== 0) {
 				r.push(`sucks you off`);
 				if (V.PC.vagina !== -1) {
@@ -84,11 +84,11 @@ App.Events.PRivalInitiation = class PRivalInitiation extends App.Events.BaseEven
 			} = getPronouns(V.slaves[1]).appendSuffix("2");
 			r.push(`${V.slaves[0].slaveName} leads ${him} out into the arcology's largest atrium, forces ${him} to`);
 			if (hasBothLegs(slave)) {
-				r.push(`${his} knees`);
+				r.push(`${his} knees,`);
 			} else {
-				r.push(`the ground`);
+				r.push(`the ground,`);
 			}
-			r.push(`, and, in full view of the whole arcology, orally rapes someone who was until this week a slaveowner ${himself}. Behind them, ${V.slaves[1].slaveName} is standing ready for ${his2} turn, and all your other slaves stand behind ${him2}. Public opinion is divided; the precedent is universally agreed to be bad, but the punishment is generally thought to be terrible and deserved. Your slaves, however, are almost insufferably <span class="hotpink">pleased with you</span> for forcing slave.slaveName, whom they still view as a slaveowner, to pleasure them.`);
+			r.push(`and, in full view of the whole arcology, orally rapes someone who was until this week a slaveowner ${himself}. Behind them, ${V.slaves[1].slaveName} is standing ready for ${his2} turn, and all your other slaves stand behind ${him2}. Public opinion is divided; the precedent is universally agreed to be bad, but the punishment is generally thought to be terrible and deserved. Your slaves, however, are almost insufferably <span class="hotpink">pleased with you</span> for forcing slave.slaveName, whom they still view as a slaveowner, to pleasure them.`);
 			slave.counter.oral += V.slaves.length * 2;
 			V.oralTotal += V.slaves.length * 2;
 			V.slaves.forEach(function(s) { s.devotion += 10; });
diff --git a/src/facilities/bodyModification/bodyModification.js b/src/facilities/bodyModification/bodyModification.js
index a06dd16588a..673b6b1a184 100644
--- a/src/facilities/bodyModification/bodyModification.js
+++ b/src/facilities/bodyModification/bodyModification.js
@@ -80,17 +80,18 @@ App.UI.bodyModification = function(slave, cheat = false) {
 							}
 							break;
 						default:
-							r.push(`The best way to apply scarring to the entire body is with a good old fashioned whip. ${His} body is a mess of crisscrossed lines`);
+							r.push(`The best way to apply scarring to the entire body is with a good old fashioned whip. ${His} body is a mess of crisscrossed `);
 							if (hasAnyNaturalLimbs(slave)) {
-								r.push(`, and ${his} `);
+								r.push(`lines, and ${his} `);
 								if (getLimbCount(slave, piercingLevel) > 1) {
 									r.push(`limbs twisted so violently in their restraints that they too have`);
 								} else {
 									r.push(`only limb twists so violently in its restraints that it too has`);
 								}
-								r.push(` become scarred`);
+								r.push(`become scarred.`);
+							} else {
+								r.push(`lines.`);
 							}
-							r.push(r.pop() + ".");
 					}
 					r.push(`No matter how you chose to apply it, scarring so much of ${his} body has <span class="health dec"> hurt ${his} health.</span>`);
 					healthDamage(slave, 20);
diff --git a/src/futureSocieties/aztec/slaveSacrificePenance.js b/src/futureSocieties/aztec/slaveSacrificePenance.js
index 0cd5b87b23a..260c06e7b84 100644
--- a/src/futureSocieties/aztec/slaveSacrificePenance.js
+++ b/src/futureSocieties/aztec/slaveSacrificePenance.js
@@ -295,10 +295,7 @@ App.UI.SlaveInteract.aztecSlaveSacrificePenance = function(sacrifice) {
 			} else if (sacrifice.fetish === "cumslut") {
 				r.push(`${He} can be seen frequently crying and desperately fighting the excruciating need to touch ${himself}. As a result of the aphrodisiacs, the paint on ${his}`);
 				if (hasAnyLegs(sacrifice)) {
-					r.push(`inner thigh`);
-					if (hasBothLegs(sacrifice)) {
-						r.push(`s`);
-					}
+					r.push(`inner ${hasBothLegs(sacrifice) ? "thighs" : "thigh"}`);
 				} else {
 					r.push(`crotch`);
 				}
@@ -352,11 +349,7 @@ App.UI.SlaveInteract.aztecSlaveSacrificePenance = function(sacrifice) {
 			if (sacrifice.fetish === "submissive") {
 				r.push(`${He} makes sure is ready to take any order ${he} might be given, and it's evident that ${he} enjoys it every time ${he} is ordered to do something. As the week progresses ${he} finds ${himself} close to the limits of ${his} submission. As much as ${he} tries to`);
 				if (hasAnyArms(sacrifice)) {
-					r.push(`keep ${his} hand`);
-					if (hasBothArms(sacrifice)) {
-						r.push(`s`);
-					}
-					r.push(`to ${himself},`);
+					r.push(`keep ${his} ${hasBothArms(sacrifice) ? "hands" : "hand"} to ${himself},`);
 				} else {
 					r.push(`stay calm,`);
 				}
@@ -409,10 +402,7 @@ App.UI.SlaveInteract.aztecSlaveSacrificePenance = function(sacrifice) {
 				}
 				r.push(`seems constantly wet and dripping into the cage which ${he} seems to enjoy. As ${his} whining and tears increases so do the spasms, a direct result of ${his} need to cum. The loincloth ${he} is wearing has to be constantly changed and ${his}`);
 				if (hasAnyLegs(sacrifice)) {
-					r.push(`leg`);
-					if (hasBothLegs(sacrifice)) {
-						r.push(`s`);
-					}
+					r.push(hasBothLegs(sacrifice) ? "legs" : "leg");
 				} else {
 					r.push(`lower body`);
 				}
diff --git a/src/npc/interaction/fFeelings.js b/src/npc/interaction/fFeelings.js
index b6ba3c6ba4e..2b056fa0cf7 100644
--- a/src/npc/interaction/fFeelings.js
+++ b/src/npc/interaction/fFeelings.js
@@ -146,7 +146,6 @@ App.Interact.feelings = function(slave) {
 				r.push(`voice.`);
 			}
 		}
-		r.push(` `);
 		App.Events.addNode(el, r, "span");
 
 		// Begin block of mostly "Spoken()".
diff --git a/src/npc/interaction/fNippleFuck.js b/src/npc/interaction/fNippleFuck.js
index 4559f648a89..6dea0848d81 100644
--- a/src/npc/interaction/fNippleFuck.js
+++ b/src/npc/interaction/fNippleFuck.js
@@ -54,11 +54,11 @@ App.Interact.fNippleFuck = function(slave) {
 		if (hasAnyArms(slave)) {
 			r.push(`gropes ${his} breasts with`);
 			if (hasBothArms(slave)) {
-				r.push(`both hands`);
+				r.push(`both hands,`);
 			} else {
-				r.push(`${his} hand`);
+				r.push(`${his} hand,`);
 			}
-			r.push(`, fingering ${his} unoccupied nipple in time with your thrusts.`);
+			r.push(`fingering ${his} unoccupied nipple in time with your thrusts.`);
 		} else {
 			r.push(`savors the sensations running through ${his} breast.`);
 		}
@@ -80,11 +80,7 @@ App.Interact.fNippleFuck = function(slave) {
 	if (slave.fetish === "boobs" && slave.fetishKnown === 1) {
 		r.push(`As ${he} reaches ${his} climax, ${his} eyes roll back into ${his} head and ${he} quivers in delight at the intense breastgasm ${he} just sustained.`);
 	} else if (slave.devotion > 20 || slave.trust > 20) {
-		r.push(`Eager for release, ${his} moaning grows louder and higher in pitch`);
-		if (hasAnyArms(slave)) {
-			r.push(`, and ${his} self-molesting becomes furious and desperate`);
-		}
-		r.push(`.`);
+		r.push(`Eager for release, ${his} moaning grows louder and higher in pitch${(hasAnyArms(slave)) ? `, and ${his} self-molesting becomes furious and desperate` : ""}.`);
 	} else {
 		r.push(`As ${he} reaches ${his} climax, ${his} body seems to tense and ${he} bites ${his} lip.`);
 	}
diff --git a/src/npc/interaction/fVagina.js b/src/npc/interaction/fVagina.js
index 03f5f0e7e7f..36ea4920134 100644
--- a/src/npc/interaction/fVagina.js
+++ b/src/npc/interaction/fVagina.js
@@ -558,11 +558,7 @@ App.Interact.fVagina = function(slave) {
 			} else if (slave.belly >= 300000) {
 				r.push(`You may have to spread your legs extra wide to accommodate ${his} impressive belly, but the angle and pressure it puts on you feels amazing. ${He}`);
 				if (hasAnyArms(slave)) {
-					r.push(`puts ${his} hand`);
-					if (hasBothArms(slave)) {
-						r.push(`s`);
-					}
-					r.push(`on your chest and`);
+					r.push(`puts ${his} ${(hasBothArms(slave)) ? "hands" : "hand"} on your chest and`);
 				}
 				r.push(`starts to lean back as you continue to thrust`);
 				if (fSpeed > 75) {
diff --git a/src/npc/interaction/fondleBoobs.js b/src/npc/interaction/fondleBoobs.js
index cb63b1051d6..2fd0b948bdc 100644
--- a/src/npc/interaction/fondleBoobs.js
+++ b/src/npc/interaction/fondleBoobs.js
@@ -188,11 +188,7 @@ App.Interact.fondleBoobs = function(slave) {
 			r.push(`flat breasts,`);
 		}
 		if (hasAnyArms(slave)) {
-			r.push(`${he} places ${his} hand`);
-			if (hasBothArms(slave)) {
-				r.push(`s`);
-			}
-			r.push(`on your`);
+			r.push(`${he} places ${his} ${(hasBothArms(slave)) ? "hands" : "hand"}on your`);
 			if (V.PC.boobs >= 300) {
 				r.push(`bosom`);
 			} else if (V.PC.title === 0) {
diff --git a/src/npc/interaction/fondleVagina.js b/src/npc/interaction/fondleVagina.js
index dfbe707e48f..5f822c2d909 100644
--- a/src/npc/interaction/fondleVagina.js
+++ b/src/npc/interaction/fondleVagina.js
@@ -332,11 +332,7 @@ App.Interact.fondleVagina = function(slave) {
 			}
 			r.push(`with your outstretched fingers, strumming up and down the edges of ${his} pussylips, then softly rub your fingers along the inner walls with a tender touch, starting slow but gradually increasing the speed of your movements.`);
 			if (hasAnyArms(slave)) {
-				r.push(`${He} grabs your wrist with ${his} hand`);
-				if (hasBothArms(slave)) {
-					r.push(`s`);
-				}
-				r.push(`in an effort to stop you but ${he} is unable to stop your hand from moving for long.`);
+				r.push(`${He} grabs your wrist with ${his} ${(hasBothArms(slave)) ? "hands" : "hand"}in an effort to stop you but ${he} is unable to stop your hand from moving for long.`);
 			}
 			r.push(`You occasionally`);
 			if (slave.clit === 1) {
-- 
GitLab


From 457034b8facbf6cf14b2a2b1f07729aef7fbb5fd Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Sun, 11 Jul 2021 23:33:56 -0400
Subject: [PATCH 13/13] whitespace

---
 src/endWeek/saRecruitGirls.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/endWeek/saRecruitGirls.js b/src/endWeek/saRecruitGirls.js
index cf28b8ef4a6..8b0349b4376 100644
--- a/src/endWeek/saRecruitGirls.js
+++ b/src/endWeek/saRecruitGirls.js
@@ -577,7 +577,7 @@ App.SlaveAssignment.recruitGirls = (function() {
 						} else {
 							r.push(`challenging`);
 						}
-						r.push(` sex in public.`);
+						r.push(`sex in public.`);
 					}
 					targetArcology.FSPhysicalIdealist += influence;
 				} else if (targetArcology.FSHedonisticDecadence !== "unset") {
@@ -595,7 +595,7 @@ App.SlaveAssignment.recruitGirls = (function() {
 						} else {
 							r.push(`challenging`);
 						}
-						r.push(` sex in public.`);
+						r.push(`sex in public.`);
 					}
 					targetArcology.FSHedonisticDecadence -= influence;
 				}
-- 
GitLab