8000 Removed the Ability for Ignored StratCon Scenarios to 'Wander' if Friendly Facility is Present by IllianiBird · Pull Request #6423 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 3 commits into from
Mar 30, 2025

Conversation

IllianiBird
Copy link
Collaborator
@IllianiBird IllianiBird commented Mar 25, 2025
  • Removed wandering ability from ignored scenarios
  • Refactored ignored scenario handling to streamline functionality
  • Added helper method to quickly fetch 'special' scenario status
  • Removed a bug that caused Crisis to not always deduct 1 CVP if ignored.

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.

@IllianiBird IllianiBird added Bug StratCon Bugs relating strictly to StratCon UX User experience Severity: Medium Issues described as medium severity as per the new issue form labels Mar 25, 2025
@IllianiBird IllianiBird self-assigned this Mar 25, 2025
Copy link
codecov bot commented Mar 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 11.29%. Comparing base (114c51b) to head (3e9e63f).
Report is 5 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -4473,30 +4445,22 @@ private void processNewDayATBScenarios() {
return;
}

final boolean stub = StratconRulesManager.processIgnoredScenario((AtBDynamicScenario) scenario,
campaignState);
processIgnoredScenario(scenario.getId(), campaignState);
Copy link
Collaborator Author

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) {
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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;
}

/**
Copy link
Collaborator Author

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
@IllianiBird IllianiBird merged commit 4de7e06 into MegaMek:master Mar 30, 2025
6 checks passed
@IllianiBird IllianiBird deleted the noWandering branch March 31, 2025 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Severity: Medium Issues described as medium severity as per the new issue form StratCon Bugs relating strictly to StratCon UX User experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0