From 316ffc2117432f0f450d86985f3532c715ee2158 Mon Sep 17 00:00:00 2001 From: LLCoolDave Date: Mon, 22 May 2017 19:51:57 +0200 Subject: [PATCH] Fix issue with rom writing when agahnim fix is applied in simple dungeon shuffle rules, where we swap trock ledge east with mimic cave to put agahnim in LW. --- Main.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Main.py b/Main.py index ad193df4..a3acb116 100644 --- a/Main.py +++ b/Main.py @@ -406,11 +406,24 @@ def patch_rom(world, rom): for exit in region.exits: if exit.target is not None: try: + # ugly fix for agahnim fix in simple dungeon shuffle mode + if world.agahnim_fix_required and exit.name == 'Dark Death Mountain Ledge (East)': + write_byte(rom, door_addresses[exit.name][0], exit.target) + continue + + # toDo consider aga tower fix addresses = door_addresses[exit.name] write_byte(rom, addresses[0], exit.target[0]) write_byte(rom, addresses[1], exit.target[1]) except KeyError: # probably cave + + # ugly fix for agahnim fix in simple dungeon shuffle mode + if world.agahnim_fix_required and exit.name == 'Mimic Cave Mirror Spot': + write_byte(rom, single_doors[exit.name], exit.target[0]) + write_byte(rom, door_addresses['Dark Death Mountain Ledge (East)'][1], exit.target[1]) + continue + addresses = single_doors[exit.name] if not isinstance(addresses, tuple): addresses = (addresses,)