Card Collection Filter
nwawrzyniak opened this issue · 2 comments
Add filter functions to the search bar searchInput
for the pages Decks and Crafting.
Some of the new search terms are aliases for each other, e.g. it doesn't matter whether you write g
, gold
or cost
when you want to filter for that.
Filters:
atk=X
shows all cards with an ATK of X
attack=X
same as atk=X
off=X
same as atk=X
offense=X
same as atk=X
hp=X
shows all cards with X HP
def=X
same as hp=X
defense=X
same as hp=X
life=X
same as hp=X
g=X
shows all cards that cost X G
gold=X
same as g=X
cost=X
same as g=X
Example 1: atk=5
shall show all cards (in this case only monsters) with an ATK of exactly 5.
Example 2: g=3
shall show all cards that cost 3G.
Additional terms:
odd
substitutes all odd numbers
even
substitutes all even numbers
Example 3: The search cost=odd
shall show all cards with goldCost%2==1
, so 1, 3, 5, 7, 9, 11, 13.
Logic operators:
=
shows all cards with the specified value
<
shows all cards with a lower value than the specified
>
shows all cards with a greater value than the specified
<=
and =<
show all cards with a lower or equal value than the specified
>=
and =>
show all cards with a greater or equal value than the specified
!=
shows all cards with a value except the specified value
,
, +
, ;
and &
apply multiple filters which all have to fit the result
|
(pipe, vertical bar) concatenates multiple search results
(
and )
can be used to specify the order of operations
Example 4: The search atk<=2,gold=6,hp>=4,taunt,dust
shall show all cards with a maximum of 2 ATK that cost 6G, have at least 4 HP, Taunt and a Dust effect, e.g. Rock
.
Example 5: The search (atk=5,hp=4)|(atk=4,hp=5)
shall show all cards that have 5/4 OR 4/5 stats.
The additional search terms shall only add to the functionality of the current search bar, so searching for terms like dust
, magic
or card text and names will still show all cards containing the keywords.
Example 6: Searching for madj
shows Madjick
(if you're on Decks, since on Crafting only his shiny version will be available [if you checked the box for that]).
You went all out on this one. Hmm
Requesting label "Feature".