From 848c460555728522a78264cbe685a7f85439842b Mon Sep 17 00:00:00 2001 From: Pregmodder <pregmodder@gmail.com> Date: Mon, 15 Aug 2022 01:35:20 -0400 Subject: [PATCH] prHealth + mutual illness spreading --- CHANGELOG.md | 2 ++ js/003-data/constants.js | 1 + src/endWeek/healthFunctions.js | 29 ++++++++++++++++++++++++----- src/player/doctorConsultation.js | 2 +- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63555dfdc58..de6a00c8253 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * added player drugs * added player salon +* Chattel religionist "Holy Nudism" policy +* chooses own clothing now slightly less restrictive wth Chattel religionist * RA simple mode * RA can now report which rule made a change * New Game++ (Start in new arcology at same week.) diff --git a/js/003-data/constants.js b/js/003-data/constants.js index f467d715bde..077f6a4c7e2 100644 --- a/js/003-data/constants.js +++ b/js/003-data/constants.js @@ -87,6 +87,7 @@ globalThis.PersonalAttention = Object.freeze({ DEVELOPMENT: 'development project', TECH: 'technical accidents', SEX: 'sex', + RELAX: 'rest and relaxation', PROCLAMATION: 'proclamation', TRAINING: 'slave training', }); diff --git a/src/endWeek/healthFunctions.js b/src/endWeek/healthFunctions.js index 786c6788663..d3eab57f062 100644 --- a/src/endWeek/healthFunctions.js +++ b/src/endWeek/healthFunctions.js @@ -167,6 +167,14 @@ globalThis.illness = function(slave) { r += ` ${He} has <span class="health dec">caught ${addA(sicknessDegree[H.illness])}</span> from ${his} ${relationshipTerm(rel)} ${rel.slaveName}.`; } } + } else if (H.illness === 0 && slave.relationship === -3) { + if (V.PC.health.illness > 1) { + if (catchesIllness(10)) { + H.illness = V.PC.health.illness - 1; // reduced severity + r += ` ${He} has <span class="health dec">caught ${addA(sicknessDegree[H.illness])}</span> from you.`; + break; + } + } } // or she might catch something from a sick coworker const job = App.Utils.jobForAssignment(slave.assignment); @@ -180,6 +188,15 @@ globalThis.illness = function(slave) { } } } + if (H.illness === 0 && [Job.FUCKTOY, Job.MASTERSUITE, Job.CONCUBINE].includes(slave.assignment)) { + if (V.PC.health.illness > 1) { + if (catchesIllness(20)) { + H.illness = V.PC.health.illness - 1; // reduced severity + r += ` ${He} has <span class="health dec">caught ${addA(sicknessDegree[H.illness])}</span> from you.`; + break; + } + } + } } } else if (H.illness > 0) { if (jsRandom(1, 100) > 75 && H.illness === 1 && curativesBonus < 2 && slave.assignment !== Job.CLINIC && V.week > 8) { @@ -206,11 +223,13 @@ globalThis.canCatchIllness = function(slave) { if (slave.health.illness > 0) { // already sick return false; } - if (slave.curatives === 1 || slave.inflationType === "curative") { // on preventatives, or inflated with curatives - return false; - } - if (slave.assignment === Job.CLINIC) { // slaves in the clinic are monitored - return false; + if (slave.ID !== -1) { + if (slave.curatives === 1 || slave.inflationType === "curative") { // on preventatives, or inflated with curatives + return false; + } + if (slave.assignment === Job.CLINIC) { // slaves in the clinic are monitored + return false; + } } return true; }; diff --git a/src/player/doctorConsultation.js b/src/player/doctorConsultation.js index cc54f417d54..3fbe94a5770 100644 --- a/src/player/doctorConsultation.js +++ b/src/player/doctorConsultation.js @@ -225,7 +225,7 @@ App.UI.doctorConsultation = function() { } } - if (V.PC.addict > 3 || V.PC.aphrodisiacs > 0) { + if (V.PC.addict > 3 || V.PC.aphrodisiacs > 0 || V.PC.inflationType === "aphrodisiac") { r.push(`The urinalyses tells me you've been hitting the aphrodisiacs. I hope you know the risks involved with that. I'm sure you do, but if you ever need any assistance with it, we do have detox pills available.`); } -- GitLab