One way i could do it is that instead the chain sequence target the nearest enemy in its range, the chain could target the enemy which is CLOSEST to the line between the chain and the cursor. Once the chain has reached a certain distance near the cursor, it will then target the closest enemy as usual.