Changes

Jump to: navigation, search

Template:Card query

44 bytes added, 1 year ago
fix transclusions that don't use {{{type}}} but have a query that can only return nonmonsters (e.g. the query includes `Card type::Spell Card`)
}}{{ #vardefine: $cq_spell_count | {{ #ask: {{ #var: $cq_medium_query }}{{ #var: $cq_query }}[[Card type::Spell Card]] | format=count }}
}}{{ #vardefine: $cq_trap_count | {{ #ask: {{ #var: $cq_medium_query }}{{ #var: $cq_query }}[[Card type::Trap Card]] | format=count }}
}}{{ #switch: {{ #ifexpr: {{ #var: $cq_monster_count }} > 0 | 1 | 0 }}/{{ #ifexpr: {{ #var: $cq_spell_count }} > 0 | 1 | 0 }}/{{ #ifexpr: {{ #var: $cq_trap_count }} > 0 | 1 | 0 }}/{{ #ifexpr: {{ #var: $cq_nonmonster_count }} > 0 | 1 | 0 }} | 0<!-- monster/0nonmonster/0spell/0 trap --> | 0/0/0/1 | 0/1/0/1 | 0/0/1/1 | 0/1/1/1 = non-monster<!-- maybe split out the no spell/trap case later to allow auto-determination of other stuff -->
| 1/0/0/0 = monster
| 0/0/1/0| 0/1/1 /0 = {{ #ifexpr: {{ #var: $cq_nonmonster_count }} = {{ #var: $cq_spell_count }} | spell | non-monster }} | 0/0/0/1 | 0/1/0/1 = {{ #ifexpr: {{ #var: $cq_nonmonster_count }} = {{ #var: $cq_trap_count }} | trap | non-monster }}
| #default = monster<!-- if you get here you need to specify {{{type}}}; maybe one day {{Card query}} will have better handling for mixed-type lists -->
}}

Navigation menu