A web app with many utilities for the card game Scratch Wars made with Next.js.
- View cards by their UID (QR code) or name and type
- Fix broken QR codes by pasting their link (mostly from SWO)
- View chances for finding a certain card in a pack (based on the Scratch Wars API)
All api calls must be run on server side, because the Scratch Wars API does not support CORS. Also the stats for BattleFerda return a diffrent format than the other cards. Some cards are not supported by the API, so their stats are not available.
- Clone the repository
- Run
npm install
- Run
npm run dev
- Open http://localhost:3000
The app also includes some command line tools for easier development.
npm run getData
- Gets type data from the Scratch Wars API and saves it tosrc/data/raw/heroData.json
andsrc/data/raw/weaponData.json
npm run downloadImages
- Downloads all card images from the SWO links in the file The links are not for all cards, so some images will be missingnpm run getSwoData
- Scrapes SWO for card names and saves them tosrc/data/raw/heroNames.json
andsrc/data/raw/weaponNames.json
. Also saves their info and uid tosrc/data/raw/heroStatsCounts.json
andsrc/data/raw/weaponStatsCounts.json
npm run getCardStats
- Gets stats for all cards from the Scratch Wars API and saves them tosrc/data/raw/heroStats.json
andsrc/data/raw/weaponStats.json
. It uses the names fromsrc/data/raw/heroNames.json
andsrc/data/raw/weaponNames.json
and saves the verified working names tosrc/data/raw/heroWorkingNames.json
andsrc/data/raw/weaponWorkingNames.json
npm run parseStats
- Parses the data fromsrc/data/raw/heroStats.json
andsrc/data/raw/weaponStats.json
and saves it tosrc/data/cardStats.json
- Card variants
- Cards I dont own (Young Hero, Apple Hunter etc.)
- Handle long names (Esterminator)
for stats:
- Bojový ferda (BattleFerda)
- Krotitel jablek (WilhelmTell)
- Mladý Dobrodruh (FuriousScout)
- Rudý Overgamer (Overgamer_red)
- Udatný hoplita (Greek)
- Vladař z učebnic (Czech_Vaclav)
- Wedrytíř (Wedry)
- Opičí černokněžník (Boss_MifMif)
- Prašivý troll (Boss_Troll)
- Protivná průzkumnice (Boss_Rachael)
for uid:
- Malý mechatronik (Bonefixer)