public static Rarity CalculateRarity(bool guaranteedQuality) { var choose = new Randomizer(); var probabilities = RarityProbabilities; if (guaranteedQuality) { return((Rarity)choose.ChooseInt(probabilities, probabilities.Last(), true)); } return((Rarity)choose.ChooseInt(probabilities, probabilities.Last(), false)); }