FANDOM


Spell ProgrammingEdit

There are various types of spell classes available, but most of these commands deal with either projectiles or explosions.

Many spell types outside of MagicMissile, SpreadMagicMissile, and Beam do not use these parameters, and are typically scripted to not be modifiable except by manipulating the variables within their arrays.

Command Description Type
mpCost The point cost required for a monster to be able to cast the spell. Int
baseDamage How much damage a spell can do at a minimum. Int
randDamage A randomized amount added onto base spell damage. Int
speed The projectile's movement speed. Float
spellColor

{r, g, b, a}

An array used to recolor spells via script. Array
damageType The damage type inflicted by the spell projectile. String
castSound The sound used when the projectile is created. String
hitSound The sound used when the projectile collides with something else. String
tex The non-animated texture for the projectile. Int
endAnimTex Uses all textures between tex and endAnimTex to create animated projectiles. Int
animSpeed The frame animation speed of the projectile. Int
spriteAtlas The sprite atlas used for the projectile textures. String
splashForce The knockback force of a spell projectile explosion.
splashRadius The tile radius of a spell projectile explosion. Float
fullbrite Boolean
knockback The distance of projectile knockback. Float
floating Enables / Disables gravity effects on projectile objects. Boolean
damageType Designates which damage type is inflicted by the spell. String
xSpread When the SpreadMagicMissile class is used, this determines how wide multi-projectile sprays can be. Float
ySpread When the SpreadMagicMissile class is used, this determines how tall multi-projectile sprays can be. Float
numProjectiles Sets the number of projectiles produced when SpreadMagicMissile is the class being used. Int
appearance An array used to more conveniently set all appearance variables. Array
scale Increases or decreases a projectile's size. Float
beamScale Increases or decreases a beam's size. Float
startTex Int
endTex Int