From bac300a782ef918e794cb9759af285c9731ea5d5 Mon Sep 17 00:00:00 2001 From: Mickael Cagnion Date: Sun, 8 Nov 2026 09:55:37 +0100 Subject: [PATCH] Add support for The Loyal Few conditional minion lines The keystone's three "while you have a Zombie/Skeleton/Spectre" lines were unsupported or restricted to the gem of that name: - Minions take 10% less Damage while you have a Zombie - Minions deal 10% more Damage while you have a Skeleton - Minions gain 10% of Non-Chaos Damage as extra Chaos Damage while you have a Spectre Parse them as minion modifiers gated on a parent condition, and set HaveZombie, HaveSkeleton and HaveSpectre in the minion count loop when an active skill has a positive limit for that minion type. Update the ModCache entries of these lines. Their joined multi-line keys no longer exist, which also moves one chunk boundary. --- spec/System/TestAbyssTimelessJewel_spec.lua | 23 +++++++++++++++++++++ src/Data/ModCache.lua | 14 ++++--------- src/Modules/CalcPerform.lua | 9 ++++++++ src/Modules/ModParser.lua | 3 +++ 4 files changed, 39 insertions(+), 10 deletions(-) diff --git a/spec/System/TestAbyssTimelessJewel_spec.lua b/spec/System/TestAbyssTimelessJewel_spec.lua index 1f64037c529..23c0458ffe5 100644 --- a/spec/System/TestAbyssTimelessJewel_spec.lua +++ b/spec/System/TestAbyssTimelessJewel_spec.lua @@ -501,4 +501,27 @@ describe("Abyss timeless jewels", function() assert.are.equal("From Below", spec.nodes[50692].dn) assert.are.equal("Sione, Sun's Roar", spec.nodes[31667].dn) end) + + -- The Loyal Few: each line affects all minions, but only while you have a minion of the named type + for _, case in ipairs({ + { minion = "Zombie", line = "Minions take 10% less Damage while you have a Zombie", group = "Raise Zombie 20/0 1", + read = function(modDB) return modDB:More(nil, "DamageTaken") end, without = 1, with = 0.9 }, + { minion = "Skeleton", line = "Minions deal 10% more Damage while you have a Skeleton", group = "Summon Skeletons 20/0 1", + read = function(modDB) return modDB:More(nil, "Damage") end, without = 1, with = 1.1 }, + { minion = "Spectre", line = "Minions gain 10% of Non-Chaos Damage as extra Chaos Damage while you have a Spectre", group = "Raise Spectre 20/0 1", + read = function(modDB) return modDB:Sum("BASE", nil, "NonChaosDamageGainAsChaos") end, without = 0, with = 10 }, + }) do + it("applies The Loyal Few's " .. case.minion .. " line to other minions only while you have a " .. case.minion, function() + build.spectreList = { "Metadata/Monsters/BloodChieftain/MonkeyChiefBloodEnrage" } + build.skillsTab:PasteSocketGroup("Summon Raging Spirit 20/0 1") + build.configTab.input.customMods = case.line + build.configTab:BuildModList() + runCallback("OnFrame") + assert.are.equal(case.without, case.read(build.calcsTab.mainEnv.minion.modDB)) + + build.skillsTab:PasteSocketGroup(case.group) + runCallback("OnFrame") + assert.are.equal(case.with, case.read(build.calcsTab.mainEnv.minion.modDB)) + end) + end end) diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index e0ede6c2653..dd3de517a3d 100755 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -18074,9 +18074,7 @@ c["Minions deal 1% increased Damage per 5 Dexterity"]={{[1]={[1]={div=5,stat="De c["Minions deal 10% increased Damage"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="Damage",type="INC",value=10}}}},nil} c["Minions deal 10% increased Damage while you are affected by a Herald"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={[1]={actor="parent",type="ActorCondition",var="AffectedByHerald"},flags=0,keywordFlags=0,name="Damage",type="INC",value=10}}}},nil} c["Minions deal 10% more Damage"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="Damage",type="MORE",value=10}}}},nil} -c["Minions deal 10% more Damage while you have a Skeleton"]={{[1]={[1]={includeTransfigured=true,skillName="Summon Skeletons",type="SkillName"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="Damage",type="MORE",value=10}}}}," while you have a "} -c["Minions deal 10% more Damage while you have a Skeleton Minions gain 10% of Non-Chaos Damage as extra Chaos Damage while you have a Spectre"]={{[1]={[1]={includeTransfigured=true,skillName="Summon Skeletons",type="SkillName"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="Damage",type="MORE",value=10}}}}," while you have a Minions gain 10% of Non-Chaos Damage as extra Chaos Damage while you have a Spectre "} -c["Minions deal 10% more Damage while you have a Skeleton Minions gain 10% of Non-Chaos Damage as extra Chaos Damage while you have a Spectre Maximum number of raised Spectres, Skeletons and Zombies is 1"]={{[1]={[1]={includeTransfigured=true,skillName="Summon Skeletons",type="SkillName"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="Damage",type="MORE",value=10}}}}," while you have a Minions gain 10% of Non-Chaos Damage as extra Chaos Damage while you have a Spectre Maximum number of raised Spectres, Skeletons and Zombies is 1 "} +c["Minions deal 10% more Damage while you have a Skeleton"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={[1]={actor="parent",type="ActorCondition",var="HaveSkeleton"},flags=0,keywordFlags=0,name="Damage",type="MORE",value=10}}}},nil} c["Minions deal 100% increased Damage"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="Damage",type="INC",value=100}}}},nil} c["Minions deal 101% increased Damage"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="Damage",type="INC",value=101}}}},nil} c["Minions deal 102 to 156 additional Physical Damage"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="PhysicalMin",type="BASE",value=102}}},[2]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="PhysicalMax",type="BASE",value=156}}}},nil} @@ -18206,8 +18204,7 @@ c["Minions deal 96 to 144 additional Physical Damage"]={{[1]={flags=0,keywordFla c["Minions deal 96% increased Damage"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="Damage",type="INC",value=96}}}},nil} c["Minions deal no Non-Cold Damage"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="DealNoPhysical",type="FLAG",value=true}}},[2]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="DealNoLightning",type="FLAG",value=true}}},[3]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="DealNoFire",type="FLAG",value=true}}},[4]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="DealNoChaos",type="FLAG",value=true}}}},nil} c["Minions from Herald Skills deal 25% more Damage"]={{[1]={[1]={skillType=52,type="SkillType"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="Damage",type="MORE",value=25}}}},nil} -c["Minions gain 10% of Non-Chaos Damage as extra Chaos Damage while you have a Spectre"]={{[1]={[1]={includeTransfigured=true,skillName="Raise Spectre",type="SkillName"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="NonChaosDamageGainAsChaos",type="BASE",value=10}}}}," while you have a "} -c["Minions gain 10% of Non-Chaos Damage as extra Chaos Damage while you have a Spectre Maximum number of raised Spectres, Skeletons and Zombies is 1"]={{[1]={[1]={includeTransfigured=true,skillName="Raise Spectre",type="SkillName"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="NonChaosDamageGainAsChaos",type="BASE",value=10}}}}," while you have a Maximum number of raised Spectres, Skeletons and Zombies is 1 "} +c["Minions gain 10% of Non-Chaos Damage as extra Chaos Damage while you have a Spectre"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={[1]={actor="parent",type="ActorCondition",var="HaveSpectre"},flags=0,keywordFlags=0,name="NonChaosDamageGainAsChaos",type="BASE",value=10}}}},nil} c["Minions gain 18% of Elemental Damage as Extra Chaos Damage"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="ElementalDamageGainAsChaos",type="BASE",value=18}}}},nil} c["Minions gain 20% of Elemental Damage as Extra Chaos Damage"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="ElementalDamageGainAsChaos",type="BASE",value=20}}}},nil} c["Minions gain 20% of Maximum Life as Extra Maximum Energy Shield"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="LifeGainAsEnergyShield",type="BASE",value=20}}}},nil} @@ -18527,10 +18524,7 @@ c["Minions summoned by this Graft have 40% increased Life"]={nil,"summoned by th c["Minions summoned by this Graft have 46% increased Life"]={nil,"summoned by this Graft have 46% increased Life "} c["Minions summoned by this Graft have 52% increased Life"]={nil,"summoned by this Graft have 52% increased Life "} c["Minions summoned by this Graft have 58% increased Life"]={nil,"summoned by this Graft have 58% increased Life "} -c["Minions take 10% less Damage while you have a Zombie"]={nil,"take 10% less Damage while you have a Zombie "} -c["Minions take 10% less Damage while you have a Zombie Minions deal 10% more Damage while you have a Skeleton"]={nil,"take 10% less Damage while you have a Zombie Minions deal 10% more Damage while you have a Skeleton "} -c["Minions take 10% less Damage while you have a Zombie Minions deal 10% more Damage while you have a Skeleton Minions gain 10% of Non-Chaos Damage as extra Chaos Damage while you have a Spectre"]={nil,"take 10% less Damage while you have a Zombie Minions deal 10% more Damage while you have a Skeleton Minions gain 10% of Non-Chaos Damage as extra Chaos Damage while you have a Spectre "} -c["Minions take 10% less Damage while you have a Zombie Minions deal 10% more Damage while you have a Skeleton Minions gain 10% of Non-Chaos Damage as extra Chaos Damage while you have a Spectre Maximum number of raised Spectres, Skeletons and Zombies is 1"]={{[1]={[1]={includeTransfigured=true,skillName="Raise Zombie",type="SkillName"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="Damage",type="OVERRIDE",value=1}}}},"take 10% less while you have a Minions deal 10% more Damage while you have a Skeleton Minions gain 10% of Non-Chaos Damage as extra Chaos Damage while you have a Spectre Maximum number of raised Spectres, Skeletons and Zombies "} +c["Minions take 10% less Damage while you have a Zombie"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={[1]={actor="parent",type="ActorCondition",var="HaveZombie"},flags=0,keywordFlags=0,name="DamageTaken",type="MORE",value=-10}}}},nil} c["Minions' Base Attack Critical Strike Chance is equal to the Critical"]={nil,"Minions' Base Attack Critical Strike Chance is equal to the Critical "} c["Minions' Base Attack Critical Strike Chance is equal to the Critical Strike Chance of your Main Hand Weapon"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=1,keywordFlags=0,name="AttackCritIsEqualToParentMainHand",type="FLAG",value=true}}}},nil} c["Minions' Hits can only Kill Ignited Enemies"]={nil,"Minions' Hits can only Kill Ignited Enemies "} @@ -20007,13 +20001,13 @@ c["Retaliation Skills have 15% increased Cooldown Recovery Rate"]={{[1]={[1]={sk c["Retaliation Skills have 20% increased Speed"]={{[1]={[1]={skillType=121,type="SkillType"},flags=0,keywordFlags=0,name="Speed",type="INC",value=20},[2]={[1]={skillType=121,type="SkillType"},flags=0,keywordFlags=4,name="WarcrySpeed",type="INC",value=20}},nil} c["Retaliation Skills have 200% Arcane Might"]={{[1]={[1]={skillType=121,type="SkillType"},flags=0,keywordFlags=0,name="SpellDamageAppliesToAttacks",type="FLAG",value=true},[2]={[1]={skillType=121,type="SkillType"},flags=0,keywordFlags=0,name="ImprovedSpellDamageAppliesToAttacks",type="MAX",value=200}},nil} c["Retaliation Skills have 25% increased Stun Duration on Enemies"]={{[1]={[1]={skillType=121,type="SkillType"},flags=0,keywordFlags=0,name="EnemyStunDuration",type="INC",value=25}},nil} -end)();(function() c["Retaliation Skills have 30% increased Area of Effect"]={{[1]={[1]={skillType=121,type="SkillType"},flags=0,keywordFlags=0,name="AreaOfEffect",type="INC",value=30}},nil} c["Retaliation Skills have 30% increased Cooldown Recovery Rate"]={{[1]={[1]={skillType=121,type="SkillType"},flags=0,keywordFlags=0,name="CooldownRecovery",type="INC",value=30}},nil} c["Retaliation Skills have 50% increased Stun Duration on Enemies"]={{[1]={[1]={skillType=121,type="SkillType"},flags=0,keywordFlags=0,name="EnemyStunDuration",type="INC",value=50}},nil} c["Retaliation Skills have 6% increased Speed"]={{[1]={[1]={skillType=121,type="SkillType"},flags=0,keywordFlags=0,name="Speed",type="INC",value=6},[2]={[1]={skillType=121,type="SkillType"},flags=0,keywordFlags=4,name="WarcrySpeed",type="INC",value=6}},nil} c["Retaliation Skills have 8% increased Speed"]={{[1]={[1]={skillType=121,type="SkillType"},flags=0,keywordFlags=0,name="Speed",type="INC",value=8},[2]={[1]={skillType=121,type="SkillType"},flags=0,keywordFlags=4,name="WarcrySpeed",type="INC",value=8}},nil} c["Returning Projectiles have 150% increased Speed"]={nil,"Returning Projectiles have 150% increased Speed "} +end)();(function() c["Rhoa Feather Lure"]={nil,"Rhoa Feather Lure "} c["Right Ring Slot: Your Shocking Skitterbot's Aura applies Socketed Hex Curse instead"]={{[1]={[1]={num=2,type="SlotNumber"},flags=0,keywordFlags=0,name="SkitterbotsCannotShock",type="FLAG",value=true}},nil} c["Right Ring slot: Cover Enemies in Frost for 5 seconds when you Freeze them"]={{[1]={[1]={num=2,type="SlotNumber"},[2]={actor="enemy",type="ActorCondition",var="Frozen"},flags=0,keywordFlags=0,name="CoveredInFrostEffect",type="BASE",value=20}},nil} diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index cda09c77378..960544baa2d 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -1259,6 +1259,12 @@ local minionLifePoolBySkill = { ["Summon Stone Golem of Safeguarding"] = { life = "TotalStoneGolemLife", redirect = "takenFromStoneGolemBeforeYou", source = "Stone Golem" }, } local spectreLifePool = { life = "TotalSpectreLife", redirect = "takenFromSpectresBeforeYou", source = "Spectres", limit = "ActiveSpectreLimit" } +-- Conditions set on the player while at least one minion with this limit is active (e.g. "while you have a Zombie") +local minionLimitConditions = { + ActiveZombieLimit = "HaveZombie", + ActiveSkeletonLimit = "HaveSkeleton", + ActiveSpectreLimit = "HaveSpectre", +} local companionshipLifePool = { life = "TotalMinionLife", redirect = "takenFromMinionBeforeYou", source = "Minion" } local totemLifePoolByStat = { TotalTotemLife = { redirect = "takenFromTotemsBeforeYou", source = "Totem" }, @@ -1445,6 +1451,9 @@ function calcs.perform(env, skipEHP) if minionData.limit then count = m_floor(modDB:Override(nil, minionData.limit) or (calcLib.val(activeSkill.skillModList, minionData.limit) * activeSkill.skillModList:More(activeSkill.skillCfg, "ActiveMinionLimit"))) output[minionData.limit] = m_max(count, output[minionData.limit] or 0) + if count > 0 and minionLimitConditions[minionData.limit] then + modDB:NewMod("Condition:"..minionLimitConditions[minionData.limit], "FLAG", true, grantedEffect.name) + end end local counts = minionCounts[key] or { } counts.total = m_max(count, counts.total or 0) diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 6355f995fea..00b2433b2bb 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -4488,6 +4488,9 @@ local specialModList = { ["minions deal (%d+)%% increased damage per (%d+) dexterity"] = function(num, _, div) return { mod("MinionModifier", "LIST", { mod = mod("Damage", "INC", num) }, { type = "PerStat", stat = "Dex", div = tonumber(div) }) } end, ["minions have (%d+)%% chance to deal double damage while they are on full life"] = function(num) return { mod("MinionModifier", "LIST", { mod = mod("DoubleDamageChance", "BASE", num, { type = "Condition", var = "FullLife" }) }) } end, ["minions have (%d+)%% chance to deal double damage per fortification on you"] = function(num) return { mod("MinionModifier", "LIST", { mod = mod("DoubleDamageChance", "BASE", num, { type = "PerStat", stat= "FortificationStacks", actor = "parent" }) }) } end, + ["minions take (%d+)%% less damage while you have a zombie"] = function(num) return { mod("MinionModifier", "LIST", { mod = mod("DamageTaken", "MORE", -num, { type = "ActorCondition", actor = "parent", var = "HaveZombie" }) }) } end, + ["minions deal (%d+)%% more damage while you have a skeleton"] = function(num) return { mod("MinionModifier", "LIST", { mod = mod("Damage", "MORE", num, { type = "ActorCondition", actor = "parent", var = "HaveSkeleton" }) }) } end, + ["minions gain (%d+)%% of non%-chaos damage as extra chaos damage while you have a spectre"] = function(num) return { mod("MinionModifier", "LIST", { mod = mod("NonChaosDamageGainAsChaos", "BASE", num, { type = "ActorCondition", actor = "parent", var = "HaveSpectre" }) }) } end, ["(%d+)%% increased golem damage for each type of golem you have summoned"] = function(num) return { mod("MinionModifier", "LIST", { mod = mod("Damage", "INC", num, { type = "ActorCondition", actor = "parent", var = "HavePhysicalGolem" }) }, { type = "SkillType", skillType = SkillType.Golem }), mod("MinionModifier", "LIST", { mod = mod("Damage", "INC", num, { type = "ActorCondition", actor = "parent", var = "HaveLightningGolem" }) }, { type = "SkillType", skillType = SkillType.Golem }),