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)
I read something that says that V8 doesn't optimize any code inside
try-blocks. I hope this means that this change will lead to better-
performing code, but I suspect the difference will be relatively
small.
Teams are now sent using our new packTeam/unpackTeam code, rather
than JSON. This compresses teams from an average of 2000 bytes to
an average of 500 bytes.
This prevents a number of illegal combinations with hidden abilities by
checking if the Pokemon does have a hidden ability in the gen of a
source.
incompatibleHidden is used so that the compatibility error is shown to
the user, rather than the "can't learn" message.
If a Pokemon has no tier listed, it will be considered to be tiered
identically to its base forme, and affected by bans of its base
forme.
This applies to Keldeo, Meloetta, and Genesect formes.
The main process no longer does any JSON parsing/stringifying of
teams. The communication protocol with validator processes has
been changed from JSON to a string protocol delimited by pipes.
A variety of more minor optimizations have also been done.