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
41 changes: 41 additions & 0 deletions spec/System/TestItemMods_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,45 @@ describe("TetsItemMods", function()
assert.are_not.equals(120, build.calcsTab.mainOutput.Armour)
runCallback("OnFrame")
end)
it("liminal coil", function()
build.itemsTab:CreateDisplayItemFromRaw([[
Rarity: UNIQUE
Liminal Coil Test
Acrid Wand
Quality: 20
Sockets: S S S
Rune: None
Rune: None
Rune: None
LevelReq: 41
Implicits: 0
Magnitudes of Curses you inflict are zero
Curses you inflict ignore Curse Limit
Spell Hits Gain 27% of Damage as Extra Chaos Damage per Curse on Target
Spell Hits Gain 27% of Damage as Extra Physical Damage per Curse on Target
]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
build.skillsTab:PasteSocketGroup("Fireball 20/0 1")
runCallback("OnFrame")

local basePhys = round(build.calcsTab.mainOutput.PhysicalStoredCombinedAvg)
local baseChaos = round(build.calcsTab.mainOutput.ChaosStoredCombinedAvg)

build.skillsTab:PasteSocketGroup("Elemental Weakness 20/0 1")
runCallback("OnFrame")
local afterEleWeaknessPhys = round(build.calcsTab.mainOutput.PhysicalStoredCombinedAvg)
local afterEleWeaknessChaos = round(build.calcsTab.mainOutput.ChaosStoredCombinedAvg)
-- curses increase damage
assert.are_not.equals(basePhys, afterEleWeaknessPhys)
assert.are_not.equals(basePhys, afterEleWeaknessChaos)

build.skillsTab:PasteSocketGroup("Enfeeble 20/0 1")
runCallback("OnFrame")
local afterEnfeeblePhys = round(build.calcsTab.mainOutput.PhysicalStoredCombinedAvg)
local afterEnfeebleChaos = round(build.calcsTab.mainOutput.ChaosStoredCombinedAvg)
-- more curse more dmg
assert.are_not.equals(afterEleWeaknessPhys, afterEnfeeblePhys)
assert.are_not.equals(afterEleWeaknessChaos, afterEnfeebleChaos)
end)
end)
5 changes: 5 additions & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3588,6 +3588,9 @@ local specialModList = {
mod("DamageGainAsCold", "BASE", num),
mod("DamageGainAsFire", "BASE", num),
} end,
["spell hits gain (%d+)%% of damage as extra (%a+) damage per curse on target"] = function(num, _, damageType) return {
mod("DamageGainAs"..firstToUpper(damageType), "BASE", num, nil, ModFlag.Spell, { type = "Multiplier", var = "CurseOnEnemy" }),
} end, -- Liminal Coil
["gain (%d+)%% of weapon physical damage as extra damage of an? r?a?n?d?o?m? ?element"] = function(num) return { mod("PhysicalDamageGainAsRandom", "BASE", num, nil, ModFlag.Weapon) } end,
["gain (%d+)%% of physical damage as extra damage of a random element"] = function(num) return { mod("PhysicalDamageGainAsRandom", "BASE", num ) } end,
["(%d+)%% chance for hits to deal (%d+)%% of physical damage as extra damage of a random element"] = function(num, _, physPercent) return { mod("PhysicalDamageGainAsRandom", "BASE", (num*physPercent/100) ) } end,
Expand Down Expand Up @@ -4170,6 +4173,8 @@ local specialModList = {
["you can apply an additional curse while affected by malevolence"] = { mod("EnemyCurseLimit", "BASE", 1, { type = "Condition", var = "AffectedByMalevolence" }) },
["you can apply an additional curse while at maximum power charges"] = { mod("EnemyCurseLimit", "BASE", 1, { type = "StatThreshold", stat = "PowerCharges", thresholdStat = "PowerChargesMax" }) },
["you can apply one fewer curse"] = { mod("EnemyCurseLimit", "BASE", -1) },
["curses you inflict ignore curse limit"] = { mod("EnemyCurseLimit", "BASE", 99) },
["magnitudes of curses you inflict are zero"] = { mod("CurseEffect", "MORE", -100) },
["you can apply an additional mark"] = { mod("EnemyMarkLimit", "BASE", 1) },
["double activation delay of curses"] = { mod("CurseDelay", "MORE", 100) },
["curses have no activation delay"] = { mod("CurseDelay", "MORE", -100) },
Expand Down
Loading