Skip to content

Commit

Permalink
Ensure boss rooms are added to regions for 1 major per dungeon
Browse files Browse the repository at this point in the history
  • Loading branch information
cjohnson57 committed Aug 18, 2022
1 parent b7a55d7 commit 24abecd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 24abecd

Please sign in to comment.