diff --git a/src/endWeek/healthFunctions.js b/src/endWeek/healthFunctions.js index ce11266bc87fd7257fcb4dbfe5cb6cfeffb1b233..67df7a923975d3d2341b90ee1c759e410c287ada 100644 --- a/src/endWeek/healthFunctions.js +++ b/src/endWeek/healthFunctions.js @@ -636,28 +636,50 @@ window.tired = function tired(slave) { } }; +/** + * @param {App.Entity.SlaveState} slave + * @returns {number} + */ +window.restEffects = function restEffects(slave, exhaustion) { + // exhaustion holds the weekly .tired gain from the assignment. + if (!slave.fuckdoll) { + if (slave.rules.rest === "mandatory") { + return .86; + } else if (slaveResting(slave)) { + return .25; + } else if (slave.tired + exhaustion >= 90 && !willWorkToDeath(slave)) { + return .10; + } else if (slave.tired > 90 && slave.assignment !== "work a glory hole") { + return .75; + } + } + 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") { - let acceptance = 0; - acceptance += Math.trunc(slave.energy / 10); - acceptance -= Math.trunc((slave.intelligence + slave.intelligenceImplant) / 10); - if (slave.fetish === "masochist" || slave.fetish === "humiliation") { - acceptance += Math.trunc(slave.fetishStrength / 10); - } + if (!slave.fuckdoll) { + let acceptance = 0; + acceptance += Math.trunc(slave.energy / 10); + acceptance -= Math.trunc((slave.intelligence + slave.intelligenceImplant) / 10); + if (slave.fetish === "masochist" || slave.fetish === "humiliation") { + acceptance += Math.trunc(slave.fetishStrength / 10); + } + if (slave.assignment === "work a glory hole") { if ((acceptance > 20 && slave.devotion > 20) || slave.sexualFlaw === "self hating") { slave.health.tired += Math.trunc(slave.sexAmount * (1 + normalRandInt(0, 5) / 100) / 100); } else { slave.health.tired += Math.trunc(slave.sexAmount * (1 + normalRandInt(0, 5) / 100) / 50); } - } else { - slave.health.tired += Math.trunc(slave.sexAmount * (1 + normalRandInt(0, 5) / 100) / 25); - } + } /*else { + if ((acceptance > 20 && slave.devotion > 20) || slave.sexualFlaw === "self hating") { + slave.health.tired += Math.trunc(slave.sexAmount * (1 + normalRandInt(0, 5) / 100) / 50); + } else { + slave.health.tired += Math.trunc(slave.sexAmount * (1 + normalRandInt(0, 5) / 100) / 25); + } + }*/ } - */ }; diff --git a/src/endWeek/saWorkAGloryHole.js b/src/endWeek/saWorkAGloryHole.js index a04e53f5970ba94ec61501881d484c1dd3b09d89..6b4a2db418828f10ed8e2068109ef77e12510047 100644 --- a/src/endWeek/saWorkAGloryHole.js +++ b/src/endWeek/saWorkAGloryHole.js @@ -310,7 +310,7 @@ window.saWorkAGloryHole = (function saWorkAGloryHole() { */ function applyFSDecoration(slave) { /* FACILITY DECORATION IMPACTS */ - if (slave.assignment === window.job.ARCADE && V.arcadeDecoration !== "standard") { + if (slave.assignment === window.Job.ARCADE && V.arcadeDecoration !== "standard") { const impact = (0.0001 * V.FSSingleSlaveRep * beauty); switch (V.arcadeDecoration) { case "Roman Revivalist": diff --git a/src/js/economyJS.js b/src/js/economyJS.js index d46d72ced258a7bc889551645543eeca98a21eb2..48d222413d179f9f8f4ae1861068ac92f00c5653 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, 20) * ((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; });