-
Notifications
You must be signed in to change notification settings - Fork 177
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 Potential Difficulty Spikes to Garrison-Type Contracts #5690
Conversation
Refactored morale adjustments to introduce variable morale levels, improving dynamic contract outcomes. Added logic to regenerate scenario odds for StratCon-enabled contracts, incorporating multipliers for higher intensity scenarios. Replaced redundant calls to `Compute.randomInt` with `randomInt` for consistency.
Standardized morale level updates and clarified Garrison contract checks by replacing `isGarrisonType` with `isGarrisonDuty` for consistency. Adjusted morale logic, randomization, and scenario odds processing to improve code accuracy and readability. Updated tooltip text to better describe a Garrison state scenario.
Previously, enemy updates were applied universally during morale changes. Added a condition to limit updates to garrison contracts that are not riot duty, ensuring more accurate behavior. This prevents unintended changes in scenarios outside the specified contract types.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5690 +/- ##
=========================================
Coverage 10.02% 10.03%
- Complexity 6068 6069 +1
=========================================
Files 1074 1074
Lines 141641 141659 +18
Branches 20645 20652 +7
=========================================
+ Hits 14206 14209 +3
- Misses 126063 126081 +18
+ Partials 1372 1369 -3 ☔ View full report in Codecov by Sentry. |
// This works with the regenerated Scenario Odds to crease very high intensity | ||
// spikes in otherwise low-key Garrison-type contracts. | ||
AtBMoraleLevel newMoraleLevel = switch (roll) { | ||
case 0,1 -> AtBMoraleLevel.STALEMATE; |
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.
This format makes these tables so much cleaner!
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.
LGTM
Fix #5689