Prev: 43577 Up: Map Next: 43615
43592: Action: Transform Item
Replaces the first item operand with the second, in the same room.
Input
F The zero flag is set when the conditions hold
IX Pointer to the script entry
When the condition failed, skip this action.
Action_TransformItem 43592 JP NZ,RunScript_SkipAction_ThreeBytes Jump to RunScript_SkipAction_ThreeBytes if the condition failed.
Replace the first item operand with the second, in the same room.
43595 LD A,(IX+1) Fetch the item ID being replaced from *IX+1 into A.
43598 CALL RunScript_ResolveMatchedItem Call RunScript_ResolveMatchedItem to substitute the matched item ID from ScriptMatchedItem when the operand is 255.
43601 LD B,A Keep the item being replaced in B.
43602 LD A,(IX+2) Fetch the replacement item ID from *IX+2 into A.
43605 CALL RunScript_ResolveMatchedItem Call RunScript_ResolveMatchedItem to substitute the matched item ID from ScriptMatchedItem when the operand is 255.
43608 LD C,A Keep the replacement item ID in C.
43609 CALL TransformItem Call TransformItem to replace the first item with the second.
43612 JP RunScript_SkipAction_ThreeBytes Jump to RunScript_SkipAction_ThreeBytes.
Prev: 43577 Up: Map Next: 43615