forked from mirror/Archipelago
New option: Choose how many ixupi captures are needed for goal completion
New option: Choose how many ixupi captures are needed for goal completion
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user