Allowed Mountain Entry and West DM to be shuffled independenty in OW Tile Swap
This commit is contained in:
@@ -48,6 +48,23 @@ def link_entrances(world, player):
|
|||||||
for exitname, regionname in inverted_default_dungeon_connections:
|
for exitname, regionname in inverted_default_dungeon_connections:
|
||||||
connect_simple(world, exitname, regionname, player)
|
connect_simple(world, exitname, regionname, player)
|
||||||
|
|
||||||
|
# inverted entrance mods
|
||||||
|
for owid in swapped_connections.keys():
|
||||||
|
if (world.mode[player] == 'inverted') != (owid in world.owswaps[player][0] and world.owSwap[player] == 'mixed'):
|
||||||
|
for (entrancename, exitname) in swapped_connections[owid]:
|
||||||
|
try:
|
||||||
|
connect_two_way(world, entrancename, exitname, player)
|
||||||
|
except RuntimeError:
|
||||||
|
connect_entrance(world, entrancename, exitname, player)
|
||||||
|
|
||||||
|
if (world.mode[player] == 'inverted') != (0x03 in world.owswaps[player][0] and world.owSwap[player] == 'mixed') and \
|
||||||
|
(world.mode[player] == 'inverted') == (0x0a in world.owswaps[player][0] and world.owSwap[player] == 'mixed'):
|
||||||
|
connect_entrance(world, 'Death Mountain Return Cave (West)', 'Dark Death Mountain Healer Fairy', player)
|
||||||
|
elif (world.mode[player] == 'inverted') != (0x0a in world.owswaps[player][0] and world.owSwap[player] == 'mixed') and \
|
||||||
|
(world.mode[player] == 'inverted') == (0x03 in world.owswaps[player][0] and world.owSwap[player] == 'mixed'):
|
||||||
|
connect_two_way(world, 'Bumper Cave (Top)', 'Death Mountain Return Cave Exit (West)', player)
|
||||||
|
|
||||||
|
# dungeon entrance shuffle
|
||||||
if world.shuffle[player] == 'dungeonssimple':
|
if world.shuffle[player] == 'dungeonssimple':
|
||||||
simple_shuffle_dungeons(world, player)
|
simple_shuffle_dungeons(world, player)
|
||||||
elif world.shuffle[player] == 'dungeonsfull':
|
elif world.shuffle[player] == 'dungeonsfull':
|
||||||
@@ -1533,7 +1550,9 @@ def connect_entrance(world, entrancename, exitname, player):
|
|||||||
addresses = door_addresses[entrance.name][0]
|
addresses = door_addresses[entrance.name][0]
|
||||||
|
|
||||||
entrance.connect(region, addresses, target)
|
entrance.connect(region, addresses, target)
|
||||||
world.spoiler.set_entrance(entrance.name, exit.name if exit is not None else region.name, 'entrance', player)
|
|
||||||
|
if world.shuffle[player] not in ['vanilla', 'dungeonssimple', 'dungeonsfull']:
|
||||||
|
world.spoiler.set_entrance(entrance.name, exit.name if exit is not None else region.name, 'entrance', player)
|
||||||
|
|
||||||
def connect_exit(world, exitname, entrancename, player):
|
def connect_exit(world, exitname, entrancename, player):
|
||||||
entrance = world.get_entrance(entrancename, player)
|
entrance = world.get_entrance(entrancename, player)
|
||||||
@@ -1544,7 +1563,9 @@ def connect_exit(world, exitname, entrancename, player):
|
|||||||
exit.connected_region.entrances.remove(exit)
|
exit.connected_region.entrances.remove(exit)
|
||||||
|
|
||||||
exit.connect(entrance.parent_region, door_addresses[entrance.name][1], exit_ids[exit.name][1])
|
exit.connect(entrance.parent_region, door_addresses[entrance.name][1], exit_ids[exit.name][1])
|
||||||
world.spoiler.set_entrance(entrance.name, exit.name, 'exit', player)
|
|
||||||
|
if world.shuffle[player] not in ['vanilla', 'dungeonssimple', 'dungeonsfull']:
|
||||||
|
world.spoiler.set_entrance(entrance.name, exit.name, 'exit', player)
|
||||||
|
|
||||||
|
|
||||||
def connect_two_way(world, entrancename, exitname, player):
|
def connect_two_way(world, entrancename, exitname, player):
|
||||||
@@ -1559,7 +1580,9 @@ def connect_two_way(world, entrancename, exitname, player):
|
|||||||
|
|
||||||
entrance.connect(exit.parent_region, door_addresses[entrance.name][0], exit_ids[exit.name][0])
|
entrance.connect(exit.parent_region, door_addresses[entrance.name][0], exit_ids[exit.name][0])
|
||||||
exit.connect(entrance.parent_region, door_addresses[entrance.name][1], exit_ids[exit.name][1])
|
exit.connect(entrance.parent_region, door_addresses[entrance.name][1], exit_ids[exit.name][1])
|
||||||
world.spoiler.set_entrance(entrance.name, exit.name, 'both', player)
|
|
||||||
|
if world.shuffle[player] not in ['vanilla', 'dungeonssimple', 'dungeonsfull']:
|
||||||
|
world.spoiler.set_entrance(entrance.name, exit.name, 'both', player)
|
||||||
|
|
||||||
|
|
||||||
def scramble_holes(world, player):
|
def scramble_holes(world, player):
|
||||||
@@ -2853,46 +2876,34 @@ default_connections = [('Waterfall of Wishing', 'Waterfall of Wishing'),
|
|||||||
('Pyramid Hole', 'Pyramid'),
|
('Pyramid Hole', 'Pyramid'),
|
||||||
('Pyramid Entrance', 'Bottom of Pyramid'),
|
('Pyramid Entrance', 'Bottom of Pyramid'),
|
||||||
('Inverted Pyramid Hole', 'Pyramid'),
|
('Inverted Pyramid Hole', 'Pyramid'),
|
||||||
('Inverted Pyramid Entrance', 'Bottom of Pyramid')
|
('Inverted Pyramid Entrance', 'Bottom of Pyramid'),
|
||||||
|
('Pyramid Exit', 'Pyramid Exit Ledge')
|
||||||
]
|
]
|
||||||
|
|
||||||
open_default_connections = [('Old Man Cave (West)', 'Old Man Cave Ledge'),
|
swapped_connections = {
|
||||||
('Old Man Cave (East)', 'Old Man Cave'),
|
0x03: [
|
||||||
('Old Man Cave Exit (West)', 'Mountain Entry Entrance'),
|
('Old Man Cave (East)', 'Death Mountain Return Cave Exit (West)'),
|
||||||
('Old Man Cave Exit (East)', 'West Death Mountain (Bottom)'),
|
#('Death Mountain Return Cave (East)', 'Death Mountain Return Cave Exit (East)'),
|
||||||
('Death Mountain Return Cave (East)', 'Death Mountain Return Cave'),
|
('Dark Death Mountain Fairy', 'Old Man Cave Exit (East)')
|
||||||
('Death Mountain Return Cave (West)', 'Death Mountain Return Cave'),
|
],
|
||||||
('Death Mountain Return Cave Exit (West)', 'Mountain Entry Ledge'),
|
0x0a: [
|
||||||
('Death Mountain Return Cave Exit (East)', 'West Death Mountain (Bottom)'),
|
('Old Man Cave (West)', 'Bumper Cave Exit (Bottom)'),
|
||||||
('Bumper Cave (Bottom)', 'Bumper Cave'),
|
('Death Mountain Return Cave (West)', 'Bumper Cave Exit (Top)'),
|
||||||
('Bumper Cave (Top)', 'Bumper Cave'),
|
('Bumper Cave (Bottom)', 'Old Man Cave Exit (West)'),
|
||||||
('Bumper Cave Exit (Top)', 'Bumper Cave Ledge'),
|
('Bumper Cave (Top)', 'Dark Death Mountain Healer Fairy')
|
||||||
('Bumper Cave Exit (Bottom)', 'Bumper Cave Entrance'),
|
],
|
||||||
('Dark Death Mountain Fairy', 'Dark Death Mountain Healer Fairy'),
|
0x1b: [
|
||||||
|
('Inverted Pyramid Entrance', 'Pyramid Exit')
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
('Links House', 'Links House'),
|
open_default_connections = [('Links House', 'Links House'),
|
||||||
('Links House Exit', 'Links House Area'),
|
('Links House Exit', 'Links House Area'),
|
||||||
('Big Bomb Shop', 'Big Bomb Shop'),
|
('Big Bomb Shop', 'Big Bomb Shop')]
|
||||||
('Pyramid Exit', 'Pyramid Exit Ledge')]
|
|
||||||
|
|
||||||
inverted_default_connections = [('Old Man Cave (West)', 'Bumper Cave'),
|
inverted_default_connections = [('Links House', 'Big Bomb Shop'),
|
||||||
('Old Man Cave (East)', 'Death Mountain Return Cave'),
|
|
||||||
('Old Man Cave Exit (West)', 'Bumper Cave Entrance'),
|
|
||||||
('Old Man Cave Exit (East)', 'West Dark Death Mountain (Bottom)'),
|
|
||||||
('Death Mountain Return Cave (West)', 'Bumper Cave'),
|
|
||||||
('Death Mountain Return Cave (East)', 'Death Mountain Return Cave'),
|
|
||||||
('Death Mountain Return Cave Exit (West)', 'West Death Mountain (Bottom)'),
|
|
||||||
('Death Mountain Return Cave Exit (East)', 'West Death Mountain (Bottom)'),
|
|
||||||
('Bumper Cave (Bottom)', 'Old Man Cave Ledge'),
|
|
||||||
('Bumper Cave (Top)', 'Dark Death Mountain Healer Fairy'),
|
|
||||||
('Bumper Cave Exit (Top)', 'Mountain Entry Ledge'),
|
|
||||||
('Bumper Cave Exit (Bottom)', 'Mountain Entry Entrance'),
|
|
||||||
('Dark Death Mountain Fairy', 'Old Man Cave'),
|
|
||||||
|
|
||||||
('Links House', 'Big Bomb Shop'),
|
|
||||||
('Links House Exit', 'Big Bomb Shop Area'),
|
('Links House Exit', 'Big Bomb Shop Area'),
|
||||||
('Big Bomb Shop', 'Links House'),
|
('Big Bomb Shop', 'Links House')]
|
||||||
('Pyramid Exit', 'Hyrule Castle Ledge')]
|
|
||||||
|
|
||||||
# non shuffled dungeons
|
# non shuffled dungeons
|
||||||
default_dungeon_connections = [('Desert Palace Entrance (South)', 'Desert South Portal'),
|
default_dungeon_connections = [('Desert Palace Entrance (South)', 'Desert South Portal'),
|
||||||
|
|||||||
@@ -780,7 +780,7 @@ OWTileGroups = {
|
|||||||
'Ice Palace Area'
|
'Ice Palace Area'
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
("West Mountain", "Entrance"): (
|
("Mountain Entry", "Regular"): (
|
||||||
[
|
[
|
||||||
0x0a, 0x4a
|
0x0a, 0x4a
|
||||||
],
|
],
|
||||||
|
|||||||
48
Rom.py
48
Rom.py
@@ -2471,28 +2471,6 @@ def set_inverted_mode(world, player, rom, inverted_buffer):
|
|||||||
rom.write_byte(snes_to_pc(0x02D9B8), 0x12)
|
rom.write_byte(snes_to_pc(0x02D9B8), 0x12)
|
||||||
|
|
||||||
rom.write_bytes(0x180247, [0x00, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00]) #indicates the overworld door being used for the single entrance spawn point
|
rom.write_bytes(0x180247, [0x00, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00]) #indicates the overworld door being used for the single entrance spawn point
|
||||||
|
|
||||||
rom.write_byte(0xDBB73 + 0x6F, 0x07) # DDM fairy entrance to old man fetch east UW
|
|
||||||
write_int16(rom, 0x15AEE + 2*0x18, 0x00F1) # old man fetch UW to DDM fairy entrance
|
|
||||||
rom.write_byte(0x15B8C + 0x18, 0x43)
|
|
||||||
write_int16(rom, 0x15BDB + 2 * 0x18, 0x1400)
|
|
||||||
write_int16(rom, 0x15C79 + 2 * 0x18, 0x0294)
|
|
||||||
write_int16(rom, 0x15D17 + 2 * 0x18, 0x0600)
|
|
||||||
write_int16(rom, 0x15DB5 + 2 * 0x18, 0x02E8)
|
|
||||||
write_int16(rom, 0x15E53 + 2 * 0x18, 0x0678)
|
|
||||||
write_int16(rom, 0x15EF1 + 2 * 0x18, 0x0303)
|
|
||||||
write_int16(rom, 0x15F8F + 2 * 0x18, 0x0685)
|
|
||||||
rom.write_byte(0x1602D + 0x18, 0x0A)
|
|
||||||
rom.write_byte(0x1607C + 0x18, 0xF6)
|
|
||||||
write_int16(rom, 0x160CB + 2 * 0x18, 0x0000)
|
|
||||||
write_int16(rom, 0x16169 + 2 * 0x18, 0x0000)
|
|
||||||
|
|
||||||
rom.write_byte(0xDBB73 + 0x06, 0x2E) # old man fetch east entrance to DMD west UW
|
|
||||||
write_int16(rom, 0x15AEE + 2*0x08, 0x00E6) # DMD west UW to old man fetch east entrance
|
|
||||||
if (world.mode[player] == 'inverted') != (0x0A in world.owswaps[player][0] and world.owSwap[player] == 'mixed'):
|
|
||||||
rom.write_byte(0xDBB73 + 0x16, 0x5E) # bumper cave top entrance to DDM Fairy UW
|
|
||||||
else:
|
|
||||||
rom.write_byte(0xDBB73 + 0x2D, 0x5E) # DMD west entrance to DDM Fairy
|
|
||||||
if (world.mode[player] == 'inverted') != (0x05 in world.owswaps[player][0] and world.owSwap[player] == 'mixed'):
|
if (world.mode[player] == 'inverted') != (0x05 in world.owswaps[player][0] and world.owSwap[player] == 'mixed'):
|
||||||
rom.write_bytes(snes_to_pc(0x1BC655), [0x4A, 0x1D, 0x82]) # add warp under rock
|
rom.write_bytes(snes_to_pc(0x1BC655), [0x4A, 0x1D, 0x82]) # add warp under rock
|
||||||
if (world.mode[player] == 'inverted') != (0x07 in world.owswaps[player][0] and world.owSwap[player] == 'mixed'):
|
if (world.mode[player] == 'inverted') != (0x07 in world.owswaps[player][0] and world.owSwap[player] == 'mixed'):
|
||||||
@@ -2502,17 +2480,6 @@ def set_inverted_mode(world, player, rom, inverted_buffer):
|
|||||||
rom.write_bytes(0x0086E, [0x5C, 0x00, 0xA0, 0xA1]) # TR tail
|
rom.write_bytes(0x0086E, [0x5C, 0x00, 0xA0, 0xA1]) # TR tail
|
||||||
if world.shuffle[player] in ['vanilla']:
|
if world.shuffle[player] in ['vanilla']:
|
||||||
world.fix_trock_doors[player] = True
|
world.fix_trock_doors[player] = True
|
||||||
if (world.mode[player] == 'inverted') != (0x0A in world.owswaps[player][0] and world.owSwap[player] == 'mixed'):
|
|
||||||
if world.shuffle[player] in ['vanilla', 'dungeonssimple', 'dungeonsfull']:
|
|
||||||
rom.write_byte(0xDBB73 + 0x15, 0x06) # bumper cave bottom entrance to old man fetch west UW
|
|
||||||
write_int16(rom, 0x15AEE + 2*0x17, 0x00F0) # old man fetch west UW to bumper cave bottom entrance
|
|
||||||
rom.write_byte(0xDBB73 + 0x05, 0x16) # old man fetch west entrance to bumper cave bottom UW
|
|
||||||
write_int16(rom, 0x15AEE + 2*0x07, 0x00FB) # bumper cave bottom UW to old man fetch west entrance
|
|
||||||
rom.write_byte(0xDBB73 + 0x2D, 0x17) # DMD west entrance to bumper cave top UW
|
|
||||||
write_int16(rom, 0x15AEE + 2*0x2F, 0x00EB) # bumper cave top UW to DMD west entrance
|
|
||||||
if (world.mode[player] == 'inverted') == (0x03 in world.owswaps[player][0] and world.owSwap[player] == 'mixed'):
|
|
||||||
rom.write_byte(0xDBB73 + 0x16, 0x2E) # bumper cave top entrance to DMD west UW
|
|
||||||
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'):
|
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
|
rom.write_bytes(snes_to_pc(0x1BC67A), [0x2E, 0x0B, 0x82]) # add warp under rock
|
||||||
if (world.mode[player] == 'inverted') != (0x1B in world.owswaps[player][0] and world.owSwap[player] == 'mixed'):
|
if (world.mode[player] == 'inverted') != (0x1B in world.owswaps[player][0] and world.owSwap[player] == 'mixed'):
|
||||||
@@ -2603,21 +2570,6 @@ def set_inverted_mode(world, player, rom, inverted_buffer):
|
|||||||
|
|
||||||
write_int16(rom, 0xDB96F + 2 * 0x35, 0x001B) # move pyramid exit door
|
write_int16(rom, 0xDB96F + 2 * 0x35, 0x001B) # move pyramid exit door
|
||||||
write_int16(rom, 0xDBA71 + 2 * 0x35, 0x011C)
|
write_int16(rom, 0xDBA71 + 2 * 0x35, 0x011C)
|
||||||
rom.write_byte(0xDBB73 + 0x35, 0x36)
|
|
||||||
|
|
||||||
write_int16(rom, 0x15AEE + 2 * 0x37, 0x0010) # pyramid exit to new hc area
|
|
||||||
rom.write_byte(0x15B8C + 0x37, 0x1B)
|
|
||||||
write_int16(rom, 0x15BDB + 2 * 0x37, 0x000E)
|
|
||||||
write_int16(rom, 0x15C79 + 2 * 0x37, 0x0600)
|
|
||||||
write_int16(rom, 0x15D17 + 2 * 0x37, 0x0676)
|
|
||||||
write_int16(rom, 0x15DB5 + 2 * 0x37, 0x0604)
|
|
||||||
write_int16(rom, 0x15E53 + 2 * 0x37, 0x06E8)
|
|
||||||
write_int16(rom, 0x15EF1 + 2 * 0x37, 0x066D)
|
|
||||||
write_int16(rom, 0x15F8F + 2 * 0x37, 0x06F3)
|
|
||||||
rom.write_byte(0x1602D + 0x37, 0x00)
|
|
||||||
rom.write_byte(0x1607C + 0x37, 0x0A)
|
|
||||||
write_int16(rom, 0x160CB + 2 * 0x37, 0x0000)
|
|
||||||
write_int16(rom, 0x16169 + 2 * 0x37, 0x811C)
|
|
||||||
if (world.mode[player] == 'inverted') != (0x29 in world.owswaps[player][0] and world.owSwap[player] == 'mixed'):
|
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
|
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'):
|
if (world.mode[player] == 'inverted') != (0x2C in world.owswaps[player][0] and world.owSwap[player] == 'mixed'):
|
||||||
|
|||||||
Reference in New Issue
Block a user