Prev: 29799 Up: Map Next: 29874
29800: Room-specific routine: Kill Magic Knight if he is in a dark room without illumination
Used by the routines at 29763 and 29797.
Input
IY 23610
29800 LD A,(23467) If Armouris-Photonicus-cast flag is set...
29803 BIT 2,A ...
29805 RET NZ ...then return
29806 LD A,16 Load A with index of Glowing Bottle
29808 CALL 34256 Check to see if this object is in Magic Knight's inventory...
29811 RET Z ...and if so, return
29812 LD A,(25512) Get current "screen" location of Glowing Bottle
29815 CP 18 If Glowing Bottle is in "The Little Bottle" room, then...
29817 RET Z ...return as room is lit (Bug. See also trivia)
29818 LD A,33 Load A with index of Engraved Candle
29820 CALL 34256 Check to see if this object is in Magic Knight's inventory...
29823 JR Z,29832 ...and if so, skip ahead to 29832 (to check if it is lit)
29825 LD A,(25563) Get current "screen" location of Engraved Candle
29828 CP 18 If Engraved Candle is NOT in "The Little Bottle" room then...
29830 JR NZ,29838 ...skip ahead to "you have died" section of routine
29832 LD A,(23467) If the Engraved Candle is lit...
29835 BIT 1,A ...
29837 RET NZ ...then return
29838 RES 0,(IY+65) Reset update-game-time-and-locate-arrow-glow flag
29842 LD HL,22528 Point to start of attribute file...
29845 LD DE,22529 ...
29848 LD BC,607 ...
29851 LD (HL),L L is zero as HL is 22528
29852 LDIR Fill top 19 (i.e. 608 / 32) rows of attribute file with zeroes (i.e. make the room black dark!)
29854 LD A,31 Draw window 31 ("death info" window, i.e. have entered a dark room without illumination)...
29856 CALL 36987 ...
29859 LD HL,51457 Point to "somebody switched off the light..." text
29862 CALL 36725 Print the text
29865 CALL 38749 Display "PRESS SPACE OR FIRE TO CONTINUE" window and wait for space / fire
29868 LD HL,43467 Point HL at "YOU HURT YOURSELF MOVING AROUND IN THE DARK" text
29871 JP 35101 Jump to "game over" window routine and exit
Prev: 29799 Up: Map Next: 29874