Prev: 8AF1 Up: Map Next: 8B40
8B0E: Action : Handle Offer
Input
IX Ptr to person being offered to.
BC Ptr to pocket holding object being offered.
D Index of object received if an exchange takes place.
E Index to an expected object.
Output
Action_HandleOffer 8B0E LD A,(BC) Get object being offered.
8B0F AND $7F
8B11 CP E Is it the same as object expected.
8B12 JR Z,Action_HandleOffer_0
8B14 BIT 3,(IX+$13)
8B18 JP Z,Offer_DontWantMessage "I don't want..."
8B1B XOR A Clear pocket.
8B1C LD (BC),A
8B1D JP Offer_Handle_10 "How generous"
Action_HandleOffer_0 8B20 LD A,D If the object is expected, see if there is anything in exchange.
8B21 LD (BC),A
8B22 RES 6,(IX+$13) Clear flag.
8B26 CALL Inv_Update Update the screen.
8B29 CALL Message_DisplayAt
Msg_FairExchange 8B2C DEFM "a fair exchange!" A fair exchange
8B3C DEFB $5E
8B3D JP Stage_Draw
Prev: 8AF1 Up: Map Next: 8B40