Uh oh!
There was an error while loading. Please reload this page.
Add island level rewards via the Level addon - #411
Merged
Conversation
Challenges and challenge levels can now grant island levels on completion (rewardIslandLevel / repeatIslandLevel, default 0). Applied only when the Level addon is present. Repeat rewards multiply by the completion factor, consistent with money and XP. Fixes#279 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Extract the three identical island-level reward blocks into a single rewardIslandLevel() helper. This also fixes the reward being applied once per team member: the island is shared, so it is now applied once per completion, outside the recipient loops. Exclude the Gson data objects from copy-paste detection: their accessors are intentionally identical bean boilerplate across Challenge, ChallengeLevel and ChallengesPlayerData. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Combine the island-level reward tests with the #320 potion tests and #111 consumption tests in TryToCompleteTest. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Uh oh!
There was an error while loading. Please reload this page.
tastybento added a commit
that referenced
this pull request
Jul 10, 2026
Resolve overlaps with the island level reward feature (#411): both GUI buttons kept (reward chance at slot 37, island level at 38), both copy() lines and helper methods kept, and all test groups combined. The reward chance gates item/money/XP rewards; island level rewards, like commands, are not gated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes#279
What
Challenges can now grant island levels as rewards, using the existing guarded Level addon hook:
Challenge.rewardIslandLevel(first completion) andChallenge.repeatIslandLevel(repeats, multiplied by the completion factor like money/XP)ChallengeLevel.rewardIslandLevel(granted on level completion)Level#getIslandLevel/setIslandLevelonly whenisLevelProvided()and the value is non-zero — no Level addon, no effect.GUI
Number inputs added to the challenge reward editor (first-time and repeat) and the level reward editor, following the existing money/XP field patterns, with en-US locale strings.
Tests
Five new
TryToCompleteTestcases: first-time reward applied, repeat reward with factor, no-op without the Level addon, no-op at 0, and level-completion reward. Rebased onto the just-merged #408 refactor (tryCompleteLevel) and adapted. Full suite: 471 tests, 0 failures.In-game verification
/island level+5.🤖 Generated with Claude Code
https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v