From 856abea6a167c2e771747e738b685013de7c4467 Mon Sep 17 00:00:00 2001 From: Von Kieffer Date: Wed, 4 Nov 2026 09:09:21 -0600 Subject: [PATCH] Count aftershock chance in Slam DPS AftershockChance (from the Aftershock supports and skill quality) was parsed from gem stats but never used. Slams you use yourself now get one extra hit per use on average at 100% chance (capped at 100%), shown in the Calcs tab. Also parses the aftershock lines on the tree, ascendancies, uniques and affixes ("X% chance for [Mace/Shapeshift] Slam Skills [you use yourself] to cause an additional Aftershock", Hrimnor's Hymn's guaranteed Aftershock), with Mace and Shapeshift variants limited to those Slams. Co-Authored-By: Claude Opus 5.5 --- spec/System/TestAftershock_spec.lua | 65 +++++++++++++++++++++++++++++ src/Data/ModCache.lua | 27 ++++++------ src/Modules/CalcOffence.lua | 8 ++++ src/Modules/CalcSections.lua | 1 + src/Modules/ModParser.lua | 14 +++++++ 5 files changed, 101 insertions(+), 14 deletions(-) create mode 100644 spec/System/TestAftershock_spec.lua diff --git a/spec/System/TestAftershock_spec.lua b/spec/System/TestAftershock_spec.lua new file mode 100644 index 0000000000..42a9ee041c --- /dev/null +++ b/spec/System/TestAftershock_spec.lua @@ -0,0 +1,65 @@ +describe("TestAftershock", function() + before_each(function() + newBuild() + build.itemsTab:CreateDisplayItemFromRaw("New Item\nMarauding Mace") + build.itemsTab:AddDisplayItem() + end) + + teardown(function() + -- newBuild() takes care of resetting everything in setup() + end) + + local function dpsWith(group, customMods) + build.skillsTab:PasteSocketGroup(group) + build.configTab.input.customMods = customMods or "" + build.configTab:BuildModList() + runCallback("OnFrame") + local hand = build.calcsTab.mainOutput.MainHand or build.calcsTab.mainOutput + return build.calcsTab.mainOutput.TotalDPS, hand.AftershockChance + end + + it("counts the Aftershock support in Slam DPS", function() + local base = dpsWith("Leap Slam 1/0 1") + newBuild() + build.itemsTab:CreateDisplayItemFromRaw("New Item\nMarauding Mace") + build.itemsTab:AddDisplayItem() + local supported, chance = dpsWith("Leap Slam 1/0 1\nAftershock I 1/0 1") + assert.are.equals(25, chance) + assert.is_true(math.abs(supported - base * 1.25) < 0.01) + end) + + it("parses aftershock chance lines on Slams, including Mace Slams", function() + local base = dpsWith("Leap Slam 1/0 1") + local dps, chance = dpsWith("Leap Slam 1/0 1", "20% chance for Mace Slam Skills you use yourself to cause an additional Aftershock\n5% chance for Slam Skills to cause an additional Aftershock") + assert.are.equals(25, chance) + assert.is_true(math.abs(dps - base * 1.25) < 0.01) + end) + + it("limits Mace and Shapeshift aftershock lines to those Slams", function() + local function tagsOf(line) + local mods = modLib.parseMod(line) + local tags = { } + for _, tag in ipairs(mods[1]) do + tags[#tags + 1] = tag.var or tag.skillType + end + return tags + end + assert.are.same({ SkillType.Slam, "UsingMace" }, tagsOf("20% chance for Mace Slam Skills you use yourself to cause an additional Aftershock")) + assert.are.same({ SkillType.Slam, SkillType.Shapeshift }, tagsOf("10% chance for Shapeshift Slam Skills you use yourself to cause an additional Aftershock")) + assert.are.same({ SkillType.Slam }, tagsOf("5% chance for Slam Skills to cause an additional Aftershock")) + end) + + it("caps aftershock chance at 100%", function() + local base = dpsWith("Leap Slam 1/0 1") + local dps, chance = dpsWith("Leap Slam 1/0 1", "Slam Skills you use yourself cause an additional Aftershock\n25% chance for Slam Skills you use yourself to cause an additional Aftershock") + assert.are.equals(100, chance) + assert.is_true(math.abs(dps - base * 2) < 0.01) + end) + + it("does not apply aftershocks to non-Slam skills", function() + local base = dpsWith("Boneshatter 1/0 1") + local dps, chance = dpsWith("Boneshatter 1/0 1", "Slam Skills you use yourself cause an additional Aftershock") + assert.is_nil(chance) + assert.are.equals(base, dps) + end) +end) diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index 50484e61c0..73ef1daa26 100644 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -1458,9 +1458,8 @@ 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,keyOfScaledMod="value",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 an additional Aftershock"]={{}," for Mace Slam Skills you use yourself to cause an additional Aftershock "} -c["10% chance for Mace Slam Skills you use yourself to cause an additional Aftershock Strike Skills you use yourself with Maces have 10% chance to deal Splash Damage"]={{[1]={flags=1048580,keywordFlags=0,name="Damage",type="BASE",value=10}}," for Mace Slam Skills you use yourself to cause an additional Aftershock Strike Skills you use yourself have 10% chance to deal Splash "} -c["10% chance for Shapeshift Slam Skills you use yourself to cause an additional Aftershock"]={{}," for Shapeshift Slam Skills you use yourself to cause an additional Aftershock "} +c["10% chance for Mace Slam Skills you use yourself to cause an additional Aftershock"]={{[1]={[1]={skillType=93,type="SkillType"},[2]={type="Condition",var="UsingMace"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=10}},nil} +c["10% chance for Shapeshift Slam Skills you use yourself to cause an additional Aftershock"]={{[1]={[1]={skillType=93,type="SkillType"},[2]={skillType=157,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 Avoid Elemental Ailments"]={{[1]={flags=0,keywordFlags=0,name="AvoidElementalAilments",type="BASE",value=10}},nil} @@ -2076,7 +2075,7 @@ c["125% increased amount of Mana Leeched if you've dealt a Critical Hit Recently c["13 Mana gained when you Block"]={{[1]={flags=0,keywordFlags=0,name="ManaOnBlock",type="BASE",value=13}},nil} c["13 to 23 Physical Thorns damage"]={{[1]={flags=32,keywordFlags=0,name="PhysicalMin",type="BASE",value=13},[2]={flags=32,keywordFlags=0,name="PhysicalMax",type="BASE",value=23}},nil} c["13% chance for Flasks you use to not consume Charges"]={{[1]={flags=0,keywordFlags=0,name="FlaskChanceNotConsumeCharges",type="BASE",value=13}},nil} -c["13% chance for Mace Slam Skills you use yourself to cause an additional Aftershock"]={{}," for Mace Slam Skills you use yourself to cause an additional Aftershock "} +c["13% chance for Mace Slam Skills you use yourself to cause an additional Aftershock"]={{[1]={[1]={skillType=93,type="SkillType"},[2]={type="Condition",var="UsingMace"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=13}},nil} c["13% chance for Spell Skills to fire 2 additional Projectiles"]={{[1]={flags=2,keywordFlags=0,name="TwoAdditionalProjectilesChance",type="BASE",value=13}},nil} c["13% chance to Gain Arcane Surge when you deal a Critical Hit"]={{[1]={[1]={type="Condition",var="CritRecently"},flags=0,keywordFlags=0,name="Condition:ArcaneSurge",type="FLAG",value=true}},nil} c["13% chance to Maim on Hit"]={{}," to Maim "} @@ -2196,7 +2195,7 @@ c["15 to 25 Physical Thorns damage"]={{[1]={flags=32,keywordFlags=0,name="Physic c["15% Surpassing Chance to gain a Puppet Master stack whenever you use a Command Skill"]={{},"% Surpassing Chance to gain a Puppet Master stack whenever you use a Command Skill "} c["15% additional Physical Damage Reduction"]={{[1]={flags=0,keywordFlags=0,name="PhysicalDamageReduction",type="BASE",value=15}},nil} c["15% chance for Remnants you create to grant their effects twice"]={{[1]={flags=0,keywordFlags=0,name="LocalEffect",type="BASE",value=15}}," for Remnants you create to grant their s twice "} -c["15% chance for Shapeshift Slam Skills you use yourself to cause an additional Aftershock"]={{}," for Shapeshift Slam Skills you use yourself to cause an additional Aftershock "} +c["15% chance for Shapeshift Slam Skills you use yourself to cause an additional Aftershock"]={{[1]={[1]={skillType=93,type="SkillType"},[2]={skillType=157,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=15}},nil} c["15% chance that if you would gain Endurance Charges, you instead gain up to maximum Endurance Charges"]={{[1]={flags=0,keywordFlags=0,name="FlaskCharges",type="BASE",value=15}}," that if you would gain Endurance , you instead gain up to maximum Endurance Charges "} c["15% chance that if you would gain Frenzy Charges, you instead gain up to your maximum number of Frenzy Charges"]={{[1]={flags=0,keywordFlags=0,name="FlaskCharges",type="BASE",value=15}}," that if you would gain Frenzy , you instead gain up to your maximum number of Frenzy Charges "} c["15% chance that if you would gain Power Charges, you instead gain up to your maximum number of Power Charges"]={{[1]={flags=0,keywordFlags=0,name="FlaskCharges",type="BASE",value=15}}," that if you would gain Power , you instead gain up to your maximum number of Power Charges "} @@ -2746,7 +2745,7 @@ c["20% chance for Energy Shield Recharge to start when you Kill an Enemy"]={{[1] c["20% chance for Flasks you use to not consume Charges"]={{[1]={flags=0,keywordFlags=0,name="FlaskChanceNotConsumeCharges",type="BASE",value=20}},nil} c["20% chance for Lightning Damage with Hits to be Lucky"]={{[1]={flags=0,keywordFlags=0,name="LightningLuckyHitsChance",type="BASE",value=20}},nil} c["20% chance for Lightning Skills to Chain an additional time"]={{[1]={flags=0,keywordFlags=128,name="ChainChance",type="BASE",value=20}},nil} -c["20% chance for Mace Slam Skills you use yourself to cause an additional Aftershock"]={{}," for Mace Slam Skills you use yourself to cause an additional Aftershock "} +c["20% chance for Mace Slam Skills you use yourself to cause an additional Aftershock"]={{[1]={[1]={skillType=93,type="SkillType"},[2]={type="Condition",var="UsingMace"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=20}},nil} c["20% chance to Aggravate Bleeding on targets you Critically Hit with Attacks"]={{}," to Aggravate Bleeding on targets you Critically Hit "} c["20% chance to Aggravate Bleeding on targets you Hit with Empowered Attacks"]={{}," to Aggravate Bleeding on targets you Hit with Empowered Attacks "} c["20% chance to Aggravate Bleeding on targets you Hit with Empowered Attacks Empowered Attacks deal 30% increased Damage"]={{[1]={flags=0,keywordFlags=0,name="Damage",type="BASE",value=20}}," to Aggravate Bleeding on targets you Hit with Empowered Attacks Empowered Attacks deal 30% increased "} @@ -3183,7 +3182,7 @@ c["25% chance for Attacks to Maim on Hit against Poisoned Enemies 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 Skills to retain 40% of Glory on use"]={{}," for Skills to retain 40% of Glory on use "} -c["25% chance for Slam Skills you use yourself to cause an additional Aftershock"]={{}," for Slam Skills you use yourself to cause an additional Aftershock "} +c["25% chance for Slam Skills you use yourself to cause an additional Aftershock"]={{[1]={[1]={skillType=93,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} @@ -4343,8 +4342,8 @@ c["5 to 10 Physical Thorns damage"]={{[1]={flags=32,keywordFlags=0,name="Physica c["5 to 9 Physical Thorns damage"]={{[1]={flags=32,keywordFlags=0,name="PhysicalMin",type="BASE",value=5},[2]={flags=32,keywordFlags=0,name="PhysicalMax",type="BASE",value=9}},nil} 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 to cause an additional Aftershock"]={{}," for Slam Skills to cause an additional Aftershock "} -c["5% chance for Slam Skills you use yourself to cause an additional Aftershock"]={{}," for Slam Skills you use yourself to cause an additional Aftershock "} +c["5% chance for Slam Skills to cause an additional Aftershock"]={{[1]={[1]={skillType=93,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=5}},nil} +c["5% chance for Slam Skills you use yourself to cause an additional Aftershock"]={{[1]={[1]={skillType=93,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} @@ -5001,8 +5000,8 @@ c["75% increased Evasion Rating"]={{[1]={flags=0,keywordFlags=0,name="Evasion",t c["75% increased Mana Regeneration Rate"]={{[1]={flags=0,keywordFlags=0,name="ManaRegen",type="INC",value=75}},nil} c["75% increased Melee Damage with Spears while Surrounded"]={{[1]={[1]={type="Condition",var="Surrounded"},flags=268435716,keywordFlags=0,name="Damage",type="INC",value=75}},nil} c["75% increased Physical Damage"]={{[1]={flags=0,keywordFlags=0,name="PhysicalDamage",type="INC",value=75}},nil} -end)();(function() c["75% increased Spell Damage"]={{[1]={flags=2,keywordFlags=0,name="Damage",type="INC",value=75}},nil} +end)();(function() c["75% increased Spirit"]={{[1]={flags=0,keywordFlags=0,name="Spirit",type="INC",value=75}},nil} c["75% increased Thorns damage if you've Blocked Recently"]={{[1]={[1]={type="Condition",var="BlockedRecently"},flags=32,keywordFlags=0,name="Damage",type="INC",value=75}},nil} c["75% increased chance to Shock"]={{[1]={flags=0,keywordFlags=0,name="EnemyShockChance",type="INC",value=75}},nil} @@ -5020,8 +5019,8 @@ c["8 Life Regeneration per second"]={{[1]={flags=0,keywordFlags=0,name="LifeRege c["8 to 14 Fire Damage per Endurance Charge"]={{[1]={[1]={type="Multiplier",var="EnduranceCharge"},flags=0,keywordFlags=0,name="FireMin",type="BASE",value=8},[2]={[1]={type="Multiplier",var="EnduranceCharge"},flags=0,keywordFlags=0,name="FireMax",type="BASE",value=14}},nil} c["8% Global chance to Blind Enemies on Hit"]={{[1]={[1]={type="Global"},flags=0,keywordFlags=0,name="BlindChance",type="BASE",value=8}},"% chance "} c["8% additional Physical Damage Reduction"]={{[1]={flags=0,keywordFlags=0,name="PhysicalDamageReduction",type="BASE",value=8}},nil} -c["8% chance for Mace Slam Skills you use yourself to cause an additional Aftershock"]={{}," for Mace Slam Skills you use yourself to cause an additional Aftershock "} -c["8% chance for Slam Skills you use yourself to cause an additional Aftershock"]={{}," for Slam Skills you use yourself to cause an additional Aftershock "} +c["8% chance for Mace Slam Skills you use yourself to cause an additional Aftershock"]={{[1]={[1]={skillType=93,type="SkillType"},[2]={type="Condition",var="UsingMace"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=8}},nil} +c["8% chance for Slam Skills you use yourself to cause an additional Aftershock"]={{[1]={[1]={skillType=93,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=8}},nil} c["8% chance for Spell Skills to fire 2 additional Projectiles"]={{[1]={flags=2,keywordFlags=0,name="TwoAdditionalProjectilesChance",type="BASE",value=8}},nil} c["8% chance for Spell Skills to fire 8 additional Projectiles in a circle"]={{[1]={flags=2,keywordFlags=0,name="ProjectileCount",type="BASE",value=8}}," to fire 8 additional in a circle "} c["8% chance to Aggravate Bleeding on targets you Hit with Attacks"]={{}," to Aggravate Bleeding on targets you Hit "} @@ -9415,7 +9414,7 @@ c["Skills which require Glory generate 4 Glory every 2 seconds"]={nil,"Skills wh c["Skills which require Glory generate 5 Glory every 2 seconds"]={nil,"Skills which require Glory generate 5 Glory every 2 seconds "} c["Skills which require Glory generate 5 Glory every 2 seconds Enemies in your Presence have Exposure"]={nil,"Skills which require Glory generate 5 Glory every 2 seconds Enemies in your Presence have Exposure "} c["Slam Skills have 8% increased Area of Effect"]={{[1]={[1]={skillType=93,type="SkillType"},flags=0,keywordFlags=0,name="AreaOfEffect",type="INC",value=8}},nil} -c["Slam Skills you use yourself cause an additional Aftershock"]={nil,"Slam Skills you use yourself cause an additional Aftershock "} +c["Slam Skills you use yourself cause an additional Aftershock"]={{[1]={[1]={skillType=93,type="SkillType"},flags=0,keywordFlags=0,name="AftershockChance",type="BASE",value=100}},nil} c["Slam Skills you use yourself have 30% increased Aftershock Area of Effect"]={nil,"Slam Skills you use yourself have 30% increased Aftershock Area of Effect "} c["Socketed Curse Gems have 30% increased Reservation Efficiency"]={{[1]={[1]={keyword="curse",slotName="{SlotName}",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSkillMod",type="LIST",value={mod={flags=0,keywordFlags=0,name="ReservationEfficiency",type="INC",value=30}}}},nil} c["Socketed Curse Gems have 80% increased Reservation Efficiency"]={{[1]={[1]={keyword="curse",slotName="{SlotName}",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSkillMod",type="LIST",value={mod={flags=0,keywordFlags=0,name="ReservationEfficiency",type="INC",value=80}}}},nil} @@ -10003,8 +10002,8 @@ c["Your speed is Unaffected by Slows while Sprinting"]={nil,"Your speed is Unaff c["Your speed is Unaffected by Slows while Sprinting 10% less Movement and Skill Speed per Dodge Roll in the past 20 seconds"]={nil,"Your speed is Unaffected by Slows while Sprinting 10% less Movement and Skill Speed per Dodge Roll in the past 20 seconds "} c["Your speed is unaffected by Slows"]={{[1]={flags=0,keywordFlags=0,name="UnaffectedBySlows",type="FLAG",value=true}},nil} c["Your spells have 100% chance to Shock against Frozen Enemies"]={nil,"Your spells have 100% chance to Shock against Frozen Enemies "} -end)();(function() c["Zealot's Oath"]={{[1]={flags=0,keywordFlags=0,name="Keystone",type="LIST",value="Zealot's Oath"},[2]={flags=0,keywordFlags=0,name="Condition:HaveZealot'sOath",type="FLAG",value=true}},nil} +end)();(function() c["Zealot's Oath during Effect"]={{[1]={[1]={type="Condition",var="UsingFlask"},flags=0,keywordFlags=0,name="ZealotsOath",type="FLAG",value=true}},nil} c["additional Elemental Infusion of the same type"]={nil,"additional Elemental Infusion of the same type "} c["additional Rune-only sockets:"]={{},nil} diff --git a/src/Modules/CalcOffence.lua b/src/Modules/CalcOffence.lua index 960a5e16d4..79726d0ba3 100644 --- a/src/Modules/CalcOffence.lua +++ b/src/Modules/CalcOffence.lua @@ -4063,6 +4063,14 @@ function calcs.offence(env, actor, activeSkill) output.ScaledDamageEffect = output.ScaledDamageEffect * (1 + output.DoubleDamageEffect + output.TripleDamageEffect) output.DpsMultiplier = ( skillData.dpsMultiplier or 1 ) * calcLib.mod(skillModList, skillCfg, "DPS") + -- Aftershocks repeat the area of Slams you use yourself: on average one more hit per use at 100% chance + if activeSkill.skillTypes[SkillType.Slam] and not activeSkill.skillTypes[SkillType.Triggered] then + local aftershockChance = m_min(skillModList:Sum("BASE", skillCfg, "AftershockChance"), 100) + if aftershockChance > 0 then + output.AftershockChance = aftershockChance + output.DpsMultiplier = output.DpsMultiplier * (1 + aftershockChance / 100) + end + end local hitRate = output.HitChance / 100 * (globalOutput.HitSpeed or globalOutput.Speed) * output.DpsMultiplier diff --git a/src/Modules/CalcSections.lua b/src/Modules/CalcSections.lua index 787ffca96b..18fd7b94c7 100644 --- a/src/Modules/CalcSections.lua +++ b/src/Modules/CalcSections.lua @@ -758,6 +758,7 @@ return { { label = "Reserve Uptime", haveOutput = "ReserveDurationUptime", { format = "{2:output:ReserveDurationUptime}%", { breakdown = "ReserveDurationUptime" }, }, }, { label = "Sustainable Trauma", haveOutput = "SustainableTrauma", { format = "{0:output:SustainableTrauma}", { breakdown = "SustainableTrauma" }, { modName = { "ExtraTrauma", "RepeatCount", "Duration", "PrimaryDuration", "SecondaryDuration", "DamagingAilmentDuration"}, cfg = "skill" }, }, }, { label = "Detonation Time", haveOutput = "DetonationTime", { format = "{3:output:DetonationTime}s", { breakdown = "DetonationTime" }, { modName = { "DetonationTime" }, cfg = "skill" } }}, + { label = "Aftershock Chance", haveOutput = "AftershockChance", { format = "{0:output:AftershockChance}%", { modName = { "AftershockChance" }, cfg = "skill" }, }, }, { label = "Repeat Count", haveOutput = "RepeatCount", { format = "{output:Repeats}", { modName = { "RepeatCount" }, cfg = "skill" }, }, }, { label = "Projectile Count", flag = "projectile", { format = "{output:ProjectileCount}", { modName = { "NoAdditionalProjectiles" , "ProjectileCount", "SurpassingProjectileChance", "TwoAdditionalProjectilesChance" }, cfg = "skill" }, }, }, { label = "2 Add. Proj. Chance", haveOutput = "TwoAdditionalProjectiles", { format = "{output:TwoAdditionalProjectiles}%", { modName = { "TwoAdditionalProjectilesChance", "NoAdditionalProjectiles" }, cfg = "skill" }, }, }, diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index ff8a00f8fa..519f14ccb4 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -2271,6 +2271,17 @@ local explodeFunc = function(chance, amount, type, ...) } end +-- Chance for Slams you use yourself to cause an additional Aftershock, optionally only for Mace or Shapeshift Slams +local function aftershockChance(num, kind) + local tags = { { type = "SkillType", skillType = SkillType.Slam } } + if kind == "mace " then + t_insert(tags, { type = "Condition", var = "UsingMace" }) + elseif kind == "shapeshift " then + t_insert(tags, { type = "SkillType", skillType = SkillType.Shapeshift }) + end + return { mod("AftershockChance", "BASE", num, unpack(tags)) } +end + -- forward declarations local dmgTypes -- List of special modifiers @@ -2710,6 +2721,9 @@ local specialModList = { flag("AncestralEmpowerment", { type = "SkillType", skillType = SkillType.Slam }), flag("Condition:AncestrallyBoosted", { type = "SkillType", skillType = SkillType.Slam }), }, + ["(%d+)%% chance for (%a* ?)slam skills you use yourself to cause an additional aftershock"] = function(num, _, kind) return aftershockChance(num, kind) end, + ["(%d+)%% chance for (%a* ?)slam skills to cause an additional aftershock"] = function(num, _, kind) return aftershockChance(num, kind) end, + ["slam skills you use yourself cause an additional aftershock"] = aftershockChance(100, ""), -- Leech Related ["life leech is instant"] = { mod("InstantLifeLeech", "BASE", 100), }, ["mana leech is instant"] = { mod("InstantManaLeech", "BASE", 100), },