Commit Graph

76 Commits

Author SHA1 Message Date
HoeenHero
9ecbcabee9
Dynamaxing (#5946) 2019-11-15 21:33:10 -05: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
Guangcong Luo
3db1d9916c Deduplicate Template definition
It turns out Template is the only remotely-easy type to merge the class
and interface for.

The others all have a bunch of event methods which would need to be
redefined on the class.
2019-07-19 18:20:42 -05:00
Kirk Scheibelhut
f0e3d22957 Tweak cases how/when base power is included in required (#5527) 2019-06-05 16:40:47 -05:00
Kirk Scheibelhut
51d390900d Include BP in |request| for Frustration/Return (#5519) 2019-06-04 11:35:40 -05:00
Kirk Scheibelhut
3d24166cdf toId -> toID
Closes #5479
2019-05-12 17:53:01 -07:00
Kirk Scheibelhut
df3d9b91ef Battle toJSON/fromJSON (#5427) 2019-04-30 14:48:27 +12:00
Kirk Scheibelhut
7e4929a39f Change protocol for '|split' message type (#5331) (#5332) 2019-04-22 09:20:47 +09:30
Kirk Scheibelhut
b2777f9bf6 Remove |callback| in favor of |error| (#5418) 2019-04-09 03:33:32 +08:00
Ivo Julca
121c4a3b24 Sim: Abort parsing choices if any is invalid
Fixes #5399
2019-04-03 02:08:59 -05:00
Kirk Scheibelhut
0f8241045b Test 'noCancel' behavior to prevent #5344 (#5348)
Renames currentRequest -> requestState to avoid confusion.
2019-04-03 11:58:53 +08:00
Ivo Julca
b369b0f680 Sim: Fix crash in Team Preview
Regression from the deletion of parseChoice() @698fb2a
2019-03-30 19:39:24 -05:00
MacChaeger
9a7ce3dedf Put side conditions on p1 and p2 in multi battles (#5341) 2019-03-27 11:00:36 +08:00
Kirk Scheibelhut
564dae455d Make Battle throw on choice errors in tests (#5286) 2019-03-21 13:14:38 +09:00
MacChaeger
6ac8266696 Support 4 player battles (#5266) 2019-03-18 13:37:27 +09:00
Kirk Scheibelhut
0e1708bf9f Enable prefer-const and max 120 character lines for .ts files (#5292) 2019-03-16 07:14:04 +09:00
Ivo Julca
37b537feea Fix long line warning 2019-03-12 00:35:51 -05:00
Slayer95
5828a60663
Sim: Quit parsing on too many choices 2019-03-11 02:04:22 -05:00
Guangcong Luo
47111ac4c7 Make side#getChoice() show ultra where relevant
Fixes #5294
2019-03-10 13:52:30 -05:00
Kirk Scheibelhut
1b2aeb696b Reject move commands with multiple flags (#5290) 2019-03-09 23:23:36 -06:00
Kirk Scheibelhut
538731d6df Accept move choices with target/mega in either order (#5284) 2019-03-09 20:21:17 -06:00
Kirk Scheibelhut
98072fff34 Make the switch command more flexible (#5288)
Make it take a case-insensitive nickname or species id,
something several of our test cases already rely upon.
2019-03-09 20:15:12 -06:00
Kirk Scheibelhut
e634d9a7b9 Cleanup Side & Dex after .ts refactor (#5273) 2019-03-09 10:14:11 -06:00
Kirk Scheibelhut
a8903d2563 Cleanup stat naming and types (storedStats, StatNameExceptHP) (#5274) 2019-03-09 09:53:11 -06:00
JetOU
85533ee3a0 Change forEach to for...of (#5269) 2019-03-08 11:24:58 -06:00
Kirk Scheibelhut
b09fd63377 Refactor sim/ to be native Typescript (#5210) 2019-02-26 11:03:30 -06:00