Better support for challenge codes for past 35 Pokes metagames #10772
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the challenge codes used for challenging to a past 35 Pokes meta look like so: (a couple more samples in this tour post)
/challenge gen9nationaldex35pokes @@@ -All Pokemon, +mabosstiff, +eelektross, +camerupt, +grapploct, +drifblim, +ampharos, +lurantis, +gyarados, +hypno, +druddigon, +durant, +chesnaught, +gastrodon, +eldegoss, +pelipper, +dodrio, +wailord, +emolga, +dachsbun, +drampa, +trevenant, +passimian, +beautifly, +tyranitar, +regirock, +stunfisk-galar, +morpeko, +jumpluff, +heatmor, +froslass, +audino, +cetitan, +pincurchin, +cradily, +ninetales, -Golem-Alola, -Zoroark, -Pyukumuku, -Guzzlord, -Wugtrio, -Garbodor, -Aurorus, -Walrein, -Roserade, -Ribombee, -Carracosta, -Perrserker, -Appletun, -Primarina, -Pachirisu, -Banette, -Celebi, -Avalugg, -Wo-Chien, -Pupitar, -Milotic, -Scovillain, -Dipplin, -Chandelure, -Toxicroak, -Magmortar, -Yanmega, -Cacturne, -Luvdisc, -Mawile, -Rotom-Frost
Pokemon in the current month's roster (that don't overlap with the target meta) have to be individually banned. Considering that most tours take place between 2 months, these challenge codes will have to be adapted according to the next month's roster. It's not convenient for the hosts and the players.
The
-allpokemon
tag intentionally has the lowest priority in validation, so its default behavior is insufficient for this purpose. This PR does the following:Adds logic handling
-allpokemon
to the 35 Pokes validator. Its purpose is to allow shorter (and date independant) challenge codes in the form of/challenge gen9nationaldex35pokes @@@ -All Pokemon, +mabosstiff, +eelektross, +camerupt, +grapploct, +drifblim, +ampharos, +lurantis, +gyarados, +hypno, +druddigon, +durant, +chesnaught, +gastrodon, +eldegoss, +pelipper, +dodrio, +wailord, +emolga, +dachsbun, +drampa, +trevenant, +passimian, +beautifly, +tyranitar, +regirock, +stunfisk-galar, +morpeko, +jumpluff, +heatmor, +froslass, +audino, +cetitan, +pincurchin, +cradily, +ninetales
Moves the unbanlist definition to the new logic. This is necessary because
unbanlist
interferes with the challenge code before the validation is reached. Pokemon inunbanlist
are interpreted as+pokemon
in the rule table, and so+pokemon
in the challenge code is removed if present. For instance, Garbodor is part of this month's roster, and that of November 2023 as well. If this month someone was to challenge someone else to Nov 2023 using a code like@@@ -All Pokemon, +Mismagius, +Garbodor, +Swampert, ...
, their code would be interpreted as@@@ -All Pokemon, +Mismagius, +Swampert, ...
, and any validator logic would be unaware of the player initially specifying+Garbodor
.Provide an alternative filter for the client build script. It was previously relying on
unbanlist
.This PR makes the 35 Pokes teambuilder display nothing if built again until the complementary patch is applied. I'll link it shortly.
Thank you for checking. Happy holidays!