@@ -808,11 +808,16 @@ function calcs.initEnv(build, mode, override, specEnv)
808808
809809 -- Build and merge item modifiers, and create list of radius jewels
810810 if not accelerate .requirementsItems then
811+ -- save augment counts so we can track going over count limits
812+ local augmentCounts = {}
811813 for runeSlotName , slot in pairs (build .itemsTab .runeSlots ) do
812814 local rune = slot :GetSelValue ()
813815 if runeSlotName == override .repSlotName then
814816 rune = override .repItem
815817 end
818+ if rune .name then
819+ augmentCounts [rune .name ] = (augmentCounts [rune .name ] or 0 ) + 1
820+ end
816821 for _ , mod in ipairs (rune .mods ) do
817822 env .itemModDB :AddMod (mod )
818823 end
@@ -1101,6 +1106,7 @@ function calcs.initEnv(build, mode, override, specEnv)
11011106 for i = 1 , item .itemSocketCount do
11021107 if item .runes [i ] ~= " None" then
11031108 socketed = socketed + 1
1109+ augmentCounts [item .runes [i ]] = (augmentCounts [item .runes [i ]] or 0 ) + 1
11041110 end
11051111 end
11061112 env .itemModDB .multipliers [" RunesSocketedIn" .. slotName ] = socketed
@@ -1319,6 +1325,20 @@ function calcs.initEnv(build, mode, override, specEnv)
13191325 env .charms [override .toggleCharm ] = true
13201326 end
13211327 end
1328+
1329+ for augmentName , count in pairs (augmentCounts ) do
1330+ local dbAugment = data .itemMods .Runes [augmentName ]
1331+ local _ , dbMod = next (dbAugment )
1332+ if dbMod and dbMod .limit and count > dbMod .limit then
1333+ -- warn for going over augment limits
1334+ if env .build .calcsTab .mainEnv then
1335+ env .build .calcsTab .mainEnv .itemWarnings .augmentLimitWarning = env .build .calcsTab .mainEnv .itemWarnings .augmentLimitWarning or { }
1336+ t_insert (env .build .calcsTab .mainEnv .itemWarnings .augmentLimitWarning , augmentName )
1337+ end
1338+ end
1339+ end
1340+
1341+
13221342 end
13231343
13241344 -- Merge env.itemModDB with env.ModDB
0 commit comments