Skip to content

Commit c46b403

Browse files
authored
Support Uniques with Extra Crucible Mod Tags (#6104)
* add off-tag mods to crucible dropdown pool for certain uniques * move list to data * access data directly
1 parent afdda35 commit c46b403

File tree

2 files changed

+53
-2
lines changed

2 files changed

+53
-2
lines changed

src/Classes/ItemsTab.lua

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2610,18 +2610,25 @@ function ItemsTabClass:AddCrucibleModifierToDisplayItem()
26102610
return table.concat(label, "/")
26112611
end
26122612
local function itemCanHaveMod(mod)
2613-
local keyMap = { }
2613+
local keyMap, includeTags = { }, { }
26142614
for index, key in ipairs(mod.weightKey) do
26152615
keyMap[key] = index
26162616
end
2617+
-- check for uniques with off-tag mods
2618+
if data.casterTagCrucibleUniques[self.displayItem.title] then
2619+
includeTags["caster_unique_weapon"] = true
2620+
end
2621+
if data.minionTagCrucibleUniques[self.displayItem.title] then
2622+
includeTags["minion_unique_weapon"] = true
2623+
end
26172624
if self.displayItem.canHaveOnlySupportSkillsCrucibleTree then
26182625
return keyMap["crucible_unique_staff"] and mod.weightVal[keyMap["crucible_unique_staff"]] ~= 0
26192626
elseif self.displayItem.canHaveShieldCrucibleTree then
26202627
return self.displayItem:GetModSpawnWeight(mod, { ["crucible_unique_helmet"] = true, ["shield"] = true }) > 0
26212628
elseif self.displayItem.canHaveTwoHandedSwordCrucibleTree then
26222629
return self.displayItem:GetModSpawnWeight(mod, { ["two_hand_weapon"] = true }, { ["one_hand_weapon"] = true }) > 0
26232630
end
2624-
return self.displayItem:GetModSpawnWeight(mod) > 0
2631+
return self.displayItem:GetModSpawnWeight(mod, includeTags) > 0
26252632
end
26262633
local function buildCrucibleMods()
26272634
for i, mod in pairs(self.build.data.crucible) do

src/Modules/Data.lua

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,50 @@ data.misc = { -- magic numbers
509509
}
510510
}
511511

512+
data.casterTagCrucibleUniques = {
513+
["Atziri's Rule"] = true,
514+
["Cane of Kulemak"] = true,
515+
["Cane of Unravelling"] = true,
516+
["Cospri's Malice"] = true,
517+
["Cybil's Paw"] = true,
518+
["Disintegrator"] = true,
519+
["Duskdawn"] = true,
520+
["Geofri's Devotion"] = true,
521+
["Mjolner"] = true,
522+
["Pledge of Hands"] = true,
523+
["Soulwrest"] = true,
524+
["Taryn's Shiver"] = true,
525+
["The Rippling Thoughts"] = true,
526+
["The Surging Thoughts"] = true,
527+
["The Whispering Ice"] = true,
528+
["Tremor Rod"] = true,
529+
["Xirgil's Crank"] = true,
530+
}
531+
data.minionTagCrucibleUniques = {
532+
["Arakaali's Fang"] = true,
533+
["Ashcaller"] = true,
534+
["Chaber Cairn"] = true,
535+
["Chober Chaber"] = true,
536+
["Clayshaper"] = true,
537+
["Earendel's Embrace"] = true,
538+
["Femurs of the Saints"] = true,
539+
["Jorrhast's Blacksteel"] = true,
540+
["Law of the Wilds"] = true,
541+
["Midnight Bargain"] = true,
542+
["Mon'tregul's Grasp"] = true,
543+
["Null's Inclination"] = true,
544+
["Queen's Decree"] = true,
545+
["Queen's Escape"] = true,
546+
["Replica Earendel's Embrace"] = true,
547+
["Replica Midnight Bargain"] = true,
548+
["Severed in Sleep"] = true,
549+
["Soulwrest"] = true,
550+
["The Black Cane"] = true,
551+
["The Iron Mass"] = true,
552+
["The Scourge"] = true,
553+
["United in Dream"] = true,
554+
}
555+
512556
-- Load bosses
513557
do
514558
data.bosses = { }

0 commit comments

Comments
 (0)