for (Enumeration i = getEntity().getWeapons(); i.hasMoreElements(); ) { Mounted mo = (Mounted)i.nextElement();
for (Mounted mo : getEntity().getWeaponList()) {
    public int calcMiscCrits(MiscType mt) {        if (mt.hasFlag(MiscType.F_CLUB)                && (mt.hasSubType(MiscType.S_HATCHET)                || mt.hasSubType(MiscType.S_SWORD)                || mt.hasSubType(MiscType.S_MACE_THB))) {            return (int) Math.ceil(getWeight() / 15.0);        } else if (mt.hasFlag(MiscType.F_CLUB)                && mt.hasSubType(MiscType.S_MACE)) {            return (int) Math.ceil(getWeight() / 10.0);        } else if (mt.hasFlag(MiscType.F_CLUB)                && mt.hasSubType(MiscType.S_PILE_DRIVER)) {            return 8;        } else if (mt.hasFlag(MiscType.F_CLUB)                && mt.hasSubType(MiscType.S_CHAINSAW)) {            return 5;        } else if (mt.hasFlag(MiscType.F_CLUB)                && mt.hasSubType(MiscType.S_DUAL_SAW)) {            return 7;        } else if (mt.hasFlag(MiscType.F_CLUB)                && mt.hasSubType(MiscType.S_BACKHOE)) {            return 6;        } else if (mt.hasFlag(MiscType.F_MASC)) {            if (mt.getInternalName().equals("ISMASC"))                return Math.round(getWeight() / 20.0f);            else if (mt.getInternalName().equals("CLMASC"))                return Math.round(getWeight() / 25.0f);        } else if (mt.hasFlag(MiscType.F_TARGCOMP))        {            float fTons = 0.0f;            for (Enumeration i = getEntity().getWeapons(); i.hasMoreElements(); )            {                 Mounted mo = (Mounted)i.nextElement();                 WeaponType wt = (WeaponType)mo.getType();                 if (wt.hasFlag(WeaponType.F_DIRECT_FIRE))                     fTons += wt.getTonnage(getEntity());            }            float weight = 0.0f;            if (mt.getInternalName().equals("ISTargeting Computer"))                weight = ceil(fTons / 4.0f, getWeightCeilingTargComp());            else if (mt.getInternalName().equals("CLTargeting Computer"))                weight = ceil(fTons / 5.0f, getWeightCeilingTargComp());            switch(getTargCompCrits())            {                case CEIL_TARGCOMP_CRITS:                    return (int) Math.ceil(weight);                case ROUND_TARGCOMP_CRITS:                    return Math.round(weight);                case FLOOR_TARGCOMP_CRITS:                    return (int) Math.floor(weight);            }        } else if ( EquipmentType.getArmorTypeName(EquipmentType.T_ARMOR_FERRO_FIBROUS).equals(mt.getInternalName()) ) {            if ( isClanArmor() )                return 7;            else                return 14;        } else if ( EquipmentType.getArmorTypeName(EquipmentType.T_ARMOR_FERRO_FIBROUS_PROTO).equals(mt.getInternalName()) ) {            return 16;        } else if ( EquipmentType.getArmorTypeName(EquipmentType.T_ARMOR_LIGHT_FERRO).equals(mt.getInternalName()) ) {            return 7;        } else if ( EquipmentType.getArmorTypeName(EquipmentType.T_ARMOR_HEAVY_FERRO).equals(mt.getInternalName()) ) {            return 21;        } else if ( EquipmentType.getStructureTypeName(EquipmentType.T_STRUCTURE_ENDO_STEEL).equals(mt.getInternalName()) )        {            if ( isClan() )                return 7;            else                return 14;        } else if ( EquipmentType.getStructureTypeName(EquipmentType.T_STRUCTURE_ENDO_PROTOTYPE).equals(mt.getInternalName()) )        {            return 16;        }        return mt.getCriticals(getEntity());    }