Potion Shop Changes

(reduced)
This commit is contained in:
pepperpow 2020-11-23 19:00:11 -06:00 committed by Edos512
parent d0a005d34d
commit bbd9c9a4f3
3 changed files with 13 additions and 5 deletions

View File

@ -368,11 +368,15 @@ def shuffle_shops(world, items, player: int):
shops = []
upgrade_shops = []
total_inventory = []
potion_option = world.potion_shop_shuffle[player]
for shop in world.shops:
if shop.region.player == player:
if shop.type == ShopType.UpgradeShop:
upgrade_shops.append(shop)
elif shop.type == ShopType.Shop and shop.region.name != 'Potion 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
else:
shops.append(shop)
total_inventory.extend(shop.inventory)

View File

@ -368,6 +368,10 @@ def roll_settings(weights):
if not ret.shop_shuffle:
ret.shop_shuffle = ''
ret.potion_shop_shuffle = get_choice('potion_shop_shuffle', weights, '')
if not ret.potion_shop_shuffle:
ret.potion_shop_shuffle = ''
ret.mode = get_choice('world_state', weights, None) # legacy support
if ret.mode == 'retro':
ret.mode = 'open'