From fd7728235d92f8f00a8805b86d0d2d70775dd834 Mon Sep 17 00:00:00 2001 From: "randall.rupper" Date: Tue, 9 Mar 2021 16:14:16 -0700 Subject: [PATCH] Fix for multiworld progression balancing with shopsanity off --- Fill.py | 13 +++++++++++++ Main.py | 5 ++++- RELEASENOTES.md | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Fill.py b/Fill.py index 1999fea8..3cdf8bf3 100644 --- a/Fill.py +++ b/Fill.py @@ -377,6 +377,19 @@ def flood_items(world): break +def lock_shop_locations(world, player): + for shop, loc_names in shop_to_location_table.items(): + for loc in loc_names: + world.get_location(loc, player).event = True + world.get_location(loc, player).locked = True + # I don't believe these locations exist in non-shopsanity + # if world.retro[player]: + # for shop, loc_names in retro_shops.items(): + # for loc in loc_names: + # world.get_location(loc, player).event = True + # world.get_location(loc, player).locked = True + + def sell_potions(world, player): loc_choices = [] for shop in world.shops[player]: diff --git a/Main.py b/Main.py index 6acdb437..0ed2b7eb 100644 --- a/Main.py +++ b/Main.py @@ -22,7 +22,7 @@ from RoomData import create_rooms from Rules import set_rules from Dungeons import create_dungeons, fill_dungeons, fill_dungeons_restrictive from Fill import distribute_items_cutoff, distribute_items_staleness, distribute_items_restrictive, flood_items -from Fill import sell_potions, sell_keys, balance_multiworld_progression, balance_money_progression +from Fill import sell_potions, sell_keys, balance_multiworld_progression, balance_money_progression, lock_shop_locations from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops from Utils import output_path, parse_player_names @@ -165,6 +165,9 @@ def main(args, seed=None, fish=None): sell_potions(world, player) if world.retro[player]: sell_keys(world, player) + else: + lock_shop_locations(world, player) + logger.info(world.fish.translate("cli","cli","placing.dungeon.prizes")) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index ba1fc9e5..377db0fe 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -131,6 +131,8 @@ New item counter modified to show total * 0.3.1.5-u * Ganon hints fixed for shops * Added support for a settings file so SahasrahBot and the main website can use it easier. (Thanks Synack) + * Fix for Skull Pinball during re-generation attempts (thank compiling) + * Fix for multiworld progression balancing and shopsanity * 0.3.1.4-u * Fix for Blind when shuffled to TT and another dungeon * Remove use of RaceRandom