Skip to content

Added support for infernal flame #742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open
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
18 changes: 4 additions & 14 deletions src/Data/ModCache.lua
Original file line number Diff line number Diff line change
@@ -2714,10 +2714,7 @@ c["Gain Endurance Charges instead of Power Charges"]={nil,"Endurance Charges ins
c["Gain Energy Shield from equipped Body Armour as extra maximum Life"]={{[1]={[1]={div=1,stat="EnergyShieldOnBody Armour",type="PerStat"},flags=0,keywordFlags=0,name="Life",type="BASE",value=1}},nil}
c["Gain Frenzy Charges instead of Endurance Charges"]={nil,"Frenzy Charges instead of Endurance Charges "}
c["Gain Frenzy Charges instead of Endurance Charges Gain Endurance Charges instead of Power Charges"]={nil,"Frenzy Charges instead of Endurance Charges Gain Endurance Charges instead of Power Charges "}
c["Gain Infernal Flame instead of spending Mana for Skill costs"]={nil,"Infernal Flame instead of spending Mana for Skill costs "}
c["Gain Infernal Flame instead of spending Mana for Skill costs Take maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum"]={nil,"Infernal Flame instead of spending Mana for Skill costs Take maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum "}
c["Gain Infernal Flame instead of spending Mana for Skill costs Take maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum Lose all Infernal Flame on reaching maximum Infernal Flame"]={nil,"Infernal Flame instead of spending Mana for Skill costs Take maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum Lose all Infernal Flame on reaching maximum Infernal Flame "}
c["Gain Infernal Flame instead of spending Mana for Skill costs Take maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum Lose all Infernal Flame on reaching maximum Infernal Flame 10% of Infernal Flame lost per second if none was gained in the past 2 seconds"]={nil,"Infernal Flame instead of spending Mana for Skill costs Take maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum Lose all Infernal Flame on reaching maximum Infernal Flame 10% of Infernal Flame lost per second if none was gained in the past 2 seconds "}
c["Gain Infernal Flame instead of spending Mana for Skill costs"]={{},nil}
c["Gain Physical Thorns damage equal to 2% of Armour from equipped Body Armour"]={nil,"Physical Thorns damage equal to 2% of Armour from equipped Body Armour "}
c["Gain Power Charges instead of Frenzy Charges"]={nil,"Power Charges instead of Frenzy Charges "}
c["Gain Power Charges instead of Frenzy Charges Gain Frenzy Charges instead of Endurance Charges"]={nil,"Power Charges instead of Frenzy Charges Gain Frenzy Charges instead of Endurance Charges "}
@@ -2911,11 +2908,7 @@ c["Maximum 10 Demonflame"]={nil,"Maximum 10 Demonflame "}
c["Maximum 10 Fragile Regrowth"]={nil,"Maximum 10 Fragile Regrowth "}
c["Maximum 10 Fragile Regrowth 0.5% of Life Regenerated per second per Fragile Regrowth"]={nil,"Maximum 10 Fragile Regrowth 0.5% of Life Regenerated per second per Fragile Regrowth "}
c["Maximum Life becomes 1, Immune to Chaos Damage"]={{[1]={flags=0,keywordFlags=0,name="ChaosInoculation",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="ChaosDamageTaken",type="MORE",value=-100}},nil}
c["Maximum Mana is replaced by Maximum Infernal Flame"]={nil,"Maximum Mana is replaced by Maximum Infernal Flame "}
c["Maximum Mana is replaced by Maximum Infernal Flame Gain Infernal Flame instead of spending Mana for Skill costs"]={nil,"Maximum Mana is replaced by Maximum Infernal Flame Gain Infernal Flame instead of spending Mana for Skill costs "}
c["Maximum Mana is replaced by Maximum Infernal Flame Gain Infernal Flame instead of spending Mana for Skill costs Take maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum"]={nil,"Maximum Mana is replaced by Maximum Infernal Flame Gain Infernal Flame instead of spending Mana for Skill costs Take maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum "}
c["Maximum Mana is replaced by Maximum Infernal Flame Gain Infernal Flame instead of spending Mana for Skill costs Take maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum Lose all Infernal Flame on reaching maximum Infernal Flame"]={nil,"Maximum Mana is replaced by Maximum Infernal Flame Gain Infernal Flame instead of spending Mana for Skill costs Take maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum Lose all Infernal Flame on reaching maximum Infernal Flame "}
c["Maximum Mana is replaced by Maximum Infernal Flame Gain Infernal Flame instead of spending Mana for Skill costs Take maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum Lose all Infernal Flame on reaching maximum Infernal Flame 10% of Infernal Flame lost per second if none was gained in the past 2 seconds"]={nil,"Maximum Mana is replaced by Maximum Infernal Flame Gain Infernal Flame instead of spending Mana for Skill costs Take maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum Lose all Infernal Flame on reaching maximum Infernal Flame 10% of Infernal Flame lost per second if none was gained in the past 2 seconds "}
c["Maximum Mana is replaced by Maximum Infernal Flame"]={{[1]={flags=0,keywordFlags=0,name="ManaToInfernalFlame",type="FLAG",value=true}},nil}
c["Meta Skills gain 15% increased Energy"]={nil,"Meta Skills gain 15% increased Energy "}
c["Meta Skills gain 35% more Energy"]={nil,"Meta Skills gain 35% more Energy "}
c["Meta Skills gain 8% increased Energy"]={nil,"Meta Skills gain 8% increased Energy "}
@@ -3045,7 +3038,6 @@ c["Passives in radius of Zealot's Oath can be Allocated without being connected
c["Permanently Intimidate enemies on Block"]={{[1]={[1]={type="Condition",var="BlockedRecently"},flags=0,keywordFlags=0,name="EnemyModifier",type="LIST",value={mod={flags=0,keywordFlags=0,name="Condition:Intimidated",type="FLAG",value=true}}}},nil}
c["Physical Damage Reduction from Armour is based on your combined Armour and Evasion Rating"]={{[1]={flags=0,keywordFlags=0,name="EvasionAddsToPdr",type="FLAG",value=true}},nil}
c["Physical Damage is Pinning"]={nil,"Physical Damage is Pinning "}
c["Presence Gain 20% of Damage as Fire Damage"]={nil,"Presence Gain 20% of Damage as Fire Damage "}
c["Presence Radius is doubled"]={nil,"Presence Radius is doubled "}
c["Projectiles Pierce all Ignited enemies"]={nil,"Projectiles Pierce all Ignited enemies "}
c["Projectiles Pierce all Ignited enemies Attacks Gain 10% of Damage as Extra Fire Damage"]={nil,"Projectiles Pierce all Ignited enemies Attacks Gain 10% of Damage as Extra Fire Damage "}
@@ -3166,9 +3158,7 @@ c["Take 30% less Damage over time"]={{[1]={flags=8,keywordFlags=0,name="DamageTa
c["Take 50% less Damage over Time if you've started taking Damage over Time in the past second"]={{[1]={flags=8,keywordFlags=0,name="DamageTaken",type="MORE",value=-50}}," if you've started taking Damage over Time in the past second "}
c["Take 50% less Damage over Time if you've started taking Damage over Time in the past second Take 50% more Damage over Time if you've haven't started taking Damage over Time in the past second"]={{[1]={flags=8,keywordFlags=0,name="DamageTaken",type="MORE",value=-50}}," if you've started taking Damage over Time in the past second Take 50% more Damage over Time if you've haven't started taking Damage over Time in the past second "}
c["Take 50% more Damage over Time if you've haven't started taking Damage over Time in the past second"]={{[1]={flags=8,keywordFlags=0,name="DamageTaken",type="MORE",value=50}}," if you've haven't started taking Damage over Time in the past second "}
c["Take maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum"]={nil,"maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum "}
c["Take maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum Lose all Infernal Flame on reaching maximum Infernal Flame"]={nil,"maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum Lose all Infernal Flame on reaching maximum Infernal Flame "}
c["Take maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum Lose all Infernal Flame on reaching maximum Infernal Flame 10% of Infernal Flame lost per second if none was gained in the past 2 seconds"]={nil,"maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum Lose all Infernal Flame on reaching maximum Infernal Flame 10% of Infernal Flame lost per second if none was gained in the past 2 seconds "}
c["Take maximum Life and Energy Shield as Fire Damage when Infernal Flame reaches maximum"]={{[1]={flags=0,keywordFlags=0,name="EnableHighInfernalFlameBuff",type="FLAG",value=true},[2]={[1]={percent=100,stat="Life",type="PercentStat"},[2]={type="Condition",var="FullInfernalFlame"},flags=0,keywordFlags=0,name="FireDegen",type="BASE",value=1},[3]={[1]={percent=100,stat="EnergyShield",type="PercentStat"},[2]={type="Condition",var="FullInfernalFlame"},flags=0,keywordFlags=0,name="FireDegen",type="BASE",value=1}},nil}
c["Take no Extra Damage from Critical Hits"]={{[1]={[1]={effectType="Global",type="GlobalEffect",unscalable=true},flags=0,keywordFlags=0,name="ReduceCritExtraDamage",type="BASE",value=100}},nil}
c["Targets can be affected by +1 of your Poisons at the same time"]={{[1]={flags=0,keywordFlags=0,name="PoisonCanStack",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="PoisonStacks",type="BASE",value=1}},nil}
c["Targets can be affected by two of your Chills at the same time"]={{[1]={flags=0,keywordFlags=0,name="ChillCanStack",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="ChillStacksMax",type="OVERRIDE",value=2}},nil}
@@ -3222,7 +3212,7 @@ c["While not on Full Life, Sacrifice 10% of Mana per Second to Recover that much
c["While not on Low Infernal Flame, all Damage from you and"]={nil,"While not on Low Infernal Flame, all Damage from you and "}
c["While not on Low Infernal Flame, all Damage from you and Allies in your Presence contributes to Ignite Chance and Magnitude"]={nil,"While not on Low Infernal Flame, all Damage from you and contributes to Ignite Chance and Magnitude "}
c["While on High Infernal Flame, you and Allies in your"]={nil,"While on High Infernal Flame, you and Allies in your "}
c["While on High Infernal Flame, you and Allies in your Presence Gain 20% of Damage as Fire Damage"]={nil,"While on High Infernal Flame, you and 20% of Damage as Fire Damage "}
c["While on High Infernal Flame, you and Allies in your Presence Gain 20% of Damage as Fire Damage"]={{[1]={[1]={type="Condition",var="HighInfernalFlame"},flags=0,keywordFlags=0,name="DamageGainAsFire",type="BASE",value=20}},nil}
c["You are Blind"]={{[1]={[1]={neg=true,type="Condition",var="CannotBeBlinded"},flags=0,keywordFlags=0,name="Condition:Blinded",type="FLAG",value=true}},nil}
c["You can Break Enemy Armour to below 0"]={nil,"You can Break Enemy Armour to below 0 "}
c["You can apply an additional Curse"]={{[1]={flags=0,keywordFlags=0,name="EnemyCurseLimit",type="BASE",value=1}},nil}
4 changes: 3 additions & 1 deletion src/Modules/BuildDisplayStats.lua
Original file line number Diff line number Diff line change
@@ -73,7 +73,8 @@ local displayStats = {
{ stat = "AreaOfEffectRadiusMetres", label = "AoE Radius", fmt = ".1fm" },
{ stat = "BrandAttachmentRangeMetre", label = "Attachment Range", fmt = ".1fm", flag = "brand" },
{ stat = "BrandTicks", label = "Activations per Brand", fmt = "d", flag = "brand" },
{ stat = "ManaCost", label = "Mana Cost", fmt = "d", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaHasCost end },
{ stat = "ManaCost", label = "Mana Cost", fmt = "d", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaCost > 0 end },
{ stat = "InfernalFlameCost", label = "Infernal Flame buildup", fmt = "d", color = colorCodes.LIFE, compPercent = true, lowerIsBetter = true,},
{ stat = "ManaPercentCost", label = "Mana Cost", fmt = "d%%", color = colorCodes.MANA, pool = "ManaUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentHasCost end },
{ stat = "ManaPerSecondCost", label = "Mana Cost per second", fmt = ".2f", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPerSecondHasCost end },
{ stat = "ManaPercentPerSecondCost", label = "Mana Cost per second", fmt = ".2f%%", color = colorCodes.MANA, pool = "ManaUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentPerSecondHasCost end },
@@ -122,6 +123,7 @@ local displayStats = {
{ stat = "LifeLeechGainRate", label = "Life Leech/On Hit Rate", fmt = ".1f", color = colorCodes.LIFE, compPercent = true },
{ stat = "LifeLeechGainPerHit", label = "Life Leech/Gain per Hit", fmt = ".1f", color = colorCodes.LIFE, compPercent = true },
{ },
{ stat = "InfernalFlame", label = "Max Infernal Flame", fmt = "d", color = colorCodes.LIFE},
{ stat = "Mana", label = "Total Mana", fmt = "d", color = colorCodes.MANA, compPercent = true },
{ stat = "Spec:ManaInc", label = "%Inc Mana from Tree", color = colorCodes.MANA, fmt = "d%%" },
{ stat = "ManaUnreserved", label = "Unreserved Mana", fmt = "d", color = colorCodes.MANA, condFunc = function(v,o) return v < o.Mana end, compPercent = true, warnFunc = function(v) return v < 0 and "Your unreserved Mana is negative" end },
15 changes: 15 additions & 0 deletions src/Modules/CalcDefence.lua
Original file line number Diff line number Diff line change
@@ -73,6 +73,7 @@ function calcs.doActorLifeManaSpirit(actor)
local override = modDB:Override(nil, res)
output[res.."HasOverride"] = override ~= nil
output[res] = override or m_max(round((base * (1 - conv/100) + extra) * (1 + inc/100) * more), 1)

if breakdown then
if inc ~= 0 or more ~= 1 or conv ~= 0 or extra ~= 0 then
breakdown[res][1] = s_format("%g ^8(base)", base)
@@ -97,6 +98,18 @@ function calcs.doActorLifeManaSpirit(actor)
end
end
end

--- Calculate infernal flame after mana is calculated
if modDB:Flag(nil, "ManaToInfernalFlame") then
local inc = modDB:Sum("INC", nil, "Mana")
output.InfernalFlame = output.Mana
output.Mana = 0
output.ManaRecoveryRate = 0
--These mods sets mana and recovery to 0 to prevent them from showing up in calcs tab
modDB:NewMod("Mana", "OVERRIDE", 0)
modDB:NewMod("ManaRecovery", "OVERRIDE", 0)
end

if output.ChaosInoculation then
output.Life = 1
condList["FullLife"] = true
@@ -120,6 +133,8 @@ function calcs.doActorDarkness(actor)
output.UnreservedDarkness = output.Darkness - output.ReservedDarkness
end



-- Calculate life/mana/spirit reservation
---@param actor table
function calcs.doActorLifeManaSpiritReservation(actor)
4 changes: 4 additions & 0 deletions src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
@@ -1782,6 +1782,10 @@ function calcs.offence(env, actor, activeSkill)
t_insert(breakdown[costName], s_format("= %"..(val.upfront and "d" or ".2f")..(val.percent and "%%" or ""), output[costName]))
end
end
if modDB:Flag(nil, "ManaToInfernalFlame") then
output.InfernalFlameCost = output.ManaCost
output.ManaCost = 0
end
end

-- account for Sacrificial Zeal
4 changes: 3 additions & 1 deletion src/Modules/Calcs.lua
Original file line number Diff line number Diff line change
@@ -477,7 +477,9 @@ function calcs.buildOutput(build, mode)
source = "Tree"
}
output["Spec:LifeInc"] = env.modDB:Sum("INC", nil, "Life")
output["Spec:ManaInc"] = env.modDB:Sum("INC", specCfg, "Mana")
if not env.modDB:Flag(nil, "ManaToInfernalFlame") then
output["Spec:ManaInc"] = env.modDB:Sum("INC", specCfg, "Mana")
end
output["Spec:ArmourInc"] = env.modDB:Sum("INC", specCfg, "Armour", "ArmourAndEvasion")
output["Spec:EvasionInc"] = env.modDB:Sum("INC", specCfg, "Evasion", "ArmourAndEvasion")
output["Spec:EnergyShieldInc"] = env.modDB:Sum("INC", specCfg, "EnergyShield")
7 changes: 7 additions & 0 deletions src/Modules/ConfigOptions.lua
Original file line number Diff line number Diff line change
@@ -1435,6 +1435,13 @@ Huge sets the radius to 11.
{ var = "reservedDarkness", type = "count", label = "Reserved Darkness:", ifFlag = "PlayerHasDarkness", apply = function(val, modList, enemyModList)
modList:NewMod("ReservedDarkness", "BASE", val, "Config")
end },
{ var = "fullInfernalFlame", type = "check", label = "Is infernal flame full?", ifFlag = "ManaToInfernalFlame", tooltip = "This also implies high infernal flame", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:FullInfernalFlame", "FLAG", true, "Config")
modList:NewMod("Condition:HighInfernalFlame", "FLAG", true, "Config")
end },
{ var = "highInfernalFlame", type = "check", label = "Is infernal flame high?", ifFlag = "EnableHighInfernalFlameBuff", apply = function(val, modList, enemyModList)
modList:NewMod("Condition:HighInfernalFlame", "FLAG", true, "Config")
end },
-- Section: Effective DPS options
{ section = "For Effective DPS", col = 1 },
{ var = "skillForkCount", type = "count", label = "# of times Skill has Forked:", ifFlag = "forking", apply = function(val, modList, enemyModList)
12 changes: 12 additions & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
@@ -2890,6 +2890,18 @@ local specialModList = {
mod("Speed", "MORE", num, nil, ModFlag.Cast, { type = "GlobalEffect", effectType = "Buff", effectName = "Quicksand Hourglass" }, { type = "Condition", var = "QuicksandHourglass" }),
flag("Condition:CanGainQuicksandHourglass")
} end,

-- Infernalist
["maximum mana is replaced by maximum infernal flame"] = { mod("ManaToInfernalFlame", "FLAG", true) },
["gain infernal flame instead of spending mana for skill costs"] = { }, ---this line should make the text turn blue to indicate the node is working
["take maximum life and energy shield as fire damage when infernal flame reaches maximum"] = {
mod("EnableHighInfernalFlameBuff", "FLAG", true),
mod("FireDegen", "BASE", 1, { type="PercentStat", stat = "Life", percent = 100}, { type = "Condition", var = "FullInfernalFlame"}),
mod("FireDegen", "BASE", 1, { type="PercentStat", stat = "EnergyShield", percent = 100}, { type = "Condition", var = "FullInfernalFlame"})
},
["while on high infernal flame, you and allies in your presence gain (%d+)%% of damage as (%a+) damage"] =
function(num, _, strType)
return {mod("DamageGainAs"..firstToUpper(strType), "BASE", num,{ type = "Condition", var = "HighInfernalFlame"})} end,
-- Item local modifiers
["has no sockets"] = { flag("NoSockets") },
["reflects your other ring"] = {