Skip to content

Commit

Permalink
[Warlock] add Malefic Rapture usage stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorovon committed Jan 23, 2021
1 parent 9f8ad07 commit 0b7e093
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 22 deletions.
7 changes: 4 additions & 3 deletions engine/class_modules/warlock/sc_warlock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct warlock_td_t : public actor_target_data_t

propagate_const<buff_t*> debuffs_shadowburn;
propagate_const<buff_t*> debuffs_eradication;
propagate_const<buff_t*> debuffs_roaring_blaze;
propagate_const<buff_t*> debuffs_roaring_blaze;
propagate_const<buff_t*> debuffs_havoc;

// SL - Legendary
Expand Down Expand Up @@ -415,7 +415,7 @@ struct warlock_t : public player_t
const spell_data_t* conflagrate_2; //Rank 2 passive (increased charges)
const spell_data_t* firebolt; //TODO: SL Beta - Pet spell? Does not appear in specialization data
const spell_data_t* havoc; //This is the primary active ability
//TODO: SL Beta - debuffs_havoc is currently referencing the spellID directly for rank 2, fix or remove.
//TODO: SL Beta - debuffs_havoc is currently referencing the spellID directly for rank 2, fix or remove.
const spell_data_t* havoc_2; //Rank 2 passive (increased duration)
const spell_data_t* immolate; //TODO: SL Beta - this is supposed to be the primary active ability but is not being used at the moment - fix this
const spell_data_t* rain_of_fire_2; //Rank 2 passive (increased damage)
Expand Down Expand Up @@ -546,6 +546,7 @@ struct warlock_t : public player_t
proc_t* nightfall;
proc_t* corrupting_leer;
proc_t* malefic_wrath;
std::vector<proc_t*> malefic_rapture;

// demo
proc_t* demonic_calling;
Expand Down Expand Up @@ -773,7 +774,7 @@ struct borrowed_power_event_t : public player_event_t
pl->sim->print_log( "Borrowed power proc occurred for Warlock {}, refunding {} soul shards.", pl->name(), shards_used );
pl->resource_gain( RESOURCE_SOUL_SHARD, shards_used, shard_gain );
pl->procs.mark_of_borrowed_power->occur();
}
}
}
};

