![]() |
Routines |
| Prev: 93E4 | Up: Map | Next: 9469 |
|
Hand a carried object to the person named in the command.
|
||||
| ActionGive | 941B | CALL Parser_ValidateDirectObject | Return if the command does not name a single object. | |
| 941E | RET C | |||
| 941F | CP $02 | Jump to ActionGive_Step1 when the command names at least 02 nouns. | ||
| 9421 | JR NC,ActionGive_Step1 | |||
| 9423 | LD HL,$642C | Print "Please be more specific." and start a new line. | ||
| 9426 | JR ActionGive_Loop3 | |||
| ActionGive_Loop1 | 9428 | LD HL,$645B | Print "You can't." and start a new line. | |
| 942B | JR ActionGive_Loop3 | |||
| ActionGive_Loop2 | 942D | LD HL,$6466 | Print "O.K." and start a new line. | |
| ActionGive_Loop3 | 9430 | CALL PrintStringAndANewline | ||
| 9433 | RET | Return. | ||
| ActionGive_Step1 | 9434 | LD HL,$89B5 | Jump to ActionGive_Step3 unless the command matches the phrase at 89B5 (A key. (09)). | |
| 9437 | CALL Parser_AdvanceToSeparator | |||
| 943A | JR NZ,ActionGive_Step3 | |||
| 943C | LD A,$09 | |||
| 943E | CALL IsObjectCarried | |||
| 9441 | JR Z,ActionGive_Step2 | |||
| 9443 | LD HL,$7A59 | Print You're not carrying on the same line. | ||
| 9446 | CALL PrintString | |||
| 9449 | LD HL,$7708 | Print "a key" and start a new line. | ||
| 944C | JR ActionGive_Loop3 | |||
| ActionGive_Step2 | 944E | LD BC,$2A00 | Move A keyhole in the control panel. (2A) to nowhere (00). | |
| 9451 | CALL UpdateObjectLocation | |||
| 9454 | LD BC,$0900 | Move A key. (09) to nowhere (00). | ||
| 9457 | CALL UpdateObjectLocation | |||
| 945A | LD BC,$3A36 | Move A key in the control panel. The key is set to 'OFF'. (3A) to The Reactor Room. (36). | ||
| 945D | CALL UpdateObjectLocation | |||
| 9460 | LD HL,$622C | The player is carrying one fewer object. | ||
| 9463 | DEC (HL) | |||
| 9464 | JR ActionGive_Loop2 | Continue at ActionGive_Loop2 to confirm the gift. | ||
| ActionGive_Step3 | 9466 | JP ActionGive_Loop1 | Continue at ActionGive_Loop1 to say the player can't. | |
| Prev: 93E4 | Up: Map | Next: 9469 |