Check team legality
check_legalityValidate a 6-member Pokémon team against a VGC regulation set, flagging illegal species, duplicate items or Pokédex numbers, unlearnable moves, and Mega Evolution issues.
Instructions
Validate up to 6 team members against a Pokémon Champions / VGC Regulation Set, reporting illegal or unknown species, duplicate National Pokédex numbers (Species Clause), duplicate items (Item Clause), unlearnable moves, team size (must be exactly 6), and who may Mega Evolve (one per battle). Species resolve case-insensitively to base species (any form of a legal base qualifies). A move is legal when any species in the evolution line knows it — the form, its base species, or a pre-evolution — because egg and level-up moves carry up on evolution: Rillaboom may hold Fake Out, which is Grookey’s egg move. get_learnset lists one species’ own learnset rather than this union, get_regulation gives the roster, and for stat values rather than legality use calculate_stats. Unknown ids return an isError listing them. Read-only and offline; returns valid, violations, and per-member checks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| team | Yes | Team members, 1-6 of them; a VGC Battle Team must be exactly 6, so any other length adds a team-size violation. | |
| regulation | Yes | Regulation Set id or name, matched case- and punctuation-insensitively: "M-A", "m-a", "mc", and "Regulation Set M-C" all resolve to the same set. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mega | Yes | Mega Evolution summary for the checked team. | |
| valid | Yes | True only when `violations` is empty; false when any member is illegal or unknown, a clause is broken, or the team is not exactly 6. | |
| status | Yes | That set’s status relative to today. | |
| members | Yes | One entry per supplied team member, in the order supplied. | |
| teamSize | Yes | How many members were supplied (1-6). | |
| regulation | Yes | Display name of the set the team was checked against, e.g. "Regulation Set M-C". | |
| violations | Yes | Every violation found, as human-readable text (illegal/unknown species, Species Clause, unknown item, Item Clause, illegal/unknown moves, team size); empty when the team is legal. |