Skip to content

Commit

Permalink
Pokemon Emerald: Un-exclude locations that must contain progression (A…
Browse files Browse the repository at this point in the history
  • Loading branch information
Zunawe authored Feb 18, 2024
1 parent 523c7db commit 818b0a4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions worlds/pokemon_emerald/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ def convert_unrandomized_items_to_events(tag: str) -> None:
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:
Expand Down Expand Up @@ -366,6 +367,12 @@ def pre_fill(self) -> None:
}
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:
Expand Down Expand Up @@ -410,6 +417,12 @@ def pre_fill(self) -> None:
}
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
Expand Down

0 comments on commit 818b0a4

Please sign in to comment.