diff --git a/spec/System/TestItemMods_spec.lua b/spec/System/TestItemMods_spec.lua index f4ce0c5903..d784cf5fc2 100644 --- a/spec/System/TestItemMods_spec.lua +++ b/spec/System/TestItemMods_spec.lua @@ -91,6 +91,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 c0ba5d2363..c2c5fe1bfb 100755 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -8166,7 +8166,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 if you have been Hit Recently"]={{[1]={[1]={type="Condition",var="BeenHitRecently"},flags=0,keywordFlags=0,name="Armour",type="INC",value=30}},nil} c["30% increased Armour while you have Unbroken Ward"]={{[1]={[1]={type="Condition",var="UnbrokenWard"},flags=0,keywordFlags=0,name="Armour",type="INC",value=30}},nil} @@ -23173,7 +23173,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 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 "} c["more than once every 0.3 seconds Lose all Defiance when you reach 10 Defiance"]={nil,"more than once every 0.3 seconds Lose all Defiance when you reach 10 Defiance "} diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 9d5d1db3a0..1a0d2ecda2 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -1634,6 +1634,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}},