/** * Teams * Pokemon Showdown - http://pokemonshowdown.com/ * * Functions for converting and generating teams. * * @license MIT */ import type { PRNG, PRNGSeed } from './prng'; export interface PokemonSet { /** * Nickname. Should be identical to its base species if not specified * by the player, e.g. "Minior". */ name: string; /** * Species name (including forme if applicable), e.g. "Minior-Red". * This should always be converted to an id before use. */ species: string; /** * This can be an id, e.g. "whiteherb" or a full name, e.g. "White Herb". * This should always be converted to an id before use. */ item: string; /** * This can be an id, e.g. "shieldsdown" or a full name, * e.g. "Shields Down". * This should always be converted to an id before use. */ ability: string; /** * Each move can be an id, e.g. "shellsmash" or a full name, * e.g. "Shell Smash" * These should always be converted to ids before use. */ moves: string[]; /** * This can be an id, e.g. "adamant" or a full name, e.g. "Adamant". * This should always be converted to an id before use. */ nature: string; gender: string; /** * Effort Values, used in stat calculation. * These must be between 0 and 255, inclusive. * * Also used to store AVs for Let's Go */ evs: StatsTable; /** * Individual Values, used in stat calculation. * These must be between 0 and 31, inclusive. * * These are also used as DVs, or determinant values, in Gens * 1 and 2, which are represented as even numbers from 0 to 30. * * In Gen 2-6, these must match the Hidden Power type. * * In Gen 7+, Bottle Caps means these can either match the * Hidden Power type or 31. */ ivs: StatsTable; /** * This is usually between 1 and 100, inclusive, * but the simulator supports levels up to 9999 for testing purposes. */ level: number; /** * While having no direct competitive effect, certain Pokemon cannot * be legally obtained as shiny, either as a whole or with certain * event-only abilities or moves. */ shiny?: boolean; /** * This is technically "Friendship", but the community calls this * "Happiness". * * It's used to calculate the power of the moves Return and Frustration. * This value must be between 0 and 255, inclusive. */ happiness?: number; /** * The pokeball this Pokemon is in. Like shininess, this property * has no direct competitive effects, but has implications for * event legality. For example, any Rayquaza that knows V-Create * must be sent out from a Cherish Ball. * * TODO: actually support this in the validator, switching animations, * and the teambuilder. */ pokeball?: string; /** * Hidden Power type. Optional in older gens, but used in Gen 7+ * because `ivs` contain post-Battle-Cap values. */ hpType?: string; /** * Dynamax Level. Affects the amount of HP gained when Dynamaxed. * This value must be between 0 and 10, inclusive. */ dynamaxLevel?: number; gigantamax?: boolean; /** * Tera Type */ teraType?: string; } export declare const Teams: { pack(team: PokemonSet[] | null): string; unpack(buf: string): PokemonSet[] | null; /** Very similar to toID but without the lowercase conversion */ packName(name: string | undefined | null): string; /** Will not entirely recover a packed name, but will be a pretty readable guess */ unpackName(name: string, dexTable?: { get: (name: string) => AnyObject; } | undefined): any; /** * Exports a team in human-readable PS export format */ export(team: PokemonSet[], options?: { hideStats?: boolean; }): string; exportSet(set: PokemonSet, { hideStats }?: { hideStats?: boolean | undefined; }): string; parseExportedTeamLine(line: string, isFirstLine: boolean, set: PokemonSet): void; /** Accepts a team in any format (JSON, packed, or exported) */ import(buffer: string): PokemonSet[] | null; getGenerator(format: Format | string, seed?: PRNG | PRNGSeed | null): any; generate(format: Format | string, options?: PlayerOptions | null): PokemonSet[]; }; export default Teams;