Commit Graph

281 Commits

Author SHA1 Message Date
Kris Johnson
239b7cdf13
Update VGC banlist (#6361) 2020-02-12 21:24:06 +04:00
Kris Johnson
92c7d377a7
Add Pokemon Home support (#6349)
Co-authored-by: The Immortal <the_immortal123@live.com>
2020-02-12 14:54:55 +04:00
The Immortal
19cdf79821 Update OMs 2020-02-12 14:19:29 +04:00
The Immortal
3278f97576 Show Crowned formes in Team Preview
They are immediately visible after Team Preview in-game, but PS! lacks that feature so this is the best compromise. This also fixes their appearance in Hackmons Team Preview.
2020-02-03 01:05:38 +04:00
The Immortal
38671c67c7 Doubles: Add Gravity Sleep Clause
Closes #6299
2020-01-22 07:28:40 +04:00
The Immortal
cb11d42c73 Update ability clause 2020-01-17 13:58:13 +04:00
The Immortal
1ec2d0bfa1 Doubles: Remove Evasion Abilities Clause
Closes #6268
2020-01-09 04:02:56 +04:00
Guangcong Luo
138fccbaa8 Consolidate more rules into Standard
- `Obtainable` and `Team Preview` are now part of `Standard`

- `minSourceGen: 8` is now a part of `-Unreleased` (which is part of
  `Obtainable`) in Gen 8. Instead, it's NatDex that overrides it with
	`minSourceGen: 1`. This allows `!Standard, Standard NatDex` and
	`!Standard NatDex, Standard` to work as intended.

- Duplicate rules are now checked for (does not apply to subrules, so
  multiple inheritance is still possible)

- It is now possible to inherit `minSourceGen` from rules.
2020-01-03 23:42:48 -05:00
Kris Johnson
a3d3d71863 Add Pet Mod of the Season (#6245) 2020-01-02 02:47:46 +04:00
Guangcong Luo
744f7732e8 Fix rulesets
- Remove "Standard Ubers"

- Rename "Standard ND" -> "Standard NatDex"
2019-12-30 12:23:51 +09:00
The Immortal
189a1421a8 Rename Sleep Clause to Sleep Moves Clause 2019-12-27 13:13:41 +04:00
The Immortal
fe00864b8e Add Sleep Clause rule 2019-12-27 05:09:24 +04:00
Marty-D
1475df0674
Team Preview: Hide Zacian and Zamazenta formes
They transform silently once a battle starts
2019-12-26 10:13:21 -05:00
Guangcong Luo
b31b88a79b Add documentation for custom rules 2019-12-25 11:26:23 +09:00
The Immortal
f62ff19e8a Improve validation for unobtainable Pokemon
This merges the Glitch and Pokestar tags into a new Unobtainable tag that defines Pokemon that are only obtainable through hacking (such as Floette-Eternal and Missingno.). These Pokemon are legal in Hackmons of their specific generation only. Custom is used in future gens instead of Past because of National Dex legality.
2019-12-25 00:35:39 +04:00
Guangcong Luo
e953747570 Improve error text for Arceus EV Limit rule 2019-12-24 13:39:15 +09:00
The Immortal
e04d2eef8b Gen 4: Update Arceus EV limitations 2019-12-24 01:35:45 +04:00
The Immortal
f5eb722bbf Add Standard ND ruleset 2019-12-23 00:33:57 +04:00
YaBoiJD
9a88d49a83 Fix Ditto from Dynamaxing as a Mega/Primal etc (#6139) 2019-12-12 00:14:47 +04:00
The Immortal
c23a0c5d5b Obtainable Moves: Remove unnecessary ban 2019-12-10 19:17:05 +04:00
Kris Johnson
89002124b3 Change inheritsLearnsetFrom to inheritsFrom and fix Necrozma-Ultra's inheritance (#6168) 2019-12-10 08:03:49 +04:00
The Immortal
7dfc381e9b Leaf Blade + Sucker Punch Shiftry is legal 2019-12-09 05:16:46 +04:00
The Immortal
f1530288e5 Move Keldeo-R validation to Obtainable rule
Keldeo-R is not a battle forme and is possible to hack without Secret Sword, unlike most other formes. It should be restricted by the rule that prevents hacks and not the rule that validates battle formes. This is mostly relevant for Hackmons.
2019-12-05 22:36:20 +04:00
The Immortal
6724ce500a Move Kyurem/Necrozma forme legality to Obtainable
Obtaintable Formes is for in-battle forme changes. Obtainable makes sure a team is possible to obtain in-game without hacking. Multiple Kyurem/Necrozma formes are the latter case.
2019-12-05 18:00:01 +04:00
The Immortal
4266000df4 Update forme validation
- In gen 8, Silvally is able to enter battles in different types if it doesn't have RKS System (i.e. it doesn't require a Memory).
- In gen 8, formes that transform in battle are no longer able to start in that forme (relevant to BH).
2019-12-05 07:29:15 +04:00
The Immortal
1ee6a3933d STABmons: Use `isMax` in validator 2019-12-05 03:13:09 +04:00
The Immortal
d9c49a2861 Team Preview: Hide items in gen 8 2019-12-02 07:02:19 +04:00
The Immortal
4b5c65ac98 STABmons: Prevent Max moves 2019-12-02 04:14:12 +04:00
YaBoiJD
546065a10d Update National Dex Mechanics (#6108)
Pokemon that are holding an Item that enables Mega Evolution, Primal Revision, or the use of a Z-Move cannot Dynamax. A Rayquaza that can Mega Evolve also cannot Dynamax.

Also fixes an alias loop with the national dex format/ruleset.
2019-11-30 14:50:09 -05:00
Spandan Punwatkar
97e910a093 National Dex: Ban Unobtainables (#6105) 2019-11-29 23:34:10 +13:00
TheMezStrikes
b0dcf0d597 Fix NFE clause in battles (#6109) 2019-11-29 11:51:21 +04:00
The Immortal
224465f6f7 Remove Moody Clause from Standard ruleset 2019-11-28 02:52:39 +04:00
The Immortal
e020334a78 Fix NFE Clause 2019-11-27 02:51:01 +04:00
HoeenHero
44a7fa0946 Make Dynamax checks more dynamic
Specifically we now check the battle.canDynamax method when
notifying a player about their pokemon's eligibility to dynamax.

This enforces the fact that pokemon that are transformed into
dynamax ineligible pokemon cannot dynamax themselves.

As a result of this change the pokemon.canDynamax flag is unnessecary
and has been refactored to a side.canDynamax flag. All pokemon specific
dynamax checks should use the battle.canDynamax method.
2019-11-26 13:05:38 -05:00
HoeenHero
8792d7345f Most past gen items should still be illegal (#6066) 2019-11-25 22:00:12 +13:00
The Immortal
d9f3a24462 STABmons: Fix Galar Pokemon 2019-11-25 07:19:59 +04:00
The Immortal
7cccda3b18 Update Other Metagames 2019-11-25 06:53:08 +04:00
The Immortal
eff4d957e7 NatDex: Add ruleset & sort OU banlist 2019-11-25 03:06:31 +04:00
The Immortal
492f5ac7d5 Remove Moody Clause from Doubles ruleset 2019-11-22 22:38:57 +04:00
The Immortal
f46923173a Update OM clauses 2019-11-21 23:54:57 +04:00
The Immortal
97689e931a Add Dynamax Clause 2019-11-20 03:20:00 +04:00
The Immortal
a7f5ba92ca Update formats for gen 8 2019-11-19 08:05:42 +04:00
TheMezStrikes
0c7f04356d Generalize NFE bans into validator rule (#5942) 2019-11-11 17:42:30 +13:00
The Immortal
615f16c94d STABmons: Prevent unreleased moves 2019-11-03 05:36:53 +04:00
Guangcong Luo
2adc80efe4
Improve egg validator (#5854)
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.
2019-10-09 00:59:24 +11:00
Guangcong Luo
7a023746ba
Refactor battle.dex out of battle (#5851)
In most other similar systems, like TeamValidator, we use `thing.dex` instead of having it extend `ModdedDex`. Battle has always extended `ModdedDex`, though. This changes Battle to match the others.

This should fix an issue with `Battle.data` not being cached.

This also frees up Battle to extend ObjectReadWriteStream<string> in a future update.
2019-10-06 07:38:08 +11:00
Guangcong Luo
3cd04c349e Fix missed conversions of validate -> obtainable 2019-10-06 04:32:23 +11:00
Guangcong Luo
71498d451d
New validator (#5840)
* 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
2019-10-06 04:21:30 +11:00
Marty-D
196983430f Gen 3 OU: Add 3 Baton Pass Clause and ban Baton Pass Smeargle
https://www.smogon.com/forums/posts/8212796/
2019-08-16 21:39:06 -04:00
Guangcong Luo
0cbb632521
Fix Blitz rule description 2019-08-07 10:54:52 -07:00