diff --git a/worlds/witness/Options.py b/worlds/witness/Options.py index 84855bf86730..a15485c4856b 100644 --- a/worlds/witness/Options.py +++ b/worlds/witness/Options.py @@ -28,11 +28,14 @@ class ShuffleSymbols(DefaultOnToggle): display_name = "Shuffle Symbols" -class ShuffleLasers(Toggle): +class ShuffleLasers(Choice): """If on, the 11 lasers are turned into items and will activate on their own upon receiving them. Note: There is a visual bug that can occur with the Desert Laser. It does not affect gameplay - The Laser can still be redirected as normal, for both applications of redirection.""" display_name = "Shuffle Lasers" + option_off = 0 + option_local = 1 + option_anywhere = 2 class ShuffleDoors(Choice): diff --git a/worlds/witness/__init__.py b/worlds/witness/__init__.py index aeee7009cc49..b2890768c6df 100644 --- a/worlds/witness/__init__.py +++ b/worlds/witness/__init__.py @@ -6,6 +6,7 @@ from BaseClasses import Region, Location, MultiWorld, Item, Entrance, Tutorial, CollectionState from Options import PerGameCommonOptions, Toggle +from .presets import witness_option_presets from .hints import get_always_hint_locations, get_always_hint_items, get_priority_hint_locations, \ get_priority_hint_items, make_hints, generate_joke_hints from worlds.AutoWorld import World, WebWorld @@ -31,6 +32,8 @@ class WitnessWebWorld(WebWorld): ["NewSoupVi", "Jarno"] )] + options_presets = witness_option_presets + class WitnessWorld(World): """ @@ -102,14 +105,29 @@ def generate_early(self): self.log_ids_to_hints = dict() - if not (self.options.shuffle_symbols or self.options.shuffle_doors or self.options.shuffle_lasers): - if self.multiworld.players == 1: - warning(f"{self.multiworld.get_player_name(self.player)}'s Witness world doesn't have any progression" - f" items. Please turn on Symbol Shuffle, Door Shuffle or Laser Shuffle if that doesn't" - f" seem right.") - else: - raise Exception(f"{self.multiworld.get_player_name(self.player)}'s Witness world doesn't have any" - f" progression items. Please turn on Symbol Shuffle, Door Shuffle or Laser Shuffle.") + interacts_with_multiworld = ( + self.options.shuffle_symbols or + self.options.shuffle_doors or + self.options.shuffle_lasers == "anywhere" + ) + + has_progression = ( + interacts_with_multiworld + or self.options.shuffle_lasers == "local" + or self.options.shuffle_boat + or self.options.early_caves == "add_to_pool" + ) + + if not has_progression and self.multiworld.players == 1: + warning(f"{self.multiworld.get_player_name(self.player)}'s Witness world doesn't have any progression" + f" items. Please turn on Symbol Shuffle, Door Shuffle or Laser Shuffle if that doesn't seem right.") + elif not interacts_with_multiworld and self.multiworld.players > 1: + raise Exception(f"{self.multiworld.get_player_name(self.player)}'s Witness world doesn't have enough" + f" progression items that can be placed in other players' worlds. Please turn on Symbol" + f" Shuffle, Door Shuffle or non-local Laser Shuffle.") + + if self.options.shuffle_lasers == "local": + self.options.local_items.value |= self.item_name_groups["Lasers"] def create_regions(self): self.regio.create_regions(self, self.player_logic) diff --git a/worlds/witness/presets.py b/worlds/witness/presets.py new file mode 100644 index 000000000000..1fee1a7968b2 --- /dev/null +++ b/worlds/witness/presets.py @@ -0,0 +1,101 @@ +from typing import Any, Dict + +from .options import * + +witness_option_presets: Dict[str, Dict[str, Any]] = { + # Great for short syncs & scratching that "speedrun with light routing elements" itch. + "Short & Dense": { + "progression_balancing": 30, + + "puzzle_randomization": PuzzleRandomization.option_sigma_normal, + + "shuffle_symbols": False, + "shuffle_doors": ShuffleDoors.option_panels, + "door_groupings": DoorGroupings.option_off, + "shuffle_boat": True, + "shuffle_lasers": ShuffleLasers.option_local, + + "disable_non_randomized_puzzles": True, + "shuffle_discarded_panels": False, + "shuffle_vault_boxes": False, + "shuffle_EPs": ShuffleEnvironmentalPuzzles.option_off, + "EP_difficulty": EnvironmentalPuzzlesDifficulty.option_normal, + "shuffle_postgame": False, + + "victory_condition": VictoryCondition.option_mountain_box_short, + "mountain_lasers": 7, + "challenge_lasers": 11, + + "early_caves": EarlyCaves.option_off, + "elevators_come_to_you": False, + + "trap_percentage": TrapPercentage.default, + "puzzle_skip_amount": PuzzleSkipAmount.default, + "hint_amount": HintAmount.default, + "death_link": DeathLink.default, + }, + + # For relative beginners who want to move to the next step. + "Advanced, But Chill": { + "progression_balancing": 30, + + "puzzle_randomization": PuzzleRandomization.option_sigma_normal, + + "shuffle_symbols": True, + "shuffle_doors": ShuffleDoors.option_doors, + "door_groupings": DoorGroupings.option_regional, + "shuffle_boat": True, + "shuffle_lasers": ShuffleLasers.option_off, + + "disable_non_randomized_puzzles": False, + "shuffle_discarded_panels": True, + "shuffle_vault_boxes": True, + "shuffle_EPs": ShuffleEnvironmentalPuzzles.option_obelisk_sides, + "EP_difficulty": EnvironmentalPuzzlesDifficulty.option_normal, + "shuffle_postgame": False, + + "victory_condition": VictoryCondition.option_mountain_box_long, + "mountain_lasers": 6, + "challenge_lasers": 9, + + "early_caves": EarlyCaves.option_off, + "elevators_come_to_you": False, + + "trap_percentage": TrapPercentage.default, + "puzzle_skip_amount": 15, + "hint_amount": HintAmount.default, + "death_link": DeathLink.default, + }, + + # Allsanity but without the BS (no expert, no tedious EPs). + "Nice Allsanity": { + "progression_balancing": 50, + + "puzzle_randomization": PuzzleRandomization.option_sigma_normal, + + "shuffle_symbols": True, + "shuffle_doors": ShuffleDoors.option_mixed, + "door_groupings": DoorGroupings.option_off, + "shuffle_boat": True, + "shuffle_lasers": ShuffleLasers.option_anywhere, + + "disable_non_randomized_puzzles": False, + "shuffle_discarded_panels": True, + "shuffle_vault_boxes": True, + "shuffle_EPs": ShuffleEnvironmentalPuzzles.option_individual, + "EP_difficulty": EnvironmentalPuzzlesDifficulty.option_normal, + "shuffle_postgame": False, + + "victory_condition": VictoryCondition.option_challenge, + "mountain_lasers": 6, + "challenge_lasers": 9, + + "early_caves": EarlyCaves.option_off, + "elevators_come_to_you": True, + + "trap_percentage": TrapPercentage.default, + "puzzle_skip_amount": 15, + "hint_amount": HintAmount.default, + "death_link": DeathLink.default, + }, +}