Template:UnitAbility/stats: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary
N (talk | contribs)
Newer formatting, implemented screen-size responsive hints
 
Line 1: Line 1:
<templatestyles src="Template:UnitAbility/styles.css" />
<includeonly><!--
<includeonly><!--
--><div class="responsive-creature-type-stats-area"><!--
--><div class="responsive-group">
  <div><!--
-->{{Hint<!--
-->{{Hint<!--
     -->|[[File:Icon_Stats_Morale.png|24px|link=]] {{{morale_range}}}<!--
     -->|[[File:Icon_Stats_Morale.png|24px|link=]] {{{morale_range}}}<!--
     -->|{{{morale_hint}}}<!--
     -->|{{{morale_hint}}}<!--
-->}}<!--
-->}}</div><!--
--> | {{Hint<!--
--><div>{{Hint<!--
     -->|[[File:Icon_Stats_Luck.png|24px|link=]] {{{luck_range}}}<!--
     -->|[[File:Icon_Stats_Luck.png|24px|link=]] {{{luck_range}}}<!--
     -->|{{{luck_hint}}}<!--
     -->|{{{luck_hint}}}<!--
-->}}<!--
-->}}</div><!--
--> | {{Hint<!--
--><div>{{Hint<!--
     -->|[[File:Skill_Necromancy.png|24px|link=]] <!--
     -->|[[File:Skill_Necromancy.png|24px|link=]] <!--
         -->{{Translation|wiki_{{#ifexpr: {{{necromancy}}}=1|yes|no}}|{{{lang}}}}}<!--
         -->{{Translation|wiki_{{#ifexpr: {{{necromancy}}}=1|yes|no}}|{{{lang}}}}}<!--
     -->|{{{necromancy_hint}}}<!--
     -->|{{{necromancy_hint}}}<!--
    -->|side=left<!--
-->}}</div><!--
-->}}<!--
--></div><!--
--></div><!--
--></includeonly><!--
--></includeonly><!--
################################################################################
################################################################################
Line 38: Line 43:
</nowiki></pre>
</nowiki></pre>


{{Color|lime|Output:}}
{{Color|lime|Output:}}<br>
{{UnitAbilities/stats
{{UnitAbility/stats
| lang = en
| lang = en
| morale_hint = Morale range
| morale_hint = Morale range
Line 52: Line 57:
{{Color|yellow|Input:}}
{{Color|yellow|Input:}}
<pre><nowiki>
<pre><nowiki>
{{UnitAbilities/stats
{{UnitAbility/stats
| lang = en
| lang = en
| morale_hint = Morale
| morale_hint = Morale
Line 63: Line 68:
</nowiki></pre>
</nowiki></pre>


{{Color|lime|Output:}}
{{Color|lime|Output:}}<br>
{{UnitAbilities/stats
{{UnitAbility/stats
| lang = en
| lang = en
| morale_hint = Morale
| morale_hint = Morale
Line 77: Line 82:


<pre><nowiki>
<pre><nowiki>
{{UnitAbilities/stats
{{UnitAbility/stats
| lang = ja
| lang = ja
| morale_hint = 士気
| morale_hint = 士気
Line 88: Line 93:
</nowiki></pre>
</nowiki></pre>


{{Color|lime|Output:}}
{{Color|lime|Output:}}<br>
{{UnitAbilities/stats
{{UnitAbility/stats
| lang = ja
| lang = ja
| morale_hint = 士気
| morale_hint = 士気

Latest revision as of 23:46, 4 August 2026

Renders the Morale, Luck and Necromancy stats for an ability.

This is normally instantiated by the Module:UnitAbility/buildStats() function, by parsing the game description of a creature type.

Usage

1. With truthy values:

Input:

{{UnitAbility/stats
| lang = en
| morale_hint = Morale range
| morale_range = -5 to 5
| luck_hint = Luck range
| luck_range = -3 to 3
| necromancy_hint = Fallen Living creatures can be raised as Undead after battle.
| necromancy = 1
}}

Output:

-5 to 5Morale range
-3 to 3Luck range
YesFallen Living creatures can be raised as Undead after battle.

2. With falsy values: Input:

{{UnitAbility/stats
| lang = en
| morale_hint = Morale
| morale_range = Always neutral
| luck_hint = Luck
| luck_range = Always neutral
| necromancy_hint = Fallen Constructs cannot be raised as Undead after battle.
| necromancy = 0
}}

Output:

Always neutralMorale
Always neutralLuck
NoFallen Constructs cannot be raised as Undead after battle.

3. Japanese:

{{UnitAbility/stats
| lang = ja
| morale_hint = 士気
| morale_range = –3~3
| luck_hint = 幸運
| luck_range = –5~5
| necromancy_hint = 倒れた魔法クリーチャーは、戦闘後にアンデッドとして蘇生できる。
| necromancy = 1
}}

Output:

–3~3士気
–5~5幸運
Yes💬倒れた魔法クリーチャーは、戦闘後にアンデッドとして蘇生できる。