asilano / multidraft

A multi-purpose draft server, interfacing with alextfish/multiverse
0 stars 1 forks source link

Generating a Modern Masters booster causes an error #5

Open asilano opened 9 years ago

asilano commented 9 years ago

It's probably trivial, I just don't want to forget.

asilano commented 9 years ago

Nothing's ever trivial.

Modern Masters failsbecause it always includes a foil; so there's a slot ["Foil Mythic Rare", "Foil Rare", "Foil Uncommon", "Foil Common"]. But there are no cards with rarity "Foil Common" etc, and we end up barfing.

I've fixed the barf (locally), meaning you'll instead get a blank card marked "Foil Common", or whatever. But should I be smart enough to spot that a) there are no matching cards; but b) the slot is of the form "Foil <normal rarity>", and strip the "Foil" part? If so, how general should I be (should I strip just "Foil", or any prefix? Should I match just Magic rarities, or any rarity that's in the set?)

And, if that's excessive, I should presumably pull MMA's JSON in locally and "fix" it; along with any others that have an explicit foil slot.

Opinions from @alextfish appreciated!