Skip to content

Commit b3d7418

Browse files
PeecheyLocalIdentity
andauthored
Add support for Expand (#1818)
* add support for Expand, add flags for Area vs Damage Seal Supports * dynamic skill name for damage/aoe source * updated Zarokh's Revolt with DamageSeal * Fix to use uptime of seals Fixes the calc to use the uptime for seals and fits it into the existing seal calc --------- Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 0f81708 commit b3d7418

5 files changed

Lines changed: 62 additions & 10 deletions

File tree

src/Data/Skills/sup_int.lua

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3813,8 +3813,23 @@ skills["SupportExpandPlayer"] = {
38133813
label = "Expand",
38143814
incrementalEffectiveness = 0.054999999701977,
38153815
statDescriptionScope = "gem_stat_descriptions",
3816+
statMap = {
3817+
["support_expand_max_seals"] = {
3818+
mod("SealCount", "BASE", nil),
3819+
},
3820+
["skill_area_of_effect_+%_per_expand_seal"] = {
3821+
mod("SealRepeatPenalty", "MORE", nil),
3822+
},
3823+
["expand_support_seal_gain_frequency_as_%_of_total_cast_time"] = {
3824+
mod("SealGainFrequency", "BASE", nil),
3825+
},
3826+
},
38163827
baseFlags = {
38173828
},
3829+
baseMods = {
3830+
flag("HasSeals"),
3831+
flag("AreaSeal"),
3832+
},
38183833
constantStats = {
38193834
{ "support_expand_max_seals", 3 },
38203835
{ "support_expand_charge_gain_interval_ms", 0 },
@@ -7593,6 +7608,7 @@ skills["SupportUnleashPlayer"] = {
75937608
},
75947609
baseMods = {
75957610
flag("HasSeals"),
7611+
flag("DamageSeal"),
75967612
},
75977613
constantStats = {
75987614
{ "support_spell_rapid_fire_repeat_use_damage_+%_final", -50 },
@@ -8076,6 +8092,7 @@ skills["SupportZarokhsRevoltPlayer"] = {
80768092
},
80778093
baseMods = {
80788094
flag("HasSeals"),
8095+
flag("DamageSeal"),
80798096
},
80808097
constantStats = {
80818098
{ "support_spell_rapid_fire_repeat_use_damage_+%_final", -20 },

src/Export/Skills/sup_int.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,19 @@ statMap = {
664664

665665
#skill SupportExpandPlayer
666666
#set SupportExpandPlayer
667+
statMap = {
668+
["support_expand_max_seals"] = {
669+
mod("SealCount", "BASE", nil),
670+
},
671+
["skill_area_of_effect_+%_per_expand_seal"] = {
672+
mod("SealRepeatPenalty", "MORE", nil),
673+
},
674+
["expand_support_seal_gain_frequency_as_%_of_total_cast_time"] = {
675+
mod("SealGainFrequency", "BASE", nil),
676+
},
677+
},
678+
#baseMod flag("HasSeals")
679+
#baseMod flag("AreaSeal")
667680
#mods
668681
#skillEnd
669682

@@ -1444,6 +1457,7 @@ statMap = {
14441457
#skill SupportUnleashPlayer
14451458
#set SupportUnleashPlayer
14461459
#baseMod flag("HasSeals")
1460+
#baseMod flag("DamageSeal")
14471461
#mods
14481462
#skillEnd
14491463

@@ -1526,6 +1540,7 @@ statMap = {
15261540
#skill SupportZarokhsRevoltPlayer
15271541
#set SupportZarokhsRevoltPlayer
15281542
#baseMod flag("HasSeals")
1543+
#baseMod flag("DamageSeal")
15291544
#mods
15301545
#skillEnd
15311546

src/Modules/CalcOffence.lua

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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)

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)