Prev: 8ED2 Up: Map Next: 8F3B
8EEC: Action: Carry On With The Object
Used by the routine at Event_TheBarrel.
Carries on with the current object. An open object is followed, and a passage whose volume is zero is refused. Reached through the action lists of $01 - "Heavy Rock Door", $05 - "Round Green Door", $06 - "Small Insignificant Crack", $08 - "Red Door", $0A - "Goblins Back Door", $0B - "Mountains Side Door", $0C - "Large Trap Door", $0D - "Magic Door" and $11 - "Goblins Door" for action 18, dispatched by TriggerAction.
Action_CarryOnWithTheObject 8EEC LD A,($B6E8) Read *CurrentObject.
Find the object's record.
8EEF CALL LocateObject Call LocateObject to locate object.
8EF2 CALL Event_TestTheOpenFlag Call Event_TestTheOpenFlag to test whether the object is open.
8EF5 JP Z,Message_NameFromThisRecord Jump to Message_NameFromThisRecord if the object is not open.
Reached through the action lists of $09 - "Fast Black River" and $2A - "Fast River" for action 19, dispatched by TriggerAction.
8EF8 LD A,($B6EA) Read *CurrentCharacter.
8EFB CALL Action_LocateAndFollow Call Action_LocateAndFollow to find where the object is.
8EFE RET NZ Return if Action_LocateAndFollow stopped inside a closed object.
Find the exit through the current object.
8EFF CALL ExitsFindTheExitThroughAnObject Call ExitsFindTheExitThroughAnObject to find the exit through the current object.
8F02 CP $FF Jump to ResponseThatWillNotWork if ExitsFindTheExitThroughAnObject found no exit through the current object.
8F04 JP Z,ResponseThatWillNotWork
8F07 LD A,(IX+$02) Read this exit's destination.
8F0A CP $00 Jump to ResponseThatWillNotWork if this exit's destination is zero.
8F0C JP Z,ResponseThatWillNotWork
If the message is held back, the object is not followed.
8F0F CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the object is not followed.
8F12 PUSH IX Call LocateLocation to find this location's record.
Find the location's record.
8F14 CALL LocateLocation
8F17 BIT 7,(IX+$00) Test bit 7 of the location attribute.
8F1B POP IX Restore the exit and jump to Action_CarryOnWithTheObject_PrintItIsDark if bit 7 of the location attribute is clear.
8F1D JR Z,Action_CarryOnWithTheObject_PrintItIsDark
8F1F LD IY,($B70C) Read *Pointer_CurrentCharacter.
8F23 LD A,(IY+$10) Read the location from IY.
8F26 PUSH AF Save the location and read this exit's destination.
8F27 LD A,(IX+$02)
8F2A LD (IY+$10),A Store the exit's destination in the character's location.
8F2D CALL YouSeeEntry Call YouSeeEntry to print that you see this place.
8F30 POP AF Put the character back in its saved location.
8F31 LD (IY+$10),A
8F34 RET Return.
Action_CarryOnWithTheObject_PrintItIsDark 8F35 LD HL,$AE1F Point at the message "it is dark" (AE1F).
8F38 JP PrintMessage Jump back to PrintMessage to print "it is dark".
Prev: 8ED2 Up: Map Next: 8F3B