Prev: AA6E Up: Map Next: AAA8
AA8A: Action: Drop Item
Moves the item operand into the current room and prints the dropped message.
Input
F The zero flag is set when the conditions hold
IX Pointer to the script entry
When the condition failed, skip this action.
Handler_DropItem AA8A JP NZ,RunScript_SkipAction_TwoBytes Jump to RunScript_SkipAction_TwoBytes if the condition failed.
Move the item operand from the inventory into the current room.
AA8D LD A,(IX+$01) Fetch the item ID (the operand) from *IX+01 into A.
AA90 CALL RunScript_ResolveMatchedItem Call RunScript_ResolveMatchedItem to substitute the matched item ID from ScriptMatchedItem when the operand is FF.
AA93 LD B,A Copy the item ID into B.
AA94 LD A,($A106) Fetch the current room from *CurrentRoom into C.
AA97 LD C,A
AA98 CALL Handler_UpdateItemLocation Call Handler_UpdateItemLocation to update that item's location.
The player has lost an item, so lower the inventory count.
AA9B LD HL,$A0D2 Decrease the inventory count at Count_InventoryItems by one.
AA9E DEC (HL)
Print "O.K.".
AA9F LD HL,$001A HL=Messaging_OK.
AAA2 CALL PrintCompressedStringAndNewline Call PrintCompressedStringAndNewline to print that compressed string and a newline.
AAA5 JP RunScript_SkipAction_TwoBytes Jump to RunScript_SkipAction_TwoBytes.
View the equivalent code in;
Prev: AA6E Up: Map Next: AAA8