Automatically pulls the current Player that represents the bot. Returns something with invalid properties (aside from id and team) if the player hasn't initialized yet. You can use Game.isReady to check if the player is ready or not.
Creates a base gamemode.
The bot
The game's socket
The game's basic map information
The map index
The ID of the player
The ID of the team the player is on
The input game data (region, code, subdomain, etc)
Whether the bot is the game owner or not
Whether the game is private or not
OptionalrawMap: MapJSONThe raw map data
Checks whether the bot can see a specific player. Basic and not super accurate, but it should work for most cases.
The player to check line of sight to
Whether the bot can see the target player or not
Cleans up a game after the bot leaves
Gets the best target for the bot to attack based on distance and if they're in the line of sight (among other factors)
OptionalcheckCanSee: booleanWhether to check if the bot can see the target using Game.canSee (defaults to false)
OptionalcustomPredicate: (player: Player) => booleanAn optional function to filter potential targets; it should return true for valid targets and false for invalid ones
The best target for the bot to attack, or null if there are no valid targets
Checks whether pathfinding has "warmed up" (been used at all)
Checks whether bot.me is ready to use
Leaves a game
Processes an incoming packet from the server
The raw packet bytes in a Uint8Array
Manually updates the game state; only call this yourself if JoinOptions.manualUpdate is enabled.
The bot attached to the game
The game code
The collectibles spawned in on the map
Whether the bot is the game owner
Whether the game is a "noob" game
Whether the bot is observing the game (as an eggforcer)
Whether the game is private
The game's map information
The game mode (FFA)
The game's options in that lil old panel
The bot's game "ping"
All of the players in the game
The game region
OptionalsimulatorThe simulator. Only exists if pathfinding has warmed up by calling the getter on Game.pathing
The websocket instance associated with the game
Advanced data about the game state
The game's cluster subdomain
An FFA game