Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for infantry skipping non-ammo-fed infantry weapons during attack phase #5226

Merged

Conversation

Sleet01
Copy link
Collaborator

@Sleet01 Sleet01 commented Mar 7, 2024

This was caused by the assumption that Infantry weapons would use AmmoType T_NA, like energy weapons.
Instead they use T_INFANTRY, because of course.

Fix is to check for both types when skipping ammo selection in the attack planning portion of the Attack phase. The guess code, used during movement planning, appears to be working correctly.

Testing:

  • Ran all three projects' unit tests.
  • Let Princess annihilate some 'mechs with beast-mounted infantry.

Close #5224

Copy link
Member

@NickAragua NickAragua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion, looks fine otherwise.

megamek/src/megamek/client/bot/princess/FireControl.java Outdated Show resolved Hide resolved
@HammerGS HammerGS merged commit e7a0314 into MegaMek:master Mar 13, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[49.18 Nightly] - Infantry Firing issue
3 participants