Skip to content

Implement Position-Based Random Magic Item Distribution#271

Draft
SergeantSerk wants to merge 14 commits into
masterfrom
feature/racer-position-magic
Draft

Implement Position-Based Random Magic Item Distribution#271
SergeantSerk wants to merge 14 commits into
masterfrom
feature/racer-position-magic

Conversation

@SergeantSerk

@SergeantSerk SergeantSerk commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

This PR introduces a system for distributing random magic items to racers, where the selection probability is weighted by their current effective position on the scoreboard. This ensures that the random magic item are dynamically tuned to a player's performance during the race.

Key Changes:

  • MagicSystem Integration: Introduced a new MagicSystem to encapsulate logic for managing magic items and logic within a race
  • Position-Based Weighting: Implemented logic to calculate an effective racer position, which is then used to determine the probability weights for specific magic item types. This allows for "catch-up" mechanics or performance-scaled rewards
  • Configurable Weights: Magic item weights are now stored and managed via configuration (magic.yaml), allowing designers to easily tweak how position affects distribution without code changes
  • Race Tracker Integration: Updated RaceTracker and the race update loop to trigger magic item requests and handle state transitions (e.g. when a racer's magic gauge is ready)

@SergeantSerk SergeantSerk self-assigned this Jul 4, 2026
@SergeantSerk SergeantSerk changed the title Implement dynamic magic item distribution based on racer position Implement Position-Based Random Magic Item Distribution Jul 4, 2026
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.

2 participants