From 72d980394cd3b7b9eb5437162229a2ffb3d152e1 Mon Sep 17 00:00:00 2001 From: compiling <8335770+compiling@users.noreply.github.com> Date: Mon, 15 Mar 2021 22:02:16 +1100 Subject: [PATCH 1/3] Add setting code to logs --- Main.py | 3 ++- resources/app/cli/lang/de.json | 2 +- resources/app/cli/lang/en.json | 2 +- resources/app/cli/lang/es.json | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Main.py b/Main.py index 683ee0da..bb6ed8ad 100644 --- a/Main.py +++ b/Main.py @@ -94,7 +94,8 @@ def main(args, seed=None, fish=None): logger.info( world.fish.translate("cli","cli","app.title") + "\n", __version__, - world.seed + world.seed, + Settings.make_code(world, 1) if world.players == 1 else '' ) parsed_names = parse_player_names(args.names, world.players, args.teams) diff --git a/resources/app/cli/lang/de.json b/resources/app/cli/lang/de.json index 07936374..d2c5d523 100644 --- a/resources/app/cli/lang/de.json +++ b/resources/app/cli/lang/de.json @@ -1,6 +1,6 @@ { "cli": { - "app.title": "ALttP Tür Randomisier Version %s - Nummer: %d", + "app.title": "ALttP Tür Randomisier Version %s - Nummer: %d, Code: %s", "shuffling.world": "Welt wird durchmischt.", "generating.itempool": "Generier Gegenstandsbasis.", "calc.access.rules": "Berechne Zugriffsregeln.", diff --git a/resources/app/cli/lang/en.json b/resources/app/cli/lang/en.json index a2008d72..0720adea 100644 --- a/resources/app/cli/lang/en.json +++ b/resources/app/cli/lang/en.json @@ -2,7 +2,7 @@ "cli": { "yes": "Yes", "no": "No", - "app.title": "ALttP Door Randomizer Version %s - Seed: %d", + "app.title": "ALttP Door Randomizer Version %s - Seed: %d, Code: %s", "version": "Version", "seed": "Seed", "player": "Player", diff --git a/resources/app/cli/lang/es.json b/resources/app/cli/lang/es.json index 9dcdc2c0..def18849 100644 --- a/resources/app/cli/lang/es.json +++ b/resources/app/cli/lang/es.json @@ -1,6 +1,6 @@ { "cli": { - "app.title": "ALttP Puerta Aleatorizador Versión %s - Número: %d", + "app.title": "ALttP Puerta Aleatorizador Versión %s - Número: %d, Código: %s", "player": "Jugador", "shuffling.world": "Barajando el Mundo", "shuffling.dungeons": "Barajando Mazmorras", From 7a255a008e16f28012f77e543729e639c8925741 Mon Sep 17 00:00:00 2001 From: compiling <8335770+compiling@users.noreply.github.com> Date: Tue, 16 Mar 2021 00:19:11 +1100 Subject: [PATCH 2/3] Fix moved locations in copy_world routine. --- Main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Main.py b/Main.py index bb6ed8ad..de0699ac 100644 --- a/Main.py +++ b/Main.py @@ -420,6 +420,8 @@ def copy_world(world): copied_region.is_dark_world = region.is_dark_world copied_region.dungeon = region.dungeon copied_region.locations = [copied_locations[(location.name, location.player)] for location in region.locations] + for location in copied_region.locations: + location.parent_region = copied_region for entrance in region.entrances: ret.get_entrance(entrance.name, entrance.player).connect(copied_region) From b6fe4681644ba55d3d6f0df3e52a6aad306d652a Mon Sep 17 00:00:00 2001 From: compiling <8335770+compiling@users.noreply.github.com> Date: Fri, 19 Mar 2021 00:00:55 +1100 Subject: [PATCH 3/3] Import inverted pyramid fairy rules from Entrance Rando --- Rules.py | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/Rules.py b/Rules.py index 249d6c0d..50b1f896 100644 --- a/Rules.py +++ b/Rules.py @@ -1284,7 +1284,7 @@ def set_inverted_big_bomb_rules(world, player): 'Hookshot Cave', 'Turtle Rock Isolated Ledge Entrance', 'Hookshot Cave Back Entrance', - 'Inverted Agahnims Tower',] + 'Inverted Agahnims Tower'] LW_walkable_entrances = ['Dark Lake Hylia Ledge Fairy', 'Dark Lake Hylia Ledge Spike Cave', 'Dark Lake Hylia Ledge Hint', @@ -1301,13 +1301,7 @@ def set_inverted_big_bomb_rules(world, player): 'Spectacle Rock Cave (Bottom)'] set_rule(world.get_entrance('Pyramid Fairy', player), - lambda state: state.can_reach('East Dark World', 'Region', player) - and state.can_reach('Inverted Big Bomb Shop', 'Region', player) - and state.has('Crystal 5', player) and state.has('Crystal 6', player)) - - # crossing peg bridge starting from the southern dark world - def cross_peg_bridge(state): - return state.has('Hammer', player) + lambda state: state.can_reach('East Dark World', 'Region', player) and state.can_reach('Inverted Big Bomb Shop', 'Region', player) and state.has('Crystal 5', player) and state.has('Crystal 6', player)) # Key for below abbreviations: # P = pearl @@ -1327,41 +1321,37 @@ def set_inverted_big_bomb_rules(world, player): elif bombshop_entrance.name in Northern_DW_entrances: # You can just fly with the Flute, you can take a long walk with Mitts and Hammer, # or you can leave a Mirror portal nearby and then walk to the castle to Mirror again. - add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.can_flute or - (state.can_lift_heavy_rocks(player) and cross_peg_bridge(state)) or - (state.has_Mirror(player) and state.can_reach('Light World', 'Region', player))) + add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.can_flute or (state.can_lift_heavy_rocks(player) and state.has('Hammer', player)) or (state.has_Mirror(player) and state.can_reach('Light World', 'Region', player))) elif bombshop_entrance.name in Southern_DW_entrances: # This is the same as north DW without the Mitts rock present. - add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: cross_peg_bridge(state) or state.can_flute(player) or (state.has_Mirror(player) and state.can_reach('Light World', 'Region', player))) + add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.has('Hammer', player) or state.can_flute(player) or (state.has_Mirror(player) and state.can_reach('Light World', 'Region', player))) elif bombshop_entrance.name in Isolated_DW_entrances: # There's just no way to escape these places with the bomb and no Flute. add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.can_flute(player)) elif bombshop_entrance.name in LW_walkable_entrances: # You can fly with the flute, or leave a mirror portal and walk through the light world - add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.can_flute(player) or - (state.has_Mirror(player) and state.can_reach('Light World', 'Region', player))) + add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.can_flute(player) or (state.has_Mirror(player) and state.can_reach('Light World', 'Region', player))) elif bombshop_entrance.name in LW_bush_entrances: # These entrances are behind bushes in LW so you need either Pearl or the tools to solve NDW bomb shop locations. - add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.has_Mirror(player) and (state.can_flute(player) or state.has_Pearl(player) or (state.can_lift_heavy_rocks(player) and cross_peg_bridge(state)))) - #todo: I stopped here - + add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.has_Mirror(player) and (state.can_flute(player) or state.has_Pearl(player) or (state.can_lift_heavy_rocks(player) and state.has('Hammer', player)))) elif bombshop_entrance.name == 'Dark World Shop': # This is mostly the same as NDW but the Mirror path requires the Pearl, or using the Hammer add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.can_flute or (state.can_lift_heavy_rocks(player) and state.has('Hammer', player)) or (state.has_Mirror(player) and state.can_reach('Light World', 'Region', player) and (state.has_Pearl(player) or state.has('Hammer', player)))) elif bombshop_entrance.name == 'Bumper Cave (Bottom)': # This is mostly the same as NDW but the Mirror path requires being able to lift a rock. - add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.can_flute or (state.can_lift_heavy_rocks(player) and cross_peg_bridge(state)) or (state.has_Mirror(player) and state.can_lift_rocks(player) and state.can_reach('Light World', 'Region', player))) + add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.can_flute or (state.can_lift_heavy_rocks(player) and state.has('Hammer', player)) or (state.has_Mirror(player) and state.can_lift_rocks(player) and state.can_reach('Light World', 'Region', player))) elif bombshop_entrance.name == 'Old Man Cave (West)': # The three paths back are Mirror and DW walk, Mirror and Flute, or LW walk and then Mirror. - add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.has_Mirror(player) and ((state.can_lift_heavy_rocks(player) and cross_peg_bridge(state)) or (state.can_lift_rocks(player) and state.has_Pearl(player)) or state.can_flute(player))) + add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.has_Mirror(player) and ((state.can_lift_heavy_rocks(player) and state.has('Hammer', player)) or (state.can_lift_rocks(player) and state.has_Pearl(player)) or state.can_flute(player))) elif bombshop_entrance.name == 'Dark World Potion Shop': # You either need to Flute to 5 or cross the rock/hammer choice pass to the south. add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.can_flute(player) or state.has('Hammer', player) or state.can_lift_rocks(player)) elif bombshop_entrance.name == 'Kings Grave': # Either lift the rock and walk to the castle to Mirror or Mirror immediately and Flute. - add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: (state.can_flute(player) or state.can_lift_heavy_rocks(player)) and state.has_Mirror(player)) + add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: (state.can_flute(player) or (state.has_Pearl(player) and state.can_lift_heavy_rocks(player))) and state.has_Mirror(player)) elif bombshop_entrance.name == 'Two Brothers House (West)': # First you must Mirror. Then you can either Flute, cross the peg bridge, or use the Agah 1 portal to Mirror again. - add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: (state.can_flute(player) or cross_peg_bridge(state) or state.has('Beat Agahnim 1', player)) and state.has_Mirror(player)) + add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: (state.can_flute(player) or state.has('Hammer', player) or state.has('Beat Agahnim 1', player)) and state.has_Mirror(player)) elif bombshop_entrance.name == 'Waterfall of Wishing': # You absolutely must be able to swim to return it from here. add_rule(world.get_entrance('Pyramid Fairy', player), lambda state: state.has('Flippers', player) and state.has_Pearl(player) and state.has_Mirror(player))