nMASCLevel++;  int nRoll = Compute.d6(2);  phaseReport.append("\n" + getDisplayName() + " checking for MASC failure.\n"); phaseReport.append("Needs " + (MASC_FAILURE[nMASCLevel] + 1) + ", rolls " + nRoll + " : ");
if (!usedMASC) {  int nRoll = Compute.d6(2);  usedMASC = true; phaseReport.append("\n" + getDisplayName() + " checking for MASC failure.\n"); phaseReport.append("Needs " + (MASC_FAILURE[nMASCLevel] + 1) + ", rolls " + nRoll + " : ");
    public boolean checkForMASCFailure(StringBuffer phaseReport)    {                if (hasActiveMASC()) {            boolean bFailure = false;                        // iterate before checking            nMASCLevel++;                        int nRoll = Compute.d6(2);                        phaseReport.append("\n" + getDisplayName() +                   " checking for MASC failure.\n");                   phaseReport.append("Needs " + (MASC_FAILURE[nMASCLevel] + 1) +                    ", rolls " + nRoll + " : ");                                    if (nRoll <= MASC_FAILURE[nMASCLevel]) {                // uh oh                bFailure = true;                phaseReport.append("MASC fails!.\n");                                // do the damage.  Rules say 'as if you took 2 hip crits'. We'll                // just do the hip crits                getCritical(LOC_RLEG, 0).setDestroyed(true);                getCritical(LOC_LLEG, 0).setDestroyed(true);                for (Enumeration e = getEquipment(); e.hasMoreElements(); ) {                    Mounted m = (Mounted)e.nextElement();                    if (m.getType().hasFlag(MiscType.F_MASC)) {                        m.setDestroyed(true);                    }                }                            }            else {                phaseReport.append("succeeds.\n");            }                        // also iterate after checking, to make up for the decrement that all             // mechs have at the end of the turn            nMASCLevel++;            return bFailure;        }        return false;    }