Commit Graph

4514 Commits

Author SHA1 Message Date
Guangcong Luo
f8d251c8a1 Stub Preact rewrite
HIGHLY UNFINISHED CODE
2019-03-17 19:02:53 +09:00
Ridaz
137dc317b7 Move animations: Fix xattack
...And the moves that use its animation
2019-03-14 16:23:39 +00:00
whales
d4f7d6668c Fix desktop notifications (#1251) 2019-03-14 19:29:05 +09:00
Guangcong Luo
13dfe03a3a Support "read more" element
This is just code to support using details/summary for a "read more"
system. The entire summary portion can be clicked to expand/collapse,
but the overall usability feels "better than before" to me.
2019-03-14 04:03:11 +09:00
Kirk Scheibelhut
8710f6cf0a Add Ctrl+ as a keyboard shortcut for code` (#1250) 2019-03-13 17:11:59 +09:00
Kirk Scheibelhut
74941fde52 Update README testclient instructions (#1249) 2019-03-12 13:11:50 -07:00
urkerab
8c075d4f8e Fix activation of Mummy (#1248) 2019-03-09 09:57:29 -06:00
whales
6a38e809bc Update nwjs API for later version (#1246) 2019-03-09 09:27:44 -06:00
asgdf
d843455588 Tooltips: Fix Flower Gift (#1247) 2019-03-09 12:27:19 +01:00
Guangcong Luo
06a9b34125 EV guesser: Fix Modest/Adamant spreads
Modest/Adamant spreads were accidentally more common than intended,
due to a simplification that went the wrong way.
2019-03-08 09:53:36 -06:00
Guangcong Luo
f94a242c63 Tooltips: Don't count copied/Z moves for limit 2019-03-07 16:36:29 -06:00
Guangcong Luo
c88d2a2ecb Stop showing stats for Transformed Pokémon 2019-03-06 13:49:17 -06:00
Guangcong Luo
a9b8155b5d Implement EV guesser test
Also improve existing battle test.
2019-03-06 13:49:17 -06:00
MacChaeger
5232273445 Don't intercept links in replay-uploaded popups (#1245) 2019-03-06 11:25:02 -06:00
Guangcong Luo
30c57c1a42 Correctly handle renames in BattleLog 2019-03-06 10:24:34 -05:00
Guangcong Luo
9c9675f2fc Don't intercept replay links on side servers 2019-03-06 10:24:34 -05:00
Guangcong Luo
5b850cb1f5 EV guesser: Fix detection for Fast Bulky Support 2019-03-06 10:24:34 -05:00
Guangcong Luo
06625b728c Don't pixelate avatars between 1x and 2x
Fixes #1196
2019-03-06 10:24:34 -05:00
Guangcong Luo
e88285a20f Refactor unlinkNodeList
This prevents the need for a closure, and also adds support logs
without preempt elements in BattleLog.
2019-03-04 15:38:05 -06:00
TheMezStrikes
df43f1f1f8 Update battle userlist on user rename (#1244) 2019-03-04 13:25:47 -06:00
Guangcong Luo
9c3a9addcd Improve EV guesser
"Suggested spread" is now renamed "Guessed spread", to make it clearer
that it's not exactly a suggestion, more of a guess of what might be a
good spread.

Speed EVs are now suggested a lot more often, with the new basic
threshold at 80+ Spe instead of 95+. (71+ Spe is still enough to get
Spe EVs on a non-bulky stat spread.)

EV spreads are now guessed based on post-Mega stats (so e.g. Mega
Metagross gets Spe EVs).

In addition, Speed EVs are now suggested for support spreads above 110
base Spe (mostly for support Starmie sets).

I wouldn't call the EV guesser _good_ by any means, but I still
strongly believe it's better than nothing.
2019-03-04 13:20:00 -06:00
Guangcong Luo
331a129644 Move EV suggester to battle-tooltips.ts
I mostly wanted this to be in TypeScript before I did any further work
on it, and also with the teambuilder at 3k lines, it needs to be broken
apart anyway.

I feel mildly bad about introducing ~600 lines of code that replays
will never need, but the EV suggester does fall under the general
category of "set insights" and is relevant to tooltips.
2019-03-04 13:20:00 -06:00
MacChaeger
957b231404 Fix "Open replay in new tab" link in replays (#1241) 2019-03-03 10:55:29 -06:00
urkerab
ebdd1b9075 Fix Protean and Color Change for replays (#1243) 2019-03-03 04:40:03 -06:00
MacChaeger
5a4d4da3a8 Tooltips: Fix Normalize (#1242) 2019-03-01 02:50:48 -06:00
Guangcong Luo
810da3b7d6 Default tab size in code blocks to width 4 2019-02-28 03:08:52 -05:00
Guangcong Luo
c9e46593ba Update build tools for Sim TypeScript 2019-02-28 03:08:31 -05:00
Guangcong Luo
189a987526 Allow CORS actions with a POSTed sid
This is mostly useful for the testclient, which otherwise can't interact
with the login server without huge hacks like the iframe copy/paste.

Requiring an external sid resolves any security issues; sid being the
only cookie we use for security-sensitive things, and also being our
CSRF token.

In theory, this is also useful for clients that don't support cookies,
although I'm unsure how they'd get their hands on an sid in the first
place. I guess just run login actions?
2019-02-27 05:16:17 -05:00
Guangcong Luo
817a3a9c41 Add Sentry to composer.json
Our Composer dependencies are all optional at the moment - Sentry is
only used in the live config file, and we stopped using Google's PHP API
because it was too buggy (we're calling out to Node instead).

(This also removes composer.lock; lockfiles are really unnecessary for
PS's use-case.)
2019-02-27 05:16:17 -05:00
Guangcong Luo
fdad94ba7f Support server-side autolock IPs 2019-02-27 05:16:17 -05:00
urkerab
a612743d74 Fix missing message for Queenly Majesty blocking a move (#1240) 2019-02-26 19:36:20 -06:00
Guangcong Luo
ebdd3f5871 Suppress eslint error in compatibility code 2019-02-26 19:25:21 -06:00
Guangcong Luo
e93277437d Update dependencies 2019-02-26 07:17:19 -06:00
asgdf
4ccc7cd3ce Tooltips: Fix items boosts not showing up (#1239) 2019-02-25 18:35:11 -06:00
Kris Johnson
567c7e16b8 Change Untiered to (PU) and (DUU) (#1230) 2019-02-25 01:11:06 -06:00
MacChaeger
06c394cf7c Open replay links in PS (#1234) 2019-02-23 21:12:43 -06:00
asgdf
abad76ee81 Fix Pokemon being shown as having their current abilities in older gens (#1238) 2019-02-23 15:54:29 -06:00
whales
5a866c4f67 Allow pm with no target to open a window (#1237) 2019-02-22 18:08:13 -06:00
Guangcong Luo
6417436d1d Fix detection of battle-only formes 2019-02-20 19:35:38 -06:00
Guangcong Luo
55506a8881 Fix Gen 3 status move listing in teambuilder 2019-02-20 19:27:44 -06:00
Guangcong Luo
f782ba807c Fix Z-Crystal + Judgment type 2019-02-20 16:08:41 -06:00
Guangcong Luo
4f5fdcd4cb Remember Team Preview item after switch-in 2019-02-20 16:08:41 -06:00
Guangcong Luo
4198cc3b05 Add SPL mode backgrounds 2019-02-20 16:39:34 -05:00
Guangcong Luo
59c6c3328a Fix sprites sometimes not appearing after skip 2019-02-20 16:38:48 -05:00
Guangcong Luo
d2ef03c07a Fix tooltips in downloaded replays 2019-02-20 03:09:59 -05:00
Guangcong Luo
54535213e0 Fix mobile device tooltip support
For the first time since original tooltips, we have a pressed-down
animation for move/switch buttons!

More importantly, long-presses are no longer weird, and now just
lock in the tooltip instead of also opening a context menu.

In addition, clicking on a locked tooltip dismisses it, which should
help address complaints about locked tooltips being hard to dismiss.
This makes it slightly harder to select text in locked tooltips, but
clicking and dragging on desktop still works.
2019-02-20 03:09:47 -05:00
Guangcong Luo
e5febd4b98 Fix Return/Frustration/HP BP display 2019-02-19 15:49:17 -06:00
asgdf
3e4fe5fa1d Tooltips: Fix Rivalry and Power Trip/Stored Power (#1231) 2019-02-19 15:22:17 -06:00
asgdf
f6038e7083 Tooltips: Only show 2 digits max after decimal point (#1232) 2019-02-19 15:05:03 -06:00
Guangcong Luo
a379281337 Fix ability filtering in teambuilder 2019-02-19 00:08:56 -06:00