-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Storm Secret self damage calculation
Adds support for the self damage calculated when a Herald of Thunder Storm hits an enemy
- Loading branch information
LocalIdentity
committed
Aug 30, 2024
1 parent
31d6bc5
commit 0c3c2e8
Showing
3 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5301,6 +5301,20 @@ function calcs.offence(env, actor, activeSkill) | |
return dmgBreakdown, totalDmgTaken * output.SummonedMinionsPerCast | ||
end | ||
end, | ||
["Storm Secret"] = function(activeSkill, output, breakdown) | ||
local dmgType, dmgVal | ||
for _, value in ipairs(activeSkill.skillModList:List(nil, "StormSecretSelfDamage")) do -- Combines dmg taken from both rings accounting for catalysts | ||
dmgVal = (dmgVal or 0) + value.baseDamage | ||
dmgType = string.gsub(" "..value.damageType, "%W%l", string.upper):sub(2) -- This assumes both rings deal the same damage type | ||
end | ||
if activeSkill.activeEffect.grantedEffect.name == "Herald of Thunder" and dmgType and dmgVal then | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
LocalIdentity
Contributor
|
||
local dmgBreakdown, totalDmgTaken = calcs.applyDmgTakenConversion(activeSkill, output, breakdown, dmgType, dmgVal) | ||
t_insert(dmgBreakdown, 1, s_format("Storm Secret base damage: %d", dmgVal)) | ||
t_insert(dmgBreakdown, 2, s_format("")) | ||
t_insert(dmgBreakdown, s_format("Total Storm Secret damage taken per Herald of Thunder Hit: %.2f",totalDmgTaken)) | ||
return dmgBreakdown, totalDmgTaken | ||
end | ||
end, | ||
["Eye of Innocence"] = function(activeSkill, output, breakdown) | ||
local dmgType, dmgVal | ||
for _, value in ipairs(activeSkill.skillModList:List(nil, "EyeOfInnocenceSelfDamage")) do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Should probably have the
if activeSkill.activeEffect.grantedEffect.name == "Herald of Thunder"
check at the start of the function so that it doesnt need to make/loop through the base damage list if its not herald of thunder, but its a minor issue.