make potion_shop_shuffle more consistent in type use

This commit is contained in:
Fabian Dill 2021-01-09 17:29:31 +01:00
parent e36c6e97c1
commit aed763c58f
3 changed files with 5 additions and 4 deletions

View File

@ -135,7 +135,7 @@ class World(object):
set_player_attr('triforce_pieces_required', 20)
set_player_attr('shop_shuffle', 'off')
set_player_attr('shop_shuffle_slots', 0)
set_player_attr('potion_shop_shuffle', 'none')
set_player_attr('potion_shop_shuffle', '')
set_player_attr('shuffle_prizes', "g")
set_player_attr('sprite_pool', [])
set_player_attr('dark_room_logic', "lamp")

View File

@ -337,7 +337,7 @@ def parse_arguments(argv, no_defaults=False):
help='''
Maximum amount of shop slots able to be filled by items from the item pool.
''')
parser.add_argument('--potion_shop_shuffle', default=defval('none'), choices=['none', 'a'], help='''\
parser.add_argument('--potion_shop_shuffle', default=defval(''), choices=['', 'a'], help='''\
Determine if potion shop shuffle items should be affected by the rules of shop shuffle.
Value `none` will only allow prices to be shuffled, `a` will allow any items to be shuffled.
''')

View File

@ -487,8 +487,9 @@ def shuffle_shops(world, items, player: int):
if shop.type == ShopType.UpgradeShop:
upgrade_shops.append(shop)
elif shop.type == ShopType.Shop:
if shop.region.name == 'Potion Shop' and potion_option in [None, '', 'none']:
upgrade_shops.append(shop) # just put it with the upgrade shops/caves so we don't shuffle the items, just prices
if shop.region.name == 'Potion Shop' and not potion_option:
upgrade_shops.append(
shop) # just put it with the upgrade shops/caves so we don't shuffle the items, just prices
else:
shops.append(shop)
total_inventory.extend(shop.inventory)