From 3e1b5a03a02d7503f55500d88cfe41d2d285b125 Mon Sep 17 00:00:00 2001 From: compiling <8335770+compiling@users.noreply.github.com> Date: Sat, 31 Oct 2020 15:10:11 +1100 Subject: [PATCH] Make standard x retro work Fix no logic generation Remove a duplicate function in Main.py --- Main.py | 26 -------------------------- OverworldGlitchRules.py | 2 +- Rules.py | 5 ++++- 3 files changed, 5 insertions(+), 28 deletions(-) diff --git a/Main.py b/Main.py index c14bad00..63929361 100644 --- a/Main.py +++ b/Main.py @@ -296,32 +296,6 @@ def copy_world(world): return ret -def copy_dynamic_regions_and_locations(world, ret): - for region in world.dynamic_regions: - new_reg = Region(region.name, region.type, region.hint_text, region.player) - ret.regions.append(new_reg) - ret.initialize_regions([new_reg]) - ret.dynamic_regions.append(new_reg) - - # Note: ideally exits should be copied here, but the current use case (Take anys) do not require this - - if region.shop: - new_reg.shop = Shop(new_reg, region.shop.room_id, region.shop.type, region.shop.shopkeeper_config, region.shop.custom, region.shop.locked) - ret.shops.append(new_reg.shop) - - for location in world.dynamic_locations: - new_reg = ret.get_region(location.parent_region.name, location.parent_region.player) - new_loc = Location(location.player, location.name, location.address, location.crystal, location.hint_text, new_reg) - # todo: this is potentially dangerous. later refactor so we - # can apply dynamic region rules on top of copied world like other rules - new_loc.access_rule = location.access_rule - new_loc.always_allow = location.always_allow - new_loc.item_rule = location.item_rule - new_reg.locations.append(new_loc) - - ret.clear_location_cache() - - def create_playthrough(world): # create a copy as we will modify it old_world = world diff --git a/OverworldGlitchRules.py b/OverworldGlitchRules.py index 39eca16e..385dd84e 100644 --- a/OverworldGlitchRules.py +++ b/OverworldGlitchRules.py @@ -221,7 +221,7 @@ def no_logic_rules(world, player): Add OWG transitions to no logic player's world """ create_no_logic_connections(player, world, get_boots_clip_exits_lw(world.mode == 'inverted')) - create_no_logic_connections(player, world, get_boots_clip_exits_dw(world.mode == 'inverted', player)) + create_no_logic_connections(player, world, get_boots_clip_exits_dw(world.mode == 'inverted')) # Glitched speed drops. create_no_logic_connections(player, world, get_glitched_speed_drops_dw(world.mode == 'inverted')) diff --git a/Rules.py b/Rules.py index fe79739d..d842ed3d 100644 --- a/Rules.py +++ b/Rules.py @@ -1027,7 +1027,10 @@ def swordless_rules(world, player): set_rule(world.get_location('Bombos Tablet', player), lambda state: state.has('Book of Mudora', player) and state.has('Hammer', player)) def standard_rules(world, player): - add_rule(world.get_entrance('Sewers Door', player), lambda state: state.can_kill_most_things(player)) + if world.retro: + set_rule(world.get_entrance('Sewers Door', player), lambda state: state.can_kill_most_things(player)) # key is manually placed + else: + add_rule(world.get_entrance('Sewers Door', player), lambda state: state.can_kill_most_things(player)) set_rule(world.get_entrance('Hyrule Castle Exit (East)', player), lambda state: state.can_reach('Sanctuary', 'Region', player)) set_rule(world.get_entrance('Hyrule Castle Exit (West)', player), lambda state: state.can_reach('Sanctuary', 'Region', player))