Prev: 8E0F Up: Map Next: 8E8D
8E18: Move Player To Room
Store the given room as the current room and update the exit record.
MovePlayerToRoom 8E18 LD C,A Remember the room being entered.
8E19 LD A,($6223) Fetch the current room.
8E1C LD HL,$6224 The scenic events remember the room the player just left.
8E1F LD B,$08 Up to eight scenic rooms may name the room just left.
8E21 JR MovePlayerToRoom_Step1 Continue at MovePlayerToRoom_Step1 to see if this scenic slot names the old room.
MovePlayerToRoom_Loop1 8E23 INC HL Move on to the next scenic room.
MovePlayerToRoom_Step1 8E24 CP (HL) Leave this scenic slot when it does not name the old room.
8E25 JR NZ,MovePlayerToRoom_Step2
8E27 LD (HL),C This scenic slot now names the room being entered.
MovePlayerToRoom_Step2 8E28 DJNZ MovePlayerToRoom_Loop1 Repeat for the remaining scenic rooms.
8E2A LD A,C Make the new room current.
8E2B LD ($6223),A
8E2E LD E,$00 Draw the room, including its picture.
8E30 CALL Handler_DisplayRoom Call Handler_DisplayRoom to display the room.
8E33 LD A,$12 Jump to MovePlayerToRoom_Step3 when An android guard. He has shot at you and missed. (12) is not here or being carried.
8E35 CALL IsObjectInCurrentRoom
8E38 JR NZ,MovePlayerToRoom_Step3
8E3A LD HL,$6219 Check the turn-based event flags.
8E3D SET 0,(HL) The android will attack in 02 turns.
8E3F LD A,$02
8E41 LD ($621A),A
MovePlayerToRoom_Step3 8E44 LD A,$24 Jump to MovePlayerToRoom_Step4 when A huge,blind slug is blocking the western exit. It is advancing toward you. (24) is not here or being carried.
8E46 CALL IsObjectInCurrentRoom
8E49 JR NZ,MovePlayerToRoom_Step4
8E4B LD HL,$6219 Check the turn-based event flags.
8E4E SET 1,(HL) The slug will attack in 06 turns.
8E50 LD A,$06
8E52 LD ($621B),A
MovePlayerToRoom_Step4 8E55 LD A,$27 Jump to MovePlayerToRoom_Step5 when The alien commander, in space armour. (27) is not here or being carried.
8E57 CALL IsObjectInCurrentRoom
8E5A JR NZ,MovePlayerToRoom_Step5
8E5C LD HL,$6219 Check the turn-based event flags.
8E5F SET 2,(HL) The second android will attack in 06 turns.
8E61 LD A,$06
8E63 LD ($621C),A
MovePlayerToRoom_Step5 8E66 LD A,($6223) Fetch the current room.
8E69 CP $05 The tractor beam is only dealt with on The Landing Pad..
8E6B JR NZ,MovePlayerToRoom_Step6
8E6D LD HL,$6219 Check the turn-based event flags.
8E70 BIT 3,(HL) The explosion countdown is not armed.
8E72 JR Z,MovePlayerToRoom_Step6
8E74 RES 3,(HL) Leave the explosion countdown unarmed.
8E76 LD BC,$3000 Move A tractor beam is holding the ship. Takeoff is impossible. (30) to nowhere (00).
8E79 CALL UpdateObjectLocation
8E7C XOR A Close the south exit of The Landing Pad..
8E7D LD ($8B79),A
8E80 LD BC,$4004 Move The ship is ready to take off. (40) to In the Galaxy at rest,on a landing pad. (04).
8E83 CALL UpdateObjectLocation
8E86 LD HL,$83C2 Print There is a tremendous roar underground,to the south. The alien complex is destroyed..
8E89 CALL PrintStringAndANewline
MovePlayerToRoom_Step6 8E8C RET Return.
Prev: 8E0F Up: Map Next: 8E8D