Prev: 42491 Up: Map Next: 43118
42922: Event: The Deep Bog
Prints that you are sinking into the bog, and the bog can be fatal. The deep bog record at 51872 calls this.
Test the flag.
Event_TheDeepBog 42922 LD A,(49451) Jump to Event_TheDeepBog_PrintTheSinking if *49451 is not 29.
42925 CP 29
42927 JR NZ,Event_TheDeepBog_PrintTheSinking
42929 SUB A Clear the byte at 51873.
42930 LD (51873),A Store the result at 51873.
Say "You are slowly sink(s|d|ing|es) into the bog".
Event_TheDeepBog_PrintTheSinking 42933 LD HL,45395 Point HL at the message and call PrintMessage.
42936 CALL PrintMessage
42939 LD A,(51873) Return if the deep bog script is not zero.
42942 CP 0
42944 RET NZ
42945 JP YouAreDead Jump to YouAreDead to end the game.
Test whose turn it is.
Reached through the action list of 3 - "Curious Map" for action 28, dispatched by TriggerAction.
42948 LD A,(46826) Jump to Action_Examine if *CurrentCharacter is not 65.
42951 CP 65
42953 JP NZ,Action_Examine
If the message is held back, the sinking message is not printed.
42956 CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the sinking message is not printed.
42959 LD IY,0 Point IY at the extra-exit entry (38863 writes this address into 42961).
42963 LD L,(IY+1) Read the low byte of this extra exit's direction token.
42966 LD H,(IY+2) Read the high byte of this extra exit's direction token.
Test the flag.
42969 LD A,(46833) Jump to Event_TheDeepBog_ReadTheDestination if *46833 is not 0.
42972 CP 0
42974 JR NZ,Event_TheDeepBog_ReadTheDestination
42976 LD B,3 Count 3 passes.
Event_TheDeepBog_ReadTheExtraByte 42978 LD A,(IY+3) Read the next byte of this extra exit.
42981 LD (HL),A Store it at 45395 and step on.
42982 INC HL
42983 INC IY Step to the next byte of this extra exit.
42985 DJNZ Event_TheDeepBog_ReadTheExtraByte Loop back to Event_TheDeepBog_ReadTheExtraByte until 3 runs out.
42987 LD IY,(42961) Read the extra-exit pointer saved at 42961.
Event_TheDeepBog_ReadTheDestination 42991 LD A,(IY+5) Read the destination from this extra exit.
Find the location's record.
42994 CALL LocateLocation Call LocateLocation to locate location.
42997 INC IX Step IX on to the location's name.
42999 INC IX
43001 PUSH IX Save the location's name and read the location from this extra exit.
43003 LD A,(IY+0)
Find the location's record.
43006 CALL LocateLocation Call LocateLocation to locate location.
43009 INC IX Step IX on to the location's name.
43011 INC IX
43013 PUSH IX Save that name and read the direction from this extra exit.
43015 LD A,(IY+3)
43018 CALL ExitsTheDirectionWord Call ExitsTheDirectionWord to describe the direction word.
43021 PUSH DE Point HL at "{5} go[0x01] from[0x00] to{5} get to[0x00]".
43022 LD HL,45520
43025 JP Response_YouSay Jump back to Response_YouSay to print the way from here to there.
Reached through the action list of 18 - "Rope" for action 43, dispatched by TriggerAction.
43028 LD A,(46825) Read *46825.
43031 CALL ExitsFindTheExitThroughAnObject_0 Call ExitsFindTheExitThroughAnObject_0 to find the exit through the object in A.
43034 CP 255 Jump back to ResponseThatWillNotWork if no exit runs through this object.
43036 JP Z,ResponseThatWillNotWork
If the message is held back, the fatal bog is not described.
43039 CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the fatal bog is not described.
Say "it sail(s|d|ing|es) across and.".
43042 LD HL,44902 Point HL at the message and call PrintMessage.
43045 CALL PrintMessage
43048 LD A,(50731) Jump to Event_TheDeepBog_PrintTheShortFall if the location of 41 - "Wooden Boat" is not this exit's destination.
43051 CP (IX+2)
43054 JR NZ,Event_TheDeepBog_PrintTheShortFall
43056 CALL Event_ARandomHalf Call Event_ARandomHalf to roll a random half.
43059 JR C,Event_TheDeepBog_LandTheRopeInTheBoat Jump to Event_TheDeepBog_LandTheRopeInTheBoat if the roll was below half.
43061 LD HL,44918 Point HL at "fall(s|d|ing|es) just short of the other side".
43064 CALL Event_ARandomHalf Call Event_ARandomHalf to roll a random half.
43067 JR C,Event_TheDeepBog_PrintTheMessage Jump to Event_TheDeepBog_PrintTheMessage if the roll was below half.
43069 LD HL,44930 Point HL at "[0x0b][0x08] but slide(s|d|ing|es) out again".
43072 JR Event_TheDeepBog_PrintTheMessage Jump to Event_TheDeepBog_PrintTheMessage to print "but slide(s|d|ing|es) out again".
Event_TheDeepBog_LandTheRopeInTheBoat 43074 LD A,18 Put the rope (18) into the boat's container at 50716.
43076 LD (50716),A
43079 LD HL,44939 Point HL at "lands in the boat".
43082 JR Event_TheDeepBog_PrintTheMessage Jump to Event_TheDeepBog_PrintTheMessage to print "lands in the boat".
Event_TheDeepBog_PrintTheShortFall 43084 LD HL,44918 Point HL at "fall(s|d|ing|es) just short of the other side".
43087 CALL Event_ARandomHalf Call Event_ARandomHalf to roll a random half.
43090 JR C,Event_TheDeepBog_PrintTheMessage Jump to Event_TheDeepBog_PrintTheMessage if Event_ARandomHalf rolled below 50.
43092 LD A,(IX+2) Read this exit's destination.
43095 LD IX,(46856) Read *46856.
43099 LD (IX+16),A Update the object's location.
43102 LD (IX+1),255 Mark where this object is as unset.
43106 LD A,(46824) Read *CurrentObject.
43109 CALL Object_MoveContents_0 Call Object_MoveContents_0 to move what is inside the current object to the location in B.
43112 LD HL,44909 Point HL at "lands on the other side".
Event_TheDeepBog_PrintTheMessage 43115 JP PrintMessage Jump to PrintMessage to print the message at HL.
Prev: 42491 Up: Map Next: 43118