![]() |
Routines |
| Prev: 60569 | Up: Map | Next: 60774 |
|
Commits a move into the destination room held in A. It refuses the move while the player is badly hurt, otherwise calls MovePlayerToRoom, describes the room via Handler_DisplayRoom, then arms the local dangers.
|
||||||||
| ChangeRoom | 60598 | LD C,A | C=A. | |||||
| 60599 | LD A,72 | Call ValidateItemPresent with item 72: "You are seriously injured". | ||||||
| 60601 | CALL ValidateItemPresent | |||||||
| 60604 | JR NZ,ChangeRoom_EnterRoom | Jump to ChangeRoom_EnterRoom if "You are seriously injured" is not in the current room. | ||||||
|
Print "You can't move.
You are too badly injured.".
|
||||||||
| 60606 | LD HL,56120 | HL=Messaging_YouCantMove. | ||||||
| 60609 | CALL PrintStringAndNewline | Call PrintStringAndNewline. | ||||||
| 60612 | RET | Return. | ||||||
|
Move into the requested room and arm local dangers.
|
||||||||
| ChangeRoom_EnterRoom | 60613 | LD A,C | A=C. | |||||
| 60614 | CALL MovePlayerToRoom | Call MovePlayerToRoom. | ||||||
| 60617 | LD E,0 | E=0. | ||||||
| 60619 | CALL Handler_DisplayRoom | Call Handler_DisplayRoom. | ||||||
| 60622 | LD A,65 | Jump to ChangeRoom_SlimeMonster if ValidateItemPresent reports that "A giant spider. It advances toward you" isn't in the current room. | ||||||
| 60624 | CALL ValidateItemPresent | |||||||
| 60627 | JR NZ,ChangeRoom_SlimeMonster | |||||||
|
Arm the giant spider for six turns.
|
||||||||
| 60629 | LD HL,47670 | HL=Flag_TurnBasedEventState. | ||||||
| 60632 | SET 1,(HL) | Set bit 1 of *HL. | ||||||
| 60634 | LD A,6 | A=6. | ||||||
| 60636 | LD (47672),A | Write A to *Counter_Spider. | ||||||
|
Is the slime monster here?
|
||||||||
| ChangeRoom_SlimeMonster | 60639 | LD A,30 | Jump to ChangeRoom_Demons if ValidateItemPresent reports that "A monster from the slime" isn't in the current room. | |||||
| 60641 | CALL ValidateItemPresent | |||||||
| 60644 | JR NZ,ChangeRoom_Demons | |||||||
|
Arm the slime monster for six turns.
|
||||||||
| 60646 | LD HL,47670 | HL=Flag_TurnBasedEventState. | ||||||
| 60649 | SET 2,(HL) | Set bit 2 of *HL. | ||||||
| 60651 | LD A,6 | A=6. | ||||||
| 60653 | LD (47673),A | Write A to *Counter_SlimeMonster. | ||||||
|
Are the demons here?
|
||||||||
| ChangeRoom_Demons | 60656 | LD A,41 | Jump to ChangeRoom_Zarn if ValidateItemPresent reports that "Some demons are attacking you. They scream and jab at you with vicious tridents" isn't in the current room. | |||||
| 60658 | CALL ValidateItemPresent | |||||||
| 60661 | JR NZ,ChangeRoom_Zarn | |||||||
|
Arm the demons for six turns.
|
||||||||
| 60663 | LD HL,47670 | HL=Flag_TurnBasedEventState. | ||||||
| 60666 | SET 3,(HL) | Set bit 3 of *HL. | ||||||
| 60668 | LD A,6 | A=6. | ||||||
| 60670 | LD (47674),A | Write A to *Counter_Demons. | ||||||
|
Is Zarn here?
|
||||||||
| ChangeRoom_Zarn | 60673 | LD A,42 | Jump to ChangeRoom_Witch if ValidateItemPresent reports that "The Wizard,Zarn. He prepares to cast a spell over you" isn't in the current room. | |||||
| 60675 | CALL ValidateItemPresent | |||||||
| 60678 | JR NZ,ChangeRoom_Witch | |||||||
|
Arm Zarn for six turns.
|
||||||||
| 60680 | LD HL,47670 | HL=Flag_TurnBasedEventState. | ||||||
| 60683 | SET 4,(HL) | Set bit 4 of *HL. | ||||||
| 60685 | LD A,6 | A=6. | ||||||
| 60687 | LD (47675),A | Write A to *Counter_Wizard. | ||||||
|
Is the witch here?
|
||||||||
| ChangeRoom_Witch | 60690 | LD A,46 | Jump to ChangeRoom_OldMan if ValidateItemPresent reports that "The Witch" isn't in the current room. | |||||
| 60692 | CALL ValidateItemPresent | |||||||
| 60695 | JR NZ,ChangeRoom_OldMan | |||||||
| 60697 | LD A,67 | Jump to ChangeRoom_WitchSeesRing if "A ring,which you are wearing" is held. | ||||||
| 60699 | CALL IsObjectCarried | |||||||
| 60702 | JR Z,ChangeRoom_WitchSeesRing | |||||||
|
Print "The Witch sees you,chuckles
gleefully,then throws some
majic powder at you.
You cannot move.
She beats you with her broom.".
|
||||||||
| 60704 | LD HL,56163 | HL=Messaging_TheWitchSeesYouChuckles. | ||||||
| 60707 | CALL PrintStringAndNewline | Call PrintStringAndNewline. | ||||||
| 60710 | POP HL | Restore HL from the stack. | ||||||
| 60711 | LD HL,60195 | Switch GameOver onto the stack so the next return actions a "game over". | ||||||
| 60714 | EX (SP),HL | |||||||
| 60715 | RET | Return. | ||||||
|
Print "The Witch sees the ring on
your hand,then she screams
and vanishes in a puff of smoke.".
|
||||||||
| ChangeRoom_WitchSeesRing | 60716 | LD HL,56286 | HL=Messaging_TheWitchSeesTheRingOn. | |||||
| 60719 | CALL PrintStringAndNewline | Call PrintStringAndNewline. | ||||||
| 60722 | LD A,46 | Call Handler_DestroyItem with item 46: "The Witch". | ||||||
| 60724 | CALL Handler_DestroyItem | |||||||
|
Is the old man here?
|
||||||||
| ChangeRoom_OldMan | 60727 | LD A,47 | Jump to ChangeRoom_GreatValley if ValidateItemPresent reports that "The Old Man. He lays down a bow and some arrows. He says:- 'These are tipped wit" isn't in the current room. | |||||
| 60729 | CALL ValidateItemPresent | |||||||
| 60732 | JR NZ,ChangeRoom_GreatValley | |||||||
| 60734 | LD A,47 | Call Handler_DestroyItem with item 47: "The Old Man. He lays down a bow and some arrows. He says:- 'These are tipped wit". | ||||||
| 60736 | CALL Handler_DestroyItem | |||||||
| 60739 | LD A,3 | Call Handler_UpdateItemForTheCurrentRoom with item 3: "A bow". | ||||||
| 60741 | CALL Handler_UpdateItemForTheCurrentRoom | |||||||
| 60744 | LD A,4 | Call Handler_UpdateItemForTheCurrentRoom with item 4: "Some arrows". | ||||||
| 60746 | CALL Handler_UpdateItemForTheCurrentRoom | |||||||
|
Print "He suddenly vanishes.".
|
||||||||
| 60749 | LD HL,55613 | HL=Messaging_HeSuddenlyVanishes. | ||||||
| 60752 | CALL PausePrintStringAndScroll | Call PausePrintStringAndScroll. | ||||||
|
Has the player brought Mara to the Great Valley?
|
||||||||
| ChangeRoom_GreatValley | 60755 | LD A,(47771) | Jump to ChangeRoom_Return if *CurrentRoom isn't room 5: " The Great Valley". | |||||
| 60758 | CP 5 | |||||||
| 60760 | JR NZ,ChangeRoom_Return | |||||||
| 60762 | LD A,44 | Jump to ChangeRoom_Return if ValidateItemPresent reports that "The Princess,Mara" isn't in the current room. | ||||||
| 60764 | CALL ValidateItemPresent | |||||||
| 60767 | JR NZ,ChangeRoom_Return | |||||||
| 60769 | POP HL | Restore HL from the stack. | ||||||
| 60770 | JP GameComplete | Jump to GameComplete. | ||||||
| ChangeRoom_Return | 60773 | RET | Return. | |||||
|
View the equivalent code in;
|
||||||||
| Prev: 60569 | Up: Map | Next: 60774 |