if (maxConsecutiveDuplicates > 0 && lastSpawned == profile && duplicateCounter >= maxConsecutiveDuplicates) continue;