Skip to content

Extend the upgrade bonus to +13 and add the rarity gamble thresholds - #194

Merged
erwan-joly merged 2 commits into
masterfrom
claude/project-thread-lm0ckt
Nov 29, 2026
Merged

erwan-joly merged 2 commits into
masterfrom
claude/project-thread-lm0ckt

Conversation

@erwan-joly

@erwan-joly erwan-joly commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Erwan · project thread

Part of NosCoreIO/NosCore#3352. Two equipment changes batched into one release (minor bump: a new service).

Upgrade bonus past +10

UpgradeBonusService stopped at a lead of 10 (+200%). Equipment now goes up to +13 (Constants.MaxEquipmentUpgrade), so a +13 weapon against +0 armour only got the +10 bonus.

The client's item window has a single upgrade percentage table, 10 15 22 32 43 54 65 90 120 200 220 245 300, indexed by an upgrade count of 1 to 13. The first ten match this service; this adds the last three (2.2, 2.45, 3.0). A lead above 13 still clamps to the last step.

Rarity gamble thresholds

New IGambleService: the roll range (80) and the cumulative threshold of each rarity (8 → 1, 7 → 2, 6 → 3, 5 → 5, 4 → 10, 3 → 15, 2 → 30, 1 → 40). NosCore keeps these as a private table inside its gamble operation; the consumer PR switches it to this service with no change in odds. Rarity 8 is champion gear only, which stays the server's rule.

Tests

  • UpgradeBonusDocumentation asserts the +13 value; its approval table now runs to a lead of 14.
  • New GambleDocumentation approval table and an out-of-range test (rarity 0, -1 and 9 return 0).
  • dotnet test: 96 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_014gSmkTbyTn9rzkycAxpw6c

The client's item window lists 220%, 245% and 300% for an upgrade lead of 11 to 13, and equipment now goes up to +13, so a lead above 10 no longer stops at 200%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014gSmkTbyTn9rzkycAxpw6c
@erwan-joly erwan-joly self-assigned this Nov 29, 2026
@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The upgrade bonus array adds values for larger upgrade leads. The documentation test and approved table now cover leads through 14.

Changes

Upgrade Bonus Curve

Layer / File(s) Summary
Extend the upgrade bonus curve
src/NosCore.Algorithm/UpgradeBonusService/UpgradeBonusService.cs, test/NosCore.Algorithm.Tests/DocumentationTest.cs, documentation/DocumentationTest.UpgradeBonusDocumentation.approved.md
The bonus array adds 2.2, 2.45, and 3.0. The test checks lead 13 and generates the table for leads 0–14. The approved table lists values for leads 11–14.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Possibly related PRs

Suggested reviewers: claude

Merge Risk: Minimal · up to e3418

This extends the upgrade bonus curve to cover leads 11 through 13 and clamps larger leads to the final step. The documentation test and approved table were updated to match. No merge-blocking risk was found.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Inconclusive The title names the main change: the upgrade bonus table and service are extended from +10 to +13, with three new bonus steps (2.2, 2.45, 3.0). The raw summary covers these changes, including the upda… Confirm whether the PR contains rarity gamble threshold changes. If it does, the summary should list those files. If it does not, remove that clause from the title, for example: "Extend the upgrade bonus to +13".
Passed Passed checks: 3 passed

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title names the main change: the upgrade bonus table and service are extended from +10 to +13, with three new bonus steps (2.2, 2.45, 3.0). The raw summary covers these changes, including the updated DocumentationTest and the approval file. The title also says the PR adds rarity gamble thresholds, but the provided summary and objectives do not mention any rarity gamble change. That part of the title is not supported by the changeset evidence shown, so the title is partially related.

Resolution

Confirm whether the PR contains rarity gamble threshold changes. If it does, the summary should list those files. If it does not, remove that clause from the title, for example: "Extend the upgrade bonus to +13".

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between ca3bb64 and e3418b5.

Files selected for processing: 3

  • documentation/DocumentationTest.UpgradeBonusDocumentation.approved.md
  • src/NosCore.Algorithm/UpgradeBonusService/UpgradeBonusService.cs
  • test/NosCore.Algorithm.Tests/DocumentationTest.cs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

The roll range and the cumulative threshold of each rarity, rarity 8 included for champion gear, so the server no longer keeps its own copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014gSmkTbyTn9rzkycAxpw6c
@erwan-joly erwan-joly changed the title Give the upgrade bonus its three steps past +10 Extend the upgrade bonus to +13 and add the rarity gamble thresholds Nov 29, 2026
@erwan-joly
erwan-joly merged commit db6995c into master Nov 29, 2026
3 checks passed
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