![]() |
Routines |
| Prev: 62902 | Up: Map | Next: 63116 |
|
Open the named door, gate or chest.
|
||||
| Action_Open | 62961 | CALL Parser_ValidateDirectObject | Call Parser_ValidateDirectObject. | |
| 62964 | RET C | Return if the direct object is malformed. | ||
|
Was the player trying to open ... the door?
|
||||
| 62965 | LD HL,59626 | Call Parser_AdvanceToSeparator with 59626. | ||
| 62968 | CALL Parser_AdvanceToSeparator | |||
| 62971 | JP NZ,Validate_Open_Chest | Jump to Validate_Open_Chest if the token isn't for the door. | ||
| 62974 | LD HL,59287 | Call Parser_SkipToken with 59287. | ||
| 62977 | CALL Parser_SkipToken | |||
| 62980 | BIT 0,A | Jump to Open_CheckRoom if the named door is closed. | ||
| 62982 | JR Z,Open_CheckRoom | |||
|
Print "It's already open.".
|
||||
| 62984 | LD HL,57714 | HL=Messaging_ItsAlreadyOpen. | ||
| 62987 | JP PrintResponse | Jump to PrintResponse. | ||
|
Which door is the player opening?
|
||||
| Open_CheckRoom | 62990 | LD A,(47771) | Jump to Open_Farmhouse if *CurrentRoom is room 2: " Inside the Farmhouse". | |
| 62993 | CP 2 | |||
| 62995 | JR Z,Open_Farmhouse | |||
| 62997 | CP 3 | Jump to Open_CheckWoodmansHut if *CurrentRoom isn't room 3: " At a large Farmhouse". | ||
| 62999 | JR NZ,Open_CheckWoodmansHut | |||
|
Change the farmhouse door states!
|
||||
| Open_Farmhouse | 63001 | LD BC,13877 | Call TransformItem to transform "A closed door" into "An open door". | |
| 63004 | CALL TransformItem | |||
| 63007 | LD BC,14391 | Call TransformItem to transform "A closed door" into "An open door". | ||
| 63010 | CALL TransformItem | |||
|
This action changes the map:
|
||||
| 63013 | LD A,3 | Write 3 to *Exit_FarmhouseSouth to open up southbound access to At a large Farmhouse from Inside the Farmhouse. | ||
| 63015 | LD (59713),A | |||
| 63018 | JP Response_OK_GameLoop | Jump to Response_OK_GameLoop. | ||
|
Is the player at the Woodman's Hut?
|
||||
| Open_CheckWoodmansHut | 63021 | CP 15 | Jump to Open_WoodmansHut if *CurrentRoom is room 15: " At the Woodman's Hut". | |
| 63023 | JR Z,Open_WoodmansHut | |||
| 63025 | CP 16 | Jump to Open_CheckWitchsHovel if *CurrentRoom isn't room 16: " Inside the Woodman's Hut". | ||
| 63027 | JR NZ,Open_CheckWitchsHovel | |||
|
Change the Woodman's Hut door states!
|
||||
| Open_WoodmansHut | 63029 | LD BC,14905 | Call TransformItem to transform "A closed door" into "An open door". | |
| 63032 | CALL TransformItem | |||
| 63035 | LD BC,15419 | Call TransformItem to transform "A closed door" into "An open door". | ||
| 63038 | CALL TransformItem | |||
|
This action changes the map:
|
||||
| 63041 | LD A,15 | Write 15 to *Exit_WoodmansHutEast to open up eastbound access to At the Woodman's Hut from Inside the Woodman's Hut. | ||
| 63043 | LD (59798),A | |||
| 63046 | JP Response_OK_GameLoop | Jump to Response_OK_GameLoop. | ||
|
Is the player at the Witch's Hovel?
|
||||
| Open_CheckWitchsHovel | 63049 | CP 60 | Jump to Open_WitchsHovel if *CurrentRoom is room 60: " At the Witch's Hovel". | |
| 63051 | JR Z,Open_WitchsHovel | |||
| 63053 | CP 61 | Jump to Validate_Open_Chest if *CurrentRoom isn't room 61: " Inside the Witch's Hovel". | ||
| 63055 | JR NZ,Validate_Open_Chest | |||
|
Change the Witch's Hovel door states!
|
||||
| Open_WitchsHovel | 63057 | LD BC,15933 | Call TransformItem to transform "A closed door" into "An open door". | |
| 63060 | CALL TransformItem | |||
| 63063 | LD BC,16447 | Call TransformItem to transform "A closed door" into "An open door". | ||
| 63066 | CALL TransformItem | |||
|
This action changes the map:
|
||||
| 63069 | LD A,60 | Write 60 to *Exit_WitchsHovelEast to open up eastbound access to At the Witch's Hovel from Inside the Witch's Hovel. | ||
| 63071 | LD (60068),A | |||
| 63074 | JP Response_OK_GameLoop | Jump to Response_OK_GameLoop. | ||
|
Was the player trying to open ... the chest?
|
||||
| Validate_Open_Chest | 63077 | LD HL,59412 | Call Parser_AdvanceToSeparator with 59412. | |
| 63080 | CALL Parser_AdvanceToSeparator | |||
| 63083 | JR NZ,Open_YouCant | Jump to Open_YouCant if the token isn't for the chest. | ||
| 63085 | LD A,11 | Jump to Response_YouCantItsLocked if ValidateItemPresent reports that "A chest" is in the current room. | ||
| 63087 | CALL ValidateItemPresent | |||
| 63090 | JP Z,Response_YouCantItsLocked | |||
| 63093 | LD A,12 | Jump to Response_ItsAlreadyOpen if ValidateItemPresent reports that "A closed chest" isn't in the current room. | ||
| 63095 | CALL ValidateItemPresent | |||
| 63098 | JP NZ,Response_ItsAlreadyOpen | |||
| 63101 | LD BC,3085 | Call TransformItem to transform "A closed chest" into "An open chest containing the Crystals of Vulcan". | ||
| 63104 | CALL TransformItem | |||
|
Print "You open the chest,revealing
the Crystals of Vulcan,within.".
|
||||
| 63107 | LD HL,54792 | HL=Messaging_YouOpenTheChestRevealing. | ||
| 63110 | JP PrintResponse | Jump to PrintResponse. | ||
|
Nothing else is valid.
|
||||
| Open_YouCant | 63113 | JP Response_YouCant_GameLoop | Jump to Response_YouCant_GameLoop. | |
|
View the equivalent code in;
|
||||
| Prev: 62902 | Up: Map | Next: 63116 |