/* * (non-Javadoc) * * @see * megamek.common.weapons.WeaponHandler#specialResolution(java.util.Vector, * megamek.common.Entity, boolean) */ @Override protected boolean specialResolution(Vector<Report> vPhaseReport, Entity entityTarget) { boolean done = false; if (bMissed) { return done; } Report r = new Report(3700); int taserRoll = Compute.d6(2); r.add(taserRoll); r.newlines = 0; vPhaseReport.add(r); if (entityTarget.getWeight() > 100) { return done; } if (entityTarget instanceof BattleArmor) { r = new Report(3706); r.addDesc(entityTarget); // shut down for rest of scenario, so we actually kill it // TODO: fix for salvage purposes r.add(entityTarget.getLocationAbbr(hit)); vPhaseReport.add(r); entityTarget.destroyLocation(hit.getLocation()); // Check to see if the squad has been eliminated if (entityTarget.getTransferLocation(hit).getLocation() == Entity.LOC_DESTROYED) { vPhaseReport.addAll(server.destroyEntity(entityTarget, "all troopers eliminated", false)); } done = true; } else if (entityTarget instanceof Mech) { if (((Mech) entityTarget).isIndustrial()) { if (taserRoll >= 8) { r = new Report(3705); r.addDesc(entityTarget); r.add(4); entityTarget.taserShutdown(4, false); } else { // suffer +2 to piloting and gunnery for 4 rounds r = new Report(3710); r.addDesc(entityTarget); r.add(2); r.add(4); entityTarget.setTaserInterference(2, 4, true); } } else { if (taserRoll >= 11) { r = new Report(3705); r.addDesc(entityTarget); r.add(3); vPhaseReport.add(r); entityTarget.taserShutdown(3, false); } else { r = new Report(3710); r.addDesc(entityTarget); r.add(2); r.add(3); vPhaseReport.add(r); entityTarget.setTaserInterference(2, 3, true); } } } else if ((entityTarget instanceof Protomech) || (entityTarget instanceof Tank) || (entityTarget instanceof Aero)) { if (taserRoll >= 8) { r = new Report(3705); r.addDesc(entityTarget); r.add(4); vPhaseReport.add(r); entityTarget.taserShutdown(4, false); } else { r = new Report(3710); r.addDesc(entityTarget); r.add(2); r.add(4); vPhaseReport.add(r); entityTarget.setTaserInterference(2, 4, false); } } return done; }