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
23 changes: 23 additions & 0 deletions spec/System/TestSkills_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,29 @@ describe("TestSkills", function()
assert.are.equals(cappedCombinedDPS, build.calcsTab.mainOutput.CombinedDPS)
end)

it("uses enemy radius when calculating Ball Lightning hits", function()
build.skillsTab:PasteSocketGroup("Ball Lightning 20/0 1\n")
runCallback("OnFrame")

local mainSocketGroup = build.skillsTab.socketGroupList[build.mainSocketGroup]
mainSocketGroup.displaySkillList[mainSocketGroup.mainActiveSkill].activeEffect.srcInstance.skillPart = 2
build.configTab.input.projectileDistance = 40
build.configTab.input.enemyRadius = 1
build.configTab:BuildModList()
build.modFlag = true
build.buildFlag = true
runCallback("OnFrame")
local smallEnemyHits = build.calcsTab.mainOutput.SkillDPSMultiplier

build.configTab.input.enemyRadius = 11
build.configTab:BuildModList()
build.modFlag = true
build.buildFlag = true
runCallback("OnFrame")

assert.is_true(build.calcsTab.mainOutput.SkillDPSMultiplier > smallEnemyHits)
end)

it("Test Adrenaline affecting blight max stage count", function()
build.skillsTab:PasteSocketGroup("Blight 20/0 1\n")
runCallback("OnFrame")
Expand Down
5 changes: 3 additions & 2 deletions src/Data/Skills/act_int.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1116,9 +1116,10 @@ skills["BallLightning"] = {
local ballDistPerStrike = ballDistPerSec * secsPerStrike
-- How many times does the ball proc a bolt strike while it is in
-- range of the enemy?
local enemyRadius = 0 -- for now, we will be conservative and assume no enemy radius
local enemyRadius = skillModList:Override(skillCfg, "EnemyRadius") or skillModList:Sum("BASE", skillCfg, "EnemyRadius")
local baseStrikeRadius = output.AreaOfEffectRadius
local strikeRadius = baseStrikeRadius
-- A bolt can hit when its area overlaps any part of the enemy's collision circle.
local strikeRadius = baseStrikeRadius + enemyRadius
local castDist = 0
if skillCfg.skillDist then
-- Advanced users can specify exactly the standoff distance
Expand Down
5 changes: 3 additions & 2 deletions src/Export/Skills/act_int.txt
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,10 @@ return function(skills, mod, flag, skill)
local ballDistPerStrike = ballDistPerSec * secsPerStrike
-- How many times does the ball proc a bolt strike while it is in
-- range of the enemy?
local enemyRadius = 0 -- for now, we will be conservative and assume no enemy radius
local enemyRadius = skillModList:Override(skillCfg, "EnemyRadius") or skillModList:Sum("BASE", skillCfg, "EnemyRadius")
local baseStrikeRadius = output.AreaOfEffectRadius
local strikeRadius = baseStrikeRadius
-- A bolt can hit when its area overlaps any part of the enemy's collision circle.
local strikeRadius = baseStrikeRadius + enemyRadius
local castDist = 0
if skillCfg.skillDist then
-- Advanced users can specify exactly the standoff distance
Expand Down
6 changes: 3 additions & 3 deletions src/Modules/ConfigOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -762,8 +762,8 @@ return {
{ var = "VaalMoltenShellDamageMitigated", type = "count", label = "Damage mitigated:", tooltip = "Vaal Molten Shell reflects damage to the enemy,\nbased on the amount of damage it has mitigated in the last second.", ifSkill = "Vaal Molten Shell", apply = function(val, modList, enemyModList)
modList:NewMod("SkillData", "LIST", { key = "VaalMoltenShellDamageMitigated", value = val }, "Config", { type = "SkillName", skillName = "Molten Shell" })
end },
{ label = "Multi-part area skills:", ifSkill = { "Seismic Trap", "Lightning Spire Trap", "Explosive Trap", "Molten Strike" }, includeTransfigured = true },
{ var = "enemySizePreset", type = "list", label = "Enemy size preset:", ifSkill = { "Seismic Trap", "Lightning Spire Trap", "Explosive Trap", "Molten Strike" }, includeTransfigured = true, defaultIndex = 2, tooltip = [[
{ label = "Multi-part area skills:", ifSkill = { "Seismic Trap", "Lightning Spire Trap", "Explosive Trap", "Molten Strike", "Ball Lightning" }, includeTransfigured = true },
{ var = "enemySizePreset", type = "list", label = "Enemy size preset:", ifSkill = { "Seismic Trap", "Lightning Spire Trap", "Explosive Trap", "Molten Strike", "Ball Lightning" }, includeTransfigured = true, defaultIndex = 2, tooltip = [[
Configure the radius of an enemy hitbox which is used in calculating some area multi-hitting (shotgunning) effects.

Small sets the radius to 2.
Expand All @@ -788,7 +788,7 @@ Huge sets the radius to 11.
modList:NewMod("EnemyRadius", "BASE", 11, "Config")
end
end },
{ var = "enemyRadius", type = "integer", label = "Enemy radius:", ifSkill = { "Seismic Trap", "Lightning Spire Trap", "Explosive Trap", "Molten Strike" }, includeTransfigured = true, tooltip = "Configure the radius of an enemy hitbox to calculate some area overlapping (shotgunning) effects.", apply = function(val, modList, enemyModList)
{ var = "enemyRadius", type = "integer", label = "Enemy radius:", ifSkill = { "Seismic Trap", "Lightning Spire Trap", "Explosive Trap", "Molten Strike", "Ball Lightning" }, includeTransfigured = true, tooltip = "Configure the radius of an enemy hitbox to calculate some area overlapping (shotgunning) effects.", apply = function(val, modList, enemyModList)
modList:NewMod("EnemyRadius", "OVERRIDE", m_max(val, 1), "Config")
end },
{ var = "TotalMinionLife", type = "integer", label = "Minion Life override:", ifMod = "takenFromMinionBeforeYou", tooltip = "Overrides the automatically calculated Life of the minion supported by Companionship.", apply = function(val, modList, enemyModList)
Expand Down
Loading