diff --git a/megamek/src/megamek/common/weapons/ACCaselessHandler.java b/megamek/src/megamek/common/weapons/ACCaselessHandler.java index db4314f7acb..b791f422f94 100644 --- a/megamek/src/megamek/common/weapons/ACCaselessHandler.java +++ b/megamek/src/megamek/common/weapons/ACCaselessHandler.java @@ -48,7 +48,7 @@ protected boolean doChecks(Vector vPhaseReport) { return true; } - if ((roll.getIntValue() <= 2) && !(ae instanceof Infantry)) { + if ((roll.getIntValue() <= 2) && !ae.isConventionalInfantry()) { Roll diceRoll = Compute.rollD6(2); Report r = new Report(3164); diff --git a/megamek/src/megamek/common/weapons/AmmoWeaponHandler.java b/megamek/src/megamek/common/weapons/AmmoWeaponHandler.java index 0db62e8e8f4..2b89ee47d18 100644 --- a/megamek/src/megamek/common/weapons/AmmoWeaponHandler.java +++ b/megamek/src/megamek/common/weapons/AmmoWeaponHandler.java @@ -112,8 +112,8 @@ protected boolean doAmmoFeedProblemCheck(Vector vPhaseReport) { // don't have neg ammo feed problem quirk if (!weapon.hasQuirk(OptionsConstants.QUIRK_WEAP_NEG_AMMO_FEED_PROBLEMS)) { return false; - // attack roll was a 2, may explode } else if ((roll.getIntValue() <= 2) && !ae.isConventionalInfantry()) { + // attack roll was a 2, may explode Roll diceRoll = Compute.rollD6(2); Report r = new Report(3173); @@ -142,8 +142,8 @@ protected boolean doAmmoFeedProblemCheck(Vector vPhaseReport) { vPhaseReport.addElement(r); return false; } - // attack roll was not 2, won't explode } else { + // attack roll was not 2, won't explode return false; } diff --git a/megamek/src/megamek/common/weapons/PrototypeCLUltraWeaponHandler.java b/megamek/src/megamek/common/weapons/PrototypeCLUltraWeaponHandler.java index 68e7b262663..f19fc27e1fa 100644 --- a/megamek/src/megamek/common/weapons/PrototypeCLUltraWeaponHandler.java +++ b/megamek/src/megamek/common/weapons/PrototypeCLUltraWeaponHandler.java @@ -46,8 +46,7 @@ public PrototypeCLUltraWeaponHandler(ToHitData t, WeaponAttackAction w, Game g, protected boolean doChecks(Vector vPhaseReport) { if (doAmmoFeedProblemCheck(vPhaseReport)) { return true; - } - if (ae.isConventionalInfantry()) { + } else if (ae.isConventionalInfantry()) { return false; } diff --git a/megamek/src/megamek/common/weapons/RACHandler.java b/megamek/src/megamek/common/weapons/RACHandler.java index a484bedfb5e..d53ea81d73d 100644 --- a/megamek/src/megamek/common/weapons/RACHandler.java +++ b/megamek/src/megamek/common/weapons/RACHandler.java @@ -49,9 +49,7 @@ public RACHandler(ToHitData t, WeaponAttackAction w, Game g, TWGameManager m) { protected boolean doChecks(Vector vPhaseReport) { if (doAmmoFeedProblemCheck(vPhaseReport)) { return true; - } - - if (ae instanceof Infantry) { + } else if (ae.isConventionalInfantry()) { return false; } boolean jams = false; diff --git a/megamek/src/megamek/common/weapons/UltraWeaponHandler.java b/megamek/src/megamek/common/weapons/UltraWeaponHandler.java index f755b3ec82f..56b9a973d0d 100644 --- a/megamek/src/megamek/common/weapons/UltraWeaponHandler.java +++ b/megamek/src/megamek/common/weapons/UltraWeaponHandler.java @@ -155,7 +155,7 @@ protected boolean doChecks(Vector vPhaseReport) { return true; } - if ((roll.getIntValue() == 2) && (howManyShots == 2) && !(ae instanceof Infantry)) { + if ((roll.getIntValue() == 2) && (howManyShots == 2) && !ae.isConventionalInfantry()) { Report r = new Report(); r.subject = subjectId; weapon.setJammed(true);