Skip to content

Commit 03e4638

Browse files
committed
Bringer of Rain augment as if a body armour
1 parent c905fed commit 03e4638

File tree

4 files changed

+27
-13
lines changed

4 files changed

+27
-13
lines changed

src/Classes/Item.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,6 +1337,9 @@ function ItemClass:UpdateRunes()
13371337
if name and name ~= "None" then
13381338
local baseType = self.base.weapon and "weapon" or self.base.armour and "armour" or (self.base.tags.wand or self.base.tags.staff) and "caster"
13391339
local specificType = self.base.type:lower()
1340+
if self.augmentsAsBodyArmour then
1341+
specificType = "body armour"
1342+
end
13401343
local gatheredMods = getModRunesForTypes(name, baseType, specificType)
13411344
for _, mod in ipairs(gatheredMods) do
13421345
for i, modLine in ipairs(mod) do
@@ -1867,6 +1870,9 @@ function ItemClass:BuildModList()
18671870
baseList:NewMod("ArmourData", "LIST", { key = "EnergyShield", value = 0 })
18681871
self.requirements.int = 0
18691872
end
1873+
if calcLocal(baseList, "AugmentsAsIfBodyArmour", "FLAG", 0) then
1874+
self.augmentsAsBodyArmour = true
1875+
end
18701876
if calcLocal(baseList, "NoAttributeRequirements", "FLAG", 0) then
18711877
self.requirements.strMod = 0
18721878
self.requirements.dexMod = 0

src/Classes/ItemsTab.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,6 +1649,12 @@ function ItemsTabClass:UpdateRuneControls()
16491649
-- Build rune selection for item
16501650
local runes = { }
16511651
for _, rune in pairs(runeModLines) do
1652+
if item.augmentsAsBodyArmour then
1653+
if rune.slot == "None" or rune.slot == "armour" or rune.slot == "body armour" then
1654+
table.insert(runes, rune)
1655+
end
1656+
goto continue
1657+
end
16521658
if rune.slot == "None" or -- Needed "None" for Items Tab
16531659
item.base.type:lower() == rune.slot or
16541660
item.base.type == rune.slot or
@@ -1663,6 +1669,7 @@ function ItemsTabClass:UpdateRuneControls()
16631669
table.insert(runes, rune)
16641670
end
16651671
end
1672+
::continue::
16661673
end
16671674

16681675
for i = 1, item.itemSocketCount do

