From 24abecd7eb4c0ba4b1bd9d7dc982d724c2efd0bd Mon Sep 17 00:00:00 2001 From: Caleb Johnson Date: Thu, 18 Aug 2022 16:04:34 -0500 Subject: [PATCH] Ensure boss rooms are added to regions for 1 major per dungeon --- Fill.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Fill.py b/Fill.py index 9af238e7d..1a3b46911 100644 --- a/Fill.py +++ b/Fill.py @@ -291,7 +291,15 @@ def fill_dungeon_unique_item(window, worlds, search, fill_locations, itempool): # iterate of all the dungeons in a random order, placing the item there for dungeon in dungeons: - dungeon_locations = [location for region in dungeon.regions for location in region.locations if location in fill_locations] + # Need to re-get dungeon regions to ensure boss rooms are considered + regions = [] + for region in dungeon.world.regions: + try: + if HintArea.at(region).dungeon_name == dungeon.name: + regions.append(region) + except: + pass + dungeon_locations = [location for region in regions for location in region.locations if location in fill_locations] # cache this list to flag afterwards all_dungeon_locations.extend(dungeon_locations)