Prev: 37228 Up: Map Next: 37755
37272: Action: Drop
Drop one of the objects the player named.
ActionDrop 37272 CALL Parser_ValidateDirectObject Return if the command does not name a single object.
37275 RET C
37276 CP 3 Jump to ActionDrop_Step4 when the command names fewer than 3 nouns.
37278 JR C,ActionDrop_Step4
Print "Please rephrase that.".
37280 LD HL,25669 HL=Messaging_PleaseRephraseThat.
37283 JR ActionDrop_Loop4 Jump to ActionDrop_Loop4.
Check if the player is holding the requested item?
ActionDrop_Loop1 37285 CALL IsObjectCarried Call IsObjectCarried to test whether the object is carried.
37288 JR Z,ActionDrop_Step3 Jump to ActionDrop_Step3 if the named object is being carried.
The player is not holding that object.
ActionDrop_Loop2 37290 LD HL,31321 Print You're not carrying on the same line.
37293 CALL PrintString
37296 LD A,E Copy the object ID back into A.
Finish "You're not carrying" with "it" or "them".
ActionDrop_Step1 37297 LD HL,36880 HL=Table_ItemsWhichArePlural.
37300 LD BC,4 BC=0004.
37303 CPIR Search Table_ItemsWhichArePlural for the item ID among the plural items.
37305 JR Z,ActionDrop_Step2 Jump to ActionDrop_Step2 if the item is plural.
Print "it.".
37307 LD HL,31288 HL=Messaging_It.
37310 JR ActionDrop_Loop4 Jump to ActionDrop_Loop4.
Print "them.".
ActionDrop_Step2 37312 LD HL,31292 HL=Messaging_Them.
37315 JR ActionDrop_Loop4 Jump to ActionDrop_Loop4.
The player has the item, so drop it in the current room.
ActionDrop_Step3 37317 LD B,E Put the object down in the current room.
37318 LD A,(25123)
37321 LD C,A
37322 CALL UpdateObjectLocation Call UpdateObjectLocation to move the object.
ActionDrop_Loop3 37325 LD HL,25132 The player is carrying one fewer object.
37328 DEC (HL)
Print "O.K.".
37329 LD HL,25702 HL=Messaging_OK.
ActionDrop_Loop4 37332 CALL PrintStringAndANewline Call PrintStringAndANewline.
37335 RET Return.
Was the player trying to drop the knife?
ActionDrop_Step4 37336 LD HL,35161 Call Parser_AdvanceToSeparator with 35161.
37339 CALL Parser_AdvanceToSeparator
37342 JR NZ,ActionDrop_Step5 Jump to ActionDrop_Step5 if the token isn't for the knife.
37344 LD A,0 A="A knife."; jump to ActionDrop_Loop1.
37346 JP ActionDrop_Loop1
Was the player trying to drop the laser pistol?
ActionDrop_Step5 37349 LD HL,35177 Call Parser_AdvanceToSeparator with 35177.
37352 CALL Parser_AdvanceToSeparator
37355 JR NZ,ActionDrop_Step6 Jump to ActionDrop_Step6 if the token isn't for the laser pistol.
37357 LD A,1 A="A laser pistol."; jump to ActionDrop_Loop1.
37359 JP ActionDrop_Loop1
Was the player trying to drop the coin?
ActionDrop_Step6 37362 LD HL,35168 Call Parser_AdvanceToSeparator with 35168.
37365 CALL Parser_AdvanceToSeparator
37368 JR NZ,ActionDrop_Step7 Jump to ActionDrop_Step7 if the token isn't for the coin.
37370 LD A,2 A="A coin."; jump to ActionDrop_Loop1.
37372 JP ActionDrop_Loop1
Was the player trying to drop the crystal rod?
ActionDrop_Step7 37375 LD HL,35182 Call Parser_AdvanceToSeparator with 35182.
37378 CALL Parser_AdvanceToSeparator
37381 JR NZ,ActionDrop_Step8 Jump to ActionDrop_Step8 if the token isn't for the crystal rod.
37383 LD A,3 A="A crystal rod."; jump to ActionDrop_Loop1.
37385 JP ActionDrop_Loop1
Was the player trying to drop the detonator?
ActionDrop_Step8 37388 LD HL,35136 Call Parser_AdvanceToSeparator with Table_PhraseLists.
37391 CALL Parser_AdvanceToSeparator
37394 JR NZ,ActionDrop_Step9 Jump to ActionDrop_Step9 if the token isn't for the detonator.
37396 LD A,4 A="A detonator."; jump to ActionDrop_Loop1.
37398 JP ActionDrop_Loop1
Was the player trying to drop the metal bar?
ActionDrop_Step9 37401 LD HL,35172 Call Parser_AdvanceToSeparator with 35172.
37404 CALL Parser_AdvanceToSeparator
37407 JR NZ,ActionDrop_Step10 Jump to ActionDrop_Step10 if the token isn't for the metal bar.
37409 LD A,5 A="A metal bar."; jump to ActionDrop_Loop1.
37411 JP ActionDrop_Loop1
Was the player trying to drop the glowing sphere?
ActionDrop_Step10 37414 LD HL,35187 Call Parser_AdvanceToSeparator with 35187.
37417 CALL Parser_AdvanceToSeparator
37420 JR NZ,ActionDrop_Step11 Jump to ActionDrop_Step11 if the token isn't for the glowing sphere.
37422 LD A,6 A="A glowing sphere."; jump to ActionDrop_Loop1.
37424 JP ActionDrop_Loop1
Was the player trying to drop the poison fungus?
ActionDrop_Step11 37427 LD HL,35138 Call Parser_AdvanceToSeparator with 35138.
37430 CALL Parser_AdvanceToSeparator
37433 JR NZ,ActionDrop_Step12 Jump to ActionDrop_Step12 if the token isn't for the poison fungus.
37435 LD A,7 A="Some poison fungus."; jump to ActionDrop_Loop1.
37437 JP ActionDrop_Loop1
Was the player trying to drop the round stones?
ActionDrop_Step12 37440 LD HL,35192 Call Parser_AdvanceToSeparator with 35192.
37443 CALL Parser_AdvanceToSeparator
37446 JR NZ,ActionDrop_Step13 Jump to ActionDrop_Step13 if the token isn't for the round stones.
37448 LD A,8 A="Some round stones."; jump to ActionDrop_Loop1.
37450 JP ActionDrop_Loop1
Was the player trying to drop the key?
ActionDrop_Step13 37453 LD HL,35170 Call Parser_AdvanceToSeparator with 35170.
37456 CALL Parser_AdvanceToSeparator
37459 JR NZ,ActionDrop_Step14 Jump to ActionDrop_Step14 if the token isn't for the key.
37461 LD A,9 A="A key."; jump to ActionDrop_Loop1.
37463 JP ActionDrop_Loop1
Was the player trying to drop the space axe?
ActionDrop_Step14 37466 LD HL,35163 Call Parser_AdvanceToSeparator with 35163.
37469 CALL Parser_AdvanceToSeparator
37472 JR NZ,ActionDrop_Step15 Jump to ActionDrop_Step15 if the token isn't for the space axe.
37474 LD A,10 A="A space axe."; jump to ActionDrop_Loop1.
37476 JP ActionDrop_Loop1
Was the player trying to drop the explosives?
ActionDrop_Step15 37479 LD HL,35143 Call Parser_AdvanceToSeparator with 35143.
37482 CALL Parser_AdvanceToSeparator
37485 JR NZ,ActionDrop_Step16 Jump to ActionDrop_Step16 if the token isn't for the explosives.
37487 LD A,11 A="Some explosives."; jump to ActionDrop_Loop1.
37489 JP ActionDrop_Loop1
ActionDrop_Step16 37492 JR ActionDrop_Step17 Continue at ActionDrop_Step17 to try the special drops.
Was the player trying to drop the sphere onto the pedestal?
ActionDrop_Step17 37494 LD HL,35199 Call Parser_AdvanceToSeparator with 35199.
37497 CALL Parser_AdvanceToSeparator
37500 JR NZ,ActionDrop_Step20 Jump to ActionDrop_Step20 if the token isn't for that phrase.
37502 LD A,6 Jump to ActionDrop_Loop2 when the player is not carrying "A glowing sphere.".
37504 CALL IsObjectCarried
37507 JP NZ,ActionDrop_Loop2
37510 LD A,(25123) Fetch the current room.
37513 CP 28 The sphere was not dropped in The Crystal Chamber.
37515 JR NZ,ActionDrop_Step18
37517 LD BC,5376 Clear the glass pedestal in The Crystal Chamber.
37520 JR ActionDrop_Step19 Continue at ActionDrop_Step19 to move what was dropped.
ActionDrop_Step18 37522 LD BC,5632 Clear the glass pedestal in The Blue Room.
ActionDrop_Step19 37525 CALL UpdateObjectLocation Call UpdateObjectLocation to move the object.
37528 LD BC,1536 Move A glowing sphere. (6) to nowhere (0).
37531 CALL UpdateObjectLocation
37534 LD A,(25123) Fetch the current room.
37537 LD C,A Leave A glowing sphere sitting on a raised dish on a glass pedestal. in the room where it was dropped.
37538 LD B,60
37540 CALL UpdateObjectLocation Call UpdateObjectLocation to move the object.
37543 JP ActionDrop_Loop3 Continue at ActionDrop_Loop3 to count one fewer object and confirm the drop.
Was the player trying to drop the axe on the second android?
ActionDrop_Step20 37546 LD HL,35463 Jump to ActionDrop_Step22 unless the command matches the phrase at 35463 (The alien commander, in space armour. (39)).
37549 CALL Parser_AdvanceToSeparator
37552 JR NZ,ActionDrop_Step22
37554 LD A,39
37556 CALL IsObjectInCurrentRoom
37559 JR Z,ActionDrop_Step21
Print "He's already dead.".
37561 LD HL,31923 HL=Messaging_HeSAlreadyDead.
37564 JP ActionDrop_Loop4 Jump to ActionDrop_Loop4.
ActionDrop_Step21 37567 LD A,10 Jump back to ActionDrop_Loop2 when the player is not carrying A space axe. (10).
37569 CALL IsObjectCarried
37572 JP NZ,ActionDrop_Loop2
37575 LD BC,9984 Move The alien commander, in space armour. (39) to nowhere (0).
37578 CALL UpdateObjectLocation
37581 LD BC,10293 Move The dead body of the alien commander. (40) to room 53: " The Alien Commander's Chamber".
37584 CALL UpdateObjectLocation
37587 LD A,(25123) Fetch the current room.
37590 LD C,A Leave A space axe. in the current room.
37591 LD B,10
37593 CALL UpdateObjectLocation Call UpdateObjectLocation to move the object.
37596 LD HL,25132 The player is carrying one fewer object.
37599 DEC (HL)
37600 LD BC,2357 Move A key. (9) to room 53: " The Alien Commander's Chamber".
37603 CALL UpdateObjectLocation
Print "The axe pierces the space armour The commander falls down,dead. As he falls, a key drops to the floor.".
37606 LD HL,31942 HL=Messaging_TheAxePiercesTheSpaceArmourTheCommanderF.
37609 JP ActionDrop_Loop4 Jump to ActionDrop_Loop4.
Was the player trying to drop the fungus on the slug?
ActionDrop_Step22 37612 LD HL,35483 Point at the phrase at 35483 and call Parser_AdvanceToSeparator to match it against the command.
37615 CALL Parser_AdvanceToSeparator
37618 JR NZ,ActionDrop_Step23 Jump to ActionDrop_Step23 if it doesn't match.
37620 LD A,7 Jump to ActionDrop_Loop2 when the player is not carrying Some poison fungus. (7).
37622 CALL IsObjectCarried
37625 JP NZ,ActionDrop_Loop2
37628 LD BC,9216 Move A huge,blind slug is blocking the western exit. It is advancing toward you. (36) to nowhere (0).
37631 CALL UpdateObjectLocation
37634 LD BC,9520 Move A pool of slime on the floor. (37) to room 48: " The Sloping Corridor".
37637 CALL UpdateObjectLocation
37640 LD BC,1792 Move Some poison fungus. (7) to nowhere (0).
37643 CALL UpdateObjectLocation
37646 LD HL,25132 The player is carrying one fewer object.
37649 DEC (HL)
This action changes the map:
37650 LD A,47 Open the west exit of The Sloping Corridor onto The Underground Stream.
37652 LD (35965),A
Print "The slug greedily devours the poison fungus. It writhes in pain,then dies. Only a pool of slime remains.".
37655 LD HL,32138 HL=Messaging_TheSlugGreedilyDevoursThePoisonFungusIt.
37658 JP ActionDrop_Loop4 Jump to ActionDrop_Loop4.
Was the player trying to drop the stones on the scaled creature?
ActionDrop_Step23 37661 LD HL,35503 Point at the phrase at 35503 and call Parser_AdvanceToSeparator to match it against the command.
37664 CALL Parser_AdvanceToSeparator
37667 JR NZ,ActionDrop_Step24 Jump to ActionDrop_Step24 if it doesn't match.
37669 LD A,8 Jump to ActionDrop_Loop2 when the player is not carrying Some round stones. (8).
37671 CALL IsObjectCarried
37674 JP NZ,ActionDrop_Loop2
37677 LD BC,9728 Move A fierce,scaled creature is on the bridge,preventing your crossing. (38) to nowhere (0).
37680 CALL UpdateObjectLocation
37683 LD BC,2099 Move Some round stones. (8) to room 51: " The Crystal Bridge".
37686 CALL UpdateObjectLocation
37689 LD HL,25132 The player is carrying one fewer object.
37692 DEC (HL)
This action changes the map:
37693 LD A,52 Open the east exit of The Crystal Bridge onto The Creature's Lair.
37695 LD (35982),A
Print "The creature stumbles and loses its footing and falls over the side of the bridge.".
37698 LD HL,32243 HL=Messaging_TheCreatureStumblesAndLosesItsFootingAnd.
37701 JP ActionDrop_Loop4 Jump to ActionDrop_Loop4.
Was the player trying to drop the worn gloves?
ActionDrop_Step24 37704 LD HL,35197 Jump to ActionDrop_Step27 unless the command matches the phrase at 35197 (A pair of gloves,which you are wearing. (57)).
37707 CALL Parser_AdvanceToSeparator
37710 JR NZ,ActionDrop_Step27
37712 LD A,57
37714 CALL IsObjectCarried
37717 JR NZ,ActionDrop_Step26
37719 LD A,7 Jump to ActionDrop_Step25 when the player is not carrying Some poison fungus. (7).
37721 CALL IsObjectCarried
37724 JR NZ,ActionDrop_Step25
Print "No. Drop the fungus first.".
37726 LD HL,33969 HL=Messaging_NoDropTheFungusFirst.
37729 JP ActionDrop_Loop4 Jump to ActionDrop_Loop4.
ActionDrop_Step25 37732 LD BC,14592 Move A pair of gloves,which you are wearing. (57) to nowhere (0).
37735 CALL UpdateObjectLocation
37738 LD BC,3073 Move A pair of gloves. (12) to the inventory (1).
37741 CALL UpdateObjectLocation
ActionDrop_Step26 37744 LD A,12 A pair of gloves. is what the player is now holding.
37746 JP ActionDrop_Loop1 Continue at ActionDrop_Loop1 to see what the player is now holding.
Nothing else is valid.
Print "You can't.".
ActionDrop_Step27 37749 LD HL,25691 HL=Messaging_YouCanT.
37752 JP ActionDrop_Loop4 Jump to ActionDrop_Loop4.
View the equivalent code in;
Prev: 37228 Up: Map Next: 37755