Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- virtual void tick( dot_t* d )
- {
- warlock_spell_t::tick( d );
- if ( p() -> spec.nightfall -> ok() && d -> state -> target == p() -> latest_corruption_target && ! periodic_hit ) //5.4 only the latest corruption procs it
- {
- double nightfall_chance = p() -> spec.nightfall -> effectN( 1 ).percent() / 10;
- if ( p() -> sets.has_set_bonus( WARLOCK_AFFLICTION, T17, B2 ) && td( d -> state -> target ) -> dots_drain_soul -> is_ticking() && td( d -> state -> target ) -> dots_agony -> is_ticking() && td( d -> state -> target ) -> dots_unstable_affliction -> is_ticking() ) //Caster Has T17 2pc and UA/Agony are ticking as well on the target
- {
- nightfall_chance += p() -> sets.set( WARLOCK_AFFLICTION, T17, B2 ) -> effectN( 1 ).percent();
- }
- if ( rng().roll( nightfall_chance ) )
- {
- if ( p() -> double_nightfall == 4 )
- {
- p() -> resource_gain( RESOURCE_SOUL_SHARD, 2, p() -> gains.nightfall );
- p() -> double_nightfall = 0;
- }
- else
- {
- p() -> resource_gain( RESOURCE_SOUL_SHARD, 1, p() -> gains.nightfall );
- ++p() -> double_nightfall;
- }
- // If going from 0 to 1 shard was a surprise, the player would have to react to it
- if ( p() -> resources.current[RESOURCE_SOUL_SHARD] == 1 )
- p() -> shard_react = p() -> sim -> current_time() + p() -> total_reaction_time();
- else if ( p() -> resources.current[RESOURCE_SOUL_SHARD] >= 1 )
- p() -> shard_react = p() -> sim -> current_time();
- else
- p() -> shard_react = timespan_t::max();
- if ( p() -> sets.has_set_bonus( WARLOCK_AFFLICTION, T17, B4 ) ) //if we ticked, then reduce time till next DS goes off CD by 10 seconds
- {
- timespan_t cd_reduction = p() -> sets.set( WARLOCK_AFFLICTION, T17, B4 ) -> effectN( 1 ).time_value();
- p() -> cooldowns.dark_soul -> adjust(- cd_reduction);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment