Closed chrisrabe closed 2 years ago
Updated thread calculations to:
const weakenEffect = ns.weakenAnalyze(1);
const secToDecrease = Math.abs(ns.getServerSecurityLevel(node) - secThresh);
const weakenThreads = weakenEffect > 0 ? Math.round(secToDecrease / weakenEffect) : 0;
Implemented in #19
Background
Comment from colin bougie
I noticed something while going through the code that I think is an error. The number of weakenThreads should use the difference between the current security and the security threshold. Right now, it calculates the number of weaken threads necessary to go from 0 security to our threshold, which doesn't really make sense.
Fix
launch-fleets
and the newgimme-more-money
script.