Added OW Tile Swaps to spoiler log

This commit is contained in:
codemann8
2021-11-09 14:41:22 -06:00
parent 9714604da8
commit 3f59e93bfd
2 changed files with 46 additions and 1 deletions

View File

@@ -2918,8 +2918,33 @@ class Spoiler(object):
outfile.write(f'{fairy}: {bottle}\n') outfile.write(f'{fairy}: {bottle}\n')
if self.overworlds: if self.overworlds:
# overworlds: overworld transitions;
outfile.write('\n\nOverworld:\n\n') outfile.write('\n\nOverworld:\n\n')
# overworld tile swaps
swap_output = False
for player in range(1, self.world.players + 1):
if self.world.owMixed[player]:
from OverworldShuffle import tile_swap_spoiler_table
if not swap_output:
swap_output = True
outfile.write('OW Tile Swaps:\n')
outfile.write(('' if self.world.players == 1 else str('(Player ' + str(player) + ')')).ljust(11)) # player name
s = list(map(lambda x: ' ' if x not in self.world.owswaps[player][0] else 'S', [i for i in range(0x40)]))
outfile.write((tile_swap_spoiler_table + '\n\n') % ( 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[0x32],s[0x33],s[0x34], s[0x37], \
s[0x30], s[0x35],
s[0x3a],s[0x3b],s[0x3c], s[0x3f]))
# 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()])) 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()]))
if self.entrances: if self.entrances:

View File

@@ -1587,3 +1587,23 @@ flute_data = {
0x3c: (['South Pass Area', 'Dark South Pass Area'], 0x3c, 0x0584, 0x0ed0, 0x081e, 0x0f38, 0x0898, 0x0f45, 0x08a3, 0xfffe, 0x0002, 0x0f38, 0x0898), 0x3c: (['South Pass Area', 'Dark South Pass Area'], 0x3c, 0x0584, 0x0ed0, 0x081e, 0x0f38, 0x0898, 0x0f45, 0x08a3, 0xfffe, 0x0002, 0x0f38, 0x0898),
0x3f: (['Octoballoon Area', 'Bomber Corner Area'], 0x3f, 0x0810, 0x0f05, 0x0e75, 0x0f67, 0x0ef3, 0x0f72, 0x0efa, 0xfffb, 0x000b, 0x0f80, 0x0ef0) 0x3f: (['Octoballoon Area', 'Bomber Corner Area'], 0x3f, 0x0810, 0x0f05, 0x0e75, 0x0f67, 0x0ef3, 0x0f72, 0x0efa, 0xfffb, 0x000b, 0x0f80, 0x0ef0)
} }
tile_swap_spoiler_table = \
""" 0 1 2 3 4 5 6 7
+---+-+---+---+-+
01234567 A(00)| |%s| | |%s|
+--------+ | %s +-+ %s | %s +-+
A(00)|%s %s%s %s %s| B(08)| |%s| | |%s|
B(08)| %s %s| +-+-+-+-+-+-+-+-+
C(10)|%s%s%s%s%s%s%s%s| C(10)|%s|%s|%s|%s|%s|%s|%s|%s|
D(18)|%s %s%s %s%s | +-+-+-+-+-+-+-+-+
E(20)| %s %s | D(18)| |%s| |%s| |
F(28)|%s%s%s%s%s%s%s%s| | %s +-+ %s +-+ %s |
G(30)|%s %s%s%s%s %s| E(20)| |%s| |%s| |
H(38)| %s%s%s %s| +-+-+-+-+-+-+-+-+
+--------+ F(28)|%s|%s|%s|%s|%s|%s|%s|%s|
+-+-+-+-+-+-+-+-+
G(30)| |%s|%s|%s| |%s|
| %s +-+-+-+ %s +-+
H(38)| |%s|%s|%s| |%s|
+---+-+-+-+---+-+"""