Commit Graph

4288 Commits

Author SHA1 Message Date
Guangcong Luo
f86245febb Add mocha tests to npm test 2018-10-16 03:31:27 -05:00
Guangcong Luo
9019543dc1 Don't build graphics.js by default
graphics.js will still be built by `./build full`, and once it already
exists, `./build` will rebuild it when it's modified.

Fixes #1150
2018-10-16 03:26:51 -05:00
Guangcong Luo
fb4f83a580 Remove testcafe dependency
It was unused and vulnerable.
2018-10-16 03:04:52 -05:00
Dan Huang
ee91a72dc6 Support headless client Battle (#1151) 2018-10-16 02:48:59 -05:00
Guangcong Luo
f09d917110 Support incremental builds
`./build` should run a lot faster now.
2018-10-16 00:31:07 -05:00
Guangcong Luo
b6dcc4da35 Remove jQuery-JSON dependency
We now just use JSON.parse and JSON.stringify - it's supported by all
browsers supported by the client.

Tools.safeJSON has also been moved to Storage.safeJSON, since it's not
used in replays at all.
2018-10-14 22:07:55 -05:00
Guangcong Luo
2aa13ed10c Update CONTRIBUTING.md for new polyfills 2018-10-14 22:05:10 -05:00
Guangcong Luo
8133c8fd3f Battles: Move more jQuery stuff to BattleScene 2018-10-14 21:47:03 -05:00
Guangcong Luo
42d6c0d164 Battles: Use polyfills over jQuery
We were previously using jQuery's $.trim() and Array.isArray(), but
we're now trying to remove the jQuery dependency from battle.ts.
2018-10-14 21:46:36 -05:00
Guangcong Luo
2c43954c41 Fix Toxic turn tracking
The Toxic turn tracker is now 1 off from previously; it now counts the
previous Toxic turn rather than the next one. This makes "0" more
intuitively represent the state before any Toxic damage is taken.

This fix mainly just fixes the type issue by removing the need for a
null value at all.
2018-10-14 21:14:48 -05:00
Guangcong Luo
7df9e5a7ea Make Babel output compact
This doesn't change debuggability and saves a bit of bandwidth.

But most importantly, it might help Windows users who are having
trouble compiling because Babel runs out of memory.
2018-10-14 04:36:58 -05:00
Alvin Ho
06621ba2f7 Fix Forme Change and Autotomize Interaction (Client Side) (#1153) 2018-10-08 16:35:17 -05:00
Alvin Ho
ce14663c25 Fix Toxic Orb and 'Next Damage' toolbox interaction (#1155) 2018-10-08 16:32:46 -05:00
Kris Johnson
22aedd4471 Support ZU in the teambuilder (#1152) 2018-10-07 15:52:42 +04:00
Guangcong Luo
a05669b754 Support importing teams in mixed format
Restoring a backup previously required all teams to be packed, or all
teams to be unpacked. Now, we support pasting a mix of packed and
unpacked teams.
2018-09-27 21:44:27 -04:00
Guangcong Luo
24ed8577bf Battles: Fix weather state when switching sides 2018-09-27 20:28:47 -05:00
The Immortal
73030656bb Ladder: Hide sections without any formats
And fix Unrated Random Battle being displayed.
2018-09-19 00:28:34 +04:00
asgdf
8e9c95b509 Tooltips: Properly show shortdesc for moves without long desc (#1146) 2018-09-09 23:52:41 -05:00
asgdf
8dafd449c0 Tooltips: Show status Z-move effects (#1145) 2018-09-09 03:25:28 -05:00
Ridaz
3cccd571bb Correct Solar Blade animation 2018-09-08 16:02:28 +01:00
Ridaz
aade9ef11e Fix misc animation errors 2018-09-07 19:24:59 +01:00
Guangcong Luo
11b3022250 Clean up more unused variables 2018-09-06 05:35:18 -05:00
Guangcong Luo
31b0fb4460 Stop using document.write in replay-embed.js
I absolutely refuse to believe there's any risk at all to using
document.write with a constant string.

But it's fair that it's non-standard, and won't work if the script
is loaded dynamically/asynchronously, so let's switch to the standard
way to dynamically load scripts and styles.

I'm still using `.src = foo` instead of `.setAttribute('src', foo)`
because there's no reason to write modern code when old-school code
works and is arguably more readable.
2018-09-06 05:35:18 -05:00
Guangcong Luo
b207be59a6 Comment out unused variables in battle.ts
I know, I know, unused code should be removed, not commented out. In
my defense:

1. This kind of code is really annoying to dig out of Git.

2. This kind of code will be used when this is refactored for use for
   an external messages file, which is planned (and necessary for
   translation support.)
2018-09-06 02:57:01 -05:00
Guangcong Luo
caa5240e7d Update and minify JS libraries
This is _mostly_ to shut up LGTM but also partially because this should
be done periodically anyway.
2018-09-06 02:42:03 -05:00
Guangcong Luo
a133ee8c5e Fix some bugs caught by LGTM 2018-09-05 16:48:27 -05:00
Marty-D
099fe28151
Update minisprite sheet 2018-09-03 14:37:48 -04:00
Guangcong Luo
9bf108dad8
Clarify README Warning 2018-09-02 01:12:40 -05:00
urkerab
9bf48c904f Avoid floating point error in health parse (#1140) 2018-08-27 19:58:04 -05:00
Guangcong Luo
28aa6e8b91 Support team backups in packed format
Team backup/restore was previously always unpacked, which is good for
readability but bad for memory usage. At high team counts, this can be a
serious problem, so with this change, if you have more than 350 teams,
your teams will be backed up in packed format.
2018-08-27 20:28:09 -04:00
Guangcong Luo
9d17e2bdd5 Fix S/M rival music
Due to a bug, it wasn't in the rotation of possible BGM at all.
2018-08-26 16:22:28 -04:00
Guangcong Luo
8562b2f090 Fix misc bugs 2018-08-26 16:18:06 -04:00
The Immortal
687be9a2ac
Teambuilder: Fix default validation format 2018-08-26 04:20:57 +04:00
Guangcong Luo
d8ad11e355 Add Miror B music easter egg
Also refactor scene.teamPreview into two functions, scene.teamPreview
and scene.teamPreviewEnd.
2018-08-21 15:34:52 -04:00
Guangcong Luo
91b1f2d833 Add Gen 3 Pressure warning
It is possible, in most cases, to correctly track Pressure PP in Gen 3.
It is, however, a fuckton of work, and I'm way too busy to do that work
right now.

So instead, have a warning about how PP tracking might be wrong in the
event of Pressure.

TODO: Send silent still Pressure activations using |split|
2018-08-21 15:34:52 -04:00
Guangcong Luo
ead9b27557 Fix cries for Necrozma formes 2018-08-21 15:34:52 -04:00
Guangcong Luo
add113dd6e Support global command console PM window
This is a companion to

6ed64cf0c2

and makes it so that a PM window without a specified userid will be a
global command console.
2018-08-21 15:34:52 -04:00
Guangcong Luo
f5e5ed1aa8 Fix bug when more pokemon than in Team Preview
Zoroark is now a case in which an opponent might have more apparent
pokemon than we were told from Team Preview.

TODO: Fancier tracking so people don't report bugs about pokemon count
with Zoroark in randbat
2018-08-20 17:17:00 -04:00
whales
f4ea4f3772 Use either command character for clientside commands (#1134) 2018-08-06 10:24:17 +09:00
Guangcong Luo
4f2d776c1e Refactor fix for in-battle auto-scroll 2018-08-02 14:16:29 -04:00
Guangcong Luo
184c1e29a8 Fix move popups after Gastro Acid
(This is a bit of a hack; will need to be moved during the refactor.)

Fixes #1135
2018-08-02 14:15:05 -04:00
asgdf
fe51dd1216 Stop battles from scrolling to the bottom constantly (#1136) 2018-08-02 05:20:09 +09:00
Guangcong Luo
bc7fc9f46f Correctly handle suppressed Abilities
Abilities suppressed by Gastro Acid or Core Enforcer now show up as
"(suppressed)" in tooltips, and will no longer show as taking effect
in move tooltips.

Fixes #1132
2018-07-20 14:40:42 +09:00
The Immortal
4ab9b86183
Teambuilder: Default to PU for ZU 2018-07-14 14:05:32 +08:00
The Immortal
c5d34374ae
Add Zeraora to mythicals 2018-07-14 13:46:55 +08:00
urkerab
350e5d2921 Fix Transform of female Smeargle into Rotom (#1131) 2018-07-10 22:08:42 -05:00
urkerab
a000b7fab3 Copy HP bar colour when Illusion wears off (#1130) 2018-07-08 11:53:28 -04:00
HoeenHero
ec7cbef2e0 Update PSPL link (#1129) 2018-07-05 19:59:56 +08:00
Nixola
b2d60b51a6 Fix message when changing to invalid nick (#1128)
Usernames must contain at least one letter or the auth server will reject them; a number isn't enough.
2018-07-03 13:22:35 -07:00
The Immortal
39f7deefaa
Teambuilder: Battle Spot Special isn't always level 50 2018-07-03 21:44:52 +08:00