Commit Graph

4963 Commits

Author SHA1 Message Date
Guangcong Luo
34388e59f2 Improve and document replay search API 2020-04-16 03:53:00 -04:00
Guangcong Luo
03e88a187a Add JSON API for replays
recent:

https://replay.pokemonshowdown.com/search.json

by user:

https://replay.pokemonshowdown.com/search.json?user=zarel

by format:

https://replay.pokemonshowdown.com/search.json?format=gen8ou

pagination:

https://replay.pokemonshowdown.com/search.json?user=zarel&page=2
2020-04-16 03:53:00 -04:00
Kris Johnson
bfab55a5b8
Add client-side support for (DUber) (#1490) 2020-04-14 15:17:14 -07:00
Charlie Kobayashi
8431f3fc10
Disable battle chat upon disconnection (#1489)
- apply same "You are disconnected and cannot chat" message to battles upon disconnecting from a server.  Just a tiny pet peeve when testing code on localhost.
2020-04-09 16:45:23 -07:00
Guangcong Luo
4188f62310 Improve error message for macOS desktop permissions
Fixes #6485
2020-04-07 21:28:35 -04:00
Guangcong Luo
721eb5547f Add /chal alias for /chall 2020-04-07 21:28:35 -04:00
The Immortal
d6ee0a1d87 Remove references to isUnreleased 2020-04-06 21:52:25 +04:00
Kirk Scheibelhut
d76cd108dd Create test pages for sprites
Similar to styles/STYLING.html and styles/hpbartest.html, test pages
prove to be more robust and convenient for testing than the unit
tests (which are already broken).

These pages are primarily intended to help with delivering #1369,
but can be used to test improvements to sprites across the board.
2020-04-02 11:48:50 -07:00
Guangcong Luo
730d1ffd1a Use bigger Meloetta sprites
There are people who didn't know Meloetta was PS's mascot! They clearly
needs to be more noticeable. And now they definitely will be.

We're now using the full Gen 5 sprite instead of the minisprite,
overlapping with the buttons, and animated on hover. This might be a
bit over-the-top, but oh well, it's only on hover.
2020-04-01 16:11:10 -07:00
whales
97ca68f685 Stop uhtml from highlighting
oops
2020-04-02 00:17:16 +10:30
HoeenHero
305945e6ec
Tinymaxing support (#1488) 2020-04-01 00:49:52 -07:00
Guangcong Luo
6c909c8c99 Fix cosmetic forme support 2020-03-31 02:51:07 -07:00
Guangcong Luo
b80d1c3938 Fix teambuilder pokemon icons 2020-03-29 07:30:27 -04:00
Guangcong Luo
7c708d7167 Support ports other than 443 for HTTPS
To support running Smogtours on HTTPS, we now support non-443 ports.

We also now set SameSite=None headers for the SID cookie, so it's once
again possible to stay logged in on servers other than Main.
2020-03-29 02:10:02 -04:00
Guangcong Luo
b730156490 Support format list sections/columns
This is probably about as much as I'll implement for now. We'll need to
deprecate the old client before we can implement any major reforms to
the formats list design.
2020-03-28 09:21:23 -07:00
Guangcong Luo
5e32181b89 Support creating, deleting, and renaming teams 2020-03-28 09:21:23 -07:00
Guangcong Luo
7857f4549d Support saving teams 2020-03-28 04:20:49 -07:00
Guangcong Luo
3c4df8bcb6 Fix teambuilder sprites 2020-03-27 22:19:45 -07:00
Kris Johnson
6a05e24967
FIx teambuilder (#1487) 2020-03-27 21:14:59 -07:00
Kris Johnson
e9c86ef27e
Fix missed instances of renaming Pokemon#species (#1486) 2020-03-27 20:21:48 -07:00
Guangcong Luo
c9dd7fbe36 Fix bug loading data 2020-03-27 04:23:33 -07:00
Guangcong Luo
504ce3b384 Improve error message for recent Missingno crash 2020-03-26 23:05:13 -07:00
Guangcong Luo
a8f355d5ca Use better team keys for teambuilder
Team keys are now a sanitized version of the team name, which makes
them stable past refreshes, and also easier to read.
2020-03-26 05:16:45 -07:00
Guangcong Luo
99b07882db Fix a bunch of bugs in battling 2020-03-26 00:06:34 -07:00
Kris Johnson
f21bfe7f6a
Rename Template to Species (#1484) 2020-03-25 23:29:05 -07:00
Guangcong Luo
a89429f9ec Refactor teambuilder folders list
The old approach was to convert the folder list into a string format
that would sort correctly, and then convert it back afterwards. This
was, of course, a huge hack that was difficult to maintain and broke
every new generation, and `PSUtils.sortBy` eliminates the need for it.
2020-03-25 16:56:33 -07:00
Guangcong Luo
a7622b3d95 Fix rating not appearing in battle list 2020-03-25 16:56:13 -07:00
Guangcong Luo
d589ac7fef Support user statuses and away status
Also includes a refactor to introduce a new `PSUtils.sortBy`, now
used to make sorting the user list a lot more readable.
2020-03-24 23:45:21 -07:00
Guangcong Luo
4eaf83d728 Fix crash when launching battle sound 2020-03-24 18:38:52 -04:00
Guangcong Luo
04220979e7 Fix crash 2020-03-24 03:02:37 -07:00
Guangcong Luo
3bc86dc0e1 Fix default pokemon icon
It was accidentally changed from "?" to the empty pokeball, which makes
randbat teams look very weird.
2020-03-24 05:50:56 -04:00
Guangcong Luo
a64279cdf5 Add volume/dark mode controls
This is a stub for the Options screens in the Preact client.
2020-03-24 02:50:09 -07:00
Guangcong Luo
03c8ca84f0 Support shifting in Triples 2020-03-24 00:36:44 -07:00
Guangcong Luo
8a0caf0410 Correct TS line numbers in GitHub Actions 2020-03-23 22:57:46 -07:00
Guangcong Luo
40d077903f Support playing battles
This should be a much nicer architecture than the old
`client-battle.js`.

In particular, much of the logic of choosing moves/switches has been
moved into a new `battle-choices.ts`, with `panel-battle.tsx` only
covering the UI.
2020-03-23 06:55:35 -04:00
whales
523d63ab01 Fix deleting all highlights 2020-03-23 00:04:21 +10:30
Peach
ea3d0eaab4
Stop htmlboxes from notifying (#1485) 2020-03-22 17:30:44 +04:00
Guangcong Luo
22640432d4 Improve /chall
- Custom rules no longer crash the team selector

- Automatically add 'gen8' to formats when using /chall
2020-03-21 20:19:52 -07:00
Guangcong Luo
946412c93b Fix crash when challenging a custom format 2020-03-21 00:02:08 -07:00
Guangcong Luo
3b5c541859 Support custom-rule challenge using /challenge
Challenges with custom rules previously required bypassing the
console commands. Now you can just do them with:

    /challenge USERNAME, gen8randombattle@@@teampreview
2020-03-20 23:53:18 -07:00
Guangcong Luo
9e80ee72b5 Make overrideTypeChart builder more readable 2020-03-20 23:53:18 -07:00
Kris Johnson
b1282465c5
Add teambuilder support for (NU) (#1483) 2020-03-20 20:49:51 -07:00
Kirk Scheibelhut
81c99f66c6
Add getType to ModdedDex and populate correctly (#1478) 2020-03-20 16:06:54 -07:00
The Immortal
50458b3466 Clean up battleOnly and inheritsFrom 2020-03-21 01:17:55 +04:00
The Immortal
f1d21b8853 Teambuilder: Fix empty moves 2020-03-21 01:17:24 +04:00
Guangcong Luo
a44a2d5b48 Fix crash in Beat Up 2020-03-19 22:57:42 -07:00
fart
cc5ac46210
Support /hidetext linecount client-side (#1482) 2020-03-19 21:28:43 -07:00
Guangcong Luo
d75ef3c6ae Support |tempnotify|
After a long time struggling to decide how to implement this, I ended
up unifying line parsing.

Advantage: No need to call `BattleTextParser.parseLine` every time you
want to inspect a line. It's parsed into args by `PS.receive` and
everything else gets tokens.

Disadvantage: Battle rooms need to reassemble the original line to put
in their history buffer (`battle.activityQueue`). The lines are getting
parsed twice, anyway, and reassembly is a small price to pay for how
readable everything else is now.
2020-03-19 21:28:18 -07:00
Guangcong Luo
71495d7faf Improve testclient key documentation 2020-03-19 21:28:18 -07:00
Guangcong Luo
045eeded9e Fix bad tooltips during instant replay 2020-03-19 21:28:18 -07:00