diff --git a/spec/System/TestAspectEffect_spec.lua b/spec/System/TestAspectEffect_spec.lua new file mode 100644 index 0000000000..7deaa96cc8 --- /dev/null +++ b/spec/System/TestAspectEffect_spec.lua @@ -0,0 +1,45 @@ +describe("TestAspectEffect", function() + for _, case in ipairs({ + { base = "Craicic Talisman", aspect = "Crab", effect = "Buff" }, + { base = "Farric Talisman", aspect = "Cat", effect = "Buff" }, + { base = "Fenumal Talisman", aspect = "Spider", effect = "Debuff" }, + }) do + it("parses the base enchant of " .. case.base, function() + local item = new("Item"):Item("Rarity: Normal\n" .. case.base) + local mods, extra = modLib.parseMod(item.enchantModLines[1].line) + assert.is_nil(extra) + assert.are.equals(case.effect .. "Effect", mods[1].name) + assert.are.same({ type = "SkillName", skillName = "Aspect of the " .. case.aspect }, mods[1][1]) + end) + end + + it("scales Crab damage reduction", function() + newBuild() + build.itemsTab:CreateDisplayItemFromRaw("Rarity: Rare\nTest\nCraicic Talisman\nImplicits: 0\nGrants Level 20 Aspect of the Crab Skill") + build.itemsTab:AddDisplayItem() + build.configTab.input.overrideCrabBarriers = 3 + build.configTab:BuildModList() + runCallback("OnFrame") + assert.are.equals(12, build.calcsTab.mainOutput.PhysicalDamageReduction) + end) + + it("scales Cat critical strike chance", function() + newBuild() + build.itemsTab:CreateDisplayItemFromRaw("Rarity: Rare\nTest\nFarric Talisman\nImplicits: 0\nGrants Level 20 Aspect of the Cat Skill") + build.itemsTab:AddDisplayItem() + build.configTab.input.aspectOfTheCatCatsStealth = true + build.configTab:BuildModList() + runCallback("OnFrame") + assert.are.equals(200, build.calcsTab.mainEnv.player.modDB:Sum("INC", nil, "CritChance")) + end) + + it("scales Spider damage taken", function() + newBuild() + build.itemsTab:CreateDisplayItemFromRaw("Rarity: Rare\nTest\nFenumal Talisman\nImplicits: 0\nGrants Level 20 Aspect of the Spider Skill") + build.itemsTab:AddDisplayItem() + build.configTab.input.aspectOfTheSpiderWebStacks = 2 + build.configTab:BuildModList() + runCallback("OnFrame") + assert.are.equals(20, build.calcsTab.mainEnv.enemy.modDB:Sum("INC", nil, "DamageTaken")) + end) +end) diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index c0ba5d2363..c743dd550b 100755 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -4111,9 +4111,9 @@ c["100% increased Armour and Energy Shield from Equipped Body Armour if Equipped c["100% increased Armour and Evasion"]={{[1]={flags=0,keywordFlags=0,name="ArmourAndEvasion",type="INC",value=100}},nil} c["100% increased Armour from Equipped Boots and Gloves"]={{[1]={[1]={slotNameList={[1]="Gloves",[2]="Boots"},type="SlotName"},flags=0,keywordFlags=0,name="Armour",type="INC",value=100}},nil} c["100% increased Aspect of the Avian Buff Effect"]={{[1]={[1]={skillName="Aspect of the Avian",type="SkillName"},flags=0,keywordFlags=0,name="BuffEffect",type="INC",value=100}},nil} -c["100% increased Aspect of the Cat Buff Effect"]={{[1]={flags=0,keywordFlags=0,name="BuffEffect",type="INC",value=100}}," Aspect of the Cat "} -c["100% increased Aspect of the Crab Buff Effect"]={{[1]={flags=0,keywordFlags=0,name="BuffEffect",type="INC",value=100}}," Aspect of the Crab "} -c["100% increased Aspect of the Spider Debuff Effect"]={{[1]={flags=0,keywordFlags=0,name="BuffEffect",type="INC",value=100}}," Aspect of the Spider De "} +c["100% increased Aspect of the Cat Buff Effect"]={{[1]={[1]={skillName="Aspect of the Cat",type="SkillName"},flags=0,keywordFlags=0,name="BuffEffect",type="INC",value=100}},nil} +c["100% increased Aspect of the Crab Buff Effect"]={{[1]={[1]={skillName="Aspect of the Crab",type="SkillName"},flags=0,keywordFlags=0,name="BuffEffect",type="INC",value=100}},nil} +c["100% increased Aspect of the Spider Debuff Effect"]={{[1]={[1]={skillName="Aspect of the Spider",type="SkillName"},flags=0,keywordFlags=0,name="DebuffEffect",type="INC",value=100}},nil} c["100% increased Attack Critical Strike Chance while Dual Wielding"]={{[1]={[1]={type="Condition",var="DualWielding"},flags=1,keywordFlags=0,name="CritChance",type="INC",value=100}},nil} c["100% increased Attack Damage"]={{[1]={flags=1,keywordFlags=0,name="Damage",type="INC",value=100}},nil} c["100% increased Attack Speed"]={{[1]={flags=1,keywordFlags=0,name="Speed",type="INC",value=100}},nil} diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 9d5d1db3a0..fc678100b4 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -494,6 +494,9 @@ local modNameList = { ["effect of withered"] = "WitherEffect", ["warcry effect"] = { "BuffEffect", keywordFlags = KeywordFlag.Warcry }, ["aspect of the avian buff effect"] = { "BuffEffect", tag = { type = "SkillName", skillName = "Aspect of the Avian" } }, + ["aspect of the cat buff effect"] = { "BuffEffect", tag = { type = "SkillName", skillName = "Aspect of the Cat" } }, + ["aspect of the crab buff effect"] = { "BuffEffect", tag = { type = "SkillName", skillName = "Aspect of the Crab" } }, + ["aspect of the spider debuff effect"] = { "DebuffEffect", tag = { type = "SkillName", skillName = "Aspect of the Spider" } }, ["maximum rage"] = "MaximumRage", ["minimum rage"] = "MinimumRage", ["rage effect"] = "RageEffect",