Pokémon R/B: Skip unnecessary sweeps for events

This commit is contained in:
Alchav 2023-03-21 00:09:12 -04:00 committed by Fabian Dill
parent 9f65f22fac
commit ddb764a9b6
1 changed files with 3 additions and 2 deletions

View File

@ -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: