Template:UnitAbility/base: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
Created page with "<includeonly><!-- --><templatestyles src="Template:UnitAbility/styles.css" /><!-- --><div class='unit-ability'><!-- --><div class='header'><!-- --><div class='icon'><!-- --><div class='ring' style='pointer-events:none'><!-- -->70px|link=<!-- --></div><!-- -->File:{{#switch: {{{type}}} | creature_type = Base_class_{{{icon}}} | attack_t..." |
No edit summary |
||
| Line 6: | Line 6: | ||
--><div class='ring' style='pointer-events:none'><!-- | --><div class='ring' style='pointer-events:none'><!-- | ||
-->[[File:Frame_Ability_HUDBattle_Top.png|70px|link=]]<!-- | -->[[File:Frame_Ability_HUDBattle_Top.png|70px|link=]]<!-- | ||
--></div><!-- | --></div><!-- end ring | ||
-->[[File:{{#switch: {{{type}}} | -->[[File:{{#switch: {{{type}}} | ||
| creature_type = Base_class_{{{icon}}} | | creature_type = Base_class_{{{icon}}} | ||
| Line 19: | Line 19: | ||
| #default = {{{icon}}} | | #default = {{{icon}}} | ||
}}.png|64px|link=]]<!-- | }}.png|64px|link=]]<!-- | ||
--></div><!-- | --></div><!-- end icon | ||
--><div class='brief'><!-- | --><div class='brief'><!-- | ||
--><div class='type'><!-- | --><div class='type'><!-- | ||
| Line 33: | Line 33: | ||
| #default = | | #default = | ||
}}<!-- | }}<!-- | ||
--></div><!-- | --></div><!-- end type | ||
--><div class='title'><!-- | --><div class='title'><!-- | ||
-->{{{title}}}<!-- | -->{{{title}}}<!-- | ||
--></div><!-- | --></div><!-- end title | ||
--><div class='extra'><!-- | --><div class='extra'><!-- | ||
-->{{#switch: {{{type}}} | -->{{#switch: {{{type}}} | ||
| Line 61: | Line 61: | ||
| #default = | | #default = | ||
}}<!-- | }}<!-- | ||
--></div><!-- | --></div><!-- end extra | ||
--></div><!-- | --></div><!-- end brief | ||
--></div><!-- | --></div><!-- end header | ||
--><div class='content'><!-- | --><div class='content'><!-- | ||
-->{{#ifexpr: {{#if:{{{cooldown|}}}|{{{cooldown}}}|-1}}>-1 | -->{{#ifexpr: {{#if:{{{cooldown|}}}|{{{cooldown}}}|-1}}>-1 | ||
| Line 102: | Line 102: | ||
}}<!-- | }}<!-- | ||
-->{{#if: {{{info_description|}}}|<br><i>{{{info_description}}}</i>}}<!-- | -->{{#if: {{{info_description|}}}|<br><i>{{{info_description}}}</i>}}<!-- | ||
--></div><!-- | --></div><!-- end content | ||
--></div><!-- end unit-ability | |||
--></includeonly><!-- | --></includeonly><!-- | ||
################################################################################ | ################################################################################ | ||
Revision as of 05:57, 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
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


