Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Feb 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading