Skip to content

Commit df6ee1b

Browse files
author
LocalIdentity
committed
Fix to use uptime of seals
Fixes the calc to use the uptime for seals and fits it into the existing seal calc
1 parent 8c8047d commit df6ee1b

3 files changed

Lines changed: 19 additions & 16 deletions

File tree

src/Modules/CalcOffence.lua

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -409,15 +409,6 @@ function calcs.offence(env, actor, activeSkill)
409409
end
410410

411411
local function calcAreaOfEffect(skillModList, skillCfg, skillData, skillFlags, output, breakdown)
412-
-- Applies increased AoE based on seals count
413-
if skillModList:Flag(nil, "HasSeals") and skillModList:Flag(nil, "AreaSeal") and not skillModList:Flag(nil, "NoRepeatBonuses") then
414-
output.SealCooldown = activeSkill.activeEffect.grantedEffect.castTime * skillModList:Sum("BASE", skillCfg, "SealGainFrequency") / calcLib.mod(skillModList, skillCfg, "SealGainFrequency") / 100
415-
output.SealMax = skillModList:Sum("BASE", skillCfg, "SealCount")
416-
output.TimeMaxSeals = output.SealCooldown * output.SealMax
417-
local skillName = getSkillNameFromFlag(skillModList, "AreaSeal") or "Support"
418-
env.player.mainSkill.skillModList:NewMod("AreaOfEffect", "INC", (output.SealMax * (calcLib.mod(skillModList, skillCfg, "SealRepeatPenalty") - 1) * 100), skillName)
419-
end
420-
421412
local incArea, moreArea = calcLib.mods(skillModList, skillCfg, "AreaOfEffect", "AreaOfEffectPrimary")
422413
output.AreaOfEffectMod = round(round(incArea * moreArea, 10), 2)
423414
if skillData.radiusIsWeaponRange then
@@ -1130,15 +1121,17 @@ function calcs.offence(env, actor, activeSkill)
11301121
modDB:NewMod("DPS", "MORE", detonateTwice, "Grenade Activate Twice")
11311122
end
11321123

1133-
if skillModList:Flag(nil, "HasSeals") and skillModList:Flag(nil, "DamageSeal") and not skillModList:Flag(nil, "NoRepeatBonuses") then
1134-
-- Applies DPS multiplier based on seals count
1124+
if skillModList:Flag(nil, "HasSeals") and not skillModList:Flag(nil, "NoRepeatBonuses") then
1125+
-- Applies seal bonuses based on seal count
11351126
local totalCastSpeed = 1 / activeSkill.activeEffect.grantedEffect.castTime * calcLib.mod(skillModList, skillCfg, "Speed")
11361127
output.SealCooldown = activeSkill.activeEffect.grantedEffect.castTime * skillModList:Sum("BASE", skillCfg, "SealGainFrequency") / calcLib.mod(skillModList, skillCfg, "SealGainFrequency") / 100
11371128
output.SealMax = skillModList:Sum("BASE", skillCfg, "SealCount")
1138-
output.AverageBurstHits = output.SealMax
11391129
output.TimeMaxSeals = output.SealCooldown * output.SealMax
11401130

1141-
if not skillData.hitTimeOverride then
1131+
if skillModList:Flag(nil, "DamageSeal") then
1132+
output.AverageBurstHits = output.SealMax
1133+
end
1134+
if skillModList:Flag(nil, "DamageSeal") and not skillData.hitTimeOverride then
11421135
local skillName = getSkillNameFromFlag(skillModList, "DamageSeal") or "Support"
11431136
if skillModList:Flag(nil, "UseMaxUnleash") then
11441137
for i, value in ipairs(skillModList:Tabulate("INC", { }, "MaxSealCrit")) do
@@ -1151,6 +1144,16 @@ function calcs.offence(env, actor, activeSkill)
11511144
env.player.mainSkill.skillModList:NewMod("DPS", "MORE", round(1 / output.SealCooldown / (totalCastSpeed * 1.1) * calcLib.mod(skillModList, skillCfg, "SealRepeatPenalty") * 100, 2), skillName)
11521145
end
11531146
end
1147+
if skillModList:Flag(nil, "AreaSeal") then
1148+
local skillName = getSkillNameFromFlag(skillModList, "AreaSeal") or "Support"
1149+
local sealArea = (calcLib.mod(skillModList, skillCfg, "SealRepeatPenalty") - 1) * 100
1150+
if skillModList:Flag(nil, "UseMaxUnleash") then
1151+
env.player.mainSkill.skillModList:NewMod("AreaOfEffect", "INC", output.SealMax * sealArea, skillName)
1152+
env.player.mainSkill.skillData.hitTimeOverride = m_max(output.TimeMaxSeals, totalCastSpeed * 1.1)
1153+
else
1154+
env.player.mainSkill.skillModList:NewMod("AreaOfEffect", "INC", round(1 / output.SealCooldown / totalCastSpeed * sealArea, 2), skillName)
1155+
end
1156+
end
11541157

