diff --git a/spec/System/TestPolaricDevastation_spec.lua b/spec/System/TestPolaricDevastation_spec.lua new file mode 100644 index 0000000000..930a4b59f7 --- /dev/null +++ b/spec/System/TestPolaricDevastation_spec.lua @@ -0,0 +1,53 @@ +describe("Polaric Devastation", function() + before_each(function() + newBuild() + end) + + local function rebuild() + build.configTab:BuildModList() + runCallback("OnFrame") + end + + for _, case in ipairs({ + { skill = "Fireball", condition = "conditionEnemyIgnited", otherCondition = "conditionEnemyFrozen", manual = "conditionEnemyCoveredInAsh", damage = "FireDamageTaken" }, + { skill = "Freezing Pulse", condition = "conditionEnemyFrozen", otherCondition = "conditionEnemyIgnited", manual = "conditionEnemyCoveredInFrost", damage = "ColdDamageTaken" }, + }) do + it("applies the notable to " .. case.skill .. " only with the required ailment", function() + build.skillsTab:PasteSocketGroup(case.skill .. " 20/0 1") + build.spec:SelectClass(build.spec.tree.classNameMap.Scion) + build.spec:SelectAscendClass(build.spec.tree.ascendNameMap.Reliquarian.ascendClassId) + local node = build.spec.nodes[48410] + assert.are.equal("Polaric Devastation", node.name) + build.spec:AllocNode(node) + build.buildFlag = true + build.configTab.input[case.otherCondition] = true + rebuild() + local baseDPS = build.calcsTab.mainOutput.TotalDPS + assert.is_true(baseDPS > 0) + assert.are.equal(0, build.calcsTab.mainEnv.enemyDB:Sum("INC", nil, case.damage)) + + -- The manual setting is a working control for the same final calculation. + build.configTab.input[case.manual] = true + rebuild() + assert.are.equal(20, build.calcsTab.mainEnv.enemyDB:Sum("INC", nil, case.damage)) + assert.are.near(baseDPS * 1.2, build.calcsTab.mainOutput.TotalDPS, baseDPS * 1e-9) + + build.configTab.input[case.manual] = false + build.configTab.input[case.condition] = true + rebuild() + assert.are.equal(20, build.calcsTab.mainEnv.enemyDB:Sum("INC", nil, case.damage)) + assert.are.near(baseDPS * 1.2, build.calcsTab.mainOutput.TotalDPS, baseDPS * 1e-9) + + build.configTab.input[case.manual] = true + rebuild() + assert.are.equal(20, build.calcsTab.mainEnv.enemyDB:Sum("INC", nil, case.damage)) + assert.are.near(baseDPS * 1.2, build.calcsTab.mainOutput.TotalDPS, baseDPS * 1e-9) + + build.configTab.input[case.manual] = false + build.configTab.input[case.condition] = false + rebuild() + assert.are.equal(0, build.calcsTab.mainEnv.enemyDB:Sum("INC", nil, case.damage)) + assert.are.near(baseDPS, build.calcsTab.mainOutput.TotalDPS, baseDPS * 1e-9) + end) + end +end) diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index c0ba5d2363..731e4cb2fd 100755 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -14795,12 +14795,11 @@ c["Count as having maximum number of Frenzy Charges"]={{[1]={flags=0,keywordFlag c["Count as having maximum number of Power Charges"]={{[1]={flags=0,keywordFlags=0,name="HaveMaximumPowerCharges",type="FLAG",value=true}},nil} c["Counts as Dual Wielding"]={{[1]={flags=0,keywordFlags=0,name="WeaponData",type="LIST",value={key="countsAsDualWielding",value=true}}},nil} c["Counts as all One Handed Melee Weapon Types"]={{[1]={flags=0,keywordFlags=0,name="WeaponData",type="LIST",value={key="countsAsAll1H",value=true}}},nil} -c["Cover Enemies in Ash for 5 seconds when you Ignite them"]={nil,"Cover Enemies in Ash for 5 seconds when you Ignite them "} -c["Cover Enemies in Ash for 5 seconds when you Ignite them Cover Enemies in Frost for 5 seconds when you Freeze them"]={nil,"Cover Enemies in Ash for 5 seconds when you Ignite them Cover Enemies in Frost for 5 seconds when you Freeze them "} +c["Cover Enemies in Ash for 5 seconds when you Ignite them"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="Ignited"},flags=0,keywordFlags=0,name="CoveredInAshEffect",type="BASE",value=20}},nil} c["Cover Enemies in Ash when they Hit you"]={nil,"Cover Enemies in Ash when they Hit you "} c["Cover Enemies in Ash when they Hit you Avatar of Fire"]={nil,"Cover Enemies in Ash when they Hit you Avatar of Fire "} c["Cover Enemies in Ash when they Hit you Nearby Enemies are Covered in Ash"]={nil,"Cover Enemies in Ash when they Hit you Nearby Enemies are Covered in Ash "} -c["Cover Enemies in Frost for 5 seconds when you Freeze them"]={nil,"Cover Enemies in Frost for 5 seconds when you Freeze them "} +c["Cover Enemies in Frost for 5 seconds when you Freeze them"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="Frozen"},flags=0,keywordFlags=0,name="CoveredInFrostEffect",type="BASE",value=20}},nil} c["Cover Full Life Enemies in Ash for 10 seconds on Melee Weapon Hit"]={nil,"Cover Full Life Enemies in Ash for 10 seconds on Melee Weapon Hit "} c["Cover Full Life Enemies in Ash for 7 seconds on Melee Weapon Hit"]={nil,"Cover Full Life Enemies in Ash for 7 seconds on Melee Weapon Hit "} c["Create Consecrated Ground when Hit, lasting 8 seconds"]={nil,"Create Consecrated Ground when Hit, lasting 8 seconds "} @@ -15005,8 +15004,8 @@ c["Damage of Enemies Hitting you is Unlucky while you are on Full Life"]={nil,"D c["Damage of Enemies Hitting you is Unlucky while you are on Low Life"]={nil,"Damage of Enemies Hitting you is Unlucky while you are on Low Life "} c["Damage of Enemies Hitting you is Unlucky while you have a Magic Ring Equipped"]={nil,"Damage of Enemies Hitting you is Unlucky while you have a Magic Ring Equipped "} c["Damage of Enemies Hitting you is Unlucky while you have a Magic Ring Equipped You are Hexproof if you have a Magic Ring in right slot"]={nil,"Damage of Enemies Hitting you is Unlucky while you have a Magic Ring Equipped You are Hexproof if you have a Magic Ring in right slot "} -end)();(function() c["Damage of Hits against you is Lucky"]={nil,"Damage of Hits is Lucky "} +end)();(function() c["Damage over Time Multiplier for Ailments is equal to Critical Strike Multiplier"]={{[1]={flags=0,keywordFlags=0,name="DotMultiplierIsCritMultiplier",type="FLAG",value=true}},nil} c["Damage taken bypasses Unbroken Ward if the Hit deals less Damage than 15% of Ward"]={{[1]={flags=0,keywordFlags=0,name="WardBypassBelowPercent",type="BASE",value=15}},nil} c["Damage taken from Blocked Hits cannot bypass Energy Shield"]={{[1]={[1]={neg=true,type="Condition",var="EVBypass"},flags=0,keywordFlags=0,name="BlockedDamageDoesntBypassES",type="FLAG",value=true}},nil} @@ -20007,8 +20006,8 @@ c["Skills Socketed in your Boots are Supported by level 20 Impale"]={{[1]={[1]={ c["Skills Socketed in your Boots are Supported by level 20 Increased Area of Effect"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportIncreasedAreaOfEffect"}}},nil} c["Skills Socketed in your Boots are Supported by level 20 Increased Critical Damage"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportIncreasedCriticalDamage"}}},nil} c["Skills Socketed in your Boots are Supported by level 20 Increased Critical Strikes"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportIncreasedCriticalStrikes"}}},nil} -end)();(function() c["Skills Socketed in your Boots are Supported by level 20 Infernal Legion"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportInfernalLegion"}}},nil} +end)();(function() c["Skills Socketed in your Boots are Supported by level 20 Infused Channelling"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportInfusedChannelling"}}},nil} c["Skills Socketed in your Boots are Supported by level 20 Innervate"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportInnervate"}}},nil} c["Skills Socketed in your Boots are Supported by level 20 Inspiration"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportInspiration"}}},nil} diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 9d5d1db3a0..a55d39b8e7 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -4343,6 +4343,8 @@ local specialModList = { } end, ["left ring slot: cover enemies in ash for (%d+) seconds when you ignite them"] = { mod("CoveredInAshEffect", "BASE", 20, { type = "SlotNumber", num = 1 }, { type = "ActorCondition", actor = "enemy", var = "Ignited" }) }, ["right ring slot: cover enemies in frost for (%d+) seconds when you freeze them"] = { mod("CoveredInFrostEffect", "BASE", 20, { type = "SlotNumber", num = 2 }, { type = "ActorCondition", actor = "enemy", var = "Frozen" }) }, + ["cover enemies in ash for (%d+) seconds when you ignite them"] = { mod("CoveredInAshEffect", "BASE", 20, { type = "ActorCondition", actor = "enemy", var = "Ignited" }) }, + ["cover enemies in frost for (%d+) seconds when you freeze them"] = { mod("CoveredInFrostEffect", "BASE", 20, { type = "ActorCondition", actor = "enemy", var = "Frozen" }) }, ["nearby enemies are covered in ash"] = { mod("CoveredInAshEffect", "BASE", 20) }, ["nearby enemies are covered in ash if you haven't moved in the past (%d+) seconds"] = function(num) return { mod("CoveredInAshEffect", "BASE", 20, { type = "MultiplierThreshold", var = "StationarySeconds", threshold = num }, { type = "Condition", var = "Stationary" }) } end, ["your warcries cover enemies in ash for (%d+) seconds"] = { mod("CoveredInAshEffect", "BASE", 20, { type = "Condition", var = "UsedWarcryRecently" }) },