-
Notifications
You must be signed in to change notification settings - Fork 188
Removed the Ability for Ignored StratCon Scenarios to 'Wander' if Friendly Facility is Present #6423
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
Conversation
…endly Facility is Present
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6423 +/- ##
=========================================
Coverage 11.28% 11.29%
- Complexity 6285 6289 +4
=========================================
Files 1072 1072
Lines 136601 136587 -14
Branches 21122 21114 -8
=========================================
+ Hits 15421 15432 +11
+ Misses 119637 119613 -24
+ Partials 1543 1542 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -4473,30 +4445,22 @@ private void processNewDayATBScenarios() { | |||
return; | |||
} | |||
|
|||
final boolean stub = StratconRulesManager.processIgnoredScenario((AtBDynamicScenario) scenario, | |||
campaignState); | |||
processIgnoredScenario(scenario.getId(), campaignState); |
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 is where we updated ignored scenario handling in Campaign.java
.map(track -> processIgnoredScenario(track.getBackingScenariosMap().get(scenario.getId()), | ||
campaignState)) | ||
.orElse(true); | ||
public static void processIgnoredScenario(int scenarioId, StratconCampaignState campaignState) { |
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.
Updated method. Mostly moving it from a stream to a traditional loop. We gain nothing from using a Stream here.
} | ||
|
||
/** | ||
* Processes an ignored Stratcon scenario | ||
* Processes an ignored StratCon scenario by removing it from the campaign state and updating related state |
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 method contains the main changes made by this PR
@@ -337,6 +340,19 @@ public boolean isTurningPoint() { | |||
return turningPoint; | |||
} | |||
|
|||
/** |
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.
Added new utility method
- Renamed `processIgnoredScenario` to `processIgnoredDynamicScenario` for ID-based processing. - Renamed `processIgnoredScenario` (overloaded version) to `processIgnoredStratConScenario` for object-based processing.
# Conflicts: # MekHQ/src/mekhq/campaign/Campaign.java
Order of Merging
Must be merged BEFORE #6423
Reviewer Note
There are a lot of automatic format changes in this PR, I've commented the functional changes. There rest is chaff and can probably be ignored.
Dev Notes
The ability for scenarios to 'wander' towards allied facilities was pretty cool, but it doesn't mesh well with the 'Refuse the Engagement' approach introduced earlier in the year. Where players are given greater strategic control over what scenarios they fight.
The wandering effect resulted in players potentially getting slammed with consecutive CVP losses without knowing why - unless they already knew. The solution was to deploy a force to the scenario and then refuse the engagement - at which point the scenario would be removed. This was hard for users to grasp and was a pretty awkward interaction.
Wandering scenarios are more suited to a 'persistent opfor' style of play that is not currently represented in StratCon.