Manual:Spells.xml

After creating a mod, Spell descendant elements within an element of Spells inside Spells.xml allows for the creation of spells, through SpellObjects.

Spells.xml Format
  

Spell Element Syntax
       <Tags></Tags> <Action></Action> <Params></Params> <Description></Description> <Flavor></Flavor> <Rarity></Rarity> <Brand></Brand> <Mana></Mana> <Damage></Damage> <Shots></Shots> <Tiles></Tiles> <Location></Location> <TimeBetweenShots></TimeBetweenShots> <ShotVelocity></ShotVelocity> <ShotDuration></ShotDuration> <ShotDelay></ShotDelay> <CastDelay></CastDelay> <CastDuration></CastDuration> <BlastDuration></BlastDuration> <WarningDuration></WarningDuration> <DestroyOnHit></DestroyOnHit> <Hold></Hold> <OnCast></OnCast> <OnHit></OnHit> <Execute></Execute> <Flow></Flow> <TouchTile></TouchTile> <TrinityCast></TrinityCast> </Spell>

Elements
All elements are optional unless otherwise specified.

Spell
A mandatory parent element that contains an itemID attribute, denoting the spell's ID.

Action
A string value that determines what Lua function should be used for the behaviour of the spell.

BlastDuration
A float value determining how long the spell should linger for after it expires.

Brand
An string value that denotes the focus of the spell.

CastDelay
A float value denoting how many seconds should pass before the spell casts.

CastDuration
A float value denoting how many seconds should pass after the spell casts

Damage
Integer value that denotes the damage value of the spell.

Description
A string value using Rich Text to display a written representation of the spell. Note that certain keywords can be formatted by prefixing them with "ef.".

Keywords

 * ef.AtkDmg
 * ef.Backfire
 * ef.Consume
 * ef.Crack
 * ef.Flame
 * ef.Flames
 * ef.Flow
 * ef.FlowStack
 * ef.Fragile
 * ef.Frost
 * ef.Jam
 * ef.Jams
 * ef.Keyword
 * ef.Link
 * ef.Luck
 * ef.MaxHPChange
 * ef.MaxMana
 * ef.OnFlow
 * ef.Reflect
 * ef.Removal
 * ef.Root
 * ef.Shield
 * ef.ShuffleTime
 * ef.SpellPower
 * ef.TileBreak
 * ef.TileBreaks
 * ef.TileCrack
 * ef.Trinity
 * ef.Upgrader

DestroyOnHit
A boolean value that determines whether the projectile spawned from the cast is destroyed upon hitting a target.

Execute
An effect value that is triggered when an enemy dies. The element's attributes are passed to an EffectApp instance. Multiple of these elements can be present.

Flavor
A string value that represents the flavor text of the spell.

Flow
An effect value that is triggered when. The element's attributes are passed to an EffectApp instance. Multiple of these elements can be present.

HitAllies
A boolean value that determines whether the spell's projectiles can hit allies.

HitEnemies
A boolean value that determines whether the spell's projectiles can hit enemies.

HitSelf
A boolean value that determines whether the spell's projectiles can hit the caster.

HitStructures
A boolean value that determines whether the spell's projectiles can hit structures.

Hold
An effect value that is triggered when the spell is held. The possible relevant attributes in the element depend on the value passed.

Location
A location that denotes where the spell should target. Multiple elements can be present.

Mana
An integer value that denotes the mana cost of the spell.

MetaDISABLED
A string value that replaces the description if the description doesn't exist and the item can't be localized.

Name
A string value that determines the spell's name.

OnCast
An effect value that is triggered when the spell is cast. The element's attributes are passed to an EffectApp instance. Multiple of these elements can be present.

OnHit
An effect value that is triggered when the spell hits a target. The element's attributes are passed to an EffectApp instance. Multiple of these elements can be present.

Params
Valueless element that holds attributes which are passed to the Lua function with the same name of the Action element.

Rarity
An integer value that denotes the rarity of the spell.

ShotDelay
A float value denoting how many seconds the shot should wait until firing after the cast finishes.

ShotDuration
A float value denoting how many seconds each shot should be active for.

ShotVelocity
A float value denoting how fast the projectile is.

Shots
An integer value representing how many times the spell should be cast.

Stats
Stats holds no value on its own, but is used to read its attributes, which determines special properties about the spell. An exhaustive list can be found in Manual:SpellObject.

Tags
A comma delimited string value that determines what tags are applied to the spell.

Tiles
An integer value denoting how many tiles each shot should occupy. Intended behaviour depends on action type.

TimeBetweenShots
A float value denoting how many seconds should pass between each shot.

TouchTile
An effect value that is triggered when the spell travels over a tile. The element's attributes are passed to an EffectApp instance. Multiple of these elements can be present.

TrinityCast
An effect value that is triggered upon. The element's attributes are passed to an EffectApp instance. Multiple of these elements can be present.

WarningDuration
A float value denoting how long a telegraph should appear before a projectile is fired.