Prev: EC6C Up: Map Next: ECF4
ECC0: Take: Jewelled Key
Used by the routine at Take_Key.
Take the jewelled key and open the jewelled gates.
Take_JewelledKey ECC0 LD A,$28 Call ValidateItemPresent with item 28: "A jewelled key.".
ECC2 CALL ValidateItemPresent
ECC5 JP NZ,Response_ItIsntHere Jump to Response_ItIsntHere if "A jewelled key." is not present.
ECC8 LD A,$28 Call Take_IsPlayerHoldingItem with item 28: "A jewelled key.".
ECCA CALL Take_IsPlayerHoldingItem
ECCD CALL TakeItem Call TakeItem.
This action changes the map:
ECD0 LD A,$14 Write 14 to open westbound access to The Hall of the Mountain King from The King's Anteroom.
ECD2 LD ($E867),A
ECD5 LD A,$15 Write 15 to open eastbound access to The King's Anteroom from The Hall of the Mountain King.
ECD7 LD ($E860),A
ECDA LD BC,$1110 Call TransformItem to transform "The gates are closed." into "The gates are open.".
ECDD CALL TransformItem
ECE0 LD BC,$1413 Call TransformItem to transform "The gates are closed." into "The gates are open.".
ECE3 CALL TransformItem
ECE6 LD HL,$AE76 Return if bit 5 of *Flags_RoomChange is set, which relates to taking the jewelled key.
ECE9 BIT 5,(HL)
ECEB RET NZ
ECEC SET 5,(HL) Set bit 5 of *Flags_RoomChange to signify that the jewelled key has been taken.
ECEE LD A,$02 Call AddToScore with 02.
ECF0 CALL AddToScore
ECF3 RET Return.
Prev: EC6C Up: Map Next: ECF4