@@ -401,6 +401,13 @@ function calcs.offence(env, actor, activeSkill)
401401 -- Calculate armour break
402402 output .ArmourBreakPerHit = calcLib .val (skillModList , " ArmourBreakPerHit" , skillCfg )
403403
404+ local function getSkillNameFromFlag (skillModList , flag )
405+ local sourceMod = skillModList :Tabulate (" FLAG" , nil , flag )
406+ local sourceName = sourceMod [1 ] and sourceMod [1 ].mod and sourceMod [1 ].mod .source -- e.g. Skill:SupportExpandPlayer
407+ local dataSkill = env .data .skills [(sourceName :gsub (" Skill:" , " " ))]
408+ return dataSkill and dataSkill .name
409+ end
410+
404411 local function calcAreaOfEffect (skillModList , skillCfg , skillData , skillFlags , output , breakdown )
405412 local incArea , moreArea = calcLib .mods (skillModList , skillCfg , " AreaOfEffect" , " AreaOfEffectPrimary" )
406413 output .AreaOfEffectMod = round (round (incArea * moreArea , 10 ), 2 )
@@ -1114,24 +1121,37 @@ function calcs.offence(env, actor, activeSkill)
11141121 modDB :NewMod (" DPS" , " MORE" , detonateTwice , " Grenade Activate Twice" )
11151122 end
11161123
1117- if skillModList :Flag (nil , " HasSeals" ) and activeSkill . skillTypes [ SkillType . Unleashable ] and not skillModList :Flag (nil , " NoRepeatBonuses" ) then
1118- -- 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
11191126 local totalCastSpeed = 1 / activeSkill .activeEffect .grantedEffect .castTime * calcLib .mod (skillModList , skillCfg , " Speed" )
11201127 output .SealCooldown = activeSkill .activeEffect .grantedEffect .castTime * skillModList :Sum (" BASE" , skillCfg , " SealGainFrequency" ) / calcLib .mod (skillModList , skillCfg , " SealGainFrequency" ) / 100
11211128 output .SealMax = skillModList :Sum (" BASE" , skillCfg , " SealCount" )
1122- output .AverageBurstHits = output .SealMax
11231129 output .TimeMaxSeals = output .SealCooldown * output .SealMax
11241130
1125- 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
1135+ local skillName = getSkillNameFromFlag (skillModList , " DamageSeal" ) or " Support"
11261136 if skillModList :Flag (nil , " UseMaxUnleash" ) then
11271137 for i , value in ipairs (skillModList :Tabulate (" INC" , { }, " MaxSealCrit" )) do
11281138 local mod = value .mod
11291139 skillModList :NewMod (" CritChance" , " INC" , mod .value , mod .source , mod .flags , mod .keywordFlags , unpack (mod ))
11301140 end
1131- env .player .mainSkill .skillModList :NewMod (" DPS" , " MORE" , (output .SealMax * calcLib .mod (skillModList , skillCfg , " SealRepeatPenalty" )) * 100 , " Unleash" )
1141+ env .player .mainSkill .skillModList :NewMod (" DPS" , " MORE" , (output .SealMax * calcLib .mod (skillModList , skillCfg , " SealRepeatPenalty" )) * 100 , skillName )
1142+ env .player .mainSkill .skillData .hitTimeOverride = m_max (output .TimeMaxSeals , totalCastSpeed * 1.1 )
1143+ else
1144+ env .player .mainSkill .skillModList :NewMod (" DPS" , " MORE" , round (1 / output .SealCooldown / (totalCastSpeed * 1.1 ) * calcLib .mod (skillModList , skillCfg , " SealRepeatPenalty" ) * 100 , 2 ), skillName )
1145+ end
1146+ 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 )
11321152 env .player .mainSkill .skillData .hitTimeOverride = m_max (output .TimeMaxSeals , totalCastSpeed * 1.1 )
11331153 else
1134- env .player .mainSkill .skillModList :NewMod (" DPS " , " MORE " , round (1 / output .SealCooldown / ( totalCastSpeed * 1.1 ) * calcLib . mod ( skillModList , skillCfg , " SealRepeatPenalty " ) * 100 , 2 ), " Unleash " )
1154+ env .player .mainSkill .skillModList :NewMod (" AreaOfEffect " , " INC " , round (1 / output .SealCooldown / totalCastSpeed * sealArea , 2 ), skillName )
11351155 end
11361156 end
11371157
@@ -4119,7 +4139,7 @@ function calcs.offence(env, actor, activeSkill)
41194139 end
41204140 output .AverageDamage = output .AverageHit * output .HitChance / 100
41214141 globalOutput .AverageBurstHits = output .AverageBurstHits or 1
4122- 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
41234143 globalOutput .AverageBurstDamage = output .AverageDamage + output .AverageDamage * (globalOutput .AverageBurstHits - 1 ) * repeatPenalty or 0
41244144 globalOutput .ShowBurst = globalOutput .AverageBurstHits > 1
41254145 output .TotalDPS = output .AverageDamage * (globalOutput .HitSpeed or globalOutput .Speed ) * skillData .dpsMultiplier * quantityMultiplier
@@ -5693,7 +5713,7 @@ function calcs.offence(env, actor, activeSkill)
56935713 elseif skillFlags .totem then
56945714 useSpeed = (output .Cooldown and output .Cooldown > 0 and (output .TotemPlacementSpeed > 0 and output .TotemPlacementSpeed or 1 / output .Cooldown ) or output .TotemPlacementSpeed ) / repeats
56955715 timeType = " totem placement"
5696- elseif skillModList :Flag (nil , " HasSeals" ) and skillModList :Flag (nil , " UseMaxUnleash" ) then
5716+ elseif skillModList :Flag (nil , " HasSeals" ) and skillModList :Flag (nil , " DamageSeal " ) and skillModList : Flag ( nil , " UseMaxUnleash" ) then
56975717 useSpeed = env .player .mainSkill .skillData .hitTimeOverride / repeats
56985718 timeType = " full unleash"
56995719 elseif output .EffectiveReloadTime then -- Crossbows: Account for mana cost only happening on reload (once all bolts are fired)
0 commit comments