@@ -801,11 +801,16 @@ function calcs.initEnv(build, mode, override, specEnv)
801801
802802 -- Build and merge item modifiers, and create list of radius jewels
803803 if not accelerate .requirementsItems then
804+ -- save augment counts so we can track going over count limits
805+ local augmentCounts = {}
804806 for runeSlotName , slot in pairs (build .itemsTab .runeSlots ) do
805807 local rune = slot :GetSelValue ()
806808 if runeSlotName == override .repSlotName then
807809 rune = override .repItem
808810 end
811+ if rune .name then
812+ augmentCounts [rune .name ] = (augmentCounts [rune .name ] or 0 ) + 1
813+ end
809814 for _ , mod in ipairs (rune .mods ) do
810815 env .itemModDB :AddMod (mod )
811816 end
@@ -1093,6 +1098,7 @@ function calcs.initEnv(build, mode, override, specEnv)
10931098 for i = 1 , item .itemSocketCount do
10941099 if item .runes [i ] ~= " None" then
10951100 socketed = socketed + 1
1101+ augmentCounts [item .runes [i ]] = (augmentCounts [item .runes [i ]] or 0 ) + 1
10961102 end
10971103 end
10981104 env .itemModDB .multipliers [" RunesSocketedIn" .. slotName ] = socketed
@@ -1311,6 +1317,20 @@ function calcs.initEnv(build, mode, override, specEnv)
13111317 env .charms [override .toggleCharm ] = true
13121318 end
13131319 end
1320+
1321+ for augmentName , count in pairs (augmentCounts ) do
1322+ local dbAugment = data .itemMods .Runes [augmentName ]
1323+ local _ , dbMod = next (dbAugment )
1324+ if dbMod and dbMod .limit and count > dbMod .limit then
1325+ -- warn for going over augment limits
1326+ if env .build .calcsTab .mainEnv then
1327+ env .build .calcsTab .mainEnv .itemWarnings .augmentLimitWarning = env .build .calcsTab .mainEnv .itemWarnings .augmentLimitWarning or { }
1328+ t_insert (env .build .calcsTab .mainEnv .itemWarnings .augmentLimitWarning , augmentName )
1329+ end
1330+ end
1331+ end
1332+
1333+
13141334 end
13151335
13161336 -- Merge env.itemModDB with env.ModDB
0 commit comments