this project downloads json data and then finds a random legendary creature and shows it to the user. im also utilizing my own json parser. yay.
you're gonna need lua and a couple libraries. here's how:
mac (homebrew):
brew install lualinux (apt):
sudo apt install lua5.4windows:
grab it from the lua website or use luabinaries. good luck.
you need luarocks to install the dependencies. if you used homebrew it probably came with lua, but if not:
brew install luarocksor check the luarocks site.
luarocks install luasocket
luarocks install luasecthats it. thats all you need.
lua main.luathe first time you run it, it'll download ~127MB of card data from mtgjson. this takes a minute. after that it parses everything and caches the legendary creatures so future runs are basically instant.
- downloads the full card database from mtgjson
- parses it with a custom json parser (yes i wrote my own. yes it works.)
- finds all legendary creatures
- caches them so you dont have to wait ever again
- picks a random one and shows you your new commander
- mtgjson for the data
