Skip to main content

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 spell book over the bottom of the view. Six tabs at y 121, 10 pixels high, from x 68: two of 18 pixels, then four of 15 every 18. Below them six lines of 97 by 6 pixels from x 75, y 131. At y 168, ABORT SPELL at x 68, 78 by 10, and the page arrows at x 146, 32 by 10.
The book has tabs for spell levels 1 to 6 only.

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.

ActionMouseKeysEffect
Choose a levelA tab1 to 6Shows its first page, with the first ready spell selected, or ABORT SPELL.
Cast a spellClick on a ready spellSpace casts the selected oneCasts it at once.
Move the selection—, and .The previous or next ready spell, through ABORT SPELL, turning the page when needed.
Turn the pageThe arrows—Only when the seventh slot of the level is ready or the second page is shown.
Close the bookABORT SPELLEscape; 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

Anomaly

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)

Anomaly

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.

Footnotes​

  1. Open a spell book, the spell-book page, the book buttons and the button list; the keyboard handler for the key numbers. ↩ ↩2

  2. The active button list, with build the main button list, the character-choice lists, the panel state and build and show a menu. The panel and book lists and the areas of their buttons are read from the button records of the executable's data image, through the arrays that these entries name. ↩