Commit Graph

189 Commits

Author SHA1 Message Date
Hisuian Zoroark
9be3e48d80
Separate Zacian/Zamazenta forms in banlists (#8772) 2022-05-13 18:10:11 -04:00
Karthik
49149ea8fb
Properly handle Zacian/Zamazenta Crowned forms (#8753) 2022-05-09 14:23:15 -05:00
Kris Johnson
1d30a4bd5a Add May 2022 OMotM/RoA Spotlight 2022-05-01 12:13:46 -06:00
Karthik
bd53840150
Gen 1: Allow underleveled pokemon in Custom Game (#8707) 2022-03-30 19:35:35 -05:00
Hisuian Zoroark
6e133310e5
Pokebilities: Streamline ability bans (#8661) 2022-02-16 15:34:02 -05:00
WeWuzNidokangz
7097a9ac75
Hackmons Cup: Support custom team bans/unbans (#8607) 2022-01-09 14:46:41 -08:00
Karthik
2ecbf613e3
Gen 4: Fix Griseous Orb Validation (#8568) 2021-12-15 19:50:00 -06:00
Kris Johnson
ff4b7bed31
Add BDSP data and formats (#8530) 2021-11-18 18:00:10 -06:00
Eve
87627b5956
Stop Allow AVs from removing items (#8508)
* stop allowAVs from removing items

Let's Go formats already disallow any non-Mega Stone items, this code has no purpose other than preventing the use of Mega Stones (not an intended part of Candy formats).

* Update team-validator.ts
2021-10-31 14:40:54 -06:00
Kris Johnson
d92665cd3e
Fix validating Pokemon with event-only prevolutions (#8495) 2021-10-13 19:55:29 -07:00
En Passant
21dfd5470d
Add "Sketch Gen 8 Moves" rule (#8431) 2021-10-09 19:05:05 -07:00
Karthik
f542c0d347
Support banning specific Gigantamax formes (#8492) 2021-10-09 12:59:53 -07:00
Leonard Craft III
62efd9225c
Gen 1: Correct minimum level validator logic (#8455) 2021-09-07 19:40:33 -05:00
Kris Johnson
598ac409e8 Rename Let's Go! mod to 'gen7letsgo' 2021-07-06 23:07:51 -06:00
Guangcong Luo
9c98ae5c87 Rules: Split "EV Limit" out from "Obtainable Misc"
"EV Limit = 510" is now its own rule which can be changed separately
from the rest of Obtainable Misc.

The rest of Obtainable Misc doesn't seem useful to break up, so I
haven't bothered.
2021-05-23 15:14:00 -07:00
Guangcong Luo
570d3d3d29 Fix Weezing-Galar from VC Koffing validation
This fixes an issue where a Weezing-Galar evolved from a Koffing
gotten from a Virtual Console transfer from RBY/GSC should be able
to have a non-Hidden Ability, but couldn't.

Thanks @Karthik99999 for bringing this to my attention.

Fixes #8327
2021-05-23 11:29:17 -07:00
Guangcong Luo
2936c55439 Rules: Add -no item and fix -all items
`no item` is now a fake item meaning "not holding an item", for the
purposes of the team validator. This means that `-no item` will force
all pokemon to carry items.

`all items` no longer includes not holding an item, so `-all items`
will now work as expected.
2021-05-17 04:22:24 -07:00
Karthik
ec2df7ceb4
Fix validator message for LGPE Pokemon (#8298) 2021-05-12 14:15:59 -04:00
Annika
62571c4907
Validator: Improve Gen 1 level validation (#8294) 2021-05-12 02:59:12 -07:00
Guangcong Luo
638c1e3ae8 Add "Max Move Count" value rule
Also stop enforcing 4 moves limit and 6 pokemon limit in `-Nonstandard`,
for the same reason we stopped enforcing the level 100 limit; any format
that explicitly wants it higher should automatically override it.
2021-05-07 02:16:24 -07:00
Guangcong Luo
df42a795f9 Remove max level check from -Nonexistent
Anyone who sets a max level above 100 is opting in, so there's no
need to add a redundant check on top of that.
2021-05-06 21:19:04 -07:00
Guangcong Luo
16e9a0eeec Fix bugs in value rule refactor 2021-05-06 07:49:17 -04:00
Guangcong Luo
55980d416c
Support value rules (#8267)
`teamLength`, `maxLevel`, `cupLevelLimit`, and `minSourceGen` no longer
exist as properties of `Format`. Instead, they're value rules that
become properties of `RuleTable`, and can be specified as custom rules
and inherited through rulesets like anything else.

See the PR for a full reckoning of changes:

https://github.com/smogon/pokemon-showdown/pull/8267
2021-05-06 01:16:16 -07:00
Guangcong Luo
f253af89df Fix crash in Sketchmons validator 2021-05-01 15:40:04 -07:00
Guangcong Luo
70bef9b1ae Improve error message for nonexistent pokemon 2021-04-30 20:12:18 -07:00
Guangcong Luo
b82ee0588e Fix bug in ban reason message 2021-04-30 20:07:40 -07:00
Guangcong Luo
4d70b0a46a
Use data/tags for validator (#8218)
Previously, the validator had its own hardcoded tag system. This
removes the hardcoding and makes it so any pokemon tag in `tags.ts`
can be banned or unbanned.
2021-04-30 18:20:30 -07:00
Kris Johnson
5b8dfc7d8e [Gen 1] Japanese OU: Allow Japanese event moves 2021-04-30 01:55:06 -06: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
Leonard Craft III
f8cfe3a242 Validator: Don't enforce 3 IV minimum in Hackmons 2021-04-09 23:40:16 -05:00
Leonard Craft III
ba66ffde0f Validator: Fix Behemoth moves 2021-04-09 21:10:38 -05:00
Guangcong Luo
6658d65c40 Properly fix Keldeo-R 2021-04-08 14:48:03 -04:00
Guangcong Luo
05e28925a7 Fix Mega Rayquaza and Keldeo-R validation 2021-04-08 06:02:43 -07:00
Guangcong Luo
13189fdb02
Update Dex API (#8181)
This is the change that renames:

- `Dex.getMove` -> `Dex.moves.get`
- `Dex.getAbility` -> `Dex.abilities.get`
- `Dex.getItem` -> `Dex.items.get`
- `Dex.getSpecies` -> `Dex.species.get`
- `Dex.getEffect` -> `Dex.conditions.get`
- `Dex.getNature` -> `Dex.natures.get`
- `Dex.getType` -> `Dex.types.get`
- `Dex.getFormat` -> `Dex.formats.get`

In addition, some other APIs have been updated:

- `getByID` methods have also been added to every other table.
- `Dex.moves.all()` now gets an array of all moves
  - Plus equivalent methods for `abilities`, `items`, `species`, `formats`, `natures`, `types`
  - Note: there's no `Dex.conditions.all()`
- new API: `Dex.stats` for naming/iterating stats
- `Dex.getEffectByID` -> `Dex.conditions.getByID`
- `Dex.getType` -> `Dex.types.get`
- `Dex.data.Formats` -> `Dex.data.Rulesets`
- `Dex.formats` -> now an array `Dex.formats.all()`
- `Dex.getRuleTable` -> `Dex.formats.getRuleTable`
- `Dex.validateFormat` -> `Dex.formats.validate`

Team functions have been split off into a new `sim/teams` package:

- `Dex.packTeam` -> `Teams.pack`
- `Dex.fastUnpackTeam` -> `Teams.unpack`
- `Dex.generateTeam` -> `Teams.generate`
- `Dex.stringifyTeam` -> `Teams.export`

`Teams.export` has also been rewritten to better match how it works in client.

This implements #8178
2021-04-08 03:00:37 -07:00
Guangcong Luo
d4b6ba4c0f Allow passing teams to random formats
The team validator will now complain if try to bring a team to a random
format. Also, if you bypass the validator (such as with
`/importinputlog` or using the JS API directly), you can now use custom
teams in random formats.

Fixes #8144
2021-03-29 10:28:00 -07:00
Marty-D
afb15b82f0 Validator: Fix blank mismatched forme message 2021-03-26 16:29:34 -04:00
Marty-D
d1c80dc60f Validator: Fix Diancie exception
Thanks Anubis!
2021-03-08 12:57:53 -05:00
Kris Johnson
82e81f9b39
Let "Allow Tradeback" operate for any generation (#8086) 2021-03-03 03:24:53 -08:00
Annika
c2e97aaaed
Use optional chaining in more places (#8063) 2021-02-22 11:42:05 -08:00
Instruct
e7695c4b78
Gen 3: Add Deoxys Forme Clause and Deoxys Camouflage Mod (#8024) 2021-02-15 01:37:58 -08:00
The Immortal
43daacb8d1 Fix Gigantamax Melmetal crash 2021-02-04 17:06:43 +04:00
Mia
76c10841ea
Lib: Add an index file for all exports (#7972) 2021-01-31 18:00:19 -08:00
Guangcong Luo
22f323dfed Fix National Dex validation
The "Standard NatDex" rule didn't apply all NatDex rules, because some
were hardcoded to apply to formats with "National Dex" in their name.
This has been fixed; now all validation relies on the "Standard NatDex"
rule.

Refs a problem discussed in #7909
2021-01-13 00:31:14 -08:00
Guangcong Luo
73c7d5e5d8 Fix bug in Sketch validation
Earlier today, I tried to remove the hardcode for Smeargle without
realizing what it was for (Smeargle gets Spore as an event move, which
shouldn't override its ability to Sketch Spore).

It turns out, 7 years ago when I added the Smeargle hardcode, I wrote
a TODO to fix it which I never got around to:

2e1ab04eb6

Anyway, this commit fixes it properly.
2021-01-03 23:52:33 -08:00
Guangcong Luo
6b3a3070c9 Refactor team validator for readability
`checkLearnset` has been renamed `checkCanLearn`.

`reconcileLearnset` has been replaced with `validateMoves`, which
bundles the actual `checkCanLearn` calls with the old
`reconcileLearnset`, making for a better name.
2021-01-03 23:26:20 -08:00
The Immortal
4ba7045bda Validator: Remove extra space from cantLearnReason 2021-01-04 00:58:04 +04:00
Guangcong Luo
91c134fcf3 Remove unused variable 2021-01-03 10:19:54 -08:00
Guangcong Luo
ad656f67e4 Keep track of why moves can't be learned
The validator will now always know and be able to report exactly why
a move can't be learned, instead of sometimes not being able to figure
it out.
2021-01-03 09:53:04 -08:00
Marty-D
826dd94eae Validator: Fix Ability attribution from Virtual Console 2020-11-13 11:28:10 -05:00
Marty-D
b098b54187 Validator: Fix Ability attribution from Dream World 2020-11-12 18:13:58 -05:00