Event-only Pokemon now receive detailed event compatibility
error messages, like we do for event moves.
Event move/ability information is now fixed, so the validator now
explicitly specifies whether it's a move or ability that a move is
incompatible with.
Related: We no longer warn about event IV compatibility for level 100
Pokemon in Gen 7.
This introduces a new ability slot 'S' which corresponds to Battle
Bond only.
There's also a little bit of a hack to consider Battle Bond Greninja
Ash-Greninja for the purposes of move and event validation.
Alolan formes were inheriting moves from their base formes, which they
aren't supposed to do.
It turns out only two Pokemon with learnsets inherit from their base
forme, Rotom and Pumpkaboo (there's a Pumpkaboo forme with event moves).
This is the whitelist the client teambuilder uses, and the server is now
using it as well.
Tools will be renamed to Dex soon, which is why the code inside Tools
is calling itself "Dex" now, but right now we're just refactoring its
internal code and not officially renaming it yet.
In the meantime, Tools is now an ES6 Class.
A long-standing bug in learnset loading order (the one
test/chat-plugins/datasearch.js tests for) has finally been fixed, so
Tools.includeMods() is no longer necessary to accurately access modded
data.
Tools.mod has been split into Tools.mod(modid) and
Tools.format(format). The issue of Tools.mod being ambiguous about
whether it's passed a mod or a format hasn't been a _bug_ for a while,
but this is still more readable.
Other renames include:
Tools#isLoaded -> Tools#dataLoaded
Tools.includeMods() -> Tools.includeModData()
Tools.preloadMods() -> Tools.includeMods()
Tools.preloadedMods -> Tools.modsLoaded
Tools.moddedTools -> Tools.dexes
Do not just rename your calls of Tools.includeMods() to
Tools.includeModData(). With the learnset loading bug fixed, there's
no reason to use it unless you need direct access to
Tools.dexes[...].data for some reason (you don't, just use
Tools.mod(...).data)
Before, an options object containing properties and values to be used
was how decorated instances of the class would be created. This meant
the constructor could assign anything you feel like to `this`. Rather
than that, the constructor now assigns a strict set of values, and
methods are redefined in subclasses.
Basic unit tests were added to test if they could be written for after
the final refactor to fix the other memory leak here.
Only Blue, Red, and Yellow Floette can be found in the Friend Safari, so Orange and White are currently unable to have Symbiosis.
This is done here since there's no reason to add teambuilder slots for them when they won't be tiered separately anyway.
Unless we want to change the syntax for data tables like pokedex.js,
'constructor' will always exist as a table key.
These changes represent the bare minimum to prevent this from
causing too-weird behavior.