Prev: 61803 Up: Map Next: 62006
61853: Action: Examine
Action_Examine 61853 CALL Parser_ValidateDirectObject Call Parser_ValidateDirectObject.
61856 RET C Return if the direct object is malformed.
61857 CP 1 Jump to Response_OneAtATimePlease if A is not equal to 1.
61859 JP NZ,Response_OneAtATimePlease
Was the player trying to examine ... the bottle?
61862 LD HL,59850 Call MatchPhraseTokens with PhraseTokens_Bottle.
61865 CALL MatchPhraseTokens
61868 JR NZ,Validate_Examine_Fish Jump to Validate_Examine_Fish if the token isn't for the bottle.
The player was trying to examine the bottle, but the bottle has "states" - before you examine it for the first time it's simply "A bottle" but after, it becomes "A bottle of rum"! So is it currently only "A bottle"?
61870 LD HL,59514 Call CheckActiveScenicEvents with Data_ItemGroup_Bottle_1.
61873 CALL CheckActiveScenicEvents
61876 CP 11 Jump to Validate_Examine_Fish if the bottle is not item 11: "A bottle" (if it's already been declared to contain rum).
61878 JR NZ,Validate_Examine_Fish
Change the bottle state!
61880 LD BC,2828 Call TransformItem to transform item 11 ("A bottle") into item 12 ("A bottle of rum").
61883 CALL TransformItem
Print "It's full of rum!".
61886 LD HL,55923 HL=55923.
61889 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Was the player trying to examine ... the fish?
Validate_Examine_Fish 61892 LD HL,59852 Call MatchPhraseTokens with PhraseTokens_Fish.
61895 CALL MatchPhraseTokens
61898 JR NZ,Validate_Examine_Watch Jump to Validate_Examine_Watch if the token isn't for the fish.
The player was trying to examine the fish, it also has "states" similarly to the bottle. Before you examine it for the first time, it's simply "A strangely coloured fish" and afterwards it becomes "A red herring"!
61900 LD A,27 Call ValidateItemPresent with "A strangely coloured fish".
61902 CALL ValidateItemPresent
61905 JR NZ,Validate_Examine_Watch Jump to Validate_Examine_Watch if "A strangely coloured fish" isn't in the current room or players inventory.
Change the fish state!
61907 LD BC,6940 Call TransformItem to transform item 27 ("A strangely coloured fish") into item 28 ("A red herring").
61910 CALL TransformItem
Print "It's a red herring!".
61913 LD HL,55941 HL=55941.
61916 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Was the player trying to examine ... the watch?
Validate_Examine_Watch 61919 LD HL,59857 Call MatchPhraseTokens with PhraseTokens_Watch.
61922 CALL MatchPhraseTokens
61925 JR NZ,Validate_Examine_Shoe Jump to Validate_Examine_Shoe if the token isn't for the watch.
Print "It appears to work.".
61927 LD HL,55961 HL=55961.
61930 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Was the player trying to examine ... the shoe?
Validate_Examine_Shoe 61933 LD HL,59859 Call MatchPhraseTokens with PhraseTokens_Shoe.
61936 CALL MatchPhraseTokens
61939 JR NZ,Validate_Examine_Rod Jump to Validate_Examine_Rod if the token isn't for the shoe.
Print "It is quite well made and in good condition.".
61941 LD HL,55981 HL=55981.
61944 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Was the player trying to examine ... the rod?
Validate_Examine_Rod 61947 LD HL,59861 Call MatchPhraseTokens with PhraseTokens_Rod.
61950 CALL MatchPhraseTokens
61953 JR NZ,Validate_Examine_Fruit Jump to Validate_Examine_Fruit if the token isn't for the rod.
Print "It has a circular cross-section.".
61955 LD HL,56026 HL=56026.
61958 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Was the player trying to examine ... the fruit?
Validate_Examine_Fruit 61961 LD HL,59863 Call MatchPhraseTokens with PhraseTokens_Fruit.
61964 CALL MatchPhraseTokens
61967 JR NZ,Validate_Examine_Bridge Jump to Validate_Examine_Bridge if the token isn't for the fruit.
Print "It looks delicious.".
61969 LD HL,56059 HL=56059.
61972 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Was the player trying to examine ... the bridge?
Validate_Examine_Bridge 61975 LD HL,59865 Call MatchPhraseTokens with PhraseTokens_Bridge.
61978 CALL MatchPhraseTokens
61981 JR NZ,Validate_Examine_Jewels Jump to Validate_Examine_Jewels if the token isn't for the bridge.
Print "Be careful. It won't carry much weight.".
61983 LD HL,56079 HL=56079.
61986 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Was the player trying to examine ... the jewels?
Validate_Examine_Jewels 61989 LD HL,59867 Call MatchPhraseTokens with PhraseTokens_Jewels.
61992 CALL MatchPhraseTokens
61995 JR NZ,Examine_Invalid Jump to Examine_Invalid if the token isn't for the jewels.
Print "They are very beautiful and very heavy.".
61997 LD HL,56119 HL=56119.
62000 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Nothing else is valid.
Examine_Invalid 62003 JP Response_IDontSeeThePoint Jump to Response_IDontSeeThePoint.
Prev: 61803 Up: Map Next: 62006