Skip to content

Capture starting Plating for enemies that apply it in a helper#580

Merged
ptrlrd merged 1 commit into
mainfrom
fix/lagavulin-innate-plating
Jul 10, 2026
Merged

Capture starting Plating for enemies that apply it in a helper#580
ptrlrd merged 1 commit into
mainfrom
fix/lagavulin-innate-plating

Conversation

@ptrlrd

@ptrlrd ptrlrd commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Bug report (via Knowledge Demon): Lagavulin Matriarch's page shows no indication of its starting Plating.

Root cause

The monster parser scans AfterAddedToRoom() for PowerCmd.Apply<...> calls to build innate_powers. Frog Knight applies its Plating inline there, so it was captured. Lagavulin Matriarch delegates to a private helper — AfterAddedToRoom() calls await Sleep(), and the Plating is applied inside Sleep() — so the scan, which only looked at the literal AfterAddedToRoom body, 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(...) where Foo is a method defined in this class, not base.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_powers across every monster:

  • Exactly one monster changes: LAGAVULIN_MATRIARCHPlating 12 and Asleep 3 (both genuinely applied at combat start in Sleep(); both are real catalog powers that render).
  • Zero regressions — every other monster (including the 45 that already had innate_powers) is byte-identical.

Data regenerated for all 14 languages on both the stable and beta channels (the value is language-independent — power_id/amount only). One parser file + 28 monsters.json.

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.
@ptrlrd ptrlrd merged commit ae801d8 into main Jul 10, 2026
5 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.

1 participant