![]()  | 
Routines | 
| Prev: EF81 | Up: Map | Next: EFAC | 
| 
 | 
||||
| 
 
The player wants to pick up the ladder, check which version of it is in the current room.
 
 | 
||||
| Process_GetLadder | EF86 | LD HL,$E3C5 | Call CheckItemGroupPresent with Data_ItemGroup_Ladder. | |
| EF89 | CALL CheckItemGroupPresent | |||
| 
 
Just pick up the item if it's "A ladder".
 
 | 
||||
| EF8C | CP $5A | Jump to Handler_CheckPlayerInventory_PickUpItem if the ladder state in the current room is "A ladder". | ||
| EF8E | JP Z,Handler_CheckPlayerInventory_PickUpItem | |||
| 
 
Print "You can't." if "A ladder,leading upward" is not present in the current room.
 
 | 
||||
| EF91 | CP $5E | Jump to Response_YouCant_Duplicate if the ladder state in the current room is not "A ladder,leading upward". | ||
| EF93 | 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).
 
 | 
||||
| EF96 | LD A,$5A | Call Check_PlayerInventory with item 5A: "A ladder". | ||
| EF98 | CALL Check_PlayerInventory | |||
| EF9B | LD A,$5E | Call Handler_DestroyItemEvent with item 5E: "A ladder,leading upward". | ||
| EF9D | CALL Handler_DestroyItemEvent | |||
| 
 
No ladder no access ... so update the room exits.
 
 | 
||||
| EFA0 | XOR A | Write 00 to *E959 to close downward access in Inside The Inner Wall Entrance. | ||
| EFA1 | LD ($E959),A | |||
| EFA4 | LD ($E96A),A | Write 00 to *E96A to close upward access in The Inner Courtyard. | ||
| EFA7 | LD B,$5A | Jump to Handler_PickUpItem with item 5A: "A ladder". | ||
| EFA9 | JP Handler_PickUpItem | |||
| Prev: EF81 | Up: Map | Next: EFAC |