@@ -807,11 +807,16 @@ function calcs.initEnv(build, mode, override, specEnv)
807807
808808 -- Build and merge item modifiers, and create list of radius jewels
809809 if not accelerate .requirementsItems then
810+ -- save augment counts so we can track going over count limits
811+ local augmentCounts = {}
810812 for runeSlotName , slot in pairs (build .itemsTab .runeSlots ) do
811813 local rune = slot :GetSelValue ()
812814 if runeSlotName == override .repSlotName then
813815 rune = override .repItem
814816 end
817+ if rune .name then
818+ augmentCounts [rune .name ] = (augmentCounts [rune .name ] or 0 ) + 1
819+ end
815820 for _ , mod in ipairs (rune .mods ) do
816821 env .itemModDB :AddMod (mod )
817822 end
@@ -1099,6 +1104,7 @@ function calcs.initEnv(build, mode, override, specEnv)
10991104 for i = 1 , item .itemSocketCount do
11001105 if item .runes [i ] ~= " None" then
11011106 socketed = socketed + 1
1107+ augmentCounts [item .runes [i ]] = (augmentCounts [item .runes [i ]] or 0 ) + 1
11021108 end
11031109 end
11041110 env .itemModDB .multipliers [" RunesSocketedIn" .. slotName ] = socketed
@@ -1317,6 +1323,20 @@ function calcs.initEnv(build, mode, override, specEnv)
13171323 env .charms [override .toggleCharm ] = true
13181324 end
13191325 end
1326+
1327+ for augmentName , count in pairs (augmentCounts ) do
1328+ local dbAugment = data .itemMods .Runes [augmentName ]
1329+ local _ , dbMod = next (dbAugment )
1330+ if dbMod and dbMod .limit and count > dbMod .limit then
1331+ -- warn for going over augment limits
1332+ if env .build .calcsTab .mainEnv then
1333+ env .build .calcsTab .mainEnv .itemWarnings .augmentLimitWarning = env .build .calcsTab .mainEnv .itemWarnings .augmentLimitWarning or { }
1334+ t_insert (env .build .calcsTab .mainEnv .itemWarnings .augmentLimitWarning , augmentName )
1335+ end
1336+ end
1337+ end
1338+
1339+
13201340 end
13211341
13221342 -- Merge env.itemModDB with env.ModDB
0 commit comments