Only print lobbies if shuffling doors

Couple shopsanity bugs
This commit is contained in:
aerinon
2021-02-03 16:29:14 -07:00
parent 4e71b97403
commit 1faf8c168c
3 changed files with 8 additions and 7 deletions

View File

@@ -1927,7 +1927,7 @@ class Spoiler(object):
self.bosses = self.bosses["1"] self.bosses = self.bosses["1"]
for player in range(1, self.world.players + 1): for player in range(1, self.world.players + 1):
if self.world.intensity[player] >= 3: if self.world.intensity[player] >= 3 and self.world.doorShuffle[player] != 'vanilla':
for portal in self.world.dungeon_portals[player]: for portal in self.world.dungeon_portals[player]:
self.set_lobby(portal.name, portal.door.name, player) self.set_lobby(portal.name, portal.door.name, player)

View File

@@ -566,9 +566,10 @@ def balance_money_progression(world):
slot = shop_to_location_table[location.parent_region.name].index(location.name) slot = shop_to_location_table[location.parent_region.name].index(location.name)
shop = location.parent_region.shop shop = location.parent_region.shop
shop_item = shop.inventory[slot] shop_item = shop.inventory[slot]
sphere_costs[loc_player] += shop_item['price'] if interesting_item(location, location.item, world, location.item.player):
location_free = False sphere_costs[loc_player] += shop_item['price']
locked_by_money[loc_player].add(location) location_free = False
locked_by_money[loc_player].add(location)
elif location.name in pay_for_locations: elif location.name in pay_for_locations:
sphere_costs[loc_player] += pay_for_locations[location.name] sphere_costs[loc_player] += pay_for_locations[location.name]
location_free = False location_free = False

View File

@@ -504,7 +504,7 @@ def set_up_shops(world, player):
if not rss.locked: if not rss.locked:
rss.custom = True rss.custom = True
rss.add_inventory(2, 'Single Arrow', 80) rss.add_inventory(2, 'Single Arrow', 80)
for shop in random.sample([s for s in world.shops if not s.locked and s.region.player == player], 5): for shop in random.sample([s for s in world.shops[player] if not s.locked and s.region.player == player], 5):
shop.custom = True shop.custom = True
shop.locked = True shop.locked = True
shop.add_inventory(0, 'Single Arrow', 80) shop.add_inventory(0, 'Single Arrow', 80)
@@ -528,7 +528,7 @@ def customize_shops(world, player):
item = location.item item = location.item
max_repeat = 1 max_repeat = 1
if shop_name not in retro_shops: if shop_name not in retro_shops:
if item.name in repeatable_shop_items: if item.name in repeatable_shop_items and item.player == player:
max_repeat = 0 max_repeat = 0
if item.name in ['Bomb Upgrade (+5)', 'Arrow Upgrade (+5)'] and item.player == player: if item.name in ['Bomb Upgrade (+5)', 'Arrow Upgrade (+5)'] and item.player == player:
if item.name == 'Bomb Upgrade (+5)': if item.name == 'Bomb Upgrade (+5)':
@@ -544,7 +544,7 @@ def customize_shops(world, player):
price = 80 price = 80
# randomize price # randomize price
shop.add_inventory(idx, item.name, randomize_price(price), max_repeat, player=item.player) shop.add_inventory(idx, item.name, randomize_price(price), max_repeat, player=item.player)
if item.name in cap_replacements and shop_name not in retro_shops: if item.name in cap_replacements and shop_name not in retro_shops and item.player == player:
possible_replacements.append((shop, idx, location, item)) possible_replacements.append((shop, idx, location, item))
# randomize shopkeeper # randomize shopkeeper
if shop_name != 'Capacity Upgrade': if shop_name != 'Capacity Upgrade':