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

Decoupled Prisoner Capture & Defection from AtB, Updated Mechanics, & Added Supporting Documentation #4413

Merged
merged 7 commits into from
Jul 17, 2024

Conversation

IllianiCBT
Copy link
Collaborator

@IllianiCBT IllianiCBT commented Jul 15, 2024

This PR decouples prisoner capture and defection so that the system is no longer tied to AtB and can be used both with and without AtB.

Some minor changes have been made, chiefly to the value of ransoms to make them more internally consistent. Furthermore, I have added a clause that causes picked up enemy personnel to be automatically captured. That last one is only using pre-existing functionality that wasn't being called. Local testing suggests it's working as intended, but this likely needs to be closely monitored. Worse case scenario we just remove the call and everything goes back to how it worked previously.

Finally, I have added full documentation for the prisoner & defection system.

Closes #4397

In ResolveScenarioTracker, the enemy rating for non-AtB contracts now uses the person's experience level. This allows us to decouple prisoner defection from AtB, expanding the availability of this mechanic to non-AtB users.
The tooltip text for 'lblPrisonerStatus' was updated for clarity and consistency. The description for 'chkAtBPrisonerDefection' was also altered and renamed as 'Random Prisoner Defection' to accurately reflect its function.
The ransom values for various skill levels (none, veteran, elite) in MECHWARRIOR_AERO_RANSOM_VALUES and OTHER_RANSOM_VALUES maps were updated. This provides more appropriate costs for inexperienced, veteran, and elite skill levels.
The condition for triggering the 'wasCaptured' flag in the ResolveScenarioWizardDialog was corrected. Previously, the condition checked if the roll of a six-sided dice was 1. The check has now been updated to verify if the dice roll is 6 instead, making it consistent with the presumed game logic.
The update adds a new status to the ResolveScenarioTracker in the MekHQ campaign configuration. This allows the tracker to record whether a unit has been picked up, providing more detailed tracking and status information for scenarios.
The initial ransom values for people with no experience (EXP_NONE) in the MECHWARRIOR_AERO_RANSOM_VALUES and OTHER_RANSOM_VALUES map were reduced. These changes take into account the lower "market value" of less skilled personnel.
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 10.26%. Comparing base (c90c6d2) to head (7d22fb4).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4413      +/-   ##
============================================
- Coverage     10.26%   10.26%   -0.01%     
  Complexity     5809     5809              
============================================
  Files           924      924              
  Lines        126223   126226       +3     
  Branches      18698    18699       +1     
============================================
  Hits          12952    12952              
- Misses       111996   111999       +3     
  Partials       1275     1275              

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

@IllianiCBT IllianiCBT merged commit 06b957b into MegaMek:master Jul 17, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFE: Prisoner defection
3 participants