diff --git a/worlds/outer_wilds/__init__.py b/worlds/outer_wilds/__init__.py index 203859bd0910..510bbc663787 100644 --- a/worlds/outer_wilds/__init__.py +++ b/worlds/outer_wilds/__init__.py @@ -45,12 +45,16 @@ def interpret_slot_data(slot_data: Dict[str, Any]) -> Dict[str, Any]: return slot_data def generate_early(self) -> None: - # apply options that edit other options + # apply options that edit other options or themselves if self.options.dlc_only: self.options.enable_eote_dlc = EnableEchoesOfTheEyeDLC(1) self.options.spawn = Spawn(Spawn.option_stranger) self.options.goal = Goal(Goal.option_echoes_of_the_eye) + if self.options.spawn == Spawn.option_random_non_vanilla: + max_spawn = Spawn.option_stranger if self.options.enable_eote_dlc else Spawn.option_giants_deep + self.options.spawn = Spawn(self.random.choice(range(Spawn.option_hourglass_twins, max_spawn))) + # validate options if not self.options.enable_eote_dlc: if self.options.spawn == Spawn.option_stranger: diff --git a/worlds/outer_wilds/options.py b/worlds/outer_wilds/options.py index f312421e3cea..d72c1a8ead88 100644 --- a/worlds/outer_wilds/options.py +++ b/worlds/outer_wilds/options.py @@ -1,5 +1,6 @@ from dataclasses import dataclass +import random from schema import Schema, And from typing import Set @@ -127,6 +128,7 @@ class Spawn(Choice): option_brittle_hollow = 3 option_giants_deep = 4 option_stranger = 5 + option_random_non_vanilla = 6 default = 0 diff --git a/worlds/outer_wilds/test/test_spawns_and_warps.py b/worlds/outer_wilds/test/test_spawns_and_warps.py index f460adc153b1..50535b96da51 100644 --- a/worlds/outer_wilds/test/test_spawns_and_warps.py +++ b/worlds/outer_wilds/test/test_spawns_and_warps.py @@ -90,3 +90,15 @@ class TestStrangerSpawnSLMEKI(OuterWildsTestBase): "early_key_item": EarlyKeyItem.option_stranger_light_modulator, } + +class TestRandomNonVanillaSpawn(OuterWildsTestBase): + options = { + "spawn": Spawn.option_random_non_vanilla, + } + + +class TestRandomNonVanillaSpawnWithDLC(OuterWildsTestBase): + options = { + "enable_eote_dlc": True, + "spawn": Spawn.option_random_non_vanilla, + }