Skip to content

Commit

Permalink
[Gear] Legendary Roaring Warqueens/Skippers fix
Browse files Browse the repository at this point in the history
* add personal_estimate_skippers_group_benefit. When true this will stop
  faking the gain from others on yourself and instead trigger your gem a
  singular time and 3 lightning gems every single time Skippers triggers
  Roaring War Queens.
 * This behaviour is also the way Roaring War Queen works on estimation
   mode now as well, except obviously in that case your gem isn't valid
   so it would do 4x Lightning hits.
  • Loading branch information
Saeldur committed Dec 17, 2024
1 parent b4fb2c9 commit 5f624b1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
2 changes: 2 additions & 0 deletions engine/player/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12854,6 +12854,8 @@ void player_t::create_options()
thewarwithin_opts.estimate_roaring_warqueens_citrine ) );
add_option( opt_bool( "thewarwithin.force_estimate_skippers_group_benefit",
thewarwithin_opts.force_estimate_skippers_group_benefit ) );
add_option( opt_bool( "thewarwithin.personal_estimate_skippers_group_benefit",
thewarwithin_opts.personal_estimate_skippers_group_benefit ) );
add_option( opt_bool( "thewarwithin.estimate_skippers_group_benefit",
thewarwithin_opts.estimate_skippers_group_benefit ) );
add_option( opt_float( "thewarwithin.estimate_skippers_group_members",
Expand Down
1 change: 1 addition & 0 deletions engine/player/player.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,7 @@ struct player_t : public actor_t
player_option_t<std::string> windsingers_passive_stat = "";
bool estimate_roaring_warqueens_citrine = false;
bool force_estimate_skippers_group_benefit = false;
bool personal_estimate_skippers_group_benefit = false;
bool estimate_skippers_group_benefit = true;
double estimate_skippers_group_members = 4;
} thewarwithin_opts;
Expand Down
26 changes: 18 additions & 8 deletions engine/player/unique_gear_thewarwithin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6362,26 +6362,26 @@ struct roaring_warqueen_citrine_t : public spell_t

target_specific_t<citrine_data_t> citrine_data;
bool estimate_group_value;
action_t* thunder_gem;

roaring_warqueen_citrine_t( const special_effect_t& e )
: spell_t( "roaring_warqueens_citrine", e.player, e.player->find_spell( 462964 ) ),
citrine_data{ true },
estimate_group_value( e.player->thewarwithin_opts.estimate_roaring_warqueens_citrine )
estimate_group_value( e.player->thewarwithin_opts.estimate_roaring_warqueens_citrine ),
thunder_gem( create_citrine_action( e, THUNDERLORDS_CRACKLING_CITRINE ) )
{
background = true;
aoe = as<int>( e.player->find_spell( ROARING_WARQUEENS_CITRINE )->effectN( 2 ).base_value() );

citrine_data[ player ] = new citrine_data_t();
citrine_data[ player ]->gem_type = gem_type_t::ACTION;
citrine_data[ player ]->action = create_citrine_action( e, THUNDERLORDS_CRACKLING_CITRINE );
setup_ally_gem( player );
}

void setup_ally_gem( player_t* t )
{
if ( citrine_data[ t ] )
return;

if ( t->is_pet() || t->is_enemy() || t == player )
if ( t->is_pet() || t->is_enemy() )
return;

citrine_data[ t ] = new citrine_data_t();
Expand Down Expand Up @@ -6489,15 +6489,24 @@ struct roaring_warqueen_citrine_t : public spell_t
void impact( action_state_t* s ) override
{
spell_t::impact( s );
trigger_ally_gem( s->target, estimate_group_value );

if ( s->target != player || s->chain_target == 0 )
{
trigger_ally_gem( s->target, estimate_group_value );
}

if ( s->target == player && ( s->chain_target > 0 || citrine_data[ player ]->gem_type == gem_type_t::NONE ) )
{
thunder_gem->execute();
}
}

void execute() override
{
bool skippers_estimate = player->thewarwithin_opts.estimate_skippers_group_benefit &&
( player->sim->single_actor_batch || player->sim->player_no_pet_list.size() == 1 );
// Base of 1 + small epsilon to avoid rounding errors.
if ( base_multiplier > 1.001 &&
if ( base_multiplier > 1.001 && player->thewarwithin_opts.personal_estimate_skippers_group_benefit &&
( player->thewarwithin_opts.force_estimate_skippers_group_benefit || skippers_estimate ) )
{
bool old_group_value = estimate_group_value;
Expand Down Expand Up @@ -7060,7 +7069,8 @@ void legendary_skippers_citrine( special_effect_t& effect )

effect.player->register_combat_begin( [ cb ]( player_t* p ) {
if ( ( !p->sim->single_actor_batch && p->sim->player_no_pet_list.size() > 1 ) &&
!p->thewarwithin_opts.force_estimate_skippers_group_benefit )
!p->thewarwithin_opts.force_estimate_skippers_group_benefit ||
p->thewarwithin_opts.personal_estimate_skippers_group_benefit )
cb->deactivate();
} );
}
Expand Down

0 comments on commit 5f624b1

Please sign in to comment.