diff options
| -rw-r--r-- | __init__.py | 6 | ||||
| -rw-r--r-- | data/LL1.yaml | 112 | ||||
| -rw-r--r-- | data/ids.yaml | 5 | ||||
| -rw-r--r-- | player_logic.py | 31 | ||||
| -rw-r--r-- | regions.py | 15 | ||||
| -rw-r--r-- | rules.py | 23 | ||||
| -rw-r--r-- | utils/validate_config.rb | 2 |
7 files changed, 131 insertions, 63 deletions
| diff --git a/__init__.py b/__init__.py index a8dac86..f22d344 100644 --- a/__init__.py +++ b/__init__.py | |||
| @@ -104,9 +104,11 @@ class LingoWorld(World): | |||
| 104 | classification = item.classification | 104 | classification = item.classification |
| 105 | if hasattr(self, "options") and self.options.shuffle_paintings and len(item.painting_ids) > 0\ | 105 | if hasattr(self, "options") and self.options.shuffle_paintings and len(item.painting_ids) > 0\ |
| 106 | and len(item.door_ids) == 0 and all(painting_id not in self.player_logic.painting_mapping | 106 | and len(item.door_ids) == 0 and all(painting_id not in self.player_logic.painting_mapping |
| 107 | for painting_id in item.painting_ids): | 107 | for painting_id in item.painting_ids)\ |
| 108 | and "pilgrim_painting2" not in item.painting_ids: | ||
| 108 | # If this is a "door" that just moves one or more paintings, and painting shuffle is on and those paintings | 109 | # If this is a "door" that just moves one or more paintings, and painting shuffle is on and those paintings |
| 109 | # go nowhere, then this item should not be progression. | 110 | # go nowhere, then this item should not be progression. The Pilgrim Room painting is special and needs to be |
| 111 | # excluded from this. | ||
| 110 | classification = ItemClassification.filler | 112 | classification = ItemClassification.filler |
| 111 | 113 | ||
| 112 | return LingoItem(name, classification, item.code, self.player) | 114 | return LingoItem(name, classification, item.code, self.player) |
| diff --git a/data/LL1.yaml b/data/LL1.yaml index 8a4f831..ea5886f 100644 --- a/data/LL1.yaml +++ b/data/LL1.yaml | |||
| @@ -373,6 +373,7 @@ | |||
| 373 | ANOTHER TRY: | 373 | ANOTHER TRY: |
| 374 | id: Entry Room/Panel_advance | 374 | id: Entry Room/Panel_advance |
| 375 | tag: topwhite | 375 | tag: topwhite |
| 376 | non_counting: True # This is a counting panel in-game, but it can never count towards the LEVEL 2 panel hunt. | ||
| 376 | LEVEL 2: | 377 | LEVEL 2: |
| 377 | # We will set up special rules for this in code. | 378 | # We will set up special rules for this in code. |
| 378 | id: EndPanel/Panel_level_2 | 379 | id: EndPanel/Panel_level_2 |
| @@ -1033,6 +1034,8 @@ | |||
| 1033 | Hallway Room (3): True | 1034 | Hallway Room (3): True |
| 1034 | Hallway Room (4): True | 1035 | Hallway Room (4): True |
| 1035 | Hedge Maze: True # through the door to the sectioned-off part of the hedge maze | 1036 | Hedge Maze: True # through the door to the sectioned-off part of the hedge maze |
| 1037 | Cellar: | ||
| 1038 | door: Lookout Entrance | ||
| 1036 | panels: | 1039 | panels: |
| 1037 | MASSACRED: | 1040 | MASSACRED: |
| 1038 | id: Palindrome Room/Panel_massacred_sacred | 1041 | id: Palindrome Room/Panel_massacred_sacred |
| @@ -1168,11 +1171,21 @@ | |||
| 1168 | - KEEP | 1171 | - KEEP |
| 1169 | - BAILEY | 1172 | - BAILEY |
| 1170 | - TOWER | 1173 | - TOWER |
| 1174 | Lookout Entrance: | ||
| 1175 | id: Cross Room Doors/Door_missing | ||
| 1176 | location_name: Outside The Agreeable - Lookout Panels | ||
| 1177 | panels: | ||
| 1178 | - NORTH | ||
| 1179 | - WINTER | ||
| 1180 | - DIAMONDS | ||
| 1181 | - FIRE | ||
| 1171 | paintings: | 1182 | paintings: |
| 1172 | - id: panda_painting | 1183 | - id: panda_painting |
| 1173 | orientation: south | 1184 | orientation: south |
| 1174 | - id: eyes_yellow_painting | 1185 | - id: eyes_yellow_painting |
| 1175 | orientation: east | 1186 | orientation: east |
| 1187 | - id: pencil_painting7 | ||
| 1188 | orientation: north | ||
| 1176 | progression: | 1189 | progression: |
| 1177 | Progressive Hallway Room: | 1190 | Progressive Hallway Room: |
| 1178 | - Hallway Door | 1191 | - Hallway Door |
| @@ -2043,7 +2056,7 @@ | |||
| 2043 | door: Sixth Floor | 2056 | door: Sixth Floor |
| 2044 | Cellar: | 2057 | Cellar: |
| 2045 | room: Room Room | 2058 | room: Room Room |
| 2046 | door: Shortcut to Fifth Floor | 2059 | door: Cellar Exit |
| 2047 | Welcome Back Area: | 2060 | Welcome Back Area: |
| 2048 | door: Welcome Back | 2061 | door: Welcome Back |
| 2049 | Art Gallery: | 2062 | Art Gallery: |
| @@ -2302,9 +2315,6 @@ | |||
| 2302 | id: Master Room/Panel_mastery_mastery3 | 2315 | id: Master Room/Panel_mastery_mastery3 |
| 2303 | tag: midwhite | 2316 | tag: midwhite |
| 2304 | hunt: True | 2317 | hunt: True |
| 2305 | required_door: | ||
| 2306 | room: Orange Tower Seventh Floor | ||
| 2307 | door: Mastery | ||
| 2308 | THE LIBRARY: | 2318 | THE LIBRARY: |
| 2309 | id: EndPanel/Panel_library | 2319 | id: EndPanel/Panel_library |
| 2310 | check: True | 2320 | check: True |
| @@ -2675,6 +2685,10 @@ | |||
| 2675 | Outside The Undeterred: True | 2685 | Outside The Undeterred: True |
| 2676 | Outside The Agreeable: True | 2686 | Outside The Agreeable: True |
| 2677 | Outside The Wanderer: True | 2687 | Outside The Wanderer: True |
| 2688 | The Observant: True | ||
| 2689 | Art Gallery: True | ||
| 2690 | The Scientific: True | ||
| 2691 | Cellar: True | ||
| 2678 | Orange Tower Fifth Floor: | 2692 | Orange Tower Fifth Floor: |
| 2679 | room: Orange Tower Fifth Floor | 2693 | room: Orange Tower Fifth Floor |
| 2680 | door: Welcome Back | 2694 | door: Welcome Back |
| @@ -2991,8 +3005,7 @@ | |||
| 2991 | PATS: | 3005 | PATS: |
| 2992 | id: Rhyme Room/Panel_wrath_path | 3006 | id: Rhyme Room/Panel_wrath_path |
| 2993 | colors: purple | 3007 | colors: purple |
| 2994 | tag: midpurp and rhyme | 3008 | tag: forbid |
| 2995 | copy_to_sign: sign15 | ||
| 2996 | KNIGHT: | 3009 | KNIGHT: |
| 2997 | id: Rhyme Room/Panel_knight_write | 3010 | id: Rhyme Room/Panel_knight_write |
| 2998 | colors: purple | 3011 | colors: purple |
| @@ -3158,6 +3171,8 @@ | |||
| 3158 | door: Painting Shortcut | 3171 | door: Painting Shortcut |
| 3159 | painting: True | 3172 | painting: True |
| 3160 | Room Room: True # trapdoor | 3173 | Room Room: True # trapdoor |
| 3174 | Outside The Agreeable: | ||
| 3175 | painting: True | ||
| 3161 | panels: | 3176 | panels: |
| 3162 | UNOPEN: | 3177 | UNOPEN: |
| 3163 | id: Truncate Room/Panel_unopened_open | 3178 | id: Truncate Room/Panel_unopened_open |
| @@ -6299,17 +6314,22 @@ | |||
| 6299 | SKELETON: | 6314 | SKELETON: |
| 6300 | id: Double Room/Panel_bones_syn | 6315 | id: Double Room/Panel_bones_syn |
| 6301 | tag: syn rhyme | 6316 | tag: syn rhyme |
| 6317 | colors: purple | ||
| 6302 | subtag: bot | 6318 | subtag: bot |
| 6303 | link: rhyme BONES | 6319 | link: rhyme BONES |
| 6304 | REPENTANCE: | 6320 | REPENTANCE: |
| 6305 | id: Double Room/Panel_sentence_rhyme | 6321 | id: Double Room/Panel_sentence_rhyme |
| 6306 | colors: purple | 6322 | colors: |
| 6323 | - purple | ||
| 6324 | - blue | ||
| 6307 | tag: whole rhyme | 6325 | tag: whole rhyme |
| 6308 | subtag: top | 6326 | subtag: top |
| 6309 | link: rhyme SENTENCE | 6327 | link: rhyme SENTENCE |
| 6310 | WORD: | 6328 | WORD: |
| 6311 | id: Double Room/Panel_sentence_whole | 6329 | id: Double Room/Panel_sentence_whole |
| 6312 | colors: blue | 6330 | colors: |
| 6331 | - purple | ||
| 6332 | - blue | ||
| 6313 | tag: whole rhyme | 6333 | tag: whole rhyme |
| 6314 | subtag: bot | 6334 | subtag: bot |
| 6315 | link: rhyme SENTENCE | 6335 | link: rhyme SENTENCE |
| @@ -6321,6 +6341,7 @@ | |||
| 6321 | link: rhyme DREAM | 6341 | link: rhyme DREAM |
| 6322 | FANTASY: | 6342 | FANTASY: |
| 6323 | id: Double Room/Panel_dream_syn | 6343 | id: Double Room/Panel_dream_syn |
| 6344 | colors: purple | ||
| 6324 | tag: syn rhyme | 6345 | tag: syn rhyme |
| 6325 | subtag: bot | 6346 | subtag: bot |
| 6326 | link: rhyme DREAM | 6347 | link: rhyme DREAM |
| @@ -6332,6 +6353,7 @@ | |||
| 6332 | link: rhyme MYSTERY | 6353 | link: rhyme MYSTERY |
| 6333 | SECRET: | 6354 | SECRET: |
| 6334 | id: Double Room/Panel_mystery_syn | 6355 | id: Double Room/Panel_mystery_syn |
| 6356 | colors: purple | ||
| 6335 | tag: syn rhyme | 6357 | tag: syn rhyme |
| 6336 | subtag: bot | 6358 | subtag: bot |
| 6337 | link: rhyme MYSTERY | 6359 | link: rhyme MYSTERY |
| @@ -6386,25 +6408,33 @@ | |||
| 6386 | door: Nines | 6408 | door: Nines |
| 6387 | FERN: | 6409 | FERN: |
| 6388 | id: Double Room/Panel_return_rhyme | 6410 | id: Double Room/Panel_return_rhyme |
| 6389 | colors: purple | 6411 | colors: |
| 6412 | - purple | ||
| 6413 | - black | ||
| 6390 | tag: ant rhyme | 6414 | tag: ant rhyme |
| 6391 | subtag: top | 6415 | subtag: top |
| 6392 | link: rhyme RETURN | 6416 | link: rhyme RETURN |
| 6393 | STAY: | 6417 | STAY: |
| 6394 | id: Double Room/Panel_return_ant | 6418 | id: Double Room/Panel_return_ant |
| 6395 | colors: black | 6419 | colors: |
| 6420 | - purple | ||
| 6421 | - black | ||
| 6396 | tag: ant rhyme | 6422 | tag: ant rhyme |
| 6397 | subtag: bot | 6423 | subtag: bot |
| 6398 | link: rhyme RETURN | 6424 | link: rhyme RETURN |
| 6399 | FRIEND: | 6425 | FRIEND: |
| 6400 | id: Double Room/Panel_descend_rhyme | 6426 | id: Double Room/Panel_descend_rhyme |
| 6401 | colors: purple | 6427 | colors: |
| 6428 | - purple | ||
| 6429 | - black | ||
| 6402 | tag: ant rhyme | 6430 | tag: ant rhyme |
| 6403 | subtag: top | 6431 | subtag: top |
| 6404 | link: rhyme DESCEND | 6432 | link: rhyme DESCEND |
| 6405 | RISE: | 6433 | RISE: |
| 6406 | id: Double Room/Panel_descend_ant | 6434 | id: Double Room/Panel_descend_ant |
| 6407 | colors: black | 6435 | colors: |
| 6436 | - purple | ||
| 6437 | - black | ||
| 6408 | tag: ant rhyme | 6438 | tag: ant rhyme |
| 6409 | subtag: bot | 6439 | subtag: bot |
| 6410 | link: rhyme DESCEND | 6440 | link: rhyme DESCEND |
| @@ -6416,6 +6446,7 @@ | |||
| 6416 | link: rhyme JUMP | 6446 | link: rhyme JUMP |
| 6417 | BOUNCE: | 6447 | BOUNCE: |
| 6418 | id: Double Room/Panel_jump_syn | 6448 | id: Double Room/Panel_jump_syn |
| 6449 | colors: purple | ||
| 6419 | tag: syn rhyme | 6450 | tag: syn rhyme |
| 6420 | subtag: bot | 6451 | subtag: bot |
| 6421 | link: rhyme JUMP | 6452 | link: rhyme JUMP |
| @@ -6427,6 +6458,7 @@ | |||
| 6427 | link: rhyme FALL | 6458 | link: rhyme FALL |
| 6428 | PLUNGE: | 6459 | PLUNGE: |
| 6429 | id: Double Room/Panel_fall_syn | 6460 | id: Double Room/Panel_fall_syn |
| 6461 | colors: purple | ||
| 6430 | tag: syn rhyme | 6462 | tag: syn rhyme |
| 6431 | subtag: bot | 6463 | subtag: bot |
| 6432 | link: rhyme FALL | 6464 | link: rhyme FALL |
| @@ -6456,13 +6488,17 @@ | |||
| 6456 | panels: | 6488 | panels: |
| 6457 | BIRD: | 6489 | BIRD: |
| 6458 | id: Double Room/Panel_word_rhyme | 6490 | id: Double Room/Panel_word_rhyme |
| 6459 | colors: purple | 6491 | colors: |
| 6492 | - purple | ||
| 6493 | - blue | ||
| 6460 | tag: whole rhyme | 6494 | tag: whole rhyme |
| 6461 | subtag: top | 6495 | subtag: top |
| 6462 | link: rhyme WORD | 6496 | link: rhyme WORD |
| 6463 | LETTER: | 6497 | LETTER: |
| 6464 | id: Double Room/Panel_word_whole | 6498 | id: Double Room/Panel_word_whole |
| 6465 | colors: blue | 6499 | colors: |
| 6500 | - purple | ||
| 6501 | - blue | ||
| 6466 | tag: whole rhyme | 6502 | tag: whole rhyme |
| 6467 | subtag: bot | 6503 | subtag: bot |
| 6468 | link: rhyme WORD | 6504 | link: rhyme WORD |
| @@ -6474,6 +6510,7 @@ | |||
| 6474 | link: rhyme HIDDEN | 6510 | link: rhyme HIDDEN |
| 6475 | CONCEALED: | 6511 | CONCEALED: |
| 6476 | id: Double Room/Panel_hidden_syn | 6512 | id: Double Room/Panel_hidden_syn |
| 6513 | colors: purple | ||
| 6477 | tag: syn rhyme | 6514 | tag: syn rhyme |
| 6478 | subtag: bot | 6515 | subtag: bot |
| 6479 | link: rhyme HIDDEN | 6516 | link: rhyme HIDDEN |
| @@ -6485,6 +6522,7 @@ | |||
| 6485 | link: rhyme SILENT | 6522 | link: rhyme SILENT |
| 6486 | MUTE: | 6523 | MUTE: |
| 6487 | id: Double Room/Panel_silent_syn | 6524 | id: Double Room/Panel_silent_syn |
| 6525 | colors: purple | ||
| 6488 | tag: syn rhyme | 6526 | tag: syn rhyme |
| 6489 | subtag: bot | 6527 | subtag: bot |
| 6490 | link: rhyme SILENT | 6528 | link: rhyme SILENT |
| @@ -6531,6 +6569,7 @@ | |||
| 6531 | link: rhyme BLOCKED | 6569 | link: rhyme BLOCKED |
| 6532 | OBSTRUCTED: | 6570 | OBSTRUCTED: |
| 6533 | id: Double Room/Panel_blocked_syn | 6571 | id: Double Room/Panel_blocked_syn |
| 6572 | colors: purple | ||
| 6534 | tag: syn rhyme | 6573 | tag: syn rhyme |
| 6535 | subtag: bot | 6574 | subtag: bot |
| 6536 | link: rhyme BLOCKED | 6575 | link: rhyme BLOCKED |
| @@ -6542,6 +6581,7 @@ | |||
| 6542 | link: rhyme RISE | 6581 | link: rhyme RISE |
| 6543 | SWELL: | 6582 | SWELL: |
| 6544 | id: Double Room/Panel_rise_syn | 6583 | id: Double Room/Panel_rise_syn |
| 6584 | colors: purple | ||
| 6545 | tag: syn rhyme | 6585 | tag: syn rhyme |
| 6546 | subtag: bot | 6586 | subtag: bot |
| 6547 | link: rhyme RISE | 6587 | link: rhyme RISE |
| @@ -6553,6 +6593,7 @@ | |||
| 6553 | link: rhyme ASCEND | 6593 | link: rhyme ASCEND |
| 6554 | CLIMB: | 6594 | CLIMB: |
| 6555 | id: Double Room/Panel_ascend_syn | 6595 | id: Double Room/Panel_ascend_syn |
| 6596 | colors: purple | ||
| 6556 | tag: syn rhyme | 6597 | tag: syn rhyme |
| 6557 | subtag: bot | 6598 | subtag: bot |
| 6558 | link: rhyme ASCEND | 6599 | link: rhyme ASCEND |
| @@ -6564,6 +6605,7 @@ | |||
| 6564 | link: rhyme DOUBLE | 6605 | link: rhyme DOUBLE |
| 6565 | DUPLICATE: | 6606 | DUPLICATE: |
| 6566 | id: Double Room/Panel_double_syn | 6607 | id: Double Room/Panel_double_syn |
| 6608 | colors: purple | ||
| 6567 | tag: syn rhyme | 6609 | tag: syn rhyme |
| 6568 | subtag: bot | 6610 | subtag: bot |
| 6569 | link: rhyme DOUBLE | 6611 | link: rhyme DOUBLE |
| @@ -6642,6 +6684,7 @@ | |||
| 6642 | link: rhyme CHILD | 6684 | link: rhyme CHILD |
| 6643 | KID: | 6685 | KID: |
| 6644 | id: Double Room/Panel_child_syn | 6686 | id: Double Room/Panel_child_syn |
| 6687 | colors: purple | ||
| 6645 | tag: syn rhyme | 6688 | tag: syn rhyme |
| 6646 | subtag: bot | 6689 | subtag: bot |
| 6647 | link: rhyme CHILD | 6690 | link: rhyme CHILD |
| @@ -6653,6 +6696,7 @@ | |||
| 6653 | link: rhyme CRYSTAL | 6696 | link: rhyme CRYSTAL |
| 6654 | QUARTZ: | 6697 | QUARTZ: |
| 6655 | id: Double Room/Panel_crystal_syn | 6698 | id: Double Room/Panel_crystal_syn |
| 6699 | colors: purple | ||
| 6656 | tag: syn rhyme | 6700 | tag: syn rhyme |
| 6657 | subtag: bot | 6701 | subtag: bot |
| 6658 | link: rhyme CRYSTAL | 6702 | link: rhyme CRYSTAL |
| @@ -6664,6 +6708,7 @@ | |||
| 6664 | link: rhyme CREATIVE | 6708 | link: rhyme CREATIVE |
| 6665 | INNOVATIVE (Bottom): | 6709 | INNOVATIVE (Bottom): |
| 6666 | id: Double Room/Panel_creative_syn | 6710 | id: Double Room/Panel_creative_syn |
| 6711 | colors: purple | ||
| 6667 | tag: syn rhyme | 6712 | tag: syn rhyme |
| 6668 | subtag: bot | 6713 | subtag: bot |
| 6669 | link: rhyme CREATIVE | 6714 | link: rhyme CREATIVE |
| @@ -6882,7 +6927,7 @@ | |||
| 6882 | event: True | 6927 | event: True |
| 6883 | panels: | 6928 | panels: |
| 6884 | - WALL (1) | 6929 | - WALL (1) |
| 6885 | Shortcut to Fifth Floor: | 6930 | Cellar Exit: |
| 6886 | id: | 6931 | id: |
| 6887 | - Tower Room Area Doors/Door_panel_basement | 6932 | - Tower Room Area Doors/Door_panel_basement |
| 6888 | - Tower Room Area Doors/Door_panel_basement2 | 6933 | - Tower Room Area Doors/Door_panel_basement2 |
| @@ -6895,7 +6940,10 @@ | |||
| 6895 | door: Excavation | 6940 | door: Excavation |
| 6896 | Orange Tower Fifth Floor: | 6941 | Orange Tower Fifth Floor: |
| 6897 | room: Room Room | 6942 | room: Room Room |
| 6898 | door: Shortcut to Fifth Floor | 6943 | door: Cellar Exit |
| 6944 | Outside The Agreeable: | ||
| 6945 | room: Outside The Agreeable | ||
| 6946 | door: Lookout Entrance | ||
| 6899 | Outside The Wise: | 6947 | Outside The Wise: |
| 6900 | entrances: | 6948 | entrances: |
| 6901 | Orange Tower Sixth Floor: | 6949 | Orange Tower Sixth Floor: |
| @@ -7319,49 +7367,65 @@ | |||
| 7319 | link: change GRAVITY | 7367 | link: change GRAVITY |
| 7320 | PART: | 7368 | PART: |
| 7321 | id: Chemistry Room/Panel_physics_2 | 7369 | id: Chemistry Room/Panel_physics_2 |
| 7322 | colors: blue | 7370 | colors: |
| 7371 | - blue | ||
| 7372 | - red | ||
| 7323 | tag: blue mid red bot | 7373 | tag: blue mid red bot |
| 7324 | subtag: mid | 7374 | subtag: mid |
| 7325 | link: xur PARTICLE | 7375 | link: xur PARTICLE |
| 7326 | MATTER: | 7376 | MATTER: |
| 7327 | id: Chemistry Room/Panel_physics_1 | 7377 | id: Chemistry Room/Panel_physics_1 |
| 7328 | colors: red | 7378 | colors: |
| 7379 | - blue | ||
| 7380 | - red | ||
| 7329 | tag: blue mid red bot | 7381 | tag: blue mid red bot |
| 7330 | subtag: bot | 7382 | subtag: bot |
| 7331 | link: xur PARTICLE | 7383 | link: xur PARTICLE |
| 7332 | ELECTRIC: | 7384 | ELECTRIC: |
| 7333 | id: Chemistry Room/Panel_physics_6 | 7385 | id: Chemistry Room/Panel_physics_6 |
| 7334 | colors: purple | 7386 | colors: |
| 7387 | - purple | ||
| 7388 | - red | ||
| 7335 | tag: purple mid red bot | 7389 | tag: purple mid red bot |
| 7336 | subtag: mid | 7390 | subtag: mid |
| 7337 | link: xpr ELECTRON | 7391 | link: xpr ELECTRON |
| 7338 | ATOM (1): | 7392 | ATOM (1): |
| 7339 | id: Chemistry Room/Panel_physics_3 | 7393 | id: Chemistry Room/Panel_physics_3 |
| 7340 | colors: red | 7394 | colors: |
| 7395 | - purple | ||
| 7396 | - red | ||
| 7341 | tag: purple mid red bot | 7397 | tag: purple mid red bot |
| 7342 | subtag: bot | 7398 | subtag: bot |
| 7343 | link: xpr ELECTRON | 7399 | link: xpr ELECTRON |
| 7344 | NEUTRAL: | 7400 | NEUTRAL: |
| 7345 | id: Chemistry Room/Panel_physics_7 | 7401 | id: Chemistry Room/Panel_physics_7 |
| 7346 | colors: purple | 7402 | colors: |
| 7403 | - purple | ||
| 7404 | - red | ||
| 7347 | tag: purple mid red bot | 7405 | tag: purple mid red bot |
| 7348 | subtag: mid | 7406 | subtag: mid |
| 7349 | link: xpr NEUTRON | 7407 | link: xpr NEUTRON |
| 7350 | ATOM (2): | 7408 | ATOM (2): |
| 7351 | id: Chemistry Room/Panel_physics_4 | 7409 | id: Chemistry Room/Panel_physics_4 |
| 7352 | colors: red | 7410 | colors: |
| 7411 | - purple | ||
| 7412 | - red | ||
| 7353 | tag: purple mid red bot | 7413 | tag: purple mid red bot |
| 7354 | subtag: bot | 7414 | subtag: bot |
| 7355 | link: xpr NEUTRON | 7415 | link: xpr NEUTRON |
| 7356 | PROPEL: | 7416 | PROPEL: |
| 7357 | id: Chemistry Room/Panel_physics_8 | 7417 | id: Chemistry Room/Panel_physics_8 |
| 7358 | colors: purple | 7418 | colors: |
| 7419 | - purple | ||
| 7420 | - red | ||
| 7359 | tag: purple mid red bot | 7421 | tag: purple mid red bot |
| 7360 | subtag: mid | 7422 | subtag: mid |
| 7361 | link: xpr PROTON | 7423 | link: xpr PROTON |
| 7362 | ATOM (3): | 7424 | ATOM (3): |
| 7363 | id: Chemistry Room/Panel_physics_5 | 7425 | id: Chemistry Room/Panel_physics_5 |
| 7364 | colors: red | 7426 | colors: |
| 7427 | - purple | ||
| 7428 | - red | ||
| 7365 | tag: purple mid red bot | 7429 | tag: purple mid red bot |
| 7366 | subtag: bot | 7430 | subtag: bot |
| 7367 | link: xpr PROTON | 7431 | link: xpr PROTON |
| diff --git a/data/ids.yaml b/data/ids.yaml index 1a1ceca..3239f21 100644 --- a/data/ids.yaml +++ b/data/ids.yaml | |||
| @@ -1064,6 +1064,9 @@ doors: | |||
| 1064 | Hallway Door: | 1064 | Hallway Door: |
| 1065 | item: 444459 | 1065 | item: 444459 |
| 1066 | location: 445214 | 1066 | location: 445214 |
| 1067 | Lookout Entrance: | ||
| 1068 | item: 444579 | ||
| 1069 | location: 445271 | ||
| 1067 | Dread Hallway: | 1070 | Dread Hallway: |
| 1068 | Tenacious Entrance: | 1071 | Tenacious Entrance: |
| 1069 | item: 444462 | 1072 | item: 444462 |
| @@ -1402,7 +1405,7 @@ doors: | |||
| 1402 | item: 444570 | 1405 | item: 444570 |
| 1403 | location: 445266 | 1406 | location: 445266 |
| 1404 | Room Room: | 1407 | Room Room: |
| 1405 | Shortcut to Fifth Floor: | 1408 | Cellar Exit: |
| 1406 | item: 444571 | 1409 | item: 444571 |
| 1407 | location: 445076 | 1410 | location: 445076 |
| 1408 | Outside The Wise: | 1411 | Outside The Wise: |
| 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 |
| diff --git a/regions.py b/regions.py index c24144a..bdc42f4 100644 --- a/regions.py +++ b/regions.py | |||
| @@ -4,7 +4,7 @@ from BaseClasses import Entrance, ItemClassification, Region | |||
| 4 | from .items import LingoItem | 4 | from .items import LingoItem |
| 5 | from .locations import LingoLocation | 5 | from .locations import LingoLocation |
| 6 | from .player_logic import LingoPlayerLogic | 6 | from .player_logic import LingoPlayerLogic |
| 7 | from .rules import lingo_can_use_entrance, lingo_can_use_pilgrimage, make_location_lambda | 7 | from .rules import lingo_can_use_entrance, make_location_lambda |
| 8 | from .static_logic import ALL_ROOMS, PAINTINGS, Room, RoomAndDoor | 8 | from .static_logic import ALL_ROOMS, PAINTINGS, Room, RoomAndDoor |
| 9 | 9 | ||
| 10 | if TYPE_CHECKING: | 10 | if TYPE_CHECKING: |
| @@ -25,15 +25,6 @@ def create_region(room: Room, world: "LingoWorld", player_logic: LingoPlayerLogi | |||
| 25 | return new_region | 25 | return new_region |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | def handle_pilgrim_room(regions: Dict[str, Region], world: "LingoWorld", player_logic: LingoPlayerLogic) -> None: | ||
| 29 | target_region = regions["Pilgrim Antechamber"] | ||
| 30 | source_region = regions["Outside The Agreeable"] | ||
| 31 | source_region.connect( | ||
| 32 | target_region, | ||
| 33 | "Pilgrimage", | ||
| 34 | lambda state: lingo_can_use_pilgrimage(state, world, player_logic)) | ||
| 35 | |||
| 36 | |||
| 37 | def connect_entrance(regions: Dict[str, Region], source_region: Region, target_region: Region, description: str, | 28 | def connect_entrance(regions: Dict[str, Region], source_region: Region, target_region: Region, description: str, |
| 38 | door: Optional[RoomAndDoor], world: "LingoWorld", player_logic: LingoPlayerLogic): | 29 | door: Optional[RoomAndDoor], world: "LingoWorld", player_logic: LingoPlayerLogic): |
| 39 | connection = Entrance(world.player, description, source_region) | 30 | connection = Entrance(world.player, description, source_region) |
| @@ -91,7 +82,9 @@ def create_regions(world: "LingoWorld", player_logic: LingoPlayerLogic) -> None: | |||
| 91 | connect_entrance(regions, regions[entrance.room], regions[room.name], entrance_name, entrance.door, world, | 82 | connect_entrance(regions, regions[entrance.room], regions[room.name], entrance_name, entrance.door, world, |
| 92 | player_logic) | 83 | player_logic) |
| 93 | 84 | ||
| 94 | handle_pilgrim_room(regions, world, player_logic) | 85 | # Add the fake pilgrimage. |
| 86 | connect_entrance(regions, regions["Outside The Agreeable"], regions["Pilgrim Antechamber"], "Pilgrimage", | ||
| 87 | RoomAndDoor("Pilgrim Antechamber", "Pilgrimage"), world, player_logic) | ||
| 95 | 88 | ||
| 96 | if early_color_hallways: | 89 | if early_color_hallways: |
| 97 | regions["Starting Room"].connect(regions["Outside The Undeterred"], "Early Color Hallways") | 90 | regions["Starting Room"].connect(regions["Outside The Undeterred"], "Early Color Hallways") |
| diff --git a/rules.py b/rules.py index ee9dcc4..481fab1 100644 --- a/rules.py +++ b/rules.py | |||
| @@ -17,23 +17,6 @@ def lingo_can_use_entrance(state: CollectionState, room: str, door: RoomAndDoor, | |||
| 17 | return _lingo_can_open_door(state, effective_room, door.door, world, player_logic) | 17 | return _lingo_can_open_door(state, effective_room, door.door, world, player_logic) |
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | def lingo_can_use_pilgrimage(state: CollectionState, world: "LingoWorld", player_logic: LingoPlayerLogic): | ||
| 21 | fake_pilgrimage = [ | ||
| 22 | ["Second Room", "Exit Door"], ["Crossroads", "Tower Entrance"], | ||
| 23 | ["Orange Tower Fourth Floor", "Hot Crusts Door"], ["Outside The Initiated", "Shortcut to Hub Room"], | ||
| 24 | ["Orange Tower First Floor", "Shortcut to Hub Room"], ["Directional Gallery", "Shortcut to The Undeterred"], | ||
| 25 | ["Orange Tower First Floor", "Salt Pepper Door"], ["Hub Room", "Crossroads Entrance"], | ||
| 26 | ["Champion's Rest", "Shortcut to The Steady"], ["The Bearer", "Shortcut to The Bold"], | ||
| 27 | ["Art Gallery", "Exit"], ["The Tenacious", "Shortcut to Hub Room"], | ||
| 28 | ["Outside The Agreeable", "Tenacious Entrance"] | ||
| 29 | ] | ||
| 30 | for entrance in fake_pilgrimage: | ||
| 31 | if not _lingo_can_open_door(state, entrance[0], entrance[1], world, player_logic): | ||
| 32 | return False | ||
| 33 | |||
| 34 | return True | ||
| 35 | |||
| 36 | |||
| 37 | def lingo_can_use_location(state: CollectionState, location: PlayerLocation, world: "LingoWorld", | 20 | def lingo_can_use_location(state: CollectionState, location: PlayerLocation, world: "LingoWorld", |
| 38 | player_logic: LingoPlayerLogic): | 21 | player_logic: LingoPlayerLogic): |
| 39 | return _lingo_can_satisfy_requirements(state, location.access, world, player_logic) | 22 | 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", | |||
| 56 | counted_panels += panel_count | 39 | counted_panels += panel_count |
| 57 | if counted_panels >= world.options.level_2_requirement.value - 1: | 40 | if counted_panels >= world.options.level_2_requirement.value - 1: |
| 58 | return True | 41 | return True |
| 42 | # THE MASTER has to be handled separately, because it has special access rules. | ||
| 43 | if state.can_reach("Orange Tower Seventh Floor", "Region", world.player)\ | ||
| 44 | and lingo_can_use_mastery_location(state, world, player_logic): | ||
| 45 | counted_panels += 1 | ||
| 46 | if counted_panels >= world.options.level_2_requirement.value - 1: | ||
| 47 | return True | ||
| 59 | return False | 48 | return False |
| 60 | 49 | ||
| 61 | 50 | ||
| diff --git a/utils/validate_config.rb b/utils/validate_config.rb index bed5188..3ac49dc 100644 --- a/utils/validate_config.rb +++ b/utils/validate_config.rb | |||
| @@ -40,7 +40,7 @@ mentioned_panels = Set[] | |||
| 40 | door_groups = {} | 40 | door_groups = {} |
| 41 | 41 | ||
| 42 | directives = Set["entrances", "panels", "doors", "paintings", "progression"] | 42 | directives = Set["entrances", "panels", "doors", "paintings", "progression"] |
| 43 | panel_directives = Set["id", "required_room", "required_door", "required_panel", "colors", "check", "exclude_reduce", "tag", "link", "subtag", "achievement", "copy_to_sign", "non_counting"] | 43 | panel_directives = Set["id", "required_room", "required_door", "required_panel", "colors", "check", "exclude_reduce", "tag", "link", "subtag", "achievement", "copy_to_sign", "non_counting", "hunt"] |
| 44 | door_directives = Set["id", "painting_id", "panels", "item_name", "location_name", "skip_location", "skip_item", "group", "include_reduce", "junk_item", "event"] | 44 | door_directives = Set["id", "painting_id", "panels", "item_name", "location_name", "skip_location", "skip_item", "group", "include_reduce", "junk_item", "event"] |
| 45 | painting_directives = Set["id", "enter_only", "exit_only", "orientation", "required_door", "required", "required_when_no_doors", "move", "req_blocked", "req_blocked_when_no_doors"] | 45 | painting_directives = Set["id", "enter_only", "exit_only", "orientation", "required_door", "required", "required_when_no_doors", "move", "req_blocked", "req_blocked_when_no_doors"] |
| 46 | 46 | ||
