Improvements to isAttacked(), still not fully functional