From 3acefe456215ea476697ff34a0f5a91ca374f8d1 Mon Sep 17 00:00:00 2001 From: Pregmodder <pregmodder@gmail.com> Date: Mon, 22 Aug 2022 01:21:28 -0400 Subject: [PATCH] more feedback + fix --- src/endWeek/player/prHealth.js | 4 ++-- src/player/desc/pLongHealth.js | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/endWeek/player/prHealth.js b/src/endWeek/player/prHealth.js index 78e2151a9d2..b2dd16909e7 100644 --- a/src/endWeek/player/prHealth.js +++ b/src/endWeek/player/prHealth.js @@ -144,7 +144,7 @@ App.EndWeek.Player.health = function(PC = V.PC) { } } } - if (PCH.illness === 0 && V.personalAttention.task === PersonalAttention.TRAINING && V.personalAttention.slaves.length > 0) { + if (PCH.illness === 0 && V.personalAttention.task === PersonalAttention.TRAINING && V.personalAttention.slaves.length > 0 && !onBedRest(V.PC, true)) { for (const other of V.personalAttention.slaves.map(s => getSlave(s.ID)).filter(s => !!s && s.health.illness > 1)) { if (catchesIllness(20)) { PCH.illness = other.health.illness - 1; // reduced severity @@ -193,7 +193,7 @@ App.EndWeek.Player.health = function(PC = V.PC) { } else { r.push(`you are the definition of <span class="green">perfect health`); } - if (PCH.shortDamage > 0) { + if (PCH.shortDamage >= 20) { r.push(r.pop() + `,</span>`); if (PCH.condition < -20) { r.push(`and`); diff --git a/src/player/desc/pLongHealth.js b/src/player/desc/pLongHealth.js index 69a996b76c1..7d43227d52a 100644 --- a/src/player/desc/pLongHealth.js +++ b/src/player/desc/pLongHealth.js @@ -18,6 +18,20 @@ App.Desc.Player.health = function(PC = V.PC) { r.push(`You've <span class="green">never felt better.</span>`); } + if (PCH.condition < -20) { + if (PCH.shortDamage >= 50) { + r.push(`Your body agrees, leaving you <span class="red">incapacitated by your worsening injuries.</span>`); + } else if (PCH.shortDamage >= 20) { + r.push(`To make it worse, a <span class="red">feeling of malaise</span> looms over you.`); + } + } else { + if (PCH.shortDamage >= 50) { + r.push(`Your body, however, has a different opinion; it <span class="red">refuses to function properly</span> until it is given time to heal.`); + } else if (PCH.shortDamage >= 20) { + r.push(`A <span class="red">feeling of malaise</span> hangs over you, however.`); + } + } + if (PCH.illness === 1) { r.push(`You <span class="yellow">might be coming down with something.</span>`); } else if (PCH.illness === 2) { @@ -36,6 +50,10 @@ App.Desc.Player.health = function(PC = V.PC) { r.push(`Your body has suffered <span class="yellow">permanent damage,</span> making life little more difficult.`); } + if (V.debugMode) { + r.push(`Your current health is ${PCH.condition}, with ${PCH.shortDamage} short term damage and ${PCH.longDamage} long term damage. You have a carcinogen build up of ${PC.chem} and an illness severity of ${PCH.illness}.`); + } + // This all is going to be revised. // shortDamage will be lingering damage, should increase the odds of further damaging events based off its value, and will naturally decay // longDamage will not decay, and is caused by high chem and passing a shortDamage threshold. Works similar to shortDamage in increasing susceptibility, but at a greatly reduced percent. Also decreases max life span. -- GitLab