If there is no enemy in the next chain range, the next segment will continue to go straight
If there is enemy in the next chain range, the next segment will change it's direction to hit it.
The chain cannot target one enemy twice, so every targeted enemy is marked for the next segment to avoid.
The chain generation work recursively that is why all the node appear at once.