don't choose a frequency if rarity is supplied
This commit is contained in:
parent
b1aad7b0f4
commit
0874c50ea9
|
@ -455,6 +455,7 @@ class ItemGenerator:
|
||||||
If a rarity is supplied, ensure we return items of that rarity; in this
|
If a rarity is supplied, ensure we return items of that rarity; in this
|
||||||
case challenge_rating is ignored.
|
case challenge_rating is ignored.
|
||||||
"""
|
"""
|
||||||
|
if not rarity:
|
||||||
if challenge_rating in range(1, 5):
|
if challenge_rating in range(1, 5):
|
||||||
frequency = "1-4"
|
frequency = "1-4"
|
||||||
elif challenge_rating in range(5, 11):
|
elif challenge_rating in range(5, 11):
|
||||||
|
@ -466,7 +467,6 @@ class ItemGenerator:
|
||||||
else:
|
else:
|
||||||
frequency = "default"
|
frequency = "default"
|
||||||
self.rarity.set_frequency(frequency)
|
self.rarity.set_frequency(frequency)
|
||||||
|
|
||||||
items = []
|
items = []
|
||||||
for _ in range(count):
|
for _ in range(count):
|
||||||
items.append(self.item_class.from_dict(self.random_properties(rarity=rarity)))
|
items.append(self.item_class.from_dict(self.random_properties(rarity=rarity)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user