![]() |
Routines |
Prev: 61234 | Up: Map | Next: 61498 |
Used by the routines at MovePlayer, Action_Get, Action_Climb, Action_Enter, Action_Row and GameStart.
|
||||||||
61268 | LD HL,48239 | HL=Flag_EventState. | ||||||
61271 | BIT 0,(HL) | Jump to 61307 if bit 0 of *HL is unset. | ||||||
61273 | JR Z,61307 | |||||||
61275 | LD HL,48231 | Initialise Counter_Crab to 6. | ||||||
61278 | LD (HL),6 | |||||||
61280 | CP 44 | Jump to 61307 if A is not equal to 44. | ||||||
61282 | JR NZ,61307 | |||||||
61284 | LD HL,48239 | Reset bit 0 of *Flag_EventState. | ||||||
61287 | RES 0,(HL) | |||||||
61289 | PUSH AF | Stash AF on the stack. | ||||||
Spawn the giant crab in
The Rockpool.
|
||||||||
61290 | LD BC,10544 | Call Handler_UpdateObjectLocation using item "A giant crab" to create it in The Rockpool. | ||||||
61293 | CALL Handler_UpdateObjectLocation | |||||||
61296 | POP AF | Restore AF from the stack. | ||||||
61297 | LD HL,60455 | Write 47 to *60455 to open up westbound access to The Secluded Beach from The Canyon. | ||||||
61300 | LD (HL),47 | |||||||
61302 | LD HL,60458 | Write 48 to *60458 to open up northbound access to The Rockpool from The Secluded Beach. | ||||||
61305 | LD (HL),48 | |||||||
61307 | CALL 50464 | Call 50464. | ||||||
61310 | LD E,0 | E=0. | ||||||
61312 | CALL Handler_DisplayRoomImage | Call Handler_DisplayRoomImage. | ||||||
61315 | LD A,(48331) | Jump to 61351 if *CurrentRoom is not room 48: " The Rockpool". | ||||||
61318 | CP 48 | |||||||
61320 | JR NZ,61351 | |||||||
61322 | LD A,41 | Call ValidateItemPresent with "A giant crab". | ||||||
61324 | CALL ValidateItemPresent | |||||||
61327 | JR NZ,61351 | Jump to 61351 if A is not equal to 41. | ||||||
61329 | LD HL,48239 | Set bit 0 of *Flag_EventState. | ||||||
61332 | SET 0,(HL) | |||||||
61334 | XOR A | Write 0 to *60455 to remove access to The Secluded Beach from The Canyon. | ||||||
61335 | LD (60455),A | |||||||
61338 | LD (60458),A | Write 0 to *60458 to remove access to The Rockpool from The Secluded Beach. | ||||||
61341 | LD HL,48230 | Set bit 0 of *Flag_TurnBasedEventState which relates to the crab being active. | ||||||
61344 | SET 0,(HL) | |||||||
61346 | LD A,6 | Write 6 to *Counter_Crab. | ||||||
61348 | LD (48231),A | |||||||
61351 | LD A,43 | Call ValidateItemPresent with "A giant octopus". | ||||||
61353 | CALL ValidateItemPresent | |||||||
61356 | JR NZ,61368 | Jump to 61368 if "A giant octopus" isn't in the current room. | ||||||
61358 | LD HL,48230 | Set bit 1 of *Flag_TurnBasedEventState which relates to the tentacle being active. | ||||||
61361 | SET 1,(HL) | |||||||
61363 | LD A,5 | Write 5 to *Counter_Tentacle. | ||||||
61365 | LD (48232),A | |||||||
61368 | LD A,42 | Call ValidateItemPresent with "A lion". | ||||||
61370 | CALL ValidateItemPresent | |||||||
61373 | JR NZ,61385 | Jump to 61385 if "A lion" isn't in the current room. | ||||||
61375 | LD HL,48230 | Set bit 3 of *Flag_TurnBasedEventState which relates to the lion being active. | ||||||
61378 | SET 3,(HL) | |||||||
61380 | LD A,7 | Write 7 to *Counter_Lion. | ||||||
61382 | LD (48234),A | |||||||
61385 | LD HL,59585 | Call CheckActiveScenicEvents with Data_ItemGroup_Crocodile. | ||||||
61388 | CALL CheckActiveScenicEvents | |||||||
61391 | JR NZ,61403 | Jump to 61403 if A is not equal to 7. | ||||||
61393 | LD HL,48230 | Set bit 4 of *Flag_TurnBasedEventState which relates to the crocodile being active. | ||||||
61396 | SET 4,(HL) | |||||||
61398 | LD A,11 | Write 11 to *Counter_Crocodile. | ||||||
61400 | LD (48235),A | |||||||
61403 | LD A,24 | Call ValidateItemPresent with "Surrounded by natives". | ||||||
61405 | CALL ValidateItemPresent | |||||||
61408 | JR NZ,61420 | Jump to 61420 if "Surrounded by natives" isn't in the current room. | ||||||
61410 | LD HL,48230 | Set bit 5 of *Flag_TurnBasedEventState which relates to the cannibals being active. | ||||||
61413 | SET 5,(HL) | |||||||
61415 | LD A,9 | Initialise the turn counter at *Counter_Cannibals with 9. | ||||||
61417 | LD (48236),A | |||||||
61420 | LD A,(48331) | Jump to 61439 if *CurrentRoom is not room 3: " Your Ship". | ||||||
61423 | CP 3 | |||||||
61425 | JR NZ,61439 | |||||||
61427 | LD A,29 | Call ValidateItemPresent with "The Jewels of Babylon". | ||||||
61429 | CALL ValidateItemPresent | |||||||
61432 | JR NZ,61439 | Jump to 61439 if "The Jewels of Babylon" isn't in the current room. | ||||||
61434 | POP HL | Restore HL and HL from the stack. | ||||||
61435 | POP HL | |||||||
61436 | JP GameComplete | Jump to GameComplete. | ||||||
61439 | LD A,(48331) | Jump to 61465 if *CurrentRoom is not room 2: " The Open Sea". | ||||||
61442 | CP 2 | |||||||
61444 | JR NZ,61465 | |||||||
61446 | LD HL,48212 | Jump to 61465 if bit 5 of *GameFlags_Help is set. | ||||||
61449 | BIT 5,(HL) | |||||||
61451 | JR NZ,61465 | |||||||
61453 | SET 5,(HL) | Set bit 5 of *HL. | ||||||
61455 | LD HL,48230 | Set bit 7 of *Flag_TurnBasedEventState which relates to the wave being active. | ||||||
61458 | SET 7,(HL) | |||||||
61460 | LD A,5 | Write 5 to *Counter_Wave. | ||||||
61462 | LD (48238),A | |||||||
61465 | LD A,(48331) | Jump to 61497 if *CurrentRoom is not room 108: " The Bridge". | ||||||
61468 | CP 108 | |||||||
61470 | JR NZ,61497 | |||||||
61472 | LD A,29 | Call ValidateItemPresent with "The Jewels of Babylon". | ||||||
61474 | CALL ValidateItemPresent | |||||||
61477 | JR NZ,61497 | Jump to 61497 if "The Jewels of Babylon" isn't in the current room. | ||||||
Print "The bridge begins to shake...".
|
||||||||
61479 | LD HL,58831 | HL=Messaging_TheBridgeBeginsToShake. | ||||||
61482 | CALL PrintStringAndNewline | Call PrintStringAndNewline. | ||||||
61485 | POP HL | Restore HL from the stack. | ||||||
Bad luck!
|
||||||||
61486 | LD HL,60887 | Switch GameOver onto the stack so the next return actions a "game over". | ||||||
61489 | EX (SP),HL | |||||||
Print "Suddenly,it collapses.".
|
||||||||
61490 | LD HL,58861 | HL=Messaging_SuddenlyItCollapses. | ||||||
61493 | CALL PausePrintStringAndScroll | Call PausePrintStringAndScroll. | ||||||
61496 | RET | Return. | ||||||
61497 | RET | Return. |
Prev: 61234 | Up: Map | Next: 61498 |