Skip to content

Commit 119ba2b

Browse files
LocalIdentityLocalIdentity
andauthored
Fix Forbidden Flesh / Flame jewels not working with Assassins new nodes (#9300)
The jewels didn't work for Ascendancy nodes that are multiple choice. Had to make sure that the scion nodes were still excluded though Also changed the jewels to be sorted alphabetically now so it's easier to look through the variants list Co-authored-by: LocalIdentity <[email protected]>
1 parent 265a2b4 commit 119ba2b

File tree

3 files changed

+49
-22
lines changed

3 files changed

+49
-22
lines changed

src/Classes/PassiveTree.lua

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -521,22 +521,34 @@ local PassiveTreeClass = newClass("PassiveTree", function(self, treeVersion)
521521
end
522522
else
523523
self.ascendancyMap[node.dn:lower()] = node
524-
if not self.classNotables[self.ascendNameMap[node.ascendancyName].class.name] then
525-
self.classNotables[self.ascendNameMap[node.ascendancyName].class.name] = { }
524+
local className = self.ascendNameMap[node.ascendancyName].class.name
525+
if not self.classNotables[className] then
526+
self.classNotables[className] = { }
526527
end
527-
if self.ascendNameMap[node.ascendancyName].class.name ~= "Scion" then
528-
t_insert(self.classNotables[self.ascendNameMap[node.ascendancyName].class.name], node.dn)
528+
if className ~= "Scion" then
529+
t_insert(self.classNotables[className], node.dn)
529530
end
530531
end
531532
else
532533
node.type = "Normal"
533-
if node.ascendancyName == "Ascendant" and not node.dn:find("Dexterity") and not node.dn:find("Intelligence") and
534-
not node.dn:find("Strength") and not node.dn:find("Passive") then
534+
if node.ascendancyName == "Ascendant" and not node.isMultipleChoiceOption and not node.dn:find("Dexterity")
535+
and not node.dn:find("Intelligence") and not node.dn:find("Strength") and not node.dn:find("Passive") then
536+
local className = self.ascendNameMap[node.ascendancyName].class.name
535537
self.ascendancyMap[node.dn:lower()] = node
536-
if not self.classNotables[self.ascendNameMap[node.ascendancyName].class.name] then
537-
self.classNotables[self.ascendNameMap[node.ascendancyName].class.name] = { }
538+
if not self.classNotables[className] then
539+
self.classNotables[className] = { }
540+
end
541+
t_insert(self.classNotables[className], node.dn)
542+
end
543+
if node.isMultipleChoiceOption and node.ascendancyName then
544+
local className = self.ascendNameMap[node.ascendancyName].class.name
545+
if className ~= "Scion" then
546+
self.ascendancyMap[node.dn:lower()] = node
547+
if not self.classNotables[className] then
548+
self.classNotables[className] = { }
549+
end
550+
t_insert(self.classNotables[className], node.dn)
538551
end
539-
t_insert(self.classNotables[self.ascendNameMap[node.ascendancyName].class.name], node.dn)
540552
end
541553
end
542554

src/Data/ModCache.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7290,6 +7290,8 @@ c["Allocates First to Strike, Last to Fall if you have the matching modifier on
72907290
c["Allocates First to Strike, Last to Fall if you have the matching modifier on Forbidden Flesh"]={{[1]={flags=0,keywordFlags=0,name="GrantedAscendancyNode",type="LIST",value={name="first to strike, last to fall",side="flesh"}}},nil}
72917291
c["Allocates Focal Point if you have the matching modifier on Forbidden Flame"]={{[1]={flags=0,keywordFlags=0,name="GrantedAscendancyNode",type="LIST",value={name="focal point",side="flame"}}},nil}
72927292
c["Allocates Focal Point if you have the matching modifier on Forbidden Flesh"]={{[1]={flags=0,keywordFlags=0,name="GrantedAscendancyNode",type="LIST",value={name="focal point",side="flesh"}}},nil}
7293+
c["Allocates For the Jugular if you have the matching modifier on Forbidden Flame"]={{[1]={flags=0,keywordFlags=0,name="GrantedAscendancyNode",type="LIST",value={name="for the jugular",side="flame"}}},nil}
7294+
c["Allocates For the Jugular if you have the matching modifier on Forbidden Flesh"]={{[1]={flags=0,keywordFlags=0,name="GrantedAscendancyNode",type="LIST",value={name="for the jugular",side="flesh"}}},nil}
72937295
c["Allocates Forbidden Power if you have the matching modifier on Forbidden Flame"]={{[1]={flags=0,keywordFlags=0,name="GrantedAscendancyNode",type="LIST",value={name="forbidden power",side="flame"}}},nil}
72947296
c["Allocates Forbidden Power if you have the matching modifier on Forbidden Flesh"]={{[1]={flags=0,keywordFlags=0,name="GrantedAscendancyNode",type="LIST",value={name="forbidden power",side="flesh"}}},nil}
72957297
c["Allocates Fortitude if you have the matching modifier on Forbidden Flame"]={{[1]={flags=0,keywordFlags=0,name="GrantedAscendancyNode",type="LIST",value={name="fortitude",side="flame"}}},nil}
@@ -7344,6 +7346,8 @@ c["Allocates Jagged Technique if you have the matching modifier on Forbidden Fla
73447346
c["Allocates Jagged Technique if you have the matching modifier on Forbidden Flesh"]={{[1]={flags=0,keywordFlags=0,name="GrantedAscendancyNode",type="LIST",value={name="jagged technique",side="flesh"}}},nil}
73457347
c["Allocates Juggernaut if you have the matching modifier on Forbidden Flame"]={{[1]={flags=0,keywordFlags=0,name="GrantedAscendancyNode",type="LIST",value={name="juggernaut",side="flame"}}},nil}
73467348
c["Allocates Juggernaut if you have the matching modifier on Forbidden Flesh"]={{[1]={flags=0,keywordFlags=0,name="GrantedAscendancyNode",type="LIST",value={name="juggernaut",side="flesh"}}},nil}
7349+
c["Allocates Knife in the Back if you have the matching modifier on Forbidden Flame"]={{[1]={flags=0,keywordFlags=0,name="GrantedAscendancyNode",type="LIST",value={name="knife in the back",side="flame"}}},nil}
7350+
c["Allocates Knife in the Back if you have the matching modifier on Forbidden Flesh"]={{[1]={flags=0,keywordFlags=0,name="GrantedAscendancyNode",type="LIST",value={name="knife in the back",side="flesh"}}},nil}
73477351
c["Allocates Lesson of the Seasons if you have the matching modifier on Forbidden Flame"]={{[1]={flags=0,keywordFlags=0,name="GrantedAscendancyNode",type="LIST",value={name="lesson of the seasons",side="flame"}}},nil}
73487352
c["Allocates Lesson of the Seasons if you have the matching modifier on Forbidden Flesh"]={{[1]={flags=0,keywordFlags=0,name="GrantedAscendancyNode",type="LIST",value={name="lesson of the seasons",side="flesh"}}},nil}
73497353
c["Allocates Liege of the Primordial if you have the matching modifier on Forbidden Flame"]={{[1]={flags=0,keywordFlags=0,name="GrantedAscendancyNode",type="LIST",value={name="liege of the primordial",side="flame"}}},nil}
@@ -10939,12 +10943,16 @@ c["Requires Class Shadow Allocates Demolitions Specialist if you have the matchi
1093910943
c["Requires Class Shadow Allocates Demolitions Specialist if you have the matching modifier on Forbidden Flesh"]={nil,"Requires Class Shadow Allocates Demolitions Specialist if you have the matching modifier on Forbidden Flesh "}
1094010944
c["Requires Class Shadow Allocates Escape Artist if you have the matching modifier on Forbidden Flame"]={nil,"Requires Class Shadow Allocates Escape Artist if you have the matching modifier on Forbidden Flame "}
1094110945
c["Requires Class Shadow Allocates Escape Artist if you have the matching modifier on Forbidden Flesh"]={nil,"Requires Class Shadow Allocates Escape Artist if you have the matching modifier on Forbidden Flesh "}
10946+
c["Requires Class Shadow Allocates For the Jugular if you have the matching modifier on Forbidden Flame"]={nil,"Requires Class Shadow Allocates For the Jugular if you have the matching modifier on Forbidden Flame "}
10947+
c["Requires Class Shadow Allocates For the Jugular if you have the matching modifier on Forbidden Flesh"]={nil,"Requires Class Shadow Allocates For the Jugular if you have the matching modifier on Forbidden Flesh "}
1094210948
c["Requires Class Shadow Allocates Harness the Void if you have the matching modifier on Forbidden Flame"]={nil,"Requires Class Shadow Allocates Harness the Void if you have the matching modifier on Forbidden Flame "}
1094310949
c["Requires Class Shadow Allocates Harness the Void if you have the matching modifier on Forbidden Flesh"]={nil,"Requires Class Shadow Allocates Harness the Void if you have the matching modifier on Forbidden Flesh "}
1094410950
c["Requires Class Shadow Allocates Heartstopper if you have the matching modifier on Forbidden Flame"]={nil,"Requires Class Shadow Allocates Heartstopper if you have the matching modifier on Forbidden Flame "}
1094510951
c["Requires Class Shadow Allocates Heartstopper if you have the matching modifier on Forbidden Flesh"]={nil,"Requires Class Shadow Allocates Heartstopper if you have the matching modifier on Forbidden Flesh "}
1094610952
c["Requires Class Shadow Allocates Infused Toxins if you have the matching modifier on Forbidden Flame"]={nil,"Requires Class Shadow Allocates Infused Toxins if you have the matching modifier on Forbidden Flame "}
1094710953
c["Requires Class Shadow Allocates Infused Toxins if you have the matching modifier on Forbidden Flesh"]={nil,"Requires Class Shadow Allocates Infused Toxins if you have the matching modifier on Forbidden Flesh "}
10954+
c["Requires Class Shadow Allocates Knife in the Back if you have the matching modifier on Forbidden Flame"]={nil,"Requires Class Shadow Allocates Knife in the Back if you have the matching modifier on Forbidden Flame "}
10955+
c["Requires Class Shadow Allocates Knife in the Back if you have the matching modifier on Forbidden Flesh"]={nil,"Requires Class Shadow Allocates Knife in the Back if you have the matching modifier on Forbidden Flesh "}
1094810956
c["Requires Class Shadow Allocates Like Clockwork if you have the matching modifier on Forbidden Flame"]={nil,"Requires Class Shadow Allocates Like Clockwork if you have the matching modifier on Forbidden Flame "}
1094910957
c["Requires Class Shadow Allocates Like Clockwork if you have the matching modifier on Forbidden Flesh"]={nil,"Requires Class Shadow Allocates Like Clockwork if you have the matching modifier on Forbidden Flesh "}
1095010958
c["Requires Class Shadow Allocates Mistwalker if you have the matching modifier on Forbidden Flame"]={nil,"Requires Class Shadow Allocates Mistwalker if you have the matching modifier on Forbidden Flame "}

src/Data/Uniques/Special/Generated.lua

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -734,13 +734,20 @@ function buildForbidden(classNotables)
734734
table.insert(forbidden[name], "Rarity: UNIQUE")
735735
table.insert(forbidden[name], "Forbidden " .. name)
736736
table.insert(forbidden[name], (name == "Flame" and "Crimson" or "Cobalt") .. " Jewel")
737+
local classList = { }
738+
for className in pairs(classNotables) do
739+
if className ~= "alternate_ascendancies" then
740+
table.insert(classList, className)
741+
end
742+
end
743+
table.sort(classList)
737744
local index = 1
738-
for className, notableTable in pairs(classNotables) do
739-
if className ~= "alternate_ascendancies" then --Remove Affliction Ascendancy's
740-
for _, notableName in ipairs(notableTable) do
741-
table.insert(forbidden[name], "Variant: (" .. className .. ") " .. notableName)
742-
index = index + 1
743-
end
745+
for _, className in ipairs(classList) do
746+
local notableTable = classNotables[className]
747+
table.sort(notableTable)
748+
for _, notableName in ipairs(notableTable) do
749+
table.insert(forbidden[name], "Variant: (" .. className .. ") " .. notableName)
750+
index = index + 1
744751
end
745752
end
746753
if name == "Flame" then
@@ -751,13 +758,13 @@ function buildForbidden(classNotables)
751758
table.insert(forbidden[name], "Limited to: 1")
752759
table.insert(forbidden[name], "Item Level: 83")
753760
index = 1
754-
for className, notableTable in pairs(classNotables) do
755-
if className ~= "alternate_ascendancies" then --Remove Affliction Ascendancy's
756-
for _, notableName in ipairs(notableTable) do
757-
table.insert(forbidden[name], "{variant:" .. index .. "}" .. "Requires Class " .. className)
758-
table.insert(forbidden[name], "{variant:" .. index .. "}" .. "Allocates ".. notableName .. " if you have the matching modifier on Forbidden " .. (name == "Flame" and "Flesh" or "Flame"))
759-
index = index + 1
760-
end
761+
for _, className in ipairs(classList) do
762+
local notableTable = classNotables[className]
763+
table.sort(notableTable)
764+
for _, notableName in ipairs(notableTable) do
765+
table.insert(forbidden[name], "{variant:" .. index .. "}" .. "Requires Class " .. className)
766+
table.insert(forbidden[name], "{variant:" .. index .. "}" .. "Allocates ".. notableName .. " if you have the matching modifier on Forbidden " .. (name == "Flame" and "Flesh" or "Flame"))
767+
index = index + 1
761768
end
762769
end
763770
table.insert(forbidden[name], "Corrupted")

0 commit comments

Comments
 (0)