PathOfBuildingCommunity / PathOfBuildingCommunity/PathOfBuilding

Fix issues around scaleability and Runegraft of the Bound

Open
#8,980 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug: calculation
Dominant language
Lua
Stars
5.4k
Forks
2.4k
Avg merge
1d 12h
Merged PRs (30d)
26

Description

Revisiting this code when looking over this PR makes me realize there are a few more hidden gotchas here.

  1. Making a mod unscalable in a LIST mod doesn't do anything. An example of this would be "banners also cause enemies to take (%d+)%% increased damage". This code only checks for unscalable at the LIST level, not for each subMod: https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/78326a60910b00739c5f33be69cb140cd164a12c/src/Classes/ModStore.lua#L37-L50
  2. Unscaleable mods get added twice. I tested "take no extra damage from critical strikes" and saw the value double (even though there is a hard cap on a lot of these unscalable mods
image

In short, I'll merge this PR but I needed to write this down somewhere so it can be refactored again, with proper test cases added for all these corner cases.

Originally posted by @Wires77 in https://github.com/PathOfBuildingCommunity/PathOfBuilding/issues/8977#issuecomment-3251710545

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/Classes/ModStore.lua at the linked scaleability logic and trace how LIST mods and unscalable mods are processed. Add test cases for per-subMod unscalable handling and duplicate application, then verify that the affected modifiers produce the expected values without double counting.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
game-dev
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.