Tree hover preview uses the stale Split Personality distance to class start
Maintainer antworten meist innerhalb von 8 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 55/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Lua
- Sterne
- 5.5k
- Forks
- 2.4k
- Ø Merge
- 6 T. 14 Std.
- Gemergte PRs (30 T.)
- 13
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus PathOfBuildingCommunity/PathOfBuilding
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
PathOfBuildingCommunity/PathOfBuilding#10431 ·
Maintainer antworten meist innerhalb von 8 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
PathOfBuildingCommunity/PathOfBuilding#10428 ·
Maintainer antworten meist innerhalb von 8 Tagen
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 60/100
PathOfBuildingCommunity/PathOfBuilding#10420 ·
Maintainer antworten meist innerhalb von 8 Tagen
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
PathOfBuildingCommunity/PathOfBuilding#10395 ·
Maintainer antworten meist innerhalb von 8 Tagen
-
bug: accuracy
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
PathOfBuildingCommunity/PathOfBuilding#9911 ·
Maintainer antworten meist innerhalb von 8 Tagen
Alle Issues in PathOfBuildingCommunity/PathOfBuilding
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 5 Tagen
-
enhancement priority::low upstream
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug reviewed-by-AI
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
olimorris/codecompanion.nvim#3508 ·
Maintainer antworten meist innerhalb von 1 Tag
-
The Balanced badge stays on a card after it changes to an enhancement that isn't rebalancedEvtl. vergeben @Jr-JoshS hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 71/100
Balatro-Multiplayer/BalatroMultiplayerPvP#640 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Babies count as citizens for housing and the lost-fort check, though a baby uses no bed or seatOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Layr-Labs/arena-fortress#141 ·
Maintainer antworten meist innerhalb von 1 Tag