Navigation Menu

Skip to content

Commit

Permalink
[Gear] Initial implementation of Dream's End
Browse files Browse the repository at this point in the history
  • Loading branch information
gastank committed Jul 9, 2019
1 parent 3f3bf8f commit b12d89f
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
3 changes: 3 additions & 0 deletions engine/player/sc_player.cpp
Expand Up @@ -3292,6 +3292,9 @@ double player_t::composite_melee_speed() const
if ( buffs.galeforce_striking && buffs.galeforce_striking->check() )
h *= 1.0 / ( 1.0 + buffs.galeforce_striking->check_value() );

if ( buffs.delirious_frenzy && buffs.delirious_frenzy->check() )
h *= 1.0 / ( 1.0 + buffs.delirious_frenzy->check_stack_value() );

return h;
}

Expand Down
36 changes: 36 additions & 0 deletions engine/player/sc_unique_gear_x7.cpp
Expand Up @@ -182,6 +182,7 @@ namespace items
void ashvanes_razor_coral( special_effect_t& );
void dribbling_inkpod( special_effect_t& );
void reclaimed_shock_coil( special_effect_t& );
void dreams_end( special_effect_t& );
// 8.2.0 - Rise of Azshara Punchcards
void yellow_punchcard( special_effect_t& );
void subroutine_overclock( special_effect_t& );
Expand Down Expand Up @@ -4191,6 +4192,40 @@ void items::reclaimed_shock_coil( special_effect_t& effect )
new dbc_proc_callback_t( effect.player, effect );
}

// Dream's End ============================================================
// TODO: Figure out details of how the attack speed buff stacks with other haste.

void items::dreams_end( special_effect_t& effect )
{
struct delirious_frenzy_cb_t : public dbc_proc_callback_t
{
player_t* target;

delirious_frenzy_cb_t( const special_effect_t& e ) : dbc_proc_callback_t( e.player, e )
{}

void execute( action_t*, action_state_t* s ) override
{
if ( !target || target != s->target ) // new target
{
target = s->target;
listener->buffs.delirious_frenzy->expire(); // cancel buff, restart below
}

listener->buffs.delirious_frenzy->trigger();
}
};

if ( !effect.player->buffs.delirious_frenzy )
{
effect.player->buffs.delirious_frenzy = make_buff( effect.player, "delirious_frenzy", effect.trigger() )
->set_default_value( effect.trigger()->effectN( 1 ).percent() )
->add_invalidate( CACHE_ATTACK_SPEED );
}

new delirious_frenzy_cb_t( effect );
}

// Punchcard stuff ========================================================

item_t init_punchcard( const special_effect_t& effect )
Expand Down Expand Up @@ -5149,6 +5184,7 @@ void unique_gear::register_special_effects_bfa()
register_special_effect( 296963, items::dribbling_inkpod );
register_special_effect( 300142, items::hyperthread_wristwraps );
register_special_effect( 301753, items::reclaimed_shock_coil );
register_special_effect( 303356, items::dreams_end );
// 8.2 Mechagon combo rings
register_special_effect( 300124, items::logic_loop_of_division );
register_special_effect( 300125, items::logic_loop_of_recursion );
Expand Down
1 change: 1 addition & 0 deletions engine/simulationcraft.hpp
Expand Up @@ -3901,6 +3901,7 @@ struct player_t : public actor_t
// 8.2 misc
buff_t* damage_to_aberrations; // Benthic belt special effect
buff_t* fathom_hunter; // Follower themed Benthic boots special effect
buff_t* delirious_frenzy; // Dream's End 1H STR axe attack speed buff
} buffs;

struct debuffs_t
Expand Down

0 comments on commit b12d89f

Please sign in to comment.