diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 6f30fabf7dfe71a0e8e17111a18613b8dc602c06..d90e4bf6b6772baf9779f2700982cabe384725a9 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 diff --git a/src/js/health.js b/src/js/health.js index 0fe0e9595af614b13c7200b4d86b628e368b9c45..8166608ac9d3730eb519721ff65c93bcdaf20cfb 100644 --- a/src/js/health.js +++ b/src/js/health.js @@ -9,18 +9,7 @@ window.healthPenalty = function healthPenalty(slave) { let penalty = 100; if (slave.assignment !== "work a glory hole") { if (H.illness > 0) { - // penalty *= 1 - (100 - Math.min(Math.pow(H.illness, 2) * 5 + 5, 95)) / 100; Needs checking! - if (H.illness === 5) { - penalty *= 0.10; - } else if (H.illness === 4) { - penalty *= 0.50; - } else if (H.illness === 3) { - penalty *= 0.75; - } else if (H.illness === 2) { - penalty *= 0.90; - } else if (H.illness === 1) { - penalty *= 0.95; - } + penalty *= (100 - Math.min(Math.pow(H.illness, 2) * 5 + 5, 95)) / 100; } if (H.tired > 90) { penalty *= 0.75;