diff --git a/spec/System/TestSkills_spec.lua b/spec/System/TestSkills_spec.lua index 69b21f4677..8ccc5e3478 100644 --- a/spec/System/TestSkills_spec.lua +++ b/spec/System/TestSkills_spec.lua @@ -1,4 +1,4 @@ -describe("TestAttacks", function() +describe("TestSkills", function() before_each(function() newBuild() end) @@ -249,4 +249,73 @@ describe("TestAttacks", function() assert.are.equals(0, nonDurationSkill.skillModList:Sum("BASE", nonDurationSkill.skillCfg, "BaseFlagTest")) assert.are.equals(1, nonDurationSkill.skillModList:Sum("BASE", nonDurationSkill.skillCfg, "NegatedBaseFlagTest")) end) + + it("Test Empowered Spells - Pact of Beidat", function() + build.skillsTab:PasteSocketGroup("Fireball 20/0 1") + runCallback("OnFrame") + local baseDPS = build.calcsTab.calcsOutput.TotalDPS + + build.skillsTab:PasteSocketGroup("Pact of Beidat 1/0 1") + runCallback("OnFrame") + assert.True(build.calcsTab.calcsOutput.BeidatUpTimeRatio > 0) + assert.True(build.calcsTab.calcsOutput.TotalDPS > baseDPS) + + newBuild() + build.skillsTab:PasteSocketGroup("Vaal Arc 20/0 1\nPact of Beidat 1/0 1") + runCallback("OnFrame") + assert.True(build.calcsTab.calcsOutput.BeidatUpTimeRatio == nil) + end) + + it("Test Empowered Spells - Pact of Ghorr", function() + build.skillsTab:PasteSocketGroup("Creeping Frost 20/0 1") + runCallback("OnFrame") + local baseDPS = build.calcsTab.calcsOutput.TotalDotDPS + + build.skillsTab:PasteSocketGroup("Pact of Ghorr 1/0 1") + runCallback("OnFrame") + assert.True(build.calcsTab.calcsOutput.GhorrUpTimeRatio > 0) + assert.True(build.calcsTab.calcsOutput.TotalDotDPS > baseDPS) + + newBuild() + build.skillsTab:PasteSocketGroup("Vaal Arc 20/0 1\n Pact of Ghorr 1/0 1") + runCallback("OnFrame") + assert.True(build.calcsTab.calcsOutput.GhorrUpTimeRatio == nil) + end) + + it("Test Empowered Spells - Pact of K'Tash", function() + build.skillsTab:PasteSocketGroup("Vaal Arc 20/0 1") + runCallback("OnFrame") + local baseDPS = build.calcsTab.calcsOutput.TotalDPS + + build.skillsTab:PasteSocketGroup("Pact of K'Tash 1/0 1") + runCallback("OnFrame") + assert.True(build.calcsTab.calcsOutput.KtashUpTimeRatio > 0) + assert.True(build.calcsTab.calcsOutput.TotalDPS > baseDPS) + + newBuild() + build.skillsTab:PasteSocketGroup("Fireball 20/0 1\nPact of K'Tash 1/0 1") + runCallback("OnFrame") + assert.True(build.calcsTab.calcsOutput.KtashUpTimeRatio == nil) + end) + + it("Test Empowered Spells - Pact of Lycia", function() + build.skillsTab:PasteSocketGroup("Lightning Tendrils 20/0 1") + runCallback("OnFrame") + local baseDPS = build.calcsTab.calcsOutput.TotalDPS + + build.skillsTab:PasteSocketGroup("Pact of Lycia 1/0 1") + runCallback("OnFrame") + assert.True(build.calcsTab.calcsOutput.LyciaUpTimeRatio > 0) + assert.True(build.calcsTab.calcsOutput.TotalDPS > baseDPS) + + newBuild() + build.skillsTab:PasteSocketGroup("Fireball 20/0 1\nPact of Lycia 1/0 1") + runCallback("OnFrame") + assert.True(build.calcsTab.calcsOutput.LyciaUpTimeRatio == nil) + + newBuild() + build.skillsTab:PasteSocketGroup("Vaal Arc 20/0 1\nPact of Lycia 1/0 1") + runCallback("OnFrame") + assert.True(build.calcsTab.calcsOutput.LyciaUpTimeRatio == nil) + end) end) diff --git a/src/Data/SkillStatMap.lua b/src/Data/SkillStatMap.lua index 795acd976c..379e4971bf 100644 --- a/src/Data/SkillStatMap.lua +++ b/src/Data/SkillStatMap.lua @@ -2365,4 +2365,7 @@ return { ["is_totem"] = { -- Display only }, +["pact_empower_limitation_specifier_for_stat_description"] = { + -- display only +}, } diff --git a/src/Data/Skills/other.lua b/src/Data/Skills/other.lua index 16ea68e600..319295a4bf 100644 --- a/src/Data/Skills/other.lua +++ b/src/Data/Skills/other.lua @@ -3182,6 +3182,324 @@ skills["Pacify"] = { [20] = { levelRequirement = 70, cost = { Mana = 33, }, }, }, } +skills["PactOfBeidat"] = { + name = "Pact of Beidat", + baseTypeName = "Pact of Beidat", + flavourText = {"Wield the gifts of Beidat, luminary of the pale unseeing,", "whose honeyed words bore tunnels through pliant minds.", }, + color = 4, + description = "Cast a pact, Empowering non-channelling spells that either fire projectiles, apply an effect to an area around a targeted location or fire chaining beams, causing them to deal more damage and have enhanced coverage. However, using this skill also burdens you with an Affliction.", + skillTypes = { [SkillType.Spell] = true, [SkillType.Pact] = true, [SkillType.Buff] = true, [SkillType.Cooldown] = true, [SkillType.InstantNoRepeatWhenHeld] = true, [SkillType.InstantShiftAttackForLeftMouse] = true, [SkillType.Triggerable] = true, }, + statDescriptionScope = "skill_stat_descriptions", + castTime = 0.8, + statMap = { + ["skill_empowers_next_x_spells_cast"] = { + mod("BeidatEmpoweredSpells", "BASE", nil), + }, + ["pact_skill_damage_+%_final_with_hits_and_ailments_to_grant"] = { + mod("BeidatPactDamage", "BASE", nil), + }, + }, + baseFlags = { + spell = true, + pact = true, + }, + qualityStats = { + { "skill_empowers_next_x_spells_cast", 0.1 }, + }, + constantStats = { + { "skill_empowers_next_x_spells_cast", 6 }, + { "pact_empower_limitation_specifier_for_stat_description", 0 }, + }, + stats = { + "pact_skill_additional_beam_only_chains", + "pact_skill_grant_x_additional_projectiles_fired_in_nova", + "pact_skill_grant_x_cascades_to_do_in_spiral", + "pact_skill_damage_+%_final_with_hits_and_ailments_to_grant", + "base_deal_no_attack_damage", + "base_deal_no_spell_damage", + "base_deal_no_secondary_damage", + "cannot_cancel_skill_before_contact_point", + }, + levels = { + [1] = { 4, 4, 5, 16, cooldown = 4, levelRequirement = 24, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 16, }, }, + [2] = { 4, 4, 5, 17, cooldown = 4, levelRequirement = 27, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 17, }, }, + [3] = { 4, 4, 5, 18, cooldown = 4, levelRequirement = 30, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 18, }, }, + [4] = { 4, 4, 5, 19, cooldown = 4, levelRequirement = 33, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 19, }, }, + [5] = { 4, 4, 6, 20, cooldown = 4, levelRequirement = 36, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 21, }, }, + [6] = { 5, 4, 6, 21, cooldown = 4, levelRequirement = 39, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 22, }, }, + [7] = { 5, 5, 6, 22, cooldown = 4, levelRequirement = 42, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 23, }, }, + [8] = { 5, 5, 6, 23, cooldown = 4, levelRequirement = 45, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 24, }, }, + [9] = { 5, 5, 6, 24, cooldown = 4, levelRequirement = 48, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 25, }, }, + [10] = { 5, 5, 6, 25, cooldown = 4, levelRequirement = 50, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 26, }, }, + [11] = { 5, 5, 7, 26, cooldown = 4, levelRequirement = 52, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 26, }, }, + [12] = { 5, 5, 7, 27, cooldown = 4, levelRequirement = 54, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 27, }, }, + [13] = { 5, 5, 7, 28, cooldown = 4, levelRequirement = 56, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 28, }, }, + [14] = { 6, 5, 7, 29, cooldown = 4, levelRequirement = 58, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 29, }, }, + [15] = { 6, 6, 7, 30, cooldown = 4, levelRequirement = 60, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 29, }, }, + [16] = { 6, 6, 7, 31, cooldown = 4, levelRequirement = 62, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 30, }, }, + [17] = { 6, 6, 8, 32, cooldown = 4, levelRequirement = 64, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 31, }, }, + [18] = { 6, 6, 8, 33, cooldown = 4, levelRequirement = 66, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 31, }, }, + [19] = { 6, 6, 8, 34, cooldown = 4, levelRequirement = 68, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 32, }, }, + [20] = { 6, 6, 8, 35, cooldown = 4, levelRequirement = 70, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 33, }, }, + [21] = { 6, 6, 8, 36, cooldown = 4, levelRequirement = 72, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 34, }, }, + [22] = { 7, 6, 8, 37, cooldown = 4, levelRequirement = 74, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 34, }, }, + [23] = { 7, 7, 8, 38, cooldown = 4, levelRequirement = 76, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 35, }, }, + [24] = { 7, 7, 9, 39, cooldown = 4, levelRequirement = 78, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 36, }, }, + [25] = { 7, 7, 9, 40, cooldown = 4, levelRequirement = 80, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 36, }, }, + [26] = { 7, 7, 9, 41, cooldown = 4, levelRequirement = 82, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 37, }, }, + [27] = { 7, 7, 9, 42, cooldown = 4, levelRequirement = 84, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 38, }, }, + [28] = { 7, 7, 9, 43, cooldown = 4, levelRequirement = 86, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 39, }, }, + [29] = { 7, 7, 9, 44, cooldown = 4, levelRequirement = 88, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 39, }, }, + [30] = { 8, 7, 10, 44, cooldown = 4, levelRequirement = 90, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 40, }, }, + [31] = { 8, 7, 10, 45, cooldown = 4, levelRequirement = 91, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 40, }, }, + [32] = { 8, 8, 10, 45, cooldown = 4, levelRequirement = 92, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 41, }, }, + [33] = { 8, 8, 10, 46, cooldown = 4, levelRequirement = 93, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 41, }, }, + [34] = { 8, 8, 10, 46, cooldown = 4, levelRequirement = 94, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 42, }, }, + [35] = { 8, 8, 10, 47, cooldown = 4, levelRequirement = 95, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 42, }, }, + [36] = { 8, 8, 10, 47, cooldown = 4, levelRequirement = 96, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 42, }, }, + [37] = { 8, 8, 10, 48, cooldown = 4, levelRequirement = 97, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 43, }, }, + [38] = { 8, 8, 10, 48, cooldown = 4, levelRequirement = 98, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 43, }, }, + [39] = { 8, 8, 10, 49, cooldown = 4, levelRequirement = 99, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 43, }, }, + [40] = { 8, 8, 10, 49, cooldown = 4, levelRequirement = 100, storedUses = 1, statInterpolation = { 1, 1, 1, 1, }, cost = { Mana = 44, }, }, + }, +} +skills["PactOfGhorr"] = { + name = "Pact of Ghorr", + baseTypeName = "Pact of Ghorr", + flavourText = {"Offer yourself to Ghorr, the gluttonous, the cage of", "flesh trapping souls in the cycle of consumption.", }, + color = 4, + description = "Cast a pact, Empowering your damage over time spells but burdening you with an Affliction. This skill also grants the Hunger of Ghorr buff for a duration causing Fleshrend to trigger periodically.", + skillTypes = { [SkillType.Spell] = true, [SkillType.Pact] = true, [SkillType.Buff] = true, [SkillType.Cooldown] = true, [SkillType.InstantNoRepeatWhenHeld] = true, [SkillType.InstantShiftAttackForLeftMouse] = true, [SkillType.Triggerable] = true, }, + statDescriptionScope = "skill_stat_descriptions", + castTime = 0.8, + statMap = { + ["skill_empowers_next_x_spells_cast"] = { + mod("GhorrEmpoweredSpells", "BASE", nil), + }, + ["pact_skill_grant_damage_over_time_+%_final_to_spells"] = { + mod("GhorrPactDamage", "BASE", nil), + }, + }, + baseFlags = { + spell = true, + pact = true, + duration = true, + }, + constantStats = { + { "skill_empowers_next_x_spells_cast", 3 }, + { "pact_empower_limitation_specifier_for_stat_description", 1 }, + { "pact_skill_grant_damage_over_time_+%_final_to_spells", 40 }, + { "skill_grants_bloodrite_for_base_X_ms_on_use", 6000 }, + { "bloodrite_base_trigger_frequency_ms", 2000 }, + { "bloodrite_trigger_frequency_+%_per_stage", 150 }, + }, + stats = { + "base_deal_no_attack_damage", + "base_deal_no_spell_damage", + "base_deal_no_secondary_damage", + "cannot_cancel_skill_before_contact_point", + }, + levels = { + [1] = { cooldown = 4, levelRequirement = 24, storedUses = 1, cost = { Mana = 16, }, }, + [2] = { cooldown = 4, levelRequirement = 27, storedUses = 1, cost = { Mana = 17, }, }, + [3] = { cooldown = 4, levelRequirement = 30, storedUses = 1, cost = { Mana = 18, }, }, + [4] = { cooldown = 4, levelRequirement = 33, storedUses = 1, cost = { Mana = 19, }, }, + [5] = { cooldown = 4, levelRequirement = 36, storedUses = 1, cost = { Mana = 21, }, }, + [6] = { cooldown = 4, levelRequirement = 39, storedUses = 1, cost = { Mana = 22, }, }, + [7] = { cooldown = 4, levelRequirement = 42, storedUses = 1, cost = { Mana = 23, }, }, + [8] = { cooldown = 4, levelRequirement = 45, storedUses = 1, cost = { Mana = 24, }, }, + [9] = { cooldown = 4, levelRequirement = 48, storedUses = 1, cost = { Mana = 25, }, }, + [10] = { cooldown = 4, levelRequirement = 50, storedUses = 1, cost = { Mana = 26, }, }, + [11] = { cooldown = 4, levelRequirement = 52, storedUses = 1, cost = { Mana = 26, }, }, + [12] = { cooldown = 4, levelRequirement = 54, storedUses = 1, cost = { Mana = 27, }, }, + [13] = { cooldown = 4, levelRequirement = 56, storedUses = 1, cost = { Mana = 28, }, }, + [14] = { cooldown = 4, levelRequirement = 58, storedUses = 1, cost = { Mana = 29, }, }, + [15] = { cooldown = 4, levelRequirement = 60, storedUses = 1, cost = { Mana = 29, }, }, + [16] = { cooldown = 4, levelRequirement = 62, storedUses = 1, cost = { Mana = 30, }, }, + [17] = { cooldown = 4, levelRequirement = 64, storedUses = 1, cost = { Mana = 31, }, }, + [18] = { cooldown = 4, levelRequirement = 66, storedUses = 1, cost = { Mana = 31, }, }, + [19] = { cooldown = 4, levelRequirement = 68, storedUses = 1, cost = { Mana = 32, }, }, + [20] = { cooldown = 4, levelRequirement = 70, storedUses = 1, cost = { Mana = 33, }, }, + [21] = { cooldown = 4, levelRequirement = 72, storedUses = 1, cost = { Mana = 34, }, }, + [22] = { cooldown = 4, levelRequirement = 74, storedUses = 1, cost = { Mana = 34, }, }, + [23] = { cooldown = 4, levelRequirement = 76, storedUses = 1, cost = { Mana = 35, }, }, + [24] = { cooldown = 4, levelRequirement = 78, storedUses = 1, cost = { Mana = 36, }, }, + [25] = { cooldown = 4, levelRequirement = 80, storedUses = 1, cost = { Mana = 36, }, }, + [26] = { cooldown = 4, levelRequirement = 82, storedUses = 1, cost = { Mana = 37, }, }, + [27] = { cooldown = 4, levelRequirement = 84, storedUses = 1, cost = { Mana = 38, }, }, + [28] = { cooldown = 4, levelRequirement = 86, storedUses = 1, cost = { Mana = 39, }, }, + [29] = { cooldown = 4, levelRequirement = 88, storedUses = 1, cost = { Mana = 39, }, }, + [30] = { cooldown = 4, levelRequirement = 90, storedUses = 1, cost = { Mana = 40, }, }, + [31] = { cooldown = 4, levelRequirement = 91, storedUses = 1, cost = { Mana = 40, }, }, + [32] = { cooldown = 4, levelRequirement = 92, storedUses = 1, cost = { Mana = 41, }, }, + [33] = { cooldown = 4, levelRequirement = 93, storedUses = 1, cost = { Mana = 41, }, }, + [34] = { cooldown = 4, levelRequirement = 94, storedUses = 1, cost = { Mana = 42, }, }, + [35] = { cooldown = 4, levelRequirement = 95, storedUses = 1, cost = { Mana = 42, }, }, + [36] = { cooldown = 4, levelRequirement = 96, storedUses = 1, cost = { Mana = 42, }, }, + [37] = { cooldown = 4, levelRequirement = 97, storedUses = 1, cost = { Mana = 43, }, }, + [38] = { cooldown = 4, levelRequirement = 98, storedUses = 1, cost = { Mana = 43, }, }, + [39] = { cooldown = 4, levelRequirement = 99, storedUses = 1, cost = { Mana = 43, }, }, + [40] = { cooldown = 4, levelRequirement = 100, storedUses = 1, cost = { Mana = 44, }, }, + }, +} +skills["PactOfKtash"] = { + name = "Pact of K'Tash", + baseTypeName = "Pact of K'Tash", + flavourText = {"Unleash the fury of K'Tash, incarnation of hate.", "Endless bodies burn beneath the flames of his pursuit.", }, + color = 4, + description = "Cast a pact, Empowering your damaging Vaal spells but burdening you with an Affliction. Empowered Vaal spells deal more damage, have less soul gain prevention duration and regain consumed souls on use.", + skillTypes = { [SkillType.Spell] = true, [SkillType.Pact] = true, [SkillType.Buff] = true, [SkillType.Cooldown] = true, [SkillType.InstantNoRepeatWhenHeld] = true, [SkillType.InstantShiftAttackForLeftMouse] = true, [SkillType.Triggerable] = true, }, + statDescriptionScope = "skill_stat_descriptions", + castTime = 0.8, + statMap = { + ["skill_empowers_next_x_spells_cast"] = { + mod("KtashEmpoweredSpells", "BASE", nil), + }, + ["pact_skill_grant_damage_+%_final_to_exerted_skills"] = { + mod("KtashPactDamage", "BASE", nil), + }, + ["active_skill_osm_vaal_skill_soul_gain_prevention_+%_final_to_grant"] = { + mod("KtashPactSoulGainPrevention", "BASE", nil), + }, + }, + baseFlags = { + spell = true, + pact = true, + }, + qualityStats = { + { "base_cooldown_speed_+%", 0.5 }, + }, + constantStats = { + { "skill_empowers_next_x_spells_cast", 1 }, + { "pact_empower_limitation_specifier_for_stat_description", 2 }, + { "active_skill_osm_vaal_skill_soul_refund_chance_%_to_grant", 100 }, + { "active_skill_osm_vaal_skill_soul_gain_prevention_+%_final_to_grant", -50 }, + }, + stats = { + "pact_skill_grant_damage_+%_final_to_exerted_skills", + "base_deal_no_attack_damage", + "base_deal_no_spell_damage", + "base_deal_no_secondary_damage", + "cannot_cancel_skill_before_contact_point", + }, + levels = { + [1] = { 10, cooldown = 6, levelRequirement = 24, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 16, }, }, + [2] = { 11, cooldown = 6, levelRequirement = 27, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 17, }, }, + [3] = { 12, cooldown = 6, levelRequirement = 30, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 18, }, }, + [4] = { 13, cooldown = 6, levelRequirement = 33, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 19, }, }, + [5] = { 14, cooldown = 6, levelRequirement = 36, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 21, }, }, + [6] = { 15, cooldown = 6, levelRequirement = 39, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 22, }, }, + [7] = { 16, cooldown = 6, levelRequirement = 42, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 23, }, }, + [8] = { 17, cooldown = 6, levelRequirement = 45, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 24, }, }, + [9] = { 18, cooldown = 6, levelRequirement = 48, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 25, }, }, + [10] = { 19, cooldown = 6, levelRequirement = 50, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 26, }, }, + [11] = { 20, cooldown = 6, levelRequirement = 52, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 26, }, }, + [12] = { 21, cooldown = 6, levelRequirement = 54, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 27, }, }, + [13] = { 22, cooldown = 6, levelRequirement = 56, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 28, }, }, + [14] = { 23, cooldown = 6, levelRequirement = 58, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 29, }, }, + [15] = { 24, cooldown = 6, levelRequirement = 60, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 29, }, }, + [16] = { 25, cooldown = 6, levelRequirement = 62, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 30, }, }, + [17] = { 26, cooldown = 6, levelRequirement = 64, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 31, }, }, + [18] = { 27, cooldown = 6, levelRequirement = 66, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 31, }, }, + [19] = { 28, cooldown = 6, levelRequirement = 68, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 32, }, }, + [20] = { 29, cooldown = 6, levelRequirement = 70, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 33, }, }, + [21] = { 30, cooldown = 6, levelRequirement = 72, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 34, }, }, + [22] = { 31, cooldown = 6, levelRequirement = 74, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 34, }, }, + [23] = { 32, cooldown = 6, levelRequirement = 76, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 35, }, }, + [24] = { 33, cooldown = 6, levelRequirement = 78, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 36, }, }, + [25] = { 34, cooldown = 6, levelRequirement = 80, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 36, }, }, + [26] = { 35, cooldown = 6, levelRequirement = 82, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 37, }, }, + [27] = { 36, cooldown = 6, levelRequirement = 84, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 38, }, }, + [28] = { 37, cooldown = 6, levelRequirement = 86, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 39, }, }, + [29] = { 38, cooldown = 6, levelRequirement = 88, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 39, }, }, + [30] = { 39, cooldown = 6, levelRequirement = 90, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 40, }, }, + [31] = { 39, cooldown = 6, levelRequirement = 91, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 40, }, }, + [32] = { 40, cooldown = 6, levelRequirement = 92, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 41, }, }, + [33] = { 40, cooldown = 6, levelRequirement = 93, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 41, }, }, + [34] = { 41, cooldown = 6, levelRequirement = 94, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 42, }, }, + [35] = { 41, cooldown = 6, levelRequirement = 95, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 42, }, }, + [36] = { 42, cooldown = 6, levelRequirement = 96, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 42, }, }, + [37] = { 42, cooldown = 6, levelRequirement = 97, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 43, }, }, + [38] = { 43, cooldown = 6, levelRequirement = 98, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 43, }, }, + [39] = { 43, cooldown = 6, levelRequirement = 99, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 43, }, }, + [40] = { 44, cooldown = 6, levelRequirement = 100, storedUses = 1, statInterpolation = { 1, }, cost = { Mana = 44, }, }, + }, +} +skills["PactOfLycia"] = { + name = "Pact of Lycia", + baseTypeName = "Pact of Lycia", + flavourText = {"Call upon Lycia, conduit of the Scourge. She forfeit", "her soul for the power to condemn lies told by bones.", }, + color = 4, + description = "Cast a pact, Empowering the next channelling spells you cast yourself but burdening you with an Affliction. Empowered spells deal more damage and periodically trigger lightning bolts while channelling.", + skillTypes = { [SkillType.Spell] = true, [SkillType.Pact] = true, [SkillType.Buff] = true, [SkillType.Cooldown] = true, [SkillType.InstantNoRepeatWhenHeld] = true, [SkillType.InstantShiftAttackForLeftMouse] = true, [SkillType.Triggerable] = true, }, + statDescriptionScope = "skill_stat_descriptions", + castTime = 0.8, + statMap = { + ["skill_empowers_next_x_spells_cast"] = { + mod("LyciaEmpoweredSpells", "BASE", nil), + }, + ["pact_skill_grant_damage_+%_final_to_exerted_skills"] = { + mod("LyciaPactDamage", "BASE", nil), + }, + }, + baseFlags = { + spell = true, + pact = true, + }, + constantStats = { + { "skill_empowers_next_x_spells_cast", 3 }, + { "pact_empower_limitation_specifier_for_stat_description", 3 }, + { "pact_skill_grant_damage_+%_final_to_exerted_skills", 40 }, + }, + stats = { + "base_deal_no_attack_damage", + "base_deal_no_spell_damage", + "base_deal_no_secondary_damage", + "cannot_cancel_skill_before_contact_point", + }, + levels = { + [1] = { cooldown = 4, levelRequirement = 24, storedUses = 1, cost = { Mana = 16, }, }, + [2] = { cooldown = 4, levelRequirement = 27, storedUses = 1, cost = { Mana = 17, }, }, + [3] = { cooldown = 4, levelRequirement = 30, storedUses = 1, cost = { Mana = 18, }, }, + [4] = { cooldown = 4, levelRequirement = 33, storedUses = 1, cost = { Mana = 19, }, }, + [5] = { cooldown = 4, levelRequirement = 36, storedUses = 1, cost = { Mana = 21, }, }, + [6] = { cooldown = 4, levelRequirement = 39, storedUses = 1, cost = { Mana = 22, }, }, + [7] = { cooldown = 4, levelRequirement = 42, storedUses = 1, cost = { Mana = 23, }, }, + [8] = { cooldown = 4, levelRequirement = 45, storedUses = 1, cost = { Mana = 24, }, }, + [9] = { cooldown = 4, levelRequirement = 48, storedUses = 1, cost = { Mana = 25, }, }, + [10] = { cooldown = 4, levelRequirement = 50, storedUses = 1, cost = { Mana = 26, }, }, + [11] = { cooldown = 4, levelRequirement = 52, storedUses = 1, cost = { Mana = 26, }, }, + [12] = { cooldown = 4, levelRequirement = 54, storedUses = 1, cost = { Mana = 27, }, }, + [13] = { cooldown = 4, levelRequirement = 56, storedUses = 1, cost = { Mana = 28, }, }, + [14] = { cooldown = 4, levelRequirement = 58, storedUses = 1, cost = { Mana = 29, }, }, + [15] = { cooldown = 4, levelRequirement = 60, storedUses = 1, cost = { Mana = 29, }, }, + [16] = { cooldown = 4, levelRequirement = 62, storedUses = 1, cost = { Mana = 30, }, }, + [17] = { cooldown = 4, levelRequirement = 64, storedUses = 1, cost = { Mana = 31, }, }, + [18] = { cooldown = 4, levelRequirement = 66, storedUses = 1, cost = { Mana = 31, }, }, + [19] = { cooldown = 4, levelRequirement = 68, storedUses = 1, cost = { Mana = 32, }, }, + [20] = { cooldown = 4, levelRequirement = 70, storedUses = 1, cost = { Mana = 33, }, }, + [21] = { cooldown = 4, levelRequirement = 72, storedUses = 1, cost = { Mana = 34, }, }, + [22] = { cooldown = 4, levelRequirement = 74, storedUses = 1, cost = { Mana = 34, }, }, + [23] = { cooldown = 4, levelRequirement = 76, storedUses = 1, cost = { Mana = 35, }, }, + [24] = { cooldown = 4, levelRequirement = 78, storedUses = 1, cost = { Mana = 36, }, }, + [25] = { cooldown = 4, levelRequirement = 80, storedUses = 1, cost = { Mana = 36, }, }, + [26] = { cooldown = 4, levelRequirement = 82, storedUses = 1, cost = { Mana = 37, }, }, + [27] = { cooldown = 4, levelRequirement = 84, storedUses = 1, cost = { Mana = 38, }, }, + [28] = { cooldown = 4, levelRequirement = 86, storedUses = 1, cost = { Mana = 39, }, }, + [29] = { cooldown = 4, levelRequirement = 88, storedUses = 1, cost = { Mana = 39, }, }, + [30] = { cooldown = 4, levelRequirement = 90, storedUses = 1, cost = { Mana = 40, }, }, + [31] = { cooldown = 4, levelRequirement = 91, storedUses = 1, cost = { Mana = 40, }, }, + [32] = { cooldown = 4, levelRequirement = 92, storedUses = 1, cost = { Mana = 41, }, }, + [33] = { cooldown = 4, levelRequirement = 93, storedUses = 1, cost = { Mana = 41, }, }, + [34] = { cooldown = 4, levelRequirement = 94, storedUses = 1, cost = { Mana = 42, }, }, + [35] = { cooldown = 4, levelRequirement = 95, storedUses = 1, cost = { Mana = 42, }, }, + [36] = { cooldown = 4, levelRequirement = 96, storedUses = 1, cost = { Mana = 42, }, }, + [37] = { cooldown = 4, levelRequirement = 97, storedUses = 1, cost = { Mana = 43, }, }, + [38] = { cooldown = 4, levelRequirement = 98, storedUses = 1, cost = { Mana = 43, }, }, + [39] = { cooldown = 4, levelRequirement = 99, storedUses = 1, cost = { Mana = 43, }, }, + [40] = { cooldown = 4, levelRequirement = 100, storedUses = 1, cost = { Mana = 44, }, }, + }, +} skills["Ravenous"] = { name = "Ravenous", hidden = true, diff --git a/src/Export/Skills/other.txt b/src/Export/Skills/other.txt index 6e0289cc2a..d552451e91 100644 --- a/src/Export/Skills/other.txt +++ b/src/Export/Skills/other.txt @@ -745,6 +745,57 @@ local skills, mod, flag, skill = ... #baseMod skill("debuff", true) #mods +#skill PactOfBeidat +#flags spell pact + statMap = { + ["skill_empowers_next_x_spells_cast"] = { + mod("BeidatEmpoweredSpells", "BASE", nil), + }, + ["pact_skill_damage_+%_final_with_hits_and_ailments_to_grant"] = { + mod("BeidatPactDamage", "BASE", nil), + }, + }, +#mods + +#skill PactOfGhorr +#flags spell pact duration + statMap = { + ["skill_empowers_next_x_spells_cast"] = { + mod("GhorrEmpoweredSpells", "BASE", nil), + }, + ["pact_skill_grant_damage_over_time_+%_final_to_spells"] = { + mod("GhorrPactDamage", "BASE", nil), + }, + }, +#mods + +#skill PactOfKtash +#flags spell pact + statMap = { + ["skill_empowers_next_x_spells_cast"] = { + mod("KtashEmpoweredSpells", "BASE", nil), + }, + ["pact_skill_grant_damage_+%_final_to_exerted_skills"] = { + mod("KtashPactDamage", "BASE", nil), + }, + ["active_skill_osm_vaal_skill_soul_gain_prevention_+%_final_to_grant"] = { + mod("KtashPactSoulGainPrevention", "BASE", nil), + }, + }, +#mods + +#skill PactOfLycia +#flags spell pact + statMap = { + ["skill_empowers_next_x_spells_cast"] = { + mod("LyciaEmpoweredSpells", "BASE", nil), + }, + ["pact_skill_grant_damage_+%_final_to_exerted_skills"] = { + mod("LyciaPactDamage", "BASE", nil), + }, + }, +#mods + #skill Ravenous #flags spell fromTree = true, diff --git a/src/Modules/CalcOffence.lua b/src/Modules/CalcOffence.lua index 85ecb9f772..4d013020d5 100644 --- a/src/Modules/CalcOffence.lua +++ b/src/Modules/CalcOffence.lua @@ -2783,6 +2783,137 @@ function calcs.offence(env, actor, activeSkill) globalOutput.ExertedAttackUptimeRatioCalculated = true end end + + -- Pacts // Empowered Spells + if activeSkill.skillTypes[SkillType.Spell] and not activeSkill.skillTypes[SkillType.Instant] and not activeSkill.skillTypes[SkillType.Brand] then + for index, value in ipairs(actor.activeSkillList) do + if not activeSkill.skillTypes[SkillType.Vaal] then + if value.activeEffect.grantedEffect.name == "Pact of Beidat" and not globalOutput.PactOfBeidatCalculated and not value.skillFlags.disable + and (skillFlags.projectile or skillFlags.area or skillFlags.chaining) and not activeSkill.skillTypes[SkillType.Channel] then + globalOutput.CreatePactOffensiveCalcSection = true + globalOutput.PactOfBeidatDuration = calcSkillDuration(value.skillModList, value.skillCfg, value.skillData, env, enemyDB) + globalOutput.PactOfBeidatCooldown = calcSkillCooldown(value.skillModList, value.skillCfg, value.skillData) + globalOutput.PactOfBeidatCastTime = modDB:Sum("BASE", nil, "BeidatBaseCastTime") + globalOutput.BeidatEmpoweredCount = skillModList:Sum("BASE", nil, "BeidatEmpoweredSpells") + local baseUptimeRatio = m_min((globalOutput.BeidatEmpoweredCount / globalOutput.Speed) / (globalOutput.PactOfBeidatCooldown + globalOutput.PactOfBeidatCastTime), 1) * 100 + local storedUses = value.skillData.storedUses + value.skillModList:Sum("BASE", value.skillCfg, "AdditionalCooldownUses") + globalOutput.BeidatUpTimeRatio = m_min(100, baseUptimeRatio * storedUses) + if globalBreakdown then + globalBreakdown.BeidatUpTimeRatio = { } + t_insert(globalBreakdown.BeidatUpTimeRatio, s_format("(%d ^8(number of Empowered)", globalOutput.BeidatEmpoweredCount)) + t_insert(globalBreakdown.BeidatUpTimeRatio, s_format("/ %.2f) ^8(casts per second)", globalOutput.Speed)) + if globalOutput.PactOfBeidatCastTime > 0 then + t_insert(globalBreakdown.BeidatUpTimeRatio, s_format("/ (%.2f ^8(pact cooldown)", globalOutput.PactOfBeidatCooldown)) + t_insert(globalBreakdown.BeidatUpTimeRatio, s_format("+ %.2f) ^8(pact casttime)", globalOutput.PactOfBeidatCastTime)) + else + t_insert(globalBreakdown.BeidatUpTimeRatio, s_format("/ %.2f ^8(average pact cooldown)", globalOutput.PactOfBeidatCooldown)) + end + t_insert(globalBreakdown.BeidatUpTimeRatio, s_format("* %d ^8(stored uses)", storedUses)) + t_insert(globalBreakdown.BeidatUpTimeRatio, s_format("= %d%%", globalOutput.BeidatUpTimeRatio)) + end + local beidatDamage = modDB:Sum("BASE", nil, "BeidatPactDamage") + if beidatDamage > 0 then + local beidatUptime = skillModList:Flag(nil, "Condition:PactMaxHit") and 100 or globalOutput.BeidatUpTimeRatio + skillModList:NewMod("Damage", "MORE", beidatDamage * beidatUptime / 100, "Uptime Scaled Pact of Beidat", ModFlag.Spell, bor(KeywordFlag.Hit, KeywordFlag.Ailment)) + end + globalOutput.PactOfBeidatCalculated = true + end + if value.activeEffect.grantedEffect.name == "Pact of Ghorr" and not globalOutput.PactOfGhorrCalculated and not value.skillFlags.disable + and activeSkill.skillTypes[SkillType.DamageOverTime] then + globalOutput.CreatePactOffensiveCalcSection = true + globalOutput.PactOfGhorrDuration = calcSkillDuration(value.skillModList, value.skillCfg, value.skillData, env, enemyDB) + globalOutput.PactOfGhorrCooldown = calcSkillCooldown(value.skillModList, value.skillCfg, value.skillData) + globalOutput.PactOfGhorrCastTime = modDB:Sum("BASE", nil, "GhorrBaseCastTime") + globalOutput.GhorrEmpoweredCount = skillModList:Sum("BASE", nil, "GhorrEmpoweredSpells") + local baseUptimeRatio = m_min((globalOutput.GhorrEmpoweredCount / globalOutput.Speed) / (globalOutput.PactOfGhorrCooldown + globalOutput.PactOfGhorrCastTime), 1) * 100 + local storedUses = value.skillData.storedUses + value.skillModList:Sum("BASE", value.skillCfg, "AdditionalCooldownUses") + globalOutput.GhorrUpTimeRatio = m_min(100, baseUptimeRatio * storedUses) + if globalBreakdown then + globalBreakdown.GhorrUpTimeRatio = { } + t_insert(globalBreakdown.GhorrUpTimeRatio, s_format("(%d ^8(number of Empowered)", globalOutput.GhorrEmpoweredCount)) + t_insert(globalBreakdown.GhorrUpTimeRatio, s_format("/ %.2f) ^8(casts per second)", globalOutput.Speed)) + if globalOutput.PactOfGhorrCastTime > 0 then + t_insert(globalBreakdown.GhorrUpTimeRatio, s_format("/ (%.2f ^8(pact cooldown)", globalOutput.PactOfGhorrCooldown)) + t_insert(globalBreakdown.GhorrUpTimeRatio, s_format("+ %.2f) ^8(pact casttime)", globalOutput.PactOfGhorrCastTime)) + else + t_insert(globalBreakdown.GhorrUpTimeRatio, s_format("/ %.2f ^8(average pact cooldown)", globalOutput.PactOfGhorrCooldown)) + end + t_insert(globalBreakdown.GhorrUpTimeRatio, s_format("* %d ^8(stored uses)", storedUses)) + t_insert(globalBreakdown.GhorrUpTimeRatio, s_format("= %d%%", globalOutput.GhorrUpTimeRatio)) + end + local ghorrDamage = modDB:Sum("BASE", nil, "GhorrPactDamage") + if ghorrDamage > 0 then + local ghorrUptime = skillModList:Flag(nil, "Condition:PactMaxHit") and 100 or globalOutput.GhorrUpTimeRatio + skillModList:NewMod("Damage", "MORE", ghorrDamage * ghorrUptime / 100, "Uptime Scaled Pact of Ghorr", ModFlag.Dot) + end + globalOutput.PactOfGhorrCalculated = true + end + if value.activeEffect.grantedEffect.name == "Pact of Lycia" and not globalOutput.PactOfLyciaCalculated and not value.skillFlags.disable + and activeSkill.skillTypes[SkillType.Channel] then + globalOutput.CreatePactOffensiveCalcSection = true + globalOutput.PactOfLyciaDuration = calcSkillDuration(value.skillModList, value.skillCfg, value.skillData, env, enemyDB) + globalOutput.PactOfLyciaCooldown = calcSkillCooldown(value.skillModList, value.skillCfg, value.skillData) + globalOutput.PactOfLyciaCastTime = modDB:Sum("BASE", nil, "LyciaBaseCastTime") + globalOutput.LyciaEmpoweredCount = skillModList:Sum("BASE", nil, "LyciaEmpoweredSpells") + local baseUptimeRatio = m_min((globalOutput.LyciaEmpoweredCount / globalOutput.Speed) / (globalOutput.PactOfLyciaCooldown + globalOutput.PactOfLyciaCastTime), 1) * 100 + local storedUses = value.skillData.storedUses + value.skillModList:Sum("BASE", value.skillCfg, "AdditionalCooldownUses") + globalOutput.LyciaUpTimeRatio = m_min(100, baseUptimeRatio * storedUses) + if globalBreakdown then + globalBreakdown.LyciaUpTimeRatio = { } + t_insert(globalBreakdown.LyciaUpTimeRatio, s_format("(%d ^8(number of Empowered)", globalOutput.LyciaEmpoweredCount)) + t_insert(globalBreakdown.LyciaUpTimeRatio, s_format("/ %.2f) ^8(casts per second)", globalOutput.Speed)) + if globalOutput.PactOfLyciaCastTime > 0 then + t_insert(globalBreakdown.LyciaUpTimeRatio, s_format("/ (%.2f ^8(pact cooldown)", globalOutput.PactOfLyciaCooldown)) + t_insert(globalBreakdown.LyciaUpTimeRatio, s_format("+ %.2f) ^8(pact casttime)", globalOutput.PactOfLyciaCastTime)) + else + t_insert(globalBreakdown.LyciaUpTimeRatio, s_format("/ %.2f ^8(average pact cooldown)", globalOutput.PactOfLyciaCooldown)) + end + t_insert(globalBreakdown.LyciaUpTimeRatio, s_format("* %d ^8(stored uses)", storedUses)) + t_insert(globalBreakdown.LyciaUpTimeRatio, s_format("= %d%%", globalOutput.LyciaUpTimeRatio)) + end + local lyciaDamage = modDB:Sum("BASE", nil, "LyciaPactDamage") + if lyciaDamage > 0 then + local lyciaUptime = skillModList:Flag(nil, "Condition:PactMaxHit") and 100 or globalOutput.LyciaUpTimeRatio + skillModList:NewMod("Damage", "MORE", lyciaDamage * lyciaUptime / 100, "Uptime Scaled Pact of Lycia", ModFlag.Spell) + end + globalOutput.PactOfLyciaCalculated = true + end + else + if value.activeEffect.grantedEffect.name == "Pact of K'Tash" and not globalOutput.PactOfKtashCalculated and not value.skillFlags.disable then + globalOutput.CreatePactOffensiveCalcSection = true + globalOutput.PactOfKtashDuration = calcSkillDuration(value.skillModList, value.skillCfg, value.skillData, env, enemyDB) + globalOutput.PactOfKtashCooldown = calcSkillCooldown(value.skillModList, value.skillCfg, value.skillData) + globalOutput.PactOfKtashCastTime = modDB:Sum("BASE", nil, "KtashBaseCastTime") + globalOutput.KtashEmpoweredCount = skillModList:Sum("BASE", nil, "KtashEmpoweredSpells") + local baseUptimeRatio = m_min((globalOutput.KtashEmpoweredCount / globalOutput.Speed) / (globalOutput.PactOfKtashCooldown + globalOutput.PactOfKtashCastTime), 1) * 100 + local storedUses = value.skillData.storedUses + value.skillModList:Sum("BASE", value.skillCfg, "AdditionalCooldownUses") + globalOutput.KtashUpTimeRatio = m_min(100, baseUptimeRatio * storedUses) + if globalBreakdown then + globalBreakdown.KtashUpTimeRatio = { } + t_insert(globalBreakdown.KtashUpTimeRatio, s_format("(%d ^8(number of Empowered)", globalOutput.KtashEmpoweredCount)) + t_insert(globalBreakdown.KtashUpTimeRatio, s_format("/ %.2f) ^8(casts per second)", globalOutput.Speed)) + if globalOutput.PactOfKtashCastTime > 0 then + t_insert(globalBreakdown.KtashUpTimeRatio, s_format("/ (%.2f ^8(pact cooldown)", globalOutput.PactOfKtashCooldown)) + t_insert(globalBreakdown.KtashUpTimeRatio, s_format("+ %.2f) ^8(pact casttime)", globalOutput.PactOfKtashCastTime)) + else + t_insert(globalBreakdown.KtashUpTimeRatio, s_format("/ %.2f ^8(average pact cooldown)", globalOutput.PactOfKtashCooldown)) + end + t_insert(globalBreakdown.KtashUpTimeRatio, s_format("* %d ^8(stored uses)", storedUses)) + t_insert(globalBreakdown.KtashUpTimeRatio, s_format("= %d%%", globalOutput.KtashUpTimeRatio)) + end + local ktashDamage = modDB:Sum("BASE", nil, "KtashPactDamage") + local ktashSoulGainPrevention = modDB:Sum("BASE", nil, "KtashPactSoulGainPrevention") + if ktashDamage > 0 then + local ktashUptime = skillModList:Flag(nil, "Condition:PactMaxHit") and 100 or globalOutput.KtashUpTimeRatio + skillModList:NewMod("Damage", "MORE", ktashDamage * ktashUptime / 100, "Uptime Scaled Pact of Ktash", ModFlag.Spell) + -- happens too late, duration is calculated earlier + -- skillModList:NewMod("SoulGainPreventionDuration", "MORE", KtashSoulGainPrevention * KtashUptime / 100, "Uptime Scaled Pact of Ktash") + end + globalOutput.PactOfKtashCalculated = true + end + end + end + end end output.RuthlessBlowHitEffect = 1 diff --git a/src/Modules/CalcPerform.lua b/src/Modules/CalcPerform.lua index f70d31ff8f..370c80a7e5 100644 --- a/src/Modules/CalcPerform.lua +++ b/src/Modules/CalcPerform.lua @@ -1430,6 +1430,26 @@ function calcs.perform(env, skipEHP) modDB:NewMod("SeismicActive", "FLAG", true) -- Prevents effect from applying multiple times end end + local function calcCastTime(baseSpeed, skillModList, skillCfg, actor) + local castTime = baseSpeed / (calcLib.mod(skillModList, skillCfg, "Speed") * calcs.actionSpeedMod(actor)) + castTime = m_min(castTime, data.misc.ServerTickRate) + return castTime + end + if env.mode_buffs and activeSkill.skillFlags.pact then + for _, pactName in ipairs({ "Beidat", "Ghorr", "Ktash", "Lycia" }) do + if (activeSkill.activeEffect.grantedEffect.name == (("Pact of "..pactName)) or + activeSkill.activeEffect.grantedEffect.name == "Pact of K'Tash" and pactName == "Ktash") + and not modDB:Flag(nil, pactName.."Active") then + env.player.modDB:NewMod(pactName.."PactDamage", "BASE", activeSkill.skillModList:Sum("BASE", env.player.mainSkill.skillCfg, pactName.."PactDamage")) + env.player.modDB:NewMod(pactName.."EmpoweredSpells", "BASE", activeSkill.skillModList:Sum("BASE", env.player.mainSkill.skillCfg, pactName.."EmpoweredSpells")) + env.player.modDB:NewMod(pactName.."BaseCastTime", "BASE", calcCastTime(activeSkill.activeEffect.grantedEffect.castTime, activeSkill.skillModList, activeSkill.skillCfg, env.player)) + if pactName == "Ktash" then + env.player.modDB:NewMod("KtashPactSoulGainPrevention", "BASE", activeSkill.skillModList:Sum("BASE", env.player.mainSkill.skillCfg, "KtashPactSoulGainPrevention")) + end + modDB:NewMod(pactName.."Active", "FLAG", true) -- Prevents effect from applying multiple times + end + end + end if activeSkill.skillData.triggeredOnDeath and not activeSkill.skillFlags.minion then activeSkill.skillData.triggered = true for _, value in ipairs(activeSkill.skillModList:Tabulate("INC", env.player.mainSkill.skillCfg, "TriggeredDamage")) do diff --git a/src/Modules/CalcSections.lua b/src/Modules/CalcSections.lua index 0dc6da8a03..b4519781c2 100644 --- a/src/Modules/CalcSections.lua +++ b/src/Modules/CalcSections.lua @@ -416,6 +416,46 @@ return { }, } } } }, +{ 3, "Pacts", 1, colorCodes.OFFENCE, { { defaultCollapsed = false, label = "Empowered Spells", data = { + colWidth = 114, + { + haveOutput = "CreatePactOffensiveCalcSection", + { format = "Effective Impact" }, + { format = "Avg Dmg Effect" }, + { format = "Uptime" }, + { format = "# of Empowered" }, + { format = "Max 1-Hit Impact" }, + }, + { label = "Pact of Beidat", haveOutput = "BeidatUpTimeRatio", + { format = "" }, + { format = "" }, + { format = "{0:output:BeidatUpTimeRatio}%", { breakdown = "BeidatUpTimeRatio" }, }, + { format = "{0:output:BeidatEmpoweredCount}" }, + { format = "" }, + }, + { label = "Pact of Ghorr", haveOutput = "GhorrUpTimeRatio", + { format = "" }, + { format = "" }, + { format = "{0:output:GhorrUpTimeRatio}%", { breakdown = "GhorrUpTimeRatio" }, }, + { format = "{0:output:GhorrEmpoweredCount}" }, + { format = "" }, + }, + { label = "Pact of K'Tash", haveOutput = "KtashUpTimeRatio", + { format = "" }, + { format = "" }, + { format = "{0:output:KtashUpTimeRatio}%", { breakdown = "KtashUpTimeRatio" }, }, + { format = "{0:output:KtashEmpoweredCount}" }, + { format = "" }, + }, + { label = "Pact of Lycia", haveOutput = "LyciaUpTimeRatio", + { format = "" }, + { format = "" }, + { format = "{0:output:LyciaUpTimeRatio}%", { breakdown = "LyciaUpTimeRatio" }, }, + { format = "{0:output:LyciaEmpoweredCount}" }, + { format = "" }, + }, +} } +} }, { 3, "Dot", 1, colorCodes.OFFENCE, {{ defaultCollapsed = false, label = "Skill Damage over Time", data = { extra = "{1:output:TotalDotCalcSection} total DoT", flag = "dot",