From 14e5cc582e804f24a7ba32fee8485301b6e66051 Mon Sep 17 00:00:00 2001 From: MrHB212 Date: Tue, 16 Dec 2025 00:42:38 +0100 Subject: [PATCH 1/5] calc tab shows rage gain whent hit and on melee hit --- src/Data/ModCache.lua | 8 ++++---- src/Data/ModScalability.lua | 1 + src/Modules/CalcPerform.lua | 2 ++ src/Modules/CalcSections.lua | 2 ++ src/Modules/CalcSetup.lua | 1 + src/Modules/ModParser.lua | 13 +++++++++---- 6 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index 8b71962086..b8bc12acb3 100644 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -4927,7 +4927,7 @@ c["Gain 1 Life Flask Charge per 4% Life spent"]={{[1]={flags=0,keywordFlags=0,na c["Gain 1 Life Flask Charge per 4% Life spent On Hitting an Enemy while a Life Flask is at full Charges, 40% of its Charges are consumed"]={{[1]={flags=4,keywordFlags=0,name="Life",type="BASE",value=1}}," Flask Charge per 4% Life spent ting an Enemy while a Life Flask is at full Charges, 40% of its Charges are consumed "} c["Gain 1 Life Flask Charge per 4% Life spent On Hitting an Enemy while a Life Flask is at full Charges, 40% of its Charges are consumed Gain 1% of damage as Physical damage for 3 seconds per Charge consumed this way"]={{[1]={flags=4,keywordFlags=0,name="LifeAsPhysical",type="BASE",value=1}}," Flask Charge per 4% Life spent ting an Enemy while a Life Flask is at full Charges, 40% of its Charges are consumed Gain 1% of damage per Charge consumed this way "} c["Gain 1 Rage on Melee Axe Hit"]={{[1]={flags=0,keywordFlags=0,name="Condition:CanGainRage",type="FLAG",value=true}},nil} -c["Gain 1 Rage on Melee Hit"]={{[1]={flags=0,keywordFlags=0,name="Condition:CanGainRage",type="FLAG",value=true}},nil} +c["Gain 1 Rage on Melee Hit"]={{[1]={flags=0,keywordFlags=0,name="RageOnMeleeHit",type="BASE",value=1},[2]={flags=0,keywordFlags=0,name="Condition:CanGainRage",type="FLAG",value=true}},nil} c["Gain 1 Rage when your Hit Ignites a target"]={{}," Rage when your Hit Ignites a target "} c["Gain 1 Volatility on inflicting an Elemental Ailment"]={{}," Volatility on inflicting an Elemental Ailment "} c["Gain 1 Volatility on inflicting an Elemental Ailment Take no Damage from Volatility"]={{[1]={flags=0,keywordFlags=0,name="Damage",type="BASE",value=1}}," Volatility on inflicting an Elemental Ailment Take no from Volatility "} @@ -4971,7 +4971,7 @@ c["Gain 15% of maximum Life as Extra maximum Energy Shield"]={{[1]={flags=0,keyw c["Gain 18 Mana per enemy killed"]={{[1]={flags=0,keywordFlags=0,name="ManaOnKill",type="BASE",value=18}},nil} c["Gain 18% of Physical Damage as Extra Lightning Damage"]={{[1]={flags=0,keywordFlags=0,name="PhysicalDamageGainAsLightning",type="BASE",value=18}},nil} c["Gain 2 Rage on Melee Axe Hit"]={{[1]={flags=0,keywordFlags=0,name="Condition:CanGainRage",type="FLAG",value=true}},nil} -c["Gain 2 Rage when Hit by an Enemy"]={{[1]={flags=0,keywordFlags=0,name="Condition:CanGainRage",type="FLAG",value=true}},nil} +c["Gain 2 Rage when Hit by an Enemy"]={{[1]={flags=0,keywordFlags=0,name="RageWhenHit",type="BASE",value=2},[2]={flags=0,keywordFlags=0,name="Condition:CanGainRage",type="FLAG",value=true}},nil} c["Gain 2% of Damage as Extra Fire Damage per Endurance Charge consumed Recently"]={{[1]={[1]={type="Multiplier",var="EnduranceCharge"},flags=0,keywordFlags=0,name="DamageGainAsFire",type="BASE",value=2}}," consumed Recently "} c["Gain 20 Energy Shield when you Block"]={{[1]={flags=0,keywordFlags=0,name="EnergyShieldOnBlock",type="BASE",value=20}},nil} c["Gain 20 Life per enemy killed"]={{[1]={flags=0,keywordFlags=0,name="LifeOnKill",type="BASE",value=20}},nil} @@ -4992,7 +4992,7 @@ c["Gain 26% of Damage as Extra Lightning Damage"]={{[1]={flags=0,keywordFlags=0, c["Gain 27% of Damage as Extra Chaos Damage"]={{[1]={flags=0,keywordFlags=0,name="DamageGainAsChaos",type="BASE",value=27}},nil} c["Gain 3 Life per Enemy Hit with Attacks"]={{[1]={flags=4,keywordFlags=65536,name="LifeOnHit",type="BASE",value=3}},nil} c["Gain 3 Life per enemy killed"]={{[1]={flags=0,keywordFlags=0,name="LifeOnKill",type="BASE",value=3}},nil} -c["Gain 3 Rage when Hit by an Enemy"]={{[1]={flags=0,keywordFlags=0,name="Condition:CanGainRage",type="FLAG",value=true}},nil} +c["Gain 3 Rage when Hit by an Enemy"]={{[1]={flags=0,keywordFlags=0,name="RageWhenHit",type="BASE",value=3},[2]={flags=0,keywordFlags=0,name="Condition:CanGainRage",type="FLAG",value=true}},nil} c["Gain 3 Volatility when an Allied Persistent Reviving Minion is Killed"]={{}," Volatility when an Allied Persistent Reviving is Killed "} c["Gain 3% of Damage as Chaos Damage per Undead Minion"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageAsChaos",type="BASE",value=3}}}}," per Undead "} c["Gain 3% of Damage as Chaos Damage per Undead Minion Gain 5% of Damage as Chaos Damage per Undead Minion"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageAsChaos",type="BASE",value=3}}}}," per Undead Gain 5% of Damage as Chaos Damage per Undead Minion "} @@ -5017,7 +5017,7 @@ c["Gain 5 Life per Enemy Hit with Attacks"]={{[1]={flags=4,keywordFlags=65536,na c["Gain 5 Life per enemy killed"]={{[1]={flags=0,keywordFlags=0,name="LifeOnKill",type="BASE",value=5}},nil} c["Gain 5 Mana per enemy killed"]={{[1]={flags=0,keywordFlags=0,name="ManaOnKill",type="BASE",value=5}},nil} c["Gain 5 Rage on Hit"]={{[1]={flags=0,keywordFlags=0,name="Condition:CanGainRage",type="FLAG",value=true}},nil} -c["Gain 5 Rage when Hit by an Enemy"]={{[1]={flags=0,keywordFlags=0,name="Condition:CanGainRage",type="FLAG",value=true}},nil} +c["Gain 5 Rage when Hit by an Enemy"]={{[1]={flags=0,keywordFlags=0,name="RageWhenHit",type="BASE",value=5},[2]={flags=0,keywordFlags=0,name="Condition:CanGainRage",type="FLAG",value=true}},nil} c["Gain 5 Rage when Hit by an Enemy during effect"]={{}," Rage when Hit by an Enemy "} c["Gain 5 Rage when Hit by an Enemy during effect No Inherent loss of Rage during effect"]={{}," Rage when Hit by an Enemy No Inherent loss of Rage "} c["Gain 5% of Damage as Chaos Damage per Undead Minion"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageAsChaos",type="BASE",value=5}}}}," per Undead "} diff --git a/src/Data/ModScalability.lua b/src/Data/ModScalability.lua index a942fb9e14..7df2707858 100644 --- a/src/Data/ModScalability.lua +++ b/src/Data/ModScalability.lua @@ -351,6 +351,7 @@ return { ["# to Maximum Rage per 50 Tribute"] = { { isScalable = true } }, ["# to Maximum Rage while wielding a Sword"] = { { isScalable = true } }, ["# to Maximum Rage while wielding an Axe"] = { { isScalable = true } }, + ["Gain # Rage on Melee Hit"] = { { isScalable = true } }, ["# to Maximum Spirit Charges per Abyss Jewel affecting you"] = { { isScalable = true } }, ["# to Maximum Virulence"] = { { isScalable = true } }, ["# to Maximum number of Crab Barriers"] = { { isScalable = true } }, diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index 8c31e4c6f7..ccdbe5fe35 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -643,6 +643,8 @@ local function doActorMisc(env, actor) modDB:NewMod("Multiplier:RageEffect", "BASE", output.RageEffect, "Base") output.Rage = stacks output.MaximumRage = maxStacks + output.RageOnMeleeHit = modDB:Sum("BASE", nil, "RageOnMeleeHit") + output.RageWhenHit = modDB:Sum("BASE", nil, "RageWhenHit") modDB:NewMod("Multiplier:Rage", "BASE", output.Rage, "Base") if modDB:Flag(nil, "Condition:RageSpellDamage") then modDB:NewMod("Damage", "MORE", output.RageEffect, "Rage", ModFlag.Spell) diff --git a/src/Modules/CalcSections.lua b/src/Modules/CalcSections.lua index 992684637b..bb5cccba16 100644 --- a/src/Modules/CalcSections.lua +++ b/src/Modules/CalcSections.lua @@ -1803,6 +1803,8 @@ return { { label = "Total", { format = "{0:output:Rage}", }, }, { label = "Rage Effect", { format = "{1:output:RageEffect}", { modName = "RageEffect" }, }, }, { label = "Maximum Rage", { format = "{0:output:MaximumRage}", { modName = "MaximumRage" }, }, }, + { label = "Gain on Melee hit", { format = "{0:output:RageOnMeleeHit}", { modName = "RageOnMeleeHit" }, }, }, + { label = "Gain when hit", { format = "{0:output:RageWhenHit}", { modName = "RageWhenHit" }, }, }, { label = "Recovery", { format = "{1:output:RageRegenRecovery} ({1:output:RageRegenPercent}%)", { breakdown = "RageRegenRecovery" }, { label = "Sources", modName = { "RageRegen", "RageRegenPercent", "RageDegen", "RageDegenPercent", "RageRecovery" }, modType = "BASE" }, diff --git a/src/Modules/CalcSetup.lua b/src/Modules/CalcSetup.lua index 2fcad5075e..1286ed1035 100644 --- a/src/Modules/CalcSetup.lua +++ b/src/Modules/CalcSetup.lua @@ -618,6 +618,7 @@ function calcs.initEnv(build, mode, override, specEnv) modDB:NewMod("TotemLightningResist", "BASE", 40, "Base") modDB:NewMod("TotemChaosResist", "BASE", 20, "Base") modDB:NewMod("MaximumRage", "BASE", data.characterConstants["maximum_rage"], "Base") + --modDB:NewMod("RageOnMeleeHit", "BASE", 0, "Base") modDB:NewMod("MaximumFortification", "BASE", data.characterConstants["base_max_fortification"], "Base") modDB:NewMod("MaximumValour", "BASE", 50, "Base") modDB:NewMod("SoulEaterMax", "BASE", 45, "Base") diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index da227690ea..367f006b8d 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -2707,11 +2707,16 @@ local specialModList = { ["gain %d+ rage on hit with axes or swords"] = { flag("Condition:CanGainRage"), }, - ["gain %d+ rage on melee hit"] = { - flag("Condition:CanGainRage"), - }, + ["gain (%d+) rage on melee hit"] = function(num) return { + mod("RageOnMeleeHit", "BASE", num), + flag("Condition:CanGainRage") + }end, + ["gain (%d+) rage when hit by an enemy"] = function(num) return { + mod("RageWhenHit", "BASE", num), + flag("Condition:CanGainRage") + }end, ["gain %d+ rage on melee weapon hit"] = { - flag("Condition:CanGainRage"), + flag("Condition:CanGainRage") }, ["gain %d+ rage on ([%D]+)"] = { flag("Condition:CanGainRage"), From c3a139288fb3bfe5e239faf823b7e1a9b217f851 Mon Sep 17 00:00:00 2001 From: MrHB212 Date: Tue, 16 Dec 2025 00:45:53 +0100 Subject: [PATCH 2/5] deleted previously added line --- src/Data/ModScalability.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Data/ModScalability.lua b/src/Data/ModScalability.lua index 7df2707858..a942fb9e14 100644 --- a/src/Data/ModScalability.lua +++ b/src/Data/ModScalability.lua @@ -351,7 +351,6 @@ return { ["# to Maximum Rage per 50 Tribute"] = { { isScalable = true } }, ["# to Maximum Rage while wielding a Sword"] = { { isScalable = true } }, ["# to Maximum Rage while wielding an Axe"] = { { isScalable = true } }, - ["Gain # Rage on Melee Hit"] = { { isScalable = true } }, ["# to Maximum Spirit Charges per Abyss Jewel affecting you"] = { { isScalable = true } }, ["# to Maximum Virulence"] = { { isScalable = true } }, ["# to Maximum number of Crab Barriers"] = { { isScalable = true } }, From 46060ef3277cc1e2d874f3648b3fd338e1465c28 Mon Sep 17 00:00:00 2001 From: MrHB212 Date: Tue, 16 Dec 2025 14:44:12 +0100 Subject: [PATCH 3/5] deleted another useless line I was trying around a bit --- src/Modules/CalcSetup.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Modules/CalcSetup.lua b/src/Modules/CalcSetup.lua index 1286ed1035..2fcad5075e 100644 --- a/src/Modules/CalcSetup.lua +++ b/src/Modules/CalcSetup.lua @@ -618,7 +618,6 @@ function calcs.initEnv(build, mode, override, specEnv) modDB:NewMod("TotemLightningResist", "BASE", 40, "Base") modDB:NewMod("TotemChaosResist", "BASE", 20, "Base") modDB:NewMod("MaximumRage", "BASE", data.characterConstants["maximum_rage"], "Base") - --modDB:NewMod("RageOnMeleeHit", "BASE", 0, "Base") modDB:NewMod("MaximumFortification", "BASE", data.characterConstants["base_max_fortification"], "Base") modDB:NewMod("MaximumValour", "BASE", 50, "Base") modDB:NewMod("SoulEaterMax", "BASE", 45, "Base") From ced2e68f22325430414c19bcb8a83ffe51e32b41 Mon Sep 17 00:00:00 2001 From: MrHB212 Date: Tue, 16 Dec 2025 21:43:46 +0100 Subject: [PATCH 4/5] fixed maximum rage while shapeshifted --- src/Modules/CalcPerform.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index ccdbe5fe35..dff3d83301 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -635,7 +635,7 @@ 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 = modDB:Sum("BASE", skillCfg, "MaximumRage") + local maxStacks = env.player.mainSkill.skillModList:Sum("BASE", env.player.mainSkill.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) From 2326ae22f3c9cfa12aec511f075ae1207fc29b28 Mon Sep 17 00:00:00 2001 From: MrHB212 Date: Wed, 17 Dec 2025 22:26:32 +0100 Subject: [PATCH 5/5] Revert "fixed maximum rage while shapeshifted" This reverts commit ced2e68f22325430414c19bcb8a83ffe51e32b41. --- src/Modules/CalcPerform.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index dff3d83301..ccdbe5fe35 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -635,7 +635,7 @@ 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 = env.player.mainSkill.skillModList:Sum("BASE", env.player.mainSkill.skillCfg, "MaximumRage") + local maxStacks = modDB:Sum("BASE", 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)