Skip to content

Add support for Seeker Runes unattached brand attachment range - #10574

Open
lucaskarsten wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
lucaskarsten:fix/461-unattached-brand-range
Open

lucaskarsten wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
lucaskarsten:fix/461-unattached-brand-range

Conversation

@lucaskarsten

Copy link
Copy Markdown
Contributor

Fixes #461 .

Description of the problem being solved:

Seeker Runes (Medium Cluster Jewel notable, brand damage clusters) has "Unattached Brands gain 20% increased Brand Attachment Range per second, up to a maximum of 100%", which was not parsed, so the notable showed as unsupported and the Attachment Range in Calcs ignored it.

In the client the stat is unattached_sigil_attachment_range_+%_per_second and its text has a line break ("...Brand Attachment Range per\nsecond, up to a maximum of 100%"). The tree splits the line in two; the first half does not parse, so PassiveTree:ProcessStats joins it with the next line and parses "... per second, up to a maximum of 100%". That joined form was the one missing from the parser.

Changes:

  • ModParser: "unattached brands gain X% increased brand attachment range per second, up to a maximum of Y%" gives BrandAttachmentRange INC per Multiplier:BrandUnattachedSeconds, with limit = Y, limitTotal = true (same form as "per second you've been stationary, up to a maximum of"). A second entry covers the 3.11 to 3.27 tree wording, "per second, up to 100%", so builds saved on those trees get it too.
  • ConfigOptions: new "Seconds Brands have been unattached:" count in the brand section, with ifMult = "BrandUnattachedSeconds", so it only shows when a mod uses it. Default is 0, so nothing changes unless it is set.
  • ModCache.lua: only the joined line changes. A full regeneration on current dev also changes 69 unrelated lines (added + removed), so I left those out.

Not changed:

  • The 3.10 tree text has no cap ("...per second"), so I left it unparsed rather than guess one.
  • The "reduced" (negated) form of the stat has no source in current data, so it is not parsed.

Steps taken to verify a working solution:

  • New TestBrandAttachment_spec.lua:
    • The Seeker Runes node of the 3.30 tree is parsed (not unknown, no extra) and has BrandAttachmentRange INC 20.
    • Armageddon Brand with the mod, for both wordings: 0 s gives the base range, 3 s gives +60%, 10 s gives +100% (cap).
    • Both fail on dev (node unknown; 30 instead of 48) and pass with this PR. Removing the cap makes the 10 s case fail (90 instead of 60); removing the old-wording entry makes its case fail (30 instead of 48).
  • Full busted --lua=luajit: 930 / 930 passing (dev with the new spec: 928 / 930, only the 2 new tests failing).
  • --exclude-tags=none --tags=builds: 1264 ok / 900 failing on both dev and this branch, with an identical list of failures.

Link to a build that showcases this PR:

Checked headless on a real 3.29 build converted to the 3.30 tree: Armageddon Brand 20 as the main skill, the outer large jewel socket 21984 allocated, a Medium Cluster Jewel "Added Small Passive Skills grant: 12% increased Brand Damage / 1 Added Passive Skill is Seeker Runes" socketed in it, and Seeker Runes allocated:

dev this PR
Seeker Runes unknown mod parsed
Attachment Range, 0 s unattached 3.0m 3.0m
Attachment Range, 5 s unattached 3.0m 6.0m
"Seconds Brands have been unattached" option — shown (hidden before Seeker Runes is allocated)

Same build converted to the 3.27 tree instead (old wording "per second, up to 100%"): dev 3.0m / 3.0m with the mod unknown, this PR 3.0m / 6.0m.

Before screenshot:

Seeker Runes line shown as unsupported; Attachment Range 3.0m whatever the time.

After screenshot:

Attachment Range 6.0m with "Seconds Brands have been unattached" set to 5.

"Unattached Brands gain X% increased Brand Attachment Range per second,
up to a maximum of 100%" (Seeker Runes) was not parsed, nor the older
tree wording "per second, up to 100%". Both now give
BrandAttachmentRange per second unattached, capped at the maximum, with
a new "Seconds Brands have been unattached" option in the Configuration
tab, shown only when a mod uses it.
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.

Implement Seeker Runes Notable

1 participant