![]() |
Routines |
| Prev: F357 | Up: Map | Next: F398 |
|
Used by the routine at Validate_Take_Match.
Was the player trying to take the plank?
|
||||
| Validate_Take_Plank | F36B | LD HL,$E9E3 | Call MatchPhraseTokens with PhraseTokens_Plank. | |
| F36E | CALL MatchPhraseTokens | |||
| F371 | JR NZ,Validate_Take_Coconut | Jump to Validate_Take_Coconut if the token isn't for the plank. | ||
|
Which plank is present?
|
||||
| F373 | LD HL,$E871 | Call CheckActiveScenicEvents with Data_ItemGroup_Plank. | ||
| F376 | CALL CheckActiveScenicEvents | |||
| F379 | CALL Take_IsPlayerHoldingItem | Call Take_IsPlayerHoldingItem. | ||
| F37C | LD A,B | Copy the object ID back into A. | ||
| F37D | CP $04 | Jump to TakeItem if this is "A plank". | ||
| F37F | JP Z,TakeItem | |||
|
The plank was spanning the pit; pull it up and seal the crossing.
|
||||
| F382 | LD A,$05 | Call Handler_DestroyItemEvent with item 05: "A plank (spanning the pit)". | ||
| F384 | CALL Handler_DestroyItemEvent | |||
| F387 | LD A,$06 | Call Handler_DestroyItemEvent with item 06: "A plank (spanning the pit)". | ||
| F389 | CALL Handler_DestroyItemEvent | |||
| F38C | LD B,$04 | Load B with "A plank". | ||
|
This action changes the map:
|
||||
| F38E | XOR A | Write 00 to *ED75 to remove access to The Southern Side of the Pit from The Wide Pit. | ||
| F38F | LD ($ED75),A | |||
| F392 | LD ($ED80),A | Write 00 to *ED80 to remove access to The Wide Pit from The Southern Side of the Pit. | ||
| F395 | JP TakeItem | Jump to TakeItem. | ||
| Prev: F357 | Up: Map | Next: F398 |