Also move mods/ to data/mods/
This makes PS more monorepo-like. The intent is to further separate
the sim and the server code, but without fully committing to splitting
the repository itself.
We now support `./pokemon-showdown start` in addition to
`./pokemon-showdown`. I'm not clear which I want to be the default
yet.
This commit is aimed at a particular kind of timerstalling: starting a
new game while letting the timer run out on your current game, instead
of just forfeiting.
Now you can't search for more battles if it's your turn to move, or if
your opponent takes less than 10 seconds to move (including animation).
1v1 and Metronome Battles asked for exemptions, and they've received
them.
- Total time is now capped at starting total time.
- We now support a grace period between timer activation and when total
time starts ticking down. This is used to implement VGC's Team Preview
timer, as well as the 60 second grace period in normal games.
- We no longer clamp down on games over 400 turns.
- Starting time in the ladder is decreased to 150 seconds.
VGC's timer has also been tweaked in other ways.
These are the changes documented in Policy Review:
https://www.smogon.com/forums/threads/ps-timer-updates.3646406/
move.zPowered is renamed move.isZPowered. It's now documented in JSDoc
exactly how it differs from move.isZ.
This commit includes several minor refactors to Z-move mechanics,
including a bug fix: Z-boosted called Weather Ball is now correctly
typed.
The types Template, Move, Ability, and Item are now read-only. This
should guard against accidental writing to types that shouldn't be
written to.
A new type, ActiveMove, has been introduced. Like it sounds, it's
used for moves that are currently actively being used. A lot of
attributes that are only relevant to active moves, such as
`hasBounced`, are now only available on ActiveMove, not on Move.
ActiveMoves are mutable, unlike Moves.
getMoveCopy has been renamed getActiveMove, to better reflect its
role. `isCopy` has been deprecated, and distinguishing Moves from
ActiveMoves is now done by `typeof move.hit === 'number'` where
necessary.
ActiveMoves now internally track which hit of a multihit move
they're on, in move.hit, so move.hit doesn't need to be manually
incremented by Triple Kick and Parental Bond anymore.
move.hasParentalBond has been replaced by a more generic
move.multihitType.