• Welcome to iMtG Server: Gathering.
 

Database filter

Started by MarduArrow, April 17, 2017, 11:36:04 AM

Previous topic - Next topic

MarduArrow

So, what we currently have allows us to filter by colour, as a commander player I would like to be able to filter by colour identity as well. For example  {Alesha, Who Smiles at Death} shows up when the filter is set to {R} only, but her colour identity is {R}{W}{B} so with a colour identity filter she wouldn't show up on a {R} only filter.

On a second, less important note is it possible to have last print filter on as a default?

reezel

I love the idea of a color identity filter.

I would have last print to be on by default. I almost never use that filter.

On the idea of color and filtering, there's currently some issues with filtering for colorless cards. If you select no color and you filter only selected, you get the colorless cards except for the ones with (C) in their casting cost. Then if you select the (C) option and filter by only that you get only cards with (C) in their casting cost. There's no way to get all cards that are colorless.

Another issue is that when filtering by blue, you don't get cards like {Ancestral Vision}. The card doesn't have a color in it's casting cost but does have the blue color indicator so it should be treated as a blue card.

reezel

Any thoughts from Piotr on these things?

Piotr

I think we will need to agree what "color identity" is so we can translate it to Predicate filter.

MarduArrow

How about something directly from the rules for that?

903.4. The Commander variant uses color identity to determine what cards can be in a deck with a certain commander. The color identity of a card is the color or colors of any mana symbols in that card's mana cost or rules text, plus any colors defined by its characteristic-defining abilities (see rule 604.3) or color indicator (see rule 204). #
Example: Bosh, Iron Golem is a legendary artifact creature with mana cost {8} and the ability "{3}{R}, Sacrifice an artifact: Bosh, Iron Golem deals damage equal to the sacrificed artifact's converted mana cost to target creature or player." Bosh's color identity is red.

reezel

Quote from: MarduArrow on April 26, 2017, 09:05:02 AM
How about something directly from the rules for that?

903.4. The Commander variant uses color identity to determine what cards can be in a deck with a certain commander. The color identity of a card is the color or colors of any mana symbols in that card's mana cost or rules text, plus any colors defined by its characteristic-defining abilities (see rule 604.3) or color indicator (see rule 204). #
Example: Bosh, Iron Golem is a legendary artifact creature with mana cost {8} and the ability "{3}{R}, Sacrifice an artifact: Bosh, Iron Golem deals damage equal to the sacrificed artifact's converted mana cost to target creature or player." Bosh's color identity is red.
Yeah, color identity already has a very real definition as pointed out above.

I still think there are issues with the current color setup as is. It's ignoring the color indicator of a card.

Piotr

Quote from: MarduArrow on April 26, 2017, 09:05:02 AM
Example: Bosh, Iron Golem is a legendary artifact creature with mana cost {8} and the ability "{3}{R}, Sacrifice an artifact: Bosh, Iron Golem deals damage equal to the sacrificed artifact's converted mana cost to target creature or player." Bosh's color identity is red.

You can do it already in all the versions of iMtG which support Predicate, so I guess 3+ years back from now?

Try this as your Predicate and keep it in your Bookmarks:

not card.cost contains[cd] 'U' and not card.text contains[cd] '{U}' and not card.cost contains[cd] 'B' and not card.text contains[cd] '{B}' and not card.cost contains[cd] 'G' and not card.text contains[cd] '{G}' and not card.cost contains[cd] 'W' and not card.text contains[cd] '{W}'

Piotr

Quote from: reezel on April 26, 2017, 09:42:36 AM
I still think there are issues with the current color setup as is. It's ignoring the color indicator of a card.

Could I have an example, please?

reezel

http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=393818

If you go to a set that has Ancestral Vision in it and then filter by blue cards, Ancestral Vision is not in the list. However, it has a blue color indicator, meaning it's a blue spell, not a colorless spell. So it should be treated as a blue spell in every regard.

reezel

Quote from: Piotr on April 27, 2017, 04:06:45 AM
Quote from: MarduArrow on April 26, 2017, 09:05:02 AM
Example: Bosh, Iron Golem is a legendary artifact creature with mana cost {8} and the ability "{3}{R}, Sacrifice an artifact: Bosh, Iron Golem deals damage equal to the sacrificed artifact's converted mana cost to target creature or player." Bosh's color identity is red.

You can do it already in all the versions of iMtG which support Predicate, so I guess 3+ years back from now?

Try this as your Predicate and keep it in your Bookmarks:

not card.cost contains[cd] 'U' and not card.text contains[cd] '{U}' and not card.cost contains[cd] 'B' and not card.text contains[cd] '{B}' and not card.cost contains[cd] 'G' and not card.text contains[cd] '{G}' and not card.cost contains[cd] 'W' and not card.text contains[cd] '{W}'
Does this also take all hybrid costs into account?

I understand that this is something you can do by predicate, but that's pretty unwieldy. It would be nice if you added a slider to the color area to search for color identity instead of just spell color. Also, this doesn't address the issue with colorless spells that I brought up as well where you can't do a simple search for colorless spells because they are mutually exclusive in the search by items with no color in their cost and items with {C} in their cost

reezel

Also, on the topic of filtering, currently the predicate text box cuts off text on the right of the screen, making it hard to work in there.

Piotr

Quote from: reezel on April 27, 2017, 09:47:15 AM
Also, on the topic of filtering, currently the predicate text box cuts off text on the right of the screen, making it hard to work in there.

Yup noticed this too, thanks! Will be fixed in next version hopefully.

As for 'difficult things are possible but difficult to accomplish - and you can bookmark them for the future reuse', yes this is true.

Piotr

To filter by color identity we can use card.colour field as per description in Wiki. There could be errors in the database data which is why I asked for specific examples, thanks!