Editing Template:Card query
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
This page is not enabled for semantic in-text annotations due to namespace restrictions. Details about how to enable the namespace can be found on the configuration help page.
Latest revision | Your text | ||
Line 101: | Line 101: | ||
}}{{ #vardefine: $cq_spell_count | {{ #ask: {{ #var: $cq_medium_query }}{{ #var: $cq_query }}[[Card type::Spell Card]] | format=count }} | }}{{ #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 }} | }}{{ #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 }} | + | }}{{ #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/0/0/0 | 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 | | 1/0/0/0 = monster | ||
− | | | + | | 0/1/0/1 = {{ #ifexpr: {{ #var: $cq_nonmonster_count }} = {{ #var: $cq_spell_count }} | spell | non-monster }} |
− | | 0/ | + | | 0/0/1/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 --> | | #default = monster<!-- if you get here you need to specify {{{type}}}; maybe one day {{Card query}} will have better handling for mixed-type lists --> | ||
}} | }} |