Skip to content

Commit

Permalink
[Warlock] Seeds of Their Demise (simulationcraft#9128)
Browse files Browse the repository at this point in the history
  • Loading branch information
Azevara authored Jul 28, 2024
1 parent 9386f27 commit bc1fe1c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
5 changes: 3 additions & 2 deletions engine/class_modules/warlock/sc_warlock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,8 @@ struct warlock_t : public player_t
player_talent_t hatefury_rituals;
player_talent_t bleakheart_tactics;

player_talent_t mark_of_xavius; // TODO: This is almost certainly bugged and applying to things it shouldn't in game like Wither for Affliction and Blackened Soul for both
player_talent_t seeds_of_their_demise;
player_talent_t mark_of_xavius; // TODO: This is almost certainly bugged and applying to Wither for Affliction
player_talent_t seeds_of_their_demise; // TODO: This still has data buffing Blackened Soul
player_talent_t mark_of_perotharn;

player_talent_t malevolence;
Expand Down Expand Up @@ -701,6 +701,7 @@ struct warlock_t : public player_t
// Hellcaller
proc_t* blackened_soul;
proc_t* bleakheart_tactics;
proc_t* seeds_of_their_demise;
} procs;

int initial_soul_shards;
Expand Down
25 changes: 23 additions & 2 deletions engine/class_modules/warlock/sc_warlock_actions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,20 @@ using namespace helpers;

if ( td( s->target )->dots_wither->current_stack() <= 1 )
make_event( *sim, 0_ms, [ this, s ] { td( s->target )->debuffs_blackened_soul->expire(); } );

double seeds_rng = 0.15;

if ( affliction() && p()->hero.seeds_of_their_demise.ok() && rng().roll( seeds_rng ) )
{
p()->buffs.tormented_crescendo->trigger();
p()->procs.seeds_of_their_demise->occur();
}

if ( destruction() && p()->hero.seeds_of_their_demise.ok() && rng().roll( seeds_rng ) )
{
p()->buffs.flashpoint->trigger( 2 );
p()->procs.seeds_of_their_demise->occur();
}
}
};

Expand Down Expand Up @@ -4068,9 +4082,16 @@ using namespace helpers;
p->procs.bleakheart_tactics->occur();
}

// TOCHECK: Chance for this effect is not in spell data!
if ( p->rng().roll( 0.1 ) )
bool collapse = p->hero.seeds_of_their_demise.ok() && target->health_percentage() <= p->hero.seeds_of_their_demise->effectN( 2 ).base_value() ;
collapse = collapse || p->hero.seeds_of_their_demise.ok() && tdata->dots_wither->current_stack() >= as<int>( p->hero.seeds_of_their_demise->effectN( 1 ).base_value() );

if ( collapse )
{
tdata->debuffs_blackened_soul->trigger();
}
else if ( p->rng().roll( 0.1 ) )
{
// TOCHECK: Chance for this effect is not in spell data!
tdata->debuffs_blackened_soul->trigger();
p->procs.blackened_soul->occur();
}
Expand Down
3 changes: 3 additions & 0 deletions engine/class_modules/warlock/sc_warlock_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,8 @@ namespace warlock
hero.bleakheart_tactics = find_talent_spell( talent_tree::HERO, "Bleakheart Tactics" ); // Should be ID 440051

hero.mark_of_xavius = find_talent_spell( talent_tree::HERO, "Mark of Xavius" ); // Should be ID 440046

hero.seeds_of_their_demise = find_talent_spell( talent_tree::HERO, "Seeds of Their Demise" ); // Should be ID 440055
}

void warlock_t::init_base_stats()
Expand Down Expand Up @@ -930,6 +932,7 @@ namespace warlock
{
procs.blackened_soul = get_proc( "blackened_soul" );
procs.bleakheart_tactics = get_proc( "bleakheart_tactics" );
procs.seeds_of_their_demise = get_proc( "seeds_of_their_demise" );
}

void warlock_t::init_rng()
Expand Down

0 comments on commit bc1fe1c

Please sign in to comment.