Conversation
Its relatively dirty and could use a healthy dose of refactoring, but getting it up quickly to be able to push innistrad out. Things to note: functions to parse for flip cards is relatively slow since its evaluating the entire page. The functions to determined the flipped tag and the flipped mtgid are very similar. need refactoring. Commented the sanity test for planeswalker loyalty since there is no predefined loyalty on the flipped version of the card (only Garruk, the Veil-Cursed has this quality for now)
|
Thanks for your updates; I will look at them in a few days, right now I am kinda busy with a few things (work and otherwise). But, yeah, Innistrad's double-faced cards are an unsolved problem at the moment. Much like flip cards and split cards, although those aren't exactly the same. They all raise the question, "what is a card exactly?". It makes sense to treat the sides/parts as separate cards, but at the same time they're the same physical card. We need a reliable/consistent way to express this in XML (and the query engines that use the XML, like my magicquery project, also here on github). |
|
My rule of thumb so far is "follow the multiverse id and the name". The way we're using the ripper is that after we've got its xml, we do a conversion to our own xml format. There's a few reasons for this. I wrote my own parser/ripper a bit back, and ran it against yours (as well as several others).. yours was easily the most complete against my own (and much more cleanly written), however, there's a few pieces of information (like color) that are better served in our version of the xml. (Its not worse, just didn't serve our purposes as well) Anyway, we have cards, and printings. Cards are based on the name (so split cards, flip cards, etc.. have two "cards" usually") Everything that can be identified by a name/title is a "Card". Everything that can be identified by a multiverseid is a "Printing". The only exception to this is, what I believe is an error on wizards side where they have some split cards that use the same multiverseid. In these cases (and I see you're doing something similar) you have a couple choices: make up your own id space that you know wizards is not likely to take for those very rare cases. There's other options I can discuss with you offline but I'd rather not post here. |
Its relatively dirty and could use a healthy dose of refactoring, but
getting it up quickly to be able to push innistrad out.
Things to note:
functions to parse for flip cards is relatively slow since its evaluating
the entire page.
The functions to determined the flipped tag and the
flipped mtgid are very similar. need refactoring.
Commented the sanity test for planeswalker loyalty since there is no
predefined loyalty on the flipped version of the card (only Garruk,
the Veil-Cursed has this quality for now)