Prev: 8862 Up: Map Next: 897D
8906: Drive Dracula
Sprites $7C to $7F, four frames. Touch: eight a pass. While the player carries the yellow crucifix ($8A) he runs from the player. In the player's room he hunts. Elsewhere, on a pass that falls in the frame when FRAMES is 0, he picks a random room 0-127 and moves there if its shape is $00-$02 and it is not the player's: he wanders the castle unseen. (His off-screen HOME_IN is given the crucifix test's DE rather than the centre he has just stored in +$0B and +$0C; harmless, since he is not drawn.)
MOVE_DRACULA 8906 CALL ACTOR_TO_WORKSPACE
8909 CALL CHECK_HIT
890C DEC E
890D CALL Z,LOSE_FOOD_EIGHT
8910 LD DE,$468A
8913 CALL FIND_CARRIED
8916 JR NZ,MOVE_DRACULA_0
8918 LD DE,($EA93)
891C CALL HOME_IN
891F LD A,(IX+$08)
8922 NEG
8924 LD (IX+$08),A
8927 LD A,(IX+$09)
892A NEG
892C LD (IX+$09),A
892F JR MOVE_DRACULA_1
MOVE_DRACULA_0 8931 LD A,($EA91)
8934 CP (IX+$01)
8937 JR NZ,MOVE_DRACULA_2
8939 LD DE,($EA93)
893D CALL HOME_IN
MOVE_DRACULA_1 8940 LD A,($5E12)
8943 RRA
8944 RRA
8945 AND $03
8947 ADD A,$7C
8949 LD (IX+$00),A
894C LD DE,$3434
894F JP BIG_MONSTER_STEP
MOVE_DRACULA_2 8952 LD (IX+$0B),$68
8956 LD (IX+$0C),$68
895A CALL HOME_IN
895D LD A,($5C78)
8960 AND A
8961 JP NZ,MOVE_DRACULA_1
8964 LD A,R
8966 AND $7F
8968 LD C,A
8969 CALL ROOM_SHAPE_OF
896C CP $03
896E JP NC,MOVE_DRACULA_1
8971 LD A,($EA91)
8974 CP C
8975 JP Z,MOVE_DRACULA_1
8978 LD (IX+$01),C
897B JR MOVE_DRACULA_1
Prev: 8862 Up: Map Next: 897D