diff --git a/spec/System/TestSkills_spec.lua b/spec/System/TestSkills_spec.lua index 6b9d590ec..e6378d9a6 100644 --- a/spec/System/TestSkills_spec.lua +++ b/spec/System/TestSkills_spec.lua @@ -948,6 +948,25 @@ describe("TestSkills", function() assert.are.equal(3, build.calcsTab.calcsOutput.StrikeTargets) end) + it("Test chance to empower additional attacks contributes to average count", function() + build.itemsTab:CreateDisplayItemFromRaw([[ + New Item + Wrapped Quarterstaff + Quality: 0 + ]]) + build.itemsTab:AddDisplayItem() + runCallback("OnFrame") + + build.skillsTab:PasteSocketGroup("Quarterstaff Strike 20/0 1") + build.skillsTab:PasteSocketGroup("Infernal Cry 20/0 1") + build.configTab.input.multiplierWarcryPower = 20 + build.configTab.input.customMods = "Warcries have 15% chance to Empower 3 additional Attacks" + build.configTab:BuildModList() + runCallback("OnFrame") + + assert.are.equals(2.45, round(build.calcsTab.calcsOutput.InfernalEmpoweredCount, 2)) + end) + it("Test Combined Ancestral Boosts - Ancestral Empowerment and Fist of War", function() build.itemsTab:CreateDisplayItemFromRaw([[ New Item diff --git a/src/Data/ModCache.lua b/src/Data/ModCache.lua index 524bfaca7..5d69062f2 100644 --- a/src/Data/ModCache.lua +++ b/src/Data/ModCache.lua @@ -6458,10 +6458,10 @@ c["Vivid Stags leap towards enemies Central Projectile of Owl Feather-Empowered c["Volatile Power also grants 1% increased Critical Hit chance per Volatility exploded"]={nil,"Volatile Power also grants 1% increased Critical Hit chance per Volatility exploded "} c["Walk the Paths Not Taken"]={{},nil} c["Warcries Debilitate Enemies"]={{[1]={flags=0,keywordFlags=0,name="DebilitateChance",type="BASE",value=100}},nil} -c["Warcries Empower an additional Attack"]={nil,"Warcries Empower an additional Attack "} +c["Warcries Empower an additional Attack"]={{[1]={flags=0,keywordFlags=0,name="ExtraEmpoweredAttacks",type="BASE",value=1}},nil} c["Warcries Explode Corpses dealing 10% of their Life as Physical Damage"]={{[1]={flags=0,keywordFlags=0,name="ExplodeMod",type="LIST",value={amount=10,keyOfScaledMod="value",type="Physical",value=100}},[2]={flags=0,keywordFlags=0,name="CanExplode",type="FLAG",value=true}},nil} c["Warcries Explode Corpses dealing 25% of their Life as Physical Damage"]={{[1]={flags=0,keywordFlags=0,name="ExplodeMod",type="LIST",value={amount=25,keyOfScaledMod="value",type="Physical",value=100}},[2]={flags=0,keywordFlags=0,name="CanExplode",type="FLAG",value=true}},nil} -c["Warcries have 15% chance to Empower 3 additional Attacks"]={nil,"Warcries have 15% chance to Empower 3 additional Attacks "} +c["Warcries have 15% chance to Empower 3 additional Attacks"]={{[1]={flags=0,keywordFlags=0,name="ExtraEmpoweredAttacks",type="BASE",value=0.45}},nil} c["Warcries have a minimum of 10 Power"]={{[1]={flags=0,keywordFlags=0,name="MinimumWarcryPower",type="BASE",value=10}},nil} c["Warcries inflict 3 Critical Weakness on Enemies"]={nil,"Warcries inflict 3 Critical Weakness on Enemies "} c["Warcry Skills have 25% increased Area of Effect"]={{[1]={[1]={skillType=63,type="SkillType"},flags=0,keywordFlags=0,name="AreaOfEffect",type="INC",value=25}},nil} diff --git a/src/Data/SkillStatMap.lua b/src/Data/SkillStatMap.lua index dc93877d5..3cd043cd8 100644 --- a/src/Data/SkillStatMap.lua +++ b/src/Data/SkillStatMap.lua @@ -2864,7 +2864,7 @@ return { flag("Condition:CanGainRage", { type = "GlobalEffect", effectType = "Buff", effectName = "Rage" } ), }, ["warcry_count_power_from_enemies"] = { - flag("UsesWarcryPower", { type = "GlobalEffect", effectType = "Buff" }) + flag("UsesWarcryPower", { type = "GlobalEffect", effectType = "Warcry" }) }, ["chance_to_gain_1_more_charge_%"] = { mod("AdditionalChargeChance", "BASE", nil) diff --git a/src/Modules/CalcOffence.lua b/src/Modules/CalcOffence.lua index f17362af3..98967cec9 100644 --- a/src/Modules/CalcOffence.lua +++ b/src/Modules/CalcOffence.lua @@ -3203,9 +3203,7 @@ function calcs.offence(env, actor, activeSkill) globalOutput.InfernalCryDuration = calcSkillDuration(value.skillModList, value.skillCfg, value.skillData, env, enemyDB) globalOutput.InfernalCryCooldown = calcSkillCooldown(value.skillModList, value.skillCfg, value.skillData) globalOutput.InfernalCryCastTime = calcWarcryCastTime(value.skillModList, value.skillCfg, value.skillData, actor) - local powerCap = value.skillModList:Sum("BASE", nil, "WarcryPowerCap") - local powerPer = value.skillModList:Sum("BASE", nil, "WarcryPowerPer") - globalOutput.InfernalEmpoweredCount = powerPer > 0 and m_floor(m_min(warcryPower, powerCap) / powerPer) or 0 + globalOutput.InfernalEmpoweredCount = env.modDB:Sum("BASE", nil, "NumInfernalEmpowers") or 0 local baseUptimeRatio = m_min((globalOutput.InfernalEmpoweredCount / globalOutput.Speed) / (globalOutput.InfernalCryCooldown + globalOutput.InfernalCryCastTime), 1) * 100 local storedUses = value.skillData.storedUses or 0 + value.skillModList:Sum("BASE", value.skillCfg, "AdditionalCooldownUses") globalOutput.InfernalCryUptimeRatio = m_min(100, baseUptimeRatio * storedUses) diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index 5e80d8abb..bca43773e 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -1997,11 +1997,19 @@ function calcs.perform(env, skipEHP) if baseEmpowers > 0 then local extraEmpowers = modStore:Sum("BASE", nil, "ExtraEmpoweredAttacks") or 0 local EmpowerMultiplier = modStore:More(nil, "ExtraEmpoweredAttacks") - env.player.modDB:NewMod("Num"..warcryName.."Empowers", "BASE", m_floor((baseEmpowers + extraEmpowers) * EmpowerMultiplier)) + local totalEmpowers = (baseEmpowers + extraEmpowers) * EmpowerMultiplier + env.player.modDB:NewMod("Num"..warcryName.."Empowers", "BASE", totalEmpowers) if not warcryList[buff.name] then env.player.modDB:NewMod("Multiplier:EmpoweringWarcryCount", "BASE", 1, buff.name) warcryList[buff.name] = true end + if breakdown then + breakdown[warcryName.."EmpoweringWarcryCount"] = { + s_format("(%d / %d) ^8(Power / per = base)", m_min(warcryPower, powerCap), powerPer), + s_format("= ((%.2f + %.2f) x %.2f) ^8((base + extra) x more)", baseEmpowers, extraEmpowers, EmpowerMultiplier), + s_format("= %.2f", totalEmpowers), + } + end end if not activeSkill.skillModList:Flag(nil, "CannotShareWarcryBuffs") then for _, warcryBuff in ipairs(buff.modList) do diff --git a/src/Modules/CalcSections.lua b/src/Modules/CalcSections.lua index 1792e3e71..ee0f9a421 100644 --- a/src/Modules/CalcSections.lua +++ b/src/Modules/CalcSections.lua @@ -391,7 +391,7 @@ return { { format = "" }, { format = "" }, { format = "{0:output:InfernalCryUptimeRatio}%", { breakdown = "InfernalCryUptimeRatio" }, }, - { format = "{0:output:InfernalEmpoweredCount}" }, + { format = "{2:output:InfernalEmpoweredCount}" , { breakdown = "InfernalEmpoweringWarcryCount" },}, { format = "" }, }, { label = "Battlemage's Cry", haveOutput = "BattlemageUpTimeRatio", diff --git a/src/Modules/ModParser.lua b/src/Modules/ModParser.lua index 301db66c2..0b8f4b510 100644 --- a/src/Modules/ModParser.lua +++ b/src/Modules/ModParser.lua @@ -5536,8 +5536,9 @@ local specialModList = { ["%+(%d+) to accuracy against bleeding enemies"] = function(num) return { mod("AccuracyVsEnemy", "BASE", num, { type = "ActorCondition", actor = "enemy", var = "Bleeding" } ) } end, ["cannot recover energy shield to above armour"] = { flag("ArmourESRecoveryCap") }, ["cannot recover energy shield to above evasion rating"] = { flag("EvasionESRecoveryCap") }, - ["warcries exert (%d+) additional attacks?"] = function(num) return { mod("ExtraExertedAttacks", "BASE", num) } end, - ["warcries have (%d+)%% chance to exert (%d+) additional attacks?"] = function(num, _, var) return { mod("ExtraExertedAttacks", "BASE", (num*var/100)) } end, + ["warcries empower (%d+) additional attacks?"] = function(num) return { mod("ExtraEmpoweredAttacks", "BASE", num) } end, + ["warcries empower an additional attack"] = function(num) return { mod("ExtraEmpoweredAttacks", "BASE", 1) } end, + ["warcries have (%d+)%% chance to empower (%d+) additional attacks?"] = function(num, _, var) return { mod("ExtraEmpoweredAttacks", "BASE", (num*var/100)) } end, ["skills deal (%d+)%% more damage for each warcry exerting them"] = function(num) return { mod("EchoesExertAverageIncrease", "MORE", num, nil) } end, ["iron reflexes while stationary"] = { mod("Keystone", "LIST", "Iron Reflexes", { type = "Condition", var = "Stationary" }) }, ["you have iron reflexes while at maximum frenzy charges"] = { mod("Keystone", "LIST", "Iron Reflexes", { type = "StatThreshold", stat = "FrenzyCharges", thresholdStat = "FrenzyChargesMax" }) },