-
Notifications
You must be signed in to change notification settings - Fork 170
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
Added Contract Difficulty Estimate, Including GUI Support #4943
Conversation
Refactored the `AtBContract` class to include methods for calculating and displaying contract difficulty. Added UI elements in `ContractMarketDialog` and `ContractSummaryPanel` to show difficulty estimates. Added dialog calls for when the player is picking unusually easy or overly challenging contracts. Enhanced code maintainability by removing a long switch statement for faction logos and replaced it with a function call. Expanded the switch to include all factions we have logos for, and not just the Clan factions.
Replaced the use of sanitized faction codes with original faction codes for calculating enemy and ally power. Removed the redundant `sanitizeFactionCode` method to simplify the codebase. Additionally, streamlined error handling and improved UI messages for mission challenges for better readability.
…rketDialog. Updated difficulty conditional checks to ensure consistency and correct evaluation across `AtBContract.java` and `ContractMarketDialog.java`. This includes modifying threshold values and conditional logic for image selection and message determination.
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.
Tested and seems to work.
Replaced the StratConSkillGenerator with ModifiedConstantSkillGenerator for skill generation. This adjustment aimed to achieve more consistent and predictable skill levels during mission setup.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4943 +/- ##
============================================
- Coverage 10.45% 10.42% -0.03%
+ Complexity 6013 6003 -10
============================================
Files 951 951
Lines 132877 133139 +262
Branches 19330 19380 +50
============================================
- Hits 13891 13886 -5
- Misses 117637 117903 +266
- Partials 1349 1350 +1 ☔ View full report in Codecov by Sentry. |
Requires #6046 (tests will fail until that PR is merged)
Refactored the
AtBContract
class to include methods for calculating and displaying contract difficulty. Added UI elements inContractMarketDialog
andContractSummaryPanel
to show difficulty estimates.Added dialog calls for when the player is picking unusually easy or overly challenging contracts.
Enhanced code maintainability by removing a long switch statement for faction logos and replaced it with a function call. Expanded the switch to include all factions we have logos for, and not just the Clan factions.