Prev: EF49 Up: Map Next: EF7C
EF5A: Process: Get Rope
The player wants to pick up the rope, check which version of it is in the current room.
Process_GetRope EF5A LD HL,$E3B0 Call CheckItemGroupPresent with Data_ItemGroup_Rope.
EF5D CALL CheckItemGroupPresent
Print "You can't." if the player is trying to pick up a version of the rope where the rope is "in-use" (e.g. "A wild ox,tethered to the pen by a length of rope").
EF60 CP $51 Jump to Response_YouCant_Duplicate if the rope state in the current room is not "A piece of rope".
EF62 JP NZ,Response_YouCant_Duplicate
The player wants to pick up the rope, check if there are any issues with allowing this (if the inventory is full, or the player is already carrying it).
EF65 CALL Check_PlayerInventory Call Check_PlayerInventory.
Is this the first time the player has picked up the rope?
EF68 LD HL,$A76C Jump to Handler_PickUpItem if bit 2 of *Flag_GameStates_01 is set, which relates to carrying the rope.
EF6B BIT 2,(HL)
EF6D JP NZ,Handler_PickUpItem
EF70 SET 2,(HL) Set bit 2 of *Flag_GameStates_01 to signify that the rope has been picked up. This is to prevent the points from being awarded more than one time.
EF72 LD A,$04 Call AddToScore to add 04 points to the score.
EF74 CALL AddToScore
EF77 LD B,$51 Jump to Handler_PickUpItem with item 51: "A piece of rope".
EF79 JP Handler_PickUpItem
Prev: EF49 Up: Map Next: EF7C