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 eeebc23ae34..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; + } else if ((roll.getIntValue() <= 2) && !ae.isConventionalInfantry()) { // attack roll was a 2, may explode - } else if (roll.getIntValue() <= 2) { 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/HVACWeaponHandler.java b/megamek/src/megamek/common/weapons/HVACWeaponHandler.java index 45383ce3c43..84dc7b927a7 100644 --- a/megamek/src/megamek/common/weapons/HVACWeaponHandler.java +++ b/megamek/src/megamek/common/weapons/HVACWeaponHandler.java @@ -91,7 +91,7 @@ protected boolean doChecks(Vector vPhaseReport) { return true; } - if (roll.getIntValue() == 2) { + if ((roll.getIntValue() == 2) && !ae.isConventionalInfantry()) { Report r = new Report(3162); r.subject = subjectId; weapon.setJammed(true); diff --git a/megamek/src/megamek/common/weapons/PrimitiveACWeaponHandler.java b/megamek/src/megamek/common/weapons/PrimitiveACWeaponHandler.java index 1a27128453b..78507b95922 100644 --- a/megamek/src/megamek/common/weapons/PrimitiveACWeaponHandler.java +++ b/megamek/src/megamek/common/weapons/PrimitiveACWeaponHandler.java @@ -43,7 +43,7 @@ protected boolean doChecks(Vector vPhaseReport) { return true; } - if (roll.getIntValue() == 2) { + if ((roll.getIntValue() == 2) && !ae.isConventionalInfantry()) { Report r = new Report(3161); r.subject = subjectId; r.newlines = 0; diff --git a/megamek/src/megamek/common/weapons/PrototypeACWeaponHandler.java b/megamek/src/megamek/common/weapons/PrototypeACWeaponHandler.java index 1ad1058684a..d24390c1c3b 100644 --- a/megamek/src/megamek/common/weapons/PrototypeACWeaponHandler.java +++ b/megamek/src/megamek/common/weapons/PrototypeACWeaponHandler.java @@ -42,8 +42,8 @@ protected boolean doChecks(Vector vPhaseReport) { if (doAmmoFeedProblemCheck(vPhaseReport)) { return true; } - - if (roll.getIntValue() == 2) { + + if ((roll.getIntValue() == 2) && !ae.isConventionalInfantry()) { Report r = new Report(3165); r.subject = subjectId; weapon.setJammed(true); diff --git a/megamek/src/megamek/common/weapons/PrototypeCLUltraWeaponHandler.java b/megamek/src/megamek/common/weapons/PrototypeCLUltraWeaponHandler.java index 729617e28c1..f19fc27e1fa 100644 --- a/megamek/src/megamek/common/weapons/PrototypeCLUltraWeaponHandler.java +++ b/megamek/src/megamek/common/weapons/PrototypeCLUltraWeaponHandler.java @@ -46,6 +46,8 @@ public PrototypeCLUltraWeaponHandler(ToHitData t, WeaponAttackAction w, Game g, protected boolean doChecks(Vector vPhaseReport) { if (doAmmoFeedProblemCheck(vPhaseReport)) { return true; + } else if (ae.isConventionalInfantry()) { + return false; } if ((roll.getIntValue() <= 3) && (howManyShots == 2)) { diff --git a/megamek/src/megamek/common/weapons/PrototypeGaussHandler.java b/megamek/src/megamek/common/weapons/PrototypeGaussHandler.java index 329a1278eeb..69b98a970f5 100644 --- a/megamek/src/megamek/common/weapons/PrototypeGaussHandler.java +++ b/megamek/src/megamek/common/weapons/PrototypeGaussHandler.java @@ -53,8 +53,8 @@ protected boolean doChecks(Vector vPhaseReport) { if (doAmmoFeedProblemCheck(vPhaseReport)) { return true; } - - if (roll.getIntValue() == 2) { + + if ((roll.getIntValue() == 2) && !ae.isConventionalInfantry()) { Report r = new Report(3165); r.subject = subjectId; weapon.setJammed(true); diff --git a/megamek/src/megamek/common/weapons/PrototypeISUltraWeaponHandler.java b/megamek/src/megamek/common/weapons/PrototypeISUltraWeaponHandler.java index 0f58d2ee4ea..92ae4249cae 100644 --- a/megamek/src/megamek/common/weapons/PrototypeISUltraWeaponHandler.java +++ b/megamek/src/megamek/common/weapons/PrototypeISUltraWeaponHandler.java @@ -47,6 +47,8 @@ public PrototypeISUltraWeaponHandler(ToHitData t, WeaponAttackAction w, Game g, protected boolean doChecks(Vector vPhaseReport) { if (doAmmoFeedProblemCheck(vPhaseReport)) { return true; + } else if (ae.isConventionalInfantry()) { + return false; } if (((roll.getIntValue() <= 4) && (howManyShots == 2)) diff --git a/megamek/src/megamek/common/weapons/PrototypeLBXHandler.java b/megamek/src/megamek/common/weapons/PrototypeLBXHandler.java index eb7cff9063d..14fe0d020c6 100644 --- a/megamek/src/megamek/common/weapons/PrototypeLBXHandler.java +++ b/megamek/src/megamek/common/weapons/PrototypeLBXHandler.java @@ -84,7 +84,7 @@ protected boolean doChecks(Vector vPhaseReport) { return true; } - if (roll.getIntValue() == 2) { + if ((roll.getIntValue() == 2) && !ae.isConventionalInfantry()) { Report r = new Report(3165); r.subject = subjectId; weapon.setJammed(true); 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/RapidfireACWeaponHandler.java b/megamek/src/megamek/common/weapons/RapidfireACWeaponHandler.java index 00684ffbd75..8d64e0c3d92 100644 --- a/megamek/src/megamek/common/weapons/RapidfireACWeaponHandler.java +++ b/megamek/src/megamek/common/weapons/RapidfireACWeaponHandler.java @@ -55,7 +55,7 @@ protected boolean doChecks(Vector vPhaseReport) { if (kindRapidFire) { jamLevel = 2; } - if ((roll.getIntValue() <= jamLevel) && (howManyShots == 2) && !(ae instanceof Infantry)) { + if ((roll.getIntValue() <= jamLevel) && (howManyShots == 2) && !ae.isConventionalInfantry()) { if (roll.getIntValue() > 2 || kindRapidFire) { Report r = new Report(3161); r.subject = subjectId; diff --git a/megamek/src/megamek/common/weapons/RapidfireHVACWeaponHandler.java b/megamek/src/megamek/common/weapons/RapidfireHVACWeaponHandler.java index d1ef20b2a0c..5bfbf6047d1 100644 --- a/megamek/src/megamek/common/weapons/RapidfireHVACWeaponHandler.java +++ b/megamek/src/megamek/common/weapons/RapidfireHVACWeaponHandler.java @@ -77,7 +77,7 @@ protected boolean doChecks(Vector vPhaseReport) { return true; } - if (roll.getIntValue() == 2) { + if ((roll.getIntValue() == 2) && !ae.isConventionalInfantry()) { Report r = new Report(3162); r.subject = subjectId; weapon.setJammed(true); 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);