-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathTestItemMods_spec.lua
More file actions
669 lines (574 loc) · 20.8 KB
/
Copy pathTestItemMods_spec.lua
File metadata and controls
669 lines (574 loc) · 20.8 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
describe("TestItemMods", function()
before_each(function()
newBuild()
end)
teardown(function()
-- newBuild() takes care of resetting everything in setup()
end)
it("Dialla's socket mods", function()
build.skillsTab:PasteSocketGroup("Slot: Body Armour\nArc 20/0 1\nArc 20/0 1\n")
runCallback("OnFrame")
build.itemsTab:CreateDisplayItemFromRaw([[Dialla's Malefaction
Sage's Robe
Energy Shield: 95
EnergyShieldBasePercentile: 0
Variant: Pre 3.19.0
Variant: Current
Selected Variant: 2
Sage's Robe
Quality: 20
Sockets: R-G-B-B-B-B
LevelReq: 37
Implicits: 0
Gems can be Socketed in this Item ignoring Socket Colour
{variant:1}Gems Socketed in Red Sockets have +1 to Level
{variant:2}Gems Socketed in Red Sockets have +2 to Level
{variant:1}Gems Socketed in Green Sockets have +10% to Quality
{variant:2}Gems Socketed in Green Sockets have +30% to Quality
{variant:1}Gems Socketed in Blue Sockets gain 25% increased Experience
{variant:2}Gems Socketed in Blue Sockets gain 100% increased Experience
Has no Attribute Requirements]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
assert.are.equals(build.calcsTab.mainEnv.player.activeSkillList[1].activeEffect.level, 22)
assert.are.equals(build.calcsTab.mainEnv.player.activeSkillList[2].activeEffect.quality, 30)
end)
it("Malachai's Artifice socket mods", function()
build.itemsTab:CreateDisplayItemFromRaw([[Malachai's Artifice
Unset Ring
Variant: Pre 2.6.0
Variant: Current
Selected Variant: 2
Unset Ring
Sockets: W
LevelReq: 5
Implicits: 1
Has 1 Socket
{tags:jewellery_resistance}{variant:1}-25% to all Elemental Resistances
{tags:jewellery_resistance}{variant:2}-20% to all Elemental Resistances
{tags:jewellery_resistance}{range:0.5}+(75-100)% to Fire Resistance when Socketed with a Red Gem
{tags:jewellery_resistance}{range:0.5}+(75-100)% to Cold Resistance when Socketed with a Green Gem
{tags:jewellery_resistance}{range:0.5}+(75-100)% to Lightning Resistance when Socketed with a Blue Gem
All Sockets are White
Socketed Gems have Elemental Equilibrium]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
local lightningResBefore = build.calcsTab.mainOutput.LightningResist
build.skillsTab:PasteSocketGroup("Slot: Ring 1\nWrath 20/0 1\n")
runCallback("OnFrame")
assert.are_not.equals(lightningResBefore, build.calcsTab.mainOutput.LightningResist)
end)
it("Doomsower vaal pact and extra phys as fire", function()
build.itemsTab:CreateDisplayItemFromRaw([[Doomsower
Lion Sword
Variant: Pre 2.6.0
Variant: Pre 3.0.0
Variant: Pre 3.8.0
Variant: Pre 3.11.0
Variant: Current
Selected Variant: 5
Lion Sword
Quality: 20
Sockets: G-G-G-G-G-G
LevelReq: 65
Implicits: 3
{variant:1}18% increased Global Accuracy Rating
{variant:2,3,4}+470 to Accuracy Rating
{variant:5}+50 to Strength and Dexterity
Socketed Melee Gems have 15% increased Area of Effect
{variant:1,2,3}Socketed Red Gems get 10% Physical Damage as Extra Fire Damage
{variant:1,2,3,4}{range:0.5}(50-70)% increased Physical Damage
{variant:5}{range:0.5}(30-50)% increased Physical Damage
{variant:1,2}{range:0.5}Adds (50-75) to (85-110) Physical Damage
{variant:3,4,5}{range:0.5}Adds (65-75) to (100-110) Physical Damage
{range:0.5}(6-12)% increased Attack Speed
{variant:5,4}Attack Skills gain 5% of Physical Damage as Extra Fire Damage per Socketed Red Gem
{variant:5,4}You have Vaal Pact while all Socketed Gems are Red]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
build.skillsTab:PasteSocketGroup("Slot: Weapon 1\nSmite 20/0 1\n")
runCallback("OnFrame")
assert.is_true(build.calcsTab.mainEnv.keystonesAdded["Vaal Pact"])
assert.is_true(build.calcsTab.mainEnv.player.mainSkill.skillModList:Sum("BASE", build.calcsTab.mainEnv.player.mainSkill.skillCfg, "PhysicalDamageGainAsFire") > 0)
end)
it("Varunastra works with nightblade", function()
build.itemsTab:CreateDisplayItemFromRaw([[Varunastra
Vaal Blade
League: Perandus
Variant: Pre 2.6.0
Variant: Current
Selected Variant: 2
Vaal Blade
Quality: 20
Sockets: G-G-G
LevelReq: 64
Implicits: 2
{variant:1}18% increased Global Accuracy Rating
{variant:2}+460 to Accuracy Rating
{range:0.5}(40-60)% increased Physical Damage
{range:0.5}Adds (30-45) to (80-100) Physical Damage
{range:0.5}+(2-3) Mana gained for each Enemy hit by Attacks
Counts as all One Handed Melee Weapon Types]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
build.skillsTab:PasteSocketGroup("Smite 20/0 1\nNightblade 20/0 1\n")
runCallback("OnFrame")
local nonElusiveCritMult = build.calcsTab.mainOutput.CritMultiplier
build.configTab.input["buffElusive"] = true
build.configTab:BuildModList()
runCallback("OnFrame")
assert.are_not.equals(nonElusiveCritMult, build.calcsTab.mainOutput.CritMultiplier)
end)
it("Varunastra works with close combat support", function()
build.itemsTab:CreateDisplayItemFromRaw([[Varunastra
Vaal Blade
League: Perandus
Variant: Pre 2.6.0
Variant: Current
Selected Variant: 2
Vaal Blade
Quality: 20
Sockets: G-G-G
LevelReq: 64
Implicits: 2
{variant:1}18% increased Global Accuracy Rating
{variant:2}+460 to Accuracy Rating
{range:0.5}(40-60)% increased Physical Damage
{range:0.5}Adds (30-45) to (80-100) Physical Damage
{range:0.5}+(2-3) Mana gained for each Enemy hit by Attacks
Counts as all One Handed Melee Weapon Types]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
build.configTab.input["meleeDistance"] = 99
build.configTab:BuildModList()
runCallback("OnFrame")
build.skillsTab:PasteSocketGroup("Cyclone 20/0 1\nClose Combat 20/0 1\n")
runCallback("OnFrame")
local farDPS = build.calcsTab.mainOutput.TotalDPS
build.configTab.input["meleeDistance"] = 1
build.configTab:BuildModList()
runCallback("OnFrame")
assert.are_not.equals(farDPS, build.calcsTab.mainOutput.TotalDPS)
end)
it("Kalandra's Touch mod copy", function()
local initialInt = build.calcsTab.mainOutput.Int
build.itemsTab:CreateDisplayItemFromRaw([[New Item
Ring
Quality: 0
LevelReq: 35
Implicits: 0
+30 to Intelligence]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
local genericRingInt = build.calcsTab.mainOutput.Int
build.itemsTab:CreateDisplayItemFromRaw([[Kalandra's Touch
Ring
League: Kalandra
Implicits: 0
Reflects your other Ring
Mirrored]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
assert.are.equals(genericRingInt - initialInt, build.calcsTab.mainOutput.Int - genericRingInt)
end)
it("Kalandra's Touch influence copy", function()
build.skillsTab:PasteSocketGroup("Slot: Weapon 1\nSmite 20/0 1\n")
runCallback("OnFrame")
local dmg = build.calcsTab.mainOutput.AverageDamage
build.configTab.input.customMods = "\z
Gain 5% of Elemental Damage as Extra Chaos Damage per Shaper Item Equipped\n\z
"
build.configTab:BuildModList()
runCallback("OnFrame")
assert.are.equals(build.calcsTab.mainOutput.AverageDamage, dmg)
build.itemsTab:CreateDisplayItemFromRaw([[New Item
Cerulean Ring
Shaper Item
Crafted: true
Prefix: None
Prefix: None
Prefix: None
Suffix: None
Suffix: None
Suffix: None
Quality: 0
LevelReq: 80
Implicits: 0]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
assert.is_true(build.calcsTab.mainOutput.AverageDamage > dmg)
local dmgOneRing = build.calcsTab.mainOutput.AverageDamage
build.itemsTab:CreateDisplayItemFromRaw([[Kalandra's Touch
Ring
League: Kalandra
Implicits: 0
Reflects your other Ring
Mirrored]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
assert.is_true(build.calcsTab.mainOutput.AverageDamage > dmgOneRing)
end)
it("Both slots mod (evasion and es mastery)", function()
build.configTab.input.customMods = "\z
20% increased Maximum Energy Shield if both Equipped Rings have an Evasion Modifier\n\z
"
build.configTab:BuildModList()
runCallback("OnFrame")
build.itemsTab:CreateDisplayItemFromRaw([[Energy Shield Boots
Sorcerer Boots
Energy Shield: 114
EnergyShieldBasePercentile: 1
Crafted: true
Prefix: {range:0.5}IncreasedLife6
Prefix: {range:0.5}LocalIncreasedEnergyShieldPercent5
Prefix: {range:0.5}MovementVelocity5
Suffix: None
Suffix: None
Suffix: None
Quality: 20
Sockets: B-B-B-B
LevelReq: 67
Implicits: 0
74% increased Energy Shield
+65 to maximum Life
30% increased Movement Speed]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
local baseEs = build.calcsTab.mainOutput.EnergyShield
build.itemsTab:CreateDisplayItemFromRaw([[Chaos Resistance Ring
Amethyst Ring
LevelReq: 33
Implicits: 1
+71 to Evasion Rating
{tags:chaos,resistance}{range:0.5}+(17-23)% to Chaos Resistance]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
assert.are.equals(baseEs, build.calcsTab.mainOutput.EnergyShield) -- No change in es with just one ring.
build.itemsTab:CreateDisplayItemFromRaw([[Chaos Resistance Ring
Amethyst Ring
Crafted: true
Prefix: {range:0.5}IncreasedEvasionRating4
Prefix: None
Prefix: None
Suffix: None
Suffix: None
Suffix: None
LevelReq: 33
Implicits: 1
{tags:chaos,resistance}{range:0.5}+(17-23)% to Chaos Resistance
+71 to Evasion Rating]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
assert.are_not.equals(baseEs, build.calcsTab.mainOutput.EnergyShield)
-- Es changes after adding another ring with mod. Regardless of the evasion mod on the first ring being implicit.
end)
it("Both slots explicit mod with mixed mod rings (evasion and es mastery)", function()
build.configTab.input.customMods = "\z
20% increased Maximum Energy Shield if both Equipped Rings have an Explicit Evasion Modifier\n\z
"
build.configTab:BuildModList()
runCallback("OnFrame")
build.itemsTab:CreateDisplayItemFromRaw([[Energy Shield Boots
Sorcerer Boots
Energy Shield: 114
EnergyShieldBasePercentile: 1
Crafted: true
Prefix: {range:0.5}IncreasedLife6
Prefix: {range:0.5}LocalIncreasedEnergyShieldPercent5
Prefix: {range:0.5}MovementVelocity5
Suffix: None
Suffix: None
Suffix: None
Quality: 20
Sockets: B-B-B-B
LevelReq: 67
Implicits: 0
74% increased Energy Shield
+65 to maximum Life
30% increased Movement Speed]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
local baseEs = build.calcsTab.mainOutput.EnergyShield
build.itemsTab:CreateDisplayItemFromRaw([[Chaos Resistance Ring
Amethyst Ring
LevelReq: 33
Implicits: 1
+71 to Evasion Rating
{tags:chaos,resistance}{range:0.5}+(17-23)% to Chaos Resistance]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
assert.are.equals(baseEs, build.calcsTab.mainOutput.EnergyShield) -- No change in es with just one ring.
build.itemsTab:CreateDisplayItemFromRaw([[Chaos Resistance Ring
Amethyst Ring
Crafted: true
Prefix: {range:0.5}IncreasedEvasionRating4
Prefix: None
Prefix: None
Suffix: None
Suffix: None
Suffix: None
LevelReq: 33
Implicits: 1
{tags:chaos,resistance}{range:0.5}+(17-23)% to Chaos Resistance
+71 to Evasion Rating]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
assert.are.equals(baseEs, build.calcsTab.mainOutput.EnergyShield)
-- Es does not change after adding another ring with mod due to the first ring having an implicit evasion mod.
end)
it("Both slots explicit mod (evasion and es mastery)", function()
build.configTab.input.customMods = "\z
20% increased Maximum Energy Shield if both Equipped Rings have an Explicit Evasion Modifier\n\z
"
build.configTab:BuildModList()
runCallback("OnFrame")
build.itemsTab:CreateDisplayItemFromRaw([[Energy Shield Boots
Sorcerer Boots
Energy Shield: 114
EnergyShieldBasePercentile: 1
Crafted: true
Prefix: {range:0.5}IncreasedLife6
Prefix: {range:0.5}LocalIncreasedEnergyShieldPercent5
Prefix: {range:0.5}MovementVelocity5
Suffix: None
Suffix: None
Suffix: None
Quality: 20
Sockets: B-B-B-B
LevelReq: 67
Implicits: 0
74% increased Energy Shield
+65 to maximum Life
30% increased Movement Speed]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
local baseEs = build.calcsTab.mainOutput.EnergyShield
build.itemsTab:CreateDisplayItemFromRaw([[Chaos Resistance Ring
Amethyst Ring
Crafted: true
Prefix: {range:0.5}IncreasedEvasionRating4
Prefix: None
Prefix: None
Suffix: None
Suffix: None
Suffix: None
LevelReq: 33
Implicits: 1
{tags:chaos,resistance}{range:0.5}+(17-23)% to Chaos Resistance
+71 to Evasion Rating]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
assert.are.equals(baseEs, build.calcsTab.mainOutput.EnergyShield) -- No change in es with just one ring.
build.itemsTab:CreateDisplayItemFromRaw([[Chaos Resistance Ring
Amethyst Ring
Crafted: true
Prefix: {range:0.5}IncreasedEvasionRating4
Prefix: None
Prefix: None
Suffix: None
Suffix: None
Suffix: None
LevelReq: 33
Implicits: 1
{tags:chaos,resistance}{range:0.5}+(17-23)% to Chaos Resistance
+71 to Evasion Rating]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
assert.are_not.equals(baseEs, build.calcsTab.mainOutput.EnergyShield)
-- Es changes after adding two rings with explicit mods.
end)
it("Both slots explicit mod no rings (evasion and es mastery)", function()
build.itemsTab:CreateDisplayItemFromRaw([[Energy Shield Boots
Sorcerer Boots
Energy Shield: 114
EnergyShieldBasePercentile: 1
Crafted: true
Prefix: {range:0.5}IncreasedLife6
Prefix: {range:0.5}LocalIncreasedEnergyShieldPercent5
Prefix: {range:0.5}MovementVelocity5
Suffix: None
Suffix: None
Suffix: None
Quality: 20
Sockets: B-B-B-B
LevelReq: 67
Implicits: 0
74% increased Energy Shield
+65 to maximum Life
30% increased Movement Speed]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
local baseEs = build.calcsTab.mainOutput.EnergyShield
build.configTab.input.customMods = "\z
20% increased Maximum Energy Shield if both Equipped Rings have an Explicit Evasion Modifier\n\z
"
build.configTab:BuildModList()
runCallback("OnFrame")
assert.are.equals(baseEs, build.calcsTab.mainOutput.EnergyShield) -- No change in es with no rings.
end)
it("mod if no mod on x slot", function()
local baseLife = build.calcsTab.mainOutput.Life
build.configTab.input.customMods = "\z
15% increased maximum Life if there are no Life Modifiers on Equipped Body Armour\n\z
"
build.configTab:BuildModList()
runCallback("OnFrame")
assert.are_not.equals(baseLife, build.calcsTab.mainOutput.Life)
baseLife = build.calcsTab.mainOutput.Life
build.itemsTab:CreateDisplayItemFromRaw([[Armour Chest
Astral Plate
Armour: 1696
ArmourBasePercentile: 1
Crafted: true
Prefix: {range:0.5}LocalIncreasedPhysicalDamageReductionRating5
Prefix: {range:0.5}LocalIncreasedPhysicalDamageReductionRatingPercent5
Prefix: {range:0.5}IncreasedLife9
Suffix: None
Suffix: None
Suffix: None
Quality: 20
Sockets: R-R-R-R-R-R
LevelReq: 62
Implicits: 1
{tags:elemental,resistance}{range:0.5}+(8-12)% to all Elemental Resistances
+92 to Armour
74% increased Armour
+95 to maximum Life]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
assert.are_not.equals(baseLife, build.calcsTab.mainOutput.Life)
end)
it("globalLimit mods", function()
build.configTab.input.customMods = [[
-1000% to cold resistance
]]
build.configTab:BuildModList()
build.itemsTab:CreateDisplayItemFromRaw([[Replica Nebulis
Void Sceptre
League: Heist
Quality: 20
Sockets: B-B-B
LevelReq: 68
Implicits: 1
40% increased Elemental Damage
{fractured}{range:1}(15-20)% increased Cast Speed
{range:1}(15-20)% increased Cold Damage per 1% Missing Cold Resistance, up to a maximum of 300%
{range:1}(15-20)% increased Fire Damage per 1% Missing Fire Resistance, up to a maximum of 300%]])
build.itemsTab:AddDisplayItem()
build.skillsTab:PasteSocketGroup("Slot: Weapon 1\nFireball 20/0 1\n")
runCallback("OnFrame")
assert.are_not.equals(340, build.calcsTab.mainEnv.modDB:Sum("INC", "FireDamage"))
assert.are_not.equals(340, build.calcsTab.mainEnv.modDB:Sum("INC", "ColdDamage"))
newBuild()
build.configTab.input.customMods = [[
Gain 25% increased Armour per 5 Power for 8 seconds when you Warcry, up to a maximum of 100%
Warcries have infinite Power
warcries grant arcane surge to you and allies, with 10% increased effect per 5 power, up to 100%
]]
build.configTab:BuildModList()
build.itemsTab:CreateDisplayItemFromRaw([[
New Item
Plate Vest
Armour: 32
]])
build.itemsTab:AddDisplayItem()
build.skillsTab:PasteSocketGroup("Arc 20/0 1")
assert.are_not.equals(40, build.calcsTab.mainEnv.modDB:Sum("INC", { flags = ModFlag.Cast }, "Speed"))
assert.are_not.equals(64, build.calcsTab.mainOutput.Armour)
runCallback("OnFrame")
end)
it("Heralds apply exposure with Heraldry", function()
build.skillsTab:PasteSocketGroup("Arc 20/0 1\nHerald of Thunder 20/0 1\n")
runCallback("OnFrame")
assert.are.equals(0.5, build.calcsTab.calcsOutput.LightningEffMult)
build.configTab.input.customMods = [[
Nearby Enemies have Cold Exposure while you are affected by Herald of Ice
Nearby Enemies have Fire Exposure while you are affected by Herald of Ash
Nearby Enemies have Lightning Exposure while you are affected by Herald of Thunder
]]
build.configTab:BuildModList()
runCallback("OnFrame")
assert.are.equals(0.6, build.calcsTab.calcsOutput.LightningEffMult)
end)
it("Enemy self curse effect", function()
build.skillsTab:PasteSocketGroup("Arc 20/0 1\nConductivity 14/0 1\n")
runCallback("OnFrame")
assert.are.equals(0.8, build.calcsTab.calcsOutput.LightningEffMult)
build.configTab.input.customMods = [[
Nearby Enemies have 20% increased Effect of Curses on them
]]
build.configTab:BuildModList()
runCallback("OnFrame")
assert.are.equals(0.86, build.calcsTab.calcsOutput.LightningEffMult)
end)
it("Max charges with conditional mod", function() -- see #9442
build.skillsTab:PasteSocketGroup("Grace 20/20 1\n")
runCallback("OnFrame")
local baseFrenzyChargesMax = build.calcsTab.calcsOutput.FrenzyChargesMax
local baseEnduranceChargesMax = build.calcsTab.calcsOutput.EnduranceChargesMax
build.configTab.input.customMods = [[
+1 to Maximum Frenzy Charges while affected by Grace
]]
build.configTab:BuildModList()
runCallback("OnFrame")
assert.are.equals(baseFrenzyChargesMax + 1, build.calcsTab.calcsOutput.FrenzyChargesMax)
assert.are.equals(baseEnduranceChargesMax, build.calcsTab.calcsOutput.EnduranceChargesMax)
build.configTab.input.customMods = [[
Your Maximum Endurance Charges is equal to your Maximum Frenzy Charges
+1 to Maximum Frenzy Charges while affected by Grace
]]
build.configTab:BuildModList()
runCallback("OnFrame")
assert.are.equals(baseFrenzyChargesMax + 1, build.calcsTab.calcsOutput.FrenzyChargesMax)
assert.are.equals(baseEnduranceChargesMax + 1, build.calcsTab.calcsOutput.EnduranceChargesMax)
end)
it("Test Wings of Entropy skill disabled", function()
build.itemsTab:CreateDisplayItemFromRaw([[
Wings of Entropy
{variant:1,2,3,4}Sundering Axe
{variant:5}Ezomyte Axe
Variant: Pre 1.3.0
Variant: Pre 2.0.0
Variant: Pre 3.4.0
Variant: Pre 3.11.0
Variant: Pre 3.26.0
Variant: Current
Implicits: 0
{variant:1,2,3}7% Chance to Block Spell Damage
{variant:4}(6-7)% Chance to Block Spell Damage
{variant:5,6}(7-10)% Chance to Block Spell Damage
{variant:1}+10% Chance to Block Attack Damage while Dual Wielding
{variant:2,3,4}+8% Chance to Block Attack Damage while Dual Wielding
{variant:5,6}+(8-12)% Chance to Block Attack Damage while Dual Wielding
{variant:1,2}(80-120)% increased Physical Damage
{variant:3,4}(100-120)% increased Physical Damage
{variant:5,6}(60-80)% increased Physical Damage
{variant:1,2,3,4}Adds (55-65) to (100-120) Fire Damage in Main Hand
{variant:5}Adds (75-100) to (165-200) Fire Damage in Main Hand
{variant:6}Adds (150-200) to (330-400) Fire Damage in Main Hand
{variant:1,2,3,4}Adds (55-65) to (100-120) Chaos Damage in Off Hand
{variant:5}Adds (75-100) to (165-200) Chaos Damage in Off Hand
{variant:6}Adds (151-199) to (331-401) Chaos Damage in Off Hand
Counts as Dual Wielding
]])
build.itemsTab:AddDisplayItem()
runCallback("OnFrame")
local function testSkill(skill, index, expected)
build.skillsTab:PasteSocketGroup(skill.." 20/0 1")
runCallback("OnFrame")
build.mainSocketGroup = index
build.modFlag = true
build.buildFlag = true
runCallback("OnFrame")
assert.True(build.calcsTab.mainEnv.player.mainSkill.skillFlags.disable == expected)
end
testSkill("Lacerate of Haemorrhage", 1, nil)
testSkill("Lacerate of Butchering", 2, true)
testSkill("Ice Crash of Cadence", 3, nil)
testSkill("Swordstorm", 4, nil)
testSkill("Ground Slam of Earthshaking", 5, true)
testSkill("Sunder", 6, nil)
testSkill("Chain Hook", 7, nil)
testSkill("Dual Strike of Ambidexterity", 8, true)
end)
end)