KingSupernova31 / RulesGuru

The source for rulesguru.net, a resource for Magic judges.
https://rulesguru.net/
8 stars 6 forks source link

Fix keyword parsing #18

Open KingSupernova31 opened 3 years ago

KingSupernova31 commented 3 years ago

MTGJSON's keyword parsing is horrifically broken (see here), so we need to implement our own parser. A partial implementation of this is here.

Alternatively, if someone can convince Scryfall or MTGJSON to fix their parser, we don't need to solve this ourselves.

KingSupernova31 commented 1 year ago

MTGJSON apparently now thinks that "Food" is a keyword.

KingSupernova31 commented 9 months ago

The "can participate in combat" preset has a hacky fix for landwalk variants since they don't have keyword=landwalk.

KingSupernova31 commented 9 months ago

Maybe we can also include all other types of abilities, for easier parsing. An array with objects of either "keywordAbility" or "customAbility". This would fix issues like thinking Paradise Mantle can be tapped for mana. Could build on itemfive's parsing to make them all searchable.

Could also add a way to search keyword rules text, so that templates don't need to call out keywords individually.