Prev: 63569 Up: Map Next: 63771
63705: Action: Shooting
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=Messaging_TakeAShot.
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=Messaging_YouMissed.
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=Messaging_PirateDead.
63745 JP PausePrintStringAndScroll_Alias Jump to PausePrintStringAndScroll_Alias.
The dead pirate that takes the place of each pirate when it is shot. Action_Shooting_Success indexes this table with the scenic event number minus 3 (so event 131 is the first entry), and TransformItem swaps the event for the item.
63748 DEFB 35 Event 131 (a pirate): item 35, "A dead pirate".
63749 DEFB 36 Event 132 (a pirate): item 36, "A dead pirate".
63750 DEFB 37 Event 133 (a pirate): item 37, "A dead pirate".
63751 DEFB 0,0 Events 134 and 135 (the water snake and the spider): not used, as Action_Kill_3 only ever finds a pirate.
63753 DEFB 38 Event 136 (the pirate from the beach): item 38, "A dead pirate".
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 parrot with the gun.
Print "It's already dead.".
63762 LD HL,57675 HL=Messaging_AlreadyDead.
63765 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Action_Shooting_1 63768 JP Response_YouCant_Duplicate Jump to Response_YouCant_Duplicate.
Prev: 63569 Up: Map Next: 63771