Skip to content

A first attempt at flip cards.#1

Open
dnmcgoy wants to merge 1 commit intozephyrfalcon:masterfrom
dnmcgoy:master
Open

A first attempt at flip cards.#1
dnmcgoy wants to merge 1 commit intozephyrfalcon:masterfrom
dnmcgoy:master

Conversation

@dnmcgoy
Copy link
Copy Markdown

@dnmcgoy dnmcgoy commented Sep 28, 2011

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)

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)
@zephyrfalcon
Copy link
Copy Markdown
Owner

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).

@dnmcgoy
Copy link
Copy Markdown
Author

dnmcgoy commented Sep 29, 2011

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.
Just recently I've determined that those printings need to have a tag that references the multiverseid of its "flipped/split" counterpart in order to make our database more efficient. I believe if you follow the multiverse == printing, name == card rule, you should be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants