PokemonTCG / pokemon-tcg-data

The data found within the Pokémon TCG API
416 stars 200 forks source link

Shiny Card Data #510

Open SamsTheNerd opened 7 months ago

SamsTheNerd commented 7 months ago

This has a list of all the shiny cards, as well as a little helper script for heuristically detecting shiny cards and updating the card data. The heuristics work well for most cards, but there's manual hardcoding for the cards that it doesn't detect, mostly xy era, but some newer stuff too.

I haven't updated the actual card data yet, there was some discussion in the discord about whether there should be a SHINY subtype or just a new field. It seems like the subtypes are currently just for properties explicitly indicated on the card itself, so shiny doesn't really fit that, but on the other hand it is a property that some cards have, and having a whole separate field for it seems a little silly. Currently the script doesn't update the card data, I'll add that in once we decide what format it should be in.

In the discord we were also talking about maintainability. It seems like newer cards have their shinyness indicated by their rarity, except for some which are illustration rares (in paldean fates for example, not sure about anywhere else), so if that continues I wouldn't think it'd be too hard to just add those few manually and let the script catch the rest. Should add them to the hardcodedshinylist.json. The current hardcodes come from this bulbapedia list. Also, not sure if there's a better place for this script to live than just a scripts folder, or if you all have any sort of automation set up otherwise that this should go with.

The script is just a node js file, run it with node shinyhunter.js, it takes an argument to tell it what command to do, if you give it no arguments or 'help', it'll list all the available commands. It has a preview command to pop open an html page with all the shiny cards, good for scanning through to make sure nothing gets added that shouldn't.

Also added some to the gitignore just to keep stuff from my environment out.