Skip to content

Commit b1e9324

Browse files
author
Steve
committed
Fix Verglas destroyed Ice Crystal damage gain
1 parent f5b9434 commit b1e9324

4 files changed

Lines changed: 87 additions & 1 deletion

File tree

spec/System/TestSkills_spec.lua

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,70 @@ describe("TestSkills", function()
531531
assert.True(math.abs(build.calcsTab.mainOutput.FullDPS - fullDPS * 0.5) < fullDPS * 0.001)
532532
end)
533533

534+
it("applies Verglas from destroyed Ice Crystal Life only to supported skills", function()
535+
build.itemsTab:CreateDisplayItemFromRaw("New Item\nRazor Quarterstaff\nQuality: 0")
536+
build.itemsTab:AddDisplayItem()
537+
build.skillsTab:PasteSocketGroup("Quarterstaff Strike 20/0 1\nVerglas 1/0 1")
538+
build.skillsTab:PasteSocketGroup("Leap Slam 20/0 1")
539+
build.skillsTab.socketGroupList[1].includeInFullDPS = true
540+
runCallback("OnFrame")
541+
542+
local baseFullDPS = build.calcsTab.mainOutput.FullDPS
543+
assert.truthy(baseFullDPS)
544+
assert.True(baseFullDPS > 0)
545+
546+
build.configTab.input.conditionDestroyedIceCrystalPast6Seconds = true
547+
build.configTab.input.multiplierDestroyedIceCrystalLife = 2000
548+
build.configTab:BuildModList()
549+
runCallback("OnFrame")
550+
551+
local function findSkillForGroup(socketGroup)
552+
for _, activeSkill in ipairs(build.calcsTab.mainEnv.player.activeSkillList) do
553+
if activeSkill.socketGroup == socketGroup then
554+
return activeSkill
555+
end
556+
end
557+
end
558+
local linkedSkill = findSkillForGroup(build.skillsTab.socketGroupList[1])
559+
local unlinkedSkill = findSkillForGroup(build.skillsTab.socketGroupList[2])
560+
assert.is_not_nil(linkedSkill)
561+
assert.is_not_nil(unlinkedSkill)
562+
assert.are.equals(1, linkedSkill.skillModList:Sum("BASE", linkedSkill.skillCfg, "DamageGainAsCold"))
563+
assert.are.equals(0, unlinkedSkill.skillModList:Sum("BASE", unlinkedSkill.skillCfg, "DamageGainAsCold"))
564+
565+
build.configTab.input.multiplierDestroyedIceCrystalLife = 3999
566+
build.configTab:BuildModList()
567+
runCallback("OnFrame")
568+
569+
linkedSkill = findSkillForGroup(build.skillsTab.socketGroupList[1])
570+
assert.are.equals(1, linkedSkill.skillModList:Sum("BASE", linkedSkill.skillCfg, "DamageGainAsCold"))
571+
local fullDPSAt3999Life = build.calcsTab.mainOutput.FullDPS
572+
assert.True(fullDPSAt3999Life > baseFullDPS)
573+
574+
build.configTab.input.multiplierDestroyedIceCrystalLife = 4000
575+
build.configTab:BuildModList()
576+
runCallback("OnFrame")
577+
578+
linkedSkill = findSkillForGroup(build.skillsTab.socketGroupList[1])
579+
assert.are.equals(2, linkedSkill.skillModList:Sum("BASE", linkedSkill.skillCfg, "DamageGainAsCold"))
580+
assert.True(build.calcsTab.mainOutput.FullDPS > fullDPSAt3999Life)
581+
582+
build.configTab.input.multiplierDestroyedIceCrystalLife = 271990
583+
build.configTab:BuildModList()
584+
runCallback("OnFrame")
585+
586+
linkedSkill = findSkillForGroup(build.skillsTab.socketGroupList[1])
587+
assert.are.equals(135, linkedSkill.skillModList:Sum("BASE", linkedSkill.skillCfg, "DamageGainAsCold"))
588+
589+
build.configTab.input.conditionDestroyedIceCrystalPast6Seconds = false
590+
build.configTab:BuildModList()
591+
runCallback("OnFrame")
592+
593+
linkedSkill = findSkillForGroup(build.skillsTab.socketGroupList[1])
594+
assert.are.equals(0, linkedSkill.skillModList:Sum("BASE", linkedSkill.skillCfg, "DamageGainAsCold"))
595+
assert.are.near(baseFullDPS, build.calcsTab.mainOutput.FullDPS, baseFullDPS * 0.001)
596+
end)
597+
534598
it("Test mana cost efficiency with support gems", function()
535599
-- Test interaction between cost efficiency and cost multipliers
536600
build.skillsTab:PasteSocketGroup("Contagion 6/0 1\nMagnified Area I 1/0 1")

src/Data/Skills/sup_int.lua

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8553,6 +8553,14 @@ skills["SupportVerglasPlayer"] = {
85538553
label = "Verglas",
85548554
incrementalEffectiveness = 0.054999999701977,
85558555
statDescriptionScope = "gem_stat_descriptions",
8556+
statMap = {
8557+
["support_crystalshatter_buff_damage_%_gained_as_extra_cold_per_2000_crystal_life"] = {
8558+
mod("DamageGainAsCold", "BASE", nil, 0, 0, { type = "Condition", var = "DestroyedIceCrystalPast6Seconds" }, { type = "Multiplier", var = "DestroyedIceCrystalLife", div = 2000 }),
8559+
},
8560+
["support_crystalshatter_buff_duration"] = {
8561+
-- Display only
8562+
},
8563+
},
85568564
baseFlags = {
85578565
},
85588566
constantStats = {
@@ -8962,4 +8970,4 @@ skills["SupportZenithPlayerTwo"] = {
89628970
},
89638971
},
89648972
}
8965-
}
8973+
}

