diff --git a/src/endWeek/economics/persBusiness.js b/src/endWeek/economics/persBusiness.js index 81bd7508f0a96025ec55e6679a1e6fcd56487bcd..3e86009e1dc998d8d490e4fa4c57bffb21d3d68a 100644 --- a/src/endWeek/economics/persBusiness.js +++ b/src/endWeek/economics/persBusiness.js @@ -10,7 +10,6 @@ App.EndWeek.personalBusiness = function() { let cal; let X; let windfall; - let catchTChance; let upgradeCount; let dataGain; let hindranceMod = isHinderedDegree(V.PC); @@ -136,25 +135,8 @@ App.EndWeek.personalBusiness = function() { } else if (V.personalAttention.task === PersonalAttention.TECH) { windfall = Math.trunc((150 * V.PC.skill.hacking) + random(100, 2500)); X = 0; - if (V.PC.skill.hacking === -100) { - catchTChance = 10; - } else if (V.PC.skill.hacking <= -75) { - catchTChance = 30; - } else if (V.PC.skill.hacking <= -50) { - catchTChance = 40; - } else if (V.PC.skill.hacking <= -25) { - catchTChance = 45; - } else if (V.PC.skill.hacking === 0) { - catchTChance = 50; - } else if (V.PC.skill.hacking <= 25) { - catchTChance = 60; - } else if (V.PC.skill.hacking <= 50) { - catchTChance = 70; - } else if (V.PC.skill.hacking <= 75) { - catchTChance = 85; - } else if (V.PC.skill.hacking >= 100) { - catchTChance = 100; - } + let catchTChance = V.PC.skill.hacking <= -100 ? 10 + : [15, 25, 40, 50, 60, 70, 85, 95, 100][Math.floor((V.PC.skill.hacking + 100) / 25)] ?? 100; // in case hacking is ever over 125 r.push(`This week your services to the highest bidder earned you <span class="yellowgreen">${cashFormat(windfall)}.</span>`); if (random(0, 100) >= catchTChance) { r.push(`However, since the source of the attack was traced back to your arcology, your`);