Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 71 additions & 3 deletions engine/class_modules/monk/sc_monk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -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<size_t>( 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<events::delayed_execute_event_t>( *sim, p(), damage, tl[ i % tl.size() ], i * interval );

monk_spell_t::execute();
}
};

struct purifying_brew_t : public brew_t<monk_spell_t>
{
struct gai_plins_imperial_brew_t : monk_heal_t
Expand Down Expand Up @@ -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" )
Expand Down Expand Up @@ -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" );
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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<buffs::shuffle_t>( 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 =
Expand Down
4 changes: 4 additions & 0 deletions engine/class_modules/monk/sc_monk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ struct monk_t : public stagger_t<parse_player_effects_t, monk_t>
propagate_const<buff_t *> charred_passions;
propagate_const<buff_t *> counterstrike;
propagate_const<buff_t *> elusive_brawler;
propagate_const<buff_t *> empty_the_cellar;
propagate_const<buff_t *> exploding_keg;
propagate_const<buff_t *> fortifying_brew;
propagate_const<buffs::gift_of_the_ox_t *> gift_of_the_ox;
Expand Down Expand Up @@ -827,6 +828,9 @@ struct monk_t : public stagger_t<parse_player_effects_t, monk_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;
Expand Down
Loading