Skip to content

Commit

Permalink
jade empowerment
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex committed Jan 26, 2025
1 parent 7fa1731 commit da5e2e4
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
4 changes: 1 addition & 3 deletions engine/class_modules/apl/apl_monk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,6 @@ void mistweaver( player_t *p )
action_priority_list_t *def = p->get_action_priority_list( "default" );
action_priority_list_t *racials = p->get_action_priority_list( "race_actions" );

pre->add_action( "flask" );
pre->add_action( "food" );
pre->add_action( "augmentation" );
pre->add_action( "snapshot_stats" );
pre->add_action( "potion" );

Expand All @@ -261,6 +258,7 @@ void mistweaver( player_t *p )
def->add_action( "rising_sun_kick,if=talent.secret_infusion&buff.thunder_focus_tea.up" );
def->add_action( "spinning_crane_kick,if=buff.dance_of_chiji.up" );
def->add_action( "chi_burst,if=active_enemies>=2" );
def->add_action( "crackling_jade_lightning,if=buff.jade_empowerment.up" );

def->add_action( "jadefire_stomp,if=active_enemies>=4&active_enemies<=10" );
def->add_action( "spinning_crane_kick,if=active_enemies>=4" );
Expand Down
34 changes: 30 additions & 4 deletions engine/class_modules/monk/sc_monk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3404,10 +3404,16 @@ struct crackling_jade_lightning_t : public monk_spell_t

// reduction for secondary targets
if ( p->is_ptr() )
base_td_multiplier *= p->talent.windwalker.power_of_the_thunder_king->effectN( 4 ).percent();
{
if ( p->talent.windwalker.power_of_the_thunder_king.ok() )
base_td_multiplier *= p->talent.windwalker.power_of_the_thunder_king->effectN( 4 ).percent();
else if ( p->talent.mistweaver.jade_empowerment.ok() )
base_td_multiplier *= p->buff.jade_empowerment->data().effectN( 4 ).percent();
}

parse_effects( p->talent.windwalker.power_of_the_thunder_king, effect_mask_t( true ).disable( 1 ) );
parse_effects( p->buff.the_emperors_capacitor );
parse_effects( p->buff.jade_empowerment, effect_mask_t( true ).disable( 1 ) );
}

double cost_per_tick( resource_e ) const override
Expand Down Expand Up @@ -3435,16 +3441,25 @@ struct crackling_jade_lightning_t : public monk_spell_t

parse_effects( p->talent.windwalker.power_of_the_thunder_king, effect_mask_t( true ).disable( 1 ) );
parse_effects( p->buff.the_emperors_capacitor );
parse_effects( p->buff.jade_empowerment );

if ( p->talent.windwalker.power_of_the_thunder_king->ok() )
add_child( aoe_dot );
}

double cost_per_tick( resource_e r ) const override
{
if ( p()->specialization() == MONK_MISTWEAVER )
return 0.0;

return base_t::cost_per_tick( r );
}

void execute() override
{
monk_spell_t::execute();

if ( p()->talent.windwalker.power_of_the_thunder_king->ok() )
if ( p()->talent.windwalker.power_of_the_thunder_king->ok() || p()->buff.jade_empowerment->up() )
{
const auto &tl = target_list();
int count = 0;
Expand All @@ -3455,7 +3470,11 @@ struct crackling_jade_lightning_t : public monk_spell_t
if ( t == target )
continue;

if ( count < p()->talent.windwalker.power_of_the_thunder_king->effectN( 1 ).base_value() )
const double cleave_targets = p()->talent.windwalker.power_of_the_thunder_king->ok()
? p()->talent.windwalker.power_of_the_thunder_king->effectN( 1 ).base_value()
: p()->buff.jade_empowerment->data().effectN( 1 ).base_value();

if ( count < cleave_targets )
{
aoe_dot->execute_on_target( t );
count++;
Expand All @@ -3468,10 +3487,11 @@ struct crackling_jade_lightning_t : public monk_spell_t
{
monk_spell_t::last_tick( dot );

if ( p()->talent.windwalker.power_of_the_thunder_king->ok() )
if ( p()->talent.windwalker.power_of_the_thunder_king->ok() || p()->buff.jade_empowerment->up() )
// delay expiration so it occurs after final tick of cjl aoe
make_event<events::delayed_cb_event_t>( *sim, p(), 1_ms, [ & ]() {
p()->buff.the_emperors_capacitor->expire();
p()->buff.jade_empowerment->expire();
const auto &tl = target_list();
for ( const auto &t : tl )
{
Expand Down Expand Up @@ -3830,6 +3850,7 @@ struct thunder_focus_tea_t : public monk_spell_t
monk_spell_t::execute();

p()->buff.thunder_focus_tea->trigger( p()->buff.thunder_focus_tea->max_stack() );
p()->buff.jade_empowerment->trigger();
}
};

Expand Down Expand Up @@ -6884,6 +6905,8 @@ void monk_t::init_spells()
talent.mistweaver.awakened_jadefire = _ST( "Awakened Jadefire" );
talent.mistweaver.awakened_jadefire_buff = find_spell( 389387 );
talent.mistweaver.dance_of_chiji = _ST( "Dance of Chi-Ji" );
talent.mistweaver.jade_empowerment = _ST( "Jade Empowerment" );
talent.mistweaver.jade_empowerment_buff = find_spell( 467317 );
talent.mistweaver.tea_of_serenity = _ST( "Tea of Serenity" );
talent.mistweaver.tea_of_plenty = _ST( "Tea of Plenty" );
talent.mistweaver.unison = _ST( "Unison" );
Expand Down Expand Up @@ -7575,6 +7598,9 @@ void monk_t::create_buffs()
buff.awakened_jadefire = make_buff_fallback( talent.mistweaver.awakened_jadefire->ok(), this, "ancient_concordance",
talent.mistweaver.awakened_jadefire_buff );

buff.jade_empowerment = make_buff_fallback( talent.mistweaver.jade_empowerment->ok(), this, "jade_empowerment",
talent.mistweaver.jade_empowerment_buff );

buff.jadefire_stomp_reset =
make_buff_fallback( talent.mistweaver.jadefire_stomp->ok(), this, "jadefire_stomp_reset", find_spell( 388193 ) )
->set_trigger_spell( shared.jadefire_stomp );
Expand Down
3 changes: 3 additions & 0 deletions engine/class_modules/monk/sc_monk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ struct monk_t : public stagger_t<parse_player_effects_t, monk_t>
// Mistweaver
propagate_const<absorb_buff_t *> life_cocoon;
propagate_const<buff_t *> dance_of_chiji_mw;
propagate_const<buff_t *> jade_empowerment;
propagate_const<buff_t *> jadefire_stomp_reset;
propagate_const<buff_t *> secret_infusion_haste;
propagate_const<buff_t *> secret_infusion_crit;
Expand Down Expand Up @@ -1073,6 +1074,8 @@ struct monk_t : public stagger_t<parse_player_effects_t, monk_t>
player_talent_t awakened_jadefire;
const spell_data_t *awakened_jadefire_buff;
player_talent_t dance_of_chiji;
player_talent_t jade_empowerment;
const spell_data_t *jade_empowerment_buff;
player_talent_t tea_of_serenity;
player_talent_t tea_of_plenty;
player_talent_t unison;
Expand Down

0 comments on commit da5e2e4

Please sign in to comment.