Skip to content

Commit 7e38600

Browse files
LocalIdentityLocalIdentity
andauthored
Add support to auto calculate minion count for mods on Bonemeld and Farrul Bloodline (#9832)
* Add auto calc of minion + non-vaal minions Automates the calc for the 2 config boxes so people don't need to manually work them out * Fix animate weapon not using minion count stat For some reason the count of Animate weapon minions didn't use the same format as the other minion types so wasn't being counted in the total minion count calc Now will also show the minion max count in the sidebar too --------- Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent a0e543d commit 7e38600

11 files changed

Lines changed: 20 additions & 50 deletions

File tree

src/Data/ModCache.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7517,7 +7517,7 @@ c["Anger has 50% increased Aura Effect while at maximum Endurance Charges"]={{[1
75177517
c["Anger has 50% increased Mana Reservation Efficiency"]={{[1]={[1]={includeTransfigured=true,skillName="Anger",type="SkillName"},flags=0,keywordFlags=0,name="ManaReservationEfficiency",type="INC",value=50}},nil}
75187518
c["Anger has 60% increased Aura Effect"]={{[1]={[1]={includeTransfigured=true,skillName="Anger",type="SkillName"},flags=0,keywordFlags=0,name="AuraEffect",type="INC",value=60}},nil}
75197519
c["Anger has no Reservation"]={{[1]={[1]={skillId="Anger",type="SkillId"},[2]={neg=true,skillType=119,type="SkillType"},flags=0,keywordFlags=0,name="SkillData",type="LIST",value={key="manaReservationFlat",value=0}},[2]={[1]={skillId="Anger",type="SkillId"},[2]={neg=true,skillType=119,type="SkillType"},flags=0,keywordFlags=0,name="SkillData",type="LIST",value={key="lifeReservationFlat",value=0}},[3]={[1]={skillId="Anger",type="SkillId"},[2]={neg=true,skillType=119,type="SkillType"},flags=0,keywordFlags=0,name="SkillData",type="LIST",value={key="manaReservationPercent",value=0}},[4]={[1]={skillId="Anger",type="SkillId"},[2]={neg=true,skillType=119,type="SkillType"},flags=0,keywordFlags=0,name="SkillData",type="LIST",value={key="lifeReservationPercent",value=0}}},nil}
7520-
c["Animated Guardian deals 5% increased Damage per Animated Weapon"]={{[1]={[1]={includeTransfigured=true,skillName="Animate Guardian",type="SkillName"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={[1]={actor="parent",type="Multiplier",var="AnimatedWeapon"},flags=0,keywordFlags=0,name="Damage",type="INC",value=5}}}},nil}
7520+
c["Animated Guardian deals 5% increased Damage per Animated Weapon"]={{[1]={[1]={includeTransfigured=true,skillName="Animate Guardian",type="SkillName"},flags=0,keywordFlags=0,name="MinionModifier",type="LIST",value={mod={[1]={actor="parent",stat="ActiveAnimatedWeaponLimit",type="PerStat"},flags=0,keywordFlags=0,name="Damage",type="INC",value=5}}}},nil}
75217521
c["Animated and Manifested Minions' Melee Strikes deal 50% less Splash Damage"]={nil,"Animated and Manifested Minions' Melee Strikes deal 50% less Splash Damage "}
75227522
c["Animated and Manifested Minions' Melee Strikes deal 50% less Splash Damage You cannot have Non-Animated, Non-Manifested Minions"]={nil,"Animated and Manifested Minions' Melee Strikes deal 50% less Splash Damage You cannot have Non-Animated, Non-Manifested Minions "}
75237523
c["Animated and Manifested Minions' Melee Strikes deal Splash"]={nil,"Animated and Manifested Minions' Melee Strikes deal Splash "}

src/Data/SkillStatMap.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,6 +1974,12 @@ return {
19741974
["base_number_of_skeletons_allowed"] = {
19751975
mod("ActiveSkeletonLimit", "BASE", nil),
19761976
},
1977+
["base_number_of_animated_weapons_allowed"] = {
1978+
mod("ActiveAnimatedWeaponLimit", "BASE", nil),
1979+
},
1980+
["base_number_of_support_ghosts_allowed"] = {
1981+
mod("ActivePhantasmLimit", "BASE", nil),
1982+
},
19771983
["base_number_of_raging_spirits_allowed"] = {
19781984
mod("ActiveRagingSpiritLimit", "BASE", nil),
19791985
},

src/Data/Skills/act_dex.lua

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,6 @@ skills["AnimateWeapon"] = {
207207
["attack_maximum_added_physical_damage_for_ethereal_blades"] = {
208208
mod("MinionModifier", "LIST", { mod = mod("PhysicalMax", "BASE", nil, 0, KeywordFlag.Attack, { type = "ActorCondition", actor = "parent", var = "AnimatingLingeringBlades" }) }),
209209
},
210-
["base_number_of_animated_weapons_allowed"] = {
211-
mod("Multiplier:AnimatedWeapon", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true })
212-
},
213210
},
214211
baseFlags = {
215212
spell = true,
@@ -309,11 +306,6 @@ skills["AnimateWeaponAltX"] = {
309306
minionList = {
310307
"AnimatedWeapon",
311308
},
312-
statMap = {
313-
["base_number_of_animated_weapons_allowed"] = {
314-
mod("Multiplier:AnimatedWeapon", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true })
315-
},
316-
},
317309
baseFlags = {
318310
spell = true,
319311
minion = true,
@@ -415,9 +407,6 @@ skills["AnimateWeaponAltY"] = {
415407
["attack_maximum_added_physical_damage_for_ethereal_blades"] = {
416408
mod("MinionModifier", "LIST", { mod = mod("PhysicalMax", "BASE", nil, 0, KeywordFlag.Attack, { type = "ActorCondition", actor = "parent", var = "AnimatingLingeringBlades" }) }),
417409
},
418-
["base_number_of_animated_weapons_allowed"] = {
419-
mod("Multiplier:AnimatedWeapon", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true })
420-
},
421410
},
422411
baseFlags = {
423412
spell = true,
@@ -513,9 +502,6 @@ skills["VaalAnimateWeapon"] = {
513502
["base_movement_velocity_+%"] = {
514503
mod("MinionModifier", "LIST", { mod = mod("MovementSpeed", "INC", nil) }),
515504
},
516-
["base_number_of_animated_weapons_allowed"] = {
517-
mod("Multiplier:VaalAnimatedWeapon", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true })
518-
},
519505
},
520506
baseFlags = {
521507
spell = true,

src/Data/Skills/other.lua

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4016,11 +4016,6 @@ skills["TriggeredSummonGhostOnKill"] = {
40164016
minionList = {
40174017
"SummonedPhantasm",
40184018
},
4019-
statMap = {
4020-
["base_number_of_support_ghosts_allowed"] = {
4021-
mod("ActivePhantasmLimit", "BASE", nil),
4022-
},
4023-
},
40244019
baseFlags = {
40254020
spell = true,
40264021
minion = true,

src/Data/Skills/sup_int.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6380,9 +6380,6 @@ skills["SupportSummonPhantasm"] = {
63806380
"SummonedPhantasm"
63816381
},
63826382
statMap = {
6383-
["base_number_of_support_ghosts_allowed"] = {
6384-
mod("ActivePhantasmLimit", "BASE", nil),
6385-
},
63866383
["phantasm_minimum_added_physical_damage_to_grant"] = {
63876384
mod("PhysicalMin", "BASE", nil, ModFlag.Spell, 0, { type = "PerStat", stat = "ActivePhantasmLimit" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Phantasmal Might", effectCond = "PhantasmalMight", allowTotemBuff = true })
63886385
},

src/Export/Skills/act_dex.txt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ local skills, mod, flag, skill = ...
6262
["attack_maximum_added_physical_damage_for_ethereal_blades"] = {
6363
mod("MinionModifier", "LIST", { mod = mod("PhysicalMax", "BASE", nil, 0, KeywordFlag.Attack, { type = "ActorCondition", actor = "parent", var = "AnimatingLingeringBlades" }) }),
6464
},
65-
["base_number_of_animated_weapons_allowed"] = {
66-
mod("Multiplier:AnimatedWeapon", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true })
67-
},
6865
},
6966
#mods
7067

@@ -73,11 +70,6 @@ local skills, mod, flag, skill = ...
7370
minionList = {
7471
"AnimatedWeapon",
7572
},
76-
statMap = {
77-
["base_number_of_animated_weapons_allowed"] = {
78-
mod("Multiplier:AnimatedWeapon", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true })
79-
},
80-
},
8173
#baseMod skill("minionUseMainHandWeapon", true)
8274
#mods
8375

@@ -103,9 +95,6 @@ local skills, mod, flag, skill = ...
10395
["attack_maximum_added_physical_damage_for_ethereal_blades"] = {
10496
mod("MinionModifier", "LIST", { mod = mod("PhysicalMax", "BASE", nil, 0, KeywordFlag.Attack, { type = "ActorCondition", actor = "parent", var = "AnimatingLingeringBlades" }) }),
10597
},
106-
["base_number_of_animated_weapons_allowed"] = {
107-
mod("Multiplier:AnimatedWeapon", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true })
108-
},
10998
},
11099
#mods
111100

@@ -122,9 +111,6 @@ local skills, mod, flag, skill = ...
122111
["base_movement_velocity_+%"] = {
123112
mod("MinionModifier", "LIST", { mod = mod("MovementSpeed", "INC", nil) }),
124113
},
125-
["base_number_of_animated_weapons_allowed"] = {
126-
mod("Multiplier:VaalAnimatedWeapon", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", unscalable = true })
127-
},
128114
},
129115
#mods
130116

src/Export/Skills/other.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,11 +1037,6 @@ local skills, mod, flag, skill = ...
10371037
minionList = {
10381038
"SummonedPhantasm",
10391039
},
1040-
statMap = {
1041-
["base_number_of_support_ghosts_allowed"] = {
1042-
mod("ActivePhantasmLimit", "BASE", nil),
1043-
},
1044-
},
10451040
#mods
10461041

10471042
#skill SummonSentinelOfRadiance

src/Export/Skills/sup_int.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -916,9 +916,6 @@ local skills, mod, flag, skill = ...
916916
"SummonedPhantasm"
917917
},
918918
statMap = {
919-
["base_number_of_support_ghosts_allowed"] = {
920-
mod("ActivePhantasmLimit", "BASE", nil),
921-
},
922919
["phantasm_minimum_added_physical_damage_to_grant"] = {
923920
mod("PhysicalMin", "BASE", nil, ModFlag.Spell, 0, { type = "PerStat", stat = "ActivePhantasmLimit" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Phantasmal Might", effectCond = "PhantasmalMight", allowTotemBuff = true })
924921
},

src/Modules/CalcPerform.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,6 +1249,7 @@ function calcs.perform(env, skipEHP)
12491249
applyEnemyModifiers(env.minion, true)
12501250
end
12511251
applyEnemyModifiers(env.enemy, true)
1252+
local minionCount = {}
12521253

12531254
for _, activeSkill in ipairs(env.player.activeSkillList) do
12541255
if activeSkill.skillTypes[SkillType.Brand] then
@@ -1331,6 +1332,13 @@ function calcs.perform(env, skipEHP)
13311332
if activeSkill.minion and activeSkill.minion.minionData and activeSkill.minion.minionData.limit then
13321333
local limit = m_floor(modDB:Override(nil, activeSkill.minion.minionData.limit) or (calcLib.val(activeSkill.skillModList, activeSkill.minion.minionData.limit) * activeSkill.skillModList:More(activeSkill.skillCfg, "ActiveMinionLimit")))
13331334
output[activeSkill.minion.minionData.limit] = m_max(limit, output[activeSkill.minion.minionData.limit] or 0)
1335+
if not minionCount[activeSkill.minion.minionData.limit] then
1336+
env.player.modDB:NewMod("Multiplier:SummonedMinion", "BASE", output[activeSkill.minion.minionData.limit], "Config", { type = "Condition", var = "Combat" })
1337+
if not activeSkill.skillTypes[SkillType.Vaal] then
1338+
env.player.modDB:NewMod("Multiplier:NonVaalSummonedMinion", "BASE", output[activeSkill.minion.minionData.limit], "Config", { type = "Condition", var = "Combat" })
1339+
end
1340+
minionCount[activeSkill.minion.minionData.limit] = true
1341+
end
13341342
end
13351343
if activeSkill.skillTypes[SkillType.CreatesMinion] and not activeSkill.skillTypes[SkillType.MinionsAreUndamagable] then
13361344
modDB:NewMod("Condition:HaveDamageableMinion", "FLAG", true)

src/Modules/ConfigOptions.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,11 +1108,11 @@ Huge sets the radius to 11.
11081108
{ var = "multiplierNearbyCorpse", type = "count", label = "# of Nearby Corpses:", ifMult = "NearbyCorpse", apply = function(val, modList, enemyModList)
11091109
modList:NewMod("Multiplier:NearbyCorpse", "BASE", val, "Config", { type = "Condition", var = "Combat" })
11101110
end },
1111-
{ var = "multiplierSummonedMinion", type = "count", label = "# of Summoned Minions:", ifMult = "SummonedMinion", apply = function(val, modList, enemyModList)
1112-
modList:NewMod("Multiplier:SummonedMinion", "BASE", val, "Config", { type = "Condition", var = "Combat" })
1111+
{ var = "multiplierSummonedMinion", type = "count", label = "# of Summoned Minions (if not maximum):", ifMult = "SummonedMinion", tooltip = "Use this to override the count if you do not have all your minions summoned", apply = function(val, modList, enemyModList)
1112+
modList:NewMod("Multiplier:SummonedMinion", "OVERRIDE", val, "Config", { type = "Condition", var = "Combat" })
11131113
end },
1114-
{ var = "multiplierNonVaalSummonedMinion", type = "count", label = "# of non-vaal skill Summoned Minions:", ifMult = "NonVaalSummonedMinion", apply = function(val, modList, enemyModList)
1115-
modList:NewMod("Multiplier:NonVaalSummonedMinion", "BASE", val, "Config", { type = "Condition", var = "Combat" })
1114+
{ var = "multiplierNonVaalSummonedMinion", type = "count", label = "# of non-vaal skill Summoned Minions:", ifMult = "NonVaalSummonedMinion", tooltip = "Use this to override the count if you do not have all your minions summoned", apply = function(val, modList, enemyModList)
1115+
modList:NewMod("Multiplier:NonVaalSummonedMinion", "OVERRIDE", val, "Config", { type = "Condition", var = "Combat" })
11161116
end },
11171117
{ var = "conditionOnConsecratedGround", type = "check", label = "Are you on Consecrated Ground?", tooltip = "In addition to allowing any 'while on Consecrated Ground' modifiers to apply,\nConsecrated Ground grants 5% ^xE05030Life ^7Regeneration to players and allies.", apply = function(val, modList, enemyModList)
11181118
modList:NewMod("Condition:OnConsecratedGround", "FLAG", true, "Config", { type = "Condition", var = "Combat" })

0 commit comments

Comments
 (0)