src/Export/Skills/sup_int.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,6 +1521,14 @@ statMap = {
15211521

15221522
#skill SupportVerglasPlayer
15231523
#set SupportVerglasPlayer
1524+
statMap = {
1525+
["support_crystalshatter_buff_damage_%_gained_as_extra_cold_per_2000_crystal_life"] = {
1526+
mod("DamageGainAsCold", "BASE", nil, 0, 0, { type = "Condition", var = "DestroyedIceCrystalPast6Seconds" }, { type = "Multiplier", var = "DestroyedIceCrystalLife", div = 2000 }),
1527+
},
1528+
["support_crystalshatter_buff_duration"] = {
1529+
-- Display only
1530+
},
1531+
},
15241532
#mods
15251533
#skillEnd
15261534

src/Modules/ConfigOptions.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,12 @@ Huge sets the radius to 11.
11721172
{ var = "conditionKilledLast3Seconds", type = "check", label = "Have you Killed in the last 3 Seconds?", ifCond = "KilledLast3Seconds", implyCond = "KilledRecently", tooltip = "This also implies that you have Killed Recently.", apply = function(val, modList, enemyModList)
11731173
modList:NewMod("Condition:KilledLast3Seconds", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
11741174
end },
1175+
{ var = "conditionDestroyedIceCrystalPast6Seconds", type = "check", label = "Have you Destroyed an Ice Crystal in the past 6 Seconds?", ifCond = "DestroyedIceCrystalPast6Seconds", apply = function(val, modList, enemyModList)
1176+
modList:NewMod("Condition:DestroyedIceCrystalPast6Seconds", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
1177+
end },
1178+
{ var = "multiplierDestroyedIceCrystalLife", type = "count", label = "Maximum Life of the Destroyed Ice Crystal:", ifOption = "conditionDestroyedIceCrystalPast6Seconds", ifMult = "DestroyedIceCrystalLife", tooltip = "Enter the maximum Life of the Ice Crystal that granted the current Verglas buff.", apply = function(val, modList, enemyModList)
1179+
modList:NewMod("Multiplier:DestroyedIceCrystalLife", "BASE", val, "Config", { type = "Condition", var = "Combat" })
1180+
end },
11751181
{ var = "conditionKilledPoisonedLast2Seconds", type = "check", label = "Killed a poisoned enemy in the last 2 Seconds?", ifCond = "KilledPoisonedLast2Seconds", implyCond = "KilledRecently", tooltip = "This also implies that you have Killed Recently.", apply = function(val, modList, enemyModList)
11761182
modList:NewMod("Condition:KilledPoisonedLast2Seconds", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
11771183
end },

0 commit comments

Comments
 (0)