Prev: 94B1 Up: Map Next: 9670
952B: Action: Kill
Attack the named creature.
ActionKill 952B CALL Parser_ValidateDirectObject Return if the command does not name a single object.
952E RET C
952F JR ActionKill_Step1 Continue at ActionKill_Step1 to match the creature the player named.
ActionKill_Loop1 9531 LD HL,$642C Print "Please be more specific." and start a new line.
9534 JR ActionKill_Loop3
ActionKill_Loop2 9536 LD HL,$645B Print "You can't." and start a new line.
ActionKill_Loop3 9539 CALL PrintStringAndANewline
953C RET Return.
ActionKill_Step1 953D LD HL,$89F1 Jump to ActionKill_Step2 unless the command matches the phrase at 89F1.
9540 CALL Parser_AdvanceToSeparator
9543 JR NZ,ActionKill_Step2
9545 LD HL,$7C7B Print What with?.
9548 CALL PrintStringAndANewline
954B JR ActionKill_Loop1 Continue at ActionKill_Loop1 to ask the player to be more specific.
ActionKill_Step2 954D LD HL,$8A0F Jump to ActionKill_Step6 unless the command matches the phrase at 8A0F.
9550 CALL Parser_AdvanceToSeparator
9553 JR NZ,ActionKill_Step6
This entry point is used by the routine at ActionShoot.
ActionKill_Step3 9555 LD A,$27 Jump to ActionKill_Step4 when The alien commander, in space armour. (27) is here or being carried.
9557 CALL IsObjectInCurrentRoom
955A JR Z,ActionKill_Step4
955C LD HL,$7CB3 Print "He's already dead." and start a new line.
955F JP ActionKill_Loop3
ActionKill_Step4 9562 LD A,$01 Jump to ActionKill_Step5 when the player is carrying A laser pistol. (01).
9564 CALL IsObjectCarried
9567 JR Z,ActionKill_Step5
9569 LD HL,$7A59 Print You're not carrying on the same line.
956C CALL PrintString
956F LD HL,$762B Print "a gun" and start a new line.
9572 JP ActionKill_Loop3
ActionKill_Step5 9575 LD HL,$7C86 Print "Space armour is impervious to laser weopons." and start a new line.
9578 JP ActionKill_Loop3
ActionKill_Step6 957B LD HL,$8A23 Jump to ActionKill_Step9 unless the command matches the phrase at 8A23 (The alien commander, in space armour. (27)).
957E CALL Parser_AdvanceToSeparator
9581 JR NZ,ActionKill_Step9
9583 LD A,$27
9585 CALL IsObjectInCurrentRoom
9588 JR Z,ActionKill_Step7
958A LD HL,$7CB3 Print "He's already dead." and start a new line.
958D JP ActionKill_Loop3
ActionKill_Step7 9590 LD A,$0A Jump to ActionKill_Step8 when the player is carrying A space axe. (0A).
9592 CALL IsObjectCarried
9595 JR Z,ActionKill_Step8
9597 LD HL,$7A59 Print You're not carrying on the same line.
959A CALL PrintString
959D LD HL,$76A0 Print "an axe" and start a new line.
95A0 JP ActionKill_Loop3
ActionKill_Step8 95A3 LD BC,$2700 Move The alien commander, in space armour. (27) to nowhere (00).
95A6 CALL UpdateObjectLocation
95A9 LD BC,$2835 Move The dead body of the alien commander. (28) to The Alien Commander's Chamber. (35).
95AC CALL UpdateObjectLocation
95AF LD BC,$0935 Move A key. (09) to The Alien Commander's Chamber. (35).
95B2 CALL UpdateObjectLocation
95B5 LD HL,$7CC6 Print "The axe pierces the space armour The commander falls down,dead. As he falls, a key drops to the floor." and start a new line.
95B8 JP ActionKill_Loop3
ActionKill_Step9 95BB LD HL,$8A37 Jump to ActionKill_Step13 unless the command matches the phrase at 8A37.
95BE CALL Parser_AdvanceToSeparator
95C1 JR NZ,ActionKill_Step13
This entry point is used by the routine at ActionShoot.
ActionKill_Step10 95C3 LD A,$12 Jump to ActionKill_Step11 when An android guard. He has shot at you and missed. (12) is here or being carried.
95C5 CALL IsObjectInCurrentRoom
95C8 JR Z,ActionKill_Step11
95CA LD HL,$7CB3 Print "He's already dead." and start a new line.
95CD JP ActionKill_Loop3
ActionKill_Step11 95D0 LD A,$01 Jump to ActionKill_Step12 when the player is carrying A laser pistol. (01).
95D2 CALL IsObjectCarried
95D5 JR Z,ActionKill_Step12
95D7 LD HL,$7A59 Print You're not carrying on the same line.
95DA CALL PrintString
95DD LD HL,$762B Print "a gun" and start a new line.
95E0 JP ActionKill_Loop3
ActionKill_Step12 95E3 LD BC,$1200 Move An android guard. He has shot at you and missed. (12) to nowhere (00).
95E6 CALL UpdateObjectLocation
95E9 LD BC,$130D Move A dead android guard. (13) to The Guard Room. (0D).
95EC CALL UpdateObjectLocation
95EF LD HL,$7D2D Print "Good shot! He is dead." and start a new line.
95F2 JP ActionKill_Loop3
ActionKill_Step13 95F5 LD HL,$8A4B Jump to ActionKill_Step18 unless the command matches the phrase at 8A4B.
95F8 CALL Parser_AdvanceToSeparator
95FB JR NZ,ActionKill_Step18
This entry point is used by the routine at ActionShoot.
ActionKill_Step14 95FD LD A,$80 The creatures that can be shot here start at scenic slot 00.
95FF LD B,$04
ActionKill_Loop4 9601 LD C,A Test this scenic slot.
9602 CALL IsObjectInCurrentRoom Call IsObjectInCurrentRoom to test whether the object is here.
9605 JR Z,ActionKill_Step15 This creature is here.
9607 LD A,C Try the next scenic slot.
9608 INC A
9609 DJNZ ActionKill_Loop4 Repeat for the other creatures in the group.
960B LD HL,$7CB3 Print "He's already dead." and start a new line.
960E JP ActionKill_Loop3
ActionKill_Step15 9611 LD A,$01 Jump to ActionKill_Step16 when the player is carrying A laser pistol. (01).
9613 CALL IsObjectCarried
9616 JR Z,ActionKill_Step16
9618 LD HL,$7A59 Print You're not carrying on the same line.
961B CALL PrintString
961E LD HL,$762B Print "a gun" and start a new line.
9621 JP ActionKill_Loop3
ActionKill_Step16 9624 LD A,$05 One chance in 05 that the shot misses.
9626 CALL GenerateRandomNumber Call GenerateRandomNumber to generate random number.
9629 JR NZ,ActionKill_Step17 The shot misses.
962B LD HL,$7D44 Print "You missed!" and start a new line.
962E JP ActionKill_Loop3
ActionKill_Step17 9631 LD B,C Remove the creature that was hit.
9632 LD C,$00
9634 CALL UpdateObjectLocation Call UpdateObjectLocation to move the object.
9637 LD A,E Clear the scenic event that belonged to that creature.
9638 CALL HandlerToggleScenicFlag
963B LD A,$2C Leave the corpse in the current room.
963D ADD A,E
963E LD B,A
963F LD A,($6223)
9642 LD C,A
9643 CALL UpdateObjectLocation Call UpdateObjectLocation to move the object.
9646 LD HL,$7D2D Print "Good shot! He is dead." and start a new line.
9649 JP ActionKill_Loop3
ActionKill_Step18 964C LD HL,$8A5F Jump to ActionKill_Step21 unless the command matches the phrase at 8A5F.
964F CALL Parser_AdvanceToSeparator
9652 JR NZ,ActionKill_Step21
This entry point is used by the routine at ActionShoot.
ActionKill_Step19 9654 LD A,$01 Jump to ActionKill_Step20 when the player is carrying A laser pistol. (01).
9656 CALL IsObjectCarried
9659 JR Z,ActionKill_Step20
965B LD HL,$7A59 Print You're not carrying on the same line.
965E CALL PrintString
9661 LD HL,$762B Print "a gun" and start a new line.
9664 JP ActionKill_Loop3
ActionKill_Step20 9667 LD HL,$7D50 Print "It has no apparent effect." and start a new line.
966A JP ActionKill_Loop3
ActionKill_Step21 966D JP ActionKill_Loop2 Continue at ActionKill_Loop2 to say the player can't.
Prev: 94B1 Up: Map Next: 9670