UNPKG

alclient

Version:

A node client for interacting with Adventure Land - The Code MMORPG. This package extends the functionality of 'alclient' by managing a mongo database.

63 lines (62 loc) 1.68 kB
import type { MapName } from "./definitions/adventureland-data.js"; export declare class Tools { /** * From Adventureland's common_functions.js * @static * @param {number} defense The difference between armor and armor piercing, or resistance and resistance piercing. * @return {*} {number} * @memberof Tools */ static damage_multiplier(defense: number): number; /** * Returns the distance between two positions. * @param a Position 1 * @param b Position 2 */ static distance(a: { x: number; y: number; width?: number; height?: number; map?: MapName; in?: string; }, b: { x: number; y: number; width?: number; height?: number; map?: MapName; in?: string; }): number; /** * Returns the squared distance between two positions. * * This has slightly faster computation than the distance function, and is useful if you're only doing comparisons with the distances between a variety of * * @param a Position 1 * @param b Position 2 */ static squaredDistance(a: { x: number; y: number; width?: number; height?: number; map?: MapName; in?: string; }, b: { x: number; y: number; width?: number; height?: number; map?: MapName; in?: string; }): number; /** * Calculates the latest the monster could have spawned * * @param level * @param base_hp * @returns */ static estimateSpawnedDate(level: number, base_hp: number): number; }