taw / magic-search-engine

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

Filtering out "non-maindeckable" cards #217

Closed glaebhoerl closed 1 year ago

glaebhoerl commented 1 year ago

If I search for things using e.g. f:pauper, Stickers and Attractions are included. (Meanwhile Dungeons are not. I guess the logic behind this might be that Dungeons don't go into any deck, while the others can be part of your "attractions deck" and so on?)

In any case, I don't want to see any of them. Is there an easier way to filter them out than -t:stickers -t:attraction? Bonus points if it can also cover -is:draft, which I also basically never want to see. :)

taw commented 1 year ago

So to check legality situation:

I thought Dungeons are tokens not cards, and tokens don't have legality, but rules actually define them as cards. In any case, they are not part of deck construction.

Attractions are part of deck construction, have well defined legality, with 22/50 being legal in eternal formats, so that's a meaningful thing to include.

Stickers are part of deck construction, and are all currently legal in eternal format.

I see what you mean, but I'm not sure what would be a good query for it.

glaebhoerl commented 1 year ago

Brainstorming:

As a narrow solution to the "but is it part of main deck deck construction" question, an is:maindeck predicate seems like the easy answer. In a tournament-constructed context it'd filter out stickers and attractions; in a more general context maybe also Vanguard or Contraptions, and I'm not sure what else is out there (planes?). It's only mildly shorter than -t:stickers -t:attraction but at least it has a principled definition and might well expand to include more things in the future.

As a broader net (covering "I basically never want to see X" for any particular X, and beyond), are you averse to having a "default query" text field on the Settings page, the contents of which would get pre-loaded into the search field on the main page? (So that you can still edit/delete it.)

taw commented 1 year ago

I have "extra" flag that's calculated as (layout:vanguard or layout:planar or layout:scheme or t:conspiracy) which is used for skipping format legality checks and not really otherwise exposed. But that's not the same, as Stickers and some Attractions are Vintage-legal.

We could probably do is:maindeck if we can make a definite list. Would this be the whole list:

Then again, they can't go into sideboard either, so I'm not sure this is a good name.

glaebhoerl commented 1 year ago

t:contraption and it would seem t:hero as well (found by subtracting known types to see what was left, so if any are still missing they would be subtypes of the normal card types). https://mtg.fandom.com/wiki/Contraption https://mtg.fandom.com/wiki/Hero_(card_type)

Unfortunate that t=dungeon isn't perfect either because one has Undercity also in its subtype. t:hero has a similar situation with a false positive and subtypes :shrug:

taw commented 1 year ago

Right, let's get it done.

Is this the correct query, or is there some card that it gets wrong?

Here's the not: version

(Edited to include t:contraption)

(and I guess w:herospath and layout:dungeon work better than type checks for these two.)

axxroytovu commented 1 year ago

You missed contraptions

Is there any benefit to separating these into deck:maindeck? Then we could add other deck: types, including planechase, heros_path, attraction, sticker, contraption, learn, archenemy, etc.?

Edit: I just realized that deck is already being used, but my question still stands with some other keyword.

taw commented 1 year ago

We'd need to pick a different keyword, and wouldn't most of them already have very simple queries?

I should probably add alias for w:herospath, as that's simple but not obvious.

is:planar, is:dungeon, t:contraption, t:attraction, t:stickets, t:scheme etc.

glaebhoerl commented 1 year ago

Is this the correct query

Looks good to me.

taw commented 1 year ago

For added fun there's one non-Hero card with watermark herospath, at least according to mtgjson data.

taw commented 1 year ago

I added two queries and their negations (is:dungeon was already working):

Can you verify that everything is exactly right?

glaebhoerl commented 1 year ago

Thanks :)

I'm not any kind of authority on the subject but they do seem to match what's been discussed above as far as I can tell.

taw commented 1 year ago

OK, closing the ticket. Feel free to reopen if you find something wrong with the query.

taw commented 1 year ago

This is somewhat relevant, we now have decklimit= queries.

I think "non-maindeckable" cards maybe should have decklimit=0.