1, M_HOMING ) );
1, M_HOMING, TechConstants.T_IS_LEVEL_2 ) );
    public static void initializeTypes() {        // Save copies of the SRM and LRM ammos to use to create munitions.        Vector srmAmmos = new Vector(11);        Vector clanSrmAmmos = new Vector();        Vector lrmAmmos = new Vector(26);        Vector clanLrmAmmos = new Vector();        Vector acAmmos  = new Vector(4);        Vector arrowAmmos = new Vector(4);        Vector artyAmmos = new Vector(6);        Vector munitions = new Vector();        Enumeration baseTypes = null;        Enumeration mutators = null;        AmmoType base = null;        MunitionMutator mutator = null;        // all level 1 ammo        EquipmentType.addType(createISVehicleFlamerAmmo());        EquipmentType.addType(createISMGAmmo());        EquipmentType.addType(createISMGAmmoHalf());        base = createISAC2Ammo();        acAmmos.addElement( base );        EquipmentType.addType( base );        base = createISAC5Ammo();        acAmmos.addElement( base );        EquipmentType.addType( base );        base = createISAC10Ammo();        acAmmos.addElement( base );        EquipmentType.addType( base );        base = createISAC20Ammo();        acAmmos.addElement( base );        EquipmentType.addType( base );        base = createISLRM5Ammo();        lrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createISLRM10Ammo();        lrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createISLRM15Ammo();        lrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createISLRM20Ammo();        lrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createISSRM2Ammo();        srmAmmos.addElement( base );        EquipmentType.addType( base );        base = createISSRM4Ammo();        srmAmmos.addElement( base );        EquipmentType.addType( base );        base = createISSRM6Ammo();        srmAmmos.addElement( base );        EquipmentType.addType( base );        // Start of Level2 Ammo        EquipmentType.addType(createISLB2XAmmo());        EquipmentType.addType(createISLB5XAmmo());        EquipmentType.addType(createISLB10XAmmo());        EquipmentType.addType(createISLB20XAmmo());        EquipmentType.addType(createISLB2XClusterAmmo());        EquipmentType.addType(createISLB5XClusterAmmo());        EquipmentType.addType(createISLB10XClusterAmmo());        EquipmentType.addType(createISLB20XClusterAmmo());        EquipmentType.addType(createISUltra2Ammo());        EquipmentType.addType(createISUltra5Ammo());        EquipmentType.addType(createISUltra10Ammo());        EquipmentType.addType(createISUltra20Ammo());        EquipmentType.addType(createISRotary2Ammo());        EquipmentType.addType(createISRotary5Ammo());        EquipmentType.addType(createISGaussAmmo());        EquipmentType.addType(createISLTGaussAmmo());        EquipmentType.addType(createISHVGaussAmmo());        EquipmentType.addType(createISStreakSRM2Ammo());        EquipmentType.addType(createISStreakSRM4Ammo());        EquipmentType.addType(createISStreakSRM6Ammo());        EquipmentType.addType(createISMRM10Ammo());        EquipmentType.addType(createISMRM20Ammo());        EquipmentType.addType(createISMRM30Ammo());        EquipmentType.addType(createISMRM40Ammo());        EquipmentType.addType(createISRL10Ammo());        EquipmentType.addType(createISRL15Ammo());        EquipmentType.addType(createISRL20Ammo());        EquipmentType.addType(createISAMSAmmo());        EquipmentType.addType(createISNarcAmmo());        EquipmentType.addType(createISNarcExplosiveAmmo());        EquipmentType.addType(createISiNarcAmmo());        EquipmentType.addType(createISiNarcECMAmmo());        EquipmentType.addType(createISiNarcExplosiveAmmo());        EquipmentType.addType(createISiNarcHaywireAmmo());        EquipmentType.addType(createISiNarcNemesisAmmo());        base = createISLongTomAmmo();        artyAmmos.addElement( base );        EquipmentType.addType( base );        base = createISSniperAmmo();        artyAmmos.addElement( base );        EquipmentType.addType( base );        base = createISThumperAmmo();        artyAmmos.addElement( base );        EquipmentType.addType( base );        base = createISArrowIVAmmo();        arrowAmmos.addElement( base );        EquipmentType.addType( base );        EquipmentType.addType(createCLLB2XAmmo());        EquipmentType.addType(createCLLB5XAmmo());        EquipmentType.addType(createCLLB10XAmmo());        EquipmentType.addType(createCLLB20XAmmo());        EquipmentType.addType(createCLLB2XClusterAmmo());        EquipmentType.addType(createCLLB5XClusterAmmo());        EquipmentType.addType(createCLLB10XClusterAmmo());        EquipmentType.addType(createCLLB20XClusterAmmo());        EquipmentType.addType(createCLUltra2Ammo());        EquipmentType.addType(createCLUltra5Ammo());        EquipmentType.addType(createCLUltra10Ammo());        EquipmentType.addType(createCLUltra20Ammo());        EquipmentType.addType(createCLRotary2Ammo());        EquipmentType.addType(createCLRotary5Ammo());        EquipmentType.addType(createCLRotary10Ammo());        EquipmentType.addType(createCLRotary20Ammo());        EquipmentType.addType(createCLGaussAmmo());        EquipmentType.addType(createCLStreakSRM1Ammo());        EquipmentType.addType(createCLStreakSRM2Ammo());        EquipmentType.addType(createCLStreakSRM3Ammo());        EquipmentType.addType(createCLStreakSRM4Ammo());        EquipmentType.addType(createCLStreakSRM5Ammo());        EquipmentType.addType(createCLStreakSRM6Ammo());        EquipmentType.addType(createCLVehicleFlamerAmmo());        EquipmentType.addType(createCLMGAmmo());        EquipmentType.addType(createCLMGAmmoHalf());        EquipmentType.addType(createCLHeavyMGAmmo());        EquipmentType.addType(createCLHeavyMGAmmoHalf());        EquipmentType.addType(createCLLightMGAmmo());        EquipmentType.addType(createCLLightMGAmmoHalf());        EquipmentType.addType(createCLAMSAmmo());        EquipmentType.addType(createCLNarcAmmo());        EquipmentType.addType(createCLNarcExplosiveAmmo());        EquipmentType.addType(createCLATM3Ammo());        EquipmentType.addType(createCLATM3ERAmmo());        EquipmentType.addType(createCLATM3HEAmmo());        EquipmentType.addType(createCLATM6Ammo());        EquipmentType.addType(createCLATM6ERAmmo());        EquipmentType.addType(createCLATM6HEAmmo());        EquipmentType.addType(createCLATM9Ammo());        EquipmentType.addType(createCLATM9ERAmmo());        EquipmentType.addType(createCLATM9HEAmmo());        EquipmentType.addType(createCLATM12Ammo());        EquipmentType.addType(createCLATM12ERAmmo());        EquipmentType.addType(createCLATM12HEAmmo());        EquipmentType.addType(createCLStreakLRM5Ammo());        EquipmentType.addType(createCLStreakLRM10Ammo());        EquipmentType.addType(createCLStreakLRM15Ammo());        EquipmentType.addType(createCLStreakLRM20Ammo());        base = createCLLongTomAmmo();        artyAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLSniperAmmo();        artyAmmos.addElement( base );        base = createCLThumperAmmo();        EquipmentType.addType( base );        artyAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLArrowIVAmmo();        arrowAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLSRM1Ammo();        clanSrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLSRM2Ammo();        clanSrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLSRM3Ammo();        clanSrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLSRM4Ammo();        clanSrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLSRM5Ammo();        clanSrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLSRM6Ammo();        clanSrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM1Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM2Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM3Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM4Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM5Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM6Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM7Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM8Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM9Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM10Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM11Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM12Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM13Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM14Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM15Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM16Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM17Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM18Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM19Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        base = createCLLRM20Ammo();        clanLrmAmmos.addElement( base );        EquipmentType.addType( base );        // Start of BattleArmor ammo        EquipmentType.addType( createBASRM2Ammo() );        EquipmentType.addType( createBASRM2OSAmmo() );        EquipmentType.addType( createBAInfernoSRMAmmo() );        EquipmentType.addType( createBAAdvancedSRM2Ammo() );        EquipmentType.addType( createBAAdvancedSRM5Ammo() );        EquipmentType.addType( createBAMicroBombAmmo() );        EquipmentType.addType( createCLTorpedoLRM5Ammo() );        EquipmentType.addType( createFenrirSRM4Ammo() );        EquipmentType.addType( createBACompactNarcAmmo() );        EquipmentType.addType( createBAMineLauncherAmmo() );        EquipmentType.addType( createBALRM5Ammo() );        EquipmentType.addType( createPhalanxSRM4Ammo() );        EquipmentType.addType( createGrenadierSRM4Ammo() );        // Protomech-specific ammo        EquipmentType.addType(createCLPROHeavyMGAmmo());        EquipmentType.addType(createCLPROMGAmmo());        EquipmentType.addType(createCLPROLightMGAmmo());        // Create the munition types for IS SRM launchers.        munitions.removeAllElements();        munitions.addElement( new MunitionMutator( "Inferno",                                                   1, M_INFERNO, TechConstants.T_IS_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Fragmentation",                                                   1, M_FRAGMENTATION, TechConstants.T_IS_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Narc capable",                                                   1, M_NARC_CAPABLE, TechConstants.T_IS_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Listen-Kill",                                                   1, M_LISTEN_KILL, TechConstants.T_IS_LEVEL_3 ) );        munitions.addElement( new MunitionMutator( "Anti-TSM",                                                   1, M_ANTI_TSM, TechConstants.T_IS_LEVEL_3 ) );        munitions.addElement( new MunitionMutator( "Acid",                                                   1, M_AX_HEAD, TechConstants.T_IS_LEVEL_3 ) );        // Walk through both the base types and the        // mutators, and create munition types.        baseTypes = srmAmmos.elements();        while ( baseTypes.hasMoreElements() ) {            base = (AmmoType) baseTypes.nextElement();            mutators = munitions.elements();            while ( mutators.hasMoreElements() ) {                mutator =  (MunitionMutator) mutators.nextElement();                EquipmentType.addType( mutator.createMunitionType( base ) );            }        }        // Create the munition types for Clan SRM launchers.        munitions.removeAllElements();        munitions.addElement( new MunitionMutator( "Inferno",                                                   1, M_INFERNO, TechConstants.T_CLAN_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Fragmentation",                                                   1, M_FRAGMENTATION, TechConstants.T_CLAN_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Narc capable",                                                   1, M_NARC_CAPABLE, TechConstants.T_CLAN_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Listen-Kill",                                                   1, M_LISTEN_KILL, TechConstants.T_CLAN_LEVEL_3 ) );        munitions.addElement( new MunitionMutator( "Anti-TSM",                                                   1, M_ANTI_TSM, TechConstants.T_CLAN_LEVEL_3 ) );        munitions.addElement( new MunitionMutator( "Acid",                                                   1, M_AX_HEAD, TechConstants.T_CLAN_LEVEL_3 ) );        // Walk through both the base types and the        // mutators, and create munition types.        baseTypes = clanSrmAmmos.elements();        while ( baseTypes.hasMoreElements() ) {            base = (AmmoType) baseTypes.nextElement();            mutators = munitions.elements();            while ( mutators.hasMoreElements() ) {                mutator =  (MunitionMutator) mutators.nextElement();                EquipmentType.addType( mutator.createMunitionType( base ) );            }        }        // Create the munition types for IS LRM launchers.        munitions.removeAllElements();        munitions.addElement( new MunitionMutator( "Fragmentation",                                                   1, M_FRAGMENTATION, TechConstants.T_IS_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Thunder",                                                   1, M_THUNDER, TechConstants.T_IS_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Thunder-Augmented",                                                   2, M_THUNDER_AUGMENTED, TechConstants.T_IS_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Thunder-Inferno",                                                   2, M_THUNDER_INFERNO, TechConstants.T_IS_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Thunder-Active",                                                   2, M_THUNDER_ACTIVE, TechConstants.T_IS_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Thunder-Vibrabomb",                                                   2, M_THUNDER_VIBRABOMB, TechConstants.T_IS_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Narc capable",                                                   1, M_NARC_CAPABLE, TechConstants.T_IS_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Swarm",                                                   1, M_SWARM, TechConstants.T_IS_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Swarm-I",                                                   1, M_SWARM_I, TechConstants.T_IS_LEVEL_2) );        munitions.addElement( new MunitionMutator( "Listen-Kill",                                                   1, M_LISTEN_KILL, TechConstants.T_IS_LEVEL_3 ) );        munitions.addElement( new MunitionMutator( "Anti-TSM",                                                   1, M_ANTI_TSM, TechConstants.T_IS_LEVEL_3 ) );        // Walk through both the base types and the        // mutators, and create munition types.        baseTypes = lrmAmmos.elements();        while ( baseTypes.hasMoreElements() ) {            base = (AmmoType) baseTypes.nextElement();            mutators = munitions.elements();            while ( mutators.hasMoreElements() ) {                mutator =  (MunitionMutator) mutators.nextElement();                EquipmentType.addType( mutator.createMunitionType( base ) );            }        }        // Create the munition types for Clan LRM launchers.        munitions.removeAllElements();        munitions.addElement( new MunitionMutator( "Fragmentation",                                                   1, M_FRAGMENTATION, TechConstants.T_CLAN_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Thunder",                                                   1, M_THUNDER, TechConstants.T_CLAN_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Thunder-Augmented",                                                   2, M_THUNDER_AUGMENTED, TechConstants.T_CLAN_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Thunder-Inferno",                                                   2, M_THUNDER_INFERNO, TechConstants.T_CLAN_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Thunder-Active",                                                   2, M_THUNDER_ACTIVE, TechConstants.T_CLAN_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Thunder-Vibrabomb",                                                   2, M_THUNDER_VIBRABOMB, TechConstants.T_CLAN_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Narc capable",                                                   1, M_NARC_CAPABLE, TechConstants.T_CLAN_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Swarm",                                                   1, M_SWARM, TechConstants.T_CLAN_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Swarm-I",                                                   1, M_SWARM_I, TechConstants.T_CLAN_LEVEL_2) );        munitions.addElement( new MunitionMutator( "Listen-Kill",                                                   1, M_LISTEN_KILL, TechConstants.T_CLAN_LEVEL_3 ) );        munitions.addElement( new MunitionMutator( "Anti-TSM",                                                   1, M_ANTI_TSM, TechConstants.T_CLAN_LEVEL_3 ) );        // Walk through both the base types and the        // mutators, and create munition types.        baseTypes = clanLrmAmmos.elements();        while ( baseTypes.hasMoreElements() ) {            base = (AmmoType) baseTypes.nextElement();            mutators = munitions.elements();            while ( mutators.hasMoreElements() ) {                mutator =  (MunitionMutator) mutators.nextElement();                EquipmentType.addType( mutator.createMunitionType( base ) );            }        }        // Create the munition types for AC rounds.        munitions.removeAllElements();        munitions.addElement( new MunitionMutator( "Precision",                                                   2, M_PRECISION, TechConstants.T_IS_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Armor-Piercing",                                                   2, M_ARMOR_PIERCING, TechConstants.T_IS_LEVEL_2 ) );        munitions.addElement( new MunitionMutator( "Flechette",                                                   1, M_FLECHETTE, TechConstants.T_IS_LEVEL_2 ) );        // Walk through both the base types and the        // mutators, and create munition types.        baseTypes = acAmmos.elements();        while ( baseTypes.hasMoreElements() ) {            base = (AmmoType) baseTypes.nextElement();            mutators = munitions.elements();            while ( mutators.hasMoreElements() ) {                mutator =  (MunitionMutator) mutators.nextElement();                EquipmentType.addType( mutator.createMunitionType( base ) );            }        }        // Create the munition types for Arrow IV launchers.        munitions.removeAllElements();        munitions.addElement( new MunitionMutator( "Homing",                                                   1, M_HOMING ) );        munitions.addElement( new MunitionMutator( "FASCAM",                                                   1, M_FASCAM ) );        munitions.addElement( new MunitionMutator( "Inferno-IV",                                                   1, M_INFERNO_IV ) );        munitions.addElement( new MunitionMutator( "Vibrabomb-IV",                                                   1, M_VIBRABOMB_IV ) );        // Walk through both the base types and the        // mutators, and create munition types.        baseTypes = arrowAmmos.elements();        while ( baseTypes.hasMoreElements() ) {            base = (AmmoType) baseTypes.nextElement();            mutators = munitions.elements();            while ( mutators.hasMoreElements() ) {                mutator =  (MunitionMutator) mutators.nextElement();                EquipmentType.addType( mutator.createMunitionType( base ) );            }        }        // Create the munition types for Artillery launchers.        munitions.removeAllElements();        munitions.addElement( new MunitionMutator( "Smoke",                                                   1, M_SMOKE ) );        // Walk through both the base types and the        // mutators, and create munition types.        baseTypes = artyAmmos.elements();        while ( baseTypes.hasMoreElements() ) {            base = (AmmoType) baseTypes.nextElement();            mutators = munitions.elements();            while ( mutators.hasMoreElements() ) {                mutator =  (MunitionMutator) mutators.nextElement();                EquipmentType.addType( mutator.createMunitionType( base ) );            }        }        // cache types that share a launcher for loadout purposes        for (Enumeration e = EquipmentType.getAllTypes(); e.hasMoreElements(); ) {            EquipmentType et = (EquipmentType)e.nextElement();            if (! (et instanceof AmmoType)) {                continue;            }            AmmoType at = (AmmoType)et;            int nType = at.getAmmoType();            if (m_vaMunitions[nType] == null) {                m_vaMunitions[nType] = new Vector();            }            m_vaMunitions[nType].addElement(at);        }    }