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

Added Discretionary Spending System Based on Wealth Trait #6565

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

Conversation

IllianiCBT
Copy link
Collaborator

@IllianiCBT IllianiCBT commented Apr 6, 2025

  • Implemented a discretionary spending system using the "Wealth" trait, with rules inspired by A Time of War: Companion.
  • Added configuration option to enable monthly wealth reinvestment via Campaign Options.
  • Introduced "Extreme Expenditure" action for personnel, affecting wealth, loyalty, and generating reports.
  • Expanded finances logic and resources to include "Wealth" as a new transaction type.
  • Integrated spending calculations and options into the campaign process and GUI.OnWealth.tooltip` property to clarify fund reinvestment by campaign commanders.
  • Removed extraneous whitespace from DiscretionarySpending.properties.

Dev Notes

This implements a system inspired by the Discretionary spending rules in ATOW: Companion. Optionally, each month the campaign commander will reinvest their discretionary fund, adding it to the campaign's coffers. The amount reinvested is based on the character's Wealth trait.

Alternatively, once a month, a character can perform extreme expenditure, which offers a significant payout but permanently reduces the character's Wealth by 1.

The rules for discretionary spending can be found in ATOW: Companion, pages 53-54. The differences between that system and ours are relatively minor:

  • RAW the player should be able to choose if and when they use their discretionary fund. We have the use be automated each month.
  • RAW if a character rolls a natural 2, or beats the check with an MoS of 6+, their Wealth is decreased or increased. I contemplated implementing this, but decided against it as due to the non-optional nature of our implementation it would cause Wealth to plummet very quickly and would cause users to view Wealth as not worth investing in.

Finally, I have to share this image from ATOW: Companion. As this is exactly how I view those players with multi-billion C-Bill campaigns:
image

- Implemented a discretionary spending system using the "Wealth" trait, with rules inspired by A Time of War: Companion.
- Added configuration option to enable monthly wealth reinvestment via Campaign Options.
- Introduced "Extreme Expenditure" action for personnel, affecting wealth, loyalty, and generating reports.
- Expanded finances logic and resources to include "Wealth" as a new transaction type.
- Integrated spending calculations and options into the campaign process and GUI.OnWealth.tooltip` property to clarify fund reinvestment by campaign commanders.
- Removed extraneous whitespace from `DiscretionarySpending.properties`.
```
- Replaced direct `setWealth` call with the new `changeWealth` method in `DiscretionarySpending` class for clarity and better encapsulation.
- Added `changeWealth` method to `Person` class that adjusts the wealth by a specified delta, enhancing code maintainability.
- Documented the new `changeWealth` method with clear Javadoc comments.
@IllianiCBT IllianiCBT added Personnel Personnel-related Issues Implementation of Missing Official Rule Used with the RFE tag for the implementation of missing official rule labels Apr 6, 2025
@IllianiCBT IllianiCBT self-assigned this Apr 6, 2025
@IllianiCBT IllianiCBT removed the Implementation of Missing Official Rule Used with the RFE tag for the implementation of missing official rule label 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.57%. Comparing base (e0ebe3a) to head (99febee).
Report is 19 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##             master    #6565    +/-   ##
==========================================
  Coverage     11.57%   11.57%            
- Complexity     6401     6404     +3     
==========================================
  Files          1085     1086     +1     
  Lines        139499   139727   +228     
  Branches      21514    21549    +35     
==========================================
+ Hits          16149    16176    +27     
- Misses       121776   121978   +202     
+ Partials       1574     1573     -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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Personnel Personnel-related Issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant