if (pathCopy.hasActiveMASC()) { msg.append("\n\t\tMASC "); int target = pathCopy.getEntity().getMASCTarget();
/** * This function cheks for masc failure. * * @param md the movement path. * @param vDesc the description off the masc failure. used as output. * @param vCriticals contains tuple of intiger and critical slot. used as output. * @return true if there was a masc failure. */ public boolean checkForMASCFailure(MovePath md, Vector<Report> vDesc, HashMap<Integer, List<CriticalSlot>> vCriticals) { if (md.hasActiveMASC()) { boolean bFailure = false; // If usedMASC is already set, then we've already checked MASC // this turn. If we succeded before, return false. // If we failed before, the MASC was destroyed, and we wouldn't // have gotten here (hasActiveMASC would return false) if (!usedMASC) { Mounted masc = getMASC(); Mounted superCharger = getSuperCharger(); bFailure = doMASCCheckFor(masc, vDesc, vCriticals); boolean bSuperChargeFailure = doMASCCheckFor(superCharger, vDesc, vCriticals); usedMASC = true; return bFailure || bSuperChargeFailure; } } return false; }
Mockito.when(mockPath.hasActiveMASC()).thenReturn(false); Mockito.when(mockPath.clone()).thenReturn(mockPath); Mockito.when(mockPath.getEntity()).thenReturn(mockMech); Mockito.when(mockPath.hasActiveMASC()).thenReturn(true); expected = 0.346; actual = testRanker.getMovePathSuccessProbability(mockPath, new StringBuilder());
if (cmd.hasActiveMASC() && GUIPreferences.getInstance().getNagForMASC()) {