diff --git a/src/endWeek/player/prHealth.js b/src/endWeek/player/prHealth.js index 78e2151a9d2c6e97dd29efd3487a429f30f420f1..b2dd16909e77db42c95660c22a5be546fb736ba1 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 69a996b76c1f4c3d5a54dfb9f51e54eba1edf61a..7d43227d52a195e801500d7af350f9bfb5dbfb7c 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.