src/Data/ModCache.lua

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6130,17 +6130,11 @@ c["There is no Limit on the number of Banners you can place"]={nil,"There is no
61306130
c["This Flask cannot be Used but applies its Effect constantly"]={nil,"This Flask cannot be Used but applies its Effect constantly "}
61316131
c["This Flask cannot be Used but applies its Effect constantly 80% reduced Amount Recovered"]={nil,"This Flask cannot be Used but applies its Effect constantly 80% reduced Amount Recovered "}
61326132
c["This Weapon's Critical Hit Chance is 100%"]={{[1]={flags=0,keywordFlags=0,name="WeaponData",type="LIST",value={key="CritChance",value=100}}},nil}
6133-
c["This item gains bonuses from Socketed Items as though it was Boots"]={nil,"This item gains bonuses from Socketed Items as though it was Boots "}
6134-
c["This item gains bonuses from Socketed Items as though it was Boots This item gains bonuses from Socketed Items as though it was Gloves"]={nil,"This item gains bonuses from Socketed Items as though it was Boots This item gains bonuses from Socketed Items as though it was Gloves "}
6135-
c["This item gains bonuses from Socketed Items as though it was Gloves"]={nil,"This item gains bonuses from Socketed Items as though it was Gloves "}
6136-
c["This item gains bonuses from Socketed Items as though it was Gloves This item gains bonuses from Socketed Items as though it was a Helmet"]={nil,"This item gains bonuses from Socketed Items as though it was Gloves This item gains bonuses from Socketed Items as though it was a Helmet "}
6137-
c["This item gains bonuses from Socketed Items as though it was a Body Armour"]={nil,"This item gains bonuses from Socketed Items as though it was a Body Armour "}
6138-
c["This item gains bonuses from Socketed Items as though it was a Body Armour Has 4 Augment Sockets"]={nil,"This item gains bonuses from Socketed Items as though it was a Body Armour Has 4 Augment Sockets "}
6139-
c["This item gains bonuses from Socketed Items as though it was a Body Armour This item gains bonuses from Socketed Items as though it was Boots"]={nil,"This item gains bonuses from Socketed Items as though it was a Body Armour This item gains bonuses from Socketed Items as though it was Boots "}
6140-
c["This item gains bonuses from Socketed Items as though it was a Helmet"]={nil,"This item gains bonuses from Socketed Items as though it was a Helmet "}
6141-
c["This item gains bonuses from Socketed Items as though it was a Helmet This item gains bonuses from Socketed Items as though it was a Shield"]={nil,"This item gains bonuses from Socketed Items as though it was a Helmet This item gains bonuses from Socketed Items as though it was a Shield "}
6142-
c["This item gains bonuses from Socketed Items as though it was a Shield"]={nil,"This item gains bonuses from Socketed Items as though it was a Shield "}
6143-
c["This item gains bonuses from Socketed Items as though it was a Shield 100% increased effect of Socketed Items"]={nil,"This item gains bonuses from Socketed Items as though it was a Shield 100% increased effect of Socketed Items "}
6133+
c["This item gains bonuses from Socketed Items as though it was Boots"]={{[1]={flags=0,keywordFlags=0,name="AugmentsAsIfBoots",type="FLAG",value=true}},nil}
6134+
c["This item gains bonuses from Socketed Items as though it was Gloves"]={{[1]={flags=0,keywordFlags=0,name="AugmentsAsIfGloves",type="FLAG",value=true}},nil}
6135+
c["This item gains bonuses from Socketed Items as though it was a Body Armour"]={{[1]={flags=0,keywordFlags=0,name="AugmentsAsIfBodyArmour",type="FLAG",value=true}},nil}
6136+
c["This item gains bonuses from Socketed Items as though it was a Helmet"]={{[1]={flags=0,keywordFlags=0,name="AugmentsAsIfHelmet",type="FLAG",value=true}},nil}
6137+
c["This item gains bonuses from Socketed Items as though it was a Shield"]={{[1]={flags=0,keywordFlags=0,name="AugmentsAsIfShield",type="FLAG",value=true}},nil}
61446138
c["This item gains bonuses from Socketed Soul Cores as though it was also Boots"]={nil,"This item gains bonuses from Socketed Soul Cores as though it was also Boots "}
61456139
c["This item gains bonuses from Socketed Soul Cores as though it was also Boots This item gains bonuses from Socketed Soul Cores as though it was also Gloves"]={nil,"This item gains bonuses from Socketed Soul Cores as though it was also Boots This item gains bonuses from Socketed Soul Cores as though it was also Gloves "}
61466140
c["This item gains bonuses from Socketed Soul Cores as though it was also Gloves"]={nil,"This item gains bonuses from Socketed Soul Cores as though it was also Gloves "}

src/Modules/ModParser.lua

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3325,8 +3325,15 @@ local specialModList = {
33253325
-- Display only. For Breach Rings.
33263326
},
33273327
["only soul cores can be socketed in this item"] = {
3328-
-- Display only. For Breach Rings.
3329-
},
3328+
-- Display only. For Atziri's Splendour.
3329+
},
3330+
["this item gains bonuses from socketed items as though it was ?a? (%a[%a ]*)"] =
3331+
function(_, type)
3332+
type = type
3333+
:gsub("%f[%a]%a", string.upper) -- uppercase first letter of each word
3334+
:gsub(" ", "")
3335+
return { flag("AugmentsAsIf" .. type) }
3336+
end,
33303337
["has (%d+) sockets?"] = function(num) return { mod("SocketCount", "BASE", num) } end,
33313338
["no physical damage"] = { mod("WeaponData", "LIST", { key = "PhysicalMin" }), mod("WeaponData", "LIST", { key = "PhysicalMax" }), mod("WeaponData", "LIST", { key = "PhysicalDPS" }) },
33323339
["has (%d+)%% increased elemental damage"] = function(num) return { mod("LocalElementalDamage", "INC", num) } end,

0 commit comments

Comments
 (0)