Skip to content

Commit

Permalink
Fix #404 - Quick reset in BN8 (and similar)
Browse files Browse the repository at this point in the history
- Do "quick resets" in BN8, and other BNs where we get enough cash / augs are available for purchase and install soon after the last reset
  • Loading branch information
alainbryden committed Nov 3, 2024
1 parent df19ce1 commit d910bd6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion autopilot.js
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,15 @@ async function maybeInstallAugmentations(ns, player) {
if (totalCost == 0) totalCost = 1; // Hack, logic below expects some non-zero reserve in preparation for ascending.
}

// TODO: If we are in BN8, we get a big cash influx on each reset and it may be worth doing an immediate install or 2 to purchse upgrades, then get more free cash.
// Heuristic: if we can afford 4 or more augs in the first ~20 minutes, it's usually worth doing a "quick install"
// For example, in BN8, we get a big cash influx on each reset and can buy reputation immediately, so it's worth
// doing an few immediate installs to purchse upgrades, then reset for more free cash.
if ((getTimeInAug() < 20 * 60 * 1000 && pendingAugInclNfCount >= 4) || (resetInfo.currentNode == 8 && getTimeInBitnode() < 10 * 60 * 1000)) {
shouldReset = true;
resetStatus = `We haven't been in this reset for long. We can do a quick reset immediately for a quick stat boost.\n${resetStatus}`;
if (options['install-countdown'] > 30 * 1000)
options['install-countdown'] = 30 * 1000; // Install relatively quickly in this scenario (30s)
}

// If not ready to reset, set a status with our progress and return
if (!shouldReset) {
Expand Down

0 comments on commit d910bd6

Please sign in to comment.