Tree hover preview uses the stale Split Personality distance to class start
Les mainteneurs répondent en général sous 8 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 55/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Lua
- Étoiles
- 5.5k
- Forks
- 2.4k
- Merge moyen
- 6 j 14 h
- PR mergées (30 j)
- 13
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de PathOfBuildingCommunity/PathOfBuilding
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
PathOfBuildingCommunity/PathOfBuilding#10431 ·
Les mainteneurs répondent en général sous 8 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 79/100
PathOfBuildingCommunity/PathOfBuilding#10428 ·
Les mainteneurs répondent en général sous 8 jours
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 60/100
PathOfBuildingCommunity/PathOfBuilding#10420 ·
Les mainteneurs répondent en général sous 8 jours
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
PathOfBuildingCommunity/PathOfBuilding#10395 ·
Les mainteneurs répondent en général sous 8 jours
-
bug: accuracy
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
PathOfBuildingCommunity/PathOfBuilding#9911 ·
Les mainteneurs répondent en général sous 8 jours
Toutes les issues de PathOfBuildingCommunity/PathOfBuilding
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 5 jours
-
enhancement priority::low upstream
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
bug reviewed-by-AI
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
olimorris/codecompanion.nvim#3508 ·
Les mainteneurs répondent en général sous 1 jour
-
The Balanced badge stays on a card after it changes to an enhancement that isn't rebalancedPeut-être pris @Jr-JoshS l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 71/100
Balatro-Multiplayer/BalatroMultiplayerPvP#640 ·
Les mainteneurs répondent en général sous 1 jour
-
Babies count as citizens for housing and the lost-fort check, though a baby uses no bed or seatOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Layr-Labs/arena-fortress#141 ·
Les mainteneurs répondent en général sous 1 jour