Skip to main content

Showdown

Pokémon Showdown is an online Pokémon battle simulator. It simulates singles, doubles and triples battles in all the games out so far (Generations 1 through 9). It is a very popular environment for competitive gameplay.

info

For more info, visit Pokémon ShowDown.

Methods

format()

Returns a string with formatted Pokémon data as Showdown's Teambuilder user-friendly export format.

Signature

format(params: FormatParams) => string
ParameterTypeRequiredDescription
paramsFormatParamsYes

Increased stat of nature.

params.pokemonPokemonSpecie or stringYesThe Pokémon name.
params.levelnumberNoThe Pokémon level.
params.gendernumberNoThe Pokémon gender.
params.happinessnumberNoThe Pokémon happiness.
params.shinybooleanNoIf the Pokémon is shiny or not.
params.teranumberNoThe Pokémon Tera type.
params.nicknamestringNoThe Pokémon nickname.
params.itemstringNoThe Pokémon's item.
params.abilitystringNoThe Pokémon's ability.
params.movesstring[]NoThe Pokémon's list of moves.
params.natureNatureNameNoThe Pokémon's nature.
params.ivsobjectNoThe Pokémon's IVs.
params.ivs.hpnumberNoThe Pokémon's HP IV.
params.ivs.attacknumberNoThe Pokémon's Attack IV.
params.ivs.defensenumberNoThe Pokémon's Defense IV.
params.ivs.specialAttacknumberNoThe Pokémon's Special Attack IV.
params.ivs.specialDefensenumberNoThe Pokémon's Special Defense IV.
params.ivs.speednumberNoThe Pokémon's Speed IV.
params.evsobjectNoThe Pokémon's EVs.
params.evs.hpnumberNoThe Pokémon's HP EVs.
params.evs.attacknumberNoThe Pokémon's Attack EVs.
params.evs.defensenumberNoThe Pokémon's Defense EVs.
params.evs.specialAttacknumberNoThe Pokémon's Special Attack EVs.
params.evs.specialDefensenumberNoThe Pokémon's Special Defense EVs.
params.evs.speednumberNoThe Pokémon's Speed EVs.

Returns

A string.

Example

const pokemon = await pokeapi('pikachu').get();
format({
pokemon,
level: 50,
shiny: true,
tera: PokemonTypeName.FLYING,
ability: 'Static',
item: 'Light Ball',
moves: ['Thunder', 'Nuzzle', 'Surf', 'Charm'],
ivs: {
attack: 0,
},
evs: {
hp: 4,
speed: 252,
specialAttack: 252,
},
});
/*
outputs:
Pikachu @ Light Ball
Ability: Static
Level: 50
Shiny: Yes
Tera Type: Flying
EVs: 4 HP / 252 SpA / 252 Spe
IVs: 0 Atk
- Thunder
- Nuzzle
- Surf
- Charm
*/

Type Definitions

FormatParams

An interface to parse data into a string value with format().

Type
Interface

Properties

NameRequiredType
pokemon Yes PokemonSpecie or string
level No number
gender No enum('male', 'female', 'genderless')
happiness No number
shiny No boolean
tera No PokemonTypeName
nickname No string
item No string
ability No string
moves No [string, string?, string?, string?]
nature No NatureName
ivs No object
ivs.hp No number
ivs.attack No number
ivs.defense No number
ivs.specialAttack No number
ivs.specialDefense No number
ivs.speed No number
evs No object
evs.hp No number
evs.attack No number
evs.defense No number
evs.specialAttack No number
evs.specialDefense No number
evs.speed No number