Commit Graph

23714 Commits

Author SHA1 Message Date
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
Kris Johnson
1d27dfcc20
Doubles LC: Ban Vulpix
https://www.smogon.com/forums/threads/doubles-little-cup.3658672/#post-8829432
2021-04-21 02:08:17 -06:00
Mia
075c9e85c5 Usergroups: Properly include aliases in supportedRoomPermissions
This can be useful for things like /poll htmlcreate
2021-04-20 12:54:25 -05:00
Mia
34f26a2049 Chat: Fix alias duplication issue in AnnotatedChatHandler#aliases 2021-04-20 12:54:24 -05:00
Annika
68dfb9c139 Use Spanish translations of FAQ and Staff FAQ pages 2021-04-19 11:32:08 -07:00
Annika
5fde7faf07 Support translation of /privacypolicy 2021-04-19 11:31:45 -07:00
Karthik
8963e4ace4
Gen 1: Don't allow Pokemon to recharge if frozen (#8211) 2021-04-19 12:45:44 -04:00
pyuk-bot
3639079d1f
Protective Pads should not apply to Gulp Missile (#8207)
Co-authored-by: Leonard Craft III <leonardcraft64@gmail.com>
2021-04-19 12:39:33 -04:00
Annika
d5a4c7d9e2 CommandContext#globalModlog: Make user optional
Global modlog entries aren't always acting on a user, so making this parameter optional makes sense. I also changed them to default to null for consistency with CommandContext#modlog.
2021-04-19 08:53:17 -07:00
Distrib
b7d1e2c058
PU: Ban Clawitzer, Kingler and Omastar (#8213) 2021-04-18 18:30:09 -07:00
Instruct
ccb8bfc2a9
Fix build (#8212) 2021-04-18 15:18:23 -06:00
Kris Johnson
4dc1b18c74
National Dex: Ban Magearna
https://www.smogon.com/forums/threads/national-dex-magearna-voting.3682518/page-4#post-8825906
2021-04-18 14:45:42 -06:00
Annika
c87f63f4f0 /processes: Fix RAM usage display
`ps` reports RSS in kb, not bytes, making /processes off by a factor of 1024
2021-04-17 22:17:48 -07:00
Karthik
1d9b713951
Add fail text for Corrosive Gas (#8209) 2021-04-17 20:19:01 -05:00
pacmanboss256
650d3868da
ZU: Ban Magneton (#8208)
https://www.smogon.com/forums/threads/np-zu-stage-5-1-new-bans-at-post-19-break-the-ice.3677885/page-2#post-8825334
2021-04-17 17:07:19 -07:00
Leonard Craft III
4818c50374
Fix Transform source Ability leak (#8204) 2021-04-17 15:06:40 -07:00
Leonard Craft III
3c7b7b96f4
Add Plasma Fists hint (#8206) 2021-04-17 15:04:17 -07:00
Karthik
adb164ad51
Fix Magician activation timing (#8202)
Use onAfterMoveSecondarySelf so Weakness Policy happens first
Fixes #8104
2021-04-17 12:26:29 -04:00
Kris Johnson
d0fd8ac8e0 Fix build 2021-04-16 21:47:38 -06:00
Kris Johnson
f4fda49201 Update Battle Factory tests and command 2021-04-16 17:35:26 -06:00
Kris Johnson
b101df44cc Doubles LC: Enforce a max level of 5 2021-04-16 17:03:47 -06:00