Skip to content

Fixed maneuver/auxillary reinforcement roll reporting#8709

Merged
Sleet01 merged 2 commits intoMegaMek:mainfrom
heckindoc:main
Jan 30, 2026
Merged

Fixed maneuver/auxillary reinforcement roll reporting#8709
Sleet01 merged 2 commits intoMegaMek:mainfrom
heckindoc:main

Conversation

@heckindoc
Copy link
Contributor

@heckindoc heckindoc commented Jan 30, 2026

Fixes: #8640

Fixed reporting for rolls when reinforcing using maneuver or auxiliary forces. The rolls were being completed with advantage, as intended, however the string was only reporting the highest roll twice.

@heckindoc heckindoc requested a review from a team as a code owner January 30, 2026 05:43
Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 13.07%. Comparing base (d973625) to head (7e6e275).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
.../mekhq/campaign/stratCon/StratConRulesManager.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8709      +/-   ##
============================================
- Coverage     13.07%   13.07%   -0.01%     
+ Complexity     7788     7787       -1     
============================================
  Files          1306     1306              
  Lines        168988   168988              
  Branches      25398    25398              
============================================
- Hits          22091    22087       -4     
- Misses       144771   144773       +2     
- Partials       2126     2128       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Corrected line 1938 - now reports both rolls within brackets. Correct number of arguments
@heckindoc
Copy link
Contributor Author

heckindoc commented Jan 30, 2026

Due to the way the reinforcement status is reported, the report is generated after the argument 'roll = max(roll, secondRoll)' the 'maneuverRoleReport' was being generated with the highest roll generated twice. As written now, with units in the auxiliary or maneuver roles will have the highest roll reported first, with both rolls reported in the order of the rolls within parenthesis.

image

Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

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

LGTM!

@Sleet01 Sleet01 merged commit 042d993 into MegaMek:main Jan 30, 2026
8 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.

[Issue] Maneuver Reinforcement rolls being reported as the same roll twice

2 participants