Skip to content

Commit

Permalink
Lingo: Fix entrance checking being broken on default settings (#2506)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hatkirby authored Dec 10, 2023
1 parent 01d0c05 commit d3b09bd
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 63 deletions.
6 changes: 4 additions & 2 deletions worlds/lingo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@ def create_item(self, name: str) -> Item:
classification = item.classification
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
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
# 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

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

0 comments on commit d3b09bd

Please sign in to comment.