diff --git a/src/main/basedbot/fleet-strategies/atlasnet-fc-strategy.ts b/src/main/basedbot/fleet-strategies/atlasnet-mud-strategy.ts similarity index 96% rename from src/main/basedbot/fleet-strategies/atlasnet-fc-strategy.ts rename to src/main/basedbot/fleet-strategies/atlasnet-mud-strategy.ts index af54b4d7..9b313de0 100644 --- a/src/main/basedbot/fleet-strategies/atlasnet-fc-strategy.ts +++ b/src/main/basedbot/fleet-strategies/atlasnet-mud-strategy.ts @@ -5,7 +5,7 @@ import { Player } from '../lib/sage/state/user-account' import { WorldMap } from '../lib/sage/state/world-map' import { galaxySectorsData } from '../lib/util/galaxy-sectors-data' -export const atlasnetFcStrategy = +export const atlasnetMudStrategy = (count: number) => (map: WorldMap, player: Player): Map => { const ans: Map = new Map() diff --git a/src/main/basedbot/fleet-strategies/atlasnet-ustur-strategy.ts b/src/main/basedbot/fleet-strategies/atlasnet-ustur-strategy.ts new file mode 100644 index 00000000..84dce7ab --- /dev/null +++ b/src/main/basedbot/fleet-strategies/atlasnet-ustur-strategy.ts @@ -0,0 +1,31 @@ +import { mine } from '../fsm/configs/mine' +import { createMiningStrategy } from '../fsm/mine' +import { Strategy } from '../fsm/strategy' +import { Player } from '../lib/sage/state/user-account' +import { WorldMap } from '../lib/sage/state/world-map' +import { galaxySectorsData } from '../lib/util/galaxy-sectors-data' + +export const atlasnetUsturStrategy = + (count: number) => + (map: WorldMap, player: Player): Map => { + const ans: Map = new Map() + const sectors = galaxySectorsData() + .filter((sector) => sector.closestFaction === player.faction) + .sort((a, b) => a.name.localeCompare(b.name)) + + for (let i = 0; i < count; i++) { + ans.set( + `basedbot-ustur-${i}`, + createMiningStrategy( + mine( + map, + player.homeCoordinates, + sectors[i % sectors.length].coordinates, + ), + player, + ), + ) + } + + return ans + } diff --git a/src/main/basedbot/fleet-strategies/get-fleet-strategy.ts b/src/main/basedbot/fleet-strategies/get-fleet-strategy.ts index b7d2425a..f95f4aa7 100644 --- a/src/main/basedbot/fleet-strategies/get-fleet-strategy.ts +++ b/src/main/basedbot/fleet-strategies/get-fleet-strategy.ts @@ -2,8 +2,9 @@ import { Strategy } from '../fsm/strategy' import { Player } from '../lib/sage/state/user-account' import { WorldMap } from '../lib/sage/state/world-map' -import { atlasnetFcStrategy } from './atlasnet-fc-strategy' +import { atlasnetMudStrategy } from './atlasnet-mud-strategy' import { atlasnetLuStrategy } from './atlasnet-lu-strategy' +import { atlasnetUsturStrategy } from './atlasnet-ustur-strategy' import { mainnetLuStrategy } from './mainnet-lu-strategy' export const getFleetStrategy = ( @@ -16,7 +17,9 @@ export const getFleetStrategy = ( case 'AePY3wEoUFcFuXeUU9X26YK6tNKQMZovBgvY54LK2B8N': return mainnetLuStrategy(map, player) case 'CgHvzwGbwWv3CwLTvEgeqSKeD8EwMdTfiiCG3dFrKVVC': - return atlasnetFcStrategy(100)(map, player) + return atlasnetMudStrategy(100)(map, player) + case '9KBrgWVjsmdZ3YEjcsa3wrbbJREgZgS7vDbgoz2aHaNm': + return atlasnetUsturStrategy(100)(map, player) default: throw new Error('Unknown strategy') }