diff --git a/engine/class_modules/monk/sc_monk.cpp b/engine/class_modules/monk/sc_monk.cpp index fc1b2ddecf0..3010858e3bd 100644 --- a/engine/class_modules/monk/sc_monk.cpp +++ b/engine/class_modules/monk/sc_monk.cpp @@ -63,16 +63,17 @@ namespace actions // ========================================================================== // Template for common monk action code. See priest_action_t. -template +template template -monk_action_t::monk_action_t( Args &&...args ) +monk_action_t::monk_action_t( Args &&...args ) : parse_action_effects_t( std::forward( args )... ), sef_ability( actions::sef_ability_e::SEF_NONE ), ww_mastery( false ), may_combo_strike( false ), trigger_chiji( false ), cast_during_sck( false ), - track_cd_waste( false ) + track_cd_waste( false ), + sef_actions( nullptr ) { range::fill( _resource_by_stance, RESOURCE_MAX ); @@ -80,41 +81,48 @@ monk_action_t::monk_action_t( Args &&...args ) apply_debuff_effects(); track_cd_waste = base_t::data().cooldown() > 0_ms || base_t::data().charge_cooldown() > 0_ms; + + // TODO: Check if action is affected by SEF multiplier + if ( !p()->talent.windwalker.storm_earth_and_fire->ok() ) + return; + + if constexpr ( !std::is_same_v ) + sef_actions = new sef_actions_t( std::forward( args )... ); } -template -std::string monk_action_t::full_name() const +template +std::string monk_action_t::full_name() const { std::string n = base_t::data().name_cstr(); return n.empty() ? base_t::name_str : n; } -template -monk_t *monk_action_t::p() +template +monk_t *monk_action_t::p() { return debug_cast( base_t::player ); } -template -const monk_t *monk_action_t::p() const +template +const monk_t *monk_action_t::p() const { return debug_cast( base_t::player ); } -template -monk_td_t *monk_action_t::get_td( player_t *target ) const +template +monk_td_t *monk_action_t::get_td( player_t *target ) const { return p()->get_target_data( target ); } -template -const monk_td_t *monk_action_t::find_td( player_t *target ) const +template +const monk_td_t *monk_action_t::find_td( player_t *target ) const { return p()->find_target_data( target ); } -template -void monk_action_t::apply_buff_effects() +template +void monk_action_t::apply_buff_effects() { /* * Permanent action-specific effects that apply to more than one action. @@ -241,13 +249,8 @@ void monk_action_t::apply_buff_effects() // TWW S4 Set Effects } -// Action-related parsing of debuffs. Does not work on spells -// These are action multipliers and what-not that only increase the damage -// of abilities. This does not work with tracking buffs or stat-buffs. -// Things like SEF and Serenity or debuffs that increase the crit chance -// of abilities. -template -void monk_action_t::apply_debuff_effects() +template +void monk_action_t::apply_debuff_effects() { if ( p()->talent.brewmaster.weapons_of_order->ok() ) parse_target_effects( td_fn( &monk_td_t::debuff_t::weapons_of_order ), @@ -261,8 +264,8 @@ void monk_action_t::apply_debuff_effects() parse_target_effects( td_fn( &monk_td_t::debuff_t::jadefire_brand ), p()->talent.windwalker.jadefire_brand_dmg ); } -template -std::unique_ptr monk_action_t::create_expression( util::string_view name_str ) +template +std::unique_ptr monk_action_t::create_expression( util::string_view name_str ) { if ( name_str == "combo_strike" ) return make_mem_fn_expr( name_str, *this, &monk_action_t::is_combo_strike ); @@ -271,8 +274,8 @@ std::unique_ptr monk_action_t::create_expression( util::string_vie return base_t::create_expression( name_str ); } -template -bool monk_action_t::usable_moving() const +template +bool monk_action_t::usable_moving() const { if ( base_t::usable_moving() ) return true; @@ -289,8 +292,8 @@ bool monk_action_t::usable_moving() const return true; } -template -bool monk_action_t::ready() +template +bool monk_action_t::ready() { // Spell data nil or not_found if ( base_t::data().id() == 0 ) @@ -304,8 +307,8 @@ bool monk_action_t::ready() return base_t::ready(); } -template -void monk_action_t::init() +template +void monk_action_t::init() { base_t::init(); @@ -350,8 +353,8 @@ void monk_action_t::init() } } -template -void monk_action_t::init_finished() +template +void monk_action_t::init_finished() { // 2H Weapon Scaling if ( base_t::attack_power_mod.direct > 0 ) @@ -365,8 +368,8 @@ void monk_action_t::init_finished() base_t::init_finished(); } -template -void monk_action_t::reset_swing() +template +void monk_action_t::reset_swing() { if ( p()->main_hand_attack && p()->main_hand_attack->execute_event ) { @@ -380,8 +383,8 @@ void monk_action_t::reset_swing() } } -template -resource_e monk_action_t::current_resource() const +template +resource_e monk_action_t::current_resource() const { if ( p()->specialization() == SPEC_NONE ) { @@ -397,8 +400,8 @@ resource_e monk_action_t::current_resource() const } // Check if the combo ability under consideration is different from the last -template -bool monk_action_t::is_combo_strike() +template +bool monk_action_t::is_combo_strike() { if ( !may_combo_strike ) return false; @@ -417,8 +420,8 @@ bool monk_action_t::is_combo_strike() // This differs from combo_strike when the ability can't combo strike. In // that case both is_combo_strike and is_combo_break are false. -template -bool monk_action_t::is_combo_break() +template +bool monk_action_t::is_combo_break() { if ( !may_combo_strike ) return false; @@ -430,8 +433,8 @@ bool monk_action_t::is_combo_break() // and other effects that trigger from combo strikes. // Triggers from execute() on abilities with may_combo_strike = true // Side effect: modifies combo_strike_actions -template -void monk_action_t::combo_strikes_trigger() +template +void monk_action_t::combo_strikes_trigger() { if ( !p()->baseline.windwalker.mastery->ok() ) return; @@ -464,8 +467,8 @@ void monk_action_t::combo_strikes_trigger() p()->combo_strike_actions.push_back( this ); } -template -void monk_action_t::consume_resource() +template +void monk_action_t::consume_resource() { base_t::consume_resource(); @@ -573,8 +576,8 @@ void monk_action_t::consume_resource() } } -template -void monk_action_t::execute() +template +void monk_action_t::execute() { if ( p()->specialization() == MONK_MISTWEAVER ) { @@ -587,13 +590,16 @@ void monk_action_t::execute() combo_strikes_trigger(); } + if ( sef_actions ) + sef_actions->execute(); + base_t::execute(); trigger_storm_earth_and_fire( this ); } -template -void monk_action_t::impact( action_state_t *s ) +template +void monk_action_t::impact( action_state_t *s ) { trigger_mystic_touch( s ); @@ -640,8 +646,8 @@ void monk_action_t::impact( action_state_t *s ) } } -template -void monk_action_t::tick( dot_t *dot ) +template +void monk_action_t::tick( dot_t *dot ) { base_t::tick( dot ); @@ -649,14 +655,14 @@ void monk_action_t::tick( dot_t *dot ) p()->trigger_empowered_tiger_lightning( dot->state ); } -template -void monk_action_t::trigger_storm_earth_and_fire( const action_t *a ) +template +void monk_action_t::trigger_storm_earth_and_fire( const action_t *a ) { p()->trigger_storm_earth_and_fire( a, sef_ability, ( may_combo_strike && p()->buff.combo_strikes->check() ) ); } -template -void monk_action_t::trigger_mystic_touch( action_state_t *s ) +template +void monk_action_t::trigger_mystic_touch( action_state_t *s ) { if ( base_t::sim->overrides.mystic_touch ) return; @@ -668,43 +674,46 @@ void monk_action_t::trigger_mystic_touch( action_state_t *s ) s->target->debuffs.mystic_touch->trigger(); } -monk_spell_t::monk_spell_t( monk_t *player, std::string_view name, const spell_data_t *spell_data ) - : monk_action_t( name, player, spell_data ) +template +monk_spell_t::monk_spell_t( monk_t *player, std::string_view name, const spell_data_t *spell_data ) + : monk_action_t( name, player, spell_data ) { - ap_type = attack_power_type::WEAPON_MAINHAND; + base_t::ap_type = attack_power_type::WEAPON_MAINHAND; } -monk_heal_t::monk_heal_t( monk_t *player, std::string_view name, const spell_data_t *spell_data ) - : monk_action_t( name, player, spell_data ) +template +monk_heal_t::monk_heal_t( monk_t *player, std::string_view name, const spell_data_t *spell_data ) + : monk_action_t( name, player, spell_data ) { - harmful = false; - ap_type = attack_power_type::WEAPON_MAINHAND; + base_t::harmful = false; + base_t::ap_type = attack_power_type::WEAPON_MAINHAND; } -double monk_heal_t::action_multiplier() const +template +double monk_heal_t::action_multiplier() const { double am = base_t::action_multiplier(); - player_t *t = ( execute_state ) ? execute_state->target : target; + player_t *t = ( base_t::execute_state ) ? base_t::execute_state->target : base_t::target; - switch ( p()->specialization() ) + switch ( base_t::p()->specialization() ) { case MONK_MISTWEAVER: - if ( auto td = this->get_td( t ) ) // Use get_td since we can have a ticking dot without target-data + if ( auto td = base_t::get_td( t ) ) // Use get_td since we can have a ticking dot without target-data { if ( td->dot.enveloping_mist->is_ticking() ) { - if ( p()->talent.mistweaver.mist_wrap->ok() ) - am *= 1.0 + p()->talent.mistweaver.enveloping_mist->effectN( 2 ).percent() + - p()->talent.mistweaver.mist_wrap->effectN( 2 ).percent(); + if ( base_t::p()->talent.mistweaver.mist_wrap->ok() ) + am *= 1.0 + base_t::p()->talent.mistweaver.enveloping_mist->effectN( 2 ).percent() + + base_t::p()->talent.mistweaver.mist_wrap->effectN( 2 ).percent(); else - am *= 1.0 + p()->talent.mistweaver.enveloping_mist->effectN( 2 ).percent(); + am *= 1.0 + base_t::p()->talent.mistweaver.enveloping_mist->effectN( 2 ).percent(); } } - if ( p()->buff.life_cocoon->check() ) - am *= 1.0 + p()->talent.mistweaver.life_cocoon->effectN( 2 ).percent(); + if ( base_t::p()->buff.life_cocoon->check() ) + am *= 1.0 + base_t::p()->talent.mistweaver.life_cocoon->effectN( 2 ).percent(); break; @@ -724,23 +733,26 @@ double monk_heal_t::action_multiplier() const return am; } -monk_absorb_t::monk_absorb_t( monk_t *player, std::string_view name, const spell_data_t *spell_data ) - : monk_action_t( name, player, spell_data ) +template +monk_absorb_t::monk_absorb_t( monk_t *player, std::string_view name, const spell_data_t *spell_data ) + : monk_action_t( name, player, spell_data ) { } -monk_melee_attack_t::monk_melee_attack_t( monk_t *player, std::string_view name, const spell_data_t *spell_data ) - : monk_action_t( name, player, spell_data ) +template +monk_melee_attack_t::monk_melee_attack_t( monk_t *player, std::string_view name, const spell_data_t *spell_data ) + : monk_action_t( name, player, spell_data ) { - special = true; - may_glance = false; + base_t::special = true; + base_t::may_glance = false; } // Physical tick_action abilities need amount_type() override, so the // tick_action are properly physically mitigated. -result_amount_type monk_melee_attack_t::amount_type( const action_state_t *state, bool periodic ) const +template +result_amount_type monk_melee_attack_t::amount_type( const action_state_t *state, bool periodic ) const { - if ( tick_action && tick_action->school == SCHOOL_PHYSICAL ) + if ( base_t::tick_action && base_t::tick_action->school == SCHOOL_PHYSICAL ) { return result_amount_type::DMG_DIRECT; } @@ -861,7 +873,7 @@ namespace pet_summon // Storm, Earth, and Fire // ========================================================================== -struct storm_earth_and_fire_t : public monk_spell_t +struct storm_earth_and_fire_t : public monk_spell_t<> { action_t *fire_sef; action_t *earth_sef; @@ -913,7 +925,7 @@ struct storm_earth_and_fire_t : public monk_spell_t } }; -struct storm_earth_and_fire_fixate_t : public monk_spell_t +struct storm_earth_and_fire_fixate_t : public monk_spell_t<> { storm_earth_and_fire_fixate_t( monk_t *p, util::string_view options_str ) : monk_spell_t( p, "storm_earth_and_fire_fixate", @@ -945,13 +957,29 @@ struct storm_earth_and_fire_fixate_t : public monk_spell_t } // namespace pet_summon +enum sef_type_e +{ + SEF_TYPE_FIRE, + SEF_TYPE_EARTH +}; + template -struct sef_action_t : base_t +struct sef_actions_t { struct child_action_t : base_t { - template - child_action_t( Args &&...args ) : base_t( std::forward( args )... ) + sef_type_e type; + bool is_fixated; + player_t *target; + + // template + child_action_t( sef_type_e type, monk_t *player, std::string_view name, const spell_data_t *spell_data ) + : base_t( player, + fmt::format( "{}_{}", name, + type == SEF_TYPE_FIRE ? "sef_fire" + : type == SEF_TYPE_EARTH ? "sef_earth" + : "NONE" ), + spell_data ) { base_t::background = true; } @@ -989,6 +1017,19 @@ struct sef_action_t : base_t return false; } + void init_finished() override + { + base_t::init_finished(); + + switch ( type ) + { + case SEF_TYPE_FIRE: + base_t::p()->find_action( "sef_fire_elemental" )->add_child( this ); + case SEF_TYPE_EARTH: + base_t::p()->find_action( "sef_earth_elemental" )->add_child( this ); + } + } + double composite_player_multiplier( const action_state_t * ) const override { // Composite Player Multiplier is strictly school mods, which get skipped. @@ -1053,60 +1094,93 @@ struct sef_action_t : base_t return ta; } }; - action_t *sef_fire_action; - action_t *sef_earth_action; - // TODO: Target Fire/Earth actions - /* - * If a non-sleeping target exists with MotC debuff <10s, target that. - * If it is already targeted by another elemental, do not retarget. - * If all MotC debuffs >=10s, do not retarget. - * If fixated, do not retarget. - */ - bool is_fixated; - player_t *sef_fire_target; - player_t *sef_earth_target; + child_action_t *fire_action; + child_action_t *earth_action; + monk_t *player; template - sef_action_t( monk_t *player, std::string_view name, Args &&...args ) - : base_t( player, name, std::forward( args )... ) + sef_actions_t( monk_t *player, Args &&...args ) + : fire_action( SEF_TYPE_FIRE, player, std::forward( args )... ), + earth_action( SEF_TYPE_EARTH, player, std::forward( args )... ), + player( player ) { - if ( !player->talent.windwalker.storm_earth_and_fire->ok() ) - return; - - sef_fire_action = new child_action_t( player, fmt::format( "{}_{}", name, "fire" ), std::forward( args )... ); - sef_earth_action = - new child_action_t( player, fmt::format( "{}_{}", name, "earth" ), std::forward( args )... ); - - // TODO: Set SEF actions as children of the parent SEF action for each elemental. } - void init_finished() override + void execute() { - base_t::init_finished(); - - base_t::p()->find_action( "fire_elemental" )->add_child( sef_fire_action ); - base_t::p()->find_action( "earth_elemental" )->add_child( sef_earth_action ); + if constexpr ( !std::is_same_v ) + { + player->freeze_buffs = true; + fire_action->execute(); + earth_action->execute(); + player->freeze_buffs = false; + } } - void execute() override + void target( player_t *target = nullptr ) { - base_t::p()->freeze_expiration = true; - sef_fire_action->execute_on_target( base_t::p()->target ); - sef_earth_action->execute_on_target( base_t::p()->target ); + if ( target ) + { + fire_action->fixate = earth_action->fixate = true; + fire_action->target = earth_action->target = target; + return; + } - base_t::p()->freeze_expiration = false; - base_t::execute(); + // otherwise, use the default SEF targeting mechanism + // TODO: Target Fire/Earth actions + /* + * If a non-sleeping target exists with MotC debuff <10s, target that. + * If it is already targeted by another elemental, do not retarget. + * If all MotC debuffs >=10s, do not retarget. + * If fixated, do not retarget. + */ } }; +// template +// struct sef_action_t : base_t +// { +// template +// sef_action_t( monk_t *player, std::string_view name, Args &&...args ) +// : base_t( player, name, std::forward( args )... ) +// { +// if ( !player->talent.windwalker.storm_earth_and_fire->ok() ) +// return; + +// sef_fire_action = new child_action_t( player, fmt::format( "{}_{}", name, "fire" ), std::forward( args )... +// ); sef_earth_action = +// new child_action_t( player, fmt::format( "{}_{}", name, "earth" ), std::forward( args )... ); + +// // TODO: Set SEF actions as children of the parent SEF action for each elemental. +// } + +// void init_finished() override +// { +// base_t::init_finished(); + +// base_t::p()->find_action( "fire_elemental" )->add_child( sef_fire_action ); +// base_t::p()->find_action( "earth_elemental" )->add_child( sef_earth_action ); +// } + +// void execute() override +// { +// base_t::p()->freeze_expiration = true; +// sef_fire_action->execute_on_target( base_t::p()->target ); +// sef_earth_action->execute_on_target( base_t::p()->target ); + +// base_t::p()->freeze_expiration = false; +// base_t::execute(); +// } +// }; + namespace attacks { // ========================================================================== // Windwalking Aura Toggle // ========================================================================== -struct windwalking_aura_t : public monk_spell_t +struct windwalking_aura_t : public monk_spell_t<> { windwalking_aura_t( monk_t *player ) : monk_spell_t( player, "windwalking_aura_toggle" ) { @@ -1146,9 +1220,9 @@ struct windwalking_aura_t : public monk_spell_t // ========================================================================== // Flurry Strikes // ========================================================================== -struct flurry_strikes_t : public monk_melee_attack_t +struct flurry_strikes_t : public monk_melee_attack_t { - struct high_impact_t : public monk_spell_t + struct high_impact_t : public monk_spell_t { high_impact_t( monk_t *p ) : monk_spell_t( p, "high_impact", p->talent.shado_pan.high_impact_debuff->effectN( 1 ).trigger() ) // 451039 @@ -1158,7 +1232,7 @@ struct flurry_strikes_t : public monk_melee_attack_t } }; - struct flurry_strike_wisdom_t : public monk_spell_t + struct flurry_strike_wisdom_t : public monk_spell_t { flurry_strike_wisdom_t( monk_t *p ) : monk_spell_t( p, "flurry_strike_wisdom", p->talent.shado_pan.wisdom_of_the_wall_flurry ) @@ -1170,7 +1244,7 @@ struct flurry_strikes_t : public monk_melee_attack_t } }; - struct flurry_strike_t : public monk_melee_attack_t + struct flurry_strike_t : public monk_melee_attack_t { enum wisdom_buff_e { @@ -1291,11 +1365,11 @@ template struct overwhelming_force_t : base_action_t { using base_t = overwhelming_force_t; - struct damage_t : monk_spell_t + struct damage_t : monk_spell_t<> { damage_t( monk_t *player, std::string_view name ) - : monk_spell_t( player, fmt::format( "overwhelming_force_{}", name ), - player->talent.master_of_harmony.overwhelming_force_damage ) + : monk_spell_t( player, fmt::format( "overwhelming_force_{}", name ), + player->talent.master_of_harmony.overwhelming_force_damage ) { background = dual = proc = true; base_multiplier = player->talent.master_of_harmony.overwhelming_force->effectN( 1 ).percent(); @@ -1354,7 +1428,7 @@ struct overwhelming_force_t : base_action_t // ========================================================================== // Tiger's Ferocity ( Windwalker TWW1 4PC ) -struct tigers_ferocity_t : public monk_melee_attack_t +struct tigers_ferocity_t : public monk_melee_attack_t { std::vector &t_list; @@ -1376,7 +1450,7 @@ struct tigers_ferocity_t : public monk_melee_attack_t }; // Tiger Palm base ability =================================================== -struct tiger_palm_t : public overwhelming_force_t +struct tiger_palm_t : public overwhelming_force_t> { bool face_palm; action_t *tigers_ferocity; @@ -1522,7 +1596,7 @@ struct tiger_palm_t : public overwhelming_force_t // ========================================================================== // Glory of the Dawn ================================================= -struct glory_of_the_dawn_t : public monk_melee_attack_t +struct glory_of_the_dawn_t : public monk_melee_attack_t { glory_of_the_dawn_t( monk_t *p, const std::string &name ) : monk_melee_attack_t( p, name, p->passives.glory_of_the_dawn_damage ) @@ -1649,7 +1723,7 @@ struct press_the_advantage_t : base_action_t } }; -struct rising_sun_kick_dmg_t : public overwhelming_force_t +struct rising_sun_kick_dmg_t : public overwhelming_force_t> { rising_sun_kick_dmg_t( monk_t *p, std::string_view /* options_str */, std::string_view name = "rising_sun_kick_damage" ) @@ -1715,7 +1789,7 @@ struct rising_sun_kick_dmg_t : public overwhelming_force_t } }; -struct rising_sun_kick_t : public monk_melee_attack_t +struct rising_sun_kick_t : public monk_melee_attack_t<> { glory_of_the_dawn_t *gotd; @@ -1770,7 +1844,7 @@ struct rising_sun_kick_t : public monk_melee_attack_t // ========================================================================== // Blackout Kick Proc from Teachings of the Monastery ======================= -struct blackout_kick_totm_proc_t : public monk_melee_attack_t +struct blackout_kick_totm_proc_t : public monk_melee_attack_t { blackout_kick_totm_proc_t( monk_t *p ) : monk_melee_attack_t( p, "blackout_kick_totm_proc", p->talent.windwalker.teachings_of_the_monastery_blackout_kick ) @@ -1845,7 +1919,7 @@ template struct charred_passions_t : base_action_t { using base_t = charred_passions_t; - struct damage_t : monk_spell_t + struct damage_t : monk_spell_t<> { damage_t( monk_t *player, std::string_view name ) : monk_spell_t( player, fmt::format( "charred_passions_{}", name ), player->talent.brewmaster.charred_passions ) @@ -1900,13 +1974,13 @@ struct charred_passions_t : base_action_t }; // Blackout Kick Baseline ability ======================================= -struct blackout_kick_t : overwhelming_force_t> +struct blackout_kick_t : overwhelming_force_t>> { action_t *bok_totm_proc; cooldown_t *keg_smash_cooldown; - blackout_kick_t( monk_t *p, std::string_view name, util::string_view options_str ) - : base_t( p, name, + blackout_kick_t( monk_t *p, util::string_view options_str ) + : base_t( p, "blackout_kick", ( p->specialization() == MONK_BREWMASTER ? p->baseline.brewmaster.blackout_kick : p->baseline.monk.blackout_kick ) ), keg_smash_cooldown( nullptr ) @@ -2103,7 +2177,7 @@ struct blackout_kick_t : overwhelming_force_t { flight_of_the_red_crane_dmg_t( monk_t *p ) : monk_spell_t( p, "flight_of_the_red_crane_dmg", p->talent.conduit_of_the_celestials.flight_of_the_red_crane_dmg ) @@ -2120,7 +2194,7 @@ struct flight_of_the_red_crane_dmg_t : public monk_spell_t } }; -struct flight_of_the_red_crane_heal_t : public monk_heal_t +struct flight_of_the_red_crane_heal_t : public monk_heal_t<> { flight_of_the_red_crane_heal_t( monk_t *p ) : monk_heal_t( p, "flight_of_the_red_crane_heal", p->talent.conduit_of_the_celestials.flight_of_the_red_crane_heal ) @@ -2131,7 +2205,7 @@ struct flight_of_the_red_crane_heal_t : public monk_heal_t } }; -struct rushing_jade_wind_t : public monk_melee_attack_t +struct rushing_jade_wind_t : public monk_melee_attack_t<> { buff_t *buff; @@ -2156,7 +2230,7 @@ struct rushing_jade_wind_t : public monk_melee_attack_t // ========================================================================== // Jade Ignition Legendary -struct chi_explosion_t : public monk_spell_t +struct chi_explosion_t : public monk_spell_t { chi_explosion_t( monk_t *player ) : monk_spell_t( player, "chi_explosion", player->passives.chi_explosion ) { @@ -2175,7 +2249,7 @@ struct chi_explosion_t : public monk_spell_t } }; -struct sck_tick_action_t : charred_passions_t +struct sck_tick_action_t : charred_passions_t> { sck_tick_action_t( monk_t *p, std::string_view name, const spell_data_t *data ) : charred_passions_t( p, name, data ) @@ -2215,7 +2289,7 @@ struct sck_tick_action_t : charred_passions_t } }; -struct spinning_crane_kick_t : public monk_melee_attack_t +struct spinning_crane_kick_t : public monk_melee_attack_t<> { struct spinning_crane_kick_state_t : public action_state_t { @@ -2363,7 +2437,7 @@ struct spinning_crane_kick_t : public monk_melee_attack_t // Fists of Fury // ========================================================================== -struct fists_of_fury_tick_t : public monk_melee_attack_t +struct fists_of_fury_tick_t : public monk_melee_attack_t { fists_of_fury_tick_t( monk_t *p, util::string_view name ) : monk_melee_attack_t( p, name, p->passives.fists_of_fury_tick ) @@ -2413,7 +2487,7 @@ struct fists_of_fury_tick_t : public monk_melee_attack_t } }; -struct fists_of_fury_t : public monk_melee_attack_t +struct fists_of_fury_t : public monk_melee_attack_t<> { fists_of_fury_t( monk_t *p, util::string_view options_str ) : monk_melee_attack_t( p, "fists_of_fury", p->talent.windwalker.fists_of_fury ) @@ -2481,7 +2555,7 @@ struct fists_of_fury_t : public monk_melee_attack_t // Whirling Dragon Punch // ========================================================================== -struct whirling_dragon_punch_aoe_tick_t : public monk_melee_attack_t +struct whirling_dragon_punch_aoe_tick_t : public monk_melee_attack_t { timespan_t delay; whirling_dragon_punch_aoe_tick_t( util::string_view name, monk_t *p, const spell_data_t *s, timespan_t delay ) @@ -2506,7 +2580,7 @@ struct whirling_dragon_punch_aoe_tick_t : public monk_melee_attack_t } }; -struct whirling_dragon_punch_st_tick_t : public monk_melee_attack_t +struct whirling_dragon_punch_st_tick_t : public monk_melee_attack_t { whirling_dragon_punch_st_tick_t( util::string_view name, monk_t *p, const spell_data_t *s ) : monk_melee_attack_t( p, name, s ) @@ -2528,7 +2602,7 @@ struct whirling_dragon_punch_st_tick_t : public monk_melee_attack_t } }; -struct whirling_dragon_punch_t : public monk_melee_attack_t +struct whirling_dragon_punch_t : public monk_melee_attack_t<> { struct whirling_dragon_punch_state_t : public action_state_t { @@ -2640,7 +2714,7 @@ struct whirling_dragon_punch_t : public monk_melee_attack_t // The ability does NOT require an off-hand weapon to be executed. // The ability uses the main-hand weapon damage for both attacks -struct strike_of_the_windlord_main_hand_t : public monk_melee_attack_t +struct strike_of_the_windlord_main_hand_t : public monk_melee_attack_t { strike_of_the_windlord_main_hand_t( monk_t *p, const char *name, const spell_data_t *s ) : monk_melee_attack_t( p, name, s ) @@ -2676,7 +2750,7 @@ struct strike_of_the_windlord_main_hand_t : public monk_melee_attack_t } }; -struct strike_of_the_windlord_off_hand_t : public monk_melee_attack_t +struct strike_of_the_windlord_off_hand_t : public monk_melee_attack_t { strike_of_the_windlord_off_hand_t( monk_t *p, const char *name, const spell_data_t *s ) : monk_melee_attack_t( p, name, s ) @@ -2732,7 +2806,7 @@ struct strike_of_the_windlord_off_hand_t : public monk_melee_attack_t } }; -struct strike_of_the_windlord_t : public monk_melee_attack_t +struct strike_of_the_windlord_t : public monk_melee_attack_t<> { strike_of_the_windlord_main_hand_t *mh_attack; strike_of_the_windlord_off_hand_t *oh_attack; @@ -2800,7 +2874,7 @@ struct strike_of_the_windlord_t : public monk_melee_attack_t // Thunderfist // ========================================================================== -struct thunderfist_t : public monk_spell_t +struct thunderfist_t : public monk_spell_t { thunderfist_t( monk_t *player ) : monk_spell_t( player, "thunderfist", player->passives.thunderfist->effectN( 1 ).trigger() ) @@ -2821,7 +2895,7 @@ struct thunderfist_t : public monk_spell_t // Melee // ========================================================================== -struct press_the_advantage_melee_t : public monk_spell_t +struct press_the_advantage_melee_t : public monk_spell_t<> { press_the_advantage_melee_t( monk_t *player ) : monk_spell_t( player, "press_the_advantage", player->find_spell( 418360 ) ) @@ -2833,7 +2907,7 @@ struct press_the_advantage_melee_t : public monk_spell_t } }; -struct melee_t : public monk_melee_attack_t +struct melee_t : public monk_melee_attack_t { int sync_weapons; bool dual_threat_enabled = true; // Dual Threat requires one succesful melee inbetween casts @@ -2928,7 +3002,7 @@ struct melee_t : public monk_melee_attack_t // Dual Threat WW Talent -struct dual_threat_t : public monk_melee_attack_t +struct dual_threat_t : public monk_melee_attack_t { dual_threat_t( monk_t *p ) : monk_melee_attack_t( p, "dual_threat_kick", p->passives.dual_threat_kick ) { @@ -2953,7 +3027,7 @@ struct dual_threat_t : public monk_melee_attack_t } }; -struct auto_attack_t : public monk_melee_attack_t +struct auto_attack_t : public monk_melee_attack_t<> { int sync_weapons; @@ -3018,7 +3092,7 @@ struct auto_attack_t : public monk_melee_attack_t // ========================================================================== // Keg Smash // ========================================================================== -struct keg_smash_t : monk_melee_attack_t +struct keg_smash_t : monk_melee_attack_t { keg_smash_t( monk_t *player, std::string_view options_str, std::string_view name = "keg_smash" ) : monk_melee_attack_t( player, name, player->talent.brewmaster.keg_smash ) @@ -3080,7 +3154,7 @@ struct keg_smash_t : monk_melee_attack_t // ========================================================================== // Touch of Death // ========================================================================== -struct touch_of_death_t : public monk_melee_attack_t +struct touch_of_death_t : public monk_melee_attack_t { touch_of_death_t( monk_t *p, util::string_view options_str ) : monk_melee_attack_t( p, "touch_of_death", p->baseline.monk.touch_of_death ) @@ -3201,7 +3275,7 @@ struct touch_of_karma_dot_t : public residual_action::residual_periodic_action_t } }; -struct touch_of_karma_t : public monk_melee_attack_t +struct touch_of_karma_t : public monk_melee_attack_t<> { double interval; double interval_stddev; @@ -3290,7 +3364,7 @@ struct touch_of_karma_t : public monk_melee_attack_t // Provoke // ========================================================================== -struct provoke_t : public monk_melee_attack_t +struct provoke_t : public monk_melee_attack_t<> { provoke_t( monk_t *p, util::string_view options_str ) : monk_melee_attack_t( p, "provoke", p->baseline.monk.provoke ) { @@ -3312,7 +3386,7 @@ struct provoke_t : public monk_melee_attack_t // Spear Hand Strike // ========================================================================== -struct spear_hand_strike_t : public monk_melee_attack_t +struct spear_hand_strike_t : public monk_melee_attack_t<> { spear_hand_strike_t( monk_t *p, util::string_view options_str ) : monk_melee_attack_t( p, "spear_hand_strike", p->talent.monk.spear_hand_strike ) @@ -3329,7 +3403,7 @@ struct spear_hand_strike_t : public monk_melee_attack_t // Leg Sweep // ========================================================================== -struct leg_sweep_t : public monk_melee_attack_t +struct leg_sweep_t : public monk_melee_attack_t<> { leg_sweep_t( monk_t *p, util::string_view options_str ) : monk_melee_attack_t( p, "leg_sweep", p->baseline.monk.leg_sweep ) @@ -3347,7 +3421,7 @@ struct leg_sweep_t : public monk_melee_attack_t // Paralysis // ========================================================================== -struct paralysis_t : public monk_melee_attack_t +struct paralysis_t : public monk_melee_attack_t<> { paralysis_t( monk_t *p, util::string_view options_str ) : monk_melee_attack_t( p, "paralysis", p->talent.monk.paralysis ) @@ -3362,7 +3436,7 @@ struct paralysis_t : public monk_melee_attack_t // Flying Serpent Kick // ========================================================================== -struct flying_serpent_kick_t : public monk_melee_attack_t +struct flying_serpent_kick_t : public monk_melee_attack_t<> { bool first_charge; double movement_speed_increase; @@ -3426,7 +3500,7 @@ namespace spells // ========================================================================== // Special Delivery // ========================================================================== -struct special_delivery_t : public monk_spell_t +struct special_delivery_t : public monk_spell_t { special_delivery_t( monk_t *player ) : monk_spell_t( player, "special_delivery", @@ -3448,7 +3522,7 @@ struct special_delivery_t : public monk_spell_t // Black Ox Brew // ========================================================================== -struct black_ox_brew_t : public brew_t +struct black_ox_brew_t : public brew_t> { // special_delivery_t *delivery; black_ox_brew_t( monk_t *player, util::string_view options_str ) @@ -3484,7 +3558,7 @@ struct black_ox_brew_t : public brew_t // Roll // ========================================================================== -struct roll_t : public monk_spell_t +struct roll_t : public monk_spell_t<> { roll_t( monk_t *player, util::string_view options_str ) : monk_spell_t( player, "roll", @@ -3510,7 +3584,7 @@ struct roll_t : public monk_spell_t // Chi Torpedo // ========================================================================== -struct chi_torpedo_t : public monk_spell_t +struct chi_torpedo_t : public monk_spell_t<> { chi_torpedo_t( monk_t *player, util::string_view options_str ) : monk_spell_t( @@ -3535,7 +3609,7 @@ struct chi_torpedo_t : public monk_spell_t // Crackling Jade Lightning // ========================================================================== -struct crackling_jade_lightning_t : public monk_spell_t +struct crackling_jade_lightning_t : public monk_spell_t { struct crackling_jade_lightning_aoe_t : public monk_spell_t { @@ -3643,7 +3717,7 @@ struct crackling_jade_lightning_t : public monk_spell_t // ========================================================================== // Breath of Fire // ========================================================================== -struct breath_of_fire_dot_t : public monk_spell_t +struct breath_of_fire_dot_t : public monk_spell_t { bool blackout_combo; @@ -3673,7 +3747,7 @@ struct breath_of_fire_dot_t : public monk_spell_t } }; -struct breath_of_fire_t : public monk_spell_t +struct breath_of_fire_t : public monk_spell_t { struct dragonfire_brew_t : monk_spell_t { @@ -3750,9 +3824,9 @@ struct breath_of_fire_t : public monk_spell_t // ========================================================================== // Niuzao's Protection ============================================== -struct fortifying_brew_t : brew_t +struct fortifying_brew_t : brew_t> { - struct niuzaos_protection_t : public monk_absorb_t + struct niuzaos_protection_t : public monk_absorb_t<> { niuzaos_protection_t( monk_t *p ) : monk_absorb_t( p, "niuzaos_protection", p->talent.conduit_of_the_celestials.niuzaos_protection ) @@ -3796,7 +3870,7 @@ struct fortifying_brew_t : brew_t // Exploding Keg // ========================================================================== // Exploding Keg Proc ============================================== -struct exploding_keg_proc_t : public monk_spell_t +struct exploding_keg_proc_t : public monk_spell_t { exploding_keg_proc_t( monk_t *p ) : monk_spell_t( p, "exploding_keg_proc", p->talent.brewmaster.exploding_keg->effectN( 4 ).trigger() ) @@ -3806,7 +3880,7 @@ struct exploding_keg_proc_t : public monk_spell_t } }; -struct exploding_keg_t : public monk_spell_t +struct exploding_keg_t : public monk_spell_t { exploding_keg_t( monk_t *p, util::string_view options_str ) : monk_spell_t( p, "exploding_keg", p->talent.brewmaster.exploding_keg ) @@ -3840,9 +3914,9 @@ struct exploding_keg_t : public monk_spell_t // ========================================================================== // Purifying Brew // ========================================================================== -struct purifying_brew_t : public brew_t +struct purifying_brew_t : public brew_t> { - struct gai_plins_imperial_brew_t : monk_heal_t + struct gai_plins_imperial_brew_t : monk_heal_t<> { gai_plins_imperial_brew_t( monk_t *player ) : monk_heal_t( player, "gai_plins_imperial_brew", player->talent.brewmaster.gai_plins_imperial_brew_heal ) @@ -3932,7 +4006,7 @@ struct purifying_brew_t : public brew_t // '-.___.-') )..-' // (_/lame -struct mana_tea_t : public monk_spell_t +struct mana_tea_t : public monk_spell_t<> { mana_tea_t( monk_t *p, util::string_view options_str ) : monk_spell_t( p, "mana_tea", p->talent.mistweaver.mana_tea ) { @@ -3953,7 +4027,7 @@ struct mana_tea_t : public monk_spell_t // Thunder Focus Tea // ========================================================================== -struct thunder_focus_tea_t : public monk_spell_t +struct thunder_focus_tea_t : public monk_spell_t<> { thunder_focus_tea_t( monk_t *p, util::string_view options_str ) : monk_spell_t( p, "Thunder_focus_tea", p->talent.mistweaver.thunder_focus_tea ) @@ -3975,7 +4049,7 @@ struct thunder_focus_tea_t : public monk_spell_t // Dampen Harm // ========================================================================== -struct dampen_harm_t : public monk_spell_t +struct dampen_harm_t : public monk_spell_t<> { dampen_harm_t( monk_t *p, util::string_view options_str ) : monk_spell_t( p, "dampen_harm", p->talent.monk.dampen_harm ) @@ -3999,7 +4073,7 @@ struct dampen_harm_t : public monk_spell_t // Diffuse Magic // ========================================================================== -struct diffuse_magic_t : public monk_spell_t +struct diffuse_magic_t : public monk_spell_t<> { diffuse_magic_t( monk_t *p, util::string_view options_str ) : monk_spell_t( p, "diffuse_magic", p->talent.monk.diffuse_magic ) @@ -4024,9 +4098,9 @@ struct diffuse_magic_t : public monk_spell_t // Courage of the White Tiger -struct courage_of_the_white_tiger_t : public monk_melee_attack_t +struct courage_of_the_white_tiger_t : public monk_melee_attack_t { - struct courage_of_the_white_tiger_heal_t : public monk_heal_t + struct courage_of_the_white_tiger_heal_t : public monk_heal_t<> { courage_of_the_white_tiger_heal_t( monk_t *p ) : monk_heal_t( p, "courage_of_the_white_tiger_heal", @@ -4079,7 +4153,7 @@ struct courage_of_the_white_tiger_t : public monk_melee_attack_t } }; -struct xuen_spell_t : public monk_spell_t +struct xuen_spell_t : public monk_spell_t { xuen_spell_t( monk_t *p, util::string_view options_str ) : monk_spell_t( p, "invoke_xuen_the_white_tiger", p->talent.windwalker.invoke_xuen_the_white_tiger ) @@ -4127,7 +4201,7 @@ struct xuen_spell_t : public monk_spell_t }; // Fury of Xuen Invoke Xuen ============================================================= -struct fury_of_xuen_summon_t final : monk_spell_t +struct fury_of_xuen_summon_t final : monk_spell_t { fury_of_xuen_summon_t( monk_t *p ) : monk_spell_t( p, "fury_of_xuen_summon", p->find_spell( 396168 ) ) { @@ -4166,7 +4240,7 @@ struct fury_of_xuen_summon_t final : monk_spell_t } }; -struct empowered_tiger_lightning_t : public monk_spell_t +struct empowered_tiger_lightning_t : public monk_spell_t { empowered_tiger_lightning_t( monk_t *p ) : monk_spell_t( p, "empowered_tiger_lightning", p->passives.empowered_tiger_lightning ) @@ -4181,7 +4255,7 @@ struct empowered_tiger_lightning_t : public monk_spell_t } }; -struct fury_of_xuen_empowered_tiger_lightning_t : public monk_spell_t +struct fury_of_xuen_empowered_tiger_lightning_t : public monk_spell_t { fury_of_xuen_empowered_tiger_lightning_t( monk_t *p ) : monk_spell_t( p, "empowered_tiger_lightning_fury_of_xuen", p->passives.empowered_tiger_lightning ) @@ -4196,7 +4270,7 @@ struct fury_of_xuen_empowered_tiger_lightning_t : public monk_spell_t } }; -struct flurry_of_xuen_t : public monk_spell_t +struct flurry_of_xuen_t : public monk_spell_t { flurry_of_xuen_t( monk_t *p ) : monk_spell_t( p, "flurry_of_xuen", p->passives.flurry_of_xuen_driver->effectN( 1 )._trigger_spell ) @@ -4224,7 +4298,7 @@ struct flurry_of_xuen_t : public monk_spell_t // Invoke Niuzao, the Black Ox // ========================================================================== -struct strength_of_the_black_ox_t : public monk_spell_t +struct strength_of_the_black_ox_t : public monk_spell_t { strength_of_the_black_ox_t( monk_t *p ) : monk_spell_t( p, "strength_of_the_black_ox", p->talent.conduit_of_the_celestials.strength_of_the_black_ox_damage ) @@ -4243,7 +4317,7 @@ struct strength_of_the_black_ox_t : public monk_spell_t } }; -struct strength_of_the_black_ox_absorb_t : public monk_absorb_t +struct strength_of_the_black_ox_absorb_t : public monk_absorb_t<> { strength_of_the_black_ox_absorb_t( monk_t *p ) : monk_absorb_t( p, "strength_of_the_black_ox_absorb", @@ -4256,7 +4330,7 @@ struct strength_of_the_black_ox_absorb_t : public monk_absorb_t } }; -struct niuzao_spell_t : public monk_spell_t +struct niuzao_spell_t : public monk_spell_t { niuzao_spell_t( monk_t *p, util::string_view options_str ) : monk_spell_t( p, "invoke_niuzao_the_black_ox", p->talent.brewmaster.invoke_niuzao_the_black_ox ) @@ -4284,7 +4358,7 @@ struct niuzao_spell_t : public monk_spell_t }; // Call to Arms Invoke Niuzao ============================================================= -struct niuzao_call_to_arms_summon_t final : monk_spell_t +struct niuzao_call_to_arms_summon_t final : monk_spell_t { niuzao_call_to_arms_summon_t( monk_t *p ) : monk_spell_t( p, "niuzao_call_to_arms_summon", p->find_spell( 395267 ) ) { @@ -4309,7 +4383,7 @@ struct niuzao_call_to_arms_summon_t final : monk_spell_t // Invoke Chi-Ji, the Red Crane // ========================================================================== -struct chiji_spell_t : public monk_spell_t +struct chiji_spell_t : public monk_spell_t { chiji_spell_t( monk_t *p, util::string_view options_str ) : monk_spell_t( p, "invoke_chiji_the_red_crane", p->talent.mistweaver.invoke_chi_ji_the_red_crane ) @@ -4341,7 +4415,7 @@ struct chiji_spell_t : public monk_spell_t // Invoke Yu'lon, the Jade Serpent // ========================================================================== -struct yulon_spell_t : public monk_spell_t +struct yulon_spell_t : public monk_spell_t { yulon_spell_t( monk_t *p, util::string_view options_str ) : monk_spell_t( p, "invoke_yulon_the_jade_serpent", p->talent.mistweaver.invoke_yulon_the_jade_serpent ) @@ -4371,7 +4445,7 @@ struct yulon_spell_t : public monk_spell_t // Unity Within // ========================================================================== -struct unity_within_t : public monk_spell_t +struct unity_within_t : public monk_spell_t { unity_within_t( monk_t *p, util::string_view options_str ) : monk_spell_t( p, "unity_within", p->talent.conduit_of_the_celestials.unity_within ) @@ -4401,7 +4475,7 @@ struct unity_within_t : public monk_spell_t // ========================================================================== // This is a separate spell from the normal Flight of the Red Crane damage spell -struct flight_of_the_red_crane_celestial_dmg_t : public monk_spell_t +struct flight_of_the_red_crane_celestial_dmg_t : public monk_spell_t { flight_of_the_red_crane_celestial_dmg_t( monk_t *p ) : monk_spell_t( p, "flight_of_the_red_crane_celestial_dmg", @@ -4426,7 +4500,7 @@ struct flight_of_the_red_crane_celestial_dmg_t : public monk_spell_t } }; -struct flight_of_the_red_crane_celestial_heal_t : public monk_heal_t +struct flight_of_the_red_crane_celestial_heal_t : public monk_heal_t { flight_of_the_red_crane_celestial_heal_t( monk_t *p ) : monk_heal_t( p, "flight_of_the_red_crane_celestial", @@ -4445,9 +4519,9 @@ struct flight_of_the_red_crane_celestial_heal_t : public monk_heal_t } }; -struct celestial_conduit_t : public monk_spell_t +struct celestial_conduit_t : public monk_spell_t<> { - struct celestial_conduit_dmg_t : public monk_spell_t + struct celestial_conduit_dmg_t : public monk_spell_t { celestial_conduit_dmg_t( monk_t *p ) : monk_spell_t( p, "celestial_conduit_damage", p->talent.conduit_of_the_celestials.celestial_conduit_dmg ) @@ -4470,7 +4544,7 @@ struct celestial_conduit_t : public monk_spell_t } }; - struct celestial_conduit_heal_t : public monk_heal_t + struct celestial_conduit_heal_t : public monk_heal_t { celestial_conduit_heal_t( monk_t *p ) : monk_heal_t( p, "celestial_conduit_heal", p->talent.conduit_of_the_celestials.celestial_conduit_heal ) @@ -4544,7 +4618,7 @@ struct celestial_conduit_t : public monk_spell_t // Chi Surge // ========================================================================== -struct chi_surge_t : monk_spell_t +struct chi_surge_t : monk_spell_t { chi_surge_t( monk_t *player ) : monk_spell_t( player, "chi_surge", player->talent.brewmaster.chi_surge->effectN( 1 ).trigger() ) @@ -4578,7 +4652,7 @@ struct chi_surge_t : monk_spell_t // Weapons of Order // ========================================================================== -struct weapons_of_order_t : public monk_spell_t +struct weapons_of_order_t : public monk_spell_t<> { weapons_of_order_t( monk_t *p, util::string_view options_str ) : monk_spell_t( p, "weapons_of_order", p->talent.brewmaster.weapons_of_order ) @@ -4615,7 +4689,7 @@ struct weapons_of_order_t : public monk_spell_t // Jadefire Stomp // ========================================================================== -struct jadefire_stomp_ww_damage_t : public monk_spell_t +struct jadefire_stomp_ww_damage_t : public monk_spell_t { jadefire_stomp_ww_damage_t( monk_t *p ) : monk_spell_t( p, "jadefire_stomp_ww_dmg", p->talent.windwalker.jadefire_stomp_ww_damage ) @@ -4625,7 +4699,7 @@ struct jadefire_stomp_ww_damage_t : public monk_spell_t } }; -struct jadefire_stomp_damage_t : public monk_spell_t +struct jadefire_stomp_damage_t : public monk_spell_t { jadefire_stomp_damage_t( monk_t *p ) : monk_spell_t( p, "jadefire_stomp_dmg", p->talent.windwalker.jadefire_stomp_damage ) @@ -4652,7 +4726,7 @@ struct jadefire_stomp_damage_t : public monk_spell_t } }; -struct jadefire_stomp_heal_t : public monk_heal_t +struct jadefire_stomp_heal_t : public monk_heal_t { jadefire_stomp_heal_t( monk_t *p ) : monk_heal_t( p, "jadefire_stomp_heal", p->talent.windwalker.jadefire_stomp_damage ) @@ -4673,7 +4747,7 @@ struct jadefire_stomp_heal_t : public monk_heal_t } }; -struct jadefire_stomp_t : public monk_spell_t +struct jadefire_stomp_t : public monk_spell_t { jadefire_stomp_damage_t *damage; jadefire_stomp_heal_t *heal; @@ -4757,7 +4831,7 @@ struct jadefire_stomp_t : public monk_spell_t // Gale Force // ========================================================================== -struct gale_force_t : public monk_spell_t +struct gale_force_t : public monk_spell_t { gale_force_t( monk_t *p ) : monk_spell_t( p, "gale_force", p->talent.windwalker.gale_force_damage ) { @@ -4813,7 +4887,7 @@ struct soothing_mist_t : public monk_heal_t // // TODO: Double Check if this works. -struct gust_of_mists_t : public monk_heal_t +struct gust_of_mists_t : public monk_heal_t<> { gust_of_mists_t( monk_t *p ) : monk_heal_t( p, "gust_of_mists", p->baseline.mistweaver.mastery->effectN( 2 ).trigger() ) @@ -4839,7 +4913,7 @@ struct gust_of_mists_t : public monk_heal_t // Enveloping Mist // ========================================================================== -struct enveloping_mist_t : public monk_heal_t +struct enveloping_mist_t : public monk_heal_t<> { gust_of_mists_t *mastery; @@ -4928,7 +5002,7 @@ struct renewing_mist_t : public monk_heal_t // Vivify // ========================================================================== -struct vivify_t : public monk_heal_t +struct vivify_t : public monk_heal_t<> { gust_of_mists_t *mastery; @@ -4977,7 +5051,7 @@ struct vivify_t : public monk_heal_t // Revival // ========================================================================== -struct revival_t : public monk_heal_t +struct revival_t : public monk_heal_t<> { revival_t( monk_t *p, util::string_view options_str ) : monk_heal_t( p, "revival", p->talent.mistweaver.revival ) { @@ -4991,9 +5065,9 @@ struct revival_t : public monk_heal_t // ========================================================================== // Expel Harm // ========================================================================== -struct expel_harm_t : monk_heal_t +struct expel_harm_t : monk_heal_t { - struct damage_t : monk_spell_t + struct damage_t : monk_spell_t { damage_t( monk_t *player ) : monk_spell_t( player, "expel_harm_damage", player->baseline.monk.expel_harm_damage ) { @@ -5184,7 +5258,7 @@ struct zen_pulse_t : public monk_spell_t // ========================================================================== // Chi Wave // ========================================================================== -struct chi_wave_t : public monk_spell_t +struct chi_wave_t : public monk_spell_t<> { template struct bounce_t : TBase @@ -5218,13 +5292,13 @@ struct chi_wave_t : public monk_spell_t } }; - bounce_t *heal; - bounce_t *damage; + bounce_t> *heal; + bounce_t> *damage; chi_wave_t( monk_t *player ) : monk_spell_t( player, "chi_wave", player->talent.monk.chi_wave_driver ), - heal( new bounce_t( player, "heal", player->talent.monk.chi_wave_heal ) ), - damage( new bounce_t( player, "damage", player->talent.monk.chi_wave_damage ) ) + heal( new bounce_t>( player, "heal", player->talent.monk.chi_wave_heal ) ), + damage( new bounce_t>( player, "damage", player->talent.monk.chi_wave_damage ) ) { background = true; may_combo_strike = false; @@ -5257,7 +5331,7 @@ struct chi_wave_t : public monk_spell_t // ========================================================================== // Chi Burst // ========================================================================== -struct chi_burst_t : monk_spell_t +struct chi_burst_t : monk_spell_t<> { template struct hit_t : TBase @@ -5276,8 +5350,8 @@ struct chi_burst_t : monk_spell_t } }; - hit_t *damage; - hit_t *heal; + hit_t> *damage; + hit_t> *heal; propagate_const buff; // TODO: Figure out what you have to do to simulate this as a projectile. @@ -5285,8 +5359,8 @@ struct chi_burst_t : monk_spell_t : monk_spell_t( player, "chi_burst", player->specialization() == MONK_WINDWALKER ? player->talent.monk.chi_burst_projectile : player->talent.monk.chi_burst ), - damage( new hit_t( player, "damage", player->talent.monk.chi_burst_damage ) ), - heal( new hit_t( player, "heal", player->talent.monk.chi_burst_heal ) ), + damage( new hit_t>( player, "damage", player->talent.monk.chi_burst_damage ) ), + heal( new hit_t>( player, "heal", player->talent.monk.chi_burst_heal ) ), buff( buff_t::find( player, "chi_burst" ) ) { parse_options( options_str ); @@ -5328,7 +5402,7 @@ struct chi_burst_t : monk_spell_t // Healing Elixirs // ========================================================================== -struct healing_elixir_t : public monk_heal_t +struct healing_elixir_t : public monk_heal_t<> { healing_elixir_t( monk_t *p ) : monk_heal_t( p, "healing_elixir", p->shared.healing_elixir ) { @@ -5342,7 +5416,7 @@ struct healing_elixir_t : public monk_heal_t // Refreshing Jade Wind // ========================================================================== -struct refreshing_jade_wind_heal_t : public monk_heal_t +struct refreshing_jade_wind_heal_t : public monk_heal_t<> { refreshing_jade_wind_heal_t( monk_t *player ) : monk_heal_t( player, "refreshing_jade_wind_heal", @@ -5353,7 +5427,7 @@ struct refreshing_jade_wind_heal_t : public monk_heal_t } }; -struct refreshing_jade_wind_t : public monk_spell_t +struct refreshing_jade_wind_t : public monk_spell_t<> { refreshing_jade_wind_heal_t *heal; refreshing_jade_wind_t( monk_t *player, util::string_view options_str ) @@ -5376,7 +5450,7 @@ struct refreshing_jade_wind_t : public monk_spell_t // ========================================================================== // This is a Brewmaster-specific critical strike effect -struct celestial_fortune_t : public monk_heal_t +struct celestial_fortune_t : public monk_heal_t<> { celestial_fortune_t( monk_t *p ) : monk_heal_t( p, "celestial_fortune", p->baseline.brewmaster.celestial_fortune_heal ) @@ -5406,7 +5480,7 @@ namespace absorbs // ========================================================================== // Celestial Brew // ========================================================================== -struct celestial_brew_t : public brew_t +struct celestial_brew_t : public brew_t> { struct celestial_brew_t_state_t : public action_state_t { @@ -5469,7 +5543,7 @@ struct celestial_brew_t : public brew_t // ========================================================================== // Life Cocoon // ========================================================================== -struct life_cocoon_t : public monk_absorb_t +struct life_cocoon_t : public monk_absorb_t<> { life_cocoon_t( monk_t *p, util::string_view options_str ) : monk_absorb_t( p, "life_cocoon", p->talent.mistweaver.life_cocoon ) @@ -5812,7 +5886,7 @@ struct whirling_dragon_punch_buff_t : monk_buff_t // =============================================================================== struct rushing_jade_wind_buff_t : public monk_buff_t { - struct tick_action_t : monk_melee_attack_t + struct tick_action_t : monk_melee_attack_t { tick_action_t( monk_t *p ) : monk_melee_attack_t( p, "rushing_jade_wind_tick", p->passives.rushing_jade_wind_tick ) { @@ -6137,16 +6211,16 @@ void aspect_of_harmony_t::construct_actions( monk_t *player ) return; } - damage = new spender_t::tick_t( player, "aspect_of_harmony_damage", - player->talent.master_of_harmony.aspect_of_harmony_damage ); - heal = new spender_t::tick_t( player, "aspect_of_harmony_heal", - player->talent.master_of_harmony.aspect_of_harmony_heal ); + damage = new spender_t::tick_t>( player, "aspect_of_harmony_damage", + player->talent.master_of_harmony.aspect_of_harmony_damage ); + heal = new spender_t::tick_t>( player, "aspect_of_harmony_heal", + player->talent.master_of_harmony.aspect_of_harmony_heal ); if ( player->specialization() == MONK_BREWMASTER ) - purified_spirit = new spender_t::purified_spirit_t( + purified_spirit = new spender_t::purified_spirit_t>( player, player->talent.master_of_harmony.purified_spirit_damage, this ); if ( player->specialization() == MONK_MISTWEAVER ) - purified_spirit = new spender_t::purified_spirit_t( + purified_spirit = new spender_t::purified_spirit_t>( player, player->talent.master_of_harmony.purified_spirit_heal, this ); damage->add_child( purified_spirit ); } @@ -6652,10 +6726,8 @@ action_t *monk_t::create_action( util::string_view name, util::string_view optio return new crackling_jade_lightning_t( this, options_str ); if ( name == "tiger_palm" ) return new tiger_palm_t( this, options_str ); - if ( name == "blackout_kick" && user_options.sef_beta ) - return new sef_action_t( this, "blackout_kick", options_str ); if ( name == "blackout_kick" ) - return new blackout_kick_t( this, "blackout_kick", options_str ); + return new blackout_kick_t( this, options_str ); if ( name == "expel_harm" ) return new expel_harm_t( this, options_str ); if ( name == "leg_sweep" ) @@ -9010,9 +9082,9 @@ void monk_t::copy_from( player_t *source ) } // monk_t::copy_from ========================================================= -action_t *monk_t::find_action( int id ) +action_t *monk_t::find_action( unsigned int id ) const { - for ( const action_t *action : action_list ) + for ( action_t *action : action_list ) if ( id == action->id ) return action; return nullptr; diff --git a/engine/class_modules/monk/sc_monk.hpp b/engine/class_modules/monk/sc_monk.hpp index cb714ff00a5..19a0c2fa815 100644 --- a/engine/class_modules/monk/sc_monk.hpp +++ b/engine/class_modules/monk/sc_monk.hpp @@ -83,9 +83,14 @@ enum class sef_ability_e SEF_MAX }; -template +template +struct sef_actions_t; + +template struct monk_action_t : public parse_action_effects_t { + using derived_t = Base; + using base_t = parse_action_effects_t; sef_ability_e sef_ability; bool ww_mastery; bool may_combo_strike; @@ -93,13 +98,12 @@ struct monk_action_t : public parse_action_effects_t bool cast_during_sck; bool track_cd_waste; + sef_actions_t *sef_actions; + private: std::array _resource_by_stance; public: - using derived_t = Base; - using base_t = parse_action_effects_t; - template monk_action_t( Args &&...args ); std::string full_name() const; @@ -149,28 +153,32 @@ struct monk_action_t : public parse_action_effects_t void trigger_mystic_touch( action_state_t *state ); }; -struct monk_spell_t : public monk_action_t +template +struct monk_spell_t : public monk_action_t { - using base_t = monk_action_t; + using base_t = monk_action_t; monk_spell_t( monk_t *player, std::string_view name, const spell_data_t *spell_data = spell_data_t::nil() ); }; -struct monk_heal_t : public monk_action_t +template +struct monk_heal_t : public monk_action_t { - using base_t = monk_action_t; + using base_t = monk_action_t; monk_heal_t( monk_t *player, std::string_view name, const spell_data_t *spell_data = spell_data_t::nil() ); double action_multiplier() const override; }; -struct monk_absorb_t : public monk_action_t +template +struct monk_absorb_t : public monk_action_t { - using base_t = monk_action_t; + using base_t = monk_action_t; monk_absorb_t( monk_t *player, std::string_view name, const spell_data_t *spell_data = spell_data_t::nil() ); }; -struct monk_melee_attack_t : public monk_action_t +template +struct monk_melee_attack_t : public monk_action_t { - using base_t = monk_action_t; + using base_t = monk_action_t; monk_melee_attack_t( monk_t *player, std::string_view name, const spell_data_t *spell_data = spell_data_t::nil() ); result_amount_type amount_type( const action_state_t *state, bool periodic ) const override; }; @@ -194,7 +202,7 @@ struct monk_buff_t : public buff_t void expire_override( int expiration_stacks, timespan_t remaining_duration ) override; }; -struct summon_pet_t : public monk_spell_t +struct summon_pet_t : public monk_spell_t<> { timespan_t summoning_duration; std::string_view pet_name; @@ -242,7 +250,7 @@ struct gift_of_the_ox_t : actions::monk_buff_t * TODO: * - Check which spell id is triggered by expire and by trigger orb */ - struct orb_t : actions::monk_heal_t + struct orb_t : actions::monk_heal_t { orb_t( monk_t *player, std::string_view name, const spell_data_t *spell_data ); @@ -498,6 +506,7 @@ struct monk_t : public stagger_t int flurry_strikes_energy; double flurry_strikes_damage; bool freeze_expiration; + bool freeze_buffs; //============================================== // Monk Movement @@ -1394,7 +1403,8 @@ struct monk_t : public stagger_t void reset() override; void create_options() override; void copy_from( player_t * ) override; - action_t *find_action( int id ); + using player_t::find_action; + action_t *find_action( unsigned int id ) const; resource_e primary_resource() const override; role_e primary_role() const override; stat_e convert_hybrid_stat( stat_e s ) const override; diff --git a/engine/class_modules/monk/sc_monk_pets.cpp b/engine/class_modules/monk/sc_monk_pets.cpp index f609d806bba..4c078ff1183 100644 --- a/engine/class_modules/monk/sc_monk_pets.cpp +++ b/engine/class_modules/monk/sc_monk_pets.cpp @@ -377,7 +377,7 @@ struct storm_earth_and_fire_pet_t : public monk_pet_t base_t::callbacks = false; } - double base_cost() override + double base_cost() const override { return 0.0; } @@ -387,10 +387,10 @@ struct storm_earth_and_fire_pet_t : public monk_pet_t base_t::init(); // Look up source action based on id, falling back to name if not found. - if ( action_t *action = find_action( base_t::id ) ) + if ( action_t *action = base_t::o()->find_action( base_t::id ) ) source_action = action; else - source_action = find_action( base_t::name_str ); + source_action = base_t::o()->find_action( base_t::name_str ); if ( !source_action ) return; @@ -479,6 +479,7 @@ struct storm_earth_and_fire_pet_t : public monk_pet_t struct sef_melee_attack_t : public sef_action_base_t { + using base_t = sef_action_base_t; sef_melee_attack_t( util::string_view n, storm_earth_and_fire_pet_t *p, const spell_data_t *data = spell_data_t::nil() ) : base_t( n, p, data ) @@ -503,6 +504,7 @@ struct storm_earth_and_fire_pet_t : public monk_pet_t struct sef_spell_t : public sef_action_base_t { + using base_t = sef_action_base_t; sef_spell_t( util::string_view n, storm_earth_and_fire_pet_t *p, const spell_data_t *data = spell_data_t::nil() ) : base_t( n, p, data ) {