taw / magic-search-engine

Search engine for Magic cards
MIT License
47 stars 19 forks source link

Sealed Support #82

Closed taw closed 6 years ago

taw commented 6 years ago

There's an obvious feature which is currently missing, that is any concept of packs. I added partial support for it, so you can use scripts like:

./bin/open_packs 6xM11 - open 6 packs of Magic 11 ./bin/open_packs NPH MBS SOM - open one pack each from Scars of Mirrodin block ./bin/open_packs --list - list currently supported packs ./bin/open_packs --unsupported - list of unsupported packs

Right now it supports 117/120 sets with packs (3 to go), unfortunately missing a lot of the new ones.

Final missing sets:

Other:

Nice to haves:

We don't have exact foil distribution information, stuff like 101st uncommon

Some sources:

Probably unfixable issues:

fenhl commented 6 years ago

I haven't looked at your code so I apologize if you know some of this already, but here are some notes that I've made over time regarding booster pack layout:

Also, I really like the idea of is:foil and is:nonfoil terms, though it should be noted that is:nonfoil should not be the same as not:foil since some printings (e.g. the C17 printing of Kess, Dissident Mage) are only available in foil and thus should be not:nonfoil.

taw commented 6 years ago

I left those complex sets for last (14 still to do).

  • [x] SOI has about 1.125 DFCs per booster (always 1, sometimes 2).

I didn't add any sets with DFC sheet yet.

ISD/DKA has one slot for DFCs, with unknown rarity ratio.

SOI/EMN has two different DFC slots, not sure how that works.

  • [ ] Unlike Wastes, old cards with multiple images like Brothers Yamazaki or High Tide (FEM) appear at the same total rarity as other cards, i.e. each individual version appears less often.

Not currently implemented, but on todo list for Unstable etc.

  • [x] ZEN had Priceless Treasures, replacing the basic land and appearing roughly every 720–750 packs. Some cards appear much more frequently than others, with the rarest card being Black Lotus, though exact distribution and whether the wiki article is missing any cards is unknown.

That was only in one print run, and there's no real data, so I'll just drop this completely.

  • [ ] CN2 has a special slot for conspiracies. Other draft-matters cards appear within the normal rarity-based slots.

Not implemented yet.

  • [x] Contrary to popular belief, the chance of a mythic rare in a pack is not exactly 1/8 for all sets. Instead, each individual rare appears twice as often as each individual mythic rare, and the total chance is derived from that.

Already done.

  • [x] The ratios of rarities of foil cards appears to be skewed towards the rare side of the distribution in comparison to the well-known ratios for nonfoil cards.

I googled countless claims about it, and picked some plausible numbers that do that. I'm pretty sure they're not very accurate.

There's photos of foil sheet with the usual 2 copies of each rare / 1 copy of each mythic, and total foil drop rate is printed on each pack, but rare:uncommon:common:basic ratio is unknown.

  • [x] JOU packs have a chance to be God Packs (one of each of the 15 Theros Gods, plus a marketing card as usual), appearing roughly every 4320 packs.

Totally forgot about this one, will do.

  • [x] Masters sets have a foil in every pack, replacing the basic land slot.

Already done. Foil rarities petty much guessed.

  • [x] VMA's basic land slot is replaced with either a Power Nine card or a foil of any card in the set.

OK, found a source with numbers

fenhl commented 6 years ago

SOI/EMN has two different DFC slots, not sure how that works.

In all packs, one of the common slots is replaced with a common or uncommon DFC. In 1 out of 8 packs, a second common slot is replaced with a rare or mythic DFC. Oh, and one thing I forgot:

taw commented 6 years ago

I completely skipped the "checklist replaces basic" part since we don't have checklists, tokens, marketing cards etc., and it makes no difference to Limited experience anyway. Maybe something to consider much later.

fenhl commented 6 years ago

That makes sense, especially since I'm now finding conflicting info about whether DKA had checklists in the basic or marketing slot.

taw commented 6 years ago

Do you have any source on that 4320 God Pack frequency? And these are not foils, right?

