From 4e6f4255d96d51f4850f0a3bfc2b965710af2f26 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Sun, 20 Oct 2024 04:07:39 -0500 Subject: [PATCH] Fixed "this" dungeon items for glitched modes --- Rom.py | 6 ++---- source/dungeon/EnemyList.py | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Rom.py b/Rom.py index 6b3d0b3e..3af256a0 100644 --- a/Rom.py +++ b/Rom.py @@ -438,7 +438,7 @@ 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 standing_item_flag = 0x80 if location.item.player != player: standing_item_flag |= 0x40 @@ -453,7 +453,7 @@ def patch_rom(world, rom, player, team, is_mystery=False): continue elif location.type == LocationType.Bonk: address = snes_to_pc(location.address) - rom.write_byte(address, handle_native_dungeon(location, itemid)) + rom.write_byte(address, itemid) if location.item.player != player: rom.write_byte(address+1, location.item.player) else: @@ -463,8 +463,6 @@ def patch_rom(world, rom, player, team, is_mystery=False): continue 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 c6027ef0..331fd310 100644 --- a/source/dungeon/EnemyList.py +++ b/source/dungeon/EnemyList.py @@ -558,8 +558,6 @@ class Sprite(object): if self.location is not None: 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) data.append(item_id) data.append(0 if code == 0xF8 else self.location.item.player) data.append(code)