From 16e9cdacffea906de10de31a9124a45b5430103c Mon Sep 17 00:00:00 2001
From: Trinidad <anchaiscastilla@gmail.com>
Date: Wed, 2 Aug 2023 20:31:03 +0200
Subject: [PATCH] 	modified:   js/003-data/gameVariableData.js 
 modified:   src/endWeek/economics/reputation.js 	modified:  
 src/player/js/PlayerState.js

---
 js/003-data/gameVariableData.js     |  1 +
 src/endWeek/economics/reputation.js | 37 +++++++++++++++++++++++++++++
 src/player/js/PlayerState.js        |  4 ++++
 3 files changed, 42 insertions(+)

diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js
index 9de30128088..dbd66647cb7 100644
--- a/js/003-data/gameVariableData.js
+++ b/js/003-data/gameVariableData.js
@@ -873,6 +873,7 @@ App.Data.resetOnNGPlus = {
 	propOutcome: 0,
 	EliteSires: [],
 	raped: -1,
+	rapedThisWeek: 0,
 	missingParentID: -10000,
 	/* animalParts: 0,*/
 	pregSpeedControl: 0,
diff --git a/src/endWeek/economics/reputation.js b/src/endWeek/economics/reputation.js
index 796bd27da7a..d517b905a29 100644
--- a/src/endWeek/economics/reputation.js
+++ b/src/endWeek/economics/reputation.js
@@ -976,6 +976,43 @@ App.EndWeek.reputation = function() {
 			repX(forceNeg(1 * V.PC.degeneracy), "PCactions");
 		}
 	}
+	if (V.rapedThisWeek) {
+		r.push(`There's ${V.PC.degeneracy ? "also " : ""}a rumor you've been raped${V.rapedThisWeek > V.PC.counter.raped && V.PC.counter.raped > 0 ? "again" : ""}.`);
+		let rapeFameDec = 25 + V.rapedThisWeek * 75;
+		if (V.arcologies[0].FSAntebellumRevivalist !== "unset") {
+			if (V.SecExp.edicts.weaponsLaw > 0) {
+				r.push(`Your citizens are relieved that it is allowed to carry weapons to defend themselves against possible attacks.`);
+				rapeFameDec *= .8;
+			} else {
+				r.push(`Your citizens would feel safer if they were allowed to carry weapons to defend themselves against possible attacks.`);
+			}
+		} else if (V.arcologies[0].FSSubjugationist !== "unset" && V.PC.race === V.arcologies[0].FSSubjugationistRace) {
+			r.push(`Your citizens see your rape as normal since you are ${V.PC.race}.`);
+			rapeFameDec *= .5;
+		} else if (V.arcologies[0].FSSupremacist !== "unset" && V.PC.race === V.arcologies[0].FSSupremacistRace) {
+			r.push(`Your citizens consider your rape an atrocity, since you are ${V.PC.race}.`);
+			rapeFameDec *= 1.2;
+		} else if (V.arcologies[0].FSRepopulationFocus !== "unset" && (isFertile(V.PC) || ((V.PC.vagina >= 0 || V.PC.mpreg) && V.PC.preg < 10))) {
+			r.push(`All things considered, your citizens hope that at least you have become pregnant.`);
+			rapeFameDec *=.9;
+		}
+		if (V.arcologies[0].FSChattelReligionistLaw === 1) {
+			r.push(`The Prophet has been sullied, and this is a sacrilege.`);
+			rapeFameDec *= 1.2;
+		}
+		if (V.policies.sexualOpenness === 1 && V.arcologies[0].FSNull !== "unset") {
+			r.push(`Since you have shown interest in being penetrated, many people think that it's not a real rape, that you are role-playing with some friend.`);
+			rapeFameDec *= .5;
+		}
+		if (V.slaves.filter(s => s.devotion <= 20).length > 0){
+			r.push(`<span class="trust inc">Your less obedient slaves whisper among themselves.</span>`);
+			V.slaves.forEach(function(s) { if (s.devotion <= 20) { s.trust += 10; } });
+		}
+		rapeFameDec = Math.clamp(Math.floor(rapeFameDec), 0, 250);
+		repX(forceNeg(rapeFameDec), "PCactions");
+		V.PC.counter.raped += V.rapedThisWeek;
+		V.rapedThisWeek = 0;
+	}
 
 	if (V.FCNNstation === 1) {
 		r.push(`Playing host to the Free Cities News Network brings <span class="green">approval</span> from those who still consider freedom of the press a virtue.`);
diff --git a/src/player/js/PlayerState.js b/src/player/js/PlayerState.js
index 9cdbea31101..7b3d9cc5de8 100644
--- a/src/player/js/PlayerState.js
+++ b/src/player/js/PlayerState.js
@@ -110,6 +110,8 @@ App.Entity.PlayerActionsCountersState = class {
 		this.birthOther = 0;
 		/** how many units of your cum are stored away for artificially inseminating slaves */
 		this.storedCum = 0;
+		/** how many times you've been raped of forced to sex */
+		this.raped = 0;
 		/** shared variables */
 		/** amount of milk given */
 		this.milk = 0;
@@ -965,6 +967,7 @@ App.Entity.PlayerState = class PlayerState {
 		 * accepts ID See Pregnancy Control section for more.
 		 *
 		 * Who sired your pregnancy
+		 * * -10: a rapist
 		 * * -9: a futanari sister
 		 * * -8: an animal
 		 * * -7: designer baby
@@ -1549,6 +1552,7 @@ App.Entity.PlayerState = class PlayerState {
 		 * | *-6*     | Societal Elite*        |
 		 * | *-8*     | Animal*                |
 		 * | *-9*     | Futanari Sister*       |
+		 * | *-10*    | Rapist*       |
 		 *
 		 * **not currently implemented*
 		 * @type {Set<number>}
-- 
GitLab