Fix standard + partitioned door shuffle

Also includes a fix to the case where it would try to generate a
negative number of bomb doors or dash doors.
This commit is contained in:
Elia Robyn Lake
2022-12-16 02:33:11 -05:00
parent 1c91eef29a
commit 8d12f15d6f
2 changed files with 7 additions and 2 deletions

View File

@@ -2690,8 +2690,12 @@ def find_valid_bd_combination(builder, suggested, world, player):
test = random.choice([True, False]) test = random.choice([True, False])
if test: if test:
bomb_doors_needed -= 1 bomb_doors_needed -= 1
if bomb_doors_needed < 0:
bomb_doors_needed = 0
else: else:
dash_doors_needed -= 1 dash_doors_needed -= 1
if dash_doors_needed < 0:
dash_doors_needed = 0
bomb_proposal = random.sample(bd_door_pool, k=bomb_doors_needed) bomb_proposal = random.sample(bd_door_pool, k=bomb_doors_needed)
bomb_proposal.extend(custom_bomb_doors) bomb_proposal.extend(custom_bomb_doors)
dash_pool = [x for x in bd_door_pool if x not in bomb_proposal] dash_pool = [x for x in bd_door_pool if x not in bomb_proposal]

View File

@@ -1335,6 +1335,7 @@ def create_dungeon_builders(all_sectors, connections_tuple, world, player, dunge
sector = find_sector(r_name, all_sectors) sector = find_sector(r_name, all_sectors)
reverse_d_map[sector] = key reverse_d_map[sector] = key
if world.mode[player] == 'standard': if world.mode[player] == 'standard':
if 'Hyrule Castle' in dungeon_map:
current_dungeon = dungeon_map['Hyrule Castle'] current_dungeon = dungeon_map['Hyrule Castle']
standard_stair_check(dungeon_map, current_dungeon, candidate_sectors, global_pole) standard_stair_check(dungeon_map, current_dungeon, candidate_sectors, global_pole)