Template:UnitAbility/base: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
Added support for manual ability rank info |
No edit summary |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 34: | Line 34: | ||
}}<!-- | }}<!-- | ||
--></div><!-- end type | --></div><!-- end type | ||
--><div class='title'><!-- | --><div class='title'><!-- | ||
-->{{{title}}} {{#if:{{{rank|}}}|<small> - {{Hint|{{{rank}}}|{{{ | -->{{{title}}} {{#if:{{{rank|}}}|<!-- | ||
--><small>- {{Hint<!-- | |||
-->|{{Translation|wiki_ability_rank_{{{rank}}}|{{{lang}}}}}<!-- | |||
-->|{{Translation|wiki_ability_versions|{{{lang}}}}}<!-- | |||
-->}}<!-- | |||
--></small><!-- | |||
-->}}<!-- | |||
--></div><!-- end title | --></div><!-- end title | ||
--><div class='extra'><!-- | --><div class='extra'><!-- | ||
-->{{#switch: {{{type}}} | -->{{#switch: {{{type}}} | ||
| attack_type = {{#switch: {{{icon}}} | | attack_type = {{#switch: {{{icon}}} | ||
| melee_attack = | | melee_attack = | ||
| Line 98: | Line 99: | ||
-->}}<!-- | -->}}<!-- | ||
-->{{#ifeq: {{{type|}}}|creature_type | -->{{#ifeq: {{{type|}}}|creature_type | ||
|{{#invoke: | |{{#invoke:UnitAbility|extractDescription|description={{{description}}}}}<!-- | ||
--><br><!-- | |||
-->{{#invoke:UnitAbility|buildStats | |||
|description={{{description}}} | |||
|type={{{icon}}} | |||
|lang={{{lang}}} | |||
}} | |||
|{{{description}}} | |{{{description}}} | ||
}}<!-- | }}<!-- | ||
-->{{#if: {{{info_description|}}}|<br><i>{{Translation|{{{info_description}}}|{{{lang}}}}}</i>}}<!-- | -->{{#if: {{{info_description|}}}|<br><i>{{Translation|{{{info_description}}}|{{{lang}}}}}</i>}}<!-- | ||
-->{{#if: {{{immunities|}}}|<br><i><span style="color:#c8b36c">{{Translation|{{{immunities}}}|{{{lang}}}}}.</span></i>}}<!-- | |||
--></div><!-- end content | --></div><!-- end content | ||
--></div><!-- end unit-ability | --></div><!-- end unit-ability | ||
| Line 310: | Line 318: | ||
---- | ---- | ||
8. Manually added rank information after the ability title ({{b|rank}} | 8. Manually added rank information after the ability title ({{b|rank}}): | ||
{{Color|yellow|Input:}} | {{Color|yellow|Input:}} | ||
| Line 319: | Line 327: | ||
| icon = druid_ability_1 | | icon = druid_ability_1 | ||
| title = Shroomsong | | title = Shroomsong | ||
| rank = | | rank = 2 | ||
| description = Once per battle, spends all Focus Charges to restore the hero’s mana: 6 for each Focus Charge spent. | | description = Once per battle, spends all Focus Charges to restore the hero’s mana: 6 for each Focus Charge spent. | ||
| category = Special | | category = Special | ||
| Line 335: | Line 342: | ||
| icon = druid_ability_1 | | icon = druid_ability_1 | ||
| title = Shroomsong | | title = Shroomsong | ||
| rank = | | rank = 2 | ||
| description = Once per battle, spends all Focus Charges to restore the hero’s mana: 6 for each Focus Charge spent. | | description = Once per battle, spends all Focus Charges to restore the hero’s mana: 6 for each Focus Charge spent. | ||
| category = Special | | category = Special | ||
| Line 346: | Line 352: | ||
<br> | <br> | ||
<br> | <br> | ||
---- | |||
9. With a list of immunities ({{b|immunities}}): | |||
{{Color|yellow|Input:}} | |||
<pre><nowiki> | |||
{{UnitAbility/base | |||
| lang = en | |||
| type = passive | |||
| icon = flicker_passive_1 | |||
| title = Phantom Vampirism | |||
| rank = 1 | |||
| description = Each attack restores 20% of Damage dealt as HP to this creature. This can create temporary units in this creature’s stack. | |||
| immunities = Does not affect Undead, Embodiments, or Constructs. | |||
}} | |||
</nowiki></pre> | |||
{{Color|lime|Output:}} | |||
{{UnitAbility/base | |||
| lang = en | |||
| type = passive | |||
| icon = flicker_passive_1 | |||
| title = Phantom Vampirism | |||
| rank = 1 | |||
| description = Each attack restores 20% of Damage dealt as HP to this creature. This can create temporary units in this creature’s stack. | |||
| immunities = Does not affect Undead, Embodiments, or Constructs | |||
}} | |||
<br> | |||
<br> | |||
<br> | |||
</noinclude> | </noinclude> | ||
Latest revision as of 14:01, 6 September 2026
Renders raw properties for a single ability.
1. The first ability always has type=creature_type:
Input:
{{UnitAbility/base
| lang = en
| type = creature_type
| icon = embodiment
| title = Embodiment
| description = A spirit, soul, or other intangible power that has coalesced into material form.<br><br>Morale range: –3 to 3.<br>Luck range: –3 to 3.<br><br>Fallen Embodiments cannot be raised as Undead after battle.
}}
Output:
Creature Type
Embodiment
A spirit, soul, or other intangible power that has coalesced into material form.
–3 to 3Morale range
–3 to 3Luck range
NoFallen Embodiments cannot be raised as Undead after battle.
2. The second ability always has type=attack_type:
Input:
{{UnitAbility/base
| lang = en
| type = attack_type
| icon = ranged_attack_no_close
| title = Ranged Attack
| description = Can attack enemies at any range.<br>Targets 3 or more hexes away take –10% Damage per hex (up to –50%).
}}
Output:
Attack Type
Ranged Attack
No melee penalty
Can attack enemies at any range.
Targets 3 or more hexes away take –10% Damage per hex (up to –50%).
Targets 3 or more hexes away take –10% Damage per hex (up to –50%).
3. The third ability always has type=move_type, but is not displayed for grounded creatures:
Input:
{{UnitAbility/base
| lang = en
| type = move_type
| icon = fly
| title = Flying
| description = Movement ignores obstacles and traps.
}}
Output:
Movement Type
Flying
Movement ignores obstacles and traps.
4. Passive ability:
Input:
{{UnitAbility/base
| lang = en
| type = passive
| icon = assassin_passive_1
| title = Weak Spot
| description = Lucky Strikes deal +100% Damage, and the maximum possible Luck is increased to 5.
}}
Output:
Passive Ability
Weak Spot
Lucky Strikes deal +100% Damage, and the maximum possible Luck is increased to 5.
5. Active ability as an alternative attack (invalid cooldown):
Input:
{{UnitAbility/base
| lang = en
| type = active
| icon = black_dragon_ability_1
| title = Fighting Style: Sulfurous Assault
| description = Performs a Cone Strike, dealing –50% Damage to each target.
| cooldown = -1
}}
Output:
Alternative Attack
Fighting Style: Sulfurous Assault
Performs a Cone Strike, dealing –50% Damage to each target.
6. Active ability, with category, cooldown, focus_cost and tier:
Input:
{{UnitAbility/base
| lang = en
| type = active
| icon = black_dragon_ability_2
| title = Inner Flame
| description = Until the end of the next round, deals [ 30 × amount of units ] Magic Damage when attacked in Melee.
| category = Positive effect
| cooldown = 3
| focus = 3
| tier = 3
}}
Output:
Active Ability
Inner Flame
Positive effect💬
Cost: 

3 Focus ChargesCooldown: 3 roundsTier III
Until the end of the next round, deals [ 30 × amount of units ] Magic Damage when attacked in Melee.
7. Extra message added after the description (info_description):
Input:
{{UnitAbility/base
| lang = en
| type = active
| icon = black_dragon_ability_2
| title = Inner Flame
| description = Until the end of the next round, deals [ 30 × amount of units ] Magic Damage when attacked in Melee.
| category = Positive effect
| cooldown = 3
| focus = 3
| tier = 3
| info_description = Does not end the turn.
}}
Output:
Active Ability
Inner Flame
Positive effect💬
Cost: 

3 Focus ChargesCooldown: 3 roundsTier III
Until the end of the next round, deals [ 30 × amount of units ] Magic Damage when attacked in Melee.Does not end the turn.💬
8. Manually added rank information after the ability title (rank):
Input:
{{UnitAbility/base
| lang = en
| type = active
| icon = druid_ability_1
| title = Shroomsong
| rank = 2
| description = Once per battle, spends all Focus Charges to restore the hero’s mana: 6 for each Focus Charge spent.
| category = Special
| cooldown = 2
| focus = 2
| tier = 2
}}
Output:
Active Ability
Shroomsong - Rank IIThis ability has multiple versions.
Special💬
Cost: 
2 Focus ChargesCooldown: 2 roundsTier II
Once per battle, spends all Focus Charges to restore the hero’s mana: 6 for each Focus Charge spent.
9. With a list of immunities (immunities):
Input:
{{UnitAbility/base
| lang = en
| type = passive
| icon = flicker_passive_1
| title = Phantom Vampirism
| rank = 1
| description = Each attack restores 20% of Damage dealt as HP to this creature. This can create temporary units in this creature’s stack.
| immunities = Does not affect Undead, Embodiments, or Constructs.
}}
Output:
Passive Ability
Phantom Vampirism - Rank IThis ability has multiple versions.
Each attack restores 20% of Damage dealt as HP to this creature. This can create temporary units in this creature’s stack.
Does not affect Undead, Embodiments, or Constructs💬.
Does not affect Undead, Embodiments, or Constructs💬.


