From f47d48253457355f80dc78a7ef05e02deacaaf31 Mon Sep 17 00:00:00 2001 From: Pregmodder <pregmodder@gmail.com> Date: Mon, 30 Dec 2019 18:24:42 -0500 Subject: [PATCH] Genetics lists and some tiredness tweaks --- Changelog.txt | 6 ++++++ src/endWeek/healthFunctions.js | 2 ++ src/js/generateGenetics.js | 30 +++++++++++++++--------------- src/uncategorized/ptWorkaround.tw | 4 ++++ 4 files changed, 27 insertions(+), 15 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 5900b8871b5..8ca757c2fbb 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -2,6 +2,12 @@ Pregmod 0.10.7.1-3.2.x + 2 + -assignment tiredness affected by usage count + -added tiredness clearing to health focused attention + -expanded racial eye, hair and skin color ranges + -various fixes and balance changes + 12/26/2019 1 diff --git a/src/endWeek/healthFunctions.js b/src/endWeek/healthFunctions.js index 20df7e46ba5..7b7647cb581 100644 --- a/src/endWeek/healthFunctions.js +++ b/src/endWeek/healthFunctions.js @@ -267,6 +267,8 @@ window.tired = function tired(slave) { } } else if (slave.assignment === "whore" || slave.assignment === "work in the brothel" || slave.assignment === "work a glory hole" || slave.assignment === "be confined in the arcade" || slave.assignment === "serve the public" || slave.assignment === "serve in the club") { assignment += 0; // These assignments get their tiredness increase from tiredFucks() + } else if (slave.assignment === "be confined in the arcade") { + assignment += normalRandInt(5); // Arcade is a terrible place } else if (slave.assignment === "work as a farmhand") { assignment += normalRandInt(10, 2); // Increases tired by an average of 10 points while on a very demanding assignment } else if (slave.assignment === "be a servant") { diff --git a/src/js/generateGenetics.js b/src/js/generateGenetics.js index 74446470e6d..7e4993b7b1f 100644 --- a/src/js/generateGenetics.js +++ b/src/js/generateGenetics.js @@ -301,17 +301,17 @@ window.generateGenetics = (function() { if (father !== 0) { if (mother.eye.origColor === father.eye.origColor) { eyeColor = mother.eye.origColor; - } else if (mother.eye.origColor === "red" || mother.eye.origColor === "pale red" || mother.eye.origColor === "light red" || mother.eye.origColor === "pale gray" || mother.eye.origColor === "milky white") { + } else if (["light red", "milky white", "pale gray", "pale red", "red"].contains(mother.eye.origColor)) { eyeColor = father.eye.origColor; - } else if (father.eye.origColor === "red" || father.eye.origColor === "pale red" || father.eye.origColor === "light red" || father.eye.origColor === "pale gray" || father.eye.origColor === "milky white") { + } else if (["light red", "milky white", "pale gray", "pale red", "red"].contains(father.eye.origColor)) { eyeColor = mother.eye.origColor; - } else if (mother.eye.origColor === "blue") { + } else if (["blue", "dark blue", "deep blue", "light blue", "light grey"].contains(mother.eye.origColor)) { if (jsRandom(1, 4) === 2) { eyeColor = mother.eye.origColor; } else { eyeColor = father.eye.origColor; } - } else if (father.eye.origColor === "blue") { + } else if (["blue", "dark blue", "deep blue", "light blue", "light grey"].contains(father.eye.origColor)) { if (jsRandom(1, 4) === 2) { eyeColor = father.eye.origColor; } else { @@ -330,15 +330,15 @@ window.generateGenetics = (function() { if (fatherEye !== 0) { if (mother.eye.origColor === fatherEye) { eyeColor = mother.eye.origColor; - } else if (mother.eye.origColor === "red" || mother.eye.origColor === "pale red" || mother.eye.origColor === "light red" || mother.eye.origColor === "pale gray" || mother.eye.origColor === "milky white") { + } else if (["light red", "milky white", "pale gray", "pale red", "red"].contains(mother.eye.origColor)) { eyeColor = fatherEye; - } else if (mother.eye.origColor === "blue") { + } else if (["blue", "dark blue", "deep blue", "light blue", "light grey"].contains(mother.eye.origColor)) { if (jsRandom(1, 4) === 2) { eyeColor = mother.eye.origColor; } else { eyeColor = fatherEye; } - } else if (fatherEye === "blue") { + } else if (["blue", "dark blue", "deep blue", "light blue", "light grey"].contains(fatherEye)) { if (jsRandom(1, 4) === 2) { eyeColor = fatherEye; } else { @@ -415,13 +415,13 @@ window.generateGenetics = (function() { hairColor = jsRandom(1, 100) === 69 ? mother.origHColor : father.origHColor; } else if (father.origHColor === "white") { hairColor = jsRandom(1, 100) === 69 ? father.origHColor : mother.origHColor; - } else if (mother.origHColor === "black") { + } else if (["black", "jet black"].contains(mother.origHColor)) { hairColor = jsEither([father.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor]); - } else if (father.origHColor === "black") { + } else if (["black", "jet black"].contains(father.origHColor)) { hairColor = jsEither([father.origHColor, father.origHColor, father.origHColor, father.origHColor, father.origHColor, father.origHColor, father.origHColor, mother.origHColor]); - } else if (mother.origHColor === "brown") { + } else if (["brown", "chestnut", "chocolate", "dark brown"].contains(mother.origHColor)) { hairColor = jsEither([father.origHColor, mother.origHColor, mother.origHColor, mother.origHColor]); - } else if (father.origHColor === "brown") { + } else if (["brown", "chestnut", "chocolate", "dark brown"].contains(father.origHColor)) { hairColor = jsEither([father.origHColor, father.origHColor, father.origHColor, mother.origHColor]); } else { hairColor = jsEither([father.origHColor, mother.origHColor]); @@ -438,13 +438,13 @@ window.generateGenetics = (function() { hairColor = mother.origHColor; } else if (mother.origHColor === "white") { hairColor = jsRandom(1, 100) === 69 ? mother.origHColor : fatherHair; - } else if (mother.origHColor === "black") { + } else if (["black", "jet black"].contains(mother.origHColor)) { hairColor = jsEither([fatherHair, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor, mother.origHColor]); - } else if (fatherHair === "black") { + } else if (["black", "jet black"].contains(father.origHColor)) { hairColor = jsEither([fatherHair, fatherHair, fatherHair, fatherHair, fatherHair, fatherHair, fatherHair, mother.origHColor]); - } else if (mother.origHColor === "brown") { + } else if (["brown", "chestnut", "chocolate", "dark brown"].contains(mother.origHColor)) { hairColor = jsEither([fatherHair, mother.origHColor, mother.origHColor, mother.origHColor]); - } else if (fatherHair === "brown") { + } else if (["brown", "chestnut", "chocolate", "dark brown"].contains(father.origHColor)) { hairColor = jsEither([fatherHair, fatherHair, fatherHair, mother.origHColor]); } else { hairColor = jsEither([fatherHair, mother.origHColor]); diff --git a/src/uncategorized/ptWorkaround.tw b/src/uncategorized/ptWorkaround.tw index 296957e3b63..c4b8ad3b372 100644 --- a/src/uncategorized/ptWorkaround.tw +++ b/src/uncategorized/ptWorkaround.tw @@ -100,6 +100,10 @@ Your close and expert attention improves $his health in a way drug treatment or mere medical intervention cannot. @@.green;$His health has improved.@@ <<run improveCondition($activeSlave, 10)>> <</if>> + <<if ($activeSlave.health.tired > 10)>> + You watch over $him as $he sleeps, assuring @@.green;a proper night's rest.@@ + <<set $activeSlave.health.tired = Math.clamp($activeSlave.health.tired-10, 0, 1000)>> + <</if>> <<if (($activeSlave.anus == 3) || ($activeSlave.vagina == 3)) && $activeSlave.geneMods.rapidCellGrowth != 1>> $activeSlave.slaveName is a veteran sex slave and has seen hard use. Tightening up a slave is difficult, but with close supervision and attention it can be done. You and your other slaves carefully apply injections, creams, and massage, and $his other work is carefully managed to reduce wear and tear. <<if ($activeSlave.anus == 3) && (random(1,100) > 50)>> -- GitLab