|  | Routines | 
| Prev: D14D | Up: Map | Next: D215 | 
| D1B9 | LD A,($A055) | Return if Rex is dead | ||
| D1BC | OR A | |||
| D1BD | RET NZ | |||
| D1BE | LD A,($A060) | Return if Rex is teleporting | ||
| D1C1 | OR A | |||
| D1C2 | RET NZ | |||
| D1C3 | LD IY,$5D22 | Set IY to base address for enemy projectiles | ||
| D1C7 | LD B,$14 | Set B to the number of projectiles to check | ||
| D1C9 | LD A,(IY+$06) | check projectile status | ||
| D1CC | CP $01 | is flying? | ||
| D1CE | JP NZ,$D20B | Jump forward and check next projectile if not flying | ||
| D1D1 | LD A,($A0B7) | Check if projectile y-position is in range of collision based on Rex y-position | ||
| D1D4 | ADD A,$05 | |||
| D1D6 | CP (IY+$01) | |||
| D1D9 | JP NC,$D20B | |||
| D1DC | ADD A,$11 | |||
| D1DE | CP (IY+$01) | |||
| D1E1 | JP C,$D20B | |||
| D1E4 | LD A,($A0B6) | Check if projectile x-position is in range of collision based on Rex x-position | ||
| D1E7 | CP (IY+$00) | |||
| D1EA | JP NC,$D20B | |||
| D1ED | ADD A,$10 | |||
| D1EF | CP (IY+$00) | |||
| D1F2 | JP C,$D20B | |||
| 
Impact with Rex
 | ||||
| D1F5 | LD (IY+$06),$02 | Set projectile status to impact #1 | ||
| D1F9 | LD A,($A049) | Check if Rex has the shield activated | ||
| D1FC | OR A | Jump to kill Rex if shield not active | ||
| D1FD | JP Z,$D208 | |||
| 
Shield activated
 | ||||
| D200 | LD L,$05 | Set L to the shield loss quantity | ||
| D202 | CALL $99CE | Handle shield loss | ||
| D205 | JP $D20B | Jump to handle next projectile | ||
| 
Shield not activated
 | ||||
| D208 | CALL $9BDA | Kill Rex | ||
| D20B | LD DE,$000F | Point IY to the next projectile data | ||
| D20E | ADD IY,DE | |||
| D210 | DEC B | Decrement projectile counter | ||
| D211 | JP NZ,$D1C9 | Jump back and check next projectile | ||
| D214 | RET | |||
| Prev: D14D | Up: Map | Next: D215 |