Commit Graph

417 Commits

Author SHA1 Message Date
Kris Johnson
a19ad51a20 Fix one part of the build (#5945) 2019-11-16 00:08:28 +13:00
Ezaphs
1608c2387e Add Gen 8 learnsets, Max and G-Max moves (WIP) 2019-11-15 22:02:38 +13:00
Marty-D
42a1ebe396 Add Shiny Tapu Koko event 2019-10-19 22:15:19 -04:00
Marty-D
6030ca127d CAP: Nerf Equilibra
https://www.smogon.com/forums/posts/8253336/
2019-10-11 21:04:44 -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
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
ee7e9fb66a Learnsets: Update Vivillon forms 2019-10-03 22:17:57 -04:00
Lusamine
7c7083b493 Add shiny Solgaleo/Lunala events (#5843) 2019-10-03 20:47:38 -04:00
Lusamine
3d8b69f218 Add shiny Necrozma event (#5786) 2019-09-15 11:50:57 -04:00
fart
49416194db Add Celebrate Aerodactyl event (#5711) 2019-08-16 22:16:14 -04:00
Marty-D
89deb387fb Add CAP 25 prevos 2019-07-06 20:24:56 -04:00
Marty-D
c1dde231a9 CAP: Nerf Aurumoth 2019-06-25 10:23:06 -04:00
Marty-D
4e4d4725f9 Add CAP 26 Equilibra 2019-06-20 13:54:03 -04:00
Marty-D
bde086c600 Add Shiny Tapu Fini event 2019-05-21 13:09:29 -04:00
Marty-D
95fcc86028 Add new event Pokemon
and release Oranguru and Passimian's Hidden Abilities
2019-03-28 08:32:45 -04:00
Marty-D
3762c52dd8 Add Shiny Tapu Bulu event 2019-03-20 08:27:01 -04:00
Marty-D
f2d491db29 CAP: Remove Phantom Force from Necturine too 2019-03-06 10:36:56 -05:00
Kris Johnson
8373574337 CAP: Nerf Necturna (#5257) 2019-03-05 19:01:45 -06:00
Marty-D
8dfe58100d Learnsets: Fix Gen 4 tutor moves 2019-02-19 22:03:28 -05:00
Kris Johnson
630180fd1b CAP: Nerf Crucibelle-Mega (#5172)
* CAP: Nerf Crucibelle-Mega

* oops
2019-02-16 19:30:38 -05:00
Marty-D
dd3da86f7f Add Shiny Tapu Lele event 2018-12-18 09:04:17 -05:00
Marty-D
0606241664 Add CAP 25: Caribolt, Smokomodo, Snaelstrom 2018-11-29 13:30:33 -05:00
Kris Johnson
5b2d76d75d Add Pokemon Let's Go! (#4967) 2018-11-19 16:19:19 -06:00
Marty-D
716d4a8282 Add new event Pokemon 2018-11-02 10:41:32 -04:00
Marty-D
086daa92dc Add new event Pokemon 2018-10-05 20:09:14 -04:00
Marty-D
6024c4a1b1 Add new event Pokemon 2018-09-20 21:37:23 -04:00
Marty-D
16faa75ee4 CAP: Add Mumbao and update prevos 2018-09-04 14:23:14 -04:00
Marty-D
8d582a4b33 Add new event Pokemon 2018-09-02 16:20:08 -04:00
Marty-D
ce8dd99909 Learnsets: Lotad can't learn Dive 2018-09-02 16:19:22 -04:00
Marty-D
f02cb59e0e Add event Meloetta 2018-08-24 22:33:36 -04:00
Marty-D
cffd536c0d Add new event Pokemon 2018-08-03 15:10:25 -04:00
Marty-D
4eb33d68bf Add new event Pokemon 2018-07-03 09:08:32 -04:00
Marty-D
a56f70dada Release Zeraora and Plasma Fists 2018-07-01 13:53:41 -04:00
Marty-D
7ada6a873a Learnsets: Update Keldeo and Meloetta 2018-06-28 10:58:43 -04:00
Marty-D
81890ea01b Add more missing event Pokemon 2018-06-23 09:47:38 -04:00
Marty-D
a909b23d0d Add missing Smeargle event 2018-06-22 08:44:06 -04:00
Marty-D
f9125274cd Learnsets: Remove useless egg moves 2018-06-21 13:33:53 -04:00
Marty-D
6eccc565fd Add new event Pokemon 2018-06-09 11:05:22 -04:00
Marty-D
691ce185b0 Add Shiny Zygarde event 2018-05-31 22:02:02 -04:00
Marty-D
248797c926 Add CAP 24: Jumbao 2018-05-19 18:48:23 -04:00
Marty-D
b3cf00f4cc Add new event Pokemon 2018-04-29 10:12:09 -04:00
Marty-D
344d2d72a6 Fix Tickle Wynaut legality
To be reverted when the validator supports the Pomeg Glitch with Gen 3
event eggs.
2018-04-27 10:51:44 -04:00
Marty-D
de3feb15fe Fix Giratina and Hoopa's learnsets 2018-04-27 10:49:13 -04:00
Marty-D
2ecde625ec Fix Shaymin's learnset 2018-04-26 20:30:32 -04:00
Marty-D
eabea98764 Add new event Pokemon 2018-04-25 08:50:24 -04:00
Marty-D
137aa61db8 Learnsets: Move CAP to the bottom 2018-04-13 10:58:09 -04:00
Marty-D
726dc4357d Add new CAP prevos 2018-04-13 10:32:58 -04:00
Marty-D
ec5b568ded Add new event Pokemon 2018-03-31 16:20:13 -04:00
Marty-D
6bc2ff160b Learnsets: Add missing Marill egg move 2018-03-29 21:35:23 -04:00
Quinton Lee
c799393710 Typescript data/ and config/formats (#4513)
Also removes Battle Factory methods accidentally re-added in d0a4a689a7
2018-03-26 09:50:51 -05:00