Prev: 39478 Up: Map Next: 39629
39489: Action: Use
Use the named object on the named target.
ActionUse 39489 CALL Parser_ValidateDirectObject Return if the command does not name a single object.
39492 RET C
39493 JR ActionUse_Step1 Continue at ActionUse_Step1 to match what the player wants to use.
ActionUse_Loop1 39495 LD HL,32080 Print "It has no apparent effect." and start a new line.
ActionUse_Loop2 39498 CALL PrintStringAndANewline
39501 RET Return.
ActionUse_Step1 39502 LD HL,35656 Jump to ActionUse_Step8 unless the command matches the phrase at 35656.
39505 CALL Parser_AdvanceToSeparator
39508 JR NZ,ActionUse_Step8
39510 LD A,(25123) Fetch the current room.
39513 CP 62 The detonator is being used from Inside a Teleport..
39515 JR Z,ActionUse_Step5
39517 LD A,4 Jump to ActionUse_Step2 when the player is carrying A detonator. (4).
39519 CALL IsObjectCarried
39522 JR Z,ActionUse_Step2
39524 LD HL,33552 Print "You're not carrying the detonator." and start a new line.
39527 JP ActionUse_Loop2
ActionUse_Step2 39530 LD A,11 Jump to ActionUse_Step4 when Some explosives. (11) is not here or being carried.
39532 CALL IsObjectInCurrentRoom
39535 JR NZ,ActionUse_Step4
ActionUse_Step3 39537 LD HL,36275 Return to Game Over (GameOver) after the message.
39540 EX (SP),HL
39541 LD HL,33335 Print "You were standing too close and were caught in the explosion." and start a new line.
39544 JP ActionUse_Loop2
ActionUse_Step4 39547 LD A,11 See where Some explosives. has been left.
39549 CALL GetObjectLocation Call GetObjectLocation to read the object's location.
39552 CP 25 The explosives are not lying in The eastern end of a Long Cavern..
39554 JP NZ,ActionUse_Loop1
39557 LD A,(25123) Fetch the current room.
39560 CP 63 The player is not in The western end of a Long Cavern..
39562 JP NZ,ActionUse_Loop1
39565 LD BC,2816 Move Some explosives. (11) to nowhere (0).
39568 CALL UpdateObjectLocation
39571 LD BC,6400 Move A pile of rocks at the eastern end. (25) to nowhere (0).
39574 CALL UpdateObjectLocation
39577 LD BC,14336 Move A pile of rocks. (56) to nowhere (0).
39580 CALL UpdateObjectLocation
39583 LD BC,6681 Move Some shattered rocks to one side of the eastern exit. (26) to The eastern end of a Long Cavern. (25).
39586 CALL UpdateObjectLocation
39589 LD A,26 Open the east exit of The eastern end of a Long Cavern. onto The Hall of the Ancients..
39591 LD (35826),A
39594 LD HL,33397 Print "There is an explosion. The rocks are shattered, revealing an exit east." and start a new line.
39597 JP ActionUse_Loop2
ActionUse_Step5 39600 LD A,49 See where A strange alien device in one corner. has been left.
39602 CALL GetObjectLocation Call GetObjectLocation to read the object's location.
39605 CP 53 A strange alien device in one corner. is in The Alien Commander's Chamber..
39607 JR Z,ActionUse_Step6
39609 LD BC,12597 Send A strange alien device in one corner. to The Alien Commander's Chamber..
39612 JR ActionUse_Step7 Continue at ActionUse_Step7 to move the alien device.
ActionUse_Step6 39614 LD BC,12565 Send A strange alien device in one corner. to The Control Room..
ActionUse_Step7 39617 CALL UpdateObjectLocation Call UpdateObjectLocation to move the object.
39620 LD HL,33469 Print "There is a momentary sense of disorientation. The teleport is at another location." and start a new line.
39623 JP ActionUse_Loop2
ActionUse_Step8 39626 JP ActionUse_Loop1 Continue at ActionUse_Loop1 to say it has no effect.
Prev: 39478 Up: Map Next: 39629