From c6ac94c0c4f891ab75a5d7bef9fb2dcbda20145d Mon Sep 17 00:00:00 2001 From: Jones <> Date: Tue, 7 Apr 2020 21:55:27 +0200 Subject: [PATCH] restEffects --- src/js/economyJS.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 6f30fabf7df..d90e4bf6b67 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -1704,6 +1704,7 @@ window.slaveJobValues = function(lowerClassSexDemandRef, middleClassSexDemandRef function SJVClub(s) { let toTheClub = 0; let beautyMultiplier = 1; + let restEffect = restEffects(s, 15); s.minorInjury = 0; // The beauty multiplier @@ -1785,6 +1786,9 @@ window.slaveJobValues = function(lowerClassSexDemandRef, middleClassSexDemandRef s.sexAmount *= (10 - CL - toTheClubTotal) / 10; } } + if (restEffect != healthPenalty(s)) { + s.sexAmount *= restEffect; + } s.sexAmount = Math.trunc(s.sexAmount * beautyMultiplier); // The effect of sexual acts on tiredness @@ -1816,8 +1820,11 @@ window.slaveJobValues = function(lowerClassSexDemandRef, middleClassSexDemandRef s.sexQuality += 2; clubSpots -= 1; } + if (healthPenalty(s) < restEffect) { + s.sexQuality = Math.trunc(s.sexQuality * healthPenalty(s) / restEffect); + } if (s.assignment !== "recruit girls") { - slaveJobValues.club += s.sexAmount * s.sexQuality * restEffects(s, 15); + slaveJobValues.club += Math.trunc(s.sexAmount * s.sexQuality); } } @@ -2017,6 +2024,9 @@ window.slaveJobValues = function(lowerClassSexDemandRef, middleClassSexDemandRef fuckMin = 60; } + if (initialHealthPenalty != healthPenalty(s)) { + fuckMin *= initialHealthPenalty; + } sexMin = normalRandInt(fuckMin, fuckDev); // The minimum of fucks per week; can increase if needed sexBudget = Math.trunc(targetBudget); // initial maximum price per fuck; can increase if needed while (income > sexBudget * sexMin) { // if the income can not be caught within the initial values of sexMin and sexBudget we increase both as needed in this loop -- GitLab