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

Fixed Negative Contract Base Pay #5900

Merged
merged 6 commits into from
Jan 28, 2025
Merged

Conversation

IllianiCBT
Copy link
Collaborator

  • Adjusted pay multiplier for required lances to better handle both large and small campaigns. Previously we were overcompensating large campaigns.
  • Adjusted pay multiplier for difficulty.
  • Adjusted how required lances and difficulty multipliers were applied to the overall base pay multiplier so that we're less likely to spike contract pay.
  • Added clearer JavaDocs to calculateContractDifficulty so developers are aware it can, on occasion, return a value outside of the expected 1-10 bounds. Fix [Issue] Negative contract pay #5898

These changes ensure required lances and difficulty (if FG3 is enabled) properly impact contract pay.

Improved the calculation of payment multipliers by factoring in operations tempo, reputation, employer type, required combat teams, and difficulty disparities. Enhanced the contract difficulty method to provide clearer documentation and applied clamping for normalized results. These changes aim to ensure more balanced and transparent contract evaluations.
Extracted unofficial multiplier logic into a dedicated method for clarity and reusability. Simplified the main calculation by removing duplicate logic and centralizing modifications in `getUnofficialMultiplier`. This improves code readability and maintainability.
Simplified logic by gating difficulty-based pay modification under the useGenericBattleValue option. This ensures the adjustment is only applied when relevant and avoids unnecessary calculations otherwise.
@IllianiCBT IllianiCBT added Bug Major This will require major changes across the project. Finances labels Jan 27, 2025
@IllianiCBT IllianiCBT self-assigned this Jan 27, 2025
Replaced invalid `<h3>` tag with `<b>` to ensure proper HTML compliance within Javadoc comments. This change improves documentation readability and adheres to standard HTML practices.
Corrected HTML tags in the documentation comments for clarity and adherence to standards. Ensured proper closing of <p> tags to maintain consistency in the codebase.
Adjusted HTML tag structure in method documentation for better readability and formatting consistency. Removed redundant closing tags and improved explanation layout.
@codecov-commenter
Copy link

codecov-commenter commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.29%. Comparing base (765c7bd) to head (486070e).
Report is 35 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5900      +/-   ##
============================================
- Coverage     10.30%   10.29%   -0.01%     
+ Complexity     6129     6123       -6     
============================================
  Files          1038     1038              
  Lines        139154   139161       +7     
  Branches      20609    20610       +1     
============================================
- Hits          14335    14329       -6     
- Misses       123424   123434      +10     
- Partials       1395     1398       +3     

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

@IllianiCBT IllianiCBT merged commit b249603 into MegaMek:master Jan 28, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Finances Major This will require major changes across the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] Negative contract pay
2 participants