support no options

This commit is contained in:
evilchili
2022-08-06 16:58:28 -07:00
parent 4b10f01036
commit f80d087ac4
2 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ class RollTable:
freqs = random.choices(options, weights=weights, k=self.die)
values = []
for option in freqs:
choice = random.choice(ds.data[option])
choice = random.choice(ds.data[option]) if ds.data[option] else ''
if hasattr(choice, 'keys'):
c = [option]
for (k, v) in choice.items():