Fix pasted items not selecting correct runes#1877
Merged
LocalIdentity merged 2 commits intoMay 20, 2026
Merged
Conversation
LocalIdentity
approved these changes
May 20, 2026
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.
Summary
Fixes #1675
Bonded:secondary rune lines to add extra socketed runes during paste reconstructionAdds 9 to 15 Cold Damage (rune)plus a life-leech rune and an empty socketRoot Cause
Pasted items without explicit
Rune:metadata rebuilditem.runesfrom the visible rune mod lines. The matcher grouped rune stats by replacing numbers with#, but retained only the last number in each line. For a range such asAdds 9 to 15 Cold Damage, the target became15, so the solver could reconstruct three Lesser Glacial Runes (3 to 5) instead of one Greater Glacial Rune (9 to 15). After fixing the range match,Bonded:secondary lines also needed to be excluded from adding additional inferred runes, otherwise a secondary line could consume the remaining empty socket.Fix
Rune inference now stores and compares all numeric values in a mod line as a vector. The combination search sums vectors, so a range must match both low and high values. During paste reconstruction,
Bonded:lines are not used to add extra socketed rune names; the primary rune lines remain the source of truth for rebuildingitem.runes.Validation
busted --lua=luajit ../spec/System/TestItemParse_spec.lua25 successes / 0 failures / 0 errors / 0 pending : 0.421 secondsgit diff --checkRisk/Rollback
Risk is limited to rune reconstruction for pasted items that lack explicit
Rune:metadata. Existing parsed rune mod lines still remain intact. Rollback is this commit only.