diff --git a/src/js/economyJS.js b/src/js/economyJS.js index 6c77e5e20ffc4b74db841e0692f479b5e6bc570a..324ea171d5a648111d829478f708072db8fb8d28 100644 --- a/src/js/economyJS.js +++ b/src/js/economyJS.js @@ -1141,42 +1141,46 @@ window.slaveJobValues = function() { } // Injuries - if (s.curatives < 1 && s.inflationType !== "curative") { - if (s.health < -50) { - s.health -= 13; - s.minorInjury = 1; - } else if (s.health < -20 && jsRandom(1, 100) > 50) { - s.health -= 10; - s.minorInjury = 1; - } else { - let skilltarget = (100 + ((s.skill.anal - 100)*canDoAnal(s)*(1 + .5*!canDoVaginal(s)) + (s.skill.vaginal - 100)*canDoVaginal(s)*(1 + .5*!canDoAnal(s)) + (s.skill.oral - 100)*(1 + .5*!canDoAnal(s) + .5*!canDoVaginal(s) + !canDoAnal(s)*!canDoVaginal(s)))*3/10); - //Complicated, I know - but it should automatically account for what acts are possible to scale the injury risk smoothly between 90% when totally unskilled - //and 0% when perfectly skilled in the relevant method or methods. - - if (jsRandom(1,100) > skilltarget) { - s.health -= 10 - 7*canDoAnal(s)*canDoVaginal(s); //Any limitations means an injury inflicts the harsher 10 instead of 3 + if (s.assignment === "serve the public" && !toTheClub) { + if (s.curatives < 1 && s.inflationType !== "curative") { + if (s.health < -50) { + s.health -= 13; + s.minorInjury = 1; + } else if (s.health < -20 && jsRandom(1, 100) > 50) { + s.health -= 10; s.minorInjury = 1; + } else { + let canA = canDoAnal(s); + let canV = canDoVaginal(s); + let skilltarget = (100 + ((s.skill.anal - 100)*canA*(1.5 - .5*canV) + (s.skill.vaginal - 100)*canV*(1.5 - .5*canA) + (s.skill.oral - 100)*(3 - 1.5*canA - 1.5*canV + canA*canV))*3/10); + //Complicated, I know - but it should automatically account for what acts are possible to scale the injury risk smoothly between 90% when totally unskilled + //and 0% when perfectly skilled in the relevant method or methods. + + if (jsRandom(1,100) > skilltarget) { + s.health -= 10 - 7*canA*canV; //Any limitations means an injury inflicts the harsher 10 instead of 3 + s.minorInjury = 1; + } } } - } - if (s.minorInjury === 1) { - let injuryChance; - beautyMultiplier -= 0.05; - if (canDoAnal(s)) { - injuryChance = jsRandom(1, 100); - } else { - injuryChance = jsRandom(1, 80); - } - if (injuryChance > 80) { - s.minorInjury = "sore ass"; - } else if (injuryChance > 60) { - s.minorInjury = "black eye"; - } else if (injuryChance > 40) { - s.minorInjury = "split lip"; - } else if (injuryChance > 20) { - s.minorInjury = "bad bruise"; - } else { - s.minorInjury = "sore muscle"; + if (s.minorInjury === 1) { + let injuryChance; + beautyMultiplier -= 0.05; + if (canDoAnal(s)) { + injuryChance = jsRandom(1, 100); + } else { + injuryChance = jsRandom(1, 80); + } + if (injuryChance > 80) { + s.minorInjury = "sore ass"; + } else if (injuryChance > 60) { + s.minorInjury = "black eye"; + } else if (injuryChance > 40) { + s.minorInjury = "split lip"; + } else if (injuryChance > 20) { + s.minorInjury = "bad bruise"; + } else { + s.minorInjury = "sore muscle"; + } } }