Pokemon Emerald: Un-exclude locations that must contain progression (#2840)

This commit is contained in:
Bryce Wilson 2024-02-17 17:52:50 -07:00 committed by GitHub
parent 523c7dbfad
commit 818b0a49e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 0 deletions

View File

@ -330,6 +330,7 @@ class PokemonEmeraldWorld(World):
for location in locations:
if location.tags is not None and tag in location.tags:
location.place_locked_item(self.create_event(self.item_id_to_name[location.default_item_code]))
location.progress_type = LocationProgressType.DEFAULT
location.address = None
if self.options.badges == RandomizeBadges.option_vanilla:
@ -366,6 +367,12 @@ class PokemonEmeraldWorld(World):
}
badge_items.sort(key=lambda item: badge_priority.get(item.name, 0))
# Un-exclude badge locations, since we need to put progression items on them
for location in badge_locations:
location.progress_type = LocationProgressType.DEFAULT \
if location.progress_type == LocationProgressType.EXCLUDED \
else location.progress_type
collection_state = self.multiworld.get_all_state(False)
if self.hm_shuffle_info is not None:
for _, item in self.hm_shuffle_info:
@ -410,6 +417,12 @@ class PokemonEmeraldWorld(World):
}
hm_items.sort(key=lambda item: hm_priority.get(item.name, 0))
# Un-exclude HM locations, since we need to put progression items on them
for location in hm_locations:
location.progress_type = LocationProgressType.DEFAULT \
if location.progress_type == LocationProgressType.EXCLUDED \
else location.progress_type
collection_state = self.multiworld.get_all_state(False)
# In specific very constrained conditions, fill_restrictive may run