diff --git a/src/endWeek/healthFunctions.js b/src/endWeek/healthFunctions.js index ce11266bc87fd7257fcb4dbfe5cb6cfeffb1b233..130edf9dd4203b78e5bf20418af84b388a1c62df 100644 --- a/src/endWeek/healthFunctions.js +++ b/src/endWeek/healthFunctions.js @@ -636,14 +636,32 @@ window.tired = function tired(slave) { } }; +/** + * @param {App.Entity.SlaveState} slave + * @returns {number} + */ +window.restEffects = function restEffects(slave) { + if (!slave.fuckdoll) { + if (slave.assignment === "work a glory hole") { + if (slave.rules.rest === "mandatory") { + return .86; + } else if (slaveResting(slave)) { + return .25; + } else if (slave.tired + 20 >= 90 && !willWorkToDeath(slave)) { + return .10; + } + } + } + return 1; +}; + /** * @param {App.Entity.SlaveState} slave * @returns {void} */ window.tiredFucks = function tiredFucks(slave) { - /* temp disable - if (!slave.fuckdoll && slave.fetish !== "mindbroken") { - if (slave.assignment === "work a glory hole" || slave.assignment === "be confined in the arcade") { + if (!slave.fuckdoll) { + if (slave.assignment === "work a glory hole") { let acceptance = 0; acceptance += Math.trunc(slave.energy / 10); acceptance -= Math.trunc((slave.intelligence + slave.intelligenceImplant) / 10); @@ -655,9 +673,8 @@ window.tiredFucks = function tiredFucks(slave) { } else { slave.health.tired += Math.trunc(slave.sexAmount * (1 + normalRandInt(0, 5) / 100) / 50); } - } else { + } /*else { slave.health.tired += Math.trunc(slave.sexAmount * (1 + normalRandInt(0, 5) / 100) / 25); - } + }*/ } - */ }; diff --git a/src/js/economyJS.js b/src/js/economyJS.js index d46d72ced258a7bc889551645543eeca98a21eb2..f80375f3e8cbcc188b3e6cd09de1c9897ae17792 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -1655,7 +1655,7 @@ window.slaveJobValues = function(lowerClassSexDemandRef, middleClassSexDemandRef // Glory hole slaves adding to 'arcade' V.JobIDArray["work a glory hole"].forEach(ID => { const s = V.slaves[V.slaveIndices[ID]]; - s.sexAmount = Math.trunc((normalRandInt(600, 20) + (4 - s.anus) * 10 + (4 - s.vagina) * 10 + Math.trunc(s.health.condition / 2)) * 0.75); + s.sexAmount = Math.trunc(restEffects(s) * ((normalRandInt(600, 20) + (4 - s.anus) * 10 + (4 - s.vagina) * 10 + Math.trunc(s.health.condition / 2)) * 0.75)); tiredFucks(s); slaveJobValues.arcade += s.sexAmount; }); @@ -1664,7 +1664,6 @@ window.slaveJobValues = function(lowerClassSexDemandRef, middleClassSexDemandRef V.ArcadeiIDs.forEach(ID => { const s = V.slaves[V.slaveIndices[ID]]; s.sexAmount = (normalRandInt(600, 20) + (4 - (s.anus - 2 * V.arcadeUpgradeInjectors)) * 10 + (4 - (s.vagina - 2 * V.arcadeUpgradeInjectors)) * 10 + Math.trunc(s.health.condition / 2)); - tiredFucks(s); slaveJobValues.arcade += s.sexAmount; });