Ranged attacks
Monsters · Melee attacks · Attack spells
In brief
A pursuing monster tries a ranged attack first. It needs ranged attacks left, the party at most three blocks straight ahead with nothing in between, and a wait counter that lets it fire. It throws an item, launches a spell or uses a mind blast, from a list of up to four weapons taken in turn or at random. Ranged attacks come two to four updates apart.
When a monster fires
A monster tries a ranged attack first in each pursuit update. Its type gives the number of ranged attacks of each monster, a list of up to four weapons and how the list is used; the slot keeps the attacks left, the next weapon of the list and a wait counter, which starts at 1d3:1
- A monster with no ranged attacks left does nothing.
- The game rolls 1d3. If the roll is above the wait counter, the counter goes up by one and the attack waits.
- The party must be at most 3 blocks away and straight ahead of the monster's facing.
- The game follows the line of blocks ahead of the monster until the
party's block. It fails at a block whose face toward the monster has
neither
WALL_RUNTIME_PASSAGEnorWALL_RUNTIME_SMALL_PROJECTILE_PASSAGE, or that holds a monster. A party one column off at three blocks passes step 3 but is never reached. - The weapon is the next one of the list (mode 1, cycling) or a random one (mode 2).
- The monster acts, then loses one ranged attack unless its count is 255, which never runs out, and its wait counter returns to 0.
After a ranged attack the next try therefore always waits; the one after it fires with one chance in three, then two in three, then always: ranged attacks come two to four updates apart. A counter that rose while the party was out of line fires at once when the party steps in front.
| Weapon value | What the monster does |
|---|---|
| negative, −n | Throws a copy of item n of the item table, as a flying object of the item's type. |
| 0 to 19 | Launches magic flying object type n from its place, with that spell's sound; see monster spells. |
| 20 | Mind blast: "The party is hit with a psychic mind blast!"; each living character may be paralyzed, see effects on characters. |
| above 20 | Nothing, but the attack is spent. |
When no item or flying object can be created, the attack is spent all the same. In the original levels, one type of level 1 throws one dagger, types of levels 2 and 6 cast one Hold Person, another of level 6 one Flame Strike, the cleric type of level 8's second sublevel record casts Hold Person or Flame Strike at random four times, four types of level 9 cast object types 10 to 13 at random without limit, types of level 15 cast type 9 without limit or Magic Missile, Fireball, Hold Person and Lightning Bolt 8 to 15 times, one type of level 16 uses the mind blast without limit, and on level 16's second sublevel record the final opponent casts Flame Strike, Lightning Bolt and Hold Person in turn 20 times, then, in its second form, object type 8 without limit.1
For a list mode other than 1 or 2, the weapon index is read from a value that the routine never sets. The original levels use only modes 1 and 2. A reimplementation that accepts other modes must choose a value; none reproduces the original.1
Monster spells
A monster spell is a magic flying object launched by no character. Types 0 to 7 are those of the party's projectile spells; the attack spells gives their effect. For them the caster's level L is 5 below level 7 and 9 from level 7 on. Types 8 to 13 have hit routines of their own:2
| Type | Range | When it reaches the party's block |
|---|---|---|
| 8 | unlimited | 12d10 + 6 to the target, or 4d10 + 6 while the party has SPELL_EFFECT_MYSTIC_DEFENSE, set only by a wand of value 5, which the hit then clears. Used without limit by the final opponent's second form on level 16. |
| 9 | 6 | 18 to each present character, halved by a saving throw of category 4. |
| 10 | 6 | "The party has been hit by a death spell!": from a first target, up to 1d4 characters whose first class level is below 8 take 300 points of damage. |
| 11 | 6 | The first target takes 300 points of damage ("name has been disintegrated!"). |
| 12 | 6 | The first target takes 3d8 + 3 ("name has been hit by cause serious wounds."). |
| 13 | 6 | Meant to turn the first character that fails a saving throw to stone; no character is ever affected. |
The first target is chosen as for Hold Person on the party, and the next ones follow in slot order. Types 11 and 13 rely on a saving throw that is decided before its die is read:
The saving throw of types 11 and 13 rolls a real saving throw, then compares a separate 1d20 with its result, 0 or 1, which never wins. Disintegration therefore always strikes, and petrification never does. A faithful reimplementation keeps both outcomes.2
Type 12 announces cause serious wounds but rolls 3d8 + 3, the dice of the party's Cause Critical Wounds; Cause Serious Wounds rolls 2d8 + 1.2
Sources
Locations refer to the game executable reference; comparative sources are listed in the technical references.