![]() |
Routines |
Prev: F428 | Up: Map | Next: F458 |
|
||||||||
The player was trying to wear the helmet, but is it either in the room or in the players inventory?
|
||||||||
Process_WearHelmet | F440 | LD HL,$E36B | Call CheckItemGroupPresent with Data_ItemGroup_Helmet. | |||||
F443 | CALL CheckItemGroupPresent | |||||||
The helmet is present but is the player already wearing it?
|
||||||||
F446 | CALL IsPlayerCarryingItem | Call IsPlayerCarryingItem. | ||||||
F449 | LD A,E | Jump to Response_YouAreAlreadyWearingIt if the item found in the group is not equal to item 1F: "A bronze helmet" (so the found item is 20: "A bronze helmet (worn)"). | ||||||
F44A | CP $1F | |||||||
F44C | JP NZ,Response_YouAreAlreadyWearingIt | |||||||
Change the helmet state!
|
||||||||
F44F | LD BC,$1F20 | Call TransformItem to transform item 1F ("A bronze helmet") into item 20 ("A bronze helmet (worn)"). | ||||||
F452 | CALL TransformItem | |||||||
Print "O.K.".
|
||||||||
F455 | JP Response_OK_Duplicate | Jump to Response_OK_Duplicate. |
Prev: F428 | Up: Map | Next: F458 |