From e973bd8e641f9aa1d1f92e00e59dc08e4a6ccf76 Mon Sep 17 00:00:00 2001
From: Skriv <skrivelese@gmail.com>
Date: Sat, 17 Jul 2021 18:20:52 +0000
Subject: [PATCH] Refs fixes and improvements

---
 css/general/textColors.css                              | 2 +-
 src/events/REFS/refsDeadBaron.js                        | 4 ++--
 src/events/REFS/refsKnightlyDuel.js                     | 7 ++++---
 src/events/REFS/refsMaturityPreferentialistEncounter.js | 4 ++--
 src/events/REFS/refsPastoralistEncounter.js             | 2 +-
 src/events/REFS/refsPhysicalIdealistEncounter.js        | 2 +-
 src/events/REFS/refsTransformationFetishismEncounter.js | 6 +++---
 src/events/REFS/refsWarhound.js                         | 2 +-
 src/events/REFS/refsYouthPreferentialistEncounter.js    | 4 ++--
 9 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/css/general/textColors.css b/css/general/textColors.css
index 5615ce5c6f0..e62cc62de45 100644
--- a/css/general/textColors.css
+++ b/css/general/textColors.css
@@ -151,7 +151,7 @@
 /* note: .error is for unexpected behavior, .warning for player feedback */
 .red, .red a, .health.dec, .health.dec a, .cash.dec, .cash.dec a, .stat.drop, .stat.drop a, .flaw, .flaw a, .flaw.gain, .flaw.gain a,
 .mindbreak, .mindbreak a, .error, .error a, .elites.loss, .elites.loss a, .reputation.dec, .reputation.dec a,
