diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index cc9de5dc54ca718932fe78bcadd223c0f4e5d2e1..e4fbcb23aa461a091747fa48d405af2176ef793d 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -584,9 +584,11 @@ App.Data.resetOnNGPlus = { clinic: 0, clinicUpgradeFilters: 0, clinicUpgradeScanner: 0, + clinicUpgradePathogenSequencer: 0, clinicUpgradePurge: 0, clinicObservePregnancy: 1, clinicInflateBelly: 0, + clinicRegularCheckups: 1, clinicSpeedGestation: 0, clinicName: "the Clinic", /** @type {FC.FutureSocietyDeco} */ diff --git a/src/endWeek/healthFunctions.js b/src/endWeek/healthFunctions.js index e654b0044c79a6630cd8ac97d28136acc0692ffb..2bedfb4abf12155b7ecc3a91eb6b58929b091fcf 100644 --- a/src/endWeek/healthFunctions.js +++ b/src/endWeek/healthFunctions.js @@ -66,7 +66,7 @@ globalThis.illness = function(slave) { he, his, He, His } = getPronouns(slave); - let sicknessDegree = ["fine", "minor illness", "illness", "bad illness", "severe illness", "life-threatening illness"]; + const sicknessDegree = ["fine", "minor illness", "illness", "bad illness", "severe illness", "life-threatening illness"]; // On the macro side of things disease could also happen to the arcology's population as the arcology becomes crowded, killing citizens and putting slaves at greater risk of getting ill. Again with upgrades/policies to mitigate the issue made available TODO? if (slave.assignment === Job.AGENTPARTNER || slave.assignment === Job.AGENT) { @@ -77,51 +77,54 @@ globalThis.illness = function(slave) { } // Let's make sure agents don't get sick and accidentally die, they should take care of themselves if (slave.fuckdoll !== 0) { assignBonus += 50; - } else if (slave.assignment === Job.CLINIC) { + } else if (slave.assignment === Job.CLINIC || slave.assignment === Job.NURSE) { assignBonus += 40; - } else if (slave.assignment === Job.SPA || slave.assignment === Job.REST) { - assignBonus += 20; - } else if ((slave.assignment === Job.MASTERSUITE || slave.assignment === Job.FUCKTOY || slave.assignment === Job.CONCUBINE) && V.PC.skill.medicine >= 40) { - assignBonus += 10; - } else if (App.Data.Careers.Leader.nurse.includes(slave.career) || slave.skill.nurse > 120 || slave.intelligence + slave.intelligenceImplant > 95) { // Let slaves with experience or brains use it - assignBonus += 10; - } - if (random < 6) { // There is always a 5% chance of a slave feeling worse or coming in contact with an illness - if (H.illness > 0) { - H.illness += 1 + Math.trunc((slave.chem / 10 + jsRandom(1, 50) + 15) / 100); // Illness progresses with 1, unless chem > 350, then there's a chance for 2 - r += ` <span class="health dec">${His} sickness has progressed.</span>`; - if (H.illness > 5) { - healthDamage(slave, 20 * (H.illness - 5)); // Condition penalty for going over maximum illness, very dangerous - H.illness = 5; - r += ` ${His} illness <span class="health dec">makes an attempt to claim ${his} life.</span>`; - } - } else { - getIll(slave); - if (H.illness > 0) { - r += ` ${He} has come down with <span class="health dec">${addA(sicknessDegree[H.illness])}.</span>`; - } + } else if (slave.assignment === Job.DAIRY && V.dairyRestraintsSetting > 1) { // industrial dairy immunization boost + assignBonus += 30; + } else { + if (slave.assignment === Job.SPA || slave.assignment === Job.ATTENDANT || slave.assignment === Job.REST) { + assignBonus += 20; + } else if ((slave.assignment === Job.MASTERSUITE || slave.assignment === Job.FUCKTOY || slave.assignment === Job.CONCUBINE || slave.assignment === Job.HEADGIRL) && V.PC.skill.medicine >= 40) { + assignBonus += 10; } - } else if (random > 95 && H.illness > 0) { // There is always a 5% chance of a slave getting better + if (App.Data.Careers.Leader.nurse.includes(slave.career) || slave.skill.nurse > 120 || slave.intelligence + slave.intelligenceImplant > 95) { // Let slaves with experience or brains use it + assignBonus += 10; + } + } + if (random < 2 && canCatchIllness(slave)) { // Always a 2% (one week per slave per year) base chance of a slave even in otherwise-safe conditions spontaneously catching an illness + getIll(slave); + r += ` ${He} has come down with <span class="health dec">${addA(sicknessDegree[H.illness])}.</span>`; + } else if (random < 6 && H.illness > 0) { // Always a 5% chance of a sick slave feeling worse + H.illness += 1 + Math.trunc((slave.chem / 10 + jsRandom(1, 50) + 15) / 100); // Illness progresses with 1, unless chem > 350, then there's a chance for 2 + r += ` <span class="health dec">${His} sickness has progressed.</span>`; + if (H.illness > 5) { + healthDamage(slave, 20 * (H.illness - 5)); // Condition penalty for going over maximum illness, very dangerous + H.illness = 5; + r += ` ${His} illness <span class="health dec">makes an attempt to claim ${his} life.</span>`; + } + } else if (random > 95 && H.illness > 0) { // Always a 5% chance of a sick slave getting better H.illness -= 1; - if (H.illness < 0) { - H.illness = 0; + if (H.illness === 0) { improveCondition(slave, 5); r += ` <span class="health inc">${His} sickness has waned</span> and ${he} now feels better.`; } else { r += ` ${His} immune system <span class="health inc">fights back</span> against ${his} illness.`; } } else { - /* eslint-disable camelcase */ - let nurse_effectiveness = nurseEffectiveness(slave); - let health_adjusted = H.condition - H.longDamage - H.shortDamage * 1.25; - let age_modifier = Math.min(Math.trunc((slave.physicalAge - 18) / 3), 0); - let bonus_modifiers = random + assignBonus + nurse_effectiveness; - let curativesBonus = (slave.curatives > 1 || slave.inflationType === "curative") ? 2 : 1; - let industrialDairyImmunoBoost = (V.dairyRestraintsSetting > 1 && slave.assignment === Job.DAIRY) ? 60 : 0; - - // When ill, a slave has a 60% chance of getting better the next week at complete default, 70% with a favorable assignment, 80% with curatives, 90% with both measures active and additional benefits depending on the nurse on duty - if (H.illness > 0 && ((health_adjusted + age_modifier + industrialDairyImmunoBoost) / 3) + bonus_modifiers > (30 + (H.illness * 10)) / curativesBonus) { - if (nurse_effectiveness > 30 && (jsRandom(1, 2) === 2 || slave.assignment === Job.CLINIC) && H.illness > 1) { // A particularly effective nurse can improve illness faster + const nurseEffect = nurseEffectiveness(slave); // small (~5 or less) for prevention, large (~20 or more) for cure + const ageModifier = Math.min(slave.physicalAge - 15, 0); // always negative (-15 to 0); younger kids are slightly more likely to get sick + const healthAdjusted = H.condition - H.longDamage - H.shortDamage * 1.25 + ageModifier; // -100 to +200, roughly + const assignmentFactor = 1 + assignBonus / 100; // 1.0 to 1.5 + const nurseFactor = 1 + nurseEffect / 100; // 1.0 to 1.4 + const healthFactor = Math.clamp(1 + healthAdjusted / 100, 0.5, 1.5); // 0.5 to 1.5 + const curativesBonus = (slave.curatives > 1 || slave.inflationType === "curative") ? 2 : 1; // 1.0 or 2.0 + if (V.debugMode) { + r += ` (Illness factors: health ${healthFactor}, nurse ${nurseFactor}, assignment ${assignmentFactor}, curative ${curativesBonus}${H.illness > 0 ? `; cure roll ${random}` : ``})`; + } + + // When ill, a slave in average health with a level 1 illness has a 60% chance of getting better the next week at complete default, 78% in the clinic with a great nurse, 80% with curatives alone, 89% with both benefits - note that bonus factors have a bigger effect on more advanced illnesses + if (H.illness > 0 && random > (30 + (H.illness * 10)) / (curativesBonus * assignmentFactor * nurseFactor * healthFactor)) { + if (nurseEffect > 30 && (jsRandom(1, 2) === 2 || slave.assignment === Job.CLINIC) && H.illness > 1) { // A particularly effective nurse can improve illness faster H.illness -= 2; r += ` ${S.Nurse.slaveName} <span class="health inc">successfully treats</span> ${his} illness.`; } else { @@ -131,73 +134,129 @@ globalThis.illness = function(slave) { if (H.illness === 0) { r += ` ${He} no longer <span class="health inc">shows any signs</span> of ${his} previous sickness.`; } - } else if (H.illness === 0) { - if ([Job.BODYGUARD, Job.DJ, Job.MADAM, Job.ARCADE, Job.GLORYHOLE, Job.CLUB, Job.PUBLIC, Job.WHORE, Job.BROTHEL].includes(slave.assignment)) { // Limit to outside jobs only - if (((Math.min(health_adjusted, 50) + age_modifier) / 3) + bonus_modifiers < 30 / Math.min(curativesBonus + 1, 2)) { // Chance of getting ill 30% at complete default, 20% with a favorable assignment, 15% with curatives or preventatives, 10% with both measures active and a small benefit from effective Nurse screening + } else if (canCatchIllness(slave)) { + /** an adult slave in average condition in an otherwise unprotected environment (no drugs or modifiers) will have `baseChance` chance of catching an illness when exposed + * note the independent roll for each exposure; we're ignoring the original random roll here + * @param {number} baseChance + * @returns {boolean} + */ + const catchesIllness = (baseChance) => { + const roll = jsRandom(1, 100); + if (V.debugMode) { + r += ` (Transmission roll: ${roll} vs ${baseChance}*mods)`; + } + return roll < baseChance / (curativesBonus * assignmentFactor * nurseFactor * healthFactor); + }; + + if (hasOutsideContact(slave)) { + if (catchesIllness(15)) { getIll(slave); r += ` ${He} has come down with <span class="health dec">${addA(sicknessDegree[H.illness])}.</span>`; } } - } else { - healthDamage(slave, Math.pow(H.illness, 2)); - r += ` ${He} <span class="health dec">suffers under ${his} ${sicknessDegree[H.illness]}.</span>`; + + // if she didn't/couldn't catch an illness outside, maybe she'll get one from another slave + if (![Job.CLINIC, Job.NURSE].includes(slave.assignment)) { // slaves in the clinic are monitored and can't catch new illnesses from visitors or patients + // a slave is likely to catch something from her friend/partner + if (H.illness === 0 && slave.relationship > 0) { + const rel = getSlave(slave.relationshipTarget); + if (rel && rel.health.illness > 1) { + const chance = rel.assignment === Job.CLINIC ? 15 : 45; // you CAN still catch a disease from visiting your sick friend while she's in the clinic for treatment, but it's much less likely + if (catchesIllness(chance)) { + H.illness = rel.health.illness - 1; // reduced severity + r += ` ${He} has <span class="health dec">caught ${addA(sicknessDegree[H.illness])}</span> from ${his} ${relationshipTerm(rel)} ${rel.slaveName}.`; + } + } + } + // or she might catch something from a sick coworker + const job = App.Utils.jobForAssignment(slave.assignment); + if (H.illness === 0 && job) { + const contacts = 20; // limits max spread rate in large facilities - not everyone comes into contact with everyone else every week + for (const other of job.facility.employees().randomMany(contacts).filter(s => s.health.illness > 1)) { + if (catchesIllness(25)) { + H.illness = other.health.illness - 1; // reduced severity + r += ` ${He} has <span class="health dec">caught ${addA(sicknessDegree[H.illness])}</span> from ${his} coworker ${other.slaveName}.`; + break; + } + } + } + } + } else if (H.illness > 0) { + if (jsRandom(1, 100) > 75 && H.illness === 1 && curativesBonus < 2 && slave.assignment !== Job.CLINIC && V.week > 8) { + // independent 25% chance of getting worse if you have a level 1 illness, aren't being treated, AND already failed your recovery roll (i.e. you've spent more than one week sick) + r += ` ${He}'s <span class="health dec">feeling much worse</span> after spending so much time with a minor illness.`; + H.illness += 1; + } else { + r += ` ${He} <span class="health dec">suffers under ${his} ${sicknessDegree[H.illness]}.</span>`; + } + // note: health damage from continuing illness is deducted in endWeekHealthDamage } - /* eslint-enable camelcase */ } return r; }; -/** - * Once a new illness is rolled this determines how bad it is initially, chem levels seriously increase the chances of a higher initial value. Health also factors in with weakened slaves being more likely to catch ill. +/** Determine whether a given slave can catch an illness at all, so we don't have to check chances. * @param {App.Entity.SlaveState} slave - * @returns {void} + * @returns {boolean} */ -globalThis.getIll = function(slave) { - const H = slave.health; - const illness = jsRandom(1, 6) + jsRandom(1, 6) + jsRandom(1, 6) - Math.trunc(slave.chem / 150) + Math.trunc(H.condition / 20); - if (V.seeIllness !== 0) { - if (slave.curatives !== 1 && slave.inflationType !== "curative") { - if (slave.assignment !== Job.CLINIC) { - if (illness < 4) { - H.illness = 5; // 1.8% chance - } else if (illness < 5) { - H.illness = 4; // 2.8% chance - } else if (illness < 6) { - H.illness = 3; // 11.6% chance - } else if (illness < 8) { - H.illness = 2; // 21.3% chance - } else { - H.illness = 1; // 62.5% chance - } - } - } +globalThis.canCatchIllness = function(slave) { + if (V.seeIllness === 0) { // illness is disabled globally + return false; + } + 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; + } + return true; }; -/** - * Attempts to pass illness from slave1 to slave2. - * @param {App.Entity.SlaveState} slave1 - * @param {App.Entity.SlaveState} slave2 - * @returns {string} +/** Does this slave have regular contact with people other than you and your slaves? + * @param {App.Entity.SlaveState} slave + * @returns {boolean} */ -globalThis.passIllness = function(slave1, slave2) { - if (V.seeIllness !== 0) { - if (slave1.curatives !== 1) { - if (slave1.assignment !== Job.CLINIC) { - slave1.health.illness = slave2.health.illness; - } +globalThis.hasOutsideContact = function(slave) { + /** @type {Job[]} */ + const jobsWithOutsideContact = [Job.BODYGUARD, Job.DJ, Job.MADAM, Job.ARCADE, Job.GLORYHOLE, Job.CLUB, Job.PUBLIC, Job.WHORE, Job.BROTHEL]; + if (V.recruiterTarget === "other arcologies") { + jobsWithOutsideContact.push(Job.RECRUITER); + } + return jobsWithOutsideContact.includes(slave.assignment); +}; + +/** Once a new illness is rolled this determines how bad it is initially, chem levels seriously increase the chances of a higher initial value. Health also factors in with weakened slaves being more likely to catch ill. + * @param {App.Entity.SlaveState} slave + */ +globalThis.getIll = function(slave) { + const H = slave.health; + if (V.week <= 8) { + // new game protection: do not directly spawn any transmissible illnesses for the first 8 weeks + H.illness = 1; + } else { + const illness = jsRandom(1, 6) + jsRandom(1, 6) + jsRandom(1, 6) - Math.trunc(slave.chem / 150) + Math.trunc(H.condition / 25); + if (illness < 4) { + H.illness = 5; // 0.5% chance + } else if (illness < 5) { + H.illness = 4; // 1.4% chance + } else if (illness < 6) { + H.illness = 3; // 2.7% chance + } else if (illness < 8) { + H.illness = 2; // 11.6% chance + } else { + H.illness = 1; // 83.8% chance } } - return ` ${slave1.slaveName} has caught ${slave2.slaveName}'s sickness.`; }; -/** - * Once a new illness is rolled this determines how bad it is initially, chem levels seriously increase the chances of a higher initial value +/** Reduce slave need if ill or tired * @param {App.Entity.SlaveState} slave * @returns {void} */ globalThis.poorHealthNeedReduction = function(slave) { - // Slave .need reduction if ill or tired if (slave.energy > 20) { slave.need = Math.trunc(slave.need * healthPenalty(slave)); } @@ -210,8 +269,8 @@ globalThis.poorHealthNeedReduction = function(slave) { */ globalThis.nurseEffectiveness = function(slave) { const H = slave.health; - const clinicUpgrade = 1; // Creating a purchasable upgrade to increase the amount of slaves the nurse can handle -- TODO - const clinicScreening = 1; // Assumes the clinic is set to screening all slaves to improve their chances of staying healthy. Turning it off would allow the nurse to focus on just her patients in the clinic -- TODO + const clinicUpgrade = 1 + (V.clinicUpgradePathogenSequencer || 0); + const clinicScreening = V.clinicRegularCheckups || 0; if (S.Nurse) { const nurseSkill = App.Data.Careers.Leader.nurse.includes(S.Nurse.career) ? 200 : S.Nurse.skill.nurse; let nurseEffectiveness = Math.trunc((nurseSkill * clinicUpgrade / Math.max((App.Entity.facilities.clinic.employeesIDs().size * 10 + (V.slaves.length * 2) * clinicScreening), 1)) * 20); @@ -225,7 +284,7 @@ globalThis.nurseEffectiveness = function(slave) { } else { return 20; } - } else if (H.illness < 2) { // reasonably ill slaves get no benefit from the nurse unless they are in the clinic, otherwise she can provide benefits to prevent illness in the first place and clearing up illnesses of level 1 + } else if (H.illness < 2 && (clinicScreening || slave.assignment === Job.CLINIC)) { // reasonably ill slaves get no benefit from the nurse unless they are in the clinic, otherwise she can provide benefits to prevent illness in the first place and clearing up illnesses of level 1 nurseEffectiveness = Math.trunc(nurseEffectiveness / 4); if (nurseEffectiveness < 5) { return nurseEffectiveness; @@ -233,9 +292,8 @@ globalThis.nurseEffectiveness = function(slave) { return 5; } } - } else { - return 0; } + return 0; }; /** diff --git a/src/facilities/clinic/clinic.js b/src/facilities/clinic/clinic.js index fb3910da00f7e28414de4ad4f128d6c6cf2d8d45..e3646c449340359cc11dc3b432a368209541dded 100644 --- a/src/facilities/clinic/clinic.js +++ b/src/facilities/clinic/clinic.js @@ -6,6 +6,7 @@ App.Facilities.Clinic.clinic = class Clinic extends App.Facilities.Facility { V.clinicDecoration = "standard"; V.clinicUpgradeScanner = 0; V.clinicUpgradeFilters = 0; + V.clinicUpgradePathogenSequencer = 0; V.clinicUpgradePurge = 0; V.clinicInflateBelly = 0; V.clinicSpeedGestation = 0; @@ -134,6 +135,29 @@ App.Facilities.Clinic.clinic = class Clinic extends App.Facilities.Facility { }, ], }, + { + property: "clinicUpgradePathogenSequencer", + tiers: [ + { + value: 0, + upgraded: 1, + text: `It includes standard diagnostics equipment for common pathogens.`, + link: `Install an automated sequencer connected to the Gene Lab to help identify disease-causing pathogen.`, + cost: 30000 * V.upgradeMultiplierArcology * Math.min(V.upgradeMultiplierMedicine, V.HackingSkillMultiplier), + note: ` and helps prevent and fight illness in large slave populations.`, + prereqs: [ + () => V.geneticMappingUpgrade > 0 + ] + }, + { + value: 1, + text: `A rack of advanced rapid genetic sequencing equipment is connected to the Gene Lab and an extensive database of pathogen genes to help diagnose and fight disease outbreaks.`, + nodes: !S.Nurse + ? [`However, without a nurse in attendance, the <span class="yellow">pathogen sequencer remains idle.</span>`] + : null, + } + ], + }, { property: "clinicUpgradePurge", tiers: [ @@ -207,6 +231,24 @@ App.Facilities.Clinic.clinic = class Clinic extends App.Facilities.Facility { }, ], }, + { + property: "clinicRegularCheckups", + prereqs: [ + () => !!S.Nurse, + ], + options: [ + { + get text() { return `${S.Nurse.slaveName} will prioritize helping the patients in ${V.clinicName} over performing checkups on the rest of your slaves. Slaves in ${V.clinicName} will recover faster, but illnesses may start and spread rapidly in other facilities.`; }, + link: `Stop regular checkups`, + value: 0, + }, + { + get text() { return `${S.Nurse.slaveName} will perform regular checkups on all your slaves in addition to treating the patients in ${V.clinicName}. This helps prevent new illnesses from gaining a foothold and spreading, but patients in ${V.clinicName} will recover more slowly.`; }, + link: `Perform regular checkups`, + value: 1, + }, + ], + }, { property: "clinicSpeedGestation", prereqs: [ diff --git a/src/gui/Encyclopedia/encyclopedia.tw b/src/gui/Encyclopedia/encyclopedia.tw index b1e643e14e4025dcbe8fa525de0732c505286759..60ceda22c95ddbbe4ef9d18351a524fa381683da 100644 --- a/src/gui/Encyclopedia/encyclopedia.tw +++ b/src/gui/Encyclopedia/encyclopedia.tw @@ -204,7 +204,7 @@ SLAVE ASSIGNMENTS: <<case "Nurse">> - An ''Nurse'' can be selected once the <<= App.Encyclopedia.Dialog.linkSC("Clinic", "Clinic")>> facility is built. Nurses increase <<= App.Encyclopedia.Dialog.linkSC("health", "Health")>> gains in the Clinic. Good Nurses are <<= App.Encyclopedia.Dialog.linkSC("nymphomaniacs", "Nymphomania")>>, highly @@.cyan;intelligent,@@ physically fit, and very beautiful. + An ''Nurse'' can be selected once the <<= App.Encyclopedia.Dialog.linkSC("Clinic", "Clinic")>> facility is built. Nurses increase <<= App.Encyclopedia.Dialog.linkSC("health", "Health")>> gains in the Clinic, and play a major role in the prevention and treatment of illness among slaves. Good Nurses are <<= App.Encyclopedia.Dialog.linkSC("nymphomaniacs", "Nymphomania")>>, highly @@.cyan;intelligent,@@ physically fit, and very beautiful. <<case "Recruiter">> @@ -797,7 +797,7 @@ ARCOLOGY FACILITIES <<case "Clinic">> - The ''Clinic'' is one of two //<<= App.Encyclopedia.Dialog.linkSC("Rest", "Rest")>> facilities;// it focuses on slaves' health. The Clinic will treat slaves until they are <<= App.Encyclopedia.Dialog.linkSC("Healthy", "Health")>>. The Clinic can be furnished according to <<= App.Encyclopedia.Dialog.linkSC("future society", "Future Societies")>> styles, and doing so will add a slight @@.hotpink;<<= App.Encyclopedia.Dialog.linkSC("devotion", "From Rebellious to Devoted")>>@@ boost to slaves getting treatment there. + The ''Clinic'' is one of two //<<= App.Encyclopedia.Dialog.linkSC("Rest", "Rest")>> facilities;// it focuses on slaves' health. The Clinic will treat slaves until they are <<= App.Encyclopedia.Dialog.linkSC("Healthy", "Health")>>, and will cure both injuries and illness. The Clinic can be furnished according to <<= App.Encyclopedia.Dialog.linkSC("future society", "Future Societies")>> styles, and doing so will add a slight @@.hotpink;<<= App.Encyclopedia.Dialog.linkSC("devotion", "From Rebellious to Devoted")>>@@ boost to slaves getting treatment there. <<case "Club">> diff --git a/src/gui/Encyclopedia/encyclopediaSlaves.js b/src/gui/Encyclopedia/encyclopediaSlaves.js index af9b6947ea96b509b5936190e368824c8826fdf5..72c4872778f4940c20e9e74e7d1b72514fdf25b4 100644 --- a/src/gui/Encyclopedia/encyclopediaSlaves.js +++ b/src/gui/Encyclopedia/encyclopediaSlaves.js @@ -142,6 +142,13 @@ App.Encyclopedia.addArticle("Health", function() { r.push(App.UI.DOM.combineNodes(App.Encyclopedia.Dialog.linkDOM("Clinic", "Clinic"), ".")); r.push("Keeping slaves in good condition goes a long way to preventing too many issues, but one thing to be aware of is that chemical carcinogen buildup is particularly dangerous and can cause illnesses to become quite serious. A simple illness may be harmless but once a slave is seriously ill their condition will rapidly deteriorate."); App.Events.addParagraph(f, r); + r = []; + r.push("Slaves with serious illness left in their normal workplaces will also spread that illness to other slaves they come into contact with; this can be prevented by quarantining them in the Clinic."); + r.push(App.Encyclopedia.Dialog.linkDOM("Preventatives", "Drugs and Their Effects")); + r.push("are another effective way to limit the introduction and transmission of illness in your arcology; since slaves in"); + r.push(App.Encyclopedia.Dialog.linkDOM("assignments", "Slave Assignments")); + r.push("with contact with the outside world (such as whores and public sluts) are much more likely than others to contract new illnesses, placing those slaves on a regimen of preventatives can improve your long-term profits."); + App.Events.addParagraph(f, r); return f; }, "slaves"); diff --git a/src/npc/generate/lawCompliance.js b/src/npc/generate/lawCompliance.js index 0fb062f5d56f430e3e189f873380b3a90f0734f7..4188dcf278aa99acf7f7b315383b9be09655f3e8 100644 --- a/src/npc/generate/lawCompliance.js +++ b/src/npc/generate/lawCompliance.js @@ -151,7 +151,7 @@ App.Desc.lawCompliance = function(slave, market = 0) { function FSSlimnessEnthusiastSMR() { slave.weight = jsRandom(-80, 0); - setHealth(slave, jsRandom(50, 90), 0, undefined, 5); + setHealth(slave, jsRandom(50, 90), 0, undefined, 0, 5); return `${He} has been kept on a rigorous diet for sale, has been required to exercise regularly, and has had excellent care taken of ${his} health.`; } @@ -208,7 +208,7 @@ App.Desc.lawCompliance = function(slave, market = 0) { r.push(`lifting weights,`); } r.push(`and ${his} health has been raised to an almost unnatural level.`); - setHealth(slave, jsRandom(50, 90), 0, undefined, 5); + setHealth(slave, jsRandom(50, 90), 0, undefined, 0, 5); slave.weight = jsRandom(-20, 0); return r.join(" "); }