Prev: F2FD Up: Map Next: F347
F30D: Take: Rod
Used by the routine at Validate_Take_Fruit.
Was the player trying to take the rod?
Validate_Take_Rod F30D LD HL,$E9D5 Call MatchPhraseTokens with PhraseTokens_Rod.
F310 CALL MatchPhraseTokens
F313 JR NZ,Validate_Take_Jewels Jump to Validate_Take_Jewels if the token isn't for the rod.
Is the rod present?
F315 LD A,$08 Call Take_IsPlayerHoldingItem with item 08: "A rod".
F317 CALL Take_IsPlayerHoldingItem
F31A LD A,B Copy the object ID back into A.
F31B CALL ValidateItemPresent Call ValidateItemPresent.
F31E LD B,$08 Load B with "A rod".
F320 JP Z,TakeItem Jump to TakeItem if "A rod" is present.
The rod is in the door; pull it out and seal the passage.
F323 LD BC,$0A09 Call TransformItem to transform item 0A ("A hole with a rod inserted to the side of the door") into item 09 ("A small round hole to the side of the door").
F326 CALL TransformItem
F329 LD BC,$3132 Call TransformItem to transform item 31 ("The door is open") into item 32 ("The door is closed").
F32C CALL TransformItem
F32F LD BC,$3315 Call Handler_UpdateObjectLocation with item 33: "A slab of rock" to create it in The Narrow Path.
F332 CALL Handler_UpdateObjectLocation
This action changes the map:
F335 XOR A Write 00 to *EB90 to remove access to The Mighty Rock Door from The Narrow Path.
F336 LD ($EB90),A
F339 LD ($ED8D),A Write 00 to *ED8D to remove access to The Narrow Path from The Mighty Rock Door.
F33C LD B,$08 Call TakeItem with item 08: "A rod".
F33E CALL TakeItem
The door has closed.
Print "The door rolls shut.".
F341 LD HL,$DB7C HL=Messaging_DoorRollsShut.
F344 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Prev: F2FD Up: Map Next: F347