diff --git a/src/endWeek/saLongTermEffects.js b/src/endWeek/saLongTermEffects.js index 30e08135f96ab72a79e3432e7513d15dc55c5cb4..f8032c726e3df00bbb1b0d71fd50b5ca1b45bd44 100644 --- a/src/endWeek/saLongTermEffects.js +++ b/src/endWeek/saLongTermEffects.js @@ -106,7 +106,7 @@ App.SlaveAssignment.longTermEffects = (function() { } endWeekHealthDamage(slave); // contained in healthFunctions.js slaveDeath(slave); - if ((slave.hStyle !== "shaved" || slave.hStyle !== "buzzcut" || slave.hStyle !== "trimmed") && slave.bald !== 1 && slave.haircuts === 0) { + if ((slave.hStyle !== "shaved" && slave.hStyle !== "buzzcut" && slave.hStyle !== "trimmed") && slave.bald !== 1 && slave.haircuts === 0) { hairGrowth(slave); } @@ -573,8 +573,8 @@ App.SlaveAssignment.longTermEffects = (function() { if (slave.vagina > -1 && slave.ovaries !== 0 && slave.vaginaLube < 2) { Effects.push("VaginaWetter"); } - rearQuirkDivider = rearQuirk === 0 ? 1 : rearQuirk; - if (((slave.butt - slave.buttImplant) < 2 + rearQuirk) && (slave.geneMods.NCS === 0 || (random(1, 100) > 75 /rearQuirkDivider))) { + let rearQuirkDivider = rearQuirk === 0 ? 1 : rearQuirk; + if (((slave.butt - slave.buttImplant) < 2 + rearQuirk) && (slave.geneMods.NCS === 0 || (random(1, 100) > 75 / rearQuirkDivider))) { Effects.push("ButtBigger"); } if ((boobSize < 500 * gigantomastiaMod) && ((slave.geneMods.NCS === 0) || (random(1, 100) > 75 / gigantomastiaMod))) { @@ -900,7 +900,7 @@ App.SlaveAssignment.longTermEffects = (function() { if (boobSize > 100 && random(1, 100) < 30 / gigantomastiaMod && gigantomastiaMod !== 3) { if (slave.geneMods.NCS === 1 && boobSize > 300 && random(1, 100) > 25 * gigantomastiaMod) { r.push(`Hormonal effects work with ${his} <span class="ncs">NCS</span> and cause <span class="change negative">${his} tits to shrink down.</span>`); - slave.boobs -= 50/_gigantomastiaMod; + slave.boobs -= 50 / gigantomastiaMod; slave.energy += 1; } else { r.push(`${He} feels an <span class="change negative">unusual calmness</span> in ${his} belly and breasts.`); @@ -1110,7 +1110,7 @@ App.SlaveAssignment.longTermEffects = (function() { * */ function inflationEffects(slave) { - if (setup.fakeBellies.includes(_bellyAccessory)) { + if (setup.fakeBellies.includes(slave.bellyAccessory)) { r.push(`${He} has trouble keeping ${himself} full of`); switch (slave.inflationType) { case "cum": @@ -1187,13 +1187,14 @@ App.SlaveAssignment.longTermEffects = (function() { } } } + const seed = random(1, 100); switch (slave.inflationType) { case "cum": case "milk": - if (slave.behavioralFlaw === "none" && slave.behavioralQuirk === "none" && random(1, 100) > 70) { + if (slave.behavioralFlaw === "none" && slave.behavioralQuirk === "none" && seed > 70) { r.push(`Filling ${his} guts with ${slave.inflationType} all week <span class="flaw gain">drives ${him} to gluttony.</span>`); slave.behavioralFlaw = "gluttonous"; - } else if (slave.behavioralFlaw === "none" && slave.behavioralQuirk === "none" && random(1, 100) > 70) { + } else if (slave.behavioralFlaw === "none" && slave.behavioralQuirk === "none" && seed > 40) { if (slave.inflationType === "cum" && slave.fetish === "cumslut") { // cumsluts don't do this } else { @@ -1203,10 +1204,10 @@ App.SlaveAssignment.longTermEffects = (function() { } break; case "food": - if (slave.behavioralFlaw === "none" && slave.behavioralQuirk !== "fitness" && random(1, 100) > 70) { + if (slave.behavioralFlaw === "none" && slave.behavioralQuirk !== "fitness" && seed > 70) { r.push(`Stuffing ${his} face with food all week <span class="flaw gain">drives ${him} to gluttony.</span>`); slave.behavioralFlaw = "gluttonous"; - } else if (slave.behavioralFlaw === "none" && slave.behavioralQuirk !== "fitness" && random(1, 100) > 70) { + } else if (slave.behavioralFlaw === "none" && slave.behavioralQuirk !== "fitness" && seed > 40) { r.push(`Stuffing ${his} face with food all week <span class="flaw gain">drives ${him} to hate eating.</span>`); slave.behavioralFlaw = "anorexic"; } @@ -2181,7 +2182,7 @@ App.SlaveAssignment.longTermEffects = (function() { cashX(donations, "porn", slave); } } else if (slave.porn.feed > 0) { - r.push(V.App.SlaveAssignment.porn(slave)); + r.push(App.SlaveAssignment.porn(slave)); } } diff --git a/src/js/pregJS.js b/src/js/pregJS.js index f49081b8a30702e4bdaf8cd76b999d850386f372..f2e9815317853df463e1a590a65c156c4f815e09 100644 --- a/src/js/pregJS.js +++ b/src/js/pregJS.js @@ -603,3 +603,11 @@ globalThis.TerminatePregnancy = function(slave) { WombFlush(slave); SetBellySize(slave); }; + +/** Return the percentage of pregnancy progress vs the expected pregnancy term for a given slave + * @param {App.Entity.SlaveState} slave + * @returns {number} 0-1 normal range (can exceed 1 for late deliveries) + */ +globalThis.pregProgress = function(slave) { + return slave.preg / slave.pregData.normalBirth; +};