![]() |
Routines |
Prev: 63569 | Up: Map | Next: 63814 |
Used by the routine at Action_Kill.
|
||||
Action_Shooting | 63705 | PUSH BC | Stash BC on the stack. | |
Print "You take a shot....".
|
||||
63706 | LD HL,57579 | HL=57579. | ||
63709 | CALL PrintStringAndNewline | Call PrintStringAndNewline. | ||
63712 | LD A,5 | A=5. | ||
63714 | CALL GenerateRandomNumber | Call GenerateRandomNumber. | ||
63717 | POP BC | Restore BC from the stack. | ||
63718 | JR NZ,Action_Shooting_Success | Jump to Action_Shooting_Success if the random generator returns a non-zero response. | ||
Print "Bad luck.
You missed.".
|
||||
63720 | LD HL,57634 | HL=57634. | ||
63723 | JP PausePrintStringAndScroll_Alias | Jump to PausePrintStringAndScroll_Alias. | ||
Action_Shooting_Success | 63726 | LD A,B | A=B. | |
63727 | SUB 3 | A-=3. | ||
63729 | RES 7,A | Reset bit 7 of A. | ||
63731 | LD E,A | E=A. | ||
63732 | LD D,0 | D=0. | ||
63734 | LD HL,63748 | HL=63748. | ||
63737 | ADD HL,DE | HL+=DE. | ||
63738 | LD C,(HL) | C=*HL. | ||
63739 | CALL TransformItem | Call TransformItem. | ||
Print "Good shooting!
The pirate is dead.".
|
||||
63742 | LD HL,57599 | HL=57599. | ||
63745 | JP PausePrintStringAndScroll_Alias | Jump to PausePrintStringAndScroll_Alias. | ||
63748 | DEFB 35,36,37,0,0,38 | |||
This entry point is used by the routine at Action_Kill.
|
||||
Action_Shooting_0 | 63754 | LD HL,60066 | Call MatchPhraseTokens with PhraseTokens_ParrotWithGun. | |
63757 | CALL MatchPhraseTokens | |||
63760 | JR NZ,Action_Shooting_1 | Jump to Action_Shooting_1 if the token isn't for the . | ||
Print "It's already dead.".
|
||||
63762 | LD HL,57675 | HL=57675. | ||
63765 | JP PrintStringAndNewline_Alias | Jump to PrintStringAndNewline_Alias. | ||
Action_Shooting_1 | 63768 | JP Response_YouCant_Duplicate | Jump to Response_YouCant_Duplicate. | |
63771 | CALL Parser_ValidateDirectObject | Call Parser_ValidateDirectObject. | ||
63774 | RET C | Return if the direct object is malformed. | ||
63775 | LD A,15 | Call CheckObjectInInventory with item: "A gun". | ||
63777 | CALL CheckObjectInInventory | |||
63780 | JR Z,PlayerHasGun | Jump to PlayerHasGun if the player has the gun in their inventory. | ||
Print "You haven't got a gun.".
|
||||
63782 | LD HL,57694 | HL=57694. | ||
63785 | JP PrintStringAndNewline_Alias | Jump to PrintStringAndNewline_Alias. | ||
PlayerHasGun | 63788 | LD HL,60070 | Call MatchPhraseTokens with PhraseTokens_PirateWithGun_2. | |
63791 | CALL MatchPhraseTokens | |||
63794 | JP Z,Action_Kill_3 | Jump to Action_Kill_3 if the token is for the . | ||
63797 | LD HL,60076 | Call MatchPhraseTokens with PhraseTokens_ParrotWithGun_2. | ||
63800 | CALL MatchPhraseTokens | |||
63803 | JR NZ,Shooting_Invalid | Jump to Shooting_Invalid if the token isn't for the . | ||
Print "It's already dead.".
|
||||
63805 | LD HL,57675 | HL=57675. | ||
63808 | JP PrintStringAndNewline_Alias | Jump to PrintStringAndNewline_Alias. | ||
Nothing else is valid.
|
||||
Shooting_Invalid | 63811 | JP Response_ItHasNoApparentEffect | Jump to Response_ItHasNoApparentEffect. |
Prev: 63569 | Up: Map | Next: 63814 |