Prev: 30439 Up: Map Next: 30602
30540: Smash Glowing Bottle
Used by the routines at 30439 and 32390.
Input
C 16 (item index of Glowing Bottle)
Output
C 14 (item index of Broken Glass)
30540 LD C,16 Remove Glowing Bottle from Magic Knight's inventory...
30542 LD B,5 ...
30544 LD HL,25395 ...
30547 CALL 38674 ...
30550 LD HL,45496 Display "YOU DROPPED THE BOTTLE TO THE GROUND..." window (window 26)...
30553 LD A,26 ...
30555 CALL 36987 ...
30558 LD HL,45496 ...
30561 CALL 36725 ...
30564 LD A,(23467) Set Banshee-released flag...
30567 SET 0,A ...
30569 LD (23467),A ...
30572 CALL 38749 Display "PRESS SPACE OR FIRE TO CONTINUE" window and wait for space / fire
30575 LD B,7 Set B to 7 (index of Banshee)
30577 LD A,(65529) Load A with Magic Knight's current room...
30580 LD C,A ...and copy into C
30581 CALL 36327 Assign a slot in room C to character B and get x- and y-coordinates in BC
30584 CP 4 If assigned slot number is 4 (i.e. already three characters in current room)...
30586 JR Z,30599 ...then skip ahead to 30599
30588 LD HL,25461 Point HL at Banshee's current location
30591 LD A,(65529) Load Magic Knight's current room index into A
30594 LD (HL),A Set Banshee's current room as Magic Knight's current room
30595 INC HL Point HL at Banshee's current x-coordinate...
30596 LD (HL),C ...and set to match assigned slot
30597 INC HL Point HL at Banshee's current y-coordinate
30598 LD (HL),B ...and set to match assigned slot
30599 LD C,14 Load C with index of Broken Glass (as this will be replacing the Glowing Bottle in the world)
30601 RET Return
Prev: 30439 Up: Map Next: 30602