pokemon-showdown/sim
livid washed cf5ba80ca4
Revamp [Gen 2] Random Battle (#10220)
* Gen 2 revamp

* Fix test

* RIP the meme

* victreebel

* vic again
2024-03-31 21:33:54 -06:00
..
examples Update Dex API (#8181) 2021-04-08 03:00:37 -07:00
tools Delete Gen 7 Random Doubles Battle (#10224) 2024-03-25 21:00:25 -06:00
battle-actions.ts Let's Go: Implement itemless megas (#10212) 2024-03-24 22:56:13 -04:00
battle-queue.ts Let's Go: Implement itemless megas (#10212) 2024-03-24 22:56:13 -04:00
battle-stream.ts Send Open Team Sheets to client in packed format (#9832) 2023-10-17 21:15:09 -05:00
battle.ts Let's Go: Implement itemless megas (#10212) 2024-03-24 22:56:13 -04:00
dex-abilities.ts Implement Ability flags (#10048) 2024-01-02 23:55:17 -07:00
dex-conditions.ts Refactor STAB (again) (#10099) 2024-01-13 23:48:47 -06:00
dex-data.ts Freeze cached Sim objects 2023-12-07 01:26:51 -05:00
dex-formats.ts Refactor BestOfGame (#10026) 2024-01-07 01:45:23 -08:00
dex-items.ts Let's Go: Implement itemless megas (#10212) 2024-03-24 22:56:13 -04:00
dex-moves.ts Fix Tera Stellar interaction with multihit moves (#10185) 2024-02-24 00:14:29 -06:00
dex-species.ts Revert "Redo #8134" 2024-01-31 09:48:15 -07:00
DEX.md Move packed team docs out of PROTOCOL.md 2021-06-10 15:04:25 -07:00
dex.ts Freeze cached Sim objects 2023-12-07 01:26:51 -05:00
field.ts Fix weather suppression abilities suppressing weather while ending 2024-03-15 22:33:32 -04:00
global-types.ts Revamp [Gen 2] Random Battle (#10220) 2024-03-31 21:33:54 -06:00
index.ts Further improve documentation 2021-06-10 09:17:58 -07:00
NONSTANDARD.md Move packed team docs out of PROTOCOL.md 2021-06-10 15:04:25 -07:00
pokemon.ts Let's Go: Implement itemless megas (#10212) 2024-03-24 22:56:13 -04:00
prng.ts Further improve documentation 2021-06-10 09:17:58 -07:00
README.md Slightly improve documentation 2021-11-13 14:17:47 -05:00
side.ts Let's Go: Implement itemless megas (#10212) 2024-03-24 22:56:13 -04:00
SIM-PROTOCOL.md Fix protocol doc for Splash 2023-12-28 20:10:20 -08:00
SIMULATOR.md Slightly improve sim docs for stdio usage 2024-01-17 21:23:20 -08:00
state.ts Further improve documentation 2021-06-10 09:17:58 -07:00
team-validator.ts Let's Go: Implement itemless megas (#10212) 2024-03-24 22:56:13 -04:00
TEAMS.md Update packed team Tera Type documentation (#9185) 2022-12-30 13:47:38 -06:00
teams.ts Teams: Fix importing Tera Types 2023-10-11 21:58:04 -05: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