1. Priorities targets based on incoming vs outgoing, I.E. Incoming first.
And how about adding that incoming bombers get priority over incoming fighters?
2. Do not target a plane if X number of friendlies are in Y range of it.
If Y is the range limits within which puffy ack can explode around the target it's aiming at, then I would say X ought to be 1.
I can't think of any good reason why the gunners on the ground ought to purposefully continue lobbing shells up at a target which is under direct attack by a friendly aircraft. So, in my view, the rule ought to be if a friendly aircraft enters the space around an aircraft in which puffy ack can explode (like a sphere or a cube or whatever of X number of feet around that aircraft) the firing stops.
ps: this, btw, is why I said it was bogus that my 262 got blown up by friendly puffy ack a few weeks ago - there's no good reason why those ack gunners should have been firing when I was attacking those bombers