-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathModParser-3_0.lua
More file actions
2311 lines (2283 loc) · 186 KB
/
ModParser-3_0.lua
File metadata and controls
2311 lines (2283 loc) · 186 KB
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
-- Path of Building
--
-- Module: Mod Parser for 3.0
-- Parser function for modifier names
--
local pairs = pairs
local ipairs = ipairs
local t_insert = table.insert
local band = bit.band
local bor = bit.bor
local bnot = bit.bnot
-- List of modifier forms
local formList = {
["^(%d+)%% increased"] = "INC",
["^(%d+)%% faster"] = "INC",
["^(%d+)%% reduced"] = "RED",
["^(%d+)%% slower"] = "RED",
["^(%d+)%% more"] = "MORE",
["^(%d+)%% less"] = "LESS",
["^([%+%-][%d%.]+)%%?"] = "BASE",
["^([%+%-][%d%.]+)%%? to"] = "BASE",
["^([%+%-]?[%d%.]+)%%? of"] = "BASE",
["^([%+%-][%d%.]+)%%? base"] = "BASE",
["^([%+%-]?[%d%.]+)%%? additional"] = "BASE",
["^you gain ([%d%.]+)"] = "BASE",
["^gains? ([%d%.]+)%% of"] = "BASE",
["^([%+%-]?%d+)%% chance"] = "CHANCE",
["^([%+%-]?%d+)%% additional chance"] = "CHANCE",
["penetrates? (%d+)%%"] = "PEN",
["penetrates (%d+)%% of"] = "PEN",
["penetrates (%d+)%% of enemy"] = "PEN",
["^([%d%.]+) (.+) regenerated per second"] = "REGENFLAT",
["^([%d%.]+)%% (.+) regenerated per second"] = "REGENPERCENT",
["^([%d%.]+)%% of (.+) regenerated per second"] = "REGENPERCENT",
["^regenerate ([%d%.]+) (.+) per second"] = "REGENFLAT",
["^regenerate ([%d%.]+)%% (.-) per second"] = "REGENPERCENT",
["^regenerate ([%d%.]+)%% of (.-) per second"] = "REGENPERCENT",
["^regenerate ([%d%.]+)%% of your (.-) per second"] = "REGENPERCENT",
["^([%d%.]+) (%a+) damage taken per second"] = "DEGEN",
["^([%d%.]+) (%a+) damage per second"] = "DEGEN",
["(%d+) to (%d+) added (%a+) damage"] = "DMG",
["(%d+)%-(%d+) added (%a+) damage"] = "DMG",
["(%d+) to (%d+) additional (%a+) damage"] = "DMG",
["(%d+)%-(%d+) additional (%a+) damage"] = "DMG",
["^(%d+) to (%d+) (%a+) damage"] = "DMG",
["adds (%d+) to (%d+) (%a+) damage"] = "DMG",
["adds (%d+)%-(%d+) (%a+) damage"] = "DMG",
["adds (%d+) to (%d+) (%a+) damage to attacks"] = "DMGATTACKS",
["adds (%d+)%-(%d+) (%a+) damage to attacks"] = "DMGATTACKS",
["adds (%d+) to (%d+) (%a+) attack damage"] = "DMGATTACKS",
["adds (%d+)%-(%d+) (%a+) attack damage"] = "DMGATTACKS",
["adds (%d+) to (%d+) (%a+) damage to spells"] = "DMGSPELLS",
["adds (%d+)%-(%d+) (%a+) damage to spells"] = "DMGSPELLS",
["adds (%d+) to (%d+) (%a+) spell damage"] = "DMGSPELLS",
["adds (%d+)%-(%d+) (%a+) spell damage"] = "DMGSPELLS",
["adds (%d+) to (%d+) (%a+) damage to attacks and spells"] = "DMGBOTH",
["adds (%d+)%-(%d+) (%a+) damage to attacks and spells"] = "DMGBOTH",
["adds (%d+) to (%d+) (%a+) damage to spells and attacks"] = "DMGBOTH", -- o_O
["adds (%d+)%-(%d+) (%a+) damage to spells and attacks"] = "DMGBOTH", -- o_O
["adds (%d+) to (%d+) (%a+) damage to hits"] = "DMGBOTH",
["adds (%d+)%-(%d+) (%a+) damage to hits"] = "DMGBOTH",
}
-- Map of modifier names
local modNameList = {
-- Attributes
["strength"] = "Str",
["dexterity"] = "Dex",
["intelligence"] = "Int",
["strength and dexterity"] = { "Str", "Dex" },
["strength and intelligence"] = { "Str", "Int" },
["dexterity and intelligence"] = { "Dex", "Int" },
["attributes"] = { "Str", "Dex", "Int" },
["all attributes"] = { "Str", "Dex", "Int" },
-- Life/mana
["life"] = "Life",
["maximum life"] = "Life",
["mana"] = "Mana",
["maximum mana"] = "Mana",
["mana regeneration"] = "ManaRegen",
["mana regeneration rate"] = "ManaRegen",
["mana cost"] = "ManaCost",
["mana cost of"] = "ManaCost",
["mana cost of skills"] = "ManaCost",
["total mana cost"] = "ManaCost",
["total mana cost of skills"] = "ManaCost",
["mana reserved"] = "ManaReserved",
["mana reservation"] = "ManaReserved",
["mana reservation of skills"] = "ManaReserved",
-- Primary defences
["maximum energy shield"] = "EnergyShield",
["energy shield recharge rate"] = "EnergyShieldRecharge",
["start of energy shield recharge"] = "EnergyShieldRechargeFaster",
["armour"] = "Armour",
["evasion"] = "Evasion",
["evasion rating"] = "Evasion",
["energy shield"] = "EnergyShield",
["armour and evasion"] = "ArmourAndEvasion",
["armour and evasion rating"] = "ArmourAndEvasion",
["evasion rating and armour"] = "ArmourAndEvasion",
["armour and energy shield"] = "ArmourAndEnergyShield",
["evasion rating and energy shield"] = "EvasionAndEnergyShield",
["evasion and energy shield"] = "EvasionAndEnergyShield",
["armour, evasion and energy shield"] = "Defences",
["defences"] = "Defences",
["to evade"] = "EvadeChance",
["chance to evade"] = "EvadeChance",
["to evade attacks"] = "EvadeChance",
["chance to evade attacks"] = "EvadeChance",
["chance to evade projectile attacks"] = "ProjectileEvadeChance",
["chance to evade melee attacks"] = "MeleeEvadeChance",
-- Resistances
["physical damage reduction"] = "PhysicalDamageReduction",
["physical damage reduction from hits"] = "PhysicalDamageReductionWhenHit",
["fire resistance"] = "FireResist",
["maximum fire resistance"] = "FireResistMax",
["cold resistance"] = "ColdResist",
["maximum cold resistance"] = "ColdResistMax",
["lightning resistance"] = "LightningResist",
["maximum lightning resistance"] = "LightningResistMax",
["chaos resistance"] = "ChaosResist",
["fire and cold resistances"] = { "FireResist", "ColdResist" },
["fire and lightning resistances"] = { "FireResist", "LightningResist" },
["cold and lightning resistances"] = { "ColdResist", "LightningResist" },
["elemental resistances"] = "ElementalResist",
["all elemental resistances"] = "ElementalResist",
["all resistances"] = { "ElementalResist", "ChaosResist" },
["all maximum elemental resistances"] = "ElementalResistMax",
["all maximum resistances"] = { "ElementalResistMax", "ChaosResistMax" },
["fire and chaos resistances"] = { "FireResist", "ChaosResist" },
["cold and chaos resistances"] = { "ColdResist", "ChaosResist" },
["lightning and chaos resistances"] = { "LightningResist", "ChaosResist" },
-- Damage taken
["damage taken"] = "DamageTaken",
["damage taken when hit"] = "DamageTakenWhenHit",
["damage taken from damage over time"] = "DamageTakenOverTime",
["physical damage taken"] = "PhysicalDamageTaken",
["physical damage from hits taken"] = "PhysicalDamageTaken",
["physical damage taken when hit"] = "PhysicalDamageTakenWhenHit",
["physical damage taken over time"] = "PhysicalDamageTakenOverTime",
["lightning damage taken"] = "LightningDamageTaken",
["lightning damage from hits taken"] = "LightningDamageTaken",
["lightning damage taken when hit"] = "LightningDamageTakenWhenHit",
["lightning damage taken over time"] = "LightningDamageTakenOverTime",
["cold damage taken"] = "ColdDamageTaken",
["cold damage from hits taken"] = "ColdDamageTaken",
["cold damage taken when hit"] = "ColdDamageTakenWhenHit",
["cold damage taken over time"] = "ColdDamageTakenOverTime",
["fire damage taken"] = "FireDamageTaken",
["fire damage from hits taken"] = "FireDamageTaken",
["fire damage taken when hit"] = "FireDamageTakenWhenHit",
["fire damage taken over time"] = "FireDamageTakenOverTime",
["chaos damage taken"] = "ChaosDamageTaken",
["chaos damage from hits taken"] = "ChaosDamageTaken",
["chaos damage taken when hit"] = "ChaosDamageTakenWhenHit",
["chaos damage taken over time"] = "ChaosDamageTakenOverTime",
["elemental damage taken"] = "ElementalDamageTaken",
["elemental damage taken when hit"] = "ElementalDamageTakenWhenHit",
["elemental damage taken over time"] = "ElementalDamageTakenOverTime",
-- Other defences
["to dodge attacks"] = "AttackDodgeChance",
["to dodge attack hits"] = "AttackDodgeChance",
["to dodge spells"] = "SpellDodgeChance",
["to dodge spell hits"] = "SpellDodgeChance",
["to dodge spell damage"] = "SpellDodgeChance",
["to dodge attacks and spells"] = { "AttackDodgeChance", "SpellDodgeChance" },
["to dodge attacks and spell damage"] = { "AttackDodgeChance", "SpellDodgeChance" },
["to dodge attack and spell hits"] = { "AttackDodgeChance", "SpellDodgeChance" },
["to block"] = "BlockChance",
["to block attacks"] = "BlockChance",
["to block attack damage"] = "BlockChance",
["block chance"] = "BlockChance",
["block chance with staves"] = { "BlockChance", tag = { type = "Condition", var = "UsingStaff" } },
["to block with staves"] = { "BlockChance", tag = { type = "Condition", var = "UsingStaff" } },
["spell block chance"] = "SpellBlockChance",
["to block spells"] = "SpellBlockChance",
["to block spell damage"] = "SpellBlockChance",
["chance to block attacks and spells"] = { "BlockChance", "SpellBlockChance" },
["maximum block chance"] = "BlockChanceMax",
["maximum chance to block attack damage"] = "BlockChanceMax",
["maximum chance to block spell damage"] = "SpellBlockChanceMax",
["to avoid being stunned"] = "AvoidStun",
["to avoid being shocked"] = "AvoidShock",
["to avoid being frozen"] = "AvoidFrozen",
["to avoid being chilled"] = "AvoidChilled",
["to avoid being ignited"] = "AvoidIgnite",
["to avoid elemental ailments"] = { "AvoidShock", "AvoidFrozen", "AvoidChilled", "AvoidIgnite" },
["to avoid elemental status ailments"] = { "AvoidShock", "AvoidFrozen", "AvoidChilled", "AvoidIgnite" },
["to avoid bleeding"] = "AvoidBleed",
["damage is taken from mana before life"] = "DamageTakenFromManaBeforeLife",
["damage taken from mana before life"] = "DamageTakenFromManaBeforeLife",
["effect of curses on you"] = "CurseEffectOnSelf",
["life recovery rate"] = "LifeRecoveryRate",
["mana recovery rate"] = "ManaRecoveryRate",
["energy shield recovery rate"] = "EnergyShieldRecoveryRate",
["energy shield regeneration rate"] = "EnergyShieldRegen",
["recovery rate of life, mana and energy shield"] = { "LifeRecoveryRate", "ManaRecoveryRate", "EnergyShieldRecoveryRate" },
-- Stun/knockback modifiers
["stun recovery"] = "StunRecovery",
["stun and block recovery"] = "StunRecovery",
["block and stun recovery"] = "StunRecovery",
["stun threshold"] = "StunThreshold",
["block recovery"] = "BlockRecovery",
["enemy stun threshold"] = "EnemyStunThreshold",
["stun duration on enemies"] = "EnemyStunDuration",
["stun duration"] = "EnemyStunDuration",
["to knock enemies back on hit"] = "EnemyKnockbackChance",
["knockback distance"] = "EnemyKnockbackDistance",
-- Auras/curses/buffs
["aura effect"] = "AuraEffect",
["effect of non-curse auras you cast"] = "AuraEffect",
["effect of non-curse auras from your skills"] = "AuraEffect",
["effect of your curses"] = "CurseEffect",
["effect of auras on you"] = "AuraEffectOnSelf",
["effect of auras on your minions"] = { "AuraEffectOnSelf", addToMinion = true },
["effect of auras from mines"] = { "AuraEffect", keywordFlags = KeywordFlag.Mine },
["curse effect"] = "CurseEffect",
["effect of curses applied by bane"] = { "CurseEffect", tag = { type = "Condition", var = "AppliedByBane" } },
["curse duration"] = { "Duration", keywordFlags = KeywordFlag.Curse },
["radius of auras"] = { "AreaOfEffect", keywordFlags = KeywordFlag.Aura },
["radius of curses"] = { "AreaOfEffect", keywordFlags = KeywordFlag.Curse },
["buff effect"] = "BuffEffect",
["effect of buffs on you"] = "BuffEffectOnSelf",
["effect of buffs granted by your golems"] = { "BuffEffect", tag = { type = "SkillType", skillType = SkillType.Golem } },
["effect of buffs granted by socketed golem skills"] = { "BuffEffect", addToSkill = { type = "SocketedIn", slotName = "{SlotName}", keyword = "golem" } },
["effect of the buff granted by your stone golems"] = { "BuffEffect", tag = { type = "SkillName", skillName = "Summon Stone Golem" } },
["effect of the buff granted by your lightning golems"] = { "BuffEffect", tag = { type = "SkillName", skillName = "Summon Lightning Golem" } },
["effect of the buff granted by your ice golems"] = { "BuffEffect", tag = { type = "SkillName", skillName = "Summon Ice Golem" } },
["effect of the buff granted by your flame golems"] = { "BuffEffect", tag = { type = "SkillName", skillName = "Summon Flame Golem" } },
["effect of the buff granted by your chaos golems"] = { "BuffEffect", tag = { type = "SkillName", skillName = "Summon Chaos Golem" } },
["effect of the buff granted by your carrion golems"] = { "BuffEffect", tag = { type = "SkillName", skillName = "Summon Carrion Golem" } },
["effect of offering spells"] = { "BuffEffect", tag = { type = "SkillName", skillNameList = { "Bone Offering", "Flesh Offering", "Spirit Offering" } } },
["effect of heralds on you"] = { "BuffEffect", tag = { type = "SkillType", skillType = SkillType.Herald } },
["effect of buffs granted by your active ancestor totems"] = { "BuffEffect", tag = { type = "SkillName", skillNameList = { "Ancestral Warchief", "Ancestral Protector" } } },
["warcry effect"] = { "BuffEffect", keywordFlags = KeywordFlag.Warcry },
["aspect of the avian buff effect"] = { "BuffEffect", tag = { type = "SkillName", skillName = "Aspect of the Avian" } },
["effect of arcane surge on you"] = { "BuffEffect", tag = { type = "SkillName", skillName = "Arcane Surge" } },
-- Charges
["maximum power charge"] = "PowerChargesMax",
["maximum power charges"] = "PowerChargesMax",
["minimum power charge"] = "PowerChargesMin",
["minimum power charges"] = "PowerChargesMin",
["power charge duration"] = "PowerChargesDuration",
["maximum frenzy charge"] = "FrenzyChargesMax",
["maximum frenzy charges"] = "FrenzyChargesMax",
["minimum frenzy charge"] = "FrenzyChargesMin",
["minimum frenzy charges"] = "FrenzyChargesMin",
["frenzy charge duration"] = "FrenzyChargesDuration",
["maximum endurance charge"] = "EnduranceChargesMax",
["maximum endurance charges"] = "EnduranceChargesMax",
["minimum endurance charge"] = "EnduranceChargesMin",
["minimum endurance charges"] = "EnduranceChargesMin",
["endurance charge duration"] = "EnduranceChargesDuration",
["maximum frenzy charges and maximum power charges"] = { "FrenzyChargesMax", "PowerChargesMax" },
["endurance, frenzy and power charge duration"] = { "PowerChargesDuration", "FrenzyChargesDuration", "EnduranceChargesDuration" },
["maximum siphoning charge"] = "SiphoningChargesMax",
["maximum siphoning charges"] = "SiphoningChargesMax",
["maximum challenger charges"] = "ChallengerChargesMax",
["maximum blitz charges"] = "BlitzChargesMax",
["maximum number of crab barriers"] = "CrabBarriersMax",
-- On hit/kill/leech effects
["life gained on kill"] = "LifeOnKill",
["mana gained on kill"] = "ManaOnKill",
["life gained for each enemy hit"] = { "LifeOnHit" },
["life gained for each enemy hit by attacks"] = { "LifeOnHit", flags = ModFlag.Attack },
["life gained for each enemy hit by your attacks"] = { "LifeOnHit", flags = ModFlag.Attack },
["life gained for each enemy hit by spells"] = { "LifeOnHit", flags = ModFlag.Spell },
["life gained for each enemy hit by your spells"] = { "LifeOnHit", flags = ModFlag.Spell },
["mana gained for each enemy hit by attacks"] = { "ManaOnHit", flags = ModFlag.Attack },
["mana gained for each enemy hit by your attacks"] = { "ManaOnHit", flags = ModFlag.Attack },
["energy shield gained for each enemy hit"] = { "EnergyShieldOnHit" },
["energy shield gained for each enemy hit by attacks"] = { "EnergyShieldOnHit", flags = ModFlag.Attack },
["energy shield gained for each enemy hit by your attacks"] = { "EnergyShieldOnHit", flags = ModFlag.Attack },
["life and mana gained for each enemy hit"] = { "LifeOnHit", "ManaOnHit", flags = ModFlag.Attack },
["damage as life"] = "DamageLifeLeech",
["life leeched per second"] = "LifeLeechRate",
["mana leeched per second"] = "ManaLeechRate",
["total recovery per second from life leech"] = "LifeLeechRate",
["total recovery per second from energy shield leech"] = "EnergyShieldLeechRate",
["total recovery per second from mana leech"] = "ManaLeechRate",
["maximum recovery per life leech"] = "MaxLifeLeechInstance",
["maximum recovery per energy shield leech"] = "MaxEnergyShieldLeechInstance",
["maximum recovery per mana leech"] = "MaxManaLeechInstance",
["maximum total recovery per second from life leech"] = "MaxLifeLeechRate",
["maximum total recovery per second from energy shield leech"] = "MaxEnergyShieldLeechRate",
["maximum total recovery per second from mana leech"] = "MaxManaLeechRate",
-- Projectile modifiers
["projectile"] = "ProjectileCount",
["projectiles"] = "ProjectileCount",
["projectile speed"] = "ProjectileSpeed",
["arrow speed"] = { "ProjectileSpeed", flags = ModFlag.Bow },
-- Totem/trap/mine modifiers
["totem placement speed"] = "TotemPlacementSpeed",
["totem life"] = "TotemLife",
["totem duration"] = "TotemDuration",
["maximum number of summoned totems"] = "ActiveTotemLimit",
["maximum number of summoned totems."] = "ActiveTotemLimit", -- Mark plz
["maximum number of summoned ballista totems"] = "ActiveTotemLimit", -- Mark plz
["trap throwing speed"] = "TrapThrowingSpeed",
["trap trigger area of effect"] = "TrapTriggerAreaOfEffect",
["trap duration"] = "TrapDuration",
["cooldown recovery speed for throwing traps"] = { "CooldownRecovery", keywordFlags = KeywordFlag.Trap },
["mine laying speed"] = "MineLayingSpeed",
["mine throwing speed"] = "MineLayingSpeed",
["mine detonation area of effect"] = "MineDetonationAreaOfEffect",
["mine duration"] = "MineDuration",
-- Minion modifiers
["maximum number of skeletons"] = "ActiveSkeletonLimit",
["maximum number of zombies"] = "ActiveZombieLimit",
["maximum number of raised zombies"] = "ActiveZombieLimit",
["number of zombies allowed"] = "ActiveZombieLimit",
["maximum number of spectres"] = "ActiveSpectreLimit",
["maximum number of golems"] = "ActiveGolemLimit",
["maximum number of summoned golems"] = "ActiveGolemLimit",
["maximum number of summoned raging spirits"] = "ActiveRagingSpiritLimit",
["maximum number of summoned holy relics"] = "ActiveHolyRelicLimit",
["minion duration"] = { "Duration", tag = { type = "SkillType", skillType = SkillType.CreateMinion } },
["skeleton duration"] = { "Duration", tag = { type = "SkillName", skillName = "Summon Skeleton" } },
["sentinel of dominance duration"] = { "Duration", tag = { type = "SkillName", skillName = "Dominating Blow" } },
-- Other skill modifiers
["radius"] = "AreaOfEffect",
["radius of area skills"] = "AreaOfEffect",
["area of effect radius"] = "AreaOfEffect",
["area of effect"] = "AreaOfEffect",
["area of effect of skills"] = "AreaOfEffect",
["area of effect of area skills"] = "AreaOfEffect",
["aspect of the spider area of effect"] = { "AreaOfEffect", tag = { type = "SkillName", skillName = "Aspect of the Spider" } },
["firestorm explosion area of effect"] = { "AreaOfEffectSecondary", tag = { type = "SkillName", skillName = "Firestorm" } },
["duration"] = "Duration",
["skill effect duration"] = "Duration",
["chaos skill effect duration"] = { "Duration", keywordFlags = KeywordFlag.Chaos },
["aspect of the spider debuff duration"] = { "Duration", tag = { type = "SkillName", skillName = "Aspect of the Spider" } },
["fire trap burning ground duration"] = { "Duration", tag = { type = "SkillName", skillName = "Fire Trap" } },
["cooldown recovery"] = "CooldownRecovery",
["cooldown recovery speed"] = "CooldownRecovery",
["weapon range"] = "WeaponRange",
["melee range"] = "MeleeWeaponRange",
["melee weapon range"] = "MeleeWeaponRange",
["melee weapon and unarmed range"] = { "MeleeWeaponRange", "UnarmedRange" },
["melee weapon and unarmed attack range"] = { "MeleeWeaponRange", "UnarmedRange" },
["to deal double damage"] = "DoubleDamageChance",
["activation frequency"] = "BrandActivationFrequency",
["brand activation frequency"] = "BrandActivationFrequency",
-- Buffs
["onslaught effect"] = "OnslaughtEffect",
["fortify duration"] = "FortifyDuration",
["effect of fortify on you"] = "FortifyEffectOnSelf",
["effect of tailwind on you"] = "TailwindEffectOnSelf",
-- Basic damage types
["damage"] = "Damage",
["physical damage"] = "PhysicalDamage",
["lightning damage"] = "LightningDamage",
["cold damage"] = "ColdDamage",
["fire damage"] = "FireDamage",
["chaos damage"] = "ChaosDamage",
["non-chaos damage"] = "NonChaosDamage",
["elemental damage"] = "ElementalDamage",
-- Other damage forms
["attack damage"] = { "Damage", flags = ModFlag.Attack },
["attack physical damage"] = { "PhysicalDamage", flags = ModFlag.Attack },
["physical attack damage"] = { "PhysicalDamage", flags = ModFlag.Attack },
["physical weapon damage"] = { "PhysicalDamage", flags = ModFlag.Weapon },
["physical damage with weapons"] = { "PhysicalDamage", flags = ModFlag.Weapon },
["physical melee damage"] = { "PhysicalDamage", flags = ModFlag.Melee },
["melee physical damage"] = { "PhysicalDamage", flags = ModFlag.Melee },
["projectile damage"] = { "Damage", flags = ModFlag.Projectile },
["projectile attack damage"] = { "Damage", flags = bor(ModFlag.Projectile, ModFlag.Attack) },
["bow damage"] = { "Damage", flags = ModFlag.Bow },
["damage with arrow hits"] = { "Damage", flags = bor(ModFlag.Bow, ModFlag.Hit) },
["wand damage"] = { "Damage", flags = ModFlag.Wand },
["wand physical damage"] = { "PhysicalDamage", flags = ModFlag.Wand },
["claw physical damage"] = { "PhysicalDamage", flags = ModFlag.Claw },
["sword physical damage"] = { "PhysicalDamage", flags = ModFlag.Sword },
["damage over time"] = { "Damage", flags = ModFlag.Dot },
["physical damage over time"] = { "PhysicalDamage", keywordFlags = KeywordFlag.PhysicalDot },
["burning damage"] = { "FireDamage", keywordFlags = KeywordFlag.FireDot },
["damage with ignite"] = { "Damage", keywordFlags = KeywordFlag.Ignite },
["damage with ignites"] = { "Damage", keywordFlags = KeywordFlag.Ignite },
["incinerate damage for each stage"] = { "Damage", tagList = { { type = "Multiplier", var = "IncinerateStage" }, { type = "SkillName", skillName = "Incinerate" } } },
["physical damage over time multiplier"] = "PhysicalDotMultiplier",
["fire damage over time multiplier"] = "FireDotMultiplier",
["cold damage over time multiplier"] = "ColdDotMultiplier",
["chaos damage over time multiplier"] = "ChaosDotMultiplier",
["damage over time multiplier"] = "DotMultiplier",
-- Crit/accuracy/speed modifiers
["critical strike chance"] = "CritChance",
["attack critical strike chance"] = { "CritChance", flags = ModFlag.Attack },
["critical strike multiplier"] = "CritMultiplier",
["accuracy"] = "Accuracy",
["accuracy rating"] = "Accuracy",
["minion accuracy rating"] = { "Accuracy", addToMinion = true },
["attack speed"] = { "Speed", flags = ModFlag.Attack },
["cast speed"] = { "Speed", flags = ModFlag.Cast },
["attack and cast speed"] = "Speed",
["attack and movement speed"] = { "Speed", "MovementSpeed" },
-- Elemental ailments
["to shock"] = "EnemyShockChance",
["shock chance"] = "EnemyShockChance",
["to freeze"] = "EnemyFreezeChance",
["freeze chance"] = "EnemyFreezeChance",
["to ignite"] = "EnemyIgniteChance",
["ignite chance"] = "EnemyIgniteChance",
["to freeze, shock and ignite"] = { "EnemyFreezeChance", "EnemyShockChance", "EnemyIgniteChance" },
["effect of shock"] = "EnemyShockEffect",
["effect of chill"] = "EnemyChillEffect",
["effect of chill on you"] = "SelfChillEffect",
["effect of non-damaging ailments"] = { "EnemyShockEffect", "EnemyChillEffect", "EnemyFreezeEffech" },
["shock duration"] = "EnemyShockDuration",
["freeze duration"] = "EnemyFreezeDuration",
["chill duration"] = "EnemyChillDuration",
["ignite duration"] = "EnemyIgniteDuration",
["duration of elemental ailments"] = { "EnemyShockDuration", "EnemyFreezeDuration", "EnemyChillDuration", "EnemyIgniteDuration" },
["duration of elemental status ailments"] = { "EnemyShockDuration", "EnemyFreezeDuration", "EnemyChillDuration", "EnemyIgniteDuration" },
["duration of ailments"] = { "EnemyShockDuration", "EnemyFreezeDuration", "EnemyChillDuration", "EnemyIgniteDuration", "EnemyPoisonDuration", "EnemyBleedDuration" },
["duration of ailments you inflict"] = { "EnemyShockDuration", "EnemyFreezeDuration", "EnemyChillDuration", "EnemyIgniteDuration", "EnemyPoisonDuration", "EnemyBleedDuration" },
-- Other ailments
["to poison"] = "PoisonChance",
["to cause poison"] = "PoisonChance",
["to poison on hit"] = "PoisonChance",
["poison duration"] = { "EnemyPoisonDuration" },
["duration of poisons you inflict"] = { "EnemyPoisonDuration" },
["to cause bleeding"] = "BleedChance",
["to cause bleeding on hit"] = "BleedChance",
["to inflict bleeding"] = "BleedChance",
["to inflict bleeding on hit"] = "BleedChance",
["bleed duration"] = { "EnemyBleedDuration" },
["bleeding duration"] = { "EnemyBleedDuration" },
-- Misc modifiers
["movement speed"] = "MovementSpeed",
["attack, cast and movement speed"] = { "Speed", "MovementSpeed" },
["light radius"] = "LightRadius",
["rarity of items found"] = "LootRarity",
["quantity of items found"] = "LootQuantity",
["item quantity"] = "LootQuantity",
["strength requirement"] = "StrRequirement",
["dexterity requirement"] = "DexRequirement",
["intelligence requirement"] = "IntRequirement",
["strength and intelligence requirement"] = { "StrRequirement", "IntRequirement" },
["attribute requirements"] = { "StrRequirement", "DexRequirement", "IntRequirement" },
["effect of socketed jewels"] = "SocketedJewelEffect",
-- Flask modifiers
["effect"] = "FlaskEffect",
["effect of flasks"] = "FlaskEffect",
["effect of flasks on you"] = "FlaskEffect",
["amount recovered"] = "FlaskRecovery",
["life recovered"] = "FlaskRecovery",
["mana recovered"] = "FlaskRecovery",
["life recovery from flasks"] = "FlaskLifeRecovery",
["mana recovery from flasks"] = "FlaskManaRecovery",
["flask effect duration"] = "FlaskDuration",
["recovery speed"] = "FlaskRecoveryRate",
["recovery rate"] = "FlaskRecoveryRate",
["flask recovery rate"] = "FlaskRecoveryRate",
["flask recovery speed"] = "FlaskRecoveryRate",
["flask life recovery rate"] = "FlaskLifeRecoveryRate",
["flask mana recovery rate"] = "FlaskManaRecoveryRate",
["extra charges"] = "FlaskCharges",
["maximum charges"] = "FlaskCharges",
["charges used"] = "FlaskChargesUsed",
["flask charges used"] = "FlaskChargesUsed",
["flask charges gained"] = "FlaskChargesGained",
["charge recovery"] = "FlaskChargeRecovery",
}
-- List of modifier flags
local modFlagList = {
-- Weapon types
["with axes"] = { flags = ModFlag.Axe },
["to axe attacks"] = { flags = ModFlag.Axe },
["with bows"] = { flags = ModFlag.Bow },
["to bow attacks"] = { flags = ModFlag.Bow },
["with claws"] = { flags = ModFlag.Claw },
["to claw attacks"] = { flags = ModFlag.Claw },
["dealt with claws"] = { flags = ModFlag.Claw },
["with daggers"] = { flags = ModFlag.Dagger },
["to dagger attacks"] = { flags = ModFlag.Dagger },
["with maces"] = { flags = ModFlag.Mace },
["to mace attacks"] = { flags = ModFlag.Mace },
["with maces and sceptres"] = { flags = ModFlag.Mace },
["to mace and sceptre attacks"] = { flags = ModFlag.Mace },
["with staves"] = { flags = ModFlag.Staff },
["to staff attacks"] = { flags = ModFlag.Staff },
["with swords"] = { flags = ModFlag.Sword },
["to sword attacks"] = { flags = ModFlag.Sword },
["with wands"] = { flags = ModFlag.Wand },
["to wand attacks"] = { flags = ModFlag.Wand },
["unarmed"] = { flags = ModFlag.Unarmed },
["with unarmed attacks"] = { flags = ModFlag.Unarmed },
["to unarmed attacks"] = { flags = ModFlag.Unarmed },
["with one handed weapons"] = { flags = ModFlag.Weapon1H },
["with one handed melee weapons"] = { flags = bor(ModFlag.Weapon1H, ModFlag.WeaponMelee) },
["with two handed weapons"] = { flags = ModFlag.Weapon2H },
["with two handed melee weapons"] = { flags = bor(ModFlag.Weapon2H, ModFlag.WeaponMelee) },
["with ranged weapons"] = { flags = ModFlag.WeaponRanged },
-- Skill types
["spell"] = { flags = ModFlag.Spell },
["with spells"] = { flags = ModFlag.Spell },
["for spells"] = { flags = ModFlag.Spell },
["with attacks"] = { keywordFlags = KeywordFlag.Attack },
["with attack skills"] = { keywordFlags = KeywordFlag.Attack },
["for attacks"] = { flags = ModFlag.Attack },
["weapon"] = { flags = ModFlag.Weapon },
["with weapons"] = { flags = ModFlag.Weapon },
["melee"] = { flags = ModFlag.Melee },
["with melee attacks"] = { flags = ModFlag.Melee },
["with melee critical strikes"] = { flags = ModFlag.Melee, tag = { type = "Condition", var = "CriticalStrike" } },
["with bow skills"] = { keywordFlags = KeywordFlag.Bow },
["on melee hit"] = { flags = ModFlag.Melee },
["with hits"] = { keywordFlags = KeywordFlag.Hit },
["with hits and ailments"] = { keywordFlags = bor(KeywordFlag.Hit, KeywordFlag.Ailment) },
["with ailments"] = { flags = ModFlag.Ailment },
["with ailments from attack skills"] = { flags = ModFlag.Ailment, keywordFlags = KeywordFlag.Attack },
["with poison"] = { keywordFlags = KeywordFlag.Poison },
["with bleeding"] = { keywordFlags = KeywordFlag.Bleed },
["for ailments"] = { flags = ModFlag.Ailment },
["for poison"] = { keywordFlags = KeywordFlag.Poison },
["for bleeding"] = { keywordFlags = KeywordFlag.Bleed },
["for ignite"] = { keywordFlags = KeywordFlag.Ignite },
["area"] = { flags = ModFlag.Area },
["mine"] = { keywordFlags = KeywordFlag.Mine },
["with mines"] = { keywordFlags = KeywordFlag.Mine },
["trap"] = { keywordFlags = KeywordFlag.Trap },
["with traps"] = { keywordFlags = KeywordFlag.Trap },
["for traps"] = { keywordFlags = KeywordFlag.Trap },
["that place mines or throw traps"] = { keywordFlags = bor(KeywordFlag.Mine, KeywordFlag.Trap) },
["that throw mines"] = { keywordFlags = KeywordFlag.Mine },
["that throw traps"] = { keywordFlags = KeywordFlag.Trap },
["totem"] = { keywordFlags = KeywordFlag.Totem },
["with totem skills"] = { keywordFlags = KeywordFlag.Totem },
["for skills used by totems"] = { keywordFlags = KeywordFlag.Totem },
["of aura skills"] = { tag = { type = "SkillType", skillType = SkillType.Aura } },
["of curse skills"] = { keywordFlags = KeywordFlag.Curse },
["with curse skills"] = { keywordFlags = KeywordFlag.Curse },
["of herald skills"] = { tag = { type = "SkillType", skillType = SkillType.Herald } },
["minion skills"] = { tag = { type = "SkillType", skillType = SkillType.Minion } },
["of minion skills"] = { tag = { type = "SkillType", skillType = SkillType.Minion } },
["for curses"] = { keywordFlags = KeywordFlag.Curse },
["warcry"] = { keywordFlags = KeywordFlag.Warcry },
["vaal"] = { keywordFlags = KeywordFlag.Vaal },
["vaal skill"] = { keywordFlags = KeywordFlag.Vaal },
["with movement skills"] = { keywordFlags = KeywordFlag.Movement },
["of movement skills"] = { keywordFlags = KeywordFlag.Movement },
["with lightning skills"] = { keywordFlags = KeywordFlag.Lightning },
["with cold skills"] = { keywordFlags = KeywordFlag.Cold },
["with fire skills"] = { keywordFlags = KeywordFlag.Fire },
["with elemental skills"] = { keywordFlags = bor(KeywordFlag.Lightning, KeywordFlag.Cold, KeywordFlag.Fire) },
["with chaos skills"] = { keywordFlags = KeywordFlag.Chaos },
["with channelling skills"] = { tag = { type = "SkillType", skillType = SkillType.Channelled } },
["with brand skills"] = { tag = { type = "SkillType", skillType = SkillType.Brand } },
["zombie"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Raise Zombie" } },
["raised zombie"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Raise Zombie" } },
["skeleton"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Skeleton" } },
["spectre"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Raise Spectre" } },
["raised spectre"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Raise Spectre" } },
["golem"] = { },
["chaos golem"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Chaos Golem" } },
["flame golem"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Flame Golem" } },
["increased flame golem"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Flame Golem" } },
["ice golem"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Ice Golem" } },
["lightning golem"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Lightning Golem" } },
["stone golem"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Stone Golem" } },
["animated guardian"] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Animate Guardian" } },
-- Other
["global"] = { tag = { type = "Global" } },
["from equipped shield"] = { tag = { type = "SlotName", slotName = "Weapon 2" } },
["from body armour"] = { tag = { type = "SlotName", slotName = "Body Armour" } },
}
-- List of modifier flags/tags that appear at the start of a line
local preFlagList = {
["^hits deal "] = { keywordFlags = KeywordFlag.Hit },
["^critical strikes deal "] = { tag = { type = "Condition", var = "CriticalStrike" } },
["^minions "] = { addToMinion = true },
["^minions [hd][ae][va][el] "] = { addToMinion = true },
["^minions leech "] = { addToMinion = true },
["^minions' attacks deal "] = { addToMinion = true, flags = ModFlag.Attack },
["^golems [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillType", skillType = SkillType.Golem } },
["^golem skills have "] = { tag = { type = "SkillType", skillType = SkillType.Golem } },
["^zombies [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Raise Zombie" } },
["^raised zombies [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Raise Zombie" } },
["^skeletons [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Skeleton" } },
["^raging spirits [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Raging Spirit" } },
["^summoned raging spirits [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Raging Spirit" } },
["^spectres [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Raise Spectre" } },
["^chaos golems [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Chaos Golem" } },
["^summoned chaos golems [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Chaos Golem" } },
["^flame golems [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Flame Golem" } },
["^summoned flame golems [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Flame Golem" } },
["^ice golems [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Ice Golem" } },
["^summoned ice golems [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Ice Golem" } },
["^lightning golems [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Lightning Golem" } },
["^summoned lightning golems [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Lightning Golem" } },
["^stone golems [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Stone Golem" } },
["^summoned stone golems [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Stone Golem" } },
["^summoned carrion golems [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Carrion Golem" } },
["^summoned skitterbots [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Carrion Golem" } },
["^blink arrow and blink arrow clones [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Blink Arrow" } },
["^mirror arrow and mirror arrow clones [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Mirror Arrow" } },
["^animated weapons [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Animate Weapon" } },
["^animated guardians [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Animate Guardian" } },
["^summoned holy relics [hd][ae][va][el] "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Summon Holy Relic" } },
["^agony crawler deals "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Herald of Agony" } },
["^sentinels of purity deal "] = { addToMinion = true, addToMinionTag = { type = "SkillName", skillName = "Herald of Purity" } },
["^raised zombies' slam attack has "] = { addToMinion = true, tag = { type = "SkillId", skillId = "ZombieSlam" } },
["^attacks used by totems have "] = { keywordFlags = KeywordFlag.Totem },
["^spells cast by totems have "] = { keywordFlags = KeywordFlag.Totem },
["^attacks with this weapon "] = { tag = { type = "Condition", var = "{Hand}Attack" } },
["^attacks with this weapon [hd][ae][va][el] "] = { tag = { type = "Condition", var = "{Hand}Attack" } },
["^hits with this weapon [hd][ae][va][el] "] = { flags = ModFlag.Hit, tag = { type = "Condition", var = "{Hand}Attack" } },
["^attacks [hd][ae][va][el] "] = { flags = ModFlag.Attack },
["^attack skills [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Attack },
["^spells [hd][ae][va][el] "] = { flags = ModFlag.Spell },
["^spell skills [hd][ae][va][el] "] = { flags = ModFlag.Spell },
["^projectile attack skills [hd][ae][va][el] "] = { tagList = { { type = "SkillType", skillType = SkillType.Attack }, { type = "SkillType", skillType = SkillType.Projectile } } },
["^projectiles from attacks [hd][ae][va][el] "] = { tagList = { { type = "SkillType", skillType = SkillType.Attack }, { type = "SkillType", skillType = SkillType.Projectile } } },
["^arrows [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Bow },
["^bow attacks [hdf][aei][var][el] "] = { keywordFlags = KeywordFlag.Bow },
["^projectiles [hdf][aei][var][el] "] = { flags = ModFlag.Projectile },
["^melee attacks have "] = { flags = ModFlag.Melee },
["^movement attack skills have "] = { flags = ModFlag.Attack, keywordFlags = KeywordFlag.Movement },
["^trap and mine damage "] = { keywordFlags = bor(KeywordFlag.Trap, KeywordFlag.Mine) },
["^skills used by traps [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Trap },
["^skills used by mines [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Mine },
["^lightning skills [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Lightning },
["^lightning spells [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Lightning, flags = ModFlag.Spell },
["^cold skills [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Cold },
["^cold spells [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Cold, flags = ModFlag.Spell },
["^fire skills [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Fire },
["^fire spells [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Fire, flags = ModFlag.Spell },
["^chaos skills [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Chaos },
["^vaal skills [hd][ae][va][el] "] = { keywordFlags = KeywordFlag.Vaal },
["^brand skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Brand } },
["^channelling skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Channelled } },
["^curse skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Curse } },
["^melee skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Melee } },
["^guard skills [hd][ae][va][el] "] = { tag = { type = "SkillType", skillType = SkillType.Guard } },
["^skills [hdfg][aei][vari][eln] "] = { },
["^left ring slot: "] = { tag = { type = "SlotNumber", num = 1 } },
["^right ring slot: "] = { tag = { type = "SlotNumber", num = 2 } },
["^socketed gems [hgd][ae][via][enl] "] = { addToSkill = { type = "SocketedIn", slotName = "{SlotName}" } },
["^socketed skills [hgd][ae][via][enl] "] = { addToSkill = { type = "SocketedIn", slotName = "{SlotName}" } },
["^socketed attacks [hgd][ae][via][enl] "] = { addToSkill = { type = "SocketedIn", slotName = "{SlotName}", keyword = "attack" } },
["^socketed spells [hgd][ae][via][enl] "] = { addToSkill = { type = "SocketedIn", slotName = "{SlotName}", keyword = "spell" } },
["^socketed curse gems [hgd][ae][via][enl] "] = { addToSkill = { type = "SocketedIn", slotName = "{SlotName}", keyword = "curse" } },
["^socketed melee gems [hgd][ae][via][enl] "] = { addToSkill = { type = "SocketedIn", slotName = "{SlotName}", keyword = "melee" } },
["^socketed golem gems [hgd][ae][via][enl] "] = { addToSkill = { type = "SocketedIn", slotName = "{SlotName}", keyword = "golem" } },
["^socketed golem skills [hgd][ae][via][enl] "] = { addToSkill = { type = "SocketedIn", slotName = "{SlotName}", keyword = "golem" } },
["^your flasks grant "] = { },
["^when hit, "] = { },
["^you and allies [hgd][ae][via][enl] "] = { },
["^auras from your skills grant "] = { addToAura = true },
["^you and nearby allies [hgd][ae][via][enl] "] = { newAura = true },
["^nearby allies [hgd][ae][via][enl] "] = { newAura = true, newAuraOnlyAllies = true },
["^you and allies affected by auras from your skills [hgd][ae][via][enl] "] = { affectedByAura = true },
["^take "] = { modSuffix = "Taken" },
["^marauder: melee skills have "] = { flags = ModFlag.Melee, tag = { type = "Condition", var = "ConnectedToMarauderStart" } },
["^duelist: "] = { tag = { type = "Condition", var = "ConnectedToDuelistStart" } },
["^ranger: "] = { tag = { type = "Condition", var = "ConnectedToRangerStart" } },
["^shadow: "] = { tag = { type = "Condition", var = "ConnectedToShadowStart" } },
["^witch: "] = { tag = { type = "Condition", var = "ConnectedToWitchStart" } },
["^templar: "] = { tag = { type = "Condition", var = "ConnectedToTemplarStart" } },
["^scion: "] = { tag = { type = "Condition", var = "ConnectedToScionStart" } },
}
-- List of modifier tags
local modTagList = {
["on enemies"] = { },
["while active"] = { },
[" on critical strike"] = { tag = { type = "Condition", var = "CriticalStrike" } },
["from critical strikes"] = { tag = { type = "Condition", var = "CriticalStrike" } },
["while affected by auras you cast"] = { affectedByAura = true },
["for you and nearby allies"] = { newAura = true },
-- Multipliers
["per power charge"] = { tag = { type = "Multiplier", var = "PowerCharge" } },
["per frenzy charge"] = { tag = { type = "Multiplier", var = "FrenzyCharge" } },
["per endurance charge"] = { tag = { type = "Multiplier", var = "EnduranceCharge" } },
["per siphoning charge"] = { tag = { type = "Multiplier", var = "SiphoningCharge" } },
["per challenger charge"] = { tag = { type = "Multiplier", var = "ChallengerCharge" } },
["per blitz charge"] = { tag = { type = "Multiplier", var = "BlitzCharge" } },
["per crab barrier"] = { tag = { type = "Multiplier", var = "CrabBarrier" } },
["per (%d+) rage"] = function(num) return { tag = { type = "Multiplier", var = "Rage", div = num } } end,
["per level"] = { tag = { type = "Multiplier", var = "Level" } },
["per (%d+) player levels"] = function(num) return { tag = { type = "Multiplier", var = "Level", div = num } } end,
["for each equipped normal item"] = { tag = { type = "Multiplier", var = "NormalItem" } },
["for each normal item equipped"] = { tag = { type = "Multiplier", var = "NormalItem" } },
["for each normal item you have equipped"] = { tag = { type = "Multiplier", var = "NormalItem" } },
["for each equipped magic item"] = { tag = { type = "Multiplier", var = "MagicItem" } },
["for each magic item equipped"] = { tag = { type = "Multiplier", var = "MagicItem" } },
["for each magic item you have equipped"] = { tag = { type = "Multiplier", var = "MagicItem" } },
["for each equipped rare item"] = { tag = { type = "Multiplier", var = "RareItem" } },
["for each rare item equipped"] = { tag = { type = "Multiplier", var = "RareItem" } },
["for each rare item you have equipped"] = { tag = { type = "Multiplier", var = "RareItem" } },
["for each equipped unique item"] = { tag = { type = "Multiplier", var = "UniqueItem" } },
["for each unique item equipped"] = { tag = { type = "Multiplier", var = "UniqueItem" } },
["for each unique item you have equipped"] = { tag = { type = "Multiplier", var = "UniqueItem" } },
["per elder item equipped"] = { tag = { type = "Multiplier", var = "ElderItem" } },
["per shaper item equipped"] = { tag = { type = "Multiplier", var = "ShaperItem" } },
["per elder or shaper item equipped"] = { tag = { type = "Multiplier", varList = { "ElderItem", "ShaperItem" } } },
["for each equipped corrupted item"] = { tag = { type = "Multiplier", var = "CorruptedItem" } },
["for each corrupted item equipped"] = { tag = { type = "Multiplier", var = "CorruptedItem" } },
["for each uncorrupted item equipped"] = { tag = { type = "Multiplier", var = "NonCorruptedItem" } },
["per abyssa?l? jewel affecting you"] = { tag = { type = "Multiplier", var = "AbyssJewel" } },
["for each type of abyssa?l? jewel affecting you"] = { tag = { type = "Multiplier", var = "AbyssJewelType" } },
["per sextant affecting the area"] = { tag = { type = "Multiplier", var = "Sextant" } },
["per buff on you"] = { tag = { type = "Multiplier", var = "BuffOnSelf" } },
["per curse on enemy"] = { tag = { type = "Multiplier", var = "CurseOnEnemy" } },
["for each curse on enemy"] = { tag = { type = "Multiplier", var = "CurseOnEnemy" } },
["per curse on you"] = { tag = { type = "Multiplier", var = "CurseOnSelf" } },
["per poison on you"] = { tag = { type = "Multiplier", var = "PoisonStack" } },
["per poison on you, up to (%d+) per second"] = function(num) return { tag = { type = "Multiplier", var = "PoisonStack", limit = tonumber(num), limitTotal = true } } end,
["for each poison you have inflicted recently"] = { tag = { type = "Multiplier", var = "PoisonAppliedRecently" } },
["for each shocked enemy you've killed recently"] = { tag = { type = "Multiplier", var = "ShockedEnemyKilledRecently" } },
["per enemy killed recently, up to (%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "EnemyKilledRecently", limit = tonumber(num), limitTotal = true } } end,
["for each enemy you or your minions have killed recently, up to (%d+)%%"] = function(num) return { tag = { type = "Multiplier", varList = {"EnemyKilledRecently","EnemyKilledByMinionsRecently"}, limit = tonumber(num), limitTotal = true } } end,
["for each enemy you or your minions have killed recently, up to (%d+)%% per second"] = function(num) return { tag = { type = "Multiplier", varList = {"EnemyKilledRecently","EnemyKilledByMinionsRecently"}, limit = tonumber(num), limitTotal = true } } end,
["per enemy killed by you or your totems recently"] = { tag = { type = "Multiplier", varList = {"EnemyKilledRecently","EnemyKilledByTotemsRecently"} } },
["per nearby enemy, up to %+?(%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "NearbyEnemy", limit = num, limitTotal = true } } end,
["to you and allies"] = { },
["per red socket"] = { tag = { type = "Multiplier", var = "RedSocketIn{SlotName}" } },
["per green socket"] = { tag = { type = "Multiplier", var = "GreenSocketIn{SlotName}" } },
["per blue socket"] = { tag = { type = "Multiplier", var = "BlueSocketIn{SlotName}" } },
["per white socket"] = { tag = { type = "Multiplier", var = "WhiteSocketIn{SlotName}" } },
-- Per stat
["per (%d+) strength"] = function(num) return { tag = { type = "PerStat", stat = "Str", div = num } } end,
["per (%d+) dexterity"] = function(num) return { tag = { type = "PerStat", stat = "Dex", div = num } } end,
["per (%d+) intelligence"] = function(num) return { tag = { type = "PerStat", stat = "Int", div = num } } end,
["per (%d+) total attributes"] = function(num) return { tag = { type = "PerStat", statList = { "Str", "Dex", "Int" }, div = num } } end,
["per (%d+) of your lowest attribute"] = function(num) return { tag = { type = "PerStat", stat = "LowestAttribute", div = num } } end,
["per (%d+) reserved life"] = function(num) return { tag = { type = "PerStat", stat = "LifeReserved", div = num } } end,
["per (%d+) unreserved maximum mana, up to (%d+)%%"] = function(num, _, limit) return { tag = { type = "PerStat", stat = "ManaUnreserved", div = num, limit = tonumber(limit), limitTotal = true } } end,
["per (%d+) evasion rating"] = function(num) return { tag = { type = "PerStat", stat = "Evasion", div = num } } end,
["per (%d+) evasion rating, up to (%d+)%%"] = function(num, _, limit) return { tag = { type = "PerStat", stat = "Evasion", div = num, limit = tonumber(limit), limitTotal = true } } end,
["per (%d+) maximum energy shield"] = function(num) return { tag = { type = "PerStat", stat = "EnergyShield", div = num } } end,
["per (%d+) maximum life"] = function(num) return { tag = { type = "PerStat", stat = "Life", div = num } } end,
["per (%d+) maximum mana, up to (%d+)%%"] = function(num, _, limit) return { tag = { type = "PerStat", stat = "Mana", div = num, limit = tonumber(limit), limitTotal = true } } end,
["per (%d+) accuracy rating"] = function(num) return { tag = { type = "PerStat", stat = "Accuracy", div = num } } end,
["per (%d+)%% block chance"] = function(num) return { tag = { type = "PerStat", stat = "BlockChance", div = num } } end,
["per (%d+)%% chance to block attack damage"] = function(num) return { tag = { type = "PerStat", stat = "BlockChance", div = num } } end,
["per (%d+)%% chance to block spell damage"] = function(num) return { tag = { type = "PerStat", stat = "SpellBlockChance", div = num } } end,
["per (%d+) of the lowest of armour and evasion rating"] = function(num) return { tag = { type = "PerStat", stat = "LowestOfArmourAndEvasion", div = num } } end,
["per (%d+) maximum energy shield on helmet"] = function(num) return { tag = { type = "PerStat", stat = "EnergyShieldOnHelmet", div = num } } end,
["per (%d+) evasion rating on body armour"] = function(num) return { tag = { type = "PerStat", stat = "EvasionOnBody Armour", div = num } } end,
["per (%d+) armour on equipped shield"] = function(num) return { tag = { type = "PerStat", stat = "ArmourOnWeapon 2", div = num } } end,
["per (%d+) evasion rating on equipped shield"] = function(num) return { tag = { type = "PerStat", stat = "EvasionOnWeapon 2", div = num } } end,
["per (%d+) maximum energy shield on equipped shield"] = function(num) return { tag = { type = "PerStat", stat = "EnergyShieldOnWeapon 2", div = num } } end,
["per (%d+)%% cold resistance above 75%%"] = function(num) return { tag = { type = "PerStat", stat = "ColdResistOver75", div = num } } end,
["per (%d+)%% lightning resistance above 75%%"] = function(num) return { tag = { type = "PerStat", stat = "LightningResistOver75", div = num } } end,
["per totem"] = { tag = { type = "PerStat", stat = "ActiveTotemLimit" } },
["per summoned totem"] = { tag = { type = "PerStat", stat = "ActiveTotemLimit" } },
["for each summoned totem"] = { tag = { type = "PerStat", stat = "ActiveTotemLimit" } },
["for each time they have chained"] = { tag = { type = "PerStat", stat = "Chain" } },
["for each time it has chained"] = { tag = { type = "PerStat", stat = "Chain" } },
-- Stat conditions
["with (%d+) or more strength"] = function(num) return { tag = { type = "StatThreshold", stat = "Str", threshold = num } } end,
["with at least (%d+) strength"] = function(num) return { tag = { type = "StatThreshold", stat = "Str", threshold = num } } end,
["w?h?i[lf]e? you have at least (%d+) strength"] = function(num) return { tag = { type = "StatThreshold", stat = "Str", threshold = num } } end,
["w?h?i[lf]e? you have at least (%d+) dexterity"] = function(num) return { tag = { type = "StatThreshold", stat = "Dex", threshold = num } } end,
["w?h?i[lf]e? you have at least (%d+) intelligence"] = function(num) return { tag = { type = "StatThreshold", stat = "Int", threshold = num } } end,
["at least (%d+) intelligence"] = function(num) return { tag = { type = "StatThreshold", stat = "Int", threshold = num } } end, -- lol
["if dexterity is higher than intelligence"] = { tag = { type = "Condition", var = "DexHigherThanInt" } },
["if strength is higher than intelligence"] = { tag = { type = "Condition", var = "StrHigherThanInt" } },
["w?h?i[lf]e? you have at least (%d+) maximum energy shield"] = function(num) return { tag = { type = "StatThreshold", stat = "EnergyShield", threshold = num } } end,
["against targets they pierce"] = { tag = { type = "StatThreshold", stat = "PierceCount", threshold = 1 } },
["against pierced targets"] = { tag = { type = "StatThreshold", stat = "PierceCount", threshold = 1 } },
["to targets they pierce"] = { tag = { type = "StatThreshold", stat = "PierceCount", threshold = 1 } },
-- Slot conditions
["when in main hand"] = { tag = { type = "SlotNumber", num = 1 } },
["when in off hand"] = { tag = { type = "SlotNumber", num = 2 } },
["in main hand"] = { tag = { type = "InSlot", num = 1 } },
["in off hand"] = { tag = { type = "InSlot", num = 2 } },
["with main hand"] = { tag = { type = "Condition", var = "MainHandAttack" } },
["with off hand"] = { tag = { type = "Condition", var = "OffHandAttack" } },
["with this weapon"] = { tag = { type = "Condition", var = "{Hand}Attack" } },
["if your other ring is a shaper item"] = { tag = { type = "Condition", var = "ShaperItemInRing {OtherSlotNum}" } },
["if your other ring is an elder item"] = { tag = { type = "Condition", var = "ElderItemInRing {OtherSlotNum}" } },
-- Equipment conditions
["while holding a shield"] = { tag = { type = "Condition", var = "UsingShield" } },
["while your off hand is empty"] = { tag = { type = "Condition", var = "OffHandIsEmpty" } },
["with shields"] = { tag = { type = "Condition", var = "UsingShield" } },
["while dual wielding"] = { tag = { type = "Condition", var = "DualWielding" } },
["while dual wielding claws"] = { tag = { type = "Condition", var = "DualWieldingClaws" } },
["while dual wielding or holding a shield"] = { tag = { type = "Condition", varList = { "DualWielding", "UsingShield" } } },
["while wielding an axe"] = { tag = { type = "Condition", var = "UsingAxe" } },
["while wielding a bow"] = { tag = { type = "Condition", var = "UsingBow" } },
["while wielding a claw"] = { tag = { type = "Condition", var = "UsingClaw" } },
["while wielding a dagger"] = { tag = { type = "Condition", var = "UsingDagger" } },
["while wielding a mace"] = { tag = { type = "Condition", var = "UsingMace" } },
["while wielding a mace or sceptre"] = { tag = { type = "Condition", var = "UsingMace" } },
["while wielding a staff"] = { tag = { type = "Condition", var = "UsingStaff" } },
["while wielding a sword"] = { tag = { type = "Condition", var = "UsingSword" } },
["while wielding a melee weapon"] = { tag = { type = "Condition", var = "UsingMeleeWeapon" } },
["while wielding a one handed weapon"] = { tag = { type = "Condition", var = "UsingOneHandedWeapon" } },
["while wielding a two handed weapon"] = { tag = { type = "Condition", var = "UsingTwoHandedWeapon" } },
["while wielding a wand"] = { tag = { type = "Condition", var = "UsingWand" } },
["while unarmed"] = { tag = { type = "Condition", var = "Unarmed" } },
["with a normal item equipped"] = { tag = { type = "MultiplierThreshold", var = "NormalItem", threshold = 1 } },
["with a magic item equipped"] = { tag = { type = "MultiplierThreshold", var = "MagicItem", threshold = 1 } },
["with a rare item equipped"] = { tag = { type = "MultiplierThreshold", var = "RareItem", threshold = 1 } },
["with a unique item equipped"] = { tag = { type = "MultiplierThreshold", var = "UniqueItem", threshold = 1 } },
["if you wear no corrupted items"] = { tag = { type = "MultiplierThreshold", var = "CorruptedItem", threshold = 0, upper = true } },
["if no worn items are corrupted"] = { tag = { type = "MultiplierThreshold", var = "CorruptedItem", threshold = 0, upper = true } },
["if no equipped items are corrupted"] = { tag = { type = "MultiplierThreshold", var = "CorruptedItem", threshold = 0, upper = true } },
["if all worn items are corrupted"] = { tag = { type = "MultiplierThreshold", var = "NonCorruptedItem", threshold = 0, upper = true } },
["if all equipped items are corrupted"] = { tag = { type = "MultiplierThreshold", var = "NonCorruptedItem", threshold = 0, upper = true } },
["if equipped shield has at least (%d+)%% chance to block"] = function(num) return { tag = { type = "StatThreshold", stat = "ShieldBlockChance", threshold = num } } end,
["if you have (%d+) primordial items socketed or equipped"] = function(num) return { tag = { type = "MultiplierThreshold", var = "PrimordialItem", threshold = num } } end,
-- Player status conditions
["wh[ie][ln]e? on low life"] = { tag = { type = "Condition", var = "LowLife" } },
["wh[ie][ln]e? not on low life"] = { tag = { type = "Condition", var = "LowLife", neg = true } },
["wh[ie][ln]e? on full life"] = { tag = { type = "Condition", var = "FullLife" } },
["wh[ie][ln]e? not on full life"] = { tag = { type = "Condition", var = "FullLife", neg = true } },
["wh[ie][ln]e? no life is reserved"] = { tag = { type = "StatThreshold", stat = "LifeReserved", threshold = 0, upper = true } },
["wh[ie][ln]e? no mana is reserved"] = { tag = { type = "StatThreshold", stat = "ManaReserved", threshold = 0, upper = true } },
["wh[ie][ln]e? on full energy shield"] = { tag = { type = "Condition", var = "FullEnergyShield" } },
["wh[ie][ln]e? not on full energy shield"] = { tag = { type = "Condition", var = "FullEnergyShield", neg = true } },
["wh[ie][ln]e? you have energy shield"] = { tag = { type = "Condition", var = "HaveEnergyShield" } },
["if you have energy shield"] = { tag = { type = "Condition", var = "HaveEnergyShield" } },
["while stationary"] = { tag = { type = "Condition", var = "Stationary" } },
["while moving"] = { tag = { type = "Condition", var = "Moving" } },
["while channelling"] = { tag = { type = "Condition", var = "Channelling" } },
["while you have no power charges"] = { tag = { type = "StatThreshold", stat = "PowerCharges", threshold = 0, upper = true } },
["while you have no frenzy charges"] = { tag = { type = "StatThreshold", stat = "FrenzyCharges", threshold = 0, upper = true } },
["while you have no endurance charges"] = { tag = { type = "StatThreshold", stat = "EnduranceCharges", threshold = 0, upper = true } },
["while you have a power charge"] = { tag = { type = "StatThreshold", stat = "PowerCharges", threshold = 1 } },
["while you have a frenzy charge"] = { tag = { type = "StatThreshold", stat = "FrenzyCharges", threshold = 1 } },
["while you have an endurance charge"] = { tag = { type = "StatThreshold", stat = "EnduranceCharges", threshold = 1 } },
["while at maximum power charges"] = { tag = { type = "StatThreshold", stat = "PowerCharges", thresholdStat = "PowerChargesMax" } },
["while at maximum frenzy charges"] = { tag = { type = "StatThreshold", stat = "FrenzyCharges", thresholdStat = "FrenzyChargesMax" } },
["while at maximum endurance charges"] = { tag = { type = "StatThreshold", stat = "EnduranceCharges", thresholdStat = "EnduranceChargesMax" } },
["while you have at least (%d+) crab barriers"] = function(num) return { tag = { type = "StatThreshold", stat = "CrabBarriers", threshold = num } } end,
["while you have a totem"] = { tag = { type = "Condition", var = "HaveTotem" } },
["while you have at least one nearby ally"] = { tag = { type = "MultiplierThreshold", var = "NearbyAlly", threshold = 1 } },
["while you have fortify"] = { tag = { type = "Condition", var = "Fortify" } },
["during onslaught"] = { tag = { type = "Condition", var = "Onslaught" } },
["while you have onslaught"] = { tag = { type = "Condition", var = "Onslaught" } },
["while phasing"] = { tag = { type = "Condition", var = "Phasing" } },
["while you have tailwind"] = { tag = { type = "Condition", var = "Tailwind" } },
["while you have arcane surge"] = { tag = { type = "Condition", var = "AffectedByArcaneSurge" } },
["while you have cat's stealth"] = { tag = { type = "Condition", var = "AffectedByCat'sStealth" } },
["while you have avian's might"] = { tag = { type = "Condition", var = "AffectedByAvian'sMight" } },
["while you have avian's flight"] = { tag = { type = "Condition", var = "AffectedByAvian'sFlight" } },
["while affected by aspect of the cat"] = { tag = { type = "Condition", varList = { "AffectedByCat'sStealth", "AffectedByCat'sAgility" } } },
["while you have a bestial minion"] = { tag = { type = "Condition", var = "HaveBestialMinion" } },
["while focussed"] = { tag = { type = "Condition", var = "Focused" } },
["while leeching"] = { tag = { type = "Condition", var = "Leeching" } },
["while leeching energy shield"] = { tag = { type = "Condition", var = "LeechingEnergyShield" } },
["while using a flask"] = { tag = { type = "Condition", var = "UsingFlask" } },
["during effect"] = { tag = { type = "Condition", var = "UsingFlask" } },
["during flask effect"] = { tag = { type = "Condition", var = "UsingFlask" } },
["during any flask effect"] = { tag = { type = "Condition", var = "UsingFlask" } },
["while on consecrated ground"] = { tag = { type = "Condition", var = "OnConsecratedGround" } },
["on burning ground"] = { tag = { type = "Condition", var = "OnBurningGround" } },
["on chilled ground"] = { tag = { type = "Condition", var = "OnChilledGround" } },
["on shocked ground"] = { tag = { type = "Condition", var = "OnShockedGround" } },
["while ignited"] = { tag = { type = "Condition", var = "Ignited" } },
["while frozen"] = { tag = { type = "Condition", var = "Frozen" } },
["while shocked"] = { tag = { type = "Condition", var = "Shocked" } },
["while not ignited, frozen or shocked"] = { tag = { type = "Condition", varList = { "Ignited", "Frozen", "Shocked" }, neg = true } },
["while bleeding"] = { tag = { type = "Condition", var = "Bleeding" } },
["while poisoned"] = { tag = { type = "Condition", var = "Poisoned" } },
["while cursed"] = { tag = { type = "Condition", var = "Cursed" } },
["while not cursed"] = { tag = { type = "Condition", var = "Cursed", neg = true } },
["while there is only one nearby enemy"] = { tag = { type = "Condition", var = "OnlyOneNearbyEnemy" } },
["while t?h?e?r?e? ?i?s? ?a rare or unique enemy i?s? ?nearby"] = { tag = { type = "ActorCondition", actor = "enemy", var = "RareOrUnique" } },
["if you[' ]h?a?ve hit recently"] = { tag = { type = "Condition", var = "HitRecently" } },
["if you[' ]h?a?ve hit an enemy recently"] = { tag = { type = "Condition", var = "HitRecently" } },
["if you[' ]h?a?ve hit a cursed enemy recently"] = { tagList = { { type = "Condition", var = "HitRecently" }, { type = "ActorCondition", actor = "enemy", var = "Cursed" } } },
["if you[' ]h?a?ve crit recently"] = { tag = { type = "Condition", var = "CritRecently" } },
["if you[' ]h?a?ve dealt a critical strike recently"] = { tag = { type = "Condition", var = "CritRecently" } },
["if you[' ]h?a?ve crit in the past 8 seconds"] = { tag = { type = "Condition", var = "CritInPast8Sec" } },
["if you[' ]h?a?ve dealt a crit in the past 8 seconds"] = { tag = { type = "Condition", var = "CritInPast8Sec" } },
["if you[' ]h?a?ve dealt a critical strike in the past 8 seconds"] = { tag = { type = "Condition", var = "CritInPast8Sec" } },
["if you haven't crit recently"] = { tag = { type = "Condition", var = "CritRecently", neg = true } },
["if you haven't dealt a critical strike recently"] = { tag = { type = "Condition", var = "CritRecently", neg = true } },
["if you[' ]h?a?ve dealt a non%-critical strike recently"] = { tag = { type = "Condition", var = "NonCritRecently" } },
["if your skills have dealt a critical strike recently"] = { tag = { type = "Condition", var = "SkillCritRecently" } },
["if you[' ]h?a?ve killed recently"] = { tag = { type = "Condition", var = "KilledRecently" } },
["if you haven't killed recently"] = { tag = { type = "Condition", var = "KilledRecently", neg = true } },
["if you or your totems have killed recently"] = { tag = { type = "Condition", varList = {"KilledRecently","TotemsKilledRecently"} } },
["if you[' ]h?a?ve killed a maimed enemy recently"] = { tagList = { { type = "Condition", var = "KilledRecently" }, { type = "ActorCondition", actor = "enemy", var = "Maimed" } } },
["if you[' ]h?a?ve killed a cursed enemy recently"] = { tagList = { { type = "Condition", var = "KilledRecently" }, { type = "ActorCondition", actor = "enemy", var = "Cursed" } } },
["if you[' ]h?a?ve killed a bleeding enemy recently"] = { tagList = { { type = "Condition", var = "KilledRecently" }, { type = "ActorCondition", actor = "enemy", var = "Bleeding" } } },
["if you[' ]h?a?ve killed an enemy affected by your damage over time recently"] = { tag = { type = "Condition", var = "KilledAffectedByDotRecently" } },
["if you[' ]h?a?ve frozen an enemy recently"] = { tag = { type = "Condition", var = "FrozenEnemyRecently" } },
["if you[' ]h?a?ve ignited an enemy recently"] = { tag = { type = "Condition", var = "IgnitedEnemyRecently" } },
["if you[' ]h?a?ve shocked an enemy recently"] = { tag = { type = "Condition", var = "ShockedEnemyRecently" } },
["if you[' ]h?a?ve been hit recently"] = { tag = { type = "Condition", var = "BeenHitRecently" } },
["if you were hit recently"] = { tag = { type = "Condition", var = "BeenHitRecently" } },
["if you were damaged by a hit recently"] = { tag = { type = "Condition", var = "BeenHitRecently" } },
["if you[' ]h?a?ve taken a critical strike recently"] = { tag = { type = "Condition", var = "BeenCritRecently" } },
["if you[' ]h?a?ve taken a savage hit recently"] = { tag = { type = "Condition", var = "BeenSavageHitRecently" } },
["if you have ?n[o']t been hit recently"] = { tag = { type = "Condition", var = "BeenHitRecently", neg = true } },
["if you[' ]h?a?ve taken no damage from hits recently"] = { tag = { type = "Condition", var = "BeenHitRecently", neg = true } },
["if you[' ]h?a?ve taken fire damage from a hit recently"] = { tag = { type = "Condition", var = "HitByFireDamageRecently" } },
["if you[' ]h?a?ve blocked recently"] = { tag = { type = "Condition", var = "BlockedRecently" } },
["if you[' ]h?a?ve blocked an attack recently"] = { tag = { type = "Condition", var = "BlockedAttackRecently" } },
["if you[' ]h?a?ve blocked a spell recently"] = { tag = { type = "Condition", var = "BlockedSpellRecently" } },
["if you[' ]h?a?ve blocked damage from a unique enemy in the past 10 seconds"] = { tag = { type = "Condition", var = "BlockedHitFromUniqueEnemyInPast10Sec" } },
["if you[' ]h?a?ve attacked recently"] = { tag = { type = "Condition", var = "AttackedRecently" } },
["if you[' ]h?a?ve cast a spell recently"] = { tag = { type = "Condition", var = "CastSpellRecently" } },
["if you[' ]h?a?ve consumed a corpse recently"] = { tag = { type = "Condition", var = "ConsumedCorpseRecently" } },
["for each corpse consumed recently"] = { tag = { type = "Multiplier", var = "CorpseConsumedRecently" } },
["if you[' ]h?a?ve taunted an enemy recently"] = { tag = { type = "Condition", var = "TauntedEnemyRecently" } },
["if you[' ]h?a?ve used a skill recently"] = { tag = { type = "Condition", var = "UsedSkillRecently" } },
["for each skill you've used recently, up to (%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "SkillUsedRecently", limit = num, limitTotal = true } } end,
["if you[' ]h?a?ve used a warcry recently"] = { tag = { type = "Condition", var = "UsedWarcryRecently" } },
["if you[' ]h?a?ve warcried recently"] = { tag = { type = "Condition", var = "UsedWarcryRecently" } },
["for each of your mines detonated recently, up to (%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "MineDetonatedRecently", limit = num, limitTotal = true } } end,
["for each mine detonated recently, up to (%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "MineDetonatedRecently", limit = num, limitTotal = true } } end,
["for each mine detonated recently, up to (%d+)%% per second"] = function(num) return { tag = { type = "Multiplier", var = "MineDetonatedRecently", limit = num, limitTotal = true } } end,
["for each of your traps triggered recently, up to (%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "TrapTriggeredRecently", limit = num, limitTotal = true } } end,
["for each trap triggered recently, up to (%d+)%%"] = function(num) return { tag = { type = "Multiplier", var = "TrapTriggeredRecently", limit = num, limitTotal = true } } end,
["for each trap triggered recently, up to (%d+)%% per second"] = function(num) return { tag = { type = "Multiplier", var = "TrapTriggeredRecently", limit = num, limitTotal = true } } end,
["if you[' ]h?a?ve used a fire skill recently"] = { tag = { type = "Condition", var = "UsedFireSkillRecently" } },
["if you[' ]h?a?ve used a cold skill recently"] = { tag = { type = "Condition", var = "UsedColdSkillRecently" } },
["if you[' ]h?a?ve used a fire skill in the past 10 seconds"] = { tag = { type = "Condition", var = "UsedFireSkillInPast10Sec" } },
["if you[' ]h?a?ve used a cold skill in the past 10 seconds"] = { tag = { type = "Condition", var = "UsedColdSkillInPast10Sec" } },
["if you[' ]h?a?ve used a lightning skill in the past 10 seconds"] = { tag = { type = "Condition", var = "UsedLightningSkillInPast10Sec" } },
["if you[' ]h?a?ve summoned a totem recently"] = { tag = { type = "Condition", var = "SummonedTotemRecently" } },
["if you[' ]h?a?ve used a minion skill recently"] = { tag = { type = "Condition", var = "UsedMinionSkillRecently" } },
["if you[' ]h?a?ve used a movement skill recently"] = { tag = { type = "Condition", var = "UsedMovementSkillRecently" } },
["if you[' ]h?a?ve used a vaal skill recently"] = { tag = { type = "Condition", var = "UsedVaalSkillRecently" } },
["during soul gain prevention"] = { tag = { type = "Condition", var = "SoulGainPrevention" } },
["if you detonated mines recently"] = { tag = { type = "Condition", var = "DetonatedMinesRecently" } },
["if you detonated a mine recently"] = { tag = { type = "Condition", var = "DetonatedMinesRecently" } },
["if energy shield recharge has started recently"] = { tag = { type = "Condition", var = "EnergyShieldRechargeRecently" } },
["when cast on frostbolt"] = { tag = { type = "Condition", var = "CastOnFrostbolt" } },
["branded enemy's"] = { tag = { type = "Condition", var = "BrandAttachedToEnemy" } },
["to enemies they're attached to"] = { tag = { type = "Condition", var = "BrandAttachedToEnemy" } },
-- Enemy status conditions
["at close range"] = { tag = { type = "Condition", var = "AtCloseRange" }, flags = ModFlag.Hit },
["against rare and unique enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "RareOrUnique" }, keywordFlags = KeywordFlag.Hit },
["against unique enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "RareOrUnique" }, keywordFlags = KeywordFlag.Hit },
["against enemies on full life"] = { tag = { type = "ActorCondition", actor = "enemy", var = "FullLife" }, keywordFlags = KeywordFlag.Hit },
["against enemies that are on full life"] = { tag = { type = "ActorCondition", actor = "enemy", var = "FullLife" }, keywordFlags = KeywordFlag.Hit },
["against enemies on low life"] = { tag = { type = "ActorCondition", actor = "enemy", var = "LowLife" }, keywordFlags = KeywordFlag.Hit },
["against enemies that are on low life"] = { tag = { type = "ActorCondition", actor = "enemy", var = "LowLife" }, keywordFlags = KeywordFlag.Hit },
["against cursed enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Cursed" }, keywordFlags = KeywordFlag.Hit },
["when hitting cursed enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Cursed" }, keywordFlags = KeywordFlag.Hit },
["against taunted enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Taunted" }, keywordFlags = KeywordFlag.Hit },
["against bleeding enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Bleeding" }, keywordFlags = KeywordFlag.Hit },
["to bleeding enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Bleeding" }, keywordFlags = KeywordFlag.Hit },
["from bleeding enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Bleeding" } },
["against poisoned enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Poisoned" }, keywordFlags = KeywordFlag.Hit },
["to poisoned enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Poisoned" }, keywordFlags = KeywordFlag.Hit },
["against enemies affected by (%d+) or more poisons"] = function(num) return { tag = { type = "MultiplierThreshold", actor = "enemy", var = "PoisonStack", threshold = num } } end,
["against enemies affected by at least (%d+) poisons"] = function(num) return { tag = { type = "MultiplierThreshold", actor = "enemy", var = "PoisonStack", threshold = num } } end,
["against hindered enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Hindered" }, keywordFlags = KeywordFlag.Hit },
["against maimed enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Maimed" }, keywordFlags = KeywordFlag.Hit },
["against blinded enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Blinded" }, keywordFlags = KeywordFlag.Hit },
["from blinded enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Blinded" } },
["against burning enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Burning" }, keywordFlags = KeywordFlag.Hit },
["against ignited enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Ignited" }, keywordFlags = KeywordFlag.Hit },
["to ignited enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Ignited" }, keywordFlags = KeywordFlag.Hit },
["against shocked enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Shocked" }, keywordFlags = KeywordFlag.Hit },
["to shocked enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Shocked" }, keywordFlags = KeywordFlag.Hit },
["against frozen enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Frozen" }, keywordFlags = KeywordFlag.Hit },
["to frozen enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Frozen" }, keywordFlags = KeywordFlag.Hit },
["against chilled enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Chilled" }, keywordFlags = KeywordFlag.Hit },
["to chilled enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Chilled" }, keywordFlags = KeywordFlag.Hit },
["inflicted on chilled enemies"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Chilled" } },
["enemies which are chilled"] = { tag = { type = "ActorCondition", actor = "enemy", var = "Chilled" }, keywordFlags = KeywordFlag.Hit },
["against frozen, shocked or ignited enemies"] = { tag = { type = "ActorCondition", actor = "enemy", varList = {"Frozen","Shocked","Ignited"} }, keywordFlags = KeywordFlag.Hit },
["against enemies affected by elemental ailments"] = { tag = { type = "ActorCondition", actor = "enemy", varList = {"Frozen","Chilled","Shocked","Ignited"} }, keywordFlags = KeywordFlag.Hit },
["against enemies that are affected by elemental ailments"] = { tag = { type = "ActorCondition", actor = "enemy", varList = {"Frozen","Chilled","Shocked","Ignited"} }, fkeywordFlags = KeywordFlag.Hit },
["against enemies that are affected by no elemental ailments"] = { tagList = { { type = "ActorCondition", actor = "enemy", varList = {"Frozen","Chilled","Shocked","Ignited"}, neg = true }, { type = "Condition", var = "Effective" } }, keywordFlags = KeywordFlag.Hit },
["against enemies affected by (%d+) spider's webs"] = function(num) return { tag = { type = "MultiplierThreshold", actor = "enemy", var = "Spider's WebStack", threshold = num } } end,
["against enemies on consecrated ground"] = { tag = { type = "ActorCondition", actor = "enemy", var = "OnConsecratedGround" } },
-- Enemy multipliers
["per freeze, shock and ignite on enemy"] = { tag = { type = "Multiplier", var = "FreezeShockIgniteOnEnemy" }, keywordFlags = KeywordFlag.Hit },
["per poison affecting enemy"] = { tag = { type = "Multiplier", actor = "enemy", var = "PoisonStack" } },
["per poison affecting enemy, up to %+([%d%.]+)%%"] = function(num) return { tag = { type = "Multiplier", actor = "enemy", var = "PoisonStack", limit = num, limitTotal = true } } end,
["for each spider's web on the enemy"] = { tag = { type = "Multiplier", actor = "enemy", var = "Spider's WebStack" } },
}
local mod = modLib.createMod
local function flag(name, ...)
return mod(name, "FLAG", true, ...)
end
local gemIdLookup = {
["power charge on critical strike"] = "SupportPowerChargeOnCrit",
}
for name, grantedEffect in pairs(data["3_0"].skills) do
if not grantedEffect.hidden or grantedEffect.fromItem then
gemIdLookup[grantedEffect.name:lower()] = grantedEffect.id
end
end
local function extraSkill(name, level, noSupports)
name = name:gsub(" skill","")
if gemIdLookup[name] then
return {
mod("ExtraSkill", "LIST", { skillId = gemIdLookup[name], level = level, noSupports = noSupports })
}
end
end
-- List of special modifiers
local specialModList = {