I'm glad you enjoyed it!
The Magic Bullet aims at nearby enemies, but if there are no enemies within its range (kind of short) it fires in a random direction. Of the enemies within range, it does sort them by distance but it only sorts the first 5 and then picks the closest. It was a preemptive optimization, because I wanted to avoid potentially sorting 100 enemies by distance.
I'm glad you found it balanced. The wave spawner was written on the last day so a lot of my precious final hours were spent tweaking the levels instead of adding other polish.