-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f1ec23c
commit 99e9384
Showing
5 changed files
with
177 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
135 changes: 135 additions & 0 deletions
135
src/main/basedbot/fleet-strategies/atlasnet-lu-strategy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
import { mineBiomass } from '../fsm/configs/mine-biomass' | ||
import { mineCarbon } from '../fsm/configs/mine-carbon' | ||
import { mineConfig } from '../fsm/configs/mine-config' | ||
import { mineCopperOre } from '../fsm/configs/mine-copper-ore' | ||
import { mineHydrogen } from '../fsm/configs/mine-hydrogen' | ||
import { mineIronOre } from '../fsm/configs/mine-iron-ore' | ||
import { mineLumanite } from '../fsm/configs/mine-lumanite' | ||
import { mineNitrogen } from '../fsm/configs/mine-nitrogen' | ||
import { mineRochinol } from '../fsm/configs/mine-rochinol' | ||
import { mineSilicia } from '../fsm/configs/mine-silicia' | ||
import { mineTitaniumOre } from '../fsm/configs/mine-titanium-ore' | ||
import { createMiningStrategy } from '../fsm/mine' | ||
import { Strategy } from '../fsm/strategy' | ||
import { Player } from '../lib/sage/state/user-account' | ||
import { mineableByCoordinates, WorldMap } from '../lib/sage/state/world-map' | ||
import { Coordinates } from '../lib/util/coordinates' | ||
|
||
export const atlasnetLuStrategy = ( | ||
map: WorldMap, | ||
player: Player, | ||
): Map<string, Strategy> => | ||
new Map([ | ||
['Armadillo Fleet', createMiningStrategy(mineBiomass(map), player)], | ||
[ | ||
'Barnacle Fleet', | ||
createMiningStrategy( | ||
mineConfig({ | ||
homeBase: Coordinates.fromNumber(-40, 30), | ||
targetBase: Coordinates.fromNumber(-19, 40), | ||
resource: mineableByCoordinates( | ||
map, | ||
Coordinates.fromNumber(-19, 40), | ||
) | ||
.values() | ||
.next().value, | ||
}), | ||
player, | ||
), | ||
], | ||
[ | ||
'Cobra Fleet', | ||
createMiningStrategy( | ||
mineConfig({ | ||
homeBase: Coordinates.fromNumber(-40, 30), | ||
targetBase: Coordinates.fromNumber(-18, 23), | ||
resource: mineableByCoordinates( | ||
map, | ||
Coordinates.fromNumber(-18, 23), | ||
) | ||
.values() | ||
.next().value, | ||
}), | ||
player, | ||
), | ||
], | ||
['Falcon Fleet', createMiningStrategy(mineCarbon(map), player)], | ||
[ | ||
'Geoffroys Cat Fleet', | ||
createMiningStrategy(mineNitrogen(map), player), | ||
], | ||
['Gerbils Fleet', createMiningStrategy(mineSilicia(map), player)], | ||
['Grasshopper Fleet', createMiningStrategy(mineLumanite(map), player)], | ||
['Guanaco Fleet', createMiningStrategy(mineCopperOre(map), player)], | ||
['King Cobra Fleet', createMiningStrategy(mineIronOre(map), player)], | ||
[ | ||
'Pacific Sardine Fleet', | ||
createMiningStrategy(mineHydrogen(map), player), | ||
], | ||
['Porpoise Fleet', createMiningStrategy(mineRochinol(map), player)], | ||
['Rabbit Fleet', createMiningStrategy(mineHydrogen(map), player)], | ||
[ | ||
'Smalltooth Sawfish Fleet', | ||
createMiningStrategy(mineTitaniumOre(map), player), | ||
], | ||
['Sugar Gliders Fleet', createMiningStrategy(mineIronOre(map), player)], | ||
['Turkey Fleet', createMiningStrategy(mineHydrogen(map), player)], | ||
|
||
['Aardwolf Fleet', createMiningStrategy(mineBiomass(map), player)], | ||
[ | ||
'Antelope Fleet', | ||
createMiningStrategy( | ||
mineConfig({ | ||
homeBase: Coordinates.fromNumber(-40, 30), | ||
targetBase: Coordinates.fromNumber(-19, 40), | ||
resource: mineableByCoordinates( | ||
map, | ||
Coordinates.fromNumber(-19, 40), | ||
) | ||
.values() | ||
.next().value, | ||
}), | ||
player, | ||
), | ||
], | ||
[ | ||
'Boa Fleet', | ||
createMiningStrategy( | ||
mineConfig({ | ||
homeBase: Coordinates.fromNumber(-40, 30), | ||
targetBase: Coordinates.fromNumber(-18, 23), | ||
resource: mineableByCoordinates( | ||
map, | ||
Coordinates.fromNumber(-18, 23), | ||
) | ||
.values() | ||
.next().value, | ||
}), | ||
player, | ||
), | ||
], | ||
['Chinchillas Fleet', createMiningStrategy(mineCarbon(map), player)], | ||
[ | ||
'Fathead Sculpin Fleet', | ||
createMiningStrategy(mineNitrogen(map), player), | ||
], | ||
[ | ||
'Giant Tortoise Fleet', | ||
createMiningStrategy(mineSilicia(map), player), | ||
], | ||
['Kultarr Fleet', createMiningStrategy(mineLumanite(map), player)], | ||
[ | ||
'Leopard Seal Fleet', | ||
createMiningStrategy(mineCopperOre(map), player), | ||
], | ||
['Pangolin Fleet', createMiningStrategy(mineIronOre(map), player)], | ||
['Rhinoceros Fleet', createMiningStrategy(mineHydrogen(map), player)], | ||
['Snow Leopard Fleet', createMiningStrategy(mineRochinol(map), player)], | ||
[ | ||
'Southern White Faced Owl Fleet', | ||
createMiningStrategy(mineHydrogen(map), player), | ||
], | ||
['Turkeys Fleet', createMiningStrategy(mineTitaniumOre(map), player)], | ||
['Zebra Fleet', createMiningStrategy(mineIronOre(map), player)], | ||
['Guinea Fowl Fleet', createMiningStrategy(mineHydrogen(map), player)], | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Strategy } from '../fsm/strategy' | ||
import { Player } from '../lib/sage/state/user-account' | ||
import { WorldMap } from '../lib/sage/state/world-map' | ||
|
||
import { atlasnetLuStrategy } from './atlasnet-lu-strategy' | ||
import { mainnetLuStrategy } from './mainnet-lu-strategy' | ||
|
||
export const getFleetStrategy = ( | ||
map: WorldMap, | ||
player: Player, | ||
): Map<string, Strategy> => { | ||
switch (player.publicKey.toString()) { | ||
case 'k49Y5xwN7Nyi19TqDR4zbCFuAt8kgy6qMaJ6Kj1wHrn': | ||
return atlasnetLuStrategy(map, player) | ||
case 'AePY3wEoUFcFuXeUU9X26YK6tNKQMZovBgvY54LK2B8N': | ||
return mainnetLuStrategy(map, player) | ||
default: | ||
throw new Error('Unknown strategy') | ||
} | ||
} |
Oops, something went wrong.