I put it in, but number of unsourced assumptions I'm making, especially about foils, is really high.

fenhl commented 6 years ago

I wrote down this Reddit comment as the source. It's just the word of one single person who claims to work at an LGS but I haven't found any other numbers with better sources.

taw commented 6 years ago

Well, exact God Pack ratio doesn't affect things much.

So the backend is quite close to done (8 sets left, of course the 8 most complex ones), leaving just two big problems:

I'll put some simple frontend for that. Proper Sealed simulator / deck builder could get really advanced, but it's probably fine to just do something real basic for now.

taw commented 6 years ago

I'm not sure I buy the idea of 2 DFC sheets for SOI.

That would be 15 card sheet for rares/mythics (3+62), and presumably 28 or 32 card sheet (20+42 or 20+4*3) for commons/uncommons. These are really weird sizes.

WotC officially only says is that there's "as-fan of about 1.125".

Wiki says it replaces common. Maro says it replaces uncommon, but he's been wrong about these issues a lot.

There's probably something really weird going on here.

Of course it's totally fine for us to just use an approximation for now (or forever, those issues rare get resolved).

taw commented 6 years ago

Very simple Sealed is now online, right now it just prints unformatted list of cards, so obviously needs some sort of real UI.

There's still a bunch of backend issues (Conspiracy sets, Unstable, and Battlebond not supported; Dominaria guaranteed legend per pack not implemented; alt art not balanced properly etc.), and backend performance is a bit weak. I'd say backend is about 90% ready.

taw commented 6 years ago

Now displays cards, even does foil effect.

I'm a bit lost what kind of interface would be best here. Something like MTGO Limited deck builder? Something completely different?

If anyone wants to open custom packs on loreseeker, PackFactory has a big switch statement which set follows which rules, so just find closest matching set and add its code there (it's not ideal place, that data sort of belongs in mtgjson or indexing time patch). Right now there are better programs for that, but hopefully we'll make this UI good.

fenhl commented 6 years ago

Not familiar with MTGO but maybe this could be integrated with the decklist feature somehow?

I've already implemented pack generation logic for the custom sets, will pull now and see how well it works.

taw commented 6 years ago

I could make Sealed pools use current decklist viewer for now. I don't think it would be that great.

As for decklist viewer, the one saffron olive uses is so pretty I really want to give it a try, not sure how functional it would be really.

taw commented 6 years ago

According to maro's podcast (Dominaria part 3), Dominaria packs don't have guaranteed legendary, they have guaranteed legendary creature specifically. That makes numbers work a lot better as there:

That's somewhat more sensible than previous 63/58/22/58 numbers - at least for uncommons. I still need to do a bit of math to make sure it works with this sheet model.

So "Legendary Enchantment - Aura" does not count. I wonder if there's a way to make rare/mythic sheet work a bit better?

taw commented 6 years ago

So "legend" here means "legendary creature", "normal" means everything else.

Dominaria packs can have 8 kinds - 0-3 legend uncommons, times 0-1 legend rares. There are four hard constraints:

I did the math, and implemented the simplest possible model, where packs with multiple legend uncommons never happen. That yields just one combination of weights.

That's not ideal, as in fully random model 9/64 packs would have two legend uncommons, and 1/64 would have three. I suspect Wizards collation would try to avoid that. Anyone knows (video evidence or something) if multiple uncommon legend packs are a thing? Or if my assumptions are wrong?

fenhl commented 6 years ago

BFZ packs should only contain full-art basics. Similarly, OGW packs should only contain full-art Wastes.

taw commented 6 years ago

Right, so adding to the checklist:

So many things to do before even getting to the UI.

taw commented 6 years ago

All these are now excluded from Sealed

taw commented 6 years ago

Might be relevant

taw commented 6 years ago

After watching too many box opening videos, it's clear that in CNS foil draft-matters card go into draft-matters slot, not regular foil slot.

Example

taw commented 6 years ago

Closing as all issues moved to https://github.com/taw/magic-search-engine/issues/106