Fix Tavern North spawn softlocks

This commit is contained in:
codemann8
2024-08-21 06:09:34 -05:00
parent a3be8d6d33
commit ae9f804bd1
2 changed files with 6 additions and 2 deletions

View File

@@ -178,7 +178,7 @@ def prefill_world(world, plando, text_patches):
world.fix_trock_exit = {1: trfstr.strip().lower() == 'true'}
elif line.startswith('!fix_gtower_exit'):
_, gtfstr = line.split(':', 1)
world.fix_gtower_exit = gtfstr.strip().lower() == 'true'
world.fix_gtower_exit = {1: gtfstr.strip().lower() == 'true'}
elif line.startswith('!fix_pod_exit'):
_, podestr = line.split(':', 1)
world.fix_palaceofdarkness_exit = {1: podestr.strip().lower() == 'true'}

6
Rom.py
View File

@@ -664,7 +664,7 @@ def patch_rom(world, rom, player, team, is_mystery=False):
write_int16(rom, 0x15DB5 + 2 * offset, 0x0640)
elif room_id == 0x00d6 and world.fix_trock_exit[player]:
write_int16(rom, 0x15DB5 + 2 * offset, 0x0134)
elif room_id == 0x000c and world.fix_gtower_exit: # fix ganons tower exit point
elif room_id == 0x000c and world.fix_gtower_exit[player]: # fix ganons tower exit point
write_int16(rom, 0x15DB5 + 2 * offset, 0x00A4)
else:
write_int16(rom, 0x15DB5 + 2 * offset, link_y)
@@ -2704,6 +2704,8 @@ def patch_shuffled_dark_sanc(world, rom, player):
dark_sanc = world.get_region('Dark Sanctuary Hint', player)
dark_sanc_entrance = str([i for i in dark_sanc.entrances if i.parent_region.name != 'Menu'][0].name)
room_id, ow_area, vram_loc, scroll_y, scroll_x, link_y, link_x, camera_y, camera_x, unknown_1, unknown_2, door_1, door_2 = door_addresses[dark_sanc_entrance][1]
if dark_sanc_entrance == 'Tavern North':
link_y -= 0x10 # rom code assumes south-facing doors and adds $10 to the y-coordinate
door_index = door_addresses[str(dark_sanc_entrance)][0]
rom.initial_sram.pre_set_overworld_flag(ow_area, door_addresses[dark_sanc_entrance][2])
@@ -2719,6 +2721,8 @@ def patch_shuffled_bomb_shop(world, rom, player):
bomb_shop = world.get_region('Big Bomb Shop', player)
bomb_shop_entrance = str([i for i in bomb_shop.entrances if i.parent_region.name != 'Menu'][0].name)
room_id, ow_area, vram_loc, scroll_y, scroll_x, link_y, link_x, camera_y, camera_x, unknown_1, unknown_2, door_1, door_2 = door_addresses[bomb_shop_entrance][1]
if bomb_shop_entrance == 'Tavern North':
link_y -= 0x10 # rom code assumes south-facing doors and adds $10 to the y-coordinate
door_index = door_addresses[str(bomb_shop_entrance)][0]
rom.initial_sram.pre_set_overworld_flag(ow_area, door_addresses[bomb_shop_entrance][2])