Skip to content

fix: rebalance condition system to prevent 0% energy by split end - #325

Open
TtvNekix wants to merge 1 commit into
OpenLeagueManager:developfrom
TtvNekix:fix/condition-balance
Open

fix: rebalance condition system to prevent 0% energy by split end#325
TtvNekix wants to merge 1 commit into
OpenLeagueManager:developfrom
TtvNekix:fix/condition-balance

Conversation

@TtvNekix

Copy link
Copy Markdown
Contributor

Summary

Rebalances the player condition (energy) system so that condition does not steadily drain to 0% over the course of a split.

Changes

1. Match depletion (post_match.rs)

Base depletion changed from fixed 40 to random 15-30 per player per match:

  • 15.0 + random() * 15.0 = 15-30 range
  • Mental resilience reduces by 25% instead of 40%
  • Applied per player so there's natural variance within the squad

2. Training recovery (training.rs)

  • Training day recovery base: 3.0 → 5.0
  • New matchday recovery: 4.2 (60% of rest day rate)
  • Rest days unchanged at 7.0

3. Matchday recovery (turn/mod.rs)

process_training is now called on matchdays with is_matchday=true in both process_day and finish_live_match_day. Previously recovery was completely skipped on matchdays.

Net effect

Over a full split (~10 matches) with Balanced schedule, players maintain ~60-80% average condition instead of the previous ~0%.

Three changes:

1. Match depletion (post_match.rs): reduced base depletion from fixed 40 to a randomised 15-30 per player per match. Mental resilience now provides a 25% reduction instead of 40%. This prevents condition from dropping to 0% after just a few matches.

2. Training recovery (training.rs): increased training-day recovery base from 3.0 to 5.0. Added matchday recovery at 4.2 (60% of a rest day) so players restore condition even on days they play.

3. Matchday recovery (turn/mod.rs): process_training is now called on matchdays (with is_matchday=true) in both process_day and finish_live_match_day, applying partial condition recovery instead of skipping recovery entirely.

Net effect: over a full split (~10 matches), players maintain ~60-80% average condition instead of hitting 0%.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant