Prev: F5C2 Up: Map Next: F665
F5F1: Action: Open
Open the named door, gate or chest.
Action_Open F5F1 CALL Parser_ValidateDirectObject Return if the words after the verb are not valid for this command.
F5F4 RET C
F5F5 LD HL,$E8EA Jump to Handler_OpenTheChest unless the player named the door.
F5F8 CALL Parser_AdvanceToSeparator
F5FB JP NZ,Handler_OpenTheChest
F5FE LD HL,$E797 Call Parser_SkipToken to skip to the object named by this phrase.
F601 CALL Parser_SkipToken
F604 BIT 0,A Jump to Action_Open_Next when the named door is closed.
F606 JR Z,Action_Open_Next
Reply with "It's already open.".
F608 LD HL,$E172 Print "It's already open." and return to the game loop.
F60B JP PrintResponse
Action_Open_Next F60E LD A,($BA9B) Jump to Action_Open_Farmhouse when the player is in room 02 (Inside the Farmhouse).
F611 CP $02
F613 JR Z,Action_Open_Farmhouse
F615 CP $03 Jump to Action_Open_WoodmansHutCheck unless the player is in room 03 (At a large Farmhouse).
F617 JR NZ,Action_Open_WoodmansHutCheck
Action_Open_Farmhouse F619 LD BC,$3635 Replace object 36 (a closed door) with object 35 (an open door).
F61C CALL TransformItem
F61F LD BC,$3837 Replace object 38 with object 37.
F622 CALL TransformItem
F625 LD A,$03 Jump back to Response_OK to confirm.
F627 LD ($E941),A
F62A JP Response_OK
Action_Open_WoodmansHutCheck F62D CP $0F Jump to Action_Open_WoodmansHut when the player is in room 0F (At the Woodman's Hut).
F62F JR Z,Action_Open_WoodmansHut
F631 CP $10 Jump to Action_Open_WitchsHovelCheck unless the player is in room 10 (Inside the Woodman's Hut).
F633 JR NZ,Action_Open_WitchsHovelCheck
Action_Open_WoodmansHut F635 LD BC,$3A39 Replace object 3A with object 39.
F638 CALL TransformItem
F63B LD BC,$3C3B Replace object 3C with object 3B.
F63E CALL TransformItem
F641 LD A,$0F Jump back to Response_OK to confirm.
F643 LD ($E996),A
F646 JP Response_OK
Action_Open_WitchsHovelCheck F649 CP $3C Jump to Action_Open_WitchsHovel when the player is in room 3C (At the Witch's Hovel).
F64B JR Z,Action_Open_WitchsHovel
F64D CP $3D Jump to Handler_OpenTheChest unless the player is in room 3D (Inside the Witch's Hovel).
F64F JR NZ,Handler_OpenTheChest
Action_Open_WitchsHovel F651 LD BC,$3E3D Replace object 3E with object 3D.
F654 CALL TransformItem
F657 LD BC,$403F Replace object 40 with object 3F.
F65A CALL TransformItem
F65D LD A,$3C Jump back to Response_OK to confirm.
F65F LD ($EAA4),A
F662 JP Response_OK
Prev: F5C2 Up: Map Next: F665