@@ -245,11 +245,17 @@ struct execution_sentence_t : public paladin_melee_attack_t
245245 }
246246};
247247
248+ struct expurgation_data_t
249+ {
250+ double damage_mult;
251+ };
248252struct expurgation_t : public paladin_spell_t
249253{
254+ using state_t = paladin_action_state_t <expurgation_data_t >;
250255 expurgation_t ( paladin_t * p ):
251256 paladin_spell_t ( " expurgation" , p, p->spells.expurgation )
252257 {
258+ background = true ;
253259 // Jurisdiction doesn't increase Expurgation's damage in-game
254260 // It's increasing Spell Direct Amount instead of Spell Periodic Amount
255261 if ( p->talents .jurisdiction ->ok () && p->bugs )
@@ -258,13 +264,23 @@ struct expurgation_t : public paladin_spell_t
258264 }
259265 }
260266
261- double get_bank ( dot_t * d )
267+ action_state_t * new_state () override
262268 {
263- if ( !d-> is_ticking () )
264- return 0.0 ;
269+ return new state_t ( this , target );
270+ }
265271
266- auto state = d->state ;
267- return calculate_tick_amount ( state, d->current_stack () ) * d->ticks_left_fractional ();
272+ double composite_rolling_ta_multiplier ( const action_state_t * s ) const
273+ {
274+ auto da = paladin_spell_t::composite_rolling_ta_multiplier ( s );
275+ auto s_ = static_cast <const state_t *>( s );
276+ // This is probably very wrong, baseline calculation probably needs a copy paste here
277+ da *= s_->damage_mult ;
278+ return da;
279+ }
280+ void execute () override
281+ {
282+ snapshot_state ( pre_execute_state, amount_type ( pre_execute_state ) );
283+ paladin_spell_t::execute ();
268284 }
269285};
270286
@@ -356,8 +372,10 @@ struct blade_of_justice_t : public paladin_melee_attack_t
356372
357373 if ( p ()->talents .expurgation ->ok () )
358374 {
359- p ()->active .expurgation ->target = state->target ;
360- p ()->active .expurgation ->execute ();
375+ auto e_state = static_cast <paladin_action_state_t <expurgation_data_t >*>( p ()->active .expurgation ->get_state () );
376+ e_state->damage_mult = 1.0 ;
377+ e_state->target = state->target ;
378+ p ()->active .expurgation ->schedule_execute ( e_state );
361379 }
362380 }
363381};
@@ -507,14 +525,36 @@ struct divine_storm_t: public holy_power_consumer_t<paladin_melee_attack_t>
507525 if ( p ()->talents .tempest_of_the_lightbringer ->ok () )
508526 tempest->schedule_execute ();
509527
528+ bool has_echo = false ;
529+
510530 if ( sunrise_echo && p ()->cooldowns .second_sunrise_icd ->up () )
511531 {
512532 if ( rng ().roll ( p ()->talents .herald_of_the_sun .second_sunrise ->effectN ( 1 ).percent () ) )
513533 {
514534 p ()->cooldowns .second_sunrise_icd ->start ();
515535 // TODO(mserrano): validate the correct delay here
516536 sunrise_echo->start_action_execute_event ( 200_ms );
537+ has_echo = true ;
538+ }
539+ }
540+ if ( !background && p ()->sets ->has_set_bonus ( PALADIN_RETRIBUTION, MID1, B4 ) && p ()->talents .expurgation ->ok () )
541+ {
542+ // ToDo Fluttershy: If this ever gets sensible results, use spell data
543+ double mult = .5 ;
544+ if ( p ()->talents .tempest_of_the_lightbringer ->ok () )
545+ {
546+ mult = .2 ;
547+ if ( has_echo )
548+ mult = .4 ;
517549 }
550+ else if (has_echo)
551+ {
552+ mult = 1.0 ;
553+ }
554+ auto e_state = static_cast <paladin_action_state_t <expurgation_data_t >*>( p ()->active .expurgation ->get_state () );
555+ e_state->damage_mult = mult;
556+ e_state->target = execute_state->target ;
557+ p ()->active .expurgation ->schedule_execute ( e_state );
518558 }
519559 }
520560
@@ -602,6 +642,20 @@ struct templars_verdict_t : public holy_power_consumer_t<paladin_melee_attack_t>
602642 p ()->resource_gain ( RESOURCE_HOLY_POWER, c, p ()->gains .hp_templars_verdict_refund );
603643 }
604644
645+
646+ if ( !background && p ()->sets ->has_set_bonus ( PALADIN_RETRIBUTION, MID1, B4 ) && p ()->talents .expurgation ->ok () )
647+ {
648+ // ToDo Fluttershy: If this ever gets sensible results, use spell data
649+ double mult = 1.0 ;
650+ if ( p ()->buffs .empyrean_legacy ->up () )
651+ // No clue why, 1.5 would make more sense - That's why DS's damage is here, too
652+ mult = 1.25 ;
653+ auto e_state = static_cast <paladin_action_state_t <expurgation_data_t >*>( p ()->active .expurgation ->get_state () );
654+ e_state->damage_mult = mult;
655+ e_state->target = execute_state->target ;
656+ p ()->active .expurgation ->schedule_execute ( e_state );
657+ }
658+
605659 if ( p ()->buffs .empyrean_legacy ->up () )
606660 {
607661 p ()->active .empyrean_legacy ->schedule_execute ();
0 commit comments