pokemon-showdown/sim
livid washed c0d74ea24e
Gen 2: Fix Encore (#9357)
* Gen 2: revert Mirror Move fix, since it is bugging Encore

* Use a volatile for checking if a Pokemon has a last move for Mirror Move purposes

* conversion2

* Disable

* Mimic

* Spite

* Do mirror move in onTryHit

* Gen 1 shouldn't inherit onTryHit for mirror move and mimic

* Commenting

* Instead of using a volatile, add a new field for a pokemon 'lastMoveEncore' used only in gen 2 and only for Encore

* Add test for Gen 2 Encore
2023-01-29 11:43:11 -07:00
..
examples
tools Update ExhaustiveRunner for Gen 9 (#9119) 2022-12-04 12:19:31 -08:00
battle-actions.ts Gen IV: Fix Copycat's behavior with called moves (#9326) 2023-01-14 16:40:02 -06:00
battle-queue.ts Refactor Revival Blessing to be an action + fixes (#9204) 2022-12-22 15:24:19 -06:00
battle-stream.ts
battle.ts Make Opportunist/Mirror Herb copy Anger Point (#9341) 2023-01-23 13:21:52 -05:00
dex-abilities.ts Add Gen 9 (#8997) 2022-11-17 20:46:29 -05:00
dex-conditions.ts Fix changing, blocking, and reacting to stat boosts (#9322) 2023-01-21 12:17:22 -05:00
dex-data.ts
dex-formats.ts Remove unused property 2022-12-07 19:39:05 -07:00
dex-items.ts Add an 'End' event for items (#9124) 2022-12-09 19:18:16 -06:00
dex-moves.ts Fix Copycat Dancer interaction, take 3 (#9193) 2022-12-16 12:40:20 -05:00
dex-species.ts Add "Paradox" species tag 2022-12-03 00:14:04 -07:00
DEX.md
dex.ts Migrate to esbuild for compilation (#9203) 2022-12-22 15:19:29 -06:00
field.ts Fix Protosynthesis/Quark Drive/Booster Energy (#9118) 2022-12-04 16:20:21 -05:00
global-types.ts Update The Loser's Game to Gen 9 2023-01-15 20:40:51 -07:00
index.ts
NONSTANDARD.md
pokemon.ts Gen 2: Fix Encore (#9357) 2023-01-29 11:43:11 -07:00
prng.ts
README.md
side.ts Refactor Revival Blessing to be an action + fixes (#9204) 2022-12-22 15:24:19 -06:00
SIM-PROTOCOL.md Show Terastallization in switch details (#9229) 2022-12-27 13:41:10 -05:00
SIMULATOR.md Docs: Fix links in SIMULATOR.md (#9148) 2022-12-09 19:09:31 -06:00
state.ts
team-validator.ts Add Gen 9 static encounters to event data 2023-01-12 18:43:48 -05:00
TEAMS.md Update packed team Tera Type documentation (#9185) 2022-12-30 13:47:38 -06:00
teams.ts Add [Gen 9] Computer-Generated Teams 2022-12-14 17:46:20 -08: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