Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions spec/System/TestSkills_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -451,4 +451,99 @@ describe("TestSkills", function()
assert.are.equals(30, activeSkill.skillModList:Sum("MORE", activeSkill.skillCfg, "Damage"))
assert.True(build.calcsTab.calcsOutput.TotalDPS > noMinionDps)
end)

it("Test conditional exposure supports make exposure configurable", function()
build.itemsTab:CreateDisplayItemFromRaw([[
New Item
Razor Quarterstaff
Quality: 0
]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")

build.skillsTab:PasteSocketGroup("Killing Palm 20/0 1\nLightning Attunement 1/0 1\nLightning Exposure 1/0 1")
runCallback("OnFrame")

assert.True(build.calcsTab.mainEnv.player.modDB:GetCondition("CanApplyLightningExposure"))
end)

it("Test exposure supports on other active skills make exposure configurable", function()
build.itemsTab:CreateDisplayItemFromRaw([[
New Item
Razor Quarterstaff
Quality: 0
]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")

build.skillsTab:PasteSocketGroup("Spark 20/0 1")
build.skillsTab:PasteSocketGroup("Killing Palm 20/0 1\nLightning Attunement 1/0 1\nLightning Exposure 1/0 1")
runCallback("OnFrame")

assert.are.equals("Spark", build.calcsTab.mainEnv.player.mainSkill.activeEffect.grantedEffect.name)
assert.True(build.calcsTab.mainEnv.player.modDB:GetCondition("CanApplyLightningExposure"))

build.configTab.input.conditionEnemyLightningExposure = true
build.configTab:BuildModList()
runCallback("OnFrame")

assert.are.equals(20, build.calcsTab.mainEnv.enemyDB:Sum("BASE", nil, "LightningExposure"))
end)

it("Test Potent Exposure only scales exposure from supported skills", function()
build.skillsTab:PasteSocketGroup("Fireball 20/0 1\nFire Exposure 1/0 1")
build.configTab.input.conditionEnemyFireExposure = true
build.configTab:BuildModList()
runCallback("OnFrame")
local fireResistWithoutPotentExposure = build.calcsTab.mainEnv.enemyDB:Sum("BASE", nil, "FireResist")

newBuild()
build.skillsTab:PasteSocketGroup("Fireball 20/0 1\nFire Exposure 1/0 1")
build.skillsTab:PasteSocketGroup("Spark 20/0 1\nPotent Exposure 1/0 1")
build.configTab.input.conditionEnemyFireExposure = true
build.configTab:BuildModList()
runCallback("OnFrame")
assert.are.equals(fireResistWithoutPotentExposure, build.calcsTab.mainEnv.enemyDB:Sum("BASE", nil, "FireResist"))

newBuild()
build.skillsTab:PasteSocketGroup("Fireball 20/0 1\nFire Exposure 1/0 1\nPotent Exposure 1/0 1")
build.configTab.input.conditionEnemyFireExposure = true
build.configTab:BuildModList()
runCallback("OnFrame")
assert.are.equals(20, build.calcsTab.mainEnv.enemyDB:Sum("BASE", nil, "FireExposure"))
assert.True(build.calcsTab.mainEnv.enemyDB:Sum("BASE", nil, "FireResist") < fireResistWithoutPotentExposure)
end)

it("Test granted skills with exposure stats make exposure configurable", function()
build.skillsTab:PasteSocketGroup("Fireball 20/0 1")
local spec = build.spec
local brewConcoctionNode = spec.nodes[57141]
local shatteringConcoctionNode = spec.nodes[18940]
brewConcoctionNode.alloc = true
shatteringConcoctionNode.alloc = true
spec.allocNodes[brewConcoctionNode.id] = brewConcoctionNode
spec.allocNodes[shatteringConcoctionNode.id] = shatteringConcoctionNode
build.buildFlag = true
runCallback("OnFrame")
build.calcsTab.input.skill_number = 1
build.buildFlag = true
runCallback("OnFrame")

assert.are.equals("Fireball", build.calcsTab.mainEnv.player.mainSkill.activeEffect.grantedEffect.name)
assert.True(build.calcsTab.mainEnv.player.modDB:GetCondition("CanApplyFireExposure"))
assert.True(build.configTab.varControls.conditionEnemyFireExposure:shown())
end)

it("Test Refraction III exposure scales from player armour", function()
build.configTab.input.customMods = "+30000 to Armour"
build.configTab.input.bannerPlanted = true
build.configTab:BuildModList()
build.skillsTab:PasteSocketGroup("War Banner 20/0 1\nRefraction III 1/0 1")
runCallback("OnFrame")

assert.are.equals(30000, build.calcsTab.mainEnv.player.output.Armour)
assert.are.equals(60, build.calcsTab.mainEnv.enemyDB:Sum("BASE", nil, "FireExposure"))
assert.are.equals(20, build.calcsTab.mainEnv.enemyDB:Sum("BASE", nil, "FireResist"))
assert.True(build.calcsTab.mainEnv.enemyDB:Flag(nil, "Condition:HasExposure"))
end)
end)
10 changes: 5 additions & 5 deletions src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4798,7 +4798,7 @@ c["Enemies in your Presence have -10% to Fire Resistance"]={{[1]={flags=0,keywor
c["Enemies in your Presence have -25% to Fire Resistance"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={[1]={actor="enemy",type="ActorCondition",var="EnemyInPresence"},flags=0,keywordFlags=0,name="FireResist",type="BASE",value=-25}}}},nil}
c["Enemies in your Presence have 10% reduced Cooldown Recovery Rate"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={[1]={actor="enemy",type="ActorCondition",var="EnemyInPresence"},flags=0,keywordFlags=0,name="CooldownRecovery",type="INC",value=-10}}}},nil}
c["Enemies in your Presence have 75% reduced Life Regeneration rate"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={[1]={actor="enemy",type="ActorCondition",var="EnemyInPresence"},flags=0,keywordFlags=0,name="LifeRegen",type="INC",value=-75}}}},nil}
c["Enemies in your Presence have Exposure"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="EnemyInPresence"},flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="FireExposure",type="BASE",value=-20}}},[2]={[1]={actor="enemy",type="ActorCondition",var="EnemyInPresence"},flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="ColdExposure",type="BASE",value=-20}}},[3]={[1]={actor="enemy",type="ActorCondition",var="EnemyInPresence"},flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="LightningExposure",type="BASE",value=-20}}}},nil}
c["Enemies in your Presence have Exposure"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="EnemyInPresence"},flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="FireExposure",type="BASE",value=20}}},[2]={[1]={actor="enemy",type="ActorCondition",var="EnemyInPresence"},flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="ColdExposure",type="BASE",value=20}}},[3]={[1]={actor="enemy",type="ActorCondition",var="EnemyInPresence"},flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="LightningExposure",type="BASE",value=20}}}},nil}
c["Enemies in your Presence have Lightning Resistance equal to yours"]={{[1]={[1]={type="Condition",var="EnemyInPresence"},flags=0,keywordFlags=0,name="EnemyLightningResistEqualToYours",type="FLAG",value=true}},nil}
c["Enemies in your Presence have at least 10% of Life Reserved"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={[1]={actor="enemy",type="ActorCondition",var="EnemyInPresence"},flags=0,keywordFlags=0,name="LifeReservationPercent",type="BASE",value=10}}}},nil}
c["Enemies in your Presence have no Elemental Resistances"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={[1]={actor="enemy",type="ActorCondition",var="EnemyInPresence"},flags=0,keywordFlags=0,name="FireResist",type="OVERRIDE",value=0}}},[2]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={[1]={actor="enemy",type="ActorCondition",var="EnemyInPresence"},flags=0,keywordFlags=0,name="ColdResist",type="OVERRIDE",value=0}}},[3]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={[1]={actor="enemy",type="ActorCondition",var="EnemyInPresence"},flags=0,keywordFlags=0,name="LightningResist",type="OVERRIDE",value=0}}}},nil}
Expand Down Expand Up @@ -4878,7 +4878,7 @@ c["Excess Life Recovery added as Guard for 10 seconds Excess Life Recovery added
c["Excess Life Recovery added as Guard for 20 seconds"]={nil,"Excess Life Recovery added as Guard for 20 seconds "}
c["Excess Life Recovery from Leech is applied to Energy Shield"]={nil,"Excess Life Recovery from Leech is applied to Energy Shield "}
c["Excess Life Recovery from Regeneration is applied to Energy Shield"]={{[1]={[1]={type="Condition",var="FullLife"},flags=0,keywordFlags=0,name="ZealotsOath",type="FLAG",value=true}},nil}
c["Exposure you inflict lowers Resistances by an additional 5%"]={{[1]={flags=0,keywordFlags=0,name="ExtraExposure",type="BASE",value=-5}},nil}
c["Exposure you inflict lowers Resistances by an additional 5%"]={{[1]={flags=0,keywordFlags=0,name="ExtraExposure",type="BASE",value=5}},nil}
c["Final Repeat of Spells has 30% increased Area of Effect"]={{[1]={[1]={neg=true,type="Condition",var="CastOnFrostbolt"},[2]={type="Condition",varList={[1]="averageRepeat",[2]="alwaysFinalRepeat"}},flags=2,keywordFlags=0,name="RepeatFinalAreaOfEffect",type="INC",value=30}},nil}
c["Fire Damage from Hits Contributes to Shock Chance instead of Flammability and Ignite Magnitudes"]={{[1]={flags=0,keywordFlags=0,name="FireCanShock",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="FireCannotIgnite",type="FLAG",value=true}},nil}
c["Fire Resistance is unaffected by Area Penalties"]={nil,"Fire Resistance is unaffected by Area Penalties "}
Expand Down Expand Up @@ -5365,9 +5365,9 @@ c["Inflict Cold Exposure on Igniting an Enemy"]={nil,"Inflict Cold Exposure on I
c["Inflict Cold Exposure on Igniting an Enemy Inflict Fire Exposure on Shocking an Enemy"]={nil,"Inflict Cold Exposure on Igniting an Enemy Inflict Fire Exposure on Shocking an Enemy "}
c["Inflict Corrupted Blood for 5 seconds on Block, dealing 50% of"]={nil,"Inflict Corrupted Blood for 5 seconds on Block, dealing 50% of "}
c["Inflict Corrupted Blood for 5 seconds on Block, dealing 50% of your maximum Life as Physical damage per second"]={nil,"Inflict Corrupted Blood for 5 seconds on Block, dealing 50% of your maximum Life as Physical damage per second "}
c["Inflict Elemental Exposure on Hit, lowering Total Elemental Resistances by 30%"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="FireExposure",type="BASE",value=-30}}},[2]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="ColdExposure",type="BASE",value=-30}}},[3]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="LightningExposure",type="BASE",value=-30}}}},nil}
c["Inflict Elemental Exposure on Hit, lowering Total Elemental Resistances by 55%"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="FireExposure",type="BASE",value=-55}}},[2]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="ColdExposure",type="BASE",value=-55}}},[3]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="LightningExposure",type="BASE",value=-55}}}},nil}
c["Inflict Elemental Exposure on Hit, lowering Total Elemental Resistances by 60%"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="FireExposure",type="BASE",value=-60}}},[2]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="ColdExposure",type="BASE",value=-60}}},[3]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="LightningExposure",type="BASE",value=-60}}}},nil}
c["Inflict Elemental Exposure on Hit, lowering Total Elemental Resistances by 30%"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="FireExposure",type="BASE",value=30}}},[2]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="ColdExposure",type="BASE",value=30}}},[3]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="LightningExposure",type="BASE",value=30}}}},nil}
c["Inflict Elemental Exposure on Hit, lowering Total Elemental Resistances by 55%"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="FireExposure",type="BASE",value=55}}},[2]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="ColdExposure",type="BASE",value=55}}},[3]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="LightningExposure",type="BASE",value=55}}}},nil}
c["Inflict Elemental Exposure on Hit, lowering Total Elemental Resistances by 60%"]={{[1]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="FireExposure",type="BASE",value=60}}},[2]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="ColdExposure",type="BASE",value=60}}},[3]={flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="LightningExposure",type="BASE",value=60}}}},nil}
c["Inflict Elemental Exposure to Enemies 3 metres in front of you"]={nil,"Inflict Elemental Exposure to Enemies 3 metres in front of you "}
c["Inflict Elemental Exposure to Enemies 3 metres in front of you for 4 seconds, every 0.25 seconds while raised"]={nil,"Inflict Elemental Exposure to Enemies 3 metres in front of you for 4 seconds, every 0.25 seconds while raised "}
c["Inflict Fire Exposure on Shocking an Enemy"]={nil,"Inflict Fire Exposure on Shocking an Enemy "}
Expand Down
40 changes: 39 additions & 1 deletion src/Data/SkillStatMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1649,11 +1649,49 @@ return {
["base_inflict_fire_exposure_on_hit_%_chance"] = {
mod("FireExposureChance", "BASE", nil),
},
["inflict_exposure_for_x_ms_on_shock"] = {
mod("ExposureDuration", "BASE", nil, 0, 0, { type = "ActorCondition", actor = "enemy", var = "Shocked"}),
flag("InflictExposure", { type = "ActorCondition", actor = "enemy", var = "Shocked"}),
},
["inflict_exposure_for_x_ms_on_cold_crit"] = {
mod("ExposureDuration", "BASE", nil, 0, 0, { type = "Condition", var = "CritInPast8Sec"}, { type = "Condition", var = "ColdHasDamage"}),
flag("InflictExposure", { type = "Condition", var = "CritInPast8Sec"}, { type = "Condition", var = "ColdHasDamage"}),
},
["inflict_exposure_for_x_ms_on_ignite"] = {
mod("ExposureDuration", "BASE", nil, 0, 0, { type = "ActorCondition", actor = "enemy", var = "Ignited"}),
flag("InflictExposure", { type = "ActorCondition", actor = "enemy", var = "Ignited"}),
},
["inflict_exposure_on_hit_%_chance"] = {
mod("LightningExposureChance", "BASE", nil),
mod("ColdExposureChance", "BASE", nil),
mod("FireExposureChance", "BASE", nil),
},
["all_exposure_on_hit_for_duration_ms"] = {
mod("ExposureDuration", "BASE", nil),
flag("InflictExposure"),
},
["inflict_all_exposure_on_hit"] = {
flag("InflictExposure"),
},
["all_exposure_on_hit_magnitude"] = {
mod("FireExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }),
mod("ColdExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }),
mod("LightningExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }),
mult = -1,
},
['active_skill_all_elemental_exposure_magnitude'] = {
mod("FireExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }),
mod("ColdExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }),
mod("LightningExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }),
},
["skill_base_oil_exposure_-_to_total_elemental_resistance"] = {
mod("FireExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }),
mod("ColdExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }),
mod("LightningExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }),
},
["exposure_effect_+%"] = {
mod("FireExposureEffect", "INC", nil),
mod("ColdExposureEffect", "INC", nil),
mod("LightningExposureEffect", "INC", nil),
},
["offering_spells_effect_+%"] = {
mod("BuffEffect", "INC", nil),
Expand Down
6 changes: 0 additions & 6 deletions src/Data/Skills/act_int.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8851,12 +8851,6 @@ skills["FrostBombPlayer"] = {
incrementalEffectiveness = 0.12999999523163,
damageIncrementalEffectiveness = 0.008899999782443,
statDescriptionScope = "frost_bomb",
statMap = {
['skill_cold_exposure_magnitude'] = {
mod("ColdExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }),
mult = -1
},
},
baseFlags = {
spell = true,
area = true,
Expand Down
8 changes: 0 additions & 8 deletions src/Data/Skills/act_str.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14407,14 +14407,6 @@ skills["OilGrenadePlayer"] = {
baseEffectiveness = 16,
incrementalEffectiveness = 0.054999999701977,
statDescriptionScope = "oil_grenade_statset_1",
statMap = {
["skill_base_oil_exposure_-_to_total_elemental_resistance"] = {
mod("FireExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }),
mod("ColdExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }),
mod("LightningExposure", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff" }),
mult = -1,
},
},
baseFlags = {
attack = true,
area = true,
Expand Down
18 changes: 0 additions & 18 deletions src/Data/Skills/other.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3472,12 +3472,6 @@ skills["ExplosiveConcoctionPlayer"] = {
baseEffectiveness = 4.5,
incrementalEffectiveness = 0.27349999547005,
statDescriptionScope = "explosive_concoction",
statMap = {
["flask_throw_fire_exposure_ms"] = {
mod("FireExposureChance", "BASE", nil),
value = 100,
},
},
baseFlags = {
attack = true,
projectile = true,
Expand Down Expand Up @@ -3840,12 +3834,6 @@ skills["FulminatingConcoctionPlayer"] = {
baseEffectiveness = 4.1999998092651,
incrementalEffectiveness = 0.27349999547005,
statDescriptionScope = "fulminating_concoction",
statMap = {
["flask_throw_lightning_exposure_ms"] = {
mod("LightningExposureChance", "BASE", nil),
value = 100,
},
},
baseFlags = {
attack = true,
projectile = true,
Expand Down Expand Up @@ -6953,12 +6941,6 @@ skills["ShatteringConcoctionPlayer"] = {
baseEffectiveness = 3.9000000953674,
incrementalEffectiveness = 0.27349999547005,
statDescriptionScope = "shattering_concoction",
statMap = {
["flask_throw_cold_exposure_ms"] = {
mod("ColdExposureChance", "BASE", nil),
value = 100,
},
},
baseFlags = {
attack = true,
projectile = true,
Expand Down
5 changes: 0 additions & 5 deletions src/Data/Skills/sup_int.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1906,11 +1906,6 @@ skills["SupportColdExposurePlayer"] = {
label = "Cold Exposure",
incrementalEffectiveness = 0.054999999701977,
statDescriptionScope = "gem_stat_descriptions",
statMap = {
["inflict_cold_exposure_for_x_ms_on_cold_crit"] = {
mod("ColdExposureChance", "BASE", nil),
},
},
baseFlags = {
},
constantStats = {
Expand Down
Loading
Loading