diff --git a/spec/System/TestAbyssTimelessJewel_spec.lua b/spec/System/TestAbyssTimelessJewel_spec.lua index 1f64037c52..23c0458ffe 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 c0ba5d2363..c16b21f9e8 100755 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -17812,9 +17812,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 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} c["Minions deal 105% increased Damage"]={{[1]={flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="Damage",type="INC",value=105}}}},nil} @@ -17942,8 +17940,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} @@ -18256,10 +18253,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["Skills Socketed in your Boots are Supported by level 20 Impale"]={{[1]={[1]={ c["Skills Socketed in your Boots are Supported by level 20 Increased Area of Effect"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportIncreasedAreaOfEffect"}}},nil} c["Skills Socketed in your Boots are Supported by level 20 Increased Critical Damage"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportIncreasedCriticalDamage"}}},nil} c["Skills Socketed in your Boots are Supported by level 20 Increased Critical Strikes"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportIncreasedCriticalStrikes"}}},nil} -end)();(function() c["Skills Socketed in your Boots are Supported by level 20 Infernal Legion"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportInfernalLegion"}}},nil} c["Skills Socketed in your Boots are Supported by level 20 Infused Channelling"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportInfusedChannelling"}}},nil} c["Skills Socketed in your Boots are Supported by level 20 Innervate"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportInnervate"}}},nil} c["Skills Socketed in your Boots are Supported by level 20 Inspiration"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportInspiration"}}},nil} c["Skills Socketed in your Boots are Supported by level 20 Intensify"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportIntensify"}}},nil} c["Skills Socketed in your Boots are Supported by level 20 Iron Grip"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportIronGrip"}}},nil} +end)();(function() c["Skills Socketed in your Boots are Supported by level 20 Iron Will"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportIronWill"}}},nil} c["Skills Socketed in your Boots are Supported by level 20 Item Rarity"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportItemRarity"}}},nil} c["Skills Socketed in your Boots are Supported by level 20 Knockback"]={{[1]={[1]={slotName="Boots",type="SocketedIn"},flags=0,keywordFlags=0,name="ExtraSupport",type="LIST",value={appliesToGrantedSkills=true,level=20,skillId="SupportKnockback"}}},nil} diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index d683aab3ce..ad2920cd0f 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 9d5d1db3a0..03640a6523 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -4441,6 +4441,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 }),