Skip to content

Commit

Permalink
Discipline: Add spirit shell as a dummy action/buff.
Browse files Browse the repository at this point in the history
Allows buff uptime tracking, APL conditionals, etc.

Fixes #5681
  • Loading branch information
scamille committed Dec 21, 2020
1 parent 201fecc commit da58b35
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
7 changes: 4 additions & 3 deletions engine/class_modules/priest/sc_priest.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ struct priest_t final : public player_t
propagate_const<buff_t*> power_of_the_dark_side;
propagate_const<buff_t*> sins_of_the_many;
propagate_const<buff_t*> shadow_covenant;
propagate_const<buff_t*> spirit_shell;

// Holy
propagate_const<buff_t*> apotheosis;
Expand Down Expand Up @@ -185,9 +186,9 @@ struct priest_t final : public player_t
// T45
const spell_data_t* purge_the_wicked;
// T50
const spell_data_t* lights_caress; // NYI
const spell_data_t* luminous_barrier; // NYI
const spell_data_t* evangelism; // NYI
const spell_data_t* lenience; // not fully implemented
const spell_data_t* spirit_shell; // not fully implemented
const spell_data_t* evangelism; // not fully implemented

// Holy
// T15
Expand Down
33 changes: 30 additions & 3 deletions engine/class_modules/priest/sc_priest_discipline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,26 @@ struct shadow_covenant_t final : public priest_spell_t
priest().buffs.shadow_covenant->trigger();
}
};

// Implemented as a dummy effect, without providing absorbs
struct spirit_shell_t final : public priest_spell_t
{
spirit_shell_t( priest_t& player, util::string_view options_str )
: priest_spell_t( "spirit_shell", player, player.talents.spirit_shell )
{
parse_options( options_str );

harmful = false;
}

virtual void execute() override
{
priest_spell_t::execute();

priest().buffs.spirit_shell->trigger();
}
};

} // namespace spells

} // namespace actions
Expand All @@ -276,6 +296,8 @@ void priest_t::create_buffs_discipline()

buffs.shadow_covenant = make_buff( this, "shadow_covenant", talents.shadow_covenant->effectN( 4 ).trigger() )
->set_trigger_spell( talents.shadow_covenant );

buffs.spirit_shell = make_buff( this, "spirit_shell", talents.spirit_shell );
}

void priest_t::init_rng_discipline()
Expand Down Expand Up @@ -310,9 +332,9 @@ void priest_t::init_spells_discipline()
talents.divine_star = find_talent_spell( "Divine Star" );
talents.halo = find_talent_spell( "Halo" );
// T50
talents.lights_caress = find_talent_spell( "Light's Caress" );
talents.luminous_barrier = find_talent_spell( "Luminous Barrier" );
talents.evangelism = find_talent_spell( "Evangelism" );
talents.lenience = find_talent_spell( "Lenience" );
talents.spirit_shell = find_talent_spell( "Spirit Shell" );
talents.evangelism = find_talent_spell( "Evangelism" );

// Passive spell data
specs.discipline_priest = find_specialization_spell( "Discipline Priest" );
Expand Down Expand Up @@ -348,6 +370,10 @@ action_t* priest_t::create_action_discipline( util::string_view name, util::stri
{
return new shadow_covenant_t( *this, options_str );
}
if ( name == "spirit_shell" )
{
return new spirit_shell_t( *this, options_str );
}

return nullptr;
}
Expand Down Expand Up @@ -432,6 +458,7 @@ void priest_t::generate_apl_discipline_d()
def->add_action( this, covenant.boon_of_the_ascended, "boon_of_the_ascended" );
def->add_call_action_list( this, covenant.boon_of_the_ascended, boon, "if=buff.boon_of_the_ascended.up" );
def->add_action( "mindbender" );
def->add_talent( this, "Spirit Shell" );
def->add_talent( this, "Purge the Wicked", "if=!ticking" );
def->add_action( this, "Shadow Word: Pain", "if=!ticking&!talent.purge_the_wicked.enabled" );
def->add_action( this, "Shadow Word: Death" );
Expand Down

0 comments on commit da58b35

Please sign in to comment.