Repository navigation
Fix Consecrated Ground you create grants mods not scaling with Consecrated Ground effect - #10509
Open
lucaskarsten wants to merge 2 commits into
Open
lucaskarsten wants to merge 2 commits into
lucaskarsten wants to merge 2 commits into
Conversation
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.
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? ?grantsprefix, which only added anOnConsecratedGroundcondition. The result was a flatManaRegen INC 30that 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 (
BuffDefinitionsidground_consecration, alongsidelife_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 inCalcPerform.The fix is at the prefix, so every mod that goes through it is scaled, not only the runegraft:
Multipliertag (var = "ConsecratedGroundEffect",div = 100,noFloor = true).calcs.performsetsmodDB.multipliers["ConsecratedGroundEffect"] = 100 + Sum(INC, "ConsecratedGroundEffect")right after keystones are merged (computed once, so aConsecratedGroundEffectsource 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:
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. Ondevit 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 theModParser.luachange is reverted, so the parser change itself is covered.dev).--tags=builds(the saved 3.13 builds): the same 900 failures, with identical messages, ondevand 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%.