From 5b801991f712db5c8903004660fe55c6d8d9ff8d Mon Sep 17 00:00:00 2001
From: Pregmodder <pregmodder@gmail.com>
Date: Mon, 30 Mar 2020 04:18:18 -0400
Subject: [PATCH] fixes

---
 src/endWeek/healthFunctions.js |  3 +--
 src/js/food.js                 |  2 +-
 src/js/health.js               | 10 ++++++----
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/endWeek/healthFunctions.js b/src/endWeek/healthFunctions.js
index 01bf345a741..fa68975f0b9 100644
--- a/src/endWeek/healthFunctions.js
+++ b/src/endWeek/healthFunctions.js
@@ -646,11 +646,10 @@ window.restEffects = function restEffects(slave, exhaustion) {
 			return .25;
 		} else if (slave.tired + exhaustion >= 90 && !willWorkToDeath(slave)) {
 			return .10;
-		} else if (slave.tired > 60 && slave.assignment !== "work a glory hole") {
+		} else {
 			return healthPenalty(slave);
 		}
 	}
-	return 1;
 };
 
 /**
diff --git a/src/js/food.js b/src/js/food.js
index 1f13eabcad8..34c908b82fd 100644
--- a/src/js/food.js
+++ b/src/js/food.js
@@ -57,7 +57,7 @@ App.Facilities.Farmyard.foodAmount = function(slave) {
 		} else if (slave.hears < -1) {								// slave is deaf
 			food *= 0.6;
 		}
-		food *= restEffects(slave);
+		food *= restEffects(slave, 20);
 		food = Math.trunc(food);
 		food = Math.clamp(food, 1, 1000000000000000000);
 		return food;
diff --git a/src/js/health.js b/src/js/health.js
index 4bd57827f09..ea5b6404a16 100644
--- a/src/js/health.js
+++ b/src/js/health.js
@@ -21,10 +21,12 @@ window.healthPenalty = function healthPenalty(slave) {
 			penalty *= 0.95;
 		}
 	}
-	if (H.tired > 90) {
-		penalty *= 0.75;
-	} else if (H.tired > 60) {
-		penalty *= 0.90;
+	if (slave.assignment !== "work a glory hole") {
+		if (H.tired > 90) {
+			penalty *= 0.75;
+		} else if (H.tired > 60) {
+			penalty *= 0.90;
+		}
 	}
 	penalty = Math.trunc(penalty) / 100;
 	return penalty;
-- 
GitLab