Skip to content

Commit 2430190

Browse files
Blitz54LocalIdentity
andauthored
Add support for Demon Form (#746)
* Add support for Demon Form * fix1 * fix2 * fixs * fix4 * removed a space * Fix Demon Flame degen at low health Demon flame degens a minimum of 1 life per stack * Fix breakdown and stop it working with CI * Update to 0.3 Version * Set default stacks and add tooltip --------- Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 089ee21 commit 2430190

8 files changed

Lines changed: 38 additions & 4 deletions

File tree

src/Data/ModCache.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4426,7 +4426,7 @@ c["Defend with 200% of Armour during effect"]={nil,"Defend with 200% of Armour d
44264426
c["Deflected Hits cannot inflict Bleeding on you"]={nil,"Deflected Hits cannot inflict Bleeding on you "}
44274427
c["Deflected Hits cannot inflict Maim on you"]={nil,"Deflected Hits cannot inflict Maim on you "}
44284428
c["Deflected Hits cannot inflict Maim on you Deflected Hits cannot inflict Bleeding on you"]={nil,"Deflected Hits cannot inflict Maim on you Deflected Hits cannot inflict Bleeding on you "}
4429-
c["Demonflame has no maximum"]={nil,"Demonflame has no maximum "}
4429+
c["Demonflame has no maximum"]={{[1]={flags=0,keywordFlags=0,name="Multiplier:DemonFlameMaximum",type="BASE",value=999}},nil}
44304430
c["Detonator skills have 40% increased Area of Effect"]={nil,"Detonator skills have 40% increased Area of Effect "}
44314431
c["Detonator skills have 40% increased Area of Effect Detonator skills have 80% reduced damage"]={nil,"Detonator skills have 40% increased Area of Effect Detonator skills have 80% reduced damage "}
44324432
c["Detonator skills have 8% increased Area of Effect"]={nil,"Detonator skills have 8% increased Area of Effect "}

src/Data/Skills/other.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,6 +1616,18 @@ skills["DemonFormPlayer"] = {
16161616
label = "Demon Form",
16171617
incrementalEffectiveness = 0.054999999701977,
16181618
statDescriptionScope = "demon_transformation",
1619+
statMap = {
1620+
["demon_form_spell_damage_+%_final_per_stack"] = {
1621+
mod("Damage", "MORE", nil, 0, KeywordFlag.Spell, { type = "Condition", var = "DemonForm" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Demon Form"}, { type = "Multiplier", var = "DemonFlameStacks", limitVar = "DemonFlameMaximum" } ),
1622+
},
1623+
["demon_form_grants_cast_speed_+%"] = {
1624+
mod("Speed", "INC", nil, ModFlag.Cast, 0, { type = "Condition", var = "DemonForm" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Demon Form" } ),
1625+
},
1626+
["demon_form_life_loss_per_minute_per_stack"] = {
1627+
mod("LifeDegen", "BASE", nil, 0, 0, { type = "Condition", var = "DemonForm" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Demon Form" }, { type = "Multiplier", var = "DemonFlameStacks", limitVar = "DemonFlameMaximum" } ),
1628+
div = 60,
1629+
},
1630+
},
16191631
baseFlags = {
16201632
},
16211633
constantStats = {

src/Export/Skills/other.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,18 @@ statMap = {
112112
#skill DemonFormPlayer
113113
#set DemonFormPlayer
114114
#flags
115+
statMap = {
116+
["demon_form_spell_damage_+%_final_per_stack"] = {
117+
mod("Damage", "MORE", nil, 0, KeywordFlag.Spell, { type = "Condition", var = "DemonForm" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Demon Form"}, { type = "Multiplier", var = "DemonFlameStacks", limitVar = "DemonFlameMaximum" } ),
118+
},
119+
["demon_form_grants_cast_speed_+%"] = {
120+
mod("Speed", "INC", nil, ModFlag.Cast, 0, { type = "Condition", var = "DemonForm" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Demon Form" } ),
121+
},
122+
["demon_form_life_loss_per_minute_per_stack"] = {
123+
mod("LifeDegen", "BASE", nil, 0, 0, { type = "Condition", var = "DemonForm" }, { type = "GlobalEffect", effectType = "Buff", effectName = "Demon Form" }, { type = "Multiplier", var = "DemonFlameStacks", limitVar = "DemonFlameMaximum" } ),
124+
div = 60,
125+
},
126+
},
115127
#mods
116128
#skillEnd
117129

src/Modules/CalcDefence.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1624,7 +1624,7 @@ function calcs.defence(env, actor)
16241624
output[resource.."Regen"] = regenRate
16251625
end
16261626
output[resource.."RegenInc"] = inc
1627-
local baseDegen = (modDB:Sum("BASE", nil, resource.."Degen") + pool * modDB:Sum("BASE", nil, resource.."DegenPercent") / 100)
1627+
local baseDegen = modDB:Sum("BASE", nil, resource.."Degen") + pool * modDB:Sum("BASE", nil, resource.."DegenPercent") / 100
16281628
local degenRate = (baseDegen > 0) and baseDegen * calcLib.mod(modDB, nil, resource.."Degen") or 0
16291629
output[resource.."Degen"] = degenRate
16301630
local recoveryRate = modDB:Sum("BASE", nil, resource.."Recovery") * recoveryRateMod

src/Modules/CalcSetup.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,7 @@ function calcs.initEnv(build, mode, override, specEnv)
595595
modDB:NewMod("MaximumValour", "BASE", 50, "Base")
596596
modDB:NewMod("SoulEaterMax", "BASE", 45, "Base")
597597
modDB:NewMod("Multiplier:IntensityLimit", "BASE", 3, "Base")
598+
modDB:NewMod("Multiplier:DemonFlameMaximum", "BASE", 10, "Base")
598599
modDB:NewMod("Damage", "INC", data.characterConstants["damage_+%_per_10_rampage_stacks"], "Base", { type = "Multiplier", var = "Rampage", limit = data.characterConstants["max_rampage_stacks"] / 20, div = 20 })
599600
modDB:NewMod("MovementSpeed", "INC", data.characterConstants["movement_velocity_+%_per_10_rampage_stacks"], "Base", { type = "Multiplier", var = "Rampage", limit = data.characterConstants["max_rampage_stacks"] / 20, div = 20 })
600601
modDB:NewMod("Speed", "INC", 5, "Base", ModFlag.Attack, { type = "Multiplier", var = "SoulEater"})

src/Modules/ConfigOptions.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,13 @@ local configSettings = {
335335
{ 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)
336336
modList:NewMod("SkillData", "LIST", { key = "skeletonLife", value = val }, "Config", { type = "SkillName", skillName = "Dark Pact" })
337337
end },
338+
{ label = "Demon Form:", ifSkill = "Demon Form" },
339+
{ var = "inDemonForm", type = "check", label = "Are you in Demon Form?", ifSkill = "Demon Form", defaultState = true, tooltip = "Players need a minimum of 2 ^xE05030Life ^7to enter Demon Form, so you cannot use it with Chaos Inoculation", apply = function(val, modList, enemyModList)
340+
modList:NewMod("Condition:DemonForm", "FLAG", true, "Config", { type = "StatThreshold", stat = "Life", threshold = 2 })
341+
end },
342+
{ var = "demonFormStacks", type = "count", label = "Demonflame Stacks", ifSkill = "Demon Form", defaultPlaceholderState = 10, apply = function(val, modList, enemyModList)
343+
modList:NewMod("Multiplier:DemonFlameStacks", "BASE", val, "Config", { type = "Condition", var = "DemonForm" } )
344+
end },
338345
{ label = "Doom Blast:", ifSkill = "Doom Blast" },
339346
{ 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},
340347
{ var = "curseOverlaps", type = "count", label = "Curse overlaps:", ifSkill = "Doom Blast", ifFlag = "UsesCurseOverlaps", apply = function(val, modList, enemyModList)

src/Modules/ModParser.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3096,6 +3096,8 @@ local specialModList = {
30963096
mod("Speed", "MORE", num, nil, ModFlag.Cast, { type = "GlobalEffect", effectType = "Buff", effectName = "Quicksand Hourglass" }, { type = "Condition", var = "QuicksandHourglass" }),
30973097
flag("Condition:CanGainQuicksandHourglass")
30983098
} end,
3099+
-- Witch -- Infernalist
3100+
["demonflame has no maximum"] = { mod("Multiplier:DemonFlameMaximum", "BASE", 999) },
30993101
-- Item local modifiers
31003102
["has no sockets"] = { flag("NoSockets") },
31013103
["reflects your other ring"] = {

src/Modules/StatDescriber.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ local function applySpecial(val, spec)
136136
val[spec.v].max = val[spec.v].max / 1000
137137
val[spec.v].fmt = "g"
138138
elseif spec.k == "per_minute_to_per_second" then
139-
val[spec.v].min = val[spec.v].min / 60
140-
val[spec.v].max = val[spec.v].max / 60
139+
val[spec.v].min = floor(val[spec.v].min / 60, 1)
140+
val[spec.v].max = floor(val[spec.v].max / 60, 1)
141141
val[spec.v].fmt = "g"
142142
elseif spec.k == "per_minute_to_per_second_0dp" then
143143
val[spec.v].min = round(val[spec.v].min / 60)

0 commit comments

Comments
 (0)