diff --git a/src/endWeek/economics/neighborsDevelopment.js b/src/endWeek/economics/neighborsDevelopment.js index 3e97621a7646f96a23bfe81c5ea222d098c84c15..ecd8c40630b43af76654ff4a4cfa30a63cf14614 100644 --- a/src/endWeek/economics/neighborsDevelopment.js +++ b/src/endWeek/economics/neighborsDevelopment.js @@ -295,34 +295,15 @@ App.EndWeek.neighborsDevelopment = function() { r.push(`This week, you made <span class="yellowgreen">${cashFormat(rents)}</span> from your holdings in this arcology.`); } + let cyberWarfareCatchChance = Math.max(5, Math.floor((((V.PC.skill.hacking + 100) / 200) ** 0.9) * 100)); /* CYBER ECONOMIC WARFARE */ if (arc.direction === V.arcologies[0].CyberEconomicTarget) { - let catchChance; - if (V.PC.skill.hacking === -100) { - catchChance = 10; - } else if (V.PC.skill.hacking <= -75) { - catchChance = 30; - } else if (V.PC.skill.hacking <= -50) { - catchChance = 40; - } else if (V.PC.skill.hacking <= -25) { - catchChance = 45; - } else if (V.PC.skill.hacking === 0) { - catchChance = 50; - } else if (V.PC.skill.hacking <= 25) { - catchChance = 60; - } else if (V.PC.skill.hacking <= 50) { - catchChance = 70; - } else if (V.PC.skill.hacking <= 75) { - catchChance = 85; - } else if (V.PC.skill.hacking >= 100) { - catchChance = 100; - } const weekModifier = Math.max(1, (100 - (V.week * 2))); arc.prosperity -= V.arcologies[0].CyberEconomic * 2; const warSpoils = Math.ceil(10 + Math.max(((100 / weekModifier) * arc.prosperity * V.arcologies[0].CyberEconomic), 0)); arc.prosperity = Math.clamp(arc.prosperity, 1, 300); let redHanded = 0; - if (random(0, 100) >= catchChance - (10 * V.arcologies[0].CyberEconomic)) { + if (random(0, 100) >= cyberWarfareCatchChance - (10 * V.arcologies[0].CyberEconomic)) { V.arcologies[0].prosperity -= V.arcologies[0].CyberEconomic * 3; redHanded = 1; repX(forceNeg(random(100, 200)), "war"); @@ -342,26 +323,6 @@ App.EndWeek.neighborsDevelopment = function() { } } else if (arc.direction === V.arcologies[0].CyberReputationTarget) { /* REPUTATION WARFARE */ - let catchChance; - if (V.PC.skill.hacking === -100) { - catchChance = 10; - } else if (V.PC.skill.hacking <= -75) { - catchChance = 30; - } else if (V.PC.skill.hacking <= -50) { - catchChance = 40; - } else if (V.PC.skill.hacking <= -25) { - catchChance = 45; - } else if (V.PC.skill.hacking === 0) { - catchChance = 50; - } else if (V.PC.skill.hacking <= 25) { - catchChance = 60; - } else if (V.PC.skill.hacking <= 50) { - catchChance = 70; - } else if (V.PC.skill.hacking <= 75) { - catchChance = 85; - } else if (V.PC.skill.hacking >= 100) { - catchChance = 100; - } arc.prosperity -= V.arcologies[0].CyberReputation; if (arc.rival !== 1) { arc.ownership -= V.arcologies[0].CyberReputation; @@ -369,7 +330,7 @@ App.EndWeek.neighborsDevelopment = function() { arc.prosperity = Math.clamp(arc.prosperity, 1, 300); arc.ownership = Math.clamp(arc.ownership, 0, 100); let redHanded = 0; - if (random(0, 100) >= catchChance - (10 * V.arcologies[0].CyberReputation)) { + if (random(0, 100) >= cyberWarfareCatchChance - (10 * V.arcologies[0].CyberReputation)) { V.arcologies[0].prosperity -= V.arcologies[0].CyberReputation * 3; redHanded = 1; repX(forceNeg(random(100, 200)), "war");