@@ -3895,10 +3895,7 @@ struct arcane_shot_t : public arcane_shot_base_t
3895
3895
if ( aspect_of_the_hydra )
3896
3896
{
3897
3897
auto tl = target_list ();
3898
- if ( target_list ().size () > 1 )
3899
- aspect_of_the_hydra->execute_on_target ( tl[1 ] );
3900
- else
3901
- aspect_of_the_hydra->execute_on_target ( target );
3898
+ aspect_of_the_hydra->execute_on_target ( tl[ tl.size () > 1 ? 1 : 0 ] );
3902
3899
}
3903
3900
}
3904
3901
};
@@ -4408,27 +4405,21 @@ struct black_arrow_t final : public black_arrow_base_t
4408
4405
withering_fire_t ( util::string_view n, hunter_t * p ) : black_arrow_base_t ( n, p, p->talents.withering_fire_black_arrow )
4409
4406
{
4410
4407
background = dual = true ;
4411
- aoe = as<int >( p->talents .withering_fire ->effectN ( 3 ).base_value () );
4412
4408
}
4413
4409
4414
4410
// Ignore Kill Shot target count mods
4415
4411
int n_targets () const override
4416
4412
{
4417
- return aoe;
4418
- }
4419
-
4420
- size_t available_targets ( std::vector<player_t *>& tl ) const override
4421
- {
4422
- black_arrow_base_t::available_targets ( tl );
4423
-
4424
- // Cannot hit the original target.
4425
- range::erase_remove ( tl, target );
4426
-
4427
- return tl.size ();
4413
+ return 1 ;
4428
4414
}
4429
4415
};
4430
4416
4431
- withering_fire_t * withering_fire = nullptr ;
4417
+ struct
4418
+ {
4419
+ int count = 0 ;
4420
+ withering_fire_t * action = nullptr ;
4421
+ } withering_fire;
4422
+
4432
4423
double lower_health_threshold_pct;
4433
4424
double upper_health_threshold_pct;
4434
4425
@@ -4442,8 +4433,9 @@ struct black_arrow_t final : public black_arrow_base_t
4442
4433
4443
4434
if ( p->talents .withering_fire .ok () )
4444
4435
{
4445
- withering_fire = p->get_background_action <withering_fire_t >( " black_arrow_withering_fire" );
4446
- add_child ( withering_fire );
4436
+ withering_fire.count = as<int >( p->talents .withering_fire ->effectN ( 3 ).base_value () );
4437
+ withering_fire.action = p->get_background_action <withering_fire_t >( " black_arrow_withering_fire" );
4438
+ add_child ( withering_fire.action );
4447
4439
}
4448
4440
}
4449
4441
@@ -4455,7 +4447,11 @@ struct black_arrow_t final : public black_arrow_base_t
4455
4447
p ()->trigger_deathblow ( target );
4456
4448
4457
4449
if ( p ()->buffs .withering_fire ->up () )
4458
- withering_fire->execute_on_target ( target );
4450
+ {
4451
+ auto tl = target_list ();
4452
+ withering_fire.action ->execute_on_target ( tl[ tl.size () > 1 ? 1 : 0 ] );
4453
+ withering_fire.action ->execute_on_target ( tl[ tl.size () > 2 ? 2 : 0 ] );
4454
+ }
4459
4455
}
4460
4456
4461
4457
void impact ( action_state_t * s ) override
@@ -4477,7 +4473,7 @@ struct black_arrow_t final : public black_arrow_base_t
4477
4473
( candidate_target->health_percentage () <= lower_health_threshold_pct ||
4478
4474
( p ()->bugs && candidate_target->health_percentage () >= upper_health_threshold_pct ) ||
4479
4475
( p ()->talents .the_bell_tolls .ok () && candidate_target->health_percentage () >= upper_health_threshold_pct ) ||
4480
- p ()->buffs .deathblow ->check () );
4476
+ p ()->buffs .deathblow ->check () || p ()-> buffs . withering_fire -> check () );
4481
4477
}
4482
4478
};
4483
4479
@@ -5353,10 +5349,7 @@ struct aimed_shot_t : public aimed_shot_base_t
5353
5349
if ( aspect_of_the_hydra )
5354
5350
{
5355
5351
auto tl = target_list ();
5356
- if ( target_list ().size () > 1 )
5357
- aspect_of_the_hydra->execute_on_target ( tl[1 ] );
5358
- else
5359
- aspect_of_the_hydra->execute_on_target ( target );
5352
+ aspect_of_the_hydra->execute_on_target ( tl[ tl.size () > 1 ? 1 : 0 ] );
5360
5353
}
5361
5354
5362
5355
if ( double_tap && p ()->buffs .double_tap ->up () )
@@ -5441,16 +5434,6 @@ struct aimed_shot_t : public aimed_shot_base_t
5441
5434
5442
5435
struct rapid_fire_t : public hunter_spell_t
5443
5436
{
5444
- struct state_data_t
5445
- {
5446
- bool double_tap = false ;
5447
-
5448
- friend void sc_format_to ( const state_data_t & data, fmt::format_context::iterator out ) {
5449
- fmt::format_to ( out, " double_tap={:d}" , data.double_tap );
5450
- }
5451
- };
5452
- using state_t = hunter_action_state_t <state_data_t >;
5453
-
5454
5437
struct rapid_fire_tick_t : public hunter_ranged_attack_t
5455
5438
{
5456
5439
const int trick_shots_targets;
@@ -5561,10 +5544,7 @@ struct rapid_fire_t: public hunter_spell_t
5561
5544
if ( aspect_of_the_hydra )
5562
5545
{
5563
5546
auto tl = target_list ();
5564
- if ( target_list ().size () > 1 )
5565
- aspect_of_the_hydra->execute_on_target ( tl[1 ] );
5566
- else
5567
- aspect_of_the_hydra->execute_on_target ( target );
5547
+ aspect_of_the_hydra->execute_on_target ( tl[ tl.size () > 1 ? 1 : 0 ] );
5568
5548
}
5569
5549
}
5570
5550
@@ -5583,7 +5563,7 @@ struct rapid_fire_t: public hunter_spell_t
5583
5563
double num_ticks = base_num_ticks - 1 ;
5584
5564
5585
5565
if ( p ()->buffs .double_tap ->check () )
5586
- num_ticks *= p ()->talents .double_tap_buff ->effectN ( 3 ).percent ();
5566
+ num_ticks *= 1 + p ()->talents .double_tap_buff ->effectN ( 3 ).percent ();
5587
5567
5588
5568
timespan_t base_duration = num_ticks * tick_time ( s );
5589
5569
@@ -5601,7 +5581,6 @@ struct rapid_fire_t: public hunter_spell_t
5601
5581
5602
5582
double energize_cast_regen ( const action_state_t * ) const override
5603
5583
{
5604
- // XXX: Not exactly true for Nesingwary's / Trueshot because the buff can fall off mid-channel. Meh
5605
5584
return base_num_ticks * damage -> composite_energize_amount ( nullptr );
5606
5585
}
5607
5586
@@ -5614,17 +5593,6 @@ struct rapid_fire_t: public hunter_spell_t
5614
5593
5615
5594
return m;
5616
5595
}
5617
-
5618
- action_state_t * new_state () override
5619
- {
5620
- return new state_t ( this , target );
5621
- }
5622
-
5623
- void snapshot_state ( action_state_t * s, result_amount_type type ) override
5624
- {
5625
- hunter_spell_t::snapshot_state ( s, type );
5626
- debug_cast<state_t *>( s ) -> double_tap = p () -> buffs.double_tap -> up ();
5627
- }
5628
5596
};
5629
5597
5630
5598
// ==============================
0 commit comments