Prev: 62205 Up: Map Next: 62279
62221: Take: Rod
Used by the routine at Validate_Take_Fruit.
Was the player trying to take the rod?
Validate_Take_Rod 62221 LD HL,59861 Call MatchPhraseTokens with PhraseTokens_Rod.
62224 CALL MatchPhraseTokens
62227 JR NZ,Validate_Take_Jewels Jump to Validate_Take_Jewels if the token isn't for the rod.
Is the rod present?
62229 LD A,8 Call Take_IsPlayerHoldingItem with item 8: "A rod".
62231 CALL Take_IsPlayerHoldingItem
62234 LD A,B Copy the object ID back into A.
62235 CALL ValidateItemPresent Call ValidateItemPresent.
62238 LD B,8 Load B with "A rod".
62240 JP Z,TakeItem Jump to TakeItem if "A rod" is present.
The rod is in the door; pull it out and seal the passage.
62243 LD BC,2569 Call TransformItem to transform item 10 ("A hole with a rod inserted to the side of the door") into item 9 ("A small round hole to the side of the door").
62246 CALL TransformItem
62249 LD BC,12594 Call TransformItem to transform item 49 ("The door is open") into item 50 ("The door is closed").
62252 CALL TransformItem
62255 LD BC,13077 Call Handler_UpdateObjectLocation with item 51: "A slab of rock" to create it in The Narrow Path.
62258 CALL Handler_UpdateObjectLocation
This action changes the map:
62261 XOR A Write 0 to *60304 to remove access to The Mighty Rock Door from The Narrow Path.
62262 LD (60304),A
62265 LD (60813),A Write 0 to *60813 to remove access to The Narrow Path from The Mighty Rock Door.
62268 LD B,8 Call TakeItem with item 8: "A rod".
62270 CALL TakeItem
The door has closed.
Print "The door rolls shut.".
62273 LD HL,56188 HL=Messaging_DoorRollsShut.
62276 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Prev: 62205 Up: Map Next: 62279