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

Refactored Edge Handling to Use Adjusted Edge Values #6573

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

IllianiCBT
Copy link
Collaborator

  • Replaced calls to getEdge() with getAdjustedEdge() to account for the "unlucky" trait in edge calculations.
  • Updated PersonViewPanel to display adjusted edge values in the GUI.
  • Modified the resetCurrentEdge method to reset based on the adjusted edge value.
  • Incorporated safeguarded adjustments (e.g., ensuring edge values are non-negative) in calculations.
  • Improved method documentation for getEdge() and getAdjustedEdge() to clarify usage and behavior.

Dev Notes

When I first implemented Unlucky I modified the getEdge method. That was a poor call, as it meant we could no longer view Edge score without incorporating Unlucky. So I went back and moved Unlucky out of getEdge and created getAdjustedEdge which does include Unlucky.

I then went through and updated relevant calls to getEdge to use the new getAdjustedEdge method, where appropriate.

Finally, I fixed a bug with Unit that was causing any Edge used to be disregarded when determining the Edge available to a crew. Basically, we were always assuming those characters had their full allowance of Edge, when that might not be the case. Such as when there are rapid successive deployments, or if a member of the crew is also a Technician who spent some of their Edge on repair tasks.

- Replaced calls to `getEdge()` with `getAdjustedEdge()` to account for the "unlucky" trait in edge calculations.
- Updated `PersonViewPanel` to display adjusted edge values in the GUI.
- Modified the `resetCurrentEdge` method to reset based on the adjusted edge value.
- Incorporated safeguarded adjustments (e.g., ensuring edge values are non-negative) in calculations.
- Improved method documentation for `getEdge()` and `getAdjustedEdge()` to clarify usage and behavior.
@IllianiCBT IllianiCBT added Bug GUI Severity: Low Issues described as low severity as per the new issue form labels Apr 6, 2025
@IllianiCBT IllianiCBT self-assigned this Apr 6, 2025
Copy link

codecov bot commented Apr 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 11.58%. Comparing base (e0ebe3a) to head (817a942).
Report is 19 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##             master    #6573    +/-   ##
==========================================
  Coverage     11.57%   11.58%            
+ Complexity     6401     6400     -1     
==========================================
  Files          1085     1085            
  Lines        139499   139605   +106     
  Branches      21514    21532    +18     
==========================================
+ Hits          16149    16172    +23     
- Misses       121776   121863    +87     
+ Partials       1574     1570     -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug GUI Refactoring Severity: Low Issues described as low severity as per the new issue form
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant