Repository navigation
Fix eldritch implicits of copied or imported items missing their tags - #10515
Open
lucaskarsten wants to merge 1 commit into
Open
lucaskarsten wants to merge 1 commit into
lucaskarsten wants to merge 1 commit into
Conversation
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.
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.
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.ParseRawnow 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 inModEldritch.luagetsexarchoreater, only for the influence the item actually has. The lookup table is built once fromdata.itemMods.Eldritch(no line is shared between Exarch and Eater mods there). Import goes throughBuildAndParseRaw, so it is covered by the same change, andBuildRawwrites 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:
TestItemEldritchTags_spec.lua, using a copied Sorcerer Gloves with both influences:BuildRawand parsing again.dev: 2 successes / 3 failures (the two negative tests pass there); on this branch 5 / 0.--tags=builds(the saved 3.13 builds): the same 900 failures, with identical messages, ondevand 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.