Skip to content
Open
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
31 changes: 31 additions & 0 deletions spec/System/TestOverwhelmingHate_spec.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
describe("TestOverwhelmingHate", function()
before_each(function()
newBuild()
end)

local function maximumRage(customMods)
build.configTab.input.customMods = customMods
build.configTab:BuildModList()
runCallback("OnFrame")
return build.calcsTab.mainOutput.MaximumRage
end

it("applies increases and reductions to maximum Life to maximum Rage at 20% of their value", function()
local rage = "Gain 1 Rage on Attack Hit"
local base = maximumRage(rage)
assert.are.equal(30, base)

-- Without the keystone line increased Life doesn't change maximum Rage
assert.are.equal(base, maximumRage(rage .. "\n200% increased maximum Life"))

local keystone = rage .. "\nIncreases and reductions to Maximum Life also apply to Maximum Rage at 20% Value"
assert.are.equal(base, maximumRage(keystone))
-- 200% increased Life gives 40% increased maximum Rage
assert.are.equal(42, maximumRage(keystone .. "\n200% increased maximum Life"))
-- Reductions apply too, and more/less Life doesn't
assert.are.equal(27, maximumRage(keystone .. "\n50% reduced maximum Life"))
assert.are.equal(base, maximumRage(keystone .. "\n20% less maximum Life"))
-- The converted value is rounded down: 279% increased Life gives 55%, and 129 * 1.55 = 199.95 rounds to 199
assert.are.equal(199, maximumRage(keystone .. "\n+99 to Maximum Rage\n279% increased maximum Life"))
end)
end)
2 changes: 1 addition & 1 deletion src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17567,7 +17567,7 @@ c["Increases and Reductions to Physical Damage also apply to Effect of Auras fro
c["Increases and Reductions to Projectile Speed also apply to Damage with Bows"]={{[1]={flags=0,keywordFlags=0,name="ProjectileSpeedAppliesToBowDamage",type="FLAG",value=true}},nil}
c["Increases and Reductions to your Evasion Rating also apply to your Spell Damage"]={{[1]={flags=0,keywordFlags=0,name="EvasionAppliesToSpellDamage",type="FLAG",value=true}},nil}
c["Increases and Reductions to your Evasion Rating also apply to your Spell Damage at 50% of their value"]={nil,"Increases and Reductions to your Evasion Rating also apply to your Spell Damage at 50% of their value "}
c["Increases and reductions to Maximum Life also apply to Maximum Rage at 20% Value"]={nil,"Increases and reductions to Maximum Life also apply to Maximum Rage at 20% Value "}
c["Increases and reductions to Maximum Life also apply to Maximum Rage at 20% Value"]={{[1]={flags=0,keywordFlags=0,name="LifeAppliesToMaximumRage",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="ImprovedLifeAppliesToMaximumRage",type="MAX",value=20}},nil}
c["Increases and reductions to Maximum Mana also apply to Shock Effect at 30% of their value"]={{[1]={flags=0,keywordFlags=0,name="ManaAppliesToShockEffect",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="ImprovedManaAppliesToShockEffect",type="MAX",value=30}},nil}
c["Increases to Cast Speed from Arcane Surge also applies to Movement Speed"]={{[1]={flags=0,keywordFlags=0,name="ArcaneSurgeCastSpeedToMovementSpeed",type="FLAG",value=true}},nil}
c["Infernal Cry has 16% increased Area of Effect"]={{[1]={[1]={includeTransfigured=true,skillName="Infernal Cry",type="SkillName"},flags=0,keywordFlags=0,name="AreaOfEffect",type="INC",value=16}},nil}
Expand Down
8 changes: 7 additions & 1 deletion src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,13 @@ local function doActorMisc(env, actor)
condList["LeechingEnergyShield"] = true
end
if modDB:Flag(nil, "Condition:CanGainRage") or modDB:Sum("BASE", nil, "RageRegen") > 0 then
local maxStacks = m_floor(modDB:Sum("BASE", skillCfg, "MaximumRage") * modDB:More(skillCfg, "MaximumRage"))
local incMaxRage = modDB:Sum("INC", skillCfg, "MaximumRage")
if modDB:Flag(nil, "LifeAppliesToMaximumRage") then
-- Overwhelming Hate: increases and reductions to maximum Life also apply to maximum Rage at a percentage of their value
-- The game rounds the converted value down, e.g. 279% increased Life at 20% gives 55%, not 55.8%
incMaxRage = incMaxRage + m_floor(modDB:Sum("INC", nil, "Life") * (modDB:Max(nil, "ImprovedLifeAppliesToMaximumRage") or 100) / 100)
end
local maxStacks = m_floor(modDB:Sum("BASE", skillCfg, "MaximumRage") * m_max(1 + incMaxRage / 100, 0) * modDB:More(skillCfg, "MaximumRage"))
local minStacks = m_min(modDB:Sum("BASE", nil, "MinimumRage"), maxStacks)
local rageConfig = modDB:Sum("BASE", nil, "Multiplier:RageStack")
local stacks = m_max(m_min(rageConfig, maxStacks), (minStacks > 0 and minStacks) or 0)
Expand Down
1 change: 1 addition & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2603,6 +2603,7 @@ local specialModList = {
flag("Condition:CanGainRage", { type = "ActorCondition", actor = "enemy", var = "PinnacleBoss" }),
},
["maximum rage is halved"] = { mod("MaximumRage", "MORE", -50) },
["increases and reductions to maximum life also apply to maximum rage at (%d+)%% value"] = function(num) return { flag("LifeAppliesToMaximumRage"), mod("ImprovedLifeAppliesToMaximumRage", "MAX", num) } end,
["inherent effects from having rage are tripled"] = { mod("RageEffect", "MORE", 200) },
["inherent effects from having rage are doubled"] = { mod("RageEffect", "MORE", 100) },
["cannot be stunned while you have at least (%d+) rage"] = function(num) return { flag("StunImmune", { type = "MultiplierThreshold", var = "Rage", threshold = num }) } end,
Expand Down