Release 1.4.6
- Fixed Onslaught/Unholy Might
This commit is contained in:
@@ -198,36 +198,42 @@ function calcs.defence(env, actor)
|
||||
end
|
||||
|
||||
-- Mana, life and energy shield regen
|
||||
do
|
||||
if modDB:Sum("FLAG", nil, "NoManaRegen") then
|
||||
output.ManaRegen = 0
|
||||
else
|
||||
output.ManaRegen = round((modDB:Sum("BASE", nil, "ManaRegen") + output.Mana * modDB:Sum("BASE", nil, "ManaRegenPercent") / 100) * calcLib.mod(modDB, nil, "ManaRegen", "ManaRecovery"), 1)
|
||||
if breakdown then
|
||||
breakdown.ManaRegen = breakdown.simple(nil, nil, output.ManaRegen, "ManaRegen", "ManaRecovery")
|
||||
end
|
||||
if modDB:Sum("FLAG", nil, "NoLifeRegen") then
|
||||
output.LifeRegen = 0
|
||||
elseif modDB:Sum("FLAG", nil, "ZealotsOath") then
|
||||
output.LifeRegen = 0
|
||||
local lifeBase = modDB:Sum("BASE", nil, "LifeRegen")
|
||||
if lifeBase > 0 then
|
||||
modDB:NewMod("EnergyShieldRegen", "BASE", lifeBase, "Zealot's Oath")
|
||||
end
|
||||
local lifePercent = modDB:Sum("BASE", nil, "LifeRegenPercent")
|
||||
if lifePercent > 0 then
|
||||
modDB:NewMod("EnergyShieldRegenPercent", "BASE", lifePercent, "Zealot's Oath")
|
||||
end
|
||||
else
|
||||
local lifeBase = modDB:Sum("BASE", nil, "LifeRegen")
|
||||
local lifePercent = modDB:Sum("BASE", nil, "LifeRegenPercent")
|
||||
if lifePercent > 0 then
|
||||
lifeBase = lifeBase + output.Life * lifePercent / 100
|
||||
end
|
||||
if lifeBase > 0 then
|
||||
output.LifeRegen = lifeBase * calcLib.mod(modDB, nil, "LifeRecovery")
|
||||
output.LifeRegenPercent = round(output.LifeRegen / output.Life * 100, 1)
|
||||
else
|
||||
output.LifeRegen = 0
|
||||
end
|
||||
end
|
||||
if modDB:Sum("FLAG", nil, "NoLifeRegen") then
|
||||
output.LifeRegen = 0
|
||||
elseif modDB:Sum("FLAG", nil, "ZealotsOath") then
|
||||
output.LifeRegen = 0
|
||||
local lifeBase = modDB:Sum("BASE", nil, "LifeRegen")
|
||||
if lifeBase > 0 then
|
||||
modDB:NewMod("EnergyShieldRegen", "BASE", lifeBase, "Zealot's Oath")
|
||||
end
|
||||
local lifePercent = modDB:Sum("BASE", nil, "LifeRegenPercent")
|
||||
if lifePercent > 0 then
|
||||
modDB:NewMod("EnergyShieldRegenPercent", "BASE", lifePercent, "Zealot's Oath")
|
||||
end
|
||||
else
|
||||
local lifeBase = modDB:Sum("BASE", nil, "LifeRegen")
|
||||
local lifePercent = modDB:Sum("BASE", nil, "LifeRegenPercent")
|
||||
if lifePercent > 0 then
|
||||
lifeBase = lifeBase + output.Life * lifePercent / 100
|
||||
end
|
||||
if lifeBase > 0 then
|
||||
output.LifeRegen = lifeBase * calcLib.mod(modDB, nil, "LifeRecovery")
|
||||
output.LifeRegenPercent = round(output.LifeRegen / output.Life * 100, 1)
|
||||
else
|
||||
output.LifeRegen = 0
|
||||
end
|
||||
end
|
||||
if modDB:Sum("FLAG", nil, "NoEnergyShieldRegen") then
|
||||
output.EnergyShieldRegen = 0
|
||||
else
|
||||
local esBase = modDB:Sum("BASE", nil, "EnergyShieldRegen")
|
||||
local esPercent = modDB:Sum("BASE", nil, "EnergyShieldRegenPercent")
|
||||
if esPercent > 0 then
|
||||
@@ -289,6 +295,10 @@ function calcs.defence(env, actor)
|
||||
end
|
||||
output.AttackDodgeChance = m_min(modDB:Sum("BASE", nil, "AttackDodgeChance"), 75)
|
||||
output.SpellDodgeChance = m_min(modDB:Sum("BASE", nil, "SpellDodgeChance"), 75)
|
||||
if modDB:Sum("FLAG", nil, "DodgeChanceIsUnlucky") then
|
||||
output.AttackDodgeChance = output.AttackDodgeChance / 100 * output.AttackDodgeChance
|
||||
output.SpellDodgeChance = output.SpellDodgeChance / 100 * output.SpellDodgeChance
|
||||
end
|
||||
local stunChance = 100 - modDB:Sum("BASE", nil, "AvoidStun")
|
||||
if output.EnergyShield > output.Life * 2 then
|
||||
stunChance = stunChance * 0.5
|
||||
|
||||
@@ -716,20 +716,20 @@ function calcs.offence(env, actor)
|
||||
t_insert(breakdown[damageType], s_format("= %d to %d", min, max))
|
||||
end
|
||||
if skillFlags.mine or skillFlags.trap or skillFlags.totem then
|
||||
if not modDB:Sum("FLAG", cfg, "CannotLeechLife") then
|
||||
if not modDB:Sum("FLAG", cfg, "CannotLeechLife") and not enemyDB:Sum("FLAG", nil, "CannotLeechLifeFromSelf") then
|
||||
local lifeLeech = modDB:Sum("BASE", cfg, "DamageLifeLeechToPlayer")
|
||||
if lifeLeech > 0 then
|
||||
lifeLeechTotal = lifeLeechTotal + (min + max) / 2 * lifeLeech / 100
|
||||
end
|
||||
end
|
||||
else
|
||||
if not modDB:Sum("FLAG", cfg, "CannotLeechLife") then
|
||||
if not modDB:Sum("FLAG", cfg, "CannotLeechLife") and not enemyDB:Sum("FLAG", nil, "CannotLeechLifeFromSelf") then
|
||||
local lifeLeech = modDB:Sum("BASE", cfg, "DamageLeech", "DamageLifeLeech", damageType.."DamageLifeLeech", isElemental[damageType] and "ElementalDamageLifeLeech" or nil) + enemyDB:Sum("BASE", nil, "SelfDamageLifeLeech") / 100
|
||||
if lifeLeech > 0 then
|
||||
lifeLeechTotal = lifeLeechTotal + (min + max) / 2 * lifeLeech / 100
|
||||
end
|
||||
end
|
||||
if not modDB:Sum("FLAG", cfg, "CannotLeechMana") then
|
||||
if not modDB:Sum("FLAG", cfg, "CannotLeechMana") and not enemyDB:Sum("FLAG", nil, "CannotLeechManaFromSelf") then
|
||||
local manaLeech = modDB:Sum("BASE", cfg, "DamageLeech", "DamageManaLeech", damageType.."DamageManaLeech", isElemental[damageType] and "ElementalDamageManaLeech" or nil) + enemyDB:Sum("BASE", nil, "SelfDamageManaLeech") / 100
|
||||
if manaLeech > 0 then
|
||||
manaLeechTotal = manaLeechTotal + (min + max) / 2 * manaLeech / 100
|
||||
@@ -801,9 +801,9 @@ function calcs.offence(env, actor)
|
||||
output.EnergyShieldOnHit = 0
|
||||
output.ManaOnHit = 0
|
||||
else
|
||||
output.LifeOnHit = modDB:Sum("BASE", skillCfg, "LifeOnHit") + enemyDB:Sum("BASE", skillCfg, "SelfLifeOnHit")
|
||||
output.EnergyShieldOnHit = modDB:Sum("BASE", skillCfg, "EnergyShieldOnHit") + enemyDB:Sum("BASE", skillCfg, "SelfEnergyShieldOnHit")
|
||||
output.ManaOnHit = modDB:Sum("BASE", skillCfg, "ManaOnHit") + enemyDB:Sum("BASE", skillCfg, "SelfManaOnHit")
|
||||
output.LifeOnHit = (modDB:Sum("BASE", skillCfg, "LifeOnHit") + enemyDB:Sum("BASE", skillCfg, "SelfLifeOnHit")) * calcLib.mod(modDB, nil, "LifeRecovery")
|
||||
output.EnergyShieldOnHit = (modDB:Sum("BASE", skillCfg, "EnergyShieldOnHit") + enemyDB:Sum("BASE", skillCfg, "SelfEnergyShieldOnHit")) * calcLib.mod(modDB, nil, "EnergyShieldRecovery")
|
||||
output.ManaOnHit = (modDB:Sum("BASE", skillCfg, "ManaOnHit") + enemyDB:Sum("BASE", skillCfg, "SelfManaOnHit")) * calcLib.mod(modDB, nil, "ManaRecovery")
|
||||
end
|
||||
output.LifeOnHitRate = output.LifeOnHit * hitRate
|
||||
output.EnergyShieldOnHitRate = output.EnergyShieldOnHit * hitRate
|
||||
@@ -895,18 +895,18 @@ function calcs.offence(env, actor)
|
||||
output.LifeLeechRate = 0
|
||||
output.LifeLeechPerHit = 0
|
||||
output.EnergyShieldLeechInstanceRate = output.EnergyShield * 0.02 * calcLib.mod(modDB, skillCfg, "LifeLeechRate")
|
||||
output.EnergyShieldLeechRate = output.LifeLeechInstantRate + m_min(output.LifeLeechInstances * output.EnergyShieldLeechInstanceRate, output.MaxEnergyShieldLeechRate)
|
||||
output.EnergyShieldLeechPerHit = m_min(output.EnergyShieldLeechInstanceRate, output.MaxEnergyShieldLeechRate) * output.LifeLeechDuration + output.LifeLeechInstant
|
||||
output.EnergyShieldLeechRate = (output.LifeLeechInstantRate + m_min(output.LifeLeechInstances * output.EnergyShieldLeechInstanceRate, output.MaxEnergyShieldLeechRate)) * calcLib.mod(modDB, nil, "EnergyShieldRecovery")
|
||||
output.EnergyShieldLeechPerHit = (m_min(output.EnergyShieldLeechInstanceRate, output.MaxEnergyShieldLeechRate) * output.LifeLeechDuration + output.LifeLeechInstant) * calcLib.mod(modDB, nil, "EnergyShieldRecovery")
|
||||
else
|
||||
output.LifeLeechInstanceRate = output.Life * 0.02 * calcLib.mod(modDB, skillCfg, "LifeLeechRate")
|
||||
output.LifeLeechRate = output.LifeLeechInstantRate + m_min(output.LifeLeechInstances * output.LifeLeechInstanceRate, output.MaxLifeLeechRate)
|
||||
output.LifeLeechPerHit = m_min(output.LifeLeechInstanceRate, output.MaxLifeLeechRate) * output.LifeLeechDuration + output.LifeLeechInstant
|
||||
output.LifeLeechRate = (output.LifeLeechInstantRate + m_min(output.LifeLeechInstances * output.LifeLeechInstanceRate, output.MaxLifeLeechRate)) * calcLib.mod(modDB, nil, "LifeRecovery")
|
||||
output.LifeLeechPerHit = (m_min(output.LifeLeechInstanceRate, output.MaxLifeLeechRate) * output.LifeLeechDuration + output.LifeLeechInstant) * calcLib.mod(modDB, nil, "LifeRecovery")
|
||||
output.EnergyShieldLeechRate = 0
|
||||
output.EnergyShieldLeechPerHit = 0
|
||||
end
|
||||
output.ManaLeechInstanceRate = output.Mana * 0.02 * calcLib.mod(modDB, skillCfg, "ManaLeechRate")
|
||||
output.ManaLeechRate = output.ManaLeechInstantRate + m_min(output.ManaLeechInstances * output.ManaLeechInstanceRate, output.MaxManaLeechRate)
|
||||
output.ManaLeechPerHit = m_min(output.ManaLeechInstanceRate, output.MaxManaLeechRate) * output.ManaLeechDuration + output.ManaLeechInstant
|
||||
output.ManaLeechRate = (output.ManaLeechInstantRate + m_min(output.ManaLeechInstances * output.ManaLeechInstanceRate, output.MaxManaLeechRate)) * calcLib.mod(modDB, nil, "ManaRecovery")
|
||||
output.ManaLeechPerHit = (m_min(output.ManaLeechInstanceRate, output.MaxManaLeechRate) * output.ManaLeechDuration + output.ManaLeechInstant) * calcLib.mod(modDB, nil, "ManaRecovery")
|
||||
skillFlags.leechES = output.EnergyShieldLeechRate > 0
|
||||
skillFlags.leechLife = output.LifeLeechRate > 0
|
||||
skillFlags.leechMana = output.ManaLeechRate > 0
|
||||
|
||||
@@ -239,12 +239,12 @@ local function doActorMisc(env, actor)
|
||||
|
||||
-- Add misc buffs
|
||||
if env.mode_combat then
|
||||
if condList["Onslaught"] then
|
||||
if modDB:Sum("FLAG", nil, "Onslaught") then
|
||||
local effect = m_floor(20 * (1 + modDB:Sum("INC", nil, "OnslaughtEffect", "BuffEffect") / 100))
|
||||
modDB:NewMod("Speed", "INC", effect, "Onslaught")
|
||||
modDB:NewMod("MovementSpeed", "INC", effect, "Onslaught")
|
||||
end
|
||||
if condList["UnholyMight"] then
|
||||
if modDB:Sum("FLAG", nil, "UnholyMight") then
|
||||
local effect = m_floor(30 * (1 + modDB:Sum("INC", nil, "BuffEffect") / 100))
|
||||
modDB:NewMod("PhysicalDamageGainAsChaos", "BASE", effect, "Unholy Might")
|
||||
end
|
||||
@@ -575,11 +575,6 @@ function calcs.perform(env)
|
||||
|
||||
-- Check for extra curses
|
||||
for _, value in ipairs(modDB:Sum("LIST", nil, "ExtraCurse")) do
|
||||
local curse = {
|
||||
name = value.name,
|
||||
fromPlayer = true,
|
||||
priority = 2,
|
||||
}
|
||||
local gemModList = common.New("ModList")
|
||||
calcs.mergeGemMods(gemModList, {
|
||||
level = value.level,
|
||||
@@ -595,9 +590,20 @@ function calcs.perform(env)
|
||||
end
|
||||
end
|
||||
end
|
||||
curse.modList = common.New("ModList")
|
||||
curse.modList:ScaleAddList(curseModList, (1 + enemyDB:Sum("INC", nil, "CurseEffectOnSelf") / 100) * enemyDB:Sum("MORE", nil, "CurseEffectOnSelf"))
|
||||
t_insert(curses, curse)
|
||||
if value.applyToPlayer then
|
||||
-- Sources for curses on the player don't usually respect any kind of limit, so there's little point bothering with slots
|
||||
modDB.multipliers["CurseOnSelf"] = (modDB.multipliers["CurseOnSelf"] or 0) + 1
|
||||
modDB:ScaleAddList(curseModList, (1 + modDB:Sum("INC", nil, "CurseEffectOnSelf") / 100) * modDB:Sum("MORE", nil, "CurseEffectOnSelf"))
|
||||
else
|
||||
local curse = {
|
||||
name = value.name,
|
||||
fromPlayer = true,
|
||||
priority = 2,
|
||||
}
|
||||
curse.modList = common.New("ModList")
|
||||
curse.modList:ScaleAddList(curseModList, (1 + enemyDB:Sum("INC", nil, "CurseEffectOnSelf") / 100) * enemyDB:Sum("MORE", nil, "CurseEffectOnSelf"))
|
||||
t_insert(curses, curse)
|
||||
end
|
||||
end
|
||||
|
||||
-- Assign curses to slots
|
||||
|
||||
@@ -31,6 +31,8 @@ function calcs.initModDB(env, modDB)
|
||||
modDB:NewMod("HitChance", "MORE", -50, "Base", { type = "Condition", var = "Blinded" })
|
||||
modDB:NewMod("MovementSpeed", "INC", -30, "Base", { type = "Condition", var = "Maimed" })
|
||||
modDB:NewMod("Condition:Burning", "FLAG", true, "Base", { type = "Condition", var = "Ignited" })
|
||||
modDB:NewMod("Onslaught", "FLAG", true, "Base", { type = "Condition", var = "Onslaught" })
|
||||
modDB:NewMod("UnholyMight", "FLAG", true, "Base", { type = "Condition", var = "UnholyMight" })
|
||||
modDB.conditions["Buffed"] = env.mode_buffs
|
||||
modDB.conditions["Combat"] = env.mode_combat
|
||||
modDB.conditions["Effective"] = env.mode_effective
|
||||
|
||||
@@ -212,10 +212,10 @@ function calcs.buildOutput(build, mode)
|
||||
if output.EnduranceCharges > 0 then
|
||||
t_insert(combatList, s_format("%d Endurance Charges", output.EnduranceCharges))
|
||||
end
|
||||
if env.modDB.conditions.Onslaught then
|
||||
if env.modDB:Sum("FLAG", nil, "Onslaught") then
|
||||
t_insert(combatList, "Onslaught")
|
||||
end
|
||||
if env.modDB.conditions.UnholyMight then
|
||||
if env.modDB:Sum("FLAG", nil, "UnholyMight") then
|
||||
t_insert(combatList, "Unholy Might")
|
||||
end
|
||||
for _, activeSkill in ipairs(env.activeSkillList) do
|
||||
@@ -252,10 +252,10 @@ function calcs.buildOutput(build, mode)
|
||||
if output.Minion.EnduranceCharges > 0 then
|
||||
t_insert(combatList, s_format("%d Endurance Charges", output.Minion.EnduranceCharges))
|
||||
end
|
||||
if env.minion.modDB.conditions.Onslaught then
|
||||
if env.minion.modDB:Sum("FLAG", nil, "Onslaught") then
|
||||
t_insert(combatList, "Onslaught")
|
||||
end
|
||||
if env.minion.modDB.conditions.UnholyMight then
|
||||
if env.minion.modDB:Sum("FLAG", nil, "UnholyMight") then
|
||||
t_insert(combatList, "Unholy Might")
|
||||
end
|
||||
for _, activeSkill in ipairs(env.activeSkillList) do
|
||||
|
||||
@@ -129,6 +129,7 @@ local modNameList = {
|
||||
["to avoid being ignited"] = "AvoidIgnite",
|
||||
["to avoid elemental status ailments"] = { "AvoidShock", "AvoidFrozen", "AvoidChilled", "AvoidIgnite" },
|
||||
["damage is taken from mana before life"] = "DamageTakenFromManaBeforeLife",
|
||||
["effect of curses on you"] = "CurseEffectOnSelf",
|
||||
-- Stun modifiers
|
||||
["stun recovery"] = "StunRecovery",
|
||||
["stun and block recovery"] = "StunRecovery",
|
||||
@@ -428,6 +429,7 @@ local modTagList = {
|
||||
["for each rare item you have equipped"] = { tag = { type = "Multiplier", var = "RareItem" } },
|
||||
["for each unique item you have equipped"] = { tag = { type = "Multiplier", var = "UniqueItem" } },
|
||||
["per curse on enemy"] = { tag = { type = "Multiplier", var = "CurseOnEnemy" } },
|
||||
["per curse on you"] = { tag = { type = "Multiplier", var = "CurseOnPlayer" } },
|
||||
["to you and allies"] = { },
|
||||
-- Per stat
|
||||
["per (%d+) strength"] = function(num) return { tag = { type = "PerStat", stat = "Str", div = num } } end,
|
||||
|
||||
Reference in New Issue
Block a user