Prev: EB25 Up: Map Next: EB49
EB31: Drop: Is Player Holding Item
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.
Prev: EB25 Up: Map Next: EB49