From 8f9ab9f5c6b5cca06751123a782ed1cf1fe4e1e6 Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Fri, 4 Aug 2023 00:11:34 +0000 Subject: [PATCH] feat: add tradingTransition phase --- packages/cli/lib/behavior/central_command.dart | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/cli/lib/behavior/central_command.dart b/packages/cli/lib/behavior/central_command.dart index 9a18f7db..274c7cc0 100644 --- a/packages/cli/lib/behavior/central_command.dart +++ b/packages/cli/lib/behavior/central_command.dart @@ -186,7 +186,14 @@ class CentralCommand { if (_shipCache.ships.length < 30) { return GamePhase.early; } - return GamePhase.ramp; + final traderCount = _shipCache.ships + .where((s) => s.registration.role == ShipRole.HAULER) + .length; + if (traderCount < 30) { + return GamePhase.ramp; + } + // When is GamePhase.exploring? + return GamePhase.tradingTransition; } /// Minimum profit per second we expect this ship to make. @@ -333,6 +340,11 @@ class CentralCommand { return Behavior.idle; } } + if (phase >= GamePhase.tradingTransition) { + if (ship.frame.symbol == ShipFrameSymbolEnum.MINER) { + return Behavior.idle; + } + } // Only use the first 20 probes. // const activeProbes = 20;