From 00310aebaaffa53d42a77d81de3b782e17f61e0a Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Mon, 24 May 2021 01:30:53 -0400
Subject: [PATCH] cleanup whoreRebellious.js

---
 src/events/RESS/whoreRebellious.js | 75 ++++++++++++++++++------------
 1 file changed, 45 insertions(+), 30 deletions(-)

diff --git a/src/events/RESS/whoreRebellious.js b/src/events/RESS/whoreRebellious.js
index dcc7cd16736..d973352082d 100644
--- a/src/events/RESS/whoreRebellious.js
+++ b/src/events/RESS/whoreRebellious.js
@@ -10,7 +10,7 @@ App.Events.RESSWhoreRebellious = class RESSWhoreRebellious extends App.Events.Ba
 				s => s.assignment === Job.WHORE,
 				s => s.devotion < -20,
 				s => s.trust >= -20,
-				s => (canDoAnal(s) && (s.vagina > 0 || canDoVaginal(s)))
+				s => (canDoAnal(s) || canDoVaginal(s))
 			]
 		];
 	}
@@ -52,7 +52,7 @@ App.Events.RESSWhoreRebellious = class RESSWhoreRebellious extends App.Events.Ba
 		r.push(`${He} will spend the day restrained in public, with your other slaves periodically stopping by to hydrate ${him} and wash out ${his} holes.`);
 
 		App.Events.addParagraph(node, r);
