Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sealed Support #82

Closed
40 of 44 tasks
taw opened this issue May 6, 2018 · 21 comments
Closed
40 of 44 tasks

Sealed Support #82

taw opened this issue May 6, 2018 · 21 comments

Comments

@taw
Copy link
Owner

taw commented May 6, 2018

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:

  • Time Spiral
  • Planar Chaos
  • Future Sight
  • Innistrad
  • Dark Ascension
  • Vintage Masters
  • Shadows over Innistrad
  • Eldritch Moon
  • M19
  • Magic: The Gathering—Conspiracy
  • Conspiracy: Take the Crown
  • Unstable
  • Battlebond

Other:

  • support sets with Planeswalker Decks (that is with cards that are part of the set, but not in boosters)
  • support sets with Masterpieces
  • is:front is:back / is:primary is:secondary queries. They differ as aftermath/flip is front secondary. DFC is back secondary. Split and normal cards are front primary.
  • introduce concept of PhysicalCard, right now it just gives left side of split card etc., won't tell you which card is foil - it will be useful for constructed decks as well
  • make information necessary for is:booster part of the indexer, and the engine
  • is:booster - card is in booster product, and not one of the extras (like planeswalker deck, or
    Firesong and Sunspeaker)
  • probably CardSheet full of PhysicalCard objects to encapsulate some of that stuff
  • command line frontend is primarily for development, not for end user, but maybe clean it up a bit
  • basic support for old sets (pre-Mirage), ignoring actual printing process
  • move foil and masterpiece logic to CardSheet
  • CardSheet#probability(card)
  • Pack needs same recursive structure as CardSheet, and #probability(list_of_cards)
  • support Dragon's Maze land slot
  • support Unhinged (Super Secret Tech needs special handling)
  • support Fate Reforged land slot
  • support God Packs
  • support whatever Time Spiral block was doing
  • is:draft support (it happens to correspond with CNS sheet)
  • frontend should support opening packs from multiple sets (at least three)
  • frontend should have nice (select2 probably) interface for selecting a set
  • indexer provides exact print sheet information for 8 old sets, we should use that
  • support sets with special sheets (first Innistrad, second Innistrad, Conspiracy draft-matters)
  • support Unstable (contraptions, alt art)
  • support any known variation from printed rarities, like Unstable variants (each of N-way variants appears only 1/N as often; presumably Brothers Yamazaki and other alt arts would work the same way)
  • add web frontend for it, obviously (this will overlap with whichever solution we have for precons, user-uploaded decks etc.)
  • maybe move more of the calculations to indexer, to make it easier for custom magic sets
  • link from set page to Sealed

Nice to haves:

  • Dominaria apparently has "guaranteed legendary", but no separate slot. Without any tricks we get legendary in 81% of packs, and EV 1.34 legendaries per pack
  • old sets have special sheets with multiple rarities - they did crazy things like two sheets with mixed rarities, basic lands on rare sheet etc. MVP is to fake it, but it would be nice to support it more accurately.
  • is:foil / is:nonfoil - sort of incidental, but Sealed simulator forces getting this information, so might as well expose it. A card can match both (like M10 Lightning Bolt is available both foil and nonfoil, as is vast majority of cards), so these names are a it awkward
  • to quote Maro about packs: To match our collation, there must be at least one common of every color. Also, don't make more than five cards of the same color combination. (You can't have more than five mono-green cards or five blue-red cards.) The one exception is colorless cards if you have chosen a set that has a high as-fan of colorless cards."

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

Some sources:

Probably unfixable issues:

  • we don't have any collation information, I just assume you never get double of same nonfoil card
  • we don't really now foil distribution, exact masterpiece chances etc.
  • old sets have mixed sheets, we have information like U3 vs U2, C5 vs C4 for some of them, so we could incorporate it, but I don't think we know it for them all
  • we don't have information which 101st common was half-frequency
@fenhl
Copy link
Contributor

