diff --git a/worlds/shivers/Options.py b/worlds/shivers/Options.py index 5a1b3211ef..3d0d03e5c3 100644 --- a/worlds/shivers/Options.py +++ b/worlds/shivers/Options.py @@ -1,7 +1,16 @@ -from Options import Choice, DefaultOnToggle, Toggle, PerGameCommonOptions +from Options import Choice, DefaultOnToggle, Toggle, PerGameCommonOptions, Range 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 @@ -51,6 +60,7 @@ class LocationPotPieces(Choice): @dataclass class ShiversOptions(PerGameCommonOptions): + ixupi_captures_needed: IxupiCapturesNeeded lobby_access: LobbyAccess puzzle_hints_required: PuzzleHintsRequired include_information_plaques: InformationPlaques diff --git a/worlds/shivers/Rules.py b/worlds/shivers/Rules.py index fdd260ca91..30991c5474 100644 --- a/worlds/shivers/Rules.py +++ b/worlds/shivers/Rules.py @@ -221,7 +221,11 @@ 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: (first_nine_ixupi_capturable(state, player) and lightning_capturable(state, player)) + 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) diff --git a/worlds/shivers/__init__.py b/worlds/shivers/__init__.py index 9f4d025370..0a1c10a20d 100644 --- a/worlds/shivers/__init__.py +++ b/worlds/shivers/__init__.py @@ -174,6 +174,7 @@ 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},