Prev: 38065 Up: Map Next: 38512
38187: Action: Kill
Attack the named creature with a weapon.
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.
Print "Please be more specific.".
ActionKill_Loop1 38193 LD HL,25644 HL=Messaging_PleaseBeMoreSpecific.
38196 JR ActionKill_Loop3 Jump to ActionKill_Loop3.
Print "You can't.".
ActionKill_Loop2 38198 LD HL,25691 HL=Messaging_YouCanT.
ActionKill_Loop3 38201 CALL PrintStringAndANewline 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
Print "He's already dead.".
38236 LD HL,31923 HL=Messaging_HeSAlreadyDead.
38239 JP ActionKill_Loop3 Jump to 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
Print "a gun".
38255 LD HL,30251 HL=Messaging_AGun.
38258 JP ActionKill_Loop3 Jump to ActionKill_Loop3.
Print "Space armour is impervious to laser weopons.".
ActionKill_Step5 38261 LD HL,31878 HL=Messaging_SpaceArmourIsImperviousToLaserWeopons.
38264 JP ActionKill_Loop3 Jump to 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
Print "He's already dead.".
38282 LD HL,31923 HL=Messaging_HeSAlreadyDead.
38285 JP ActionKill_Loop3 Jump to 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
Print "an axe".
38301 LD HL,30368 HL=Messaging_AnAxe.
38304 JP ActionKill_Loop3 Jump to 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 room 53: " The Alien Commander's Chamber".
38316 CALL UpdateObjectLocation
38319 LD BC,2357 Move A key. (9) to room 53: " The Alien Commander's Chamber".
38322 CALL UpdateObjectLocation
Print "The axe pierces the space armour The commander falls down,dead. As he falls, a key drops to the floor.".
38325 LD HL,31942 HL=Messaging_TheAxePiercesTheSpaceArmourTheCommanderF.
38328 JP ActionKill_Loop3 Jump to 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
Print "He's already dead.".
38346 LD HL,31923 HL=Messaging_HeSAlreadyDead.
38349 JP ActionKill_Loop3 Jump to 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
Print "a gun".
38365 LD HL,30251 HL=Messaging_AGun.
38368 JP ActionKill_Loop3 Jump to 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 room 13: " The Guard Room".
38380 CALL UpdateObjectLocation
Print "Good shot! He is dead.".
38383 LD HL,32045 HL=Messaging_GoodShotHeIsDead.
38386 JP ActionKill_Loop3 Jump to 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.
Print "He's already dead.".
38411 LD HL,31923 HL=Messaging_HeSAlreadyDead.
38414 JP ActionKill_Loop3 Jump to 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
Print "a gun".
38430 LD HL,30251 HL=Messaging_AGun.
38433 JP ActionKill_Loop3 Jump to 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.
Print "You missed!".
38443 LD HL,32068 HL=Messaging_YouMissed.
38446 JP ActionKill_Loop3 Jump to 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.
Print "Good shot! He is dead.".
38470 LD HL,32045 HL=Messaging_GoodShotHeIsDead.
38473 JP ActionKill_Loop3 Jump to 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
Print "a gun".
38497 LD HL,30251 HL=Messaging_AGun.
38500 JP ActionKill_Loop3 Jump to ActionKill_Loop3.
Print "It has no apparent effect.".
ActionKill_Step20 38503 LD HL,32080 HL=Messaging_ItHasNoApparentEffect.
38506 JP ActionKill_Loop3 Jump to ActionKill_Loop3.
ActionKill_Step21 38509 JP ActionKill_Loop2 Continue at ActionKill_Loop2 to say the player can't.
Prev: 38065 Up: Map Next: 38512