Skip to content

Commit 927fb58

Browse files
committed
add support for Infernal Cry's empowered buff
1 parent dcf5942 commit 927fb58

7 files changed

Lines changed: 62 additions & 27 deletions

File tree

src/Data/SkillStatMap.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,12 @@ return {
586586
["warcry_speed_+%"] = {
587587
mod("WarcrySpeed", "INC", nil, 0, KeywordFlag.Warcry),
588588
},
589+
["warcry_empowers_per_X_monster_power_mp_cap"] = {
590+
mod("WarcryPowerCap", "BASE", nil),
591+
},
592+
["warcry_empowers_per_X_monster_power"] = {
593+
mod("WarcryPowerPer", "BASE", nil),
594+
},
589595
["display_this_skill_cooldown_does_not_recover_during_buff"] = {
590596
flag("NoCooldownRecoveryInDuration"),
591597
},

src/Data/Skills/act_str.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7500,6 +7500,12 @@ skills["InfernalCryPlayer"] = {
75007500
label = "Infernal Cry",
75017501
incrementalEffectiveness = 0.054999999701977,
75027502
statDescriptionScope = "infernal_cry",
7503+
statMap = {
7504+
["infernal_cry_exerted_attack_all_damage_%_to_gain_as_fire_%"] = {
7505+
mod("DamageGainAsFire", "BASE", nil, ModFlag.Melee, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Condition", var = "Empowered" }),
7506+
mod("InfernalCryBaseDamageGainAsFire", "BASE", nil)
7507+
},
7508+
},
75037509
baseFlags = {
75047510
warcry = true,
75057511
area = true,

src/Export/Skills/act_str.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,12 @@ statMap = {
481481
#skill InfernalCryPlayer
482482
#set InfernalCryPlayer
483483
#flags warcry area duration
484+
statMap = {
485+
["infernal_cry_exerted_attack_all_damage_%_to_gain_as_fire_%"] = {
486+
mod("DamageGainAsFire", "BASE", nil, ModFlag.Melee, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Condition", var = "Empowered" }),
487+
mod("InfernalCryBaseDamageGainAsFire", "BASE", nil)
488+
},
489+
},
484490
#mods
485491
#skillEnd
486492

src/Modules/CalcOffence.lua

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3104,26 +3104,27 @@ function calcs.offence(env, actor, activeSkill)
31043104
end
31053105
globalOutput.AncestralCryCalculated = true
31063106
elseif value.activeEffect.grantedEffect.name == "Infernal Cry" and not globalOutput.InfernalCryCalculated then
3107+
globalOutput.CreateWarcryOffensiveCalcSection = true
31073108
globalOutput.InfernalCryDuration = calcSkillDuration(value.skillModList, value.skillCfg, value.skillData, env, enemyDB)
31083109
globalOutput.InfernalCryCooldown = calcSkillCooldown(value.skillModList, value.skillCfg, value.skillData)
31093110
globalOutput.InfernalCryCastTime = calcWarcryCastTime(value.skillModList, value.skillCfg, value.skillData, actor)
31103111
if activeSkill.skillTypes[SkillType.Melee] then
3111-
globalOutput.InfernalExertsCount = env.modDB:Sum("BASE", nil, "NumInfernalExerts") or 0
3112-
local baseUptimeRatio = m_min((globalOutput.InfernalExertsCount / globalOutput.Speed) / (globalOutput.InfernalCryCooldown + globalOutput.InfernalCryCastTime), 1) * 100
3112+
globalOutput.InfernalEmpoweredCount = (modDB:Override(nil, "WarcryPower") or value.skillModList:Sum("BASE", nil, "WarcryPowerCap")) / value.skillModList:Sum("BASE", nil, "WarcryPowerPer")
3113+
local baseUptimeRatio = m_min((globalOutput.InfernalEmpoweredCount / globalOutput.Speed) / (globalOutput.InfernalCryCooldown + globalOutput.InfernalCryCastTime), 1) * 100
31133114
local storedUses = value.skillData.storedUses or 0 + value.skillModList:Sum("BASE", value.skillCfg, "AdditionalCooldownUses")
3114-
globalOutput.InfernalUpTimeRatio = m_min(100, baseUptimeRatio * storedUses)
3115-
globalOutput.GlobalWarcryUptimeRatio = globalOutput.GlobalWarcryUptimeRatio + globalOutput.InfernalUpTimeRatio
3115+
globalOutput.InfernalCryUptimeRatio = m_min(100, baseUptimeRatio * storedUses)
3116+
globalOutput.GlobalWarcryUptimeRatio = globalOutput.GlobalWarcryUptimeRatio + globalOutput.InfernalCryUptimeRatio
31163117
if globalBreakdown then
3117-
globalBreakdown.InfernalUpTimeRatio = { }
3118-
t_insert(globalBreakdown.InfernalUpTimeRatio, s_format("(%d ^8(number of exerts)", globalOutput.InfernalExertsCount))
3119-
t_insert(globalBreakdown.InfernalUpTimeRatio, s_format("/ %.2f) ^8(attacks per second)", globalOutput.Speed))
3118+
globalBreakdown.InfernalCryUptimeRatio = { }
3119+
t_insert(globalBreakdown.InfernalCryUptimeRatio, s_format("(%.2f ^8(number of empowered)", globalOutput.InfernalEmpoweredCount))
3120+
t_insert(globalBreakdown.InfernalCryUptimeRatio, s_format("/ %.2f) ^8(attacks per second)", globalOutput.Speed))
31203121
if globalOutput.InfernalCryCastTime > 0 then
3121-
t_insert(globalBreakdown.InfernalUpTimeRatio, s_format("/ (%.2f ^8(warcry cooldown)", globalOutput.InfernalCryCooldown))
3122-
t_insert(globalBreakdown.InfernalUpTimeRatio, s_format("+ %.2f) ^8(warcry casttime)", globalOutput.InfernalCryCastTime))
3122+
t_insert(globalBreakdown.InfernalCryUptimeRatio, s_format("/ (%.2f ^8(warcry cooldown)", globalOutput.InfernalCryCooldown))
3123+
t_insert(globalBreakdown.InfernalCryUptimeRatio, s_format("+ %.2f) ^8(warcry cast time)", globalOutput.InfernalCryCastTime))
31233124
else
3124-
t_insert(globalBreakdown.InfernalUpTimeRatio, s_format("/ %.2f ^8(average warcry cooldown)", globalOutput.InfernalCryCooldown))
3125+
t_insert(globalBreakdown.InfernalCryUptimeRatio, s_format("/ %.2f ^8(average warcry cooldown)", globalOutput.InfernalCryCooldown))
31253126
end
3126-
t_insert(globalBreakdown.InfernalUpTimeRatio, s_format("= %d%%", globalOutput.InfernalUpTimeRatio))
3127+
t_insert(globalBreakdown.InfernalCryUptimeRatio, s_format("= %d%%", globalOutput.InfernalCryUptimeRatio))
31273128
end
31283129
end
31293130
globalOutput.InfernalCryCalculated = true
@@ -3287,7 +3288,7 @@ function calcs.offence(env, actor, activeSkill)
32873288
-- Calculate Exerted Attack Uptime
32883289
-- There are various strategies a player could use to maximize either warcry effect stacking or staggering
32893290
-- 1) they don't pay attention and therefore we calculated exerted attack uptime as just the maximum uptime of any enabled warcries that exert attacks
3290-
local warcryList = {"AncestralUpTimeRatio", "InfernalUpTimeRatio", "IntimidatingUpTimeRatio", "RallyingUpTimeRatio", "SeismicUpTimeRatio", "BattlemageUpTimeRatio"}
3291+
local warcryList = {"AncestralUpTimeRatio", "InfernalCryUptimeRatio", "IntimidatingUpTimeRatio", "RallyingUpTimeRatio", "SeismicUpTimeRatio", "BattlemageUpTimeRatio"}
32913292
for _, cryTimeRatio in ipairs(warcryList) do
32923293
globalOutput.ExertedAttackUptimeRatio = m_max(globalOutput.ExertedAttackUptimeRatio or 0, globalOutput[cryTimeRatio] or 0)
32933294
end
@@ -3373,16 +3374,23 @@ function calcs.offence(env, actor, activeSkill)
33733374
-- dynamic way of calcing the Ancestral Boost from a single source without duplicating the code
33743375
-- uptimeOverride: Ancestral Empowerment
33753376
-- combinedCalcs: ignore INC AoE as we will run that in calcCombinedAncestralBoost
3376-
local function calcAncestralBoost(skillName, moreDmg, incArea, uptimeOverride, combinedCalcs)
3377+
-- empowered: for non-ancestrally boosted empowered skills
3378+
local function calcAncestralBoost(skillName, moreDmg, incArea, uptimeOverride, combinedCalcs, empowered)
33773379
globalOutput.CreateWarcryOffensiveCalcSection = true -- labels for the CalcSection
33783380
local skillNameVar = skillName:gsub(" ", "") -- Fist Of War -> FistOfWar
33793381
local skillNameLabel = skillName:lower()
33803382

3383+
if empowered then
3384+
ancestrallyBoostedIncArea = 0
3385+
ancestrallyBoostedIncDamageMulti = 0
3386+
end
3387+
33813388
if moreDmg then
33823389
globalOutput[skillNameVar.."DamageMultiplier"] = moreDmg * (1 + ancestrallyBoostedIncDamageMulti)
33833390
else
33843391
globalOutput[skillNameVar.."DamageMultiplier"] = ancestrallyBoostedIncDamageMulti
33853392
end
3393+
33863394
globalOutput[skillNameVar.."UptimeRatio"] = uptimeOverride or m_min( (1 / globalOutput.Speed) / globalOutput[skillNameVar.."Cooldown"], 1) * 100
33873395
if globalBreakdown then
33883396
globalBreakdown[skillNameVar.."UptimeRatio"] = {
@@ -3500,6 +3508,13 @@ function calcs.offence(env, actor, activeSkill)
35003508
else
35013509
output.AncestralCallDamageEffect = 1
35023510
end
3511+
3512+
-- Warcries
3513+
-- Infernal Cry
3514+
if globalOutput.InfernalCryCooldown ~= 0 then
3515+
output.InfernalCryDamageEffect = 1
3516+
end
3517+
35033518
end
35043519

35053520
-- Calculate maximum sustainable fuses and explosion rate for Explosive Arrow

src/Modules/CalcPerform.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1919,7 +1919,9 @@ function calcs.perform(env, skipEHP)
19191919
end
19201920
local full_duration = calcSkillDuration(modStore, skillCfg, activeSkill.skillData, env, enemyDB)
19211921
local actual_cooldown = calcSkillCooldown(modStore, skillCfg, activeSkill.skillData)
1922-
local uptime = modDB:Flag(nil, "Condition:WarcryMaxHit") and 1 or m_min(full_duration / actual_cooldown, 1)
1922+
-- need to scale warcry buffs by their actual uptime
1923+
local warcryOutputUptime = env.build.calcsTab.mainOutput and (env.build.calcsTab.mainOutput[warcryName.."CryUptimeRatio"] / 100) or nil
1924+
local uptime = modDB:Flag(nil, "Condition:WarcryMaxHit") and 1 or warcryOutputUptime or m_min(full_duration / actual_cooldown, 1)
19231925
local extraWarcryModList = activeSkill.activeEffect.grantedEffect.name == "Rallying Cry" and new("ModList") or {}
19241926
if not modDB:Flag(nil, "CannotGainWarcryBuffs") then
19251927
if not buff.applyNotPlayer then

src/Modules/CalcSections.lua

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -355,15 +355,15 @@ return {
355355
{ label = "Skill DPS", flag = "triggered", { format = "{1:output:TotalDPS}", { breakdown = "TotalDPS" }, { label = "DPS Multiplier", modName = "DPS", cfg = "skill" }, }, },
356356
} }
357357
} },
358-
{ 3, "Warcries", 1, colorCodes.OFFENCE, {{ defaultCollapsed = false, label = "Ancestral Boosts", data = {
358+
{ 3, "Warcries", 1, colorCodes.OFFENCE, {{ defaultCollapsed = false, label = "Empowered Stats", data = {
359359
extra = "{2:output:TheoreticalOffensiveWarcryEffect} Avg Combined Impact | {2:output:TheoreticalMaxOffensiveWarcryEffect} Max Combined Impact",
360360
colWidth = 114,
361361
{
362362
haveOutput = "CreateWarcryOffensiveCalcSection",
363363
{ format = "Effective Impact" },
364364
{ format = "Avg Dmg Effect" },
365365
{ format = "Uptime" },
366-
{ format = "Number of Exerts" },
366+
{ format = "# of Empowered" },
367367
{ format = "Max 1-Hit Impact"},
368368
},
369369
{ label = "Seismic Cry", haveOutput = "SeismicUpTimeRatio",
@@ -387,11 +387,11 @@ return {
387387
{ format = "{0:output:RallyingExertsCount}" },
388388
{ format = "{2:output:RallyingMaxHitEffect}" },
389389
},
390-
{ label = "Infernal Cry", haveOutput = "InfernalUpTimeRatio",
390+
{ label = "Infernal Cry", haveOutput = "InfernalCryUptimeRatio",
391391
{ format = "" },
392392
{ format = "" },
393-
{ format = "{0:output:InfernalUpTimeRatio}%", { breakdown = "InfernalUpTimeRatio" }, },
394-
{ format = "{0:output:InfernalExertsCount}" },
393+
{ format = "{0:output:InfernalCryUptimeRatio}%", { breakdown = "InfernalCryUptimeRatio" }, },
394+
{ format = "{0:output:InfernalEmpoweredCount}" },
395395
{ format = "" },
396396
},
397397
{ label = "Battlemage's Cry", haveOutput = "BattlemageUpTimeRatio",
@@ -408,13 +408,13 @@ return {
408408
{ format = "{0:output:AncestralExertsCount}" },
409409
{ format = "" },
410410
},
411-
{ label = "Exerted Attacks", bgCol = colorCodes.MAINHANDBG, haveOutput = "ExertedAttackUptimeRatio",
412-
{ format = "{2:output:ExertedAttackHitEffect}", { breakdown = "ExertedAttackHitEffect"}, },
413-
{ format = "{2:output:ExertedAttackAvgDmg}", { modName = "ExertIncrease", cfg = "skill" }, { modName = "ExertAttackIncrease", cfg = "skill" }, },
414-
{ format = "{0:output:ExertedAttackUptimeRatio}%", { breakdown = "ExertedAttackUptimeRatio" }, },
415-
{ format = "" },
416-
{ format = "{2:output:ExertedAttackMaxHitEffect}", { modName = "ExertIncrease", cfg = "skill" }, { modName = "ExertAttackIncrease", cfg = "skill" }, },
417-
},
411+
--{ label = "Exerted Attacks", bgCol = colorCodes.MAINHANDBG, haveOutput = "ExertedAttackUptimeRatio",
412+
-- { format = "{2:output:ExertedAttackHitEffect}", { breakdown = "ExertedAttackHitEffect"}, },
413+
-- { format = "{2:output:ExertedAttackAvgDmg}", { modName = "ExertIncrease", cfg = "skill" }, { modName = "ExertAttackIncrease", cfg = "skill" }, },
414+
-- { format = "{0:output:ExertedAttackUptimeRatio}%", { breakdown = "ExertedAttackUptimeRatio" }, },
415+
-- { format = "" },
416+
-- { format = "{2:output:ExertedAttackMaxHitEffect}", { modName = "ExertIncrease", cfg = "skill" }, { modName = "ExertAttackIncrease", cfg = "skill" }, },
417+
--},
418418
{ label = "AncestralEmpower+", bgCol = colorCodes.MAINHANDBG, haveOutput = "AncestralEmpowermentCombinedUptimeRatio",
419419
{ format = "{2:output:AvgAncestralEmpowermentCombinedDamageEffect}", { breakdown = "AvgAncestralEmpowermentCombinedDamageEffect"}, },
420420
{ format = "{2:output:AvgAncestralEmpowermentCombinedDamage}", { modName = { "AncestralEmpowermentDamageMultiplier", "FistOfWarDamageMultiplier" }, cfg = "skill" }, { modName = "AncestralBoostDamage", cfg = "skill" }, },

src/Modules/CalcTriggers.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ local function defaultTriggerHandler(env, config)
489489

490490
-- Infernal Cry uptime
491491
if actor.mainSkill.activeEffect.grantedEffect.name == "Combust" and GlobalCache.cachedData[env.mode][uuid] and source and source.skillTypes[SkillType.Melee] then
492-
local infernalCryExertsCount = GlobalCache.cachedData[env.mode][uuid].Env.player.output.InfernalExertsCount
492+
local infernalCryExertsCount = GlobalCache.cachedData[env.mode][uuid].Env.player.output.InfernalEmpoweredCount
493493
local infernalCryDuration = ceil_b(GlobalCache.cachedData[env.mode][uuid].Env.player.output.InfernalCryDuration, data.misc.ServerTickTime)
494494
local infernalCryCastTime = GlobalCache.cachedData[env.mode][uuid].Env.player.output.InfernalCryCastTime
495495
local infernalCryCooldown = ceil_b(GlobalCache.cachedData[env.mode][uuid].Env.player.output.InfernalCryCooldown, data.misc.ServerTickTime)

0 commit comments

Comments
 (0)