Skip to content
Open
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
45 changes: 45 additions & 0 deletions spec/System/TestAspectEffect_spec.lua
Original file line number Diff line number Diff line change
@@ -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)
6 changes: 3 additions & 3 deletions src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
3 changes: 3 additions & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading