forked from simulationcraft/simc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsc_warrior.cpp
11040 lines (9413 loc) · 380 KB
/
sc_warrior.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// ==========================================================================
// Dedmonwakeen's DPS-DPM Simulator.
// Send questions to [email protected]
// ==========================================================================
#include "dbc/specialization.hpp"
#include "simulationcraft.hpp"
#include "player/player_talent_points.hpp"
namespace
{ // UNNAMED NAMESPACE
// ==========================================================================
// Warrior
// To Do: Clean up green text
// Fury - Gathering Storm tick behavior - Fury needs 2 more
// Arms -
// ==========================================================================
struct warrior_t;
// Finds an action with the given name. If no action exists, a new one will
// be created.
//
// Use this with secondary background actions to ensure the player only has
// one copy of the action.
// Shamelessly borrowed from the mage module
template <typename Action, typename Actor, typename... Args>
action_t* get_action( util::string_view name, Actor* actor, Args&&... args )
{
action_t* a = actor->find_action( name );
if ( !a )
a = new Action( name, actor, std::forward<Args>( args )... );
assert( dynamic_cast<Action*>( a ) && a->name_str == name && a->background );
return a;
}
struct warrior_td_t : public actor_target_data_t
{
dot_t* dots_deep_wounds;
dot_t* dots_gushing_wound;
dot_t* dots_ravager;
dot_t* dots_rend;
dot_t* dots_thunderous_roar;
buff_t* debuffs_colossus_smash;
buff_t* debuffs_concussive_blows;
buff_t* debuffs_executioners_precision;
buff_t* debuffs_exploiter;
buff_t* debuffs_fatal_mark;
buff_t* debuffs_siegebreaker;
buff_t* debuffs_demoralizing_shout;
buff_t* debuffs_taunt;
buff_t* debuffs_punish;
buff_t* debuffs_callous_reprisal;
bool hit_by_fresh_meat;
warrior_t& warrior;
warrior_td_t( player_t* target, warrior_t& p );
void target_demise();
};
using data_t = std::pair<std::string, simple_sample_data_with_min_max_t>;
using simple_data_t = std::pair<std::string, simple_sample_data_t>;
template <typename T_CONTAINER, typename T_DATA>
T_CONTAINER* get_data_entry( util::string_view name, std::vector<T_DATA*>& entries )
{
for ( size_t i = 0; i < entries.size(); i++ )
{
if ( entries[ i ]->first == name )
{
return &( entries[ i ]->second );
}
}
entries.push_back( new T_DATA( name, T_CONTAINER() ) );
return &( entries.back()->second );
}
struct warrior_t : public player_t
{
public:
event_t *rampage_driver;
std::vector<attack_t*> rampage_attacks;
bool non_dps_mechanics, warrior_fixed_time;
int into_the_fray_friends;
int never_surrender_percentage;
auto_dispose<std::vector<data_t*> > cd_waste_exec, cd_waste_cumulative;
auto_dispose<std::vector<simple_data_t*> > cd_waste_iter;
// Active
struct active_t
{
action_t* natures_fury;
action_t* ancient_aftershock_pulse;
action_t* kyrian_spear_attack;
action_t* spear_of_bastion_attack;
action_t* deep_wounds_ARMS;
action_t* deep_wounds_PROT;
action_t* fatality;
action_t* signet_avatar;
action_t* signet_bladestorm_a;
action_t* signet_bladestorm_f;
action_t* signet_recklessness;
action_t* torment_avatar;
action_t* torment_bladestorm;
action_t* torment_odyns_fury;
action_t* torment_recklessness;
action_t* tough_as_nails;
action_t* iron_fortress; // Prot azerite trait
action_t* bastion_of_might_ip; // 0 rage IP from Bastion of Might azerite trait
} active;
// Buffs
struct buffs_t
{
buff_t* ashen_juggernaut;
buff_t* avatar;
buff_t* ayalas_stone_heart;
buff_t* bastion_of_might; // the mastery buff
buff_t* bastion_of_might_vop; // bastion of might proc from VoP
buff_t* battle_stance;
buff_t* battering_ram;
buff_t* berserker_rage;
buff_t* berserker_stance;
buff_t* bladestorm;
buff_t* bloodcraze;
buff_t* bounding_stride;
buff_t* brace_for_impact;
buff_t* charge_movement;
buff_t* concussive_blows;
buff_t* dancing_blades;
buff_t* defensive_stance;
buff_t* die_by_the_sword;
buff_t* elysian_might;
buff_t* enrage;
buff_t* frenzy;
buff_t* heroic_leap_movement;
buff_t* hurricane;
buff_t* hurricane_driver;
buff_t* ignore_pain;
buff_t* intercept_movement;
buff_t* intervene_movement;
buff_t* into_the_fray;
buff_t* juggernaut;
buff_t* juggernaut_prot;
buff_t* last_stand;
buff_t* meat_cleaver;
buff_t* martial_prowess;
buff_t* merciless_bonegrinder;
buff_t* ravager;
buff_t* recklessness;
buff_t* reckless_abandon;
buff_t* revenge;
buff_t* shield_block;
buff_t* shield_charge_movement;
buff_t* shield_wall;
buff_t* slaughtering_strikes_rb;
buff_t* slaughtering_strikes_an;
buff_t* spell_reflection;
buff_t* sudden_death;
buff_t* sweeping_strikes;
buff_t* test_of_might_tracker; // Used to track rage gain from test of might.
buff_t* test_of_might;
//buff_t* vengeance_revenge;
//buff_t* vengeance_ignore_pain;
buff_t* whirlwind;
buff_t* wild_strikes;
buff_t* tornados_eye;
buff_t* dance_of_death_prot;
buff_t* seeing_red;
buff_t* seeing_red_tracking;
buff_t* violent_outburst;
// Legion Legendary
buff_t* fujiedas_fury;
buff_t* xavarics_magnum_opus;
buff_t* sephuzs_secret;
buff_t* in_for_the_kill;
// Azerite Traits
buff_t* bloodsport;
buff_t* brace_for_impact_az;
buff_t* crushing_assault;
buff_t* gathering_storm;
buff_t* infinite_fury;
buff_t* pulverizing_blows;
buff_t* striking_the_anvil;
buff_t* trample_the_weak;
// Covenant
buff_t* conquerors_banner;
buff_t* conquerors_frenzy;
buff_t* conquerors_mastery;
buff_t* elysian_might_legendary;
// Conduits
buff_t* ashen_juggernaut_conduit;
buff_t* merciless_bonegrinder_conduit;
buff_t* harrowing_punishment;
buff_t* veterans_repute;
buff_t* show_of_force;
buff_t* unnerving_focus;
// Tier
buff_t* strike_vulnerabilities;
buff_t* vanguards_determination;
// Shadowland Legendary
buff_t* battlelord;
buff_t* cadence_of_fujieda;
buff_t* will_of_the_berserker;
} buff;
struct rppm_t
{
real_ppm_t* fatal_mark;
real_ppm_t* revenge;
} rppm;
// Cooldowns
struct cooldowns_t
{
cooldown_t* avatar;
cooldown_t* recklessness;
cooldown_t* berserker_rage;
cooldown_t* bladestorm;
cooldown_t* bloodthirst;
cooldown_t* bloodbath;
cooldown_t* cleave;
cooldown_t* colossus_smash;
cooldown_t* demoralizing_shout;
cooldown_t* thunderous_roar;
cooldown_t* enraged_regeneration;
cooldown_t* execute;
cooldown_t* heroic_leap;
cooldown_t* iron_fortress_icd;
cooldown_t* impending_victory;
cooldown_t* last_stand;
cooldown_t* mortal_strike;
cooldown_t* odyns_fury;
cooldown_t* onslaught;
cooldown_t* overpower;
cooldown_t* pummel;
cooldown_t* rage_from_auto_attack;
cooldown_t* rage_from_crit_block;
cooldown_t* rage_of_the_valarjar_icd;
cooldown_t* raging_blow;
cooldown_t* crushing_blow;
cooldown_t* ravager;
cooldown_t* shield_slam;
cooldown_t* shield_wall;
cooldown_t* shockwave;
cooldown_t* skullsplitter;
cooldown_t* storm_bolt;
cooldown_t* tough_as_nails_icd;
cooldown_t* thunder_clap;
cooldown_t* warbreaker;
cooldown_t* ancient_aftershock;
cooldown_t* condemn;
cooldown_t* conquerors_banner;
cooldown_t* kyrian_spear;
cooldown_t* spear_of_bastion;
cooldown_t* signet_of_tormented_kings;
cooldown_t* berserkers_torment;
} cooldown;
// Gains
struct gains_t
{
gain_t* archavons_heavy_hand;
gain_t* avatar;
gain_t* avatar_torment;
gain_t* avoided_attacks;
gain_t* bloodsurge;
gain_t* charge;
gain_t* critical_block;
gain_t* execute;
gain_t* frothing_berserker;
gain_t* meat_cleaver;
gain_t* melee_crit;
gain_t* melee_main_hand;
gain_t* melee_off_hand;
gain_t* raging_blow;
gain_t* revenge;
gain_t* shield_charge;
gain_t* shield_slam;
gain_t* spear_of_bastion;
gain_t* whirlwind;
gain_t* booming_voice;
gain_t* thunder_clap;
gain_t* endless_rage;
gain_t* collateral_damage;
gain_t* instigate;
gain_t* war_machine_demise;
// Legendarys, Azerite, and Special Effects
gain_t* execute_refund;
gain_t* rage_from_damage_taken;
gain_t* ravager;
gain_t* ceannar_rage;
gain_t* cold_steel_hot_blood;
gain_t* valarjar_berserking;
gain_t* lord_of_war;
gain_t* simmering_rage;
gain_t* memory_of_lucid_dreams;
gain_t* conquerors_banner;
} gain;
// Spells
struct spells_t
{
// Core Class Spells
const spell_data_t* battle_shout;
const spell_data_t* charge;
const spell_data_t* execute;
const spell_data_t* hamstring;
const spell_data_t* heroic_throw;
const spell_data_t* pummel;
const spell_data_t* shield_block;
const spell_data_t* shield_slam;
const spell_data_t* slam;
const spell_data_t* taunt;
const spell_data_t* victory_rush;
const spell_data_t* whirlwind;
// Class Passives
const spell_data_t* warrior_aura;
// Extra Spells To Make Things Work
const spell_data_t* colossus_smash_debuff;
const spell_data_t* executioners_precision_debuff;
const spell_data_t* fatal_mark_debuff;
const spell_data_t* concussive_blows_debuff;
const spell_data_t* recklessness_buff;
const spell_data_t* shield_block_buff;
const spell_data_t* siegebreaker_debuff;
const spell_data_t* whirlwind_buff;
const spell_data_t* aftershock_duration;
const spell_data_t* shield_wall;
} spell;
// Mastery
struct mastery_t
{
const spell_data_t* deep_wounds_ARMS; // Arms
const spell_data_t* critical_block; // Protection
const spell_data_t* unshackled_fury; // Fury
} mastery;
// Procs
struct procs_t
{
proc_t* delayed_auto_attack;
proc_t* glory;
proc_t* tactician;
} proc;
// Spec Passives
struct spec_t
{
// Arms Spells
const spell_data_t* arms_warrior;
const spell_data_t* seasoned_soldier;
const spell_data_t* deep_wounds_ARMS;
// Fury Spells
const spell_data_t* fury_warrior;
const spell_data_t* enrage;
const spell_data_t* execute;
const spell_data_t* whirlwind;
const spell_data_t* bloodbath; // BT replacement
const spell_data_t* crushing_blow; // RB replacement
// Protection Spells
const spell_data_t* protection_warrior;
const spell_data_t* devastate;
const spell_data_t* riposte;
const spell_data_t* thunder_clap_prot_hidden;
const spell_data_t* vanguard;
const spell_data_t* deep_wounds_PROT;
const spell_data_t* revenge_trigger;
const spell_data_t* shield_block_2;
} spec;
// Talents
struct talents_t
{
struct class_talents_t
{
player_talent_t battle_stance;
player_talent_t berserker_stance;
player_talent_t defensive_stance;
player_talent_t berserker_rage;
player_talent_t impending_victory;
player_talent_t war_machine;
player_talent_t intervene;
player_talent_t rallying_cry;
player_talent_t berserker_shout;
player_talent_t piercing_howl;
player_talent_t fast_footwork;
player_talent_t spell_reflection;
player_talent_t leeching_strikes;
player_talent_t inspiring_presence;
player_talent_t second_wind;
player_talent_t frothing_berserker;
player_talent_t heroic_leap;
player_talent_t intimidating_shout;
player_talent_t thunder_clap;
player_talent_t furious_blows;
player_talent_t wrecking_throw;
player_talent_t shattering_throw;
player_talent_t crushing_force;
player_talent_t pain_and_gain;
player_talent_t cacophonous_roar;
player_talent_t menace;
player_talent_t storm_bolt;
player_talent_t overwhelming_rage;
player_talent_t barbaric_training;
player_talent_t concussive_blows;
player_talent_t reinforced_plates;
player_talent_t bounding_stride;
player_talent_t blood_and_thunder;
player_talent_t crackling_thunder;
player_talent_t sidearm;
player_talent_t honed_reflexes;
player_talent_t bitter_immunity;
player_talent_t double_time;
player_talent_t titanic_throw;
player_talent_t seismic_reverberation;
player_talent_t armored_to_the_teeth;
player_talent_t wild_strikes;
player_talent_t one_handed_weapon_specialization;
player_talent_t two_handed_weapon_specialization;
player_talent_t dual_wield_specialization;
player_talent_t cruel_strikes;
player_talent_t endurance_training;
player_talent_t avatar;
player_talent_t thunderous_roar;
player_talent_t spear_of_bastion;
player_talent_t shockwave;
player_talent_t immovable_object;
player_talent_t unstoppable_force;
player_talent_t blademasters_torment;
player_talent_t warlords_torment;
player_talent_t berserkers_torment;
player_talent_t titans_torment;
player_talent_t uproar;
player_talent_t thunderous_words;
player_talent_t piercing_verdict;
player_talent_t elysian_might;
player_talent_t rumbling_earth;
player_talent_t sonic_boom;
} warrior;
struct arms_talents_t
{
player_talent_t mortal_strike;
player_talent_t overpower;
player_talent_t martial_prowess;
player_talent_t die_by_the_sword;
player_talent_t improved_execute;
player_talent_t improved_overpower;
player_talent_t bloodsurge;
player_talent_t fueled_by_violence;
player_talent_t storm_wall;
player_talent_t sudden_death;
player_talent_t fervor_of_battle;
player_talent_t tactician;
player_talent_t colossus_smash;
player_talent_t impale;
player_talent_t skullsplitter;
player_talent_t rend;
player_talent_t exhilarating_blows;
player_talent_t anger_management;
player_talent_t massacre;
player_talent_t sweeping_strikes;
player_talent_t cleave;
player_talent_t tide_of_blood;
player_talent_t bloodborne;
player_talent_t dreadnaught;
player_talent_t in_for_the_kill;
player_talent_t test_of_might;
player_talent_t blunt_instruments;
player_talent_t warbreaker;
player_talent_t improved_mortal_strike;
player_talent_t storm_of_swords;
player_talent_t collateral_damage;
player_talent_t reaping_swings;
player_talent_t deft_experience;
player_talent_t valor_in_victory;
player_talent_t critical_thinking;
player_talent_t bloodletting;
player_talent_t battlelord;
player_talent_t bladestorm;
player_talent_t sharpened_blades;
player_talent_t executioners_precision;
player_talent_t fatality;
player_talent_t dance_of_death;
player_talent_t unhinged;
player_talent_t hurricane;
player_talent_t merciless_bonegrinder;
player_talent_t juggernaut;
} arms;
struct fury_talents_t
{
player_talent_t bloodthirst;
player_talent_t raging_blow;
player_talent_t improved_enrage;
player_talent_t enraged_regeneration;
player_talent_t improved_execute;
player_talent_t improved_bloodthirst;
player_talent_t fresh_meat;
player_talent_t warpaint;
player_talent_t invigorating_fury;
player_talent_t sudden_death;
player_talent_t improved_raging_blow;
player_talent_t focus_in_chaos;
player_talent_t rampage;
player_talent_t cruelty;
player_talent_t single_minded_fury;
player_talent_t cold_steel_hot_blood;
player_talent_t vicious_contempt;
player_talent_t frenzy;
player_talent_t hack_and_slash;
player_talent_t slaughtering_strikes;
player_talent_t ashen_juggernaut;
player_talent_t improved_whirlwind;
player_talent_t wrath_and_fury;
player_talent_t frenzied_flurry;
player_talent_t bloodborne;
player_talent_t bloodcraze;
player_talent_t recklessness;
player_talent_t massacre;
player_talent_t meat_cleaver;
player_talent_t raging_armaments;
player_talent_t deft_experience;
player_talent_t swift_strikes;
player_talent_t critical_thinking;
player_talent_t storm_of_swords;
player_talent_t odyns_fury;
player_talent_t anger_management;
player_talent_t reckless_abandon;
player_talent_t onslaught;
player_talent_t ravager;
player_talent_t annihilator;
player_talent_t dancing_blades;
player_talent_t titanic_rage;
player_talent_t unbridled_ferocity;
player_talent_t depths_of_insanity;
player_talent_t tenderize;
player_talent_t storm_of_steel;
player_talent_t hurricane;
} fury;
struct protection_talents_t
{
player_talent_t ignore_pain;
player_talent_t revenge;
player_talent_t demoralizing_shout;
player_talent_t devastator;
player_talent_t last_stand;
player_talent_t improved_heroic_throw;
player_talent_t best_served_cold;
player_talent_t strategist;
player_talent_t brace_for_impact;
player_talent_t unnerving_focus;
player_talent_t challenging_shout;
player_talent_t instigate;
player_talent_t rend;
player_talent_t bloodsurge;
player_talent_t fueled_by_violence;
player_talent_t brutal_vitality;
player_talent_t disrupting_shout;
player_talent_t show_of_force;
player_talent_t sudden_death;
player_talent_t thunderlord;
player_talent_t shield_wall;
player_talent_t bolster;
player_talent_t tough_as_nails;
player_talent_t spell_block;
player_talent_t bloodborne;
player_talent_t heavy_repercussions;
player_talent_t into_the_fray;
player_talent_t enduring_defenses;
player_talent_t massacre;
player_talent_t anger_management;
player_talent_t defenders_aegis;
player_talent_t impenetrable_wall;
player_talent_t punish;
player_talent_t juggernaut;
player_talent_t focused_vigor;
player_talent_t shield_specialization;
player_talent_t enduring_alacrity;
player_talent_t shield_charge;
player_talent_t booming_voice;
player_talent_t indomitable;
player_talent_t violent_outburst;
player_talent_t ravager;
player_talent_t battering_ram;
player_talent_t champions_bulwark;
player_talent_t battle_scarred_veteran;
player_talent_t dance_of_death;
player_talent_t storm_of_steel;
} protection;
struct shared_talents_t
{
player_talent_t hurricane;
player_talent_t ravager;
player_talent_t bloodsurge;
} shared;
} talents;
struct tier_set_t
{
const spell_data_t* t29_arms_2pc;
const spell_data_t* t29_arms_4pc;
const spell_data_t* t29_fury_2pc;
const spell_data_t* t29_fury_4pc;
const spell_data_t* t29_prot_2pc;
const spell_data_t* t29_prot_4pc;
} tier_set;
struct legendary_t
{
const spell_data_t* sephuzs_secret;
const spell_data_t* valarjar_berserkers;
const spell_data_t* ceannar_charger;
const spell_data_t* archavons_heavy_hand;
const spell_data_t* kazzalax_fujiedas_fury;
const spell_data_t* prydaz_xavarics_magnum_opus;
const spell_data_t* najentuss_vertebrae;
const spell_data_t* ayalas_stone_heart;
const spell_data_t* raging_fury;
const spell_data_t* the_great_storms_eye;
const spell_data_t* the_wall;
const spell_data_t* thunderlord;
const spell_data_t* reprisal;
legendary_t()
: sephuzs_secret( spell_data_t::not_found() ),
valarjar_berserkers( spell_data_t::not_found() ),
ceannar_charger( spell_data_t::not_found() ),
archavons_heavy_hand( spell_data_t::not_found() ),
kazzalax_fujiedas_fury( spell_data_t::not_found() ),
prydaz_xavarics_magnum_opus( spell_data_t::not_found() ),
najentuss_vertebrae( spell_data_t::not_found() ),
ayalas_stone_heart( spell_data_t::not_found() ),
raging_fury( spell_data_t::not_found() ),
the_great_storms_eye( spell_data_t::not_found() ),
the_wall( spell_data_t::not_found() ),
thunderlord( spell_data_t::not_found() ),
reprisal(spell_data_t::not_found() )
{
}
// General
item_runeforge_t leaper;
item_runeforge_t misshapen_mirror;
item_runeforge_t seismic_reverberation;
item_runeforge_t signet_of_tormented_kings;
// Covenant
item_runeforge_t elysian_might;
item_runeforge_t glory;
item_runeforge_t natures_fury;
item_runeforge_t sinful_surge;
double glory_counter = 0.0; // Track Glory rage spent
// Arms
item_runeforge_t battlelord;
item_runeforge_t enduring_blow;
item_runeforge_t exploiter;
item_runeforge_t unhinged;
// Fury
item_runeforge_t cadence_of_fujieda;
item_runeforge_t deathmaker;
item_runeforge_t reckless_defense;
item_runeforge_t will_of_the_berserker;
} legendary;
// Covenant Powers
struct covenant_t
{
const spell_data_t* ancient_aftershock;
const spell_data_t* condemn;
const spell_data_t* condemn_driver;
const spell_data_t* conquerors_banner;
const spell_data_t* kyrian_spear;
} covenant;
// Conduits
struct conduit_t
{
conduit_data_t ashen_juggernaut;
conduit_data_t crash_the_ramparts;
conduit_data_t depths_of_insanity;
conduit_data_t destructive_reverberations;
conduit_data_t hack_and_slash;
conduit_data_t harrowing_punishment;
conduit_data_t merciless_bonegrinder;
conduit_data_t mortal_combo;
conduit_data_t piercing_verdict;
conduit_data_t veterans_repute;
conduit_data_t vicious_contempt;
conduit_data_t show_of_force;
conduit_data_t unnerving_focus;
} conduit;
// Azerite traits
struct
{
// All
azerite_power_t breach;
azerite_power_t moment_of_glory;
azerite_power_t bury_the_hatchet;
// Prot
azerite_power_t iron_fortress;
azerite_power_t deafening_crash;
azerite_power_t callous_reprisal;
azerite_power_t brace_for_impact;
azerite_power_t bloodsport;
azerite_power_t bastion_of_might;
// Arms
azerite_power_t test_of_might;
azerite_power_t seismic_wave;
azerite_power_t lord_of_war;
azerite_power_t gathering_storm;
azerite_power_t crushing_assault;
azerite_power_t striking_the_anvil;
// fury
azerite_power_t trample_the_weak;
azerite_power_t simmering_rage;
azerite_power_t reckless_flurry;
azerite_power_t pulverizing_blows;
azerite_power_t infinite_fury;
azerite_power_t cold_steel_hot_blood;
azerite_power_t unbridled_ferocity;
// Essences
azerite_essence_t memory_of_lucid_dreams;
azerite_essence_t vision_of_perfection;
double vision_of_perfection_percentage;
} azerite;
struct azerite_spells_t
{
// General
const spell_data_t* memory_of_lucid_dreams;
} azerite_spells;
struct warrior_options_t
{
double memory_of_lucid_dreams_proc_chance = 0.15;
} options;
// Default consumables
std::string default_potion() const override;
std::string default_flask() const override;
std::string default_food() const override;
std::string default_rune() const override;
std::string default_temporary_enchant() const override;
warrior_t( sim_t* sim, util::string_view name, race_e r = RACE_NIGHT_ELF )
: player_t( sim, WARRIOR, name, r ),
rampage_driver( nullptr ),
rampage_attacks( 0 ),
active(),
buff(),
cooldown(),
gain(),
spell(),
mastery(),
proc(),
spec(),
talents(),
legendary(),
azerite()
{
non_dps_mechanics =
true; // When set to false, disables stuff that isn't important, such as second wind, bloodthirst heal, etc.
warrior_fixed_time = true;
into_the_fray_friends = -1;
never_surrender_percentage = 70;
resource_regeneration = regen_type::DISABLED;
talent_points->register_validity_fn( [this]( const spell_data_t* spell ) {
// Soul of the Battlelord
if ( find_item_by_id( 151650 ) )
{
switch ( specialization() )
{
case WARRIOR_FURY:
return spell->id() == 206315; // Massacre
case WARRIOR_ARMS:
return spell->id() == 152278; // Anger Management
case WARRIOR_PROTECTION:
return spell->id() == 202572; // Vengeance
default:
// This shouldn't happen
break;
}
}
return false;
} );
}
// Character Definition
void init_spells() override;
void init_base_stats() override;
void init_scaling() override;
void create_buffs() override;
void init_gains() override;
void init_position() override;
void init_procs() override;
void init_resources( bool ) override;
void arise() override;
void combat_begin() override;
void init_rng() override;
double composite_attribute( attribute_e attr ) const override;
double composite_attribute_multiplier( attribute_e attr ) const override;
double composite_rating_multiplier( rating_e rating ) const override;
double composite_player_multiplier( school_e school ) const override;
// double composite_player_target_multiplier( player_t* target, school_e school ) const override;
double matching_gear_multiplier( attribute_e attr ) const override;
double composite_melee_speed() const override;
double composite_melee_haste() const override;
double composite_armor_multiplier() const override;
double composite_bonus_armor() const override;
double composite_base_armor_multiplier() const override;
double composite_block() const override;
double composite_block_reduction( action_state_t* s ) const override;
double composite_parry_rating() const override;
double composite_parry() const override;
double composite_melee_expertise( const weapon_t* ) const override;
double composite_attack_power_multiplier() const override;
// double composite_melee_attack_power() const override;
double composite_mastery() const override;
double composite_damage_versatility() const override;
double composite_crit_block() const override;
double composite_crit_avoidance() const override;
// double composite_melee_speed() const override;
double composite_melee_crit_chance() const override;
double composite_melee_crit_rating() const override;
double composite_player_critical_damage_multiplier( const action_state_t* ) const override;
double composite_leech() const override;
double resource_gain( resource_e, double, gain_t* = nullptr, action_t* = nullptr ) override;
void teleport( double yards, timespan_t duration ) override;
void trigger_movement( double distance, movement_direction_type direction ) override;
void interrupt() override;
void reset() override;
void moving() override;
void create_options() override;
std::string create_profile( save_e type ) override;
void invalidate_cache( cache_e ) override;
double temporary_movement_modifier() const override;
void vision_of_perfection_proc() override;
//void apply_affecting_auras(action_t& action) override;
void trigger_tide_of_blood( dot_t* dot );
void default_apl_dps_precombat();
void apl_default();
void apl_fury();
void apl_arms();
void apl_prot();
void init_action_list() override;
action_t* create_action( util::string_view name, util::string_view options ) override;
void activate() override;
resource_e primary_resource() const override
{
return RESOURCE_RAGE;
}
role_e primary_role() const override;
stat_e convert_hybrid_stat( stat_e s ) const override;
// void assess_damage_imminent_pre_absorb( school_e, result_amount_type, action_state_t* s ) override;
// void assess_damage_imminent( school_e, result_amount_type, action_state_t* s ) override;
void assess_damage( school_e, result_amount_type, action_state_t* ) override;
void target_mitigation( school_e, result_amount_type, action_state_t* ) override;
void copy_from( player_t* ) override;
void merge( player_t& ) override;
void apply_affecting_auras( action_t& action ) override;
void datacollection_begin() override;
void datacollection_end() override;
target_specific_t<warrior_td_t> target_data;
const warrior_td_t* find_target_data( const player_t* target ) const override
{
return target_data[ target ];
}
warrior_td_t* get_target_data( player_t* target ) const override
{
warrior_td_t*& td = target_data[ target ];
if ( !td )
{
td = new warrior_td_t( target, const_cast<warrior_t&>( *this ) );
}
return td;
}
// Secondary Action Tracking - From Rogue
private:
std::vector<action_t*> background_actions;
public:
template <typename T, typename... Ts>
T* get_background_action( util::string_view n, Ts&&... args )
{
auto it = range::find( background_actions, n, &action_t::name_str );
if ( it != background_actions.cend() )
{
return dynamic_cast<T*>( *it );
}
auto action = new T( n, this, std::forward<Ts>( args )... );
action->background = true;
background_actions.push_back( action );
return action;
}
void enrage()
{
buff.enrage->trigger();
if ( legendary.ceannar_charger->found() )
{
resource_gain( RESOURCE_RAGE,
legendary.ceannar_charger->effectN( 1 ).trigger()->effectN( 1 ).resource( RESOURCE_RAGE ),
gain.ceannar_rage );
}
}
};
namespace
{ // UNNAMED NAMESPACE
// Template for common warrior action code. See priest_action_t.
template <class Base>
struct warrior_action_t : public Base
{
struct affected_by_t
{
// mastery/buff damage increase.
bool fury_mastery_direct, fury_mastery_dot, arms_mastery,
siegebreaker;
// talents
bool avatar, sweeping_strikes, booming_voice, bloodcraze, executioners_precision,
ashen_juggernaut, recklessness, slaughtering_strikes, colossus_smash,
merciless_bonegrinder, juggernaut, juggernaut_prot;