From 3993c210c0c007793c6d605ce74fa86faa81428c Mon Sep 17 00:00:00 2001 From: codemann8 Date: Wed, 11 May 2022 14:37:37 -0500 Subject: [PATCH] Added Crossed OW to spoiler log when Grouped --- BaseClasses.py | 13 ++++++++++++- OverworldShuffle.py | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/BaseClasses.py b/BaseClasses.py index d8e34b6e..ad8675a3 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -3141,7 +3141,18 @@ class Spoiler(object): if self.world.players > 1: outfile.write(str('(Player ' + str(player) + ')\n')) # player name outfile.write(self.maps[('swaps', player)]['text'] + '\n\n') - + + # crossed groups + for player in range(1, self.world.players + 1): + if ('groups', player) in self.maps: + outfile.write('OW Crossed Groups:\n') + break + for player in range(1, self.world.players + 1): + if ('groups', player) in self.maps: + if self.world.players > 1: + outfile.write(str('(Player ' + str(player) + ')\n')) # player name + outfile.write(self.maps[('groups', player)]['text'] + '\n\n') + if self.overworlds: # overworld transitions outfile.write('\n'.join(['%s%s %s %s' % (f'{self.world.get_player_names(entry["player"])}: ' if self.world.players > 1 else '', self.world.fish.translate("meta","overworlds",entry['entrance']), '<=>' if entry['direction'] == 'both' else '<=' if entry['direction'] == 'exit' else '=>', self.world.fish.translate("meta","overworlds",entry['exit'])) for entry in self.overworlds.values()])) diff --git a/OverworldShuffle.py b/OverworldShuffle.py index 0ab55738..13599dd1 100644 --- a/OverworldShuffle.py +++ b/OverworldShuffle.py @@ -179,6 +179,24 @@ def link_overworld(world, player): if world.owCrossed[player] == 'grouped': ow_crossed_tiles = [[],[],[]] crossed_edges = shuffle_tiles(world, tile_groups, ow_crossed_tiles, player) + + # update spoiler + s = list(map(lambda x: 'O' if x not in ow_crossed_tiles[0] else 'X', [i for i in range(0x40, 0x82)])) + text_output = tile_swap_spoiler_table.replace('s', '%s') % ( s[0x02], s[0x07], + s[0x00], s[0x03], s[0x05], + s[0x00], s[0x02],s[0x03], s[0x05], s[0x07], s[0x0a], s[0x0f], + s[0x0a], s[0x0f], + s[0x10],s[0x11],s[0x12],s[0x13],s[0x14],s[0x15],s[0x16],s[0x17], s[0x10],s[0x11],s[0x12],s[0x13],s[0x14],s[0x15],s[0x16],s[0x17], + s[0x18], s[0x1a],s[0x1b], s[0x1d],s[0x1e], + s[0x22], s[0x25], s[0x1a], s[0x1d], + s[0x28],s[0x29],s[0x2a],s[0x2b],s[0x2c],s[0x2d],s[0x2e],s[0x2f], s[0x18], s[0x1b], s[0x1e], + s[0x30], s[0x32],s[0x33],s[0x34],s[0x35], s[0x37], s[0x22], s[0x25], + s[0x3a],s[0x3b],s[0x3c], s[0x3f], + s[0x28],s[0x29],s[0x2a],s[0x2b],s[0x2c],s[0x2d],s[0x2e],s[0x2f], + s[0x40], s[0x32],s[0x33],s[0x34], s[0x37], + s[0x30], s[0x35], + s[0x41], s[0x3a],s[0x3b],s[0x3c], s[0x3f]) + world.spoiler.set_map('groups', text_output, ow_crossed_tiles, player) elif world.owCrossed[player] in ['limited', 'chaos']: crossed_edges = list() crossed_candidates = list()