Skip to content

Fix Consecrated Ground you create grants mods not scaling with Consecrated Ground effect - #10509

Open
lucaskarsten wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
lucaskarsten:fix/9696-runegraft-consecration-effect
Open

lucaskarsten wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
lucaskarsten:fix/9696-runegraft-consecration-effect

Conversation

@lucaskarsten

Copy link
Copy Markdown
Contributor

Fixes #9696

Description of the problem being solved:

Runegraft of Consecration's "Consecrated Ground you create grants 30% increased Mana Regeneration Rate to you and Allies" (your_consecrated_ground_grants_mana_regeneration_rate_+%) is parsed through the generic ^consecrated ground you create a?l?s?o? ?grants prefix, which only added an OnConsecratedGround condition. The result was a flat ManaRegen INC 30 that ignored "increased Effect of Consecrated Ground you create" (Devotion, etc.).

In the game data, mana regeneration is one of the stats of the Consecrated Ground buff itself (BuffDefinitions id ground_consecration, alongside life_regeneration_rate_per_minute_%, accuracy_rating_+%, base_maximum_chaos_damage_resistance_%, self_damaging_ailment_duration_+%, curse_effect_on_self_+%), so it is scaled by the ground's effect like the base life regen and curse reduction that PoB already scales in CalcPerform.

The fix is at the prefix, so every mod that goes through it is scaled, not only the runegraft:

  • The prefix now also carries a Multiplier tag (var = "ConsecratedGroundEffect", div = 100, noFloor = true).
  • calcs.perform sets modDB.multipliers["ConsecratedGroundEffect"] = 100 + Sum(INC, "ConsecratedGroundEffect") right after keystones are merged (computed once, so a ConsecratedGroundEffect source added later in the pass would not be included), so it is ready before the extra-aura pass that reads the "to you and Allies" versions.

Mods affected (ModCache regenerated): the runegraft's mana regeneration, "+2% maximum Chaos Resistance to you and Allies", "5%/6% reduced damage taken to you and Allies", and "also grants 50% reduced duration of Damaging Ailments on you". The Accuracy and elemental ailment immunity versions have their own patterns and are unchanged.

Steps taken to verify a working solution:

  • Added a test in TestDefence_spec.lua. On Consecrated Ground, with no effect: ManaRegenInc 30, ignite duration -50%, the base max chaos res. With "50% increased Effect of Consecrated Ground you create": 45, -75% and +1 max chaos res. On dev it fails (ManaRegenInc stays at 30); it passes on this branch. Run without the ModCache (REGENERATE_MOD_CACHE=1, parser runs live) it passes, and fails again (30 instead of 45) if only the ModParser.lua change is reverted, so the parser change itself is covered.
  • Full busted suite: 746 successes, 0 failures (745 on dev).
  • --tags=builds (the saved 3.13 builds): the same 900 failures, with identical messages, on dev and on this branch, so no saved-build output changed.

Link to a build that showcases this PR:

https://pobb.in/UWJuIWhupUT0 (the issue's minimal repro: Runegraft of Consecration + 25% increased Effect of Consecrated Ground).

Before screenshot:

Mana Regeneration: 50% increased (the runegraft's 30% unscaled), 2.8 mana/sec.

After screenshot:

Same build: 57.5% increased (30% × 1.25 = 37.5%), 2.9 mana/sec. With the 25% effect cancelled it goes back to 50%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Runegraft of Consecration doesn't scale with consecrated ground effect

1 participant