From 6e5e4fa96ee6b3b791dfedb84fcc4e1fb742726b Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sat, 13 Mar 2021 05:19:53 +0100 Subject: [PATCH] allow 'random' shop_shuffle_slots --- Mystery.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Mystery.py b/Mystery.py index 97d0a57c..c980d5c0 100644 --- a/Mystery.py +++ b/Mystery.py @@ -547,8 +547,11 @@ def roll_settings(weights: dict, plando_options: typing.Set[str] = frozenset(("b # change minimum to required pieces to avoid problems ret.triforce_pieces_available = min(max(ret.triforce_pieces_required, int(ret.triforce_pieces_available)), 90) - - ret.shop_shuffle_slots = int(get_choice('shop_shuffle_slots', weights, '0')) + shuffle_slots = get_choice('shop_shuffle_slots', weights, '0') + if shuffle_slots.lower() == "random": + ret.shop_shuffle_slots = random.randint(0, 30) + else: + ret.shop_shuffle_slots = int(shuffle_slots) ret.shop_shuffle = get_choice('shop_shuffle', weights, '') if not ret.shop_shuffle: