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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions spec/System/TestTriggers_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1409,4 +1409,36 @@ describe("TestTriggers", function()
runCallback("OnFrame")
assert.are.not_equals(math.floor(build.calcsTab.mainOutput.SkillTriggerRate * 100), math.floor(baseRate * 100))
end)

it("skillId config search", function()
build.itemsTab:CreateDisplayItemFromRaw([[Rarity: RARE
Physical 1H Mace
Boom Mace
Crafted: true
Prefix: {range:0.5}LocalIncreasedPhysicalDamagePercent5
Prefix: {range:0.5}LocalIncreasedPhysicalDamagePercentAndAccuracyRating5
Prefix: {range:0.5}LocalAddedPhysicalDamage6
Suffix: {range:0.5}LocalIncreasedAttackSpeed3
Suffix: {range:0.5}LocalCriticalStrikeChance3
Suffix: {range:0.5}LocalCriticalMultiplier4
Quality: 20
Sockets: R-R-R
LevelReq: 70
Implicits: 1
Trigger Level 20 Fiery Impact on Melee Hit with this Weapon
172% increased Physical Damage
Adds 16 to 29 Physical Damage
12% increased Attack Speed
22% increased Critical Strike Chance
+27% to Global Critical Strike Multiplier
+111 to Accuracy Rating]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")

build.skillsTab:PasteSocketGroup("Smite 20/0 1\n")
runCallback("OnFrame")

local baseRate = build.calcsTab.mainOutput.SkillTriggerRate
assert.True(build.calcsTab.mainOutput.SkillTriggerRate ~= nil)
end)
end)
10 changes: 9 additions & 1 deletion src/Modules/CalcTriggers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1540,6 +1540,12 @@ local configTable = {
return {source = env.player.mainSkill}
end
end,
["TriggeredMoltenStrike"] = function(env)
return {triggerSkillCond = function(env, skill) return (skill.skillTypes[SkillType.Melee] or skill.skillTypes[SkillType.Attack]) end}
end,
["FieryImpactHeistMaceImplicit"] = function(env)
return {triggerSkillCond = function(env, skill) return (skill.skillTypes[SkillType.Melee] or skill.skillTypes[SkillType.Attack]) end}
end,
}

-- Find unique item trigger name
Expand Down Expand Up @@ -1569,7 +1575,9 @@ function calcs.triggers(env, actor)
local triggerNameLower = triggerName and triggerName:lower()
local awakenedTriggerNameLower = triggerNameLower and triggerNameLower:gsub("^awakened ", "")
local uniqueNameLower = uniqueName and uniqueName:lower()
local config = skillNameLower and configTable[skillNameLower] and configTable[skillNameLower](env)
local skillId = actor.mainSkill.activeEffect.grantedEffect.id
local config = skillId and configTable[skillId] and configTable[skillId](env)
config = config or skillNameLower and configTable[skillNameLower] and configTable[skillNameLower](env)
config = config or triggerNameLower and configTable[triggerNameLower] and configTable[triggerNameLower](env)
config = config or awakenedTriggerNameLower and configTable[awakenedTriggerNameLower] and configTable[awakenedTriggerNameLower](env)
config = config or uniqueNameLower and configTable[uniqueNameLower] and configTable[uniqueNameLower](env)
Expand Down
1 change: 1 addition & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3201,6 +3201,7 @@ local specialModList = {
["trigger level (%d+) (.+) when you lose cat's stealth"] = function(num, _, skill) return triggerExtraSkill(skill, num) end,
["trigger level (%d+) (.+) when your trap is triggered"] = function(num, _, skill) return triggerExtraSkill(skill, num) end,
["trigger level (%d+) (.+) on hit with this weapon"] = function(num, _, skill) return triggerExtraSkill(skill, num) end,
["trigger level (%d+) (.+) on melee hit"] = function(num, _, skill) return triggerExtraSkill(skill, num) end,
["trigger level (%d+) (.+) on melee hit while cursed"] = function(num, _, skill) return triggerExtraSkill(skill, num) end,
["trigger level (%d+) (.+) on melee hit with this weapon"] = function(num, _, skill) return triggerExtraSkill(skill, num) end,
["trigger level (%d+) (.+) every [%d%.]+ seconds while phasing"] = function(num, _, skill) return triggerExtraSkill(skill, num) end,
Expand Down
Loading