Skip to content

Commit 8ae323f

Browse files
authored
Add support for detonation time (#1319)
1 parent e17b74e commit 8ae323f

File tree

7 files changed

+44
-4
lines changed

7 files changed

+44
-4
lines changed

src/Data/ModCache.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,7 +1567,7 @@ c["15% reduced Cold Damage"]={{[1]={flags=0,keywordFlags=0,name="ColdDamage",typ
15671567
c["15% reduced Duration of Ailments on You"]={{[1]={flags=0,keywordFlags=0,name="SelfAilmentDuration",type="INC",value=-15}},nil}
15681568
c["15% reduced Energy Shield Recharge Rate"]={{[1]={flags=0,keywordFlags=0,name="EnergyShieldRecharge",type="INC",value=-15}},nil}
15691569
c["15% reduced Flask Charges used"]={{[1]={flags=0,keywordFlags=0,name="FlaskChargesUsed",type="INC",value=-15}},nil}
1570-
c["15% reduced Grenade Detonation Time"]={{}," Detonation Time "}
1570+
c["15% reduced Grenade Detonation Time"]={{[1]={[1]={skillType=158,type="SkillType"},flags=0,keywordFlags=0,name="DetonationTime",type="INC",value=-15}},nil}
15711571
c["15% reduced Magnitude of Ignite on you"]={{[1]={flags=0,keywordFlags=0,name="SelfIgniteEffect",type="INC",value=-15}},nil}
15721572
c["15% reduced Movement Speed Penalty while Actively Blocking"]={{[1]={flags=0,keywordFlags=0,name="MovementSpeed",type="INC",value=-15}}," Penalty ly Blocking "}
15731573
c["15% reduced Presence Area of Effect"]={{[1]={flags=0,keywordFlags=0,name="PresenceArea",type="INC",value=-15}},nil}
@@ -2128,7 +2128,7 @@ c["25% reduced Flask Life Recovery rate"]={{[1]={flags=0,keywordFlags=0,name="Fl
21282128
c["25% reduced Flask Mana Recovery rate"]={{[1]={flags=0,keywordFlags=0,name="FlaskManaRecoveryRate",type="INC",value=-25}},nil}
21292129
c["25% reduced Freeze Duration on you"]={{[1]={flags=0,keywordFlags=0,name="SelfFreezeDuration",type="INC",value=-25}},nil}
21302130
c["25% reduced Global Defences"]={{[1]={[1]={type="Global"},flags=0,keywordFlags=0,name="Defences",type="INC",value=-25}},nil}
2131-
c["25% reduced Grenade Detonation Time"]={{}," Detonation Time "}
2131+
c["25% reduced Grenade Detonation Time"]={{[1]={[1]={skillType=158,type="SkillType"},flags=0,keywordFlags=0,name="DetonationTime",type="INC",value=-25}},nil}
21322132
c["25% reduced Ignite Duration on you"]={{[1]={flags=0,keywordFlags=0,name="SelfIgniteDuration",type="INC",value=-25}},nil}
21332133
c["25% reduced Light Radius"]={{[1]={flags=0,keywordFlags=0,name="LightRadius",type="INC",value=-25}},nil}
21342134
c["25% reduced Mana Regeneration Rate while stationary"]={{[1]={[1]={type="Condition",var="Stationary"},flags=0,keywordFlags=0,name="ManaRegen",type="INC",value=-25}},nil}
@@ -2788,8 +2788,7 @@ c["50% increased Flask Mana Recovery rate"]={{[1]={flags=0,keywordFlags=0,name="
27882788
c["50% increased Freeze Buildup"]={{}," Freeze Buildup "}
27892789
c["50% increased Freeze Buildup 30% increased Chill Duration on Enemies"]={{[1]={flags=0,keywordFlags=0,name="EnemyChillDuration",type="INC",value=50}}," Freeze Buildup 30% increased "}
27902790
c["50% increased Freeze Buildup 30% increased Magnitude of Chill you inflict"]={{[1]={flags=0,keywordFlags=0,name="EnemyChillMagnitude",type="INC",value=50}}," Freeze Buildup 30% increased "}
2791-
c["50% increased Grenade Detonation Time"]={{}," Detonation Time "}
2792-
c["50% increased Grenade Detonation Time Grenade Skills Fire an additional Projectile"]={{[1]={[1]={skillType=158,type="SkillType"},flags=0,keywordFlags=0,name="ProjectileCount",type="INC",value=50}}," Detonation Time Grenade Skills Fire an additional "}
2791+
c["50% increased Grenade Detonation Time"]={{[1]={[1]={skillType=158,type="SkillType"},flags=0,keywordFlags=0,name="DetonationTime",type="INC",value=50}},nil}
27932792
c["50% increased Hazard Area of Effect"]={{[1]={[1]={skillType=203,type="SkillType"},flags=0,keywordFlags=0,name="AreaOfEffect",type="INC",value=50}},nil}
27942793
c["50% increased Ignite Magnitude"]={{[1]={flags=0,keywordFlags=8388608,name="AilmentMagnitude",type="INC",value=50}},nil}
27952794
c["50% increased Immobilisation buildup against Constructs"]={{}," Immobilisation buildup against Constructs "}

src/Data/SkillStatMap.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,13 @@ return {
698698
["base_bleed_duration_+%"] = {
699699
mod("EnemyBleedDuration", "INC", nil),
700700
},
701+
["base_skill_detonation_time"] = {
702+
mod("DetonationTime", "BASE", nil),
703+
div = 1000,
704+
},
705+
["skill_detonation_time_+%"] = {
706+
mod("DetonationTime", "INC", nil),
707+
},
701708
-- Damage
702709
["damage_+%"] = {
703710
mod("Damage", "INC", nil),

src/Data/Skills/sup_str.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5718,6 +5718,11 @@ skills["SupportShortFusePlayer"] = {
57185718
label = "Short Fuse I",
57195719
incrementalEffectiveness = 0.054999999701977,
57205720
statDescriptionScope = "gem_stat_descriptions",
5721+
statMap = {
5722+
["support_fast_forward_detonation_time_+%_final"] = {
5723+
mod("DetonationTime", "MORE", nil),
5724+
},
5725+
},
57215726
baseFlags = {
57225727
},
57235728
constantStats = {
@@ -5749,6 +5754,9 @@ skills["SupportShortFusePlayerTwo"] = {
57495754
incrementalEffectiveness = 0.054999999701977,
57505755
statDescriptionScope = "gem_stat_descriptions",
57515756
statMap = {
5757+
["support_fast_forward_detonation_time_+%_final"] = {
5758+
mod("DetonationTime", "MORE", nil),
5759+
},
57525760
["support_short_fuse_damage_+%_final"] = {
57535761
mod("Damage", "MORE", nil),
57545762
},

src/Export/Skills/sup_str.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,12 +1299,20 @@ statMap = {
12991299

13001300
#skill SupportShortFusePlayer
13011301
#set SupportShortFusePlayer
1302+
statMap = {
1303+
["support_fast_forward_detonation_time_+%_final"] = {
1304+
mod("DetonationTime", "MORE", nil),
1305+
},
1306+
},
13021307
#mods
13031308
#skillEnd
13041309

13051310
#skill SupportShortFusePlayerTwo
13061311
#set SupportShortFusePlayerTwo
13071312
statMap = {
1313+
["support_fast_forward_detonation_time_+%_final"] = {
1314+
mod("DetonationTime", "MORE", nil),
1315+
},
13081316
["support_short_fuse_damage_+%_final"] = {
13091317
mod("Damage", "MORE", nil),
13101318
},

src/Modules/CalcOffence.lua

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,6 +1822,21 @@ function calcs.offence(env, actor, activeSkill)
18221822
end
18231823
end
18241824

1825+
if activeSkill.skillTypes[SkillType.DetonatesAfterTime] then
1826+
local base = activeSkill.skillModList:Sum("BASE", skillCfg, "DetonationTime")
1827+
local inc, more = calcLib.mods(skillModList, skillCfg, "DetonationTime")
1828+
output.DetonationTime = base * inc * more
1829+
if breakdown then
1830+
breakdown.DetonationTime = { }
1831+
breakdown.multiChain(breakdown.DetonationTime, {
1832+
base = { "%.2fs ^8(base)", base },
1833+
{ "%.2f ^8(increased/reduced detonation time)", inc },
1834+
{ "%.2f ^8(more/less detonation time)", more },
1835+
total = s_format("= %.2fs", output.DetonationTime),
1836+
})
1837+
end
1838+
end
1839+
18251840
-- Calculate costs (may be slightly off due to rounding differences)
18261841
local costs = {
18271842
["Mana"] = { type = "Mana", upfront = true, percent = false, text = "mana", baseCost = 0, baseCostRaw = 0, totalCost = 0, baseCostNoMult = 0, finalBaseCost = 0 },

src/Modules/CalcSections.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,7 @@ return {
673673
{ label = "Aura Uptime", haveOutput = "AuraDurationUptime", { format = "{2:output:AuraDurationUptime}%", { breakdown = "AuraDurationUptime" }, }, },
674674
{ label = "Reserve Uptime", haveOutput = "ReserveDurationUptime", { format = "{2:output:ReserveDurationUptime}%", { breakdown = "ReserveDurationUptime" }, }, },
675675
{ label = "Sustainable Trauma", haveOutput = "SustainableTrauma", { format = "{0:output:SustainableTrauma}", { breakdown = "SustainableTrauma" }, { modName = { "ExtraTrauma", "RepeatCount", "Duration", "PrimaryDuration", "SecondaryDuration", "DamagingAilmentDuration"}, cfg = "skill" }, }, },
676+
{ label = "Detonation Time", haveOutput = "DetonationTime", { format = "{3:output:DetonationTime}s", { breakdown = "DetonationTime" }, { modName = { "DetonationTime" }, cfg = "skill" } }},
676677
{ label = "Repeat Count", haveOutput = "RepeatCount", { format = "{output:Repeats}", { modName = { "RepeatCount" }, cfg = "skill" }, }, },
677678
{ label = "Projectile Count", flag = "projectile", { format = "{output:ProjectileCount}", { modName = { "NoAdditionalProjectiles" , "ProjectileCount" }, cfg = "skill" }, }, },
678679
{ label = "2 Add. Proj. Chance", haveOutput = "TwoAdditionalProjectiles", { format = "{output:TwoAdditionalProjectiles}%", { modName = { "TwoAdditionalProjectilesChance", "NoAdditionalProjectiles" }, cfg = "skill" }, }, },

src/Modules/ModParser.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,8 @@ local modNameList = {
620620
["duration"] = "Duration",
621621
["skill effect duration"] = "Duration",
622622
["fuse duration"] = "Duration",
623+
["detonation time"] = "DetonationTime",
624+
["grenade detonation time"] = { "DetonationTime", tag = { type = "SkillType", skillType = SkillType.Grenade } },
623625
["chaos skill effect duration"] = { "Duration", keywordFlags = KeywordFlag.Chaos },
624626
["soul gain prevention duration"] = "SoulGainPreventionDuration",
625627
["aspect of the spider debuff duration"] = { "Duration", tag = { type = "SkillName", skillName = "Aspect of the Spider" } },

0 commit comments

Comments
 (0)