Template:StatDiff: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
Created page with "<includeonly><!-- -->{{#ifexpr: {{{1|}}}>{{{2|}}}|<!-- --><sup>{{Hint |10px|link= |This stat is higher compared to the base unit.<!-- -->}}</sup>|}}<!-- -->{{#ifexpr: {{{1|}}}<{{{2|}}}|<!-- --><sup>{{Hint |10px|link= |This stat is lower compared to the base unit.<!-- -->}}</sup>|}}<!-- --></includeonly><!-- ########################################################..."
 
No edit summary
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
-->{{#ifexpr: {{{1|}}}>{{{2|}}}|<!--
-->{{#ifexpr: {{{1|}}}>{{{2|}}}|<!--
     --><sup>{{Hint
     -->{{Hint<!--
         |[[File:Battleframe_buff.png|10px|link=]]
         -->|<sup>[[File:Battleframe_buff.png|10px|link=]]</sup><!--
         |This stat is higher compared to the base unit.<!--
        -->|{{Translation|wiki_diff_higher|{{{lang|en}}} }}<br><br><!--
     -->}}</sup>|}}<!--
        -->{{Translation|wiki_diff_base|{{{lang|en}}} }} {{{2}}}<br><!--
            -->{{Translation|wiki_diff_increase|{{{lang|en}}} }} <!--
            --><span style{{=}}'color:lime'>+{{#expr: {{{1}}}-{{{2}}}}}</span><!--
         -->|style=max-width:none;width:150px<!--
     -->}}<!--
-->|}}<!--
-->{{#ifexpr: {{{1|}}}<{{{2|}}}|<!--
-->{{#ifexpr: {{{1|}}}<{{{2|}}}|<!--
     --><sup>{{Hint
     -->{{Hint<!--
         |[[File:Battleframe_debuff.png|10px|link=]]
         -->|<sup>[[File:Battleframe_debuff.png|10px|link=]]</sup><!--
         |This stat is lower compared to the base unit.<!--
        -->|{{Translation|wiki_diff_lower|{{{lang|en}}} }}<br><br><!--
     -->}}</sup>|}}<!--
        -->{{Translation|wiki_diff_base|{{{lang|en}}} }} {{{2}}}<br><!--
            -->{{Translation|wiki_diff_decrease|{{{lang|en}}} }} <!--
            --><span style{{=}}'color:#ff7676'>−{{#expr: {{{2}}}-{{{1}}}}}</span><!--
         -->|style=max-width:none;width:150px<!--
     -->}}<!--
-->|}}<!--
--></includeonly><!--
--></includeonly><!--
################################################################################
################################################################################
Line 19: Line 29:
1. Upwards:
1. Upwards:


{{Color|yellow|Input:}} <code><nowiki>{{StatDiff|100|105}}</nowiki></code>
{{Color|yellow|Input:}} <code><nowiki>{{StatDiff|105|100}}</nowiki></code>


{{Color|lime|Output:}} {{StatDiff|100|105}}
{{Color|lime|Output:}} {{StatDiff|105|100}}


----
----
2. Downwards:
2. Downwards:


{{Color|yellow|Input:}} <code><nowiki>{{StatDiff|100|95}}</nowiki></code>
{{Color|yellow|Input:}} <code><nowiki>{{StatDiff|95|100}}</nowiki></code>
 
{{Color|lime|Output:}} {{StatDiff|100|95}}


{{Color|lime|Output:}} {{StatDiff|95|100}}


----
----
Line 41: Line 50:
4. Japanese:
4. Japanese:


{{Color|yellow|Input:}} <code><nowiki>{{StatDiff|100|105|lang=ja}}</nowiki></code>
{{Color|yellow|Input:}} <code><nowiki>{{StatDiff|105|100|lang=ja}}</nowiki></code>


{{Color|lime|Output:}} {{StatDiff|100|105|lang=ja}}
{{Color|lime|Output:}} {{StatDiff|105|100|lang=ja}}


[[Category:Utility templates]]
[[Category:Utility templates]]
</noinclude>
</noinclude>

Latest revision as of 10:46, 15 July 2026

Compares two numbers and displays an upwards/downwards arrow, with an explicatory Hint.

Usage

1. Upwards:

Input: {{StatDiff|105|100}}

Output: This stat is higher compared to the base unit.

Base: 100
Increase: +5


2. Downwards:

Input: {{StatDiff|95|100}}

Output: This stat is lower compared to the base unit.

Base: 100
Decrease: −5


3. Equality:

Input: {{StatDiff|100|100}}

Output:


4. Japanese:

Input: {{StatDiff|105|100|lang=ja}}

Output: This stat is higher compared to the base unit.💬

Base:💬 100
Increase:💬 +5