diff options
Diffstat (limited to 'rules.py')
| -rw-r--r-- | rules.py | 23 |
1 files changed, 6 insertions, 17 deletions
| 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 | ||
