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
149 changes: 10 additions & 139 deletions engine/class_modules/monk/sc_monk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,12 @@ bool monk_action_t<Base>::usable_moving() const
}

template <class Base>
bool monk_action_t<Base>::ready()
bool monk_action_t<Base>::usable_during_current_cast() const
{
// Spell data nil or not_found
if ( base_t::data().id() == 0 )
return false;

// These abilities are able to be used during Spinning Crane Kick
if ( cast_during_sck )
base_t::usable_while_casting = p()->channeling && p()->baseline.monk.spinning_crane_kick &&
( p()->channeling->id == p()->baseline.monk.spinning_crane_kick->id() );
if ( cast_during_sck && p()->channeling && p()->channeling->id == p()->baseline.monk.spinning_crane_kick->id() )
return true;

return base_t::ready();
return base_t::usable_during_current_cast();
}

template <class Base>
Expand Down Expand Up @@ -260,20 +254,8 @@ void monk_action_t<Base>::init()
}
}

// Allow this ability to be cast during SCK
if ( cast_during_sck && !base_t::background && !base_t::dual )
{
if ( base_t::usable_while_casting )
{
cast_during_sck = false;
p()->sim->print_debug( "{}: cast_during_sck ignored because usable_while_casting = true", full_name() );
}
else
{
base_t::usable_while_casting = true;
base_t::use_while_casting = true;
}
}
if ( cast_during_sck )
base_t::usable_while_casting = base_t::use_while_casting = true;
}

template <class Base>
Expand Down Expand Up @@ -2502,7 +2484,6 @@ struct keg_smash_t : monk_melee_attack_t
fuel_on_the_fire( nullptr )
{
parse_options( options_str );
// TODO: can cast_during_sck be automated?
cast_during_sck = true;

full_amount_targets = 1;
Expand Down Expand Up @@ -2818,60 +2799,6 @@ struct touch_of_karma_t : public monk_melee_attack_t
}
};

struct provoke_t : public monk_melee_attack_t
{
provoke_t( monk_t *p, std::string_view options_str ) : monk_melee_attack_t( p, "provoke", p->baseline.monk.provoke )
{
parse_options( options_str );
use_off_gcd = true;
ignore_false_positive = true;
}

void impact( action_state_t *s ) override
{
if ( s->target->is_enemy() )
target->taunt( player );

monk_melee_attack_t::impact( s );
}
};

struct spear_hand_strike_t : public monk_melee_attack_t
{
spear_hand_strike_t( monk_t *p, std::string_view options_str )
: monk_melee_attack_t( p, "spear_hand_strike", p->talent.monk.spear_hand_strike )
{
parse_options( options_str );
ignore_false_positive = true;
is_interrupt = true;
cast_during_sck = player->specialization() != MONK_WINDWALKER;
may_miss = may_block = may_dodge = may_parry = false;
}
};

struct leg_sweep_t : public monk_melee_attack_t
{
leg_sweep_t( monk_t *p, std::string_view options_str )
: monk_melee_attack_t( p, "leg_sweep", p->baseline.monk.leg_sweep )
{
parse_options( options_str );
ignore_false_positive = true;
may_miss = may_block = may_dodge = may_parry = false;
cast_during_sck = true;
}
};

struct paralysis_t : public monk_melee_attack_t
{
paralysis_t( monk_t *p, std::string_view options_str )
: monk_melee_attack_t( p, "paralysis", p->talent.monk.paralysis )
{
parse_options( options_str );
ignore_false_positive = true;
may_miss = may_block = may_dodge = may_parry = false;
}
};

struct flying_serpent_kick_t : public monk_melee_attack_t
{
bool first_charge;
Expand Down Expand Up @@ -3158,31 +3085,6 @@ struct black_ox_brew_t : public brew_t<monk_spell_t>
}
};

struct roll_t : public monk_spell_t
{
roll_t( monk_t *player, std::string_view options_str )
: monk_spell_t( player, "roll",
( player->talent.monk.chi_torpedo->ok() ? spell_data_t::not_found() : player->baseline.monk.roll ) )
{
cast_during_sck = true;

parse_options( options_str );
}
};

