Prev: 37860 Up: Map Next: 37993
37915: Action: Give
Hand a carried object to the person named in the command.
ActionGive 37915 CALL Parser_ValidateDirectObject Return if the command does not name a single object.
37918 RET C
37919 CP 2 Jump to ActionGive_Step1 when the command names at least 2 nouns.
37921 JR NC,ActionGive_Step1
37923 LD HL,25644 Print "Please be more specific." and start a new line.
37926 JR ActionGive_Loop3
ActionGive_Loop1 37928 LD HL,25691 Print "You can't." and start a new line.
37931 JR ActionGive_Loop3
ActionGive_Loop2 37933 LD HL,25702 Print "O.K." and start a new line.
ActionGive_Loop3 37936 CALL PrintStringAndANewline
37939 RET Return.
ActionGive_Step1 37940 LD HL,35253 Jump to ActionGive_Step3 unless the command matches the phrase at 35253 (A key. (9)).
37943 CALL Parser_AdvanceToSeparator
37946 JR NZ,ActionGive_Step3
37948 LD A,9
37950 CALL IsObjectCarried
37953 JR Z,ActionGive_Step2
37955 LD HL,31321 Print You're not carrying on the same line.
37958 CALL PrintString
37961 LD HL,30472 Print "a key" and start a new line.
37964 JR ActionGive_Loop3
ActionGive_Step2 37966 LD BC,10752 Move A keyhole in the control panel. (42) to nowhere (0).
37969 CALL UpdateObjectLocation
37972 LD BC,2304 Move A key. (9) to nowhere (0).
37975 CALL UpdateObjectLocation
37978 LD BC,14902 Move A key in the control panel. The key is set to 'OFF'. (58) to The Reactor Room. (54).
37981 CALL UpdateObjectLocation
37984 LD HL,25132 The player is carrying one fewer object.
37987 DEC (HL)
37988 JR ActionGive_Loop2 Continue at ActionGive_Loop2 to confirm the gift.
ActionGive_Step3 37990 JP ActionGive_Loop1 Continue at ActionGive_Loop1 to say the player can't.
Prev: 37860 Up: Map Next: 37993