Form:CardSearch: Difference between revisions

From LOTR-TCG Wiki
No edit summary
(Fixing Race, Item Class, and Rarity filters not working properly)
 
Line 29: Line 29:


<span class="heading">Is Item Class</span><small><i> (OR)</i></small>: {{{field|itemClass|input type=tokens|default=|size=40|values=
<span class="heading">Is Item Class</span><small><i> (OR)</i></small>: {{{field|itemClass|input type=tokens|default=|size=40|values=
{{#cargo_query:tables=Cards=C,CardReleases=CR|join on=C.ID = CR.ID|fields=IF(CR.Subtypes__full IS NULL, '[Classless]', CR.Subtypes__full)|where=C.CardType IN ('Artifact', 'Possession') AND (CR.Subtypes__full IS NULL OR CR.Subtypes__full NOT LIKE '%,%') |format=list|group by=Subtypes__full|order by=CASE WHEN CR.Subtypes__full IS NULL THEN 0 ELSE 1 END,CR.Subtypes__full|no html}}|existing values only|placeholder=Select 1 or more}}}
{{#cargo_query:tables=Cards=C,CardReleases=CR|join on=C.ID = CR.ID|fields=IF(CR.Subtypes__full IS NULL, '[Classless]', CR.Subtypes__full)|where=C.CardType IN ('Artifact', 'Possession') AND (CR.Subtypes__full IS NULL OR CR.Subtypes__full NOT LIKE '%,%') |format=template|template=TagFilterOutput|group by=Subtypes__full|order by=CASE WHEN CR.Subtypes__full IS NULL THEN 0 ELSE 1 END,CR.Subtypes__full|no html}}|existing values only|placeholder=Select 1 or more}}}


<span class="heading">Phase Action</span><small><i> (OR)</i></small>: {{{field|phaseAction|input type=tokens|default=|size=40|values=Fellowship,Shadow,Maneuver,Archery,Skirmish,Regroup,Response|existing values only|placeholder=Select 1 or more}}}
<span class="heading">Phase Action</span><small><i> (OR)</i></small>: {{{field|phaseAction|input type=tokens|default=|size=40|values=Fellowship,Shadow,Maneuver,Archery,Skirmish,Regroup,Response|existing values only|placeholder=Select 1 or more}}}
Line 156: Line 156:


<span class="heading">Uses Race</span><small><i> (OR)</i></small>: {{{field|usesRace|input type=tokens|default=|size=40|values=
<span class="heading">Uses Race</span><small><i> (OR)</i></small>: {{{field|usesRace|input type=tokens|default=|size=40|values=
{{#cargo_query:tables=Cards=C,CardReleases=CR|join on=C.ID = CR.ID|fields=CR.Subtypes__full|where=C.CardType IN ('Companion', 'Ally', 'Minion') AND CR.Subtypes__full IS NOT NULL|format=list|group by=Subtypes__full|no html}}|existing values only|placeholder=Select 1 or more}}}
{{#cargo_query:tables=Cards=C,CardReleases=CR|join on=C.ID = CR.ID|fields=CR.Subtypes__full|where=C.CardType IN ('Companion', 'Ally', 'Minion') AND CR.Subtypes__full IS NOT NULL|format=template|template=TagFilterOutput|group by=Subtypes__full|no html}}|existing values only|placeholder=Select 1 or more}}}


<span class="heading">Uses Item Class</span><small><i> (OR)</i></small>: {{{field|usesItemClass|input type=tokens|default=|size=40|values=
<span class="heading">Uses Item Class</span><small><i> (OR)</i></small>: {{{field|usesItemClass|input type=tokens|default=|size=40|values=
{{#cargo_query:tables=Cards=C,CardReleases=CR|join on=C.ID = CR.ID|fields=CR.Subtypes__full|where=C.CardType IN ('Artifact', 'Possession') AND CR.Subtypes__full IS NOT NULL AND CR.Subtypes__full NOT LIKE '%,%' AND CR.Subtypes__full NOT LIKE '%Support Area%'|format=list|group by=Subtypes__full|no html}}|existing values only|placeholder=Select 1 or more}}}
{{#cargo_query:tables=Cards=C,CardReleases=CR|join on=C.ID = CR.ID|fields=CR.Subtypes__full|where=C.CardType IN ('Artifact', 'Possession') AND CR.Subtypes__full IS NOT NULL AND CR.Subtypes__full NOT LIKE '%,%' AND CR.Subtypes__full NOT LIKE '%Support Area%'|format=template|template=TagFilterOutput|group by=Subtypes__full|no html}}|existing values only|placeholder=Select 1 or more}}}


<span class="heading">Uses Keyword</span><small><i> (OR)</i></small>: {{{field|usesKeyword|input type=tokens|default=|size=40|values=Ambush,Archer,Battleground,Besieger,Corsair,Damage,Defender,Dwelling,Easterling,Enduring,Engine,Fierce,Forest,Fortification,Hunter,Knight,Lurker,Machine,Marsh,Mountain,Mounted,Muster,Pipeweed,Plains,Ranger,Ring-bound,River,Roaming,Sanctuary,Search,Southron,Spell,Stealth,Tale,Tentacle,Toil,Tracker,Twilight,Unbound,Underground,Unhasty,Valiant,Villager,Warg-rider,Weather,Burglar,Cunning,Wise|existing values only|placeholder=Select 1 or more}}}
<span class="heading">Uses Keyword</span><small><i> (OR)</i></small>: {{{field|usesKeyword|input type=tokens|default=|size=40|values=Ambush,Archer,Battleground,Besieger,Corsair,Damage,Defender,Dwelling,Easterling,Enduring,Engine,Fierce,Forest,Fortification,Hunter,Knight,Lurker,Machine,Marsh,Mountain,Mounted,Muster,Pipeweed,Plains,Ranger,Ring-bound,River,Roaming,Sanctuary,Search,Southron,Spell,Stealth,Tale,Tentacle,Toil,Tracker,Twilight,Unbound,Underground,Unhasty,Valiant,Villager,Warg-rider,Weather,Burglar,Cunning,Wise|existing values only|placeholder=Select 1 or more}}}
Line 226: Line 226:
<span class="heading">Set#: </span>{{{field|setnums|input type=tokens|default=|size=40|values=1 - The Fellowship of the Ring,2 - Mines of Moria,3 - Realms of the Elf-lords,4 - The Two Towers,5 - Battle of Helm's Deep,6 - Ents of Fangorn,7 - The Return of the King,8 - Siege of Gondor,9 - Reflections,10 - Mount Doom,11 - Shadows,12 - Black Rider,13 - Bloodlines,14 - Expanded Middle-earth, 15 - The Hunters, 16 - The Wraith Collection, 17 - Rise of Saruman, 18 - Treachery & Deceit,19 - Age's End,V1 - Shadow of the Past|existing values only|placeholder=Select 1 or more}}}
<span class="heading">Set#: </span>{{{field|setnums|input type=tokens|default=|size=40|values=1 - The Fellowship of the Ring,2 - Mines of Moria,3 - Realms of the Elf-lords,4 - The Two Towers,5 - Battle of Helm's Deep,6 - Ents of Fangorn,7 - The Return of the King,8 - Siege of Gondor,9 - Reflections,10 - Mount Doom,11 - Shadows,12 - Black Rider,13 - Bloodlines,14 - Expanded Middle-earth, 15 - The Hunters, 16 - The Wraith Collection, 17 - Rise of Saruman, 18 - Treachery & Deceit,19 - Age's End,V1 - Shadow of the Past|existing values only|placeholder=Select 1 or more}}}


<span class="heading">Rarity: </span>{{{field|rarityabbr|input type=tokens|default=|size=40|values={{#cargo_query:tables=Rarities=R|fields=CONCAT(R.Name, ' (', R.Abbr, ')')|where=R.Sets HOLDS NOT '30' AND R.Sets HOLDS NOT '31'|order by=R.SortOrder|format=list|no html|delimiter=,}}|existing values only|placeholder=Select 1 or more}}}
<span class="heading">Rarity: </span>{{{field|rarityabbr|input type=tokens|default=|size=40|values={{#cargo_query:tables=Rarities=R|fields=CONCAT(R.Name, ' (', R.Abbr, ')')|where=R.Sets HOLDS NOT '30' AND R.Sets HOLDS NOT '31'|order by=R.SortOrder|format=template|template=TagFilterOutput|no html|delimiter=,}}|existing values only|placeholder=Select 1 or more}}}


<span class="heading">Foil Images</span>{{{field|isFoil|input type=radiobutton|mandatory|default=no|values=yes,no|size=40}}}
<span class="heading">Foil Images</span>{{{field|isFoil|input type=radiobutton|mandatory|default=no|values=yes,no|size=40}}}

Latest revision as of 02:30, 25 January 2024