From d33582a3a21fec13aeeeb84add58d5c5dd73ffbf Mon Sep 17 00:00:00 2001 From: Bonta-kun <40473493+Bonta0@users.noreply.github.com> Date: Mon, 16 Dec 2019 09:59:16 +0100 Subject: [PATCH] Enable bombs in escape assist with an enemized standard start so you can beat the game --- BaseClasses.py | 1 + Main.py | 2 ++ Rom.py | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/BaseClasses.py b/BaseClasses.py index f18ba018..92862ecd 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -74,6 +74,7 @@ class World(object): self.difficulty_requirements = None self.fix_fake_world = True self.boss_shuffle = boss_shuffle + self.escape_assist = [] self.hints = hints self.crystals_needed_for_ganon = 7 self.crystals_needed_for_gt = 7 diff --git a/Main.py b/Main.py index 8468740d..925d94ab 100644 --- a/Main.py +++ b/Main.py @@ -56,6 +56,8 @@ def main(args, seed=None): logger.info('ALttP Entrance Randomizer Version %s - Seed: %s\n\n', __version__, world.seed) world.difficulty_requirements = difficulties[world.difficulty] + if world.mode == 'standard' and (args.shuffleenemies != 'none' or args.enemy_health not in ['default', 'easy']): + world.escape_assist.append(['bombs']) # enemized escape assumes infinite bombs available and will likely be unbeatable without it if world.mode != 'inverted': for player in range(1, world.players + 1): diff --git a/Rom.py b/Rom.py index c66fa741..17d0434d 100644 --- a/Rom.py +++ b/Rom.py @@ -935,7 +935,9 @@ def patch_rom(world, player, rom, enemized): rom.write_bytes(0x180080, [50, 50, 70, 70]) # values to fill for Capacity Upgrades (Bomb5, Bomb10, Arrow5, Arrow10) - rom.write_byte(0x18004D, 0x00) # Escape assist (off) + rom.write_byte(0x18004D, ((0x01 if 'arrows' in world.escape_assist else 0x00) | + (0x02 if 'bombs' in world.escape_assist else 0x00) | + (0x04 if 'magic' in world.escape_assist else 0x00))) # Escape assist if world.goal in ['pedestal', 'triforcehunt']: rom.write_byte(0x18003E, 0x01) # make ganon invincible