Commit Graph

21884 Commits

Author SHA1 Message Date
Guangcong Luo
89bd10edee Document splitFormat 2021-04-27 14:54:56 -07:00
Guangcong Luo
a70d53c8b2 Refactor 2021-04-27 01:48:04 -07:00
Guangcong Luo
c6d3b220be Support setting default format for commands
Affected commands: /details, /coverage, /effectiveness, /weakness, /learn
2021-04-27 01:48:04 -07:00
-Shiken-
054ba7ab82
Update Traditional Chinese translation (#8236) 2021-04-27 00:31:32 -07:00
Kris Johnson
6d75966050 Move Glastrier to NU 2021-04-26 22:13:19 -06:00
Leonard Craft III
d49a40feb2 Tests: Improve G-Max Volcalith Sea of Fire test 2021-04-26 22:52:59 -05:00
Guangcong Luo
ddd96995a1 Fix crash report display
Fixes #8234
2021-04-26 22:30:02 -04:00
urkerab
74ed6a3651
/math: Give the negative operator a precedence (#8235) 2021-04-26 18:53:32 -07:00
Guangcong Luo
04243bc731 Fix crash in Utils.sortBy 2021-04-26 14:57:35 -04:00
Marty-D
f7734becf8
OU: Keep Zamazenta-Crowned banned
https://www.smogon.com/forums/threads/ss-ou-suspect-process-round-10-voting.3683046/page-8#post-8835168
2021-04-26 09:22:25 -04:00
Annika
8ee9a68067 RoomBattle: Properly handle legacy config format
#8214 added code to handle Config.forcedpublicprefixes and convert it to Config.forcedprefixes, but it was buggy.
2021-04-25 22:03:08 -07:00
Leonard Craft III
615ee48e25
Fix Shell Side Arm information leak (#8233) 2021-04-25 20:21:50 -07:00
Quinton Lee
6079927a95
Commands: Support sending |selectorhtml| to bot HTML pages (#8228) 2021-04-25 20:20:57 -07:00
Marty-D
3d9698953a
Fix other regressions from residual refactor 2021-04-25 18:32:04 -04:00
Mia
ea6f6a81d9
Chat: Allow plugins to add custom /crq handlers (#8225) 2021-04-25 15:26:05 -07:00
Guangcong Luo
810aff74cd Namespace more server global types 2021-04-25 14:16:27 -07:00
Marty-D
ed782ca268 Add CAP 29 2021-04-25 16:49:23 -04:00
Guangcong Luo
0e0389bdc8 Rename pageContext.send to pageContext.setHTML
It's currently not very similar to commandContext.send so using the
same name could make things very confusing.

We have a new `pageContext.send` function that actually behaves as
you'd expect.
2021-04-25 13:25:42 -07:00
pyuk-bot
fa974427ef
Migrate terrains from onTerrain to onResidual (#8232) 2021-04-25 13:00:37 -07:00
Guangcong Luo
f513c619b0 Fix bugs from Residual refactor 2021-04-25 12:14:03 -07:00
Instruct
a84ab6cc04
SSB: Refactor Ic3peak's echoed voice modifier (#8231) 2021-04-25 11:35:39 -07:00
Guangcong Luo
f9fdc73133
Support per-pokemon Residual handlers in Side/Field conditions (#8222)
For side conditions, `onStart`/`onRestart`/`onResidual`/`onEnd`
have been renamed `onSideStart`/`onSideRestart`/`onSideResidual`/`onSideEnd`,
with the `onResidualOrder` properties renamed `onSideResidualOrder`.

For field conditions, `onStart`/`onRestart`/`onResidual`/`onEnd`
have been renamed `onFieldStart`/`onFieldRestart`/`onFieldResidual`/`onFieldEnd`,
with the `onResidualOrder` properties renamed `onFieldResidualOrder`.

(The `onField` and `onSide` part helps make it clear to the type system
that the first argument is a Field or Side, not a Pokemon.)

Side and field conditions can now use `onResidual` to tick separately
on each pokemon in Speed order. `onResidualOrder` (the per-pokemon
tick) can be timed separate from `onSideResidualOrder` (the
per-condition tick), allowing conditions to end at a different priority
than they tick per-pokemon.

Relatedly, `onTeamPreview` and `onStart` in formats now need to be
`onFieldTeamPreview` and `onFieldStart`.

Unrelatedly, `effectData` has been renamed `effectState`, and the
corresponding state containers (`pokemon.statusData`,
`pokemon.speciesData`, `pokemon.itemData`, `pokemon.abilityData`,
`field.weatherData`, `field.terrainData`) have been similarly renamed. I
renamed the types a while ago, but I was holding off renaming the fields
because it would be a breaking change. But this is a breaking change
anyway, so we might as well do it now.

Note: `onResidual` will tick even on `onSideEnd` turns, although
`onSideResidual` won't. When refactoring weather, remember to
check `this.state.duration` so you don't deal weather damage on the
ending turn.

Intended as a better fix for #8216
2021-04-25 10:55:54 -07:00
pyuk-bot
66c547432b
Fix Parental Bond to modify damage, not base power (#8226) 2021-04-25 12:06:27 -04:00
Kris Johnson
46b9a36fa7 /hiderank: Don't let users hide as Section Leaders 2021-04-25 02:26:46 -06:00
Mia
5e455cdb6c
Fix missed punishment description conversions 2021-04-24 21:27:53 -05:00
urkerab
9a18ada1f9
Grassy Terrain should only weaken moves against grounded targets (#8224) 2021-04-24 18:04:31 -05:00
Leonard Craft III
7c89412d9a Remove accidental .only 2021-04-24 16:24:45 -05:00
Leonard Craft III
ab0cb0d29e Improve Grassy Terrain tests 2021-04-24 16:24:01 -05:00
Distrib
b60734ba8b
ZU: Add Sample Teams thread (#8223)
Requested by Apagogie ♡
2021-04-24 13:41:45 -06:00
Kris Johnson
5cd1d060ab Rulesets: Add Nintendo Cup 2000 Move Legality 2021-04-24 01:11:45 -06:00
Kris Johnson
0d5a99d9b0 FIx sorting in /sectionleaders 2021-04-24 01:05:58 -06:00
Guangcong Luo
7336b22540 Fix support for spotlight rooms 2021-04-24 02:46:45 -04:00
Guangcong Luo
e75636aebc Fix crash in custom punishments change 2021-04-24 02:46:07 -04:00
Guangcong Luo
486f292904
Refactor everything to use Utils.sortBy (#8220)
A few uses of `array.sort()` have been left alone:

- sorting in `data/` because they aren't supposed to import anything

- `set-importer` because I still have no clue what that's for and what
  dependencies it is/isn't allowed to have

- `sort()` with no arguments used as a lexical sort (at which point
  `sortBy` offers no benefits)

All other cases have been replaced with `Utils.sortBy`, which should
be a massive increase in readability.

Sort orders should be much more readable now, without needing to puzzle
through sign issues. The order is always low-to-high, A-to-Z,
true-to-false.
2021-04-23 22:41:00 -07:00
Mia
d992b8f5fa
Add more support for custom punishments (#8215) 2021-04-23 22:40:31 -07:00
Mia
7154920b2c
Support forcing modchat on ladder tour battles (#8214) 2021-04-23 22:40:09 -07:00
Kris Johnson
a1bdafbfe8
Add room sections (#8205) 2021-04-23 22:39:56 -07:00
Annika
909d4657f4 Trivia: Further clarify typing 2021-04-22 12:38:33 -07:00
Annika
df16828aaf Trivia: Fix typing for TriviaLadder 2021-04-22 12:10:13 -07:00
Mia
5586484622 Hosts: Fix crash 2021-04-22 11:41:16 -05:00
Mia
cec237ddff Remove extraneous 2021-04-22 08:35:36 -05:00
Mia
54e2c74630 Punishments: Fix markshared blacklist loading 2021-04-22 08:35:07 -05:00
Mia
a92c44cf52 Add missing global punishments to /pl 2021-04-22 08:15:50 -05:00
InAShellnut
9ab4c86fe3
Add Stadium 2, Nintendo Cup 1997, and Nintendo Cup 2000 (#8195)
An implementation of Nintendo Cup 1997, Nintendo Cup 2000, and Pokemon Stadium 2, for Pokemon Showdown. The only thing which has not been implemented was showing the exact health of both Pokemon in Pokemon Stadium 2, however implementing that requires changes to the showdown client. The Nintendo Cup 1997 code was done by Enigami, and the rest was by myself (Shellnuts).

This should fulfill the requirements asked by the following accepted suggestions:
https://www.smogon.com/forums/threads/please-add-a-pok%C3%A9mon-stadium-2-simulator-in-showdown.3679486/
https://www.smogon.com/forums/threads/add-nintendo-cup-1997-and-2000-as-challenge-only-formats.3653454/
2021-04-22 00:54:14 -07:00
Guangcong Luo
9ad9957d9d Improve tags
(The tier filters previously weren't matching e.g. "(UU)" as well as
"UU")
2021-04-21 23:57:02 -07:00
Guangcong Luo
c241941c61 Clear .config-dist when building
This fixes a bug where `.config-dist/custom-formats.js` wasn't getting
deleted when `config/custom-formats.ts` was deleted.

This also cleans up some other clutter in `.config-dist`.
2021-04-21 23:46:55 -07:00
Annika
0e21aebfab Trivia: Improve display for unranked games 2021-04-21 20:27:16 -07:00
Instruct
7f856ac3a4
SSB4: Support Same Type Clause (#8210) 2021-04-21 09:02:54 -07:00
Mia
9a1df4241d /permissions: Put single command permissions into a readmore
Requested change
2021-04-21 09:03:47 -05:00
Mia
e9b1bfe5f0 Chat-monitor: Fix /filter help
(CommandContext#run does not work for help commands that are arrays)
2021-04-21 08:30:19 -05:00