Skip to content

Fix "Tukohama, War's Herald" breaking fist of war support gem - #10325

Closed
vaisest wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
vaisest:fix-10310
Closed

Fix "Tukohama, War's Herald" breaking fist of war support gem#10325
vaisest wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
vaisest:fix-10310

Conversation

@vaisest

@vaisest vaisest commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #10310.

Description of the problem being solved:

It seems the grantedEffect.fromItem = true line was actually modifying the global table which means evaluating the tree node broke the actual support gem until the client was restarted. This works around that by copying the table in initEnv(). This seems to have fixed the problem without breaking other tests, but I'm not really convinced it can't be a problem elsewhere

Steps taken to verify a working solution:

  • Test added
  • Tests pass

Link to a build that showcases this PR:

See issue

Before screenshot:

After screenshot:

Comment thread src/Modules/CalcSetup.lua
if not fromItemReplacements[grantedEffect] then
local taggedGrantedEffect = copyTable(grantedEffect, true)
taggedGrantedEffect.fromItem = true
fromItemReplacements[grantedEffect] = taggedGrantedEffect

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With Fireball and a level 15 Added Cold Damage gem socketed together in Bitterdream, this change applies Added Cold Damage twice. In this reproduction, enabling the gem raises average damage from 1413.86 to 1945.02 and mana cost from 41 to 49; before this change, enabling it changes neither value.

The copied support definition is no longer recognized as the same support by addBestSupport, so both copies enter the calculation.

AI-assisted review disclosure: This finding was identified during a review using OpenAI Codex and confirmed with a focused reproduction.

@vaisest vaisest closed this Sep 5, 2026
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.

Simulating "Tukohama, War's Herald" prevents Fist of War from supporting skills granted by items.

2 participants