![]() |
Routines |
| Prev: 975A | Up: Map | Next: 9861 |
|
Fire the laser pistol at the named target.
|
||||
| ActionShoot | 97CA | CALL Parser_ValidateDirectObject | Return if the command does not name a single object. | |
| 97CD | RET C | |||
| 97CE | LD A,$01 | Jump to ActionShoot_Step1 when the player is carrying A laser pistol. (01). | ||
| 97D0 | CALL IsObjectCarried | |||
| 97D3 | JR Z,ActionShoot_Step1 | |||
| 97D5 | LD HL,$7A59 | Print You're not carrying on the same line. | ||
| 97D8 | CALL PrintString | |||
| 97DB | LD HL,$762B | Print "a gun" and start a new line. | ||
| ActionShoot_Loop1 | 97DE | CALL PrintStringAndANewline | ||
| 97E1 | RET | Return. | ||
| ActionShoot_Step1 | 97E2 | LD HL,$8A0F | Jump to ActionKill_Step3 when the command matches the phrase at 8A0F. | |
| 97E5 | CALL Parser_AdvanceToSeparator | |||
| 97E8 | JP Z,ActionKill_Step3 | |||
| 97EB | LD HL,$8AD2 | Jump to ActionKill_Step10 when the command matches the phrase at 8AD2. | ||
| 97EE | CALL Parser_AdvanceToSeparator | |||
| 97F1 | JP Z,ActionKill_Step10 | |||
| 97F4 | LD HL,$8A37 | Jump to ActionKill_Step10 when the command matches the phrase at 8A37. | ||
| 97F7 | CALL Parser_AdvanceToSeparator | |||
| 97FA | JP Z,ActionKill_Step10 | |||
| 97FD | LD HL,$8AD7 | Jump to ActionKill_Step14 when the command matches the phrase at 8AD7. | ||
| 9800 | CALL Parser_AdvanceToSeparator | |||
| 9803 | JP Z,ActionKill_Step14 | |||
| 9806 | LD HL,$8A4B | Jump to ActionKill_Step14 when the command matches the phrase at 8A4B. | ||
| 9809 | CALL Parser_AdvanceToSeparator | |||
| 980C | JP Z,ActionKill_Step14 | |||
| 980F | LD HL,$8ACD | Jump to ActionKill_Step3 when the command matches the phrase at 8ACD. | ||
| 9812 | CALL Parser_AdvanceToSeparator | |||
| 9815 | JP Z,ActionKill_Step3 | |||
| 9818 | LD HL,$8B19 | Jump to ActionShoot_Step2 unless the command matches the phrase at 8B19. | ||
| 981B | CALL Parser_AdvanceToSeparator | |||
| 981E | JR NZ,ActionShoot_Step2 | |||
| 9820 | LD HL,$7F07 | Print "Your gun is just out of reach." and start a new line. | ||
| 9823 | JP ActionShoot_Loop1 | |||
| ActionShoot_Step2 | 9826 | LD HL,$8ADC | Jump to ActionShoot_Step5 unless the command matches the phrase at 8ADC. | |
| 9829 | CALL Parser_AdvanceToSeparator | |||
| 982C | JR NZ,ActionShoot_Step5 | |||
| ActionShoot_Step3 | 982E | LD HL,$985D | These are the targets that can be shot in this room. | |
| 9831 | LD B,$04 | Four targets can be shot in this room. | ||
| ActionShoot_Loop2 | 9833 | LD A,(HL) | Read the next target. | |
| 9834 | CALL IsObjectInCurrentRoom | Call IsObjectInCurrentRoom to test whether the object is here. | ||
| 9837 | JR Z,ActionShoot_Step4 | This target is here. | ||
| 9839 | INC HL | Try the next target. | ||
| 983A | DJNZ ActionShoot_Loop2 | Repeat for the other targets. | ||
| ActionShoot_Step4 | 983C | LD B,(HL) | Remove the target that was hit. | |
| 983D | LD C,$00 | |||
| 983F | CALL UpdateObjectLocation | Call UpdateObjectLocation to move the object. | ||
| 9842 | LD HL,$7EE7 | Print "The pedestal has disintegrated." and start a new line. | ||
| 9845 | JP ActionShoot_Loop1 | |||
| ActionShoot_Step5 | 9848 | LD HL,$8AF5 | Jump to ActionShoot_Step6 unless the command matches the phrase at 8AF5. | |
| 984B | CALL Parser_AdvanceToSeparator | |||
| 984E | JR NZ,ActionShoot_Step6 | |||
| 9850 | LD HL,$7A6E | Print The beam is reflected by the mirrored walls and hits you.. | ||
| 9853 | CALL PrintStringAndANewline | |||
| 9856 | POP HL | The shot ends the game. | ||
| 9857 | JP GameOver | Jump to GameOver to game over. | ||
| ActionShoot_Step6 | 985A | JP ActionKill_Step19 | Continue at ActionKill_Step19 to see whether the pistol can hit that target. | |
| 985D | INC A | Targets that can be shot here: 3C, 15, 16 and 14. | ||
| 985E | DEC D | |||
| 985F | LD D,$14 | |||
| Prev: 975A | Up: Map | Next: 9861 |