Template:UnitAbility/stats: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
Created page with "<includeonly><!-- -->{{Hint<!-- -->|24px|link= {{{morale_range}}}<!-- -->|{{{morale_hint}}}<!-- -->}}<!-- --> | {{Hint<!-- -->|24px|link= {{{luck_range}}}<!-- -->|{{{luck_hint}}}<!-- -->}}<!-- --> | {{Hint<!-- -->|24px|link= <!-- -->{{Translation|wiki_{{#ifexpr: {{{necromancy}}}=1|yes|no}}|{{{lang}}}}}<!-- -->|{{{necromancy_hint}}}<!-- -->}}<!-- --></..." |
Newer formatting, implemented screen-size responsive hints |
||
| (One intermediate revision by one other user not shown) | |||
| 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><!-- | ||
--> | --><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><!-- | ||
--> | --><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}}}<!-- | ||
-->}}<!-- | -->}}</div><!-- | ||
--></div><!-- | |||
--></div><!-- | |||
--></includeonly><!-- | --></includeonly><!-- | ||
################################################################################ | ################################################################################ | ||
| Line 37: | Line 43: | ||
</nowiki></pre> | </nowiki></pre> | ||
{{Color|lime|Output:}} | {{Color|lime|Output:}}<br> | ||
{{ | {{UnitAbility/stats | ||
| lang = en | | lang = en | ||
| morale_hint = Morale range | | morale_hint = Morale range | ||
| Line 51: | Line 57: | ||
{{Color|yellow|Input:}} | {{Color|yellow|Input:}} | ||
<pre><nowiki> | <pre><nowiki> | ||
{{ | {{UnitAbility/stats | ||
| lang = en | | lang = en | ||
| morale_hint = Morale | | morale_hint = Morale | ||
| Line 62: | Line 68: | ||
</nowiki></pre> | </nowiki></pre> | ||
{{Color|lime|Output:}} | {{Color|lime|Output:}}<br> | ||
{{ | {{UnitAbility/stats | ||
| lang = en | | lang = en | ||
| morale_hint = Morale | | morale_hint = Morale | ||
| Line 76: | Line 82: | ||
<pre><nowiki> | <pre><nowiki> | ||
{{ | {{UnitAbility/stats | ||
| lang = ja | | lang = ja | ||
| morale_hint = 士気 | | morale_hint = 士気 | ||
| Line 87: | Line 93: | ||
</nowiki></pre> | </nowiki></pre> | ||
{{Color|lime|Output:}} | {{Color|lime|Output:}}<br> | ||
{{ | {{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:
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:
3. Japanese:
{{UnitAbility/stats
| lang = ja
| morale_hint = 士気
| morale_range = –3~3
| luck_hint = 幸運
| luck_range = –5~5
| necromancy_hint = 倒れた魔法クリーチャーは、戦闘後にアンデッドとして蘇生できる。
| necromancy = 1
}}
Output:


