Routines
Prev:
EB25
Up:
Map
Next:
EB49
EB31: Drop: Is Player Holding Item
Used by the routines at
Drop_Frog
,
Drop_Box
,
Drop_Flower
,
Drop_Map
,
Drop_Scroll
,
Drop_Ruby
,
Drop_Diamond
,
Drop_Sapphire
,
Drop_Emerald
,
Drop_Pearl
,
Drop_Tinderbox
,
Drop_Money
,
Drop_Bible
,
Drop_Wand
,
Drop_Flute
,
Drop_Carpet
,
Drop_CopperKey
,
Drop_GoldKey
,
Drop_JewelledKey
,
Drop_Songbird
,
Drop_Sword
,
Drop_Spear
,
Drop_Dagger
,
Drop_Pillow
,
Drop_Falcon
,
Drop_Bottle
,
Drop_Water
,
Drop_Acid
,
Drop_Oil
,
Drop_Lyre
,
Drop_Mandolin
,
Drop_Fragments
,
Drop_Crowbar
,
Drop_Shovel
,
Drop_Cage
,
Drop_Coin
,
Drop_Honey
,
Drop_Meat
,
Drop_Cross
,
Drop_Mirror
,
Drop_WhitePotion
and
Drop_BlackPotion
.
Refuse the drop when the object is not carried; otherwise drop it.
Input
A
Object ID
Drop_IsPlayerHoldingItem
EB31
CALL
IsObjectInInventory
Call
IsObjectInInventory
.
Print "You're not carrying ".
EB34
LD HL,$B191
HL
=
Messaging_YoureNotCarrying
.
EB37
JP NZ,
PrintStringAndItThemHandler
Jump to
PrintStringAndItThemHandler
if the item is not being held.
The player has the item in their inventory so drop it.
DropItem
EB3A
LD B,E
Copy the item ID into
B
.
EB3B
LD A,($AECD)
C
=*
CurrentRoom
.
EB3E
LD C,A
Alter the items location from the players inventory to the current room ID.
EB3F
CALL
SetItemRoom
Call
SetItemRoom
.
EB42
LD HL,$AE9A
Decrease *
Count_InventoryItems
by one.
EB45
DEC (HL)
EB46
JP
Response_OK_GameLoop
Jump to
Response_OK_GameLoop
.
View the equivalent code in;
After Shock
Forest At Worlds End
The Jewels Of Babylon
Warlord
Prev:
EB25
Up:
Map
Next:
EB49