Prev: 38746 Up: Map Next: 39009
38858: Action: Shoot
Fire the laser pistol at the named target.
ActionShoot 38858 CALL Parser_ValidateDirectObject Return if the command does not name a single object.
38861 RET C
38862 LD A,1 Jump to ActionShoot_Step1 when the player is carrying A laser pistol. (1).
38864 CALL IsObjectCarried
38867 JR Z,ActionShoot_Step1
38869 LD HL,31321 Print You're not carrying on the same line.
38872 CALL PrintString
38875 LD HL,30251 Print "a gun" and start a new line.
ActionShoot_Loop1 38878 CALL PrintStringAndANewline
38881 RET Return.
ActionShoot_Step1 38882 LD HL,35343 Jump to ActionKill_Step3 when the command matches the phrase at 35343.
38885 CALL Parser_AdvanceToSeparator
38888 JP Z,ActionKill_Step3
38891 LD HL,35538 Jump to ActionKill_Step10 when the command matches the phrase at 35538.
38894 CALL Parser_AdvanceToSeparator
38897 JP Z,ActionKill_Step10
38900 LD HL,35383 Jump to ActionKill_Step10 when the command matches the phrase at 35383.
38903 CALL Parser_AdvanceToSeparator
38906 JP Z,ActionKill_Step10
38909 LD HL,35543 Jump to ActionKill_Step14 when the command matches the phrase at 35543.
38912 CALL Parser_AdvanceToSeparator
38915 JP Z,ActionKill_Step14
38918 LD HL,35403 Jump to ActionKill_Step14 when the command matches the phrase at 35403.
38921 CALL Parser_AdvanceToSeparator
38924 JP Z,ActionKill_Step14
38927 LD HL,35533 Jump to ActionKill_Step3 when the command matches the phrase at 35533.
38930 CALL Parser_AdvanceToSeparator
38933 JP Z,ActionKill_Step3
38936 LD HL,35609 Jump to ActionShoot_Step2 unless the command matches the phrase at 35609.
38939 CALL Parser_AdvanceToSeparator
38942 JR NZ,ActionShoot_Step2
38944 LD HL,32519 Print "Your gun is just out of reach." and start a new line.
38947 JP ActionShoot_Loop1
ActionShoot_Step2 38950 LD HL,35548 Jump to ActionShoot_Step5 unless the command matches the phrase at 35548.
38953 CALL Parser_AdvanceToSeparator
38956 JR NZ,ActionShoot_Step5
ActionShoot_Step3 38958 LD HL,39005 These are the targets that can be shot in this room.
38961 LD B,4 Four targets can be shot in this room.
ActionShoot_Loop2 38963 LD A,(HL) Read the next target.
38964 CALL IsObjectInCurrentRoom Call IsObjectInCurrentRoom to test whether the object is here.
38967 JR Z,ActionShoot_Step4 This target is here.
38969 INC HL Try the next target.
38970 DJNZ ActionShoot_Loop2 Repeat for the other targets.
ActionShoot_Step4 38972 LD B,(HL) Remove the target that was hit.
38973 LD C,0
38975 CALL UpdateObjectLocation Call UpdateObjectLocation to move the object.
38978 LD HL,32487 Print "The pedestal has disintegrated." and start a new line.
38981 JP ActionShoot_Loop1
ActionShoot_Step5 38984 LD HL,35573 Jump to ActionShoot_Step6 unless the command matches the phrase at 35573.
38987 CALL Parser_AdvanceToSeparator
38990 JR NZ,ActionShoot_Step6
38992 LD HL,31342 Print The beam is reflected by the mirrored walls and hits you..
38995 CALL PrintStringAndANewline
38998 POP HL The shot ends the game.
38999 JP GameOver Jump to GameOver to game over.
ActionShoot_Step6 39002 JP ActionKill_Step19 Continue at ActionKill_Step19 to see whether the pistol can hit that target.
39005 INC A Targets that can be shot here: 60, 21, 22 and 20.
39006 DEC D
39007 LD D,20
Prev: 38746 Up: Map Next: 39009