From 79a8123696d0aa76b4e910711844ce66a7d3319d Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Mon, 20 Jan 2020 09:21:55 -0800 Subject: [PATCH] Starting item tweaks (#9) * Starting item tweaks * Add in capability to start with Progressive items higher than the first level. * Auto-start no-logic seeds with Pegasus Boots. ``` #example startinventory: Progressive Sword: 0: 81 1: 108 2: 54 3: 12 4: 1 ``` * Use .startwith() and support multiple ... ... items that can have multiples --- Mystery.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Mystery.py b/Mystery.py index b73c3706..a546233e 100644 --- a/Mystery.py +++ b/Mystery.py @@ -212,8 +212,14 @@ def roll_settings(weights): inventoryweights = weights.get('startinventory', {}) startitems = [] for item in inventoryweights.keys(): + itemvalue = get_choice(item, inventoryweights) + if item.startswith(('Progressive ', 'Small Key ', 'Rupee', 'Piece of Heart', 'Boss Heart Container', 'Sanctuary Heart Container', 'Arrow', 'Bombs ', 'Bomb ', 'Bottle')) and isinstance(itemvalue, int): + for i in range(int(get_choice(item, inventoryweights))): + startitems.append(item) if get_choice(item, inventoryweights): startitems.append(item) + if glitches_required in ['no_logic'] and 'Pegasus Boots' not in startitems: + startitems.append('Pegasus Boots') ret.startinventory = ','.join(startitems) if 'rom' in weights: