![]() |
Routines |
| Prev: 916C | Up: Map | Next: 937B |
|
Drop one of the objects the player named.
|
||||
| ActionDrop | 9198 | CALL Parser_ValidateDirectObject | Return if the command does not name a single object. | |
| 919B | RET C | |||
| 919C | CP $03 | Jump to ActionDrop_Step4 when the command names fewer than 03 nouns. | ||
| 919E | JR C,ActionDrop_Step4 | |||
|
Print "Please rephrase that.".
|
||||
| 91A0 | LD HL,$6445 | HL=Messaging_PleaseRephraseThat. | ||
| 91A3 | JR ActionDrop_Loop4 | Jump to ActionDrop_Loop4. | ||
|
Check if the player is holding the requested item?
|
||||
| ActionDrop_Loop1 | 91A5 | CALL IsObjectCarried | Call IsObjectCarried to test whether the object is carried. | |
| 91A8 | JR Z,ActionDrop_Step3 | Jump to ActionDrop_Step3 if the named object is being carried. | ||
|
The player is not holding that object.
|
||||
| ActionDrop_Loop2 | 91AA | LD HL,$7A59 | Print You're not carrying on the same line. | |
| 91AD | CALL PrintString | |||
| 91B0 | LD A,E | Copy the object ID back into A. | ||
|
Finish "You're not carrying" with "it" or "them".
|
||||
| ActionDrop_Step1 | 91B1 | LD HL,$9010 | HL=Table_ItemsWhichArePlural. | |
| 91B4 | LD BC,$0004 | BC=0004. | ||
| 91B7 | CPIR | Search Table_ItemsWhichArePlural for the item ID among the plural items. | ||
| 91B9 | JR Z,ActionDrop_Step2 | Jump to ActionDrop_Step2 if the item is plural. | ||
|
Print "it.".
|
||||
| 91BB | LD HL,$7A38 | HL=Messaging_It. | ||
| 91BE | JR ActionDrop_Loop4 | Jump to ActionDrop_Loop4. | ||
|
Print "them.".
|
||||
| ActionDrop_Step2 | 91C0 | LD HL,$7A3C | HL=Messaging_Them. | |
| 91C3 | JR ActionDrop_Loop4 | Jump to ActionDrop_Loop4. | ||
|
The player has the item, so drop it in the current room.
|
||||
| ActionDrop_Step3 | 91C5 | LD B,E | Put the object down in the current room. | |
| 91C6 | LD A,($6223) | |||
| 91C9 | LD C,A | |||
| 91CA | CALL UpdateObjectLocation | Call UpdateObjectLocation to move the object. | ||
| ActionDrop_Loop3 | 91CD | LD HL,$622C | The player is carrying one fewer object. | |
| 91D0 | DEC (HL) | |||
|
Print "O.K.".
|
||||
| 91D1 | LD HL,$6466 | HL=Messaging_OK. | ||
| ActionDrop_Loop4 | 91D4 | CALL PrintStringAndANewline | Call PrintStringAndANewline. | |
| 91D7 | RET | Return. | ||
|
Was the player trying to drop the knife?
|
||||
| ActionDrop_Step4 | 91D8 | LD HL,$8959 | Call Parser_AdvanceToSeparator with 8959. | |
| 91DB | CALL Parser_AdvanceToSeparator | |||
| 91DE | JR NZ,ActionDrop_Step5 | Jump to ActionDrop_Step5 if the token isn't for the knife. | ||
| 91E0 | LD A,$00 | A="A knife."; jump to ActionDrop_Loop1. | ||
| 91E2 | JP ActionDrop_Loop1 | |||
|
Was the player trying to drop the laser pistol?
|
||||
| ActionDrop_Step5 | 91E5 | LD HL,$8969 | Call Parser_AdvanceToSeparator with 8969. | |
| 91E8 | CALL Parser_AdvanceToSeparator | |||
| 91EB | JR NZ,ActionDrop_Step6 | Jump to ActionDrop_Step6 if the token isn't for the laser pistol. | ||
| 91ED | LD A,$01 | A="A laser pistol."; jump to ActionDrop_Loop1. | ||
| 91EF | JP ActionDrop_Loop1 | |||
|
Was the player trying to drop the coin?
|
||||
| ActionDrop_Step6 | 91F2 | LD HL,$8960 | Call Parser_AdvanceToSeparator with 8960. | |
| 91F5 | CALL Parser_AdvanceToSeparator | |||
| 91F8 | JR NZ,ActionDrop_Step7 | Jump to ActionDrop_Step7 if the token isn't for the coin. | ||
| 91FA | LD A,$02 | A="A coin."; jump to ActionDrop_Loop1. | ||
| 91FC | JP ActionDrop_Loop1 | |||
|
Was the player trying to drop the crystal rod?
|
||||
| ActionDrop_Step7 | 91FF | LD HL,$896E | Call Parser_AdvanceToSeparator with 896E. | |
| 9202 | CALL Parser_AdvanceToSeparator | |||
| 9205 | JR NZ,ActionDrop_Step8 | Jump to ActionDrop_Step8 if the token isn't for the crystal rod. | ||
| 9207 | LD A,$03 | A="A crystal rod."; jump to ActionDrop_Loop1. | ||
| 9209 | JP ActionDrop_Loop1 | |||
|
Was the player trying to drop the detonator?
|
||||
| ActionDrop_Step8 | 920C | LD HL,$8940 | Call Parser_AdvanceToSeparator with Table_PhraseLists. | |
| 920F | CALL Parser_AdvanceToSeparator | |||
| 9212 | JR NZ,ActionDrop_Step9 | Jump to ActionDrop_Step9 if the token isn't for the detonator. | ||
| 9214 | LD A,$04 | A="A detonator."; jump to ActionDrop_Loop1. | ||
| 9216 | JP ActionDrop_Loop1 | |||
|
Was the player trying to drop the metal bar?
|
||||
| ActionDrop_Step9 | 9219 | LD HL,$8964 | Call Parser_AdvanceToSeparator with 8964. | |
| 921C | CALL Parser_AdvanceToSeparator | |||
| 921F | JR NZ,ActionDrop_Step10 | Jump to ActionDrop_Step10 if the token isn't for the metal bar. | ||
| 9221 | LD A,$05 | A="A metal bar."; jump to ActionDrop_Loop1. | ||
| 9223 | JP ActionDrop_Loop1 | |||
|
Was the player trying to drop the glowing sphere?
|
||||
| ActionDrop_Step10 | 9226 | LD HL,$8973 | Call Parser_AdvanceToSeparator with 8973. | |
| 9229 | CALL Parser_AdvanceToSeparator | |||
| 922C | JR NZ,ActionDrop_Step11 | Jump to ActionDrop_Step11 if the token isn't for the glowing sphere. | ||
| 922E | LD A,$06 | A="A glowing sphere."; jump to ActionDrop_Loop1. | ||
| 9230 | JP ActionDrop_Loop1 | |||
|
Was the player trying to drop the poison fungus?
|
||||
| ActionDrop_Step11 | 9233 | LD HL,$8942 | Call Parser_AdvanceToSeparator with 8942. | |
| 9236 | CALL Parser_AdvanceToSeparator | |||
| 9239 | JR NZ,ActionDrop_Step12 | Jump to ActionDrop_Step12 if the token isn't for the poison fungus. | ||
| 923B | LD A,$07 | A="Some poison fungus."; jump to ActionDrop_Loop1. | ||
| 923D | JP ActionDrop_Loop1 | |||
|
Was the player trying to drop the round stones?
|
||||
| ActionDrop_Step12 | 9240 | LD HL,$8978 | Call Parser_AdvanceToSeparator with 8978. | |
| 9243 | CALL Parser_AdvanceToSeparator | |||
| 9246 | JR NZ,ActionDrop_Step13 | Jump to ActionDrop_Step13 if the token isn't for the round stones. | ||
| 9248 | LD A,$08 | A="Some round stones."; jump to ActionDrop_Loop1. | ||
| 924A | JP ActionDrop_Loop1 | |||
|
Was the player trying to drop the key?
|
||||
| ActionDrop_Step13 | 924D | LD HL,$8962 | Call Parser_AdvanceToSeparator with 8962. | |
| 9250 | CALL Parser_AdvanceToSeparator | |||
| 9253 | JR NZ,ActionDrop_Step14 | Jump to ActionDrop_Step14 if the token isn't for the key. | ||
| 9255 | LD A,$09 | A="A key."; jump to ActionDrop_Loop1. | ||
| 9257 | JP ActionDrop_Loop1 | |||
|
Was the player trying to drop the space axe?
|
||||
| ActionDrop_Step14 | 925A | LD HL,$895B | Call Parser_AdvanceToSeparator with 895B. | |
| 925D | CALL Parser_AdvanceToSeparator | |||
| 9260 | JR NZ,ActionDrop_Step15 | Jump to ActionDrop_Step15 if the token isn't for the space axe. | ||
| 9262 | LD A,$0A | A="A space axe."; jump to ActionDrop_Loop1. | ||
| 9264 | JP ActionDrop_Loop1 | |||
|
Was the player trying to drop the explosives?
|
||||
| ActionDrop_Step15 | 9267 | LD HL,$8947 | Call Parser_AdvanceToSeparator with 8947. | |
| 926A | CALL Parser_AdvanceToSeparator | |||
| 926D | JR NZ,ActionDrop_Step16 | Jump to ActionDrop_Step16 if the token isn't for the explosives. | ||
| 926F | LD A,$0B | A="Some explosives."; jump to ActionDrop_Loop1. | ||
| 9271 | JP ActionDrop_Loop1 | |||
| ActionDrop_Step16 | 9274 | 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 | 9276 | LD HL,$897F | Call Parser_AdvanceToSeparator with 897F. | |
| 9279 | CALL Parser_AdvanceToSeparator | |||
| 927C | JR NZ,ActionDrop_Step20 | Jump to ActionDrop_Step20 if the token isn't for that phrase. | ||
| 927E | LD A,$06 | Jump to ActionDrop_Loop2 when the player is not carrying "A glowing sphere.". | ||
| 9280 | CALL IsObjectCarried | |||
| 9283 | JP NZ,ActionDrop_Loop2 | |||
| 9286 | LD A,($6223) | Fetch the current room. | ||
| 9289 | CP $1C | The sphere was not dropped in The Crystal Chamber. | ||
| 928B | JR NZ,ActionDrop_Step18 | |||
| 928D | LD BC,$1500 | Clear the glass pedestal in The Crystal Chamber. | ||
| 9290 | JR ActionDrop_Step19 | Continue at ActionDrop_Step19 to move what was dropped. | ||
| ActionDrop_Step18 | 9292 | LD BC,$1600 | Clear the glass pedestal in The Blue Room. | |
| ActionDrop_Step19 | 9295 | CALL UpdateObjectLocation | Call UpdateObjectLocation to move the object. | |
| 9298 | LD BC,$0600 | Move A glowing sphere. (06) to nowhere (00). | ||
| 929B | CALL UpdateObjectLocation | |||
| 929E | LD A,($6223) | Fetch the current room. | ||
| 92A1 | LD C,A | Leave A glowing sphere sitting on a raised dish on a glass pedestal. in the room where it was dropped. | ||
| 92A2 | LD B,$3C | |||
| 92A4 | CALL UpdateObjectLocation | Call UpdateObjectLocation to move the object. | ||
| 92A7 | 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 | 92AA | LD HL,$8A87 | Jump to ActionDrop_Step22 unless the command matches the phrase at 8A87 (The alien commander, in space armour. (27)). | |
| 92AD | CALL Parser_AdvanceToSeparator | |||
| 92B0 | JR NZ,ActionDrop_Step22 | |||
| 92B2 | LD A,$27 | |||
| 92B4 | CALL IsObjectInCurrentRoom | |||
| 92B7 | JR Z,ActionDrop_Step21 | |||
|
Print "He's already dead.".
|
||||
| 92B9 | LD HL,$7CB3 | HL=Messaging_HeSAlreadyDead. | ||
| 92BC | JP ActionDrop_Loop4 | Jump to ActionDrop_Loop4. | ||
| ActionDrop_Step21 | 92BF | LD A,$0A | Jump back to ActionDrop_Loop2 when the player is not carrying A space axe. (0A). | |
| 92C1 | CALL IsObjectCarried | |||
| 92C4 | JP NZ,ActionDrop_Loop2 | |||
| 92C7 | LD BC,$2700 | Move The alien commander, in space armour. (27) to nowhere (00). | ||
| 92CA | CALL UpdateObjectLocation | |||
| 92CD | LD BC,$2835 | Move The dead body of the alien commander. (28) to room 35: " The Alien Commander's Chamber". | ||
| 92D0 | CALL UpdateObjectLocation | |||
| 92D3 | LD A,($6223) | Fetch the current room. | ||
| 92D6 | LD C,A | Leave A space axe. in the current room. | ||
| 92D7 | LD B,$0A | |||
| 92D9 | CALL UpdateObjectLocation | Call UpdateObjectLocation to move the object. | ||
| 92DC | LD HL,$622C | The player is carrying one fewer object. | ||
| 92DF | DEC (HL) | |||
| 92E0 | LD BC,$0935 | Move A key. (09) to room 35: " The Alien Commander's Chamber". | ||
| 92E3 | CALL UpdateObjectLocation | |||
|
Print "The axe pierces the space armour
The commander falls down,dead.
As he falls,
a key drops to the floor.".
|
||||
| 92E6 | LD HL,$7CC6 | HL=Messaging_TheAxePiercesTheSpaceArmourTheCommanderF. | ||
| 92E9 | JP ActionDrop_Loop4 | Jump to ActionDrop_Loop4. | ||
|
Was the player trying to drop the fungus on the slug?
|
||||
| ActionDrop_Step22 | 92EC | LD HL,$8A9B | Point at the phrase at 8A9B and call Parser_AdvanceToSeparator to match it against the command. | |
| 92EF | CALL Parser_AdvanceToSeparator | |||
| 92F2 | JR NZ,ActionDrop_Step23 | Jump to ActionDrop_Step23 if it doesn't match. | ||
| 92F4 | LD A,$07 | Jump to ActionDrop_Loop2 when the player is not carrying Some poison fungus. (07). | ||
| 92F6 | CALL IsObjectCarried | |||
| 92F9 | JP NZ,ActionDrop_Loop2 | |||
| 92FC | LD BC,$2400 | Move A huge,blind slug is blocking the western exit. It is advancing toward you. (24) to nowhere (00). | ||
| 92FF | CALL UpdateObjectLocation | |||
| 9302 | LD BC,$2530 | Move A pool of slime on the floor. (25) to room 30: " The Sloping Corridor". | ||
| 9305 | CALL UpdateObjectLocation | |||
| 9308 | LD BC,$0700 | Move Some poison fungus. (07) to nowhere (00). | ||
| 930B | CALL UpdateObjectLocation | |||
| 930E | LD HL,$622C | The player is carrying one fewer object. | ||
| 9311 | DEC (HL) | |||
|
This action changes the map:
|
||||
| 9312 | LD A,$2F | Open the west exit of The Sloping Corridor onto The Underground Stream. | ||
| 9314 | LD ($8C7D),A | |||
|
Print "The slug greedily devours the
poison fungus.
It writhes in pain,then dies.
Only a pool of slime remains.".
|
||||
| 9317 | LD HL,$7D8A | HL=Messaging_TheSlugGreedilyDevoursThePoisonFungusIt. | ||
| 931A | JP ActionDrop_Loop4 | Jump to ActionDrop_Loop4. | ||
|
Was the player trying to drop the stones on the scaled creature?
|
||||
| ActionDrop_Step23 | 931D | LD HL,$8AAF | Point at the phrase at 8AAF and call Parser_AdvanceToSeparator to match it against the command. | |
| 9320 | CALL Parser_AdvanceToSeparator | |||
| 9323 | JR NZ,ActionDrop_Step24 | Jump to ActionDrop_Step24 if it doesn't match. | ||
| 9325 | LD A,$08 | Jump to ActionDrop_Loop2 when the player is not carrying Some round stones. (08). | ||
| 9327 | CALL IsObjectCarried | |||
| 932A | JP NZ,ActionDrop_Loop2 | |||
| 932D | LD BC,$2600 | Move A fierce,scaled creature is on the bridge,preventing your crossing. (26) to nowhere (00). | ||
| 9330 | CALL UpdateObjectLocation | |||
| 9333 | LD BC,$0833 | Move Some round stones. (08) to room 33: " The Crystal Bridge". | ||
| 9336 | CALL UpdateObjectLocation | |||
| 9339 | LD HL,$622C | The player is carrying one fewer object. | ||
| 933C | DEC (HL) | |||
|
This action changes the map:
|
||||
| 933D | LD A,$34 | Open the east exit of The Crystal Bridge onto The Creature's Lair. | ||
| 933F | LD ($8C8E),A | |||
|
Print "The creature stumbles and
loses its footing and falls
over the side of the bridge.".
|
||||
| 9342 | LD HL,$7DF3 | HL=Messaging_TheCreatureStumblesAndLosesItsFootingAnd. | ||
| 9345 | JP ActionDrop_Loop4 | Jump to ActionDrop_Loop4. | ||
|
Was the player trying to drop the worn gloves?
|
||||
| ActionDrop_Step24 | 9348 | LD HL,$897D | Jump to ActionDrop_Step27 unless the command matches the phrase at 897D (A pair of gloves,which you are wearing. (39)). | |
| 934B | CALL Parser_AdvanceToSeparator | |||
| 934E | JR NZ,ActionDrop_Step27 | |||
| 9350 | LD A,$39 | |||
| 9352 | CALL IsObjectCarried | |||
| 9355 | JR NZ,ActionDrop_Step26 | |||
| 9357 | LD A,$07 | Jump to ActionDrop_Step25 when the player is not carrying Some poison fungus. (07). | ||
| 9359 | CALL IsObjectCarried | |||
| 935C | JR NZ,ActionDrop_Step25 | |||
|
Print "No. Drop the fungus first.".
|
||||
| 935E | LD HL,$84B1 | HL=Messaging_NoDropTheFungusFirst. | ||
| 9361 | JP ActionDrop_Loop4 | Jump to ActionDrop_Loop4. | ||
| ActionDrop_Step25 | 9364 | LD BC,$3900 | Move A pair of gloves,which you are wearing. (39) to nowhere (00). | |
| 9367 | CALL UpdateObjectLocation | |||
| 936A | LD BC,$0C01 | Move A pair of gloves. (0C) to the inventory (01). | ||
| 936D | CALL UpdateObjectLocation | |||
| ActionDrop_Step26 | 9370 | LD A,$0C | A pair of gloves. is what the player is now holding. | |
| 9372 | 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 | 9375 | LD HL,$645B | HL=Messaging_YouCanT. | |
| 9378 | JP ActionDrop_Loop4 | Jump to ActionDrop_Loop4. | ||
|
View the equivalent code in;
|
||||
| Prev: 916C | Up: Map | Next: 937B |