Skip to content

Commit

Permalink
Merge pull request #4787 from NickAragua/nerf_igauss_aero
Browse files Browse the repository at this point in the history
Fix #4768
  • Loading branch information
NickAragua authored Sep 17, 2023
2 parents d3a1579 + 4dfe64b commit 51f0449
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion megamek/src/megamek/common/actions/WeaponAttackAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -3705,7 +3705,10 @@ private static ToHitData compileAeroAttackerToHitMods(Game game, Entity ae, Targ
// check for heavy gauss rifle on fighter of small craft
// Arguably a weapon effect, except that it only applies when used by a fighter (isn't recoil fun?)
// So it's here instead of with other weapon mods that apply across the board
if ((wtype instanceof ISHGaussRifle) && !(ae instanceof Dropship)
if ((wtype != null) &&
((wtype.ammoType == AmmoType.T_GAUSS_HEAVY) ||
(wtype.ammoType == AmmoType.T_IGAUSS_HEAVY)) &&
!(ae instanceof Dropship)
&& !(ae instanceof Jumpship)) {
toHit.addModifier(+1, Messages.getString("WeaponAttackAction.FighterHeavyGauss"));
}
Expand Down

0 comments on commit 51f0449

Please sign in to comment.