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
7 changes: 2 additions & 5 deletions src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4082,7 +4082,7 @@ c["Breaks Armour equal to 40% of damage from Hits with this weapon"]={nil,"Break
c["Breaks Armour equal to 40% of damage from Hits with this weapon Fully Armour Broken enemies you kill with Hits Shatter"]={nil,"Breaks Armour equal to 40% of damage from Hits with this weapon Fully Armour Broken enemies you kill with Hits Shatter "}
c["Buffs on you expire 10% slower"]={{[1]={[1]={skillType=5,type="SkillType"},flags=0,keywordFlags=0,name="Duration",type="INC",value=10}},nil}
c["Burning Enemies you kill have a 5% chance to Explode, dealing a"]={nil,"Burning Enemies you kill have a 5% chance to Explode, dealing a "}
c["Burning Enemies you kill have a 5% chance to Explode, dealing a tenth of their maximum Life as Fire Damage"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="Burning"},flags=0,keywordFlags=0,name="ExplodeMod",type="LIST",value={amount=5,chance=1,keyOfScaledMod="chance",type="Tenth"}},[2]={flags=0,keywordFlags=0,name="CanExplode",type="FLAG",value=true}},nil}
c["Burning Enemies you kill have a 5% chance to Explode, dealing a tenth of their maximum Life as Fire Damage"]={{[1]={[1]={actor="enemy",type="ActorCondition",var="Burning"},flags=0,keywordFlags=0,name="ExplodeMod",type="LIST",value={amount=10,chance=0.05,keyOfScaledMod="chance",type="Fire"}},[2]={flags=0,keywordFlags=0,name="CanExplode",type="FLAG",value=true}},nil}
c["Can Attack as though using a Quarterstaff while both of your hand slots are empty"]={nil,"Can Attack as though using a Quarterstaff while both of your hand slots are empty "}
c["Can Attack as though using a Quarterstaff while both of your hand slots are empty Unarmed Attacks that would use your Quarterstaff's damage gain:"]={nil,"Can Attack as though using a Quarterstaff while both of your hand slots are empty Unarmed Attacks that would use your Quarterstaff's damage gain: "}
c["Can Attack as though using a Quarterstaff while both of your hand slots are empty Unarmed Attacks that would use your Quarterstaff's damage gain: Physical damage based on their Skill Level"]={nil,"Can Attack as though using a Quarterstaff while both of your hand slots are empty Unarmed Attacks that would use your Quarterstaff's damage gain: Physical damage based on their Skill Level "}
Expand Down Expand Up @@ -4136,10 +4136,7 @@ c["Causes 50% increased Stun Buildup Always deals Critical Hits against Heavy St
c["Causes Bleeding on Hit"]={{[1]={[1]={type="Condition",var="{Hand}Attack"},flags=0,keywordFlags=0,name="BleedChance",type="BASE",value=100}},nil}
c["Causes Daze buildup equal to 100% of Damage dealt"]={nil,"Causes Daze buildup equal to 100% of Damage dealt "}
c["Causes Double Stun Buildup"]={{}," Stun Buildup "}
c["Causes Enemies to Explode on Critical kill, for 10% of their Life as Physical Damage"]={nil,"Causes Enemies to Explode on Critical kill, for 10% of their Life as Physical Damage "}
c["Causes Enemies to Explode on Critical kill, for 10% of their Life as Physical Damage 120% increased Physical Damage"]={nil,"Causes Enemies to Explode on Critical kill, for 10% of their Life as Physical Damage 120% increased Physical Damage "}
c["Causes Enemies to Explode on Critical kill, for 10% of their Life as Physical Damage 172% increased Physical Damage"]={nil,"Causes Enemies to Explode on Critical kill, for 10% of their Life as Physical Damage 172% increased Physical Damage "}
c["Causes Enemies to Explode on Critical kill, for 10% of their Life as Physical Damage Adds 62 to 94 Fire Damage"]={{[1]={flags=0,keywordFlags=0,name="FireMin",type="BASE",value=62},[2]={flags=0,keywordFlags=0,name="FireMax",type="BASE",value=94}},"Causes Enemies to Explode on Critical kill, for 10% of their as Physical Damage "}
c["Causes Enemies to Explode on Critical kill, for 10% of their Life as Physical Damage"]={{[1]={flags=0,keywordFlags=0,name="ExplodeMod",type="LIST",value={amount=10,chance=1,keyOfScaledMod="chance",type="Physical"}},[2]={flags=0,keywordFlags=0,name="CanExplode",type="FLAG",value=true}},nil}
c["Chance is doubled against Undead and Demons"]={{},"Chance against Undead and Demons "}
c["Chance to Deflect is Lucky"]={nil,"Chance to Deflect is Lucky "}
c["Chance to Evade is Unlucky"]={nil,"Chance to Evade is Unlucky "}
Expand Down
132 changes: 132 additions & 0 deletions src/Data/Skills/other.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6763,4 +6763,136 @@ skills["IcestormPlayer"] = {
},
},
}
}
skills["EnemyExplode"] = {
name = "On Kill Monster Explosion",
hidden = true,
color = 4,
skillTypes = { [SkillType.Damage] = true, [SkillType.Area] = true, },
castTime = 0,
levels = {
[1] = { damageEffectiveness = 0, baseMultiplier = 1, levelRequirement = 1, }
},
preDamageFunc = function(activeSkill, output)
output.ExplodeChance = 0
local statSet = activeSkill.activeEffect.statSet or activeSkill.activeEffect.statSetCalcs
if statSet.index ~= 3 then
local allExplodeMods = activeSkill.skillModList:Tabulate("LIST", activeSkill.skillCfg, "ExplodeMod")
for _, explodeMod in ipairs(allExplodeMods) do
local activeEffectSource = activeSkill.activeEffect.srcInstance.explodeSource.modSource or "Tree:"..activeSkill.activeEffect.srcInstance.explodeSource.id
if explodeMod.mod.source == activeEffectSource then
local explodeMod = explodeMod.value
if explodeMod.type == "RandomElement" then
activeSkill.skillData["FireEffectiveExplodePercentage"] = explodeMod.amount / 3
activeSkill.skillData["ColdEffectiveExplodePercentage"] = explodeMod.amount / 3
activeSkill.skillData["LightningEffectiveExplodePercentage"] = explodeMod.amount / 3
else
activeSkill.skillData[explodeMod.type.."EffectiveExplodePercentage"] = explodeMod.amount
end
output.ExplodeChance = statSet.index == 2 and 1 or explodeMod.chance
end
end
else
local typeAmountChances = { }
local explodeModList = activeSkill.skillModList:List(activeSkill.skillCfg, "ExplodeMod")
for _, explodeMod in ipairs(explodeModList) do
local amountChance = typeAmountChances[explodeMod.type] or { }
amountChance[explodeMod.amount] = (amountChance[explodeMod.amount] or 0) + explodeMod.chance
typeAmountChances[explodeMod.type] = amountChance
end
for type, amountChance in pairs(typeAmountChances) do
local physExplodeChance = 0
for amount, chance in pairs(amountChance) do
local amountXChance = amount * chance
if type == "RandomElement" then
activeSkill.skillData["FireEffectiveExplodePercentage"] = (activeSkill.skillData["FireEffectiveExplodePercentage"] or 0) + amountXChance / 3
activeSkill.skillData["ColdEffectiveExplodePercentage"] = (activeSkill.skillData["ColdEffectiveExplodePercentage"] or 0) + amountXChance / 3
activeSkill.skillData["LightningEffectiveExplodePercentage"] = (activeSkill.skillData["LightningEffectiveExplodePercentage"] or 0) + amountXChance / 3
else
activeSkill.skillData[type.."EffectiveExplodePercentage"] = (activeSkill.skillData[type.."EffectiveExplodePercentage"] or 0) + amountXChance
end
if type == "Physical" then
physExplodeChance = 1 - ((1 - physExplodeChance) * (1 - chance))
end
output.ExplodeChance = 1 - ((1 - output.ExplodeChance) * (1 - chance))
end
if type == "Physical" and physExplodeChance ~= 0 then
activeSkill.skillModList:NewMod("CalcArmourAsThoughDealing", "MORE", 100 / math.min(physExplodeChance, 1) - 100)
end
end
end
output.ExplodeChance = math.min(output.ExplodeChance * 100, 100)
end,
statSets = {
[1] = {
label = "This Source Only",
baseFlags = {
area = true,
monsterExplode = true,
},
baseMods = {
skill("radius", 22),
skill("showAverage", true),
skill("corpseExplosionLifeMultiplier", 0),
skill("explodeCorpse", true),
skill("hitChanceIsExplodeChance", true),
},
stats = {
"is_area_damage",
"base_skill_show_average_damage_instead_of_dps",
"display_skill_deals_secondary_damage",
"damage_cannot_be_reflected",
"skill_can_add_multiple_charges_per_action",
},
levels = {
[1] = { },
},
},
[2] = {
label = "This Source Only, Ignoring Chance",
baseFlags = {
area = true,
monsterExplode = true,
},
baseMods = {
skill("radius", 22),
skill("showAverage", true),
skill("corpseExplosionLifeMultiplier", 0),
skill("explodeCorpse", true),
},
stats = {
"is_area_damage",
"base_skill_show_average_damage_instead_of_dps",
"display_skill_deals_secondary_damage",
"damage_cannot_be_reflected",
"skill_can_add_multiple_charges_per_action",
},
levels = {
[1] = { },
},
},
[3] = {
label = "Average of All Sources",
baseFlags = {
area = true,
monsterExplode = true,
},
baseMods = {
skill("radius", 22),
skill("showAverage", true),
skill("corpseExplosionLifeMultiplier", 0),
skill("explodeCorpse", true),
},
stats = {
"is_area_damage",
"base_skill_show_average_damage_instead_of_dps",
"display_skill_deals_secondary_damage",
"damage_cannot_be_reflected",
"skill_can_add_multiple_charges_per_action",
},
levels = {
[1] = { },
},
},
}
}
135 changes: 134 additions & 1 deletion src/Export/Skills/other.txt
Original file line number Diff line number Diff line change
Expand Up @@ -463,4 +463,137 @@ statMap = {
#set IcestormPlayer
#flags spell area duration
#mods
#skillEnd
#skillEnd

skills["EnemyExplode"] = {
name = "On Kill Monster Explosion",
hidden = true,
color = 4,
skillTypes = { [SkillType.Damage] = true, [SkillType.Area] = true, },
castTime = 0,
levels = {
[1] = { damageEffectiveness = 0, baseMultiplier = 1, levelRequirement = 1, }
},
preDamageFunc = function(activeSkill, output)
output.ExplodeChance = 0
local statSet = activeSkill.activeEffect.statSet or activeSkill.activeEffect.statSetCalcs
if statSet.index ~= 3 then
local allExplodeMods = activeSkill.skillModList:Tabulate("LIST", activeSkill.skillCfg, "ExplodeMod")
for _, explodeMod in ipairs(allExplodeMods) do
local activeEffectSource = activeSkill.activeEffect.srcInstance.explodeSource.modSource or "Tree:"..activeSkill.activeEffect.srcInstance.explodeSource.id
if explodeMod.mod.source == activeEffectSource then
local explodeMod = explodeMod.value
if explodeMod.type == "RandomElement" then
activeSkill.skillData["FireEffectiveExplodePercentage"] = explodeMod.amount / 3
activeSkill.skillData["ColdEffectiveExplodePercentage"] = explodeMod.amount / 3
activeSkill.skillData["LightningEffectiveExplodePercentage"] = explodeMod.amount / 3
else
activeSkill.skillData[explodeMod.type.."EffectiveExplodePercentage"] = explodeMod.amount
end
output.ExplodeChance = statSet.index == 2 and 1 or explodeMod.chance
end
end
else
local typeAmountChances = { }
local explodeModList = activeSkill.skillModList:List(activeSkill.skillCfg, "ExplodeMod")
for _, explodeMod in ipairs(explodeModList) do
local amountChance = typeAmountChances[explodeMod.type] or { }
amountChance[explodeMod.amount] = (amountChance[explodeMod.amount] or 0) + explodeMod.chance
typeAmountChances[explodeMod.type] = amountChance
end
for type, amountChance in pairs(typeAmountChances) do
local physExplodeChance = 0
for amount, chance in pairs(amountChance) do
local amountXChance = amount * chance
if type == "RandomElement" then
activeSkill.skillData["FireEffectiveExplodePercentage"] = (activeSkill.skillData["FireEffectiveExplodePercentage"] or 0) + amountXChance / 3
activeSkill.skillData["ColdEffectiveExplodePercentage"] = (activeSkill.skillData["ColdEffectiveExplodePercentage"] or 0) + amountXChance / 3
activeSkill.skillData["LightningEffectiveExplodePercentage"] = (activeSkill.skillData["LightningEffectiveExplodePercentage"] or 0) + amountXChance / 3
else
activeSkill.skillData[type.."EffectiveExplodePercentage"] = (activeSkill.skillData[type.."EffectiveExplodePercentage"] or 0) + amountXChance
end
if type == "Physical" then
physExplodeChance = 1 - ((1 - physExplodeChance) * (1 - chance))
end
output.ExplodeChance = 1 - ((1 - output.ExplodeChance) * (1 - chance))
end
if type == "Physical" and physExplodeChance ~= 0 then
activeSkill.skillModList:NewMod("CalcArmourAsThoughDealing", "MORE", 100 / math.min(physExplodeChance, 1) - 100)
end
end
end
output.ExplodeChance = math.min(output.ExplodeChance * 100, 100)
end,
statSets = {
[1] = {
label = "This Source Only",
baseFlags = {
area = true,
monsterExplode = true,
},
baseMods = {
skill("radius", 22),
skill("showAverage", true),
skill("corpseExplosionLifeMultiplier", 0),
skill("explodeCorpse", true),
skill("hitChanceIsExplodeChance", true),
},
stats = {
"is_area_damage",
"base_skill_show_average_damage_instead_of_dps",
"display_skill_deals_secondary_damage",
"damage_cannot_be_reflected",
"skill_can_add_multiple_charges_per_action",
},
levels = {
[1] = { },
},
},
[2] = {
label = "This Source Only, Ignoring Chance",
baseFlags = {
area = true,
monsterExplode = true,
},
baseMods = {
skill("radius", 22),
skill("showAverage", true),
skill("corpseExplosionLifeMultiplier", 0),
skill("explodeCorpse", true),
},
stats = {
"is_area_damage",
"base_skill_show_average_damage_instead_of_dps",
"display_skill_deals_secondary_damage",
"damage_cannot_be_reflected",
"skill_can_add_multiple_charges_per_action",
},
levels = {
[1] = { },
},
},
[3] = {
label = "Average of All Sources",
baseFlags = {
area = true,
monsterExplode = true,
},
baseMods = {
skill("radius", 22),
skill("showAverage", true),
skill("corpseExplosionLifeMultiplier", 0),
skill("explodeCorpse", true),
},
stats = {
"is_area_damage",
"base_skill_show_average_damage_instead_of_dps",
"display_skill_deals_secondary_damage",
"damage_cannot_be_reflected",
"skill_can_add_multiple_charges_per_action",
},
levels = {
[1] = { },
},
},
}
}
9 changes: 7 additions & 2 deletions src/Modules/CalcSetup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1334,16 +1334,21 @@ function calcs.initEnv(build, mode, override, specEnv)
group = { label = "On Kill Monster Explosion", enabled = true, gemList = { }, source = "Explode", noSupports = true }
t_insert(build.skillsTab.socketGroupList, group)
end
-- Hack to remove duplicates
local explodeBySource = { }
for _, explodeSource in ipairs(env.explodeSources) do
explodeBySource[explodeSource.modSource or explodeSource.id] = explodeSource
end
-- Update the group
group.explodeSources = env.explodeSources
group.explodeSources = explodeBySource
local gemsBySource = { }
for _, gem in ipairs(group.gemList) do
if gem.explodeSource then
gemsBySource[gem.explodeSource.modSource or gem.explodeSource.id] = gem
end
end
wipeTable(group.gemList)
for _, explodeSource in ipairs(env.explodeSources) do
for _, explodeSource in pairs(explodeBySource) do
local activeGemInstance
if gemsBySource[explodeSource.modSource or explodeSource.id] then
activeGemInstance = gemsBySource[explodeSource.modSource or explodeSource.id]
Expand Down
7 changes: 3 additions & 4 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2062,7 +2062,6 @@ local specialModList = {
["enemies you kill while affected by glorious madness have a (%d+)%% chance to explode, dealing a (.+) of their life as (.+) damage"] = function(chance, _, amount, type) -- Beacon of Madness
return explodeFunc(chance, amount, type, { type = "Condition", var = "AffectedByGloriousMadness" })
end,
["enemies killed with attack hits have a (%d+)%% chance to explode, dealing a (.+) of their life as (.+) damage"] = explodeFunc, -- Devastator (attack clusters)
["enemies killed with wand hits have a (%d+)%% chance to explode, dealing a (.+) of their life as (.+) damage"] = function(chance, _, amount, type) -- Explosive Force (wand clusters)
return explodeFunc(chance, amount, type, { type = "Condition", var = "UsingWand" })
end,
Expand All @@ -2075,7 +2074,7 @@ local specialModList = {
["enemies you kill explode, dealing (%d+)%% of their life as (.+) damage"] = function(amount, _, type) -- legacy synth, legacy crusader
return explodeFunc(100, amount, type)
end,
["enemies killed explode dealing (%d+)%% of their life as (.+) damage"] = function(amount, _, type) -- Quecholli
["causes enemies to explode on critical kill, for (%d+)%% of their life as (.+) damage"] = function(amount, _, type) -- Crumbling Maul implicit
return explodeFunc(100, amount, type)
end,
["enemies on fungal ground you kill explode, dealing (%d+)%% of their life as (.+) damage"] = function(amount, _, type) -- Sporeguard
Expand All @@ -2090,8 +2089,8 @@ local specialModList = {
["bleeding enemies you kill explode, dealing (%d+)%% of their maximum life as (.+) damage"] = function(amount, _, type) -- Haemophilia
return explodeFunc(100, amount, type, { type = "ActorCondition", actor = "enemy", var = "Bleeding" })
end,
["burning enemies you kill have a (%d+)%% chance to explode, dealing a (.+) of their maximum life as (.+) damage"] = function(amount, _, type) -- Haemophilia
return explodeFunc(100, amount, type, { type = "ActorCondition", actor = "enemy", var = "Burning" })
["burning enemies you kill have a (%d+)%% chance to explode, dealing a (.+) of their maximum life as (.+) damage"] = function(chance, _, amount, type) -- Explosive Impact
return explodeFunc(chance, amount, type, { type = "ActorCondition", actor = "enemy", var = "Burning" })
end,
["non-aura curses you inflict are not removed from dying enemies"] = {},
["enemies near corpses affected by your curses are blinded"] = { mod("EnemyModifier", "LIST", { mod = flag("Condition:Blinded") }, { type = "MultiplierThreshold", var = "NearbyCorpse", threshold = 1 }, { type = "ActorCondition", actor = "enemy", var = "Cursed" }) },
Expand Down