Skip to content

Commit c41c5d8

Browse files
PeecheyLocalIdentity
andauthored
Add support for Ancestral Empowerment, Ancestral Call, Crescendo II and III, Infernal Cry, and "Ancestrally Boosted Attacks" passive nodes (#1839)
* add support for Ancestral Call, Crescendo II and III, ancestral boost tree nodes * fix ancestral call inc dmg from tree * big ole refactor so we stop duplicating code one commit so I can revert if it goes boom * added test update CalcSection from "Exerted Warcries" to "Ancestral Boosts" * add data map for gemName given a modSource * boosted attacks configOption * add support for Ancestral Empowerment, including combining Ancestral Empowerment with Fist of War fix Fist of War/ancestrally boosted slams more AOE to inc AOE add test for Combined logic for Ancestral Empowerment and Fist of War * comment spelling * better label * fix avg aoe from fist of war * forgot AOE portion for Crescendo III * add support for Infernal Cry's empowered buff * refactor away from specific baseMod for FistOfWar fix Ancestral Empowerment not getting the double from fist of war III * empowered condition for all Ancestrally Boosted * ancestralBoostEffect * multiplier instead * pr comments also refactored Crescendo III to use the new logic instead of an extra isolated block of logic by introducing a way to conditionally max uptime for Boosted or Empowered attacks * Fix issues Move the Infernal Cry buff to calc offence so it doesn't rely on stale calc output Fix Ancestral Empowerment uptime calculation Move gain table so Infernal Cry still works * Fix spelling --------- Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent c949f13 commit c41c5d8

17 files changed

Lines changed: 461 additions & 228 deletions

spec/System/TestSkills_spec.lua

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,4 +877,61 @@ describe("TestSkills", function()
877877
-- validate Flame Wall buff appears even when the Wall/default skillPart is active
878878
assert.are.equals("Flame Wall", build.calcsTab.calcsOutput.BuffList)
879879
end)
880+
881+
it("Test Ancestral Call - Ancestral Boost calcs", function()
882+
build.itemsTab:CreateDisplayItemFromRaw([[
883+
New Item
884+
Fanatic Greathammer
885+
Quality: 0
886+
]])
887+
build.itemsTab:AddDisplayItem()
888+
runCallback("OnFrame")
889+
890+
build.skillsTab:PasteSocketGroup("Boneshatter 20/0 1\nAncestral Call I 1/0 1")
891+
runCallback("OnFrame")
892+
893+
assert.True(build.calcsTab.calcsOutput.AvgAncestralCallDamageEffect ~= nil)
894+
assert.True(build.calcsTab.calcsOutput.AncestralCallUptimeRatio ~= nil)
895+
assert.are.equal(3, build.calcsTab.calcsOutput.StrikeTargets)
896+
end)
897+
898+
it("Test Combined Ancestral Boosts - Ancestral Empowerment and Fist of War", function()
899+
build.itemsTab:CreateDisplayItemFromRaw([[
900+
New Item
901+
Fanatic Greathammer
902+
Quality: 0
903+
]])
904+
build.itemsTab:AddDisplayItem()
905+
runCallback("OnFrame")
906+
build.skillsTab:PasteSocketGroup("Leap Slam 20/0 1\nFist of War I 1/0 1")
907+
runCallback("OnFrame")
908+
build.configTab.input.customMods = "every second slam skill you use yourself is ancestrally boosted"
909+
build.configTab:BuildModList()
910+
runCallback("OnFrame")
911+
local fistOfWarOneMaxDmgEffect = build.calcsTab.calcsOutput.MaxAncestralEmpowermentCombinedDamageEffect
912+
913+
-- test that we are using the calcCombinedAncestralBoost function and the calcSection triggers are correct
914+
assert.True(build.calcsTab.calcsOutput.AncestralEmpowermentCombinedUptimeRatio ~= nil)
915+
assert.True(build.calcsTab.calcsOutput.AncestralEmpowermentUptimeRatio == nil)
916+
assert.True(build.calcsTab.calcsOutput.FistOfWarUptimeRatio == nil)
917+
918+
newBuild()
919+
build.itemsTab:CreateDisplayItemFromRaw([[
920+
New Item
921+
Fanatic Greathammer
922+
Quality: 0
923+
]])
924+
build.itemsTab:AddDisplayItem()
925+
runCallback("OnFrame")
926+
build.skillsTab:PasteSocketGroup("Leap Slam 20/0 1\nFist of War III 1/0 1")
927+
runCallback("OnFrame")
928+
build.configTab.input.customMods = "every second slam skill you use yourself is ancestrally boosted"
929+
build.configTab:BuildModList()
930+
runCallback("OnFrame")
931+
932+
-- test doubled effects of Fist of War III with Ancestral Empowerment
933+
assert.True(fistOfWarOneMaxDmgEffect < build.calcsTab.calcsOutput.MaxAncestralEmpowermentCombinedDamageEffect)
934+
local expectedAverageEffect = 1 + (build.calcsTab.calcsOutput.MaxAncestralEmpowermentCombinedDamageEffect - 1) * build.calcsTab.calcsOutput.AncestralEmpowermentCombinedUptimeRatio / 100
935+
assert.are.equals(round(expectedAverageEffect, 4), round(build.calcsTab.calcsOutput.AvgAncestralEmpowermentCombinedDamageEffect, 4))
936+
end)
880937
end)