-		App.Events.addResponses(node, [ // TODO: Add option that doesn't take virginities?
+		App.Events.addResponses(node, [
 			new App.Events.Result(`Increase ${his} assignment to 24 hours a day`, H24, virginityWarning()),
 			new App.Events.Result(`Take the first and last every day`, firstLast, virginityWarning()),
 			(V.arcade > 0)
@@ -61,53 +61,62 @@ App.Events.RESSWhoreRebellious = class RESSWhoreRebellious extends App.Events.Ba
 		]);
 
 		function virginityWarning() {
-			if (eventSlave.anus === 0 || (eventSlave.vagina === 0 && canDoVaginal(eventSlave))) { // TODO: Add condition for canDoAnal if implementing non-anal alternatives
+			if ((eventSlave.anus === 0 && canDoAnal(eventSlave)) || (eventSlave.vagina === 0 && canDoVaginal(eventSlave))) {
 				return `This option will take ${his} virginity`;
 			}
 			return null;
 		}
 
 		function popCherry() {
-			if (eventSlave.vagina === 0 && eventSlave.anus === 0) {
+			if (eventSlave.vagina === 0 && canDoVaginal(eventSlave) && eventSlave.anus === 0 && canDoAnal(eventSlave)) {
 				eventSlave.anus++;
 				eventSlave.vagina++;
-				return `You made sure to claim <span class="lime">both ${his} virginity and anal cherry</span> before anyone else could.`;
-			} else if (eventSlave.vagina === 0) {
+				VCheck.Both(eventSlave, 1);
+				return `You made sure to claim <span class="virginity loss">both ${his} virginity and anal cherry</span> before anyone else could.`;
+			} else if (eventSlave.vagina === 0 && canDoVaginal(eventSlave)) {
 				eventSlave.vagina++;
-				return `You made sure to claim <span class="lime">${his} virginity</span> before anyone else could.`;
-			} else if (eventSlave.anus === 0) {
+				VCheck.Vaginal(eventSlave, 1);
+				return `You made sure to claim <span class="virginity loss">${his} virginity</span> before anyone else could.`;
+			} else if (eventSlave.anus === 0 && canDoAnal(eventSlave)) {
 				eventSlave.anus++;
-				return `You made sure to claim <span class="lime">${his} anal cherry</span> before anyone else could.`;
+				VCheck.Anal(eventSlave, 1);
+				return `You made sure to claim <span class="virginity loss">${his} anal cherry</span> before anyone else could.`;
 			}
 		}
 
 		function H24() {
 			r = [];
 			r.push(`You give ${contextualIntro(V.PC, eventSlave)} no indication that ${his} public use assignment is about to change. Late in the day, when ${his} shift would normally end, another of your slaves simply maintains ${him} as usual and then leaves ${him} be. ${eventSlave.slaveName} is so deprived of any way to tell time that ${he} doesn't realize ${he}'s been left for some time. The first indication ${he} gets that something's different is when liquid food is squirted down ${his} throat the next morning. When ${he}'s finally stripped out of the suit at the end of the week, ${he}'s pale and wan and ${his} holes are puffy and red. <span class="health dec">${His} health was damaged.</span> However, ${his} permanent presence became quite noted. <span class="reputation inc">Your reputation has increased.</span> And when ${he}'s out of the suit, ${he} instantly begs you to allow ${him} to do anything to save ${himself} from more of that. <span class="trust dec">${His} fear of you has increased.</span>`);
+			r.push(popCherry());
 			repX(500, "event", eventSlave);
 			healthDamage(eventSlave, 10);
 			eventSlave.trust -= 10;
-			if (canDoVaginal(eventSlave)) { // TODO: For implementing non-anal alternatives, confer original sugarcode in RESS.tw
+			if (canDoVaginal(eventSlave)) {
 				seX(eventSlave, "vaginal", "public", "penetrative", 10);
-				seX(eventSlave, "anal", "public", "penetrative", 10);
-				seX(eventSlave, "oral", "public", "penetrative", 10);
+				if (!canDoAnal(eventSlave)) {
+					seX(eventSlave, "vaginal", "public", "penetrative", 10);
+				}
 				if (canGetPregnant(eventSlave) && eventSlave.eggType === "human") {
 					r.push(knockMeUp(eventSlave, 10, 2, -2));
 				}
-			} else {
-				seX(eventSlave, "anal", "public", "penetrative", 20);
-				seX(eventSlave, "oral", "public", "penetrative", 10);
+			}
+			if (canDoAnal(eventSlave)) {
+				seX(eventSlave, "anal", "public", "penetrative", 10);
+				if (!canDoVaginal(eventSlave)) {
+					seX(eventSlave, "anal", "public", "penetrative", 10);
+				}
 				if (canGetPregnant(eventSlave) && eventSlave.eggType === "human") {
-					r.push(knockMeUp(eventSlave, 20, 1, -2));
+					r.push(knockMeUp(eventSlave, 10, 1, -2));
 				}
 			}
-			r.push(popCherry());
+			seX(eventSlave, "oral", "public", "penetrative", 10);
 			return r;
 		}
 
 		function firstLast() {
 			r = [];
 			r.push(`When ${contextualIntro(V.PC, eventSlave)} feels a cock entering ${his} mouth right after ${he}'s suited up, ${he} knows it's you and wriggles as best ${he} can in the suit. It doesn't help much, and ${his} struggles don't prevent you from moving from ${his} mouth to ${his} ass, either. At the end of the day, on the other hand, the`);
+			// There is a function planned for this in the male slave overhaul. DO NOT FORGET IT!
 			if (girl === "girl") {
 				r.push(`female-shaped`);
 			} else {
@@ -119,35 +128,41 @@ App.Events.RESSWhoreRebellious = class RESSWhoreRebellious extends App.Events.Ba
 			} else {
 				r.push(`molest`);
 			}
-			r.push(`each of its holes. It takes viciously hard anal penetration to elicit any response at all, and even then, it's just the slightest hint of a moan. <span class="trust dec">${His} fear of you has increased.</span>`);
+			r.push(`each of its holes. It takes`);
+			if (canDoVaginal(eventSlave)) {
+				r.push(`a serious vaginal reaming`);
+			} else {
+				r.push(`viciously hard anal penetration`);
+			}
+			r.push(`to elicit any response at all, and even then, it's just the slightest hint of a moan. <span class="trust dec">${His} fear of you has increased.</span>`);
+			r.push(popCherry());
 			eventSlave.trust -= 5;
-			if (canDoVaginal(eventSlave)) { // TODO: For implementing non-anal alternatives, confer original sugarcode in RESS.tw
+			if (canDoVaginal(eventSlave)) {
 				seX(eventSlave, "vaginal", "public", "penetrative", 6);
-				seX(eventSlave, "anal", "public", "penetrative", 6);
-				seX(eventSlave, "oral", "public", "penetrative", 6);
-				if (canImpreg(eventSlave, V.PC)) {
-					r.push(knockMeUp(eventSlave, 5, 2, -1));
+				if (!canDoAnal(eventSlave)) {
+					seX(eventSlave, "vaginal", "public", "penetrative", 3);
 				}
 				if (canGetPregnant(eventSlave) && eventSlave.eggType === "human") {
 					r.push(knockMeUp(eventSlave, 10, 2, -2));
 				}
-			} else {
-				seX(eventSlave, "anal", "public", "penetrative", 9);
-				seX(eventSlave, "oral", "public", "penetrative", 9);
-				if (canImpreg(eventSlave, V.PC)) {
-					r.push(knockMeUp(eventSlave, 5, 1, -1));
+			}
+			if (canDoAnal(eventSlave)) {
+				seX(eventSlave, "anal", "public", "penetrative", 6);
+				if (!canDoVaginal(eventSlave)) {
+					seX(eventSlave, "anal", "public", "penetrative", 3);
 				}
 				if (canGetPregnant(eventSlave) && eventSlave.eggType === "human") {
 					r.push(knockMeUp(eventSlave, 10, 1, -2));
 				}
 			}
-			r.push(popCherry());
+			seX(eventSlave, "oral", "public", "penetrative", 7);
+
 			return r;
 		}
 
 		function arcade() {
 			r = [];
-			r.push(`When ${he} realizes what ${his} punishment is, ${contextualIntro(V.PC, eventSlave)} screams and begs, but you are obdurate.`);
+			r.push(`When ${he} realizes what ${his} punishment is, ${contextualIntro(V.PC, eventSlave)} ${canTalk(eventSlave) ? "screams and " : ""}begs, but you are obdurate.`);
 			if (eventSlave.muscles > 30) {
 				r.push(`${His} powerful form has to be sedated for immurement in the arcade.`);
 			} else if ((eventSlave.weight >= 190)) {
-- 
GitLab