From 9fa5edddde08ab3719b66ca860e97af20436f702 Mon Sep 17 00:00:00 2001 From: Pregmodder <pregmodder@gmail.com> Date: Wed, 15 Jan 2020 16:32:44 -0500 Subject: [PATCH] illness overhauling --- Changelog.txt | 3 + src/endWeek/healthFunctions.js | 110 +++++++++++++------- src/events/intro/introSummary.tw | 8 ++ src/facilities/farmyard/farmyardReport.tw | 6 +- src/facilities/nursery/nurseryWidgets.js | 2 + src/init/storyInit.tw | 1 + src/pregmod/saAgent.tw | 2 + src/uncategorized/arcadeReport.tw | 2 + src/uncategorized/brothelReport.tw | 6 +- src/uncategorized/cellblockReport.tw | 6 +- src/uncategorized/clinicReport.tw | 6 +- src/uncategorized/clubReport.tw | 6 +- src/uncategorized/dairyReport.tw | 6 +- src/uncategorized/fullReport.tw | 4 +- src/uncategorized/masterSuiteReport.tw | 4 +- src/uncategorized/options.tw | 8 ++ src/uncategorized/saLiveWithHG.tw | 4 +- src/uncategorized/saLongTermEffects.tw | 20 ++++ src/uncategorized/schoolroomReport.tw | 6 +- src/uncategorized/servantsQuartersReport.tw | 4 + src/uncategorized/spaReport.tw | 6 +- 21 files changed, 171 insertions(+), 49 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 524c3d0759b..d1850031f81 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -4,8 +4,11 @@ Pregmod 2 -tiredness overhauled + -illness tweaked -slave performance listing + -reminder system -expanded racial eye, hair and skin color ranges + -royal blood event can now use real dynasties -various fixes and balance changes 12/26/2019 diff --git a/src/endWeek/healthFunctions.js b/src/endWeek/healthFunctions.js index ec90fce1d1f..a5267015401 100644 --- a/src/endWeek/healthFunctions.js +++ b/src/endWeek/healthFunctions.js @@ -47,104 +47,138 @@ Health - chemical carcinogens (more serious illness chance with high carcinogen levels) - age (long term damge takes care of older slaves, the young ones need a specific vulnerability) - use of curatives - - assignment (rest, clinic, spa and master suite) + - assignment (rest, clinic, spa and master suite less likely, whoring, slutting and goloryholes more likely.) - random chance + Can be blocked with preventatives. */ /** * @param {App.Entity.SlaveState} slave - * @returns {void} + * @returns {string} */ window.illness = function illness(slave) { const random = jsRandom(1, 100); // high rolls are good const H = slave.health; + let r = ``; let assignBonus = 0; // bonus for healthy assignments + + let he, him, his, hers, himself, girl, loli, He, His; + ({ + he, him, his, hers, himself, girl, He, His, loli + } = getPronouns(slave)); + let sicknessDegree = ["fine", "minor illness", "illness", "bad illness", "severe illness", "life-threatening illness"]; + // On the macro side of things disease could also happen to the acrology'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 === "live with your agent" || slave.assignment === "be your agent") { - return; + if (H.illness !== 0) { + H.illness = 0; + } + return r; } // Let's make sure agents don't get sick and accidentally die, they should take care of themselves if (slave.assignment === "get treatment in the clinic") { - assignBonus += 30; - } else if (slave.assignment === "rest in the spa") { + assignBonus += 40; + } else if (slave.assignment === "rest in the spa" || slave.assignment === "rest") { assignBonus += 20; - } else if (slave.assignment === "rest" || slave.assignment === "serve in the master suite" || slave.assignment === "please you") { + } else if ((slave.assignment === "serve in the master suite" || slave.assignment === "please you") && V.PC.skill.medicine >= 40) { + assignBonus += 10; + } else if (setup.nurseCareers.includes(slave.career) || slave.skill.nurse >= 100 || 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 + 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="red">${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="red">makes an attempt to claim ${his} life.</span>`; } } else { getIll(slave); + if (H.illness > 0) { + r += ` ${He} has come down with <span class="red">${addA(sicknessDegree[H.illness])}.</span>`; + } } } else if (random > 95) { // There is always a 5% chance of a slave getting better H.illness -= 1; if (H.illness < 0) { H.illness = 0; improveCondition(slave, 5); + r += ` <span class="green">${His} sickness has waned</span> and ${he} now feels better.`; + } else { + r += ` ${His} immune system <span class="green">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; - + // When ill, a slave has a 60% chance of getting better the next week at complete default, 70% with a favourable 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) / 3) + bonus_modifiers > 40 / Math.clamp(slave.curatives, 1, 2)) { - if (nurse_effectiveness > 30 && jsRandom(1, 2) === 2 && H.illness > 1) { // A particularly effective nurse can improve illness faster + if (nurse_effectiveness > 30 && (jsRandom(1, 2) === 2 || slave.assignment === "get treatment in the clinic") && H.illness > 1) { // A particularly effective nurse can improve illness faster H.illness -= 2; + r += ` ${V.Nurse.slaveName} <span class="green">successfully treats</span> ${his} illness.`; } else { H.illness -= 1; + r += ` ${His} body <span class="green">fights back</span> against ${his} illness.`; } - } else if (((Math.min(health_adjusted, 50) + age_modifier) / 3) + bonus_modifiers < 30 / Math.min(slave.curatives + 1, 2)) { // Chance of getting ill 30% at complete default, 20% with a favourable assignment, 15% with curatives or preventatives, 10% with both measures active and a small benefit from effective Nurse screening - if (H.illness > 0) { - H.illness += 1 + Math.trunc((slave.chem / 10 + jsRandom(1, 50) + 15) / 100); - if (H.illness > 5) { - healthDamage(slave, 20 * (H.illness - 5)); - H.illness = 5; + if (H.illness === 0) { + r += ` ${He} no longer <span class="green">shows any signs</span> of ${his} previous sickness.`; + } + } else if (H.illness === 0) { + if (["guard you", "be the DJ", "be the Madam", "be confined in the arcade", "work a glory hole", "serve in the club", "serve the public", "whore", "work in the brothel"].includes(slave.assignment)) { // Limit to outside jobs only + if (((Math.min(health_adjusted, 50) + age_modifier) / 3) + bonus_modifiers < 30 / Math.min(slave.curatives + 1, 2)) { // Chance of getting ill 30% at complete default, 20% with a favourable assignment, 15% with curatives or preventatives, 10% with both measures active and a small benefit from effective Nurse screening + getIll(slave); + r += ` ${He} has come down with <span class="red">${addA(sicknessDegree[H.illness])}.</span>`; } - } else { - getIll(slave); } + } else { + healthDamage(slave, (H.illness)); + r += ` ${He} <span class="red">suffers under ${his} ${sicknessDegree[H.illness]}.</span>`; } + /* 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 + * 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 * @returns {void} */ -window.poorHealthNeedReduction = function poorHealthNeedReduction(slave) { - // Slave .need reduction if ill or tired - if (slave.energy > 20) { - slave.need = Math.trunc(slave.need * healthPenalty(slave)); +window.getIll = function getIll(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) { + if (slave.assignment !== "get treatment in the 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 + } + } + } } }; /** - * 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. + * Once a new illness is rolled this determines how bad it is initially, chem levels seriously increase the chances of a higher initial value * @param {App.Entity.SlaveState} slave * @returns {void} */ -window.getIll = function getIll(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 (slave.curatives !== 1) { - 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 - } +window.poorHealthNeedReduction = function poorHealthNeedReduction(slave) { + // Slave .need reduction if ill or tired + if (slave.energy > 20) { + slave.need = Math.trunc(slave.need * healthPenalty(slave)); } }; diff --git a/src/events/intro/introSummary.tw b/src/events/intro/introSummary.tw index 5618518cf76..b6005210e4c 100644 --- a/src/events/intro/introSummary.tw +++ b/src/events/intro/introSummary.tw @@ -409,6 +409,14 @@ __''Content settings''__ <</options>> <</if>> +<br> +<<options $seeIllness>> + <<option 1 "Enable">> + Slaves ''will'' be able to get sick. + <<option 0 "Disable">> + Slaves ''will not'' be able to get sick. +<</options>> + <br> <<options $seePreg>> <<option 1 "Enable">> diff --git a/src/facilities/farmyard/farmyardReport.tw b/src/facilities/farmyard/farmyardReport.tw index d80fb9cbea7..4c81eb09aab 100644 --- a/src/facilities/farmyard/farmyardReport.tw +++ b/src/facilities/farmyard/farmyardReport.tw @@ -177,6 +177,7 @@ ''__@@.pink;<<= SlaveFullName($slaves[_FLs])>>@@__'' is serving as the Farmer. <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -186,7 +187,8 @@ <br><<include "SA devotion">> <<else>> <<silently>> - <<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>> + <<run saChoosesOwnClothes($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -254,6 +256,7 @@ <br> $He <<= saWorkTheFarm($slaves[$i])>> <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -266,6 +269,7 @@ <<include "SA chooses own job">> <<run saWorkTheFarm($slaves[$i])>> <<run saChoosesOwnClothes($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> diff --git a/src/facilities/nursery/nurseryWidgets.js b/src/facilities/nursery/nurseryWidgets.js index 46eed76b34e..be2203b2895 100644 --- a/src/facilities/nursery/nurseryWidgets.js +++ b/src/facilities/nursery/nurseryWidgets.js @@ -19122,6 +19122,7 @@ App.Facilities.Nursery.nurseryReport = function nurseryReport() { /* 000-250-006 */ r += `<strong><u><span class="pink">${SlaveFullName(Matron)}</span></u></strong> is serving as the Matron in ${V.nurseryName}.`; r += `${saChoosesOwnClothes(Matron)}`; + r += `${illness(Matron)}`; r += `<<include "SA rules">>`; r += `<<include "SA diet">>`; r += `<<include "SA long term effects">>`; @@ -19132,6 +19133,7 @@ App.Facilities.Nursery.nurseryReport = function nurseryReport() { } else { r += `<<silently>> ${saChoosesOwnClothes(Matron)} + ${illness(Matron)} <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index 6c547f1b0a9..399aa1ded8d 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -249,6 +249,7 @@ You should have received a copy of the GNU General Public License along with thi <<set $seeDicksAffectsPregnancy = 1>> <<set $seeRace = 1>> <<set $seeNationality = 1>> + <<set $seeIllness = 1>> <<set $seeImages = 0>> <<set $seeFaces = 1>> <<set $seeAvatar = 1>> diff --git a/src/pregmod/saAgent.tw b/src/pregmod/saAgent.tw index 6770da9087a..3e3ebaec442 100644 --- a/src/pregmod/saAgent.tw +++ b/src/pregmod/saAgent.tw @@ -525,3 +525,5 @@ <<if ($slaves[$i].hStyle != "shaved" && $slaves[$i].bald != 1 && $slaves[$i].haircuts == 0) && ($slaves[$i].hLength < 150)>> <<set $slaves[$i].hLength += 1>> <</if>> + +<<set $slaves[$i].illness = 0>> diff --git a/src/uncategorized/arcadeReport.tw b/src/uncategorized/arcadeReport.tw index 9109e9ce480..d83fd0e4a80 100644 --- a/src/uncategorized/arcadeReport.tw +++ b/src/uncategorized/arcadeReport.tw @@ -141,6 +141,7 @@ <</if>> <<if $showEWD != 0>> <br> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -150,6 +151,7 @@ <br><<include "SA devotion">> <<else>> <<silently>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> diff --git a/src/uncategorized/brothelReport.tw b/src/uncategorized/brothelReport.tw index 2d3cc559c19..0e869227970 100644 --- a/src/uncategorized/brothelReport.tw +++ b/src/uncategorized/brothelReport.tw @@ -194,6 +194,7 @@ ''__@@.pink;<<= SlaveFullName($slaves[_FLs])>>@@__'' is serving as the Madam. <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -203,7 +204,8 @@ <br><<include "SA devotion">> <<else>> <<silently>> - <<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>> + <<run saChoosesOwnClothes($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -315,6 +317,7 @@ <br> $He <<= saWhore($slaves[$i])>> <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -327,6 +330,7 @@ <<include "SA chooses own job">> <<run saWhore($slaves[$i])>> <<run saChoosesOwnClothes($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> diff --git a/src/uncategorized/cellblockReport.tw b/src/uncategorized/cellblockReport.tw index efe83704b61..48edbce1108 100644 --- a/src/uncategorized/cellblockReport.tw +++ b/src/uncategorized/cellblockReport.tw @@ -138,6 +138,7 @@ ''__@@.pink;<<= SlaveFullName($slaves[$i])>>@@__'' is serving as the Wardeness in $cellblockName. <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -147,7 +148,8 @@ <br><<include "SA devotion">> <<else>> <<silently>> - <<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>> + <<run saChoosesOwnClothes($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -261,6 +263,7 @@ <</if>> <br> $He <<= saStayConfined($slaves[$i])>> <br> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -272,6 +275,7 @@ <<silently>> <<include "SA chooses own job">> <<run saStayConfined($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> diff --git a/src/uncategorized/clinicReport.tw b/src/uncategorized/clinicReport.tw index 944f7d80d15..b552abcc951 100644 --- a/src/uncategorized/clinicReport.tw +++ b/src/uncategorized/clinicReport.tw @@ -213,6 +213,7 @@ ''__@@.pink;<<= SlaveFullName($slaves[_FLs])>>@@__'' is serving as the clinical nurse. <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -222,7 +223,8 @@ <br><<include "SA devotion">> <<else>> <<silently>> - <<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>> + <<run saChoosesOwnClothes($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -334,6 +336,7 @@ <</if>> <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -346,6 +349,7 @@ <<include "SA chooses own job">> <<run saRest($slaves[$i])>> <<run saChoosesOwnClothes($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> diff --git a/src/uncategorized/clubReport.tw b/src/uncategorized/clubReport.tw index aa5020c22c2..eaab937350d 100644 --- a/src/uncategorized/clubReport.tw +++ b/src/uncategorized/clubReport.tw @@ -120,6 +120,7 @@ ''__@@.pink;<<= SlaveFullName($slaves[_FLs])>>@@__'' is performing as the DJ in $clubName. <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -129,7 +130,8 @@ <br><<include "SA devotion">> <<else>> <<silently>> - <<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>> + <<run saChoosesOwnClothes($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -227,6 +229,7 @@ <br> $He <<= saServeThePublic($slaves[$i])>> <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -239,6 +242,7 @@ <<include "SA chooses own job">> <<run saServeThePublic($slaves[$i])>> <<run saChoosesOwnClothes($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> diff --git a/src/uncategorized/dairyReport.tw b/src/uncategorized/dairyReport.tw index 3c6e3066795..066a5693e47 100644 --- a/src/uncategorized/dairyReport.tw +++ b/src/uncategorized/dairyReport.tw @@ -292,6 +292,7 @@ ''__@@.pink;<<= SlaveFullName($slaves[_FLs])>>@@__'' is serving as your Milkmaid. <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -301,7 +302,8 @@ <br><<include "SA devotion">> <<else>> <<silently>> - <<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>> + <<run saChoosesOwnClothes($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -398,6 +400,7 @@ <</if>> <br> $He <<= saGetMilked($slaves[$i])>> <br> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -409,6 +412,7 @@ <<silently>> <<include "SA chooses own job">> <<run saGetMilked($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> diff --git a/src/uncategorized/fullReport.tw b/src/uncategorized/fullReport.tw index 125f996f967..1f2ce0a6b26 100644 --- a/src/uncategorized/fullReport.tw +++ b/src/uncategorized/fullReport.tw @@ -64,8 +64,9 @@ <<if $showEWD == 0>> <<silently>> + <<run illness($slaves[$i])>> <<include "SA rules">> - <<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>> + <<run saChoosesOwnClothes($slaves[$i])>> <<include "SA diet">> <<include "SA long term effects">> <<include "SA drugs">> @@ -73,6 +74,7 @@ <<include "SA rivalries">> <</silently>> <<else>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<= saChoosesOwnClothes($slaves[$i])>> <<include "SA diet">> diff --git a/src/uncategorized/masterSuiteReport.tw b/src/uncategorized/masterSuiteReport.tw index c4bf79331c3..522b3a5720f 100644 --- a/src/uncategorized/masterSuiteReport.tw +++ b/src/uncategorized/masterSuiteReport.tw @@ -375,6 +375,7 @@ <</if>> <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -391,7 +392,8 @@ <<run saGetMilked($slaves[$i])>> <<set $servantMilkersMultiplier = 1>> <</if>> - <<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>> + <<run saChoosesOwnClothes($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> diff --git a/src/uncategorized/options.tw b/src/uncategorized/options.tw index 8d46688a401..4dd2e28410d 100644 --- a/src/uncategorized/options.tw +++ b/src/uncategorized/options.tw @@ -398,6 +398,14 @@ This save was created using FC version $ver build $releaseID. <<option 5 "Very Hard">> <</options>> + <<options $seeIllness>> + Slaves falling ill is currently + <<option 1 "Enabled">> + <<option 0 "Disabled">> + <<comment>> + Will not affect existing ill slaves already in-game. + <</options>> + <<options $seeExtreme>> Extreme content like amputation is currently <<option 1 "Enabled">> diff --git a/src/uncategorized/saLiveWithHG.tw b/src/uncategorized/saLiveWithHG.tw index 755a936d2a6..cdfd16aafd5 100644 --- a/src/uncategorized/saLiveWithHG.tw +++ b/src/uncategorized/saLiveWithHG.tw @@ -1011,7 +1011,8 @@ <<if $showEWD == 0>> <<silently>> - /*<<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>>*/ + /*<<run saChoosesOwnClothes($slaves[$i])>>*/ + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -1022,6 +1023,7 @@ <</silently>> <<else>> /*<<= saChoosesOwnClothes($slaves[$i])>>*/ + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw index 968abe7d7e3..764bccc79c7 100644 --- a/src/uncategorized/saLongTermEffects.tw +++ b/src/uncategorized/saLongTermEffects.tw @@ -6621,6 +6621,26 @@ <</if>> <</if>> +<<if $slaves[$i].health.illness > 0 && $slaves[$i].assignment != "get treatment in the clinic">> /* slave attempts to get better*/ +<<if>> +<<if $slaves[$i].health.illness > 1 && ($slaves[$i].assignment != "rest in the spa" && $slaves[$i].assignment != "rest" && $slaves[$i].assignment != "get treatment in the clinic")>> + $He is<<if $slaves[$i].health.illness > 4>> deathly<<elseif $slaves[$i].health.illness > 3>> seriously<</if>> ill + <<if $slaves[$i].devotion < 20>> + and @@.mediumorchid;hates@@ having $his health issues @@.gold;ignored.@@ + <<set $slaves[$i].devotion -= $slaves[$i].health.illness * 2, $slaves[$i].trust -= $slaves[$i].health.illness>> + <<elseif $slaves[$i].devotion < 50 && $slaves[$i].health.illness > 3>> + and @@.mediumorchid;resents@@ not given proper treatment. + <<set $slaves[$i].devotion -= $slaves[$i].health.illness>> + <<else>> + and does $his best to continue with $his duties out of dedication to you, despite being sick. + <</if>> +<<elseif $slaves[$i].health.illness > 1 && $slaves[$i].assignment == "get treatment in the clinic">> + $He is<<if $slaves[$i].health.illness > 4>> deathly<<elseif $slaves[$i].health.illness > 3>> seriously<</if>> ill and receiving appropriate treatment. $He is @@.hotpink;grateful@@ you help $him get well. + <<set $slaves[$i].devotion += 2>> +<<elseif $slaves[$i].health.illness == 1>> + $He is a bit under the weather this week and $his productivity suffers; $he will hopefully recover soon. +<</if>> + <<if $seeAge == 1>> <<if $slaves[$i].visualAge > 15 && $slaves[$i].physicalAge > 15>> <<if $slaves[$i].trust < -20 && $slaves[$i].devotion < -20>> diff --git a/src/uncategorized/schoolroomReport.tw b/src/uncategorized/schoolroomReport.tw index 0852e9b68eb..458d84800d1 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])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -130,7 +131,8 @@ <br><<include "SA devotion">> <<else>> <<silently>> - <<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>> + <<run saChoosesOwnClothes($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -204,6 +206,7 @@ <br> $He <<= saTakeClasses($slaves[$i])>> <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -216,6 +219,7 @@ <<include "SA chooses own job">> <<run saTakeClasses($slaves[$i])>> <<run saChoosesOwnClothes($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> diff --git a/src/uncategorized/servantsQuartersReport.tw b/src/uncategorized/servantsQuartersReport.tw index 3d67aa66625..54db0cb2090 100644 --- a/src/uncategorized/servantsQuartersReport.tw +++ b/src/uncategorized/servantsQuartersReport.tw @@ -194,6 +194,7 @@ ''__@@.pink;<<= SlaveFullName($slaves[_FLs])>>@@__'' is serving as your Stewardess. <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -204,6 +205,7 @@ <<else>> <<silently>> <<run saChoosesOwnClothes($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -290,6 +292,7 @@ <</if>> <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -306,6 +309,7 @@ <<set _SQMilk += $milk, _SQMilkSale += $milkSale>> <</if>> <<run saChoosesOwnClothes($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> diff --git a/src/uncategorized/spaReport.tw b/src/uncategorized/spaReport.tw index 795fe70a1ef..13287bacaf9 100644 --- a/src/uncategorized/spaReport.tw +++ b/src/uncategorized/spaReport.tw @@ -235,6 +235,7 @@ ''__@@.pink;<<= SlaveFullName($slaves[$i])>>@@__'' is serving as the Attendant in $spaName. <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -244,7 +245,8 @@ <br><<include "SA devotion">> <<else>> <<silently>> - <<set _chosenClothes = saChoosesOwnClothes($slaves[$i])>> + <<run saChoosesOwnClothes($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -320,6 +322,7 @@ <</if>> <br> <<= saChoosesOwnClothes($slaves[$i])>> + <<= illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> @@ -332,6 +335,7 @@ <<include "SA chooses own job">> <<run saChoosesOwnClothes($slaves[$i])>> <<run saRest($slaves[$i])>> + <<run illness($slaves[$i])>> <<include "SA rules">> <<include "SA diet">> <<include "SA long term effects">> -- GitLab