mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 19:13:25 -08:00
* [Card] Import Scryfall Tagger tags from MTGJson * [Card] Search cards by Scryfall Tagger tag * [Card] Add a Tag attribute to the card filter tree * [Card] Add a Tags filter to the visual card database * [Oracle] Add a script to inject Scryfall tags into AllPrintings * [Card] Elide long tag lists in the card info and drop the Scryfall label from the tag filter tooltip * [Oracle] Load card tags from a tag database during import Add a TagDatabase loader that understands Scryfall's Oracle Tags bulk data and user-supplied tag files (tag objects, flat oracle-id or name maps, optional manifest, JSON or JSONL, gzip/xz/zip). The importer joins the slugs on identifiers.scryfallOracleId while the identifiers are still available, falls back to the card name, and unions them with any tags the source already provides. Split-card faces merge through the existing tag union path. This replaces oracle/scripts/inject_scryfall_tags.py, which patched AllPrintings.json before import. Loading during import keeps tags on by default for every source and lets users pair Oracle with any tag database. * [Oracle] Add a tag data step to the import wizard Insert a Tags page between set selection and the import. It downloads Scryfall's Oracle Tags by default (or a user-supplied file/URL), can include parent tags, and persists tagsenabled, tagssource and tagsparents in oracle.ini. The page loads asynchronously and soft-fails in background mode, so a tag download or parse error never aborts the card database import. * [Help] Describe tag search without naming Scryfall Tags can come from Scryfall's Oracle Tags or any user-supplied tag database, so the search help should not claim a single source. * [Oracle] Fix Scryfall tag requests and the retry loop api.scryfall.com rejects requests that lack an Accept header with HTTP 400, and QNetworkAccessManager does not add one. Send application/json for the bulk metadata request and */* for the tag file, and surface the URL plus Scryfall's JSON error body when a request fails. A failed tag load used to call next(), which re-ran validatePage() and started the same failing download again, trapping the user in an error loop. Stay on the page instead, drop the unusable database, and tell the user they can retry, change the source, or untick the option to import without tags. Also explain parent tags inline with a real Scryfall hierarchy example. * [Oracle] Give the parent-tag explainer room to breathe The wrapped explainer sat flush under the checkbox with no separation from the status label, which made the paragraph look cramped. Indent it under the checkbox and add a little vertical margin. * [Oracle] Stop the parent-tag explainer from being clipped A word-wrapped QLabel reports a one-line sizeHint, so the wizard page reserved too little height and the explanation lost its top and bottom lines. Pin the vertical size policy to Minimum on the explainer and on the status label, so the wrapped height becomes part of the page minimum. Verified with a layout probe: the label went from 28 px tall (needed 56) to its full height. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
76 lines
No EOL
4.3 KiB
Markdown
76 lines
No EOL
4.3 KiB
Markdown
@page search_syntax_help Search Syntax Help
|
|
|
|
## Search Syntax Help
|
|
|
|
The search bar recognizes a set of special commands similar to some other card databases.<br>
|
|
In this list of examples below, each entry has an explanation and can be clicked to test the query. Note that all searches are case insensitive.
|
|
|
|
<dl>
|
|
|
|
<dt>Name:</dt>
|
|
<dd>[birds of paradise](#birds of paradise) <small>(Any card name containing the words birds, of, and paradise)</small></dd>
|
|
<dd>["birds of paradise"](#%22birds of paradise%22) <small>(Any card name containing the exact phrase "birds of paradise")</small></dd>
|
|
|
|
<dt>Rules Text (<u>O</u>racle):</dt>
|
|
<dd>[o:flying](#o:flying) <small>(Any card text that has the word flying)</small></dd>
|
|
<dd>[o:"first strike"](#o:%22first strike%22) <small>(Any card text that has the exact phrase "first strike")</small></dd>
|
|
<dd>[o:"{T}" o:"add one mana of any color"](#o:%22{T}%22 o:%22add one mana of any color%22) <small>(Any card text that has a tap symbol and the phrase "add one mana of any color")</small></dd>
|
|
|
|
<dt><u>T</u>ypes:</dt>
|
|
<dd>[t:angel](#t:angel) <small>(Any card with the type angel)</small></dd>
|
|
<dd>[t:angel t:legendary](#t:angel t:legendary) <small>(Any angel that's also legendary)</small></dd>
|
|
<dd>[t:basic](#t:basic) <small>(Any card with the type basic)</small></dd>
|
|
<dd>[t:arcane t:instant](#t:arcane t:instant) <small>(Any card with the types arcane and instant)</small></dd>
|
|
|
|
<dt>Tags:</dt>
|
|
<dd>[tags:ramp](#tags:ramp) <small>(Any card tagged "ramp")</small></dd>
|
|
<dd>[tags:draw tags:ramp](#tags:draw tags:ramp) <small>(Any card tagged both "draw" and "ramp")</small></dd>
|
|
<dd>[tags:draw OR tags:ramp](#tags:draw OR tags:ramp) <small>(Any card tagged "draw" or "ramp")</small></dd>
|
|
|
|
<dt><u>C</u>olors:</dt>
|
|
<dd>[c:w](#c:w) <small>(Any card that is white)</small></dd>
|
|
<dd>[c:wu](#c:wu) <small>(Any card that is white or blue)</small></dd>
|
|
<dd>[c:wum](#c:wum) <small>(Any card that is white or blue, and multicolored)</small></dd>
|
|
<!--
|
|
<dd>[c!w](#c!w) <small>(Cards that are only white)</small></dd>
|
|
<dd>[c!wu](#c!wu) <small>(Cards that are only white or blue, or both)</small></dd>
|
|
<dd>[c!wum](#c!wum) <small>(Cards that are only white and blue, and multicolored)</small></dd>
|
|
<dd>[c=wubrg](#c%3Dwubrg) <small>(Cards that are all five colors)</small></dd>
|
|
-->
|
|
<dd>[c:c](#c:c) <small>(Any colorless card)</small></dd>
|
|
<dd>[ci:w](#ci:w) <small>(Any card that has white in it's color identity)</small></dd>
|
|
|
|
<dt><u>Pow</u>er, <u>Tou</u>ghness, <u>M</u>ana <u>V</u>alue:</dt>
|
|
<dd>[tou:1](#tou:1) <small>(Any card with a toughness of 1)</small></dd>
|
|
<dd>[pow>=8](#pow>=8) <small>(Any card with a power greater than or equal to 8)</small></dd>
|
|
<dd>[mv=7](#mv=7) <small>(Any card with a mana value equal to 7)</small></dd>
|
|
|
|
<dt><u>R</u>arity:</dt>
|
|
<dd>[r:mythic](#r:mythic) <small>(Any card that has the mythic-rare rarity)</small></dd>
|
|
|
|
<dt><u>F</u>ormat:</dt>
|
|
<dd>[f:standard](#f:standard) <small>(Any card that can be played in standard)</small></dd>
|
|
<dd>[banned:modern](#banned:modern) <small>(Any card that is banned in modern)</small></dd>
|
|
<dd>[restricted:vintage](#restricted:vintage) <small>(Any card that is restricted in vintage)</small></dd>
|
|
<dd>[legal:pauper](#legal:pauper) <small>(Any card that is legal in pauper)</small></dd>
|
|
|
|
<dt><u>E</u>dition:</dt>
|
|
<dd>[set:lea](#set:lea) <small>(Cards that appear in Alpha, which has the set code LEA)</small></dd>
|
|
<dd>[e:lea OR e:leb](#e:lea OR e:leb) <small>(Cards that appear in Alpha or Beta)</small></dd>
|
|
<dd>[e<8ED](#e<8ED) <small>(Cards that appear before 8th edition)</small></dd>
|
|
|
|
<dt>Negate:</dt>
|
|
<dd>[c:wu -c:m](#c:wu -c:m) <small>(Any card that is white or blue, but not multicolored)</small></dd>
|
|
|
|
<dt>Branching:</dt>
|
|
<dd>[t:sliver OR o:changeling](#t:sliver OR o:changeling) <small>(Any card that is either a sliver or has changeling)</small></dd>
|
|
|
|
<dt>Grouping:</dt>
|
|
<dd><a href="#t:angel -(angel OR c:w)">t:angel -(angel OR c:w)</a> <small>(Any angel that doesn't have angel in its name and isn't white)</small></dd>
|
|
|
|
<dt>Regular Expression:</dt>
|
|
<dd>[/^fell/](#/^fell/) <small>(Any card name that begins with "fell")</small></dd>
|
|
<dd>[o:/counter target .* spell/](#o:/counter target .* spell/) <small>(Any card text with "counter target *something* spell")</small></dd>
|
|
<dd>[o:/for each .* and\/or .*/](#o:/for each .* and\/or .*/) <small>(/'s can be escaped with a \)</small></dd>
|
|
|
|
</dl> |