Skip to content

Combat

The Combat library contains methods for querying information about ongoing combats.

CombatLib Class

Inherits from Library.

Methods

GetActiveCombatant
function CombatLib.GetActiveCombatant()
   -> CombatLib_CombatCompatibleEntity

Returns the current active combatant in a combat.

GetCombat
function CombatLib.GetCombat(combatID)
   -> EclTurnManagerCombat|EsvTurnManagerCombat

@param combatID integer

GetCombatComponent
function CombatLib.GetCombatComponent(entity)
   -> EocCombatComponent? -- `nil` if the entity does not have the component.

Returns the combat component of an entity.

@param entity CombatLib_CombatCompatibleEntity

GetCombatID
function CombatLib.GetCombatID(entity)
   -> integer? -- `nil` if the entity is not in combat.

Returns the combat ID of an entity.

@param entity CombatLib_CombatCompatibleEntity

GetTurnManager
function CombatLib.GetTurnManager()
   -> EclTurnManager|EsvTurnManager
GetTurnOrder
function CombatLib.GetTurnOrder() -- (Client-only)
   -> CombatLib_TurnOrder

Returns the character participants of a combat.