Prev: A3BC Up: Map Next: A448
A3E6: CAPTURE
Only a character can be captured, and not by its own side. The wood elf and the butler take the captive to the elvenking's dark dungeon, location 31; anyone else -- the goblins -- to the goblins' dungeon, location 13. Already there, it is refused. The captive goes with everything it carries; a captured player is shown the new place, if it can be seen. ACTION_TABLE's key-0 record after this runs NOTE_LIGHT.
DO_CAPTURE A3E6 LD IX,(TARGET_RECORD) Not its own side
A3EA LD A,(IX+$04)
A3ED AND $70
A3EF PUSH IX
A3F1 LD IX,(ACTOR)
A3F5 AND (IX+$04)
A3F8 POP IX
A3FA JP NZ,REFUSE
A3FD BIT 6,(IX+$07) Only a character
A401 JP Z,REFUSE
A404 LD A,(ACTING) The elves' dungeon, or the goblins'
A407 LD B,$1F
A409 CP $40
A40B JR Z,DO_CAPTURE_0
A40D CP $42
A40F JR Z,DO_CAPTURE_0
A411 LD B,$0D
DO_CAPTURE_0 A413 LD A,(ACTOR_AT) Already there: refused
A416 CP B
A417 JP Z,REFUSE
A41A CALL FOR_REAL The test ends here
A41D LD IX,(TARGET_RECORD) There now, held by nothing, with all it carries
A421 LD (IX+$10),B
A424 LD (IX+$01),$FF
A428 LD A,(TARGET)
A42B CALL MOVE_CONTENTS
A42E LD A,(TARGET) Not the player: done
A431 CP $00
A433 RET NZ
A434 LD (ACTING),A The player is the subject again
A437 LD HL,PLAYER
A43A LD (ACTOR),HL
A43D CALL TOO_DARK Show the player the dungeon, if it can be seen
A440 RET C
A441 LD A,B
A442 LD HL,MSG_IN
A445 JP DESCRIBE_WITH_OPENING
Prev: A3BC Up: Map Next: A448