![]() |
Routines |
| Prev: A3BC | Up: Map | Next: A448 |
|
Captures the current creature. Reached through the action table at ActionTable, dispatched by Turn_RunTheHandlerIfPresent.
|
||||
| ActionCapture | A3E6 | LD IX,($B708) | Read *B708. | |
| A3EA | LD A,(IX+$04) | Read the second flag from the object record. | ||
| A3ED | AND $70 | Keep bits 4-6 of the flags, save IX, and point IX at the object in *Pointer_CurrentCharacter. | ||
| A3EF | PUSH IX | |||
| A3F1 | LD IX,($B70C) | |||
| A3F5 | AND (IX+$04) | Test these bits of the object's second flag. | ||
| A3F8 | POP IX | Restore the object record from the stack and jump to ResponseThatWillNotWork if those flag bits were set. | ||
| A3FA | JP NZ,ResponseThatWillNotWork | |||
| A3FD | BIT 6,(IX+$07) | Jump back to ResponseThatWillNotWork if the object is not an animal. | ||
| A401 | JP Z,ResponseThatWillNotWork | |||
| A404 | LD A,($B6EA) | Read *CurrentCharacter. | ||
| A407 | LD B,$1F | Use location 1F and jump to ActionCapture_TestTheLocation if this character is 40. | ||
| A409 | CP $40 | |||
| A40B | JR Z,ActionCapture_TestTheLocation | |||
| A40D | CP $42 | Jump to ActionCapture_TestTheLocation if the character whose turn it is is 42. | ||
| A40F | JR Z,ActionCapture_TestTheLocation | |||
| A411 | LD B,$0D | Use location 0D for any other character. | ||
| ActionCapture_TestTheLocation | A413 | LD A,($B6F6) | Read *B6F6. | |
| A416 | CP B | Jump back to ResponseThatWillNotWork if the script location is the location in B. | ||
| A417 | JP Z,ResponseThatWillNotWork | |||
|
If the message is held back, the creature is not captured.
|
||||
| A41A | CALL ConditionSuppressTheMessage | Call ConditionSuppressTheMessage. If the message is held back, the creature is not captured. | ||
| A41D | LD IX,($B708) | Read *B708. | ||
| A421 | LD (IX+$10),B | Update the object's location. | ||
| A424 | LD (IX+$01),$FF | Mark where this object is as unset. | ||
| A428 | LD A,($B6E8) | Read *CurrentObject. | ||
| A42B | CALL Object_MoveContents_0 | Call Object_MoveContents_0 to move what is inside the current object to the capture location. | ||
| A42E | LD A,($B6E8) | Read *CurrentObject. | ||
| A431 | CP $00 | Return if the current object is not zero. | ||
| A433 | RET NZ | |||
| A434 | LD ($B6EA),A | Update *CurrentCharacter. | ||
| A437 | LD HL,$C11B | Point *Pointer_CurrentCharacter at "You". | ||
| A43A | LD ($B70C),HL | |||
|
Test whether the location is lit.
|
||||
| A43D | CALL LocationLit | Call LocationLit to test whether the location is lit. | ||
| A440 | RET C | Return if the location is dark (carry set). | ||
| A441 | LD A,B | Take the capture location into A. | ||
| A442 | LD HL,$AFFC | Point HL at "You are in". | ||
| A445 | JP YouSee_Wrapper | Jump to YouSee_Wrapper to print the location text. | ||
| Prev: A3BC | Up: Map | Next: A448 |