Pokémon battle simulator.
Go to file
Guangcong Luo f9fdc73133
Support per-pokemon Residual handlers in Side/Field conditions (#8222)
For side conditions, `onStart`/`onRestart`/`onResidual`/`onEnd`
have been renamed `onSideStart`/`onSideRestart`/`onSideResidual`/`onSideEnd`,
with the `onResidualOrder` properties renamed `onSideResidualOrder`.

For field conditions, `onStart`/`onRestart`/`onResidual`/`onEnd`
have been renamed `onFieldStart`/`onFieldRestart`/`onFieldResidual`/`onFieldEnd`,
with the `onResidualOrder` properties renamed `onFieldResidualOrder`.

(The `onField` and `onSide` part helps make it clear to the type system
that the first argument is a Field or Side, not a Pokemon.)

Side and field conditions can now use `onResidual` to tick separately
on each pokemon in Speed order. `onResidualOrder` (the per-pokemon
tick) can be timed separate from `onSideResidualOrder` (the
per-condition tick), allowing conditions to end at a different priority
than they tick per-pokemon.

Relatedly, `onTeamPreview` and `onStart` in formats now need to be
`onFieldTeamPreview` and `onFieldStart`.

Unrelatedly, `effectData` has been renamed `effectState`, and the
corresponding state containers (`pokemon.statusData`,
`pokemon.speciesData`, `pokemon.itemData`, `pokemon.abilityData`,
`field.weatherData`, `field.terrainData`) have been similarly renamed. I
renamed the types a while ago, but I was holding off renaming the fields
because it would be a breaking change. But this is a breaking change
anyway, so we might as well do it now.

Note: `onResidual` will tick even on `onSideEnd` turns, although
`onSideResidual` won't. When refactoring weather, remember to
check `this.state.duration` so you don't deal weather damage on the
ending turn.

Intended as a better fix for #8216
2021-04-25 10:55:54 -07:00
.github/workflows Fix modlog tests on Windows (#7187) 2020-08-10 09:37:08 -07:00
.vscode Turn off Format on Save in VS Code (#7807) 2020-12-24 09:44:24 -08:00
config Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
data Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
databases/schemas Modlog: Avoid optional properties in ModlogEntry (#7613) 2020-11-01 14:07:01 -08:00
lib Refactor everything to use Utils.sortBy (#8220) 2021-04-23 22:41:00 -07:00
logs
server /hiderank: Don't let users hide as Section Leaders 2021-04-25 02:26:46 -06:00
sim Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
test Support per-pokemon Residual handlers in Side/Field conditions (#8222) 2021-04-25 10:55:54 -07:00
tools Clear .config-dist when building 2021-04-21 23:46:55 -07:00
translations Trivia: Improve display for unranked games 2021-04-21 20:27:16 -07:00
.editorconfig
.eslintrc-no-types.json Fix QueryProcessManager type signatures 2021-01-30 11:35:35 -08:00
.eslintrc.json Default to type-aware linting (#7538) 2020-10-19 02:52:33 -07:00
.gitattributes
.gitignore Enable incremental compilation in tsc (#7802) 2020-12-13 23:11:38 -08:00
.mocharc.json Random Battles: Add basic unit test framework 2021-03-18 18:17:25 -07:00
.npmignore Publish 0.11.3 to npm 2020-10-21 17:24:58 +01:00
.npmrc
build Clean mods/ and chat-plugins/ when building 2021-04-07 01:33:10 -07:00
CODEOWNERS CODEOWNERS: Add me to formats 2021-03-19 18:01:05 -04:00
COMMANDLINE.md Improve documentation 2020-10-29 15:14:29 +00:00
CONTRIBUTING.md CONTRIBUTING: Improve 2020-12-26 22:04:14 -08:00
LICENSE License: Update year to 2021 (#7920) 2021-01-17 16:12:31 +04:00
old-simulator-doc.txt
package.json Release 0.11.5 2021-03-29 11:00:52 -07:00
pokemon-showdown Update Dex API (#8181) 2021-04-08 03:00:37 -07:00
Procfile
PROTOCOL.md Update Dex API (#8181) 2021-04-08 03:00:37 -07:00
README.md Credits: The Immortal is no longer staff 2021-02-10 12:35:25 -08:00
simulator-doc.txt Fix bugs with secondary/ability order 2020-02-08 08:07:39 -08:00
tsconfig.json Make tsc warn about unreachable code (#8122) 2021-03-16 18:29:53 -07:00

Pokémon Showdown

Navigation: Website | Server repository | Client repository | Dex repository

Build Status Dependency Status devDependency Status Total Alerts

Introduction

Pokémon Showdown is many things:

Pokémon Showdown simulates singles, doubles and triples battles in all the games out so far (Generations 1 through 8).

  • PROTOCOL.md - The protocol used by the server to communicate with clients.

  • SIM-PROTOCOL.md - The protocol used for battles and battle messages.

  • CONTRIBUTING.md - Useful code standards to understand if you want to send pull requests to PS (not necessary if you're just using the code and not planning to contribute back).

  • Bot FAQ - An FAQ compiled by Kaiepi [Kaiepi] regarding making Pokemon Showdown bots - mainly chatbots and battle bots.

Community

PS has a built-in chat service. Join our main server to talk to us!

You can also visit the Pokémon Showdown forums for discussion and help.

If you'd like to contribute to programming and don't know where to start, feel free to check out Ideas for New Developers.

License

Pokémon Showdown's server is distributed under the terms of the MIT License.

Credits

Owner

  • Guangcong Luo [Zarel] - Development, Design, Sysadmin

Staff

  • Andrew Werner [HoeenHero] - Development
  • Annika L. [Annika] - Development
  • Chris Monsanto [chaos] - Development, Sysadmin
  • Leonard Craft III - Research (game mechanics)
  • Mathieu Dias-Martins [Marty-D] - Research (game mechanics), Development

Contributors