Skip to content

Commit

Permalink
Fix support for Serle's Masterwork
Browse files Browse the repository at this point in the history
  • Loading branch information
Regisle committed Aug 21, 2024
1 parent 5ab3101 commit 8f6a0c3
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 7 deletions.
6 changes: 5 additions & 1 deletion src/Classes/Item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -744,13 +744,17 @@ function ItemClass:ParseRaw(raw, rarity, highQuality)
self.canHaveTwoEnchants = true
elseif lineLower == "can have 1 additional enchantment modifiers" then
self.canHaveTwoEnchants = true
elseif lineLower == "can have 2 additional enchantment modifiers" then
elseif lineLower == "can have 2 additional enchantment modifiers" or lineLower == "can have 2 additional runesmithing enchantments" then
self.canHaveTwoEnchants = true
self.canHaveThreeEnchants = true
elseif lineLower == "can have 3 additional enchantment modifiers" then
self.canHaveTwoEnchants = true
self.canHaveThreeEnchants = true
self.canHaveFourEnchants = true
elseif lineLower == "can be enchanted by a kalguuran runesmith" then
self.canHaveRunesmithEnchant = true
elseif lineLower == "can be runesmithed as though it were all one handed melee weapon types" then

Check warning on line 756 in src/Classes/Item.lua

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (runesmithed)
self.canHaveAllOneHandedMeleeRunesmithEnchant = true
elseif lineLower == "has a crucible passive skill tree with only support passive skills" then
self.canHaveOnlySupportSkillsCrucibleTree = true
elseif lineLower == "has a crucible passive skill tree" then
Expand Down
5 changes: 4 additions & 1 deletion src/Classes/ItemsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2088,6 +2088,9 @@ function ItemsTabClass:EnchantDisplayItem(enchantSlot)

local controls = { }
local enchantments = self.displayItem.enchantments
if self.displayItem.canHaveAllOneHandedMeleeRunesmithEnchant then
enchantments = data.enchantments["AllOneHandMelee"]
end
local haveSkills = true
for _, source in ipairs(self.build.data.enchantmentSource) do
if self.displayItem.enchantments[source.name] then
Expand Down Expand Up @@ -2124,7 +2127,7 @@ function ItemsTabClass:EnchantDisplayItem(enchantSlot)
wipeTable(enchantmentSourceList)
local list = haveSkills and enchantments[skillList[controls.skill and controls.skill.selIndex or 1]] or enchantments
for _, source in ipairs(self.build.data.enchantmentSource) do
if list[source.name] then
if list[source.name] and (source.name ~= "RUNESMITH" or (self.displayItem.rarity ~= "UNIQUE" and self.displayItem.rarity ~= "RELIC") or self.displayItem.canHaveRunesmithEnchant) then
t_insert(enchantmentSourceList, source)
end
end
Expand Down
6 changes: 3 additions & 3 deletions src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7334,13 +7334,13 @@ c["Can Allocate Passives from the Templar's starting point"]={{},nil}
c["Can Allocate Passives from the Witch's starting point"]={{},nil}
c["Can Consume 4 Support Gems"]={nil,"Can Consume 4 Support Gems "}
c["Can Consume 4 Support Gems Has not Consumed any Gems"]={nil,"Can Consume 4 Support Gems Has not Consumed any Gems "}
c["Can be Enchanted by a Kalguuran Runesmith"]={nil,"Can be Enchanted by a Kalguuran Runesmith "}
c["Can be Enchanted by a Kalguuran Runesmith"]={{},nil}
c["Can be Runesmithed as though it were all One Handed Melee Weapon Types"]={{},nil}
c["Can be modified while Corrupted"]={nil,"Can be modified while Corrupted "}
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 "}
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 "}
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}
c["Can have 2 additional Runesmithing Enchantments"]={nil,"Can have 2 additional Runesmithing Enchantments "}
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 "}
c["Can have 2 additional Runesmithing Enchantments"]={{},nil}
c["Can have 3 additional Enchantment Modifiers"]={{},nil}
c["Can have 5 fewer Traps placed at a time"]={{[1]={flags=0,keywordFlags=0,name="ActiveTrapLimit",type="BASE",value=-5}},nil}
c["Can have a second Enchantment Modifier"]={{},nil}
Expand Down
3 changes: 2 additions & 1 deletion src/Data/Uniques/Special/New.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ Implicits: 1
+(30-40) to Dexterity
(150-250)% increased Physical Damage
+(400-500) to Accuracy Rating
Can have 2 additional Runesmithing Enchantments
Can be Enchanted by a Kalguuran Runesmith
Can have 2 additional Runesmithing Enchantments
Can be Runesmithed as though it were all One Handed Melee Weapon Types

Check warning on line 101 in src/Data/Uniques/Special/New.lua

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (Runesmithed)
]],[[
Kaom's Command
Siege Helmet
Expand Down
18 changes: 17 additions & 1 deletion src/Modules/Data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,23 @@ do
end
end
end
end
end
data.enchantments["AllOneHandMelee"] = { }
for enchantmentType, enchantmentList in pairs(data.enchantments["Weapon"]) do
if type(enchantmentList[1]) == "string" then
data.enchantments["AllOneHandMelee"][enchantmentType] = enchantmentList
elseif type(enchantmentList[1]) == "table" then
data.enchantments["AllOneHandMelee"][enchantmentType] = {}
for _, enchantment in ipairs(enchantmentList) do
for baseType, baseData in pairs(data.weaponTypeInfo) do
if baseData.melee and baseData.oneHand and enchantment.types[baseType] then
t_insert(data.enchantments["AllOneHandMelee"][enchantmentType], table.concat(enchantment, "/"))
break
end
end
end
end
end
end
data.essences = LoadModule("Data/Essence")
data.veiledMods = LoadModule("Data/ModVeiled")
Expand Down
3 changes: 3 additions & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5087,6 +5087,9 @@ local specialModList = {
["you can have two different banners at the same time"] = { },
["can have a second enchantment modifier"] = { },
["can have (%d+) additional enchantment modifiers"] = { },
["can have (%d+) additional runesmithing enchantments"] = { },
["can be enchanted by a kalguuran runesmith"] = { },
["can be runesmithed as though it were all one handed melee weapon types"] = { },

Check warning on line 5092 in src/Modules/ModParser.lua

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (runesmithed)
["this item can be anointed by cassia"] = { },
["has a crucible passive skill tree"] = { },
["has a two handed sword crucible passive skill tree"] = { },
Expand Down

0 comments on commit 8f6a0c3

Please sign in to comment.