Skip to content

Commit

Permalink
Lingo: Expand sphere 1 under restrictive conditions (ArchipelagoMW#3190)
Browse files Browse the repository at this point in the history
  • Loading branch information
hatkirby authored and James Schurig committed Jun 13, 2024
1 parent 97b5736 commit e0fa233
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions worlds/lingo/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class LocationClassification(Flag):
normal = auto()
reduced = auto()
insanity = auto()
small_sphere_one = auto()


class LocationData(NamedTuple):
Expand Down Expand Up @@ -47,6 +48,9 @@ def load_location_data():
if not panel.exclude_reduce:
classification |= LocationClassification.reduced

if room_name == "Starting Room":
classification |= LocationClassification.small_sphere_one

ALL_LOCATION_TABLE[location_name] = \
LocationData(get_panel_location_id(room_name, panel_name), room_name,
[RoomAndPanel(None, panel_name)], classification)
Expand Down
5 changes: 4 additions & 1 deletion worlds/lingo/player_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,12 @@ def __init__(self, world: "LingoWorld"):
elif location_checks == LocationChecks.option_insanity:
location_classification = LocationClassification.insanity

if door_shuffle != ShuffleDoors.option_none and not early_color_hallways:
location_classification |= LocationClassification.small_sphere_one

for location_name, location_data in ALL_LOCATION_TABLE.items():
if location_name != self.victory_condition:
if location_classification not in location_data.classification:
if not (location_classification & location_data.classification):
continue

self.add_location(location_data.room, location_name, location_data.code, location_data.panels, world)
Expand Down

0 comments on commit e0fa233

Please sign in to comment.