From 3c81e377e5afcef07b8d08880e4087fe129d1c56 Mon Sep 17 00:00:00 2001 From: "randall.rupper" Date: Tue, 16 Mar 2021 14:23:52 -0600 Subject: [PATCH] Fix for intensity 3 inverted lobbies if lobbies are chosen to be vanilla Flooded pots not actually able to be flooded in some potshuffles --- BaseClasses.py | 10 ++++++++-- Main.py | 2 +- RELEASENOTES.md | 6 ++++++ Rom.py | 2 ++ mystery_example.yml | 4 ++++ 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index be77fd71..b5322b5a 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -586,7 +586,8 @@ class CollectionState(object): for event in reachable_events: if event.name in flooded_keys.keys(): flood_location = self.world.get_location(flooded_keys[event.name], event.player) - if flood_location.item and flood_location not in self.locations_checked: + if (flood_location.item and flood_location not in self.locations_checked + and self.location_can_be_flooded(flood_location)): adjusted_checks.remove(event) if len(adjusted_checks) < len(reachable_events): return adjusted_checks @@ -597,9 +598,14 @@ class CollectionState(object): flood_location = world.get_location(flooded_keys[location.name], location.player) item = flood_location.item item_is_important = False if not item else item.advancement or item.bigkey or item.smallkey - return flood_location in self.locations_checked or not item_is_important + return (flood_location in self.locations_checked or not item_is_important + or not self.location_can_be_flooded(flood_location)) return True + @staticmethod + def location_can_be_flooded(location): + return location.parent_region.name in ['Swamp Trench 1 Alcove', 'Swamp Trench 2 Alcove'] + def has(self, item, player, count=1): if count == 1: return (item, player) in self.prog_items diff --git a/Main.py b/Main.py index 0ed2b7eb..4fd1cef2 100644 --- a/Main.py +++ b/Main.py @@ -26,7 +26,7 @@ from Fill import sell_potions, sell_keys, balance_multiworld_progression, balanc from ItemList import generate_itempool, difficulties, fill_prizes, customize_shops from Utils import output_path, parse_player_names -__version__ = '0.3.1.5-u' +__version__ = '0.3.1.6-u' class EnemizerError(RuntimeError): diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 377db0fe..e8871542 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -128,6 +128,12 @@ New item counter modified to show total # Bug Fixes and Notes. +* 0.3.1.6-u + * Fix for inverted. AT or GT vanilla lobby in intensity 3 should not softlock on exit in non-ER modes. + * Backward compatibility for "chaos" enemizer flags. (Thanks krebel) + * Fix for potshuffle and swamp trench generation errors (Thanks StructuralMike) + * Fix for TFH playthrough (Thanks StructuralMike) + * Fix for Standard+Retro (Thanks StructuralMike) * 0.3.1.5-u * Ganon hints fixed for shops * Added support for a settings file so SahasrahBot and the main website can use it easier. (Thanks Synack) diff --git a/Rom.py b/Rom.py index 7458ee5b..b03cbcae 100644 --- a/Rom.py +++ b/Rom.py @@ -729,6 +729,8 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): aga_portal = world.get_portal('Agahnims Tower', player) gt_portal = world.get_portal('Ganons Tower', player) aga_portal.exit_offset, gt_portal.exit_offset = gt_portal.exit_offset, aga_portal.exit_offset + aga_portal.default = False + gt_portal.default = False for portal in world.dungeon_portals[player]: if not portal.default: diff --git a/mystery_example.yml b/mystery_example.yml index cb075090..40416ff3 100644 --- a/mystery_example.yml +++ b/mystery_example.yml @@ -44,6 +44,10 @@ mc: 3 mcs: 2 full: 5 + dungeon_counters: + on: 5 + off: 0 + default: 5 experimental: on: 1 off: 0