diff --git a/spec/System/TestItemMods_spec.lua b/spec/System/TestItemMods_spec.lua index 0265f145473..d6cb59a222d 100644 --- a/spec/System/TestItemMods_spec.lua +++ b/spec/System/TestItemMods_spec.lua @@ -435,6 +435,17 @@ describe("TetsItemMods", function() end) end + it("Main Hand Weapon Red and Green Socket line needs both sockets", function() + for _, sockets in ipairs({ "R-G", "R-B", "G-B" }) do + local item = new("Item"):Item("Rarity: RARE\nTest Sword\nLion Sword\nSockets: " .. sockets .. "\nImplicits: 0\n30% increased Armour and Evasion Rating if your Main Hand Weapon has a Red and Green Socket") + build.itemsTab:AddItem(item, true) + build.itemsTab.slots["Weapon 1"]:SetSelItemId(item.id) + build.buildFlag = true + runCallback("OnFrame") + assert.are.equals(sockets == "R-G" and 30 or 0, build.calcsTab.mainEnv.player.modDB:Sum("INC", nil, "ArmourAndEvasion")) + end + end) + for _, wording in ipairs({ "Enemy", "Enemy Monster" }) do it("Triumvirate Authority ignores physical reduction only for socketed Vaal skills with '" .. wording .. "' wording", function() build.itemsTab:CreateDisplayItemFromRaw("Triumvirate Authority\nUnset Ring\nSockets: G\nHits from Socketed Vaal Skills ignore " .. wording .. " Physical Damage Reduction") diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index fec5aa0ebd9..5fe6d521262 100755 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -8378,7 +8378,7 @@ c["30% increased Armour and Energy Shield"]={{[1]={flags=0,keywordFlags=0,name=" c["30% increased Armour and Evasion"]={{[1]={flags=0,keywordFlags=0,name="ArmourAndEvasion",type="INC",value=30}},nil} c["30% increased Armour and Evasion Rating during Onslaught"]={{[1]={[1]={type="Condition",var="Onslaught"},flags=0,keywordFlags=0,name="ArmourAndEvasion",type="INC",value=30}},nil} c["30% increased Armour and Evasion Rating if your Main Hand Weapon"]={{[1]={[1]={type="Condition",var="MainHandAttack"},[2]={skillType=1,type="SkillType"},flags=8192,keywordFlags=0,name="ArmourAndEvasion",type="INC",value=30}}," if your "} -c["30% increased Armour and Evasion Rating if your Main Hand Weapon has a Red and Green Socket"]={{[1]={[1]={type="Condition",var="MainHandAttack"},[2]={skillType=1,type="SkillType"},flags=8192,keywordFlags=0,name="ArmourAndEvasion",type="INC",value=30}}," if your has a Red and Green Socket "} +c["30% increased Armour and Evasion Rating if your Main Hand Weapon has a Red and Green Socket"]={{[1]={[1]={threshold=1,type="MultiplierThreshold",var="RedSocketInWeapon 1"},[2]={threshold=1,type="MultiplierThreshold",var="GreenSocketInWeapon 1"},flags=0,keywordFlags=0,name="ArmourAndEvasion",type="INC",value=30}},nil} c["30% increased Armour and Evasion Rating while Fortified"]={{[1]={[1]={type="Condition",var="Fortified"},flags=0,keywordFlags=0,name="ArmourAndEvasion",type="INC",value=30}},nil} c["30% increased Armour from Equipped Helmet and Gloves"]={{[1]={[1]={slotNameList={[1]="Helmet",[2]="Gloves"},type="SlotName"},flags=0,keywordFlags=0,name="Armour",type="INC",value=30}},nil} c["30% increased Armour if you have been Hit Recently"]={{[1]={[1]={type="Condition",var="BeenHitRecently"},flags=0,keywordFlags=0,name="Armour",type="INC",value=30}},nil} @@ -23241,7 +23241,6 @@ c["has a 20% increased angle With at least 40 Strength in Radius, Ground Slam"]= c["has a 35% increased angle"]={nil,"has a 35% increased angle "} c["has a 35% increased angle With at least 40 Strength in Radius, Ground Slam"]={nil,"has a 35% increased angle With at least 40 Strength in Radius, Ground Slam "} c["has a 50% increased angle"]={nil,"has a 50% increased angle "} -c["has a Red and Green Socket"]={nil,"has a Red and Green Socket "} c["have 100% reduced Life Regeneration Rate"]={nil,"100% reduced Life Regeneration Rate "} c["have fewer than 5 Poisons on you"]={nil,"fewer than 5 Poisons on you "} c["more than once every 0.3 seconds"]={nil,"more than once every 0.3 seconds "} diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 5b751d0aa7f..c08546e908e 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -1644,6 +1644,7 @@ local modTagList = { ["if both equipped ([%a%s]+) have a?n? ?([%a%s]+) modifiers?"] = function (_, itemSlotName, conditionSubstring) return { tag = { type = "ItemCondition", searchCond = conditionSubstring, itemSlot = itemSlotName:sub(1, #itemSlotName - 1), bothSlots = true } } end, ["if both equipped left and right ([%a%s]+) have a?n? ?([%a%s]+) modifiers?"] = function (_, itemSlotName, conditionSubstring) return { tag = { type = "ItemCondition", searchCond = conditionSubstring, itemSlot = itemSlotName:sub(1, #itemSlotName - 1), bothSlots = true } } end, ["if your equipped staff has a red and blue socket"] = { tagList = { { type = "MultiplierThreshold", var = "RedSocketInWeapon 1", threshold = 1 }, { type = "MultiplierThreshold", var = "BlueSocketInWeapon 1", threshold = 1 }, { type = "Condition", var = "UsingStaff" } } }, + ["if your main hand weapon has a red and green socket"] = { tagList = { { type = "MultiplierThreshold", var = "RedSocketInWeapon 1", threshold = 1 }, { type = "MultiplierThreshold", var = "GreenSocketInWeapon 1", threshold = 1 } } }, ["if there are no ([%a%s]+) modifiers on equipped ([%a%s]+)"] = function (_, conditionSubstring, itemSlotName) return { tag = { type = "ItemCondition", searchCond = conditionSubstring, itemSlot = itemSlotName, neg = true } } end, ["if there are no (%a+) modifiers on other equipped items"] = function(_, conditionSubstring) return {tag = { type = "ItemCondition", searchCond = conditionSubstring, itemSlot = "{SlotName}", allSlots = true, excludeSelf = true, neg = true }} end, ["if corrupted"] = {tag = { type = "ItemCondition", itemSlot = "{SlotName}", corruptedCond = true}},