Skip to main content

Spell Structure

Spells are stored in dictionaries in a JSON file. When loaded into the game, this dictionary is stored twice. The first dictionary is called spell_base, and represents the base values of the spell. These values are only changed when the role of a specific class is changed (e.g. when changing from a healer to a tank, which can fundamentally change how the spell functions), but are not mutated by talents, buffs, debuffs, etc. The second dictionary is called spell_current, and represents the current state of the spell, which is affected by talents, buffs, debuffs, etc. This is separate from changes made to player stats.

The spell dictionaries store coefficients that are applied to the player stats, such that only the functionality of the spell itself is stored, along with effects that are applied to the spell specifically, For example, if all damage is increased by 10% via a talent or buff, this is done in the player stats, and not in the spell. However, if a very specific spell has its damage increased by 10% via a talent, this is represented in the spell dictionary.

The spell dictionary has the following keys
name: The name of the spell as displayed in the log and shown to players
resource_cost: The cost of the spell. This can be negative to allow for spells to build a resource
cooldown: The cooldown of a spell in seconds, independent of the global cooldown
on_gcd: Whether or not the spell is affected by the global cooldown, can be 0 (not affected) or 1 (affected)
spelltype: "damage", "heal" or "aura", depending on whcih type of event the spell triggers
damagetype: If spelltype is damage, whether this damage is physical or magic
healtype: If spelltype is heal, whether this heal is physical or magic
auratype: If spelltype is aura, whether the aura is a buff or debuff
value_base: Which stat is used as a base. Usually primary stat, but allows for things such as max health scaling
value_modifier: The coefficient that is applied to the base value to generate the final spell value
avoidable: Whether or not the spell can be avoided, can be 0 (not avoidable) or 1 (avoidable)
can_crit: Whether or not the spell can critically strike, can be 0 (cannot crit) or 1 (can crit)
crit_chance_modifier: increases to critical strike chance for this spell
crit_magnitude_modifier: The coefficient by which the critical strike increases the spell value