This is quite complex.
In gen 2, the egg moves pass through father and species through mother.
Therefore, we must check that:
1. Two egg moves come from the same father or are learned in another way.
2. If two egg moves come from the same father, check if the father can learn those two as well.
Also, we must keep track of the state of egg and machine moves in the learnset in order to properly reject them when the problem is found.
Related commits: 17e8515486 and 33cc1e09eb
Fix 6e2ce27684 missed the bigger picture and c41e7813f7 didn't account for the special Gen 1 - Gen 2 case.
On Gen 2, you may learn egg moves that do not exist in gen 1.
Those moves make that Pokémon incompatible with Gen 1 only TMs.
However, other than that, Gen 2 mons can breed in Gen 2, tradeback to Gen 1, and acquire TMs.
This is part 1 of Gen 2 learnset fix, next one being gen 2 egg incompatibilities between them.
This fixes the weird case of hidden ability Staraptor in gen 5 being
disallowed egg moves because Starly doesn't have a hidden ability in gen
5. Non-hidden ability Starly can actually evolve into hidden ability
Staravia/Staraptor.
With this change, you can use something as Lovely Kiss Snorlax with Double-Edge.
You could get the lovely kiss Snorlax from event, trade it to Gen 1 as lovely kiss existed, teach it Double-Edge through TM and trade it back to Gen 2.
Tested that it doesn't break gens 3-6 with Charmander with howl and body slam (gen 4 event, gen 3 TM).
This fixes incompatibilities that occur because of a baby Pokemon and
its evolution learning different egg moves. For example: Azumarill with
Encore and Perish Song. Only Azurill learns Encore, and only Marill
learns Perish Song.
This fix only affects gen 6, specifically Pentagon only formats like
VGC, so the bug still exists in gen 5 and below.
By moving the EV block from team-validator.js to rulesets.js’s Pokemon ruleset, the 510 EV limit is enforced in Balanced Hackmons. The other block regarding abilities is still in team-validator.
JSHint is now a fair bit stricter, and is now correctly checking
files in `mods/`.
The code has been fixed to match the new stricter standards.
JSHint has now caught its second actual bug: Gen 5 Pinap Berry
was Ice instead of Grass.
I used a hack to make the multiple declaration errors go away,
so all that remained in jsHint were actual errors, which I've
now mostly fixed.
All this linting ended up uncovering one actual bug: Uproar's
message not showing. It's a very minor bug in a move no one uses,
so I'm going to fold it into this commit.
- Fixed crash introduced in 99fad48d59
- Only females can pass down the hidden ability before gen 6
- Nidoran-M line and Volbeat are male only but can have a female parent
(Nidoran-F and Illumise, respectively)