Added random-number-based rarity control