Template:UnitAbility/base: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary |
Added |link= to focus charge icons to make them not open the image when click or tapped |
||
| Line 71: | Line 71: | ||
-->{{Hint|<!-- | -->{{Hint|<!-- | ||
-->{{#ifexpr: {{{focus}}}>0|<!-- | -->{{#ifexpr: {{{focus}}}>0|<!-- | ||
--><span class='diamond'>[[File:Focus_Charge.png|16px]]</span>|—}}<!-- | --><span class='diamond'>[[File:Focus_Charge.png|16px|link=]]</span>|—}}<!-- | ||
-->{{#ifexpr: {{{focus}}}>1|<!-- | -->{{#ifexpr: {{{focus}}}>1|<!-- | ||
--><span class='diamond'>[[File:Focus_Charge.png|16px]]</span>|}}<!-- | --><span class='diamond'>[[File:Focus_Charge.png|16px|link=]]</span>|}}<!-- | ||
-->{{#ifexpr: {{{focus}}}>2|<!-- | -->{{#ifexpr: {{{focus}}}>2|<!-- | ||
--><span class='diamond'>[[File:Focus_Charge.png|16px]]</span>|}}<!-- | --><span class='diamond'>[[File:Focus_Charge.png|16px|link=]]</span>|}}<!-- | ||
-->| {{{focus|0}}} <!-- | -->| {{{focus|0}}} <!-- | ||
-->{{#ifexpr: {{{focus}}}=1 | -->{{#ifexpr: {{{focus}}}=1 | ||
Revision as of 12:49, 31 July 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
Script error: No such module "UnitAbilities".
Script error: No such module "UnitAbilities".
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.💬


