Prev: 8A5C Up: Map Next: 8A76
8A5D: An ant's turn
Used by the routine at MOVE_ANTS.
A paralysed ant does nothing. Otherwise an ant moves every frame except one in every +D: 2 is half speed, 20 very nearly full. Its explosion count goes down only on the frames it moves, so a slow ant's blast lasts twice as long. A stunned ant cannot move, so MOVE_ANT finds it no closer every frame and turns it at random: it spins where it stands (measured in a simulator). The first ant is the fast one (line 140's DATA); BASIC sets the others' speed from sp, which goes up as the levels do.
ANT_TURN 8A5D LD A,(IX+$06) Paralysed.
8A60 CP $FF
8A62 RET Z
8A63 CALL BLAST_FRAME
8A66 DEC (IX+$0E) Not the frame to skip: move.
8A69 JR Z,ANT_TURN_0
8A6B CALL MOVE_ANT
8A6E RET
ANT_TURN_0 8A6F LD A,(IX+$0D) Skip it, and start counting again.
8A72 LD (IX+$0E),A
8A75 RET
Prev: 8A5C Up: Map Next: 8A76