Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct seed_of_corruption_t : public affliction_spell_t
- {
- struct seed_of_corruption_aoe_t : public affliction_spell_t
- {
- bool deathbloom; //azerite_trait
- seed_of_corruption_aoe_t( warlock_t* p ) :
- affliction_spell_t( "seed_of_corruption_aoe", p, p -> find_spell( 27285 ) )
- {
- aoe = -1;
- dual = true;
- background = true;
- deathbloom = false;
- p->spells.seed_of_corruption_aoe = this;
- }
- double bonus_da(const action_state_t* s) const override
- {
- double da = affliction_spell_t::bonus_da(s);
- if(deathbloom)
- da += p()->azerite.deathbloom.value();
- return da;
- }
- void impact( action_state_t* s ) override
- {
- affliction_spell_t::impact( s );
- if ( result_is_hit( s->result ) )
- {
- warlock_td_t* tdata = this->td( s->target );
- if ( tdata->dots_seed_of_corruption->is_ticking() && tdata->soc_threshold > 0 )
- {
- tdata->soc_threshold = 0;
- tdata->dots_seed_of_corruption->cancel();
- }
- }
- }
- };
- double threshold_mod;
- double sow_the_seeds_targets;
- seed_of_corruption_aoe_t* explosion;
- seed_of_corruption_t( warlock_t* p, const std::string& options_str ) :
- affliction_spell_t( "seed_of_corruption", p, p -> find_spell( 27243 ) ),
- threshold_mod( 3.0 ),
- sow_the_seeds_targets( p->talents.sow_the_seeds->effectN( 1 ).base_value() ),
- explosion( new seed_of_corruption_aoe_t( p ) )
- {
- parse_options( options_str );
- may_crit = false;
- base_tick_time = dot_duration;
- hasted_ticks = false;
- add_child( explosion );
- if ( p->talents.sow_the_seeds->ok() )
- aoe = 2;
- }
- void init() override
- {
- affliction_spell_t::init();
- snapshot_flags |= STATE_SP;
- }
- void execute() override
- {
- if ( p()->sets->has_set_bonus( WARLOCK_AFFLICTION, T21, B4 ) )
- p()->active.tormented_agony->schedule_execute();
- affliction_spell_t::execute();
- }
- void impact( action_state_t* s ) override
- {
- if ( result_is_hit( s->result ) )
- {
- td( s->target )->soc_threshold = s->composite_spell_power();
- }
- assert(p()->active.corruption);
- p()->active.corruption->target = s->target;
- p()->active.corruption->schedule_execute();
- affliction_spell_t::impact( s );
- }
- void last_tick( dot_t* d ) override
- {
- affliction_spell_t::last_tick( d );
- if (!d->end_event) {
- explosion->deathbloom = true;
- }
- explosion->target = d->target;
- explosion->execute();
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment