Prev: 38065 Up: Map Next: 38512
38187: Action: Kill
Attack the named creature.
ActionKill 38187 CALL Parser_ValidateDirectObject Return if the command does not name a single object.
38190 RET C
38191 JR ActionKill_Step1 Continue at ActionKill_Step1 to match the creature the player named.
ActionKill_Loop1 38193 LD HL,25644 Print "Please be more specific." and start a new line.
38196 JR ActionKill_Loop3
ActionKill_Loop2 38198 LD HL,25691 Print "You can't." and start a new line.
ActionKill_Loop3 38201 CALL PrintStringAndANewline
38204 RET Return.
ActionKill_Step1 38205 LD HL,35313 Jump to ActionKill_Step2 unless the command matches the phrase at 35313.
38208 CALL Parser_AdvanceToSeparator
38211 JR NZ,ActionKill_Step2
38213 LD HL,31867 Print What with?.
38216 CALL PrintStringAndANewline
38219 JR ActionKill_Loop1 Continue at ActionKill_Loop1 to ask the player to be more specific.
ActionKill_Step2 38221 LD HL,35343 Jump to ActionKill_Step6 unless the command matches the phrase at 35343.
38224 CALL Parser_AdvanceToSeparator
38227 JR NZ,ActionKill_Step6
This entry point is used by the routine at ActionShoot.
ActionKill_Step3 38229 LD A,39 Jump to ActionKill_Step4 when The alien commander, in space armour. (39) is here or being carried.
38231 CALL IsObjectInCurrentRoom
38234 JR Z,ActionKill_Step4
38236 LD HL,31923 Print "He's already dead." and start a new line.
38239 JP ActionKill_Loop3
ActionKill_Step4 38242 LD A,1 Jump to ActionKill_Step5 when the player is carrying A laser pistol. (1).
38244 CALL IsObjectCarried
38247 JR Z,ActionKill_Step5
38249 LD HL,31321 Print You're not carrying on the same line.
38252 CALL PrintString
38255 LD HL,30251 Print "a gun" and start a new line.
38258 JP ActionKill_Loop3
ActionKill_Step5 38261 LD HL,31878 Print "Space armour is impervious to laser weopons." and start a new line.
38264 JP ActionKill_Loop3
ActionKill_Step6 38267 LD HL,35363 Jump to ActionKill_Step9 unless the command matches the phrase at 35363 (The alien commander, in space armour. (39)).
38270 CALL Parser_AdvanceToSeparator
38273 JR NZ,ActionKill_Step9
38275 LD A,39
38277 CALL IsObjectInCurrentRoom
38280 JR Z,ActionKill_Step7
38282 LD HL,31923 Print "He's already dead." and start a new line.
38285 JP ActionKill_Loop3
ActionKill_Step7 38288 LD A,10 Jump to ActionKill_Step8 when the player is carrying A space axe. (10).
38290 CALL IsObjectCarried
38293 JR Z,ActionKill_Step8
38295 LD HL,31321 Print You're not carrying on the same line.
38298 CALL PrintString
38301 LD HL,30368 Print "an axe" and start a new line.
38304 JP ActionKill_Loop3
ActionKill_Step8 38307 LD BC,9984 Move The alien commander, in space armour. (39) to nowhere (0).
38310 CALL UpdateObjectLocation
38313 LD BC,10293 Move The dead body of the alien commander. (40) to The Alien Commander's Chamber. (53).
38316 CALL UpdateObjectLocation
38319 LD BC,2357 Move A key. (9) to The Alien Commander's Chamber. (53).
38322 CALL UpdateObjectLocation
38325 LD HL,31942 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.
38328 JP ActionKill_Loop3
ActionKill_Step9 38331 LD HL,35383 Jump to ActionKill_Step13 unless the command matches the phrase at 35383.
38334 CALL Parser_AdvanceToSeparator
38337 JR NZ,ActionKill_Step13
This entry point is used by the routine at ActionShoot.
ActionKill_Step10 38339 LD A,18 Jump to ActionKill_Step11 when An android guard. He has shot at you and missed. (18) is here or being carried.
38341 CALL IsObjectInCurrentRoom
38344 JR Z,ActionKill_Step11
38346 LD HL,31923 Print "He's already dead." and start a new line.
38349 JP ActionKill_Loop3
ActionKill_Step11 38352 LD A,1 Jump to ActionKill_Step12 when the player is carrying A laser pistol. (1).
38354 CALL IsObjectCarried
38357 JR Z,ActionKill_Step12
38359 LD HL,31321 Print You're not carrying on the same line.
38362 CALL PrintString
38365 LD HL,30251 Print "a gun" and start a new line.
38368 JP ActionKill_Loop3
ActionKill_Step12 38371 LD BC,4608 Move An android guard. He has shot at you and missed. (18) to nowhere (0).
38374 CALL UpdateObjectLocation
38377 LD BC,4877 Move A dead android guard. (19) to The Guard Room. (13).
38380 CALL UpdateObjectLocation
38383 LD HL,32045 Print "Good shot! He is dead." and start a new line.
38386 JP ActionKill_Loop3
ActionKill_Step13 38389 LD HL,35403 Jump to ActionKill_Step18 unless the command matches the phrase at 35403.
38392 CALL Parser_AdvanceToSeparator
38395 JR NZ,ActionKill_Step18
This entry point is used by the routine at ActionShoot.
ActionKill_Step14 38397 LD A,128 The creatures that can be shot here start at scenic slot 0.
38399 LD B,4
ActionKill_Loop4 38401 LD C,A Test this scenic slot.
38402 CALL IsObjectInCurrentRoom Call IsObjectInCurrentRoom to test whether the object is here.
38405 JR Z,ActionKill_Step15 This creature is here.
38407 LD A,C Try the next scenic slot.
38408 INC A
38409 DJNZ ActionKill_Loop4 Repeat for the other creatures in the group.
38411 LD HL,31923 Print "He's already dead." and start a new line.
38414 JP ActionKill_Loop3
ActionKill_Step15 38417 LD A,1 Jump to ActionKill_Step16 when the player is carrying A laser pistol. (1).
38419 CALL IsObjectCarried
38422 JR Z,ActionKill_Step16
38424 LD HL,31321 Print You're not carrying on the same line.
38427 CALL PrintString
38430 LD HL,30251 Print "a gun" and start a new line.
38433 JP ActionKill_Loop3
ActionKill_Step16 38436 LD A,5 One chance in 5 that the shot misses.
38438 CALL GenerateRandomNumber Call GenerateRandomNumber to generate random number.
38441 JR NZ,ActionKill_Step17 The shot misses.
38443 LD HL,32068 Print "You missed!" and start a new line.
38446 JP ActionKill_Loop3
ActionKill_Step17 38449 LD B,C Remove the creature that was hit.
38450 LD C,0
38452 CALL UpdateObjectLocation Call UpdateObjectLocation to move the object.
38455 LD A,E Clear the scenic event that belonged to that creature.
38456 CALL HandlerToggleScenicFlag
38459 LD A,44 Leave the corpse in the current room.
38461 ADD A,E
38462 LD B,A
38463 LD A,(25123)
38466 LD C,A
38467 CALL UpdateObjectLocation Call UpdateObjectLocation to move the object.
38470 LD HL,32045 Print "Good shot! He is dead." and start a new line.
38473 JP ActionKill_Loop3
ActionKill_Step18 38476 LD HL,35423 Jump to ActionKill_Step21 unless the command matches the phrase at 35423.
38479 CALL Parser_AdvanceToSeparator
38482 JR NZ,ActionKill_Step21
This entry point is used by the routine at ActionShoot.
ActionKill_Step19 38484 LD A,1 Jump to ActionKill_Step20 when the player is carrying A laser pistol. (1).
38486 CALL IsObjectCarried
38489 JR Z,ActionKill_Step20
38491 LD HL,31321 Print You're not carrying on the same line.
38494 CALL PrintString
38497 LD HL,30251 Print "a gun" and start a new line.
38500 JP ActionKill_Loop3
ActionKill_Step20 38503 LD HL,32080 Print "It has no apparent effect." and start a new line.
38506 JP ActionKill_Loop3
ActionKill_Step21 38509 JP ActionKill_Loop2 Continue at ActionKill_Loop2 to say the player can't.
Prev: 38065 Up: Map Next: 38512