Skip to content

Commit a7459bd

Browse files
committed
[Shaman] Implement 11.2 Totemic 2 piece set bonus
1 parent a6a0cfc commit a7459bd

File tree

1 file changed

+59
-11
lines changed

1 file changed

+59
-11
lines changed

engine/class_modules/sc_shaman.cpp

Lines changed: 59 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,8 +1070,9 @@ struct shaman_t : public parse_player_effects_t
10701070

10711071
// Doom Winds damage
10721072
action_t* doom_winds;
1073-
1073+
10741074
action_t* set_ascendance;
1075+
action_t* tww3_primordial_storm;
10751076
} action;
10761077

10771078
// Pets
@@ -1891,6 +1892,7 @@ struct shaman_t : public parse_player_effects_t
18911892
void trigger_arc_discharge( const action_state_t* state );
18921893
void trigger_flowing_spirits( action_t* action );
18931894
void trigger_lively_totems( const action_state_t* state );
1895+
void trigger_tww3_totemic_enh_2pc( const action_state_t* state );
18941896

18951897
// Legendary
18961898
void trigger_legacy_of_the_frost_witch( const action_state_t* state, unsigned consumed_stacks );
@@ -9634,7 +9636,7 @@ struct ascendance_t : public shaman_spell_t
96349636

96359637
struct ascendance_dre_t : public ascendance_t
96369638
{
9637-
ascendance_dre_t( shaman_t* player, spell_variant var_ ) : ascendance_t( player, "ascendance_dre", {}, var_)
9639+
ascendance_dre_t( shaman_t* player, spell_variant var_ ) : ascendance_t( player, "ascendance_dre", {}, var_)
96389640
{
96399641
background = true;
96409642
cooldown->duration = 0_s;
@@ -10901,15 +10903,24 @@ struct primordial_storm_t : public shaman_spell_t
1090110903
{
1090210904
struct primordial_damage_t : public shaman_attack_t
1090310905
{
10904-
primordial_damage_t( primordial_storm_t* parent, util::string_view name, const spell_data_t* s ) :
10905-
shaman_attack_t( name, parent->p(), s )
10906+
primordial_damage_t( primordial_storm_t* parent, util::string_view name, const spell_data_t* s,
10907+
spell_variant type_ ) :
10908+
shaman_attack_t( ::action_name( name, type_ ), parent->p(), s, type_ )
1090610909
{
1090710910
// Inherit Maelstrom Weapon stacks from the parent cast
1090810911
mw_parent = parent;
1090910912
background = true;
1091010913

1091110914
aoe = -1;
1091210915
reduced_aoe_targets = p()->talent.primordial_storm->effectN( 3 ).base_value();
10916+
10917+
switch ( type_ )
10918+
{
10919+
case spell_variant::TWW3:
10920+
base_multiplier *= 1.0 + p()->sets->set( HERO_TOTEMIC, TWW3, B2 )->effectN( 1 ).percent();
10921+
default:
10922+
break;
10923+
}
1091310924
}
1091410925

1091510926
double action_multiplier() const override
@@ -10929,24 +10940,34 @@ struct primordial_storm_t : public shaman_spell_t
1092910940

1093010941
primordial_damage_t* fire, *frost, *nature;
1093110942

10932-
primordial_storm_t( shaman_t* player, util::string_view options_str ) :
10933-
shaman_spell_t( "primordial_storm", player, player->find_spell( 1218090 ) )
10943+
primordial_storm_t( shaman_t* player, spell_variant type_, util::string_view options_str = {} ) :
10944+
shaman_spell_t( ::action_name( "primordial_storm", type_ ), player,
10945+
player->find_spell( 1218090 ), type_ )
1093410946
{
1093510947
parse_options( options_str );
1093610948

1093710949
fire = new primordial_damage_t( this, "primordial_fire",
10938-
player->find_spell( 1218113 ) );
10950+
player->find_spell( 1218113 ), type_ );
1093910951
frost = new primordial_damage_t( this, "primordial_frost",
10940-
player->find_spell( 1218116 ) );
10952+
player->find_spell( 1218116 ), type_ );
1094110953
nature = new primordial_damage_t( this, "primordial_lightning",
10942-
player->find_spell( 1218118 ) );
10954+
player->find_spell( 1218118 ), type_ );
1094310955

1094410956
add_child( fire );
1094510957
add_child( frost );
1094610958
add_child( nature );
1094710959

1094810960
// Spell data does not indicate this, textual description does
1094910961
affected_by_maelstrom_weapon = true;
10962+
10963+
switch ( type_ )
10964+
{
10965+
case spell_variant::TWW3:
10966+
background = true;
10967+
break;
10968+
default:
10969+
break;
10970+
}
1095010971
}
1095110972

1095210973
void trigger_lightning_damage()
@@ -11295,6 +11316,8 @@ struct voltaic_blaze_t : public shaman_spell_t
1129511316
shaman_spell_t::execute();
1129611317

1129711318
p()->buff.whirling_earth->decrement();
11319+
11320+
p()->trigger_tww3_totemic_enh_2pc( execute_state );
1129811321
}
1129911322

