smogon / damage-calc

Pokemon games damage calculator
https://calc.pokemonshowdown.com
MIT License
396 stars 366 forks source link

Expose SETDEX in '@smogon/calc' npm package #622

Closed cameronangliss closed 5 months ago

cameronangliss commented 6 months ago

It would be useful for me to be able to access the SETDEXs for each generation so I could put the sets into the optional parameter when instantiating a Pokemon object. I saw that such a data structure exists in shared_controls.js. Would exposing that item in the @smogon/calc npm package be something people would be alright with?

thejetou commented 5 months ago

I'd prefer to not expose them in @smogon/calc because it's irrelevant to damage calculation and will just bloat up the bundle size. If you want the sets, you can write your own set importer (see import/set-import.ts) or fetch them from this repo (src/js/data/sets/*).

shrianshChari commented 5 months ago

I do believe that @pkmn/smogon provides APIs for looking at sets on the Smogon Dex, so that's probably also a good place to look.

cameronangliss commented 5 months ago

Ok, thanks!