Updated to account for multiple bases

Still doesn't handle probes being attacked; that code was stripped out for this commit.