Skip to content

Commit

Permalink
[Shaman] Add option to control Enhancement TWW1 4pc with Flowing Spirits
Browse files Browse the repository at this point in the history
shaman.tww1_4pc_flowing_spirits_chance [0..1] (default 1.0) defines the
chance that the set bonus spawns an additional wolf with when Flowing
Spirits procs.
  • Loading branch information
navv1234 committed Mar 1, 2025
1 parent c5ac8d7 commit c1559c6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions engine/class_modules/sc_shaman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ struct shaman_t : public parse_player_effects_t
// 11.1 Flowing Spirits proc modeling tweaks
unsigned flowing_spirits_procs = 3; // Number of Flowing Spirits procs in a shuffled rng
unsigned flowing_spirits_total = 30; // Number of total draws in Flowing Spirits shuffled rng
double tww1_4pc_flowing_spirits_chance = 1.0; // Chance to summon an additional wolf
} options;

// Cooldowns
Expand Down Expand Up @@ -11618,6 +11619,8 @@ void shaman_t::create_options()
options.flowing_spirits_procs, 0, std::numeric_limits<unsigned>::max() ) );
add_option( opt_uint( "shaman.flowing_spirits_total",
options.flowing_spirits_total, 0, std::numeric_limits<unsigned>::max() ) );
add_option( opt_float( "shaman.tww1_4pc_flowing_spirits_chance",
options.tww1_4pc_flowing_spirits_chance, 0.0, 1.0 ) );
}

// shaman_t::create_profile ================================================
Expand Down Expand Up @@ -11671,6 +11674,7 @@ void shaman_t::copy_from( player_t* source )

options.flowing_spirits_procs = p->options.flowing_spirits_procs;
options.flowing_spirits_total = p->options.flowing_spirits_total;
options.tww1_4pc_flowing_spirits_chance = p->options.tww1_4pc_flowing_spirits_chance;
}

// shaman_t::create_special_effects ========================================
Expand Down Expand Up @@ -13487,8 +13491,12 @@ void shaman_t::trigger_flowing_spirits( const action_state_t* state, bool windfu
return;
}

auto n_summons = 1U +
as<unsigned>( sets->set( SHAMAN_ENHANCEMENT, TWW1, B4 )->effectN( 1 ).base_value() );
auto n_summons = 1U;
if ( rng().roll( options.tww1_4pc_flowing_spirits_chance ) )
{
n_summons += as<unsigned>(
sets->set( SHAMAN_ENHANCEMENT, TWW1, B4 )->effectN( 1 ).base_value() );
}
unsigned record_index = active_flowing_spirits_proc * n_summons;

if ( flowing_spirits_procs.size() <= record_index )
Expand Down

0 comments on commit c1559c6

Please sign in to comment.