DataType: "SP", File: spells.txt

The spells list not only contains the list of spells that can be learned and cast by characters or by using a spell weapon object, but also spells cast only by monsters or elementals, or spells that only get cast when triggering a trap. All spells must be derived from one of a couple dozen fixed spell types, and the use of each spell type is limited in the game. Some can only be cast during combat, some can only be cast by characters, and some can be cast under any circumstance. You may have up to 255 different spells in your adventure, but keep in mind that each one adds about 75 bytes to your adventure. The following table outlines all the spell types, their uses, parameters, and limitations

The Monster/Elemental/Combat/Combat/Non-Combat columns in the following chart indicate where the spell may be used. For example, you should never give any spell of type "attack_all" to a monster. Any spell marked as Combat/Non-Combat can be given to character classes or to spell objects. The game engine will automatically restrict the use of that spell or spell weapon to only allow it to be used or cast at the appropriate time. However, the game will permit some non-combat spells to be cast at inappropriate times at the user's discretion (such as the OPEN PORTAL spell type).

Spell TypeMonster Elementals Combat Non-Combat Range Fire Magic Value Comment
alchemy No No No Yes 0 N/A N/A [1..255] Gives 1 gold for each SP used
armor_all Yes Yes Yes Yes 0 [0..99]% [0..99]% [-99..99] Positive values decrease (improve) AC, negative values increase AC
attack Yes Yes Yes No [1..7] [0.255] [0..255] [0..255] Value is physical damage against monster. fire, magic are damage values are added to attack only if character hits against monster's %fire, %magic protection.
attack_all No Yes Yes No [1..7] [0..255] [0..255] [0..255] Attacks all monsters across any combination of physical (value), fire, magic damage components
attack_group Yes Yes Yes No [1..7] [0.255] [0..255] [0..255] Value is physical damage against monster group. fire, magic are damage values are added to attack only if character hits against monster group's %fire, %magic protection.
batch_spell No No No Yes 0 N/A N/A [0..25] Casts compass, levitation, revelation for 10*value ticks
compass No No No Yes 0 N/A N/A [1..25] Shows compass icon for 10*value time intervals
confuse Yes Yes Yes No [1..7] N/A N/A [0..1] 0 = Confused, monster cannot attack. 1 = berserk, monster will attack other monster
cure No No Yes Yes 0 N/A N/A [1..4] 1 = Poison; 2 = Insanity; 3 = Dazed; 4 = Resurrect with 1 HP
daze Yes No Yes No [1..7] N/A N/A 0 When successfully cast by character against monster, causes monster to lose one attack round. When cast by monster against character, causes character's dexterity to fall to 0.
disbelieve Yes No Yes No [1..7] N/A N/A [0..30] value added to casting character's level to determine success against monster's level. Level 0 character has 100% chance to dispell a monster with AC=-20 for value=30
heal Yes Yes Yes Yes 0 N/A N/A [1..255] [1..254] = amount to heal character. 255 heal to full health. No effect on dead chars.
heal_all Yes Yes Yes Yes 0 N/A N/A [1..255] [1..254] = amount to heal character. 255 heal to full health. No effect on dead chars.
insanity Yes No Yes No [1..7] N/A N/A 0 When cast by character against monster, causes monster to go berserk and attack other monster for one attack round. When cast by monster against character, causes character to not be able to attack.
intervention No No Yes No [1..7] [0..255] [0..255] [0..255] Casts heal-all (which can resurrect) and attack_all with given value, fire, magic damage
kill_icons Yes No No No [1..7] N/A N/A [0..255] Value is bitfield indicating which dungeon events to kill: 1=armor, 2=compass, 4=revelation, 8=levitation, 16=twoattack, 32=stealth, 64=savingthrow
levitation No No No Yes 0 N/A N/A [1..25] Casts levitation spell protecting party from map trap damage for 10*value ticks
light No No No Yes 0 N/A N/A [1..5] Lights up a dungeon for value candles. 5 = full brightness.
lose_map No No No No 0 N/A N/A [0..1] A mapspecial spell that causes party to lose map of current level. Value=1 allows popup message "You lose your map". Value=0, doesn't print popup
magic_armor No No No No 0 [0..99]% [0..99]% [-99..99] Casts armor for 10*value ticks, and causes popup msg to say "You get armor"
mana_drain Yes No No No 0 N/A N/A [1..255] Monster drains up to value SP from character target
move_group No No Yes No [1..7] N/A N/A [0..1] 0 = Attempt to move group 10' closer; 1 = 10' farther away
poison Yes No No No 0 N/A N/A [0..1] 0 = monster spell, cast during combat. 1 = a map trap that causes a random party member to become ill.
portal No No No Yes 0 N/A N/A [0..1] 0 = Portal lasts for one step; 1 = spell lasts until used.
regen_hp No No No No 0 N/A N/A [1..255] Regenerates value HP. Can only be used up to once every 200 game ticks (1 second)
regen_sp No No No No 0 N/A N/A [1..255] Regenerates value SP. Can only be used up to once every 200 game ticks (1 second)
saving_throw No Yes No Yes 0 N/A N/A [1..25] Protect one character from fatal monster attack. Lasts until used or until 10*value ticks have passed.
see_trap No No No Yes 0 N/A N/A [1..25] Shows eyeball icon for 10*value time intervals, warns of nearby traps
show_map No No No Yes 0 N/A N/A [0..1] 0 = Reveals map. 1 = Reveals map, and pops up text saying "map is revealed"
spell_dexterity No Yes Yes No 0 N/A N/A [-99..99] Dexterity modifier
spell_resist_fire No No Yes No 0 % N/A [1..99] Raises target character's fire% for duration of combat encounter
spell_resist_magic No No Yes No 0 N/A % [1..99] Raises target character's magic% for duration of combat encounter
spell_strength No Yes Yes No 0 N/A N/A [-99..99] Strength modifier
steal_equipped Yes No No No 0 N/A N/A 0 Causes a random character to drop a non-essential equipped item, and prints "You feel lighter" if successful
steal_gold Yes No No No 0 N/A N/A [1..255] Lose value gold. Can only be used up to once every 200 game ticks (1 second), or by monsters in combat.
steal_unequipped Yes No No No 0 N/A N/A 0 Causes a random character to drop a non-essential unequipped item, and prints "You feel lighter" if successful
stealth No No No Yes 0 N/A N/A [1..25] Protect party from wandering monster encounters for 10*value ticks
summon No No Yes Yes 0 N/A N/A [0..99] Character number to summon. (see characters.txt)
trap_zap No No No No 0 N/A N/A [0..9] If name of spell is "TRAP ZAP" then value*10 = % chance of open. If name of spell is "PICK LOCK" then (value*10 + character level) = % chance of open.
two_attack No Yes Yes Yes 0 N/A N/A [1..25] Enables all party members to do up to two melee attacks per round for up to 10*value ticks.
vampire No Yes Yes No [1..7] [0..255] [0..255] [0..255] attacks single monster, returning up to half total damage in HP to caster
Each row in the spell list constitutes a different spell and is composed of the following fields, listed in order: Example:
#X  "12345678901234567890123456"   cure_insanity   255   255  255 255   255  7          [combat]   
##  "NAME"                         SpellType      value fire magic SP  spec rang verb          [no_combat]  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
#############################################################################################################################################################################################################
0   "NULL SPELL"                   heal_all         1    2     3   4    0    5   casts   combat no_combat   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
#############################################################################################################################################################################################################
1   "TREAT PLAYER"                 heal            10    0     0   3    0    0   casts   combat no_combat   -  -  -  -  -  0  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
2   "TREAT PARTY"                  heal_all        15    0     0   6    0    0   casts   combat no_combat   -  -  -  -  -  1  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -