diff --git a/src/endWeek/saGetMilked.js b/src/endWeek/saGetMilked.js index 9da7b9d0f0b5dc2b3e6b0290e0b3daa829ac9ac5..4a036240cc48cc06f0442482fd63f1f3aa8fbde2 100644 --- a/src/endWeek/saGetMilked.js +++ b/src/endWeek/saGetMilked.js @@ -560,6 +560,30 @@ window.saGetMilked = (function saGetMilked() { r += ` ${His} poor health impedes semen production.`; } + if (slave.health.illness > 0 || slave.health.tired > 50) { + r += ` ${He} performed worse this week due to`; + if (slave.health.illness === 1) { + r += ` feeling under the weather`; + } else if (slave.health.illness === 2) { + r += ` a minor illness`; + } else if (slave.health.illness === 3) { + r += ` being sick`; + } else if (slave.health.illness === 4) { + r += ` being very sick`; + } else if (slave.health.illness === 5) { + r += ` a terrible illness`; + } + if (slave.health.illness > 0 && slave.health.tired > 50) { + r += ` and`; + } + if (slave.health.tired < 80) { + r += ` being tired`; + } else { + r += ` exhaustion`; + } + r += `.`; + } + if (slave.vasectomy === 1) { r += ` ${His} cum lacks the primary ingredient, sperm, thanks to ${his} vasectomy, <span class="red">considerably lowering the value</span> of ${his} ejaculate.`; } else if (slave.ballType === "sterile") { diff --git a/src/endWeek/saRest.js b/src/endWeek/saRest.js index d292d68635a361038105af9371ac43af5fa5c8b8..7ca82781dc1d7b6ec799f888082a86dc00b34aab 100644 --- a/src/endWeek/saRest.js +++ b/src/endWeek/saRest.js @@ -56,6 +56,30 @@ window.saRest = function saRest(slave) { } } + if (slave.health.illness > 0 || slave.health.tired > 50) { + t += ` Since ${he} is`; + if (slave.health.illness === 1) { + t += ` feeling under the weather`; + } else if (slave.health.illness === 2) { + t += ` somewhat ill`; + } else if (slave.health.illness === 3) { + t += ` sick`; + } else if (slave.health.illness === 4) { + t += ` very sick`; + } else if (slave.health.illness === 5) { + t += ` terribly ill`; + } + if (slave.health.illness > 0 && slave.health.tired > 50) { + t += ` and`; + } + if (slave.health.tired < 80) { + t += ` tired`; + } else { + t += ` exhausted`; + } + t += ` ${he} greatly appreciates being allowed to rest.`; + } + if (V.showVignettes === 1 && slave.assignment === Job.REST) { const _vignette = GetVignette(slave); t += ` __This week__ ${_vignette.text} `; diff --git a/src/endWeek/saServant.js b/src/endWeek/saServant.js index 9e741f49aeac7b67ec292b7d78d28dd0f3e1f274..34ee6c9d995e8d95b5a405c7b765e9e9a36ebb58 100644 --- a/src/endWeek/saServant.js +++ b/src/endWeek/saServant.js @@ -33,12 +33,12 @@ window.saServant = function saServant(slave) { } if (!(canHear(slave))) { t += ` However, ${his} inability to hear often leaves ${him} oblivious to ${V.Stewardess.slaveName}'s orders, limiting their meaningful interactions.`; - cashX(V.stewardessBonus / 4, "houseServant", slave); + cashX(V.stewardessBonus / 4 * healthPenalty(slave), "houseServant", slave); } else if ((slave.hears === -1 && slave.earwear !== "hearing aids") || (slave.hears === 0 && slave.earwear === "muffling ear plugs")) { t += ` However, ${he} often doesn't catch what ${V.Stewardess.slaveName} says, leading to frustration, confusion and less work done.`; - cashX(V.stewardessBonus / 2, "houseServant", slave); + cashX(V.stewardessBonus / 2 * healthPenalty(slave), "houseServant", slave); } else { - cashX(V.stewardessBonus, "houseServant", slave); + cashX(V.stewardessBonus * healthPenalty(slave), "houseServant", slave); } } } @@ -63,6 +63,30 @@ window.saServant = function saServant(slave) { t += `so happy to serve your other slaves that ${he} often sees to their needs before they know they have them, and greatly <span class="yellowgreen">reduces the upkeep</span> of your slaves.`; } + if (slave.health.illness > 0 || slave.health.tired > 50) { + r += ` ${He} performed worse this week due to`; + if (slave.health.illness === 1) { + r += ` feeling under the weather`; + } else if (slave.health.illness === 2) { + r += ` a minor illness`; + } else if (slave.health.illness === 3) { + r += ` being sick`; + } else if (slave.health.illness === 4) { + r += ` being very sick`; + } else if (slave.health.illness === 5) { + r += ` a terrible illness`; + } + if (slave.health.illness > 0 && slave.health.tired > 50) { + r += ` and`; + } + if (slave.health.tired < 80) { + r += ` being tired`; + } else { + r += ` exhaustion`; + } + r += `.`; + } + if (slave.rules.release !== "chastity") { const _oral = jsRandom(5, 10); slave.counter.oral += _oral; diff --git a/src/endWeek/saServeThePublic.js b/src/endWeek/saServeThePublic.js index 3beec8e8c9e522817af46ea5114f77135510e8ae..5e112cd441b3d553bb57fc1fbf1e082a0493d2bd 100644 --- a/src/endWeek/saServeThePublic.js +++ b/src/endWeek/saServeThePublic.js @@ -364,6 +364,30 @@ window.saServeThePublic = (function saServeThePublic() { } } + if (slave.health.illness > 0 || slave.health.tired > 50) { + r += ` ${He} performed worse this week due to`; + if (slave.health.illness === 1) { + r += ` feeling under the weather`; + } else if (slave.health.illness === 2) { + r += ` a minor illness`; + } else if (slave.health.illness === 3) { + r += ` being sick`; + } else if (slave.health.illness === 4) { + r += ` being very sick`; + } else if (slave.health.illness === 5) { + r += ` a terrible illness`; + } + if (slave.health.illness > 0 && slave.health.tired > 50) { + r += ` and`; + } + if (slave.health.tired < 80) { + r += ` being tired`; + } else { + r += ` exhaustion`; + } + r += `.`; + } + if (canDoVaginal(slave)) { if (slave.vagina === 0) { if (slave.aphrodisiacs > 1 || slave.inflationType === "aphrodisiac") { diff --git a/src/endWeek/saStayConfined.js b/src/endWeek/saStayConfined.js index ff221a978af3a6e94eafb8149553ebeae69c5936..94b1d3830ea47227948fc90966b236a71ee86295 100644 --- a/src/endWeek/saStayConfined.js +++ b/src/endWeek/saStayConfined.js @@ -47,6 +47,30 @@ window.saStayConfined = function saStayConfined(slave) { t += ` The stress of confinement <span class="red">damages ${his} health.</span>`; healthDamage(slave, 10); + + if (slave.health.illness > 0 || slave.health.tired > 50) { + r += ` ${He} is`; + if (slave.health.illness === 1) { + r += ` feeling under the weather`; + } else if (slave.health.illness === 2) { + r += ` somewhat ill`; + } else if (slave.health.illness === 3) { + r += ` sick`; + } else if (slave.health.illness === 4) { + r += ` very sick`; + } else if (slave.health.illness === 5) { + r += ` terribly ill`; + } + if (slave.health.illness > 0 && slave.health.tired > 50) { + r += ` and`; + } + if (slave.health.tired < 80) { + r += ` tired`; + } else { + r += ` exhausted`; + } + r += ` ${his} misery only grows.`; + } } else { t += `is oblivious to ${his} confinement.`; } diff --git a/src/endWeek/saTakeClasses.js b/src/endWeek/saTakeClasses.js index 89e786b7648b148f489bce234b587961a9285f92..b88d0560dcdcfe36ead97f1e59b05710b0f9cecd 100644 --- a/src/endWeek/saTakeClasses.js +++ b/src/endWeek/saTakeClasses.js @@ -95,6 +95,30 @@ window.saTakeClasses = (function saServeThePublic() { slave.trust -= 4; } } + + if (slave.health.illness > 0 || slave.health.tired > 50) { + r += ` ${He} performed worse this week due to`; + if (slave.health.illness === 1) { + r += ` feeling under the weather`; + } else if (slave.health.illness === 2) { + r += ` a minor illness`; + } else if (slave.health.illness === 3) { + r += ` being sick`; + } else if (slave.health.illness === 4) { + r += ` being very sick`; + } else if (slave.health.illness === 5) { + r += ` a terrible illness`; + } + if (slave.health.illness > 0 && slave.health.tired > 50) { + r += ` and`; + } + if (slave.health.tired < 80) { + r += ` being tired`; + } else { + r += ` exhaustion`; + } + r += `.`; + } } } @@ -199,6 +223,9 @@ window.saTakeClasses = (function saServeThePublic() { } else { r += ` and neither likes you nor is afraid of you,`; } + + learning = Math.trunc(learning * healthPenalty(slave)); + r += ` and ${he} `; if (V.schoolroomRemodelBimbo !== 1 || slave.assignment !== "learn in the schoolroom") { if (learning <= 1) { diff --git a/src/endWeek/saWhore.js b/src/endWeek/saWhore.js index d5588f1349053fa4b8467097acbbd7ff0de4bdbb..f4f807be42120bdcfba0b5c6b30df73d7cb90f9d 100644 --- a/src/endWeek/saWhore.js +++ b/src/endWeek/saWhore.js @@ -426,6 +426,30 @@ window.saWhore = (function saWhore() { } } + if (slave.health.illness > 0 || slave.health.tired > 50) { + r += ` ${He} performed worse this week due to`; + if (slave.health.illness === 1) { + r += ` feeling under the weather`; + } else if (slave.health.illness === 2) { + r += ` a minor illness`; + } else if (slave.health.illness === 3) { + r += ` being sick`; + } else if (slave.health.illness === 4) { + r += ` being very sick`; + } else if (slave.health.illness === 5) { + r += ` a terrible illness`; + } + if (slave.health.illness > 0 && slave.health.tired > 50) { + r += ` and`; + } + if (slave.health.tired < 80) { + r += ` being tired`; + } else { + r += ` exhaustion`; + } + r += `.`; + } + if (canDoVaginal(slave)) { if (slave.vagina === 0) { if (slave.aphrodisiacs > 1 || slave.inflationType === "aphrodisiac") { diff --git a/src/endWeek/saWorkAGloryHole.js b/src/endWeek/saWorkAGloryHole.js index 8733ee46247d6a3b1a996b43531ad7be388c6de8..c875fa0bacd9c8f7566fbf46c736269af9cf9e1f 100644 --- a/src/endWeek/saWorkAGloryHole.js +++ b/src/endWeek/saWorkAGloryHole.js @@ -128,6 +128,30 @@ window.saWorkAGloryHole = (function saWorkAGloryHole() { damageHealth(slave, Math.max(Math.trunc((slave.sexAmount - 400) / 25) + jsRandom(-2, 2), 1)); } + if (slave.health.illness > 0 || slave.health.tired > 50) { + r += ` ${He} is`; + if (slave.health.illness === 1) { + r += ` feeling under the weather`; + } else if (slave.health.illness === 2) { + r += ` somewhat ill`; + } else if (slave.health.illness === 3) { + r += ` sick`; + } else if (slave.health.illness === 4) { + r += ` very sick`; + } else if (slave.health.illness === 5) { + r += ` terribly ill`; + } + if (slave.health.illness > 0 && slave.health.tired > 50) { + r += ` and`; + } + if (slave.health.tired < 80) { + r += ` tired`; + } else { + r += ` exhausted`; + } + r += ` but no one cared.`; + } + if (slave.vagina === 0 && canDoVaginal(slave)) { r += ` A `; if (slave.fuckdoll === 0) { diff --git a/src/js/datatypeCleanupJS.js b/src/js/datatypeCleanupJS.js index 0d496b04151cc968c6b9fb6923034fd7d556fe69..967caf1389a2d2a04233d48c9f70bd6843aac5b7 100644 --- a/src/js/datatypeCleanupJS.js +++ b/src/js/datatypeCleanupJS.js @@ -1695,6 +1695,11 @@ window.PCDatatypeCleanup = function PCDatatypeCleanup() { PC.muscles = Math.clamp(+PC.muscles, -100, 100) || 50; PC.hLength = Math.clamp(+PC.hLength, 0, 150) || 2; PC.voice = Math.clamp(+PC.voice, 1, 3) || 1; + if (typeof PC.health === "number") { + const condition = PC.health; + PC.health = {}; + PC.health.condition = condition; + } PC.health.condition = Math.clamp(PC.health.condition, -100, 100) || 0; if (PC.majorInjury !== undefined) { if (PC.majorInjury > 0) { diff --git a/src/js/descriptionWidgets.js b/src/js/descriptionWidgets.js index e7727e02feaebe603c0e5169457d01730d9958a2..046e7f83e4ce6de9c29fbbd2d760bab2e40911b8 100644 --- a/src/js/descriptionWidgets.js +++ b/src/js/descriptionWidgets.js @@ -361,6 +361,29 @@ App.Desc.ageAndHealth = function(slave) { } else { r += `${He} almost gleams; ${he}'s in the absolute <span class="green">best of health,</span>`; } + if (slave.health.illness > 0 || slave.health.tired > 50) { + r += ` ${He} is currently `; + if (slave.health.illness === 1) { + r += ` feeling under the weather`; + } else if (slave.health.illness === 2) { + r += ` somewhat ill`; + } else if (slave.health.illness === 3) { + r += ` sick`; + } else if (slave.health.illness === 4) { + r += ` very sick`; + } else if (slave.health.illness === 5) { + r += ` terribly ill`; + } + if (slave.health.illness > 0 && slave.health.tired > 50) { + r += ` and`; + } + if (slave.health.tired < 80) { + r += ` tired`; + } else { + r += ` exhausted`; + } + r += `.`; + } age = slave.actualAge + 1; r += ` and ${he}'s `; if (slave.birthWeek >= 52 && V.seeAge) { diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 2f7da914c036be70f38377fdbf304e797fafd75e..4b4cb9a760cc53523eb64091876d50c9ca068476 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -527,6 +527,7 @@ window.calculateCosts = (function() { costs -= rulesCost; } } + costs = Math.trunc(costs * healthPenalty(slave)); return costs; } })(); @@ -1404,7 +1405,7 @@ window.slaveJobValues = function(lowerClassSexDemandRef, middleClassSexDemandRef clubSpots -= 1; } if (s.assignment !== "recruit girls") { - slaveJobValues.club += s.sexAmount * s.sexQuality * healthPenalty(slave); + slaveJobValues.club += s.sexAmount * s.sexQuality * healthPenalty(s); } } diff --git a/src/js/slaveSummaryWidgets.js b/src/js/slaveSummaryWidgets.js index bfc7c5e94bf46fc1341dc93c8d3fb93a947d8d9c..6f17ac47b569d317521d5cb554341f49acafd357 100644 --- a/src/js/slaveSummaryWidgets.js +++ b/src/js/slaveSummaryWidgets.js @@ -67,8 +67,12 @@ window.SlaveSummaryUncached = (function() { } if (V.abbreviateHealth === 1) { short_health(slave, para); + short_illness(slave, para); + short_tired(slave, para); } else if (V.abbreviateHealth === 2) { long_health(slave, para); + long_illness(slave, para); + long_tired(slave, para); } if (V.abbreviateDrugs === 1) { short_drugs(slave, para); @@ -759,6 +763,46 @@ window.SlaveSummaryUncached = (function() { } } + function short_illness(slave, c) { + if (slave.health.illness > 4) { + makeSpan(c, `Ill${slave.health.illness}`, ["red", "strong"], true, slave.health.illness); + } else if (slave.health.illness > 3) { + makeSpan(c, `Ill${slave.health.illness}`, ["red", "strong"], true, slave.health.illness); + } else if (slave.health.illness > 2) { + makeSpan(c, `Ill${slave.health.illness}`, ["red", "strong"], true, slave.health.illness); + } else if (slave.health.illness > 1) { + makeSpan(c, `Ill${slave.health.illness}`, ["yellow", "strong"], true, slave.health.illness); + } + } + + function long_illness(slave, c) { + if (slave.health.illness > 4) { + makeSpan(c, "Terribly ill", ["red", "strong"], true, slave.health.illness); + } else if (slave.health.illness > 3) { + makeSpan(c, "Very ill", ["red", "strong"], true, slave.health.illness); + } else if (slave.health.illness > 2) { + makeSpan(c, "Ill", ["red", "strong"], true, slave.health.illness); + } else if (slave.health.illness > 1) { + makeSpan(c, "Somewhat ill", "yellow", true, slave.health.illness); + } + } + + function short_tired(slave, c) { + if (slave.health.tired > 80) { + makeSpan(c, "Ti", ["red", "strong"], true, slave.health.tired); + } else if (slave.health.tired > 50) { + makeSpan(c, "Ti", "yellow", true, slave.health.tired); + } + } + + function long_tired(slave, c) { + if (slave.health.tired > 80) { + makeSpan(c, "Exhausted", ["red", "strong"], true, slave.health.tired); + } else if (slave.health.tired > 50) { + makeSpan(c, "Tired", "yellow", true, slave.health.tired); + } + } + /** * @param {App.Entity.SlaveState} slave * @param {Node} c