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
9 changes: 6 additions & 3 deletions src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ local function doActorMisc(env, actor)
condList["LeechingLife"] = true
env.configInput.conditionLeeching = true
end
if modDB:Flag(nil, "CanLeechLifeOnFullEnergyShield") then
if modDB:Flag(nil, "CanLeechEnergyShieldOnFullEnergyShield") then
condList["Leeching"] = true
condList["LeechingEnergyShield"] = true
env.configInput.conditionLeeching = true
Expand Down Expand Up @@ -1058,9 +1058,12 @@ end

function calcs.actionSpeedMod(actor)
local modDB = actor.modDB
local minimumActionSpeed = modDB:Max(nil, "MinimumActionSpeed") or 0
local maximumActionSpeedReduction = modDB:Max(nil, "MaximumActionSpeedReduction")
local actionSpeedMod = 1 + (m_max(-data.misc.TemporalChainsEffectCap, modDB:Sum("INC", nil, "TemporalChainsActionSpeed")) + modDB:Sum("INC", nil, "ActionSpeed")) / 100
if modDB:Flag(nil, "ActionSpeedCannotBeBelowBase") then
actionSpeedMod = m_max(1, actionSpeedMod)
actionSpeedMod = m_max(minimumActionSpeed / 100, actionSpeedMod)
if maximumActionSpeedReduction then
actionSpeedMod = m_min((100 - maximumActionSpeedReduction) / 100, actionSpeedMod)
end
return actionSpeedMod
end
Expand Down
15 changes: 10 additions & 5 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1980,10 +1980,10 @@ local specialModList = {
} end,
-- Juggernaut
["armour received from body armour is doubled"] = { flag("Unbreakable") },
["action speed cannot be modified to below base value"] = { flag("ActionSpeedCannotBeBelowBase") },
["action speed cannot be modified to below base value"] = { mod("MinimumActionSpeed", "MAX", 100) },
["movement speed cannot be modified to below base value"] = { flag("MovementSpeedCannotBeBelowBase") },
["you cannot be slowed to below base speed"] = { flag("ActionSpeedCannotBeBelowBase") },
["cannot be slowed to below base speed"] = { flag("ActionSpeedCannotBeBelowBase") },
["you cannot be slowed to below base speed"] = { mod("MinimumActionSpeed", "MAX", 100) },
["cannot be slowed to below base speed"] = { mod("MinimumActionSpeed", "MAX", 100) },
["gain accuracy rating equal to your strength"] = { mod("Accuracy", "BASE", 1, { type = "PerStat", stat = "Str" }) },
["gain accuracy rating equal to twice your strength"] = { mod("Accuracy", "BASE", 2, { type = "PerStat", stat = "Str" }) },
-- Necromancer
Expand Down Expand Up @@ -2052,7 +2052,7 @@ local specialModList = {
["you are immune to bleeding while leeching"] = { mod("AvoidBleed", "BASE", 100, { type = "Condition", var = "Leeching" }) },
["life leech effects are not removed at full life"] = { flag("CanLeechLifeOnFullLife") },
["life leech effects are not removed when unreserved life is filled"] = { flag("CanLeechLifeOnFullLife") },
["energy shield leech effects from attacks are not removed at full energy shield"] = { flag("CanLeechLifeOnFullEnergyShield") },
["energy shield leech effects from attacks are not removed at full energy shield"] = { flag("CanLeechEnergyShieldOnFullEnergyShield") },
["cannot take reflected physical damage"] = { mod("PhysicalReflectedDamageTaken", "MORE", -100) },
["gain (%d+)%% increased movement speed for 20 seconds when you kill an enemy"] = function(num) return { mod("MovementSpeed", "INC", num, { type = "Condition", var = "KilledRecently" }) } end,
["gain (%d+)%% increased attack speed for 20 seconds when you kill a rare or unique enemy"] = function(num) return { mod("Speed", "INC", num, nil, ModFlag.Attack, 0, { type = "Condition", var = "KilledUniqueEnemy" }) } end,
Expand All @@ -2061,6 +2061,10 @@ local specialModList = {
["(%d+)%% chance to gain (%d+)%% of non%-chaos damage with hits as extra chaos damage"] = function(num, _, perc) return { mod("NonChaosDamageGainAsChaos", "BASE", num / 100 * tonumber(perc)) } end,
["movement skills cost no mana"] = { mod("ManaCost", "MORE", -100, nil, 0, KeywordFlag.Movement) },
["cannot be stunned while you have ghost shrouds"] = function(num) return { mod("AvoidStun", "BASE", 100, { type = "MultiplierThreshold", var = "GhostShroud", threshold = 1 }) } end,
["your action speed is at least (%d+)%% of base value"] = function(num) return { mod("MinimumActionSpeed", "MAX", num) } end,
["nearby enemy monsters' action speed is at most (%d+)%% of base value"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("MaximumActionSpeedReduction", "MAX", 100 - num)} )} end,
["prevent %+(%d+)%% of suppressed spell damage while on full energy shield"] = function(num) return { mod("SpellSuppressionEffect", "BASE", num, { type = "Condition", var = "FullEnergyShield" }) } end,
["energy shield leech effects are not removed when energy shield is filled"] = { flag("CanLeechEnergyShieldOnFullEnergyShield") },
-- Item local modifiers
["has no sockets"] = { flag("NoSockets") },
["has (%d+) sockets?"] = function(num) return { mod("SocketCount", "BASE", num) } end,
Expand Down Expand Up @@ -2523,7 +2527,7 @@ local specialModList = {
-- Suppression
["your chance to suppressed spell damage is lucky"] = { flag("SpellSuppressionChanceIsLucky") },
["your chance to suppressed spell damage is unlucky"] = { flag("SpellSuppressionChanceIsUnlucky") },
["prevent +(%+%d+)%% of suppressed spell damage"] = function(num) return { mod("SpellSuppressionEffect", "BASE", num) } end,
["prevent %+(%d+)%% of suppressed spell damage"] = function(num) return { mod("SpellSuppressionEffect", "BASE", num) } end,
["critical strike chance is increased by chance to suppress spell damage"] = { mod("CritChance", "INC", 1, { type = "PerStat", stat = "SpellSuppressionChance", div = 1 }) },
["you take (%d+)%% reduced extra damage from suppressed critical strikes"] = function(num) return { mod("ReduceSuppressedCritExtraDamage", "BASE", num) } end,
["+(%d+)%% chance to suppress spell damage if your boots, helmet and gloves have evasion"] = function(num) return {
Expand Down Expand Up @@ -3051,6 +3055,7 @@ local specialModList = {
["immune to curses while you have at least (%d+) rage"] = function(num) return { mod("AvoidCurse", "BASE", 100, { type = "MultiplierThreshold", var = "Rage", threshold = num }) } end,
["the effect of chill on you is reversed"] = { flag("SelfChillEffectIsReversed") },
["your movement speed is (%d+)%% of its base value"] = function(num) return { mod("MovementSpeed", "OVERRIDE", num / 100) } end,
["action speed cannot be modified to below (%d+)%% base value"] = function(num) return { mod("MinimumActionSpeed", "MAX", num) } end,
["armour also applies to lightning damage taken from hits"] = { mod("ArmourAppliesToLightningDamageTaken", "BASE", 100), },
["lightning resistance does not affect lightning damage taken"] = { flag("SelfIgnoreLightningResistance") },
["(%d+)%% increased maximum life and reduced fire resistance"] = function(num) return {
Expand Down