Prev: FBA8 Up: Map Next: FC24
FBD5: Action: Wear
Action_Wear FBD5 CALL Parser_ValidateDirectObject Call Parser_ValidateDirectObject.
FBD8 RET C Return if the direct object is malformed.
FBD9 CP $02 Jump to Response_PleaseRephraseThat_Duplicate if A is greater than 02.
FBDB JP NC,Response_PleaseRephraseThat_Duplicate
Was the player trying to wear ... the eyepatch?
FBDE LD HL,$E9F1 Call MatchPhraseTokens with PhraseTokens_Eyepatch.
FBE1 CALL MatchPhraseTokens
FBE4 JR NZ,Wear_CheckShoe Jump to Wear_CheckShoe if the token isn't for the eyepatch.
The player was trying to wear the eyepatch, but are they wearing it already?
FBE6 LD A,$11 Call ValidateItemPresent with "An eyepatch (worn)".
FBE8 CALL ValidateItemPresent
FBEB JR NZ,Validate_Wear_Eyepatch Jump to Validate_Wear_Eyepatch if "An eyepatch (worn)" isn't in the current room.
Print "You're wearing it already.".
FBED LD HL,$E44C HL=Messaging_YoureWearingItAlready.
FBF0 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
The player was trying to wear the eyepatch, but is it either in the room or in the players inventory?
Validate_Wear_Eyepatch FBF3 LD A,$10 Call CheckObjectInInventory using item 10: "An eyepatch".
FBF5 CALL CheckObjectInInventory
FBF8 JP NZ,Response_YoureNotCarryingIt Jump to Response_YoureNotCarryingIt if the eyepatch is either not in the room or not in the players inventory.
Change the eyepatch state!
FBFB LD BC,$1011 Call TransformItem to transform item 10 ("An eyepatch") into item 11 ("An eyepatch (worn)").
FBFE CALL TransformItem
FC01 CALL Response_OK_Duplicate Call Response_OK_Duplicate.
Print "I think you look quite stupid.".
FC04 LD HL,$E467 HL=Messaging_WearEyepatch.
FC07 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Was the player trying to wear ... the shoe?
Wear_CheckShoe FC0A LD HL,$E9D3 Call MatchPhraseTokens with PhraseTokens_Shoe.
FC0D CALL MatchPhraseTokens
FC10 JR NZ,Wear_CheckJewels Jump to Wear_CheckJewels if the token isn't for the shoe.
Print "No! I'm not letting you hop around, with one shoe on.".
FC12 LD HL,$E486 HL=Messaging_WearShoe.
FC15 JP PrintStringAndNewline_Alias Jump to PrintStringAndNewline_Alias.
Was the player trying to wear ... the jewels?
Wear_CheckJewels FC18 LD HL,$E9DB Call MatchPhraseTokens with PhraseTokens_Jewels.
FC1B CALL MatchPhraseTokens
FC1E JP Z,Response_YouCant_Duplicate Jump to Response_YouCant_Duplicate if the token is for the jewels.
Nothing else is valid.
FC21 JP Response_DontBeRidiculous Jump to Response_DontBeRidiculous.
Prev: FBA8 Up: Map Next: FC24