diff --git a/spec/System/TestDefence_spec.lua b/spec/System/TestDefence_spec.lua index 1a7f328959..5a0ed18da4 100644 --- a/spec/System/TestDefence_spec.lua +++ b/spec/System/TestDefence_spec.lua @@ -169,6 +169,30 @@ describe("TestDefence", function() assert.is_true(fireResistOnConsecratedGround > build.calcsTab.mainOutput.FireResist) end) + it("scales Consecrated Ground you create grants mods with Consecrated Ground effect (issue #9696)", function() + local function measure(effect) + newBuild() + build.configTab.input.conditionOnConsecratedGround = true + build.configTab.input.customMods = "Consecrated Ground you create grants 30% increased Mana Regeneration\n" + .. "Consecrated Ground you create grants +2% maximum Chaos Resistance to you and Allies\n" + .. "Consecrated Ground you create also grants 50% reduced duration of Damaging Ailments on you\n" + .. (effect and effect .. "% increased Effect of Consecrated Ground you create" or "") + build.configTab:BuildModList() + runCallback("OnFrame") + local modDB = build.calcsTab.mainEnv.player.modDB + return build.calcsTab.mainOutput.ManaRegenInc, modDB:Sum("BASE", nil, "ChaosResistMax"), modDB:Sum("INC", nil, "SelfIgniteDuration") + end + local manaInc, chaosMax, igniteDuration = measure() + assert.are.equals(30, manaInc) + local baseChaosMax = chaosMax + assert.are.equals(-50, igniteDuration) + + manaInc, chaosMax, igniteDuration = measure(50) + assert.are.equals(45, manaInc) + assert.are.equals(baseChaosMax + 1, chaosMax) + assert.are.equals(-75, igniteDuration) + end) + -- boring part it("no armour max hits", function() build.configTab.input.enemyIsBoss = "None" diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index da1918b9f9..cb3a7d608b 100755 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -15128,18 +15128,18 @@ c["Consecrated Ground created by this Flask has Tripled Radius +2% to Critical S c["Consecrated Ground created during Effect applies 10% increased Damage taken to Enemies"]={{[1]={[1]={type="Condition",var="UsingFlask"},flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={[1]={type="Condition",var="OnConsecratedGround"},flags=0,keywordFlags=0,name="DamageTakenConsecratedGround",type="INC",value=10}}}},nil} c["Consecrated Ground created during Effect applies 9% increased Damage taken to Enemies"]={{[1]={[1]={type="Condition",var="UsingFlask"},flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={[1]={type="Condition",var="OnConsecratedGround"},flags=0,keywordFlags=0,name="DamageTakenConsecratedGround",type="INC",value=9}}}},nil} c["Consecrated Ground you create also grants"]={nil,""} -c["Consecrated Ground you create also grants 50% reduced duration of Damaging Ailments on you"]={{[1]={[1]={type="Condition",var="OnConsecratedGround"},flags=0,keywordFlags=0,name="SelfIgniteDuration",type="INC",value=-50},[2]={[1]={type="Condition",var="OnConsecratedGround"},flags=0,keywordFlags=0,name="SelfBleedDuration",type="INC",value=-50},[3]={[1]={type="Condition",var="OnConsecratedGround"},flags=0,keywordFlags=0,name="SelfPoisonDuration",type="INC",value=-50}},nil} +c["Consecrated Ground you create also grants 50% reduced duration of Damaging Ailments on you"]={{[1]={[1]={type="Condition",var="OnConsecratedGround"},[2]={div=100,noFloor=true,type="Multiplier",var="ConsecratedGroundEffect"},flags=0,keywordFlags=0,name="SelfIgniteDuration",type="INC",value=-50},[2]={[1]={type="Condition",var="OnConsecratedGround"},[2]={div=100,noFloor=true,type="Multiplier",var="ConsecratedGroundEffect"},flags=0,keywordFlags=0,name="SelfBleedDuration",type="INC",value=-50},[3]={[1]={type="Condition",var="OnConsecratedGround"},[2]={div=100,noFloor=true,type="Multiplier",var="ConsecratedGroundEffect"},flags=0,keywordFlags=0,name="SelfPoisonDuration",type="INC",value=-50}},nil} c["Consecrated Ground you create applies 10% increased Damage taken to Enemies"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={[1]={type="Condition",var="OnConsecratedGround"},flags=0,keywordFlags=0,name="DamageTakenConsecratedGround",type="INC",value=10}}}},nil} c["Consecrated Ground you create applies 15% increased Damage taken to Enemies"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={[1]={type="Condition",var="OnConsecratedGround"},flags=0,keywordFlags=0,name="DamageTakenConsecratedGround",type="INC",value=15}}}},nil} c["Consecrated Ground you create applies 6% increased Damage taken to Enemies"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={[1]={type="Condition",var="OnConsecratedGround"},flags=0,keywordFlags=0,name="DamageTakenConsecratedGround",type="INC",value=6}}}},nil} c["Consecrated Ground you create applies 9% increased Damage taken to Enemies"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={[1]={type="Condition",var="OnConsecratedGround"},flags=0,keywordFlags=0,name="DamageTakenConsecratedGround",type="INC",value=9}}}},nil} c["Consecrated Ground you create causes Life Regeneration to"]={nil,"Consecrated Ground you create causes Life Regeneration to "} c["Consecrated Ground you create causes Life Regeneration to also Recover Energy Shield for you and Allies"]={{[1]={flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={[1]={type="Condition",var="OnConsecratedGround"},flags=0,keywordFlags=0,name="LifeRegenerationRecoversEnergyShield",type="FLAG",value=true}}}},nil} -c["Consecrated Ground you create grants +2% maximum Chaos Resistance to you and Allies"]={{[1]={[1]={type="Condition",var="OnConsecratedGround"},flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=0,name="ChaosResistMax",type="BASE",value=2}}}},nil} +c["Consecrated Ground you create grants +2% maximum Chaos Resistance to you and Allies"]={{[1]={[1]={type="Condition",var="OnConsecratedGround"},[2]={div=100,noFloor=true,type="Multiplier",var="ConsecratedGroundEffect"},flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=0,name="ChaosResistMax",type="BASE",value=2}}}},nil} c["Consecrated Ground you create grants 30% increased Accuracy Rating to you and Allies"]={{[1]={flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={[1]={type="Condition",var="OnConsecratedGround"},flags=0,keywordFlags=0,name="ConsecratedGroundAlsoAccuracy",type="INC",value=30}}}},nil} -c["Consecrated Ground you create grants 30% increased Mana Regeneration"]={{[1]={[1]={type="Condition",var="OnConsecratedGround"},flags=0,keywordFlags=0,name="ManaRegen",type="INC",value=30}},nil} -c["Consecrated Ground you create grants 5% reduced damage taken to you and Allies"]={{[1]={[1]={type="Condition",var="OnConsecratedGround"},flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageTaken",type="INC",value=-5}}}},nil} -c["Consecrated Ground you create grants 6% reduced damage taken to you and Allies"]={{[1]={[1]={type="Condition",var="OnConsecratedGround"},flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageTaken",type="INC",value=-6}}}},nil} +c["Consecrated Ground you create grants 30% increased Mana Regeneration"]={{[1]={[1]={type="Condition",var="OnConsecratedGround"},[2]={div=100,noFloor=true,type="Multiplier",var="ConsecratedGroundEffect"},flags=0,keywordFlags=0,name="ManaRegen",type="INC",value=30}},nil} +c["Consecrated Ground you create grants 5% reduced damage taken to you and Allies"]={{[1]={[1]={type="Condition",var="OnConsecratedGround"},[2]={div=100,noFloor=true,type="Multiplier",var="ConsecratedGroundEffect"},flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageTaken",type="INC",value=-5}}}},nil} +c["Consecrated Ground you create grants 6% reduced damage taken to you and Allies"]={{[1]={[1]={type="Condition",var="OnConsecratedGround"},[2]={div=100,noFloor=true,type="Multiplier",var="ConsecratedGroundEffect"},flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageTaken",type="INC",value=-6}}}},nil} c["Consecrated Ground you create while affected by Zealotry causes enemies to take 10% increased Damage"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="OnConsecratedGround"},[2]={type="Condition",var="AffectedByZealotry"},flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageTakenConsecratedGround",type="INC",value=10}}}},nil} c["Consecrated Ground you create while affected by Zealotry causes enemies to take 9% increased Damage"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="OnConsecratedGround"},[2]={type="Condition",var="AffectedByZealotry"},flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageTakenConsecratedGround",type="INC",value=9}}}},nil} c["Consumes Frenzy Charges on use"]={nil,"Consumes Frenzy Charges on use "} diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index 9fe4527156..27fcd9b168 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -1305,6 +1305,10 @@ function calcs.perform(env, skipEHP) env.keystonesAdded = { } modLib.mergeKeystones(env, env.modDB) + -- Scales "Consecrated Ground you create grants ..." mods. Computed once here, before extra auras are applied, + -- so ConsecratedGroundEffect sources added later in this pass are not included + modDB.multipliers["ConsecratedGroundEffect"] = 100 + modDB:Sum("INC", nil, "ConsecratedGroundEffect") + -- Build minion skills for _, activeSkill in ipairs(env.player.activeSkillList) do activeSkill.skillModList = new("ModList"):ModList(activeSkill.baseSkillModList) diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 85e4cd8e3b..44878867eb 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -1321,7 +1321,7 @@ local preFlagList = { ["attacks with energy blades "] = { flags = ModFlag.Attack, tag = { type = "Condition", var = "AffectedByEnergyBlade" } }, ["^for each nearby corpse, "] = { tag = { type = "Multiplier", var = "NearbyCorpse" } }, ["^enemies in your link beams have "] = { tag = { type = "Condition", var = "BetweenYouAndLinkedTarget" }, applyToEnemy = true }, - ["^consecrated ground you create a?l?s?o? ?grants "] = { tag = { type = "Condition", var = "OnConsecratedGround" } }, + ["^consecrated ground you create a?l?s?o? ?grants "] = { tagList = { { type = "Condition", var = "OnConsecratedGround" }, { type = "Multiplier", var = "ConsecratedGroundEffect", div = 100, noFloor = true } } }, -- While in the presence of... ["^while a unique enemy is in your presence, "] = { tag = { type = "ActorCondition", actor = "enemy", var = "RareOrUnique" } }, ["^while a pinnacle atlas boss is in your presence, "] = { tag = { type = "ActorCondition", actor = "enemy", var = "PinnacleBoss" } },