From dd5f0618fd898c495c1ec0eca65593306e5801b8 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Fri, 18 Jul 2025 10:46:39 -0500 Subject: [PATCH] Fixed map key totals on map pickup in non-DR --- Rom.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Rom.py b/Rom.py index c1b4810e..7401ce94 100644 --- a/Rom.py +++ b/Rom.py @@ -794,6 +794,12 @@ def patch_rom(world, rom, player, team, is_mystery=False): for room in world.rooms: if room.player == player and room.palette is not None: rom.write_byte(0x13f200+room.index, room.palette) + else: + if world.keyshuffle[player] != 'universal': + for name, layout in world.key_layout[player].items(): + offset = compass_data[name][4]//2 + rom.write_byte(0x13f020+offset, layout.max_chests + layout.max_drops) # not currently used + rom.write_byte(0x187010+offset, layout.max_chests) if world.doorShuffle[player] == 'basic': rom.write_byte(0x138002, 1) for door in world.doors: @@ -1292,8 +1298,8 @@ def patch_rom(world, rom, player, team, is_mystery=False): | (0x04 if world.mapshuffle[player] != 'none' else 0x00) | (0x08 if world.bigkeyshuffle[player] != 'none' else 0x00))) # free roaming item text boxes rom.write_byte(0x18003B, 0x01 if world.mapshuffle[player] not in ['none', 'nearby'] else 0x00) # maps showing crystals on overworld - if (world.mapshuffle[player] not in ['none', 'nearby'] or world.doorShuffle[player] != 'vanilla' or world.dropshuffle[player] != 'none' - or world.pottery[player] not in ['none', 'cave']): + if world.keyshuffle[player] != 'universal' and (world.mapshuffle[player] not in ['none', 'nearby'] or world.doorShuffle[player] != 'vanilla' + or world.dropshuffle[player] != 'none' or world.pottery[player] not in ['none', 'cave']): rom.write_byte(0x18003A, 0x01) # show key counts on map pickup # compasses showing dungeon count