I've been not doing what I should be doing all morning, and instead debugging these issues.
First, the Rapiers missing health was another issue of me copying them from another game. They've been restored to full health for the CP and onward.
Second, Capi, I assume your target list issues have been cleaned up?
Third: man, the LOS code. So many bugs. I won't even go into all of them, but we had it just outright ignoring the code whenever the target was above or to the left of the enemy. We had typos, we had incorrect logic, we had imaginary, non-existent variables being referenced out of context. It was bad, I'm shocked it hadn't crashed thing yet.
I can say that, for my 1 test case of 'Scratch' thinking it could get an image lock on 'Right Claw', this is now fixed. In theory, everyone else's LOS through asteroids should now be blocked too, but let me know!
Flak wise, I've started by throwing flak out "to be avoided". I'll try firing directly on ships later, to see if that's working as expected, but I'd rather tackle one problem at a time.
I've submitted my orders, waiting only on one of RC's ships.