Skip to content

Commit

Permalink
[Paladin] Eye for an Eye, add Ardent Defender to default rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Fluttershy-git committed Oct 6, 2024
1 parent e0f6243 commit aade4a6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engine/class_modules/apl/apl_paladin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ void protection( player_t* p )
action_priority_list_t* default_ = p->get_action_priority_list( "default" );
action_priority_list_t* precombat = p->get_action_priority_list( "precombat" );
action_priority_list_t* cooldowns = p->get_action_priority_list( "cooldowns" );
action_priority_list_t* defensives = p->get_action_priority_list( "defensives" );
action_priority_list_t* standard = p->get_action_priority_list( "standard" );
action_priority_list_t* hammer_of_light = p->get_action_priority_list( "hammer_of_light" );
action_priority_list_t* trinkets = p->get_action_priority_list( "trinkets" );
Expand All @@ -100,6 +101,7 @@ void protection( player_t* p )

default_->add_action( "auto_attack" );
default_->add_action( "call_action_list,name=cooldowns" );
default_->add_action( "call_action_list,name=defensives" );
default_->add_action( "call_action_list,name=trinkets" );
default_->add_action( "call_action_list,name=standard" );

Expand All @@ -112,6 +114,8 @@ void protection( player_t* p )
cooldowns->add_action( "invoke_external_buff,name=power_infusion,if=buff.avenging_wrath.up" );
cooldowns->add_action( "fireblood,if=buff.avenging_wrath.remains>8" );

defensives->add_action( "ardent_defender" );

standard->add_action( "call_action_list,name=hammer_of_light,if=talent.lights_guidance.enabled&(cooldown.eye_of_tyr.remains<2|buff.hammer_of_light_ready.up)&(!talent.redoubt.enabled|buff.redoubt.stack>=2|!talent.bastion_of_light.enabled)" );
standard->add_action( "hammer_of_light,if=(!talent.redoubt.enabled|buff.redoubt.stack=3)&(buff.blessing_of_dawn.stack>=1|!talent.of_dusk_and_dawn.enabled)" );
standard->add_action( "shield_of_the_righteous,if=(((!talent.righteous_protector.enabled|cooldown.righteous_protector_icd.remains=0)&holy_power>2)|buff.bastion_of_light.up|buff.divine_purpose.up)&!((buff.hammer_of_light_ready.up|buff.hammer_of_light_free.up))" );
Expand Down
21 changes: 21 additions & 0 deletions engine/class_modules/paladin/sc_paladin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2693,6 +2693,14 @@ void paladin_t::trigger_laying_down_arms()
cooldowns.lay_on_hands->adjust( -talents.lightsmith.laying_down_arms->effectN( 1 ).time_value() );
};

struct eye_for_an_eye_t : public paladin_spell_t
{
eye_for_an_eye_t( paladin_t* p ) : paladin_spell_t( "eye_for_an_eye", p, p->find_spell( 469311 ) )
{
background = true;
}
};

// Hammer of Wrath

struct hammer_of_wrath_t : public paladin_melee_attack_t
Expand Down Expand Up @@ -3529,6 +3537,10 @@ void paladin_t::create_actions()
{
active.incandescence = nullptr;
}
if ( is_ptr() && talents.eye_for_an_eye->ok() )
{
active.eye_for_an_eye = new eye_for_an_eye_t( this );
}

active.background_cons = new consecration_t( this, "blade_of_justice", BLADE_OF_JUSTICE );
active.searing_light_cons = new consecration_t( this, "searing_light", SEARING_LIGHT );
Expand Down Expand Up @@ -5008,6 +5020,15 @@ void paladin_t::assess_damage( school_e school, result_amount_type dtype, action
cooldowns.inner_light_icd->start();
}

if (is_ptr() && s->action->harmful && talents.eye_for_an_eye->ok())
{
if (buffs.ardent_defender->up() || buffs.divine_protection->up() || buffs.divine_shield->up())
{
active.eye_for_an_eye->set_target( s->action->player );
active.eye_for_an_eye->schedule_execute();
}
}

// Trigger Grand Crusader on an avoidance event (TODO: test if it triggers on misses)
if ( s->result == RESULT_DODGE || s->result == RESULT_PARRY || s->result == RESULT_MISS )
{
Expand Down
1 change: 1 addition & 0 deletions engine/class_modules/paladin/sc_paladin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ struct paladin_t : public player_t
action_t* sacred_weapon_proc_damage;
action_t* sacred_weapon_proc_heal;
action_t* refining_fire;
action_t* eye_for_an_eye;
} active;

// Buffs
Expand Down

0 comments on commit aade4a6

Please sign in to comment.