Skip to content

Fix eldritch implicits of copied or imported items missing their tags - #10515

Open
lucaskarsten wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
lucaskarsten:fix/4940-eldritch-tags
Open

lucaskarsten wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
lucaskarsten:fix/4940-eldritch-tags

Conversation

@lucaskarsten

Copy link
Copy Markdown
Contributor

Fixes #4940 .

Description of the problem being solved:

Items copied from the game (Ctrl+C) or imported from the account list their Searing Exarch and Eater of Worlds implicits as plain implicits (11% increased Attack Speed (implicit)), so PoB never set the {exarch}/{eater} flag on them. Everything that relies on that flag treated them as normal implicits: adding a new eldritch implicit through the Add Implicit popup appended it instead of replacing the existing one, and the implicit was kept when the influence was removed.

ParseRaw now recovers the tag: when the item has Searing Exarch and/or Eater of Worlds influence, each untagged implicit whose text (numbers ignored) matches a mod in ModEldritch.lua gets exarch or eater, only for the influence the item actually has. The lookup table is built once from data.itemMods.Eldritch (no line is shared between Exarch and Eater mods there). Import goes through BuildAndParseRaw, so it is covered by the same change, and BuildRaw writes the tags out so they survive saving.

Known limitation: five eldritch texts also exist as base implicits (e.g. #% increased Movement Speed, +#% to Chaos Resistance). In PoB you can give such a base an eldritch influence without replacing its implicit, and that implicit would now be tagged. In game an eldritch implicit replaces the base implicit, so this only changes which line the Add Implicit popup replaces; no stats change.

Steps taken to verify a working solution:

  • Added TestItemEldritchTags_spec.lua, using a copied Sorcerer Gloves with both influences:
    • The Exarch and Eater implicits get the right tag (and only that one).
    • The tags survive BuildRaw and parsing again.
    • With only Searing Exarch influence, the Eater implicit is not tagged.
    • Without eldritch influence, nothing is tagged.
    • Lines already tagged are kept as they are.
  • On dev: 2 successes / 3 failures (the two negative tests pass there); on this branch 5 / 0.
  • Full busted suite: 750 successes, 0 failures.
  • --tags=builds (the saved 3.13 builds): the same 900 failures, with identical messages, on dev and on this branch.

Link to a build that showcases this PR:

Any build: paste an eldritch item copied from the game, then add another implicit of the same influence through Add Implicit.

Before screenshot:

The pasted implicits have no eldritch tag, and adding an Exarch implicit leaves two of them on the item.

After screenshot:

The pasted implicits are tagged, and adding an Exarch implicit replaces the existing one.

Items copied from the game or imported from the account list Searing
Exarch and Eater of Worlds implicits as plain implicits, so they never got
the exarch/eater flag. ParseRaw now tags untagged implicits that match an
eldritch mod of an influence the item has.
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.

Eldritich Mods from imported/copypasted items not being taged correctly and thus not being replaced correctly

1 participant