Fixed issue with customized OW tile flips

This commit is contained in:
codemann8
2024-01-07 08:34:09 -06:00
parent 20d1398e4d
commit 38a2c693e6

View File

@@ -1044,10 +1044,10 @@ def shuffle_tiles(world, groups, result_list, do_grouped, forced_flips, player):
raise GenerationException('Could not find valid tile flips') raise GenerationException('Could not find valid tile flips')
# tile shuffle happens here # tile shuffle happens here
removed = copy.deepcopy(nonflipped_groups) removed = []
if 0 < undefined_chance < 100: if 0 < undefined_chance < 100:
for group in [g for g in groups if g not in nonflipped_groups]: for group in groups:
if group not in flipped_groups and random.randint(1, 100) > undefined_chance: if group[0] in nonflipped_groups or (group[0] not in flipped_groups and random.randint(1, 100) > undefined_chance):
removed.append(group) removed.append(group)
# save shuffled tiles to list # save shuffled tiles to list