Expand Down
46 changes: 27 additions & 19 deletions engine/class_modules/warlock/sc_warlock_affliction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct affliction_spell_t : public warlock_spell_t
double composite_da_multiplier( const action_state_t* s ) const override
{
double pm = warlock_spell_t::composite_da_multiplier( s );

if ( this->data().affected_by( p()->mastery_spells.potent_afflictions->effectN( 2 ) ) )
{
pm *= 1.0 + p()->cache.mastery_value();
Expand Down Expand Up @@ -194,11 +194,11 @@ struct agony_t : public affliction_spell_t

//There is TECHNICALLY a prepatch bug on PTR (as of 9/23) where having both the talent and the azerite starts at 3 stacks
//Making a note of it here in this comment but not going to implement it at this time
if ( p()->talents.writhe_in_agony->ok() && td( execute_state->target )->dots_agony->current_stack() <
if ( p()->talents.writhe_in_agony->ok() && td( execute_state->target )->dots_agony->current_stack() <
(int)p()->talents.writhe_in_agony->effectN( 3 ).base_value() )
{
td ( execute_state->target )
->dots_agony->increment( (int)p()->talents.writhe_in_agony->effectN( 3 ).base_value() -
->dots_agony->increment( (int)p()->talents.writhe_in_agony->effectN( 3 ).base_value() -
td( execute_state->target )->dots_agony->current_stack() );
}
else if ( p()->azerite.sudden_onset.ok() && td( execute_state->target )->dots_agony->current_stack() <
Expand Down Expand Up @@ -292,12 +292,12 @@ struct corruption_t : public affliction_spell_t
tick_zero = false;
pandemic_invocation_usable = false; // BFA - Azerite


if ( !p->spec.corruption_3->ok() || seed_action )
{
spell_power_mod.direct = 0; //Rank 3 is required for direct damage
}


spell_power_mod.tick = data().effectN( 1 ).trigger()->effectN( 1 ).sp_coeff();
base_tick_time = data().effectN( 1 ).trigger()->effectN( 1 ).period();
Expand All @@ -320,19 +320,19 @@ struct corruption_t : public affliction_spell_t
{
base_execute_time *= 1.0 * p->spec.corruption_2->effectN( 1 ).percent();
}

affected_by_woc = true; //Hardcoding this in for now because of how this spell is hacked together!
}

void tick( dot_t* d ) override
{
if ( result_is_hit( d->state->result ) && p()->talents.nightfall->ok() )
{
// TOCHECK regularly.
// Blizzard did not publicly release how nightfall was changed.
// We determined this is the probable functionality copied from Agony by first confirming the
// TOCHECK regularly.
// Blizzard did not publicly release how nightfall was changed.
// We determined this is the probable functionality copied from Agony by first confirming the
// DR formula was the same and then confirming that you can get procs on 1st tick.
// The procs also have a regularity that suggest it does not use a proc chance or rppm.
// The procs also have a regularity that suggest it does not use a proc chance or rppm.
// Last checked 09-28-2020.
double increment_max = 0.13;

Expand Down Expand Up @@ -439,14 +439,14 @@ struct unstable_affliction_t : public affliction_spell_t
}
};

struct summon_darkglare_t : public affliction_spell_t
struct summon_darkglare_t : public affliction_spell_t
{
summon_darkglare_t( warlock_t* p, util::string_view options_str )
: affliction_spell_t( "summon_darkglare", p, p->spec.summon_darkglare )
{
parse_options( options_str );
harmful = may_crit = may_miss = false;

cooldown->duration += timespan_t::from_millis( p->talents.dark_caller->effectN( 1 ).base_value() );

//PTR for prepatch presumably does additive CDR, then multiplicative
Expand Down Expand Up @@ -594,7 +594,7 @@ struct malefic_rapture_t : public affliction_spell_t
{
struct malefic_rapture_damage_instance_t : public affliction_spell_t
{
malefic_rapture_damage_instance_t( warlock_t *p, double spc ) :
malefic_rapture_damage_instance_t( warlock_t *p, double spc ) :
affliction_spell_t( "malefic_rapture_aoe", p, p->find_spell( 324540 ) )
{
aoe = 1;
Expand All @@ -604,7 +604,7 @@ struct malefic_rapture_t : public affliction_spell_t

p->spells.malefic_rapture_aoe = this;
}

double get_dots_ticking(player_t *target) const
{
double mult = 0.0;
Expand Down Expand Up @@ -645,14 +645,14 @@ struct malefic_rapture_t : public affliction_spell_t
double m = affliction_spell_t::composite_da_multiplier( s );
m *= get_dots_ticking( s->target );

if ( td( s->target )->dots_unstable_affliction->is_ticking() )
if ( td( s->target )->dots_unstable_affliction->is_ticking() )
{
m *= 1 + p()->conduit.focused_malignancy.percent();
m *= 1 + p()->conduit.focused_malignancy.percent();
}

return m;
}

void execute() override
{
if ( p()->legendary.malefic_wrath->ok() )
Expand All @@ -661,7 +661,15 @@ struct malefic_rapture_t : public affliction_spell_t
p()->procs.malefic_wrath->occur();
}

affliction_spell_t::execute();
int d = as<int>( get_dots_ticking( target ) );
if ( d > 0 )
{
for ( size_t i = p()->procs.malefic_rapture.size(); i < d; i++ )
p()->procs.malefic_rapture.push_back( p()->get_proc( "Malefic Rapture " + util::to_string( i + 1 ) ) );
p()->procs.malefic_rapture[ d - 1 ]->occur();
}

affliction_spell_t::execute();
}
};

Expand Down Expand Up @@ -946,7 +954,7 @@ void warlock_t::create_buffs_affliction()
->set_refresh_behavior( buff_refresh_behavior::DURATION );
buffs.malefic_wrath = make_buff( this, "malefic_wrath", find_spell( 337125 ) )->set_default_value_from_effect( 1 );
}

void warlock_t::vision_of_perfection_proc_aff()
{
timespan_t summon_duration = spec.summon_darkglare->duration() * vision_of_perfection_multiplier;
Expand Down

0 comments on commit 0b7e093

Please sign in to comment.