Lingo: Fix entrance checking being broken on default settings (#2506)

The most serious issue this PR addresses is that entrances that use doors without items (a small subset of doors when door shuffle is on, but *every* door when door shuffle is off, which is the default) underestimate the requirements needed to use that entrance. The logic would calculate the panels needed to open the door, but would neglect to keep track of the rooms those panels were in, meaning that doors would be considered openable if you had the colors needed to solve a panel that's in a room you have no access to.

Another issue is that, previously, logic would always consider the "ANOTHER TRY" panel accessible for the purposes of the LEVEL 2 panel hunt. This could result in seeds where the player is expected to have exactly the correct number of solves to reach LEVEL 2, but in reality is short by one because ANOTHER TRY itself is not revealed until the panel hunt is complete. This change marks ANOTHER TRY as non-counting, because even though it is technically a counting panel in-game, it can never contribute to the LEVEL 2 panel hunt. This issue could also apply to THE MASTER, since it is the only other counting panel with special access rules, although it is much less likely. This change adds special handling for counting THE MASTER. These issues were possible to manifest whenever the LEVEL 2 panel hunt was enabled, which it is by default.

Smaller logic issues also fixed in this PR:

* The Orange Tower Basement MASTERY panel was marked as requiring the mastery doors to be opened, when it was actually possible to get it without them by using a painting to get into the room.
* The Pilgrim Room painting item was incorrectly being marked as a filler item, despite it being progression.
* There has been another update to the game that adds connections between areas that were previously not connected. These changes were additive, which is why they are not critical.
* The panel stacks in the rhyme room now require both colours on each panel.
This commit is contained in:
Star Rauchenberger 2023-12-10 13:15:42 -05:00 committed by GitHub
parent 01d0c05259
commit d3b09bde12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 131 additions and 63 deletions

View File

@ -104,9 +104,11 @@ class LingoWorld(World):
classification = item.classification classification = item.classification
if hasattr(self, "options") and self.options.shuffle_paintings and len(item.painting_ids) > 0\ if hasattr(self, "options") and self.options.shuffle_paintings and len(item.painting_ids) > 0\
and len(item.door_ids) == 0 and all(painting_id not in self.player_logic.painting_mapping and len(item.door_ids) == 0 and all(painting_id not in self.player_logic.painting_mapping
for painting_id in item.painting_ids): for painting_id in item.painting_ids)\
and "pilgrim_painting2" not in item.painting_ids:
# If this is a "door" that just moves one or more paintings, and painting shuffle is on and those paintings # If this is a "door" that just moves one or more paintings, and painting shuffle is on and those paintings
# go nowhere, then this item should not be progression. # go nowhere, then this item should not be progression. The Pilgrim Room painting is special and needs to be
# excluded from this.
classification = ItemClassification.filler classification = ItemClassification.filler
return LingoItem(name, classification, item.code, self.player) return LingoItem(name, classification, item.code, self.player)

View File

@ -373,6 +373,7 @@
ANOTHER TRY: ANOTHER TRY:
id: Entry Room/Panel_advance id: Entry Room/Panel_advance
tag: topwhite tag: topwhite
non_counting: True # This is a counting panel in-game, but it can never count towards the LEVEL 2 panel hunt.
LEVEL 2: LEVEL 2:
# We will set up special rules for this in code. # We will set up special rules for this in code.
id: EndPanel/Panel_level_2 id: EndPanel/Panel_level_2
@ -1033,6 +1034,8 @@
Hallway Room (3): True Hallway Room (3): True
Hallway Room (4): True Hallway Room (4): True
Hedge Maze: True # through the door to the sectioned-off part of the hedge maze Hedge Maze: True # through the door to the sectioned-off part of the hedge maze
Cellar:
door: Lookout Entrance
panels: panels:
MASSACRED: MASSACRED:
id: Palindrome Room/Panel_massacred_sacred id: Palindrome Room/Panel_massacred_sacred
@ -1168,11 +1171,21 @@
- KEEP - KEEP
- BAILEY - BAILEY
- TOWER - TOWER
Lookout Entrance:
id: Cross Room Doors/Door_missing
location_name: Outside The Agreeable - Lookout Panels
panels:
- NORTH
- WINTER
- DIAMONDS
- FIRE
paintings: paintings:
- id: panda_painting - id: panda_painting
orientation: south orientation: south
- id: eyes_yellow_painting - id: eyes_yellow_painting
orientation: east orientation: east
- id: pencil_painting7
orientation: north
progression: progression:
Progressive Hallway Room: Progressive Hallway Room:
- Hallway Door - Hallway Door
@ -2043,7 +2056,7 @@
door: Sixth Floor door: Sixth Floor
Cellar: Cellar:
room: Room Room room: Room Room
door: Shortcut to Fifth Floor door: Cellar Exit
Welcome Back Area: Welcome Back Area:
door: Welcome Back door: Welcome Back
Art Gallery: Art Gallery:
@ -2302,9 +2315,6 @@
id: Master Room/Panel_mastery_mastery3 id: Master Room/Panel_mastery_mastery3
tag: midwhite tag: midwhite
hunt: True hunt: True
required_door:
room: Orange Tower Seventh Floor
door: Mastery
THE LIBRARY: THE LIBRARY:
id: EndPanel/Panel_library id: EndPanel/Panel_library
check: True check: True
@ -2675,6 +2685,10 @@
Outside The Undeterred: True Outside The Undeterred: True
Outside The Agreeable: True Outside The Agreeable: True
Outside The Wanderer: True Outside The Wanderer: True
The Observant: True
Art Gallery: True
The Scientific: True
Cellar: True
Orange Tower Fifth Floor: Orange Tower Fifth Floor:
room: Orange Tower Fifth Floor room: Orange Tower Fifth Floor
door: Welcome Back door: Welcome Back
@ -2991,8 +3005,7 @@
PATS: PATS:
id: Rhyme Room/Panel_wrath_path id: Rhyme Room/Panel_wrath_path
colors: purple colors: purple
tag: midpurp and rhyme tag: forbid
copy_to_sign: sign15
KNIGHT: KNIGHT:
id: Rhyme Room/Panel_knight_write id: Rhyme Room/Panel_knight_write
colors: purple colors: purple
@ -3158,6 +3171,8 @@
door: Painting Shortcut door: Painting Shortcut
painting: True painting: True
Room Room: True # trapdoor Room Room: True # trapdoor
Outside The Agreeable:
painting: True
panels: panels:
UNOPEN: UNOPEN:
id: Truncate Room/Panel_unopened_open id: Truncate Room/Panel_unopened_open
@ -6299,17 +6314,22 @@
SKELETON: SKELETON:
id: Double Room/Panel_bones_syn id: Double Room/Panel_bones_syn
tag: syn rhyme tag: syn rhyme
colors: purple
subtag: bot subtag: bot
link: rhyme BONES link: rhyme BONES
REPENTANCE: REPENTANCE:
id: Double Room/Panel_sentence_rhyme id: Double Room/Panel_sentence_rhyme
colors: purple colors:
- purple
- blue
tag: whole rhyme tag: whole rhyme
subtag: top subtag: top
link: rhyme SENTENCE link: rhyme SENTENCE
WORD: WORD:
id: Double Room/Panel_sentence_whole id: Double Room/Panel_sentence_whole
colors: blue colors:
- purple
- blue
tag: whole rhyme tag: whole rhyme
subtag: bot subtag: bot
link: rhyme SENTENCE link: rhyme SENTENCE
@ -6321,6 +6341,7 @@
link: rhyme DREAM link: rhyme DREAM
FANTASY: FANTASY:
id: Double Room/Panel_dream_syn id: Double Room/Panel_dream_syn
colors: purple
tag: syn rhyme tag: syn rhyme
subtag: bot subtag: bot
link: rhyme DREAM link: rhyme DREAM
@ -6332,6 +6353,7 @@
link: rhyme MYSTERY link: rhyme MYSTERY
SECRET: SECRET:
id: Double Room/Panel_mystery_syn id: Double Room/Panel_mystery_syn
colors: purple
tag: syn rhyme tag: syn rhyme
subtag: bot subtag: bot
link: rhyme MYSTERY link: rhyme MYSTERY
@ -6386,25 +6408,33 @@
door: Nines door: Nines
FERN: FERN:
id: Double Room/Panel_return_rhyme id: Double Room/Panel_return_rhyme
colors: purple colors:
- purple
- black
tag: ant rhyme tag: ant rhyme
subtag: top subtag: top
link: rhyme RETURN link: rhyme RETURN
STAY: STAY:
id: Double Room/Panel_return_ant id: Double Room/Panel_return_ant
colors: black colors:
- purple
- black
tag: ant rhyme tag: ant rhyme
subtag: bot subtag: bot
link: rhyme RETURN link: rhyme RETURN
FRIEND: FRIEND:
id: Double Room/Panel_descend_rhyme id: Double Room/Panel_descend_rhyme
colors: purple colors:
- purple
- black
tag: ant rhyme tag: ant rhyme
subtag: top subtag: top
link: rhyme DESCEND link: rhyme DESCEND
RISE: RISE:
id: Double Room/Panel_descend_ant id: Double Room/Panel_descend_ant
colors: black colors:
- purple
- black
tag: ant rhyme tag: ant rhyme
subtag: bot subtag: bot
link: rhyme DESCEND link: rhyme DESCEND
@ -6416,6 +6446,7 @@
link: rhyme JUMP link: rhyme JUMP
BOUNCE: BOUNCE:
id: Double Room/Panel_jump_syn id: Double Room/Panel_jump_syn
colors: purple
tag: syn rhyme tag: syn rhyme
subtag: bot subtag: bot
link: rhyme JUMP link: rhyme JUMP
@ -6427,6 +6458,7 @@
link: rhyme FALL link: rhyme FALL
PLUNGE: PLUNGE:
id: Double Room/Panel_fall_syn id: Double Room/Panel_fall_syn
colors: purple
tag: syn rhyme tag: syn rhyme
subtag: bot subtag: bot
link: rhyme FALL link: rhyme FALL
@ -6456,13 +6488,17 @@
panels: panels:
BIRD: BIRD:
id: Double Room/Panel_word_rhyme id: Double Room/Panel_word_rhyme
colors: purple colors:
- purple
- blue
tag: whole rhyme tag: whole rhyme
subtag: top subtag: top
link: rhyme WORD link: rhyme WORD
LETTER: LETTER:
id: Double Room/Panel_word_whole id: Double Room/Panel_word_whole
colors: blue colors:
- purple
- blue
tag: whole rhyme tag: whole rhyme
subtag: bot subtag: bot
link: rhyme WORD link: rhyme WORD
@ -6474,6 +6510,7 @@
link: rhyme HIDDEN link: rhyme HIDDEN
CONCEALED: CONCEALED:
id: Double Room/Panel_hidden_syn id: Double Room/Panel_hidden_syn
colors: purple
tag: syn rhyme tag: syn rhyme
subtag: bot subtag: bot
link: rhyme HIDDEN link: rhyme HIDDEN
@ -6485,6 +6522,7 @@
link: rhyme SILENT link: rhyme SILENT
MUTE: MUTE:
id: Double Room/Panel_silent_syn id: Double Room/Panel_silent_syn
colors: purple
tag: syn rhyme tag: syn rhyme
subtag: bot subtag: bot
link: rhyme SILENT link: rhyme SILENT
@ -6531,6 +6569,7 @@
link: rhyme BLOCKED link: rhyme BLOCKED
OBSTRUCTED: OBSTRUCTED:
id: Double Room/Panel_blocked_syn id: Double Room/Panel_blocked_syn
colors: purple
tag: syn rhyme tag: syn rhyme
subtag: bot subtag: bot
link: rhyme BLOCKED link: rhyme BLOCKED
@ -6542,6 +6581,7 @@
link: rhyme RISE link: rhyme RISE
SWELL: SWELL:
id: Double Room/Panel_rise_syn id: Double Room/Panel_rise_syn
colors: purple
tag: syn rhyme tag: syn rhyme
subtag: bot subtag: bot
link: rhyme RISE link: rhyme RISE
@ -6553,6 +6593,7 @@
link: rhyme ASCEND link: rhyme ASCEND
CLIMB: CLIMB:
id: Double Room/Panel_ascend_syn id: Double Room/Panel_ascend_syn
colors: purple
tag: syn rhyme tag: syn rhyme
subtag: bot subtag: bot
link: rhyme ASCEND link: rhyme ASCEND
@ -6564,6 +6605,7 @@
link: rhyme DOUBLE link: rhyme DOUBLE
DUPLICATE: DUPLICATE:
id: Double Room/Panel_double_syn id: Double Room/Panel_double_syn
colors: purple
tag: syn rhyme tag: syn rhyme
subtag: bot subtag: bot
link: rhyme DOUBLE link: rhyme DOUBLE
@ -6642,6 +6684,7 @@
link: rhyme CHILD link: rhyme CHILD
KID: KID:
id: Double Room/Panel_child_syn id: Double Room/Panel_child_syn
colors: purple
tag: syn rhyme tag: syn rhyme
subtag: bot subtag: bot
link: rhyme CHILD link: rhyme CHILD
@ -6653,6 +6696,7 @@
link: rhyme CRYSTAL link: rhyme CRYSTAL
QUARTZ: QUARTZ:
id: Double Room/Panel_crystal_syn id: Double Room/Panel_crystal_syn
colors: purple
tag: syn rhyme tag: syn rhyme
subtag: bot subtag: bot
link: rhyme CRYSTAL link: rhyme CRYSTAL
@ -6664,6 +6708,7 @@
link: rhyme CREATIVE link: rhyme CREATIVE
INNOVATIVE (Bottom): INNOVATIVE (Bottom):
id: Double Room/Panel_creative_syn id: Double Room/Panel_creative_syn
colors: purple
tag: syn rhyme tag: syn rhyme
subtag: bot subtag: bot
link: rhyme CREATIVE link: rhyme CREATIVE
@ -6882,7 +6927,7 @@
event: True event: True
panels: panels:
- WALL (1) - WALL (1)
Shortcut to Fifth Floor: Cellar Exit:
id: id:
- Tower Room Area Doors/Door_panel_basement - Tower Room Area Doors/Door_panel_basement
- Tower Room Area Doors/Door_panel_basement2 - Tower Room Area Doors/Door_panel_basement2
@ -6895,7 +6940,10 @@
door: Excavation door: Excavation
Orange Tower Fifth Floor: Orange Tower Fifth Floor:
room: Room Room room: Room Room
door: Shortcut to Fifth Floor door: Cellar Exit
Outside The Agreeable:
room: Outside The Agreeable
door: Lookout Entrance
Outside The Wise: Outside The Wise:
entrances: entrances:
Orange Tower Sixth Floor: Orange Tower Sixth Floor:
@ -7319,49 +7367,65 @@
link: change GRAVITY link: change GRAVITY
PART: PART:
id: Chemistry Room/Panel_physics_2 id: Chemistry Room/Panel_physics_2
colors: blue colors:
- blue
- red
tag: blue mid red bot tag: blue mid red bot
subtag: mid subtag: mid
link: xur PARTICLE link: xur PARTICLE
MATTER: MATTER:
id: Chemistry Room/Panel_physics_1 id: Chemistry Room/Panel_physics_1
colors: red colors:
- blue
- red
tag: blue mid red bot tag: blue mid red bot
subtag: bot subtag: bot
link: xur PARTICLE link: xur PARTICLE
ELECTRIC: ELECTRIC:
id: Chemistry Room/Panel_physics_6 id: Chemistry Room/Panel_physics_6
colors: purple colors:
- purple
- red
tag: purple mid red bot tag: purple mid red bot
subtag: mid subtag: mid
link: xpr ELECTRON link: xpr ELECTRON
ATOM (1): ATOM (1):
id: Chemistry Room/Panel_physics_3 id: Chemistry Room/Panel_physics_3
colors: red colors:
- purple
- red
tag: purple mid red bot tag: purple mid red bot
subtag: bot subtag: bot
link: xpr ELECTRON link: xpr ELECTRON
NEUTRAL: NEUTRAL:
id: Chemistry Room/Panel_physics_7 id: Chemistry Room/Panel_physics_7
colors: purple colors:
- purple
- red
tag: purple mid red bot tag: purple mid red bot
subtag: mid subtag: mid
link: xpr NEUTRON link: xpr NEUTRON
ATOM (2): ATOM (2):
id: Chemistry Room/Panel_physics_4 id: Chemistry Room/Panel_physics_4
colors: red colors:
- purple
- red
tag: purple mid red bot tag: purple mid red bot
subtag: bot subtag: bot
link: xpr NEUTRON link: xpr NEUTRON
PROPEL: PROPEL:
id: Chemistry Room/Panel_physics_8 id: Chemistry Room/Panel_physics_8
colors: purple colors:
- purple
- red
tag: purple mid red bot tag: purple mid red bot
subtag: mid subtag: mid
link: xpr PROTON link: xpr PROTON
ATOM (3): ATOM (3):
id: Chemistry Room/Panel_physics_5 id: Chemistry Room/Panel_physics_5
colors: red colors:
- purple
- red
tag: purple mid red bot tag: purple mid red bot
subtag: bot subtag: bot
link: xpr PROTON link: xpr PROTON

View File

@ -1064,6 +1064,9 @@ doors:
Hallway Door: Hallway Door:
item: 444459 item: 444459
location: 445214 location: 445214
Lookout Entrance:
item: 444579
location: 445271
Dread Hallway: Dread Hallway:
Tenacious Entrance: Tenacious Entrance:
item: 444462 item: 444462
@ -1402,7 +1405,7 @@ doors:
item: 444570 item: 444570
location: 445266 location: 445266
Room Room: Room Room:
Shortcut to Fifth Floor: Cellar Exit:
item: 444571 item: 444571
location: 445076 location: 445076
Outside The Wise: Outside The Wise:

View File

@ -190,6 +190,25 @@ class LingoPlayerLogic:
if item.should_include(world): if item.should_include(world):
self.real_items.append(name) self.real_items.append(name)
# Calculate the requirements for the fake pilgrimage.
fake_pilgrimage = [
["Second Room", "Exit Door"], ["Crossroads", "Tower Entrance"],
["Orange Tower Fourth Floor", "Hot Crusts Door"], ["Outside The Initiated", "Shortcut to Hub Room"],
["Orange Tower First Floor", "Shortcut to Hub Room"], ["Directional Gallery", "Shortcut to The Undeterred"],
["Orange Tower First Floor", "Salt Pepper Door"], ["Hub Room", "Crossroads Entrance"],
["Champion's Rest", "Shortcut to The Steady"], ["The Bearer", "Shortcut to The Bold"],
["Art Gallery", "Exit"], ["The Tenacious", "Shortcut to Hub Room"],
["Outside The Agreeable", "Tenacious Entrance"]
]
pilgrimage_reqs = AccessRequirements()
for door in fake_pilgrimage:
door_object = DOORS_BY_ROOM[door[0]][door[1]]
if door_object.event or world.options.shuffle_doors == ShuffleDoors.option_none:
pilgrimage_reqs.merge(self.calculate_door_requirements(door[0], door[1], world))
else:
pilgrimage_reqs.doors.add(RoomAndDoor(door[0], door[1]))
self.door_reqs.setdefault("Pilgrim Antechamber", {})["Pilgrimage"] = pilgrimage_reqs
# Create the paintings mapping, if painting shuffle is on. # Create the paintings mapping, if painting shuffle is on.
if painting_shuffle: if painting_shuffle:
# Shuffle paintings until we get something workable. # Shuffle paintings until we get something workable.
@ -369,11 +388,9 @@ class LingoPlayerLogic:
door_object = DOORS_BY_ROOM[room][door] door_object = DOORS_BY_ROOM[room][door]
for req_panel in door_object.panels: for req_panel in door_object.panels:
if req_panel.room is not None and req_panel.room != room: panel_room = room if req_panel.room is None else req_panel.room
access_reqs.rooms.add(req_panel.room) access_reqs.rooms.add(panel_room)
sub_access_reqs = self.calculate_panel_requirements(panel_room, req_panel.panel, world)
sub_access_reqs = self.calculate_panel_requirements(room if req_panel.room is None else req_panel.room,
req_panel.panel, world)
access_reqs.merge(sub_access_reqs) access_reqs.merge(sub_access_reqs)
self.door_reqs[room][door] = access_reqs self.door_reqs[room][door] = access_reqs
@ -397,8 +414,8 @@ class LingoPlayerLogic:
unhindered_panels_by_color: dict[Optional[str], int] = {} unhindered_panels_by_color: dict[Optional[str], int] = {}
for panel_name, panel_data in room_data.items(): for panel_name, panel_data in room_data.items():
# We won't count non-counting panels. # We won't count non-counting panels. THE MASTER has special access rules and is handled separately.
if panel_data.non_counting: if panel_data.non_counting or panel_name == "THE MASTER":
continue continue
# We won't coalesce any panels that have requirements beyond colors. To simplify things for now, we will # We won't coalesce any panels that have requirements beyond colors. To simplify things for now, we will

View File

@ -4,7 +4,7 @@ from BaseClasses import Entrance, ItemClassification, Region
from .items import LingoItem from .items import LingoItem
from .locations import LingoLocation from .locations import LingoLocation
from .player_logic import LingoPlayerLogic from .player_logic import LingoPlayerLogic
from .rules import lingo_can_use_entrance, lingo_can_use_pilgrimage, make_location_lambda from .rules import lingo_can_use_entrance, make_location_lambda
from .static_logic import ALL_ROOMS, PAINTINGS, Room, RoomAndDoor from .static_logic import ALL_ROOMS, PAINTINGS, Room, RoomAndDoor
if TYPE_CHECKING: if TYPE_CHECKING:
@ -25,15 +25,6 @@ def create_region(room: Room, world: "LingoWorld", player_logic: LingoPlayerLogi
return new_region return new_region
def handle_pilgrim_room(regions: Dict[str, Region], world: "LingoWorld", player_logic: LingoPlayerLogic) -> None:
target_region = regions["Pilgrim Antechamber"]
source_region = regions["Outside The Agreeable"]
source_region.connect(
target_region,
"Pilgrimage",
lambda state: lingo_can_use_pilgrimage(state, world, player_logic))
def connect_entrance(regions: Dict[str, Region], source_region: Region, target_region: Region, description: str, def connect_entrance(regions: Dict[str, Region], source_region: Region, target_region: Region, description: str,
door: Optional[RoomAndDoor], world: "LingoWorld", player_logic: LingoPlayerLogic): door: Optional[RoomAndDoor], world: "LingoWorld", player_logic: LingoPlayerLogic):
connection = Entrance(world.player, description, source_region) connection = Entrance(world.player, description, source_region)
@ -91,7 +82,9 @@ def create_regions(world: "LingoWorld", player_logic: LingoPlayerLogic) -> None:
connect_entrance(regions, regions[entrance.room], regions[room.name], entrance_name, entrance.door, world, connect_entrance(regions, regions[entrance.room], regions[room.name], entrance_name, entrance.door, world,
player_logic) player_logic)
handle_pilgrim_room(regions, world, player_logic) # Add the fake pilgrimage.
connect_entrance(regions, regions["Outside The Agreeable"], regions["Pilgrim Antechamber"], "Pilgrimage",
RoomAndDoor("Pilgrim Antechamber", "Pilgrimage"), world, player_logic)
if early_color_hallways: if early_color_hallways:
regions["Starting Room"].connect(regions["Outside The Undeterred"], "Early Color Hallways") regions["Starting Room"].connect(regions["Outside The Undeterred"], "Early Color Hallways")

View File

@ -17,23 +17,6 @@ def lingo_can_use_entrance(state: CollectionState, room: str, door: RoomAndDoor,
return _lingo_can_open_door(state, effective_room, door.door, world, player_logic) return _lingo_can_open_door(state, effective_room, door.door, world, player_logic)
def lingo_can_use_pilgrimage(state: CollectionState, world: "LingoWorld", player_logic: LingoPlayerLogic):
fake_pilgrimage = [
["Second Room", "Exit Door"], ["Crossroads", "Tower Entrance"],
["Orange Tower Fourth Floor", "Hot Crusts Door"], ["Outside The Initiated", "Shortcut to Hub Room"],
["Orange Tower First Floor", "Shortcut to Hub Room"], ["Directional Gallery", "Shortcut to The Undeterred"],
["Orange Tower First Floor", "Salt Pepper Door"], ["Hub Room", "Crossroads Entrance"],
["Champion's Rest", "Shortcut to The Steady"], ["The Bearer", "Shortcut to The Bold"],
["Art Gallery", "Exit"], ["The Tenacious", "Shortcut to Hub Room"],
["Outside The Agreeable", "Tenacious Entrance"]
]
for entrance in fake_pilgrimage:
if not _lingo_can_open_door(state, entrance[0], entrance[1], world, player_logic):
return False
return True
def lingo_can_use_location(state: CollectionState, location: PlayerLocation, world: "LingoWorld", def lingo_can_use_location(state: CollectionState, location: PlayerLocation, world: "LingoWorld",
player_logic: LingoPlayerLogic): player_logic: LingoPlayerLogic):
return _lingo_can_satisfy_requirements(state, location.access, world, player_logic) return _lingo_can_satisfy_requirements(state, location.access, world, player_logic)
@ -56,6 +39,12 @@ def lingo_can_use_level_2_location(state: CollectionState, world: "LingoWorld",
counted_panels += panel_count counted_panels += panel_count
if counted_panels >= world.options.level_2_requirement.value - 1: if counted_panels >= world.options.level_2_requirement.value - 1:
return True return True
# THE MASTER has to be handled separately, because it has special access rules.
if state.can_reach("Orange Tower Seventh Floor", "Region", world.player)\
and lingo_can_use_mastery_location(state, world, player_logic):
counted_panels += 1
if counted_panels >= world.options.level_2_requirement.value - 1:
return True
return False return False

View File

@ -40,7 +40,7 @@ mentioned_panels = Set[]
door_groups = {} door_groups = {}
directives = Set["entrances", "panels", "doors", "paintings", "progression"] directives = Set["entrances", "panels", "doors", "paintings", "progression"]
panel_directives = Set["id", "required_room", "required_door", "required_panel", "colors", "check", "exclude_reduce", "tag", "link", "subtag", "achievement", "copy_to_sign", "non_counting"] panel_directives = Set["id", "required_room", "required_door", "required_panel", "colors", "check", "exclude_reduce", "tag", "link", "subtag", "achievement", "copy_to_sign", "non_counting", "hunt"]
door_directives = Set["id", "painting_id", "panels", "item_name", "location_name", "skip_location", "skip_item", "group", "include_reduce", "junk_item", "event"] door_directives = Set["id", "painting_id", "panels", "item_name", "location_name", "skip_location", "skip_item", "group", "include_reduce", "junk_item", "event"]
painting_directives = Set["id", "enter_only", "exit_only", "orientation", "required_door", "required", "required_when_no_doors", "move", "req_blocked", "req_blocked_when_no_doors"] painting_directives = Set["id", "enter_only", "exit_only", "orientation", "required_door", "required", "required_when_no_doors", "move", "req_blocked", "req_blocked_when_no_doors"]