From 170d18191cafece8d849be055c61ceb5e0d1eff2 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Tue, 29 Jun 2021 03:06:51 -0500 Subject: [PATCH] Fixed Houlihan to exit out where Links House does --- EntranceShuffle.py | 11 ++++++----- Rom.py | 28 ---------------------------- 2 files changed, 6 insertions(+), 33 deletions(-) diff --git a/EntranceShuffle.py b/EntranceShuffle.py index f6e48131..8c77975b 100644 --- a/EntranceShuffle.py +++ b/EntranceShuffle.py @@ -6,11 +6,6 @@ from collections import defaultdict def link_entrances(world, player): invFlag = world.mode[player] == 'inverted' - - if not invFlag: - connect_exit(world, 'Chris Houlihan Room Exit', 'Links House', player) # should always match link's house, except for plandos - else: - connect_exit(world, 'Chris Houlihan Room Exit', 'Pyramid Entrance', player) Dungeon_Exits = Dungeon_Exits_Base.copy() if not invFlag else Inverted_Dungeon_Exits_Base.copy() Cave_Exits = Cave_Exits_Base.copy() @@ -192,6 +187,7 @@ def link_entrances(world, player): links_house_doors = [i for i in LW_Single_Cave_Doors if i not in Inverted_Dark_Sanctuary_Doors + Isolated_LH_Doors] links_house = random.choice(links_house_doors) connect_two_way(world, links_house, 'Links House Exit', player) + connect_exit(world, 'Chris Houlihan Room Exit', links_house, player) # should always match link's house, except for plandos if links_house in bomb_shop_doors: bomb_shop_doors.remove(links_house) if links_house in blacksmith_doors: @@ -302,6 +298,7 @@ def link_entrances(world, player): links_house_doors = [i for i in lw_entrances if i not in Inverted_Dark_Sanctuary_Doors + Isolated_LH_Doors] links_house = random.choice(links_house_doors) connect_two_way(world, links_house, 'Links House Exit', player) + connect_exit(world, 'Chris Houlihan Room Exit', links_house, player) # should always match link's house, except for plandos if links_house in lw_entrances: if not invFlag: lw_entrances.remove(links_house) @@ -526,6 +523,7 @@ def link_entrances(world, player): links_house_doors = [i for i in dw_entrances if i not in Inverted_Dark_Sanctuary_Doors + Isolated_LH_Doors] links_house = random.choice(links_house_doors) connect_two_way(world, links_house, 'Links House Exit', player) + connect_exit(world, 'Chris Houlihan Room Exit', links_house, player) # should always match link's house, except for plandos if not invFlag: if links_house in lw_entrances: lw_entrances.remove(links_house) @@ -716,6 +714,7 @@ def link_entrances(world, player): links_house_doors = [i for i in links_house_doors if i not in exclusions] links_house = random.choice(list(links_house_doors)) connect_two_way(world, links_house, 'Links House Exit', player) + connect_exit(world, 'Chris Houlihan Room Exit', links_house, player) # should always match link's house, except for plandos if links_house in entrances: entrances.remove(links_house) elif links_house in must_exits: @@ -1226,6 +1225,7 @@ def link_entrances(world, player): links_house_doors = [i for i in links_house_doors if i not in exclusions] links_house = random.choice(links_house_doors) connect_two_way(world, links_house, 'Links House Exit', player) + connect_exit(world, 'Chris Houlihan Room Exit', links_house, player) # should always match link's house, except for plandos exit_pool.remove(links_house) doors.remove(links_house) @@ -1415,6 +1415,7 @@ def link_entrances(world, player): links_house_doors = [i for i in doors if i not in Inverted_Dark_Sanctuary_Doors + Isolated_LH_Doors] links_house = random.choice(links_house_doors) connect_two_way(world, links_house, 'Links House Exit', player) + connect_exit(world, 'Chris Houlihan Room Exit', links_house, player) # should always match link's house, except for plandos doors.remove(links_house) exit_pool.remove(links_house) diff --git a/Rom.py b/Rom.py index a2682399..24e9a822 100644 --- a/Rom.py +++ b/Rom.py @@ -2318,7 +2318,6 @@ def set_inverted_mode(world, player, rom): write_int16(rom, 0x15AEE + 2*0x25, 0x000C) if (world.mode[player] == 'inverted') != (0x03 in world.owswaps[player][0] and world.owSwap[player] == 'mixed'): - #write_int16(rom, snes_to_pc(0x02E849), 0x0043) #flute spot if world.shuffle[player] in ['vanilla', 'dungeonsfull', 'dungeonssimple']: rom.write_bytes(snes_to_pc(0x308350), [0x00, 0x00, 0x01]) # mountain cave starts on OW @@ -2385,12 +2384,6 @@ def set_inverted_mode(world, player, rom): write_int16(rom, 0x15AEE + 2*0x18, 0x00E6) # DMD west UW to bumper cave top entrance if (world.mode[player] == 'inverted') != (0x10 in world.owswaps[player][0] and world.owSwap[player] == 'mixed'): rom.write_bytes(snes_to_pc(0x1BC67A), [0x2E, 0x0B, 0x82]) # add warp under rock - #if (world.mode[player] == 'inverted') != (0x16 in world.owswaps[player][0] and world.owSwap[player] == 'mixed'): - #write_int16(rom, snes_to_pc(0x02E84B), 0x0056) #flute spot - #if (world.mode[player] == 'inverted') != (0x18 in world.owswaps[player][0] and world.owSwap[player] == 'mixed'): - #write_int16(rom, snes_to_pc(0x02E84D), 0x0058) #flute spot - #write_int16(rom, snes_to_pc(0x02E8D5), 0x07C8) #flute spot - #write_int16(rom, snes_to_pc(0x02E8F7), 0x01F8) #flute spot if (world.mode[player] == 'inverted') != (0x1B in world.owswaps[player][0] and world.owSwap[player] == 'mixed'): write_int16(rom, 0x15AEE + 2 * 0x06, 0x0020) # post aga hyrule castle spawn rom.write_byte(0x15B8C + 0x06, 0x1B) @@ -2499,41 +2492,20 @@ def set_inverted_mode(world, player, rom): if (world.mode[player] == 'inverted') != (0x29 in world.owswaps[player][0] and world.owSwap[player] == 'mixed'): rom.write_bytes(snes_to_pc(0x06B2AB), [0xF0, 0xE1, 0x05]) #frog pickup on contact if (world.mode[player] == 'inverted') != (0x2C in world.owswaps[player][0] and world.owSwap[player] == 'mixed'): - #write_int16(rom, snes_to_pc(0x02E84F), 0x006C) #flute spot if world.shuffle[player] in ['vanilla', 'dungeonssimple', 'dungeonsfull']: rom.write_byte(0x15B8C, 0x6C) #exit links at bomb shop area rom.write_byte(0xDBB73 + 0x00, 0x53) # switch bomb shop and links house rom.write_byte(0xDBB73 + 0x52, 0x01) if (world.mode[player] == 'inverted') != (0x2F in world.owswaps[player][0] and world.owSwap[player] == 'mixed'): - #write_int16(rom, snes_to_pc(0x02E851), 0x006F) #flute spot rom.write_bytes(snes_to_pc(0x1BC80D), [0xB2, 0x0B, 0x82]) # add warp under rock if (world.mode[player] == 'inverted') != (0x30 in world.owswaps[player][0] and world.owSwap[player] == 'mixed'): - #write_int16(rom, snes_to_pc(0x02E853), 0x0070) #flute spot rom.write_bytes(snes_to_pc(0x1BC81E), [0x94, 0x1D, 0x82]) # add warp under rock if (world.mode[player] == 'inverted') != (0x33 in world.owswaps[player][0] and world.owSwap[player] == 'mixed'): rom.write_bytes(snes_to_pc(0x1BC3DF), [0xD8, 0xD1]) # add warp under rock rom.write_bytes(snes_to_pc(0x1BD1D8), [0xA8, 0x02, 0x82, 0xFF, 0xFF]) # add warp under rock if (world.mode[player] == 'inverted') != (0x35 in world.owswaps[player][0] and world.owSwap[player] == 'mixed'): rom.write_bytes(snes_to_pc(0x1BC85A), [0x50, 0x0F, 0x82]) # add warp under rock - #if (world.mode[player] == 'inverted') != (0x3B in world.owswaps[player][0] and world.owSwap[player] == 'mixed'): - #write_int16(rom, snes_to_pc(0x02E855), 0x007B) #flute spot - #if (world.mode[player] == 'inverted') != (0x3F in world.owswaps[player][0] and world.owSwap[player] == 'mixed'): - #write_int16(rom, snes_to_pc(0x02E857), 0x007F) #flute spot - if world.mode[player] == 'inverted': - rom.write_byte(0x15B8C + 0x3D, rom.buffer[0x15B8C]) # houlihan exit - write_int16(rom, 0x15BDB + 2 * 0x3D, rom.buffer[0x15BDB] + (rom.buffer[0x15BDC] << 8)) - write_int16(rom, 0x15C79 + 2 * 0x3D, rom.buffer[0x15C79] + (rom.buffer[0x15C7A] << 8)) - write_int16(rom, 0x15D17 + 2 * 0x3D, rom.buffer[0x15D17] + (rom.buffer[0x15D18] << 8)) - write_int16(rom, 0x15DB5 + 2 * 0x3D, rom.buffer[0x15DB5] + (rom.buffer[0x15DB6] << 8)) - write_int16(rom, 0x15E53 + 2 * 0x3D, rom.buffer[0x15E53] + (rom.buffer[0x15E54] << 8)) - write_int16(rom, 0x15EF1 + 2 * 0x3D, rom.buffer[0x15EF1] + (rom.buffer[0x15EF2] << 8)) - write_int16(rom, 0x15F8F + 2 * 0x3D, rom.buffer[0x15F8F] + (rom.buffer[0x15F90] << 8)) - rom.write_byte(0x1602D + 0x3D, rom.buffer[0x1602D]) - rom.write_byte(0x1607C + 0x3D, rom.buffer[0x1607C]) - write_int16(rom, 0x160CB + 2 * 0x3D, rom.buffer[0x160CB] + (rom.buffer[0x160CC] << 8)) - write_int16(rom, 0x16169 + 2 * 0x3D, rom.buffer[0x16169] + (rom.buffer[0x1616A] << 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)