-
Notifications
You must be signed in to change notification settings - Fork 200
Fix #8260: Fixed Morale Yet Again; Updated Glossary; Added Even More Tests #8262
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8262 +/- ##
============================================
+ Coverage 11.72% 11.74% +0.02%
- Complexity 7532 7548 +16
============================================
Files 1271 1271
Lines 162724 162754 +30
Branches 24515 24525 +10
============================================
+ Hits 19082 19121 +39
+ Misses 141644 141632 -12
- Partials 1998 2001 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes issue #8260 where the morale system was incorrectly comparing equipment quality against Dragoon Ratings instead of using skill levels for OpFor calculations. The fix updates the morale reliability calculation to use getEnemySkill().getAdjustedValue() instead of getEnemyQuality(), properly aligning the system with skill-based metrics rather than outdated Dragoon rating constants.
Key Changes
- Replaced Dragoon rating-based reliability calculations with skill level-based calculations (GREEN, ELITE, LEGENDARY)
- Enhanced morale check reporting to show both raw roll and modifiers separately for clarity
- Added comprehensive test coverage for morale state transitions and edge cases
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| MHQMoraleTest.java | Updated tests to use SkillLevel enums instead of ForceDescriptor ratings; added 90+ lines of new test cases for morale transitions and null date handling |
| MHQMorale.java | Fixed getReliability() to use skill levels; improved documentation; separated roll display from modifiers; added constant definitions for target numbers |
| Mission.properties | Updated tooltip text for morale levels to use more consistent voice ("allied forces" instead of "your forces") |
| MHQMorale.properties | Enhanced report format to display roll breakdown: "Rolled X (Y + Z)" showing base roll and modifiers |
| GlossaryEntry.properties | Expanded morale documentation with skill-based calculations, HTML formatting, and contract type clarifications |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fix #8260
In this episode of "Illiani Fixes Morale, No For Real This Time" we fix an issue where we were comparing equipment quality against Dragoon Ratings, despite quality being the wrong metric and Dragoon Ratings not being used in OpFor calculations.
That issue, at least, is an artifact from the original morale system our new one was built on. I do feel rather stupid that I didn't spot it before, though.
While I was at it I also updated the glossary and added a bunch more tests.