Commit Graph

4441 Commits

Author SHA1 Message Date
Guangcong Luo
e1bb9f64f9 Fix chat message timing 2019-01-25 19:21:01 -05:00
Guangcong Luo
03a62d5a55 Improve Roost messages
Roost now displays a hint message, making it clearer that it isn't just
a heal. This should cut down on the confused "bug reports" about it.
2019-01-25 19:21:01 -05:00
Guangcong Luo
d1d26d3720 Support grace time
We're adding support for a new server-side feature: Grace time. This
is time that's used instead of total time, on the first turn.
2019-01-25 03:16:07 -06:00
MacChaeger
a85debb615 Tournaments: Actually disable the Validate button when appropriate (#1221) 2019-01-24 23:39:37 -06:00
MacChaeger
ebb7838716 Teambuilder: update EV guesser (#1220)
Adds basic support for Metronome Battle as well as having Sand Stream on Rock types other than Tyranitar
2019-01-23 13:26:23 -06:00
Kris Johnson
e62302417c Support Untiered as a Doubles tier in teambuilder (#1216) 2019-01-22 19:00:12 -06:00
asgdf
9974caa1e9 Teambuilder: Make Trick Room first result for 'TR' (#1219) 2019-01-22 02:20:55 -06:00
asgdf
bac5c4232e Teambuilder: Fix no moves displayed for visual formes (#1217) 2019-01-19 09:46:31 -06:00
Kris Johnson
e3bc453210 Fix the gen number for teambuilder tables (#1215) 2019-01-16 15:59:58 -06:00
urkerab
2f1002edde Restore missing Grudge activation message (#1214) 2019-01-16 15:51:11 -06:00
Marty-D
80fc1bacfe
Teambuilder: Update Smogdex links 2019-01-16 15:09:58 -05:00
asgdf
81af2da87b Clear statbar of lingering expired turn statuses (#1213) 2019-01-15 10:52:36 -06:00
asgdf
3402a79466 Teambuilder: Properly label healing berry usefulness in gen 7 (#1211) 2019-01-13 21:47:00 -06:00
urkerab
00346db803 Fix crash damage message after server PR 5042 (#1210) 2019-01-13 13:28:47 -06:00
urkerab
320711ae6f Fix Fairy Lock for replays (#1212) 2019-01-13 13:22:16 -06:00
asgdf
4562f4fc2b Re-implement unlinking in battle chat (#1206) 2019-01-12 11:17:45 -06:00
Guangcong Luo
adccb29971 Add Berry weaken message 2019-01-12 07:44:05 -06:00
Guangcong Luo
3c39a968c2 Fix Flash Fire message 2019-01-11 07:57:33 -05:00
Guangcong Luo
ead82b99ee Hide "Trapped" volatile display
Currently we don't properly track when trapping (like from Mean Look)
disappears, so the message needs to be hidden.
2019-01-11 07:56:21 -05:00
Guangcong Luo
9ffbde2fd3 Animate -clearallboost faster
This makes all the time offsets for -clearallboost simultaneous.
2019-01-10 04:56:10 -06:00
Guangcong Luo
ea8d9b611d Add partial trapping moves to status table 2019-01-09 03:20:06 -06:00
Guangcong Luo
d276400937 Move makeLoadTracker from battle-dex to storage
`makeLoadTracker` is deprecated in favor of `PSObservable` in the new
client, and has no reason to remain in battle-dex, which is now has a
specific role rather than its previous role as "random useful
functions".
2019-01-09 02:33:52 -06:00
Guangcong Luo
a6bb8a47c5 Fix cosmetic forms in teambuilder 2019-01-09 02:22:24 -06:00
Kris Johnson
e8e347a8f7 Add a getTier function for the teambuilder (#1208) 2019-01-08 23:24:22 -06:00
Guangcong Luo
4e37bd0e8d Fix block messages 2019-01-07 22:46:56 -05:00
Guangcong Luo
655b7e1d99 Support ability activations in |-move|
I don't know how Magic Bounce was supported in the past, but it's
supported properly now.
2019-01-07 22:46:56 -05:00
Guangcong Luo
e489b36856 Fix Confusion message grouping 2019-01-07 21:45:58 -06:00
Guangcong Luo
fd5f54c99c Autoconvert old protocol messages
Instead of needing to support old protocol messages, we now introduce
BattleTextParser.upgradeArgs, which automatically upgrades them to new
protocol messages.

Fixes #1199
2019-01-07 21:12:00 -06:00
Kris Johnson
a18884c6f8 Let's Go: Add tooltip support for Random Battles (#1207) 2019-01-07 02:31:21 -06:00
Guangcong Luo
b3af47fa1b Fix pokemon icons in replays 2019-01-05 20:34:58 -05:00
Guangcong Luo
85855fe7b5 Fix terrain conflicts in replays 2019-01-05 19:34:39 -06:00
asgdf
4a72d9dbcd Fix Judgment/Multi-Attack/Technoblast type display in battles (#1205) 2019-01-05 17:44:31 -06:00
Guangcong Luo
310fd0dc7b Fix cosmetic form support 2019-01-05 16:10:35 -06:00
Guangcong Luo
2471482fb4 Battle.lineParse -> BattleTextParser.parseLine
BattleTextParser.parseLine -> BattleTextParser.parseArgs

This makes it so Battle depends on BattleTextParser, rather than
BattleTextParser depending on Battle.

This is probably better, because someone is way more likely to want
BattleTextParser standalone, than to want Battle standalone.

...which I'm sure matters to literally no one but me, but whatever. I
think it makes more sense this way.
2019-01-05 05:41:05 -06:00
Guangcong Luo
a05f23fd37 Use data/text.js for stats in text parser
We previously used BattleStats, but using `data/text.js` allows stat
names to be translated.
2019-01-05 05:36:50 -06:00
Guangcong Luo
0a0035fbf8 Fix trailing whitespace 2019-01-05 05:18:16 -06:00
Guangcong Luo
d05fe62375 Use require instead of eval in ./test/parse
I still don't like how everything's a global in Node, but for now we
don't have a better solution.
2019-01-05 05:15:37 -06:00
Guangcong Luo
86a55ee61e Fix minor bug in dispatcher 2019-01-05 04:04:10 -05:00
Guangcong Luo
6dcdaf45b9 Fix packed team format to match server 2019-01-05 04:03:28 -05:00
Guangcong Luo
2a044e5715 Support replacing content in downloaded replays 2019-01-05 04:03:16 -05:00
Guangcong Luo
8b02add7bc Support new resource files in downloaded replays 2019-01-05 04:03:00 -05:00
Guangcong Luo
c1f372b3a7 Add a default item activation message 2019-01-05 04:00:29 -05:00
Guangcong Luo
7e82afd2de Support <button name="login"> in HTML panels
This is a stopgap until the new client supports these properly.
2019-01-05 03:59:21 -05:00
urkerab
a8762abc3b Fix Attract message for Destiny Knot (#1204) 2019-01-04 22:31:53 -06:00
Guangcong Luo
e5dfba6797 Make classes for dex data
Template, Item, Move, and Ability are now classes. This guarantees that
`getTemplate`, `getItem` etc return objects that implement their
interfaces (they didn't before).

As of their current implementation, they require trusted resource
files. The plan is, whenever we support custom resource files, to pass
all their strings through `sanitizeName`. This won't prevent servers
from causing the client to behave unexpectedly, but it should prevent
any actual vulnerabilities.

In addition, pokemon forme icon index tables have been moved to
`battle-dex-data.ts`.
2019-01-04 00:34:10 -06:00
Kris Johnson
553cffa93e Fix teambuilder tables for formats not in formats-data (#1203) 2019-01-03 15:39:20 -06:00
Guangcong Luo
dcb3a6f769 Ugly hack to support tests in Node.js
Previously, we used the `eval` hack to "import" our code into test
files. The biggest problem with that approach is that we don't get
line numbers.

Now, we're assigning relevant variables to globals in Node.js for
tests. It's ugly, but it works. There's no simple way to import local
variables only if we're in Node.

Ideally, we'd build this in two different ways: A .mjs file for Node,
and a .js file for the browser. Or maybe use UMD. I'll figure it out
later, I guess.
2019-01-03 03:58:06 -06:00
Guangcong Luo
e186f57f41 Rename .mocha.js -> .test.js
This spec file is, incidentally, Jest-compatible. I benchmarked and
Jest is noticeably slower right now, so I'll stick with Mocha, but
if we ever need Jest features, it'll be useful to be able to easily
switch.
2019-01-03 03:42:13 -06:00
urkerab
246a235a59 Fix message for Jaboca and Rowap Berry (#1200) 2018-12-31 00:37:07 -08:00
asgdf
d129b84c13 Fix status data not resetting after getting phazed (#1198) 2018-12-31 00:35:55 -08:00