Skip to content

Commit 004cefe

Browse files
committed
Fix support for Serle's Masterwork
1 parent 4ec28c3 commit 004cefe

6 files changed

Lines changed: 34 additions & 7 deletions

File tree

src/Classes/Item.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,13 +750,17 @@ function ItemClass:ParseRaw(raw, rarity, highQuality)
750750
self.canHaveTwoEnchants = true
751751
elseif lineLower == "can have 1 additional enchantment modifiers" then
752752
self.canHaveTwoEnchants = true
753-
elseif lineLower == "can have 2 additional enchantment modifiers" then
753+
elseif lineLower == "can have 2 additional enchantment modifiers" or lineLower == "can have 2 additional runesmithing enchantments" then
754754
self.canHaveTwoEnchants = true
755755
self.canHaveThreeEnchants = true
756756
elseif lineLower == "can have 3 additional enchantment modifiers" then
757757
self.canHaveTwoEnchants = true
758758
self.canHaveThreeEnchants = true
759759
self.canHaveFourEnchants = true
760+
elseif lineLower == "can be enchanted by a kalguuran runesmith" then
761+
self.canHaveRunesmithEnchant = true
762+
elseif lineLower == "can be runesmithed as though it were all one handed melee weapon types" then
763+
self.canHaveAllOneHandedMeleeRunesmithEnchant = true
760764
elseif lineLower == "has a crucible passive skill tree with only support passive skills" then
761765
self.canHaveOnlySupportSkillsCrucibleTree = true
762766
elseif lineLower == "has a crucible passive skill tree" then

src/Classes/ItemsTab.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2095,6 +2095,9 @@ function ItemsTabClass:EnchantDisplayItem(enchantSlot)
20952095

20962096
local controls = { }
20972097
local enchantments = self.displayItem.enchantments
2098+
if self.displayItem.canHaveAllOneHandedMeleeRunesmithEnchant then
2099+
enchantments = data.enchantments["AllOneHandMelee"]
2100+
end
20982101
local haveSkills = true
20992102
for _, source in ipairs(self.build.data.enchantmentSource) do
21002103
if self.displayItem.enchantments[source.name] then
@@ -2131,7 +2134,7 @@ function ItemsTabClass:EnchantDisplayItem(enchantSlot)
21312134
wipeTable(enchantmentSourceList)
21322135
local list = haveSkills and enchantments[skillList[controls.skill and controls.skill.selIndex or 1]] or enchantments
21332136
for _, source in ipairs(self.build.data.enchantmentSource) do
2134-
if list[source.name] then
2137+
if list[source.name] and (source.name ~= "RUNESMITH" or (self.displayItem.rarity ~= "UNIQUE" and self.displayItem.rarity ~= "RELIC") or self.displayItem.canHaveRunesmithEnchant) then
21352138
t_insert(enchantmentSourceList, source)
21362139
end
21372140
end

