diff --git a/Rom.py b/Rom.py index 2d666de2..4fd43122 100644 --- a/Rom.py +++ b/Rom.py @@ -434,7 +434,9 @@ def patch_rom(world, rom, player, team, is_mystery=False): if location.item.name in valid_pot_items and location.item.player == player: location.pot.item = valid_pot_items[location.item.name] else: - code = handle_native_dungeon(location, itemid) + code = itemid + if world.pottery[player] == 'none' or location.locked: + code = handle_native_dungeon(location, itemid) standing_item_flag = 0x80 if location.item.player != player: standing_item_flag |= 0x40 @@ -452,8 +454,6 @@ def patch_rom(world, rom, player, team, is_mystery=False): if not location.crystal: if location.item is not None: - # Keys in their native dungeon should use the original item code for keys - itemid = handle_native_dungeon(location, itemid) if world.remote_items[player]: itemid = list(location_table.keys()).index(location.name) + 1 assert itemid < 0x100 diff --git a/source/dungeon/EnemyList.py b/source/dungeon/EnemyList.py index 8f168a8d..a23bf525 100644 --- a/source/dungeon/EnemyList.py +++ b/source/dungeon/EnemyList.py @@ -557,7 +557,9 @@ class Sprite(object): item_id = self.location.item.code if self.location.item is not None else 0x5A code = 0xF9 if self.location.item.player != self.location.player else 0xF8 if code == 0xF8: - item_id = handle_native_dungeon(self.location, item_id) + world = self.location.parent_region.world + if world.dropshuffle[self.location.player] == 'none' or self.location.locked: + item_id = handle_native_dungeon(self.location, item_id) data.append(item_id) data.append(0 if code == 0xF8 else self.location.item.player) data.append(code)