The mega forme can now be banned/tiered separately. The old-style mega
stone bans are still supported, but megas can now also be tiered,
even below their base forme.
Any Pokemon with only one Ability in Gen 3 can get the new Gen 4 one by
evolving. Such as, Extreme Speed Zigzagoon has Pickup only in Gen 3 but
its evolution, Linoone, can have either Pickup or Gluttony in Gen 4 or
higher.
We now ban boosting both Speed and non-Speed with Baton Pass.
To make this simpler, we introduce changeSet as separate from
validateSet, which allows us to pass setHas to validateSet
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).