Skip to content

Commit 515a651

Browse files
authored
Add support for more int support gems and curse delay (#169)
* Add support for Mana Flare and make current mana config generic. * Add support for Minion Instability * Add support for Minion Pact * Add support for curse delay
1 parent aec977b commit 515a651

File tree

10 files changed

+158
-13
lines changed

10 files changed

+158
-13
lines changed

src/Data/ModCache.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ c["10% chance to inflict Bleeding on Critical Hit with Attacks"]={{[1]={[1]={typ
575575
c["10% chance to inflict Bleeding on Hit"]={{[1]={flags=0,keywordFlags=0,name="BleedChance",type="BASE",value=10}},nil}
576576
c["10% chance to refresh Ignite Duration on Critical Hit"]={{[1]={[1]={type="Condition",var="CriticalStrike"},flags=0,keywordFlags=0,name="EnemyIgniteDuration",type="BASE",value=10}}," to refresh "}
577577
c["10% chance when a Charm is used to use another Charm without consuming Charges"]={{[1]={flags=0,keywordFlags=0,name="FlaskCharges",type="BASE",value=10}}," when a Charm is used to use another Charm without consuming "}
578-
c["10% faster Curse Activation"]={{}," Curse Activation "}
578+
c["10% faster Curse Activation"]={{[1]={flags=0,keywordFlags=0,name="CurseFrequency",type="INC",value=10}},nil}
579579
c["10% increased Accuracy Rating"]={{[1]={flags=0,keywordFlags=0,name="Accuracy",type="INC",value=10}},nil}
580580
c["10% increased Accuracy Rating while Dual Wielding"]={{[1]={[1]={type="Condition",var="DualWielding"},flags=0,keywordFlags=0,name="Accuracy",type="INC",value=10}},nil}
581581
c["10% increased Accuracy Rating with Bows"]={{[1]={flags=131076,keywordFlags=0,name="Accuracy",type="INC",value=10}},nil}
@@ -1616,8 +1616,7 @@ c["4.6 Life Regeneration per second"]={{[1]={flags=0,keywordFlags=0,name="LifeRe
16161616
c["40% chance to Avoid Chaos Damage from Hits"]={{[1]={flags=0,keywordFlags=0,name="ChaosDamage",type="BASE",value=40}}," to Avoid from Hits "}
16171617
c["40% chance to Avoid Chaos Damage from Hits Enemies in your Presence are Intimidated"]={{[1]={flags=0,keywordFlags=0,name="ChaosDamage",type="BASE",value=40}}," to Avoid from Hits Enemies in your Presence are Intimidated "}
16181618
c["40% chance to Avoid Physical Damage from Hits"]={{[1]={flags=0,keywordFlags=0,name="AvoidPhysicalDamageChance",type="BASE",value=40}},nil}
1619-
c["40% faster Curse Activation"]={{}," Curse Activation "}
1620-
c["40% faster Curse Activation Your Curses have 20% increased Effect if 50% of Curse Duration expired"]={{[1]={[1]={actor="enemy",threshold=50,type="MultiplierThreshold",var="CurseExpired"},flags=0,keywordFlags=0,name="LocalEffect",type="INC",value=40}}," Curse Activation Your Curses have 20% increased "}
1619+
c["40% faster Curse Activation"]={{[1]={flags=0,keywordFlags=0,name="CurseFrequency",type="INC",value=40}},nil}
16211620
c["40% faster start of Energy Shield Recharge"]={{[1]={flags=0,keywordFlags=0,name="EnergyShieldRechargeFaster",type="INC",value=40}},nil}
16221621
c["40% increased Accuracy Rating at Close Range"]={{[1]={[1]={type="Condition",var="AtCloseRange"},flags=0,keywordFlags=0,name="AccuracyVsEnemy",type="INC",value=40}},nil}
16231622
c["40% increased Aftershock Area of Effect"]={{[1]={flags=0,keywordFlags=0,name="AreaOfEffect",type="INC",value=40}}," Aftershock "}
@@ -2297,7 +2296,7 @@ c["Dodge Roll avoids all Hits 10% less Movement and Skill Speed per Dodge Roll i
22972296
c["Dodge Roll cannot Avoid Damage"]={nil,"Dodge Roll cannot Avoid Damage "}
22982297
c["Dodge Roll cannot Avoid Damage Take 30% less Damage from Hits while Dodge Rolling"]={nil,"Dodge Roll cannot Avoid Damage Take 30% less Damage from Hits while Dodge Rolling "}
22992298
c["Dodge Roll passes through Enemies"]={nil,"Dodge Roll passes through Enemies "}
2300-
c["Double Activation Delay of Curses"]={nil,"Double Activation Delay of Curses "}
2299+
c["Double Activation Delay of Curses"]={{[1]={flags=0,keywordFlags=0,name="CurseDelay",type="MORE",value=100}},nil}
23012300
c["Double Stun Threshold while Shield is Raised"]={nil,"Double Stun Threshold while Shield is Raised "}
23022301
c["Double the number of your Poisons that targets can be affected by at the same time"]={{[1]={flags=0,keywordFlags=0,name="PoisonCanStack",type="FLAG",value=true},[2]={flags=0,keywordFlags=0,name="PoisonStacks",type="MORE",value=100}},nil}
23032302
c["Drop Ignited Ground while moving, which lasts 8 seconds and Ignites as though dealing Fire Damage equal to 10% of your maximum Life"]={nil,"Drop Ignited Ground while moving, which lasts 8 seconds and Ignites as though dealing Fire Damage equal to 10% of your maximum Life "}

src/Data/SkillStatMap.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,6 +2130,13 @@ return {
21302130
["curse_cast_speed_+%"] = {
21312131
mod("Speed", "INC", nil, ModFlag.Cast),
21322132
},
2133+
["curse_delay_duration_ms"] = {
2134+
skill("curseDelay", nil),
2135+
div = 1000,
2136+
},
2137+
["base_curse_delay_+%"] = {
2138+
mod("CurseFrequency", "INC", nil),
2139+
},
21332140
-- Hex
21342141
["curse_maximum_doom"] = {
21352142
mod("MaxDoom", "BASE", nil),

src/Data/Skills/minion.lua

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,4 +899,39 @@ skills["MPSAncestralTotemSpiritSoulCasterProjectile"] = {
899899
},
900900
},
901901
}
902-
}
902+
}
903+
skills["MinionInstability"] = {
904+
name = "Minion Instability",
905+
hidden = true,
906+
skillTypes = { [SkillType.Damage] = true, },
907+
qualityStats = {
908+
},
909+
levels = {
910+
[1] = { levelRequirement = 0, },
911+
},
912+
preDamageFunc = function(activeSkill, output)
913+
local skillData = activeSkill.skillData
914+
skillData.FireBonusMin = output.Life * skillData.selfFireExplosionLifeMultiplier
915+
skillData.FireBonusMax = output.Life * skillData.selfFireExplosionLifeMultiplier
916+
end,
917+
statSets = {
918+
[1] = {
919+
label = "Minion Instability",
920+
incrementalEffectiveness = 0,
921+
statDescriptionScope = "skill_stat_descriptions",
922+
baseFlags = {
923+
},
924+
baseMods = {
925+
skill("selfFireExplosionLifeMultiplier", 0.01, { type = "Multiplier", var = "MinionInstabilityBaseDamage" }),
926+
skill("showAverage", true),
927+
},
928+
constantStats = {
929+
},
930+
stats = {
931+
},
932+
levels = {
933+
[1] = { },
934+
},
935+
},
936+
}
937+
}

src/Data/Skills/sup_int.lua

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,15 +1969,18 @@ skills["ViciousHexSupportPlayer"] = {
19691969
statDescriptionScope = "skill_stat_descriptions",
19701970
statMap = {
19711971
["impending_doom_base_added_chaos_damage_%_of_current_mana"] = {
1972-
mod("ChaosMin", "BASE", nil, 0, 0, { type = "PercentStat", stat = "Mana", percentVar = "DoomBlastManaPercentage" }),
1973-
mod("ChaosMax", "BASE", nil, 0, 0, { type = "PercentStat", stat = "Mana", percentVar = "DoomBlastManaPercentage" }),
1972+
mod("ChaosMin", "BASE", nil, 0, 0, { type = "PercentStat", stat = "Mana", percentVar = "CurrentManaPercentage" }),
1973+
mod("ChaosMax", "BASE", nil, 0, 0, { type = "PercentStat", stat = "Mana", percentVar = "CurrentManaPercentage" }),
19741974
div = 100,
19751975
},
19761976
},
19771977
baseFlags = {
19781978
spell = true,
19791979
area = true,
19801980
},
1981+
baseMods = {
1982+
skill("currentManaPercentage", true),
1983+
},
19811984
constantStats = {
19821985
{ "impending_doom_base_added_chaos_damage_%_of_current_mana", 15 },
19831986
{ "active_skill_base_area_of_effect_radius", 20 },
@@ -2222,7 +2225,18 @@ skills["SupportManaFlarePlayer"] = {
22222225
label = "Mana Flare",
22232226
incrementalEffectiveness = 0.054999999701977,
22242227
statDescriptionScope = "skill_stat_descriptions",
2228+
statMap = {
2229+
["support_mana_flare_%_of_current_mana_consumed"] = {
2230+
mod("FireMin", "BASE", nil, 0, 0, { type = "PercentStat", stat = "Mana", percentVar = "CurrentManaPercentage" }),
2231+
mod("FireMax", "BASE", nil, 0, 0, { type = "PercentStat", stat = "Mana", percentVar = "CurrentManaPercentage" }),
2232+
div = 100,
2233+
},
2234+
},
22252235
baseFlags = {
2236+
spell = true,
2237+
},
2238+
baseMods = {
2239+
skill("currentManaPercentage", true),
22262240
},
22272241
constantStats = {
22282242
{ "triggered_by_mana_flare_support_%", 100 },
@@ -2253,6 +2267,12 @@ skills["SupportMinionInstabilityPlayer"] = {
22532267
label = "Minion Instability",
22542268
incrementalEffectiveness = 0.054999999701977,
22552269
statDescriptionScope = "gem_stat_descriptions",
2270+
statMap = {
2271+
["explode_on_low_life_%_maximum_life_to_deal"] = {
2272+
mod("MinionModifier", "LIST", { mod = mod("Multiplier:MinionInstabilityBaseDamage", "BASE", nil) }),
2273+
mod("ExtraMinionSkill", "LIST", { skillId = "MinionInstability" }),
2274+
},
2275+
},
22562276
baseFlags = {
22572277
},
22582278
constantStats = {
@@ -2312,6 +2332,11 @@ skills["SupportMinionPactPlayer"] = {
23122332
label = "Minion Pact",
23132333
incrementalEffectiveness = 0.054999999701977,
23142334
statDescriptionScope = "gem_stat_descriptions",
2335+
statMap = {
2336+
["support_minion_pact_damage_+%_final"] = {
2337+
mod("Damage", "MORE", nil),
2338+
},
2339+
},
23152340
baseFlags = {
23162341
},
23172342
constantStats = {

src/Export/Skills/minion.txt

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,40 @@ local skills, mod, flag, skill = ...
137137
#set MPSAncestralTotemSpiritSoulCasterProjectile
138138
#flags spell projectile
139139
#mods
140-
#skillEnd
140+
#skillEnd
141+
142+
skills["MinionInstability"] = {
143+
name = "Minion Instability",
144+
hidden = true,
145+
skillTypes = { [SkillType.Damage] = true, },
146+
qualityStats = {
147+
},
148+
levels = {
149+
[1] = { levelRequirement = 0, },
150+
},
151+
preDamageFunc = function(activeSkill, output)
152+
local skillData = activeSkill.skillData
153+
skillData.FireBonusMin = output.Life * skillData.selfFireExplosionLifeMultiplier
154+
skillData.FireBonusMax = output.Life * skillData.selfFireExplosionLifeMultiplier
155+
end,
156+
statSets = {
157+
[1] = {
158+
label = "Minion Instability",
159+
incrementalEffectiveness = 0,
160+
statDescriptionScope = "skill_stat_descriptions",
161+
baseFlags = {
162+
},
163+
baseMods = {
164+
skill("selfFireExplosionLifeMultiplier", 0.01, { type = "Multiplier", var = "MinionInstabilityBaseDamage" }),
165+
skill("showAverage", true),
166+
},
167+
constantStats = {
168+
},
169+
stats = {
170+
},
171+
levels = {
172+
[1] = { },
173+
},
174+
},
175+
}
176+
}

src/Export/Skills/sup_int.txt

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,10 +504,11 @@ statMap = {
504504
#startSets
505505
#set DoomBlastPlayer
506506
#flags spell area
507+
#baseMod skill("currentManaPercentage", true)
507508
statMap = {
508509
["impending_doom_base_added_chaos_damage_%_of_current_mana"] = {
509-
mod("ChaosMin", "BASE", nil, 0, 0, { type = "PercentStat", stat = "Mana", percentVar = "DoomBlastManaPercentage" }),
510-
mod("ChaosMax", "BASE", nil, 0, 0, { type = "PercentStat", stat = "Mana", percentVar = "DoomBlastManaPercentage" }),
510+
mod("ChaosMin", "BASE", nil, 0, 0, { type = "PercentStat", stat = "Mana", percentVar = "CurrentManaPercentage" }),
511+
mod("ChaosMax", "BASE", nil, 0, 0, { type = "PercentStat", stat = "Mana", percentVar = "CurrentManaPercentage" }),
511512
div = 100,
512513
},
513514
},
@@ -566,12 +567,27 @@ statMap = {
566567
#skill TriggeredManaFlarePlayer
567568
#startSets
568569
#set TriggeredManaFlarePlayer
570+
#flags spell
571+
#baseMod skill("currentManaPercentage", true)
572+
statMap = {
573+
["support_mana_flare_%_of_current_mana_consumed"] = {
574+
mod("FireMin", "BASE", nil, 0, 0, { type = "PercentStat", stat = "Mana", percentVar = "CurrentManaPercentage" }),
575+
mod("FireMax", "BASE", nil, 0, 0, { type = "PercentStat", stat = "Mana", percentVar = "CurrentManaPercentage" }),
576+
div = 100,
577+
},
578+
},
569579
#mods
570580
#skillEnd
571581

572582
#skill SupportMinionInstabilityPlayer
573583
#startSets
574584
#set SupportMinionInstabilityPlayer
585+
statMap = {
586+
["explode_on_low_life_%_maximum_life_to_deal"] = {
587+
mod("MinionModifier", "LIST", { mod = mod("Multiplier:MinionInstabilityBaseDamage", "BASE", nil) }),
588+
mod("ExtraMinionSkill", "LIST", { skillId = "MinionInstability" }),
589+
},
590+
},
575591
#mods
576592
#skillEnd
577593

@@ -584,6 +600,11 @@ statMap = {
584600
#skill SupportMinionPactPlayer
585601
#startSets
586602
#set SupportMinionPactPlayer
603+
statMap = {
604+
["support_minion_pact_damage_+%_final"] = {
605+
mod("Damage", "MORE", nil),
606+
},
607+
},
587608
#mods
588609
#skillEnd
589610

src/Modules/CalcOffence.lua

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,6 +1121,25 @@ function calcs.offence(env, actor, activeSkill)
11211121
if breakdown then
11221122
breakdown.CurseEffectMod = breakdown.mod(skillModList, skillCfg, "CurseEffect")
11231123
end
1124+
1125+
local curseFrequencyMod = calcLib.mod(skillModList, skillCfg, "CurseFrequency")
1126+
local curseDelayMod = calcLib.mod(skillModList, skillCfg, "CurseDelay")
1127+
local delayBase = (skillData.curseDelay or 0) + skillModList:Sum("BASE", skillCfg, "CurseDelay")
1128+
output.CurseDelay = delayBase / curseFrequencyMod * curseDelayMod
1129+
output.CurseDelay = m_ceil(output.CurseDelay * data.misc.ServerTickRate) / data.misc.ServerTickRate
1130+
if breakdown and output.CurseDelay ~= delayBase then
1131+
breakdown.CurseDelay = {
1132+
s_format("%.2fs ^8(base)", delayBase),
1133+
}
1134+
if curseFrequencyMod ~= 1 then
1135+
t_insert(breakdown.CurseDelay, s_format("x %.4f ^8(frequency modifier)", curseFrequencyMod))
1136+
end
1137+
if curseDelayMod ~= 1 then
1138+
t_insert(breakdown.CurseDelay, s_format("x %.4f ^8(delay modifier)", curseDelayMod))
1139+
end
1140+
t_insert(breakdown.CurseDelay, s_format("rounded up to nearest server tick"))
1141+
t_insert(breakdown.CurseDelay, s_format("= %.3fs", output.CurseDelay))
1142+
end
11241143
end
11251144
if activeSkill.skillTypes[SkillType.Mark] then
11261145
output.MarkEffectMod = calcLib.mod(skillModList, skillCfg, "MarkEffect")

src/Modules/CalcSections.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,7 @@ return {
693693
{ breakdown = "CurseEffectMod" },
694694
{ modName = "CurseEffect", cfg = "skill" },
695695
}, },
696+
{ label = "Curse Delay", haveOutput = "CurseDelay", { format = "{3:output:CurseDelay}s", { breakdown = "CurseDelay" }, { modName = { "CurseFrequency" }, cfg = "skill" }, { modName = { "CurseDelay" }, cfg = "skill" } }, },
696697
{ label = "Curse Limit", haveOutput = "CurseEffectMod", { format = "{0:output:EnemyCurseLimit}",
697698
{ breakdown = "EnemyCurseLimit" },
698699
{ modName = { "CurseLimitIsMaximumPowerCharges", "EnemyCurseLimit" } },

src/Modules/ConfigOptions.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ local configSettings = {
103103
{ var = "detonateDeadCorpseLife", type = "count", label = "Enemy Corpse ^xE05030Life:", ifSkillData = "explodeCorpse", tooltip = "Sets the maximum ^xE05030life ^7of the target corpse for Detonate Dead and similar skills.\nFor reference, a level 70 monster has "..data.monsterLifeTable[70].." base ^xE05030life^7, and a level 80 monster has "..data.monsterLifeTable[80]..".", apply = function(val, modList, enemyModList)
104104
modList:NewMod("SkillData", "LIST", { key = "corpseLife", value = val }, "Config")
105105
end },
106+
{ var = "multiplierCurrentManaPercentage", type = "count", label = "Current ^x7070FFMana^7 %:", ifSkillData = "currentManaPercentage", defaultState = 100, apply = function(val, modList, enemyModList)
107+
modList:NewMod("Multiplier:CurrentManaPercentage", "BASE", m_max(m_min(val,100), 0), "Config")
108+
end },
106109
{ var = "conditionStationary", type = "count", label = "Time spent stationary", ifCond = "Stationary",
107110
tooltip = "Applies mods that use `while stationary` and `per / every second while stationary`",
108111
apply = function(val, modList, enemyModList)
@@ -319,9 +322,6 @@ local configSettings = {
319322
{ var = "curseOverlaps", type = "count", label = "Curse overlaps:", ifSkill = "Doom Blast", ifFlag = "UsesCurseOverlaps", apply = function(val, modList, enemyModList)
320323
modList:NewMod("Multiplier:CurseOverlaps", "BASE", val, "Config", { type = "Condition", var = "Effective" })
321324
end },
322-
{ var = "doomBlastManaPercentage", type = "count", label = "Current ^x7070FFMana^7 %:", tooltip = "Ignores values outside the 0-100 range, defaults to 100% if not specified.", ifSkill = "Doom Blast", apply = function(val, modList, enemyModList)
323-
modList:NewMod("Multiplier:DoomBlastManaPercentage", "BASE", m_max(m_min(val,100), 0), "Config", { type = "SkillName", skillName = "Doom Blast" })
324-
end },
325325
{ label = "Embrace Madness:", ifSkill = "Embrace Madness" },
326326
{ var = "embraceMadnessActive", type = "check", label = "Is Embrace Madness active?", ifSkill = "Embrace Madness", apply = function(val, modList, enemyModList)
327327
modList:NewMod("Condition:AffectedByGloriousMadness", "FLAG", true, "Config")

src/Modules/ModParser.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,7 @@ local modNameList = {
610610
["metre to melee strike range"] = { "MeleeWeaponRangeMetre", "UnarmedRangeMetre" },
611611
["to deal double damage"] = "DoubleDamageChance",
612612
["to deal triple damage"] = "TripleDamageChance",
613+
["curse activation"] = "CurseFrequency",
613614
-- Effects
614615
["onslaught effect"] = "OnslaughtEffect",
615616
["effect of onslaught on you"] = "OnslaughtEffect",
@@ -3509,6 +3510,7 @@ local specialModList = {
35093510
["you can apply an additional curse while at maximum power charges"] = { mod("EnemyCurseLimit", "BASE", 1, { type = "StatThreshold", stat = "PowerCharges", thresholdStat = "PowerChargesMax" }) },
35103511
["you can apply one fewer curse"] = { mod("EnemyCurseLimit", "BASE", -1) },
35113512
["you can apply an additional mark"] = { mod("EnemyMarkLimit", "BASE", 1) },
3513+
["double activation delay of curses"] = { mod("CurseDelay", "MORE", 100) },
35123514
["curses on enemies in your chilling areas have (%d+)%% increased effect"] = function(num) return { mod("CurseEffect", "INC", num, { type = "ActorCondition", actor = "enemy", var = "InChillingArea" }) } end,
35133515
["hexes you inflict have their effect increased by twice their doom instead"] = { mod("DoomEffect", "MORE", 100) },
35143516
["nearby enemies have an additional (%d+)%% chance to receive a critical hit"] = function(num) return { mod("EnemyModifier", "LIST", { mod = mod("SelfExtraCritChance", "BASE", num) }) } end,

0 commit comments

Comments
 (0)