diff --git a/BaseClasses.py b/BaseClasses.py index 245153af..d7724a98 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -796,7 +796,8 @@ class CollectionState(object): rule = key_logic.door_rules[door.name] key = KeyRuleType.AllowSmall if (key in rule.new_rules and key_total >= rule.new_rules[key] and door.name not in skip - and door.name in state.reached_doors[player] and door.name not in state.opened_doors[player]): + and door.name in state.reached_doors[player] and door.name not in state.opened_doors[player] + and rule.small_location.item is None): if paired: door_candidates.append((door.name, paired.name)) skip.add(paired.name) diff --git a/Main.py b/Main.py index 8b239dbf..08e29254 100644 --- a/Main.py +++ b/Main.py @@ -308,6 +308,7 @@ def main(args, seed=None, fish=None): balance_multiworld_progression(world) # if we only check for beatable, we can do this sanity check first before creating the rom + world.clear_exp_cache() if not world.can_beat_game(log_error=True): raise RuntimeError(world.fish.translate("cli", "cli", "cannot.beat.game")) @@ -546,10 +547,8 @@ def copy_world(world): new_location.item = item item.location = new_location item.world = ret - if location.event: - new_location.event = True - if location.locked: - new_location.locked = True + new_location.event = location.event + new_location.locked = location.locked # these need to be modified properly by set_rules new_location.access_rule = lambda state: True new_location.item_rule = lambda state: True @@ -660,8 +659,8 @@ def create_playthrough(world): old_item = location.item location.item = None # todo: this is not very efficient, but I'm not sure how else to do it for this backwards logic - # world.clear_exp_cache() - if world.can_beat_game(state_cache[num]): + world.clear_exp_cache() + if world.can_beat_game(state_cache[max(num-1, 0)]): logging.getLogger('').debug(f'{old_item.name} (Player {old_item.player}) is not required') to_delete.add(location) else: