This is the SECOND time we've gotten this problem, where I think a
TypeScript error is actually an execution error.
This was introduced at some point where the `// @ts-ignore` was
accidentally deleted.
A battle's inputLog is now stored separately from the output log. It's
not an exact log of inputs, but rather just a collection of the inputs
that resulted in the battle: a default choice expands to the choice
that was actually used, and the starting seed is logged whether or not
it was explicitly passed into the battle stream.
Fixes#4348Fixes#3201
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.
./pokemon-showdown help
will now display all the possible ways to use PS on the command-line,
of which there are several new ones:
./pokemon-showdown validate-team
./pokemon-showdown unpack-team
./pokemon-showdown pack-team
The previous complement of way too many message types:
- update, winupdate, sideupdate, request, score, log
are now only:
- update, sideupdate, end
`score` was removed in the previous commit, and this commit adds a new
message type `end`. `end` replaces the previous `log`, and also
contains the data for `winupdate` and `score`.
`request` was also folded into `sideupdate`.
`Sim.construct` no longer exists. Battles are now constructed directly
with `new Battle()`. Parameters other than formatid are now passed as
`options`.
This is specifically made to fix Nasty Plot + Surf Raichu.
Specifically, prevo moves are no longer compatible with evo event
moves.
Other incompatibilities (specifically, modern prevo moves with old-gen
evo moves) will be harder to fix, unfortunately.