if (!(entity instanceof Mech)) {
if (!(entity instanceof Mech || entity instanceof Protomech)) {
    private boolean isEligibleForPhysical(Entity entity) {        boolean canHit = false;        boolean friendlyFire = game.getOptions().booleanOption("friendly_fire");        // only mechs have physical attacks (except tank charges)        if (!(entity instanceof Mech)) {            return false;        }        // if you're charging or finding a club, it's already declared        if (entity.isUnjammingRAC()            || entity.isCharging()            || entity.isMakingDfa()            || entity.isFindingClub()            || entity.isSpotting()) {            return false;        }        // check game options        if (game.getOptions().booleanOption("no_clan_physical") &&            entity.isClan()) {            return false;        }        if (!game.getOptions().booleanOption("skip_ineligable_physical")) {            return true;        }        // dead mek walking        if (!entity.isActive()) {            return false;        }        // Try to find a valid entity target.        Enumeration e = game.getEntities();        while ( !canHit && e.hasMoreElements() ) {            Entity target = (Entity)e.nextElement();            // don't shoot at friendlies unless you are into that sort of thing            // and do not shoot yourself even then            if (!(entity.isEnemyOf(target) || (friendlyFire && entity.getId() != target.getId() ))) {                continue;            }            // No physical attack works at distances > 1.            if ( target.getPosition() == null ||                 entity.getPosition().distance(target.getPosition()) > 1 ) {                continue;            }            canHit |= canPhysicalTarget(game, entity.getId(), target);        }        // If there are no valid Entity targets, check for add valid buildings.        Enumeration bldgs = game.board.getBuildings();        while ( !canHit && bldgs.hasMoreElements() ) {            final Building bldg = (Building) bldgs.nextElement();            // Walk through the hexes of the building.            Enumeration hexes = bldg.getCoords();            while ( !canHit && hexes.hasMoreElements() ) {                final Coords coords = (Coords) hexes.nextElement();                // No physical attack works at distances > 1.                if ( entity.getPosition().distance(coords) > 1 ) {                    continue;                }                // Can the entity target *this* hex of the building?                final BuildingTarget target = new BuildingTarget( coords,                                                                  game.board,                                                                  false );                canHit |= canPhysicalTarget(game, entity.getId(), target);            } // Check the next hex of the building        } // Check the next building        return canHit;    }