fenhl commented May 9, 2018

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:

  • SOI has about 1.125 DFCs per booster (always 1, sometimes 2).
  • 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.
  • 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.
  • CN2 has a special slot for conspiracies. Other draft-matters cards appear within the normal rarity-based slots.
  • 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.
  • 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.
  • 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.
  • Masters sets have a foil in every pack, replacing the basic land slot.
  • VMA's basic land slot is replaced with either a Power Nine card or a foil of any card in the set. From an official article:

    You will open a Power Nine card about once in 53 packs. A specific Power Nine card is about twice as rare as a specific mythic rare.

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
Copy link
Owner Author

taw commented May 9, 2018

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

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

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

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

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

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

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

Already done. Foil rarities petty much guessed.

  • 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
Copy link
Contributor

fenhl commented May 9, 2018

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:

  • In ISD/DKA/SOI/EMN, 3 out of 4 packs replace the basic land with a checklist card. (In ORI/XLN/RIX, the checklist is in the marketing card slot.)

@taw
Copy link
Owner Author

taw commented May 9, 2018

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
Copy link
Contributor

fenhl commented May 9, 2018

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

@taw
Copy link
Owner Author

taw commented May 13, 2018

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
Copy link
Contributor

fenhl commented May 13, 2018

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
Copy link
Owner Author

taw commented May 13, 2018

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'm totally guessing how foils work. I'm assuming 1/4 of packs contain a foil, it always replaces common slot, all cards from set get to be foiled (including DFCs, Timeshifted cards, basics for sets which don't otherwise put them there, conspiracies, and all the other weirdness), and some ratios between them that shouldn't be totally crazy. I don't like it, but I don't know we can do any better. Someone should at least check my assumptions and numbers if there's anything crazy there.
  • I have no idea how basics were included in old sets. From certain point of view they get own sheet, but what about before? I know for alpha they were printed on all rarity sheets, but that was just a one off as far as I can tell. I assume they were by default printed on common sheet and basically worked as commons. Is that correct, or even sensible? The only set I know for which it's explicitly said its boosters didn't contain basics (but they were in fat packs etc.) was Fate Reforged. There's claims that sets had land sheet as far back as Ice Age, but then only Shards of Alara got dedicated basic slot, so wtf seriously.
  • as intersection of these issues, foil basics.

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
Copy link
Owner Author

taw commented May 15, 2018

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
Copy link
Owner Author

taw commented May 28, 2018

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
Copy link
Owner Author

taw commented May 29, 2018

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
Copy link
Contributor

fenhl commented May 29, 2018

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
Copy link
Owner Author

taw commented May 29, 2018

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
Copy link
Owner Author

taw commented Jun 2, 2018

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:

  • 36 cards on legendary rare sheet (8 mythics, 14 rares)
  • 85 cards on regular rare sheet (7 mythics, 39 rares)
  • 20 cards on legendary uncommon sheet
  • 60 cards on regular uncommon sheet

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
Copy link
Owner Author

taw commented Jun 5, 2018

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:

  • probabilities add up to 1
  • legend rares (LR) are as as frequent as normal rares (NR)
  • legend uncommons (LU) are as frequent as normal uncommons (NU)
  • no-legend packs (NR NU NU NU) never happen

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
Copy link
Contributor

fenhl commented Jun 9, 2018

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

@taw
Copy link
Owner Author

taw commented Jun 10, 2018

Right, so adding to the checklist:

  • add some query for full art lands
  • BFZ packs should only contain full-art basics. Similarly, OGW packs should only contain full-art Wastes.

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

@taw
Copy link
Owner Author

taw commented Jun 10, 2018

All these are now excluded from Sealed

@taw
Copy link
Owner Author

taw commented Jun 19, 2018

Might be relevant

@taw
Copy link
Owner Author

taw commented Jul 10, 2018

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 taw mentioned this issue Aug 3, 2018
25 tasks
@taw
Copy link
Owner Author

taw commented Aug 3, 2018

Closing as all issues moved to #106

@taw taw closed this as completed Aug 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants