pokemon-showdown/sim
iforgetwhyimhere 07d1669294
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
Differentiate between Levitate and Eelevate in runImmunity (#12127)
* differentiate Levitate and Eelevate in Ground immunity

* Apply suggestion from @iforgetwhyimhere

* apply suggestion from @iforgetwhyimhere

* seperate ability calls

* oops

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>

---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2026-06-27 13:26:09 -06:00
..
examples Update to ESLint 9 (#10926) 2025-02-25 20:03:46 -08:00
tools Implement Mega Stones as {key: value} pairs (#11684) 2026-01-08 14:59:22 -07:00
battle-actions.ts Overhaul tags and tag banning (#10941) 2026-06-23 23:20:45 -07:00
battle-queue.ts Gen 1: Implement move slot tracking (#11812) 2026-03-21 23:20:38 -07:00
battle-stream.ts Refactor editbattle not to use eval (#11898) 2026-04-07 13:58:01 -07:00
battle.ts Champions: Implement 1.1.0 changes (#12114) 2026-06-17 17:10:22 -06:00
dex-abilities.ts Support inheritance of ability, item, and move conditions (#11754) 2026-03-19 03:44:48 -07:00
dex-conditions.ts Implement Mega Sol and Spicy Spray in the base mod (#12017) 2026-05-13 10:43:39 -06:00
dex-data.ts Overhaul tags and tag banning (#10941) 2026-06-23 23:20:45 -07:00
dex-formats.ts Overhaul tags and tag banning (#10941) 2026-06-23 23:20:45 -07:00
dex-items.ts Implement Champions (#11910) 2026-04-10 20:29:01 -06:00
dex-moves.ts Overhaul tags and tag banning (#10941) 2026-06-23 23:20:45 -07:00
dex-species.ts Overhaul tags and tag banning (#10941) 2026-06-23 23:20:45 -07:00
DEX.md Update documentation files (#12034) 2026-06-25 20:11:23 -07:00
dex.ts Clarify Dex.modData force parameter (#12134) 2026-06-26 23:57:20 -07:00
field.ts Update to ESLint 9 (#10926) 2025-02-25 20:03:46 -08:00
global-types.ts Overhaul tags and tag banning (#10941) 2026-06-23 23:20:45 -07:00
index.ts Update to ESLint 9 (#10926) 2025-02-25 20:03:46 -08:00
NONSTANDARD.md Overhaul tags and tag banning (#10941) 2026-06-23 23:20:45 -07:00
pokemon.ts Differentiate between Levitate and Eelevate in runImmunity (#12127) 2026-06-27 13:26:09 -06:00
prng.ts Correctly support Node 18 2025-02-26 21:42:14 -08:00
README.md Slightly improve documentation 2021-11-13 14:17:47 -05:00
side.ts Fix Gen 1 multi-turn move interactions with Haze, Metronome and Mirror Move (#11859) 2026-04-05 02:43:15 -07:00
SIM-PROTOCOL.md Update documentation files (#12034) 2026-06-25 20:11:23 -07:00
SIMULATOR.md Slightly improve sim docs for stdio usage 2024-01-17 21:23:20 -08:00
state.ts Remove useless spreads (#11132) 2025-05-24 16:19:48 -07:00
team-validator.ts Overhaul tags and tag banning (#10941) 2026-06-23 23:20:45 -07:00
TEAMS.md Update documentation files (#12034) 2026-06-25 20:11:23 -07:00
teams.ts Overhaul tags and tag banning (#10941) 2026-06-23 23:20:45 -07:00
tsconfig.json Migrate to esbuild for compilation (#9203) 2022-12-22 15:19:29 -06:00

Node.js package

Pokémon Showdown has a Node.js API. It currently only works in Node, not browsers, although we're working on unifying it to work in browsers.

You can install it with the usual:

npm install pokemon-showdown

And you can use it to do the following things:

Simulating battles

See: sim/SIMULATOR.md

Also available as a command-line API!

Validating, generating, and converting teams

See: sim/TEAMS.md

Also available as a command-line API!

Getting Pokédex information

See: sim/DEX.md

Undocumented APIs

Pokémon Showdown's Node.js package has TypeScript definitions for everything it exports, including a lot of undocumented APIs.

Please be aware that any undocumented API is unstable and should not be relied upon not to change. We do not follow semver for undocumented APIs. If you really want to use an undocumented API, remember to pin the exact PS version in your dependencies. You probably also want to follow the API update channel in the Discord server: https://psim.us/devdiscord