Some fixes sent by Catobat

This commit is contained in:
aerinon
2022-08-11 16:37:15 -06:00
parent 07b03f78d6
commit c3dcd56992
2 changed files with 3 additions and 3 deletions

View File

@@ -1730,7 +1730,7 @@ class DoorTypePool:
def chaos_shuffle(self, counts): def chaos_shuffle(self, counts):
weights = [1, 2, 4, 3, 2, 1] weights = [1, 2, 4, 3, 2, 1]
return [random.choices(self.get_choices(counts[i]), weights=weights) for i, c in enumerate(counts)] return [random.choices(self.get_choices(counts[i]), weights=weights)[0] for i, c in enumerate(counts)]
@staticmethod @staticmethod
def get_choices(number): def get_choices(number):
@@ -2316,7 +2316,7 @@ def find_big_key_candidates(builder, start_regions, used, world, player):
else: else:
r_set = builder.master_sector.region_set() r_set = builder.master_sector.region_set()
for r in r_set: for r in r_set:
for ext in r.exits: for ext in world.get_region(r, player).exits:
if ext.door: if ext.door:
d = ext.door d = ext.door
if d.bigKey and d.type in [DoorType.Normal, DoorType.Interior]: if d.bigKey and d.type in [DoorType.Normal, DoorType.Interior]:

2
Rom.py
View File

@@ -753,7 +753,7 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
dr_flags |= DROptions.DarkWorld_Spawns dr_flags |= DROptions.DarkWorld_Spawns
if world.logic[player] != 'nologic': if world.logic[player] != 'nologic':
dr_flags |= DROptions.Fix_EG dr_flags |= DROptions.Fix_EG
if world.door_type_mode in ['big', 'chaos']: if world.door_type_mode[player] in ['big', 'all', 'chaos']:
dr_flags |= DROptions.BigKeyDoor_Shuffle dr_flags |= DROptions.BigKeyDoor_Shuffle
my_locations = world.get_filled_locations(player) my_locations = world.get_filled_locations(player)