-.warning, .warning a {
+.warning, .warning a, .prosperity.dec {
     color: red
 }
 
diff --git a/src/events/REFS/refsDeadBaron.js b/src/events/REFS/refsDeadBaron.js
index ccaf489a840..04628e88436 100644
--- a/src/events/REFS/refsDeadBaron.js
+++ b/src/events/REFS/refsDeadBaron.js
@@ -21,7 +21,7 @@ App.Events.refsDeadBaron = class refsDeadBaron extends App.Events.BaseEvent {
 
 		function son() {
 			repX(500, "event");
-			return `You announce with minimal fanfare that the firstborn son of the Baron will be assuming the title, as expected. The announcement is met without surprise, but with some disappointment by powerhungry lesser elites who thought the death of the Baron might have given them a chance at taking the title for themselves. The smug-looking lordling takes his father's band with a smile, and says that his family <span class="green">appreciates</span> you sticking to tradition and rewarding their family's loyalty.`;
+			return `You announce with minimal fanfare that the firstborn son of the Baron will be assuming the title, as expected. The announcement is met without surprise, but with some disappointment by powerhungry lesser elites who thought the death of the Baron might have given them a chance at taking the title for themselves. The smug-looking lordling takes his father's band with a smile, and says that his family <span class="reputation inc">appreciates</span> you sticking to tradition and rewarding their family's loyalty.`;
 		}
 
 		function executive() {
@@ -29,7 +29,7 @@ App.Events.refsDeadBaron = class refsDeadBaron extends App.Events.BaseEvent {
 			V.arcologies[0].prosperity -= 1;
 			cashX(-2000, "Costs of Administrative Change");
 			repX(-2000, "event");
-			return `You select one of your loyal executives, an ultra-wealthy trader within the arcology who made a fortune in the sale of human bodies, for the new Barony. The man, a portly and unintimidating man that hides a razor-sharp mind behind his fat and an expensive suit, smiles full of teeth as you announce your decision to a waiting crowd of elites. After you go through the formalities and hand him the golden band that'll represent his symbol of office, he shakes your hand vigorously, still smiling devilishly. The furious baronets, robbed of their title, do their best to obstruct the ceremony, and the decision to take the title from their family causes <span class="red">fear and concern</span> amongst Barons now insecure of their family's future. The next day, the newly-appointed Baron sends you a platter of expensive gifts and foreign candies, complimented with a <span class="green">massive direct deposit to your bank account.</span> You can't help but feel that such a crafty fox might use his new power to <span class="red">corner the market</span> in his barony, though.`;
+			return `You select one of your loyal executives, an ultra-wealthy trader within the arcology who made a fortune in the sale of human bodies, for the new Barony. The man, a portly and unintimidating man that hides a razor-sharp mind behind his fat and an expensive suit, smiles full of teeth as you announce your decision to a waiting crowd of elites. After you go through the formalities and hand him the golden band that'll represent his symbol of office, he shakes your hand vigorously, still smiling devilishly. The furious baronets, robbed of their title, do their best to obstruct the ceremony, and the decision to take the title from their family causes <span class="reputation dec">fear and concern</span> amongst Barons now insecure of their family's future. The next day, the newly-appointed Baron sends you a platter of expensive gifts and foreign candies, complimented with a <span class="cash inc">massive direct deposit to your bank account.</span> You can't help but feel that such a crafty fox might use his new power to <span class="prosperity dec">corner the market</span> in his barony, though.`;
 		}
 
 		function bureaucrat() {
diff --git a/src/events/REFS/refsKnightlyDuel.js b/src/events/REFS/refsKnightlyDuel.js
index 3739a108f0d..499719ebc72 100644
--- a/src/events/REFS/refsKnightlyDuel.js
+++ b/src/events/REFS/refsKnightlyDuel.js
@@ -1,4 +1,4 @@
-App.Events.refsKnightlyDuel = class refsMaturityPreferentialistEncounter extends App.Events.BaseEvent {
+App.Events.refsKnightlyDuel = class refsKnightlyDuel extends App.Events.BaseEvent {
 	eventPrerequisites() {
 		return [
 			() => V.arcologies[0].FSNeoImperialist > random(25, 100) || (V.debugMode > 0 && V.debugModeEventSelection > 0),
@@ -13,7 +13,7 @@ App.Events.refsKnightlyDuel = class refsMaturityPreferentialistEncounter extends
 		slave.devotion = random(-80, -60);
 		slave.muscles = random(50, 75);
 		slave.skill.combat = 1;
-		slave.behavioralFlaw = "malicious";
+		slave.sexualFlaw = "malicious";
 		slave.behavioralQuirk = "none";
 		slave.trust = random(-30, -20);
 		slave.boobs = 150;
@@ -27,8 +27,9 @@ App.Events.refsKnightlyDuel = class refsMaturityPreferentialistEncounter extends
 		slave.balls = random(2, 4);
 		slave.scrotum = slave.balls;
 		slave.prostate = 1;
+		slave.clothes = "Imperial Plate";
 
-		App.Events.drawEventArt(node, slave); // TODO: there ARE two of them, no?
+		App.Events.drawEventArt(node, [slave, slave]); // Draw the same slave twice since there are two knights (and neither is enslaveable)
 
 		App.Events.addParagraph(node, [`After the rise of ${V.arcologies[0].name}'s new Imperial society, Knights have become a cornerstone of the new social order. Proud, noble, and chivalrous, they're seen as heroic, even legendary figures to the general public, and play an essential role in securing your arcology against violent threats with their larger-than-life personalities. However, the proud and individual nature of your Knights occasionally causes problems.`]);
 
diff --git a/src/events/REFS/refsMaturityPreferentialistEncounter.js b/src/events/REFS/refsMaturityPreferentialistEncounter.js
index c33360356f5..2e1181328e0 100644
--- a/src/events/REFS/refsMaturityPreferentialistEncounter.js
+++ b/src/events/REFS/refsMaturityPreferentialistEncounter.js
@@ -59,7 +59,7 @@ App.Events.refsMaturityPreferentialistEncounter = class refsMaturityPreferential
 
 		function fuck() {
 			const frag = new DocumentFragment();
-			App.Events.addParagraph(node, [`It only takes a moment for ${V.assistant.name} to uncover the citizen's financial records and the copious debt therein, and only another moment for you to browbeat the terrified older women into sleeping with you under threat of purchasing all ${his} debt and summarily enslaving ${him}. ${His} sons, frightened into obedience by the possibility of losing their dear mother, take their cue to make themselves scarce during the encounter.`]);
+			App.Events.addParagraph(frag, [`It only takes a moment for ${V.assistant.name} to uncover the citizen's financial records and the copious debt therein, and only another moment for you to browbeat the terrified older women into sleeping with you under threat of purchasing all ${his} debt and summarily enslaving ${him}. ${His} sons, frightened into obedience by the possibility of losing their dear mother, take their cue to make themselves scarce during the encounter.`]);
 
 			App.Events.addParagraph(frag, [`Once you both retire to your private suite, you peel the mature citizen's clothes off as easily as one might shed a gift of its wrapping. In the nude ${his} body is tastefully plush, with wide hips, firm motherly breasts, and a delicate blush across ${his} shamefaced, plump cheeks. Despite the circumstances of your sexual conquest of ${him}, ${he} seems to enjoy the fuck well enough by the sounds of ${his} frenzied moans — citizens like ${him} often do since sexual submission to a slave would be a crippling scandal to a prominent citizen, let alone one of ${his} diminished social stature.`]);
 			const choices = [];
@@ -68,7 +68,7 @@ App.Events.refsMaturityPreferentialistEncounter = class refsMaturityPreferential
 			} else {
 				choices.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}.`));
 			}
-			App.Events.addResponses(node, choices);
+			App.Events.addResponses(frag, choices);
 
 			repX(1500, "event");
 			return frag;
diff --git a/src/events/REFS/refsPastoralistEncounter.js b/src/events/REFS/refsPastoralistEncounter.js
index ea848dad1e9..9616155f36f 100644
--- a/src/events/REFS/refsPastoralistEncounter.js
+++ b/src/events/REFS/refsPastoralistEncounter.js
@@ -50,7 +50,7 @@ App.Events.refsPastoralistEncounter = class refsPastoralistEncounter extends App
 
 		function workout() {
 			const frag = new DocumentFragment();
-			App.Events.addParagraph(node, [`The owner of the parlor is so flattered by your patronage of ${his} humble store that ${he} not only provides your drink free of charge but even milks ${himself} at the counter to personally provide the dairy for your shake. The shake's taste is rich, even creamy, with an overall sweet palate mixed with a slight nuttiness.`]);
+			App.Events.addParagraph(frag, [`The owner of the parlor is so flattered by your patronage of ${his} humble store that ${he} not only provides your drink free of charge but even milks ${himself} at the counter to personally provide the dairy for your shake. The shake's taste is rich, even creamy, with an overall sweet palate mixed with a slight nuttiness.`]);
 
 			App.Events.addParagraph(frag, [`Though you depart without officially sponsoring the milkshake parlor, your presence is endorsement enough to many citizens while others simply <span class="reputation inc">appreciate you drinking amongst them.</span>`]);
 			repX(1500, "event");
diff --git a/src/events/REFS/refsPhysicalIdealistEncounter.js b/src/events/REFS/refsPhysicalIdealistEncounter.js
index 38fe05f86b0..df81309a9b4 100644
--- a/src/events/REFS/refsPhysicalIdealistEncounter.js
+++ b/src/events/REFS/refsPhysicalIdealistEncounter.js
@@ -46,7 +46,7 @@ App.Events.refsPhysicalIdealistEncounter = class refsPhysicalIdealistEncounter e
 
 		function workout() {
 			const frag = new DocumentFragment();
-			App.Events.addParagraph(node, [`The attendant of the gym is almost too stunned to charge you for entry, and indeed many citizens inside and outside the gym stop to watch you begin a work-out routine. The muscular citizen does not halt ${his} own regime, of course, so you soon find yourself pumping iron and straining your muscles to the limit beside ${him}.`]);
+			App.Events.addParagraph(frag, [`The attendant of the gym is almost too stunned to charge you for entry, and indeed many citizens inside and outside the gym stop to watch you begin a work-out routine. The muscular citizen does not halt ${his} own regime, of course, so you soon find yourself pumping iron and straining your muscles to the limit beside ${him}.`]);
 
 			App.Events.addParagraph(frag, [`Your eyes lock somewhere in the midst of a particularly strenuous exercise, and what follows may be remembered in the annals of ${V.arcologies[0].name} history as the most erotic display of physical might ever recorded. Matching each other rep for rep, the gym is soon echoing with the grunts of both your exertions while your bodies grow slick with glistening sweat. When the last dumbbell is racked, the citizen merely nods ${his} respect at you for matching ${his} pursuit of the physical ideal, to the <span class="reputation inc">delight of the watching citizenry.</span>`]);
 			repX(1500, "event");
diff --git a/src/events/REFS/refsTransformationFetishismEncounter.js b/src/events/REFS/refsTransformationFetishismEncounter.js
index 93f7db88215..f69254b557d 100644
--- a/src/events/REFS/refsTransformationFetishismEncounter.js
+++ b/src/events/REFS/refsTransformationFetishismEncounter.js
@@ -56,16 +56,16 @@ App.Events.refsTransformationFetishismEncounter = class refsTransformationFetish
 
 		function fuck() {
 			const frag = new DocumentFragment();
-			App.Events.addParagraph(node, [`You make your presence known to citizen, and once the usual shock and disbelief have worn off the citizen rapidly agrees to your proposal. ${He} follows you back to the penthouse where you inform ${V.assistant.name} that the citizen is to be given the works in the remote surgery. As the citizen passes through the doors to the surgery, ${he} turns and blows you a kiss of gratitude.`]);
+			App.Events.addParagraph(frag, [`You make your presence known to citizen, and once the usual shock and disbelief have worn off the citizen rapidly agrees to your proposal. ${He} follows you back to the penthouse where you inform ${V.assistant.name} that the citizen is to be given the works in the remote surgery. As the citizen passes through the doors to the surgery, ${he} turns and blows you a kiss of gratitude.`]);
 
 			App.Events.addParagraph(frag, [`When the citizen is later delivered to your private suite to uphold ${his} end of the bargain, ${he} does so as the veritable image of a perfect bimbo slut. In ${his} rush to come thank you for transforming ${him} from ${his} plain and plebian appearance ${he} has evidently neglected to clothe ${himself}, so you can admire ${his} new firm tits, plump ass and bee-stung lips from the moment ${he} enters the room. Despite being fresh from surgery, ${he}'s an exquisite fuck and an enthusiastic partner — citizens like ${him} often are, given that penetration from a slave would be a social suicide.`]);
 			const choices = [];
 			if (V.cash >= (enslaveCost)) {
-				choices.push(new App.Events.Result(`Enslave ${him} afterwards`, enslave, `Purchasing ${his} outstanding debts will cost ${cashFormat(10000)}.`));
+				choices.push(new App.Events.Result(`Enslave ${him} afterwards`, enslave, `Purchasing ${his} outstanding debts will cost ${cashFormat(enslaveCost)}.`));
 			} else {
 				choices.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}.`));
 			}
-			App.Events.addResponses(node, choices);
+			App.Events.addResponses(frag, choices);
 
 			repX(1500, "event");
 			return frag;
diff --git a/src/events/REFS/refsWarhound.js b/src/events/REFS/refsWarhound.js
index 30977f223d2..d923914864c 100644
--- a/src/events/REFS/refsWarhound.js
+++ b/src/events/REFS/refsWarhound.js
@@ -62,7 +62,7 @@ App.Events.refsWarhound = class refsWarhound extends App.Events.BaseEvent {
 		App.Events.addResponses(node, choices);
 
 		function buy() {
-			cashX(-20000, "Bought a Warhound");
+			cashX(-enormousCash, "Bought a Warhound");
 			return [
 				`You nod once to the merchant and electronically transfer the money to him without a second thought. The pudgy man clasps his hands together gleefully and then hands you the leash, smiling like a snake. "Oh, and we have not yet assigned ${him} a name, my liege - please feel free to call ${him} whatever you wish. Enjoy your new hound!"`,
 				App.UI.newSlaveIntro(slave)
diff --git a/src/events/REFS/refsYouthPreferentialistEncounter.js b/src/events/REFS/refsYouthPreferentialistEncounter.js
index 7607101d888..c806bf5c2d8 100644
--- a/src/events/REFS/refsYouthPreferentialistEncounter.js
+++ b/src/events/REFS/refsYouthPreferentialistEncounter.js
@@ -57,7 +57,7 @@ App.Events.refsYouthPreferentialistEncounter = class refsYouthPreferentialistEnc
 
 		function fuck() {
 			const frag = new DocumentFragment();
-			App.Events.addParagraph(node, [`It only takes a moment for ${V.assistant.name} to uncover the father's financial records and the copious debt therein, and only another moment for you to browbeat the terrified father into allowing his V.daughter to sleep with you under threat of purchasing all their debt and summarily enslaving ${him}.`]);
+			App.Events.addParagraph(frag, [`It only takes a moment for ${V.assistant.name} to uncover the father's financial records and the copious debt therein, and only another moment for you to browbeat the terrified father into allowing his V.daughter to sleep with you under threat of purchasing all their debt and summarily enslaving ${him}.`]);
 
 			App.Events.addParagraph(frag, [`Once you both retire to your private suite, you peel the ${girl}'s clothes off as easily as one might shed a gift of its wrapping. In the nude ${his} body is tastefully youthful, with narrow hips, firm breasts, and a delicate blush across ${his} shamefaced, rosy cheeks. Despite the circumstances of your sexual conquest of ${him}, ${he} seems to enjoy the fuck well enough by the sounds of ${his} frenzied moans — citizens like ${him} often do since sexual submission to a slave would be a crippling scandal to a prominent citizen, let alone one of ${his} diminished social stature.`]);
 			const choices = [];
@@ -66,7 +66,7 @@ App.Events.refsYouthPreferentialistEncounter = class refsYouthPreferentialistEnc
 			} else {
 				choices.push(new App.Events.Result(null, null, `You lack the necessary funds to enslave ${him}.`));
 			}
-			App.Events.addResponses(node, choices);
+			App.Events.addResponses(frag, choices);
 
 			repX(1500, "event");
 			return frag;
-- 
GitLab