Prev: F398 Up: Map Next: F3D5
F3A8: Take: Gun
Used by the routine at Validate_Take_Coconut.
Was the player trying to take the gun?
Validate_Take_Gun F3A8 LD HL,$E9EF Call MatchPhraseTokens with PhraseTokens_Gun.
F3AB CALL MatchPhraseTokens
F3AE JR NZ,Validate_Take_Eyepatch Jump to Validate_Take_Eyepatch if the token isn't for the gun.
Pick up the gun.
F3B0 LD A,$0F Call Take_IsPlayerHoldingItem with item 0F: "A gun".
F3B2 CALL Take_IsPlayerHoldingItem
Is the parrot present?
F3B5 LD A,$27 Call ValidateItemPresent with item 27: "A parrot (alive)".
F3B7 CALL ValidateItemPresent
F3BA JR Z,Validate_Take_Gun_BadLuck Jump to Validate_Take_Gun_BadLuck if "A parrot (alive)" is present.
The parrot is gone; take the gun and wake the beach pirate.
F3BC LD A,$22 Call Handler_DestroyItemEvent with item 22: "A sleeping pirate".
F3BE CALL Handler_DestroyItemEvent
F3C1 LD A,$88 Call Handler_PutScenicEventIntoPlay with 88 (the pirate from the beach).
F3C3 CALL Handler_PutScenicEventIntoPlay
F3C6 LD B,$0F Load B with "A gun".
F3C8 JP TakeItem Jump to TakeItem.
Bad luck!
Validate_Take_Gun_BadLuck F3CB LD HL,$EDD7 Switch GameOver onto the stack so the next return actions a "game over".
F3CE EX (SP),HL
Print "As you start to move, the parrot squawks... The pirate wakes and quickly shoots you.".
F3CF LD HL,$DBCC HL=Messaging_ParrotSquawks.
F3D2 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Prev: F398 Up: Map Next: F3D5