From 42085ae6775ec9e122e07af5eeb3fbc8d65cb7bd Mon Sep 17 00:00:00 2001 From: Azevara <46403881+Azevara@users.noreply.github.com> Date: Thu, 25 Jul 2024 21:50:32 -0400 Subject: [PATCH] [Warlock] Abyssal Dominion (#9109) * Abyssal Dominion - Demonology * Properly enable Diabolic Ritual * Abyssal Dominion - Destruction --- engine/class_modules/warlock/sc_warlock.cpp | 6 ++- engine/class_modules/warlock/sc_warlock.hpp | 7 +++- .../warlock/sc_warlock_actions.cpp | 19 +++++---- .../class_modules/warlock/sc_warlock_init.cpp | 7 ++++ .../class_modules/warlock/sc_warlock_pets.cpp | 40 ++++++++++++++++++- .../class_modules/warlock/sc_warlock_pets.hpp | 8 ++++ 6 files changed, 76 insertions(+), 11 deletions(-) diff --git a/engine/class_modules/warlock/sc_warlock.cpp b/engine/class_modules/warlock/sc_warlock.cpp index d9de4cf3bf2..297a8c6cfc8 100644 --- a/engine/class_modules/warlock/sc_warlock.cpp +++ b/engine/class_modules/warlock/sc_warlock.cpp @@ -310,6 +310,9 @@ double warlock_t::composite_player_pet_damage_multiplier( const action_state_t* if ( hero.flames_of_xoroth.ok() && !guardian ) m *= 1.0 + hero.flames_of_xoroth->effectN( 3 ).percent(); + if ( hero.abyssal_dominion.ok() && buffs.abyssal_dominion->check() ) + m *= 1.0 + hero.abyssal_dominion_buff->effectN( guardian ? 1 : 2 ).percent(); + return m; } @@ -845,7 +848,8 @@ warlock::warlock_t::pets_t::pets_t( warlock_t* w ) overfiends( "overfiend", w ), overlords( "overlord", w ), mothers( "mother_of_chaos", w ), - pit_lords( "pit_lord", w ) + pit_lords( "pit_lord", w ), + fragments( "infernal_fragment", w ) { } } // namespace warlock diff --git a/engine/class_modules/warlock/sc_warlock.hpp b/engine/class_modules/warlock/sc_warlock.hpp index 623f3a9bc87..2ee5ced86f7 100644 --- a/engine/class_modules/warlock/sc_warlock.hpp +++ b/engine/class_modules/warlock/sc_warlock.hpp @@ -158,6 +158,8 @@ struct warlock_t : public player_t spawner::pet_spawner_t mothers; spawner::pet_spawner_t pit_lords; + spawner::pet_spawner_t fragments; + pets_t( warlock_t* w ); } warlock_pet_list; @@ -348,7 +350,7 @@ struct warlock_t : public player_t player_talent_t guillotine; const spell_data_t* guillotine_pet; const spell_data_t* fiendish_wrath_buff; - const spell_data_t* fiendish_wrath_dmg; + const spell_data_t* fiendish_wrath_dmg; // TODO: Multiplier fixes for this const spell_data_t* fel_explosion; // Destruction @@ -486,6 +488,8 @@ struct warlock_t : public player_t player_talent_t flames_of_xoroth; // TODO: 2024-07-25 Flames of Xoroth spell data has unexpected labels for effects 3 and 4, may be causing unintended values in game player_talent_t abyssal_dominion; + const spell_data_t* abyssal_dominion_buff; + const spell_data_t* infernal_fragmentation; // TODO: Re-check damage of Infernal Fragments player_talent_t gloom_of_nathreza; player_talent_t ruination; // TODO: Backdraft, Indiscriminate Flames, Ritual of Ruin, Improved Chaos Bolt, Burn to Ashes?, Chaos Incarnate, Diabolic Ritual @@ -602,6 +606,7 @@ struct warlock_t : public player_t propagate_const art_mother; propagate_const art_pit_lord; propagate_const infernal_bolt; + propagate_const abyssal_dominion; } buffs; // Gains - Many are automatically handled diff --git a/engine/class_modules/warlock/sc_warlock_actions.cpp b/engine/class_modules/warlock/sc_warlock_actions.cpp index 884b030fb40..cdb531707ea 100644 --- a/engine/class_modules/warlock/sc_warlock_actions.cpp +++ b/engine/class_modules/warlock/sc_warlock_actions.cpp @@ -1945,7 +1945,7 @@ using namespace helpers; affected_by.touch_of_rancora = p->hero.touch_of_rancora.ok(); triggers.shadow_invocation = true; - triggers.demonic_art = true; + triggers.demonic_art = p->hero.diabolic_ritual.ok(); if ( p->talents.umbral_blaze.ok() ) { @@ -2001,7 +2001,7 @@ using namespace helpers; { affected_by.touch_of_rancora = p->hero.touch_of_rancora.ok(); - triggers.diabolic_ritual = true; + triggers.diabolic_ritual = p->hero.diabolic_ritual.ok(); add_child( impact_spell ); } @@ -2304,7 +2304,7 @@ using namespace helpers; { may_crit = false; affected_by.soul_conduit_base_cost = true; - triggers.diabolic_ritual = true; + triggers.diabolic_ritual = p->hero.diabolic_ritual.ok(); } double cost_pct_multiplier() const override @@ -2603,6 +2603,9 @@ using namespace helpers; p()->buffs.tyrant->trigger(); + if ( p()->hero.abyssal_dominion.ok() ) + p()->buffs.abyssal_dominion->trigger(); + if ( p()->buffs.dreadstalkers->check() ) p()->buffs.dreadstalkers->extend_duration( p(), extension_time ); @@ -2639,7 +2642,7 @@ using namespace helpers; { harmful = may_crit = false; - triggers.diabolic_ritual = true; + triggers.diabolic_ritual = p->hero.diabolic_ritual.ok(); } void execute() override @@ -2658,7 +2661,7 @@ using namespace helpers; { harmful = may_crit = false; - triggers.diabolic_ritual = true; + triggers.diabolic_ritual = p->hero.diabolic_ritual.ok(); } void execute() override @@ -2985,7 +2988,7 @@ using namespace helpers; affected_by.chaos_incarnate = p->talents.chaos_incarnate.ok(); affected_by.touch_of_rancora = p->hero.touch_of_rancora.ok(); - triggers.diabolic_ritual = triggers.demonic_art = true; + triggers.diabolic_ritual = triggers.demonic_art = p->hero.diabolic_ritual.ok(); base_dd_multiplier *= 1.0 + p->talents.improved_chaos_bolt->effectN( 1 ).percent(); @@ -3198,7 +3201,7 @@ using namespace helpers; affected_by.touch_of_rancora = p->hero.touch_of_rancora.ok(); - triggers.diabolic_ritual = triggers.demonic_art = true; + triggers.diabolic_ritual = triggers.demonic_art = p->hero.diabolic_ritual.ok(); base_costs[ RESOURCE_SOUL_SHARD ] += p->talents.inferno->effectN( 1 ).base_value() / 10.0; @@ -3310,7 +3313,7 @@ using namespace helpers; affected_by.chaos_incarnate = p->talents.chaos_incarnate.ok(); affected_by.touch_of_rancora = p->hero.touch_of_rancora.ok(); - triggers.diabolic_ritual = triggers.demonic_art = true; + triggers.diabolic_ritual = triggers.demonic_art = p->hero.diabolic_ritual.ok(); base_dd_multiplier *= 1.0 + p->talents.blistering_atrophy->effectN( 1 ).percent(); } diff --git a/engine/class_modules/warlock/sc_warlock_init.cpp b/engine/class_modules/warlock/sc_warlock_init.cpp index 95ad2c35af4..870101d91a1 100644 --- a/engine/class_modules/warlock/sc_warlock_init.cpp +++ b/engine/class_modules/warlock/sc_warlock_init.cpp @@ -504,9 +504,14 @@ namespace warlock hero.flames_of_xoroth = find_talent_spell( talent_tree::HERO, "Flames of Xoroth" ); // Should be ID 429657 + hero.abyssal_dominion = find_talent_spell( talent_tree::HERO, "Abyssal Dominion" ); // Should be ID 429581 + hero.abyssal_dominion_buff = find_spell( 456323 ); + hero.infernal_fragmentation = find_spell( 456310 ); + warlock_pet_list.overlords.set_default_duration( hero.summon_overlord->duration() ); warlock_pet_list.mothers.set_default_duration( hero.summon_mother->duration() ); warlock_pet_list.pit_lords.set_default_duration( hero.summon_pit_lord->duration() ); + warlock_pet_list.fragments.set_default_duration( hero.infernal_fragmentation->duration() ); } void warlock_t::init_base_stats() @@ -737,6 +742,8 @@ namespace warlock } ); buffs.infernal_bolt = make_buff( this, "infernal_bolt", hero.infernal_bolt_buff ); + + buffs.abyssal_dominion = make_buff( this, "Abyssal Dominion", hero.abyssal_dominion_buff ); } void warlock_t::create_pets() diff --git a/engine/class_modules/warlock/sc_warlock_pets.cpp b/engine/class_modules/warlock/sc_warlock_pets.cpp index d0808a648a8..810660e68f3 100644 --- a/engine/class_modules/warlock/sc_warlock_pets.cpp +++ b/engine/class_modules/warlock/sc_warlock_pets.cpp @@ -1618,6 +1618,8 @@ double demonic_tyrant_t::composite_player_multiplier( school_e school ) const m *= 1.0 + buffs.reign_of_tyranny->check_stack_value(); + m *= 1.0 + o()->hero.abyssal_dominion->effectN( 1 ).percent(); + return m; } @@ -1695,6 +1697,8 @@ infernal_t::infernal_t( warlock_t* owner, util::string_view name ) { resource_regeneration = regen_type::DISABLED; + primary = true; + owner_coeff.ap_from_sp = 1.65; owner_coeff.sp_from_sp = 1.65; } @@ -1756,6 +1760,24 @@ void infernal_t::arise() } ); } +void infernal_t::demise() +{ + warlock_pet_t::demise(); + + if ( o()->hero.abyssal_dominion.ok() && primary ) + o()->warlock_pet_list.fragments.spawn( 2u ); +} + +double infernal_t::composite_player_multiplier( school_e school ) const +{ + double m = warlock_pet_t::composite_player_multiplier( school ); + + if ( o()->hero.abyssal_dominion.ok() && primary ) + m *= 1.0 + o()->hero.abyssal_dominion->effectN( 3 ).percent(); + + return m; +} + /// Infernal End /// Dimensional Rifts Begin @@ -2135,6 +2157,8 @@ action_t* darkglare_t::create_action( util::string_view name, util::string_view namespace diabolist { + /// Diabolic Ritual Demons Begin + overlord_t::overlord_t( warlock_t* owner, util::string_view name ) : warlock_pet_t( owner, name, PET_WARLOCK_RANDOM, true ) { @@ -2305,6 +2329,20 @@ namespace diabolist return warlock_pet_t::create_action( name, options_str ); } -} + + /// Diabolic Ritual Demons End + + /// Infernal Fragment Begin + + infernal_fragment_t::infernal_fragment_t( warlock_t* owner, util::string_view name ) + : destruction::infernal_t( owner, name ) + { + primary = false; + owner_coeff.ap_from_sp *= owner->hero.abyssal_dominion->effectN( 4 ).percent(); + owner_coeff.sp_from_sp *= owner->hero.abyssal_dominion->effectN( 4 ).percent(); + } + + /// Infernal Fragment End +} // namespace diabolist } // namespace pets } // namespace warlock diff --git a/engine/class_modules/warlock/sc_warlock_pets.hpp b/engine/class_modules/warlock/sc_warlock_pets.hpp index 387ef038747..393389e7171 100644 --- a/engine/class_modules/warlock/sc_warlock_pets.hpp +++ b/engine/class_modules/warlock/sc_warlock_pets.hpp @@ -456,11 +456,14 @@ namespace destruction struct infernal_t : public warlock_pet_t { buff_t* immolation; + bool primary; infernal_t( warlock_t*, util::string_view = "infernal" ); void init_base_stats() override; void create_buffs() override; void arise() override; + void demise() override; + double composite_player_multiplier( school_e ) const override; }; struct shadowy_tear_t : public warlock_pet_t @@ -537,6 +540,11 @@ namespace diabolist void arise() override; action_t* create_action( util::string_view, util::string_view ) override; }; + + struct infernal_fragment_t : public destruction::infernal_t + { + infernal_fragment_t( warlock_t*, util::string_view = "infernal_fragment" ); + }; } // namespace diabolist } // namespace pets } // namespace warlock