import { Range } from "./utils.js"; /** * Mines in the Kingdom of Loathing */ export declare enum Mine { /** Inside of Itznotyerzitz Mine */ ITZNOTYERZITZ = 1, /** Deep Inside the Knob Shaft */ KNOB = 2, /** Anemone Mine */ ANEMONE = 3, /** The Gummi Mine (Retired, Crimbo 2011) */ GUMMI = 4, /** Crimbonium Mine (Retired, Crimbo 2014) */ CRIMBONIUM = 5, /** The Velvet / Gold Mine */ VOLCANO = 6 } /** * Coordinate system that the Kingdom of Loathing uses for mining. * The first row, first column and last column are all unbreakable. */ export type MiningCoordinate = [column: Range<0, 8>, row: Range<0, 8>]; /** * Type guard for coordinates KoL uses for mining * * @param coord Coordinate to check * @returns True if the coordinate is valid */ export declare const isValidCoordinate: (coord: number[]) => coord is MiningCoordinate; /** * @param mine Which mine * @returns Whether twinkly squares will be visible even when when not accessible */ export declare function hasObjectDetection(mine?: Mine): boolean; /** * @param mine Which mine * @returns The maximum damage the current player can expect to take from a cave-in */ export declare function caveInCost(mine: Mine): number; /** * @param position Index in the mine state * @returns KoL coordinate for given position */ export declare const stateIndexToCoord: (position: number) => MiningCoordinate; /** * List all sparkly rocks adjacent to an open space. This will be simply a list of all sparkly rocks * without some form of Object Detection. * * This assumes all open spots are accessible. If spots at the back of the mine were somehow to be open * this would be no longer be correct. * * @param mine Which mine * @returns List of all sparkly rocks adjacent to an open space */ export declare function getAccessibleSparkles(mine: Mine): MiningCoordinate[]; /** * @param mine Which mine * @returns Returns number of mined spots in the current cavern */ export declare function minedSpots(mine: Mine): number; /** * Visit a new cavern if possible * * @param mine Which mine * @returns Page contents */ export declare function findNewCavern(mine: Mine): string; /** * @param mine Which mine * @param coords Coordinates at which to mine (using the in-game coordinate system) * @param coords."0" Column * @param coords."1" Row * @returns Items acquired from mining that coordinate, if any. */ export declare function mineCoordinate(mine: Mine, [col, row]: MiningCoordinate): Map; /** * Visit a mine * * @param mine Which mine * @returns Page contents */ export declare function visit(mine: Mine): string; /** * @param mine Which mine * @returns The state for the given mine */ export declare function getState(mine: Mine): string; /** * @param mine Which mine * @returns Mine state split into an array of arrays. Printing this array would look identical to the in-game mine. */ export declare function getAsMatrix(mine: Mine): string[][]; /** * @returns Number of unconditionally free mines (minin' dynamite is not counted as it only works with non-sparkly spots) */ export declare function countFreeMines(): number;