Skip to main content

Spell anomalies

Magic · Attack spells · Other spells · Anomalies and bugs

In brief​

The anomalies of the spells' own routines: spells that fail without giving back what they used, effects that last too long or end too early, targets chosen from the wrong table, and values read past their tables. Each entry says what a faithful reimplementation keeps.

The anomalies​

Anomaly

These behaviors of the DOS game contradict its own data or code; each is listed in the anomaly catalogue. Their consequences in play are inferred from the code.

  • Flame Blade failure. When no weapon can be made, Flame Blade ends Shocking Grasp's effect and timer instead of its own, a constant of the other spell. Its own timer survives and later announces that the spell expires.
  • Neutralize Poison clears Bless. It clears the character's timers of Bless (definition 34) instead of those of Slow Poison (42). A Slow Poison timer survives, and a Bless timer held by that character is lost, so the party's Bless would never end.
  • Slow Poison duration. Its routine passes the caster's level as the per-level factor of the timer, so for a cleric casting from the cleric book it lasts 32 760 × (1 + L × L) ticks.
  • Slow Poison on a healthy character. On a character who is not poisoned the spell prints "no effect.", but the timer set before its routine stays, and an expiry message follows later.
  • Dispel Magic and Aid. Dispel Magic clears the Aid reserve before ending Aid, so the bonus hit points stay, even above the maximum; it also clears the character timers that are not spells.
  • Aid cast again. On a character already aided, Aid prints its warning and then ends the first Aid, instead of refusing like the other spells.
  • Armor on a better defense. On a target already better than defense 6, Armor keeps its effect bit with no reserve and no timer, so the effect never ends unless dispelled, and casting it again is refused.
  • Detect Magic refresh. Its routines refresh the item in hand before the effect bit is set and before it is cleared, so each refresh shows the previous state.
  • Hold Person on the party. The first character tested is drawn from slots 1 to 6, counting from 0; a draw of 6 reads past the six characters, and the sixth is then never reached. The same target search serves the monster spells of types 10 to 13; see monster spells.
  • Front ranks of the wound spells. The test reads a four-entry table with the caster's slot; slots 4 and 5 read the next table, whose bytes are nonzero, so the fifth and sixth characters may cast them.
  • Projectile on the back rank. When a single-target projectile hits the party, the back rank is tested on the sixth slot and on a seventh, nonexistent one. See who a projectile hits.
  • Projectile damage in a byte. The damage of each monster hit by a projectile is kept in a signed byte, so more than 127 points wraps to a negative value and deals nothing.
  • Burning Hands facing north. The position table for north lists position 2 twice and position 0 never, so a monster at position 0 is not hit when the party faces north.
  • Improved Identify's mask. Its definition carries SPELL_EFFECT_INVISIBILITY but none of the flags that apply a mask, so the bit is never set.
  • Conjured weapon creation. Creating the conjured weapon writes 0 to the position byte of item 0 instead of the new item's.
  • Disintegrate and the wall of force. Disintegrate removes a wall of force ahead without freeing its slot, so the slot counts toward the limit of five until its deadline, when the block's walls are reset to 0 once more.
  • A failed conjured weapon keeps its type (ANOMALY-130). There are six conjured-weapon types but only five free conjured items in the original data. With five conjured weapons in use, a sixth cast takes the last free type before finding that no item is left; "The spell fails!" follows and the type is never given back, for the rest of the game, saved games included. Since five types still remain for the five items, nothing else changes (inferred). A faithful reimplementation reserves the type before the item and does not release it on failure.
  • The free-hand check covers one item too many (ANOMALY-137). The hand check accepts item entries 11 to 17, one more than the 11 to 16 the conjured-weapon search uses; entries 16 and 17 of the original data are ordinary templates. Holding one would refuse a free-hand spell and protect it from Remove Curse; templates are copied, not held, so this has no effect with the original data (inferred). A faithful reimplementation keeps the 11–17 range.

Sources​

Locations refer to the game executable reference.