Uh oh!
There was an error while loading. Please reload this page.
Add optional per-challenge reward chance - #412
Merged
Merged
Conversation
New rewardChance percentage on challenges (default 100, so nothing changes for existing data). For first-time completion one roll gates the item, money, and XP rewards together; repeat completions roll once per completion instance. Reward commands and completion state are never gated. Fixes#76 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
Translate the new challenges.gui.buttons.reward_chance strings into cs, de, es, fr, hu, ja, lv, pl, pt, ru, uk, zh-CN, zh-HK and zh-TW, matching each file's existing formatting style. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
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
Uh oh!
There was an error while loading. Please reload this page.
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#76
What
New
rewardChancepercentage (0–100) on challenges, default 100 so existing challenges and old save data are completely unchanged (the field initialiser covers missing values in old JSON).Behaviour
GUI
Number input (0–100) in the challenge reward editor with en-US locale strings explaining the behaviour.
Tests
Four new
TryToCompleteTestcases: default is 100, 100% always rewards, 0% withholds items/money/XP but still runs commands and records completion, and repeat rewards at 100%. Full suite: 470 tests, 0 failures.In-game verification
🤖 Generated with Claude Code
https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v