Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shivers: Adds missing logic rule for skull dial door location #2997

Merged
merged 3 commits into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions worlds/shivers/Rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ def first_nine_ixupi_capturable(state: CollectionState, player: int) -> bool:
and metal_capturable(state, player)


def all_skull_dials_available(state: CollectionState, player: int) -> bool:
return state.can_reach("Prehistoric", "Region", player) and state.can_reach("Tar River", "Region", player) \
and state.can_reach("Egypt", "Region", player) and state.can_reach("Burial", "Region", player) \
and state.can_reach("Gods Room", "Region", player) and state.can_reach("Werewolf", "Region", player)


def get_rules_lookup(player: int):
rules_lookup: Dict[str, List[Callable[[CollectionState], bool]]] = {
"entrances": {
Expand Down Expand Up @@ -116,10 +122,7 @@ def get_rules_lookup(player: int):
"To Tar River From Lobby": lambda state: (state.has("Crawling", player) and oil_capturable(state, player) and state.can_reach("Tar River", "Region", player)),
"To Burial From Egypt": lambda state: state.can_reach("Egypt", "Region", player),
"To Gods Room From Anansi": lambda state: state.can_reach("Gods Room", "Region", player),
"To Slide Room": lambda state: (
state.can_reach("Prehistoric", "Region", player) and state.can_reach("Tar River", "Region",player) and
state.can_reach("Egypt", "Region", player) and state.can_reach("Burial", "Region", player) and
state.can_reach("Gods Room", "Region", player) and state.can_reach("Werewolf", "Region", player)),
"To Slide Room": lambda state: all_skull_dials_available(state, player),
"To Lobby From Slide Room": lambda state: (beths_body_available(state, player))
},
"locations_required": {
Expand All @@ -141,6 +144,7 @@ def get_rules_lookup(player: int):
"Final Riddle: Norse God Stone Message": lambda state: (state.can_reach("Fortune Teller", "Region", player) and state.can_reach("UFO", "Region", player)),
"Final Riddle: Beth's Body Page 17": lambda state: beths_body_available(state, player),
"Final Riddle: Guillotine Dropped": lambda state: beths_body_available(state, player),
"Puzzle Solved Skull Dial Door": lambda state: all_skull_dials_available(state, player),
},
"locations_puzzle_hints": {
"Puzzle Solved Clock Tower Door": lambda state: state.can_reach("Three Floor Elevator", "Region", player),
Expand Down
Loading