src/Data/ModCache.lua

Lines changed: 23 additions & 23 deletions
Large diffs are not rendered by default.

src/Data/SkillStatMap.lua

Lines changed: 32 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
},
@@ -2586,6 +2592,32 @@ return {
25862592
["slam_aftershock_chance_%"] = {
25872593
mod("AftershockChance", "BASE", nil)
25882594
},
2595+
-- Final Strike
2596+
["final_strike_is_ancestrally_boosted"] = {
2597+
flag("Condition:AncestrallyBoosted", { type = "Condition", var = "FinalStrike" }),
2598+
flag("MaxBoostedUptimeRatio", { type = "Condition", var = "FinalStrike"}),
2599+
},
2600+
["is_final_strike"] = {
2601+
flag("Condition:FinalStrike"),
2602+
},
2603+
["ancestral_slam_interval_duration"] = {
2604+
{
2605+
mod("FistOfWarCooldown", "BASE", nil),
2606+
div = 1000,
2607+
},
2608+
flag("Condition:AncestrallyBoosted"),
2609+
},
2610+
["ancestral_call_spirit_strike_interval_ms"] = {
2611+
{
2612+
mod("AncestralCallCooldown", "BASE", nil),
2613+
div = 1000,
2614+
},
2615+
flag("Condition:AncestrallyBoosted"),
2616+
},
2617+
["double_ancestral_boost_effect"] = {
2618+
mod("Multiplier:AncestralBoostEffect", "BASE", nil),
2619+
value = 1,
2620+
},
25892621
-- Curse
25902622
["curse_effect_+%"] = {
25912623
mod("CurseEffect", "INC", nil),

src/Data/Skills/act_str.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7509,6 +7509,11 @@ skills["InfernalCryPlayer"] = {
75097509
label = "Infernal Cry",
75107510
incrementalEffectiveness = 0.054999999701977,
75117511
statDescriptionScope = "infernal_cry",
7512+
statMap = {
7513+
["infernal_cry_exerted_attack_all_damage_%_to_gain_as_fire_%"] = {
7514+
mod("InfernalExtraFireDamageMultiplier", "BASE", nil),
7515+
},
7516+
},
75127517
baseFlags = {
75137518
warcry = true,
75147519
area = true,

src/Data/Skills/sup_int.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2586,6 +2586,11 @@ skills["SupportCrescendoPlayerTwo"] = {
25862586
label = "Crescendo II",
25872587
incrementalEffectiveness = 0.054999999701977,
25882588
statDescriptionScope = "gem_stat_descriptions",
2589+
statMap = {
2590+
["support_crescendo_non_final_strike_attack_speed_+%_final"] = {
2591+
mod("Speed", "MORE", nil, ModFlag.Attack, 0, { type = "Condition", var = "FinalStrike", neg = true})
2592+
},
2593+
},
25892594
baseFlags = {
25902595
},
25912596
constantStats = {

src/Data/Skills/sup_str.lua

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3398,18 +3398,8 @@ skills["FistOfWarSupportPlayer"] = {
33983398
label = "Fist of War I",
33993399
incrementalEffectiveness = 0.092720001935959,
34003400
statDescriptionScope = "gem_stat_descriptions",
3401-
statMap = {
3402-
["ancestral_slam_interval_duration"] = {
3403-
mod("FistOfWarCooldown", "BASE", nil),
3404-
div = 1000,
3405-
},
3406-
},
34073401
baseFlags = {
34083402
},
3409-
baseMods = {
3410-
mod("FistOfWarDamageMultiplier", "BASE", 30),
3411-
mod("FistOfWarMOREAoE", "BASE", 25),
3412-
},
34133403
constantStats = {
34143404
{ "support_ancestral_slam_big_hit_max_count", 1 },
34153405
{ "ancestral_slam_interval_duration", 6000 },
@@ -3439,18 +3429,8 @@ skills["FistOfWarSupportPlayerTwo"] = {
34393429
label = "Fist of War II",
34403430
incrementalEffectiveness = 0.092720001935959,
34413431
statDescriptionScope = "gem_stat_descriptions",
3442-
statMap = {
3443-
["ancestral_slam_interval_duration"] = {
3444-
mod("FistOfWarCooldown", "BASE", nil),
3445-
div = 1000,
3446-
},
3447-
},
34483432
baseFlags = {
34493433
},
3450-
baseMods = {
3451-
mod("FistOfWarDamageMultiplier", "BASE", 30),
3452-
mod("FistOfWarMOREAoE", "BASE", 25),
3453-
},
34543434
constantStats = {
34553435
{ "support_ancestral_slam_big_hit_max_count", 1 },
34563436
{ "ancestral_slam_interval_duration", 4000 },
@@ -3480,21 +3460,8 @@ skills["FistOfWarSupportPlayerThree"] = {
34803460
label = "Fist of War III",
34813461
incrementalEffectiveness = 0.092720001935959,
34823462
statDescriptionScope = "gem_stat_descriptions",
3483-
statMap = {
3484-
["ancestral_slam_interval_duration"] = {
3485-
mod("FistOfWarCooldown", "BASE", nil),
3486-
div = 1000,
3487-
},
3488-
["double_ancestral_boost_effect"] = {
3489-
-- Accounted for in base mod
3490-
},
3491-
},
34923463
baseFlags = {
34933464
},
3494-
baseMods = {
3495-
mod("FistOfWarDamageMultiplier", "BASE", 60),
3496-
mod("FistOfWarMOREAoE", "BASE", 50),
3497-
},
34983465
constantStats = {
34993466
{ "support_ancestral_slam_big_hit_max_count", 1 },
35003467
{ "ancestral_slam_interval_duration", 14000 },

src/Export/Skills/act_str.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,11 @@ statMap = {
486486
#skill InfernalCryPlayer
487487
#set InfernalCryPlayer
488488
#flags warcry area duration
489+
statMap = {
490+
["infernal_cry_exerted_attack_all_damage_%_to_gain_as_fire_%"] = {
491+
mod("InfernalExtraFireDamageMultiplier", "BASE", nil),
492+
},
493+
},
489494
#mods
490495
#skillEnd
491496

src/Export/Skills/sup_int.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,11 @@ statMap = {
440440

441441
#skill SupportCrescendoPlayerTwo
442442
#set SupportCrescendoPlayerTwo
443+
statMap = {
444+
["support_crescendo_non_final_strike_attack_speed_+%_final"] = {
445+
mod("Speed", "MORE", nil, ModFlag.Attack, 0, { type = "Condition", var = "FinalStrike", neg = true})
446+
},
447+
},
443448
#mods
444449
#skillEnd
445450

src/Export/Skills/sup_str.txt

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -743,43 +743,16 @@ statMap = {
743743

744744
#skill FistOfWarSupportPlayer
745745
#set FistOfWarSupportPlayer
746-
statMap = {
747-
["ancestral_slam_interval_duration"] = {
748-
mod("FistOfWarCooldown", "BASE", nil),
749-
div = 1000,
750-
},
751-
},
752-
#baseMod mod("FistOfWarDamageMultiplier", "BASE", 30)
753-
#baseMod mod("FistOfWarMOREAoE", "BASE", 25)
754746
#mods
755747
#skillEnd
756748

757749
#skill FistOfWarSupportPlayerTwo
758750
#set FistOfWarSupportPlayerTwo
759-
statMap = {
760-
["ancestral_slam_interval_duration"] = {
761-
mod("FistOfWarCooldown", "BASE", nil),
762-
div = 1000,
763-
},
764-
},
765-
#baseMod mod("FistOfWarDamageMultiplier", "BASE", 30)
766-
#baseMod mod("FistOfWarMOREAoE", "BASE", 25)
767751
#mods
768752
#skillEnd
769753

770754
#skill FistOfWarSupportPlayerThree
771755
#set FistOfWarSupportPlayerThree
772-
statMap = {
773-
["ancestral_slam_interval_duration"] = {
774-
mod("FistOfWarCooldown", "BASE", nil),
775-
div = 1000,
776-
},
777-
["double_ancestral_boost_effect"] = {
778-
-- Accounted for in base mod
779-
},
780-
},
781-
#baseMod mod("FistOfWarDamageMultiplier", "BASE", 60)
782-
#baseMod mod("FistOfWarMOREAoE", "BASE", 50)
783756
#mods
784757
#skillEnd
785758

0 commit comments

Comments
 (0)