Its not threat based its spacially motivated, ie it hits the two closest targets. If there's not one in melee range then it goes for range. Odd behavior but that's how it goes has NOTHING to do with threat!!