Skip to content

Commit

Permalink
[Vengeance] add TWW2 4pc
Browse files Browse the repository at this point in the history
  • Loading branch information
ToppleTheNun committed Jan 1, 2025
1 parent d18dadb commit c63ee5b
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions engine/class_modules/sc_demon_hunter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@ class demon_hunter_t : public parse_player_effects_t
// Set Bonuses
proc_t* soul_fragment_from_vengeance_twws1_2pc;
proc_t* metamorphosis_from_tww2_vengeance_2pc;
proc_t* the_hunt_reset_from_tww2_vengeance_4pc;
} proc;

// RPPM objects
Expand Down Expand Up @@ -6923,6 +6924,27 @@ struct fel_barrage_buff_t : public demon_hunter_buff_t<buff_t>
}
};

struct luck_of_the_draw_buff_t : public demon_hunter_buff_t<buff_t>
{
luck_of_the_draw_buff_t( demon_hunter_t* p )
: base_t( *p, "luck_of_the_draw", p->set_bonuses.tww2_vengeance_2pc->effectN( 1 ).trigger() )
{
base_t::set_default_value_from_effect_type( A_ADD_PCT_MODIFIER );
}

void bump( int stacks, double value ) override
{
buff_t::bump( stacks, value );

if ( p()->talent.demon_hunter.the_hunt->ok() && p()->set_bonuses.tww2_vengeance_4pc->ok() &&
rng().roll( p()->set_bonuses.tww2_vengeance_4pc->effectN( 1 ).percent() ) )
{
p()->cooldown.the_hunt->reset( true );
p()->proc.the_hunt_reset_from_tww2_vengeance_4pc->occur();
}
}
};

} // end namespace buffs

// Namespace Actions post buffs
Expand Down Expand Up @@ -7495,8 +7517,7 @@ void demon_hunter_t::create_buffs()
: spell_data_t::not_found() )
->set_default_value_from_effect_type( A_ADD_PCT_MODIFIER, P_GENERIC );

buff.luck_of_the_draw = make_buff( this, "luck_of_the_draw", set_bonuses.tww2_vengeance_2pc->effectN( 1 ).trigger() )
->set_default_value_from_effect_type( A_ADD_PCT_MODIFIER );
buff.luck_of_the_draw = make_buff<buffs::luck_of_the_draw_buff_t>( this );
}

struct metamorphosis_adjusted_cooldown_expr_t : public expr_t
Expand Down Expand Up @@ -7829,6 +7850,7 @@ void demon_hunter_t::init_procs()
// Set Bonuses
proc.soul_fragment_from_vengeance_twws1_2pc = get_proc( "soul_fragment_from_vengeance_twws1_2pc" );
proc.metamorphosis_from_tww2_vengeance_2pc = get_proc( "metamorphosis_from_tww2_vengeance_2pc" );
proc.the_hunt_reset_from_tww2_vengeance_4pc = get_proc( "the_hunt_reset_from_tww2_vengeance_4pc" );
}

// demon_hunter_t::init_uptimes =============================================
Expand Down

0 comments on commit c63ee5b

Please sign in to comment.