Closed doshidak closed 1 year ago
Aha, found the problem.
The way Showdown's Teambuilder pulls Icicle Crash is not through Weavile (where it doesn't exist, as previously discovered), but through its previous evolution as Sneasel, where Icicle Crash is defined as BattleTeambuilderTable.learnsets.sneasel.iciclecrash
.
Specifically, the Teambuilder calls upon the DexSearch
class, which eventually calls the protected canLearn()
class function. canLearn()
seems to perform a while
loop to obtain all of the learnsets of the current Pokémon and any of its other formes' learnsets via:
const next = lsetSpecies.battleOnly || lsetSpecies.changesFrom || lsetSpecies.prevo;
In the case of Weavile, Sneasel is defined in the prevo
property.
Fix is to perform a similar loop to make sure we got everything in getPokemonLearnset()
.
Also, kinda solved the mystery of p
, q
, and g
markers in BattleTeambuilderTable.learnsets
:
p
is applied to the gen search when the gen is exactly 6,q
is applied when the gen is exactly 7, andg
is applied when the gen is exactly 8.For these markers to apply, the battle format must include one of the following:
'vgc'
'battlespot'
'battlestadium'
'battlefestival'
As for what the letters mean, no idea. My best guess is that g
is for Galar, but can't really wrap my head around what p
(Gen 6: XY/ORAS) and q
(Gen 7: SM/LGPE) stand for.
Icicle Crash seems to be missing in Weavile's learnset. Teambuilder has no apparent issue pulling this data, so may have to relook how Showdown pulls the learnsets (via
BattleTeambuilderTable
) in the Teambuilder's code.