Fix reprinted subclass spell list merging and qualifiers#860
Merged
Conversation
…olves #859 - Skip old reprinted entries in processClassRefs/processSubclassRefs (spell source lookup): when a class/subclass key resolves to a different canonical key via getAliasOrDefault, skip the old entry so its spells are not merged into the new edition's spell list. - Add SpellEntry.getMostSpecificReference to prefer specific (constraint-bearing) references over non-specific ones. - Use per-spell getMostSpecificReference in createOtherList instead of reusing the first spell's reference for all spells in the list; fixes incorrect "at class level X" qualifiers being applied to every spell. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Changes
SpellIndex.java: Skip reprinted (aliased) spell references to avoid duplicate entries. Only process canonical versions of reprinted spells by checking if the key differs from its resolved alias.
SpellEntry.java: Add
getMostSpecificReference()method that returns the most specific spell reference, preferring constraint-bearing references (with classLevel/spellLevel/asLevel) over generic ones.Json2QuteSpellIndex.java: Use the new
getMostSpecificReference()method to get accurate spell qualifiers instead of always using the generic reference, and only append qualifier text if present.Fixes