Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Commit cd3d546

Browse files
committed
Add support for parsing Damage gain as (without as extra)
The gain calcs arent exactly right in general still but this at least makes current approach work properly Signed-off-by: Tomas Slusny <[email protected]>
1 parent 7defedb commit cd3d546

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Modules/CalcOffence.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ end
8787

8888
local function calcGainedDamage(activeSkill, output, cfg, damageType)
8989
local gainTable = activeSkill.gainTable
90-
90+
9191
local gainedMin, gainedMax = 0, 0
9292
for _, otherType in ipairs(dmgTypeList) do
9393
local baseMin = m_floor(output[otherType.."MinBase"])
@@ -100,7 +100,7 @@ local function calcGainedDamage(activeSkill, output, cfg, damageType)
100100
gainedMax = gainedMax + (baseMax + convertedMax) * gainMult
101101
end
102102
end
103-
103+
104104
return gainedMin, gainedMax
105105
end
106106

@@ -1895,7 +1895,7 @@ function calcs.offence(env, actor, activeSkill)
18951895
activeSkill.conversionTable[damageType][fromType] = data.base
18961896
end
18971897
for toType, amount in pairs(data.conv) do
1898-
activeSkill.conversionTable[damageType][toType] =
1898+
activeSkill.conversionTable[damageType][toType] =
18991899
(activeSkill.conversionTable[damageType][toType] or 0) + amount
19001900
end
19011901
end
@@ -1904,9 +1904,13 @@ function calcs.offence(env, actor, activeSkill)
19041904
activeSkill.gainTable[damageType] = {}
19051905
for _, toType in ipairs(dmgTypeList) do
19061906
local globalGain = m_max(skillModList:Sum("BASE", skillCfg,
1907+
"DamageAs"..toType,
19071908
"DamageGainAs"..toType,
1909+
damageType.."DamageAs"..toType,
19081910
damageType.."DamageGainAs"..toType,
1911+
isElemental[damageType] and "ElementalDamageAs"..toType or nil,
19091912
isElemental[damageType] and "ElementalDamageGainAs"..toType or nil,
1913+
damageType ~= "Chaos" and "NonChaosDamageAs"..toType or nil,
19101914
damageType ~= "Chaos" and "NonChaosDamageGainAs"..toType or nil), 0)
19111915
local skillGain = m_max(skillModList:Sum("BASE", skillCfg,
19121916
"SkillDamageGainAs"..toType,

0 commit comments

Comments
 (0)