Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[monk] Jade Empowerment #9883

Merged
merged 4 commits into from
Jan 27, 2025
Merged
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
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" );
renanthera marked this conversation as resolved.
Show resolved Hide resolved
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
68 changes: 48 additions & 20 deletions engine/class_modules/monk/sc_monk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3392,22 +3392,28 @@ struct chi_torpedo_t : public monk_spell_t

struct crackling_jade_lightning_t : public monk_spell_t
{
struct crackling_jade_lightning_aoe_t : public monk_spell_t
struct aoe_dot_t : public monk_spell_t
{
crackling_jade_lightning_aoe_t( monk_t *p )
: monk_spell_t( p, "crackling_jade_lightning_aoe", p->baseline.monk.crackling_jade_lightning )
aoe_dot_t( monk_t *player )
: monk_spell_t( player, "crackling_jade_lightning_aoe", player->baseline.monk.crackling_jade_lightning )
{
dual = background = true;
ww_mastery = true;
trigger_jadefire_stomp = true;
sef_ability = actions::sef_ability_e::SEF_CRACKLING_JADE_LIGHTNING_AOE;

// reduction for secondary targets
if ( p->is_ptr() )
base_td_multiplier *= p->talent.windwalker.power_of_the_thunder_king->effectN( 4 ).percent();
if ( player->is_ptr() )
{
if ( player->talent.windwalker.power_of_the_thunder_king->ok() )
base_td_multiplier *= player->talent.windwalker.power_of_the_thunder_king->effectN( 4 ).percent();
if ( player->talent.mistweaver.jade_empowerment->ok() )
base_td_multiplier *= player->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( player->talent.windwalker.power_of_the_thunder_king, effect_mask_t( true ).disable( 1 ) );
parse_effects( player->buff.the_emperors_capacitor );
parse_effects( player->buff.jade_empowerment );
}

double cost_per_tick( resource_e ) const override
Expand All @@ -3416,46 +3422,61 @@ struct crackling_jade_lightning_t : public monk_spell_t
}
};

crackling_jade_lightning_aoe_t *aoe_dot;
aoe_dot_t *aoe_dot;

crackling_jade_lightning_t( monk_t *p, util::string_view options_str )
: monk_spell_t( p, "crackling_jade_lightning", p->baseline.monk.crackling_jade_lightning ),
aoe_dot( new crackling_jade_lightning_aoe_t( p ) )
crackling_jade_lightning_t( monk_t *player, util::string_view options_str )
: monk_spell_t( player, "crackling_jade_lightning", player->baseline.monk.crackling_jade_lightning ),
aoe_dot( nullptr )
{
parse_options( options_str );

sef_ability = actions::sef_ability_e::SEF_CRACKLING_JADE_LIGHTNING;
may_combo_strike = true;
ww_mastery = true;
interrupt_auto_attack = true;
channeled = true;

parse_options( options_str );

// Forcing the minimum GCD to 750 milliseconds for all 3 specs
min_gcd = timespan_t::from_millis( 750 );

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( player->talent.windwalker.power_of_the_thunder_king, effect_mask_t( true ).disable( 1 ) );
parse_effects( player->buff.the_emperors_capacitor );
parse_effects( player->buff.jade_empowerment );

if ( p->talent.windwalker.power_of_the_thunder_king->ok() )
if ( player->specialization() == MONK_MISTWEAVER )
base_costs_per_tick[ RESOURCE_MANA ] = 0.0;

if ( player->talent.windwalker.power_of_the_thunder_king->ok() || player->talent.mistweaver.jade_empowerment->ok() )
{
aoe_dot = new aoe_dot_t( player );
add_child( aoe_dot );
}
}

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;

int cleave_targets = 0;
if ( const player_talent_t talent = p()->talent.windwalker.power_of_the_thunder_king; talent->ok() )
cleave_targets += as<int>( talent->effectN( 1 ).base_value() );
if ( const buff_t *buff = p()->buff.jade_empowerment; !buff->is_fallback )
cleave_targets += as<int>( buff->data().effectN( 1 ).base_value() );

for ( auto &t : tl )
{
// Don't apply AoE version to primary target
if ( t == target )
continue;

if ( count < p()->talent.windwalker.power_of_the_thunder_king->effectN( 1 ).base_value() )
if ( count >= cleave_targets )
break;

if ( count < cleave_targets )
{
aoe_dot->execute_on_target( t );
count++;
Expand All @@ -3468,10 +3489,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 +3852,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 +6907,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 +7600,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