From 29e9dc84de770cf64e24109e3df104994bbe02cb Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Sat, 28 Mar 2020 19:12:33 -0400
Subject: [PATCH] work

---
 src/endWeek/healthFunctions.js | 9 ++++++---
 src/js/economyJS.js            | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/endWeek/healthFunctions.js b/src/endWeek/healthFunctions.js
index 130edf9dd42..6adaba918e1 100644
--- a/src/endWeek/healthFunctions.js
+++ b/src/endWeek/healthFunctions.js
@@ -640,15 +640,18 @@ window.tired = function tired(slave) {
  * @param {App.Entity.SlaveState} slave
  * @returns {number}
  */
-window.restEffects = function restEffects(slave) {
+window.restEffects = function restEffects(slave, exhaustion) {
+	// exhaustion holds the weekly .tired gain from the assignment.
 	if (!slave.fuckdoll) {
-		if (slave.assignment === "work a glory hole") {
+		if  {
 			if (slave.rules.rest === "mandatory") {
 				return .86;
 			} else if (slaveResting(slave)) {
 				return .25;
-			} else if (slave.tired + 20 >= 90 && !willWorkToDeath(slave)) {
+			} else if (slave.tired + exhaustion >= 90 && !willWorkToDeath(slave)) {
 				return .10;
+			} else if (slave.tired > 90 && slave.assignment !== "work a glory hole") {
+				return .75;
 			}
 		}
 	}
diff --git a/src/js/economyJS.js b/src/js/economyJS.js
index f80375f3e8c..48d222413d1 100644
--- a/src/js/economyJS.js
+++ b/src/js/economyJS.js
@@ -1655,7 +1655,7 @@ window.slaveJobValues = function(lowerClassSexDemandRef, middleClassSexDemandRef
 	// Glory hole slaves adding to 'arcade'
 	V.JobIDArray["work a glory hole"].forEach(ID => {
 		const s = V.slaves[V.slaveIndices[ID]];
-		s.sexAmount = Math.trunc(restEffects(s) * ((normalRandInt(600, 20) + (4 - s.anus) * 10 + (4 - s.vagina) * 10 + Math.trunc(s.health.condition / 2)) * 0.75));
+		s.sexAmount = Math.trunc(restEffects(s, 20) * ((normalRandInt(600, 20) + (4 - s.anus) * 10 + (4 - s.vagina) * 10 + Math.trunc(s.health.condition / 2)) * 0.75));
 		tiredFucks(s);
 		slaveJobValues.arcade += s.sexAmount;
 	});
-- 
GitLab