11551158
if breakdown then
11561159
breakdown.SealGainTime = { }
@@ -4136,7 +4139,7 @@ function calcs.offence(env, actor, activeSkill)
41364139
end
41374140
output.AverageDamage = output.AverageHit * output.HitChance / 100
41384141
globalOutput.AverageBurstHits = output.AverageBurstHits or 1
4139-
local repeatPenalty = skillModList:Flag(nil, "HasSeals") and activeSkill.skillTypes[SkillType.Unleashable] and not skillModList:Flag(nil, "NoRepeatBonuses") and calcLib.mod(skillModList, skillCfg, "SealRepeatPenalty") or 1
4142+
local repeatPenalty = skillModList:Flag(nil, "HasSeals") and skillModList:Flag(nil, "DamageSeal") and not skillModList:Flag(nil, "NoRepeatBonuses") and calcLib.mod(skillModList, skillCfg, "SealRepeatPenalty") or 1
41404143
globalOutput.AverageBurstDamage = output.AverageDamage + output.AverageDamage * (globalOutput.AverageBurstHits - 1) * repeatPenalty or 0
41414144
globalOutput.ShowBurst = globalOutput.AverageBurstHits > 1
41424145
output.TotalDPS = output.AverageDamage * (globalOutput.HitSpeed or globalOutput.Speed) * skillData.dpsMultiplier * quantityMultiplier

src/Modules/CalcTriggers.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ local function defaultTriggerHandler(env, config)
439439
actor.mainSkill.skillData.ignoresTickRate = actor.mainSkill.skillData.ignoresTickRate or (actor.mainSkill.skillData.storedUses and actor.mainSkill.skillData.storedUses > 1)
440440

441441
--Account for source unleash
442-
if source and GlobalCache.cachedData[env.mode][uuid] and source.skillModList:Flag(nil, "HasSeals") and source.skillTypes[SkillType.Unleashable] then
442+
if source and GlobalCache.cachedData[env.mode][uuid] and source.skillModList:Flag(nil, "HasSeals") and source.skillModList:Flag(nil, "DamageSeal") then
443443
local unleashDpsMult = GlobalCache.cachedData[env.mode][uuid].ActiveSkill.skillData.dpsMultiplier or 1
444444
trigRate = trigRate * unleashDpsMult
445445
actor.mainSkill.skillFlags.HasSeals = true

src/Modules/ConfigOptions.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ Huge sets the radius to 11.
824824
{ var = "overrideGhostShrouds", type = "count", label = "# of Ghost Shrouds (if not maximum):", ifOption = "useGhostShrouds", apply = function(val, modList, enemyModList)
825825
modList:NewMod("GhostShrouds", "OVERRIDE", val, "Config", { type = "Condition", var = "Combat" })
826826
end },
827-
{ var = "waitForMaxSeals", type = "check", label = "Do you wait for Max Unleash Seals?", ifFlag = "HasSeals", apply = function(val, modList, enemyModList)
827+
{ var = "waitForMaxSeals", type = "check", label = "Do you wait for Max Seals?", ifFlag = "HasSeals", apply = function(val, modList, enemyModList)
828828
modList:NewMod("UseMaxUnleash", "FLAG", true, "Config", { type = "Condition", var = "Combat" })
829829
end },
830830
{ var = "repeatMode", type = "list", label = "Repeat Mode:", ifCond = "alwaysFinalRepeat", list = {

0 commit comments

Comments
 (0)