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 天内回复