/** * @param {App.Entity.SlaveState} slave * @returns {string} */ window.minorInjuryResponse = function minorInjuryResponse(slave) { const arcology = State.variables.arcologies[0]; const arcologyUpgrade = State.variables.arcologyUpgrade; const {he, himself, He} = getPronouns(slave); let r = ""; let trackedCategory = ""; switch (slave.assignment) { case window.Job.WHORE: trackedCategory = "slaveAssignmentWhore"; break; case window.Job.MADAM: trackedCategory = "slaveAssignmentMadam"; break; case window.Job.BROTHEL: trackedCategory = "slaveAssignmentBrothel" break; case window.Job.PUBLIC: trackedCategory = "slaveAssignmentPublic" break; case window.Job.DJ: trackedCategory = "slaveAssignmentDj"; break; case window.Job.CLUB: trackedCategory = "slaveAssignmentClub"; break; default: trackedCategory = "slaveAssignmentUndefined"; break; } r = responseWithTracking(slave, trackedCategory); function responseWithTracking(s, category) { let o = ""; if (arcology.FSDegradationist > 20) { o += ` ${He} carries on, knowing that in your degradationist arcology, this is accepted behavior.`; } else if (arcology.FSPaternalist > 20) { if (arcologyUpgrade.drones === 1 && jsRandom(1, 100) > 50) { o += ` The security drones successfully detain him and oblige him to pay significant <span class="yellowgreen">compensation,</span> since abusing slaves is discouraged here.`; cashX(50, category, slave); } else if (arcologyUpgrade.grid === 1 && jsRandom(1, 100) > 50) { o += ` The computer systems successfully detain him and require him to pay significant <span class="yellowgreen">compensation,</span> since abusing slaves is discouraged here.`; cashX(50, category, slave); } else if (slave.skill.whoring > jsRandom(1, 100)) { o += ` ${slave.slaveName} is used to this sort of thing, and convinces him to pay significant <span class="yellowgreen">compensation,</span> since abusing slaves is discouraged here.`; cashX(50, category, slave); } else if (slave.skill.combat > 0) { o += ` ${slave.slaveName} can take care of ${himself}, and ${he} successfully forces him to pay significant <span class="yellowgreen">compensation,</span> since abusing slaves is discouraged here.`; cashX(50, category, slave); } } else { if (arcologyUpgrade.drones === 1 && jsRandom(1, 100) > 50) { o += ` The security drones successfully detain him and oblige him to pay minor <span class="yellowgreen">compensation.</span>`; cashX(10, category, slave); } else if (arcologyUpgrade.grid === 1 && jsRandom(1, 100) > 50) { o += ` The computer systems successfully detain him and require him to pay minor <span class="yellowgreen">compensation.</span>`; cashX(10, category, slave); } else if (slave.skill.whoring > jsRandom(1, 100)) { o += ` ${slave.slaveName} is used to this sort of thing, and convinces him to pay minor <span class="yellowgreen">compensation.</span>`; cashX(10, category, slave); } else if (slave.skill.combat > 0) { o += ` ${slave.slaveName} can take care of ${himself}, and ${he} successfully forces him to pay minor <span class="yellowgreen">compensation.</span>`; cashX(10, category, slave); } } return o; } return r; };