![]() |
Routines |
| Prev: 41958 | Up: Map | Next: 42140 |
|
Runs for the goblins 61 - "Nasty Goblin", 69 - "Hideous Goblin" and 73 - "Horrible Goblin" to 76 - "Disgusting Goblin". Their action lists reach here through Turn_RunTheHandlerIfPresent_Examine_CallHandler and TriggerAction, called from Turn_RunTheHandlerIfPresent. B holds the character from CurrentCharacter when reached through Turn_ApplyTheSavedMatch_ReadTheCurrentCharacter, and 0 when reached through 31546. The player's location is compared with it before the goblin speaks. Reached through the action lists of 61 - "Nasty Goblin", 69 - "Hideous Goblin", 73 - "Horrible Goblin", 74 - "Mean Goblin", 75 - "Vicious Goblin" and 76 - "Disgusting Goblin" for action 0, dispatched by TriggerAction.
|
||||
| ActionGoblinCapture | 42056 | LD IX,(46856) | Read *46856. | |
| 42060 | BIT 3,(IX+7) | Return if the object is not broken. | ||
| 42064 | RET Z | |||
| 42065 | RES 3,(IX+7) | Mark the object not broken. | ||
| 42069 | LD DE,6 | Each capture entry is 6 bytes. | ||
| 42072 | LD IY,42140 | Point IY at the capture table. | ||
| 42076 | LD A,(46824) | Read *CurrentObject. | ||
| ActionGoblinCapture_Loop | 42079 | CP (IY+0) | Jump to ActionGoblinCapture_StepToTheNextByteInCapture if this capture entry is the current object. | |
| 42082 | JR Z,ActionGoblinCapture_StepToTheNextByteInCapture | |||
| 42084 | ADD IY,DE | Step IY on by one capture entry. | ||
| 42086 | JR ActionGoblinCapture_Loop | Jump back to ActionGoblinCapture_Loop to try the next object. | ||
| ActionGoblinCapture_StepToTheNextByteInCapture | 42088 | PUSH IY | Step to the next byte in capture. | |
| 42090 | POP HL | |||
| 42091 | INC HL | |||
| 42092 | LD E,(HL) | Read the low byte of the pointer in this capture entry. | ||
| 42093 | INC HL | Step to the next byte in capture. | ||
| 42094 | LD D,(HL) | Read the high byte of the pointer in this capture entry. | ||
| 42095 | LD (DE),A | Store the current object id at the address taken from this entry. | ||
| 42096 | INC HL | |||
| 42097 | LD A,(HL) | Store the next table byte as the object's location. | ||
| 42098 | LD (IX+16),A | |||
| 42101 | INC HL | Step to the next byte in capture. | ||
| 42102 | LD A,(HL) | Store the next table byte as name byte 10 of the object. | ||
| 42103 | LD (IX+10),A | |||
| 42106 | INC HL | Step to the next byte in capture. | ||
| 42107 | LD A,(HL) | Store the next table byte as name byte 11 of the object. | ||
| 42108 | LD (IX+11),A | |||
|
Say "[0x07] fall(s|d|ing|es) down a hole and vanish(s|d|ing|es)".
|
||||
| 42111 | LD HL,45160 | Point HL at the message and call PrintMessage. | ||
| 42114 | CALL PrintMessage | |||
| 42117 | LD A,(49451) | Return if the player's location is not the B passed in by the caller of Turn_RunTheHandlerIfPresent. | ||
| 42120 | CP B | |||
| 42121 | RET NZ | |||
| 42122 | LD DE,94 | Use the token ANOTHER. | ||
|
Print the token in DE.
|
||||
| 42125 | CALL PrintToken | Call PrintToken to print a dictionary token. | ||
| 42128 | LD DE,738 | Use the token GOBLIN. | ||
|
Print the token in DE.
|
||||
| 42131 | CALL PrintToken | Call PrintToken to print a dictionary token. | ||
|
Print the message at HL.
|
||||
| 42134 | LD HL,45080 | Point HL at the message and call PrintMessage. | ||
| 42137 | JP PrintMessage | |||
| Prev: 41958 | Up: Map | Next: 42140 |