![]() |
Routines |
Prev: 63897 | Up: Map | Next: 64060 |
|
||||
Action_Drink | 63972 | CALL Parser_ValidateDirectObject | Call Parser_ValidateDirectObject. | |
63975 | RET C | Return if the direct object is malformed. | ||
Was the player trying to drink the rum?
|
||||
63976 | LD HL,60088 | Call MatchPhraseTokens with PhraseTokens_Rum. | ||
63979 | CALL MatchPhraseTokens | |||
63982 | JR NZ,Handler_DrinkWater | Jump to Handler_DrinkWater if the token isn't for the rum. | ||
The player was trying to drink the rum.
|
||||
63984 | LD HL,59514 | Call CheckActiveScenicEvents with Data_ItemGroup_Bottle_1. | ||
63987 | CALL CheckActiveScenicEvents | |||
63990 | LD B,A | Load the bottle into B as the source item. | ||
63991 | LD C,13 | Load item 13: "A bottle" into C as the destination item. | ||
63993 | PUSH BC | Stash the source/ destination items on the stack briefly. | ||
Is the player either carrying the bottle of rum, or is it in the current room?
|
||||
63994 | CALL CheckObjectInInventory | Call CheckObjectInInventory. | ||
63997 | POP BC | Restore the source/ destination items from the stack. | ||
63998 | JP NZ,Response_YoureNotCarryingIt | Jump to Response_YoureNotCarryingIt if the bottle of rum is not in the room or the players inventory. | ||
Change the bottle state!
|
||||
64001 | CALL TransformItem | Call TransformItem. | ||
64004 | LD HL,48230 | Set bit 2 of *Flag_TurnBasedEventState which relates to the player being drunk. | ||
64007 | SET 2,(HL) | |||
Set a turn counter, which means the player should keep away from particularly high places.
|
||||
64009 | LD A,6 | Write 6 turns to *Counter_Drunk. | ||
64011 | LD (48233),A | |||
Print "You drink the golden liquid.
It was delicious..hic..
You feel decidedly light-headed.".
|
||||
64014 | LD HL,57912 | HL=57912. | ||
64017 | JP PrintStringAndNewline_Alias | Jump to PrintStringAndNewline_Alias. | ||
Handle drinking water.
|
||||
Handler_DrinkWater | 64020 | LD HL,60090 | Call MatchPhraseTokens with PhraseTokens_Water. | |
64023 | CALL MatchPhraseTokens | |||
64026 | JR NZ,Drink_Invalid | Jump to Drink_Invalid if the token isn't for drinking the water. | ||
The player wants to drink water but determine what type of water...
|
||||
64028 | LD A,(48331) | Load A with *CurrentRoom. | ||
64031 | LD HL,64053 | Set HL to point to Table_RoomsFreshWater. | ||
64034 | LD BC,4 | Set a counter in BC of 0004 which is the number of rooms in the table. | ||
64037 | CPIR | Search for the current room in the "rooms with water" table. | ||
64039 | JR Z,Action_DrinkFreshWater | Jump to Action_DrinkFreshWater if the current room contains fresh water. | ||
Else it must be salt water - so report this.
Print "You can't.
That's salt water.".
|
||||
64041 | LD HL,57998 | HL=Messaging_YouCantThatsSaltWater. | ||
64044 | JP PrintStringAndNewline_Alias | Jump to PrintStringAndNewline_Alias. | ||
Print "You take a refreshing drink.".
|
||||
Action_DrinkFreshWater | 64047 | LD HL,58028 | HL=Messaging_YouTakeARefreshingDrink. | |
64050 | JP PrintStringAndNewline_Alias | Jump to PrintStringAndNewline_Alias. | ||
Any room ID which contains fresh, drinkable water.
|
||||
Table_RoomsFreshWater | 64053 | DEFB 20 | Room 20: The Waterfall. | |
64054 | DEFB 17 | Room 17: The Pool Of Water. | ||
64055 | DEFB 18 | Room 18: The Narrow Gulley. | ||
64056 | DEFB 100 | Room 100: The Damp Passage. | ||
Nothing else is valid.
|
||||
Drink_Invalid | 64057 | JP Response_YouCant_Duplicate | Jump to Response_YouCant_Duplicate. |
Prev: 63897 | Up: Map | Next: 64060 |