Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
327 changes: 168 additions & 159 deletions engine/class_modules/sc_priest.cpp

Large diffs are not rendered by default.

119 changes: 66 additions & 53 deletions engine/class_modules/sc_shaman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ struct shaman_t final : public player_t

action_t* flametongue_attack = nullptr;

struct
{
spell_ranks_t earth_shock;
spell_ranks_t flame_shock;
spell_ranks_t flametongue_weapon;
spell_ranks_t rockbiter_weapon;
spell_ranks_t strength_of_earth_totem;
} rank;
};

// SHAMAN MODULE INTERFACE ==================================================
Expand Down Expand Up @@ -130,6 +138,52 @@ void shaman_t::init_spells()
{
player_t::init_spells();

rank.earth_shock = { this,
spell_container_t().set_spell( 8042 ),
spell_container_t().set_spell( 8044 ),
spell_container_t().set_spell( 8045 ),
spell_container_t().set_spell( 8046 ),
spell_container_t().set_spell( 10412 ),
spell_container_t().set_spell( 10413 ),
spell_container_t().set_spell( 10414 ),
};

rank.flame_shock = { this,
spell_container_t().set_spell( 8050 ),
spell_container_t().set_spell( 8052 ),
spell_container_t().set_spell( 8053 ),
spell_container_t().set_spell( 10447 ),
spell_container_t().set_spell( 10448 ),
spell_container_t().set_spell( 29228 ),
};

rank.flametongue_weapon = { this,
spell_container_t().set_spell( 8024 ).set_driver( 8026 ).set_attack( 29469 ),
spell_container_t().set_spell( 8027 ).set_driver( 8028 ).set_attack( 29470 ),
spell_container_t().set_spell( 8030 ).set_driver( 8029 ).set_attack( 10444 ),
spell_container_t().set_spell( 16339 ).set_driver( 10445 ).set_attack( 10444 ),
spell_container_t().set_spell( 16341 ).set_driver( 16343 ).set_attack( 10444 ),
spell_container_t().set_spell( 16342 ).set_driver( 16344 ).set_attack( 10444 ),
};

rank.rockbiter_weapon = { this,
spell_container_t().set_spell( 8017 ).set_passive( 10400 ),
spell_container_t().set_spell( 8018 ).set_passive( 15567 ),
spell_container_t().set_spell( 8019 ).set_passive( 15568 ),
spell_container_t().set_spell( 10399 ).set_passive( 15569 ),
spell_container_t().set_spell( 16314 ).set_passive( 16311 ),
spell_container_t().set_spell( 16315 ).set_passive( 16312 ),
spell_container_t().set_spell( 16316 ).set_passive( 16313 ),
};

rank.strength_of_earth_totem = { this,
spell_container_t().set_spell( 8075 ).set_aura( 8076 ),
spell_container_t().set_spell( 8160 ).set_aura( 8162 ),
spell_container_t().set_spell( 8161 ).set_aura( 8163 ),
spell_container_t().set_spell( 10442 ).set_aura( 10441 ),
spell_container_t().set_spell( 25361 ).set_aura( 25362 ),
};

parse_all_class_passives();
parse_all_passive_talents();

Expand Down Expand Up @@ -161,19 +215,10 @@ void shaman_t::invalidate_cache( cache_e c )

// Earth Shock

constexpr std::array earth_shock_ranks {
spell_container_t().set_spell( 8042 ),
spell_container_t().set_spell( 8044 ),
spell_container_t().set_spell( 8045 ),
spell_container_t().set_spell( 8046 ),
spell_container_t().set_spell( 10412 ),
spell_container_t().set_spell( 10413 ),
spell_container_t().set_spell( 10414 ),
};
struct earth_shock_t : public shaman_spell_t
{
earth_shock_t( shaman_t* player, util::string_view options_str ) :
shaman_spell_t( "earth_shock", player, player->find_rank( earth_shock_ranks )->spell( player ) )
shaman_spell_t( "earth_shock", player, player->rank.earth_shock.find_rank()->spell() )
{
parse_options( options_str );

Expand All @@ -184,18 +229,10 @@ struct earth_shock_t : public shaman_spell_t

// Flame Shock

constexpr std::array flame_shock_ranks {
spell_container_t().set_spell( 8050 ),
spell_container_t().set_spell( 8052 ),
spell_container_t().set_spell( 8053 ),
spell_container_t().set_spell( 10447 ),
spell_container_t().set_spell( 10448 ),
spell_container_t().set_spell( 29228 ),
};
struct flame_shock_t : public shaman_spell_t
{
flame_shock_t( shaman_t* player, util::string_view options_str ) :
shaman_spell_t( "flame_shock", player, player->find_rank( flame_shock_ranks )->spell( player) )
shaman_spell_t( "flame_shock", player, player->rank.flame_shock.find_rank()->spell() )
{
parse_options( options_str );

Expand All @@ -208,23 +245,14 @@ struct flame_shock_t : public shaman_spell_t
// Shaman Weapon Imbues
// ==========================================================================

constexpr std::array flametongue_weapon_ranks {
spell_container_t().set_spell( 8024 ).set_driver( 8026 ).set_attack( 29469 ),
spell_container_t().set_spell( 8027 ).set_driver( 8028 ).set_attack( 29470 ),
spell_container_t().set_spell( 8030 ).set_driver( 8029 ).set_attack( 10444 ),
spell_container_t().set_spell( 16339 ).set_driver( 10445 ).set_attack( 10444 ),
spell_container_t().set_spell( 16341 ).set_driver( 16343 ).set_attack( 10444 ),
spell_container_t().set_spell( 16342 ).set_driver( 16344 ).set_attack( 10444 ),
};

struct flametongue_attack_t : public shaman_spell_t
{
flametongue_attack_t( shaman_t* player ) :
shaman_spell_t( "flametongue_attack", player, player->find_rank( flametongue_weapon_ranks )->attack( player ) )
shaman_spell_t( "flametongue_attack", player, player->rank.flametongue_weapon.find_rank()->attack() )
{
background = true;

auto driver = player->find_rank( flametongue_weapon_ranks )->driver( player );
auto driver = player->rank.flametongue_weapon.find_rank()->driver();

double proc_value = driver->effectN( 1 ).average( player, player->level() );
double weapon_speed = player->equipped_weapons[ SLOT_MAIN_HAND ].swing_time.total_seconds();
Expand All @@ -236,7 +264,7 @@ struct flametongue_attack_t : public shaman_spell_t
struct flametongue_weapon_t : public shaman_spell_t
{
flametongue_weapon_t( shaman_t* player, util::string_view options_str ) :
shaman_spell_t( "flametongue_weapon", player, player->find_rank( flametongue_weapon_ranks )->spell( player ) )
shaman_spell_t( "flametongue_weapon", player, player->rank.flametongue_weapon.find_rank()->spell() )
{
parse_options( options_str );
harmful = false;
Expand All @@ -262,19 +290,10 @@ struct flametongue_weapon_t : public shaman_spell_t

// rockbiter weapon

constexpr std::array rockbiter_weapon_ranks {
spell_container_t().set_spell( 8017 ).set_passive( 10400 ),
spell_container_t().set_spell( 8018 ).set_passive( 15567 ),
spell_container_t().set_spell( 8019 ).set_passive( 15568 ),
spell_container_t().set_spell( 10399 ).set_passive( 15569 ),
spell_container_t().set_spell( 16314 ).set_passive( 16311 ),
spell_container_t().set_spell( 16315 ).set_passive( 16312 ),
spell_container_t().set_spell( 16316 ).set_passive( 16313 ),
};
struct rockbiter_weapon_t : public shaman_spell_t
{
rockbiter_weapon_t( shaman_t* player, util::string_view options_str ) :
shaman_spell_t( "rockbiter_weapon", player, player->find_rank( rockbiter_weapon_ranks )->spell( player ) )
shaman_spell_t( "rockbiter_weapon", player, player->rank.rockbiter_weapon.find_rank()->spell() )
{
parse_options( options_str );
harmful = false;
Expand Down Expand Up @@ -306,17 +325,10 @@ struct rockbiter_weapon_t : public shaman_spell_t
// TODO: Make totems a unit for use with range?
// TODO: Party buff

constexpr std::array strength_of_earth_totem_ranks {
spell_container_t().set_spell( 8075 ).set_aura( 8076 ),
spell_container_t().set_spell( 8160 ).set_aura( 8162 ),
spell_container_t().set_spell( 8161 ).set_aura( 8163 ),
spell_container_t().set_spell( 10442 ).set_aura( 10441 ),
spell_container_t().set_spell( 25361 ).set_aura( 25362 ),
};
struct strength_of_earth_totem_t : public shaman_spell_t
{
strength_of_earth_totem_t( shaman_t* player, util::string_view options_str ) :
shaman_spell_t( "strength_of_earth_totem", player, player->find_rank( strength_of_earth_totem_ranks )->spell( player ) )
shaman_spell_t( "strength_of_earth_totem", player, player->rank.strength_of_earth_totem.find_rank()->spell() )
{
parse_options( options_str );
harmful = false;
Expand Down Expand Up @@ -423,11 +435,12 @@ void shaman_t::create_buffs()
{
player_t::create_buffs();

buff.flametongue_weapon = make_buff( this, "flametongue_weapon", find_rank( flametongue_weapon_ranks )->spell( this ) );
buff.rockbiter_weapon = make_buff<stat_buff_t>( this, "rockbiter_weapon", find_rank( rockbiter_weapon_ranks )->passive( this ) );
buff.flametongue_weapon = make_buff( this, "flametongue_weapon", rank.flametongue_weapon.find_rank()->spell() );
buff.rockbiter_weapon = make_buff<stat_buff_t>( this, "rockbiter_weapon", rank.rockbiter_weapon.find_rank()->passive() );

buff.strength_of_earth = make_buff<stat_buff_t>( this, "strength_of_earth", find_rank( strength_of_earth_totem_ranks )->aura( this ) )
->set_duration( find_rank( strength_of_earth_totem_ranks )->spell( this )->duration() );
auto soet_rank = rank.strength_of_earth_totem.find_rank();
buff.strength_of_earth = make_buff<stat_buff_t>( this, "strength_of_earth", soet_rank->aura() )
->set_duration( soet_rank->spell()->duration() );
}

void shaman_t::create_actions()
Expand Down
103 changes: 56 additions & 47 deletions engine/class_modules/sc_warlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ struct warlock_t final : public player_t
{
pet_t* imp = nullptr;
} pets;

struct
{
spell_ranks_t corruption;
spell_ranks_t firebolt;
spell_ranks_t immolate;
spell_ranks_t shadow_bolt;
} rank;
};

struct warlock_module_t : public module_t
Expand Down Expand Up @@ -70,64 +78,30 @@ struct warlock_action_t : public parse_action_effects_t<Base>
using warlock_spell_t = warlock_action_t<spell_t>;

// Shadow Bolt

constexpr std::array shadow_bolt_ranks {
spell_container_t().set_spell( 686 ),
spell_container_t().set_spell( 695 ),
spell_container_t().set_spell( 705 ),
spell_container_t().set_spell( 1088 ),
spell_container_t().set_spell( 1106 ),
spell_container_t().set_spell( 7641 ),
spell_container_t().set_spell( 11659 ),
spell_container_t().set_spell( 11660 ),
spell_container_t().set_spell( 11661 ),
spell_container_t().set_spell( 25307 ),
};
struct shadow_bolt_t : public warlock_spell_t
{
shadow_bolt_t( warlock_t* player, util::string_view options_str ) :
warlock_spell_t( "shadow_bolt", player, player->find_rank( shadow_bolt_ranks )->spell( player ) )
warlock_spell_t( "shadow_bolt", player, player->rank.shadow_bolt.find_rank()->spell() )
{
parse_options( options_str );
}
};

// Immolate

constexpr std::array immolate_ranks {
spell_container_t().set_spell( 348 ),
spell_container_t().set_spell( 707 ),
spell_container_t().set_spell( 1094 ),
spell_container_t().set_spell( 2941 ),
spell_container_t().set_spell( 11665 ),
spell_container_t().set_spell( 11667 ),
spell_container_t().set_spell( 11668 ),
spell_container_t().set_spell( 25309 ),
};
struct immolate_t : public warlock_spell_t
{
immolate_t( warlock_t* player, util::string_view options_str ) :
warlock_spell_t( "immolate", player, player->find_rank( immolate_ranks )->spell( player ) )
warlock_spell_t( "immolate", player, player->rank.immolate.find_rank()->spell() )
{
parse_options( options_str );
}
};

// Corruption

constexpr std::array corruption_ranks {
spell_container_t().set_spell( 172 ),
spell_container_t().set_spell( 6222 ),
spell_container_t().set_spell( 6223 ),
spell_container_t().set_spell( 7648 ),
spell_container_t().set_spell( 11671 ),
spell_container_t().set_spell( 11672 ),
spell_container_t().set_spell( 25311 ),
};
struct corruption_t : public warlock_spell_t
{
corruption_t( warlock_t* player, util::string_view options_str ) :
warlock_spell_t( "corruption", player, player->find_rank( corruption_ranks )->spell( player ) )
warlock_spell_t( "corruption", player, player->rank.corruption.find_rank()->spell() )
{
parse_options( options_str );
}
Expand Down Expand Up @@ -251,21 +225,12 @@ namespace pets {
action_t* create_action( std::string_view, std::string_view ) override;
};

constexpr std::array firebolt_ranks {
spell_container_t().set_spell( 3110 ), // 1
spell_container_t().set_spell( 7799 ), // 8
spell_container_t().set_spell( 7800 ), // 18
spell_container_t().set_spell( 7801 ), // 28
spell_container_t().set_spell( 7802 ), // 38
spell_container_t().set_spell( 11762 ), // 48
spell_container_t().set_spell( 11763 ), // 58
};
// TODO: There's some funky delay on beta. Some casts are back-to-back, some have a 0.5-1.0s gap even when
// the imp has mana
struct firebolt_t : warlock_pet_spell_t
{
firebolt_t( std::string_view n, imp_pet_t* p, std::string_view options_str ) :
warlock_pet_spell_t( n, p, p->find_rank( firebolt_ranks )->spell( p ) )
warlock_pet_spell_t( n, p, p->o()->rank.firebolt.find_rank()->spell() )
{
parse_options( options_str );

Expand Down Expand Up @@ -318,6 +283,50 @@ void warlock_t::init_spells()
{
player_t::init_spells();

rank.corruption = { this,
spell_container_t().set_spell( 172 ),
spell_container_t().set_spell( 6222 ),
spell_container_t().set_spell( 6223 ),
spell_container_t().set_spell( 7648 ),
spell_container_t().set_spell( 11671 ),
spell_container_t().set_spell( 11672 ),
spell_container_t().set_spell( 25311 ),
};

rank.firebolt = { this,
spell_container_t().set_spell( 3110 ), // 1
spell_container_t().set_spell( 7799 ), // 8
spell_container_t().set_spell( 7800 ), // 18
spell_container_t().set_spell( 7801 ), // 28
spell_container_t().set_spell( 7802 ), // 38
spell_container_t().set_spell( 11762 ), // 48
spell_container_t().set_spell( 11763 ), // 58
};

rank.immolate = { this,
spell_container_t().set_spell( 348 ),
spell_container_t().set_spell( 707 ),
spell_container_t().set_spell( 1094 ),
spell_container_t().set_spell( 2941 ),
spell_container_t().set_spell( 11665 ),
spell_container_t().set_spell( 11667 ),
spell_container_t().set_spell( 11668 ),
spell_container_t().set_spell( 25309 ),
};

rank.shadow_bolt = { this,
spell_container_t().set_spell( 686 ),
spell_container_t().set_spell( 695 ),
spell_container_t().set_spell( 705 ),
spell_container_t().set_spell( 1088 ),
spell_container_t().set_spell( 1106 ),
spell_container_t().set_spell( 7641 ),
spell_container_t().set_spell( 11659 ),
spell_container_t().set_spell( 11660 ),
spell_container_t().set_spell( 11661 ),
spell_container_t().set_spell( 25307 ),
};

parse_all_class_passives();
parse_all_passive_talents();
}
Expand Down
Loading
Loading