Changed map checks in Mixed OWR to show dungeons in appropriate world
This commit is contained in:
45
Rom.py
45
Rom.py
@@ -1518,26 +1518,39 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False):
|
|||||||
compass_mode = 0x02 # always on
|
compass_mode = 0x02 # always on
|
||||||
elif world.compassshuffle[player] or world.doorShuffle[player] != 'vanilla' or world.dungeon_counters[player] == 'pickup':
|
elif world.compassshuffle[player] or world.doorShuffle[player] != 'vanilla' or world.dungeon_counters[player] == 'pickup':
|
||||||
compass_mode = 0x01 # show on pickup
|
compass_mode = 0x01 # show on pickup
|
||||||
if world.shuffle[player] != 'vanilla' and world.overworld_map[player] != 'default':
|
if (world.shuffle[player] != 'vanilla' and world.overworld_map[player] != 'default') or world.owMixed[player]:
|
||||||
compass_mode |= 0x80 # turn on locating dungeons
|
compass_mode |= 0x80 # turn on locating dungeons
|
||||||
x_map_position_generic = [0x3c0, 0xbc0, 0x7c0, 0x1c0, 0x5c0, 0xdc0, 0x7c0, 0xbc0, 0x9c0, 0x3c0]
|
if world.shuffle[player] != 'vanilla' and world.overworld_map[player] != 'default':
|
||||||
for idx, x_map in enumerate(x_map_position_generic):
|
x_map_position_generic = [0x3c0, 0xbc0, 0x7c0, 0x1c0, 0x5c0, 0xdc0, 0x7c0, 0xbc0, 0x9c0, 0x3c0]
|
||||||
rom.write_bytes(0x53df6+idx*2, int16_as_bytes(x_map))
|
for idx, x_map in enumerate(x_map_position_generic):
|
||||||
rom.write_bytes(0x53e16+idx*2, int16_as_bytes(0xFC0))
|
rom.write_bytes(0x53df6+idx*2, int16_as_bytes(x_map))
|
||||||
if world.compassshuffle[player] and world.overworld_map[player] == 'compass':
|
rom.write_bytes(0x53e16+idx*2, int16_as_bytes(0xFC0))
|
||||||
compass_mode |= 0x40 # compasses are wild
|
if world.compassshuffle[player] and world.overworld_map[player] == 'compass':
|
||||||
|
compass_mode |= 0x40 # compasses are wild
|
||||||
|
if not (world.shuffle[player] != 'vanilla' and world.overworld_map[player] != 'default'):
|
||||||
|
# disable HC/AT/GT icons
|
||||||
|
rom.write_bytes(0x53E8C, int16_as_bytes(0xFF00)) # GT
|
||||||
|
rom.write_bytes(0x53E8E, int16_as_bytes(0xFF00)) # AT
|
||||||
for dungeon, portal_list in dungeon_portals.items():
|
for dungeon, portal_list in dungeon_portals.items():
|
||||||
ow_map_index = dungeon_table[dungeon].map_index
|
ow_map_index = dungeon_table[dungeon].map_index
|
||||||
if len(portal_list) == 1:
|
if world.shuffle[player] != 'vanilla' and world.overworld_map[player] != 'default':
|
||||||
portal_idx = 0
|
if len(portal_list) == 1:
|
||||||
else:
|
portal_idx = 0
|
||||||
if world.doorShuffle[player] == 'crossed':
|
|
||||||
# the random choice excludes sanctuary
|
|
||||||
portal_idx = next((i for i, elem in enumerate(portal_list)
|
|
||||||
if world.get_portal(elem, player).chosen), random.choice([1, 2, 3]))
|
|
||||||
else:
|
else:
|
||||||
portal_idx = {'Hyrule Castle': 0, 'Desert Palace': 0, 'Skull Woods': 3, 'Turtle Rock': 3}[dungeon]
|
if world.doorShuffle[player] == 'crossed':
|
||||||
portal = world.get_portal(portal_list[portal_idx], player)
|
# the random choice excludes sanctuary
|
||||||
|
portal_idx = next((i for i, elem in enumerate(portal_list)
|
||||||
|
if world.get_portal(elem, player).chosen), random.choice([1, 2, 3]))
|
||||||
|
else:
|
||||||
|
portal_idx = {'Hyrule Castle': 0, 'Desert Palace': 0, 'Skull Woods': 3, 'Turtle Rock': 3}[dungeon]
|
||||||
|
else:
|
||||||
|
if dungeon in ['Hyrule Castle', 'Agahnims Tower', 'Ganons Tower']:
|
||||||
|
portal_idx = -1
|
||||||
|
elif len(portal_list) == 1:
|
||||||
|
portal_idx = 0
|
||||||
|
else:
|
||||||
|
portal_idx = {'Desert Palace': 1, 'Skull Woods': 3, 'Turtle Rock': 0}[dungeon]
|
||||||
|
portal = world.get_portal(portal_list[0 if portal_idx == -1 else portal_idx], player)
|
||||||
entrance = portal.find_portal_entrance()
|
entrance = portal.find_portal_entrance()
|
||||||
world_indicator = 0x01 if entrance.parent_region.type == RegionType.DarkWorld else 0x00
|
world_indicator = 0x01 if entrance.parent_region.type == RegionType.DarkWorld else 0x00
|
||||||
coords = ow_prize_table[entrance.name]
|
coords = ow_prize_table[entrance.name]
|
||||||
|
|||||||
Reference in New Issue
Block a user