Skip to content

Commit dd8004a

Browse files
authored
add support for Items Implicits Cannot Be Changed (#8243)
1 parent e72ba81 commit dd8004a

File tree

4 files changed

+26
-8
lines changed

4 files changed

+26
-8
lines changed

src/Classes/Item.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,9 @@ function ItemClass:ParseRaw(raw, rarity, highQuality)
739739
end
740740

741741
local lineLower = line:lower()
742-
if lineLower:match(" prefix modifiers? allowed") then
742+
if lineLower == "implicit modifiers cannot be changed" then
743+
self.implicitsCannotBeChanged = true
744+
elseif lineLower:match(" prefix modifiers? allowed") then
743745
self.prefixes.limit = (self.prefixes.limit or 0) + (tonumber(lineLower:match("%+(%d+) prefix modifiers? allowed")) or 0) - (tonumber(lineLower:match("%-(%d+) prefix modifiers? allowed")) or 0)
744746
elseif lineLower:match(" suffix modifiers? allowed") then
745747
self.suffixes.limit = (self.suffixes.limit or 0) + (tonumber(lineLower:match("%+(%d+) suffix modifiers? allowed")) or 0) - (tonumber(lineLower:match("%-(%d+) suffix modifiers? allowed")) or 0)

src/Classes/ItemsTab.lua

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,10 @@ holding Shift will put it in the second.]])
492492
self:AddImplicitToDisplayItem()
493493
end)
494494
self.controls.displayItemAddImplicit.shown = function()
495-
return self.displayItem and self.displayItem.type ~= "Tincture" and (self.displayItem.corruptible or ((self.displayItem.type ~= "Flask" or self.displayItem.type ~= "Jewel") and (self.displayItem.rarity == "NORMAL" or self.displayItem.rarity == "MAGIC" or self.displayItem.rarity == "RARE")))
495+
return self.displayItem and
496+
self.displayItem.type ~= "Tincture" and (self.displayItem.corruptible or ((self.displayItem.type ~= "Flask" and self.displayItem.type ~= "Jewel") and
497+
(self.displayItem.rarity == "NORMAL" or self.displayItem.rarity == "MAGIC" or self.displayItem.rarity == "RARE"))) and
498+
not self.displayItem.implicitsCannotBeChanged
496499
end
497500

