Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions spec/System/TestSkills_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Data/ModCache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion src/Data/SkillStatMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions src/Modules/CalcOffence.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 9 additions & 1 deletion src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/CalcSections.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 3 additions & 2 deletions src/Modules/ModParser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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" }) },
Expand Down
Loading