From ddb764a9b6d8ab6774aaf16f433d9acdb52aeeaf Mon Sep 17 00:00:00 2001 From: Alchav <59858495+Alchav@users.noreply.github.com> Date: Tue, 21 Mar 2023 00:09:12 -0400 Subject: [PATCH] =?UTF-8?q?Pok=C3=A9mon=20R/B:=20Skip=20unnecessary=20swee?= =?UTF-8?q?ps=20for=20events?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worlds/pokemon_rb/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/worlds/pokemon_rb/__init__.py b/worlds/pokemon_rb/__init__.py index 344b96f2..cb9af549 100644 --- a/worlds/pokemon_rb/__init__.py +++ b/worlds/pokemon_rb/__init__.py @@ -345,8 +345,9 @@ class PokemonRedBlueWorld(World): for item in reversed(self.multiworld.itempool): if item.player == self.player and loc.can_fill(self.multiworld.state, item, False): self.multiworld.itempool.remove(item) - state = sweep_from_pool(self.multiworld.state, self.multiworld.itempool + unplaced_items) - if state.can_reach(loc, "Location", self.player): + if item.advancement: + state = sweep_from_pool(self.multiworld.state, self.multiworld.itempool + unplaced_items) + if (not item.advancement) or state.can_reach(loc, "Location", self.player): loc.place_locked_item(item) break else: