![]() |
Routines |
Prev: F851 | Up: Map | Next: F946 |
Used by the routine at Action_Kill.
|
||||
Action_Shooting | F8D9 | PUSH BC | Stash BC on the stack. | |
Print "You take a shot....".
|
||||
F8DA | LD HL,$E0EB | HL=E0EB. | ||
F8DD | CALL PrintStringAndNewline | Call PrintStringAndNewline. | ||
F8E0 | LD A,$05 | A=05. | ||
F8E2 | CALL GenerateRandomNumber | Call GenerateRandomNumber. | ||
F8E5 | POP BC | Restore BC from the stack. | ||
F8E6 | JR NZ,Action_Shooting_Success | Jump to Action_Shooting_Success if the random generator returns a non-zero response. | ||
Print "Bad luck.
You missed.".
|
||||
F8E8 | LD HL,$E122 | HL=E122. | ||
F8EB | JP PausePrintStringAndScroll_Alias | Jump to PausePrintStringAndScroll_Alias. | ||
Action_Shooting_Success | F8EE | LD A,B | A=B. | |
F8EF | SUB $03 | A-=03. | ||
F8F1 | RES 7,A | Reset bit 7 of A. | ||
F8F3 | LD E,A | E=A. | ||
F8F4 | LD D,$00 | D=00. | ||
F8F6 | LD HL,$F904 | HL=F904. | ||
F8F9 | ADD HL,DE | HL+=DE. | ||
F8FA | LD C,(HL) | C=*HL. | ||
F8FB | CALL TransformItem | Call TransformItem. | ||
Print "Good shooting!
The pirate is dead.".
|
||||
F8FE | LD HL,$E0FF | HL=E0FF. | ||
F901 | JP PausePrintStringAndScroll_Alias | Jump to PausePrintStringAndScroll_Alias. | ||
F904 | DEFB $23,$24,$25,$00,$00,$26 | |||
This entry point is used by the routine at Action_Kill.
|
||||
Action_Shooting_0 | F90A | LD HL,$EAA2 | Call MatchPhraseTokens with PhraseTokens_ParrotWithGun. | |
F90D | CALL MatchPhraseTokens | |||
F910 | JR NZ,Action_Shooting_1 | Jump to Action_Shooting_1 if the token isn't for the . | ||
Print "It's already dead.".
|
||||
F912 | LD HL,$E14B | HL=E14B. | ||
F915 | JP PrintStringAndNewline_Alias | Jump to PrintStringAndNewline_Alias. | ||
Action_Shooting_1 | F918 | JP Response_YouCant_Duplicate | Jump to Response_YouCant_Duplicate. | |
F91B | CALL Parser_ValidateDirectObject | Call Parser_ValidateDirectObject. | ||
F91E | RET C | Return if the direct object is malformed. | ||
F91F | LD A,$0F | Call CheckObjectInInventory with item: "A gun". | ||
F921 | CALL CheckObjectInInventory | |||
F924 | JR Z,PlayerHasGun | Jump to PlayerHasGun if the player has the gun in their inventory. | ||
Print "You haven't got a gun.".
|
||||
F926 | LD HL,$E15E | HL=E15E. | ||
F929 | JP PrintStringAndNewline_Alias | Jump to PrintStringAndNewline_Alias. | ||
PlayerHasGun | F92C | LD HL,$EAA6 | Call MatchPhraseTokens with PhraseTokens_PirateWithGun_2. | |
F92F | CALL MatchPhraseTokens | |||
F932 | JP Z,Action_Kill_3 | Jump to Action_Kill_3 if the token is for the . | ||
F935 | LD HL,$EAAC | Call MatchPhraseTokens with PhraseTokens_ParrotWithGun_2. | ||
F938 | CALL MatchPhraseTokens | |||
F93B | JR NZ,Shooting_Invalid | Jump to Shooting_Invalid if the token isn't for the . | ||
Print "It's already dead.".
|
||||
F93D | LD HL,$E14B | HL=E14B. | ||
F940 | JP PrintStringAndNewline_Alias | Jump to PrintStringAndNewline_Alias. | ||
Nothing else is valid.
|
||||
Shooting_Invalid | F943 | JP Response_ItHasNoApparentEffect | Jump to Response_ItHasNoApparentEffect. |
Prev: F851 | Up: Map | Next: F946 |