diff --git a/engine/class_modules/monk/sc_monk.cpp b/engine/class_modules/monk/sc_monk.cpp index 86b0ec5336c..ed15b080baf 100644 --- a/engine/class_modules/monk/sc_monk.cpp +++ b/engine/class_modules/monk/sc_monk.cpp @@ -3052,6 +3052,7 @@ struct exploding_keg_t : public monk_spell_t void execute() override { p()->buff.exploding_keg->trigger(); + p()->buff.empty_the_cellar->trigger(); monk_spell_t::execute(); } @@ -3062,6 +3063,64 @@ struct exploding_keg_t : public monk_spell_t } }; +struct empty_the_cellar_t : public monk_spell_t +{ + struct damage_t : public monk_spell_t + { + damage_t( monk_t *player ) + : monk_spell_t( player, "empty_the_cellar", player->talent.brewmaster.empty_the_cellar_damage ) + { + background = dual = true; + } + + void execute() override + { + monk_spell_t::execute(); + + p()->baseline.brewmaster.brews.adjust( p()->talent.brewmaster.empty_the_cellar->effectN( 2 ).time_value() ); + } + }; + + action_t *damage; + + empty_the_cellar_t( monk_t *player, std::string_view options_str ) + : monk_spell_t( player, "empty_the_cellar", player->talent.brewmaster.empty_the_cellar_driver ), damage( nullptr ) + { + parse_options( options_str ); + + if ( player->talent.brewmaster.empty_the_cellar->ok() ) + damage = new damage_t( player ); + } + + void init() override + { + monk_spell_t::init(); + + if ( action_t *parent = p()->find_action( "exploding_keg" ); parent ) + parent->add_child( this ); + } + + bool ready() override + { + return p()->buff.empty_the_cellar->up(); + } + + void execute() override + { + p()->buff.empty_the_cellar->expire(); + + size_t count = as( p()->talent.brewmaster.empty_the_cellar->effectN( 1 ).base_value() ); + timespan_t interval = data().effectN( 1 ).period(); + + auto &tl = target_list(); + p()->rng().shuffle( tl.begin(), tl.end() ); + for ( size_t i = 0; i < count; ++i ) + make_event( *sim, p(), damage, tl[ i % tl.size() ], i * interval ); + + monk_spell_t::execute(); + } +}; + struct purifying_brew_t : public brew_t { struct gai_plins_imperial_brew_t : monk_heal_t @@ -4606,6 +4665,8 @@ action_t *monk_t::create_action( std::string_view name, std::string_view options return new celestial_brew_t( this, options_str ); if ( name == "celestial_infusion" ) return new celestial_infusion_t( this, options_str ); + if ( name == "empty_the_cellar" ) + return new empty_the_cellar_t( this, options_str ); if ( name == "exploding_keg" ) return new exploding_keg_t( this, options_str ); if ( name == "invoke_niuzao" ) @@ -5004,6 +5065,9 @@ void monk_t::init_spells() talent.brewmaster.invoke_niuzao_the_black_ox_stomp = find_spell( 227291 ); talent.brewmaster.fuel_on_the_fire = _ST( "Fuel on the Fire" ); talent.brewmaster.empty_the_cellar = _ST( "Empty the Cellar" ); + talent.brewmaster.empty_the_cellar_buff = find_spell( 1262768 ); + talent.brewmaster.empty_the_cellar_driver = find_spell( 1263438 ); + talent.brewmaster.empty_the_cellar_damage = find_spell( 1262765 ); talent.brewmaster.keg_volley = _ST( "Keg Volley" ); talent.brewmaster.stormstouts_last_keg = _ST( "Stormstout's Last Keg" ); talent.brewmaster.heart_of_the_ox = _ST( "Heart of the Ox" ); @@ -5481,6 +5545,9 @@ void monk_t::create_buffs() baseline.brewmaster.mastery->effectN( 3 ).trigger() ) ->add_invalidate( CACHE_DODGE ); + buff.empty_the_cellar = make_buff_fallback( talent.brewmaster.empty_the_cellar->ok(), this, "empty_the_cellar", + talent.brewmaster.empty_the_cellar_buff ); + buff.exploding_keg = make_buff_fallback( talent.brewmaster.exploding_keg->ok(), this, "exploding_keg", talent.brewmaster.exploding_keg ) ->set_default_value_from_effect( 2 ); @@ -5519,9 +5586,10 @@ void monk_t::create_buffs() // the override is a little weird, we'll just let this always init buff.shuffle = make_buff( this ); - buff.swift_as_a_coursing_river = make_buff_fallback( talent.brewmaster.swift_as_a_coursing_river->ok(), this, "swift_as_a_coursing_river", - talent.brewmaster.swift_as_a_coursing_river->effectN( 1 ).trigger() ) - ->set_trigger_spell( talent.brewmaster.swift_as_a_coursing_river ); + buff.swift_as_a_coursing_river = + make_buff_fallback( talent.brewmaster.swift_as_a_coursing_river->ok(), this, "swift_as_a_coursing_river", + talent.brewmaster.swift_as_a_coursing_river->effectN( 1 ).trigger() ) + ->set_trigger_spell( talent.brewmaster.swift_as_a_coursing_river ); // Windwalker buff.teachings_of_the_monastery = diff --git a/engine/class_modules/monk/sc_monk.hpp b/engine/class_modules/monk/sc_monk.hpp index 6e681c522e8..655bcbd0127 100644 --- a/engine/class_modules/monk/sc_monk.hpp +++ b/engine/class_modules/monk/sc_monk.hpp @@ -495,6 +495,7 @@ struct monk_t : public stagger_t propagate_const charred_passions; propagate_const counterstrike; propagate_const elusive_brawler; + propagate_const empty_the_cellar; propagate_const exploding_keg; propagate_const fortifying_brew; propagate_const gift_of_the_ox; @@ -827,6 +828,9 @@ struct monk_t : public stagger_t // row 10 player_talent_t fuel_on_the_fire; player_talent_t empty_the_cellar; + const spell_data_t *empty_the_cellar_buff; + const spell_data_t *empty_the_cellar_driver; + const spell_data_t *empty_the_cellar_damage; player_talent_t keg_volley; player_talent_t stormstouts_last_keg; player_talent_t heart_of_the_ox;