Template:Sandbox/Aurelain/SpellKnownBy: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 2: Line 2:
-->{{#cargo_query:
-->{{#cargo_query:
tables =
tables =
     Hero = H
     Hero = H,
    Translation = T,
    Translation = E
| join on =
    H.id = T.target_id,
    H.id = E.target_id
| where =
| where =
     H.start_magics HOLDS '{{{id}}}'
     H.start_magics HOLDS '{{{id}}}'
    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'
    AND E.language = 'en'
| fields =
| fields =
     H.id = id,
     CONCAT(E.name, '.png') = filename,
     CONCAT('{{{lang|en}}}') = lang,
    E.name = link,
     CONCAT('hero') = type
     T.name = text,
     T.language = lang
| format =
| format =
     template
     template
| template =
| template =
     Sandbox/Aurelain/LinkIcon
     Sandbox/Aurelain/Link/stack
| named args =
| named args =
     yes
     yes
| default = {{Label|none|{{{lang|en}}}|nolink}}
| default =
    {{Label|none|{{{lang|en}}}|nolink}}
}}<!--
}}<!--
################################################################################
################################################################################
Line 26: Line 40:
1. Basic:
1. Basic:


{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/SpellKnownBy | id=day_2_magic_sharp_edge}}</nowiki></code>
{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/SpellKnownBy | id=primal_3_magic_wean}}</nowiki></code>


{{Color|lime|Output:}} {{Sandbox/Aurelain/SpellKnownBy | id=day_2_magic_sharp_edge}}
{{Color|lime|Output:}} {{Sandbox/Aurelain/SpellKnownBy | id=primal_3_magic_wean}}


----<!--=====================================================================-->
----<!--=====================================================================-->
Line 34: Line 48:
2. With {{b|lang}}:
2. With {{b|lang}}:


{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/SpellKnownBy | id=day_2_magic_sharp_edge | lang=ja}}</nowiki></code>
{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/SpellKnownBy | id=primal_3_magic_wean | lang=ja}}</nowiki></code>


{{Color|lime|Output:}} {{Sandbox/Aurelain/SpellKnownBy | id=day_2_magic_sharp_edge | lang=ja}}
{{Color|lime|Output:}} {{Sandbox/Aurelain/SpellKnownBy | id=primal_3_magic_wean | lang=ja}}


----<!--=====================================================================-->
----<!--=====================================================================-->

Latest revision as of 15:01, 27 June 2026


This template enumerates the heroes starting with a particular spell.

Usage

1. Basic:

Input: {{Sandbox/Aurelain/SpellKnownBy | id=primal_3_magic_wean}}

Output: Leira


2. With lang:

Input: {{Sandbox/Aurelain/SpellKnownBy | id=primal_3_magic_wean | lang=ja}}

Output: レイラ


3. When there are no heroes to match the criteria, the `wiki_none` text is displayed:

Input: {{Sandbox/Aurelain/SpellKnownBy | id=neutral_magic_dimension_door}}

Output: None