This commit is contained in:
GodlFire
2024-01-01 11:41:32 -07:00
parent 629028bd28
commit bb08c3f0c2
3 changed files with 3 additions and 35 deletions

View File

@@ -1,16 +1,7 @@
from Options import Choice, DefaultOnToggle, Toggle, PerGameCommonOptions, Range
from Options import Choice, DefaultOnToggle, Toggle, PerGameCommonOptions
from dataclasses import dataclass
class IxupiCapturesNeeded(Range):
"""
Number of Ixupi Captures needed for goal condition.
"""
display_name = "Number of Ixupi Captures Needed"
range_start = 1
range_end = 10
default = 10
class LobbyAccess(Choice):
"""Chooses how keys needed to reach the lobby are placed.
- Normal: Keys are placed anywhere
@@ -47,20 +38,9 @@ class EarlyLightning(Toggle):
"""Allows lightning to be captured at any point in the game. You will still need to capture all ten Ixupi for victory."""
display_name = "Early Lightning"
class LocationPotPieces(Choice):
"""Chooses where pot pieces will be located within the multiworld.
- Own World: Pot pieces will be located within your own world
- Different World: Pot pieces will be located in another world
- Any World: Pot pieces will be located in any world"""
display_name = "Location of Pot Pieces"
option_own_world = 0
option_different_world = 1
option_any_world = 2
@dataclass
class ShiversOptions(PerGameCommonOptions):
ixupi_captures_needed: IxupiCapturesNeeded
lobby_access: LobbyAccess
puzzle_hints_required: PuzzleHintsRequired
include_information_plaques: InformationPlaques
@@ -68,4 +48,3 @@ class ShiversOptions(PerGameCommonOptions):
elevators_stay_solved: ElevatorsStaySolved
early_beth: EarlyBeth
early_lightning: EarlyLightning
location_pot_pieces: LocationPotPieces

View File

@@ -157,7 +157,7 @@ def get_rules_lookup(player: int):
"Puzzle Solved Underground Elevator": lambda state: ((state.can_reach("Underground Lake", "Region", player) or state.can_reach("Office", "Region", player)
and state.has("Key for Office Elevator", player))),
"Puzzle Solved Bedroom Elevator": lambda state: (state.can_reach("Office", "Region", player) and state.has_all({"Key for Bedroom Elevator","Crawling"}, player)),
"Puzzle Solved Three Floor Elevator": lambda state: (((state.can_reach("Maintenance Tunnels", "Region", player) or state.can_reach("Blue Maze", "Region", player))
"Puzzle Solved Three Floor Elevator": lambda state: ((state.can_reach("Maintenance Tunnels", "Region", player) or state.can_reach("Blue Maze", "Region", player)
and state.has("Key for Three Floor Elevator", player)))
},
"lightning": {
@@ -221,11 +221,7 @@ def set_rules(world: "ShiversWorld") -> None:
forbid_item(multiworld.get_location("Ixupi Captured Metal", player), "Metal Always Available in Prehistoric", player)
# Set completion condition
multiworld.completion_condition[player] = lambda state: ((
water_capturable(state, player) + wax_capturable(state, player) + ash_capturable(state, player) \
+ oil_capturable(state, player) + cloth_capturable(state, player) + wood_capturable(state, player) \
+ crystal_capturable(state, player) + sand_capturable(state, player) + metal_capturable(state, player) \
+ lightning_capturable(state, player)) >= world.options.ixupi_captures_needed.value)
multiworld.completion_condition[player] = lambda state: (first_nine_ixupi_capturable(state, player) and lightning_capturable(state, player))

View File

@@ -138,12 +138,6 @@ class ShiversWorld(World):
elif lobby_access_keys == 2:
self.multiworld.local_early_items[self.player]["Key for Front Door"] = 1
#Pot piece shuffle location:
if self.options.location_pot_pieces == 0:
self.multiworld.local_items[self.player].value.update({name for name, data in item_table.items() if data.type == "pot"})
if self.options.location_pot_pieces == 1:
self.multiworld.non_local_items[self.player].value.update({name for name, data in item_table.items() if data.type == "pot"})
def pre_fill(self) -> None:
# Prefills event storage locations with duplicate pots
storagelocs = []
@@ -174,7 +168,6 @@ class ShiversWorld(World):
return {
"storageplacements": self.storage_placements,
"excludedlocations": {str(excluded_location).replace('ExcludeLocations(', '').replace(')', '') for excluded_location in self.multiworld.exclude_locations.values()},
"ixupicapturesneeded": {self.options.ixupi_captures_needed.value},
"elevatorsstaysolved": {self.options.elevators_stay_solved.value},
"earlybeth": {self.options.early_beth.value},
"earlylightning": {self.options.early_lightning.value},