Template:Sandbox/Aurelain/HeroesWithSpell: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
Created page with "<includeonly><!-- --> id={{{id|-}}},lang={{{lang|-}}}, {{#cargo_query: tables = Hero = H, Translation = T, Translation = E | join on = H.id = T.target_id, H.id = E.target_id | where = (H.start_magics HOLDS '{{{id}}}' OR H.start_magics HOLDS '{{{id}}}_special') AND H.id NOT LIKE 'campaign%' AND H.id NOT LIKE 'tutorial%' AND H.id NOT LIKE 'cm_fun%' AND T.type = 'hero' AND T.language = '{{{lang|en}}}' AND E.type = 'hero' A..." |
No edit summary |
||
| (9 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
--> | -->{{#cargo_query: | ||
{{#cargo_query: | |||
tables = | tables = | ||
Hero = H, | Hero = H, | ||
Translation = T, | Translation = T, | ||
Translation = E | Translation = E, | ||
Hero__start_magics = SM | |||
| join on = | | join on = | ||
H.id = T.target_id, | H.id = T.target_id, | ||
H.id = E.target_id | H.id = E.target_id, | ||
H._ID = SM._rowID | |||
| where = | | where = | ||
( | SM._value IN ('{{{id}}}', '{{{id}}}_special') | ||
AND H.id NOT LIKE 'campaign%' | AND H.id NOT LIKE 'campaign%' | ||
AND H.id NOT LIKE 'tutorial%' | AND H.id NOT LIKE 'tutorial%' | ||
| Line 23: | Line 23: | ||
E.name = link, | E.name = link, | ||
T.name = text, | T.name = text, | ||
T.language = lang | T.language = lang, | ||
IF(SM._value LIKE '%_special%', 'peru', "") = color | |||
| format = | | format = | ||
template | template | ||
| template = | | template = | ||
Link/stack | Sandbox/Aurelain/Link/stack | ||
| named args = | | named args = | ||
yes | yes | ||
| Line 42: | Line 43: | ||
1. Basic, with the {{b|id}} of the spell: | 1. Basic, with the {{b|id}} of the spell: | ||
{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/HeroesWithSpell | id= | {{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/HeroesWithSpell | id=night_6_magic_deaths_grip}}</nowiki></code> | ||
{{Color|lime|Output:}} {{Sandbox/Aurelain/HeroesWithSpell | id= | {{Color|lime|Output:}} {{Sandbox/Aurelain/HeroesWithSpell | id=night_6_magic_deaths_grip}} | ||
----<!--=====================================================================--> | ----<!--=====================================================================--> | ||
| Line 50: | Line 51: | ||
2. With {{b|lang}}: | 2. With {{b|lang}}: | ||
{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/HeroesWithSpell | id= | {{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/HeroesWithSpell | id=night_6_magic_deaths_grip | lang=ja}}</nowiki></code> | ||
{{Color|lime|Output:}} {{Sandbox/Aurelain/HeroesWithSpell | id= | {{Color|lime|Output:}} {{Sandbox/Aurelain/HeroesWithSpell | id=night_6_magic_deaths_grip | lang=ja}} | ||
----<!--=====================================================================--> | ----<!--=====================================================================--> | ||
| Line 58: | Line 59: | ||
3. When there are no heroes to match the criteria, the `wiki_none` text is displayed: | 3. When there are no heroes to match the criteria, the `wiki_none` text is displayed: | ||
{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/HeroesWithSpell | id= | {{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/HeroesWithSpell | id=foo}}</nowiki></code> | ||
{{Color|lime|Output:}} {{Sandbox/Aurelain/HeroesWithSpell | id= | {{Color|lime|Output:}} {{Sandbox/Aurelain/HeroesWithSpell | id=foo}} | ||
</noinclude> | </noinclude> | ||
Latest revision as of 10:49, 28 June 2026
This template enumerates the heroes starting with a particular spell.
Usage
1. Basic, with the id of the spell:
Input: {{Sandbox/Aurelain/HeroesWithSpell | id=night_6_magic_deaths_grip}}
Output:
Shadespinner
Oona
Sister
Keiri
2. With lang:
Input: {{Sandbox/Aurelain/HeroesWithSpell | id=night_6_magic_deaths_grip | lang=ja}}
3. When there are no heroes to match the criteria, the `wiki_none` text is displayed:
Input: {{Sandbox/Aurelain/HeroesWithSpell | id=foo}}
Output: None


