Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion spec/System/TestAttacks_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe("TestAttacks", function()
-- Test against Quarterstaff Strike (skill slot 1)
build.skillsTab:PasteSocketGroup("Quarterstaff Strike 1/0 1\nArmour Break I 1/0 1\nShock 1/0 1\nBiting Frost I 1/0 1")
runCallback("OnFrame")
build.skillsTab:PasteSocketGroup("Falling Thunder 1/0 1\nIgnite I 1/0 1\nDaze 1/0 1\nShock Conduction I 1/0 1")
build.skillsTab:PasteSocketGroup("Falling Thunder 1/0 1\nIgnite I 1/0 1\nDaze 1/0 1\nShock Conduction 1/0 1")
runCallback("OnFrame")

build.configTab:BuildModList()
Expand Down
6 changes: 3 additions & 3 deletions spec/System/TestItemMods_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -493,16 +493,16 @@ describe("TetsItemMods", function()
build.itemsTab:CreateDisplayItemFromRaw([[
Rarity: RARE
Armour Chest
Glorious Plate
Armour: 534
Champion Cuirass
Armour: 526
Crafted: true
Prefix: None
Prefix: None
Prefix: None
Suffix: None
Suffix: None
Suffix: None
Quality: 0
Quality: 18
LevelReq: 65
Implicits: 0
]])
Expand Down
19 changes: 19 additions & 0 deletions spec/System/TestItemParse_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,25 @@ describe("TestItemParse", function()
assert.are.equals("40f9711d5bd7ad2bcbddaf71c705607aef0eecd3dcadaafec6c0192f79b82863", item.uniqueID)
end)

it("Unique ID line is not parsed as a modifier", function()
local item = new("Item", [[
Rarity: Unique
Evergrasping Ring
Pearl Ring
Unique ID: 5d96bc922c2ae073676c4149a2ecf0ebd0951f213ef894895bd2afe206845539
Item Level: 66
LevelReq: 32
Implicits: 1
7% increased Cast Speed
+91 to maximum Mana
Allies in your Presence Gain 22% of Damage as Extra Chaos Damage
Enemies in your Presence Gain 8% of Damage as Extra Chaos Damage
]])

assert.are.equals("5d96bc922c2ae073676c4149a2ecf0ebd0951f213ef894895bd2afe206845539", item.uniqueID)
assert.are.equals(3, #item.explicitModLines)
end)

it("Item Level", function()
local item = new("Item", raw("Item Level: 10"))
assert.are.equals(10, item.itemLevel)
Expand Down
44 changes: 43 additions & 1 deletion spec/System/TestSkills_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,27 @@ describe("TestSkills", function()
-- newBuild() takes care of resetting everything in setup()
end)

local function selectActiveSkillById(socketGroup, skillId)
local socketGroupIndex
for index, group in ipairs(build.skillsTab.socketGroupList) do
if group == socketGroup then
socketGroupIndex = index
break
end
end
for index, activeSkill in ipairs(socketGroup.displaySkillList) do
if activeSkill.activeEffect.grantedEffect.id == skillId then
build.mainSocketGroup = socketGroupIndex
build.calcsTab.input.skill_number = socketGroupIndex
socketGroup.mainActiveSkill = index
socketGroup.mainActiveSkillCalcs = index
build.buildFlag = true
runCallback("OnFrame")
return activeSkill
end
end
end


it("uses granted effect minion list when active skill minion list is missing", function()
local srcInstance = { statSet = { }, skillPart = { }, nameSpec = "Spectre: Test" }
Expand Down Expand Up @@ -343,6 +364,7 @@ describe("TestSkills", function()
it("Test corrupted blood config", function()
build.skillsTab:PasteSocketGroup("Seismic Cry 20/0 1\nCorrupting Cry I 1/0 1")
runCallback("OnFrame")
selectActiveSkillById(build.skillsTab.socketGroupList[#build.skillsTab.socketGroupList], "TriggeredCorruptingCryPlayer")

local baseCorruptingCryDps = build.calcsTab.mainOutput.CorruptingBloodDPS -- placeholder/input is 10

Expand All @@ -357,6 +379,26 @@ describe("TestSkills", function()
assert.True(baseCorruptingCryDps == build.calcsTab.mainOutput.CorruptingBloodDPS)
end)

it("support-granted active skills inherit the linked active skill level", function()
local function getCorruptingCryDps(socketGroupText)
newBuild()
build.skillsTab:PasteSocketGroup(socketGroupText)
runCallback("OnFrame")

local activeSkill = selectActiveSkillById(build.skillsTab.socketGroupList[#build.skillsTab.socketGroupList], "TriggeredCorruptingCryPlayer")
assert.is_not_nil(activeSkill)
assert.are.equals(20, activeSkill.activeEffect.level)
assert.are.equals("TriggeredCorruptingCryPlayer", build.calcsTab.mainEnv.player.mainSkill.activeEffect.grantedEffect.id)
return build.calcsTab.mainOutput.CorruptingBloodDPS
end

local warcryFirstDps = getCorruptingCryDps("Seismic Cry 20/0 1\nCorrupting Cry I 1/0 1")
local supportFirstDps = getCorruptingCryDps("Corrupting Cry I 1/0 1\nSeismic Cry 20/0 1")

assert.is_not_nil(warcryFirstDps)
assert.are.equals(warcryFirstDps, supportFirstDps)
end)

it("Flame Breath attack speed scales DPS and is not capped by its channel cooldown", function()
build.itemsTab:CreateDisplayItemFromRaw([[
New Item
Expand Down Expand Up @@ -442,7 +484,7 @@ describe("TestSkills", function()

assert.is_not_nil(arcSkill)
assert.are.equals(2, arcSkill.skillModList:GetMultiplier("SupportCount", arcSkill.skillCfg))
assert.are.equals(3, arcSkill.skillModList:Sum("BASE", arcSkill.skillCfg, "GemSupportLevel"))
assert.are.equals(2, arcSkill.skillModList:Sum("BASE", arcSkill.skillCfg, "GemSupportLevel"))
end)

it("Test Elemental Conflux element selection", function()
Expand Down
2 changes: 1 addition & 1 deletion src/Classes/ImportTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ function ImportTabClass:ImportItemsAndSkills(charData)
return charData -- For the wrapper
end

local rarityMap = { [0] = "NORMAL", "MAGIC", "RARE", "UNIQUE", [9] = "RELIC", [10] = "RELIC" }
local rarityMap = { [0] = "NORMAL", "MAGIC", "RARE", "UNIQUE", [9] = "RELIC", [10] = "RELIC", [13] = "RARE" }
local slotMap = { ["Weapon"] = "Weapon 1", ["Offhand"] = "Weapon 2", ["Weapon2"] = "Weapon 1 Swap", ["Offhand2"] = "Weapon 2 Swap", ["Helm"] = "Helmet", ["BodyArmour"] = "Body Armour", ["Gloves"] = "Gloves", ["Boots"] = "Boots", ["Amulet"] = "Amulet", ["Ring"] = "Ring 1", ["Ring2"] = "Ring 2", ["Ring3"] = "Ring 3", ["Belt"] = "Belt", ["IncursionArmLeft"] = "Arm 2", ["IncursionArmRight"] = "Arm 1", ["IncursionLegLeft"] = "Leg 2", ["IncursionLegRight"] = "Leg 1" }

function ImportTabClass:ImportItem(itemData, slotName)
Expand Down
1 change: 1 addition & 0 deletions src/Classes/Item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ function ItemClass:ParseRaw(raw, rarity, highQuality)
if specName then
if specName == "Unique ID" then
self.uniqueID = specVal
goto continue
elseif specName == "Item Level" then
self.itemLevel = specToNumber(specVal)
elseif specName == "Requires Class" then
Expand Down
5 changes: 5 additions & 0 deletions src/Classes/ItemsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2337,6 +2337,11 @@ function ItemsTabClass:CraftItem()
implicitIndex = implicitIndex + 1
end
end
if base.base.variantList then
item.variantList = copyTable(base.base.variantList, true)
item.variant = 1
item.baseLines = { }
end
if base.base.type == "Jewel" and base.base.subType == "Radius" then
item.jewelRadiusLabel = "Small"
end
Expand Down
74 changes: 70 additions & 4 deletions src/Data/Bases/amulet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ itemBases["Lunar Amulet"] = {
type = "Amulet",
tags = { amulet = true, default = true, },
implicit = "+(20-30) to maximum Energy Shield",
implicitModTypes = { { "energy_shield", "defences" }, },
implicitModTypes = { { "defences", "energy_shield" }, },
req = { level = 14, },
}
itemBases["Bloodstone Amulet"] = {
Expand Down Expand Up @@ -76,9 +76,68 @@ itemBases["Pearlescent Amulet"] = {
type = "Amulet",
tags = { amulet = true, default = true, },
implicit = "+(7-10)% to all Elemental Resistances",
implicitModTypes = { { "elemental", "fire", "cold", "lightning", "resistance" }, },
implicitModTypes = { { "cold_resistance", "elemental_resistance", "fire_resistance", "lightning_resistance", "elemental", "fire", "cold", "lightning", "resistance" }, },
req = { level = 30, },
}
itemBases["Veridical Chain"] = {
type = "Amulet",
tags = { amulet = true, default = true, },
implicit = "+(30-40) to maximum Runic Ward",
implicitModTypes = { { "runic_ward" }, },
req = { level = 18, },
}
itemBases["Runemastered Veridical Chain"] = {
type = "Amulet",
tags = { amulet = true, default = true, runeforged = true, },
implicit = "+(30-40) to maximum Runic Ward\n+(2-3)% to Maximum Cold Resistance",
implicitModTypes = { { "runic_ward" }, { "cold_resistance", "elemental_resistance", "elemental", "cold", "resistance" }, },
req = { level = 18, },
}
itemBases["Runemastered Veridical Chain"] = {
type = "Amulet",
tags = { amulet = true, default = true, runeforged = true, },
implicit = "+(30-40) to maximum Runic Ward\n+(1-2) to Level of all Cold Skills",
implicitModTypes = { { "runic_ward" }, { "elemental", "cold", "gem" }, },
req = { level = 18, },
}
itemBases["Runemastered Veridical Chain"] = {
type = "Amulet",
tags = { amulet = true, default = true, runeforged = true, },
implicit = "(15-20)% increased maximum Runic Ward",
implicitModTypes = { { "runic_ward" }, },
req = { },
}
itemBases["Lament Amulet"] = {
type = "Amulet",
tags = { amulet = true, default = true, },
variantList = { "Arctic Armour", "Herald of Ash", "Herald of Ice", "Herald of Thunder", "Plague Bearer", "Barrier Invocation", "Lingering Illusion", "Ghost Dance", "Mana Remnants", "Magma Barrier", "Raging Spirits", "Wind Dancer", "Cast on Minion Death", "Scavenged Plating", "War Banner", "Defiance Banner", "Dread Banner", "Time of Need", "Attrition", "Charge Regulation", "Shard Scavenger", "Overwhelming Presence", "Alchemist's Boon", "Reaper's Invocation", "Berserk", "Herald of Plague", "Herald of Blood", "Withering Presence", "Ravenous Swarm", "Combat Frenzy", "Trail of Caltrops", "Convalescence", "Iron Ward", "Siphon Elements", "Briarpatch", "Savage Fury", "Barkskin", },
implicit = "-1 Prefix Modifier allowed\n{variant:1}Grants Skill: Level (1-20) Arctic Armour\n{variant:2}Grants Skill: Level (1-20) Herald of Ash\n{variant:3}Grants Skill: Level (1-20) Herald of Ice\n{variant:4}Grants Skill: Level (1-20) Herald of Thunder\n{variant:5}Grants Skill: Level (1-20) Plague Bearer\n{variant:6}Grants Skill: Level (1-20) Barrier Invocation\n{variant:7}Grants Skill: Level (1-20) Lingering Illusion\n{variant:8}Grants Skill: Level (1-20) Ghost Dance\n{variant:9}Grants Skill: Level (1-20) Mana Remnants\n{variant:10}Grants Skill: Level (1-20) Magma Barrier\n{variant:11}Grants Skill: Level (1-20) Raging Spirits\n{variant:12}Grants Skill: Level (1-20) Wind Dancer\n{variant:13}Grants Skill: Level (1-20) Cast on Minion Death\n{variant:14}Grants Skill: Level (1-20) Scavenged Plating\n{variant:15}Grants Skill: Level (1-20) War Banner\n{variant:16}Grants Skill: Level (1-20) Defiance Banner\n{variant:17}Grants Skill: Level (1-20) Dread Banner\n{variant:18}Grants Skill: Level (1-20) Time of Need\n{variant:19}Grants Skill: Level (1-20) Attrition\n{variant:20}Grants Skill: Level (1-20) Charge Regulation\n{variant:21}Grants Skill: Level (1-20) Shard Scavenger\n{variant:22}Grants Skill: Level (1-20) Overwhelming Presence\n{variant:23}Grants Skill: Level (1-20) Alchemist's Boon\n{variant:24}Grants Skill: Level (1-20) Reaper's Invocation\n{variant:25}Grants Skill: Level (1-20) Berserk\n{variant:26}Grants Skill: Level (1-20) Herald of Plague\n{variant:27}Grants Skill: Level (1-20) Herald of Blood\n{variant:28}Grants Skill: Level (1-20) Withering Presence\n{variant:29}Grants Skill: Level (1-20) Ravenous Swarm\n{variant:30}Grants Skill: Level (1-20) Combat Frenzy\n{variant:31}Grants Skill: Level (1-20) Trail of Caltrops\n{variant:32}Grants Skill: Level (1-20) Convalescence\n{variant:33}Grants Skill: Level (1-20) Iron Ward\n{variant:34}Grants Skill: Level (1-20) Siphon Elements\n{variant:35}Grants Skill: Level (1-20) Briarpatch\n{variant:36}Grants Skill: Level (1-20) Savage Fury\n{variant:37}Grants Skill: Level (1-20) Barkskin",
implicitModTypes = { { }, },
req = { level = 42, },
}
itemBases["Portent Amulet"] = {
type = "Amulet",
tags = { amulet = true, default = true, },
variantList = { "Wolf Pack", "Blink", "Elemental Invocation", "Elemental Conflux", "Sacrifice", "Mirage Archer", "Feral Invocation", },
implicit = "-1 Suffix Modifier allowed\n{variant:1}Grants Skill: Level (1-20) Wolf Pack\n{variant:2}Grants Skill: Level (1-20) Blink\n{variant:3}Grants Skill: Level (1-20) Elemental Invocation\n{variant:4}Grants Skill: Level (1-20) Elemental Conflux\n{variant:5}Grants Skill: Level (1-20) Sacrifice\n{variant:6}Grants Skill: Level (1-20) Mirage Archer\n{variant:7}Grants Skill: Level (1-20) Feral Invocation",
implicitModTypes = { { }, },
req = { level = 42, },
}
itemBases["Absent Amulet"] = {
type = "Amulet",
tags = { amulet = true, default = true, },
variantList = { "Cast on Elemental Ailment", "Cast on Critical", "Cast on Dodge", "Rhoa Mount", "Archmage", "Trinity", "Eternal Rage", },
implicit = "-1 Prefix Modifier allowed\n-1 Suffix Modifier allowed\n{variant:1}Grants Skill: Level (1-20) Cast on Elemental Ailment\n{variant:2}Grants Skill: Level (1-20) Cast on Critical\n{variant:3}Grants Skill: Level (1-20) Cast on Dodge\n{variant:4}Grants Skill: Level (1-20) Rhoa Mount\n{variant:5}Grants Skill: Level (1-20) Archmage\n{variant:6}Grants Skill: Level (1-20) Trinity\n{variant:7}Grants Skill: Level (1-20) Eternal Rage",
implicitModTypes = { { }, { }, },
req = { level = 49, },
}
itemBases["Corona Amulet"] = {
type = "Amulet",
tags = { amulet = true, default = true, },
implicit = "This item gains bonuses from Socketed Items as though it was a Helmet",
implicitModTypes = { { }, },
req = { level = 40, },
}
itemBases["Dusk Amulet"] = {
type = "Amulet",
tags = { amulet = true, default = true, },
Expand Down Expand Up @@ -107,10 +166,17 @@ itemBases["Tenebrous Amulet"] = {
implicitModTypes = { { }, { }, },
req = { },
}
itemBases["Twisted Amulet"] = {
type = "Amulet",
tags = { amulet = true, default = true, },
implicit = "-1 Prefix Modifier allowed",
implicitModTypes = { { }, },
req = { },
}
itemBases["Distorted Amulet"] = {
type = "Amulet",
tags = { amulet = true, default = true, },
implicit = "-1 Prefix Modifier allowed\n-1 Suffix Modifier allowed",
implicitModTypes = { { }, { }, },
implicit = "-1 Suffix Modifier allowed",
implicitModTypes = { { }, },
req = { },
}
Loading
Loading