Prev: A862 Up: Map Next: A883
A871: Condition: Item Location Differs
Succeeds when the item operand is not in the room given by the second operand.
Output
F The zero flag is set when the location differs
IX Pointer to the script entry
Invert the location test so the condition succeeds when the item is somewhere else.
Condition_ItemLocationDiffers A871 LD A,(IX+$01) Fetch the item ID (the operand) from *IX+01 into A.
A874 CALL RunScript_ResolveMatchedItem Call RunScript_ResolveMatchedItem to substitute the matched item ID from ScriptMatchedItem when the operand is FF.
A877 CALL ItemLocator Call ItemLocator to read that item's room into A.
A87A CP (IX+$02) Compare it with the room operand.
A87D CALL RunScript_InvertConditionResult Call RunScript_InvertConditionResult so the condition succeeds when the rooms differ.
A880 JP RunScript_SkipCondition_ThreeBytes Jump to RunScript_SkipCondition_ThreeBytes.
Prev: A862 Up: Map Next: A883