SimulationCraft
SimulationCraft is a tool to explore combat mechanics in the popular MMO RPG World of Warcraft (tm).
action.hpp
1 // ==========================================================================
2 // Dedmonwakeen's Raid DPS/TPS Simulator.
3 // Send questions to [email protected]
4 // ==========================================================================
5 
6 #pragma once
7 
8 #include "config.hpp"
9 #include "dbc/data_definitions.hh"
10 #include "player/target_specific.hpp"
11 #include "sc_enums.hpp"
12 #include "util/timespan.hpp"
13 #include "util/generic.hpp"
14 #include "util/string_view.hpp"
15 #include "util/format.hpp"
16 
17 #include <array>
18 #include <vector>
19 #include <memory>
20 #include <string>
21 
22 struct action_priority_t;
24 struct action_state_t;
25 struct spell_data_t;
26 struct cooldown_t;
27 class conduit_data_t;
28 struct dot_t;
29 struct event_t;
30 struct expr_t;
31 struct gain_t;
32 struct item_t;
33 struct option_t;
34 struct sim_t;
35 struct player_t;
36 struct proc_t;
37 namespace rng {
38  struct rng_t;
39 }
40 struct spelleffect_data_t;
41 struct stats_t;
42 struct travel_event_t;
43 struct weapon_t;
44 
45 // Action ===================================================================
46 
47 struct action_t : private noncopyable
48 {
49 public:
50  const spell_data_t* s_data;
51  const spell_data_t* s_data_reporting;
52  sim_t* sim;
53  const action_e type;
54  std::string name_str;
55  std::string name_str_reporting;
56  player_t* const player;
57  player_t* target;
58 
60  const item_t* item;
61 
64 
72 
74  school_e school;
75 
77  std::vector<school_e> base_schools;
78 
80  unsigned id;
81 
88 
90  resource_e resource_current;
91 
93  int aoe;
94 
96  bool dual;
97 
99  bool callbacks;
100 
103 
106 
108  bool special;
109 
111  bool channeled;
112 
114  bool sequence;
115 
121  bool quiet;
122 
132 
141 
144 
147 
150 
153 
156 
158  double action_skill;
159 
162 
165 
167  bool repeating;
168 
173  bool harmful;
174 
180  bool proc;
181 
184 
187 
190 
192  bool may_hit, may_miss, may_dodge, may_parry, may_glance, may_block, may_crit, tick_may_crit;
193 
195  bool tick_zero;
196 
199 
207 
210 
213 
217 
220 
227 
230 
233 
236 
237 
240 
241  bool hit_any_target;
242 
245 
247  attack_power_type ap_type;
248 
254  dot_behavior_e dot_behavior;
255 
257  timespan_t ability_lag, ability_lag_stddev;
258 
261 
263  gcd_haste_type gcd_type;
264 
267 
269  double range;
270 
276  double radius;
277 
280 
282  struct {
283  double direct, tick;
284  } attack_power_mod, spell_power_mod;
285 
293  double amount_delta;
294 
297 
300 
303 
304  // Maximum number of DoT stacks.
305  int dot_max_stack;
306 
308  std::array< double, RESOURCE_MAX > base_costs, secondary_costs;
309 
311  std::array< double, RESOURCE_MAX > base_costs_per_tick;
312 
314  double base_dd_min;
315 
317  double base_dd_max;
318 
320  double base_td;
321 
324 
327 
330 
331  double base_hit;
332  double base_crit;
333  double crit_multiplier;
334  double crit_bonus_multiplier;
335  double crit_bonus;
336  double base_dd_adder;
337  double base_ta_adder;
338 
341 
344 
347 
350 
353 
356 
359  double dynamic_recharge_rate_multiplier;
360 
363 
365  double travel_speed;
366 
368  double travel_delay;
369 
372 
373  // Amount of resource for the energize to grant.
374  double energize_amount;
375 
384  movement_direction_type movement_directionality;
385 
388 
389  std::vector< action_t* > child_action;
390 
393 
396 
399 
400  // Gain object of the same name as the action
401  gain_t* gain;
402 
403  // Sets the behavior for when this action's resource energize occur.
404  action_energize energize_type;
405 
406  // Resource for the energize to grant.
407  resource_e energize_resource;
408 
417  cooldown_t* cooldown, *internal_cooldown;
418 
421 
424 
427 
430 
433 
436 
439 
441  char marker;
442 
443  /* The last time the action was executed */
444  timespan_t last_used;
445 
446  // Options
447  struct options_t {
456  int moving;
457 
458  int wait_on_ready;
459 
460  int max_cycle_targets;
461 
462  int target_number;
463 
465  bool interrupt;
466 
472  bool chain;
473 
474  int cycle_targets;
475 
476  bool cycle_players;
477 
478  bool interrupt_immediate;
479 
480  std::string if_expr_str;
481  std::string target_if_str;
482  std::string interrupt_if_expr_str;
483  std::string early_chain_if_expr_str;
484  std::string cancel_if_expr_str;
485  std::string sync_str;
486  std::string target_str;
487  options_t();
488  } option;
489 
490  bool interrupt_global;
491 
492  std::unique_ptr<expr_t> if_expr;
493 
494  enum target_if_mode_e
495  {
496  TARGET_IF_NONE,
497  TARGET_IF_FIRST,
498  TARGET_IF_MIN,
499  TARGET_IF_MAX
500  } target_if_mode;
501 
502  std::unique_ptr<expr_t> target_if_expr;
503  std::unique_ptr<expr_t> interrupt_if_expr;
504  std::unique_ptr<expr_t> early_chain_if_expr;
505  std::unique_ptr<expr_t> cancel_if_expr;
506  action_t* sync_action;
507  std::string signature_str;
508  target_specific_t<dot_t> target_specific_dot;
509  action_priority_list_t* action_list;
510 
518 
519  // Tracking proc triggered when action fails to execute after being queued.
520  // Can be overridden by class modules for tracking purposes.
521  proc_t* queue_failed_proc;
522  uint_least64_t total_executions;
523 
531  std::unique_ptr<cooldown_t> line_cooldown;
532  const action_priority_t* signature;
533 
534 
537 
540 
541  unsigned snapshot_flags;
542 
543  unsigned update_flags;
544 
553  struct target_cache_t {
554  std::vector< player_t* > list;
555  bool is_valid;
556  target_cache_t() : is_valid( false ) {}
557  } mutable target_cache;
558 
559 private:
560  std::vector<std::unique_ptr<option_t>> options;
561  action_state_t* state_cache;
562  std::vector<travel_event_t*> travel_events;
563 public:
564  action_t( action_e type, util::string_view token, player_t* p );
565  action_t( action_e type, util::string_view token, player_t* p, const spell_data_t* s );
566 
567  virtual ~action_t();
568 
569  void add_child( action_t* child );
570 
571  void add_option( std::unique_ptr<option_t> new_option );
572 
573  void check_spec( specialization_e );
574 
575  void check_spell( const spell_data_t* );
576 
587  const spell_data_t& data() const
588  { return ( *s_data ); }
589 
590  // return s_data_reporting if available, otherwise fallback to s_data
591  const spell_data_t& data_reporting() const;
592 
593  dot_t* find_dot( player_t* target ) const;
594 
595  bool is_aoe() const
596  {
597  const int num_targets = n_targets();
598  return num_targets == -1 || num_targets > 0;
599  }
600 
601  const char* name() const
602  { return name_str.c_str(); }
603 
604  const char* name_reporting() const;
605 
606  size_t num_travel_events() const
607  { return travel_events.size(); }
608 
609  bool has_travel_events() const
610  { return ! travel_events.empty(); }
611 
612  timespan_t shortest_travel_event() const;
613 
614  bool has_travel_events_for( const player_t* target ) const;
615 
617  virtual bool has_amount_result() const
618  {
619  return attack_power_mod.direct > 0 || attack_power_mod.tick > 0
620  || spell_power_mod.direct > 0 || spell_power_mod.tick > 0
621  || (weapon && weapon_multiplier > 0);
622  }
623 
624  void parse_spell_data( const spell_data_t& );
625 
626  void parse_effect_direct_mods( const spelleffect_data_t& spelleffect_data, bool item_scaling );
627  void parse_effect_periodic_mods( const spelleffect_data_t& spelleffect_data, bool item_scaling );
628  void parse_effect_period( const spelleffect_data_t& );
629 
630  void parse_effect_data( const spelleffect_data_t& );
631 
632  void parse_target_str();
633 
634  void remove_travel_event( travel_event_t* e );
635 
636  void reschedule_queue_event();
637 
638  rng::rng_t& rng();
639 
640  rng::rng_t& rng() const;
641 
642  player_t* select_target_if_target();
643 
644  void apply_affecting_aura( const spell_data_t* );
645  void apply_affecting_effect( const spelleffect_data_t& effect );
646  void apply_affecting_conduit( const conduit_data_t& conduit, int effect_num = 1 );
647  void apply_affecting_conduit_effect( const conduit_data_t& conduit, size_t effect_num );
648 
649  action_state_t* get_state( const action_state_t* = nullptr );
650 
651  void execute_on_target( player_t*, double = -1.0 );
652 
653 private:
654  friend struct action_state_t;
655  void release_state( action_state_t* );
656 
657 public:
658 
659  // =======================
660  // Const virtual functions
661  // =======================
662 
663  virtual bool verify_actor_level() const;
664 
665  virtual bool verify_actor_spec() const;
666 
667  virtual bool verify_actor_weapon() const;
668 
669  virtual double cost() const;
670 
671  virtual double base_cost() const;
672 
673  virtual double cost_per_tick( resource_e ) const;
674 
675  virtual timespan_t cooldown_duration() const;
676 
677  virtual timespan_t gcd() const;
678 
679  virtual double false_positive_pct() const;
680 
681  virtual double false_negative_pct() const;
682 
683  virtual timespan_t execute_time() const
684  { return base_execute_time; }
685 
686  virtual timespan_t tick_time( const action_state_t* state ) const;
687 
688  virtual timespan_t travel_time() const;
689 
690  virtual timespan_t distance_targeting_travel_time( action_state_t* s ) const;
691 
692  virtual result_e calculate_result( action_state_t* /* state */ ) const
693  {
694  assert( false );
695  return RESULT_UNKNOWN;
696  }
697 
698  virtual block_result_e calculate_block_result( action_state_t* s ) const;
699 
700  virtual double calculate_direct_amount( action_state_t* state ) const;
701 
702  virtual double calculate_tick_amount( action_state_t* state, double multiplier ) const;
703 
704  virtual double calculate_weapon_damage( double attack_power ) const;
705 
706  virtual double calculate_crit_damage_bonus( action_state_t* s ) const;
707 
708  virtual double recharge_multiplier( const cooldown_t& ) const
709  { return base_recharge_multiplier * dynamic_recharge_multiplier; }
710 
711  virtual double recharge_rate_multiplier( const cooldown_t& ) const
712  { return base_recharge_rate_multiplier * dynamic_recharge_rate_multiplier; }
713 
715  virtual timespan_t cooldown_base_duration( const cooldown_t& cd ) const;
716 
717  virtual resource_e current_resource() const
718  { return resource_current; }
719 
720  virtual int n_targets() const
721  { return aoe; }
722 
723  virtual double last_tick_factor( const dot_t* d, timespan_t time_to_tick, timespan_t duration ) const;
724 
725  virtual result_amount_type amount_type( const action_state_t* /* state */, bool /* periodic */ = false ) const
726  { return result_amount_type::NONE; }
727 
728  virtual result_amount_type report_amount_type( const action_state_t* state ) const;
729 
731  virtual school_e get_school() const
732  { return school; }
733 
734  virtual double miss_chance( double /* hit */, player_t* /* target */ ) const
735  { return 0; }
736 
737  virtual double dodge_chance( double /* expertise */, player_t* /* target */ ) const
738  { return 0; }
739 
740  virtual double parry_chance( double /* expertise */, player_t* /* target */ ) const
741  { return 0; }
742 
743  virtual double glance_chance( int /* delta_level */ ) const
744  { return 0; }
745 
746  virtual double block_chance( action_state_t* /* state */ ) const
747  { return 0; }
748 
749  virtual double crit_block_chance( action_state_t* /* state */ ) const
750  { return 0; }
751 
752  virtual double total_crit_bonus( const action_state_t* /* state */ ) const; // Check if we want to move this into the stateless system.
753 
754  virtual int num_targets() const;
755 
756  virtual size_t available_targets( std::vector< player_t* >& ) const;
757 
758  virtual std::vector< player_t* >& target_list() const;
759 
760  virtual player_t* find_target_by_number( int number ) const;
761 
762  virtual bool execute_targeting( action_t* action ) const;
763 
764  virtual std::vector<player_t*>& targets_in_range_list( std::vector< player_t* >& tl ) const;
765 
766  virtual std::vector<player_t*>& check_distance_targeting( std::vector< player_t* >& tl ) const;
767 
768  virtual double ppm_proc_chance( double PPM ) const;
769 
770  virtual bool usable_moving() const;
771 
772  virtual timespan_t composite_dot_duration( const action_state_t* ) const;
773 
774  virtual double attack_direct_power_coefficient( const action_state_t* ) const
775  { return attack_power_mod.direct; }
776 
777  virtual double amount_delta_modifier( const action_state_t* ) const
778  { return amount_delta; }
779 
780  virtual double attack_tick_power_coefficient( const action_state_t* ) const
781  { return attack_power_mod.tick; }
782 
783  virtual double spell_direct_power_coefficient( const action_state_t* ) const
784  { return spell_power_mod.direct; }
785 
786  virtual double spell_tick_power_coefficient( const action_state_t* ) const
787  { return spell_power_mod.tick; }
788 
789  virtual double base_da_min( const action_state_t* ) const
790  { return base_dd_min; }
791 
792  virtual double base_da_max( const action_state_t* ) const
793  { return base_dd_max; }
794 
795  virtual double base_ta( const action_state_t* ) const
796  { return base_td; }
797 
798  virtual double bonus_da( const action_state_t* ) const
799  { return base_dd_adder; }
800 
801  virtual double bonus_ta( const action_state_t* ) const
802  { return base_ta_adder; }
803 
804  virtual double range_() const
805  { return range; }
806 
807  virtual double radius_() const
808  { return radius; }
809 
810  virtual double action_multiplier() const
811  { return base_multiplier; }
812 
813  virtual double action_da_multiplier() const
814  { return base_dd_multiplier; }
815 
816  virtual double action_ta_multiplier() const
817  { return base_td_multiplier; }
818 
819  virtual double composite_hit() const
820  { return base_hit; }
821 
822  virtual double composite_crit_chance() const
823  { return base_crit; }
824 
825  virtual double composite_crit_chance_multiplier() const
826  { return 1.0; }
827 
828  virtual double composite_crit_damage_bonus_multiplier() const
829  { return crit_bonus_multiplier; }
830 
831  virtual double composite_haste() const
832  { return 1.0; }
833 
834  virtual attack_power_type get_attack_power_type() const
835  { return ap_type; }
836 
837  virtual double composite_attack_power() const;
838 
839  virtual double composite_spell_power() const;
840 
841  virtual double composite_target_armor( player_t* t ) const;
842 
843  virtual double composite_target_crit_chance( player_t* target ) const;
844 
845  virtual double composite_target_crit_damage_bonus_multiplier( player_t* ) const
846  { return 1.0; }
847 
848  virtual double composite_target_multiplier( player_t* target ) const;
849 
850  virtual double composite_target_damage_vulnerability( player_t* target ) const;
851 
852  virtual double composite_versatility( const action_state_t* ) const
853  { return 1.0; }
854 
855  virtual double composite_leech( const action_state_t* ) const;
856 
857  virtual double composite_run_speed() const;
858 
859  virtual double composite_avoidance() const;
860 
861  virtual double composite_corruption() const;
862 
863  virtual double composite_corruption_resistance() const;
864 
865  virtual double composite_total_corruption() const;
866 
868  virtual double composite_target_da_multiplier( player_t* target ) const
869  { return composite_target_multiplier( target ); }
870 
872  virtual double composite_target_ta_multiplier( player_t* target ) const
873  { return composite_target_multiplier( target ); }
874 
875  virtual double composite_da_multiplier(const action_state_t* /* s */) const;
876 
878  virtual double composite_ta_multiplier(const action_state_t* /* s */) const;
879 
881  virtual double composite_persistent_multiplier(const action_state_t*) const;
882 
889  virtual double composite_aoe_multiplier( const action_state_t* ) const
890  { return 1.0; }
891 
892  virtual double composite_target_mitigation(player_t* t, school_e s) const;
893 
894  virtual double composite_player_critical_multiplier(const action_state_t* s) const;
895 
897  virtual proc_types proc_type() const
898  { return PROC1_INVALID; }
899 
900  virtual bool has_movement_directionality() const;
901 
902  virtual double composite_teleport_distance( const action_state_t* ) const
903  { return base_teleport_distance; }
904 
905  virtual timespan_t calculate_dot_refresh_duration( const dot_t*, timespan_t triggered_duration ) const;
906 
907  // Helper for dot refresh expression, overridable on action level
908  virtual bool dot_refreshable( const dot_t* dot, timespan_t triggered_duration ) const;
909 
910  virtual double composite_energize_amount( const action_state_t* ) const
911  { return energize_amount; }
912 
913  virtual resource_e energize_resource_() const
914  { return energize_resource; }
915 
916  virtual action_energize energize_type_() const
917  { return energize_type; }
918 
919  virtual gain_t* energize_gain( const action_state_t* /* state */ ) const
920  { return gain; }
921 
922  // ==========================
923  // mutating virtual functions
924  // ==========================
925 
926  virtual void parse_options( util::string_view options_str );
927 
928  virtual void consume_resource();
929 
930  virtual void execute();
931 
932  virtual void tick(dot_t* d);
933 
934  virtual void last_tick(dot_t* d);
935 
936  virtual void assess_damage( result_amount_type, action_state_t* state );
937 
938  virtual void record_data(action_state_t* data);
939 
940  virtual void schedule_execute( action_state_t* state = nullptr );
941 
942  virtual void queue_execute( execute_type type );
943 
944  virtual void reschedule_execute(timespan_t time);
945 
946  virtual void start_gcd();
947 
948  virtual void update_ready(timespan_t cd_duration = timespan_t::min());
949 
951  virtual bool ready();
954  virtual bool action_ready();
956  virtual bool select_target();
958  virtual bool target_ready( player_t* target );
959 
961  virtual bool usable_during_current_cast() const;
963  virtual bool usable_during_current_gcd() const;
964 
965  virtual void init();
966 
967  virtual void init_finished();
968 
969  virtual void reset();
970 
971  virtual void cancel();
972 
973  virtual void interrupt_action();
974 
975  // Perform activation duties for the action. This is used to "enable" the action when the actor
976  // becomes active.
977  virtual void activate();
978 
979  virtual std::unique_ptr<expr_t> create_expression(util::string_view name);
980 
981  virtual action_state_t* new_state();
982 
983  virtual void do_schedule_travel( action_state_t*, timespan_t );
984 
985  virtual void schedule_travel( action_state_t* );
986 
987  virtual void impact( action_state_t* );
988 
989  virtual void trigger_dot( action_state_t* );
990 
991  virtual void snapshot_internal( action_state_t*, unsigned flags, result_amount_type );
992 
993  virtual void snapshot_state( action_state_t* s, unsigned flags, result_amount_type rt )
994  { snapshot_internal( s, flags, rt ); }
995 
996  virtual void snapshot_state( action_state_t* s, result_amount_type rt )
997  { snapshot_state( s, snapshot_flags, rt ); }
998 
999  virtual void update_state( action_state_t* s, unsigned flags, result_amount_type rt )
1000  { snapshot_internal( s, flags, rt ); }
1001 
1002  virtual void update_state( action_state_t* s, result_amount_type rt )
1003  { update_state( s, update_flags, rt ); }
1004 
1005  event_t* start_action_execute_event( timespan_t time, action_state_t* state = nullptr );
1006 
1007  virtual bool consume_cost_per_tick( const dot_t& dot );
1008 
1009  virtual void do_teleport( action_state_t* );
1010 
1011  virtual dot_t* get_dot( player_t* = nullptr );
1012 
1013  virtual void acquire_target( retarget_source /* event */, player_t* /* context */, player_t* /* candidate_target */ );
1014 
1015  virtual void set_target( player_t* target );
1016 
1017  virtual void gain_energize_resource( resource_e resource_type, double amount, gain_t* gain );
1018 
1019  // ================
1020  // Static functions
1021  // ================
1022 
1023  static bool result_is_hit( result_e r )
1024  {
1025  return( r == RESULT_HIT ||
1026  r == RESULT_CRIT ||
1027  r == RESULT_GLANCE ||
1028  r == RESULT_NONE );
1029  }
1030 
1031  static bool result_is_miss( result_e r )
1032  {
1033  return( r == RESULT_MISS ||
1034  r == RESULT_DODGE ||
1035  r == RESULT_PARRY );
1036  }
1037 
1038  static bool result_is_block( block_result_e r )
1039  {
1040  return( r == BLOCK_RESULT_BLOCKED || r == BLOCK_RESULT_CRIT_BLOCKED );
1041  }
1042 
1043  friend void sc_format_to( const action_t&, fmt::format_context::iterator );
1044 };
1045 
1047 {
1048  action_priority_list_t* alist;
1049 
1050  call_action_list_t( player_t*, util::string_view );
1051  void execute() override
1052  { assert( 0 ); }
1053 };
1054 
1056 {
1057  action_priority_list_t* alist;
1058 
1059  swap_action_list_t( player_t* player, util::string_view options_str,
1060  util::string_view name = "swap_action_list" );
1061 
1062  void execute() override;
1063  bool ready() override;
1064 };
1065 
1067 {
1068  run_action_list_t( player_t* player, util::string_view options_str );
1069 
1070  void execute() override;
1071 };
bool interrupt
Interrupt option.
Definition: action.hpp:465
Definition: action.hpp:1046
attack_power_type ap_type
Type of attack power used by the ability.
Definition: action.hpp:247
double base_dd_multiplier
base direct damage multiplier
Definition: action.hpp:323
Definition: action.hpp:1066
Definition: option.hpp:38
bool interrupt_auto_attack
False if channeled action does not reschedule autoattacks, used on abilities such as bladestorm...
Definition: action.hpp:149
double base_recharge_rate_multiplier
A second static action cooldown duration multiplier that also reduces the effectiveness of flat coold...
Definition: action.hpp:355
double min_travel_time
Minimum travel time in seconds.
Definition: action.hpp:371
bool ground_aoe
This ability leaves a ticking dot on the ground, and doesn&#39;t move when the target moves...
Definition: action.hpp:229
virtual school_e get_school() const
Use when damage schools change during runtime.
Definition: action.hpp:731
bool interrupt_immediate_occurred
Did a channel action have an interrupt_immediate used to cancel it on it.
Definition: action.hpp:239
Definition: action_state.hpp:132
bool is_precombat
Whether the action is used from the precombat action list. Will be set up automatically by action_t::...
Definition: action.hpp:186
Definition: gain.hpp:17
double last_resource_cost
Last available, effectively used resource cost.
Definition: action.hpp:435
action_state_t * execute_state
State of the last execute()
Definition: action.hpp:536
event_t * execute_event
Execute event (e.g., "casting" of the action)
Definition: action.hpp:423
timespan_t trigger_gcd
Length of unhasted gcd triggered when used.
Definition: action.hpp:266
double amount_delta
full damage variation in %
Definition: action.hpp:293
Definition: action_priority_list.hpp:20
bool chain
Chain can be used to re-cast a channeled spell at the beginning of its last tick. ...
Definition: action.hpp:472
timespan_t dot_duration
Default full duration of dot.
Definition: action.hpp:302
dot_t * parent_dot
This is used to cache/track spells that have a parent driver, such as most channeled/ground aoe abili...
Definition: action.hpp:387
Definition: cooldown.hpp:26
double base_dd_min
Minimum base direct damage.
Definition: action.hpp:314
std::array< double, RESOURCE_MAX > base_costs_per_tick
Cost of using ability per periodic effect tick.
Definition: action.hpp:311
double chain_multiplier
Damage modifier for chained/AoE, exponentially increased by number of target hit. ...
Definition: action.hpp:343
bool direct_tick
Used with DoT Drivers, tells simc that the direct hit is actually a tick.
Definition: action.hpp:161
bool reset_auto_attack
True if channeled action fully resets the autoattack timer rather than simply delaying it...
Definition: action.hpp:152
virtual bool has_amount_result() const
Determine if the action can have a resulting damage/heal amount > 0.
Definition: action.hpp:617
const spell_data_t & data() const
Spell Data associated with the action.
Definition: action.hpp:587
bool tick_on_application
Whether or not the ability/dot ticks when it is first applied, but not on refresh applications...
Definition: action.hpp:198
dot_behavior_e dot_behavior
Behavior of dot.
Definition: action.hpp:254
school_e school
What type of damage this spell does.
Definition: action.hpp:74
action_t * tick_action
This action will execute every tick.
Definition: action.hpp:392
Definition: spell_data.hpp:398
gcd_haste_type gcd_type
Hasted GCD stat type. One of HASTE_NONE, HASTE_ATTACK, HASTE_SPELL, SPEED_ATTACK, SPEED_SPELL...
Definition: action.hpp:263
Target Cache System.
Definition: action.hpp:553
double weapon_power_mod
Weapon AP multiplier.
Definition: action.hpp:279
action_state_t * pre_execute_state
Optional - if defined before execute(), will be copied into execute_state.
Definition: action.hpp:539
virtual double composite_target_ta_multiplier(player_t *target) const
Tick amount multiplier due to debuffs on the target.
Definition: action.hpp:872
int internal_id
player & action-name unique id.
Definition: action.hpp:87
timespan_t ground_aoe_duration
Duration of the ground area trigger.
Definition: action.hpp:244
bool ignores_armor
Used with psudo-DoT effects, tells us to ignore armor even if the physical damage is direct...
Definition: action.hpp:164
cooldown_t * cooldown
Used to manipulate cooldown duration and charges.
Definition: action.hpp:417
timespan_t time_to_travel
Last available, effectively used travel time.
Definition: action.hpp:432
virtual double composite_aoe_multiplier(const action_state_t *) const
Generic aoe multiplier for the action.
Definition: action.hpp:889
bool usable_while_casting
True if ability is usable while casting another spell.
Definition: action.hpp:146
Definition: action.hpp:47
std::array< double, RESOURCE_MAX > base_costs
Cost of using the ability.
Definition: action.hpp:308
action_t * execute_action
This action will execute every execute.
Definition: action.hpp:395
Definition: action.hpp:447
stats_t * stats
action statistics, merged by action-name
Definition: action.hpp:420
timespan_t min_gcd
The minimum gcd triggered no matter the haste.
Definition: action.hpp:260
double reduced_aoe_targets
Reduce damage to targets when total targets is greater than value Formula used is <damage per="" targ...
Definition: action.hpp:216
Definition: action_state.hpp:20
bool ignore_false_positive
Used for actions that will do awful things to the sim when a "false positive" skill roll happens...
Definition: action.hpp:155
double base_multiplier
base damage multiplier (direct and tick damage)
Definition: action.hpp:329
timespan_t base_tick_time
Amount of time the ability uses between ticks.
Definition: action.hpp:299
bool tick_zero
Whether or not the ability/dot ticks immediately on usage.
Definition: action.hpp:195
double radius
AoE ability area of influence.
Definition: action.hpp:276
double travel_speed
Missile travel speed in yards / second.
Definition: action.hpp:365
movement_direction_type movement_directionality
Movement Direction.
Definition: action.hpp:384
double base_td
Base tick damage.
Definition: action.hpp:320
bool harmful
Simplified: Will the ability pull the boss if used.
Definition: action.hpp:173
Definition: rng.hpp:305
bool is_interrupt
Whether or not the action is an interrupt (specifically triggers PF2_CAST_INTERRUPT callbacks) ...
Definition: action.hpp:183
bool special
Whether or not the spell uses the yellow attack hit table.
Definition: action.hpp:108
Definition: proc.hpp:18
bool background
Enables/Disables direct execution of the ability in an action list.
Definition: action.hpp:131
timespan_t ability_lag
Ability specific extra player ready delay.
Definition: action.hpp:257
weapon_t * weapon
Weapon used for this ability. If set extra weapon damage is calculated.
Definition: action.hpp:63
bool not_a_proc
Specifies that a spell is not a proc and can be considered for triggering only proc from class abilit...
Definition: action.hpp:105
proc_t * starved_proc
Resource starvation tracking.
Definition: action.hpp:517
double weapon_multiplier
Weapon damage for the ability.
Definition: action.hpp:340
bool initialized
Is the action initialized? (action_t::init ran successfully)
Definition: action.hpp:189
bool dynamic_tick_action
Used with tick_action, tells tick_action to update state on every tick.
Definition: action.hpp:235
Definition: item.hpp:60
double action_skill
Skill is now done per ability, with the default being set to the player option.
Definition: action.hpp:158
bool use_off_gcd
Check if action is executable between GCD&#39;s.
Definition: action.hpp:140
bool may_hit
Self explanatory.
Definition: action.hpp:192
double range
This is how far away the target can be from the player, and still be hit or targeted.
Definition: action.hpp:269
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
int aoe
The amount of targets that an ability impacts on. -1 will hit all targets.
Definition: action.hpp:93
Definition: player.hpp:109
bool quiet
Disables/enables reporting of this action.
Definition: action.hpp:121
timespan_t time_to_execute
Last available, effectively used execute time.
Definition: action.hpp:429
double base_teleport_distance
Maximum distance that the ability can travel. Used on abilities that instantly move you...
Definition: action.hpp:362
timespan_t base_execute_time
Amount of time the ability uses to execute before modifiers.
Definition: action.hpp:296
bool use_while_casting
True if ability should be used while casting another spell.
Definition: action.hpp:143
Definition: dot.hpp:27
Action expression.
Definition: expressions.hpp:79
double dynamic_recharge_multiplier
Dynamically adjustable action cooldown duration multipliers. These are reset to 1.0 in action_t::reset.
Definition: action.hpp:358
const item_t * item
Item back-pointer for trinket-sourced actions so we can show proper tooltips in reports.
Definition: action.hpp:60
Definition: covenant.hpp:34
Definition: spell_data.hpp:145
resource_e resource_current
What resource does this ability use.
Definition: action.hpp:90
bool consume_per_tick_
Need to consume per tick?
Definition: action.hpp:209
double base_td_multiplier
base tick damage multiplier
Definition: action.hpp:326
std::vector< school_e > base_schools
What base school components this spell has.
Definition: action.hpp:77
Definition: action_priority_list.hpp:35
bool sequence
mark this as a sequence_t action
Definition: action.hpp:114
unsigned id
Spell id if available, 0 otherwise.
Definition: action.hpp:80
Random number generation.
Definition: action.hpp:37
double base_dd_max
Maximum base direct damage.
Definition: action.hpp:317
virtual proc_types proc_type() const
Action proc type, needed for dynamic aoe stuff and such.
Definition: action.hpp:897
double chain_bonus_damage
Damage modifier for chained/AoE, linearly increasing with each target hit.
Definition: action.hpp:346
Definition: weapon.hpp:12
Definition: event.hpp:45
bool split_aoe_damage
Split damage evenly between targets.
Definition: action.hpp:212
double base_aoe_multiplier
Static reduction of damage for AoE.
Definition: action.hpp:349
Simulation engine.
Definition: sim.hpp:61
bool allow_class_ability_procs
Allows triggering of procs marked to only proc from class abilities.
Definition: action.hpp:102
helper class to make a class non-copyable
Definition: generic.hpp:81
Definition: action.hpp:1055
bool normalize_weapon_speed
Normalize weapon speed for weapon damage calculations.
Definition: action.hpp:226
bool hasted_ticks
Whether or not ticks scale with haste.
Definition: action.hpp:206
bool round_base_dmg
Round spell base damage to integer before using.
Definition: action.hpp:232
bool channeled
Tells the sim to not perform any other actions, as the ability is channeled.
Definition: action.hpp:111
double travel_delay
Missile travel delay in seconds.
Definition: action.hpp:368
bool callbacks
enables/disables proc callback system on the action, like trinkets, enchants, rppm.
Definition: action.hpp:99
player_t * default_target
Default target is needed, otherwise there&#39;s a chance that cycle_targets option will MAJORLY mess up t...
Definition: action.hpp:71
std::unique_ptr< cooldown_t > line_cooldown
Cooldown for specific APL line.
Definition: action.hpp:531
int moving
moving (default: -1), when different from -1, will flag the action as usable only when the players ar...
Definition: action.hpp:456
action_t * impact_action
This action will execute every impact - Useful for AoE debuffs.
Definition: action.hpp:398
char marker
Marker for sample action priority list reporting.
Definition: action.hpp:441
bool dual
If set to true, this action will not be counted toward total amount of executes in reporting...
Definition: action.hpp:96
bool repeating
Used for abilities that repeat themselves without user interaction, only used on autoattacks.
Definition: action.hpp:167
double base_recharge_multiplier
Static action cooldown duration multiplier.
Definition: action.hpp:352
Definition: stats.hpp:25
int full_amount_targets
If reduced_aoe_targets > 0, the number of target(s) that will take full unreduced amount...
Definition: action.hpp:219
bool proc
Whether or not this ability is a proc.
Definition: action.hpp:180
int num_targets_hit
Last available number of targets effectively hit.
Definition: action.hpp:438
event_t * queue_event
Queue delay event (for queueing cooldowned actions shortly before they execute.
Definition: action.hpp:426