Choosing a spell in the book
The interface · The play screen · Casting a spell
In brief
The spell book opens over the bottom of the view when a character uses a spellbook or a holy symbol. It has a tab for each spell level from 1 to 6 and shows six slots of the chosen level at a time, then ABORT SPELL; a click on a ready spell casts it. Two anomalies concern the keys that move the selection and cast.
Positions are screen pixels (x, y) from the top-left corner of the 320 × 200 screen, and sizes are width × height.
The book
Using a spellbook opens the mage spell book, using a holy symbol the cleric one; see using items. The book opens at the page the character used last, kept in its record, and moves to the first ready spell of that level when the remembered one is not ready.1
The book has a tab for each spell level from 1 to 6 and shows the slots of the chosen level, six lines at a time, in their order in the slot array, followed by an ABORT SPELL line. Each slot is its own line, so two copies of a spell take two lines. A ready spell shows its name; an empty or used slot shows a blank line. The first page shows slots 1 to 6 of the level, the second slots 7 to 9; the tenth slot of a level is never shown, and the book has no tabs for levels 7 and 8.
| Action | Mouse | Keys | Effect |
|---|---|---|---|
| Choose a level | A tab | 1 to 6 | Shows its first page, with the first ready spell selected, or ABORT SPELL. |
| Cast a spell | Click on a ready spell | Space casts the selected one | Casts it at once. |
| Move the selection | — | , and . | The previous or next ready spell, through ABORT SPELL, turning the page when needed. |
| Turn the page | The arrows | — | Only when the seventh slot of the level is ready or the second page is shown. |
| Close the book | ABORT SPELL | Escape; Space on ABORT SPELL | — |
The tabs are at y 121, 10 pixels high, from x 68: two of 18 pixels, then four of 15 pixels every 18. The six lines are 97 × 6 pixels at x 75, from y 131. The arrows are at (146, 168), 32 × 10, and ABORT SPELL at (68, 168), 78 × 10. The rest of the play screen works while the book is open.2
Bug. The keys , and . are skipped when a level has no ready
spell, by a test of a variable that only a ready spell sets. Nothing clears it
first: it holds what the button processing left, the button's flags, which are never
0, so the test always passes. On a level with no ready spell the selection therefore
goes to ABORT SPELL and the first page. A faithful reimplementation moves it there.
(ANOMALY-144)
Space does not test that the selected line is ready
(ANOMALY-152). A click is ignored unless the
line's slot holds a ready spell; Space skips that test and passes whatever the
selected slot holds to the cast, so an empty or used slot would start a spell
from a zero or negative ID (inferred). The case is latent: since ready spells stay
at the front of the level, opening the book, the tabs, the arrows, the keys and
the move after a cast all leave the selection on a ready spell or on ABORT
SPELL. A faithful reimplementation applies the test to clicks only.1
Sources
Locations refer to the game executable reference; comparative sources are listed in the technical references.