Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Items Implicits Cannot Be Changed #8243

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Classes/Item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,9 @@ function ItemClass:ParseRaw(raw, rarity, highQuality)
end

local lineLower = line:lower()
if lineLower:match(" prefix modifiers? allowed") then
if lineLower == "implicit modifiers cannot be changed" then
self.implicitsCannotBeChanged = true
elseif lineLower:match(" prefix modifiers? allowed") then
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)
elseif lineLower:match(" suffix modifiers? allowed") then
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)
Expand Down
23 changes: 21 additions & 2 deletions src/Classes/ItemsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,10 @@ holding Shift will put it in the second.]])
self:AddImplicitToDisplayItem()
end)
self.controls.displayItemAddImplicit.shown = function()
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")))
return self.displayItem and
self.displayItem.type ~= "Tincture" and (self.displayItem.corruptible or ((self.displayItem.type ~= "Flask" and self.displayItem.type ~= "Jewel") and
(self.displayItem.rarity == "NORMAL" or self.displayItem.rarity == "MAGIC" or self.displayItem.rarity == "RARE"))) and
not self.displayItem.implicitsCannotBeChanged
end

-- Section: Influence dropdowns
Expand Down Expand Up @@ -2423,8 +2426,13 @@ function ItemsTabClass:CorruptDisplayItem(modType)
currentModType = "ScourgeUpside"
buildImplicitList("ScourgeUpside")
buildImplicitList("ScourgeDownside")
controls.implicit3Label.shown = true
controls.implicit.shown = true
controls.implicitLabel.shown = true
controls.implicit2.shown = true
controls.implicit2Label.shown = true
controls.implicit3.shown = true
controls.implicit3Label.shown = true
controls.implicitCannotBeChangedLabel.shown = false
main.popups[1].height = 147
controls.close.y = 117
controls.save.y = 117
Expand All @@ -2440,10 +2448,15 @@ function ItemsTabClass:CorruptDisplayItem(modType)
buildList(controls.implicit4, controls.implicit3, "ScourgeDownside")
else
currentModType = value
controls.implicit.shown = not self.displayItem.implicitsCannotBeChanged
controls.implicitLabel.shown = not self.displayItem.implicitsCannotBeChanged
controls.implicit2.shown = not self.displayItem.implicitsCannotBeChanged
controls.implicit2Label.shown = not self.displayItem.implicitsCannotBeChanged
controls.implicit3Label.shown = false
controls.implicit3.shown = false
controls.implicit4Label.shown = false
controls.implicit4.shown = false
controls.implicitCannotBeChangedLabel.shown = self.displayItem.implicitsCannotBeChanged
controls.implicit2.y = 65
main.popups[1].height = 129
controls.close.y = 99
Expand All @@ -2470,6 +2483,8 @@ function ItemsTabClass:CorruptDisplayItem(modType)
self:AddModComparisonTooltip(tooltip, value.mod)
end
end
controls.implicit.shown = not self.displayItem.implicitsCannotBeChanged
controls.implicitLabel.shown = not self.displayItem.implicitsCannotBeChanged
controls.implicit2Label = new("LabelControl", {"TOPRIGHT",nil,"TOPLEFT"}, 75, 65, 0, 16, "^7Implicit #2:")
controls.implicit2 = new("DropDownControl", {"TOPLEFT",nil,"TOPLEFT"}, 80, 65, 440, 18, nil, function()
buildList(controls.implicit, controls.implicit2, currentModType)
Expand All @@ -2483,6 +2498,8 @@ function ItemsTabClass:CorruptDisplayItem(modType)
self:AddModComparisonTooltip(tooltip, value.mod)
end
end
controls.implicit2.shown = not self.displayItem.implicitsCannotBeChanged
controls.implicit2Label.shown = not self.displayItem.implicitsCannotBeChanged
controls.implicit3Label = new("LabelControl", {"TOPRIGHT",nil,"TOPLEFT"}, 75, 85, 0, 16, "^7Implicit #3:")
controls.implicit3 = new("DropDownControl", {"TOPLEFT",nil,"TOPLEFT"}, 80, 65, 440, 18, nil, function()
buildList(controls.implicit4, controls.implicit3, "ScourgeDownside")
Expand Down Expand Up @@ -2513,6 +2530,8 @@ function ItemsTabClass:CorruptDisplayItem(modType)
end
controls.implicit4Label.shown = false
controls.implicit4.shown = false
controls.implicitCannotBeChangedLabel = new("LabelControl", {"TOPLEFT",nil,"TOPLEFT"}, 20, 45, 0, 20, "^7This Items Implicits Cannot Be Changed")
controls.implicitCannotBeChangedLabel.shown = self.displayItem.implicitsCannotBeChanged
buildList(controls.implicit, controls.implicit2, currentModType)
buildList(controls.implicit2, controls.implicit, currentModType)
controls.save = new("ButtonControl", nil, -45, 99, 80, 20, modType, function()
Expand Down
6 changes: 1 addition & 5 deletions src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8781,11 +8781,7 @@ c["Impales you inflict last 2 additional Hits while using Pride"]={{[1]={[1]={ty
c["Implicit Modifier magnitudes are doubled"]={nil,"Implicit Modifier magnitudes are doubled "}
c["Implicit Modifier magnitudes are tripled"]={nil,"Implicit Modifier magnitudes are tripled "}
c["Implicit Modifier magnitudes are tripled Corrupted"]={nil,"Implicit Modifier magnitudes are tripled Corrupted "}
c["Implicit Modifiers Cannot Be Changed"]={nil,"Implicit Modifiers Cannot Be Changed "}
c["Implicit Modifiers Cannot Be Changed 100% increased Explicit Modifier magnitudes"]={nil,"Implicit Modifiers Cannot Be Changed 100% increased Explicit Modifier magnitudes "}
c["Implicit Modifiers Cannot Be Changed 25% increased Prefix Modifier magnitudes"]={nil,"Implicit Modifiers Cannot Be Changed 25% increased Prefix Modifier magnitudes "}
c["Implicit Modifiers Cannot Be Changed 25% increased Suffix Modifier magnitudes"]={nil,"Implicit Modifiers Cannot Be Changed 25% increased Suffix Modifier magnitudes "}
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 "}
c["Implicit Modifiers Cannot Be Changed"]={{},nil}
c["Increases and Reductions to Armour also apply to Energy"]={nil,"Increases and Reductions to Armour also apply to Energy "}
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}
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}
Expand Down
1 change: 1 addition & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5093,6 +5093,7 @@ local specialModList = {
["can have a second enchantment modifier"] = { },
["can have (%d+) additional enchantment modifiers"] = { },
["this item can be anointed by cassia"] = { },
["implicit modifiers cannot be changed"] = { },
["has a crucible passive skill tree"] = { },
["has a two handed sword crucible passive skill tree"] = { },
["has a crucible passive skill tree with only support passive skills"] = { },
Expand Down
Loading