Prev: 8EEC Up: Map Next: 8FAD
8F3B: Action: Leave If The Way Is Open
Used by the routine at Event_TheBarrel.
Leaves through an exit when the way is open and the object's volume is not zero, then runs the move. Reached through the action lists of $01 - "Heavy Rock Door", $05 - "Round Green Door", $06 - "Small Insignificant Crack", $07 - "Spider Web", $08 - "Red Door", $0A - "Goblins Back Door", $0B - "Mountains Side Door", $0C - "Large Trap Door", $0D - "Magic Door", $11 - "Goblins Door" and $27 - "Strong Portcullis" for action 1E, dispatched by TriggerAction.
Find the exit through the current object.
Action_LeaveIfTheWayIsOpen 8F3B CALL ExitsFindTheExitThroughAnObject Call ExitsFindTheExitThroughAnObject to find the exit through the current object.
This entry point is used by the routines at Action_Enter and Action_Follow.
Action_LeaveIfTheWayIsOpen_0 8F3E CP $FF Jump to ResponseThatWillNotWork if the exit search returned FF.
8F40 JP Z,ResponseThatWillNotWork
8F43 LD A,(IX+$02) Read this exit's destination.
8F46 CP $00 Jump to ResponseThatWillNotWork if this exit's destination is zero.
8F48 JP Z,ResponseThatWillNotWork
8F4B LD A,(IX+$01) Read the object this exit goes via.
8F4E PUSH IX Call Action_CheckTheObjectFlags to check whether the character can pass via the object this exit goes through.
8F50 CALL Action_CheckTheObjectFlags
8F53 POP IX Jump to ResponseThatWillNotWork if Action_CheckTheObjectFlags did not return zero.
8F55 JP NZ,ResponseThatWillNotWork
If the message is held back, the character does not leave.
8F58 CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the character does not leave.
8F5B LD A,(IX+$00) Read this exit's direction.
8F5E LD ($B6E7),A Update *CurrentAction.
8F61 LD A,$FF Write FF to *CurrentObject.
8F63 LD ($B6E8),A
8F66 JP Action_Direction_TestIfInside Jump back to Action_Direction_TestIfInside to carry on with the move.
Reached through the action list of $13 - "Barrel" for action 23, dispatched by TriggerAction.
8F69 LD IX,($B708) Read *B708.
Test the second object.
8F6D LD A,($B6E9) Jump to Action_LeaveIfTheWayIsOpen_UseTheWater if *B6E9 is 17.
8F70 CP $17
8F72 JR Z,Action_LeaveIfTheWayIsOpen_UseTheWater
8F74 CP $18 Jump to Action_LeaveIfTheWayIsOpen_UseTheBlackWater if the second object is 18.
8F76 JR Z,Action_LeaveIfTheWayIsOpen_UseTheBlackWater
Action_LeaveIfTheWayIsOpen_TestTheFluid 8F78 LD IY,($B70A) Read *B70A.
8F7C BIT 1,(IY+$07) Jump to ResponseThatWillNotWork if the object is not a fluid.
8F80 JP Z,ResponseThatWillNotWork
8F83 BIT 2,(IX+$07) Take 82, and jump to Message_NameFromThisRecord if the object is full.
8F87 LD A,$82
8F89 JP NZ,Message_NameFromThisRecord
8F8C LD HL,$924F Point HL at the fixed-object check at 924F.
8F8F JP ActionHandAnObjectOver Jump to ActionHandAnObjectOver to hand an object over.
Action_LeaveIfTheWayIsOpen_UseTheWater 8F92 LD A,$15 Pass object id 15.
8F94 LD IY,$C454 Point IY at $15 - "Water".
8F98 JR Action_LeaveIfTheWayIsOpen_StoreTheSecondObject Jump to Action_LeaveIfTheWayIsOpen_StoreTheSecondObject to update the second object.
Action_LeaveIfTheWayIsOpen_UseTheBlackWater 8F9A LD A,$16 Pass object id 16.
8F9C LD IY,$C469 Point IY at $16 - "Black Water".
Action_LeaveIfTheWayIsOpen_StoreTheSecondObject 8FA0 LD ($B6E9),A Update *B6E9.
8FA3 LD ($B70A),IY Update *B70A.
8FA7 LD (IY+$01),$FF Mark where this object is as unset.
8FAB JR Action_LeaveIfTheWayIsOpen_TestTheFluid Jump back to Action_LeaveIfTheWayIsOpen_TestTheFluid to test the second object.
Prev: 8EEC Up: Map Next: 8FAD