8000 Fix #6778: Prisoners Are Now Correctly Released When Enemy Routs by IllianiBird · Pull Request #6779 · MegaMek/mekhq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix #6778: Prisoners Are Now Correctly Released When Enemy Routs #6779

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 1 commit into from
Apr 26, 2025

Conversation

IllianiBird
Copy link
Collaborator

Fix #6778

Dev Notes

When the enemy routs all held prisoners are meant to be ransomed or released. However, we were only triggering those events if there were no prisoners, not when there were prisoners.

< 8000 input type="hidden" name="dropdown_direction" value="w" autocomplete="off" data-targets="batch-deferred-content.inputs" />
### Dev Notes
When the enemy routs all held prisoners are meant to be ransomed or released. However, we were only triggering those events if there were _no_ prisoners, not when there _were_ prisoners.
@IllianiBird IllianiBird added Bug Severity: Medium Issues described as medium severity as per the new issue form labels Apr 26, 2025
@IllianiBird IllianiBird self-assigned this Apr 26, 2025
Copy link
codecov bot commented Apr 26, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 11.45%. Comparing base (1e3b58e) to head (9cd4627).
Report is 17 commits behind head on master.

Files with missing lines Patch % Lines
MekHQ/src/mekhq/campaign/mission/AtBContract.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6779   +/-   ##
=========================================
  Coverage     11.45%   11.45%           
- Complexity     6501     6503    +2     
=========================================
  Files          1098     1098           
  Lines        140870   140869    -1     
  Branches      21843    21842    -1     
=========================================
+ Hits          16135    16140    +5     
+ Misses       123061   123051   -10     
- Partials       1674     1678    +4     

☔ 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.

@HammerGS HammerGS requested a review from Copilot April 26, 2025 20:46
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses issue #6778 by correcting the logic used to trigger prisoner release events when the enemy routs.

  • The conditional checks for friendly and current prisoners have been reversed to ensure events trigger when prisoner collections are non-empty.

@HammerGS HammerGS merged commit c72ff78 into MegaMek:master Apr 26, 2025
6 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] Got prompted to ransom/execute/free prisoners even though had none
2 participants
0