@Override public void destroyLocation(int loc, boolean blownOff) { // If it's already destroyed, don't bother -- as of 12/06/28, super. // destroyLocation() will just return having done nothing itself and // then we'd potentially end up with a second PSR for an // already-destroyed // leg. if (getInternal(loc) < 0) { return; } super.destroyLocation(loc, blownOff); // if it's a leg, the entity falls if (locationIsLeg(loc) && canFall()) { game.addPSR(new PilotingRollData(getId(), TargetRoll.AUTOMATIC_FAIL, 5, "leg destroyed")); } }
@Override protected boolean doChecks(Vector<Report> vPhaseReport) { if ((ae.mpUsed > 0) && (ae instanceof Mech) && ae.canFall() // Only check up to assault class, superheavies do not roll. && ae.getWeightClass() <= EntityWeightClass.WEIGHT_ASSAULT) { // Modifier is weight-based. int nMod; if (ae.getWeightClass() <= EntityWeightClass.WEIGHT_LIGHT) { nMod = 2; } else if (ae.getWeightClass() <= EntityWeightClass.WEIGHT_MEDIUM) { nMod = 1; } else if (ae.getWeightClass() <= EntityWeightClass.WEIGHT_HEAVY) { nMod = 0; } else { nMod = -1; } PilotingRollData psr = new PilotingRollData(ae.getId(), nMod, "fired HeavyGauss unbraced", false); game.addPSR(psr); } return false; } }