Prev: D8B2 Up: Map Next: D901
D8CE: HAIL, WAYSTONE, FREEZE, SUMMON or PORTAL spell cast
Used by the routine at D7F3.
The HAIL spell summons a warlock to Maroc's room
D8CE LD A,$08 Timer indicating how long before a creature is likely to wander in from an adjacent room
D8D0 LD ($EBB4),A Set this to 8 will cause a warlock to appear within a few seconds
D8D3 JR $D901 ...and skip out to the next routine
WAYSTONE spell cast
This spell immediately teleports Maroc to the next room - i.e. his current room number plus one
D8D5 LD A,($EAB7) Get room number
D8D8 INC A +1
D8D9 CP $E0 It's assumed 223 was originally earmarked to be the final 'standard' room (as mentioned on the inlay - see Reference: Inlay - back cover) - with tunnel room numbers starting from 224.
However, the final (standard) room number is 212, with 213 onwards unused.
D8DB JR NC,$D901 This would've been a check to make sure Maroc hasn't teleported from (standard) room 223 to tunnel room 224, but isn't really needed.
D8DD LD ($EAB0),A Store new room number
D8E0 JR $D901 ...and skip out to the next routine
FREEZE spell cast
This spell stops all creatures in their tracks for a short time. It gives time for Maroc to perform actions without being harrassed. However, frozen creatures:
D8E2 LD A,$FF Set the FREEZE spell timer counter to 255 (temporarily stops all creature movement)
D8E4 LD ($EC9C),A
D8E7 JR $D901 ...and skip out to the next routine
SUMMON spell cast
This spell immediately teleports Maroc to room 61 in the Chambers of Chaos.
D8E9 LD A,$3D Set room number to 61
D8EB LD ($EAB0),A
D8EE JR $D901 ...and skip out to the next routine
PORTAL spell cast
This spell initially teleports Maroc to room number 128, in the Mines of Madness.
If Maroc's (pre-teleport) room number is greater than this, this room replaces room 128 as as the base teleport location, ready for when the next time the spell is cast.
It lets the player fast travel between deeper game levels.
D8F0 LD A,($EAB7) Get room number
D8F3 LD C,A Temp store in C register
D8F4 LD A,($EC9B) Get room number to teleport to (initialized at 128)
D8F7 LD ($EAB0),A ...and store as room number
D8FA CP C Is current room number >= the room to teleport to?
D8FB JR NC,$D901
D8FD LD A,C If so, store current room number as the new teleport point
D8FE LD ($EC9B),A
Prev: D8B2 Up: Map Next: D901