MegaMek / megamek

MegaMek is a networked Java clone of BattleTech, a turn-based sci-fi boardgame for 2+ players. Fight using giant robots, tanks, and/or infantry on a hex-based map.
http://www.megamek.org
GNU General Public License v2.0
299 stars 288 forks source link

#5995 - Prevent Field Guns from exploding/jamming #6024

Closed SJuliez closed 1 month ago

SJuliez commented 1 month ago

Fixes #5995 I changed some checks from an instanceof to a isConventionalInfantry() as the instanceof check includes BA but the rule is only for field guns, i.e. CI.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 29.09%. Comparing base (de830cc) to head (a70aa0e). Report is 21 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #6024 +/- ## ============================================ - Coverage 29.09% 29.09% -0.01% + Complexity 13973 13972 -1 ============================================ Files 2580 2580 Lines 267172 267176 +4 Branches 47710 47712 +2 ============================================ - Hits 77746 77744 -2 - Misses 185527 185534 +7 + Partials 3899 3898 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.