From 8a827dd29e65e76e4717834564bcc103148ff44a Mon Sep 17 00:00:00 2001 From: ImmotephSimon Date: Tue, 23 Sep 2025 01:25:21 +0200 Subject: [PATCH 1/3] add "aftershock you create" support --- src/Data/ModCache.lua | 14 ++++++-------- src/Modules/BuildDisplayStats.lua | 1 + src/Modules/CalcOffence.lua | 4 ++++ src/Modules/ModParser.lua | 15 +++++++++++++++ 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index e2b805839..bb84df1cc 100755 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -968,11 +968,9 @@ c["10% chance for Attack Hits to apply ten Incision"]={{[1]={flags=0,keywordFlag c["10% chance for Enemies you Kill to Explode, dealing 100%"]={{}," for Enemies you Kill to Explode, dealing 100% "} c["10% chance for Enemies you Kill to Explode, dealing 100% of their maximum Life as Physical Damage"]={{[1]={flags=0,keywordFlags=0,name="ExplodeMod",type="LIST",value={amount=100,chance=0.1,keyOfScaledMod="chance",type="Physical"}},[2]={flags=0,keywordFlags=0,name="CanExplode",type="FLAG",value=true}},nil} c["10% chance for Flasks you use to not consume Charges"]={{[1]={flags=0,keywordFlags=0,name="FlaskChanceNotConsumeCharges",type="BASE",value=10}},nil} -c["10% chance for Mace Slam Skills you use yourself to cause Aftershocks"]={{}," for Mace Slam Skills you use yourself to cause Aftershocks "} -c["10% chance for Mace Slam Skills you use yourself to cause Aftershocks 10% chance for Mace Strike Skills you use yourself to cause Aftershocks, dealing"]={{}," for Mace Slam Skills you use yourself to cause Aftershocks 10% chance forSkills you use yourself to cause Aftershocks, dealing "} -c["10% chance for Mace Slam Skills you use yourself to cause Aftershocks 10% chance for Mace Strike Skills you use yourself to cause Aftershocks, dealing the same damage to enemies within 1.8 metres"]={{[1]={[1]={includeTransfigured=true,skillName="Mace Strike",type="SkillName"},flags=0,keywordFlags=0,name="Damage",type="BASE",value=10}}," for Mace Slam Skills you use yourself to cause Aftershocks 10% chance forSkills you use yourself to cause Aftershocks, dealing the same to enemies within 1.8 metres "} -c["10% chance for Mace Strike Skills you use yourself to cause Aftershocks, dealing"]={{}," forSkills you use yourself to cause Aftershocks, dealing "} -c["10% chance for Mace Strike Skills you use yourself to cause Aftershocks, dealing the same damage to enemies within 1.8 metres"]={{[1]={[1]={includeTransfigured=true,skillName="Mace Strike",type="SkillName"},flags=0,keywordFlags=0,name="Damage",type="BASE",value=10}}," forSkills you use yourself to cause Aftershocks, dealing the same to enemies within 1.8 metres "} +c["10% chance for Mace Slam Skills you use yourself to cause Aftershocks"]={{[1]={[1]={type="Condition",var="UsingMace"},[2]={skillType=92,type="SkillType"},[3]={neg=true,skillType=95,type="SkillType"},[4]={neg=true,skillType=37,type="SkillType"},[5]={neg=true,skillType=33,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=10}},nil} +c["10% chance for Mace Strike Skills you use yourself to cause Aftershocks, dealing"]={{[1]={[1]={type="Condition",var="UsingMace"},[2]={type="SkillType"},[3]={neg=true,skillType=95,type="SkillType"},[4]={neg=true,skillType=37,type="SkillType"},[5]={neg=true,skillType=33,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=10}}," , dealing "} +c["10% chance for Mace Strike Skills you use yourself to cause Aftershocks, dealing the same damage to enemies within 1.8 metres"]={{[1]={[1]={type="Condition",var="UsingMace"},[2]={type="SkillType"},[3]={neg=true,skillType=95,type="SkillType"},[4]={neg=true,skillType=37,type="SkillType"},[5]={neg=true,skillType=33,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=10}}," , dealing the same damage to enemies within 1.8 metres "} c["10% chance to Aggravate Bleeding on targets you Hit with Attacks"]={{}," to Aggravate Bleeding on targets you Hit "} c["10% chance to Aggravate Bleeding on targets you Hit with Attacks 8% increased Attack Speed while a Rare or Unique Enemy is in your Presence"]={{[1]={[1]={actor="enemy",type="ActorCondition",varList={[1]="NearbyRareOrUniqueEnemy",[2]="RareOrUnique"}},flags=1,keywordFlags=65536,name="Speed",type="BASE",value=10}}," to Aggravate Bleeding on targets you Hit 8% increased "} c["10% chance to Blind Enemies on Hit with Attacks"]={{[1]={flags=0,keywordFlags=65536,name="BlindChance",type="BASE",value=10}},nil} @@ -1958,7 +1956,7 @@ c["25% chance for Attacks to Maim on Hit against Poisoned Enemies"]={{}," to Ma c["25% chance for Attacks to Maim on Hit against Poisoned Enemies 25% increased Magnitude of Poison you inflict"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="Poisoned"},flags=1,keywordFlags=2097152,name="AilmentMagnitude",type="BASE",value=25}}," to Maim on Hit 25% increased "} c["25% chance for Lightning Damage with Hits to be Lucky"]={{[1]={flags=0,keywordFlags=0,name="LightningLuckyHitsChance",type="BASE",value=25}},nil} c["25% chance for Projectiles to Pierce Enemies within 3m distance of you"]={{[1]={flags=0,keywordFlags=0,name="ProjectileCount",type="BASE",value=25}}," for to Pierce Enemies within 3m distance of you "} -c["25% chance for Slam Skills you use yourself to cause Aftershocks"]={{}," for Slam Skills you use yourself to cause Aftershocks "} +c["25% chance for Slam Skills you use yourself to cause Aftershocks"]={{[1]={[1]={neg=true,skillType=95,type="SkillType"},[2]={neg=true,skillType=37,type="SkillType"},[3]={neg=true,skillType=33,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=25}}," for Slam Skills "} c["25% chance for Trigger skills to refund half of Energy Spent"]={{}," for Trigger skills to refund half of Energy Spent "} c["25% chance on Consuming a Shock on an Enemy to reapply it"]={{}," on Consuming a Shock on an Enemy to reapply it "} c["25% chance on Shocking Enemies to created Shocked Ground"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="OnShockedGround"},flags=0,keywordFlags=0,name="ShockBase",type="BASE",value=20}},nil} @@ -2632,7 +2630,7 @@ c["5 to 10 Physical Thorns damage"]={{[1]={flags=0,keywordFlags=0,name="ThornsDa c["5 to 10 Physical Thorns damage Pain Attunement"]={{[1]={flags=0,keywordFlags=0,name="ThornsDamage",type="BASE",value=5}}," to 10 Physical Pain Attunement "} c["5% Chance to build an additional Combo on Hit"]={{}," to build an additional Combo "} c["5% additional Physical Damage Reduction while you have at least 150 Devotion"]={{[1]={[1]={stat="Devotion",threshold=150,type="StatThreshold"},flags=0,keywordFlags=0,name="PhysicalDamageReduction",type="BASE",value=5}},nil} -c["5% chance for Slam Skills you use yourself to cause Aftershocks"]={{}," for Slam Skills you use yourself to cause Aftershocks "} +c["5% chance for Slam Skills you use yourself to cause Aftershocks"]={{[1]={[1]={neg=true,skillType=95,type="SkillType"},[2]={neg=true,skillType=37,type="SkillType"},[3]={neg=true,skillType=33,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=5}}," for Slam Skills "} c["5% chance to Blind Enemies on Hit"]={{[1]={flags=0,keywordFlags=0,name="BlindChance",type="BASE",value=5}},nil} c["5% chance to Blind Enemies on Hit with Attacks"]={{[1]={flags=0,keywordFlags=65536,name="BlindChance",type="BASE",value=5}},nil} c["5% chance to Daze on Hit"]={{[1]={flags=4,keywordFlags=0,name="DazeChance",type="BASE",value=5}},nil} @@ -2989,7 +2987,7 @@ c["75% increased Thorns damage if you've Blocked Recently"]={{[1]={[1]={type="Co c["75% increased chance to Shock"]={{[1]={flags=0,keywordFlags=0,name="EnemyShockChance",type="INC",value=75}},nil} c["75% of Damage Converted to Fire Damage"]={{[1]={flags=0,keywordFlags=0,name="DamageConvertToFire",type="BASE",value=75}},nil} c["8 Life Regeneration per second"]={{[1]={flags=0,keywordFlags=0,name="LifeRegen",type="BASE",value=8}},nil} -c["8% chance for Mace Slam Skills you use yourself to cause Aftershocks"]={{}," for Mace Slam Skills you use yourself to cause Aftershocks "} +c["8% chance for Mace Slam Skills you use yourself to cause Aftershocks"]={{[1]={[1]={type="Condition",var="UsingMace"},[2]={skillType=92,type="SkillType"},[3]={neg=true,skillType=95,type="SkillType"},[4]={neg=true,skillType=37,type="SkillType"},[5]={neg=true,skillType=33,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=8}},nil} c["8% chance to Blind Enemies on Hit with Attacks"]={{[1]={flags=0,keywordFlags=65536,name="BlindChance",type="BASE",value=8}},nil} c["8% chance to Poison on Hit"]={{[1]={flags=0,keywordFlags=0,name="PoisonChance",type="BASE",value=8}},nil} c["8% faster start of Energy Shield Recharge"]={{[1]={flags=0,keywordFlags=0,name="EnergyShieldRechargeFaster",type="INC",value=8}},nil} diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 4e2d3986d..d47e46d0b 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -77,6 +77,7 @@ local displayStats = { { stat = "AreaOfEffectRadiusMetres", label = "AoE Radius", fmt = ".1fm" }, { stat = "BrandAttachmentRangeMetre", label = "Attachment Range", fmt = ".1fm", flag = "brand" }, { stat = "BrandTicks", label = "Activations per Brand", fmt = "d", flag = "brand" }, + { stat = "AftershockChance", label = "Aftershock Chance", fmt = ".0f%%" }, { stat = "ManaCost", label = "Mana Cost", fmt = "d", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaHasCost end }, { stat = "ManaPercentCost", label = "Mana Cost", fmt = "d%%", color = colorCodes.MANA, pool = "ManaUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentHasCost end }, { stat = "ManaPerSecondCost", label = "Mana Cost per second", fmt = ".2f", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPerSecondHasCost end }, diff --git a/src/Modules/CalcOffence.lua b/src/Modules/CalcOffence.lua index 09b98a9e4..28724a8b1 100644 --- a/src/Modules/CalcOffence.lua +++ b/src/Modules/CalcOffence.lua @@ -5267,6 +5267,10 @@ function calcs.offence(env, actor, activeSkill) combineStat("ImpaleModifier", "CHANCE", "ImpaleChance") end + output.AftershockChance = skillModList:Sum("BASE", skillCfg, "AftershockChance") + print("aftershock chance:" .. output.AftershockChance) + + if skillData.decay and canDeal.Chaos then -- Calculate DPS for Decay effect skillFlags.decay = true diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 00315b849..ac3916e31 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -870,6 +870,7 @@ local modNameList = { ["penalty to accuracy rating at range"] = "AccuracyPenalty", ["when you reload a crossbow to be immediate"] = "InstantReloadChance", ["to not expend ammunition"] = "ChanceToNotConsumeAmmo", + ["to cause aftershocks"] = "AftershockChance", -- Flask and Charm modifiers ["effect"] = "LocalEffect", ["effect of flasks"] = "FlaskEffect", @@ -1587,6 +1588,19 @@ local modTagList = { ["for each remaining chain"] = { tag = { type = "PerStat", stat = "ChainRemaining" } }, ["for each enemy pierced"] = { tag = { type = "PerStat", stat = "PiercedCount" } }, ["for each time they've pierced"] = { tag = { type = "PerStat", stat = "PiercedCount" } }, + ["for mace slam skills"] = { tagList = { + { type = "Condition", var = "UsingMace" }, + { type = "SkillType", skillType = SkillType.Slam } }}, + + ["for mace strike skills"] = { tagList = { + { type = "Condition", var = "UsingMace" }, + { type = "SkillType", skillType = SkillType.Strike } }}, + + ["you use yourself"] = { tagList = { + { type = "SkillType", skillType = SkillType.UsedByTotem, neg = true }, + { type = "SkillType", skillType = SkillType.Triggered, neg = true }, + { type = "SkillType", skillType = SkillType.Trapped, neg = true } }}, + -- [", dealing the same damage to enemies within ([%d%.]+) metres"] = {}, why the hell is this not working -- Stat conditions ["with (%d+) or more strength"] = function(num) return { tag = { type = "StatThreshold", stat = "Str", threshold = num } } end, ["with at least (%d+) strength"] = function(num) return { tag = { type = "StatThreshold", stat = "Str", threshold = num } } end, @@ -5705,6 +5719,7 @@ local specialModList = { } end, ["(%d+)%% reduced movement speed penalty from using skills while moving"] = function(num) return { mod("MovementSpeedPenalty", "INC", -num) } end, ["(%d+)%% less movement speed penalty from using skills while moving"] = function(num) return { mod("MovementSpeedPenalty", "MORE", -num) } end, + "(%d+)% chance", -- Conditional Player Quantity / Rarity ["(%d+)%% increased quantity of items dropped by slain normal enemies"] = function(num) return { mod("LootQuantityNormalEnemies", "INC", num) } end, ["(%d+)%% increased rarity of items dropped by slain magic enemies"] = function(num) return { mod("LootRarityMagicEnemies", "INC", num) } end, From 71e8fe09a5e0a3e2733adcf7c1b5a5dc9dc3819c Mon Sep 17 00:00:00 2001 From: ImmotephSimon Date: Tue, 23 Sep 2025 02:55:25 +0200 Subject: [PATCH 2/3] add slam skills add special case for line with comma add aftershock to TotalDPS --- src/Data/ModCache.lua | 9 ++++----- src/Modules/CalcOffence.lua | 3 ++- src/Modules/ModParser.lua | 13 ++++++------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index da193dd50..f14e77568 100755 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -878,8 +878,8 @@ c["10% chance for Enemies you Kill to Explode, dealing 100%"]={{}," for Enemies c["10% chance for Enemies you Kill to Explode, dealing 100% of their maximum Life as Physical Damage"]={{[1]={flags=0,keywordFlags=0,name="ExplodeMod",type="LIST",value={amount=100,keyOfScaledMod="chance",type="Physical",value=10}},[2]={flags=0,keywordFlags=0,name="CanExplode",type="FLAG",value=true}},nil} c["10% chance for Flasks you use to not consume Charges"]={{[1]={flags=0,keywordFlags=0,name="FlaskChanceNotConsumeCharges",type="BASE",value=10}},nil} c["10% chance for Mace Slam Skills you use yourself to cause Aftershocks"]={{[1]={[1]={type="Condition",var="UsingMace"},[2]={skillType=92,type="SkillType"},[3]={neg=true,skillType=95,type="SkillType"},[4]={neg=true,skillType=37,type="SkillType"},[5]={neg=true,skillType=33,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=10}},nil} -c["10% chance for Mace Strike Skills you use yourself to cause Aftershocks, dealing"]={{[1]={[1]={type="Condition",var="UsingMace"},[2]={type="SkillType"},[3]={neg=true,skillType=95,type="SkillType"},[4]={neg=true,skillType=37,type="SkillType"},[5]={neg=true,skillType=33,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=10}}," , dealing "} -c["10% chance for Mace Strike Skills you use yourself to cause Aftershocks, dealing the same damage to enemies within 1.8 metres"]={{[1]={[1]={type="Condition",var="UsingMace"},[2]={type="SkillType"},[3]={neg=true,skillType=95,type="SkillType"},[4]={neg=true,skillType=37,type="SkillType"},[5]={neg=true,skillType=33,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=10}}," , dealing the same damage to enemies within 1.8 metres "} +c["10% chance for Mace Strike Skills you use yourself to cause Aftershocks, dealing"]={{[1]={[1]={neg=true,skillType=95,type="SkillType"},[2]={neg=true,skillType=37,type="SkillType"},[3]={neg=true,skillType=33,type="SkillType"},[4]={includeTransfigured=true,skillName="Mace Strike",type="SkillName"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=10}}," forSkills , dealing "} +c["10% chance for Mace Strike Skills you use yourself to cause Aftershocks, dealing the same damage to enemies within 1.8 metres"]={{[1]={[1]={type="Condition",var="UsingMace"},[2]={skillType=21,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=10}},nil} c["10% chance to Aggravate Bleeding on targets you Hit with Attacks"]={{}," to Aggravate Bleeding on targets you Hit "} c["10% chance to Aggravate Bleeding on targets you Hit with Attacks 8% increased Attack Speed while a Rare or Unique Enemy is in your Presence"]={{[1]={[1]={actor="enemy",type="ActorCondition",varList={[1]="NearbyRareOrUniqueEnemy",[2]="RareOrUnique"}},flags=1,keywordFlags=65536,name="Speed",type="BASE",value=10}}," to Aggravate Bleeding on targets you Hit 8% increased "} c["10% chance to Blind Enemies on Hit with Attacks"]={{[1]={flags=0,keywordFlags=65536,name="BlindChance",type="BASE",value=10}},nil} @@ -1865,7 +1865,7 @@ c["25% chance for Attacks to Maim on Hit against Poisoned Enemies"]={{}," to Ma c["25% chance for Attacks to Maim on Hit against Poisoned Enemies 25% increased Magnitude of Poison you inflict"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="Poisoned"},flags=1,keywordFlags=2097152,name="AilmentMagnitude",type="BASE",value=25}}," to Maim on Hit 25% increased "} c["25% chance for Lightning Damage with Hits to be Lucky"]={{[1]={flags=0,keywordFlags=0,name="LightningLuckyHitsChance",type="BASE",value=25}},nil} c["25% chance for Projectiles to Pierce Enemies within 3m distance of you"]={{[1]={flags=0,keywordFlags=0,name="ProjectileCount",type="BASE",value=25}}," for to Pierce Enemies within 3m distance of you "} -c["25% chance for Slam Skills you use yourself to cause Aftershocks"]={{[1]={[1]={neg=true,skillType=95,type="SkillType"},[2]={neg=true,skillType=37,type="SkillType"},[3]={neg=true,skillType=33,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=25}}," for Slam Skills "} +c["25% chance for Slam Skills you use yourself to cause Aftershocks"]={{[1]={[1]={skillType=92,type="SkillType"},[2]={neg=true,skillType=95,type="SkillType"},[3]={neg=true,skillType=37,type="SkillType"},[4]={neg=true,skillType=33,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=25}},nil} c["25% chance for Trigger skills to refund half of Energy Spent"]={{}," for Trigger skills to refund half of Energy Spent "} c["25% chance on Consuming a Shock on an Enemy to reapply it"]={{}," on Consuming a Shock on an Enemy to reapply it "} c["25% chance on Shocking Enemies to created Shocked Ground"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="OnShockedGround"},flags=0,keywordFlags=0,name="ShockBase",type="BASE",value=20}},nil} @@ -2539,7 +2539,7 @@ c["5 to 10 Physical Thorns damage"]={{[1]={flags=0,keywordFlags=0,name="ThornsDa c["5 to 10 Physical Thorns damage Pain Attunement"]={{[1]={flags=0,keywordFlags=0,name="ThornsDamage",type="BASE",value=5}}," to 10 Physical Pain Attunement "} c["5% Chance to build an additional Combo on Hit"]={{}," to build an additional Combo "} c["5% additional Physical Damage Reduction while you have at least 150 Devotion"]={{[1]={[1]={stat="Devotion",threshold=150,type="StatThreshold"},flags=0,keywordFlags=0,name="PhysicalDamageReduction",type="BASE",value=5}},nil} -c["5% chance for Slam Skills you use yourself to cause Aftershocks"]={{[1]={[1]={neg=true,skillType=95,type="SkillType"},[2]={neg=true,skillType=37,type="SkillType"},[3]={neg=true,skillType=33,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=5}}," for Slam Skills "} +c["5% chance for Slam Skills you use yourself to cause Aftershocks"]={{[1]={[1]={skillType=92,type="SkillType"},[2]={neg=true,skillType=95,type="SkillType"},[3]={neg=true,skillType=37,type="SkillType"},[4]={neg=true,skillType=33,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=5}},nil} c["5% chance to Blind Enemies on Hit"]={{[1]={flags=0,keywordFlags=0,name="BlindChance",type="BASE",value=5}},nil} c["5% chance to Blind Enemies on Hit with Attacks"]={{[1]={flags=0,keywordFlags=65536,name="BlindChance",type="BASE",value=5}},nil} c["5% chance to Daze on Hit"]={{[1]={flags=4,keywordFlags=0,name="DazeChance",type="BASE",value=5}},nil} @@ -5680,7 +5680,6 @@ c["additional Elemental Infusion of the same type"]={nil,"additional Elemental I c["for 4 seconds, every 0.25 seconds while raised"]={nil,"for 4 seconds, every 0.25 seconds while raised "} c["gain 6 Cold Surges or 6 Fire Surges"]={{}," Cold Surges or 6 Fire Surges "} c["the enemy's Power for 6 seconds, up to a total of 500"]={nil,"the enemy's Power for 6 seconds, up to a total of 500 "} -c["the same damage to enemies within 1.8 metres"]={nil,"the same damage to enemies within 1.8 metres "} c["until you take no Damage to Life for 5 seconds"]={nil,"until you take no Damage to Life for 5 seconds "} c["your Ailments on them"]={nil,"your Ailments on them "} c["your Ailments on them 30% reduced Duration of Ignite, Shock and Chill on Enemies"]={nil,"your Ailments on them 30% reduced Duration of Ignite, Shock and Chill on Enemies "} diff --git a/src/Modules/CalcOffence.lua b/src/Modules/CalcOffence.lua index 1e4b1411d..e456ce483 100644 --- a/src/Modules/CalcOffence.lua +++ b/src/Modules/CalcOffence.lua @@ -4024,7 +4024,8 @@ function calcs.offence(env, actor, activeSkill) local repeatPenalty = skillModList:Flag(nil, "HasSeals") and activeSkill.skillTypes[SkillType.Unleashable] and not skillModList:Flag(nil, "NoRepeatBonuses") and calcLib.mod(skillModList, skillCfg, "SealRepeatPenalty") or 1 globalOutput.AverageBurstDamage = output.AverageDamage + output.AverageDamage * (globalOutput.AverageBurstHits - 1) * repeatPenalty or 0 globalOutput.ShowBurst = globalOutput.AverageBurstHits > 1 - output.TotalDPS = output.AverageDamage * (globalOutput.HitSpeed or globalOutput.Speed) * skillData.dpsMultiplier * quantityMultiplier + local aftershockChance = (1 + skillModList:Sum("BASE", skillCfg, "AftershockChance")/100) or 1 + output.TotalDPS = output.AverageDamage * (globalOutput.HitSpeed or globalOutput.Speed) * skillData.dpsMultiplier * quantityMultiplier * aftershockChance if breakdown then if output.CritEffect ~= 1 then breakdown.AverageHit = { } diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index aa4a63dd7..6c89fa17c 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -1588,19 +1588,14 @@ local modTagList = { ["for each remaining chain"] = { tag = { type = "PerStat", stat = "ChainRemaining" } }, ["for each enemy pierced"] = { tag = { type = "PerStat", stat = "PiercedCount" } }, ["for each time they've pierced"] = { tag = { type = "PerStat", stat = "PiercedCount" } }, + ["for slam skills"] = { tag = { type = "SkillType", skillType = SkillType.Slam } }, ["for mace slam skills"] = { tagList = { { type = "Condition", var = "UsingMace" }, { type = "SkillType", skillType = SkillType.Slam } }}, - - ["for mace strike skills"] = { tagList = { - { type = "Condition", var = "UsingMace" }, - { type = "SkillType", skillType = SkillType.Strike } }}, - ["you use yourself"] = { tagList = { { type = "SkillType", skillType = SkillType.UsedByTotem, neg = true }, { type = "SkillType", skillType = SkillType.Triggered, neg = true }, { type = "SkillType", skillType = SkillType.Trapped, neg = true } }}, - -- [", dealing the same damage to enemies within ([%d%.]+) metres"] = {}, why the hell is this not working -- Stat conditions ["with (%d+) or more strength"] = function(num) return { tag = { type = "StatThreshold", stat = "Str", threshold = num } } end, ["with at least (%d+) strength"] = function(num) return { tag = { type = "StatThreshold", stat = "Str", threshold = num } } end, @@ -5094,6 +5089,11 @@ local specialModList = { -- MultiplierThreshold is on RageStacks because Rage is only set in CalcPerform if Condition:CanGainRage is true, Bear's Girdle does not flag CanGainRage mod("EnemyModifier", "LIST", { mod = flag("Condition:Intimidated") }, { type = "MultiplierThreshold", var = "RageStack", threshold = 1 }) }, + ["(%d+)%% chance for mace strike skills you use yourself to cause aftershocks, dealing the same damage to enemies within ([%d%.]+) metres"] = function (num, _) return { + mod("AftershockChance", "BASE", num, + { type = "Condition", var = "UsingMace" }, + { type = "SkillType", skillType = SkillType.MeleeSingleTarget } ) + } end, -- Flasks ["flasks do not apply to you"] = { flag("FlasksDoNotApplyToPlayer") }, ["flasks apply to your zombies and spectres"] = { flag("FlasksApplyToMinion", { type = "SkillName", skillNameList = { "Raise Zombie", "Raise Spectre" }, includeTransfigured = true }) }, @@ -5717,7 +5717,6 @@ local specialModList = { } end, ["(%d+)%% reduced movement speed penalty from using skills while moving"] = function(num) return { mod("MovementSpeedPenalty", "INC", -num) } end, ["(%d+)%% less movement speed penalty from using skills while moving"] = function(num) return { mod("MovementSpeedPenalty", "MORE", -num) } end, - "(%d+)% chance", -- Conditional Player Quantity / Rarity ["(%d+)%% increased quantity of items dropped by slain normal enemies"] = function(num) return { mod("LootQuantityNormalEnemies", "INC", num) } end, ["(%d+)%% increased rarity of items dropped by slain magic enemies"] = function(num) return { mod("LootRarityMagicEnemies", "INC", num) } end, From f898b8d405e8c3cb8a4ad8ead3bc25105eef3d8d Mon Sep 17 00:00:00 2001 From: ImmotephSimon Date: Wed, 24 Sep 2025 05:28:25 +0200 Subject: [PATCH 3/3] remove sidebar label rework calcOffence to use DPS multiplier (reliant on attack time) add support for unique: Hrimnor's Hymn add support for Aftershock III --- src/Data/ModCache.lua | 2 +- src/Data/SkillStatMap.lua | 3 +++ src/Modules/BuildDisplayStats.lua | 1 - src/Modules/CalcOffence.lua | 14 ++++++++------ src/Modules/ModParser.lua | 12 +++++------- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index f14e77568..10c3bf9ae 100755 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -5438,7 +5438,7 @@ c["Skills have a 5% chance to not consume Glory"]={nil,"a 5% chance to not consu c["Skills reserve 50% less Spirit"]={{[1]={flags=0,keywordFlags=0,name="SpiritReserved",type="MORE",value=-50}},nil} c["Skills used by Totems have 30% more Skill Speed"]={{[1]={flags=0,keywordFlags=16384,name="Speed",type="MORE",value=30},[2]={flags=0,keywordFlags=16384,name="WarcrySpeed",type="MORE",value=30},[3]={flags=0,keywordFlags=16384,name="TotemPlacementSpeed",type="MORE",value=30}},nil} c["Slam Skills have 8% increased Area of Effect"]={{[1]={[1]={skillType=92,type="SkillType"},flags=0,keywordFlags=0,name="AreaOfEffect",type="INC",value=8}},nil} -c["Slam Skills you use yourself cause Aftershocks"]={nil,"Slam Skills you use yourself cause Aftershocks "} +c["Slam Skills you use yourself cause Aftershocks"]={{[1]={[1]={skillType=92,type="SkillType"},[2]={neg=true,skillType=95,type="SkillType"},[3]={neg=true,skillType=37,type="SkillType"},[4]={neg=true,skillType=33,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=100}},nil} c["Sorcery Ward recovers 50% faster"]={nil,"recovers 50% faster "} c["Soul Eater"]={{[1]={flags=0,keywordFlags=0,name="Condition:CanHaveSoulEater",type="FLAG",value=true}},nil} c["Spell Skills have 10% reduced Area of Effect"]={{[1]={flags=0,keywordFlags=131072,name="AreaOfEffect",type="INC",value=-10}},nil} diff --git a/src/Data/SkillStatMap.lua b/src/Data/SkillStatMap.lua index 45a733611..2f7880f69 100644 --- a/src/Data/SkillStatMap.lua +++ b/src/Data/SkillStatMap.lua @@ -2408,6 +2408,9 @@ return { ["slam_aftershock_chance_%"] = { mod("AftershockChance", "BASE", nil) }, +["chance_to_aftershock_+%_per_250_ms_attack_time"] = { + mod("AftershockChanceQuarterSecond", "BASE", nil) +}, -- Curse ["curse_effect_+%"] = { mod("CurseEffect", "INC", nil), diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index d47e46d0b..4e2d3986d 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -77,7 +77,6 @@ local displayStats = { { stat = "AreaOfEffectRadiusMetres", label = "AoE Radius", fmt = ".1fm" }, { stat = "BrandAttachmentRangeMetre", label = "Attachment Range", fmt = ".1fm", flag = "brand" }, { stat = "BrandTicks", label = "Activations per Brand", fmt = "d", flag = "brand" }, - { stat = "AftershockChance", label = "Aftershock Chance", fmt = ".0f%%" }, { stat = "ManaCost", label = "Mana Cost", fmt = "d", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaHasCost end }, { stat = "ManaPercentCost", label = "Mana Cost", fmt = "d%%", color = colorCodes.MANA, pool = "ManaUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentHasCost end }, { stat = "ManaPerSecondCost", label = "Mana Cost per second", fmt = ".2f", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPerSecondHasCost end }, diff --git a/src/Modules/CalcOffence.lua b/src/Modules/CalcOffence.lua index e456ce483..8df297beb 100644 --- a/src/Modules/CalcOffence.lua +++ b/src/Modules/CalcOffence.lua @@ -2925,6 +2925,13 @@ function calcs.offence(env, actor, activeSkill) end end + if (skillModList:Sum("BASE", skillCfg, "AftershockChance", "AftershockChanceQuarterSecond") or 0) > 0 then + local aftershockChance = skillModList:Sum("BASE", skillCfg, "AftershockChance") + local inc = (skillModList:Sum("BASE", skillCfg, "AftershockChanceQuarterSecond") or 0) * m_floor(1 / output.Speed) / 0.25 + aftershockChance = aftershockChance * (1 + inc / 100) + skillModList:NewMod("DPS", "MORE", aftershockChance, "Aftershock Chance") + end + -- Grab quantity multiplier local quantityMultiplier = m_max(activeSkill.skillModList:Sum("BASE", activeSkill.skillCfg, "QuantityMultiplier"), 1) if quantityMultiplier > 1 then @@ -4024,8 +4031,7 @@ function calcs.offence(env, actor, activeSkill) local repeatPenalty = skillModList:Flag(nil, "HasSeals") and activeSkill.skillTypes[SkillType.Unleashable] and not skillModList:Flag(nil, "NoRepeatBonuses") and calcLib.mod(skillModList, skillCfg, "SealRepeatPenalty") or 1 globalOutput.AverageBurstDamage = output.AverageDamage + output.AverageDamage * (globalOutput.AverageBurstHits - 1) * repeatPenalty or 0 globalOutput.ShowBurst = globalOutput.AverageBurstHits > 1 - local aftershockChance = (1 + skillModList:Sum("BASE", skillCfg, "AftershockChance")/100) or 1 - output.TotalDPS = output.AverageDamage * (globalOutput.HitSpeed or globalOutput.Speed) * skillData.dpsMultiplier * quantityMultiplier * aftershockChance + output.TotalDPS = output.AverageDamage * (globalOutput.HitSpeed or globalOutput.Speed) * skillData.dpsMultiplier * quantityMultiplier if breakdown then if output.CritEffect ~= 1 then breakdown.AverageHit = { } @@ -5270,10 +5276,6 @@ function calcs.offence(env, actor, activeSkill) combineStat("ImpaleModifier", "CHANCE", "ImpaleChance") end - output.AftershockChance = skillModList:Sum("BASE", skillCfg, "AftershockChance") - print("aftershock chance:" .. output.AftershockChance) - - if skillData.decay and canDeal.Chaos then -- Calculate DPS for Decay effect skillFlags.decay = true diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 6c89fa17c..a87fed19c 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -1589,13 +1589,8 @@ local modTagList = { ["for each enemy pierced"] = { tag = { type = "PerStat", stat = "PiercedCount" } }, ["for each time they've pierced"] = { tag = { type = "PerStat", stat = "PiercedCount" } }, ["for slam skills"] = { tag = { type = "SkillType", skillType = SkillType.Slam } }, - ["for mace slam skills"] = { tagList = { - { type = "Condition", var = "UsingMace" }, - { type = "SkillType", skillType = SkillType.Slam } }}, - ["you use yourself"] = { tagList = { - { type = "SkillType", skillType = SkillType.UsedByTotem, neg = true }, - { type = "SkillType", skillType = SkillType.Triggered, neg = true }, - { type = "SkillType", skillType = SkillType.Trapped, neg = true } }}, + ["for mace slam skills"] = { tagList = { { type = "Condition", var = "UsingMace" }, { type = "SkillType", skillType = SkillType.Slam } }}, + ["you use yourself"] = { tagList = { { type = "SkillType", skillType = SkillType.UsedByTotem, neg = true }, { type = "SkillType", skillType = SkillType.Triggered, neg = true }, { type = "SkillType", skillType = SkillType.Trapped, neg = true } }}, -- Stat conditions ["with (%d+) or more strength"] = function(num) return { tag = { type = "StatThreshold", stat = "Str", threshold = num } } end, ["with at least (%d+) strength"] = function(num) return { tag = { type = "StatThreshold", stat = "Str", threshold = num } } end, @@ -5717,6 +5712,9 @@ local specialModList = { } end, ["(%d+)%% reduced movement speed penalty from using skills while moving"] = function(num) return { mod("MovementSpeedPenalty", "INC", -num) } end, ["(%d+)%% less movement speed penalty from using skills while moving"] = function(num) return { mod("MovementSpeedPenalty", "MORE", -num) } end, + ["slam skills you use yourself cause aftershocks"] = { + mod("AftershockChance", "BASE", 100, { type = "SkillType", skillType = SkillType.Slam }, { type = "SkillType", skillType = SkillType.UsedByTotem, neg = true }, { type = "SkillType", skillType = SkillType.Triggered, neg = true }, { type = "SkillType", skillType = SkillType.Trapped, neg = true }) + }, -- Conditional Player Quantity / Rarity ["(%d+)%% increased quantity of items dropped by slain normal enemies"] = function(num) return { mod("LootQuantityNormalEnemies", "INC", num) } end, ["(%d+)%% increased rarity of items dropped by slain magic enemies"] = function(num) return { mod("LootRarityMagicEnemies", "INC", num) } end,