1130011323
void impact( action_state_t* state ) override
@@ -11593,7 +11616,7 @@ action_t* shaman_t::create_action( util::string_view name, util::string_view opt
1159311616
if ( name == "voltaic_blaze" )
1159411617
return new voltaic_blaze_t( this, options_str );
1159511618
if ( name == "primordial_storm" )
11596-
return new primordial_storm_t( this, options_str );
11619+
return new primordial_storm_t( this, spell_variant::NORMAL, options_str );
1159711620

1159811621
// restoration
1159911622
if ( name == "spiritwalkers_grace" )
@@ -11866,6 +11889,11 @@ void shaman_t::create_actions()
1186611889
action.set_ascendance = new ascendance_dre_t( this, spell_variant::TWW3 );
1186711890
}
1186811891

11892+
if ( sets->has_set_bonus( HERO_TOTEMIC, TWW3, B2 ) && specialization() == SHAMAN_ENHANCEMENT )
11893+
{
11894+
action.tww3_primordial_storm = new primordial_storm_t( this, spell_variant::TWW3 );
11895+
}
11896+
1186911897
if ( talent.tempest_strikes.ok() )
1187011898
{
1187111899
action.tempest_strikes = new tempest_strikes_damage_t( this );
@@ -13570,6 +13598,8 @@ void shaman_t::trigger_whirling_fire( const action_state_t* state )
1357013598
buff.hot_hand->extend_duration_or_trigger( buff.whirling_fire->data().effectN( 1 ).time_value() );
1357113599

1357213600
buff.whirling_fire->decrement();
13601+
13602+
trigger_tww3_totemic_enh_2pc( state );
1357313603
}
1357413604

1357513605
void shaman_t::trigger_stormblast( const action_state_t* state )
@@ -13698,6 +13728,8 @@ void shaman_t::trigger_whirling_air( const action_state_t* state )
1369813728
}
1369913729

1370013730
buff.whirling_air->decrement();
13731+
13732+
trigger_tww3_totemic_enh_2pc( state );
1370113733
}
1370213734

1370313735
void shaman_t::trigger_reactivity( const action_state_t* state )
@@ -14024,6 +14056,22 @@ void shaman_t::trigger_lively_totems( const action_state_t* state )
1402414056
}
1402514057
}
1402614058

14059+
void shaman_t::trigger_tww3_totemic_enh_2pc( const action_state_t* state )
14060+
{
14061+
if ( !sets->has_set_bonus( HERO_TOTEMIC, TWW3, B2 ) || specialization() != SHAMAN_ENHANCEMENT )
14062+
{
14063+
return;
14064+
}
14065+
14066+
if ( buff.whirling_air->check() || buff.whirling_earth->check() || buff.whirling_fire->check() )
14067+
{
14068+
return;
14069+
}
14070+
14071+
sim->print_debug( "{} triggering tww3 totemic enhancement 2pc set bonus", this->name() );
14072+
action.tww3_primordial_storm->execute_on_target( state->target );
14073+
}
14074+
1402714075
// shaman_t::init_buffs =====================================================
1402814076

1402914077
void shaman_t::create_buffs()
@@ -14334,7 +14382,7 @@ void shaman_t::create_buffs()
1433414382
->set_trigger_spell( sets->set( SHAMAN_ENHANCEMENT, TWW2, B4 ) );
1433514383
buff.ancestral_wisdom = make_buff( this, "ancestral_wisdom", find_spell( 1238279 ) )
1433614384
->set_trigger_spell( spell.tww3_farseer_4pc )
14337-
->set_stack_change_callback( [ this ]( buff_t*, int, int cur ) {
14385+
->set_stack_change_callback( [ this ]( buff_t*, int, int ) {
1433814386
cooldown.lava_burst->adjust_recharge_multiplier();
1433914387
} );
1434014388
buff.storms_eye = make_buff( this, "storms_eye", find_spell(1239315) )

0 commit comments

Comments
 (0)