Template:CardSearch: Difference between revisions

From LOTR-TCG Wiki
(fixing wrong comparison operator for strength lessthan)
(Adding proper hunter support to the has keyword section)
 
Line 34: Line 34:
AND ("{{{phaseAction|}}}" = "" OR ((C.CardType IN ('Event') AND "{{{phaseAction|}}}" LIKE CONCAT('%', CR.Subtypes__full, '%')) OR CR.GameText RLIKE "({{#replace:{{#replace:{{{phaseAction|}}}:|,|:{{!}}}}||}})"))
AND ("{{{phaseAction|}}}" = "" OR ((C.CardType IN ('Event') AND "{{{phaseAction|}}}" LIKE CONCAT('%', CR.Subtypes__full, '%')) OR CR.GameText RLIKE "({{#replace:{{#replace:{{{phaseAction|}}}:|,|:{{!}}}}||}})"))


AND ("{{{keyword|}}}" = "" OR CR.GameText RLIKE '(?<!\\w )({{#replace:{{#replace:{{#replace:{{#replace:{{{keyword|}}}|,|{{!}}}}||}}|+|XX \\+}}|XX|}})\\.' OR ("{{{keyword|}}}" LIKE '%Ring-bound%' AND (C.Title IN ('Frodo', 'Sam') OR CR.CanBearRing = 1)) OR ("{{{keyword|}}}" LIKE '%Unbound%' AND (C.CardType = 'Companion' AND C.Title NOT IN ('Frodo', 'Sam') AND CR.GameText NOT RLIKE '(?<!\\w )Ring-bound\\.')) OR ("{{{keyword|}}}" LIKE '%Ambush%' AND CR.GameText RLIKE '(?<!\\w )Ambush \\(\\d+\\)\\.') )
AND ("{{{keyword|}}}" = "" OR CR.GameText RLIKE '(?<!\\w )({{#replace:{{#replace:{{#replace:{{#replace:{{{keyword|}}}|,|{{!}}}}||}}|+|XX \\+}}|XX|}})\\.' OR ("{{{keyword|}}}" LIKE '%Ring-bound%' AND (C.Title IN ('Frodo', 'Sam') OR CR.CanBearRing = 1)) OR ("{{{keyword|}}}" LIKE '%Unbound%' AND (C.CardType = 'Companion' AND C.Title NOT IN ('Frodo', 'Sam') AND CR.GameText NOT RLIKE '(?<!\\w )Ring-bound\\.')) OR ("{{{keyword|}}}" LIKE '%Ambush%' AND CR.GameText RLIKE '(?<!\\w )Ambush \\(\\d+\\)\\.') OR ("{{{keyword|}}}" LIKE '%Hunter%' AND CR.GameText RLIKE '(?<!\\w )Hunter \\d+\\.') )


AND ("{{{usesKeyword|}}}" = "" OR (CR.GameText RLIKE '(?<=\\w )({{#replace:{{#replace:{{{usesKeyword|}}}|,|{{!}}}}||}})' AND (1 = CASE WHEN "{{{usesKeyword|}}}" LIKE '%Archer%' AND CR.GameText LIKE '%Archer%' THEN CR.GameText RLIKE '(?<=\\w )archer\\b' ELSE 1 END )) )
AND ("{{{usesKeyword|}}}" = "" OR (CR.GameText RLIKE '(?<=\\w )({{#replace:{{#replace:{{{usesKeyword|}}}|,|{{!}}}}||}})' AND (1 = CASE WHEN "{{{usesKeyword|}}}" LIKE '%Archer%' AND CR.GameText LIKE '%Archer%' THEN CR.GameText RLIKE '(?<=\\w )archer\\b' ELSE 1 END )) )

Latest revision as of 04:34, 22 June 2023

This is the "CardSearch" template.

It should be called in the following format:

{{CardSearch
|isUnique=
|sort=
}}

Edit the page to see the template text.