Abyss timeless jewels: two-line passives with the same roll range show one roll on both lines

未關閉
#10,432 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 8 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
68/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
lua

研究方向

Start in src/Classes/PassiveSpec.lua around the Abyss branch at lines 1284–1288 and compare it with the Glorious Vanity handling around line 1313. Check how changedNode.sd, changedNode.sortedStats, and stat indices align, especially for kalguur_notable_22, then inspect the related tree conquest path. Done when each passive line uses its own roll in both the displayed text and calculation; the issue includes reproduction steps and expected values.

由索引模型根據 Issue 內容生成。

描述

What happens

For Abyss timeless jewels (Destructive Aspiration, Reclaimed Malevolence, etc.), a conquered passive with two lines that share the same roll range shows the same rolled value on both lines, even when the jewel rolled them differently. Which of the two rolls is shown depends on Lua table iteration order, so it can differ between PoB sessions.

Affected legion entries at current dev:

  • abyss_ghastly_small_attribute35 and abyss_special_small_attribute35: "Minions have (2-3)% increased Attack Speed" / "Minions have (2-3)% increased Cast Speed"
  • vaal_notable_dodge_1: "(8-10)% chance to Avoid Elemental Ailments" / "(8-10)% chance to Avoid being Stunned"
  • kalguur_notable_22: "20% faster Restoration of Ward" / "20% faster start of Energy Shield Recharge" (fixed text, replaced through the min ~= value branch)

Steps:

  1. Socket Destructive Aspiration with a seed and socket where a small passive becomes the Minion Attack/Cast Speed node, with different rolls for the two stats (e.g. 2% and 3%). The Timeless Jewel search window shows the two rolls separately.
  2. Hover the passive on the tree.

Expected: "Minions have 2% increased Attack Speed" and "Minions have 3% increased Cast Speed" (each line uses its own roll).
Actual: both lines show the same value (2% and 2%, or 3% and 3%), and the calculation uses that value for both.

Cause

For each output line, the code loops over all stats of the node with pairs() and applies each one's substitution to the line:

replaceHelperFunc replaces the literal "(min-max)" text (or the fixed value):

When both stats have the same range text, whichever stat pairs() visits first fills the placeholder on every line, and the other roll is never used. The Glorious Vanity branch already picks one stat per line via sortedStats[i] (PassiveSpec.lua#L1313), and the Timeless Jewel search reads rolls by stat index with data.getAbyssJewelComponentRoll (TreeTab.lua#L2594-L2595). Only the tree conquest path has this problem.

Possible fix

In the Abyss branch, substitute only the stat that belongs to the line instead of looping over all stats:

for statIndex, statLine in ipairs(changedNode.sd) do
	local statKey = changedNode.sortedStats[statIndex]
	local statMod = changedNode.stats[statKey]
	statLine = replaceHelperFunc(statLine, statKey, statMod, component.rolls[statMod.index])
	...

(Check that sd and sortedStats are aligned for these entries. For kalguur_notable_22, index is the reverse of line order.) The additions loop at PassiveSpec.lua#L1351 uses the same pairs(addition.stats) pattern. It is harmless for single-stat additions.

主要語言
Lua
星號
5.5k
分支
2.4k
平均合併
6 天 14 小時
30 天內合併 PR
13

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

PathOfBuildingCommunity/PathOfBuilding 的其他 Issue

查看 PathOfBuildingCommunity/PathOfBuilding 的全部 Issue

相似的 Issue

更多 Lua Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。