From 7312ffdf5f2dd5dad2bb2b6c7cfb5ade24edfc74 Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Thu, 5 Nov 2020 17:03:10 -0800 Subject: [PATCH] Recognize list as an unweighted list of choices. --- Mystery.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mystery.py b/Mystery.py index 2857521a..27a29759 100644 --- a/Mystery.py +++ b/Mystery.py @@ -238,6 +238,8 @@ def convert_to_on_off(value): def get_choice(option, root, value=None) -> typing.Any: if option not in root: return value + if type(root[option]) is list: + return interpret_on_off(random.choices(root[option])[0]) if type(root[option]) is not dict: return interpret_on_off(root[option]) if not root[option]: