if (hit.getLocation() == Mech.LOC_RLEG || hit.getLocation() == Mech.LOC_LLEG) { pilotRolls.addElement(new PilotingRollData(te.getId(), PilotingRollData.AUTOMATIC_FALL, "leg destroyed")); }
    private void destroyLocation(Entity en, int loc) {        // mark armor, internal as doomed        en.setArmor(Entity.ARMOR_DOOMED, loc, false);        en.setInternal(Entity.ARMOR_DOOMED, loc);        if (en.hasRearArmor(loc)) {            en.setArmor(Entity.ARMOR_DOOMED, loc, true);        }        // weapons destroyed        for (int i = 0; i < en.weapons.size(); i++) {            if (en.getWeapon(i).getLocation() == loc) {                en.getWeapon(i).setDestroyed(true);            }        }        // ammo destroyed        for (int i = 0; i < en.ammo.size(); i++) {            if (en.getAmmo(i).location == loc) {                en.getAmmo(i).exploded = true;            }        }        // all critical slots set as missing        for (int i = 0; i < en.getNumberOfCriticals(loc); i++) {            final CriticalSlot cs = en.getCritical(loc, i);            if (cs != null) {                cs.setMissing(true);            }        }        // dependent locations destroyed        if (en.getDependentLocation(loc) != Entity.LOC_NONE) {            destroyLocation(en, en.getDependentLocation(loc));        }                // also, if that was your leg, you fall        if (hit.getLocation() == Mech.LOC_RLEG || hit.getLocation() == Mech.LOC_LLEG) {            pilotRolls.addElement(new PilotingRollData(te.getId(),            PilotingRollData.AUTOMATIC_FALL, "leg destroyed"));        }    }