Prev: B417 Up: Map Next: B4AE
B495: Action: Lockpick
This handles the hero using the lockpick to enter a locked room.
action_lockpick B495 CALL get_nearest_door Get the nearest door in range of the hero in HL
B498 RET NZ Return if no door was nearby
B499 LD ($A143),HL Store the door_t pointer in ptr_to_door_being_lockpicked
B49C LD A,($A12F) Lock out player control until the game counter becomes now + 255
B49F ADD A,$FF
B4A1 LD ($A145),A
B4A4 LD HL,$8001 Set hero's vischar.flags to vischar_FLAGS_PICKING_LOCK
B4A7 LD (HL),$01
B4A9 LD B,$0A Queue the message "PICKING THE LOCK" and exit via
B4AB JP queue_message
Prev: B417 Up: Map Next: B4AE