diff --git a/src/endWeek/healthFunctions.js b/src/endWeek/healthFunctions.js index 277e9e68a81efb1b0c04e458d4f24c1b743fcd77..ed04da6dbf0df37a7fd6d00af939a5f61aaf9cfe 100644 --- a/src/endWeek/healthFunctions.js +++ b/src/endWeek/healthFunctions.js @@ -342,6 +342,7 @@ window.tired = function tired(slave) { // let health; let tiredChange; let spaFlag = 0; + let dormPop = V.dormitoryPopulation - V.dormitory; if (!slave.fuckdoll) { // Assignment @@ -427,17 +428,22 @@ window.tired = function tired(slave) { } // Living Conditions + if (slave.rules.living === "luxurious") { + livingRules -= 15; + } else { if (slave.rules.living === "spare") { livingRules -= 2; // Barely reduce tiredness while sleeping in spare conditions - if (V.dormitory < V.dormitoryPopulation) { - livingRules += 8; // Overcrowding penalty + if (dormPop > 10) { // Overcrowding penalty + livingRules += 12; + } else if (dormPop > 5) { + livingRules += 7; } - } else if (slave.rules.living === "luxurious") { - livingRules -= 15; } else { livingRules -= 10; - if (V.dormitory < V.dormitoryPopulation) { - livingRules += 17; // Overcrowding penalty + if (dormPop > 10) { // Overcrowding penalty + livingRules += 15; + } else if (dormPop > 5) { + livingRules += 10; } } diff --git a/src/endWeek/saTakeClasses.js b/src/endWeek/saTakeClasses.js index 069a3719e9cd8db8bec26e45526858ec4d3a97c8..22784e632a82db2458f6e21546e083c0706de96e 100644 --- a/src/endWeek/saTakeClasses.js +++ b/src/endWeek/saTakeClasses.js @@ -22,9 +22,10 @@ window.saTakeClasses = (function saServeThePublic() { he, him, his, hers, himself, girl, He, His, loli } = getPronouns(slave)); - jobPreface(slave); if (slave.fetish !== "mindbroken") { + jobPreface(slave); learningDisability(slave); + jobHealthImpact(slave); learningProgress(slave); if (slave.lactation > 0) { lactationBreak(slave); @@ -34,8 +35,8 @@ window.saTakeClasses = (function saServeThePublic() { if (slave.accent > 1 && slave.voice !== 0) { speechLessons(slave); } - graduation(slave); } + graduation(slave); return r; } @@ -46,6 +47,7 @@ window.saTakeClasses = (function saServeThePublic() { function jobPreface(slave) { if (slave.fetish === "mindbroken") { r += `is no longer mentally capable and <span class="noteworthy">has been dropped from class.</span>`; + slave.health.tired = Math.clamp(slave.health.tired - 10, 0, 100); // Since they avoid the tired call altogether, just toss them some reduction. It's not like they were listening anyway. if (slave.assignment === "take classes") { removeJob(slave, "take classes"); } @@ -97,30 +99,6 @@ window.saTakeClasses = (function saServeThePublic() { slave.trust -= 4; } } - - if (slave.health.illness > 0 || slave.health.tired > 60) { - r += ` ${He} performed worse this week due to<span class="red">`; - 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 > 60) { - r += ` and`; - } - if (slave.health.tired > 90) { - r += ` exhaustion`; - } else if (slave.health.tired > 60) { - r += ` being tired`; - } - r += `.</span>`; - } } } @@ -138,6 +116,54 @@ window.saTakeClasses = (function saServeThePublic() { } } + /** + * @param {App.Entity.SlaveState} slave + * + */ + function jobHealthImpact(slave) { + if (slave.health.illness > 0 || slave.health.tired > 90) { + r += ` ${He} performed worse this week due to<span class="red">`; + if (slave.health.illness === 1) { + r += ` feeling under the weather`; + learning--; + } else if (slave.health.illness === 2) { + r += ` a minor illness`; + learning--; + } else if (slave.health.illness === 3) { + r += ` being sick`; + learning -= 2; + } else if (slave.health.illness === 4) { + r += ` being very sick`; + learning -= 2; + } else if (slave.health.illness === 5) { + r += ` a terrible illness`; + learning -= 3; + } + if (slave.health.illness > 0 && slave.health.tired > 60) { + r += ` and`; + } + if (slave.health.tired > 90) { + r += ` exhaustion`; + learning -= 3; + } else if (slave.health.tired > 60) { + r += ` fatigue`; + learning--; + } + r += `.</span>`; + } + r += ` ${His} lessons are not physically demanding, `; + if (slave.rules.living === "spare") { + r += `allowing ${him} ample rest despite ${his} sparse living conditions.`; + } else { + r += `allowing ${him} ample time for rest.`; + } + if (slave.tired > 80) { + r += ` ${He} still finds ${himself} dozing off during class, however.` + learning--; + } + tired(slave); + } + /** * @param {App.Entity.SlaveState} slave * @@ -226,8 +252,6 @@ window.saTakeClasses = (function saServeThePublic() { 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) { @@ -275,7 +299,7 @@ window.saTakeClasses = (function saServeThePublic() { } else { skillIncrease = (10 + (Math.abs(Math.floor((slave.intelligence + slave.intelligenceImplant) / 32)))); } - for (let lessons = 0; lessons < learning; lessons++) { + for (let lessons = 0; lessons < Math.max(1, learning); lessons++) { if (slave.devotion <= 20 && undevoted === 0) { r += ` Since ${he} is wanting in basic obedience, ${he} suffers through courses on <span class="devotion inc">$his place</span> in the Free Cities world.`; slave.devotion += 10; diff --git a/src/uncategorized/saRules.tw b/src/uncategorized/saRules.tw index 9c2e955729b656a9198236e405e0aeee83579945..29cffbe8c1d149f0139320cf2f718c9938642e7c 100644 --- a/src/uncategorized/saRules.tw +++ b/src/uncategorized/saRules.tw @@ -2965,6 +2965,7 @@ $He is @@.hotpink;very happy@@ with $his private room in the back of $schoolroomName and @@.mediumaquamarine;trusts@@ you a bit more for placing the future education of your slaves in $his <<if !hasAnyArms($slaves[$i])>>figurative <</if>>hand<<if hasBothArms($slaves[$i])>>s<</if>>. <<set $slaves[$i].devotion += 1, $slaves[$i].trust += 1>> + It also helps to offset the tiring nature of $his position. <<if ($universalRulesConsent == 0)>> <<if (_release.slaves === 1)>> diff --git a/src/uncategorized/schoolroomReport.tw b/src/uncategorized/schoolroomReport.tw index 252b5d1c427087443b638988a6bda9304da3519e..b6754a26282d0a435f298b10df9de3fc394653c5 100644 --- a/src/uncategorized/schoolroomReport.tw +++ b/src/uncategorized/schoolroomReport.tw @@ -121,6 +121,7 @@ ''__@@.pink;$slaves[_FLs].slaveName@@__'' is serving as your Schoolteacher. <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<run tired($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -131,6 +132,7 @@ <<else>> <<silently>> <<run saChoosesOwnClothes($slaves[$i])>> + <<run tired($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">>