From eb98f3d265efe31389535c64cf0e7d45e8e54b52 Mon Sep 17 00:00:00 2001 From: compiling <8335770+compiling@users.noreply.github.com> Date: Sat, 1 Feb 2020 18:08:34 +1100 Subject: [PATCH 1/9] Inverted Ganons Tower dungeon was renamed. --- Bosses.py | 51 +++++++++++++++++---------------------------------- Rom.py | 11 ++++------- 2 files changed, 21 insertions(+), 41 deletions(-) diff --git a/Bosses.py b/Bosses.py index 8d5f6a64..4c748391 100644 --- a/Bosses.py +++ b/Bosses.py @@ -119,11 +119,11 @@ def can_place_boss(world, player, boss, dungeon_name, level=None): if world.swords[player] in ['swordless'] and boss == 'Kholdstare' and dungeon_name != 'Ice Palace': return False - if dungeon_name in ['Ganons Tower', 'Inverted Ganons Tower'] and level == 'top': + if dungeon_name == 'Ganons Tower' and level == 'top': if boss in ["Armos Knights", "Arrghus", "Blind", "Trinexx", "Lanmolas"]: return False - if dungeon_name in ['Ganons Tower', 'Inverted Ganons Tower'] and level == 'middle': + if dungeon_name == 'Ganons Tower' and level == 'middle': if boss in ["Blind"]: return False @@ -141,38 +141,21 @@ def place_bosses(world, player): if world.boss_shuffle[player] == 'none': return # Most to least restrictive order - if world.mode[player] != 'inverted': - boss_locations = [ - ['Ganons Tower', 'top'], - ['Tower of Hera', None], - ['Skull Woods', None], - ['Ganons Tower', 'middle'], - ['Eastern Palace', None], - ['Desert Palace', None], - ['Palace of Darkness', None], - ['Swamp Palace', None], - ['Thieves Town', None], - ['Ice Palace', None], - ['Misery Mire', None], - ['Turtle Rock', None], - ['Ganons Tower', 'bottom'], - ] - else: - boss_locations = [ - ['Inverted Ganons Tower', 'top'], - ['Tower of Hera', None], - ['Skull Woods', None], - ['Inverted Ganons Tower', 'middle'], - ['Eastern Palace', None], - ['Desert Palace', None], - ['Palace of Darkness', None], - ['Swamp Palace', None], - ['Thieves Town', None], - ['Ice Palace', None], - ['Misery Mire', None], - ['Turtle Rock', None], - ['Inverted Ganons Tower', 'bottom'], - ] + boss_locations = [ + ['Ganons Tower', 'top'], + ['Tower of Hera', None], + ['Skull Woods', None], + ['Ganons Tower', 'middle'], + ['Eastern Palace', None], + ['Desert Palace', None], + ['Palace of Darkness', None], + ['Swamp Palace', None], + ['Thieves Town', None], + ['Ice Palace', None], + ['Misery Mire', None], + ['Turtle Rock', None], + ['Ganons Tower', 'bottom'], + ] all_bosses = sorted(boss_table.keys()) #s orted to be deterministic on older pythons placeable_bosses = [boss for boss in all_bosses if boss not in ['Agahnim', 'Agahnim2', 'Ganon']] diff --git a/Rom.py b/Rom.py index 45d6c38f..c4baeb62 100644 --- a/Rom.py +++ b/Rom.py @@ -241,9 +241,9 @@ def patch_enemizer(world, player, rom, baserom_path, enemizercli, shufflepots, r 'IcePalace': world.get_dungeon("Ice Palace", player).boss.enemizer_name, 'MiseryMire': world.get_dungeon("Misery Mire", player).boss.enemizer_name, 'TurtleRock': world.get_dungeon("Turtle Rock", player).boss.enemizer_name, - 'GanonsTower1': world.get_dungeon('Ganons Tower' if world.mode[player] != 'inverted' else 'Inverted Ganons Tower', player).bosses['bottom'].enemizer_name, - 'GanonsTower2': world.get_dungeon('Ganons Tower' if world.mode[player] != 'inverted' else 'Inverted Ganons Tower', player).bosses['middle'].enemizer_name, - 'GanonsTower3': world.get_dungeon('Ganons Tower' if world.mode[player] != 'inverted' else 'Inverted Ganons Tower', player).bosses['top'].enemizer_name, + 'GanonsTower1': world.get_dungeon('Ganons Tower', player).bosses['bottom'].enemizer_name, + 'GanonsTower2': world.get_dungeon('Ganons Tower', player).bosses['middle'].enemizer_name, + 'GanonsTower3': world.get_dungeon('Ganons Tower', player).bosses['top'].enemizer_name, 'GanonsTower4': 'Agahnim2', 'Ganon': 'Ganon', } @@ -1599,10 +1599,7 @@ def write_strings(rom, world, player, team): entrances_to_hint = {} entrances_to_hint.update(InconvenientDungeonEntrances) if world.shuffle_ganon: - if world.mode[player] == 'inverted': - entrances_to_hint.update({'Inverted Ganons Tower': 'The sealed castle door'}) - else: - entrances_to_hint.update({'Ganons Tower': 'Ganon\'s Tower'}) + entrances_to_hint.update({'Ganons Tower': 'Ganon\'s Tower'}) if world.shuffle[player] in ['simple', 'restricted', 'restricted_legacy']: for entrance in all_entrances: if entrance.name in entrances_to_hint: From 4c7c4ae00a20916ffed86515e93f9f972e1f5d27 Mon Sep 17 00:00:00 2001 From: codemann8 Date: Sat, 1 Feb 2020 18:16:38 -0600 Subject: [PATCH 2/9] Fixed broken defaulted Gui parameters --- Gui.py | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/Gui.py b/Gui.py index 34709efd..8966b495 100755 --- a/Gui.py +++ b/Gui.py @@ -38,7 +38,10 @@ def guiMain(args=None): farBottomFrame = Frame(mainWindow) def open_output(): - open_file(output_path('')) + if args.outputpath: + open_file(output_path(args.outputpath)) + else: + open_file(output_path('')) openOutputButton = Button(farBottomFrame, text='Open Output Directory', command=open_output) @@ -317,30 +320,6 @@ def guiMain(args=None): doorShuffleLabel = Label(doorShuffleFrame, text='Door shuffle algorithm') doorShuffleLabel.pack(side=LEFT) - heartbeepFrame = Frame(drowDownFrame) - heartbeepVar = StringVar() - heartbeepVar.set('normal') - heartbeepOptionMenu = OptionMenu(heartbeepFrame, heartbeepVar, 'double', 'normal', 'half', 'quarter', 'off') - heartbeepOptionMenu.pack(side=RIGHT) - heartbeepLabel = Label(heartbeepFrame, text='Heartbeep sound rate') - heartbeepLabel.pack(side=LEFT) - - heartcolorFrame = Frame(drowDownFrame) - heartcolorVar = StringVar() - heartcolorVar.set('red') - heartcolorOptionMenu = OptionMenu(heartcolorFrame, heartcolorVar, 'red', 'blue', 'green', 'yellow', 'random') - heartcolorOptionMenu.pack(side=RIGHT) - heartcolorLabel = Label(heartcolorFrame, text='Heart color') - heartcolorLabel.pack(side=LEFT) - - fastMenuFrame = Frame(drowDownFrame) - fastMenuVar = StringVar() - fastMenuVar.set('normal') - fastMenuOptionMenu = OptionMenu(fastMenuFrame, fastMenuVar, 'normal', 'instant', 'double', 'triple', 'quadruple', 'half') - fastMenuOptionMenu.pack(side=RIGHT) - fastMenuLabel = Label(fastMenuFrame, text='Menu speed') - fastMenuLabel.pack(side=LEFT) - logicFrame.pack(expand=True, anchor=E) accessibilityFrame.pack(expand=True, anchor=E) @@ -491,6 +470,7 @@ def guiMain(args=None): int(triforcecountVar.get()), int(triforceVar.get()), int(rupoorcostVar.get()), int(universalkeyVar.get())] guiargs.rom = romVar.get() guiargs.sprite = sprite + guiargs.outputpath = args.outputpath # get default values for missing parameters for k,v in vars(parse_arguments(['--multi', str(guiargs.multi)])).items(): if k not in vars(guiargs): @@ -1250,8 +1230,11 @@ def guiMain(args=None): keyshuffleVar.set(args.keyshuffle) bigkeyshuffleVar.set(args.bigkeyshuffle) retroVar.set(args.retro) + openpyramidVar.set(args.openpyramid) quickSwapVar.set(int(args.quickswap)) disableMusicVar.set(int(args.disablemusic)) + if args.multi: + worldVar.set(str(args.multi)) if args.count: countVar.set(str(args.count)) if args.seed: @@ -1269,12 +1252,21 @@ def guiMain(args=None): algorithmVar.set(args.algorithm) shuffleVar.set(args.shuffle) doorShuffleVar.set(args.door_shuffle) + heartcolorVar.set(args.heartcolor) heartbeepVar.set(args.heartbeep) fastMenuVar.set(args.fastmenu) logicVar.set(args.logic) romVar.set(args.rom) shuffleGanonVar.set(args.shuffleganon) hintsVar.set(args.hints) + enemizerCLIpathVar.set(args.enemizercli) + potShuffleVar.set(args.shufflepots) + enemyShuffleVar.set(args.shuffleenemies) + enemizerBossVar.set(args.shufflebosses) + enemizerDamageVar.set(args.enemy_damage) + enemizerHealthVar.set(args.enemy_health) + owPalettesVar.set(args.ow_palettes) + uwPalettesVar.set(args.uw_palettes) if args.sprite is not None: set_sprite(Sprite(args.sprite)) From 6b0d1dd517ce68f94b0df1f84295752dc7d5922a Mon Sep 17 00:00:00 2001 From: compiling <8335770+compiling@users.noreply.github.com> Date: Sun, 2 Feb 2020 11:45:23 +1100 Subject: [PATCH 3/9] Revert change to Inverted Ganons Tower entrance hint (inverted is actually a different entrance). --- Rom.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Rom.py b/Rom.py index c4baeb62..a49c617e 100644 --- a/Rom.py +++ b/Rom.py @@ -1599,7 +1599,10 @@ def write_strings(rom, world, player, team): entrances_to_hint = {} entrances_to_hint.update(InconvenientDungeonEntrances) if world.shuffle_ganon: - entrances_to_hint.update({'Ganons Tower': 'Ganon\'s Tower'}) + if world.mode[player] == 'inverted': + entrances_to_hint.update({'Inverted Ganons Tower': 'The sealed castle door'}) + else: + entrances_to_hint.update({'Ganons Tower': 'Ganon\'s Tower'}) if world.shuffle[player] in ['simple', 'restricted', 'restricted_legacy']: for entrance in all_entrances: if entrance.name in entrances_to_hint: From fd9486ded93cf28b6c7ca6c378e4f0b76002785e Mon Sep 17 00:00:00 2001 From: aerinon Date: Mon, 3 Feb 2020 16:24:50 -0700 Subject: [PATCH 4/9] Bump version --- Main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Main.py b/Main.py index d673d1d8..5c5da4e0 100644 --- a/Main.py +++ b/Main.py @@ -23,7 +23,7 @@ from Fill import distribute_items_cutoff, distribute_items_staleness, distribute from ItemList import generate_itempool, difficulties, fill_prizes from Utils import output_path, parse_player_names -__version__ = '0.0.9-pre' +__version__ = '0.0.10pre' def main(args, seed=None): From d47f01657659e533ad33645067de81b625aadb65 Mon Sep 17 00:00:00 2001 From: ninjamask Date: Tue, 4 Feb 2020 21:36:59 +0100 Subject: [PATCH 5/9] TT Attic Hint --- Rom.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Rom.py b/Rom.py index a49c617e..bef3808f 100644 --- a/Rom.py +++ b/Rom.py @@ -1736,6 +1736,11 @@ def write_strings(rom, world, player, team): tt[hint_locations.pop(0)] = this_hint hint_count -= 1 + if world.doorShuffle[player] in ['crossed']: + attic_hint = world.get_location("Thieves' Town - Attic", player).parent_region.dungeon.name + this_hint = 'A cracked floor can be found in ' + attic_hint + '.' + tt[hint_locations.pop(0)] = this_hint + # All remaining hint slots are filled with junk hints. It is done this way to ensure the same junk hint isn't selected twice. junk_hints = junk_texts.copy() random.shuffle(junk_hints) From a3682262e10e2a0607a091624475fe1a745d7650 Mon Sep 17 00:00:00 2001 From: ninjamask Date: Tue, 4 Feb 2020 21:44:58 +0100 Subject: [PATCH 6/9] TT Attic Hint --- Rom.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Rom.py b/Rom.py index bef3808f..a3506273 100644 --- a/Rom.py +++ b/Rom.py @@ -1736,6 +1736,7 @@ def write_strings(rom, world, player, team): tt[hint_locations.pop(0)] = this_hint hint_count -= 1 + # Adding a hint for the Thieves' Town Attic location in Crossed Doorshufle. if world.doorShuffle[player] in ['crossed']: attic_hint = world.get_location("Thieves' Town - Attic", player).parent_region.dungeon.name this_hint = 'A cracked floor can be found in ' + attic_hint + '.' From 4cd63196f9e2b62776ad196d81d5bb7628f6b89c Mon Sep 17 00:00:00 2001 From: Michael Fleischer Date: Tue, 4 Feb 2020 22:07:55 +0100 Subject: [PATCH 7/9] Disallow hint to be in the attic --- Rom.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Rom.py b/Rom.py index a3506273..be2b70bb 100644 --- a/Rom.py +++ b/Rom.py @@ -1740,7 +1740,10 @@ def write_strings(rom, world, player, team): if world.doorShuffle[player] in ['crossed']: attic_hint = world.get_location("Thieves' Town - Attic", player).parent_region.dungeon.name this_hint = 'A cracked floor can be found in ' + attic_hint + '.' - tt[hint_locations.pop(0)] = this_hint + if hint_locations[0] == 'telepathic_tile_turtle_rock': + tt[hint_locations.pop(1)] = this_hint + else: + tt[hint_locations.pop(0)] = this_hint # All remaining hint slots are filled with junk hints. It is done this way to ensure the same junk hint isn't selected twice. junk_hints = junk_texts.copy() From 4780cf18b542b16f3b664731b5814c88c2eddfed Mon Sep 17 00:00:00 2001 From: Michael Fleischer Date: Tue, 4 Feb 2020 22:12:19 +0100 Subject: [PATCH 8/9] oops a little debug mistake --- Rom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rom.py b/Rom.py index be2b70bb..38b5448f 100644 --- a/Rom.py +++ b/Rom.py @@ -1740,7 +1740,7 @@ def write_strings(rom, world, player, team): if world.doorShuffle[player] in ['crossed']: attic_hint = world.get_location("Thieves' Town - Attic", player).parent_region.dungeon.name this_hint = 'A cracked floor can be found in ' + attic_hint + '.' - if hint_locations[0] == 'telepathic_tile_turtle_rock': + if hint_locations[0] == 'telepathic_tile_thieves_town_upstairs': tt[hint_locations.pop(1)] = this_hint else: tt[hint_locations.pop(0)] = this_hint From 34656a75640fb6ed006c76f6147dd66a6c96ee71 Mon Sep 17 00:00:00 2001 From: aerinon Date: Tue, 4 Feb 2020 16:34:56 -0700 Subject: [PATCH 9/9] Minor gui update --- Gui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gui.py b/Gui.py index 8966b495..9df8dffa 100755 --- a/Gui.py +++ b/Gui.py @@ -38,7 +38,7 @@ def guiMain(args=None): farBottomFrame = Frame(mainWindow) def open_output(): - if args.outputpath: + if args and args.outputpath: open_file(output_path(args.outputpath)) else: open_file(output_path('')) @@ -470,7 +470,7 @@ def guiMain(args=None): int(triforcecountVar.get()), int(triforceVar.get()), int(rupoorcostVar.get()), int(universalkeyVar.get())] guiargs.rom = romVar.get() guiargs.sprite = sprite - guiargs.outputpath = args.outputpath + guiargs.outputpath = args.outputpath if args else None # get default values for missing parameters for k,v in vars(parse_arguments(['--multi', str(guiargs.multi)])).items(): if k not in vars(guiargs):