Form:CardSearch: Difference between revisions
From LOTR-TCG Wiki
No edit summary |
(Fixing Race, Item Class, and Rarity filters not working properly) |
||
(74 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
<!--{{#forminput:form=}}--> | <!--{{#forminput:form=}}--> | ||
</noinclude><includeonly> | </noinclude><includeonly> | ||
{{{standard input|run query|label=Run query|class=button}}} | {{{standard input|run query|label=Run query|class=button}}} | ||
[[Special:RunQuery/CardSearch|{{Button| <big>✕</big> Clear Form|color=red}}]] | |||
__NOTOC____NOEDITSECTION__<!-- | __NOTOC____NOEDITSECTION__<!-- | ||
--> | --> | ||
<div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div> | <div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div> | ||
{{{for template|CardSearch}}} | {{{for template|CardSearch}}} | ||
<span class="heading">Format: </span>{{{field|format|input type=dropdown|default=|size=40|values={{#cargo_query:tables=Formats=F|fields=F.Name|order by=CASE WHEN F.Name LIKE "%Fellowship%" THEN 1 WHEN F.Name LIKE "%Movie%" THEN 2 WHEN F.Name LIKE "%Expanded%" THEN 3 WHEN F.Name LIKE "Towers%" THEN 4 WHEN F.Name = "King Standard" THEN 5 WHEN F.Name = "King Block" THEN 6 WHEN F.Name LIKE "War of the Ring%" THEN 7 WHEN F.Name = "Standard" THEN 8 ELSE 9 END, F.Name|format=list|no html}}|existing values only|placeholder=Select 1}}} | |||
<div class="flex"> | <div class="flex"> | ||
<div class="sidebar flex" style="max-width:250px"> | |||
<div class="title">Basic Attributes</div> | |||
<span class="heading">Side: </span>{{{field|side|input type=tokens|default=|size=40|cargo table=Cards|cargo field=Side|existing values only|placeholder=Select 1 or more}}} | |||
<span class="heading"> | |||
<span class="heading"> | <span class="heading">Is Culture</span><small><i> (OR)</i></small>: {{{field|culture|input type=tokens|default=|size=40|values={{#cargo_query:tables=Cultures=CU|fields=CU.Name|order by=CU.SortOrder|where=CU.Name NOT IN ('The One Ring', 'Site')|format=list|no html}}|existing values only|placeholder=Select 1 or more}}} | ||
<span class="heading"> | <span class="heading">Is Card Type</span><small><i> (OR)</i></small>: {{{field|cardtype|input type=tokens|default=|size=40|cargo table=Cards|cargo field=CardType|existing values only|placeholder=Select 1 or more}}} | ||
<span class="heading"> | <span class="heading">Is Race</span><small><i> (OR)</i></small>: {{{field|race|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, '[Raceless]', CR.Subtypes__full)|where=C.CardType IN ('Companion', 'Ally', 'Minion')|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"> | <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=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"> | <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}}} | ||
</div> | </div> | ||
<div class="sidebar flex" style="max-width:300px"> | <div class="sidebar flex" style="max-width:300px"> | ||
<div class="content mw-collapsible mw-collapsed" data-expandtext="Show more" data-collapsetext="Show less"> | <div class="content mw-collapsible mw-collapsed" data-expandtext="Show more" data-collapsetext="Show less"> | ||
<div class="title"> | <div class="title">Card Text</div> | ||
<span class="heading">Title: </span>{{{field|title|input type=text|default=|size=30|placeholder=Title regex Search Text}}} | |||
<span class="heading">Subtitle: </span>{{{field|subtitle|input type=text|default=|size=30|placeholder=Subtitle regex Search Text}}} | |||
<span class="heading">Unique?</span>{{{field|isUnique|input type=radiobutton|mandatory|default=any|values=any,yes,no|size=40}}} | |||
<span class="heading">Text Search: </span>{{{field|textSearch|input type=textarea|autogrow|default=|cols=40|placeholder=Game Text to search}}} | <span class="heading">Text Search: </span>{{{field|textSearch|input type=textarea|autogrow|default=|cols=40|placeholder=Game Text to search}}} | ||
Use % for wildcards. Twilight symbols are stored like (1) and (X), and Culture symbols are referenced like [GONDOR] or [RINGWRAITH]. | Use % for wildcards. Twilight symbols are stored like (1) and (X), and Culture symbols are referenced like [GONDOR] or [RINGWRAITH]. | ||
<div class="mw-collapsible-content "> | |||
<!-- --><span class="heading">Regex Text Search: </span>{{{field|textRegexSearch|input type=textarea|autogrow|default=|cols=40|placeholder=Game Text to match (using regex)}}} | <!-- --><span class="heading">Regex Text Search: </span>{{{field|textRegexSearch|input type=textarea|autogrow|default=|cols=40|placeholder=Game Text to match (using regex)}}} | ||
Uses [https://www.regular-expressions.info/ regex] to perform more powerful searching. | Uses [https://www.regular-expressions.info/ regex] to perform more powerful searching. | ||
</div> | |||
<span class="heading">Has Keyword</span><small><i> (OR)</i></small>: {{{field|keyword|input type=tokens|default=|size=40|values=Ambush,Archer,Battleground,Besieger,Corsair,Damage +1,Damage +2,Defender +1,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}}} | |||
</div> | </div> | ||
</div> | </div> | ||
<div class="sidebar flex " style="max-width:400px; justify-content:flex-start;" > | |||
<div class="title">Quick Search</div> | |||
{{{field|advancedOptions|input type=tree|list|default=|structure= | |||
*Burdens: | |||
**Auto-corruption | |||
**Add Burdens | |||
**Prevent Burden Removal | |||
**Remove Burdens | |||
**Prevent Burden Adding | |||
**Spot Burdens | |||
*Card Manipulation: | |||
**Look At Top Of Deck | |||
**Reveal Top Of Deck | |||
**Place On Top Of Deck | |||
**Place On Bottom Of Deck | |||
**Shuffle Into Deck | |||
**Discard From Your Deck | |||
**Discard From Opponent's Deck | |||
**Discard From Opponent's Hand | |||
**Reveal Opponent's Hand | |||
*Culture Tokens: | |||
**Add Tokens | |||
**Reinforce Tokens | |||
**Remove Tokens | |||
**Remove Token From Others | |||
**Spot Tokens | |||
*Cycling: | |||
**Draw Cards | |||
**Recover Cards Into Hand | |||
**Discard From Your Hand | |||
*Initiative: | |||
**Initiative Bonus | |||
**Shadow Initiative Manipulation | |||
**Freeps Initiative Loss Bonus | |||
*Move Limit: | |||
**Increase Move Limit | |||
**Decrease Move Limit | |||
**Force Move | |||
**Force Stop | |||
*Recursion: | |||
**Take Cards Into Hand From Discard | |||
**Take Cards Into Hand From Deck | |||
**Play Cards From Discard | |||
**Play Cards From Deck | |||
*Signets: | |||
**Uses Aragorn Signet | |||
**Uses Frodo Signet | |||
**Uses Gandalf Signet | |||
**Uses Théoden Signet | |||
*Site Control: | |||
**Take Control Of Site | |||
**Liberate Site | |||
**Prevent Site Control | |||
**Your Site Control Bonus | |||
**No Site Control Bonus | |||
*Site Manipulation: | |||
**Play Site | |||
**Prevent Site Replacement | |||
*Skirmishing: | |||
**Ally Participation | |||
**Cancel Skirmish | |||
**Dodge Skirmish | |||
**Replace Skirmish | |||
**Overwhelm Protection | |||
*Stats: | |||
**Modify Strength: | |||
***Add Strength | |||
***Remove Strength | |||
**Modify Resistance: | |||
***Add Resistance | |||
***Remove Resistance | |||
**Modify Site Number: | |||
***Add Site Number | |||
***Remove Site Number | |||
*Targeted Removal: | |||
** Ally Removal | |||
** Companion Removal | |||
** Minion Removal | |||
** Follower Removal | |||
** Condition Removal | |||
** Artifact Removal | |||
** Possession Removal | |||
*Threats: | |||
**Add Threats | |||
**Prevent Threat Removal | |||
**Remove Threats | |||
|size=40|depth=0|hideroot|width=400|height=400|class=flex}}} | |||
</div> | |||
</div> | |||
<div class="flex"> | |||
<div class="sidebar flex" style="max-width:250px"> | <div class="sidebar flex" style="max-width:250px"> | ||
<div class=" | <div class="title">Advanced Search</div> | ||
<span class="heading">Uses Culture</span><small><i> (OR)</i></small>: {{{field|usesCulture|input type=tokens|default=|size=40|values={{#cargo_query:tables=Cultures=CU|fields=CU.Name|order by=CU.SortOrder|where=CU.Name NOT IN ('The One Ring', 'Site')|format=list|no html}}|existing values only|placeholder=Select 1 or more}}} | |||
<span class="heading">Uses Card Type</span><small><i> (OR)</i></small>: {{{field|usesCardtype|input type=tokens|default=|size=40|cargo table=Cards|cargo field=CardType|existing values only|placeholder=Select 1 or more}}} | |||
<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=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= | |||
{{#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}}} | |||
</div> | </div> | ||
<div class="sidebar flex" style="max-width:300px"> | <div class="sidebar flex" style="max-width:300px"> | ||
<div class="content mw-collapsible | <div class="content mw-collapsible " data-expandtext="Show more" data-collapsetext="Show less"> | ||
<div class="title">Stats</div> | <div class="title">Stats</div> | ||
<span class="heading">Twilight Cost: </span>{{{field|twilight|input type=text|default=|size=12|placeholder=}}} <div class="mw-collapsible-content"><small> | <span class="heading">Twilight Cost: </span>{{{field|twilight|input type=text|default=|size=12|placeholder=}}} <div class="mw-collapsible-content"><small> | ||
<!-- --><span class="heading">>=</span> {{{field|twilightMore|input type=text|default=|size=5}}} <span class="heading"><=</span> {{{field|twilightLess|input type=text|default=|size=5}}} | <!-- --><span class="heading">>=</span> {{{field|twilightMore|input type=text|default=|size=5}}} <span class="heading"><=</span> {{{field|twilightLess|input type=text|default=|size=5}}} | ||
Line 125: | Line 199: | ||
<div class="sidebar flex" style="max-width:300px"> | <div class="sidebar flex" style="max-width:300px"> | ||
<div class="content mw-collapsible | <div class="content mw-collapsible " data-expandtext="Show more" data-collapsetext="Show less"> | ||
<div class="title">Site Stats</div> | <div class="title">Site Stats</div> | ||
<span class="heading">Site Number: </span>{{{field|sitesitenum|input type=text|default=|size=12|placeholder=}}} | <span class="heading">Site Number: </span>{{{field|sitesitenum|input type=text|default=|size=12|placeholder=}}} | ||
Line 142: | Line 214: | ||
<span class="heading">Sanctuary</span>{{{field|isSanctuary|input type=radiobutton|default=any|values=any,yes,no|size=40}}} | <span class="heading">Sanctuary</span>{{{field|isSanctuary|input type=radiobutton|default=any|values=any,yes,no|size=40}}} | ||
<span class="heading">Arrow Direction</span>{{{field|arrowDir|input type=radiobutton|default= | <span class="heading">Arrow Direction</span>{{{field|arrowDir|input type=radiobutton|default=any|values=any,left,right|size=40}}} | ||
</div> | </div> | ||
</div> | </div> | ||
Line 149: | Line 221: | ||
<div class="sidebar flex" style="max-width:250px"> | <div class="sidebar flex" style="max-width:250px"> | ||
<div class="title">Collection Info</div> | <div class="title">Collection Info</div> | ||
<span class="heading">Creator: </span>{{{field|creator|input type=tokens|default=Decipher,Player's Council|size=40|values={{#cargo_query:tables=CardSets=S|fields=S.Creator|where=S.Creator NOT IN ('mLOTRO', 'Aradrissar')|group by=S.Creator|order by=CASE WHEN S.Creator = 'Decipher' THEN 0 WHEN S.Creator = "Player's Council" THEN 1 ELSE 2 END, S.Creator|format=list|no html}}|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=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}}} | ||
Line 160: | Line 239: | ||
<span class="heading">Lore Text Search: </span>{{{field|loreSearch|input type=textarea|autogrow|default=|cols=30|placeholder=Lore regex search to match}}} | <span class="heading">Lore Text Search: </span>{{{field|loreSearch|input type=textarea|autogrow|default=|cols=30|placeholder=Lore regex search to match}}} | ||
</div> | </div> | ||
</div> | </div> | ||
{{{standard input|run query|label=Run query|class=button}}} | {{{standard input|run query|label=Run query|class=button}}} | ||
[[Special:RunQuery/CardSearch|{{Button| <big>✕</big> Clear Form|color=red}}]] |