src/Data/ModCache.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7329,13 +7329,13 @@ c["Can Allocate Passives from the Templar's starting point"]={{},nil}
73297329
c["Can Allocate Passives from the Witch's starting point"]={{},nil}
73307330
c["Can Consume 4 Support Gems"]={nil,"Can Consume 4 Support Gems "}
73317331
c["Can Consume 4 Support Gems Has not Consumed any Gems"]={nil,"Can Consume 4 Support Gems Has not Consumed any Gems "}
7332-
c["Can be Enchanted by a Kalguuran Runesmith"]={nil,"Can be Enchanted by a Kalguuran Runesmith "}
7332+
c["Can be Enchanted by a Kalguuran Runesmith"]={{},nil}
7333+
c["Can be Runesmithed as though it were all One Handed Melee Weapon Types"]={{},nil}
73337334
c["Can be modified while Corrupted"]={nil,"Can be modified while Corrupted "}
73347335
c["Can be modified while Corrupted 40% increased maximum Life and reduced Fire Resistance"]={nil,"Can be modified while Corrupted 40% increased maximum Life and reduced Fire Resistance "}
73357336
c["Can be modified while Corrupted Can have up to 5 Implicit Modifiers while Item has this Modifier"]={nil,"Can be modified while Corrupted Can have up to 5 Implicit Modifiers while Item has this Modifier "}
73367337
c["Can have 1 additional Siege Ballista Totem per 200 Dexterity"]={{[1]={[1]={includeTransfigured=true,skillName="Siege Ballista",type="SkillName"},[2]={div=200,stat="Dex",type="PerStat"},flags=0,keywordFlags=0,name="ActiveBallistaLimit",type="BASE",value=1}},nil}
7337-
c["Can have 2 additional Runesmithing Enchantments"]={nil,"Can have 2 additional Runesmithing Enchantments "}
7338-
c["Can have 2 additional Runesmithing Enchantments Can be Enchanted by a Kalguuran Runesmith"]={nil,"Can have 2 additional Runesmithing Enchantments Can be Enchanted by a Kalguuran Runesmith "}
7338+
c["Can have 2 additional Runesmithing Enchantments"]={{},nil}
73397339
c["Can have 3 additional Enchantment Modifiers"]={{},nil}
73407340
c["Can have 5 fewer Traps placed at a time"]={{[1]={flags=0,keywordFlags=0,name="ActiveTrapLimit",type="BASE",value=-5}},nil}
73417341
c["Can have a second Enchantment Modifier"]={{},nil}

src/Data/Uniques/Special/New.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ Implicits: 1
9696
+(30-40) to Dexterity
9797
(150-250)% increased Physical Damage
9898
+(400-500) to Accuracy Rating
99-
Can have 2 additional Runesmithing Enchantments
10099
Can be Enchanted by a Kalguuran Runesmith
100+
Can have 2 additional Runesmithing Enchantments
101+
Can be Runesmithed as though it were all One Handed Melee Weapon Types
101102
]],[[
102103
Kaom's Command
103104
Siege Helmet

src/Modules/Data.lua

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,23 @@ do
574574
end
575575
end
576576
end
577-
end
577+
end
578+
data.enchantments["AllOneHandMelee"] = { }
579+
for enchantmentType, enchantmentList in pairs(data.enchantments["Weapon"]) do
580+
if type(enchantmentList[1]) == "string" then
581+
data.enchantments["AllOneHandMelee"][enchantmentType] = enchantmentList
582+
elseif type(enchantmentList[1]) == "table" then
583+
data.enchantments["AllOneHandMelee"][enchantmentType] = {}
584+
for _, enchantment in ipairs(enchantmentList) do
585+
for baseType, baseData in pairs(data.weaponTypeInfo) do
586+
if baseData.melee and baseData.oneHand and enchantment.types[baseType] then
587+
t_insert(data.enchantments["AllOneHandMelee"][enchantmentType], table.concat(enchantment, "/"))
588+
break
589+
end
590+
end
591+
end
592+
end
593+
end
578594
end
579595
data.essences = LoadModule("Data/Essence")
580596
data.veiledMods = LoadModule("Data/ModVeiled")

src/Modules/ModParser.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5114,6 +5114,9 @@ local specialModList = {
51145114
["[%+%-](%d+) suffix modifiers? allowed"] = { },
51155115
["can have a second enchantment modifier"] = { },
51165116
["can have (%d+) additional enchantment modifiers"] = { },
5117+
["can have (%d+) additional runesmithing enchantments"] = { },
5118+
["can be enchanted by a kalguuran runesmith"] = { },
5119+
["can be runesmithed as though it were all one handed melee weapon types"] = { },
51175120
["this item can be anointed by cassia"] = { },
51185121
["implicit modifiers cannot be changed"] = { },
51195122
["has a crucible passive skill tree"] = { },

0 commit comments

Comments
 (0)