Prev: 946D Up: Map Next: 94D6
948D: Action: Unlock
Used by the routine at ActionBurn.
Unlocks the current object. An object that is not locked, or is open, is refused; otherwise 9488 is set up to RES bit 0 and the key is tested at Action_Lock_TestTheKey.
Action_Unlock 948D LD IX,($B708) Read *B708.
9491 BIT 0,(IX+$07) Take zero, and jump to Message_NameFromThisRecord if the object is not locked.
9495 LD A,$00
9497 JP Z,Message_NameFromThisRecord
949A CALL Action_ReadTheObjectLockFlag_0 Call Action_ReadTheObjectLockFlag_0 to test whether the object is open.
949D JP NZ,Message_NameFromThisRecord Jump to Message_NameFromThisRecord if the object is open.
94A0 LD A,$86 Use 86, the RES 0 operation.
94A2 JR Action_Lock_TestTheKey Jump back to Action_Lock_TestTheKey to plant it and unlock the object.
Refuse the verb when the object is not carried.
Reached through the action lists of $01 - "Heavy Rock Door", $05 - "Round Green Door", $08 - "Red Door", $0A - "Goblins Back Door", $0B - "Mountains Side Door", $0C - "Large Trap Door", $0D - "Magic Door" and $11 - "Goblins Door" for action 2C, dispatched by TriggerAction.
94A4 CALL Action_RefuseIfNotCarried Call Action_RefuseIfNotCarried to refuse the verb when the object is not carried.
94A7 LD A,($B6E9) Read *B6E9.
94AA CALL ExitsFindTheExitThroughAnObject_0 Call ExitsFindTheExitThroughAnObject_0 to find the exit through the object in A.
94AD CP $FF Jump to ResponseThatWillNotWork if no exit runs through this object.
94AF JP Z,ResponseThatWillNotWork
94B2 LD IY,($B70A) Read *B70A.
94B6 BIT 5,(IY+$07) Take 05, and jump to Message_NameFromTheOtherRecord if the object is not open.
94BA LD A,$05
94BC JP Z,Message_NameFromTheOtherRecord
If the message is held back, the locked object is not named.
94BF CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the locked object is not named.
94C2 LD B,(IX+$02) Read this exit's destination.
94C5 LD IX,($B708) Read *B708.
94C9 LD (IX+$01),$FF Mark where this object is as unset.
94CD LD (IX+$10),B Update the object's location.
94D0 LD A,($B6E8) Read *CurrentObject.
94D3 JP Object_MoveContents_0 Jump to Object_MoveContents_0 to move what is inside the current object to this exit's destination.
Prev: 946D Up: Map Next: 94D6