diff --git a/MiraAPI/Modifiers/ModifierManager.cs b/MiraAPI/Modifiers/ModifierManager.cs index f9065ea..18c6700 100644 --- a/MiraAPI/Modifiers/ModifierManager.cs +++ b/MiraAPI/Modifiers/ModifierManager.cs @@ -87,14 +87,14 @@ internal static void AssignModifiers(List plrs) foreach (var modifier in PrioritiesToIdsMap[priority]) { var mod = Activator.CreateInstance(IdToTypeModifierMap[modifier]) as GameModifier; + var maxCount = plrs.Count(x => IsGameModifierValid(x, mod!, modifier)); - if (!plrs.Exists(x => IsGameModifierValid(x, mod!, modifier))) + if (maxCount == 0) { Logger.Warning("No players are valid for modifier: " + mod!.ModifierName); continue; } - var maxCount = plrs.Count(x => IsGameModifierValid(x, mod!, modifier)); var num = Math.Clamp(mod!.GetAmountPerGame(), 0, maxCount); var chance = mod.GetAssignmentChance();