![]() |
Routines |
Prev: 64469 | Up: Map | Next: 64609 |
|
||||
Action_LightStrike | 64548 | CALL Parser_ValidateDirectObject | Call Parser_ValidateDirectObject. | |
64551 | RET C | Return if the direct object is malformed. | ||
64552 | CP 2 | Jump to Response_PleaseRephraseThat_Duplicate if A is greater than 2. | ||
64554 | JP NC,Response_PleaseRephraseThat_Duplicate | |||
Was the player trying to light ... the match?
|
||||
64557 | LD HL,59873 | Call MatchPhraseTokens with PhraseTokens_Match. | ||
64560 | CALL MatchPhraseTokens | |||
The match is the only item which is light/ strikable.
|
||||
64563 | JR NZ,LightStrike_Invalid | Jump to LightStrike_Invalid if the token isn't for the match. | ||
The player definitely wants to light/ strike the match ... but is it already lit?
|
||||
64565 | LD A,3 | Call ValidateItemPresent using item: "A lighted match". | ||
64567 | CALL ValidateItemPresent | |||
64570 | JP Z,Response_YouveDoneThatAlready | Jump to Response_YouveDoneThatAlready if the lit match is already in the players possession. | ||
The match isn't already lit, but is it either in the room, or in the players inventory?
|
||||
64573 | LD A,2 | Call CheckObjectInInventory using item 2: "A match". | ||
64575 | CALL CheckObjectInInventory | |||
64578 | JP NZ,Response_YoureNotCarryingIt | Jump to Response_YoureNotCarryingIt if the player is not holding the (unlit) match. | ||
The player can light the match- so go ahead and do this.
|
||||
64581 | LD BC,515 | Call TransformItem to transform item 2 ("A match") into item 3 ("A lighted match"). | ||
64584 | CALL TransformItem | |||
64587 | LD HL,48230 | Set bit 6 of *Flag_TurnBasedEventState which activates lighting the match. | ||
64590 | SET 6,(HL) | |||
The event is turn-based, the player only has the lit match for 6 turns.
|
||||
64592 | LD A,6 | Write 6 to *Counter_Match. | ||
64594 | LD (48237),A | |||
64597 | CALL Response_OK_Duplicate | Call Response_OK_Duplicate. | ||
Print "The match flares into life.
Hurry it will go out soon.".
|
||||
64600 | LD HL,58577 | HL=Messaging_TheMatchFlaresIntoLife. | ||
64603 | JP PrintStringAndNewline_Alias | Jump to PrintStringAndNewline_Alias. | ||
Nothing else is valid.
|
||||
LightStrike_Invalid | 64606 | JP Response_YouCant_Duplicate | Jump to Response_YouCant_Duplicate. |
Prev: 64469 | Up: Map | Next: 64609 |