From 5d948c47a2b12cc89f58f6893472190bcde821a1 Mon Sep 17 00:00:00 2001
From: lowercasedonkey <lowercasedonkey@gmail.com>
Date: Mon, 7 Jun 2021 11:37:55 -0400
Subject: [PATCH] fix doubled event

---
 src/events/JE/jeSlaveDisputeBreedingDeal.js  |  1 +
 src/events/JE/jeSlaveDisputeIndentureDeal.js |  1 +
 src/events/JE/jeSlaveDisputeMajorityDeal.js  |  1 +
 src/events/JE/jeSlaveDisputeSlaveDeal.js     |  1 +
 src/events/JE/jeSlaveDisputeSlaveTraining.js |  1 +
 src/events/JE/jeSlaveDisputeVirginityDeal.js | 14 ++++++--------
 6 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/events/JE/jeSlaveDisputeBreedingDeal.js b/src/events/JE/jeSlaveDisputeBreedingDeal.js
index fcd65f479b0..1d747a96eb9 100644
--- a/src/events/JE/jeSlaveDisputeBreedingDeal.js
+++ b/src/events/JE/jeSlaveDisputeBreedingDeal.js
@@ -11,6 +11,7 @@ App.Events.JESlaveDisputeBreedingDeal = class JESlaveDisputeBreedingDeal extends
 
 	execute(node) {
 		let r = [];
+		V.nextLink = "RIE Eligibility Check";
 		const index = V.justiceEvents.indexOf("breeding deal");
 		V.justiceEvents.splice(index, 1);
 		const contractCost = 40000;
diff --git a/src/events/JE/jeSlaveDisputeIndentureDeal.js b/src/events/JE/jeSlaveDisputeIndentureDeal.js
index eac448bddb6..dff0e450353 100644
--- a/src/events/JE/jeSlaveDisputeIndentureDeal.js
+++ b/src/events/JE/jeSlaveDisputeIndentureDeal.js
@@ -11,6 +11,7 @@ App.Events.JESlaveDisputeIndentureDeal = class JESlaveDisputeIndentureDeal exten
 
 	execute(node) {
 		let r = [];
+		V.nextLink = "RIE Eligibility Check";
 		const index = V.justiceEvents.indexOf("indenture deal");
 		V.justiceEvents.splice(index, 1);
 
diff --git a/src/events/JE/jeSlaveDisputeMajorityDeal.js b/src/events/JE/jeSlaveDisputeMajorityDeal.js
index 29959c5894b..49056285be5 100644
--- a/src/events/JE/jeSlaveDisputeMajorityDeal.js
+++ b/src/events/JE/jeSlaveDisputeMajorityDeal.js
@@ -11,6 +11,7 @@ App.Events.JESlaveDisputeMajorityDeal = class JESlaveDisputeMajorityDeal extends
 
 	execute(node) {
 		let r = [];
+		V.nextLink = "RIE Eligibility Check";
 		const index = V.justiceEvents.indexOf("majority deal");
 		V.justiceEvents.splice(index, 1);
 		const contractCost = 20000;
diff --git a/src/events/JE/jeSlaveDisputeSlaveDeal.js b/src/events/JE/jeSlaveDisputeSlaveDeal.js
index 4406adefe85..b0015091120 100644
--- a/src/events/JE/jeSlaveDisputeSlaveDeal.js
+++ b/src/events/JE/jeSlaveDisputeSlaveDeal.js
@@ -11,6 +11,7 @@ App.Events.JESlaveDisputeSlaveDeal = class JESlaveDisputeSlaveDeal extends App.E
 
 	execute(node) {
 		let r = [];
+		V.nextLink = "RIE Eligibility Check";
 		const index = V.justiceEvents.indexOf("slave deal");
 		V.justiceEvents.splice(index, 1);
 		const contractCost = 5000;
diff --git a/src/events/JE/jeSlaveDisputeSlaveTraining.js b/src/events/JE/jeSlaveDisputeSlaveTraining.js
index 0d1f8eca107..348671b15ff 100644
--- a/src/events/JE/jeSlaveDisputeSlaveTraining.js
+++ b/src/events/JE/jeSlaveDisputeSlaveTraining.js
@@ -13,6 +13,7 @@ App.Events.JESlaveDisputeSlaveTraining = class JESlaveDisputeSlaveTraining exten
 
 	execute(node) {
 		let r = [];
+		V.nextLink = "RIE Eligibility Check";
 		const index = V.justiceEvents.indexOf("slave training");
 		V.justiceEvents.splice(index, 1);
 
diff --git a/src/events/JE/jeSlaveDisputeVirginityDeal.js b/src/events/JE/jeSlaveDisputeVirginityDeal.js
index 338cdebd297..cd39158f469 100644
--- a/src/events/JE/jeSlaveDisputeVirginityDeal.js
+++ b/src/events/JE/jeSlaveDisputeVirginityDeal.js
@@ -11,6 +11,7 @@ App.Events.JESlaveVirginityDeal = class JESlaveVirginityDeal extends App.Events.
 
 	execute(node) {
 		let r = [];
+		V.nextLink = "RIE Eligibility Check";
 		const index = V.justiceEvents.indexOf("virginity deal");
 		V.justiceEvents.splice(index, 1);
 
@@ -18,7 +19,7 @@ App.Events.JESlaveVirginityDeal = class JESlaveVirginityDeal extends App.Events.
 		const slave = GenerateNewSlave(null, {maxAge: 22, disableDisability: 1});
 		slave.origin = "You bought out a deal for ${his} sale after the seller took ${his} virginity and the buyer no longer wanted ${him}.";
 		slave.counter.publicUse += 10;
-		slave.devotion = random(25,30);
+		slave.devotion = random(25, 30);
 		slave.trust = slave.devotion-20;
 		slave.oldDevotion = slave.devotion;
 		setHealth(slave, jsRandom(0, 20));
@@ -30,10 +31,7 @@ App.Events.JESlaveVirginityDeal = class JESlaveVirginityDeal extends App.Events.
 				knockMeUp(slave, 100, 2, -2);
 			}
 		}
-		const {
-			He,
-			he, him, his, girl
-		} = getPronouns(slave);
+		const {he, him} = getPronouns(slave);
 
 		App.Events.drawEventArt(node, slave);
 		App.UI.DOM.appendNewElement("p", node, App.Events.jeCommon());
@@ -56,7 +54,7 @@ App.Events.JESlaveVirginityDeal = class JESlaveVirginityDeal extends App.Events.
 			let r = [];
 			r.push(`You privately inform both parties you'll settle this in favor of the most generous. You instantly receive two notices of escrow payment contingent on the case going the payer's way. You select the <span class="yellowgreen">bigger of the two</span> and decide the matter before returning to bed in a good mood. However, the next day it becomes apparent that although he isn't stupid enough to make a public accusation of corruption, the buyer is furious at paying virgin prices for a defiled slave, and is privately <span class="red">slandering</span> your administration of justice.`);
 			repX(-100, "event");
-			cashX(random(150,200)*10, "event");
+			cashX(random(150, 200)*10, "event");
 			App.Events.addParagraph(frag, r);
 			return frag;
 		}
@@ -65,8 +63,8 @@ App.Events.JESlaveVirginityDeal = class JESlaveVirginityDeal extends App.Events.
 			const frag = new DocumentFragment();
 			let r = [];
 			r.push(`What's most important is the justice of the outcome. You settle the dispute in favor of the buyer, who would otherwise be forced to buy something he did not mean to pay for. He lets it be known far and wide that you are willing to stand up for what's right, no matter what and no matter who, <span class="green">improving</span> your reputation. The angry seller, now afflicted with a devalued slave in addition to a bad headache, lets his group of friends know that social superiors have no advantage at justice here. They become more reticent about deal-making in your arcology, <span class="red">damaging</span> its prosperity.`);
-				V.arcologies[0].prosperity -= 5;
-				repX(2500, "event");
+			V.arcologies[0].prosperity -= 5;
+			repX(2500, "event");
 			App.Events.addParagraph(frag, r);
 			return frag;
 		}
-- 
GitLab