I'm really enjoying the new filtering system, it makes the shop and the deck editor so much easier to use.
Could it be possible to still add filtering by subtype, for example when you are building a goblin deck you could see a list of all the goblin creature cards easily? I dont mean a huge list where you could select all the different subtypes but a possibility to type in the subtype by yourself. Or filtering by name of the card where you could type any part of the name, for example "raging" would find both "Raging Goblin" and "Raging Gorilla" whereas "rag" would find both of those and "Primal Rage" as well. To take this idea even further, it would also be nice to be able to save these filters by your own keywords so you would not have to type them again every time.
In any case, I was wishing for something like the filter system for a long time. Great job!
Filter suggestions
Re: Filter suggestions
The ideas you mention seem doable except finding "Primal Rage" based on "rag".
We can easily find cards that begin with "rag", but not ones that contain "rag".
The cards database is a simple hash and doing full text search would simply kill the performance.
Building an index is also out of the question unless we switch to something like SQLLite which is not going to happen in the months to come.
Edit: and I +1 the idea of searching by subtypes. I even think a list would be doable...
We can easily find cards that begin with "rag", but not ones that contain "rag".
The cards database is a simple hash and doing full text search would simply kill the performance.
Building an index is also out of the question unless we switch to something like SQLLite which is not going to happen in the months to come.
Edit: and I +1 the idea of searching by subtypes. I even think a list would be doable...
Re: Filter suggestions
Subtypes are a good idea, I'm on it. I think a list is actually preferable (it presents all available options so I can learn about new subtypes), so that's what I'll be doing.
Re: Filter suggestions
Since r1823, type= and subtype= lines of all cards should be correct (i.e. there are no supertypes or co-types stuffed into the subtype= line, which was necessary for a while because the parser wouldn't recognize them otherwise). This means:
- We know all types (see official rules)
- Anything that appears in a type= line and is not a type, is a supertype
- Anything that appears in a subtype= line is a subtype of at least one of the types mentioned in the type= line
With this information, we could map subtypes to types purely based on how they occur in the data (i.e. there's no need for external subtype lists or mappings). This could be useful for implementing Shapeshifters (which by definition have all creature subtypes, so to implement them, we need to know what's a creature subtype and what isn't). I don't know if you want to go this way (it's still a lot of work for a rather small number of cards), but thought I'd mention it ijn case you can make use of the information.
- We know all types (see official rules)
- Anything that appears in a type= line and is not a type, is a supertype
- Anything that appears in a subtype= line is a subtype of at least one of the types mentioned in the type= line
With this information, we could map subtypes to types purely based on how they occur in the data (i.e. there's no need for external subtype lists or mappings). This could be useful for implementing Shapeshifters (which by definition have all creature subtypes, so to implement them, we need to know what's a creature subtype and what isn't). I don't know if you want to go this way (it's still a lot of work for a rather small number of cards), but thought I'd mention it ijn case you can make use of the information.
Re: Filter suggestions
we already have a list containing all the types. It could be easily browsed. With a hardcoded list of types+supertypes, you get the list of subtypes. I'm pretty sure Jeck knows about this list ist Subtypes::suptypesList or something like that...
-
- Posts: 217
- Joined: Sun Sep 13, 2009 6:32 am
Re: Filter suggestions
Why no block filter?
All of the _cards.dat have a block= field in them.
Would be pretty convenient considering when you build a deck that follows the actual rules you choose a block to build from. Would also make it easier since you don't have to remember what the 3 letter name for each set is.
All of the _cards.dat have a block= field in them.
Would be pretty convenient considering when you build a deck that follows the actual rules you choose a block to build from. Would also make it easier since you don't have to remember what the 3 letter name for each set is.