summary refs log tree commit diff stats
path: root/player_logic.py
diff options
context:
space:
mode:
Diffstat (limited to 'player_logic.py')
-rw-r--r--player_logic.py31
1 files changed, 24 insertions, 7 deletions
diff --git a/player_logic.py b/player_logic.py index a0b33d1..b046f1c 100644 --- a/player_logic.py +++ b/player_logic.py
@@ -190,6 +190,25 @@ class LingoPlayerLogic:
190 if item.should_include(world): 190 if item.should_include(world):
191 self.real_items.append(name) 191 self.real_items.append(name)
192 192
193 # Calculate the requirements for the fake pilgrimage.
194 fake_pilgrimage = [
195 ["Second Room", "Exit Door"], ["Crossroads", "Tower Entrance"],
196 ["Orange Tower Fourth Floor", "Hot Crusts Door"], ["Outside The Initiated", "Shortcut to Hub Room"],
197 ["Orange Tower First Floor", "Shortcut to Hub Room"], ["Directional Gallery", "Shortcut to The Undeterred"],
198 ["Orange Tower First Floor", "Salt Pepper Door"], ["Hub Room", "Crossroads Entrance"],
199 ["Champion's Rest", "Shortcut to The Steady"], ["The Bearer", "Shortcut to The Bold"],
200 ["Art Gallery", "Exit"], ["The Tenacious", "Shortcut to Hub Room"],
201 ["Outside The Agreeable", "Tenacious Entrance"]
202 ]
203 pilgrimage_reqs = AccessRequirements()
204 for door in fake_pilgrimage:
205 door_object = DOORS_BY_ROOM[door[0]][door[1]]
206 if door_object.event or world.options.shuffle_doors == ShuffleDoors.option_none:
207 pilgrimage_reqs.merge(self.calculate_door_requirements(door[0], door[1], world))
208 else:
209 pilgrimage_reqs.doors.add(RoomAndDoor(door[0], door[1]))
210 self.door_reqs.setdefault("Pilgrim Antechamber", {})["Pilgrimage"] = pilgrimage_reqs
211
193 # Create the paintings mapping, if painting shuffle is on. 212 # Create the paintings mapping, if painting shuffle is on.
194 if painting_shuffle: 213 if painting_shuffle:
195 # Shuffle paintings until we get something workable. 214 # Shuffle paintings until we get something workable.
@@ -369,11 +388,9 @@ class LingoPlayerLogic:
369 door_object = DOORS_BY_ROOM[room][door] 388 door_object = DOORS_BY_ROOM[room][door]
370 389
371 for req_panel in door_object.panels: 390 for req_panel in door_object.panels:
372 if req_panel.room is not None and req_panel.room != room: 391 panel_room = room if req_panel.room is None else req_panel.room
373 access_reqs.rooms.add(req_panel.room) 392 access_reqs.rooms.add(panel_room)
374 393 sub_access_reqs = self.calculate_panel_requirements(panel_room, req_panel.panel, world)
375 sub_access_reqs = self.calculate_panel_requirements(room if req_panel.room is None else req_panel.room,
376 req_panel.panel, world)
377 access_reqs.merge(sub_access_reqs) 394 access_reqs.merge(sub_access_reqs)
378 395
379 self.door_reqs[room][door] = access_reqs 396 self.door_reqs[room][door] = access_reqs
@@ -397,8 +414,8 @@ class LingoPlayerLogic:
397 unhindered_panels_by_color: dict[Optional[str], int] = {} 414 unhindered_panels_by_color: dict[Optional[str], int] = {}
398 415
399 for panel_name, panel_data in room_data.items(): 416 for panel_name, panel_data in room_data.items():
400 # We won't count non-counting panels. 417 # We won't count non-counting panels. THE MASTER has special access rules and is handled separately.
401 if panel_data.non_counting: 418 if panel_data.non_counting or panel_name == "THE MASTER":
402 continue 419 continue
403 420
404 # We won't coalesce any panels that have requirements beyond colors. To simplify things for now, we will 421 # We won't coalesce any panels that have requirements beyond colors. To simplify things for now, we will