Commit Graph

5316 Commits

Author SHA1 Message Date
Guangcong Luo
4b07cce615 Fix multi battles not working on mobile 2021-04-02 22:27:07 -04:00
Guangcong Luo
f3d8f67786 Fix pokemon list glitching when zoomed 2021-04-02 02:36:07 -04:00
Guangcong Luo
a872ad08d8 Fix multi/FFA support
The original multi battles implementation had basically no support for
FFA, so this adds that support. I also fixed a lot of bugs that
apply to multi battles as well.
2021-04-02 02:36:07 -04:00
Annika
6c22b5ef2d Remove AFD prank for 2021
This reverts commit 7e5f14754c.
2021-04-01 21:08:42 -07:00
Mia
031702bf10 Restore old jQuery (#1737) 2021-04-01 12:12:06 -04:00
Kris Johnson
81caa06762 Add more support for National Dex (#1736) 2021-03-31 21:00:26 -07:00
HoeenHero
7e5f14754c AFD 2021 (#1735) 2021-03-31 17:55:46 -07:00
Mia
aa0086856a Update to latest jQuery 2.2.4 (#1733) 2021-03-30 18:41:38 -07:00
Kris Johnson
f57fbc2f1a FIx BattleTextParser#team (#1734) 2021-03-30 18:15:16 -07:00
Guangcong Luo
94d420eac0 Fix double-turn bug 2021-03-28 21:50:33 -07:00
Guangcong Luo
0c4f741aaa Fix battle perspective messages 2021-03-28 20:38:58 -07:00
Spandan Punwatkar
1fe0b7eb85 Client-side support for Multi Battles (#1649) 2021-03-28 15:13:07 -07:00
HoeenHero
576f773653 Fix links not opening in a new tab (#1732) 2021-03-23 12:11:20 -07:00
Mia
6e7d5461f6 Support using form elements to send commands (#1731) 2021-03-23 09:04:24 -07:00
Guangcong Luo
add22fbf0a Fix ladder reset permissions 2021-03-18 17:26:45 -04:00
Guangcong Luo
15e732c8de Fix crash in "Copy URL" button 2021-03-18 17:26:45 -04:00
Guangcong Luo
6fc353cbe3 Remove bad code
This part doesn't do anything because it's below
`else if ($elo > 1300)`.

Maybe we'll update the Elo formula some other time... :S
2021-03-18 13:36:48 -04:00
Guangcong Luo
0f3ec58174 Build JSON versions of the pokedex and moves tables
These are to ease third-party development done in languages other than
JS.

Their URLs are in WEB-API.md
2021-03-16 07:32:04 -04:00
Kris Johnson
8e56a4dfcc Add teambuilder support for Gen 1 NU (#1730) 2021-03-15 14:40:23 -04:00
Kris Johnson
0f1db74ca4 Fix support for OMs in the teambuilder (#1725) 2021-03-15 14:40:11 -04:00
Mia
95bbe72129 Add a button to copy/paste password reset urls (#1728) 2021-03-15 07:54:45 -07:00
Annika
359f0915ec Website: Add Spanish translation for FAQ and Staff 2021-03-09 09:50:26 -08:00
Leonard Craft III
de908c70d4 Display Mental Herb cure text (#1724) 2021-03-07 17:35:09 -05:00
Marty-D
cff921d991 Tooltips: Fix Heat Crash and Heavy Slam 2021-03-07 17:25:36 -05:00
Annika
8f1b3120c6 Remove objectionable replays from the homepage (#1727)
Removes replays with slurs, inappropriate usernames, permabanned users, and/or runMinor errors from the homepage
2021-03-04 18:31:12 -05:00
Kris Johnson
8cd74fc707 Teambuilder: Don't recommend 252 all EVs in Gen 6 (#1723) 2021-02-15 01:36:16 -08:00
Kris Johnson
83bd792b1b Don't autofill EVs in Gen 6 Hackmons metas (#1722) 2021-02-13 14:56:37 -05:00
Annika
8e81d19b45 Credits: Move The Immortal to Retired Staff 2021-02-10 12:35:05 -08:00
Guangcong Luo
c607b2a507 Support more compound words in search 2021-02-08 23:14:47 -05:00
Guangcong Luo
c3a2ea92cb Fix data-href and <a><button> buttons
This adds support for more server-side Pages, and also moves support
for back buttons (in Ladder and Teambuilder) back into the router for
easier use.
2021-02-08 23:14:47 -05:00
Guangcong Luo
f4edbef2f7 Improve indications of PS loading
New PS now makes it much clearer when it's still connecting to the server,
and when it's connected.
2021-02-08 23:14:47 -05:00
Guangcong Luo
62a20cade2 Fix crash in ladder panel 2021-02-08 23:14:46 -05:00
Guangcong Luo
0635dd4342 Implement Logout button 2021-02-08 23:14:46 -05:00
Guangcong Luo
7670b51b1b Use /hidenext for the hide checkbox
(This matches the tooltip help and should have been done a long time ago.)
2021-02-05 20:38:48 -05:00
Mia
0e3c80238c Support a twitch embed (#1720) 2021-02-05 16:02:17 -08:00
Guangcong Luo
aa82e72e9a Partial drag/drop panel tab rearranging (#1641)
Not full support, but basic rearranging is now possible!

Supported:

- Rearranging the topbar
- Dragging PMs from the Main Menu to the topbar

Not supported:

- Dragging things from the topbar to the Main Menu
2021-02-01 23:40:20 -08:00
Mia
868244d49f Improve banning servers (#1719) 2021-02-01 13:18:38 -08:00
Mia
b3239205fc Fix broadcasting /help (#1715) 2021-01-31 00:36:56 -08:00
Guangcong Luo
e9bc53d899 Fix crash in sorting users
Reported here: https://www.smogon.com/forums/threads/make-command-to-undo-ioo.3677346/#post-8736801
2021-01-31 01:23:53 -05:00
Guangcong Luo
f94d89887e Improve design of "Show password" button 2021-01-31 01:23:44 -05:00
urkerab
c621da6a01 Explicitly mark more non-submit buttons with their type (#1718) 2021-01-30 22:13:23 -08:00
Adam Tran
ba2b18d012 Preact: Page Panel (#1716) 2021-01-29 18:53:35 -08:00
SirKira(!Uzumaki)
d52c29d485 Add "Show password" button (#1704) 2021-01-29 12:06:47 -08:00
Adam Tran
a9f8adfa39 Preact Client: Ladder (#1709) 2021-01-29 08:10:36 -08:00
Guangcong Luo
3e4b83298c Update Battle class API (#1686)
The client Battle class API has been pretty old and crusty, so this
updates it to be saner.

The constructor now takes an options object. Any setting you'd want to
initialize with is now a constructor option, instead of needing to call
methods after the constructor.

(Deprecated settings `roomid` and `joinButtons` still need to be set
separately.)

The old callback system is removed. It's replaced with a subscription
system vaguely resembling `PSStreamModel`. Any callbacks only intended
to be used by the warstory generator are removed (anyone who wants to
write their own warstory generator should extend `BattleSceneStub`
instead).

Battles no longer start paused. You can still start them paused by
passing `paused: true` as an option.

Playback state tracking had a bunch of rearrangement:

- `playbackState` no longer exists; state should be directly read from
  `paused`, `atQueueEnd`, `turn`, and `seeking`.

- `turn` is now initialized to `-1`. `-1` now means "we haven't reached
  `|teampreview|` or `|start|` yet". Reaching those sets turn to `0`.

- "Fast forwarding" and "seeking" are now consistently named "seeking".
  - `seeking` tracks seek state; changes from `fastForward`:
    - `null` means not seeking (replaces `0`)
    - `0` means seeking the start (replaces `0.5`)
    - `Infinity` means seeking the end (replaces `-1`)
  - `fastForward` deprecated and replaced with `seeking`
  - `fastForwardTo()` deprecated and replaced with `seekTurn()`

- `resultWaiting` is removed (it's unused)

- The "activity queue" has been renamed the "step queue", which means
  some renamed properties:
  - `activityQueue` to `stepQueue`
  - `activityStep` to `currentStep`
  - `nextActivity()` to `nextStep()`

- new property: `atQueueEnd` to track if animation has caught up to the
  end of the step queue (replaces checking `playbackState`)

- new property/option: `isReplay` - will automatically set `ended` when
  reaching the end of a replay (stopping music and showing a message),
  if the replay was saved before the end of the battle

- both replay players (`replay.pokemonshowdown.com` and downloaded
  files) have been rewritten to use an observer system, instead of the
  previous manual updating

- `reset(true)` has been renamed `resetStep()`
2021-01-23 13:17:23 -08:00
Konrad Borowski
0005f1f79f Use JSON.parse for parsing teambuilder tables (#1714)
This optimizes JavaScript parsing performance. V8 developers
recommend applying this optimization for objects of 10 kB or
larger, see <https://v8.dev/blog/cost-of-javascript-2019#json>
for more details. Teambuilder tables are 3.5 MBs which is much
more than 10 kB.
2021-01-23 09:45:20 -08:00
Guangcong Luo
934eb7be2c Update ladders and docs 2021-01-22 12:38:50 -05:00
Guangcong Luo
abc5bffa65 Port Net library over
We can't share code because the client uses XHR and the server uses Node's
HTTP/HTTPS libraries, but we're now sharing a lot of the API, which should
make it more familiar.
2021-01-20 09:59:18 -05:00
Adam Tran
1d9fadde06 Tooling: Preact Client server by URL; tslint (#1711) 2021-01-20 04:44:36 -08:00
Kris Johnson
1693ccfe06 Remove LC Uber references (#1712)
And (Uber) from National Dex teambuilder.
2021-01-19 03:34:01 +04:00