&& munition.getMunitionType() == AmmoType.M_ANTI_TSM)
&& (munition.getMunitionType() == AmmoType.M_ANTI_TSM || munition.getMunitionType() == AmmoType.M_DEAD_FIRE || munition.getMunitionType() == AmmoType.M_FOLLOW_THE_LEADER || munition.getMunitionType() == AmmoType.M_HEAT_SEEKING || munition.getMunitionType() == AmmoType.M_TANDEM_CHARGE))
        public AmmoType createMunitionType( AmmoType base ) {            StringBuffer nameBuf;            int index;            // Create an uninitialized munition object.            AmmoType munition = new AmmoType();            // Manipulate the base round's names, depending on ammoType.            switch ( base.ammoType ) {            case AmmoType.T_AC:            case AmmoType.T_LAC:                // Add the munition name to the beginning of the display name.                nameBuf = new StringBuffer( this.name );                nameBuf.append( " " );                nameBuf.append( base.name );                munition.name = nameBuf.toString();                // Add the munition name to the end of the TDB ammo name.                nameBuf = new StringBuffer( " - " );                nameBuf.append( this.name );                munition.addToEnd(base, " - " + this.name);                                // The munition name appears in the middle of the other names.                nameBuf = new StringBuffer( base.internalName );                index = base.internalName.lastIndexOf( "Ammo" );                nameBuf.insert( index, ' ' );                nameBuf.insert( index, this.name );                munition.setInternalName(nameBuf.toString());                munition.addBeforeString(base, "Ammo", this.name + " ");                nameBuf = null;                break;            case AmmoType.T_ARROW_IV:                // The munition name appears in the middle of all names.                nameBuf = new StringBuffer( base.name );                index = base.name.lastIndexOf( "Ammo" );                nameBuf.insert( index, ' ' );                // Do special processing for munition names ending in "IV".                //  Note: this does not work for The Drawing Board                if ( this.name.endsWith("-IV") ) {                    StringBuffer tempName = new StringBuffer(this.name);                    tempName.setLength(tempName.length() - 3);                    nameBuf.insert( index, tempName.toString() );                } else {                    nameBuf.insert( index, this.name );                }                munition.name = nameBuf.toString();                nameBuf = new StringBuffer( base.internalName );                index = base.internalName.lastIndexOf( "Ammo" );                nameBuf.insert( index, this.name );                munition.setInternalName(nameBuf.toString());                munition.addBeforeString(base, "Ammo", this.name + " ");                munition.addToEnd(base, " - " + this.name);                if (this.name.equals("Homing"))                    munition.addToEnd(base, " (HO)"); //mep                nameBuf = null;                break;            case AmmoType.T_SRM:                // Add the munition name to the end of some of the ammo names.                nameBuf = new StringBuffer( " " );                nameBuf.append( this.name );                munition.setInternalName(base.internalName + nameBuf.toString());                munition.addToEnd(base, nameBuf.toString());                nameBuf.insert( 0, " -" );                munition.addToEnd(base, nameBuf.toString());                // The munition name appears in the middle of the other names.                nameBuf = new StringBuffer( base.name );                index = base.name.lastIndexOf( "Ammo" );                nameBuf.insert( index, ' ' );                nameBuf.insert( index, this.name );                munition.name = nameBuf.toString();                nameBuf = null;                munition.addBeforeString(base, "Ammo", this.name + " ");                break;            case AmmoType.T_MRM:            case AmmoType.T_LRM:            case AmmoType.T_MML:                // Add the munition name to the beginning of the display name.                nameBuf = new StringBuffer( this.name );                nameBuf.append( " " );                nameBuf.append( base.name );                munition.name = nameBuf.toString();                // Add the munition name to the end of some of the ammo names.                nameBuf = new StringBuffer( " " );                nameBuf.append( this.name );                munition.setInternalName(base.internalName + nameBuf.toString());                munition.addToEnd(base, nameBuf.toString());                nameBuf.insert( 0, " -" );                munition.addToEnd(base, nameBuf.toString());                break;            case AmmoType.T_LONG_TOM:            case AmmoType.T_SNIPER:            case AmmoType.T_THUMPER:                // Add the munition name to the beginning of the display name.                nameBuf = new StringBuffer( this.name );                nameBuf.append( " " );                nameBuf.append( base.name );                munition.name = nameBuf.toString();                munition.setInternalName( munition.name );                munition.addToEnd( base, munition.name );                // The munition name appears in the middle of the other names.                munition.addBeforeString(base, "Ammo", this.name + " ");                break;            default:                throw new IllegalArgumentException                    ( "Don't know how to create munitions for " +                      base.ammoType );            }            // Assign our munition type.            munition.munitionType = this.type;            // Make sure the tech level is now correct.            if (techLevel != TechConstants.T_TECH_UNKNOWN)                munition.techLevel = techLevel;            else                munition.techLevel = base.techLevel;            // Reduce base number of shots to reflect the munition's weight.            munition.shots = base.shots / this.weight;                        // check for cost            //TODO: ammo for weapons using artemis should cost double            double cost = base.cost;            if(munition.getAmmoType() == T_AC || munition.getAmmoType() == T_LAC) {                if (munition.getMunitionType() == AmmoType.M_ARMOR_PIERCING)                    cost *= 4;                if (munition.getMunitionType() == AmmoType.M_FLECHETTE)                    cost *= 1.5;                if (munition.getMunitionType() == AmmoType.M_INCENDIARY_AC)                    cost *= 2;                if (munition.getMunitionType() == AmmoType.M_PRECISION)                    cost *= 6;            }            if (((munition.getAmmoType() == AmmoType.T_LRM)                     || (munition.getAmmoType() == AmmoType.T_MML)                    || (munition.getAmmoType() == AmmoType.T_SRM))                    && munition.getMunitionType() == AmmoType.M_FRAGMENTATION)                cost *= 2;/*            if (munition.hasFlag(AmmoType.M_INCENDIARY_LRM))                cost *= 1.5;*/            if ((munition.getAmmoType() == AmmoType.T_SRM || (munition.getAmmoType() == AmmoType.T_MML))                    && munition.getMunitionType() == AmmoType.M_INFERNO)                cost = 13500;            if ((munition.getAmmoType() == AmmoType.T_LRM || (munition.getAmmoType() == AmmoType.T_MML))                    && munition.getMunitionType() == AmmoType.M_SEMIGUIDED)                cost *= 3;            if ((munition.getAmmoType() == AmmoType.T_LRM || (munition.getAmmoType() == AmmoType.T_MML))                    && munition.getMunitionType() == AmmoType.M_SWARM)                cost *= 2;            if ((munition.getAmmoType() == AmmoType.T_LRM || (munition.getAmmoType() == AmmoType.T_MML))                    && munition.getMunitionType() == AmmoType.M_SWARM_I)                cost *= 3;            if ((munition.getAmmoType() == AmmoType.T_LRM || (munition.getAmmoType() == AmmoType.T_MML))                    && munition.getMunitionType() == AmmoType.M_THUNDER)                cost *= 2;            if ((munition.getAmmoType() == AmmoType.T_LRM || (munition.getAmmoType() == AmmoType.T_MML))                    && munition.getMunitionType() == AmmoType.M_THUNDER_AUGMENTED)                cost *= 4;            if ((munition.getAmmoType() == AmmoType.T_LRM || (munition.getAmmoType() == AmmoType.T_MML))                    && munition.getMunitionType() == AmmoType.M_THUNDER_INFERNO)                cost *= 1;            if ((munition.getAmmoType() == AmmoType.T_LRM || (munition.getAmmoType() == AmmoType.T_MML))                    && munition.getMunitionType() == AmmoType.M_THUNDER_VIBRABOMB)                cost *= 2.5;            if ((munition.getAmmoType() == AmmoType.T_LRM || (munition.getAmmoType() == AmmoType.T_MML))                    && munition.getMunitionType() == AmmoType.M_THUNDER_ACTIVE)                cost *= 3;            if (munition.getMunitionType() == AmmoType.M_HOMING)                cost = 15000;            if (munition.getMunitionType() == AmmoType.M_FASCAM)                cost *= 1.5;            if (munition.getMunitionType() == AmmoType.M_INFERNO_IV)                cost *= 1;            if (munition.getMunitionType() == AmmoType.M_VIBRABOMB_IV)                cost *= 2;            // This is just a hack to make it expensive.            // We don't actually have a price for this.            if (munition.getMunitionType() == AmmoType.M_DAVY_CROCKETT_M)                cost *= 50;            if (((munition.getAmmoType() == AmmoType.T_LRM)|| (munition.getAmmoType() == AmmoType.T_MML) || (munition.getAmmoType() == AmmoType.T_SRM))                    && munition.getMunitionType() == AmmoType.M_NARC_CAPABLE)                cost *= 2;            if (((munition.getAmmoType() == AmmoType.T_LRM)|| (munition.getAmmoType() == AmmoType.T_MML) || (munition.getAmmoType() == AmmoType.T_SRM))                    && munition.getMunitionType() == AmmoType.M_ARTEMIS_CAPABLE)                cost *= 2;            if (((munition.getAmmoType() == AmmoType.T_LRM)|| (munition.getAmmoType() == AmmoType.T_MML) || (munition.getAmmoType() == AmmoType.T_SRM))                    && munition.getMunitionType() == AmmoType.M_LISTEN_KILL)                cost *= 1.1;            if (((munition.getAmmoType() == AmmoType.T_LRM)|| (munition.getAmmoType() == AmmoType.T_MML) || (munition.getAmmoType() == AmmoType.T_SRM))                    && munition.getMunitionType() == AmmoType.M_ANTI_TSM)                cost *= 2;            munition.cost = cost;                        // Copy over all other values.            munition.damagePerShot = base.damagePerShot;            munition.rackSize = base.rackSize;            munition.ammoType = base.ammoType;            munition.bv = base.bv;            munition.flags = base.flags;            munition.hittable = base.hittable;            munition.explosive = base.explosive;            munition.toHitModifier = base.toHitModifier;            // Return the new munition.            return munition;        }