WoW:PowerType: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (Move page script moved page PowerType to PowerType without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:


== Constants ==
== Constants ==
{{Sectionstub}}
These are found in [[FrameXML]]\Constants.lua.


These are found in FrameXML\Constants.lua.
:;SPELL_POWER_MANA = 0 : Mana will range from 0 to the maximum mana a unit has.  Player mana pools are calculated based on a base mana pool plus a certain amount given by the Intellect stat.  This is the default power type for most non-player units, although there are exceptions. As of {{Legion-inline}} Legion, mana is used by Druids, Mages, Mistweaver Monks, Paladins, Priests, Shamans and Warlocks.
:;SPELL_POWER_RAGE = 1 : [[Rage]] is used by Warriors and Druids in {{ability|Bear Form}}.  Rage goes from 0 to 100, but may be increased via player talents.  Rage degenerates back to 0 out of combat.
:;SPELL_POWER_FOCUS = 2 : [[Focus]] is used by Hunters and hunter pets.  Focus goes from 0 to 100, and has a slow regeneration rate, but certain abilities will generate focus.
:;SPELL_POWER_ENERGY = 3 : [[Energy]] is used by Rogues and Druids in {{ability|Cat Form}}.  Energy goes from 0 to 100, but may be increased via player talents.
:;SPELL_POWER_COMBO_POINTS = 4 : [[Combo Points]] are generated by a few Rogue abilities and consumed by [[finishing move]]s.
:;SPELL_POWER_RUNES = 5 : [[Runes (resource)|Runes]] are used as a power type for Death Knights.  By default, they have 6 runes (1 & 2 are blood, 3 & 4 are frost, 5 & 6 are unholy), but certain talents and abilities may change the type of a rune.  Runes can be converted into a Death Rune, which can be used as any other type of rune. While runes are used by Death Knights, it does not appear that the Blizzard UI code uses this spell power type. Rather, runes are managed through the RUNE_POWER_UPDATE event via the GetRuneCooldown() API call.
:;SPELL_POWER_RUNIC_POWER = 6 : [[Runic Power]] is used by Death Knights.  It is gained via certain abilities, and does not degenerate out of combat.
:;SPELL_POWER_SOUL_SHARDS = 7 : [[Soul Shards]] are collected by Warlocks, and range from 0 to 5 (was 0 to 3) indicating how many are available.  Soul Shards degenerate out of combat (used to not in {{Warlords-inline}} Warlords of Draenor).
:;SPELL_POWER_LUNAR_POWER = 8 : {{wl-inline}} [[Astral Power]] (Lunar/Solar) is used by Balance Druids . It goes from 0 to 100, and its use as solar or lunar power is determined by what buff is active on the player.
:;SPELL_POWER_HOLY_POWER = 9 : [[Holy Power]] generated by a few Paladin abilities and consumed by a few others. Can range from 0 to 5 and degenerate out of combat.
:;SPELL_POWER_ALTERNATE_POWER = 10 : Appears to be used by some bosses. Does not appear in Blizzard UI code.
:;SPELL_POWER_MAELSTROM = 11 : {{wl-inline}} [[Maelstrom (resource)|Maelstrom]] is generated and used by Elemental Shaman abilities.
:;SPELL_POWER_CHI = 12 : {{wl-inline}} [[Chi]] on the Monk's unit frame, who gains between 0 to 4 Chi points (6 Chi points with Ascendance selected) through the use of certain class spells while required in varying numbers to use other class spells and do not degenerate over time.
:;SPELL_POWER_INSANITY = 13 : {{wl-inline}} Called [[Insanity]] in-game and used by Shadow Priests.
:;SPELL_POWER_OBSOLETE = 14 : ''See [[#Removed_from_game|"Removed from game" section]].''
:;SPELL_POWER_OBSOLETE2 = 15 : ''See [[#Removed_from_game|"Removed from game" section]].''
:;SPELL_POWER_ARCANE_CHARGES = 16 : {{wl-inline}} [[Arcane Charges]] are generated by Arcane Blast, Arcane Missiles, and Arcane Explosion, and consumed by Arcane Barrage and Evocation.
:;SPELL_POWER_FURY = 17 : {{l-inline}} [[Fury]] is generated by a few Havoc Demon Hunter abilities and consumed by a few others.
:;SPELL_POWER_PAIN = 18 : {{l-inline}} [[Fury]] is generated by a few Vengeance Demon Hunter abilities and consumed by a few others.


:;SPELL_POWER_MANA = 0 : Mana will range from 0 to the maximum mana a unit has.  Player mana pools are calculated based on a base mana pool plus a certain amount given by the Intellect stat.  This is the default power type for most non-player units, although there are exceptions.
== Removed from game ==
 
{{Rfg-section|expansion=legion}}
:;SPELL_POWER_RAGE = 1 : Rage is used by Warriors and Druids in bear form.  Rage goes from 0 to 100, but may be increased via player talents.  Rage degenerates back to 0 out of combat.
:;SPELL_POWER_HAPPINESS = 4 : Was obsolete.
:;SPELL_POWER_FOCUS = 2 : Focus is used by Hunters and hunter pets.  Focus goes from 0 to 100, and has a slow regeneration rate, but certain abilities will generate focus.
:;SPELL_POWER_ENERGY = 3 : Energy is used by Rogues and Druids in cat form.  Energy goes from 0 to 100, but may be increased via player talents.
:;SPELL_POWER_HAPPINESS = 4 : (obsolete -- no longer used)
:;SPELL_POWER_RUNES = 5 : Runes are used as a power type for Death Knights.  By default, they have 6 runes (1 & 2 are blood, 3 & 4 are frost, 5 & 6 are unholy), but certain talents and abilities may change the type of a rune.  Runes can be converted into a Death Rune, which can be used as any other type of rune. While runes are used by Death Knights, it does not appear that the Blizzard UI code uses this spell power type. Rather, runes are managed through the RUNE_POWER_UPDATE event via the GetRuneCooldown() API call.
:;SPELL_POWER_RUNIC_POWER = 6 : Runic power is used by Death Knights.  It is gained via certain abilities, and does not degenerate out of combat.
:;SPELL_POWER_SOUL_SHARDS = 7 : Soul Shards are collected by Warlocks, and range from 0 to 3 indicating how many are available.  Soul Shards do not degenerate out of combat.
:;SPELL_POWER_ECLIPSE = 8 : Eclipse is used by Druids in moonkin form.  Eclipse power goes from 0 to 100, and its use as solar or lunar power is determined by what buff is active on the player.
:;SPELL_POWER_ECLIPSE = 8 : Eclipse is used by Druids in moonkin form.  Eclipse power goes from 0 to 100, and its use as solar or lunar power is determined by what buff is active on the player.
:;SPELL_POWER_HOLY_POWER = 9 : Holy power is used by Paladins.
:;SPELL_POWER_ALTERNATE_POWER = 10 : Appears to be used by some bosses. Does not appear in Blizzard UI code
:;SPELL_POWER_DARK_FORCE = 11 : Does not appear in Blizzard UI code, notably semantically "opposite" to SPELL_POWER_LIGHT_FORCE.
:;SPELL_POWER_DARK_FORCE = 11 : Does not appear in Blizzard UI code, notably semantically "opposite" to SPELL_POWER_LIGHT_FORCE.
:;SPELL_POWER_LIGHT_FORCE = 12 : This power appears as Chi on the Monk's unit frame, who gains between 0 to 4 Chi points (6 Chi points with Ascendance selected) through the use of certain class spells while required in varying numbers to use other class spells and do not degenerate over time.
:;SPELL_POWER_LIGHT_FORCE = 12 : This power appears as Chi on the Monk's unit frame, who gains between 0 to 4 Chi points (6 Chi points with Ascendance selected) through the use of certain class spells while required in varying numbers to use other class spells and do not degenerate over time.
:;SPELL_POWER_SHADOW_ORBS = 13 : Used by Shadow Priests who gain between 0 and 3 from the use of Mind Blast and Shadow Word: Death and used to cast and empower Psychic Horror and Devouring Plague. Shadow Orbs do not decay over time.
:;SPELL_POWER_SHADOW_ORBS = 13 : Used by Shadow Priests who gain between 0 and 3 from the use of Mind Blast and Shadow Word: Death and used to cast and empower Psychic Horror and Devouring Plague. Shadow Orbs do not decay over time.
:;SPELL_POWER_BURNING_EMBERS = 14 : A new resource type added for Destruction Warlocks in the Mists of Pandaria 5.0 expansion. Up to three burning embers are accumulated by the Warlock through the casting of certain spells and used to power up the damage resulting from the casting of other spells. Up to 10 points are accumulated per ember (MAX_POWER_PER_EMBER) before the ember is empowered.
:;SPELL_POWER_BURNING_EMBERS = 14 : A new resource type added for Destruction Warlocks in the Mists of Pandaria (5.0) expansion. Up to three burning embers are accumulated by the Warlock through the casting of certain spells and used to power up the damage resulting from the casting of other spells. Up to 10 points are accumulated per ember (MAX_POWER_PER_EMBER) before the ember is empowered.
:;SPELL_POWER_DEMONIC_FURY = 15 : A mana-like resource ranging in value between 0 and 1000 for Demonology Warlocks, accumulated through the use of certain Warlock spells and spent while using Metamorphosis.
:;SPELL_POWER_DEMONIC_FURY = 15 : A mana-like resource ranging in value between 0 and 1000 for Demonology Warlocks in the Mists of Pandaria (5.0) expansion, accumulated through the use of certain Warlock spells and spent while using Metamorphosis.:


== Others ==
== Others ==
Line 29: Line 41:


== Notes ==
== Notes ==
* The differentiation between these power types in the API was added in patch 4.0
* The differentiation between these power types in the API was added in [[Patch 4.0]] ({{Cata-inline}} pre-patch).
 
== See also ==
* [[Resource mechanics]]
 
== External links ==
{{elink|icon=|site=Townlong-Yak.com|link=https://www.townlong-yak.com/framexml/live/Constants.lua|desc=FrameXML/Constants.lua|bydate=(sometimes a week or two behind current release; .lua, .toc, and .xml viewer)}}

Latest revision as of 04:48, 15 August 2023

API types

Many of the API functions which are used to gather information about a unit in the game world (Players, NPC's, Monsters, etc) will return information about types of powers that various units use as a basis for using abilities.

Constants[edit]

Icon-edit-22x22.png
Note: This is a generic section stub. You can help expand it by clicking Sprite-monaco-pencil.png Edit on the section title.

These are found in FrameXML\Constants.lua.

SPELL_POWER_MANA = 0
Mana will range from 0 to the maximum mana a unit has. Player mana pools are calculated based on a base mana pool plus a certain amount given by the Intellect stat. This is the default power type for most non-player units, although there are exceptions. As of Template:Legion-inline Legion, mana is used by Druids, Mages, Mistweaver Monks, Paladins, Priests, Shamans and Warlocks.
SPELL_POWER_RAGE = 1
Rage is used by Warriors and Druids in Template:Ability. Rage goes from 0 to 100, but may be increased via player talents. Rage degenerates back to 0 out of combat.
SPELL_POWER_FOCUS = 2
Focus is used by Hunters and hunter pets. Focus goes from 0 to 100, and has a slow regeneration rate, but certain abilities will generate focus.
SPELL_POWER_ENERGY = 3
Energy is used by Rogues and Druids in Template:Ability. Energy goes from 0 to 100, but may be increased via player talents.
SPELL_POWER_COMBO_POINTS = 4
Combo Points are generated by a few Rogue abilities and consumed by finishing moves.
SPELL_POWER_RUNES = 5
Runes are used as a power type for Death Knights. By default, they have 6 runes (1 & 2 are blood, 3 & 4 are frost, 5 & 6 are unholy), but certain talents and abilities may change the type of a rune. Runes can be converted into a Death Rune, which can be used as any other type of rune. While runes are used by Death Knights, it does not appear that the Blizzard UI code uses this spell power type. Rather, runes are managed through the RUNE_POWER_UPDATE event via the GetRuneCooldown() API call.
SPELL_POWER_RUNIC_POWER = 6
Runic Power is used by Death Knights. It is gained via certain abilities, and does not degenerate out of combat.
SPELL_POWER_SOUL_SHARDS = 7
Soul Shards are collected by Warlocks, and range from 0 to 5 (was 0 to 3) indicating how many are available. Soul Shards degenerate out of combat (used to not in Template:Warlords-inline Warlords of Draenor).
SPELL_POWER_LUNAR_POWER = 8
Template:Wl-inline Astral Power (Lunar/Solar) is used by Balance Druids . It goes from 0 to 100, and its use as solar or lunar power is determined by what buff is active on the player.
SPELL_POWER_HOLY_POWER = 9
Holy Power generated by a few Paladin abilities and consumed by a few others. Can range from 0 to 5 and degenerate out of combat.
SPELL_POWER_ALTERNATE_POWER = 10
Appears to be used by some bosses. Does not appear in Blizzard UI code.
SPELL_POWER_MAELSTROM = 11
Template:Wl-inline Maelstrom is generated and used by Elemental Shaman abilities.
SPELL_POWER_CHI = 12
Template:Wl-inline Chi on the Monk's unit frame, who gains between 0 to 4 Chi points (6 Chi points with Ascendance selected) through the use of certain class spells while required in varying numbers to use other class spells and do not degenerate over time.
SPELL_POWER_INSANITY = 13
Template:Wl-inline Called Insanity in-game and used by Shadow Priests.
SPELL_POWER_OBSOLETE = 14
See "Removed from game" section.
SPELL_POWER_OBSOLETE2 = 15
See "Removed from game" section.
SPELL_POWER_ARCANE_CHARGES = 16
Template:Wl-inline Arcane Charges are generated by Arcane Blast, Arcane Missiles, and Arcane Explosion, and consumed by Arcane Barrage and Evocation.
SPELL_POWER_FURY = 17
Template:L-inline Fury is generated by a few Havoc Demon Hunter abilities and consumed by a few others.
SPELL_POWER_PAIN = 18
Template:L-inline Fury is generated by a few Vengeance Demon Hunter abilities and consumed by a few others.

Removed from game[edit]

Template:Rfg-section

SPELL_POWER_HAPPINESS = 4
Was obsolete.
SPELL_POWER_ECLIPSE = 8
Eclipse is used by Druids in moonkin form. Eclipse power goes from 0 to 100, and its use as solar or lunar power is determined by what buff is active on the player.
SPELL_POWER_DARK_FORCE = 11
Does not appear in Blizzard UI code, notably semantically "opposite" to SPELL_POWER_LIGHT_FORCE.
SPELL_POWER_LIGHT_FORCE = 12
This power appears as Chi on the Monk's unit frame, who gains between 0 to 4 Chi points (6 Chi points with Ascendance selected) through the use of certain class spells while required in varying numbers to use other class spells and do not degenerate over time.
SPELL_POWER_SHADOW_ORBS = 13
Used by Shadow Priests who gain between 0 and 3 from the use of Mind Blast and Shadow Word: Death and used to cast and empower Psychic Horror and Devouring Plague. Shadow Orbs do not decay over time.
SPELL_POWER_BURNING_EMBERS = 14
A new resource type added for Destruction Warlocks in the Mists of Pandaria (5.0) expansion. Up to three burning embers are accumulated by the Warlock through the casting of certain spells and used to power up the damage resulting from the casting of other spells. Up to 10 points are accumulated per ember (MAX_POWER_PER_EMBER) before the ember is empowered.
SPELL_POWER_DEMONIC_FURY = 15
A mana-like resource ranging in value between 0 and 1000 for Demonology Warlocks in the Mists of Pandaria (5.0) expansion, accumulated through the use of certain Warlock spells and spent while using Metamorphosis.:

Others[edit]

There are two other types, AMMOSLOT and FUEL, as returned by {api UnitPowerType|UnitPowerType}. These are used by vehicles, but do not appear to have a constant associated with them. Some raid bosses have a special "encounter meter" which is sometime based on a powertype (ex. Atramedes, powertype=10 rises during the fight)

Notes[edit]

See also[edit]

External links[edit]