Skip to content

Commit 13b5d40

Browse files
committed
[Priest] Ancient Madness rework and MT bug fix
1 parent 5aad966 commit 13b5d40

File tree

2 files changed

+34
-4
lines changed

2 files changed

+34
-4
lines changed

engine/class_modules/priest/sc_priest.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ struct priest_t final : public player_t
220220
propagate_const<buff_t*> horrific_vision;
221221
propagate_const<buff_t*> vision_of_nzoth;
222222
propagate_const<buff_t*> crushing_void;
223+
propagate_const<buff_t*> ancient_madness;
223224

224225
// Tier Sets
225226
propagate_const<buff_t*> ascension; // TWW3 Archon Set 2pc

engine/class_modules/priest/sc_priest_shadow.cpp

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -845,8 +845,24 @@ struct shadow_word_madness_t final : public priest_spell_t
845845

846846
if ( priest().talents.shadow.ancient_madness.enabled() && priest().buffs.voidform->up() && casted )
847847
{
848-
priest().buffs.voidform->extend_duration(
849-
&priest(), timespan_t::from_millis( priest().talents.shadow.voidform->effectN( 2 ).base_value() ) );
848+
timespan_t base_duration = timespan_t::from_millis( priest().talents.shadow.voidform->effectN( 2 ).base_value() );
849+
850+
if ( priest().buffs.ancient_madness->check() )
851+
{
852+
// Ancient Madness diminishes by 25% per cast:
853+
double factor = std::pow( 1 - priest().talents.shadow.ancient_madness->effectN( 3 ).percent(),
854+
priest().buffs.ancient_madness->check() );
855+
856+
timespan_t extension_ms = base_duration * factor;
857+
858+
priest().buffs.voidform->extend_duration( &priest(), extension_ms );
859+
}
860+
else
861+
{
862+
priest().buffs.voidform->extend_duration( &priest(), base_duration );
863+
}
864+
865+
priest().buffs.ancient_madness->trigger();
850866
}
851867

852868
if ( priest().talents.shadow.screams_of_the_void.enabled() )
@@ -1441,8 +1457,12 @@ struct tentacle_slam_damage_t final : public priest_spell_t
14411457

14421458
if ( priest().talents.shadow.maddening_tentacles.enabled() )
14431459
{
1444-
child_swm->target = s->target;
1445-
child_swm->execute();
1460+
// Only trigger this on the main target
1461+
if ( target == s->target )
1462+
{
1463+
child_swm->target = s->target;
1464+
child_swm->execute();
1465+
}
14461466
}
14471467
}
14481468
};
@@ -1671,6 +1691,11 @@ struct voidform_t final : public priest_buff_t<buff_t>
16711691
{
16721692
priest().buffs.crushing_void->trigger();
16731693
}
1694+
1695+
if ( priest().buffs.ancient_madness->check() )
1696+
{
1697+
priest().buffs.ancient_madness->expire();
1698+
}
16741699
}
16751700
};
16761701

@@ -1935,6 +1960,10 @@ void priest_t::create_buffs_shadow()
19351960
->set_trigger_spell( talents.shadow.death_and_madness );
19361961

19371962
buffs.crushing_void = make_buff( this, "crushing_void", talents.shadow.crushing_void_buff );
1963+
1964+
buffs.ancient_madness = make_buff( this, "ancient_madness", talents.shadow.ancient_madness )
1965+
->set_duration( timespan_t::zero() )
1966+
->set_max_stack( 99 );
19381967
} // namespace priestspace
19391968

19401969
void priest_t::init_rng_shadow()

0 commit comments

Comments
 (0)