From d3bf8c0ac4d65d3adbfd49f1ebc95d5cea9da25a Mon Sep 17 00:00:00 2001 From: Trashman1138 <11461-Trashman1138@users.noreply.gitgud.io> Date: Thu, 11 Jul 2019 23:13:54 -0700 Subject: [PATCH] Replace saWhore.js --- src/endWeek/saWhore.js | 107 +++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 51 deletions(-) diff --git a/src/endWeek/saWhore.js b/src/endWeek/saWhore.js index 029d9b70211..98752fcf421 100644 --- a/src/endWeek/saWhore.js +++ b/src/endWeek/saWhore.js @@ -470,71 +470,76 @@ window.saWhore = (function saWhore() { r += ` protect ${him} from the wear of whoring.`; } else if (slave.health < -50) { r += ` The stress of whoring while ill is <span class="red">very hard on ${him}.</span>`; - slave.health -= 10; + slave.health -= 13; injury = 1; } else if (slave.health < -20 && jsRandom(1, 100) > 50) { r += ` The stress of whoring while ill is <span class="red">hard on ${him}.</span>`; - slave.health -= 7; + slave.health -= 10; injury = 1; - } else if (slave.vagina < 0) { - if ((slave.skill.anal + slave.skill.oral) >= 200) { - r += ` ${He}'s such an expert whore that ${he} copes with the stress of being a ${SlaveTitle(slave)} slut.`; - } else if (jsRandom(1, 100) > (40 + (10 * (slave.skill.anal + slave.skill.oral)))) { - r += ` The stress of being a ${SlaveTitle(slave)} prostitute is <span class="red">hard on ${him}.</span>`; - slave.health -= 7; + } else { + let canA = canDoAnal(slave); + let canV = canDoVaginal(slave); + let skilltarget = (100 + ((slave.skill.anal - 100)*canA*(1.5 - .5*canV) + (slave.skill.vaginal - 100)*canV*(1.5 - .5*canA) + (slave.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) { + slave.health -= 10 - 7*canA*canV; //Any limitations means an injury inflicts the harsher 10 instead of 3 injury = 1; } - } else if (slave.vagina > 0 && !canDoVaginal(slave)) { - if (canDoAnal(slave)) { - if ((slave.skill.anal + slave.skill.oral) >= 200) { + + if (slave.vagina < 0) { + if (!injury) { + r += ` ${He}'s such an expert whore that ${he} copes with the stress of being a ${SlaveTitle(slave)} slut.`; + } else { + r += ` The stress of being a ${SlaveTitle(slave)} prostitute is <span class="red">hard on ${him}.</span>`; + } + } else if (!canV && canA) { + if (!injury) { r += ` ${He}'s such an expert whore that ${he} copes with the stress of being limited to buttsex and oral.`; - } else if (jsRandom(1, 100) > (40 + (10 * (slave.skill.anal + slave.skill.oral)))) { + } else { r += ` The stress of being limited to buttsex and oral is <span class="red">hard on ${him}.</span>`; - slave.health -= 7; - injury = 1; } - } else { - if (slave.skill.oral >= 100) { + } else if (!canA && canV) { + if (!injury) { + r += ` ${He}'s such an expert whore that ${he} copes with the stress of being limited to vaginal and oral.`; + } else { + r += ` The stress of being limited to vaginal and oral is <span class="red">hard on ${him}.</span>`; + } + } else if (!canA && !canV) { + if (!injury) { r += ` ${He}'s such an expert whore that ${he} copes with the stress of being limited to oral.`; - } else if (jsRandom(1, 100) > (40 + (10 * slave.skill.oral))) { + } else { r += ` The stress of being limited to oral sex is <span class="red">hard on ${him}.</span>`; - slave.health -= 7; - injury = 1; } } - } else if ((slave.skill.anal + slave.skill.oral + slave.skill.vaginal) < 300) { - if (jsRandom(1, 100) > (10 + ((slave.skill.anal + slave.skill.oral + slave.skill.vaginal) / 10))) { - injury = 1; - } - } - } - if (injury === 1) { - slave.health -= 3; - let injuryChance; - if (canDoAnal(slave)) { - injuryChance = jsRandom(1, 100); - } else { - injuryChance = jsRandom(1, 80); } - if (injuryChance > 80) { - slave.minorInjury = "sore ass"; - r += ` Rough anal with a careless customer left ${him} with a <span class="red">${slave.minorInjury}.</span>`; - r += minorInjuryResponse(slave); - } else if (injuryChance > 60) { - slave.minorInjury = "black eye"; - r += ` A violent customer left ${him} with a <span class="red">${slave.minorInjury}.</span>`; - r += minorInjuryResponse(slave); - } else if (injuryChance > 40) { - slave.minorInjury = "split lip"; - r += ` An abusive customer left ${him} with a <span class="red">${slave.minorInjury}.</span>`; - r += minorInjuryResponse(slave); - } else if (injuryChance > 20) { - slave.minorInjury = "bad bruise"; - r += ` A rough customer left ${him} with a <span class="red">${slave.minorInjury}.</span>`; - r += minorInjuryResponse(slave); - } else { - slave.minorInjury = "sore muscle"; - r += ` The hard labor of constant sex left ${him} with a <span class="red">${slave.minorInjury}.</span>`; + if (injury === 1) { + let injuryChance; + if (canDoAnal(slave)) { + injuryChance = jsRandom(1, 100); + } else { + injuryChance = jsRandom(1, 80); + } + if (injuryChance > 80) { + slave.minorInjury = "sore ass"; + r += ` Rough anal with a careless customer left ${him} with a <span class="red">${slave.minorInjury}.</span>`; + r += minorInjuryResponse(slave); + } else if (injuryChance > 60) { + slave.minorInjury = "black eye"; + r += ` A violent customer left ${him} with a <span class="red">${slave.minorInjury}.</span>`; + r += minorInjuryResponse(slave); + } else if (injuryChance > 40) { + slave.minorInjury = "split lip"; + r += ` An abusive customer left ${him} with a <span class="red">${slave.minorInjury}.</span>`; + r += minorInjuryResponse(slave); + } else if (injuryChance > 20) { + slave.minorInjury = "bad bruise"; + r += ` A rough customer left ${him} with a <span class="red">${slave.minorInjury}.</span>`; + r += minorInjuryResponse(slave); + } else { + slave.minorInjury = "sore muscle"; + r += ` The hard labor of constant sex left ${him} with a <span class="red">${slave.minorInjury}.</span>`; + } } } -- GitLab