Tree hover preview uses the stale Split Personality distance to class start
維護者通常 8 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start with src/Modules/CalcSetup.lua around the jewel scaling and hover preview code, then read src/Classes/PassiveSpec.lua for how distanceToClassStart is built. Trace how override.addNodes and removeNodes affect env.allocNodes, and compare the preview with the result after allocation. Done when the preview uses the hypothetical path distance and matches the post-allocation Split Personality bonus.
由索引模型根據 Issue 內容生成。
描述
What happens
The passive tree hover preview ("allocating this node will give you...") for a node that changes a Split Personality socket's distance to the class start uses the current distance, not the distance after the allocation. The preview then disagrees with the result after clicking.
The easiest case to reproduce (derived from the code):
- Allocate a jewel socket some way from your class start and socket Split Personality in it. Note the jewel's bonus (e.g. "+N to Strength", scaled by 25% per passive between the socket and the class start).
- Deallocate only the socket node (keep the path to it), so the jewel stays assigned to the now-unallocated socket.
- Hover the socket node.
Expected: the preview shows the Split Personality bonus at the scaled value you get after allocating the socket.
Actual: the preview shows the jewel at its unscaled base value (distance 0). After clicking, the stats are higher than the preview said.
The same happens when you hover a node that gives an allocated Split Personality socket a shorter (or longer) allocated path to the class start: the preview uses the old distance.
Cause
The jewel scale is read from the node's cached distanceToClassStart:
distanceToClassStart is only written by PassiveSpec:BuildAllDependsAndPaths from the live allocation. It is reset to 0 for every socket and then set only for allocated sockets, walking only allocated nodes:
- https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/a69391d6daaaea1aaf8054668a094aad88dd7eaa/src/Classes/PassiveSpec.lua#L1655
- https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/a69391d6daaaea1aaf8054668a094aad88dd7eaa/src/Classes/PassiveSpec.lua#L1712-L1716
- https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/a69391d6daaaea1aaf8054668a094aad88dd7eaa/src/Classes/PassiveSpec.lua#L949-L953
The hover preview runs CALCULATOR mode with override.addNodes/removeNodes (CalcSetup.lua#L726-L729). That changes env.allocNodes (so the jewel in the not-yet-allocated socket applies, #L860), but the distance is never worked out again for the hypothetical allocation.
Possible fix
When override.addNodes/removeNodes is present, work out the distance for sockets holding a jewelIncEffectFromClassStart jewel against env.allocNodes (same breadth-first search as SetNodeDistanceToClassStart), instead of reading the cached node field.
- 主要語言
- Lua
- 星號
- 5.5k
- 分支
- 2.4k
- 平均合併
- 6 天 14 小時
- 30 天內合併 PR
- 13
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
PathOfBuildingCommunity/PathOfBuilding 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
PathOfBuildingCommunity/PathOfBuilding#10431 ·
維護者通常 8 天內回覆
-
難度 2/5 1-3 小時 新手友好度 79/100
PathOfBuildingCommunity/PathOfBuilding#10428 ·
維護者通常 8 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 60/100
PathOfBuildingCommunity/PathOfBuilding#10420 ·
維護者通常 8 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 65/100
PathOfBuildingCommunity/PathOfBuilding#10395 ·
維護者通常 8 天內回覆
-
bug: accuracy
難度 2/5 1-3 小時 新手友好度 68/100
PathOfBuildingCommunity/PathOfBuilding#9911 ·
維護者通常 8 天內回覆
查看 PathOfBuildingCommunity/PathOfBuilding 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 5 天內回覆
-
enhancement priority::low upstream
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
bug reviewed-by-AI
難度 2/5 1-3 小時 新手友好度 82/100
olimorris/codecompanion.nvim#3508 ·
維護者通常 1 天內回覆
-
The Balanced badge stays on a card after it changes to an enhancement that isn't rebalanced可能已有人在做 @Jr-JoshS 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 71/100
Balatro-Multiplayer/BalatroMultiplayerPvP#640 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
Layr-Labs/arena-fortress#141 ·
維護者通常 1 天內回覆