Repository navigation
Cap order money counted toward sell multipliers - #24
Merged
Merged
Conversation
An order's price is whatever its owner typed, so counting order payouts toward multiplier progress in full let two accounts pass money through an overpriced order and raise a multiplier without limit. Each sale now counts for no more than the shop would have paid for those items. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5jqQqtiAZknExc2x6jFwQ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5jqQqtiAZknExc2x6jFwQ
Faboit1
marked this pull request as ready for review
October 4, 2026 02:31
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 free
to 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.
Fix from a duplication/economy audit.
Problem (High, economy exploit)
With
orders.count-toward-multipliers: true(the default), every dollar an order paid counted toward the seller's category multiplier progress. An order's price is whatever its owner typed, so two accounts could:The money just goes back and forth between the two accounts, but B's multiplier keeps climbing, which permanently raises everything B sells to the shop.
Fix
Each sale's order earnings count toward progress for no more than the shop would have paid for those same items.
StackSalenow carries that figure (orderShopValue), andSaleTallycountsmin(orderEarned, orderShopValue). The option keeps its meaning: selling through an order still counts like selling to the shop, just not for more. The order still pays its full price.Testing
Paper 1.21.10 with FoOrders and a connected client, selling 64 diamonds into a $100,000/each order:
mainThe existing sell-into-orders scenarios all still pass.
The companion FoOrders fixes are in Faboit1/FoOrders-Folia (same branch name).
🤖 Generated with Claude Code
https://claude.ai/code/session_01U5jqQqtiAZknExc2x6jFwQ
Generated by Claude Code