Prev: F500 Up: Map Next: F52E
F518: Process: Eat Food
Input
E The item ID currently being acted on
Process_EatFood F518 LD A,$22 Call IsPlayerCarryingItem with item 22: "Some food".
F51A CALL IsPlayerCarryingItem
The player has the food in their inventory, so eat it!
F51D LD A,E Call Handler_DestroyItemEvent with the item ID of the originally requsted item.
F51E CALL Handler_DestroyItemEvent
F521 LD HL,$A790 Decrease *Count_InventoryItems by one.
F524 DEC (HL)
Print "O.K.".
F525 CALL Response_OK_Duplicate Call Response_OK_Duplicate.
Print "You are filled with renewed energy.".
F528 LD HL,$DC1D HL=Messaging_FilledWithRenewedEnergy.
F52B JP $ED6D Jump to ED6D.
Prev: F500 Up: Map Next: F52E