Commit Graph

2908 Commits

Author SHA1 Message Date
Marty-D
80fc1bacfe
Teambuilder: Update Smogdex links 2019-01-16 15:09:58 -05: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
Kris Johnson
e8e347a8f7 Add a getTier function for the teambuilder (#1208) 2019-01-08 23:24:22 -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
0a0035fbf8 Fix trailing whitespace 2019-01-05 05:18:16 -06: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
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
Kris Johnson
553cffa93e Fix teambuilder tables for formats not in formats-data (#1203) 2019-01-03 15:39:20 -06:00
Kris Johnson
0f3145b1ef Let's Go: Fix learnsets and happiness value (#1197) 2018-12-20 09:46:32 -08:00
Guangcong Luo
eff5359fb4 Rename Tools to Dex
This has already been done server-side, and there's no use delaying
client.
2018-12-05 21:11:47 -06:00
spixi
6cab958804 Fix teambuilder search by tier (#1190) 2018-12-04 16:56:00 -06:00
Ezaphs
67a87fb169 Correct rounding error in Lets Go stat calculation (#1180) 2018-11-26 17:34:25 -06:00
Kris Johnson
460ee1ad26 Add learnset support for Let's Go (#1177) 2018-11-25 15:56:50 -06: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
Kris Johnson
44d669f74d Add more teambuilder support for Let's Go (#1169) 2018-11-22 00:10:23 -06:00
Guangcong Luo
d48419471d Fix crash in "Change password" 2018-11-20 16:29:35 -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
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
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
Guangcong Luo
f75d85fdaf Reimplement "ignore nicknames" without CSS
Honestly, the CSS solution was really cool. It was just incompatible
with the new system. It also had enough other flaws (like, bad
accessibility) that I don't feel _too_ bad about ripping it out.

The new version is less code, anyway, although it does have the flaw of
needing to replay the battle if you turn nicknames on or off.
Fortunately, that should be a rare enough occurrence not to be a big
deal.
2018-11-15 18:52:53 -06:00
Guangcong Luo
f6c03e0370 Implement new battle-text-parser
All battle text messages have been moved out of `src/battle.ts` and
into its own file `data/text.js`.

Code for handling this is in the new files `src/battle-log.ts` and
`src/battle-text-parser.ts`.

`data/text.js` is now extremely self-contained, and nearly ready for
translation support!

This is a significant modernization of battle.ts. In addition to moving
messages out:

Functions for getting names (`pokemon.getLowerName()` etc) have been
removed.

`battle.minorQueue` has been removed. Minor lines are now processed
directly on the main queue, with a new `battle.waitForAnimations`
flag to decide whether or not the main queue should wait for animations
to finish before moving on to the next line.

`battle.waitForResult()` and `battle.endPrevAction()` have been
removed. These confusingly-named functions closed the messagebar (and
flush the minor queue). They've been replaced with
`scene.maybeCloseMessagebar()`.

`pokemon.markMove()` and `pokemon.markAbility()` have been renamed
`pokemon.rememberMove()` and `pokemon.rememberAbility()`.
2018-11-15 18:52:53 -06:00
Guangcong Luo
5f05adc856 Split battle-log.ts off from battle-dex.ts
This splits battle-dex.ts up into:

- `battle-dex.ts`
  - dex data access, misc tools
- `battle-log.ts`
  - manipulating HTML, especially in battle logs

This turned out to be a pretty significant portion of what was
previously battle-dex.
2018-11-15 18:52:53 -06:00
Guangcong Luo
d9f7d903e0 Add autofill hints for login forms
Apparently this is necessary for Chrome to correctly identify which
passwords to save for which usernames.
2018-11-14 21:47:35 -05:00
LegoFigure11
09dd5f92ae Add teambuilder support for Battle Spot Special 13 (#1161) 2018-11-08 22:47:52 -06:00
Kris Johnson
273076a88a Add teambuilder support for Fortemons (#1159) 2018-11-01 15:22:40 +04:00
Guangcong Luo
25712419c7 Dex: Support multi-word article titles 2018-10-29 01:50:25 -04:00
Guangcong Luo
0e5b3aa84c Stop reporting failed assertions
We had a great run, but honestly I don't have anything particularly
interesting to do with this data, so I'm turning it off now.
2018-10-28 14:54:12 -04:00
Guangcong Luo
ba4c512166 Remove local class definitions for LGTM
This makes how classes are defined in the client less consistent
than before, but the new client, which doesn't have this problem, is
well underway, so this isn't a big deal in the long term.
2018-10-28 14:54:12 -04:00
Guangcong Luo
654abc3162 Fix errors caught by LGTM 2018-10-27 04:32:11 -05:00
Guangcong Luo
bbf8306bac Intercept large teams
PS the server will ignore all messages above ~150 KB. To protect against
DoS attacks, this is done silently, with no response at all.

Note that this is is not at all a problem for normal teams with 6
Pokemon, which come in at around 1KB.

Users sometimes make a mistake and send corrupt teams above this limit,
such as an import error causing a team with 1000 Pokemon or whatever.
This used to happen silently, confusing users and causing them to retry,
but this change gives it an error message.
2018-10-27 03:22:29 -04:00
Guangcong Luo
95adb434f4 Document /debug 2018-10-27 02:49:27 -04:00
Guangcong Luo
622a350009 Tooltips: Rephrase "Not blocked by Protect" flag
It was previously "Bypasses Protect", but "Not blocked by Protect" is
more accurate.
2018-10-26 20:00:31 -04:00
Guangcong Luo
9666fd30d2 Fix Chrome password manager to track username
The username on the password field is now a visible read-only textbox,
instead of a hidden textbox.

This is apparently required for Chrome to realize that it's a username
field for the purposes of its password manager.
2018-10-26 19:57:20 -04:00
Guangcong Luo
aa7ea99281 Fix attribution line in search.js 2018-10-16 15:17:58 -05:00
Guangcong Luo
26f78dcce6 Add Preact dependency
Preact is currently unused in the client, but will be used in an
upcoming rewrite. This adds the foundation to support `.tsx` files in
`src/`.
2018-10-16 14:53:27 -05:00
HoeenHero
a094cb7982 Move Mythical pokemon down in VGC teambuilder (#1144) 2018-10-16 14:22:43 -05:00
Guangcong Luo
83b6edc995 Add "Report" button 2018-10-16 04:55:42 -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
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
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
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