GetSpellDefinition

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 12:44, 4 August 2026 by QCherry (talk | contribs) (Automatyczna aktualizacja dokumentacji funkcji)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

getSpellDefinition

Finds one spell definition by numeric identifier or stable key.

Syntax

table getSpellDefinition(int|string spell)

Parameters

Name Type Required Description
spell string yes A numeric spell id or stable spell key, including values from the global SPELL table.

Returns

Returns the spell definition table, or false when no matching spell exists.

Examples

Inspect the Fire Arrow definition:

local spell = getSpellDefinition(SPELL.FIRE_ARROW)
if spell then
    print("Mana cost:", spell.manaCost)
    print("Damage:", spell.damage)
end

Notes

  • Available only in server-side resource scripts.
  • Definitions include targeting, damage, timing, projectile and implementation metadata.