def pick_item_in_rarity(self, item_category, rarity):
in_rarity = []
for item in self.all_items:
if item.type.lower() == item_category:
if item.rarity == rarity:
in_rarity.append(item)
choice = secrets.choice(in_rarity)
return choice
评论列表
文章目录