smogon / pokemon-showdown

Pokémon battle simulator.
https://pokemonshowdown.com
MIT License
4.77k stars 2.79k forks source link

How exactly does Learnsets.ts work? #6822

Closed Artrix9095 closed 1 year ago

Artrix9095 commented 4 years ago

Looking at learnsets.ts i fail to understand how it works, as in how each move is given to each pokemon on a specific level. example, how does 8L28 work? i dont see how it uses the level to find out if the move is learnable. or how 8M does either. can someone please help me understand?

PartMan7 commented 4 years ago

8L28 means it learns it at Lv28 in Gen8 by level-up.

Zarel commented 4 years ago

If you use Visual Studio Code and you cmd+click (Mac) or ctrl+click (Windows) LearnsetData, it'll tell you. I'll add a comment to make it clearer how to get to its documentation at some point; I'll leave this issue open for that.

Zarel commented 4 years ago

Wait, are you looking for level-up move validation specifically? That's here:

https://github.com/smogon/pokemon-showdown/blob/c444036f85d7f6a40b8c7f06ca94153b28894d0d/sim/team-validator.ts#L1844-L1860