Modding:Spells
Spells
In Isleward, spells are configured in a few different places using various events: the spell info, spell config, and spell template.
As of the last edit, spells are built in server/components/spellbook.js
with addSpellFromRune(runeSpell, spellId)
which uses playerSpell
(spell template), playerSpellConfig
(spell config), and runeSpell
(from the rune item's spell
property).
The spell is built using extend which means that properties in the spell config will override the spell template and properties in the rune's spell property will override both.
Runes can also randomly roll stats which are rolled randomly and added to the built spell's values
property.
This will be added to this page eventually, but it is clear in the code.
runeSpell.properties
is also copied to the built spell.
runeSpell.cdMult
is multiplied on the built spell's cdMax
.
After that, addSpell(options, spellId)
is called, which builds a new spell using the generic spell template, the type template, and the options built in addSpellFromRune
.
It also sets the properties obj
, baseDamage
, and cd
.
Additionally, it sets up the animation, calls calcDps
on the built spell, initializes it if necessary, and updates the player's spellbook using the syncer.
Spell Info
Spell info configured graphical, client-side appearance for the spell.
Examples don't include every possible value.
Property | Type | Notes | Examples |
---|---|---|---|
name |
String | The name displayed in the ability list in the HUD. | |
description |
String | The description displayed in the ability list in the HUD. | |
type |
String | The spell template used for casting the spell. | |
spritesheet |
String | The spritesheet for the ability icon. | |
icon |
[Int, Int] | The 0-indexed position of the icon in the spritesheet. | |
animation |
String | The casting animation to use. Sometimes weird because different animations are available for the current equipped skin. | hitStaff , raiseStaff , hitSword , raiseShield , raiseHands
|
spellType |
String | buff , aura , warnBlast
| |
particles |
Object | The particles used by this spell. Check existing spells for reference. |
Spell Config
TBA
Spell Template
TBA