Prev: 60474 Up: Map Next: 60608
60524: Take: Gold Key
Used by the routine at Take_Key.
Take the gold key and open the golden gates.
Take_GoldKey 60524 LD A,71 Call ValidateItemPresent with item 71: "A gold key.".
60526 CALL ValidateItemPresent
60529 JP NZ,Response_ItIsntHere Jump to Response_ItIsntHere if "A gold key." is not present.
60532 LD A,71 Call Take_IsPlayerHoldingItem with item 71: "A gold key.".
60534 CALL Take_IsPlayerHoldingItem
60537 CALL TakeItem Call TakeItem.
This action changes the map:
60540 LD A,22 Write 22 to open northbound access to The Hall of Wisdom from The King's Stairway.
60542 LD (59546),A
60545 LD A,30 Write 30 to open southbound access to The King's Stairway from The Hall of Wisdom.
60547 LD (59499),A
60550 LD A,45 Write 45 to open northbound access to The Ice Cavern from The Sand Cavern.
60552 LD (59684),A
60555 LD A,53 Write 53 to open southbound access to The Sand Cavern from The Ice Cavern.
60557 LD (59637),A
60560 LD BC,5910 Call TransformItem to transform "The gates are closed." into "The gates are open.".
60563 CALL TransformItem
60566 LD BC,6681 Call TransformItem to transform "The gates are closed." into "The gates are open.".
60569 CALL TransformItem
60572 LD BC,7452 Call TransformItem to transform "The gates are closed." into "The gates are open.".
60575 CALL TransformItem
60578 LD BC,8223 Call TransformItem to transform "The gates are closed." into "The gates are open.".
60581 CALL TransformItem
60584 LD HL,44662 Return if bit 4 of *Flags_RoomChange is set, which relates to taking the gold key.
60587 BIT 4,(HL)
60589 RET NZ
60590 SET 4,(HL) Set bit 4 of *Flags_RoomChange to signify that the gold key has been taken.
60592 LD A,2 Call AddToScore with 2.
60594 CALL AddToScore
60597 LD A,(44749) Return if *CurrentRoom is not room 35: " The Hall of Infinity".
60600 CP 35
60602 RET NZ
60603 XOR A Write 0 to close the eastbound exit from The Hall of Infinity.
60604 LD (59578),A
60607 RET Return.
Prev: 60474 Up: Map Next: 60608