498501
-- Section: Influence dropdowns
@@ -2423,8 +2426,13 @@ function ItemsTabClass:CorruptDisplayItem(modType)
24232426
currentModType = "ScourgeUpside"
24242427
buildImplicitList("ScourgeUpside")
24252428
buildImplicitList("ScourgeDownside")
2426-
controls.implicit3Label.shown = true
2429+
controls.implicit.shown = true
2430+
controls.implicitLabel.shown = true
2431+
controls.implicit2.shown = true
2432+
controls.implicit2Label.shown = true
24272433
controls.implicit3.shown = true
2434+
controls.implicit3Label.shown = true
2435+
controls.implicitCannotBeChangedLabel.shown = false
24282436
main.popups[1].height = 147
24292437
controls.close.y = 117
24302438
controls.save.y = 117
@@ -2440,10 +2448,15 @@ function ItemsTabClass:CorruptDisplayItem(modType)
24402448
buildList(controls.implicit4, controls.implicit3, "ScourgeDownside")
24412449
else
24422450
currentModType = value
2451+
controls.implicit.shown = not self.displayItem.implicitsCannotBeChanged
2452+
controls.implicitLabel.shown = not self.displayItem.implicitsCannotBeChanged
2453+
controls.implicit2.shown = not self.displayItem.implicitsCannotBeChanged
2454+
controls.implicit2Label.shown = not self.displayItem.implicitsCannotBeChanged
24432455
controls.implicit3Label.shown = false
24442456
controls.implicit3.shown = false
24452457
controls.implicit4Label.shown = false
24462458
controls.implicit4.shown = false
2459+
controls.implicitCannotBeChangedLabel.shown = self.displayItem.implicitsCannotBeChanged
24472460
controls.implicit2.y = 65
24482461
main.popups[1].height = 129
24492462
controls.close.y = 99
@@ -2470,6 +2483,8 @@ function ItemsTabClass:CorruptDisplayItem(modType)
24702483
self:AddModComparisonTooltip(tooltip, value.mod)
24712484
end
24722485
end
2486+
controls.implicit.shown = not self.displayItem.implicitsCannotBeChanged
2487+
controls.implicitLabel.shown = not self.displayItem.implicitsCannotBeChanged
24732488
controls.implicit2Label = new("LabelControl", {"TOPRIGHT",nil,"TOPLEFT"}, 75, 65, 0, 16, "^7Implicit #2:")
24742489
controls.implicit2 = new("DropDownControl", {"TOPLEFT",nil,"TOPLEFT"}, 80, 65, 440, 18, nil, function()
24752490
buildList(controls.implicit, controls.implicit2, currentModType)
@@ -2483,6 +2498,8 @@ function ItemsTabClass:CorruptDisplayItem(modType)
24832498
self:AddModComparisonTooltip(tooltip, value.mod)
24842499
end
24852500
end
2501+
controls.implicit2.shown = not self.displayItem.implicitsCannotBeChanged
2502+
controls.implicit2Label.shown = not self.displayItem.implicitsCannotBeChanged
24862503
controls.implicit3Label = new("LabelControl", {"TOPRIGHT",nil,"TOPLEFT"}, 75, 85, 0, 16, "^7Implicit #3:")
24872504
controls.implicit3 = new("DropDownControl", {"TOPLEFT",nil,"TOPLEFT"}, 80, 65, 440, 18, nil, function()
24882505
buildList(controls.implicit4, controls.implicit3, "ScourgeDownside")
@@ -2513,6 +2530,8 @@ function ItemsTabClass:CorruptDisplayItem(modType)
25132530
end
25142531
controls.implicit4Label.shown = false
25152532
controls.implicit4.shown = false
2533+
controls.implicitCannotBeChangedLabel = new("LabelControl", {"TOPLEFT",nil,"TOPLEFT"}, 20, 45, 0, 20, "^7This Items Implicits Cannot Be Changed")
2534+
controls.implicitCannotBeChangedLabel.shown = self.displayItem.implicitsCannotBeChanged
25162535
buildList(controls.implicit, controls.implicit2, currentModType)
25172536
buildList(controls.implicit2, controls.implicit, currentModType)
25182537
controls.save = new("ButtonControl", nil, -45, 99, 80, 20, modType, function()

src/Data/ModCache.lua

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8781,11 +8781,7 @@ c["Impales you inflict last 2 additional Hits while using Pride"]={{[1]={[1]={ty
87818781
c["Implicit Modifier magnitudes are doubled"]={nil,"Implicit Modifier magnitudes are doubled "}
87828782
c["Implicit Modifier magnitudes are tripled"]={nil,"Implicit Modifier magnitudes are tripled "}
87838783
c["Implicit Modifier magnitudes are tripled Corrupted"]={nil,"Implicit Modifier magnitudes are tripled Corrupted "}
8784-
c["Implicit Modifiers Cannot Be Changed"]={nil,"Implicit Modifiers Cannot Be Changed "}
8785-
c["Implicit Modifiers Cannot Be Changed 100% increased Explicit Modifier magnitudes"]={nil,"Implicit Modifiers Cannot Be Changed 100% increased Explicit Modifier magnitudes "}
8786-
c["Implicit Modifiers Cannot Be Changed 25% increased Prefix Modifier magnitudes"]={nil,"Implicit Modifiers Cannot Be Changed 25% increased Prefix Modifier magnitudes "}
8787-
c["Implicit Modifiers Cannot Be Changed 25% increased Suffix Modifier magnitudes"]={nil,"Implicit Modifiers Cannot Be Changed 25% increased Suffix Modifier magnitudes "}
8788-
c["Implicit Modifiers Cannot Be Changed Has Elder, Shaper and all Conqueror Influences"]={nil,"Implicit Modifiers Cannot Be Changed Has Elder, Shaper and all Conqueror Influences "}
8784+
c["Implicit Modifiers Cannot Be Changed"]={{},nil}
87898785
c["Increases and Reductions to Armour also apply to Energy"]={nil,"Increases and Reductions to Armour also apply to Energy "}
87908786
c["Increases and Reductions to Armour also apply to Energy Shield Recharge Rate at 20% of their value"]={{[1]={flags=0,keywordFlags=0,name="ArmourAppliesToEnergyShieldRecharge",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="ImprovedArmourAppliesToEnergyShieldRecharge",type="MAX",value=20}},nil}
87918787
c["Increases and Reductions to Cast Speed also Apply to Trap Throwing Speed"]={{[1]={flags=0,keywordFlags=0,name="CastSpeedAppliesToTrapThrowingSpeed",type="FLAG",value=true}},nil}

src/Modules/ModParser.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5093,6 +5093,7 @@ local specialModList = {
50935093
["can have a second enchantment modifier"] = { },
50945094
["can have (%d+) additional enchantment modifiers"] = { },
50955095
["this item can be anointed by cassia"] = { },
5096+
["implicit modifiers cannot be changed"] = { },
50965097
["has a crucible passive skill tree"] = { },
50975098
["has a two handed sword crucible passive skill tree"] = { },
50985099
["has a crucible passive skill tree with only support passive skills"] = { },

0 commit comments

Comments
 (0)