From 919c7aa8d3f6693753ed7038f9c765355ed29db0 Mon Sep 17 00:00:00 2001 From: PJacek Date: Sat, 6 Sep 2025 14:12:01 +0200 Subject: [PATCH] Add support for detonation time --- src/Data/ModCache.lua | 7 +++---- src/Data/SkillStatMap.lua | 7 +++++++ src/Data/Skills/sup_str.lua | 8 ++++++++ src/Export/Skills/sup_str.txt | 8 ++++++++ src/Modules/CalcOffence.lua | 15 +++++++++++++++ src/Modules/CalcSections.lua | 1 + src/Modules/ModParser.lua | 2 ++ 7 files changed, 44 insertions(+), 4 deletions(-) diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index c68a19fa2c..3c9a155896 100755 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -1569,7 +1569,7 @@ c["15% reduced Cold Damage"]={{[1]={flags=0,keywordFlags=0,name="ColdDamage",typ c["15% reduced Duration of Ailments on You"]={{[1]={flags=0,keywordFlags=0,name="SelfAilmentDuration",type="INC",value=-15}},nil} c["15% reduced Energy Shield Recharge Rate"]={{[1]={flags=0,keywordFlags=0,name="EnergyShieldRecharge",type="INC",value=-15}},nil} c["15% reduced Flask Charges used"]={{[1]={flags=0,keywordFlags=0,name="FlaskChargesUsed",type="INC",value=-15}},nil} -c["15% reduced Grenade Detonation Time"]={{}," Detonation Time "} +c["15% reduced Grenade Detonation Time"]={{[1]={[1]={skillType=158,type="SkillType"},flags=0,keywordFlags=0,name="DetonationTime",type="INC",value=-15}},nil} c["15% reduced Magnitude of Ignite on you"]={{[1]={flags=0,keywordFlags=0,name="SelfIgniteEffect",type="INC",value=-15}},nil} c["15% reduced Movement Speed Penalty while Actively Blocking"]={{[1]={flags=0,keywordFlags=0,name="MovementSpeed",type="INC",value=-15}}," Penalty ly Blocking "} c["15% reduced Presence Area of Effect"]={{[1]={flags=0,keywordFlags=0,name="PresenceArea",type="INC",value=-15}},nil} @@ -2133,7 +2133,7 @@ c["25% reduced Flask Life Recovery rate"]={{[1]={flags=0,keywordFlags=0,name="Fl c["25% reduced Flask Mana Recovery rate"]={{[1]={flags=0,keywordFlags=0,name="FlaskManaRecoveryRate",type="INC",value=-25}},nil} c["25% reduced Freeze Duration on you"]={{[1]={flags=0,keywordFlags=0,name="SelfFreezeDuration",type="INC",value=-25}},nil} c["25% reduced Global Defences"]={{[1]={[1]={type="Global"},flags=0,keywordFlags=0,name="Defences",type="INC",value=-25}},nil} -c["25% reduced Grenade Detonation Time"]={{}," Detonation Time "} +c["25% reduced Grenade Detonation Time"]={{[1]={[1]={skillType=158,type="SkillType"},flags=0,keywordFlags=0,name="DetonationTime",type="INC",value=-25}},nil} c["25% reduced Ignite Duration on you"]={{[1]={flags=0,keywordFlags=0,name="SelfIgniteDuration",type="INC",value=-25}},nil} c["25% reduced Light Radius"]={{[1]={flags=0,keywordFlags=0,name="LightRadius",type="INC",value=-25}},nil} 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} @@ -2792,8 +2792,7 @@ c["50% increased Flask Mana Recovery rate"]={{[1]={flags=0,keywordFlags=0,name=" c["50% increased Freeze Buildup"]={{}," Freeze Buildup "} 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 "} 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 "} -c["50% increased Grenade Detonation Time"]={{}," Detonation Time "} -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 "} +c["50% increased Grenade Detonation Time"]={{[1]={[1]={skillType=158,type="SkillType"},flags=0,keywordFlags=0,name="DetonationTime",type="INC",value=50}},nil} c["50% increased Hazard Area of Effect"]={{[1]={[1]={skillType=203,type="SkillType"},flags=0,keywordFlags=0,name="AreaOfEffect",type="INC",value=50}},nil} c["50% increased Ignite Magnitude"]={{[1]={flags=0,keywordFlags=8388608,name="AilmentMagnitude",type="INC",value=50}},nil} c["50% increased Immobilisation buildup against Constructs"]={{}," Immobilisation buildup against Constructs "} diff --git a/src/Data/SkillStatMap.lua b/src/Data/SkillStatMap.lua index 7f94fa495e..bc57cbf571 100644 --- a/src/Data/SkillStatMap.lua +++ b/src/Data/SkillStatMap.lua @@ -698,6 +698,13 @@ return { ["base_bleed_duration_+%"] = { mod("EnemyBleedDuration", "INC", nil), }, +["base_skill_detonation_time"] = { + mod("DetonationTime", "BASE", nil), + div = 1000, +}, +["skill_detonation_time_+%"] = { + mod("DetonationTime", "INC", nil), +}, -- Damage ["damage_+%"] = { mod("Damage", "INC", nil), diff --git a/src/Data/Skills/sup_str.lua b/src/Data/Skills/sup_str.lua index 251d94f7fd..420a4edb44 100644 --- a/src/Data/Skills/sup_str.lua +++ b/src/Data/Skills/sup_str.lua @@ -5718,6 +5718,11 @@ skills["SupportShortFusePlayer"] = { label = "Short Fuse I", incrementalEffectiveness = 0.054999999701977, statDescriptionScope = "gem_stat_descriptions", + statMap = { + ["support_fast_forward_detonation_time_+%_final"] = { + mod("DetonationTime", "MORE", nil), + }, + }, baseFlags = { }, constantStats = { @@ -5749,6 +5754,9 @@ skills["SupportShortFusePlayerTwo"] = { incrementalEffectiveness = 0.054999999701977, statDescriptionScope = "gem_stat_descriptions", statMap = { + ["support_fast_forward_detonation_time_+%_final"] = { + mod("DetonationTime", "MORE", nil), + }, ["support_short_fuse_damage_+%_final"] = { mod("Damage", "MORE", nil), }, diff --git a/src/Export/Skills/sup_str.txt b/src/Export/Skills/sup_str.txt index fc156b09e8..71d5841fed 100644 --- a/src/Export/Skills/sup_str.txt +++ b/src/Export/Skills/sup_str.txt @@ -1299,12 +1299,20 @@ statMap = { #skill SupportShortFusePlayer #set SupportShortFusePlayer +statMap = { + ["support_fast_forward_detonation_time_+%_final"] = { + mod("DetonationTime", "MORE", nil), + }, +}, #mods #skillEnd #skill SupportShortFusePlayerTwo #set SupportShortFusePlayerTwo statMap = { + ["support_fast_forward_detonation_time_+%_final"] = { + mod("DetonationTime", "MORE", nil), + }, ["support_short_fuse_damage_+%_final"] = { mod("Damage", "MORE", nil), }, diff --git a/src/Modules/CalcOffence.lua b/src/Modules/CalcOffence.lua index d7a745415f..787420641f 100644 --- a/src/Modules/CalcOffence.lua +++ b/src/Modules/CalcOffence.lua @@ -1817,6 +1817,21 @@ function calcs.offence(env, actor, activeSkill) end end + if activeSkill.skillTypes[SkillType.DetonatesAfterTime] then + local base = activeSkill.skillModList:Sum("BASE", skillCfg, "DetonationTime") + local inc, more = calcLib.mods(skillModList, skillCfg, "DetonationTime") + output.DetonationTime = base * inc * more + if breakdown then + breakdown.DetonationTime = { } + breakdown.multiChain(breakdown.DetonationTime, { + base = { "%.2fs ^8(base)", base }, + { "%.2f ^8(increased/reduced detonation time)", inc }, + { "%.2f ^8(more/less detonation time)", more }, + total = s_format("= %.2fs", output.DetonationTime), + }) + end + end + -- Calculate costs (may be slightly off due to rounding differences) local costs = { ["Mana"] = { type = "Mana", upfront = true, percent = false, text = "mana", baseCost = 0, baseCostRaw = 0, totalCost = 0, baseCostNoMult = 0, finalBaseCost = 0 }, diff --git a/src/Modules/CalcSections.lua b/src/Modules/CalcSections.lua index 59b630cabb..7ab4bad9ce 100644 --- a/src/Modules/CalcSections.lua +++ b/src/Modules/CalcSections.lua @@ -673,6 +673,7 @@ return { { label = "Aura Uptime", haveOutput = "AuraDurationUptime", { format = "{2:output:AuraDurationUptime}%", { breakdown = "AuraDurationUptime" }, }, }, { label = "Reserve Uptime", haveOutput = "ReserveDurationUptime", { format = "{2:output:ReserveDurationUptime}%", { breakdown = "ReserveDurationUptime" }, }, }, { label = "Sustainable Trauma", haveOutput = "SustainableTrauma", { format = "{0:output:SustainableTrauma}", { breakdown = "SustainableTrauma" }, { modName = { "ExtraTrauma", "RepeatCount", "Duration", "PrimaryDuration", "SecondaryDuration", "DamagingAilmentDuration"}, cfg = "skill" }, }, }, + { label = "Detonation Time", haveOutput = "DetonationTime", { format = "{3:output:DetonationTime}s", { breakdown = "DetonationTime" }, { modName = { "DetonationTime" }, cfg = "skill" } }}, { label = "Repeat Count", haveOutput = "RepeatCount", { format = "{output:Repeats}", { modName = { "RepeatCount" }, cfg = "skill" }, }, }, { label = "Projectile Count", flag = "projectile", { format = "{output:ProjectileCount}", { modName = { "NoAdditionalProjectiles" , "ProjectileCount" }, cfg = "skill" }, }, }, { label = "2 Add. Proj. Chance", haveOutput = "TwoAdditionalProjectiles", { format = "{output:TwoAdditionalProjectiles}%", { modName = { "TwoAdditionalProjectilesChance", "NoAdditionalProjectiles" }, cfg = "skill" }, }, }, diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 70353de369..58916accb1 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -601,6 +601,8 @@ local modNameList = { ["duration"] = "Duration", ["skill effect duration"] = "Duration", ["fuse duration"] = "Duration", + ["detonation time"] = "DetonationTime", + ["grenade detonation time"] = { "DetonationTime", tag = { type = "SkillType", skillType = SkillType.Grenade } }, ["chaos skill effect duration"] = { "Duration", keywordFlags = KeywordFlag.Chaos }, ["soul gain prevention duration"] = "SoulGainPreventionDuration", ["aspect of the spider debuff duration"] = { "Duration", tag = { type = "SkillName", skillName = "Aspect of the Spider" } },