From 9fbfa337d7ec393d09306869de701baa3a787c82 Mon Sep 17 00:00:00 2001 From: Catobat <69204835+Catobat@users.noreply.github.com> Date: Sat, 29 May 2021 16:52:22 +0200 Subject: [PATCH 1/3] Fix missing "[player]"s --- PotShuffle.py | 2 +- Rom.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PotShuffle.py b/PotShuffle.py index 0f4ca4d8..e8e6d3ce 100644 --- a/PotShuffle.py +++ b/PotShuffle.py @@ -295,7 +295,7 @@ def shuffle_pots(world, player): elif old_pot.item == PotItem.Switch: available_pots = (pot for pot in new_pots if (pot.room == old_pot.room or pot.room in movable_switch_rooms[old_pot.room]) and not (pot.flags & PotFlags.NoSwitch)) elif old_pot.item == PotItem.Key: - if world.doorShuffle[player] == 'vanilla' and not world.retro[player] and not world.keydropshuffle[player] and world.logic != 'nologic': + if world.doorShuffle[player] == 'vanilla' and not world.retro[player] and not world.keydropshuffle[player] and world.logic[player] != 'nologic': available_pots = (pot for pot in new_pots if pot.room not in invalid_key_rooms) else: available_pots = new_pots diff --git a/Rom.py b/Rom.py index 3dab4c8e..9d18f5a4 100644 --- a/Rom.py +++ b/Rom.py @@ -970,7 +970,7 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): #Work around for json patch ordering issues - write bow limit separately so that it is replaced in the patch rom.write_bytes(0x180098, [difficulty.progressive_bow_limit, overflow_replacement]) - if difficulty.progressive_bow_limit < 2 and world.swords == 'swordless': + if difficulty.progressive_bow_limit < 2 and world.swords[player] == 'swordless': rom.write_bytes(0x180098, [2, overflow_replacement]) # set up game internal RNG seed From 4243494b66a4cf48cbdc84232fe48ee0bc9a96a2 Mon Sep 17 00:00:00 2001 From: Catobat <69204835+Catobat@users.noreply.github.com> Date: Sat, 29 May 2021 16:57:34 +0200 Subject: [PATCH 2/3] Write Pot Shuffle setting to spoiler --- BaseClasses.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BaseClasses.py b/BaseClasses.py index 411e9438..ba685ac2 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -2032,6 +2032,7 @@ class Spoiler(object): 'enemy_shuffle': self.world.enemy_shuffle, 'enemy_health': self.world.enemy_health, 'enemy_damage': self.world.enemy_damage, + 'potshuffle': self.world.potshuffle, 'players': self.world.players, 'teams': self.world.teams, 'experimental': self.world.experimental, @@ -2104,6 +2105,7 @@ class Spoiler(object): outfile.write('Enemy shuffle: %s\n' % self.metadata['enemy_shuffle'][player]) outfile.write('Enemy health: %s\n' % self.metadata['enemy_health'][player]) outfile.write('Enemy damage: %s\n' % self.metadata['enemy_damage'][player]) + outfile.write('Pot shuffle: %s\n' % ('Yes' if self.metadata['potshuffle'][player] else 'No')) outfile.write('Hints: %s\n' % ('Yes' if self.metadata['hints'][player] else 'No')) outfile.write('Experimental: %s\n' % ('Yes' if self.metadata['experimental'][player] else 'No')) outfile.write('Key Drops shuffled: %s\n' % ('Yes' if self.metadata['keydropshuffle'][player] else 'No')) From b071191e9bf2740905a011b29af924d5d8facd48 Mon Sep 17 00:00:00 2001 From: Catobat <69204835+Catobat@users.noreply.github.com> Date: Sat, 29 May 2021 17:02:29 +0200 Subject: [PATCH 3/3] Remove unreachable code --- Rom.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/Rom.py b/Rom.py index 9d18f5a4..128eeeac 100644 --- a/Rom.py +++ b/Rom.py @@ -1314,9 +1314,6 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): if item.name != 'Piece of Heart' or equip[0x36B] == 0: equip[0x36C] = min(equip[0x36C] + 0x08, 0xA0) equip[0x36D] = min(equip[0x36D] + 0x08, 0xA0) - elif item.name == 'Pegasus Boots': - rom.write_byte(0x183015, 0x01) - ability_flags |= 0b00000100 else: raise RuntimeError(f'Unsupported item in starting equipment: {item.name}')