This contains a lot of minor refactors, but the main thing that's going
on here is that battle stream writes have been streamlined to be a lot
easier for others to use.
We even support:
./pokemon-showdown simulate-battle
which provides a stdio interface for anyone using any programming
language to simulate a battle.
I'm not entirely sure why we're maintaining the separation of SpA and
SpD, except for better support of possible OMs or custom games where
they could be different, I guess.
There are probably game mechanics that would be better supported if we
actually just unified SpA and SpD.
- Add Team Preview to the Standard GBU ruleset
- Add Zeraora to the Standard GBU banlist
- Use Standard GBU for VGC 2018
- Move Dragon Cup so it’s not in-between the two Battle Spot formats
This command is intended to be a quick-access option for checking banlists and rulesets for formats as well as descriptions of the rules that would get listed in case the user has questions.
PS's rule table has been renamed from banlistTable, and works a bit
differently now. It's a Map instead of an object now, and the keys
work a bit differently.
The original banlistTable was designed to store bans, and later
additions shoved rules and then unbans in there. The new table is
designed to support all of these.
This is a surprisingly minor refactor considering how many files it
touches, but most of this is only renames.
In terms of file renames:
- `tools.js` is now `sim/dex.js`
- `battle-engine.js` is now `sim/index.js` and its three classes are
in `sim/battle.js`, `sim/side.js`, and `sim/pokemon.js`
- `prng.js` is now `sim/prng.js`
In terms of variable renames:
- `Tools` is now `Dex`
- `BattleEngine` is now `Sim`
- `BattleEngine.Battle` is now `Sim.Battle`
- `BattleEngine.BattleSide` is now `Sim.Side`
- `BattleEngine.BattlePokemon` is now `Sim.Pokemon`
Previously, only CAP Pokemon were allowed to hold Crucibellite, even in CAP, and they've apparently been able to hold Berserk Gene and other Gen 2 items this whole time.
PS's choice system has now been majorly rewritten!
Battle#parseChoice has been eliminated, and Battle#choose is now a
very lightweight wrapper around the BattleSide#choose* functions, which
now handle validation.
Partial decisions have been mostly removed. You can manually construct
decisions partially with the side.choose* functions, but there's no
other support for them. Partial undo has been removed completely.
Choice tracking has been renamed from side.choiceData to side.choice.
side.choices has been removed and is now autogenerated from side.choice
when needed.
side.choiceData.decisions has been renamed side.choice.actions. In the
future, "decision" is a deprecated term and should be called "action"
wherever it shows up.
side.choiceData.waiting and side.getDecisionsFinished() have been
merged into side.isChoiceDone().
Other values in side.choiceData have either been rendered unnecessary
or renamed to something clearer.
The "skip" and "pass" choices have been merged together. Passes can
still be filled in automatically (so you can just use `/move 1` in
doubles when you have only one Pokémon left).