struct chi_torpedo_t : public monk_spell_t
{
chi_torpedo_t( monk_t *player, std::string_view options_str )
: monk_spell_t(
player, "chi_torpedo",
( player->talent.monk.chi_torpedo->ok() ? player->talent.monk.chi_torpedo : spell_data_t::not_found() ) )
{
parse_options( options_str );

cast_during_sck = true;
}
};

struct crackling_jade_lightning_t : public monk_spell_t
{
struct aoe_dot_t : public monk_spell_t
Expand Down Expand Up @@ -3958,8 +3860,9 @@ struct zenith_stomp_t : monk_spell_t

aoe = -1;
reduced_aoe_targets = player->talent.monk.zenith_stomp->effectN( 1 ).base_value();
may_combo_strike = false;
may_combo_strike = player->wowv_ge( { 12, 1, 0 } );
ww_mastery = true;
cast_during_sck = true;
}

void init() override
Expand Down Expand Up @@ -4031,26 +3934,6 @@ struct zenith_t : public monk_spell_t
}
};

struct vivify_t : public harmonic_surge_t<monk_heal_t>
{
vivify_t( monk_t *player, std::string_view options_str ) : base_t( player, "vivify", player->baseline.monk.vivify )
{
parse_options( options_str );

spell_power_mod.direct = data().effectN( 1 ).sp_coeff();
base_execute_time += player->talent.monk.vivacious_vivification->effectN( 1 ).time_value();

cast_during_sck = false;
}

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

p()->action.chi_wave->execute();
}
};

struct expel_harm_t : monk_heal_t
{
struct damage_t : monk_spell_t
Expand Down Expand Up @@ -5382,28 +5265,14 @@ action_t *monk_t::create_action( std::string_view name, std::string_view options
return new blackout_kick_t( this, options_str );
if ( name == "expel_harm" )
return new expel_harm_t( this, options_str );
if ( name == "leg_sweep" )
return new leg_sweep_t( this, options_str );
if ( name == "paralysis" )
return new paralysis_t( this, options_str );
if ( name == "rising_sun_kick" )
return new rising_sun_kick_t( this, options_str );
if ( name == "rushing_wind_kick" )
return new rushing_wind_kick_t( this, options_str );
if ( name == "roll" )
return new roll_t( this, options_str );
if ( name == "spear_hand_strike" )
return new spear_hand_strike_t( this, options_str );
if ( name == "spinning_crane_kick" )
return new spinning_crane_kick_t( this, options_str );
if ( name == "vivify" )
return new vivify_t( this, options_str );
if ( name == "fortifying_brew" )
return new fortifying_brew_t( this, options_str );
if ( name == "provoke" )
return new provoke_t( this, options_str );
if ( name == "chi_torpedo" )
return new chi_torpedo_t( this, options_str );
if ( name == "touch_of_death" )
return new touch_of_death_t( this, options_str );

Expand Down Expand Up @@ -5436,6 +5305,8 @@ action_t *monk_t::create_action( std::string_view name, std::string_view options
// Windwalker
if ( name == "fists_of_fury" )
return new fists_of_fury_t( this, options_str );
if ( name == "flying_serpent_kick" && talent.windwalker.slicing_winds->ok() )
return new slicing_winds_t( this, options_str );
if ( name == "flying_serpent_kick" )
return new flying_serpent_kick_t( this, options_str );
if ( name == "slicing_winds" )
Expand Down
2 changes: 1 addition & 1 deletion engine/class_modules/monk/sc_monk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ struct monk_action_t : public parse_action_effects_t<Base>
std::unique_ptr<expr_t> create_expression( std::string_view name_str ) override;

bool usable_moving() const override;
bool ready() override;
bool usable_during_current_cast() const override;
void init() override;
void init_finished() override;
void reset_swing();
Expand Down
Loading