summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-11-10 14:19:05 -0500
committerGitHub <noreply@github.com>2023-11-10 13:19:05 -0600
commite98e706598c8831381c222d18f8b75e699eabc08 (patch)
treebfbd1ba24170fafd4a7994d31c7fe6d36a12f55e
parenta43fb727a292bd9476dc8de5685c5b6c38a6a919 (diff)
downloadlingo-apworld-e98e706598c8831381c222d18f8b75e699eabc08.tar.gz
lingo-apworld-e98e706598c8831381c222d18f8b75e699eabc08.tar.bz2
lingo-apworld-e98e706598c8831381c222d18f8b75e699eabc08.zip
Lingo: Removed "Reached" event items (#2442)
-rw-r--r--player_logic.py6
-rw-r--r--rules.py4
2 files changed, 2 insertions, 8 deletions
diff --git a/player_logic.py b/player_logic.py index 66fe317..abb975e 100644 --- a/player_logic.py +++ b/player_logic.py
@@ -79,12 +79,6 @@ class LingoPlayerLogic:
79 raise Exception("You cannot have reduced location checks when door shuffle is on, because there would not " 79 raise Exception("You cannot have reduced location checks when door shuffle is on, because there would not "
80 "be enough locations for all of the door items.") 80 "be enough locations for all of the door items.")
81 81
82 # Create an event for every room that represents being able to reach that room.
83 for room_name in ROOMS.keys():
84 roomloc_name = f"{room_name} (Reached)"
85 self.add_location(room_name, PlayerLocation(roomloc_name, None, []))
86 self.EVENT_LOC_TO_ITEM[roomloc_name] = roomloc_name
87
88 # Create an event for every door, representing whether that door has been opened. Also create event items for 82 # Create an event for every door, representing whether that door has been opened. Also create event items for
89 # doors that are event-only. 83 # doors that are event-only.
90 for room_name, room_data in DOORS_BY_ROOM.items(): 84 for room_name, room_data in DOORS_BY_ROOM.items():
diff --git a/rules.py b/rules.py index 90c889b..d59b8a1 100644 --- a/rules.py +++ b/rules.py
@@ -66,7 +66,7 @@ def _lingo_can_solve_panel(state: CollectionState, start_room: str, room: str, p
66 """ 66 """
67 Determines whether a panel can be solved 67 Determines whether a panel can be solved
68 """ 68 """
69 if start_room != room and not state.has(f"{room} (Reached)", world.player): 69 if start_room != room and not state.can_reach(room, "Region", world.player):
70 return False 70 return False
71 71
72 if room == "Second Room" and panel == "ANOTHER TRY" \ 72 if room == "Second Room" and panel == "ANOTHER TRY" \
@@ -76,7 +76,7 @@ def _lingo_can_solve_panel(state: CollectionState, start_room: str, room: str, p
76 76
77 panel_object = PANELS_BY_ROOM[room][panel] 77 panel_object = PANELS_BY_ROOM[room][panel]
78 for req_room in panel_object.required_rooms: 78 for req_room in panel_object.required_rooms:
79 if not state.has(f"{req_room} (Reached)", world.player): 79 if not state.can_reach(req_room, "Region", world.player):
80 return False 80 return False
81 81
82 for req_door in panel_object.required_doors: 82 for req_door in panel_object.required_doors: