Capture starting Plating for enemies that apply it in a helper#580
Merged
Conversation
Lagavulin Matriarch's page showed no starting Plating. The monster parser scans AfterAddedToRoom for PowerCmd.Apply<...> calls, but Lagavulin delegates to a private Sleep() helper (await Sleep()) and applies its Plating there, so the scan missed it. Frog Knight, which applies Plating inline in AfterAddedToRoom, was already captured. Follow local same-class method calls from AfterAddedToRoom into their bodies before scanning, so powers applied one hop away are captured too. Verified against the decompiled source: the only monster whose innate_powers changes is Lagavulin Matriarch, which now carries Plating 12 (and Asleep 3, both applied at combat start); every other monster is byte-identical. Data regenerated for all 14 languages on both channels.
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.
Bug report (via Knowledge Demon): Lagavulin Matriarch's page shows no indication of its starting Plating.
Root cause
The monster parser scans
AfterAddedToRoom()forPowerCmd.Apply<...>calls to buildinnate_powers. Frog Knight applies its Plating inline there, so it was captured. Lagavulin Matriarch delegates to a private helper —AfterAddedToRoom()callsawait Sleep(), and the Plating is applied insideSleep()— so the scan, which only looked at the literalAfterAddedToRoombody, missed it. (So the report's "Frog Knight also has no indication" was already fixed; the real gap was Lagavulin.)The frontend already renders
innate_powers— the field was just null.Fix
The parser now follows local same-class method calls from
AfterAddedToRoom(await Foo(...)whereFoois a method defined in this class, notbase.X/Cmd.X) into their bodies before scanning, so powers applied one hop away are caught. Bounded with a visited set.Validation
I ran the old and new parser against the same decompiled source and diffed
innate_powersacross every monster:LAGAVULIN_MATRIARCH→Plating 12andAsleep 3(both genuinely applied at combat start inSleep(); both are real catalog powers that render).Data regenerated for all 14 languages on both the stable and beta channels (the value is language-independent —
power_id/amountonly). One parser file + 28monsters.json.