feat(calc): implement DistanceRamp tag (Close/Far Combat distance MORE)#14
Merged
Conversation
Add the PoB2 DistanceRamp modifier tag (ModStore.lua:574-590): Close Combat /
Far Combat / Point Blank / Far Shot grant a MORE/INC damage mod whose value is
linearly interpolated against the enemy distance. Previously translate_tag had
no DistanceRamp arm, so the whole mod entry fell to UnsupportedTag and was
dropped.
Pipeline: stat_map_engine translate_tag parses the ramp point list into a new
ModTag::DistanceRamp { ramp }; Modifier::effective_number interpolates value by
ramp_factor(ramp, skillDist) with endpoint clamp; canonical_tag + matches() get
the new arm.
skillDist source = CalcConfig::skill_distance, set in the orchestrator to
mode_effective && the enemyDistance <Input> value ONLY. This mirrors vendor
exactly: skillCfg.skillDist = env.mode_effective and env.configInput.enemyDistance
(CalcActiveSkill.lua:655), where configInput is the <Input> channel and does NOT
include <Placeholder> values. The placeholder-inclusive Multiplier:enemyDistance
(ConfigTab apply fallback) is a separate channel feeding only the accuracy
distance penalty.
All 18 demo-bd-test builds carry enemyDistance as <Placeholder> (none as
<Input>), so skill_distance is None and every DistanceRamp mod is skipped --
matching the golden output (PoB2 likewise applies no Close Combat distance MORE
to these builds). parity_no_regression unchanged; the tag activates only for
builds that set enemyDistance as an explicit Input. Unit tests cover
interpolation, endpoint clamp, and the None-skip path.
Static-analysis roadmap (#1/#2/#5/#8) overturned by direct pob2-oracle runs: - #2 DistanceRamp: enemyDistance is <Placeholder> not <Input> in all 18 builds -> vendor skillDist=nil -> CC distance MORE never applies. Implemented the tag correctly (input-only skill_distance, dormant for demo suite). - monk-twister: Close Combat is NOT on the Twister skill group (it's on Hollow Focus / Righteous Descent). Real gap is crit-mult (tangled), not CC. - #1 Onslaught: real over-application, but grantor is a triggered Silver Charm and the roadmap's Condition:UsingFlask fix does not work (oracle: forcing UsingFlask still yields no Onslaught). Real gate is charm-effect-active. - Lesson: oracle-verify every offensive root cause before implementing.
…ffect-active) The earlier correction guessed the #1 gate was charm-effect-active. run-parsemod.sh shows the true cause: PoB2's ModParser leaves 'Grants Onslaught during effect' unsupported, so PoBR's parse_granted_buff_flag was an over-parse ahead of PoB2. Fixed in PR #15 (remove the parse). Add a third methodology trap (PoB2-unsupported mod-text -> PoBR over-parse) and mark #1 LANDED.
ackness
added a commit
that referenced
this pull request
Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the PoB2
DistanceRampmodifier tag — the distance-interpolated MORE/INCdamage that Close Combat / Far Combat / Point Blank / Far Shot grant. Previously
translate_taghad noDistanceRamparm, so the whole stat-map entry fell toUnsupportedTagand was silently dropped.This PR also lands the oracle-verified correction of the offensive Close-Combat
cluster roadmap, which turned out to be a static-analysis misdiagnosis.
What changed (commit
d3456ec)ModTag::DistanceRamp { ramp }+ linear interpolation with endpoint clamp inModifier::effective_number(ramp_factor, vendorModStore.lua:574-590line-for-line).translate_tagparses the ramp point list (stat_map_engine.rs);matches()andcanonical_tag()get the new arm.skillDistsource = newCalcConfig::skill_distance, set in the orchestrator tomode_effective && the enemyDistance <Input> value ONLY. This mirrors vendor exactly:skillCfg.skillDist = env.mode_effective and env.configInput.enemyDistance(
CalcActiveSkill.lua:655), whereconfigInputis the<Input>channel and doesnot include
<Placeholder>values. The placeholder-inclusiveMultiplier:enemyDistance(ConfigTab apply fallback) is a separate channel feedingonly the accuracy distance penalty.
Why it is dormant for the demo suite (and that is correct)
All 18
demo-bd-testbuilds carryenemyDistanceas<Placeholder number="20">, none as<Input>→skill_distance == None→ everyDistanceRampmod is skipped, matching thegolden output (PoB2 likewise applies no Close Combat distance MORE to these builds).
parity_no_regressionis therefore unchanged. The tag activates only for builds that setenemyDistanceas an explicit<Input>.Oracle proof (flicker-strike): editing the build's
enemyDistance5 → 40 leaves AvgDamageunchanged at 108623.8 (== golden); the
MoreDamageintermediate is 1.3 = Concentrated Areaonly, no Close Combat. The roadmap's expectation that DistanceRamp would move
monk-twister / flicker / shield-wall parity is void.
Roadmap correction (commit
7fabaca)devs/docs/audits/offensive-parity-roadmap-2026-06-28.mdgets a "MAJOR CORRECTION" sectionrecording the oracle-verified facts: #2 is not a parity-mover (placeholder enemyDistance),
monk-twister has no Close Combat on its Twister group, and #1 Onslaught is a real
over-application but the roadmap's
Condition:UsingFlaskfix does not work (the grantor is atrigger-gated Silver Charm). Methodology lesson: oracle-verify every offensive root cause
before implementing.
Test plan
cargo fmt --checkcleancargo clippy --workspace --all-targets -- -D warningscleancargo nextest run --workspace— 2097 passed, 5 skippedcargo test -p pobr-build --test parity—parity_no_regressionunchanged (dormant tag)None-skip path (panel / placeholder-only enemyDistance)