Release 1.4.31
- Added breakdowns to Buff/Debuff Skill lists - Fixed minor issues in Skills tab - Updated new 3.0 supports - Applied changes to skill part multipliers
This commit is contained in:
@@ -265,7 +265,7 @@ function buildMode:Init(dbFileName, buildName, buildXML, targetVersion)
|
||||
{ stat = "EnergyShieldLeechGainPerHit", label = "ES Leech/Gain per Hit", fmt = ".1f", compPercent = true },
|
||||
{ stat = "Evasion", label = "Evasion rating", fmt = "d", compPercent = true },
|
||||
{ stat = "Spec:EvasionInc", label = "%Inc Evasion from Tree", fmt = "d%%" },
|
||||
{ stat = "EvadeChance", label = "Evade Chance", fmt = "d%%", condFunc = function(v,o) return v > 0 and o.MeleeEvadeChance == o.ProjectileEvadeChance end },
|
||||
{ stat = "MeleeEvadeChance", label = "Evade Chance", fmt = "d%%", condFunc = function(v,o) return v > 0 and o.MeleeEvadeChance == o.ProjectileEvadeChance end },
|
||||
{ stat = "MeleeEvadeChance", label = "Melee Evade Chance", fmt = "d%%", condFunc = function(v,o) return v > 0 and o.MeleeEvadeChance ~= o.ProjectileEvadeChance end },
|
||||
{ stat = "ProjectileEvadeChance", label = "Projectile Evade Chance", fmt = "d%%", condFunc = function(v,o) return v > 0 and o.MeleeEvadeChance ~= o.ProjectileEvadeChance end },
|
||||
{ stat = "Armour", label = "Armour", fmt = "d", compPercent = true },
|
||||
@@ -293,6 +293,7 @@ function buildMode:Init(dbFileName, buildName, buildXML, targetVersion)
|
||||
{ stat = "TotalDPS", label = "Total DPS", fmt = ".1f", compPercent = true },
|
||||
{ stat = "TotalDot", label = "DoT DPS", fmt = ".1f", compPercent = true },
|
||||
{ stat = "WithPoisonDPS", label = "DPS inc. Poison", fmt = ".1f", compPercent = true },
|
||||
{ stat = "DecayDPS", label = "Decay DPS", fmt = ".1f", compPercent = true },
|
||||
{ stat = "Cooldown", label = "Skill Cooldown", fmt = ".2fs", lowerIsBetter = true },
|
||||
{ stat = "Life", label = "Total Life", fmt = ".1f", compPercent = true },
|
||||
{ stat = "LifeRegen", label = "Life Regen", fmt = ".1f" },
|
||||
|
||||
@@ -90,6 +90,7 @@ function calcs.createActiveSkill(activeGem, supportList, summonSkill)
|
||||
supportList = supportList,
|
||||
summonSkill = summonSkill,
|
||||
skillData = { },
|
||||
buffList = { },
|
||||
}
|
||||
|
||||
-- Initialise skill types
|
||||
@@ -268,6 +269,9 @@ function calcs.buildActiveSkillModList(env, actor, activeSkill)
|
||||
|
||||
-- Build skill keyword flag set
|
||||
local skillKeywordFlags = 0
|
||||
if skillFlags.hit then
|
||||
skillKeywordFlags = bor(skillKeywordFlags, KeywordFlag.Hit)
|
||||
end
|
||||
if skillFlags.aura then
|
||||
skillKeywordFlags = bor(skillKeywordFlags, KeywordFlag.Aura)
|
||||
end
|
||||
@@ -432,38 +436,43 @@ function calcs.buildActiveSkillModList(env, actor, activeSkill)
|
||||
-- Separate global effect modifiers (mods that can affect defensive stats or other skills)
|
||||
local i = 1
|
||||
while skillModList[i] do
|
||||
local destList
|
||||
local effectType, effectName
|
||||
for _, tag in ipairs(skillModList[i].tagList) do
|
||||
if tag.type == "GlobalEffect" then
|
||||
if tag.effectType == "Buff" then
|
||||
destList = "buffModList"
|
||||
elseif tag.effectType == "Aura" then
|
||||
destList = "auraModList"
|
||||
elseif tag.effectType == "Debuff" then
|
||||
destList = "debuffModList"
|
||||
elseif tag.effectType == "Curse" then
|
||||
destList = "curseModList"
|
||||
end
|
||||
effectType = tag.effectType
|
||||
effectName = tag.effectName or activeSkill.activeGem.grantedEffect.name
|
||||
break
|
||||
end
|
||||
end
|
||||
if destList then
|
||||
if not activeSkill[destList] then
|
||||
activeSkill[destList] = { }
|
||||
if effectType then
|
||||
local buff
|
||||
for _, skillBuff in ipairs(activeSkill.buffList) do
|
||||
if skillBuff.type == effectType and skillBuff.name == effectName then
|
||||
buff = skillBuff
|
||||
break
|
||||
end
|
||||
end
|
||||
if not buff then
|
||||
buff = {
|
||||
type = effectType,
|
||||
name = effectName,
|
||||
modList = { },
|
||||
}
|
||||
t_insert(activeSkill.buffList, buff)
|
||||
end
|
||||
local sig = modLib.formatModParams(skillModList[i])
|
||||
for d = 1, #activeSkill[destList] do
|
||||
local destMod = activeSkill[destList][d]
|
||||
for d = 1, #buff.modList do
|
||||
local destMod = buff.modList[d]
|
||||
if sig == modLib.formatModParams(destMod) and (destMod.type == "BASE" or destMod.type == "INC") then
|
||||
destMod = copyTable(destMod)
|
||||
destMod.value = destMod.value + skillModList[i].value
|
||||
activeSkill[destList][d] = destMod
|
||||
buff.modList[d] = destMod
|
||||
sig = nil
|
||||
break
|
||||
end
|
||||
end
|
||||
if sig then
|
||||
t_insert(activeSkill[destList], skillModList[i])
|
||||
t_insert(buff.modList, skillModList[i])
|
||||
end
|
||||
t_remove(skillModList, i)
|
||||
else
|
||||
@@ -471,7 +480,7 @@ function calcs.buildActiveSkillModList(env, actor, activeSkill)
|
||||
end
|
||||
end
|
||||
|
||||
if activeSkill.buffModList or activeSkill.auraModList or activeSkill.debuffModList or activeSkill.curseModList then
|
||||
if activeSkill.buffList[1] then
|
||||
-- Add to auxillary skill list
|
||||
t_insert(env.auxSkillList, activeSkill)
|
||||
end
|
||||
|
||||
@@ -200,8 +200,8 @@ function calcs.defence(env, actor)
|
||||
s_format("Approximate evade chance: %d%%", output.EvadeChance),
|
||||
}
|
||||
end
|
||||
output.MeleeEvadeChance = m_max(5, m_min(95, output.EvadeChance * calcLib.mod(modDB, nil, "MeleeEvadeChance")))
|
||||
output.ProjectileEvadeChance = m_max(5, m_min(95, output.EvadeChance * calcLib.mod(modDB, nil, "ProjectileEvadeChance")))
|
||||
output.MeleeEvadeChance = m_max(5, m_min(95, output.EvadeChance * calcLib.mod(modDB, nil, "EvadeChance", "MeleeEvadeChance")))
|
||||
output.ProjectileEvadeChance = m_max(5, m_min(95, output.EvadeChance * calcLib.mod(modDB, nil, "EvadeChance", "ProjectileEvadeChance")))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -200,8 +200,8 @@ function calcs.defence(env, actor)
|
||||
s_format("Approximate evade chance: %d%%", output.EvadeChance),
|
||||
}
|
||||
end
|
||||
output.MeleeEvadeChance = m_max(5, m_min(95, output.EvadeChance * calcLib.mod(modDB, nil, "MeleeEvadeChance")))
|
||||
output.ProjectileEvadeChance = m_max(5, m_min(95, output.EvadeChance * calcLib.mod(modDB, nil, "ProjectileEvadeChance")))
|
||||
output.MeleeEvadeChance = m_max(5, m_min(95, output.EvadeChance * calcLib.mod(modDB, nil, "EvadeChance", "MeleeEvadeChance")))
|
||||
output.ProjectileEvadeChance = m_max(5, m_min(95, output.EvadeChance * calcLib.mod(modDB, nil, "EvadeChance", "ProjectileEvadeChance")))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1245,7 +1245,7 @@ function calcs.offence(env, actor)
|
||||
skillPart = skillCfg.skillPart,
|
||||
slotName = skillCfg.slotName,
|
||||
flags = ModFlag.Dot,
|
||||
keywordFlags = bor(skillCfg.keywordFlags, KeywordFlag.Bleed),
|
||||
keywordFlags = bor(band(skillCfg.keywordFlags, bnot(KeywordFlag.Hit)), KeywordFlag.Bleed, KeywordFlag.Ailment),
|
||||
skillCond = { },
|
||||
}
|
||||
end
|
||||
@@ -1277,14 +1277,23 @@ function calcs.offence(env, actor)
|
||||
globalBreakdown.BleedEffMult = breakdown.effMult("Physical", resist, 0, taken, effMult)
|
||||
end
|
||||
end
|
||||
output.BleedDPS = baseVal * effMult
|
||||
local effectMod = calcLib.mod(modDB, dotCfg, "AilmentEffect")
|
||||
output.BleedDPS = baseVal * effectMod * effMult
|
||||
local durationMod = calcLib.mod(modDB, dotCfg, "EnemyBleedDuration", "SkillAndDamagingAilmentDuration", skillData.bleedIsSkillEffect and "Duration" or nil) * calcLib.mod(enemyDB, nil, "SelfBleedDuration")
|
||||
globalOutput.BleedDuration = 5 * durationMod * debuffDurationMult
|
||||
if breakdown then
|
||||
t_insert(breakdown.BleedDPS, s_format("x %.2f ^8(bleed deals %d%% per second)", basePercent/100, basePercent))
|
||||
if effectMod ~= 1 then
|
||||
t_insert(breakdown.BleedDPS, s_format("x %.2f ^8(ailment effect modifier)", effectMod))
|
||||
end
|
||||
t_insert(breakdown.BleedDPS, s_format("= %.1f", baseVal))
|
||||
t_insert(breakdown.BleedDPS, "Bleed DPS:")
|
||||
breakdown.dot(breakdown.BleedDPS, baseVal, 0, 1, nil, effMult, output.BleedDPS)
|
||||
breakdown.multiChain(breakdown.BleedDPS, {
|
||||
label = "Bleed DPS:",
|
||||
base = s_format("%.1f ^8(base damage per second)", baseVal),
|
||||
{ "%.2f ^8(ailment effect modifier)", effectMod },
|
||||
{ "%.3f ^8(effective DPS modifier)", effMult },
|
||||
total = s_format("= %.1f ^8per second", output.BleedDPS),
|
||||
})
|
||||
if globalOutput.BleedDuration ~= 5 then
|
||||
globalBreakdown.BleedDuration = {
|
||||
"5.00s ^8(base duration)"
|
||||
@@ -1309,7 +1318,7 @@ function calcs.offence(env, actor)
|
||||
skillPart = skillCfg.skillPart,
|
||||
slotName = skillCfg.slotName,
|
||||
flags = ModFlag.Dot,
|
||||
keywordFlags = bor(skillCfg.keywordFlags, KeywordFlag.Poison),
|
||||
keywordFlags = bor(band(skillCfg.keywordFlags, bnot(KeywordFlag.Hit)), KeywordFlag.Poison, KeywordFlag.Ailment),
|
||||
skillCond = { },
|
||||
}
|
||||
end
|
||||
@@ -1348,7 +1357,8 @@ function calcs.offence(env, actor)
|
||||
globalBreakdown.PoisonEffMult = breakdown.effMult("Chaos", resist, 0, taken, effMult)
|
||||
end
|
||||
end
|
||||
output.PoisonDPS = baseVal * effMult
|
||||
local effectMod = calcLib.mod(modDB, dotCfg, "AilmentEffect")
|
||||
output.PoisonDPS = baseVal * effectMod * effMult
|
||||
local durationBase
|
||||
if skillData.poisonDurationIsSkillDuration then
|
||||
durationBase = skillData.duration
|
||||
@@ -1367,8 +1377,13 @@ function calcs.offence(env, actor)
|
||||
if breakdown then
|
||||
t_insert(breakdown.PoisonDPS, "x 0.16 ^8(poison deals 16% per second)")
|
||||
t_insert(breakdown.PoisonDPS, s_format("= %.1f", baseVal, 1))
|
||||
t_insert(breakdown.PoisonDPS, "Poison DPS:")
|
||||
breakdown.dot(breakdown.PoisonDPS, baseVal, 0, 1, nil, effMult, output.PoisonDPS)
|
||||
breakdown.multiChain(breakdown.PoisonDPS, {
|
||||
label = "Poison DPS:",
|
||||
base = s_format("%.1f ^8(base damage per second)", baseVal),
|
||||
{ "%.2f ^8(ailment effect modifier)", effectMod },
|
||||
{ "%.3f ^8(effective DPS modifier)", effMult },
|
||||
total = s_format("= %.1f ^8per second", output.PoisonDPS),
|
||||
})
|
||||
if globalOutput.PoisonDuration ~= 2 then
|
||||
globalBreakdown.PoisonDuration = {
|
||||
s_format("%.2fs ^8(base duration)", durationBase)
|
||||
@@ -1414,7 +1429,7 @@ function calcs.offence(env, actor)
|
||||
skillPart = skillCfg.skillPart,
|
||||
slotName = skillCfg.slotName,
|
||||
flags = ModFlag.Dot,
|
||||
keywordFlags = bor(skillCfg.keywordFlags, KeywordFlag.Ignite),
|
||||
keywordFlags = bor(band(skillCfg.keywordFlags, bnot(KeywordFlag.Hit)), KeywordFlag.Ignite, KeywordFlag.Ailment),
|
||||
skillCond = { },
|
||||
}
|
||||
end
|
||||
@@ -1461,8 +1476,9 @@ function calcs.offence(env, actor)
|
||||
globalBreakdown.IgniteEffMult = breakdown.effMult("Fire", resist, 0, taken, effMult)
|
||||
end
|
||||
end
|
||||
local effectMod = calcLib.mod(modDB, dotCfg, "AilmentEffect")
|
||||
local burnRateMod = calcLib.mod(modDB, cfg, "IgniteBurnRate")
|
||||
output.IgniteDPS = baseVal * burnRateMod * effMult
|
||||
output.IgniteDPS = baseVal * effectMod * burnRateMod * effMult
|
||||
local incDur = modDB:Sum("INC", dotCfg, "EnemyIgniteDuration", "SkillAndDamagingAilmentDuration") + enemyDB:Sum("INC", nil, "SelfIgniteDuration")
|
||||
local moreDur = enemyDB:Sum("MORE", nil, "SelfIgniteDuration")
|
||||
globalOutput.IgniteDuration = 4 * (1 + incDur / 100) * moreDur / burnRateMod * debuffDurationMult
|
||||
@@ -1478,8 +1494,14 @@ function calcs.offence(env, actor)
|
||||
if breakdown then
|
||||
t_insert(breakdown.IgniteDPS, "x 0.4 ^8(ignite deals 40% per second)")
|
||||
t_insert(breakdown.IgniteDPS, s_format("= %.1f", baseVal, 1))
|
||||
t_insert(breakdown.IgniteDPS, "Ignite DPS:")
|
||||
breakdown.dot(breakdown.IgniteDPS, baseVal, 0, 1, burnRateMod, effMult, output.IgniteDPS)
|
||||
breakdown.multiChain(breakdown.IgniteDPS, {
|
||||
label = "Ignite DPS:",
|
||||
base = s_format("%.1f ^8(base damage per second)", baseVal),
|
||||
{ "%.2f ^8(ailment effect modifier)", effectMod },
|
||||
{ "%.2f ^8(burn rate modifier)", burnRateMod },
|
||||
{ "%.3f ^8(effective DPS modifier)", effMult },
|
||||
total = s_format("= %.1f ^8per second", output.IgniteDPS),
|
||||
})
|
||||
if skillFlags.igniteCanStack then
|
||||
breakdown.IgniteDamage = { }
|
||||
if isAttack then
|
||||
@@ -1641,7 +1663,7 @@ function calcs.offence(env, actor)
|
||||
skillPart = skillCfg.skillPart,
|
||||
slotName = skillCfg.slotName,
|
||||
flags = ModFlag.Dot,
|
||||
keywordFlags = skillCfg.keywordFlags,
|
||||
keywordFlags = band(skillCfg.keywordFlags, bnot(KeywordFlag.Hit)),
|
||||
}
|
||||
local dotCfg = mainSkill.decayCfg
|
||||
local effMult = 1
|
||||
|
||||
@@ -511,8 +511,11 @@ function calcs.perform(env)
|
||||
-- Combine buffs/debuffs
|
||||
output.EnemyCurseLimit = modDB:Sum("BASE", nil, "EnemyCurseLimit")
|
||||
local buffs = { }
|
||||
env.buffs = buffs
|
||||
local minionBuffs = { }
|
||||
env.minionBuffs = minionBuffs
|
||||
local debuffs = { }
|
||||
env.debuffs = debuffs
|
||||
local curses = {
|
||||
limit = output.EnemyCurseLimit,
|
||||
}
|
||||
@@ -523,123 +526,121 @@ function calcs.perform(env)
|
||||
for _, activeSkill in ipairs(env.activeSkillList) do
|
||||
local skillModList = activeSkill.skillModList
|
||||
local skillCfg = activeSkill.skillCfg
|
||||
if env.mode_buffs then
|
||||
if activeSkill.buffModList and
|
||||
not activeSkill.skillFlags.curse and
|
||||
(not activeSkill.skillFlags.totem or activeSkill.skillData.allowTotemBuff) then
|
||||
if not activeSkill.skillData.buffNotPlayer then
|
||||
activeSkill.buffSkill = true
|
||||
local srcList = common.New("ModList")
|
||||
local inc = modDB:Sum("INC", skillCfg, "BuffEffect", "BuffEffectOnSelf")
|
||||
local more = modDB:Sum("MORE", skillCfg, "BuffEffect", "BuffEffectOnSelf")
|
||||
srcList:ScaleAddList(activeSkill.buffModList, (1 + inc / 100) * more)
|
||||
mergeBuff(srcList, buffs, activeSkill.activeGem.grantedEffect.name)
|
||||
for _, buff in ipairs(activeSkill.buffList) do
|
||||
if buff.type == "Buff" then
|
||||
if env.mode_buffs and (not activeSkill.skillFlags.totem or activeSkill.skillData.allowTotemBuff) then
|
||||
if not activeSkill.skillData.buffNotPlayer then
|
||||
activeSkill.buffSkill = true
|
||||
local srcList = common.New("ModList")
|
||||
local inc = modDB:Sum("INC", skillCfg, "BuffEffect", "BuffEffectOnSelf")
|
||||
local more = modDB:Sum("MORE", skillCfg, "BuffEffect", "BuffEffectOnSelf")
|
||||
srcList:ScaleAddList(buff.modList, (1 + inc / 100) * more)
|
||||
mergeBuff(srcList, buffs, buff.name)
|
||||
end
|
||||
if env.minion and (activeSkill.skillData.buffMinions or activeSkill.skillData.buffAllies) then
|
||||
activeSkill.minionBuffSkill = true
|
||||
local srcList = common.New("ModList")
|
||||
local inc = modDB:Sum("INC", skillCfg, "BuffEffect") + env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf")
|
||||
local more = modDB:Sum("MORE", skillCfg, "BuffEffect") * env.minion.modDB:Sum("MORE", nil, "BuffEffectOnSelf")
|
||||
srcList:ScaleAddList(buff.modList, (1 + inc / 100) * more)
|
||||
mergeBuff(srcList, minionBuffs, buff.name)
|
||||
end
|
||||
end
|
||||
if env.minion and (activeSkill.skillData.buffMinions or activeSkill.skillData.buffAllies) then
|
||||
activeSkill.minionBuffSkill = true
|
||||
local srcList = common.New("ModList")
|
||||
local inc = modDB:Sum("INC", skillCfg, "BuffEffect") + env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf")
|
||||
local more = modDB:Sum("MORE", skillCfg, "BuffEffect") * env.minion.modDB:Sum("MORE", nil, "BuffEffectOnSelf")
|
||||
srcList:ScaleAddList(activeSkill.buffModList, (1 + inc / 100) * more)
|
||||
mergeBuff(srcList, minionBuffs, activeSkill.activeGem.grantedEffect.name)
|
||||
elseif buff.type == "Aura" then
|
||||
if env.mode_buffs then
|
||||
if not activeSkill.skillData.auraCannotAffectSelf then
|
||||
activeSkill.buffSkill = true
|
||||
affectedByAura[env.player] = true
|
||||
local srcList = common.New("ModList")
|
||||
local inc = modDB:Sum("INC", skillCfg, "AuraEffect", "BuffEffectOnSelf", "AuraEffectOnSelf") + skillModList:Sum("INC", skillCfg, "AuraEffect")
|
||||
local more = modDB:Sum("MORE", skillCfg, "AuraEffect", "BuffEffectOnSelf", "AuraEffectOnSelf") * skillModList:Sum("MORE", skillCfg, "AuraEffect")
|
||||
srcList:ScaleAddList(buff.modList, (1 + inc / 100) * more)
|
||||
srcList:ScaleAddList(extraAuraModList, (1 + inc / 100) * more)
|
||||
mergeBuff(srcList, buffs, buff.name)
|
||||
end
|
||||
if env.minion and not modDB:Sum("FLAG", nil, "YourAurasCannotAffectAllies") then
|
||||
activeSkill.minionBuffSkill = true
|
||||
affectedByAura[env.minion] = true
|
||||
local srcList = common.New("ModList")
|
||||
local inc = modDB:Sum("INC", skillCfg, "AuraEffect") + env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf") + skillModList:Sum("INC", skillCfg, "AuraEffect")
|
||||
local more = modDB:Sum("MORE", skillCfg, "AuraEffect") * env.minion.modDB:Sum("MORE", nil, "BuffEffectOnSelf", "AuraEffectOnSelf") * skillModList:Sum("MORE", skillCfg, "AuraEffect")
|
||||
srcList:ScaleAddList(buff.modList, (1 + inc / 100) * more)
|
||||
srcList:ScaleAddList(extraAuraModList, (1 + inc / 100) * more)
|
||||
mergeBuff(srcList, minionBuffs, buff.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
if activeSkill.auraModList then
|
||||
if not activeSkill.skillData.auraCannotAffectSelf then
|
||||
activeSkill.buffSkill = true
|
||||
affectedByAura[env.player] = true
|
||||
elseif buff.type == "Debuff" then
|
||||
if env.mode_effective then
|
||||
activeSkill.debuffSkill = true
|
||||
local srcList = common.New("ModList")
|
||||
local inc = modDB:Sum("INC", skillCfg, "AuraEffect", "BuffEffectOnSelf", "AuraEffectOnSelf") + skillModList:Sum("INC", skillCfg, "AuraEffect")
|
||||
local more = modDB:Sum("MORE", skillCfg, "AuraEffect", "BuffEffectOnSelf", "AuraEffectOnSelf") * skillModList:Sum("MORE", skillCfg, "AuraEffect")
|
||||
srcList:ScaleAddList(activeSkill.auraModList, (1 + inc / 100) * more)
|
||||
srcList:ScaleAddList(extraAuraModList, (1 + inc / 100) * more)
|
||||
mergeBuff(srcList, buffs, activeSkill.activeGem.grantedEffect.name)
|
||||
srcList:ScaleAddList(buff.modList, activeSkill.skillData.stackCount or 1)
|
||||
mergeBuff(srcList, debuffs, buff.name)
|
||||
end
|
||||
if env.minion and not modDB:Sum("FLAG", nil, "YourAurasCannotAffectAllies") then
|
||||
activeSkill.minionBuffSkill = true
|
||||
affectedByAura[env.minion] = true
|
||||
local srcList = common.New("ModList")
|
||||
local inc = modDB:Sum("INC", skillCfg, "AuraEffect") + env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf") + skillModList:Sum("INC", skillCfg, "AuraEffect")
|
||||
local more = modDB:Sum("MORE", skillCfg, "AuraEffect") * env.minion.modDB:Sum("MORE", nil, "BuffEffectOnSelf", "AuraEffectOnSelf") * skillModList:Sum("MORE", skillCfg, "AuraEffect")
|
||||
srcList:ScaleAddList(activeSkill.auraModList, (1 + inc / 100) * more)
|
||||
srcList:ScaleAddList(extraAuraModList, (1 + inc / 100) * more)
|
||||
mergeBuff(srcList, minionBuffs, activeSkill.activeGem.grantedEffect.name)
|
||||
end
|
||||
end
|
||||
if activeSkill.minion then
|
||||
for _, activeSkill in ipairs(activeSkill.minion.activeSkillList) do
|
||||
local skillModList = activeSkill.skillModList
|
||||
local skillCfg = activeSkill.skillCfg
|
||||
if activeSkill.auraModList and activeSkill.skillData.enable then
|
||||
if not modDB:Sum("FLAG", nil, "AlliesAurasCannotAffectSelf") then
|
||||
local srcList = common.New("ModList")
|
||||
local inc = modDB:Sum("INC", skillCfg, "BuffEffectOnSelf", "AuraEffectOnSelf") + skillModList:Sum("INC", skillCfg, "AuraEffect")
|
||||
local more = modDB:Sum("MORE", skillCfg, "BuffEffectOnSelf", "AuraEffectOnSelf") * skillModList:Sum("MORE", skillCfg, "AuraEffect")
|
||||
srcList:ScaleAddList(activeSkill.auraModList, (1 + inc / 100) * more)
|
||||
mergeBuff(srcList, buffs, activeSkill.activeGem.grantedEffect.id)
|
||||
end
|
||||
if env.minion and (env.minion ~= activeSkill.minion or not activeSkill.skillData.auraCannotAffectSelf) then
|
||||
local srcList = common.New("ModList")
|
||||
local inc = env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf") + skillModList:Sum("INC", skillCfg, "AuraEffect")
|
||||
local more = env.minion.modDB:Sum("MORE", nil, "BuffEffectOnSelf", "AuraEffectOnSelf") * skillModList:Sum("MORE", skillCfg, "AuraEffect")
|
||||
srcList:ScaleAddList(activeSkill.auraModList, (1 + inc / 100) * more)
|
||||
mergeBuff(srcList, minionBuffs, activeSkill.activeGem.grantedEffect.id)
|
||||
elseif buff.type == "Curse" or buff.type == "CurseBuff" then
|
||||
if env.mode_effective and (not enemyDB:Sum("FLAG", nil, "Hexproof") or modDB:Sum("FLAG", nil, "CursesIgnoreHexproof")) then
|
||||
local curse = {
|
||||
name = buff.name,
|
||||
fromPlayer = true,
|
||||
priority = activeSkill.skillTypes[SkillType.Aura] and 3 or 1,
|
||||
}
|
||||
local inc = modDB:Sum("INC", skillCfg, "CurseEffect") + enemyDB:Sum("INC", nil, "CurseEffectOnSelf") + skillModList:Sum("INC", skillCfg, "CurseEffect")
|
||||
local more = modDB:Sum("MORE", skillCfg, "CurseEffect") * enemyDB:Sum("MORE", nil, "CurseEffectOnSelf") * skillModList:Sum("MORE", skillCfg, "CurseEffect")
|
||||
if buff.type == "Curse" then
|
||||
curse.modList = common.New("ModList")
|
||||
curse.modList:ScaleAddList(buff.modList, (1 + inc / 100) * more)
|
||||
else
|
||||
-- Curse applies a buff; scale by curse effect, then buff effect
|
||||
local temp = common.New("ModList")
|
||||
temp:ScaleAddList(buff.modList, (1 + inc / 100) * more)
|
||||
curse.buffModList = common.New("ModList")
|
||||
local buffInc = modDB:Sum("INC", skillCfg, "BuffEffectOnSelf")
|
||||
local buffMore = modDB:Sum("MORE", skillCfg, "BuffEffectOnSelf")
|
||||
curse.buffModList:ScaleAddList(temp, (1 + buffInc / 100) * buffMore)
|
||||
if env.minion then
|
||||
curse.minionBuffModList = common.New("ModList")
|
||||
local buffInc = env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf")
|
||||
local buffMore = env.minion.modDB:Sum("MORE", nil, "BuffEffectOnSelf")
|
||||
curse.minionBuffModList:ScaleAddList(temp, (1 + buffInc / 100) * buffMore)
|
||||
end
|
||||
end
|
||||
t_insert(curses, curse)
|
||||
end
|
||||
end
|
||||
end
|
||||
if env.mode_effective then
|
||||
if activeSkill.debuffModList then
|
||||
activeSkill.debuffSkill = true
|
||||
local srcList = common.New("ModList")
|
||||
srcList:ScaleAddList(activeSkill.debuffModList, activeSkill.skillData.stackCount or 1)
|
||||
mergeBuff(srcList, debuffs, activeSkill.activeGem.grantedEffect.name)
|
||||
end
|
||||
if (activeSkill.curseModList or (activeSkill.skillFlags.curse and activeSkill.buffModList))
|
||||
and (not enemyDB:Sum("FLAG", nil, "Hexproof") or modDB:Sum("FLAG", nil, "CursesIgnoreHexproof")) then
|
||||
local curse = {
|
||||
name = activeSkill.activeGem.grantedEffect.name,
|
||||
fromPlayer = true,
|
||||
priority = activeSkill.skillTypes[SkillType.Aura] and 3 or 1,
|
||||
}
|
||||
local inc = modDB:Sum("INC", skillCfg, "CurseEffect") + enemyDB:Sum("INC", nil, "CurseEffectOnSelf") + skillModList:Sum("INC", skillCfg, "CurseEffect")
|
||||
local more = modDB:Sum("MORE", skillCfg, "CurseEffect") * enemyDB:Sum("MORE", nil, "CurseEffectOnSelf") * skillModList:Sum("MORE", skillCfg, "CurseEffect")
|
||||
if activeSkill.curseModList then
|
||||
curse.modList = common.New("ModList")
|
||||
curse.modList:ScaleAddList(activeSkill.curseModList, (1 + inc / 100) * more)
|
||||
end
|
||||
if activeSkill.buffModList then
|
||||
-- Curse applies a buff; scale by curse effect, then buff effect
|
||||
local temp = common.New("ModList")
|
||||
temp:ScaleAddList(activeSkill.buffModList, (1 + inc / 100) * more)
|
||||
curse.buffModList = common.New("ModList")
|
||||
local buffInc = modDB:Sum("INC", skillCfg, "BuffEffectOnSelf")
|
||||
local buffMore = modDB:Sum("MORE", skillCfg, "BuffEffectOnSelf")
|
||||
curse.buffModList:ScaleAddList(temp, (1 + buffInc / 100) * buffMore)
|
||||
if env.minion then
|
||||
curse.minionBuffModList = common.New("ModList")
|
||||
local buffInc = env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf")
|
||||
local buffMore = env.minion.modDB:Sum("MORE", nil, "BuffEffectOnSelf")
|
||||
curse.minionBuffModList:ScaleAddList(temp, (1 + buffInc / 100) * buffMore)
|
||||
end
|
||||
end
|
||||
t_insert(curses, curse)
|
||||
end
|
||||
if activeSkill.minion then
|
||||
for _, activeSkill in ipairs(activeSkill.minion.activeSkillList) do
|
||||
local skillModList = activeSkill.skillModList
|
||||
local skillCfg = activeSkill.skillCfg
|
||||
if activeSkill.curseModList and activeSkill.skillData.enable and not enemyDB:Sum("FLAG", nil, "Hexproof") then
|
||||
local curse = {
|
||||
name = activeSkill.activeGem.grantedEffect.name,
|
||||
priority = 1,
|
||||
}
|
||||
local inc = enemyDB:Sum("INC", nil, "CurseEffectOnSelf") + skillModList:Sum("INC", skillCfg, "CurseEffect")
|
||||
local more = enemyDB:Sum("MORE", nil, "CurseEffectOnSelf") * skillModList:Sum("MORE", skillCfg, "CurseEffect")
|
||||
curse.modList = common.New("ModList")
|
||||
curse.modList:ScaleAddList(activeSkill.curseModList, (1 + inc / 100) * more)
|
||||
t_insert(minionCurses, curse)
|
||||
if activeSkill.minion then
|
||||
for _, activeSkill in ipairs(activeSkill.minion.activeSkillList) do
|
||||
local skillModList = activeSkill.skillModList
|
||||
local skillCfg = activeSkill.skillCfg
|
||||
for _, buff in ipairs(activeSkill.buffList) do
|
||||
if buff.type == "Aura" then
|
||||
if env.mode_buffs and activeSkill.skillData.enable then
|
||||
if not modDB:Sum("FLAG", nil, "AlliesAurasCannotAffectSelf") then
|
||||
local srcList = common.New("ModList")
|
||||
local inc = modDB:Sum("INC", skillCfg, "BuffEffectOnSelf", "AuraEffectOnSelf") + skillModList:Sum("INC", skillCfg, "AuraEffect")
|
||||
local more = modDB:Sum("MORE", skillCfg, "BuffEffectOnSelf", "AuraEffectOnSelf") * skillModList:Sum("MORE", skillCfg, "AuraEffect")
|
||||
srcList:ScaleAddList(buff.modList, (1 + inc / 100) * more)
|
||||
mergeBuff(srcList, buffs, buff.name)
|
||||
end
|
||||
if env.minion and (env.minion ~= activeSkill.minion or not activeSkill.skillData.auraCannotAffectSelf) then
|
||||
local srcList = common.New("ModList")
|
||||
local inc = env.minion.modDB:Sum("INC", nil, "BuffEffectOnSelf", "AuraEffectOnSelf") + skillModList:Sum("INC", skillCfg, "AuraEffect")
|
||||
local more = env.minion.modDB:Sum("MORE", nil, "BuffEffectOnSelf", "AuraEffectOnSelf") * skillModList:Sum("MORE", skillCfg, "AuraEffect")
|
||||
srcList:ScaleAddList(buff.modList, (1 + inc / 100) * more)
|
||||
mergeBuff(srcList, minionBuffs, buff.name)
|
||||
end
|
||||
end
|
||||
elseif buff.type == "Curse" then
|
||||
if env.mode_effective and activeSkill.skillData.enable and not enemyDB:Sum("FLAG", nil, "Hexproof") then
|
||||
local curse = {
|
||||
name = buff.name,
|
||||
priority = 1,
|
||||
}
|
||||
local inc = enemyDB:Sum("INC", nil, "CurseEffectOnSelf") + skillModList:Sum("INC", skillCfg, "CurseEffect")
|
||||
local more = enemyDB:Sum("MORE", nil, "CurseEffectOnSelf") * skillModList:Sum("MORE", skillCfg, "CurseEffect")
|
||||
curse.modList = common.New("ModList")
|
||||
curse.modList:ScaleAddList(buff.modList, (1 + inc / 100) * more)
|
||||
t_insert(minionCurses, curse)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -40,14 +40,18 @@ end
|
||||
-- Validate the level of the given gem
|
||||
function calcLib.validateGemLevel(gem)
|
||||
if not gem.grantedEffect.levels[gem.level] then
|
||||
-- Try limiting to the level range of the gem
|
||||
gem.level = m_max(1, gem.level)
|
||||
if #gem.grantedEffect.levels > 0 then
|
||||
gem.level = m_min(#gem.grantedEffect.levels, gem.level)
|
||||
end
|
||||
if not gem.grantedEffect.levels[gem.level] then
|
||||
-- That failed, so just grab any level
|
||||
gem.level = next(gem.grantedEffect.levels)
|
||||
if gem.grantedEffect.defaultLevel then
|
||||
gem.level = gem.grantedEffect.defaultLevel
|
||||
else
|
||||
-- Try limiting to the level range of the gem
|
||||
gem.level = m_max(1, gem.level)
|
||||
if #gem.grantedEffect.levels > 0 then
|
||||
gem.level = m_min(#gem.grantedEffect.levels, gem.level)
|
||||
end
|
||||
if not gem.grantedEffect.levels[gem.level] then
|
||||
-- That failed, so just grab any level
|
||||
gem.level = next(gem.grantedEffect.levels)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -219,24 +219,49 @@ function calcs.buildOutput(build, mode)
|
||||
if env.modDB:Sum("FLAG", nil, "UnholyMight") then
|
||||
t_insert(combatList, "Unholy Might")
|
||||
end
|
||||
for _, activeSkill in ipairs(env.activeSkillList) do
|
||||
if activeSkill.buffSkill then
|
||||
if activeSkill.skillFlags.multiPart then
|
||||
t_insert(buffList, activeSkill.activeGem.grantedEffect.name .. " (" .. activeSkill.skillPartName .. ")")
|
||||
else
|
||||
t_insert(buffList, activeSkill.activeGem.grantedEffect.name)
|
||||
for name in pairs(env.buffs) do
|
||||
t_insert(buffList, name)
|
||||
end
|
||||
table.sort(buffList)
|
||||
env.player.breakdown.SkillBuffs = { modList = { } }
|
||||
for _, name in ipairs(buffList) do
|
||||
for _, mod in ipairs(env.buffs[name]) do
|
||||
local value = env.modDB:EvalMod(mod)
|
||||
if value and value ~= 0 then
|
||||
t_insert(env.player.breakdown.SkillBuffs.modList, {
|
||||
mod = mod,
|
||||
value = value,
|
||||
})
|
||||
end
|
||||
end
|
||||
if activeSkill.debuffSkill then
|
||||
if activeSkill.skillFlags.multiPart then
|
||||
t_insert(curseList, activeSkill.activeGem.grantedEffect.name .. " (" .. activeSkill.skillPartName .. ")")
|
||||
else
|
||||
t_insert(curseList, activeSkill.activeGem.grantedEffect.name)
|
||||
end
|
||||
env.player.breakdown.SkillDebuffs = { modList = { } }
|
||||
for name in pairs(env.debuffs) do
|
||||
t_insert(curseList, name)
|
||||
end
|
||||
table.sort(curseList)
|
||||
for _, name in ipairs(curseList) do
|
||||
for _, mod in ipairs(env.debuffs[name]) do
|
||||
local value = env.enemy.modDB:EvalMod(mod)
|
||||
if value and value ~= 0 then
|
||||
t_insert(env.player.breakdown.SkillDebuffs.modList, {
|
||||
mod = mod,
|
||||
value = value,
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
for _, slot in ipairs(env.curseSlots) do
|
||||
t_insert(curseList, slot.name)
|
||||
for _, mod in ipairs(slot.modList) do
|
||||
local value = env.enemy.modDB:EvalMod(mod)
|
||||
if value and value ~= 0 then
|
||||
t_insert(env.player.breakdown.SkillDebuffs.modList, {
|
||||
mod = mod,
|
||||
value = value,
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
output.BuffList = table.concat(buffList, ", ")
|
||||
output.CombatList = table.concat(combatList, ", ")
|
||||
@@ -262,15 +287,23 @@ function calcs.buildOutput(build, mode)
|
||||
if env.minion.modDB:Sum("FLAG", nil, "UnholyMight") then
|
||||
t_insert(combatList, "Unholy Might")
|
||||
end
|
||||
for _, activeSkill in ipairs(env.activeSkillList) do
|
||||
if activeSkill.minionBuffSkill then
|
||||
if activeSkill.skillFlags.multiPart then
|
||||
t_insert(buffList, activeSkill.activeGem.grantedEffect.name .. " (" .. activeSkill.skillPartName .. ")")
|
||||
else
|
||||
t_insert(buffList, activeSkill.activeGem.grantedEffect.name)
|
||||
for name in pairs(env.minionBuffs) do
|
||||
t_insert(buffList, name)
|
||||
end
|
||||
table.sort(buffList)
|
||||
env.minion.breakdown.SkillBuffs = { modList = { } }
|
||||
for _, name in ipairs(buffList) do
|
||||
for _, mod in ipairs(env.minionBuffs[name]) do
|
||||
local value = env.minion.modDB:EvalMod(mod)
|
||||
if value and value ~= 0 then
|
||||
t_insert(env.minion.breakdown.SkillBuffs.modList, {
|
||||
mod = mod,
|
||||
value = value,
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
env.minion.breakdown.SkillDebuffs = env.player.breakdown.SkillDebuffs
|
||||
output.Minion.BuffList = table.concat(buffList, ", ")
|
||||
output.Minion.CombatList = table.concat(combatList, ", ")
|
||||
output.Minion.CurseList = output.CurseList
|
||||
|
||||
@@ -88,6 +88,8 @@ local modNameList = {
|
||||
["evasion and energy shield"] = "EvasionAndEnergyShield",
|
||||
["armour, evasion and energy shield"] = "Defences",
|
||||
["defences"] = "Defences",
|
||||
["chance to evade"] = "EvadeChance",
|
||||
["chance to evade attacks"] = "EvadeChance",
|
||||
["chance to evade projectile attacks"] = "ProjectileEvadeChance",
|
||||
["chance to evade melee attacks"] = "MeleeEvadeChance",
|
||||
-- Resistances
|
||||
@@ -488,6 +490,7 @@ local modTagList = {
|
||||
["wh[ie][ln]e? not on full life"] = { tag = { type = "Condition", var = "FullLife", neg = true } },
|
||||
["wh[ie][ln]e? no mana is reserved"] = { tag = { type = "Condition", var = "NoManaReserved" } },
|
||||
["wh[ie][ln]e? on full energy shield"] = { tag = { type = "Condition", var = "FullEnergyShield" } },
|
||||
["wh[ie][ln]e? not on full energy shield"] = { tag = { type = "Condition", var = "FullEnergyShield", neg = true } },
|
||||
["while you have no power charges"] = { tag = { type = "Condition", var = "HaveNoPowerCharges" } },
|
||||
["while you have no frenzy charges"] = { tag = { type = "Condition", var = "HaveNoFrenzyCharges" } },
|
||||
["while you have no endurance charges"] = { tag = { type = "Condition", var = "HaveNoEnduranceCharges" } },
|
||||
|
||||
@@ -88,6 +88,8 @@ local modNameList = {
|
||||
["evasion and energy shield"] = "EvasionAndEnergyShield",
|
||||
["armour, evasion and energy shield"] = "Defences",
|
||||
["defences"] = "Defences",
|
||||
["chance to evade"] = "EvadeChance",
|
||||
["chance to evade attacks"] = "EvadeChance",
|
||||
["chance to evade projectile attacks"] = "ProjectileEvadeChance",
|
||||
["chance to evade melee attacks"] = "MeleeEvadeChance",
|
||||
-- Resistances
|
||||
@@ -492,6 +494,7 @@ local modTagList = {
|
||||
["wh[ie][ln]e? not on full life"] = { tag = { type = "Condition", var = "FullLife", neg = true } },
|
||||
["wh[ie][ln]e? no mana is reserved"] = { tag = { type = "Condition", var = "NoManaReserved" } },
|
||||
["wh[ie][ln]e? on full energy shield"] = { tag = { type = "Condition", var = "FullEnergyShield" } },
|
||||
["wh[ie][ln]e? not on full energy shield"] = { tag = { type = "Condition", var = "FullEnergyShield", neg = true } },
|
||||
["while you have no power charges"] = { tag = { type = "Condition", var = "HaveNoPowerCharges" } },
|
||||
["while you have no frenzy charges"] = { tag = { type = "Condition", var = "HaveNoFrenzyCharges" } },
|
||||
["while you have no endurance charges"] = { tag = { type = "Condition", var = "HaveNoEnduranceCharges" } },
|
||||
|
||||
Reference in New Issue
Block a user