if (wtype.getDamage() == WeaponType.DAMAGE_MISSILE) {
if (wtype.getDamage() == WeaponType.DAMAGE_MISSILE || (ammo != null && atype.hasFlag(AmmoType.F_CLUSTER))) {
    private void resolveWeaponAttack(WeaponAttackAction waa, int lastEntityId) {        final Entity ae = game.getEntity(waa.getEntityId());        final Entity te = game.getEntity(waa.getTargetId());        final Mounted weapon = ae.getEquipment(waa.getWeaponId());        final WeaponType wtype = (WeaponType)weapon.getType();        final boolean usesAmmo = wtype.getAmmoType() != AmmoType.T_NA;        Mounted ammo = usesAmmo ? weapon.getLinked() : null;        final AmmoType atype = ammo == null ? null : (AmmoType)ammo.getType();        if (lastEntityId != waa.getEntityId()) {            phaseReport.append("\nWeapons fire for " + ae.getDisplayName() + "\n");        }        phaseReport.append("    " + wtype.getName() + " at " + te.getDisplayName());                // has this weapon fired already?        if (weapon.isUsedThisRound()) {            phaseReport.append(" but the weapon has already fired this round!\n");            return;        }        // is the weapon functional?        if (weapon.isDestroyed()) {            phaseReport.append(" but the weapon has been destroyed in a previous round!\n");            return;        }        // try reloading        if (usesAmmo && ammo != null && ammo.getShotsLeft() == 0) {            ae.loadWeapon(weapon);            ammo = weapon.getLinked();        }        // should we even bother?        if (te.isDestroyed() || te.isDoomed() || te.crew.isDead()) {            phaseReport.append(" but the target is already destroyed!\n");            return;        }                // compute to-hit        ToHitData toHit = Compute.toHitWeapon(game, waa, attacks);        if (toHit.getValue() == ToHitData.IMPOSSIBLE) {            phaseReport.append(", but the shot is impossible (" + toHit.getDesc() + ")\n");            return;        } else if (toHit.getValue() == ToHitData.AUTOMATIC_FAIL) {            phaseReport.append(", the shot is an automatic miss (" + toHit.getDesc() + "), ");        } else {            phaseReport.append("; needs " + toHit.getValue() + ", ");        }                // build up some heat        ae.heatBuildup += wtype.getHeat();        // set the weapon as having fired        weapon.setUsedThisRound(true);                // use up ammo (if weapon is out of ammo, we shouldn't be here)        if (usesAmmo) {            ammo.setShotsLeft(ammo.getShotsLeft() - 1);        }        // roll        int roll = Compute.d6(2);        phaseReport.append("rolls " + roll + " : ");        // do we hit?        if (roll < toHit.getValue()) {            // miss            phaseReport.append("misses.\n");            return;        }        // are we attacks normal weapons or missiles?        if (wtype.getDamage() == WeaponType.DAMAGE_MISSILE) {            // missiles; determine number of missiles hitting            int hits = Compute.missilesHit(wtype.getRackSize());            phaseReport.append(hits + " missiles hit" + toHit.getTableDesc() + ".");            if (wtype.getAmmoType() == AmmoType.T_SRM) {                // for SRMs, do each missile seperately                for (int j = 0; j < hits; j++) {                    HitData hit = te.rollHitLocation(toHit.getHitTable(), toHit.getSideTable());                    phaseReport.append(damageEntity(te, hit, 2));                }            } else if (wtype.getAmmoType() == AmmoType.T_LRM) {                // LRMs, do salvos of 5                while (hits > 0) {                    int salvo = Math.min(5, hits);                    HitData hit = te.rollHitLocation(toHit.getHitTable(), toHit.getSideTable());                    phaseReport.append(damageEntity(te, hit, salvo));                    hits -= salvo;                }            }        } else if (wtype.hasFlag(WeaponType.F_FLAMER) && game.getOptions().booleanOption("flamer_heat")) {             phaseReport.append("hits; target gains 2 more heat during heat phase.");             te.heatBuildup += 2;        } else {            // normal weapon; deal damage            HitData hit = te.rollHitLocation(toHit.getHitTable(), toHit.getSideTable());            phaseReport.append("hits" + toHit.getTableDesc() + " " + te.getLocationAbbr(hit));            phaseReport.append(damageEntity(te, hit, wtype.getDamage()));        }        phaseReport.append("\n");    }