Skip to content

Commit 64e4e4e

Browse files
majochemLocalIdentity
andauthored
Add Support for Necromantic Talisman (#645)
* Add support for Necromantic Talisman * minor change to comments --------- Co-authored-by: majochem <majochem@users.noreply.github.com> Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent bf78e9e commit 64e4e4e

File tree

4 files changed

+16
-26
lines changed

4 files changed

+16
-26
lines changed

src/Data/ModCache.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2133,7 +2133,7 @@ c["All Damage from Hits Contributes to Shock Chance"]={{[1]={flags=0,keywordFlag
21332133
c["All Damage from Hits with this Weapon Contributes to Freeze Buildup"]={nil,"All Damage from Hits with this Weapon Contributes to Freeze Buildup "}
21342134
c["All Damage from Hits with this Weapon Contributes to Freeze Buildup Culling Strike against Frozen Enemies"]={nil,"All Damage from Hits with this Weapon Contributes to Freeze Buildup Culling Strike against Frozen Enemies "}
21352135
c["All Damage is taken from Mana before Life"]={{[1]={flags=0,keywordFlags=0,name="DamageTakenFromManaBeforeLife",type="BASE",value=100}},nil}
2136-
c["All bonuses from an Equipped Amulet apply to your Minions instead of you"]={nil,"All bonuses from an Equipped Amulet apply to your Minions instead of you "}
2136+
c["All bonuses from an Equipped Amulet apply to your Minions instead of you"]={{},nil}
21372137
c["All damage with this Weapon causes Electrocution buildup"]={nil,"All damage with this Weapon causes Electrocution buildup "}
21382138
c["Allies in your Presence Gain 25% of Damage as Extra Fire Damage"]={{[1]={flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageGainAsFire",type="BASE",value=25},onlyAllies=true}}},nil}
21392139
c["Allies in your Presence Gain 30% of Damage as Extra Fire Damage"]={{[1]={flags=0,keywordFlags=0,name="ExtraAura",type="LIST",value={mod={flags=0,keywordFlags=0,name="DamageGainAsFire",type="BASE",value=30},onlyAllies=true}}},nil}

src/Modules/CalcPerform.lua

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ local function doActorAttribsConditions(env, actor)
8585
local condList = modDB.conditions
8686

8787
-- Set conditions
88-
if (actor.itemList["Weapon 2"] and actor.itemList["Weapon 2"].type == "Shield") or (actor == env.player and env.aegisModList) then
88+
if (actor.itemList["Weapon 2"] and actor.itemList["Weapon 2"].type == "Shield") then
8989
condList["UsingShield"] = true
9090
elseif (actor.itemList["Weapon 2"] and actor.itemList["Weapon 2"].type == "Focus") then
9191
condList["UsingFocus"] = true
@@ -829,9 +829,9 @@ function calcs.perform(env, skipEHP)
829829
for _, mod in ipairs(env.player.mainSkill.extraSkillModList) do
830830
env.minion.modDB:AddMod(mod)
831831
end
832-
if env.aegisModList then
833-
env.minion.itemList["Weapon 3"] = env.player.itemList["Weapon 2"]
834-
env.minion.modDB:AddList(env.aegisModList)
832+
if env.talismanModList then
833+
-- Adding mods provided by "Necromantic Talisman"
834+
env.minion.modDB:AddList(env.talismanModList)
835835
end
836836
if env.theIronMass and env.minion.type == "RaisedSkeleton" then
837837
env.minion.modDB:AddList(env.theIronMass)
@@ -880,8 +880,9 @@ function calcs.perform(env, skipEHP)
880880
env.minion.modDB:NewMod("Dex", "BASE", round(calcLib.val(modDB, "Dex")), "Dead can Dance")
881881
end
882882
end
883-
if env.aegisModList then
884-
env.player.itemList["Weapon 2"] = nil
883+
if env.talismanModList then
884+
-- Accounting for "Necromantic Talisman"
885+
env.player.itemList["Amulet"] = nil
885886
end
886887
if modDB:Flag(nil, "AlchemistsGenius") then
887888
local effectMod = 1 + modDB:Sum("INC", nil, "BuffEffectOnSelf") / 100

src/Modules/CalcSetup.lua

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ function wipeEnv(env, accelerate)
331331
wipeTable(env.charms)
332332

333333
-- Special / Unique Items that have their own ModDB()
334-
if env.aegisModList then
335-
wipeTable(env.aegisModList)
334+
if env.talismanModList then
335+
wipeTable(env.talismanModList)
336336
end
337337
if env.theIronMass then
338338
wipeTable(env.theIronMass)
@@ -984,23 +984,12 @@ function calcs.initEnv(build, mode, override, specEnv)
984984
if item.rarity == "UNIQUE" or item.rarity == "RELIC" then env.itemModDB.multipliers["UniqueAbyssJewels"] = (env.itemModDB.multipliers["UniqueAbyssJewels"] or 0) + 1 end
985985
env.itemModDB.multipliers[item.baseName:gsub(" ","")] = (env.itemModDB.multipliers[item.baseName:gsub(" ","")] or 0) + 1
986986
end
987-
if item.type == "Shield" and env.allocNodes[45175] and env.allocNodes[45175].dn == "Necromantic Aegis" then
988-
-- Special handling for Necromantic Aegis
989-
env.aegisModList = new("ModList")
987+
if item.type == "Amulet" and env.allocNodes[39935] and env.allocNodes[39935].dn == "Necromantic Talisman" then
988+
-- Special handling for Necromantic Talisman
989+
env.talismanModList = new("ModList")
990990
for _, mod in ipairs(srcList) do
991-
-- Filter out mods that apply to socketed gems, or which add supports
992-
local add = true
993-
for _, tag in ipairs(mod) do
994-
if tag.type == "SocketedIn" then
995-
add = false
996-
break
997-
end
998-
end
999-
if add then
1000-
env.aegisModList:ScaleAddMod(mod, scale)
1001-
else
1002-
env.itemModDB:ScaleAddMod(mod, scale)
1003-
end
991+
-- add all Amulet mods (no more need to exclude for 'gems socketed in' mods)
992+
env.talismanModList:ScaleAddMod(mod, scale)
1004993
end
1005994
elseif (slotName == "Weapon 1" or slotName == "Weapon 2") and modDB.conditions["AffectedByEnergyBlade"] then
1006995
local previousItem = env.player.itemList[slotName]

src/Modules/ModParser.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2159,7 +2159,7 @@ local specialModList = {
21592159
["leech energy shield instead of life"] = { flag("GhostReaver") },
21602160
["minions explode when reduced to low life, dealing 33%% of their maximum life as fire damage to surrounding enemies"] = { mod("ExtraMinionSkill", "LIST", { skillId = "MinionInstability" }) },
21612161
["minions explode when reduced to low life, dealing 33%% of their life as fire damage to surrounding enemies"] = { mod("ExtraMinionSkill", "LIST", { skillId = "MinionInstability" }) },
2162-
["all bonuses from an equipped shield apply to your minions instead of you"] = { }, -- The node itself is detected by the code that handles it
2162+
["all bonuses from an equipped amulet apply to your minions instead of you"] = { }, -- The node itself is detected by the code that handles it
21632163
["spend energy shield before mana for skill m?a?n?a? ?costs"] = { },
21642164
["you have perfect agony if you've dealt a critical hit recently"] = { mod("Keystone", "LIST", "Perfect Agony", { type = "Condition", var = "CritRecently" }) },
21652165
["energy shield protects mana instead of life"] = { flag("EnergyShieldProtectsMana") },

0 commit comments

Comments
 (0)