Commit Graph

4368 Commits

Author SHA1 Message Date
Guangcong Luo
e7eb12e686 Fix Trace activation message
Fixes #1181
2018-11-28 21:56:40 -05:00
urkerab
01f764f2ec Fix Reflect Type copying types (#1182) 2018-11-28 20:47:43 -06:00
Ezaphs
67a87fb169 Correct rounding error in Lets Go stat calculation (#1180) 2018-11-26 17:34:25 -06:00
urkerab
2494aca33b Fix Gen 1 partial trapping message (#1178) 2018-11-25 21:52:01 -06:00
urkerab
ddfb162b8a Fix magnitude activation (#1179) 2018-11-25 21:51:30 -06:00
Kris Johnson
460ee1ad26 Add learnset support for Let's Go (#1177) 2018-11-25 15:56:50 -06:00
urkerab
1ed8c86b73 Fix Dry Skin healing (#1176) 2018-11-25 15:27:18 -06:00
urkerab
3540d9d1f4 Fix message when partial trapping ends (#1174) 2018-11-24 14:35:32 -06:00
urkerab
77758de466 Fix some specific failure text cases (#1175) 2018-11-24 14:34:43 -06:00
Guangcong Luo
aa6c94ac64 Fix immunity messages
Fixes #1173
2018-11-24 02:26:48 -05:00
Guangcong Luo
096f037a07 Put battle text in battledata.js
This makes it so a regular build will rebuild battle text, instead of
requiring a full build.

battle text is under active development, so this is pretty useful,
even if conceptually, text is purely a graphical thing and not actually
needed by headless battles.
2018-11-24 01:14:28 -06:00
Guangcong Luo
01bdf7808b Don't build minidex if no sprites folder
This prevents PS from disabling sprite animations if someone runs
`./build full` without having sprites.
2018-11-24 01:14:28 -06:00
Guangcong Luo
331b35de53 Sync data
This will probably be our last data sync, until I work out a new solution
for rebuilding learnsets-g6 without needing an old copy, so learnsets-g6
can be gitignored.

The reason an old copy is currently needed is because it was written back
when learnsets-g6 contained data on the order same-level moves were learned
(most pokemon have a lot of L1 moves, and the order is relevant for which
moves are kept and which moves are replaced if you catch the pokemon at
medium-low level.)

This information isn't present in learnsets.js, so learnsets-g6.js needs to
preserve that information from older copies of learnsets-g6.js.

This has of course been entirely irrelevant for years, because we never
encoded learnset order data in gen 7 in the first place. But the code for
doing so stayed around...
2018-11-24 02:12:50 -05:00
Guangcong Luo
3004f2f0b6 Add line breaks to spacers
Makes battle logs look nicer when copy/pasted as plaintext.
2018-11-23 01:40:15 -06:00
Guangcong Luo
5572fe6e80 Fix team/side messages 2018-11-22 22:05:19 -06:00
Guangcong Luo
84e76c4bba Stop tracking minidex in Git
These files are now autogenerated by the build scripts, and depend
on files not even present on GitHub anyway.

(The minidex is a database of height/width for PS's animated GIF
sprites, for use by the animation engine. It also contains dex numbers
for use by pokemon icon spritesheets.)
2018-11-22 21:54:46 -06:00
Guangcong Luo
f62060c8ac Add data/text.js to eslint 2018-11-22 21:51:27 -06:00
Guangcong Luo
1e25db3224 Split 'activate' and 'upkeep' message types
Weather uses both 'activate':

    The mysterious strong winds weakened the attack!

and 'upkeep':

    The sandstorm is raging.

So keeping them on the same message type is complicated. PS already
uses `|upkeep|` to mark the beginning of the residual phase, so this is
a good name for this message type.

For now, only upkeep messages happening during the residual step are
here - Hail, Sandstorm, and Uproar. Messages that happen at other
times, such as Attract's "[POKEMON] is in love with [TARGET]!" remain
as "activate".
2018-11-22 21:46:26 -06:00
Marty-D
aa9bbc1df3 Fix Meltan and Melmetal sprites 2018-11-22 20:16:10 -05:00
Guangcong Luo
8efa0048e7 Fix Magician/Pickpocket activation message 2018-11-22 17:16:50 -05:00
Guangcong Luo
f2d558159f Fix teambuilder stat calculation in LGPE OU 2018-11-22 17:00:05 -05:00
Guangcong Luo
81a4846434 Fix AV slider in Let's Go no-AV formats 2018-11-22 16:58:58 -05:00
Guangcong Luo
18caa362d4 Fix Thief, Covet, Frisk messages 2018-11-22 14:26:25 -05:00
Guangcong Luo
6214e1c185 Make sure fake buttons don't wrap
The .button class now has display: inline-block, which should fix the
issue with <a> buttons wrapping.
2018-11-22 06:05:12 -05:00
Guangcong Luo
e01c181307 Fix misc bugs in text-parser
- Magic Room
- Wide Guard
- Perish Song
- Leppa Berry
- Gen 1 Special boosting
2018-11-22 06:05:12 -05:00
Kris Johnson
44d669f74d Add more teambuilder support for Let's Go (#1169) 2018-11-22 00:10:23 -06:00
urkerab
09bb2852fa Fix stat copying (#1172) 2018-11-21 15:37:30 -06:00
Guangcong Luo
3c26bf6dad Fix Ally Switch message 2018-11-20 18:11:16 -06:00
Guangcong Luo
d48419471d Fix crash in "Change password" 2018-11-20 16:29:35 -06:00
Guangcong Luo
23b128ae32 Fix bug causing delayed chat in battles 2018-11-20 15:59:03 -06:00
Guangcong Luo
6640c323f0 Fix crash in downloading replays 2018-11-20 15:43:45 -06:00
Guangcong Luo
b60badea04 Fix crash in Reflect Type 2018-11-20 15:03:45 -06:00
Guangcong Luo
69aa657e1a Fix Mega evolution message in Let's Go 2018-11-20 15:02:46 -06:00
Guangcong Luo
ee74274633 Fix Gen 6 Mega evolution message 2018-11-20 14:02:07 -06:00
HoeenHero
a242336cba Fix escaping HTML in localized time (#1170) 2018-11-20 19:41:17 +01:00
Guangcong Luo
a0aac91aac Fix testclient.html for latest Chrome
Unfortunately, the `loadRemoteData` trick we used to load data no
longer works. The new trick is to load asynchronously, and defer
initialization to `onload`.
2018-11-20 01:53:04 -06:00
tmagicturtle
4c5885dd28 Fix ability hiding in Let's Go tooltips (#1168)
Previous pull request did the opposite of what it was supposed to; I'll be more careful next time.
2018-11-19 20:22:47 -06:00
Guangcong Luo
27633540a1 Fix bugs in BattleTextParser update 2018-11-19 20:46:28 -05:00
Guangcong Luo
e93a0faf75 Support AVs in teambuilder
This is really hacky code; the Preact rewrite will make it nicer...
2018-11-19 20:45:28 -05:00
Guangcong Luo
9589c8c339 Fix crash from BattleLog update 2018-11-19 20:36:59 -05:00
tmagicturtle
3a03328449 Hide Abilities in Let's Go Tooltips (#1167) 2018-11-19 19:17:57 -06:00
Alexander B
ea04ea7014 Fix multi-hitcount message (#1166) 2018-11-19 18:54:30 -06:00
Konrad Borowski
1565e5d9e3 Add alt text for CAPTCHA (#1164)
This isn't a really serious CAPTCHA, somebody specifically targetting
Showdown will evade it. However, it is an obstacle for blind people,
so an alternative text-only CAPTCHA was introduced.
2018-11-19 23:40:20 +01:00
Guangcong Luo
f2f81ac374 Remove "Gen 7" from Let's Go formats in list
So "[Gen 7 Let's Go]" becomes "[Let's Go]"
2018-11-19 16:18:15 -06:00
Marty-D
85872133d0 Update minisprite sheet 2018-11-19 14:13:09 -05:00
Guangcong Luo
7691f650f2 Minor refactor to battle-text-parser 2018-11-18 23:22:09 -06:00
Guangcong Luo
6464a97641 Support uhtml in battles
Supporting it actually turns out to be very simple, so we might as
well. In practice, we probably want to never use this feature
for broadcast messages - I don't think I want it in replays.

It could still be nice for stuff like /roomsettings, though.
2018-11-17 13:59:06 -06:00
Guangcong Luo
8669bae196 Add tslint
Probably the most controversial change here is that I have a max line
length limit, currently set to 140 columns. Lines that set up a
string buffer, lines involving regexes, and the text parser's replace
chains are excluded from the limit.

PS has otherwise been moving towards a line length limit, it just
hasn't been linter-enforced yet. I worry about contributors being
annoyed by it, especially since it's not like it's handled
automatically by Prettier or something.

Oh well, it's set to "warning" so Travis won't yell about it.
2018-11-15 23:01:03 -06:00
Guangcong Luo
f8ce20970f Fix other infinite loop in Transform
This hasn't come up yet, but we might as well handle it before it comes
up.

Also slightly refactor `rememberMove`.
2018-11-15 19:01:18 -06:00
Guangcong Luo
38b66272f2 Fix issues identified by LGTM
Out of 12 issues found:

3 bugs:

- duplicate property - caught a bug in Gen 1 Light Screen
- duplicate property - caught a bug in Gen 1 Reflect
- unused variable - caught a bug in type animations

7 harmless but good for code quality:

- unused variable - harmless but good for code quality
- unused variable - harmless but good for code quality
- unused variable - harmless but good for code quality
- unused variable - harmless but good for code quality
- duplicate case - harmless but important for code quality
- unused variable - harmless but good for code quality
- unused variable - harmless but important for code quality

2 not-bugs that had to be worked around:

- unused variable - used for an `eval` trick, had to use a workaround
- unused variable - used for readable destructuring

I think on balance, LGTM does more good than bad. Catching bugs early
is worth some amount of hassle.

(Also like half these problems are problems tslint could catch if I
actually bothered to set it up...)
2018-11-15 18:52:53 -06:00