@@ -509,4 +509,48 @@ describe("TetsItemMods", function()
509509
510510 assert .are_not .equals (baseLife , build .calcsTab .mainOutput .Life )
511511 end )
512+
513+ it (" globalLimit mods" , function ()
514+ build .configTab .input .customMods = [[
515+ -1000% to cold resistance
516+ ]]
517+ build .configTab :BuildModList ()
518+ build .itemsTab :CreateDisplayItemFromRaw ([[ Replica Nebulis
519+ Void Sceptre
520+ League: Heist
521+ Quality: 20
522+ Sockets: B-B-B
523+ LevelReq: 68
524+ Implicits: 1
525+ 40% increased Elemental Damage
526+ {fractured}{range:1}(15-20)% increased Cast Speed
527+ {range:1}(15-20)% increased Cold Damage per 1% Missing Cold Resistance, up to a maximum of 300%
528+ {range:1}(15-20)% increased Fire Damage per 1% Missing Fire Resistance, up to a maximum of 300%]] )
529+ build .itemsTab :AddDisplayItem ()
530+ build .skillsTab :PasteSocketGroup (" Slot: Weapon 1\n Fireball 20/0 Default 1\n " )
531+ runCallback (" OnFrame" )
532+
533+ assert .are_not .equals (340 , build .calcsTab .mainEnv .modDB :Sum (" INC" , " FireDamage" ))
534+ assert .are_not .equals (340 , build .calcsTab .mainEnv .modDB :Sum (" INC" , " ColdDamage" ))
535+
536+ newBuild ()
537+
538+ build .configTab .input .customMods = [[
539+ Gain 25% increased Armour per 5 Power for 8 seconds when you Warcry, up to a maximum of 100%
540+ Warcries have infinite Power
541+ warcries grant arcane surge to you and allies, with 10% increased effect per 5 power, up to 100%
542+ ]]
543+ build .configTab :BuildModList ()
544+ build .itemsTab :CreateDisplayItemFromRaw ([[
545+ New Item
546+ Plate Vest
547+ Armour: 32
548+ ]] )
549+ build .itemsTab :AddDisplayItem ()
550+ build .skillsTab :PasteSocketGroup (" Arc 20/0 Default 1" )
551+
552+ assert .are_not .equals (40 , build .calcsTab .mainEnv .modDB :Sum (" INC" , { flags = ModFlag .Cast }, " Speed" ))
553+ assert .are_not .equals (64 , build .calcsTab .mainOutput .Armour )
554+ runCallback (" OnFrame" )
555+ end )
512556end )
0 commit comments