Previously, we split gen 2-5 egg move validation into two phases,
`checkLearnset` where we searched for a valid father, and
`reconcileLearnset` where we made sure the father could learn the move
combination.
Egg move validation has now been completely moved out of these
functions and into `validateSource`, which calls `findEggMoveFathers`.
The new algorithm no longer requires `C` moves to be hardcoded into
`learnsets.js`, now doing a more thorough check validation for the
father's move combination. This should be slower than before, but
net performance should be massively improved due to two other
optimizations in this refactor:
- We no longer do any father-searching if the moveset can be obtained
any other way - in particular, this means no more father validation
in gen 6+ where all egg move combinations are legal anyway.
- We only check fully-evolved pokemon as fathers (because anything a
prevo can learn, its evos can learn, too - yes, we remember to make
exceptions for Salazzle, Combee, and future-gen evos)
In addition, `/learn` should now provide significantly better
information for egg move breeding, since it uses a more thorough check
instead of the validator's short-circuiting the moment it finds a valid
father.
This also improves some baby-only move validation, specifically fixing
the issue with Seismic Toss Charm Chansey.
* Update chat monitor to include a battle filter, as well as evasion detection
* Forgot about the roomid rename thing
* Mitigate the first problem hopefully
* Mitigate the second problem in an extremely elegant way
* Precompile the substitutions
* Make this new filter not racist towards nigerians
* Totally not ghostwritten code because i'm really smart
* Small edit
- Repealing rules now always works, regardless of rule order
(Fixes AAA validation)
- Fix a check for egg move hidden ability validation
(Fixes a Gen 4 Dragon Dance Charizard set)
- Always ban AG when banning Uber
(Fixes allowing Rayquaza-Mega in lower tiers)
- Fix ability validation in Let's Go
- Fix valid-move-combo dexsearch
* Refactor validator
This is a major refactor intended to make the default rules easier to
understand, and also easier for OMs to bypass.
Removed rules:
- `Pokemon`: This is now `-Nonexistent`. Its previous name was intended
to be interpreted as "simulate the Pokémon games exactly, and only
allow what they allow". The new name should make it clearer that it
mainly bans CAPs and other nonexistent Pokémon and functionality.
- `-Illegal`: This is now `Obtainable` (see below).
- `Allow CAP`: This is now `+CAP`. Instead of having a hardcoded rule,
OMs can now be manually whitelist any pokemon/item/etc or group of
them, overriding `-Nonexistent`.
- `Ignore Illegal Abilities`: This is now `!Obtainable Abilities` (see
below).
`Obtainable` was previously `-Illegal`, and does the same thing: Makes
sure you have a regular Pokémon game with only Pokémon that can be
obtained without hacking.
But instead of being a ban, it's now a rule that does nothing by
itself, except contain more rules:
- `Obtainable Moves`
- `Obtainable Abilities`
- `Obtainable Formes`
- `Obtainable Misc`
- `-Nonexistent`
- `-Unreleased`
This allows OMs to piecemeal repeal and unban any of these individual
rules, instead of the previous approach of unbanning them all and
manually reimplementing every single validation you wanted to keep.
* Refactor PokemonSources into a class
This mostly just makes a lot of the weirder checks in the validator
substantially more readable.
This also renames `lsetData` to `setSources`, which should also help
readability.
* Validate Bottle Cap HP types
Fixes an issue reported here:
https://github.com/Zarel/Pokemon-Showdown/issues/5742#issuecomment-533850288
* Fix several move validation issues
Fixes#5742
We have a new MoveSource type: R for Restricted. R moves work like
level-up/tutor/TM moves, except you're limited to one R move.
- Shedinja move stolen from Ninjask in Gen 3-4 are now R moves instead
of event moves. This allows them to coexist with Nincada egg moves.
- Necrozma-DW/DM now inherit moves/events from Necrozma (like Rotom,
but with event validation). This allows them to be shiny.
- Pokemon can now get egg moves from their own evolutions. This fixes
some Tyrogue, Charmander, and Treecko sets mentioned in #5742
- Some more C moves were added, fixing some Hitmontop and Chatot sets
mentioned in #5742
* Improve ability/move compatibility validator
eslint:recommended seems tohave gotten more sensitive.
require-atomic-updates was disabled because "I think this is
intentional behavior because that someObj object was read before
await expression and written after await expression." is wayyy
to aggressive: https://github.com/eslint/eslint/issues/11899
* Add more hunt management options
- Hints: add a command to display hints that can be recalled using /scav hint and /viewhunt for hunts that last several hours. This allows previously given hints to still be visible even after it scrolls out of chat, or the user uses /clear after completing some difficult param question. This command cannot be used until after 10 minutes of the hunt.
- /scav status is enhanced to show users who have tried to guess in the last 5 minutes in bold (<strong> for you HTML purists)
This has been approved by all 4 roomowners.
* Improve username punishments
Track how many times a name has been forcerenamed, note differently for offline warns and forcerenames
* Hyperlink names, show trusted/ac/registered
* rebase
* pseudorank -> accountstatus
- Anyone can now see the amount of participants
- Max winners can't go above `Number.MAX_SAFE_INTEGER`
- `/lottery edit` can be used to edit the lottery
- "Page unavailable" is not shown to guest users, instead the not "allowing guests to join" is deferred to `/lottery join`.
- Punished users are dropped before generating winners
This seemed desirable in tested, but probably because I hadn't
refreshed. Also, the creator can wrap their content in a div and
give it a margin-bottom.
Created distinctions between:
Role Cop and Role Cop (Classic)
Red Goo and Red Goo (Cracking Idea)
Neapolitan and Vanilla Cop
Also clarified some roles and standardized how Idea Variant roles are listed.
Added a distinction between Silencer and Silencer (Greater Idea) and between Grey Goo and Grey Goo (Cracking Idea). Also added the (xxx Idea) tag to the roles in their respective ideas.
- Ensure the first card of the dealer is on the top of the turnlog
- Don't allow people to use the command to start the game if the game has already started
- Use user names instead of user ids in the initial playerlist for join messages
- Modlog conditionally if the game was ended forcibly or not