Prev: 61313 Up: Map Next: 61356
61318: Process: Get Ladder
The player wants to pick up the ladder, check which version of it is in the current room.
Process_GetLadder 61318 LD HL,58309 Call CheckItemGroupPresent with Data_ItemGroup_Ladder.
61321 CALL CheckItemGroupPresent
Just pick up the item if it's "A ladder".
61324 CP 90 Jump to Handler_CheckPlayerInventory_PickUpItem if the ladder state in the current room is "A ladder".
61326 JP Z,Handler_CheckPlayerInventory_PickUpItem
Print "You can't." if "A ladder,leading upward" is not present in the current room.
61329 CP 94 Jump to Response_YouCant_Duplicate if the ladder state in the current room is not "A ladder,leading upward".
61331 JP NZ,Response_YouCant_Duplicate
The player wants to pick up the ladder, check if there are any issues with allowing this (if the inventory is full, or the player is already carrying it).
61334 LD A,90 Call Check_PlayerInventory with item 90: "A ladder".
61336 CALL Check_PlayerInventory
61339 LD A,94 Call Handler_DestroyItemEvent with item 94: "A ladder,leading upward".
61341 CALL Handler_DestroyItemEvent
No ladder no access ... so update the room exits.
61344 XOR A Write 0 to *59737 to close downward access in Inside The Inner Wall Entrance.
61345 LD (59737),A
61348 LD (59754),A Write 0 to *59754 to close upward access in The Inner Courtyard.
61351 LD B,90 Jump to Handler_PickUpItem with item 90: "A ladder".
61353 JP Handler_PickUpItem
Prev: 61313 Up: Map Next: 61356