Skip to content

Add support for Demon Form #746

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

Draft
wants to merge 8 commits into
base: dev
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2907,7 +2907,7 @@ c["Mana Recovery from Regeneration is not applied"]={{[1]={flags=0,keywordFlags=
c["Mark Skills have 10% increased Cast Speed"]={{[1]={[1]={skillType=109,type="SkillType"},flags=16,keywordFlags=0,name="Speed",type="INC",value=10}},nil}
c["Mark Skills have 25% increased Skill Effect Duration"]={{[1]={[1]={skillType=109,type="SkillType"},flags=0,keywordFlags=0,name="Duration",type="INC",value=25}},nil}
c["Mark Skills have 60% increased Skill Effect Duration"]={{[1]={[1]={skillType=109,type="SkillType"},flags=0,keywordFlags=0,name="Duration",type="INC",value=60}},nil}
c["Maximum 10 Demonflame"]={nil,"Maximum 10 Demonflame "}
c["Maximum 10 Demonflame"]={{[1]={flags=0,keywordFlags=0,name="Condition:MasteredDarknessLimit",type="FLAG",value=true}},nil}
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}
Expand Down
12 changes: 12 additions & 0 deletions src/Data/Skills/other.lua
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,18 @@ skills["DemonFormPlayer"] = {
label = "Demon Form",
incrementalEffectiveness = 0.054999999701977,
statDescriptionScope = "demon_transformation",
statMap = {
["demon_form_spell_damage_+%_per_stack"] = {
mod("Damage", "INC", nil, 0, KeywordFlag.Spell, { type = "GlobalEffect", effectType = "Buff", effectName = "Demon Form"}, { type = "Multiplier", var = "DemonFlameStacks" }, { type = "StatThreshold", stat = "Life", threshold = 2 } ),
},
["demon_form_grants_cast_speed_+%"] = {
mod("Speed", "INC", nil, ModFlag.Cast, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Demon Form" }, { type = "StatThreshold", stat = "Life", threshold = 2 } ),
},
["demon_form_life_loss_%_per_minute_per_stack"] = {
mod("LifeDemonDegenPercent", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Demon Form" }, { type = "StatThreshold", stat = "Life", threshold = 2 } ),
div = 60,
},
},
baseFlags = {
},
constantStats = {
Expand Down
12 changes: 12 additions & 0 deletions src/Export/Skills/other.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ statMap = {
#skill DemonFormPlayer
#set DemonFormPlayer
#flags
statMap = {
["demon_form_spell_damage_+%_per_stack"] = {
mod("Damage", "INC", nil, 0, KeywordFlag.Spell, { type = "GlobalEffect", effectType = "Buff", effectName = "Demon Form"}, { type = "Multiplier", var = "DemonFlameStacks" }, { type = "StatThreshold", stat = "Life", threshold = 2 } ),
},
["demon_form_grants_cast_speed_+%"] = {
mod("Speed", "INC", nil, ModFlag.Cast, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Demon Form" }, { type = "StatThreshold", stat = "Life", threshold = 2 } ),
},
["demon_form_life_loss_%_per_minute_per_stack"] = {
mod("LifeDemonDegenPercent", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Demon Form" }, { type = "StatThreshold", stat = "Life", threshold = 2 } ),
div = 60,
},
},
#mods
#skillEnd

Expand Down
6 changes: 5 additions & 1 deletion src/Modules/CalcDefence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,11 @@ function calcs.defence(env, actor)
output[resource.."Regen"] = regenRate
end
output[resource.."RegenInc"] = inc
local baseDegen = (modDB:Sum("BASE", nil, resource.."Degen") + pool * modDB:Sum("BASE", nil, resource.."DegenPercent") / 100)
if resourceName == "Life" and modDB:Sum("BASE", nil, "LifeDemonDegenPercent") > 0 then
local demonFormDegen = m_max(pool * modDB:Sum("BASE", nil, "LifeDemonDegenPercent") / 100, 1) * modDB:Sum("BASE", nil, "Multiplier:DemonFlameStacks")
modDB:NewMod("LifeDegen", "BASE", demonFormDegen, "Demon Flame Degen")
end
local baseDegen = modDB:Sum("BASE", nil, resource.."Degen") + pool * modDB:Sum("BASE", nil, resource.."DegenPercent") / 100
local degenRate = (baseDegen > 0) and baseDegen * calcLib.mod(modDB, nil, resource.."Degen") or 0
output[resource.."Degen"] = degenRate
local recoveryRate = modDB:Sum("BASE", nil, resource.."Recovery") * recoveryRateMod
Expand Down
5 changes: 5 additions & 0 deletions src/Modules/ConfigOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,11 @@ local configSettings = {
{ var = "darkPactSkeletonLife", type = "count", label = "Skeleton ^xE05030Life:", ifSkill = "Dark Pact", tooltip = "Sets the maximum ^xE05030Life ^7of the Skeleton that is being targeted.", apply = function(val, modList, enemyModList)
modList:NewMod("SkillData", "LIST", { key = "skeletonLife", value = val }, "Config", { type = "SkillName", skillName = "Dark Pact" })
end },
{ label = "Demon Form:", ifSkill = "Demon Form" },
{ var = "demonFormStacks", type = "count", label = "Demonflame Stacks", ifSkill = "Demon Form", apply = function(val, modList, enemyModList)
modList:NewMod("Multiplier:DemonFlameStacks", "BASE", val, "Config", { type = "Condition", var = "MasteredDarknessLimit", neg = true} )
modList:NewMod("Multiplier:DemonFlameStacks", "BASE", m_min(val, 10), "Config", { type = "Condition", var = "MasteredDarknessLimit"} )
end },
{ label = "Doom Blast:", ifSkill = "Doom Blast" },
{ var = "doomBlastSource", type = "list", label = "Doom Blast Trigger Source:", ifSkill = "Doom Blast", list = {{val="expiration",label="Curse Expiration"},{val="replacement",label="Curse Replacement"},{val="vixen",label="Vixen's Curse"},{val="hexblast",label="Hexblast Replacement"}}, defaultIndex = 3},
{ var = "curseOverlaps", type = "count", label = "Curse overlaps:", ifSkill = "Doom Blast", ifFlag = "UsesCurseOverlaps", apply = function(val, modList, enemyModList)
Expand Down
2 changes: 2 additions & 0 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2890,6 +2890,8 @@ local specialModList = {
mod("Speed", "MORE", num, nil, ModFlag.Cast, { type = "GlobalEffect", effectType = "Buff", effectName = "Quicksand Hourglass" }, { type = "Condition", var = "QuicksandHourglass" }),
flag("Condition:CanGainQuicksandHourglass")
} end,
-- Witch -- Infernalist
["maximum 10 demonflame"] = { flag("Condition:MasteredDarknessLimit") },
-- Item local modifiers
["has no sockets"] = { flag("NoSockets") },
["reflects your other ring"] = {
Expand Down