Prev: 64184 Up: Map Next: 64249
64200: Action: Dig
Carry out the "Dig" command.
Action_Dig 64200 CALL ParserValidateNoDirectObject Call ParserValidateNoDirectObject.
64203 RET C Return if the direct object is malformed.
Does the player have the shovel ("A shovel.")?
64204 LD A,96 Jump to Response_YouHaveNothingToDigWith if IsObjectInInventory reports that "A shovel." is not held.
64206 CALL IsObjectInInventory
64209 JP NZ,Response_YouHaveNothingToDigWith
64212 LD A,(44749) A=*CurrentRoom.
Is the player in room 60: " The Sandy Beach"?
64215 CP 60 Jump to Response_YouFindNothing if *CurrentRoom is not room 60: " The Sandy Beach".
64217 JP NZ,Response_YouFindNothing
Has this spot on the beach already been dug?
64220 LD HL,44663 Jump to Response_YouFindNothing if bit 0 of *Flag_BeachDug is set.
64223 BIT 0,(HL)
64225 JP NZ,Response_YouFindNothing
64228 SET 0,(HL) Set bit 0 of *Flag_BeachDug.
64230 LD A,114 Call HandlerUpdateItemEventForTheCurrentRoom with item 114: "An emerald.".
64232 CALL HandlerUpdateItemEventForTheCurrentRoom
64235 LD A,3 Call AddToScore with 3.
64237 CALL AddToScore
64240 CALL Response_OK_GameLoop Call Response_OK_GameLoop.
Print "You uncover an emerald!".
64243 LD HL,56968 HL=Messaging_YouUncoverAnEmerald.
64246 JP PrintResponse Jump to PrintResponse.
Prev: 64184 Up: Map Next: 64249