Commit Graph

20 Commits

Author SHA1 Message Date
urkerab
bae434e606 Add a single event for a move's own immunity to a specific target (#5904) 2019-10-24 11:00:28 +10:30
urkerab
5b9d0c8db6 Centralise invulnerability checks for No Guard and Lock-On (#5894) 2019-10-17 22:32:44 -04:00
urkerab
3bfec7bf2f Rename TryImmunity to Invulnerability (#5877)
It's a check for semi-invulnerability rather than any sort of immunity.
2019-10-16 20:12:12 -04:00
Guangcong Luo
7a023746ba
Refactor battle.dex out of battle (#5851)
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 07:38:08 +11:00
Kirk Scheibelhut
db66195c26 Remove additional toID calls (#5503) 2019-05-23 18:11:26 +01:00
Kirk Scheibelhut
3d24166cdf toId -> toID
Closes #5479
2019-05-12 17:53:01 -07: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
2d08a1ec61
Gen II: Improve boostBy 2019-03-17 10:03:01 -04:00
Marty-D
9315b8d4d8 Gen II: Cap stat boosting properly 2019-03-16 17:49:25 -04:00
Kirk Scheibelhut
a8903d2563 Cleanup stat naming and types (storedStats, StatNameExceptHP) (#5274) 2019-03-09 09:53:11 -06:00
Kirk Scheibelhut
4e74f766b8 Fix Gen 2 stat rollover hint (#5271) 2019-03-07 15:00:14 -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
f1f903ceae Add hints for odd Gen 2 behavior (#5254) 2019-03-05 16:36:42 -06:00
Kirk Scheibelhut
b09fd63377 Refactor sim/ to be native Typescript (#5210) 2019-02-26 11:03:30 -06:00
Kirk Scheibelhut
623b349fc1 Fix Gen 1 bug involving last damage and Substitute (#2598) (#5211) 2019-02-25 21:24:14 -06: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