Skip to content

Commit 38bf50d

Browse files
committed
Scale Warcry buffs by WarcryPower earlier in Calc
1 parent 70ae9b8 commit 38bf50d

File tree

3 files changed

+37
-42
lines changed

3 files changed

+37
-42
lines changed

src/Data/Skills/act_str.lua

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,10 @@ skills["AncestralCry"] = {
287287
mod("AncestralExertedAttacks", "BASE", nil),
288288
},
289289
["ancestral_cry_elemental_resist_%_per_5_power_up_to_cap"] = {
290-
mod("ElementalResist", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 5, limit = 5 }),
291-
mod("ElementalResist", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 5, limit = 5 }),
290+
mod("ElementalResist", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 5, limit = 30 }),
292291
},
293292
["ancestral_cry_maximum_elemental_resist_%_per_10_power_up_to_cap"] = {
294-
mod("ElementalResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 10, limit = 3 }),
295-
mod("ElementalResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 10, limit = 3 }),
293+
mod("ElementalResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 10, limit = 30 }),
296294
},
297295
["skill_empower_limitation_specifier_for_stat_description"] = {
298296
-- Display only
@@ -782,8 +780,7 @@ skills["BattlemagesCry"] = {
782780
mod("BattlemageExertedAttacks", "BASE", nil),
783781
},
784782
["divine_cry_additional_base_critical_strike_chance_per_5_power_up_to_cap"] = {
785-
mod("CritChance", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 5, limit = 5 }),
786-
mod("CritChance", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 5, limit = 5 }),
783+
mod("CritChance", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 5, limit = 25 }),
787784
div = 100,
788785
},
789786
["display_battlemage_cry_exerted_attacks_trigger_supported_spell"] ={
@@ -3672,8 +3669,7 @@ skills["EnduringCry"] = {
36723669
castTime = 0.8,
36733670
statMap = {
36743671
["enduring_cry_life_regeneration_rate_per_minute_%_per_5_power_up_to_cap"] = {
3675-
mod("LifeRegenPercent", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 5, limit = 5 }),
3676-
mod("LifeRegenPercent", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 5, limit = 5 }),
3672+
mod("LifeRegenPercent", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 5, limit = 25 }),
36773673
div = 60,
36783674
},
36793675
},
@@ -6068,8 +6064,7 @@ skills["InfernalCry"] = {
60686064
mod("InfernalExertedAttacks", "BASE", nil),
60696065
},
60706066
["infernal_cry_physical_damage_%_to_add_as_fire_per_5_power_up_to_cap"] = {
6071-
mod("PhysicalDamageGainAsFire", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 5, limit = 5 }),
6072-
mod("PhysicalDamageGainAsFire", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 5, limit = 5 }),
6067+
mod("PhysicalDamageGainAsFire", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 5, limit = 25 }),
60736068
},
60746069
["infernal_cry_empowered_attacks_trigger_combust_display"] = {
60756070
-- Display only
@@ -6497,8 +6492,7 @@ skills["IntimidatingCry"] = {
64976492
mod("IntimidatingExertedAttacks", "BASE", nil),
64986493
},
64996494
["intimidating_cry_movement_speed_+%_per_5_power_up_to_cap"] = {
6500-
mod("MovementSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 5, limit = 6 }),
6501-
mod("MovementSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 5, limit = 6 }),
6495+
mod("MovementSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 5, limit = 30 }),
65026496
},
65036497
["intimidating_cry_empowerd_attacks_deal_double_damage_display"] = {
65046498
},
@@ -8663,12 +8657,10 @@ skills["SeismicCry"] = {
86638657
mod("SeismicAoEMoreMultiplier", "BASE", nil),
86648658
},
86658659
["seismic_cry_stun_threshold_+%_per_5_power_up_to_cap"] = {
8666-
mod("StunThreshold", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 5, limit = 5 }),
8667-
mod("StunThreshold", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 5, limit = 5 }),
8660+
mod("StunThreshold", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 5, limit = 25 }),
86688661
},
86698662
["seismic_cry_armour_+%_final_per_5_power_up_to_cap"] = {
8670-
mod("Armour", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 5, limit = 5 }),
8671-
mod("Armour", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 5, limit = 5 }),
8663+
mod("Armour", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 5, limit = 25 }),
86728664
},
86738665
["skill_empower_limitation_specifier_for_stat_description"] = {
86748666
-- Display only
@@ -10911,8 +10903,7 @@ skills["VengefulCry"] = {
1091110903
castTime = 0.8,
1091210904
statMap = {
1091310905
["rage_warcry_gain_X_rage_per_minute_per_5_monster_power_max_25_power"] = {
10914-
mod("RageRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 5, limit = 5 }),
10915-
mod("RageRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 5, limit = 5 }),
10906+
mod("RageRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 5, limit = 25 }),
1091610907
flag("Condition:CanGainRage", { type = "GlobalEffect", effectType = "Warcry"} ),
1091710908
div = 60,
1091810909
},

src/Export/Skills/act_str.txt

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,10 @@ local skills, mod, flag, skill = ...
5454
mod("AncestralExertedAttacks", "BASE", nil),
5555
},
5656
["ancestral_cry_elemental_resist_%_per_5_power_up_to_cap"] = {
57-
mod("ElementalResist", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 5, limit = 5 }),
58-
mod("ElementalResist", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 5, limit = 5 }),
57+
mod("ElementalResist", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 5, limit = 30 }),
5958
},
6059
["ancestral_cry_maximum_elemental_resist_%_per_10_power_up_to_cap"] = {
61-
mod("ElementalResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 10, limit = 3 }),
62-
mod("ElementalResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 10, limit = 3 }),
60+
mod("ElementalResistMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 10, limit = 30 }),
6361
},
6462
["skill_empower_limitation_specifier_for_stat_description"] = {
6563
-- Display only
@@ -149,8 +147,7 @@ local skills, mod, flag, skill = ...
149147
mod("BattlemageExertedAttacks", "BASE", nil),
150148
},
151149
["divine_cry_additional_base_critical_strike_chance_per_5_power_up_to_cap"] = {
152-
mod("CritChance", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 5, limit = 5 }),
153-
mod("CritChance", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 5, limit = 5 }),
150+
mod("CritChance", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 5, limit = 25 }),
154151
div = 100,
155152
},
156153
["display_battlemage_cry_exerted_attacks_trigger_supported_spell"] ={
@@ -662,8 +659,7 @@ local skills, mod, flag, skill = ...
662659
#flags warcry area duration
663660
statMap = {
664661
["enduring_cry_life_regeneration_rate_per_minute_%_per_5_power_up_to_cap"] = {
665-
mod("LifeRegenPercent", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 5, limit = 5 }),
666-
mod("LifeRegenPercent", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 5, limit = 5 }),
662+
mod("LifeRegenPercent", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 5, limit = 25 }),
667663
div = 60,
668664
},
669665
},
@@ -1054,8 +1050,7 @@ local skills, mod, flag, skill = ...
10541050
mod("InfernalExertedAttacks", "BASE", nil),
10551051
},
10561052
["infernal_cry_physical_damage_%_to_add_as_fire_per_5_power_up_to_cap"] = {
1057-
mod("PhysicalDamageGainAsFire", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 5, limit = 5 }),
1058-
mod("PhysicalDamageGainAsFire", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 5, limit = 5 }),
1053+
mod("PhysicalDamageGainAsFire", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 5, limit = 25 }),
10591054
},
10601055
["infernal_cry_empowered_attacks_trigger_combust_display"] = {
10611056
-- Display only
@@ -1164,8 +1159,7 @@ local skills, mod, flag, skill = ...
11641159
mod("IntimidatingExertedAttacks", "BASE", nil),
11651160
},
11661161
["intimidating_cry_movement_speed_+%_per_5_power_up_to_cap"] = {
1167-
mod("MovementSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 5, limit = 6 }),
1168-
mod("MovementSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 5, limit = 6 }),
1162+
mod("MovementSpeed", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 5, limit = 30 }),
11691163
},
11701164
["intimidating_cry_empowerd_attacks_deal_double_damage_display"] = {
11711165
},
@@ -1610,12 +1604,10 @@ local skills, mod, flag, skill = ...
16101604
mod("SeismicAoEMoreMultiplier", "BASE", nil),
16111605
},
16121606
["seismic_cry_stun_threshold_+%_per_5_power_up_to_cap"] = {
1613-
mod("StunThreshold", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 5, limit = 5 }),
1614-
mod("StunThreshold", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 5, limit = 5 }),
1607+
mod("StunThreshold", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 5, limit = 25 }),
16151608
},
16161609
["seismic_cry_armour_+%_final_per_5_power_up_to_cap"] = {
1617-
mod("Armour", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 5, limit = 5 }),
1618-
mod("Armour", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 5, limit = 5 }),
1610+
mod("Armour", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 5, limit = 25 }),
16191611
},
16201612
["skill_empower_limitation_specifier_for_stat_description"] = {
16211613
-- Display only
@@ -1996,8 +1988,7 @@ local skills, mod, flag, skill = ...
19961988
#flags warcry area duration
19971989
statMap = {
19981990
["rage_warcry_gain_X_rage_per_minute_per_5_monster_power_max_25_power"] = {
1999-
mod("RageRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", div = 5, limit = 5 }),
2000-
mod("RageRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry" }, { type = "Multiplier", var = "WarcryPower", actor = "parent", div = 5, limit = 5 }),
1991+
mod("RageRegen", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Warcry", div = 5, limit = 25 }),
20011992
flag("Condition:CanGainRage", { type = "GlobalEffect", effectType = "Warcry"} ),
20021993
div = 60,
20031994
},

src/Modules/CalcPerform.lua

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,6 +1857,7 @@ function calcs.perform(env, skipEHP)
18571857
local skillCfg = skillCfg
18581858
local modStore = skillModList or modDB
18591859
local warcryName = buff.name:gsub(" Cry", ""):gsub("'s",""):gsub(" ","")
1860+
local warcryPower = modDB:Override(nil, "WarcryPower") or modDB:Sum("BASE", nil, "WarcryPower") or 0
18601861
local baseExerts = modStore:Sum("BASE", env.player.mainSkill.skillCfg, warcryName.."ExertedAttacks")
18611862
if baseExerts > 0 then
18621863
local extraExertions = modStore:Sum("BASE", nil, "ExtraExertedAttacks") or 0
@@ -1876,24 +1877,36 @@ function calcs.perform(env, skipEHP)
18761877
local srcList = new("ModList")
18771878
local inc = modStore:Sum("INC", skillCfg, "BuffEffect", "BuffEffectOnSelf", "BuffEffectOnPlayer")
18781879
local more = modStore:More(skillCfg, "BuffEffect", "BuffEffectOnSelf")
1879-
local mult = (1 + inc / 100) * more * uptime
1880-
srcList:ScaleAddList(buff.modList, mult)
1880+
for _, warcryBuff in ipairs(buff.modList) do
1881+
local warcryPowerBonus = 1
1882+
if warcryBuff[1] and warcryBuff[1].effectType == "Warcry" and warcryBuff[1].div then
1883+
warcryPowerBonus = m_floor((warcryBuff[1].limit and m_min(warcryPower, warcryBuff[1].limit) or warcryPower) / warcryBuff[1].div)
1884+
end
1885+
local mult = (1 + inc / 100) * more * warcryPowerBonus * uptime
1886+
srcList:ScaleAddList({warcryBuff}, mult)
1887+
end
18811888
mergeBuff(srcList, buffs, buff.name)
18821889
end
18831890
end
18841891
if env.minion then
18851892
activeSkill.minionBuffSkill = true
18861893
env.minion.modDB.conditions["AffectedBy"..warcryName] = true
1894+
local srcList = new("ModList")
18871895
local inc = skillModList:Sum("INC", skillCfg, "BuffEffect") + env.minion.modDB:Sum("INC", skillCfg, "BuffEffectOnSelf")
18881896
local more = skillModList:More(skillCfg, "BuffEffect") * env.minion.modDB:More(skillCfg, "BuffEffectOnSelf")
1889-
local mult = (1 + inc / 100) * more * uptime
1890-
local srcList = new("ModList")
1891-
srcList:ScaleAddList(buff.modList, mult)
1897+
for _, warcryBuff in ipairs(buff.modList) do
1898+
local warcryPowerBonus = 1
1899+
if warcryBuff[1] and warcryBuff[1].effectType == "Warcry" and warcryBuff[1].div then
1900+
warcryPowerBonus = m_floor((warcryBuff[1].limit and m_min(warcryPower, warcryBuff[1].limit) or warcryPower) / warcryBuff[1].div)
1901+
end
1902+
local mult = (1 + inc / 100) * more * warcryPowerBonus * uptime
1903+
srcList:ScaleAddList({warcryBuff}, mult)
1904+
end
18921905
mergeBuff(srcList, minionBuffs, buff.name)
18931906
end
18941907
-- Special handling for the minion side to add the flat damage bonus
18951908
if activeSkill.activeEffect.grantedEffect.name == "Rallying Cry" and env.minion then
1896-
local warcryPowerBonus = m_floor((modDB:Override(nil, "WarcryPower") or modDB:Sum("BASE", nil, "WarcryPower") or 0) / 5)
1909+
local warcryPowerBonus = m_floor((warcryPower) / 5)
18971910
local rallyingWeaponEffect = activeSkill.skillModList:Sum("BASE", env.player.mainSkill.skillCfg, "RallyingCryAllyDamageBonusPer5Power")
18981911
local inc = modStore:Sum("INC", skillCfg, "BuffEffect") + env.minion.modDB:Sum("INC", skillCfg, "BuffEffectOnSelf")
18991912
local rallyingBonusMoreMultiplier = 1 + (activeSkill.skillModList:Sum("BASE", env.player.mainSkill.skillCfg, "RallyingCryMinionDamageBonusMultiplier") or 0)

0 commit comments

Comments
 (0)