Prev: 45131 Up: Map Next: 45206
45149: Process command to have a drink
Used by the routine at 64623.
45149 LD B,12 Print or update command summary window at top of screen...
45151 CALL 45206 ...with "HAVE A DRINK" text
45154 CALL 64207 Display execute / reject command window and return here if execute chosen, else exit to main game loop
45157 LD A,17 If Magic Knight is carrying the Bottle of Liquid (17)...
45159 CALL 45510 ...then set zero flag, otherwise reset
45162 LD C,17 Load C with 17 (index of first Bottle of Liquid)
45164 JR Z,45168 If zero flag is set (i.e. Magic Knight is carrying the Bottle of Liquid) then skip ahead to 45168
45166 LD C,18 Load C with 18 (index of second Bottle of Liquid)
45168 LD B,5 Load B with 5 (five inventory slots)
45170 PUSH BC Store BC (C = index of appropriate Bottle of Liquid)
45171 LD HL,24848 Point HL at Magic Knight's current inventory (carrying)
45174 CALL 48341 Remove object C from Current Character's inventory
45177 POP BC Restore BC (C = index of appropriate Bottle of Liquid)
45178 LD A,C Load A with index of Bottle of Liquid drank...
45179 SUB 17 ...subtract 17...
45181 ADD A,28 ...add 28 to give index of appropriate Empty Bottle...
45183 LD C,A ...and load into C
45184 LD HL,24848 Point HL at Magic Knight's current inventory (carrying)
45187 CALL 45380 Wait for interrupt then load appropriate Empty Bottle into Magic Knight's inventory
45190 LD A,(24768) Load A with unused bit in Magic Knight's current strength field...
45193 AND 128 ...clear all strength bits...
45195 ADD A,100 ...set new strength to 100...
45197 LD (24768),A ...and store
45200 LD HL,57636 Point HL at "MMMMM.. TASTY. YOU CAN FEEL NEW STRENGTH " text
45203 JP 64297 Display "MMMMM.. TASTY..." window (12) and return to game
Prev: 45131 Up: Map Next: 45206