Prev: 62528 Up: Map Next: 62601
62552: Process: Wear Amulet
Input
E The item ID currently being acted on
The player was trying to wear the amulet, but is it either in the room or in the players inventory?
Process_WearAmulet 62552 LD HL,58278 Call CheckItemGroupPresent with Data_ItemGroup_Amulet.
62555 CALL CheckItemGroupPresent
The amulet is present but is the player already wearing it?
62558 CALL IsPlayerCarryingItem Call IsPlayerCarryingItem.
62561 LD A,E Jump to Response_YouAreAlreadyWearingIt if the item found in the group is not equal to item 75: "An amulet" (so the found item is 76: "An amulet (worn)").
62562 CP 75
62564 JP NZ,Response_YouAreAlreadyWearingIt
Change the amulet state!
62567 LD BC,19276 Call TransformItem to transform item 75 ("An amulet") into item 76 ("An amulet (worn)").
62570 CALL TransformItem
62573 LD BC,10538 Call TransformItem to transform item 41 ("A multitude of shadow-like demons") into item 42 ("The vale is strangely silent").
62576 CALL TransformItem
Uncover an exit from The Vale Of Whispers.
62579 LD A,24 Write 24 to *59349 to open up southbound access to Bleak Moorland from The Vale Of Whispers.
62581 LD (59349),A
Is the player in room 32: The Vale Of Whispers?
62584 LD A,(42947) Jump to Response_OK_Duplicate if *CurrentRoom is not equal to room 32: The Vale Of Whispers.
62587 CP 32
62589 JP NZ,Response_OK_Duplicate
The player is in room 32: The Vale Of Whispers.
Print "O.K.".
62592 CALL Response_OK_Duplicate Call Response_OK_Duplicate.
Print "The vale is strangely silent.".
62595 LD HL,46350 HL=Messaging_ValeIsStrangelySilent.
62598 JP 60781 Jump to 60781.
Prev: 62528 Up: Map Next: 62601