Commit Graph

18 Commits

Author SHA1 Message Date
Guangcong Luo
2d3614f325 Refactor battle.dex out of battle
In most other similar systems, like TeamValidator, we use `thing.dex`
instead of having it extend `ModdedDex`. Battle has always extended
`ModdedDex`, though. This changes Battle to match the others.

This should fix an issue with `Battle.data` not being cached.

This also frees up Battle to extend ObjectReadWriteStream<string> in
a future update.
2019-10-06 04:50:35 +11:00
Flametix
a374c6aa8b Fix typo in Gen 1 accuracy hint (#5771)
accurracy -> accuracy
2019-09-11 09:10:08 -07:00
Kirk Scheibelhut
3d24166cdf toId -> toID
Closes #5479
2019-05-12 17:53:01 -07:00
Kirk Scheibelhut
aeafb34a96 Fix double [still] in Gen 1 (#5491)
Moves with the 'charge' flag add the 'twoturnmove' volatile which
already handles adding [still].
2019-05-09 12:18:12 +09:30
Kirk Scheibelhut
be82a3b817 Move -mustrecharge message to onStart (#5488)
This way it doesn't show up at the end of the turn or get added 3 separate times.

Fixes #5462.
2019-05-08 16:39:56 -04:00
Kirk Scheibelhut
a0734bde6f Redo Endless Battle Clause with a new specification (#5472) 2019-05-07 11:18:06 +09:30
Kirk Scheibelhut
df3d9b91ef Battle toJSON/fromJSON (#5427) 2019-04-30 14:48:27 +12:00
Guangcong Luo
4c47af28aa Refactor moveHitData
This is actually three refactors:

- swap around thing:slot for slot:thing in MoveHitData
- add Pokemon#getSlot
- remove the ActiveMove class; it's back to being an interface
2019-04-06 19:10:45 +08:00
Kirk Scheibelhut
0efd71dfef Move Data.ActiveMove methods to Pokemon (#5416)
See #5415 for context - having these methods is unsafe and leads
to crashes because not all ActiveMoves are created through the
Data.ActiveMove constructor. Instead of Pokemon, these could
alternatively be static methods on ActiveMove (or the ActiveMove
class could be completely abolished and reverted back to an
interface), but #5415 will deal with ActiveMove long term, this just
fixes the crashes.
2019-04-06 13:14:50 +08:00
MacChaeger
d3f1161b62 Fix Weakness Policy and Clangorous Soulblaze in doubles (#5389) 2019-04-04 18:51:27 +08:00
Kirk Scheibelhut
9f5a727ad1 Pull Field out of Battle (#5333) 2019-03-23 02:52:12 +09:00
Marty-D
4854febb2e Gen I: Fix Leech Seed recovery 2019-03-21 09:26:24 -04:00
Kirk Scheibelhut
a8903d2563 Cleanup stat naming and types (storedStats, StatNameExceptHP) (#5274) 2019-03-09 09:53:11 -06:00
Kirk Scheibelhut
295f7c6c9f Switch hints to use double quotes everywhere (#5261)
Also, have `Battle#hint` take Side per @urkerab's suggestion.

Followup to #5258, no functionality changes.
2019-03-07 09:34:14 -06:00
Kirk Scheibelhut
a04d4da992 Add more hints to Gen 1 & 4, migrate others to Battle#hint (#5258) 2019-03-06 11:24:47 -06:00
Kirk Scheibelhut
623b349fc1 Fix Gen 1 bug involving last damage and Substitute (#2598) (#5211) 2019-02-25 21:24:14 -06:00
Marty-D
a483604687
Gen I: Stop trying to change a fainted Pokemon's stat stages 2019-02-23 21:29:36 -05:00
Guangcong Luo
f3e45fbb72 Move server code to server/
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.
2019-02-03 16:07:06 -06:00