taw / magic-search-engine

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

Theme boosters #221

Closed axxroytovu closed 1 year ago

axxroytovu commented 1 year ago

There are almost no resources on the distributions for theme boosters, but this is the best I was able to determine from watching some pack openings. Is this OK to support even with limited knowledge?

taw commented 1 year ago

If you have any links or them in comments, but sure, we can do our best approximation

taw commented 1 year ago

Also I'd use -theme- not -thm-, thm looks like a set code

taw commented 1 year ago

That's 87 more booster types. This is great, but at some point I'll need to really optimize this, or add some precomputed booster cache, as the server is taking longer and longer to boot up.

I already made e: queries a lot faster (previously it was checking all sets as you can do something like e:"Commander"; I short circuited it for set codes), and that made a huge difference, but it's still kinda slow.

But that's just a note for me, feel free to drop as many booster types as you want.

taw commented 1 year ago

I have to disable 6 of the boosters, as they were getting into infinite loop while trying to generate random packs.

It would be nice to get better debugging tools for it.

axxroytovu commented 1 year ago

Which boosters? I thought I caught that.

taw commented 1 year ago

It's afr-theme-dungeons.yaml iko-theme-b.yaml iko-theme-g.yaml iko-theme-r.yaml iko-theme-u.yaml iko-theme-w.yaml which all want more cards than they can get.

This was supposed to raise exception, but I didn't get correct code for it:

Error building iko/uncommon: No duplicates support for any

Now that I fixed error check, it at least crashes instead of going into infinite loop.

I guess I'll need to implement duplicates: true support for any.

taw commented 1 year ago

Enabled again.

axxroytovu commented 1 year ago

Weird. I wonder why those crashed and not the others. Glad it got fixed.

taw commented 1 year ago

There's 11 possible uncommons, and pack definition wants 12 of them, so it's pretty obvious. IKO has a lot of multicolored uncommons, so it was probably reducing the number to below the limit.

https://mtg.wtf/pack/iko-theme-b