Prev: 36853 Up: Map Next: 36982
36916: Action: Talk To
Talks to the current character, when they still have something to say. Reached through the action table at ActionTable, dispatched by Turn_RunTheHandlerIfPresent.
If the message is held back, the character says nothing.
Action_TalkTo 36916 CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the character says nothing.
36919 LD A,(46824) Read *CurrentObject.
36922 CALL TableFindASpecialObject Call TableFindASpecialObject to find the special-object record.
36925 CP 255 Take zero, and jump to Action_TalkTo_FillTheClaimedSlots if this object has no special-object record.
36927 LD A,0
36929 JR Z,Action_TalkTo_FillTheClaimedSlots
Test the talk flag.
36931 LD A,(46841) Jump to Action_TalkTo_FillTheClaimedSlots if *46841 is not 0.
36934 CP 0
36936 JR NZ,Action_TalkTo_FillTheClaimedSlots
36938 LD A,(IY+6) Read byte 6 of this special-object record.
36941 CP 0 Jump to Action_TalkTo_FillTheClaimedSlots if that byte is zero.
36943 JR Z,Action_TalkTo_FillTheClaimedSlots
Roll a random number.
36945 CALL GetRandomNumber Call GetRandomNumber to roll a number from the limit in A.
36948 CP 0 Jump to Action_TalkTo_PrintSays if the roll is zero.
36950 JR Z,Action_TalkTo_PrintSays
Action_TalkTo_FillTheClaimedSlots 36952 CALL Inglish_FillTheClaimedSlots Call Inglish_FillTheClaimedSlots to give A of the claimed slots to the current object.
36955 RET Return.
Action_TalkTo_PrintSays 36956 LD HL,45539 Point at the message "[0x07] says " (45539).
36959 CALL PrintMessage Call PrintMessage to print message.
36962 SUB A Take zero so Inglish_FillTheClaimedSlots marks the claimed slots free.
36963 JR Action_TalkTo_FillTheClaimedSlots Jump back to Action_TalkTo_FillTheClaimedSlots to free every claimed slot and return.
If the message is held back, the reply about the open object is skipped.
Reached through the action list of 29 - "Sand" for action 57, dispatched by TriggerAction.
36965 CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the reply about the open object is skipped.
36968 LD IX,(46856) Read *46856.
36972 BIT 5,(IX+7) Jump to ActionOpenOrClose_0 if the object is not open.
36976 JP Z,ActionOpenOrClose_0
36979 JP Action_Close_0 Jump to Action_Close_0 to close the object.
Prev: 36853 Up: Map Next: 36982