12 #include "player/covenant.hpp" 13 #include "player/pet_spawner.hpp" 14 #include "sc_enums.hpp" 16 #include "simulationcraft.hpp" 26 struct ascended_blast_heal_t;
27 struct mind_sear_tick_t;
28 struct shadowy_apparition_spell_t;
29 struct ascended_eruption_t;
30 struct ascended_eruption_heal_t;
31 struct wrathful_faerie_t;
32 struct wrathful_faerie_fermata_t;
33 struct psychic_link_t;
34 struct shadow_weaving_t;
35 struct eternal_call_to_the_void_t;
36 struct unholy_transfusion_healing_t;
66 return *debug_cast<
priest_t*>( source );
70 return *debug_cast<
priest_t*>( source );
343 } background_actions;
367 bool autoUnshift =
true;
368 bool fixed_time =
true;
371 bool self_power_infusion =
true;
374 bool use_ascended_nova =
true;
375 bool use_ascended_eruption =
true;
380 bool mindgames_healing_reversal =
false;
381 bool mindgames_damage_reversal =
true;
384 bool self_benevolent_faerie =
true;
387 int cauterizing_shadows_allies = 3;
391 std::string bwonsamdis_pact_mask_type =
"benevolent";
397 int shadow_word_manipulation_seconds_remaining = 7;
404 int pallid_command_allies = 50;
476 void init_base_stats()
override;
477 void init_resources(
bool force )
override;
478 void init_spells()
override;
479 void create_buffs()
override;
480 void init_scaling()
override;
481 void init_finished()
override;
482 void init_background_actions()
override;
483 void reset()
override;
484 void create_options()
override;
485 std::string create_profile( save_e )
override;
486 action_t* create_action( util::string_view name, util::string_view options )
override;
487 pet_t* create_pet( util::string_view name, util::string_view type = {} )
override;
488 void create_pets()
override;
489 void copy_from(
player_t* source )
override;
490 resource_e primary_resource()
const override 492 return RESOURCE_MANA;
494 role_e primary_role()
const override;
495 stat_e convert_hybrid_stat( stat_e s )
const override;
496 void assess_damage( school_e school, result_amount_type dtype,
action_state_t* s )
override;
497 double composite_melee_haste()
const override;
498 double composite_spell_haste()
const override;
499 double composite_spell_crit_chance()
const override;
500 double composite_player_pet_damage_multiplier(
const action_state_t*,
bool )
const override;
501 double composite_player_absorb_multiplier(
const action_state_t* s )
const override;
502 double composite_player_heal_multiplier(
const action_state_t* s )
const override;
503 double composite_player_target_multiplier(
player_t* t, school_e school )
const override;
504 double composite_player_target_pet_damage_multiplier(
player_t* target,
bool guardian )
const override;
505 double matching_gear_multiplier( attribute_e attr )
const override;
506 void target_mitigation( school_e, result_amount_type,
action_state_t* )
override;
507 void init_action_list()
override;
508 void combat_begin()
override;
509 void init_rng()
override;
512 std::unique_ptr<expr_t> create_expression( util::string_view expression_str )
override;
513 std::unique_ptr<expr_t> create_pet_expression( util::string_view expression_str,
514 util::span<util::string_view> splits );
515 void arise()
override;
516 void do_dynamic_regen(
bool )
override;
517 void apply_affecting_auras(
action_t& )
override;
518 void invalidate_cache( cache_e )
override;
521 void create_cooldowns();
524 void create_benefits();
525 void create_buffs_shadow();
526 void init_rng_shadow();
527 void init_spells_shadow();
528 std::unique_ptr<expr_t> create_expression_shadow( util::string_view name_str );
529 action_t* create_action_shadow( util::string_view name, util::string_view options_str );
531 void create_buffs_discipline();
532 void init_spells_discipline();
533 void init_rng_discipline();
535 void init_background_actions_shadow();
536 std::unique_ptr<expr_t> create_expression_discipline(
action_t* a,
const util::string_view name_str );
537 action_t* create_action_discipline( util::string_view name, util::string_view options_str );
539 void create_buffs_holy();
540 void init_spells_holy();
541 void init_rng_holy();
542 void generate_apl_holy();
543 expr_t* create_expression_holy(
action_t* a, util::string_view name_str );
544 action_t* create_action_holy( util::string_view name, util::string_view options_str );
548 void generate_insanity(
double num_amount,
gain_t* g,
action_t* action );
549 void adjust_holy_word_serenity_cooldown();
550 double tick_damage_over_time(
timespan_t duration,
const dot_t* dot )
const;
551 void trigger_shadowflame_prism(
player_t* target );
556 bool hungering_void_active(
player_t* target )
const;
557 void remove_hungering_void(
player_t* target );
559 void trigger_wrathful_faerie();
560 void trigger_wrathful_faerie_fermata();
561 void remove_wrathful_faerie();
562 void remove_wrathful_faerie_fermata();
563 int shadow_weaving_active_dots(
const player_t* target,
const unsigned int spell_id )
const;
564 double shadow_weaving_multiplier(
const player_t* target,
const unsigned int spell_id )
const;
565 void trigger_unholy_transfusion_healing();
569 std::string default_potion()
const override;
570 std::string default_flask()
const override;
571 std::string default_food()
const override;
572 std::string default_rune()
const override;
573 std::string default_temporary_enchant()
const override;
586 template <
typename Base>
595 bool twist_of_fate_da;
596 bool twist_of_fate_ta;
597 bool shadow_covenant_da;
598 bool shadow_covenant_ta;
602 double vf_da_multiplier;
603 double vf_ta_multiplier;
607 : ab( name, &p, s ), affected_by(), vf_da_multiplier( 1 ), vf_ta_multiplier( 1 )
611 ab::tick_may_crit =
true;
612 ab::weapon_multiplier = 0.0;
614 if ( p.talents.sins_of_the_many->ok() )
616 ab::base_dd_multiplier *= 1.0 + p.talents.sins_of_the_many->effectN( 1 ).percent();
617 ab::base_td_multiplier *= 1.0 + p.talents.sins_of_the_many->effectN( 1 ).percent();
620 if ( affected_by.voidform_da )
622 vf_da_multiplier = 1 + priest().buffs.voidform->data().effectN( 1 ).percent();
624 if ( affected_by.voidform_ta )
626 vf_ta_multiplier = 1 + priest().buffs.voidform->data().effectN( 2 ).percent();
639 } affects[] = { { priest().buffs.voidform->data().effectN( 1 ), affected_by.voidform_da },
640 { priest().buffs.voidform->data().effectN( 2 ), affected_by.voidform_ta },
641 { priest().buffs.shadowform->data().effectN( 1 ), affected_by.shadowform_da },
642 { priest().buffs.shadowform->data().effectN( 4 ), affected_by.shadowform_ta },
643 { priest().buffs.twist_of_fate->data().effectN( 1 ), affected_by.twist_of_fate_da },
644 { priest().buffs.twist_of_fate->data().effectN( 2 ), affected_by.twist_of_fate_ta },
645 { priest().buffs.shadow_covenant->data().effectN( 2 ), affected_by.shadow_covenant_da },
646 { priest().buffs.shadow_covenant->data().effectN( 3 ), affected_by.shadow_covenant_ta },
647 { priest().talents.schism->effectN( 2 ), affected_by.schism } };
649 for (
const auto& a : affects )
651 a.affects = base_t::data().affected_by( a.effect );
652 if ( a.affects && ab::sim->debug )
654 ab::sim->print_debug(
"{} {} ({}) affected by {} (idx={}).", *ab::player, *
this, ab::data().
id(),
655 a.effect.spell()->name_cstr(), a.effect.spell_effect_num() + 1 );
662 return *( priest().get_target_data( t ) );
667 return priest().find_target_data( t );
670 void trigger_power_of_the_dark_side()
672 int stack = priest().buffs.power_of_the_dark_side->check();
673 if ( priest().
buffs.power_of_the_dark_side->trigger() )
675 if ( priest().buffs.power_of_the_dark_side->check() == stack )
677 priest().procs.power_of_the_dark_side_overflow->occur();
681 priest().procs.power_of_the_dark_side->occur();
686 double cost()
const override 688 double c = ab::cost();
693 double composite_target_multiplier(
player_t* target )
const override 695 double m = ab::composite_target_multiplier( target );
697 auto target_data = find_td( target );
698 if ( target_data && target_data->buffs.schism->check() )
700 m *= 1.0 + target_data->buffs.schism->data().effectN( 2 ).percent();
706 double action_da_multiplier()
const override 708 double m = ab::action_da_multiplier();
710 if ( affected_by.voidform_da && priest().
buffs.voidform->check() )
712 m *= vf_da_multiplier;
714 if ( affected_by.shadowform_da && priest().buffs.shadowform->check() )
716 m *= 1.0 + priest().buffs.shadowform->data().effectN( 1 ).percent();
718 if ( affected_by.twist_of_fate_da && priest().
buffs.twist_of_fate->check() )
720 m *= 1.0 + priest().buffs.twist_of_fate->data().effectN( 1 ).percent();
722 if ( affected_by.shadow_covenant_da && priest().
buffs.shadow_covenant->check() )
724 m *= 1 + priest().buffs.shadow_covenant->data().effectN( 2 ).percent();
729 double action_ta_multiplier()
const override 731 double m = ab::action_ta_multiplier();
733 if ( affected_by.voidform_ta && priest().
buffs.voidform->check() )
735 m *= vf_ta_multiplier;
737 if ( affected_by.shadowform_ta && priest().buffs.shadowform->check() )
739 m *= 1.0 + priest().buffs.shadowform->data().effectN( 4 ).percent();
741 if ( affected_by.twist_of_fate_ta && priest().
buffs.twist_of_fate->check() )
743 m *= 1.0 + priest().buffs.twist_of_fate->data().effectN( 2 ).percent();
745 if ( affected_by.shadow_covenant_ta && priest().
buffs.shadow_covenant->check() )
747 m *= 1 + priest().buffs.shadow_covenant->data().effectN( 3 ).percent();
752 void gain_energize_resource( resource_e resource_type,
double amount,
gain_t* gain )
override 754 if ( resource_type == RESOURCE_INSANITY )
756 priest().generate_insanity( amount, gain,
this );
760 ab::gain_energize_resource( resource_type, amount, gain );
767 return *debug_cast<
priest_t*>( ab::player );
771 return *debug_cast<
priest_t*>( ab::player );
786 :
base_t( name, player, s )
789 tick_may_crit =
false;
797 :
base_t( name, player, s )
803 double save_health_percentage = s->target->health_percentage();
807 if ( s->result_amount > 0 )
809 if ( priest().specialization() != PRIEST_SHADOW && priest().talents.twist_of_fate->ok() &&
810 ( save_health_percentage < priest().talents.twist_of_fate->effectN( 1 ).base_value() ) )
812 priest().buffs.twist_of_fate->trigger();
820 bool affected_by_shadow_weaving;
821 bool ignores_automatic_mastery;
822 unsigned int mind_sear_id;
825 :
base_t( name, player, s ),
826 affected_by_shadow_weaving(
false ),
827 ignores_automatic_mastery(
false ),
828 mind_sear_id( priest().find_class_spell(
"Mind Sear" )->effectN( 1 ).trigger()->
id() )
830 weapon_multiplier = 0.0;
833 bool usable_moving()
const override 835 if ( priest().
buffs.surrender_to_madness->check() )
840 return base_t::usable_moving();
845 if ( priest().specialization() == PRIEST_SHADOW && priest().talents.surrender_to_madness->ok() )
847 if ( priest().buffs.surrender_to_madness_death->check() )
853 if ( priest().specialization() == PRIEST_DISCIPLINE && priest().talents.shadow_covenant->ok() )
855 if ( school == SCHOOL_HOLY && priest().buffs.shadow_covenant->check() )
866 double save_health_percentage = s->target->health_percentage();
870 if ( result_is_hit( s->result ) )
872 if ( priest().specialization() == PRIEST_SHADOW && priest().talents.twist_of_fate->ok() &&
873 ( save_health_percentage < priest().talents.twist_of_fate->effectN( 1 ).base_value() ) )
875 priest().buffs.twist_of_fate->trigger();
878 if ( s->result_amount > 0 )
884 if ( s->result_type == result_amount_type::DMG_DIRECT || priest().bugs )
886 if ( td && td->buffs.wrathful_faerie->check() )
888 priest().trigger_wrathful_faerie();
890 if ( td && td->buffs.wrathful_faerie_fermata->check() )
892 priest().trigger_wrathful_faerie_fermata();
896 if ( td && td->dots.unholy_transfusion->is_ticking() )
898 priest().trigger_unholy_transfusion_healing();
900 if ( priest().legendary.pallid_command->ok() && s->result_type == result_amount_type::DMG_DIRECT )
903 if ( priest().options.pallid_command_allies > 0 )
905 priest().buffs.rigor_mortis->trigger( priest().options.pallid_command_allies );
917 if ( affected_by_shadow_weaving )
920 unsigned int spell_id = id;
921 if ( ignores_automatic_mastery )
923 sim->print_debug(
"{} {} cast does not benefit from Mastery automatically.", *player, name_str );
927 tdm *= priest().shadow_weaving_multiplier( t, spell_id );
930 if ( priest().hungering_void_active( t ) )
932 tdm *= ( 1 + priest().talents.hungering_void_buff->effectN( 1 ).percent() );
942 if ( affected_by_shadow_weaving )
944 ttm *= priest().shadow_weaving_multiplier( t,
id );
947 if ( priest().hungering_void_active( t ) )
949 ttm *= ( 1 + priest().talents.hungering_void_buff->effectN( 1 ).percent() );
957 auto action_id = s->action->
id;
959 if ( !priest().specs.dark_thoughts->ok() )
964 const dot_t* swp = td->dots.shadow_word_pain;
965 const dot_t* vt = td->dots.vampiric_touch;
966 const dot_t* dp = td->dots.devouring_plague;
968 int dots = swp->is_ticking() + vt->is_ticking() + dp->is_ticking();
969 double dark_thoughts_proc_percent = priest().specs.dark_thoughts->effectN( 1 ).percent();
973 if ( priest().bugs && action_id == mind_sear_id )
975 dark_thoughts_proc_percent /= 3;
978 if (
rng().roll( dark_thoughts_proc_percent * swp->is_ticking() ) ||
979 rng().roll( dark_thoughts_proc_percent * vt->is_ticking() ) ||
980 rng().roll( dark_thoughts_proc_percent * dp->is_ticking() ) )
984 sim->print_debug(
"{} activated Dark Thoughts using {} with {} chance with {} dots", *player, *
this,
985 dark_thoughts_proc_percent * dots, dots );
987 priest().buffs.dark_thought->trigger();
992 void assess_damage( result_amount_type type,
action_state_t* s )
override 994 base_t::assess_damage( type, s );
996 if ( aoe == 0 && result_is_hit( s->result ) && priest().
buffs.vampiric_embrace->up() )
997 trigger_vampiric_embrace( s );
1006 double amount = s->result_amount;
1007 amount *= priest().buffs.vampiric_embrace->data().effectN( 1 ).percent();
1009 for (
player_t* ally : sim->player_no_pet_list )
1011 if ( ally->current.sleeping )
1015 ally->resource_gain( RESOURCE_HEALTH, amount, ally->gains.vampiric_embrace );
1017 for (
pet_t*
pet : ally->pet_list )
1019 pet->resource_gain( RESOURCE_HEALTH, amount, pet->gains.vampiric_embrace );
1037 template <
typename Base = buff_t>
1045 : Base( td, name, s,
item )
1051 : Base( &p, name, s,
item )
1058 return *debug_cast<
priest_t*>( Base::source );
1062 return *debug_cast<
priest_t*>( Base::source );
Definition: sc_priest.hpp:54
This is a template for common code between priest buffs.
Definition: sc_priest.hpp:1038
bool ready() override
Is the ability ready based on spell characteristics.
Definition: sc_priest.hpp:843
Priest class definition Derived from player_t.
Definition: sc_priest.hpp:82
Definition: sc_demon_hunter.cpp:42
Definition: sc_death_knight.cpp:45
Definition: sc_priest.hpp:278
Definition: target_specific.hpp:20
Definition: spell_data.hpp:398
Definition: sc_priest.hpp:794
Priest target data Contains target specific things.
Definition: sc_priest.hpp:43
virtual double composite_target_ta_multiplier(player_t *target) const
Tick amount multiplier due to debuffs on the target.
Definition: action.hpp:872
double composite_target_da_multiplier(player_t *t) const override
Direct amount multiplier due to debuffs on the target.
Definition: sc_priest.hpp:913
Definition: action.hpp:47
void init_affected_by()
Initialize all affected_by members and print out debug info.
Definition: sc_priest.hpp:633
Definition: unique_gear.cpp:62
Definition: generic.hpp:567
Definition: sc_priest.hpp:46
Definition: action_state.hpp:20
Definition: runeforge_data.hpp:20
Definition: sc_priest.hpp:818
Definition: covenant.cpp:108
Definition: sc_priest.cpp:16
Definition: sc_shaman.cpp:2212
Definition: sc_priest.hpp:351
double composite_target_ta_multiplier(player_t *t) const override
Tick amount multiplier due to debuffs on the target.
Definition: sc_priest.hpp:938
virtual double composite_target_da_multiplier(player_t *target) const
Direct amount multiplier due to debuffs on the target.
Definition: action.hpp:868
Class for representing InGame time.
Definition: timespan.hpp:37
Definition: sc_priest.hpp:782
Definition: player.hpp:109
Definition: sc_demon_hunter.cpp:1887
Action expression.
Definition: expressions.hpp:79
Definition: covenant.hpp:34
Definition: spell_data.hpp:145
Priest action base class.
Definition: sc_priest.hpp:587
Definition: spell_base.hpp:11
unsigned id
Spell id if available, 0 otherwise.
Definition: action.hpp:80
Random number generation.
Definition: action.hpp:37
A wrapper object to enable dynamic pet spawns in simulationcraft.
Definition: pet_spawner.hpp:56
Definition: sc_demon_hunter.cpp:44
Simulation engine.
Definition: sim.hpp:61
Definition: actor_target_data.hpp:15
virtual bool ready()
Is the ability ready based on spell characteristics.
Definition: action.cpp:2362