Skip to content
Open
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
42 changes: 38 additions & 4 deletions engine/class_modules/sc_death_knight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@ struct death_knight_t : public parse_player_effects_t
propagate_const<buff_t*> blightfall;
// Tier Sets
propagate_const<buff_t*> blighted;
propagate_const<buff_t*> relentless_riders_precision; // Blood MID2 4pc

// Rider of the Apocalypse
propagate_const<buff_t*> a_feast_of_souls;
Expand Down Expand Up @@ -1471,6 +1472,7 @@ struct death_knight_t : public parse_player_effects_t

// Blood Tier Set Spells
const spell_data_t* rejuvenating_blood; // 2pc rp gain
const spell_data_t* relentless_riders_precision_buff; // MID2 4pc

// Frost
const spell_data_t* runic_empowerment_gain;
Expand Down Expand Up @@ -9248,6 +9250,22 @@ struct death_and_decay_damage_t final : public death_and_decay_damage_base_t
}
};

// Blood MID2 4pc Empowered DnD damage (2x multiplier) when triggered by Crimson Scourge
struct death_and_decay_damage_empowered_t final : public death_and_decay_damage_base_t
{
death_and_decay_damage_empowered_t( std::string_view name, death_knight_t* p )
: death_and_decay_damage_base_t( name, p, p->spell.death_and_decay_damage )
{
}

double composite_da_multiplier( const action_state_t* s ) const override
{
double m = death_and_decay_damage_base_t::composite_da_multiplier( s );
m *= 2.0;
return m;
}
};

// Relish in Blood healing and RP generation
struct relish_in_blood_t final : public death_knight_heal_t
{
Expand All @@ -9273,7 +9291,7 @@ struct relish_in_blood_t final : public death_knight_heal_t
struct death_and_decay_base_t : public death_knight_spell_t
{
death_and_decay_base_t( death_knight_t* p, std::string_view name, const spell_data_t* spell )
: death_knight_spell_t( name, p, spell ), params(), damage( nullptr )
: death_knight_spell_t( name, p, spell ), params(), damage( nullptr ), damage_empowered( nullptr )
{
base_tick_time = dot_duration = 0_ms; // Handled by event
ignore_false_positive = true; // TODO: Is this necessary?
Expand Down Expand Up @@ -9336,6 +9354,8 @@ struct death_and_decay_base_t : public death_knight_spell_t
{
death_knight_spell_t::init_finished();
add_child( damage );
if ( damage_empowered )
add_child( damage_empowered );
}

double runic_power_generation_multiplier( const action_state_t* state ) const override
Expand All @@ -9354,18 +9374,23 @@ struct death_and_decay_base_t : public death_knight_spell_t
{
death_knight_spell_t::execute();

// Capture Crimson Scourge state before consumption for MID2 4pc empowered DnD
bool cs_was_up = p()->specialization() == DEATH_KNIGHT_BLOOD && p()->buffs.crimson_scourge->up();

// If bone shield isn't up, Relish in Blood doesn't heal or generate any RP
if ( p()->specialization() == DEATH_KNIGHT_BLOOD && p()->buffs.crimson_scourge->up() &&
p()->talent.blood.relish_in_blood.ok() && p()->buffs.bone_shield->up() )
if ( cs_was_up && p()->talent.blood.relish_in_blood.ok() && p()->buffs.bone_shield->up() )
{
// The heal's energize data automatically handles RP generation
relish_in_blood->execute();
}

if ( p()->specialization() == DEATH_KNIGHT_BLOOD && p()->buffs.crimson_scourge->up() )
if ( cs_was_up )
{
p()->buffs.crimson_scourge->decrement();

if ( p()->sets->has_set_bonus( DEATH_KNIGHT_BLOOD, MID2, B4 ) )
p()->buffs.relentless_riders_precision->trigger();

if ( p()->talent.blood.perseverance_of_the_ebon_blade.ok() )
p()->buffs.perseverance_of_the_ebon_blade->trigger();

Expand All @@ -9374,6 +9399,8 @@ struct death_and_decay_base_t : public death_knight_spell_t
}

init_params( target );
if ( cs_was_up && damage_empowered && p()->sets->has_set_bonus( DEATH_KNIGHT_BLOOD, MID2, B4 ) )
params.action( damage_empowered );
make_event<ground_aoe_event_t>( *sim, p(), params, true /* Immediate pulse */ );
}

Expand All @@ -9389,6 +9416,7 @@ struct death_and_decay_base_t : public death_knight_spell_t

public:
action_t* damage;
action_t* damage_empowered;
};

struct death_and_decay_t final : public death_and_decay_base_t
Expand All @@ -9397,6 +9425,7 @@ struct death_and_decay_t final : public death_and_decay_base_t
: death_and_decay_base_t( p, "death_and_decay", p->spec.death_and_decay )
{
damage = get_action<death_and_decay_damage_t>( "death_and_decay_damage", p );
damage_empowered = get_action<death_and_decay_damage_empowered_t>( "death_and_decay_damage_empowered", p );
parse_options( options_str );
}
};
Expand Down Expand Up @@ -14833,6 +14862,7 @@ void death_knight_t::spell_lookups()

// Blood Tier set spells
spell.rejuvenating_blood = conditional_spell_lookup( sets->has_set_bonus( DEATH_KNIGHT_BLOOD, MID1, B2 ), 1271198 );
spell.relentless_riders_precision_buff = conditional_spell_lookup( sets->has_set_bonus( DEATH_KNIGHT_BLOOD, MID2, B4 ), 1300369 );

// Frost
spell.murderous_efficiency_gain = conditional_spell_lookup( talent.frost.murderous_efficiency.ok(), 207062 );
Expand Down Expand Up @@ -15824,6 +15854,9 @@ void death_knight_t::create_buffs()
// Tier Sets
buffs.blighted =
make_fallback( sets->has_set_bonus( DEATH_KNIGHT_UNHOLY, MID1, B4 ), this, "blighted", spell.blighted_buff );

buffs.relentless_riders_precision =
make_fallback( sets->has_set_bonus( DEATH_KNIGHT_BLOOD, MID2, B4 ), this, "relentless_riders_precision", spell.relentless_riders_precision_buff );
}

// death_knight_t::init_gains ===============================================
Expand Down Expand Up @@ -16467,6 +16500,7 @@ void death_knight_t::apply_action_effects( action_t* a, bool pet )
action->parse_effects( buffs.sanguinary_burst );
action->parse_effects( buffs.hemostasis );
action->parse_effects( buffs.ossuary );
action->parse_effects( buffs.relentless_riders_precision );
break;
case DEATH_KNIGHT_FROST:
action->parse_effects( buffs.rime );
Expand Down
Loading