3 ms·
Love this use case, makes me want to implement something similar for Magic the Gathering. I love using scryfall, but I think a more cli first approach with desc
by admeliora01 6mo ago
Love this use case, makes me want to implement something similar for Magic the Gathering. I love using scryfall, but I think a more cli first approach with descriptive rules would suffice much better for brewing in eternal formats like Commander with ever growing card pools. I mostly work off of keyword search.
- alexpetros 6mo agoI'm not as familiar with Magic, but I've always been curious if that community has tooling at a comparable level of maturity to Pokemon Showdown.
- LelouBil 6mo agoFor Yu-Gi-Oh! You have ygopro
- deosjr 6mo agoThis might be your jam. I should revisit this, most of it is unimplemented. But the parsing part was interesting, since MTG has such a codified language for explaining the rules. My idea here was to take a card's rules text from the official API and parse it into smth that can be used in the game, so you could keep up with new sets with implementation. The weird rule-breaking edge cases will always fail, but a large set of design space can fit, I think. See https://github.com/deosjr/pmtg/blob/master/parse.pl https://github.com/deosjr/pmtg/blob/master/parse.pl
- YeGoblynQueenne 6mo agoHey, that's cool! I had the same idea too: https://github.com/stassa/Gleemin https://github.com/stassa/Gleemin Although the code is nigh-on unreadable now ^_^@ >> The weird rule-breaking edge cases will always fail, but a large set of design space can fit, I think. Well, in that case you just update the parser or the rules engine. That's precisely how M:tG Arena works and they 've managed to keep up with new sets at a pace never before seen in official M:tG engines. There was a time when writing an M:tG parser was considered impossible [1] and M:tG engines, both official and community ones, each had their own little DSL that they had to manually translate ability text into which could take months especially if the engine also had to be updated to use the new rules in a set. Eventually someone in Wizards realised this is just dumb and they did it the way you go about it above. ______________ [1] Source: my conversations with the folks behind Forge and other community-made M:tG engines.
- deosjr 5mo agoWow that is cool, thanks for that!
- jamilton 5mo agoSomewhat related, check out https://github.com/wordbots/wordbots-parser https://github.com/wordbots/wordbots-parser, a digital card game where you write the cards and the engine parses them to determine what they do. It's fun to mess around with.
- LelouBil 6mo agoYour comment makes me want to do this for Yu-Gi-Oh!