Prev: FAB8 Up: Map Next: FAF9
FAC8: Action: Dig
Carry out the "Dig" command.
Action_Dig FAC8 CALL ParserValidateNoDirectObject Call ParserValidateNoDirectObject to check that the command has no object, and return if it does not.
FACB RET C
FACC LD A,$60 Refuse to dig without the shovel.
FACE CALL IsObjectInInventory
FAD1 JP NZ,Messaging_YouHaveNothingToDigWith_Reply
FAD4 LD A,($AECD) Read the current room into A.
FAD7 CP $3C Branch to Response_YouFindNothing when 3C means the values differ.
FAD9 JP NZ,Response_YouFindNothing
FADC LD HL,$AE77 See whether this spot on the beach has already been dug.
FADF BIT 0,(HL)
FAE1 JP NZ,Response_YouFindNothing
FAE4 SET 0,(HL) Remember that this spot on the beach has been dug.
FAE6 LD A,$72 Call HandlerUpdateItemEventForTheCurrentRoom to update the item for this room.
FAE8 CALL HandlerUpdateItemEventForTheCurrentRoom
FAEB LD A,$03 Call AddToScore to add the points to the score.
FAED CALL AddToScore
FAF0 CALL Messaging_OK_Reply Call Messaging_OK_Reply to tell the player that worked.
Print it as the reply: You uncover an emerald!.
FAF3 LD HL,$DE88 Point at the message and print it as the reply.
FAF6 JP PrintResponse
Prev: FAB8 Up: Map Next: FAF9