Commit Graph

2915 Commits

Author SHA1 Message Date
Guangcong Luo
e1bb9f64f9 Fix chat message timing 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
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