From 1284b85f67bb44c15ff3dfece22324b5e3b4e3ab Mon Sep 17 00:00:00 2001 From: Jones <Jones> Date: Mon, 23 Dec 2019 12:39:49 +0100 Subject: [PATCH] Run tired earlier --- src/endWeek/saHealth.js | 4 +--- src/uncategorized/fullReport.tw | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/endWeek/saHealth.js b/src/endWeek/saHealth.js index 6d80bae8f96..713acc25353 100644 --- a/src/endWeek/saHealth.js +++ b/src/endWeek/saHealth.js @@ -182,9 +182,7 @@ window.endWeekHealthDamage = function endWeekHealthDamage(slave) { // Run at the H.shortDamage += Math.trunc(Math.pow(H.illness, 1.52) * 3 + 2); // 5, 10, 17, 26, 36 points of damage per respective level of illness } - // Calculating tired changes // Reducing condition for tired slaves - tired(slave); if (H.tired > 100) { tiredToCondition += Math.trunc((H.tired - 100) * 0.5) + normalRandInt(5, 0.5); H.tired = 100; @@ -227,7 +225,7 @@ window.endWeekHealthDamage = function endWeekHealthDamage(slave) { // Run at the H.health = H.condition - H.longDamage - H.shortDamage; }; -window.tired = function tired(slave) { +window.tired = function tired(slave) { // Run at the end of the week to take care of tiredness changes const V = State.variables; const H = slave.health; let livingRules = 0; diff --git a/src/uncategorized/fullReport.tw b/src/uncategorized/fullReport.tw index 5a1b63cc537..7f38f8b6c4a 100644 --- a/src/uncategorized/fullReport.tw +++ b/src/uncategorized/fullReport.tw @@ -8,7 +8,7 @@ <</if>> /* 000-250-006 */ -<<run illness($slaves[$i])>> +<<run illness($slaves[$i]), tired($slaves[$i])>> <<setLocalPronouns $slaves[$i]>> <<switch $slaves[$i].assignment>> -- GitLab