Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

X2CombatResource

Globals

CRU_DOUBLE_GAUGE

integer

CRU_DOUBLE_GAUGE_2

integer

CRU_GAUGE

integer

CRU_OVERLAP

integer

X2CombatResource

X2CombatResource

Aliases

COMBAT_RESOURCE_UITYPE

CRU_DOUBLE_GAUGE_2|CRU_DOUBLE_GAUGE|CRU_GAUGE|CRU_OVERLAP

-- api/X2CombatResource
COMBAT_RESOURCE_UITYPE:
    | `CRU_DOUBLE_GAUGE`
    | `CRU_DOUBLE_GAUGE_2`
    | `CRU_GAUGE`
    | `CRU_OVERLAP`

Classes

Class: X2CombatResource

Method: CheckCombatResourceMaxPointByGroupType

(method) X2CombatResource:CheckCombatResourceMaxPointByGroupType(groupType: `10`|`11`|`12`|`14`|`1`...(+10))
  -> maxPointByGroupType: boolean

Checks if the combat resource for the specified group type is at its maximum.

@param groupType — The group type to check.

@return maxPointByGroupTypetrue if the combat resource is at maximum, false otherwise.

-- api/X2Ability
groupType:
    | `ABILITY_GENERAL`
    | `1` -- BATTLERAGE (FIGHT)
    | `2` -- WITCHCRAFT (ILLUSION)
    | `3` -- DEFENSE (ADAMANT)
    | `4` -- AURAMANCY (WILL)
    | `5` -- OCCULTISM (DEATH)
    | `6` -- ARCHERY (WILD)
    | `7` -- SORCERY (MAGIC)
    | `8` -- SHADOWPLAY (VOCATION)
    | `9` -- SONGCRAFT (ROMANCE)
    | `10` -- VITALISM (LOVE)
    | `11` -- MALEDICTION (HATRED)
    | `12` -- SWIFTBLADE (ASSASSIN)
    | `14` -- SPELLDANCE (PLEASURE)
    | `ABILITY_MADNESS` -- GUNSLINGER (MADNESS)

Method: GetCombatResourceInfo

(method) X2CombatResource:GetCombatResourceInfo()
  -> combatResourceInfo: CombatResources

Retrieves a list of combat resource information for all available ability types.

@return combatResourceInfo — A table of combat resource information.

See: CombatResources

Method: GetCombatResourceInfoByGroupType

(method) X2CombatResource:GetCombatResourceInfoByGroupType(groupType: `10`|`11`|`12`|`14`|`1`...(+10))
  -> combatResourceInfo: CombatResource|nil

Retrieves combat resource information for the specified group type if the player has it.

@param groupType — The group type to query.

@return combatResourceInfo — The combat resource information, or nil if not available.

-- api/X2Ability
groupType:
    | `ABILITY_GENERAL`
    | `1` -- BATTLERAGE (FIGHT)
    | `2` -- WITCHCRAFT (ILLUSION)
    | `3` -- DEFENSE (ADAMANT)
    | `4` -- AURAMANCY (WILL)
    | `5` -- OCCULTISM (DEATH)
    | `6` -- ARCHERY (WILD)
    | `7` -- SORCERY (MAGIC)
    | `8` -- SHADOWPLAY (VOCATION)
    | `9` -- SONGCRAFT (ROMANCE)
    | `10` -- VITALISM (LOVE)
    | `11` -- MALEDICTION (HATRED)
    | `12` -- SWIFTBLADE (ASSASSIN)
    | `14` -- SPELLDANCE (PLEASURE)
    | `ABILITY_MADNESS` -- GUNSLINGER (MADNESS)

See: CombatResource