Prev: F7D6 Up: Map Next: F8D9
F851: Action: Kill
Action_Kill F851 CALL $C49F Call C49F.
F854 RET C Return if the direct object is malformed.
Was the player trying to kill ... the octopus with the spear?
F855 LD HL,$EA8D Call MatchPhraseTokens with PhraseTokens_OctopusWithSpear.
F858 CALL MatchPhraseTokens
F85B JR NZ,Action_Kill_0 Jump to Action_Kill_0 if the token isn't for the .
F85D LD A,$1A Call CheckObjectInInventory with item 1A: "A spear".
F85F CALL CheckObjectInInventory
F862 JP NZ,Response_YoureNotCarryingIt Jump to Response_YoureNotCarryingIt if *HL is not equal to 1A.
F865 LD A,$1A Call Handler_DestroyItemEvent with "A spear".
F867 CALL Handler_DestroyItemEvent
F86A LD A,$2B Call Handler_DestroyItemEvent with "A giant octopus".
F86C CALL Handler_DestroyItemEvent
F86F LD HL,$BC98 HL=Count_InventoryItems.
F872 DEC (HL) Decrease *HL by one.
F873 LD A,$40 Write 40 to *EC8A to open up northbound access to A Dead End from The Cave.
F875 LD ($EC8A),A
F878 LD A,$41 Write 41 to *EC8B to open up southbound access to A Dead End from The Cave.
F87A LD ($EC8B),A
F87D LD A,$42 Write 42 to *EC8C to open up eastbound access to A Dead End from The Cave.
F87F LD ($EC8C),A
Print "The spear pierces the oily skin and the octopus sinks beneath the surface in a fury of froth and foam. The spear is lost.".
F882 LD HL,$DE81 HL=Messaging_ThrowSpearAtOctopus.
F885 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Action_Kill_0 F888 LD HL,$EA96 Call MatchPhraseTokens with PhraseTokens_LionWithSpear.
F88B CALL MatchPhraseTokens
F88E JR NZ,Action_Kill_1 Jump to Action_Kill_1 if the token isn't for the .
F890 LD A,$1A Call CheckObjectInInventory with item 1A: "A spear".
F892 CALL CheckObjectInInventory
F895 JP NZ,Response_YoureNotCarryingIt Jump to Response_YoureNotCarryingIt if *HL is not equal to 1A.
Print "You stab at the lion but the beast easily avoids it.".
F898 LD HL,$E07F HL=E07F.
F89B JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Action_Kill_1 F89E LD HL,$EA9A Call MatchPhraseTokens with PhraseTokens_CannibalsWithSpear.
F8A1 CALL MatchPhraseTokens
F8A4 JR NZ,Action_Kill_2 Jump to Action_Kill_2 if the token isn't for the .
F8A6 LD A,$1A Call CheckObjectInInventory with item 1A: "A spear".
F8A8 CALL CheckObjectInInventory
F8AB JP NZ,Response_YoureNotCarryingIt Jump to Response_YoureNotCarryingIt if *HL is not equal to 1A.
Bad luck!
F8AE LD HL,$EDD7 Switch GameOver onto the stack so the next return actions a "game over".
F8B1 EX (SP),HL
Print "The cannibals turn on you. They quickly overwhelm you.".
F8B2 LD HL,$E0B4 HL=E0B4.
F8B5 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Action_Kill_2 F8B8 LD HL,$EA9E Call MatchPhraseTokens with PhraseTokens_PirateWithGun.
F8BB CALL MatchPhraseTokens
F8BE JR NZ,Action_Shooting_0 Jump to Action_Shooting_0 if the token isn't for the .
F8C0 LD A,$0F Call CheckObjectInInventory with item 0F: "A gun".
F8C2 CALL CheckObjectInInventory
F8C5 JP NZ,Response_YoureNotCarryingIt Jump to Response_YoureNotCarryingIt if ?? is not equal to 0F.
This entry point is used by the routine at Action_Shooting.
Action_Kill_3 F8C8 LD HL,$E8B2 Call CheckActiveScenicEvents with Data_ItemGroup_Pirate.
F8CB CALL CheckActiveScenicEvents
F8CE LD B,A B=A.
F8CF BIT 7,A Test bit 7 of A.
F8D1 JR NZ,Action_Shooting Jump to Action_Shooting if ?? is not equal to 0F.
Print "He's dead already.".
F8D3 LD HL,$E138 HL=E138.
F8D6 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Prev: F7D6 Up: Map Next: F8D9