![]() |
Routines |
| Prev: A3E6 | Up: Map | Next: A49C |
|
Runs for the goblins $3D - "Nasty Goblin", $45 - "Hideous Goblin" and $49 - "Horrible Goblin" to $4C - "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 00 when reached through 7B3A. The player's location is compared with it before the goblin speaks. Reached through the action lists of $3D - "Nasty Goblin", $45 - "Hideous Goblin", $49 - "Horrible Goblin", $4A - "Mean Goblin", $4B - "Vicious Goblin" and $4C - "Disgusting Goblin" for action 00, dispatched by TriggerAction.
|
||||
| ActionGoblinCapture | A448 | LD IX,($B708) | Read *B708. | |
| A44C | BIT 3,(IX+$07) | Return if the object is not broken. | ||
| A450 | RET Z | |||
| A451 | RES 3,(IX+$07) | Mark the object not broken. | ||
| A455 | LD DE,$0006 | Each capture entry is 06 bytes. | ||
| A458 | LD IY,$A49C | Point IY at the capture table. | ||
| A45C | LD A,($B6E8) | Read *CurrentObject. | ||
| ActionGoblinCapture_Loop | A45F | CP (IY+$00) | Jump to ActionGoblinCapture_StepToTheNextByteInCapture if this capture entry is the current object. | |
| A462 | JR Z,ActionGoblinCapture_StepToTheNextByteInCapture | |||
| A464 | ADD IY,DE | Step IY on by one capture entry. | ||
| A466 | JR ActionGoblinCapture_Loop | Jump back to ActionGoblinCapture_Loop to try the next object. | ||
| ActionGoblinCapture_StepToTheNextByteInCapture | A468 | PUSH IY | Step to the next byte in capture. | |
| A46A | POP HL | |||
| A46B | INC HL | |||
| A46C | LD E,(HL) | Read the low byte of the pointer in this capture entry. | ||
| A46D | INC HL | Step to the next byte in capture. | ||
| A46E | LD D,(HL) | Read the high byte of the pointer in this capture entry. | ||
| A46F | LD (DE),A | Store the current object id at the address taken from this entry. | ||
| A470 | INC HL | |||
| A471 | LD A,(HL) | Store the next table byte as the object's location. | ||
| A472 | LD (IX+$10),A | |||
| A475 | INC HL | Step to the next byte in capture. | ||
| A476 | LD A,(HL) | Store the next table byte as name byte 0A of the object. | ||
| A477 | LD (IX+$0A),A | |||
| A47A | INC HL | Step to the next byte in capture. | ||
| A47B | LD A,(HL) | Store the next table byte as name byte 0B of the object. | ||
| A47C | LD (IX+$0B),A | |||
|
Say "[0x07] fall(s|d|ing|es) down a hole and vanish(s|d|ing|es)".
|
||||
| A47F | LD HL,$B068 | Point HL at the message and call PrintMessage. | ||
| A482 | CALL PrintMessage | |||
| A485 | LD A,($C12B) | Return if the player's location is not the B passed in by the caller of Turn_RunTheHandlerIfPresent. | ||
| A488 | CP B | |||
| A489 | RET NZ | |||
| A48A | LD DE,$005E | Use the token ANOTHER. | ||
|
Print the token in DE.
|
||||
| A48D | CALL PrintToken | Call PrintToken to print a dictionary token. | ||
| A490 | LD DE,$02E2 | Use the token GOBLIN. | ||
|
Print the token in DE.
|
||||
| A493 | CALL PrintToken | Call PrintToken to print a dictionary token. | ||
|
Print the message at HL.
|
||||
| A496 | LD HL,$B018 | Point HL at the message and call PrintMessage. | ||
| A499 | JP PrintMessage | |||
| Prev: A3E6 | Up: Map | Next: A49C |