Routines |
Prev: 31122 | Up: Map | Next: 31257 |
Used by the routine at 55726.
|
||||
31188 | LD A,29 | If Magic Knight is not carrying the Bag of Runes (29)... | ||
31190 | CALL 33645 | ... | ||
31193 | JP NZ,55332 | ...then display "YOU CANNOT CAST THAT SPELL NOW..." window (10) and return to game | ||
31196 | LD A,(25024) | Load Magic Knight's current magic level into A... | ||
31199 | AND 127 | ... | ||
31201 | CP 30 | If this is less than 30... | ||
31203 | JP C,55332 | ...then display "YOU CANNOT CAST THAT SPELL NOW..." window (10) and return to game | ||
31206 | SUB 30 | Subtract 30 from magic level... | ||
31208 | LD B,A | ...and load into B | ||
31209 | LD A,(25024) | Load A with unused bit... | ||
31212 | AND 128 | ... | ||
31214 | OR B | ...combine with remaining magic level value... | ||
31215 | LD (25024),A | ...and store (see trivia) | ||
31218 | LD A,(23471) | If index of previous "Consult Oracle" text shown is not 9... | ||
31221 | CP 9 | ... | ||
31223 | JR NZ,31227 | ...then skip ahead to 31227 | ||
31225 | LD A,255 | Load A with 255 (will be "increased" to zero in next instruction) | ||
31227 | INC A | Increase value of A (index of next "Consult Oracle" text to show)... | ||
31228 | LD (23471),A | ...and store | ||
31231 | LD B,A | Load B with text index | ||
31232 | LD HL,45949 | Point HL at start of list of "Consult Oracle" texts at 45949 | ||
31235 | CALL 54269 | Advance HL to B-th entry in this list | ||
31238 | LD DE,37323 | Adjust height of window 29 to accommodate text... | ||
31241 | CALL 33774 | ... | ||
31244 | PUSH HL | Store HL (pointer to start of text to print) | ||
31245 | LD A,29 | Draw window 29... | ||
31247 | CALL 34990 | ... | ||
31250 | POP HL | Restore HL (pointer to start of text to print) | ||
31251 | CALL 34762 | Print the text | ||
31254 | JP 29479 | Display "PRESS FIRE TO CONTINUE" window and wait for input and return to main game loop |
Prev: 31122 | Up: Map | Next: 31257 |