From 7187d6310878a0d4bbf38d8f87b137b867b16551 Mon Sep 17 00:00:00 2001 From: LLCoolDave Date: Tue, 1 Aug 2017 19:08:46 +0200 Subject: [PATCH] Add config option that can disable respawning at pyramid after death to ganon if he happens to be shuffled to elsewhere. Slightly untested, but should cause no harm. --- BaseClasses.py | 1 + EntranceShuffle.py | 4 ++++ Main.py | 1 + Plando.py | 3 +++ Rom.py | 1 + 5 files changed, 10 insertions(+) diff --git a/BaseClasses.py b/BaseClasses.py index d587d2ab..bbb6ff57 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -28,6 +28,7 @@ class World(object): self.place_dungeon_items = place_dungeon_items # configurable in future self.shuffle_bonk_prizes = False self.swamp_patch_required = False + self.ganon_at_pyramid = True self.sewer_light_cone = mode == 'standard' self.light_world_light_cone = False self.dark_world_light_cone = False diff --git a/EntranceShuffle.py b/EntranceShuffle.py index 05371baa..cd6e30ae 100644 --- a/EntranceShuffle.py +++ b/EntranceShuffle.py @@ -646,6 +646,10 @@ def link_entrances(world): if world.get_entrance('Dam').connected_region.name != 'Dam' or world.get_entrance('Swamp Palace').connected_region.name != 'Swamp Palace (Entrance)': world.swamp_patch_required = True + # check for ganon location + if world.get_entrance('Pyramid Hole').connected_region.name != 'Pyramid': + world.ganon_at_pyramid = False + def connect_simple(world, exitname, regionname): world.get_entrance(exitname).connect(world.get_region(regionname)) diff --git a/Main.py b/Main.py index 977ebe46..c93914d3 100644 --- a/Main.py +++ b/Main.py @@ -523,6 +523,7 @@ def copy_world(world): ret = World(world.shuffle, world.logic, world.mode, world.difficulty, world.goal, world.algorithm, world.place_dungeon_items, world.check_beatable_only, world.shuffle_ganon) ret.required_medallions = list(world.required_medallions) ret.swamp_patch_required = world.swamp_patch_required + ret.ganon_at_pyramid = world.ganon_at_pyramid ret.treasure_hunt_count = world.treasure_hunt_count ret.treasure_hunt_icon = world.treasure_hunt_icon ret.sewer_light_cone = world.sewer_light_cone diff --git a/Plando.py b/Plando.py index 8bf99cda..f982650d 100644 --- a/Plando.py +++ b/Plando.py @@ -150,6 +150,9 @@ def fill_world(world, plando, text_patches): elif line.startswith('!check_beatable_only'): _, chkbtstr = line.split(':', 1) world.check_beatable_only = chkbtstr.strip().lower() == 'true' + elif line.startswith('!ganon_death_pyramid_respawn'): + _, gnpstr = line.split(':', 1) + world.ganon_at_pyramid = gnpstr.strip().lower() == 'true' elif line.startswith('!save_quit_boss'): _, sqbstr = line.split(':', 1) world.save_and_quite_from_boss = sqbstr.strip().lower() == 'true' diff --git a/Rom.py b/Rom.py index 12df938e..5239c9bb 100644 --- a/Rom.py +++ b/Rom.py @@ -282,6 +282,7 @@ def patch_rom(world, rom, hashtable, quickswap=False, beep='normal', sprite=None rom.write_byte(0x180030, 0x00) # Disable SRAM trace rom.write_byte(0x180036, 0x0A) # Rupoor negative value rom.write_byte(0x180169, 0x01 if world.lock_aga_door_in_escape else 0x00) # Lock or unlock aga tower door during escape sequence. + rom.write_byte(0x180170, 0x01 if world.ganon_at_pyramid else 0x00) # Enable respawning on pyramid after ganon death rom.write_byte(0x180086, 0x00 if world.aga_randomness else 0x01) # set blue ball and ganon warp randomness rom.write_byte(0x1800A1, 0x01) # enable overworld screen transition draining for water level inside swamp if world.goal in ['ganon']: