Skip to content

Add island_members variable to level formula for team-size handicap support#411

Merged
tastybento merged 2 commits intodevelopfrom
copilot/add-island-handicap-system
Apr 11, 2026
Merged

Add island_members variable to level formula for team-size handicap support#411
tastybento merged 2 commits intodevelopfrom
copilot/add-island-handicap-system

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

Multi-member islands have an inherent advantage over solo players since more members means more blocks placed. Admins had no way to normalize level by team size.

Changes

  • IslandLevelCalculator: Resolves island_members placeholder in the level-calc formula to the island's current member count before equation evaluation. Uses Math.max(1, memberCount) to guard against division-by-zero on unowned islands. Also added member count to the level calculation report output.
  • ConfigSettings: Updated level-calc config comments to document island_members and provide a handicap example.
  • README.md: Added formula variables reference table and handicap usage example.

Example

To normalize island level by team size, set in config.yml:

level-calc: "blocks / level_cost / island_members"

With level_cost: 100, a block worth 100 points yields:

  • Solo island (1 member): level contribution = 100 / 100 / 1 = 1.0
  • 3-member island: 100 / 100 / 3 ≈ 0.33
  • 4-member island: 100 / 100 / 4 = 0.25

The default formula (blocks / level_cost) is unchanged — island_members is only substituted if present in the formula string.

Copilot AI linked an issue Apr 11, 2026 that may be closed by this pull request
2 tasks
Copilot AI changed the title [WIP] Add Island handicap system for parity among players Add island_members variable to level formula for team-size handicap support Apr 11, 2026
Copilot AI requested a review from tastybento April 11, 2026 13:32
@tastybento tastybento marked this pull request as ready for review April 11, 2026 14:14
@sonarqubecloud
Copy link
Copy Markdown

@tastybento tastybento merged commit 06dbc02 into develop Apr 11, 2026
3 checks passed
@tastybento tastybento deleted the copilot/add-island-handicap-system branch April 11, 2026 23:05
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.

Handicap system

2 participants