Prev: AAD5 Up: Map Next: AB0B
AAE0: Event: The Ring
Used by the routine at Event_OpenTheMagicDoor.
Handles the ring (object 10) when it is visible. The ring record at CAB0 calls this.
Event_TheRing AAE0 LD IX,$C31A Point IX at $10 - "Valuable Golden Ring".
AAE4 LD A,(IX+$01) Read where this object is from the object record.
AAE7 CP $FF Return if this object is not inside anything.
AAE9 RET Z
Find the object's record.
AAEA CALL LocateObject Call LocateObject to locate object.
AAED LD ($B70C),IX Update *Pointer_CurrentCharacter.
AAF1 BIT 7,(IX+$07) Jump back to Action_RemoveTheRing if the character is invisible (wearing the ring).
AAF5 JP Z,Action_RemoveTheRing
AAF8 RET Return.
Reached through the action list of $14 - "Wine" for action 00, dispatched by TriggerAction.
AAF9 LD A,($B6EA) Read *CurrentCharacter.
AAFC CP $00 Return if it is not the player's turn.
AAFE RET NZ
AAFF LD A,$01 Write 01 to *B700.
AB01 LD ($B700),A
AB04 LD A,($CAB5) Copy the byte at CAB5 into the next byte.
AB07 LD ($CAB6),A
AB0A RET Return.
Prev: AAD5 Up: Map Next: AB0B