mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
Fix multi-word type matching in card filters (#6060)
* Fix multi-word type matching in card filters Add phrase matching to StringValue before word-based fallback. Enables searches like t:"time lord" for multi-word creature types. * Use existing typedef * Don't inline lambda * update filter func * Update card type FilterString unit tests * refactor string matcher * update card db test * fix sets count in test * Add regex cache in string matcher * Update cockatrice/src/game/filters/filter_string.cpp * Revert "Add regex cache in string matcher" --------- Co-authored-by: RickyRister <42636155+RickyRister@users.noreply.github.com>
This commit is contained in:
parent
ba794c2b60
commit
5e88a0f0cc
4 changed files with 36 additions and 6 deletions
|
|
@ -11,7 +11,7 @@
|
|||
<colors>G</colors>
|
||||
<manacost>2G</manacost>
|
||||
<cmc>2</cmc>
|
||||
<type>Creature</type>
|
||||
<type>Creature — Cat</type>
|
||||
<maintype>Creature</maintype>
|
||||
<pt>3/3</pt>
|
||||
</prop>
|
||||
|
|
@ -26,7 +26,22 @@
|
|||
<colors>R</colors>
|
||||
<manacost>2RR</manacost>
|
||||
<cmc>4</cmc>
|
||||
<type>Creature</type>
|
||||
<type>Creature — Dog</type>
|
||||
<maintype>Creature</maintype>
|
||||
<pt>4/4</pt>
|
||||
</prop>
|
||||
</card>
|
||||
<card>
|
||||
<name>Doctor</name>
|
||||
<set>WHO</set>
|
||||
<tablerow>0</tablerow>
|
||||
<text>Why did wizards introduce two-word creature types</text>
|
||||
<prop>
|
||||
<muid>222</muid>
|
||||
<colors>R</colors>
|
||||
<manacost>2RR</manacost>
|
||||
<cmc>4</cmc>
|
||||
<type>Creature — Human Time Lord Doctor</type>
|
||||
<maintype>Creature</maintype>
|
||||
<pt>4/4</pt>
|
||||
</prop>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue