The Witness: Change all option name comparisons to strings instead of numeric values (#2503)
* Refactor postgame code to be more readable * Change all references to options to strings * oops * Fix some outdated code related to yaml-disabled EPs * Small fixes to short/longbox stuff (thanks Medic) * comment * fix duplicate * Removed triplicate lmfao * Better comment * added another 'unfun' postgame consideration * comment * more option strings * oops * Remove an unnecessary comparison * another string missed * Another was missed * This would create a really bad merge error
This commit is contained in:
parent
77c326cb81
commit
a6deffb9f2
|
@ -161,7 +161,7 @@ class WitnessWorld(World):
|
||||||
early_items = [item for item in self.items.get_early_items() if item in self.items.get_mandatory_items()]
|
early_items = [item for item in self.items.get_early_items() if item in self.items.get_mandatory_items()]
|
||||||
if early_items:
|
if early_items:
|
||||||
random_early_item = self.random.choice(early_items)
|
random_early_item = self.random.choice(early_items)
|
||||||
if self.options.puzzle_randomization == 1:
|
if self.options.puzzle_randomization == "sigma_expert":
|
||||||
# In Expert, only tag the item as early, rather than forcing it onto the gate.
|
# In Expert, only tag the item as early, rather than forcing it onto the gate.
|
||||||
self.multiworld.local_early_items[self.player][random_early_item] = 1
|
self.multiworld.local_early_items[self.player][random_early_item] = 1
|
||||||
else:
|
else:
|
||||||
|
@ -184,7 +184,7 @@ class WitnessWorld(World):
|
||||||
# Adjust the needed size for sphere 1 based on how restrictive the settings are in terms of items
|
# Adjust the needed size for sphere 1 based on how restrictive the settings are in terms of items
|
||||||
|
|
||||||
needed_size = 3
|
needed_size = 3
|
||||||
needed_size += self.options.puzzle_randomization == 1
|
needed_size += self.options.puzzle_randomization == "sigma_expert"
|
||||||
needed_size += self.options.shuffle_symbols
|
needed_size += self.options.shuffle_symbols
|
||||||
needed_size += self.options.shuffle_doors > 0
|
needed_size += self.options.shuffle_doors > 0
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ class WitnessWorld(World):
|
||||||
|
|
||||||
audio_logs = get_audio_logs().copy()
|
audio_logs = get_audio_logs().copy()
|
||||||
|
|
||||||
if hint_amount != 0:
|
if hint_amount:
|
||||||
generated_hints = make_hints(self, hint_amount, self.own_itempool)
|
generated_hints = make_hints(self, hint_amount, self.own_itempool)
|
||||||
|
|
||||||
self.random.shuffle(audio_logs)
|
self.random.shuffle(audio_logs)
|
||||||
|
|
|
@ -176,15 +176,15 @@ def get_always_hint_items(world: "WitnessWorld") -> List[str]:
|
||||||
wincon = world.options.victory_condition
|
wincon = world.options.victory_condition
|
||||||
|
|
||||||
if discards:
|
if discards:
|
||||||
if difficulty == 1:
|
if difficulty == "sigma_expert":
|
||||||
always.append("Arrows")
|
always.append("Arrows")
|
||||||
else:
|
else:
|
||||||
always.append("Triangles")
|
always.append("Triangles")
|
||||||
|
|
||||||
if wincon == 0:
|
if wincon == "elevator":
|
||||||
always += ["Mountain Bottom Floor Final Room Entry (Door)", "Mountain Bottom Floor Doors"]
|
always += ["Mountain Bottom Floor Final Room Entry (Door)", "Mountain Bottom Floor Doors"]
|
||||||
|
|
||||||
if wincon == 1:
|
if wincon == "challenge":
|
||||||
always += ["Challenge Entry (Panel)", "Caves Panels"]
|
always += ["Challenge Entry (Panel)", "Caves Panels"]
|
||||||
|
|
||||||
return always
|
return always
|
||||||
|
|
|
@ -228,7 +228,7 @@ class WitnessPlayerItems:
|
||||||
output = {"Dots", "Black/White Squares", "Symmetry", "Shapers", "Stars"}
|
output = {"Dots", "Black/White Squares", "Symmetry", "Shapers", "Stars"}
|
||||||
|
|
||||||
if self._world.options.shuffle_discarded_panels:
|
if self._world.options.shuffle_discarded_panels:
|
||||||
if self._world.options.puzzle_randomization == 1:
|
if self._world.options.puzzle_randomization == "sigma_expert":
|
||||||
output.add("Arrows")
|
output.add("Arrows")
|
||||||
else:
|
else:
|
||||||
output.add("Triangles")
|
output.add("Triangles")
|
||||||
|
|
|
@ -509,9 +509,9 @@ class WitnessPlayerLocations:
|
||||||
if world.options.shuffle_vault_boxes:
|
if world.options.shuffle_vault_boxes:
|
||||||
self.PANEL_TYPES_TO_SHUFFLE.add("Vault")
|
self.PANEL_TYPES_TO_SHUFFLE.add("Vault")
|
||||||
|
|
||||||
if world.options.shuffle_EPs == 1:
|
if world.options.shuffle_EPs == "individual":
|
||||||
self.PANEL_TYPES_TO_SHUFFLE.add("EP")
|
self.PANEL_TYPES_TO_SHUFFLE.add("EP")
|
||||||
elif world.options.shuffle_EPs == 2:
|
elif world.options.shuffle_EPs == "obelisk_sides":
|
||||||
self.PANEL_TYPES_TO_SHUFFLE.add("Obelisk Side")
|
self.PANEL_TYPES_TO_SHUFFLE.add("Obelisk Side")
|
||||||
|
|
||||||
for obelisk_loc in StaticWitnessLocations.OBELISK_SIDES:
|
for obelisk_loc in StaticWitnessLocations.OBELISK_SIDES:
|
||||||
|
|
|
@ -253,51 +253,101 @@ class WitnessPlayerLogic:
|
||||||
line = self.REFERENCE_LOGIC.ENTITIES_BY_HEX[line]["checkName"]
|
line = self.REFERENCE_LOGIC.ENTITIES_BY_HEX[line]["checkName"]
|
||||||
self.ADDED_CHECKS.add(line)
|
self.ADDED_CHECKS.add(line)
|
||||||
|
|
||||||
def make_options_adjustments(self, world: "WitnessWorld"):
|
@staticmethod
|
||||||
"""Makes logic adjustments based on options"""
|
def handle_postgame(world: "WitnessWorld"):
|
||||||
adjustment_linesets_in_order = []
|
# In shuffle_postgame, panels that become accessible "after or at the same time as the goal" are disabled.
|
||||||
|
# This has a lot of complicated considerations, which I'll try my best to explain.
|
||||||
|
postgame_adjustments = []
|
||||||
|
|
||||||
# Postgame
|
# Make some quick references to some options
|
||||||
|
doors = world.options.shuffle_doors >= 2 # "Panels" mode has no overarching region accessibility implications.
|
||||||
doors = world.options.shuffle_doors >= 2
|
early_caves = world.options.early_caves
|
||||||
lasers = world.options.shuffle_lasers
|
|
||||||
early_caves = world.options.early_caves > 0
|
|
||||||
victory = world.options.victory_condition
|
victory = world.options.victory_condition
|
||||||
mnt_lasers = world.options.mountain_lasers
|
mnt_lasers = world.options.mountain_lasers
|
||||||
chal_lasers = world.options.challenge_lasers
|
chal_lasers = world.options.challenge_lasers
|
||||||
|
|
||||||
mountain_enterable_from_top = victory == 0 or victory == 1 or (victory == 3 and chal_lasers > mnt_lasers)
|
# Goal is "short box" but short box requires more lasers than long box
|
||||||
|
reverse_shortbox_goal = victory == "mountain_box_short" and mnt_lasers > chal_lasers
|
||||||
|
|
||||||
if not world.options.shuffle_postgame:
|
# Goal is "short box", and long box requires at least as many lasers as short box (as god intended)
|
||||||
|
proper_shortbox_goal = victory == "mountain_box_short" and chal_lasers >= mnt_lasers
|
||||||
|
|
||||||
|
# Goal is "long box", but short box requires at least as many lasers than long box.
|
||||||
|
reverse_longbox_goal = victory == "mountain_box_long" and mnt_lasers >= chal_lasers
|
||||||
|
|
||||||
|
# If goal is shortbox or "reverse longbox", you will never enter the mountain from the top before winning.
|
||||||
|
mountain_enterable_from_top = not (victory == "mountain_box_short" or reverse_longbox_goal)
|
||||||
|
|
||||||
|
# Caves & Challenge should never have anything if doors are vanilla - definitionally "post-game"
|
||||||
|
# This is technically imprecise, but it matches player expectations better.
|
||||||
if not (early_caves or doors):
|
if not (early_caves or doors):
|
||||||
adjustment_linesets_in_order.append(get_caves_exclusion_list())
|
postgame_adjustments.append(get_caves_exclusion_list())
|
||||||
if not victory == 1:
|
postgame_adjustments.append(get_beyond_challenge_exclusion_list())
|
||||||
adjustment_linesets_in_order.append(get_path_to_challenge_exclusion_list())
|
|
||||||
adjustment_linesets_in_order.append(get_challenge_vault_box_exclusion_list())
|
|
||||||
adjustment_linesets_in_order.append(get_beyond_challenge_exclusion_list())
|
|
||||||
|
|
||||||
if not ((doors or early_caves) and (victory == 0 or (victory == 2 and mnt_lasers > chal_lasers))):
|
# If Challenge is the goal, some panels on the way need to be left on, as well as Challenge Vault box itself
|
||||||
adjustment_linesets_in_order.append(get_beyond_challenge_exclusion_list())
|
if not victory == "challenge":
|
||||||
if not victory == 1:
|
postgame_adjustments.append(get_path_to_challenge_exclusion_list())
|
||||||
adjustment_linesets_in_order.append(get_challenge_vault_box_exclusion_list())
|
postgame_adjustments.append(get_challenge_vault_box_exclusion_list())
|
||||||
|
|
||||||
if not (doors or mountain_enterable_from_top):
|
# Challenge can only have something if the goal is not challenge or longbox itself.
|
||||||
adjustment_linesets_in_order.append(get_mountain_lower_exclusion_list())
|
# In case of shortbox, it'd have to be a "reverse shortbox" situation where shortbox requires *more* lasers.
|
||||||
|
# In that case, it'd also have to be a doors mode, but that's already covered by the previous block.
|
||||||
|
if not (victory == "elevator" or reverse_shortbox_goal):
|
||||||
|
postgame_adjustments.append(get_beyond_challenge_exclusion_list())
|
||||||
|
if not victory == "challenge":
|
||||||
|
postgame_adjustments.append(get_challenge_vault_box_exclusion_list())
|
||||||
|
|
||||||
|
# Mountain can't be reached if the goal is shortbox (or "reverse long box")
|
||||||
if not mountain_enterable_from_top:
|
if not mountain_enterable_from_top:
|
||||||
adjustment_linesets_in_order.append(get_mountain_upper_exclusion_list())
|
postgame_adjustments.append(get_mountain_upper_exclusion_list())
|
||||||
|
|
||||||
if not ((victory == 0 and doors) or victory == 1 or (victory == 2 and mnt_lasers > chal_lasers and doors)):
|
# Same goes for lower mountain, but that one *can* be reached in remote doors modes.
|
||||||
|
if not doors:
|
||||||
|
postgame_adjustments.append(get_mountain_lower_exclusion_list())
|
||||||
|
|
||||||
|
# The Mountain Bottom Floor Discard is a bit complicated, so we handle it separately. ("it" == the Discard)
|
||||||
|
# In Elevator Goal, it is definitionally in the post-game, unless remote doors is played.
|
||||||
|
# In Challenge Goal, it is before the Challenge, so it is not post-game.
|
||||||
|
# In Short Box Goal, you can win before turning it on, UNLESS Short Box requires MORE lasers than long box.
|
||||||
|
# In Long Box Goal, it is always in the post-game because solving long box is what turns it on.
|
||||||
|
if not ((victory == "elevator" and doors) or victory == "challenge" or (reverse_shortbox_goal and doors)):
|
||||||
|
# We now know Bottom Floor Discard is in the post-game.
|
||||||
|
# This has different consequences depending on whether remote doors is being played.
|
||||||
|
# If doors are vanilla, Bottom Floor Discard locks a door to an area, which has to be disabled as well.
|
||||||
if doors:
|
if doors:
|
||||||
adjustment_linesets_in_order.append(get_bottom_floor_discard_exclusion_list())
|
postgame_adjustments.append(get_bottom_floor_discard_exclusion_list())
|
||||||
else:
|
else:
|
||||||
adjustment_linesets_in_order.append(get_bottom_floor_discard_nondoors_exclusion_list())
|
postgame_adjustments.append(get_bottom_floor_discard_nondoors_exclusion_list())
|
||||||
|
|
||||||
if victory == 2 and chal_lasers >= mnt_lasers:
|
# In Challenge goal + early_caves + vanilla doors, you could find something important on Bottom Floor Discard,
|
||||||
adjustment_linesets_in_order.append(["Disabled Locations:", "0xFFF00 (Mountain Box Long)"])
|
# including the Caves Shortcuts themselves if playing "early_caves: start_inventory".
|
||||||
|
# This is another thing that was deemed "unfun" more than fitting the actual definition of post-game.
|
||||||
|
if victory == "challenge" and early_caves and not doors:
|
||||||
|
postgame_adjustments.append(get_bottom_floor_discard_nondoors_exclusion_list())
|
||||||
|
|
||||||
|
# If we have a proper short box goal, long box will never be activated first.
|
||||||
|
if proper_shortbox_goal:
|
||||||
|
postgame_adjustments.append(["Disabled Locations:", "0xFFF00 (Mountain Box Long)"])
|
||||||
|
|
||||||
|
return postgame_adjustments
|
||||||
|
|
||||||
|
def make_options_adjustments(self, world: "WitnessWorld"):
|
||||||
|
"""Makes logic adjustments based on options"""
|
||||||
|
adjustment_linesets_in_order = []
|
||||||
|
|
||||||
|
# Make condensed references to some options
|
||||||
|
|
||||||
|
doors = world.options.shuffle_doors >= 2 # "Panels" mode has no overarching region accessibility implications.
|
||||||
|
lasers = world.options.shuffle_lasers
|
||||||
|
victory = world.options.victory_condition
|
||||||
|
mnt_lasers = world.options.mountain_lasers
|
||||||
|
chal_lasers = world.options.challenge_lasers
|
||||||
|
|
||||||
|
# Exclude panels from the post-game if shuffle_postgame is false.
|
||||||
|
if not world.options.shuffle_postgame:
|
||||||
|
adjustment_linesets_in_order += self.handle_postgame(world)
|
||||||
|
|
||||||
# Exclude Discards / Vaults
|
# Exclude Discards / Vaults
|
||||||
|
|
||||||
if not world.options.shuffle_discarded_panels:
|
if not world.options.shuffle_discarded_panels:
|
||||||
# In disable_non_randomized, the discards are needed for alternate activation triggers, UNLESS both
|
# In disable_non_randomized, the discards are needed for alternate activation triggers, UNLESS both
|
||||||
# (remote) doors and lasers are shuffled.
|
# (remote) doors and lasers are shuffled.
|
||||||
|
@ -309,18 +359,18 @@ class WitnessPlayerLogic:
|
||||||
|
|
||||||
if not world.options.shuffle_vault_boxes:
|
if not world.options.shuffle_vault_boxes:
|
||||||
adjustment_linesets_in_order.append(get_vault_exclusion_list())
|
adjustment_linesets_in_order.append(get_vault_exclusion_list())
|
||||||
if not victory == 1:
|
if not victory == "challenge":
|
||||||
adjustment_linesets_in_order.append(get_challenge_vault_box_exclusion_list())
|
adjustment_linesets_in_order.append(get_challenge_vault_box_exclusion_list())
|
||||||
|
|
||||||
# Victory Condition
|
# Victory Condition
|
||||||
|
|
||||||
if victory == 0:
|
if victory == "elevator":
|
||||||
self.VICTORY_LOCATION = "0x3D9A9"
|
self.VICTORY_LOCATION = "0x3D9A9"
|
||||||
elif victory == 1:
|
elif victory == "challenge":
|
||||||
self.VICTORY_LOCATION = "0x0356B"
|
self.VICTORY_LOCATION = "0x0356B"
|
||||||
elif victory == 2:
|
elif victory == "mountain_box_short":
|
||||||
self.VICTORY_LOCATION = "0x09F7F"
|
self.VICTORY_LOCATION = "0x09F7F"
|
||||||
elif victory == 3:
|
elif victory == "mountain_box_long":
|
||||||
self.VICTORY_LOCATION = "0xFFF00"
|
self.VICTORY_LOCATION = "0xFFF00"
|
||||||
|
|
||||||
# Long box can usually only be solved by opening Mountain Entry. However, if it requires 7 lasers or less
|
# Long box can usually only be solved by opening Mountain Entry. However, if it requires 7 lasers or less
|
||||||
|
@ -338,36 +388,36 @@ class WitnessPlayerLogic:
|
||||||
if world.options.shuffle_symbols:
|
if world.options.shuffle_symbols:
|
||||||
adjustment_linesets_in_order.append(get_symbol_shuffle_list())
|
adjustment_linesets_in_order.append(get_symbol_shuffle_list())
|
||||||
|
|
||||||
if world.options.EP_difficulty == 0:
|
if world.options.EP_difficulty == "normal":
|
||||||
adjustment_linesets_in_order.append(get_ep_easy())
|
adjustment_linesets_in_order.append(get_ep_easy())
|
||||||
elif world.options.EP_difficulty == 1:
|
elif world.options.EP_difficulty == "tedious":
|
||||||
adjustment_linesets_in_order.append(get_ep_no_eclipse())
|
adjustment_linesets_in_order.append(get_ep_no_eclipse())
|
||||||
|
|
||||||
if world.options.door_groupings == 1:
|
if world.options.door_groupings == "regional":
|
||||||
if world.options.shuffle_doors == 1:
|
if world.options.shuffle_doors == "panels":
|
||||||
adjustment_linesets_in_order.append(get_simple_panels())
|
adjustment_linesets_in_order.append(get_simple_panels())
|
||||||
elif world.options.shuffle_doors == 2:
|
elif world.options.shuffle_doors == "doors":
|
||||||
adjustment_linesets_in_order.append(get_simple_doors())
|
adjustment_linesets_in_order.append(get_simple_doors())
|
||||||
elif world.options.shuffle_doors == 3:
|
elif world.options.shuffle_doors == "mixed":
|
||||||
adjustment_linesets_in_order.append(get_simple_doors())
|
adjustment_linesets_in_order.append(get_simple_doors())
|
||||||
adjustment_linesets_in_order.append(get_simple_additional_panels())
|
adjustment_linesets_in_order.append(get_simple_additional_panels())
|
||||||
else:
|
else:
|
||||||
if world.options.shuffle_doors == 1:
|
if world.options.shuffle_doors == "panels":
|
||||||
adjustment_linesets_in_order.append(get_complex_door_panels())
|
adjustment_linesets_in_order.append(get_complex_door_panels())
|
||||||
adjustment_linesets_in_order.append(get_complex_additional_panels())
|
adjustment_linesets_in_order.append(get_complex_additional_panels())
|
||||||
elif world.options.shuffle_doors == 2:
|
elif world.options.shuffle_doors == "doors":
|
||||||
adjustment_linesets_in_order.append(get_complex_doors())
|
adjustment_linesets_in_order.append(get_complex_doors())
|
||||||
elif world.options.shuffle_doors == 3:
|
elif world.options.shuffle_doors == "mixed":
|
||||||
adjustment_linesets_in_order.append(get_complex_doors())
|
adjustment_linesets_in_order.append(get_complex_doors())
|
||||||
adjustment_linesets_in_order.append(get_complex_additional_panels())
|
adjustment_linesets_in_order.append(get_complex_additional_panels())
|
||||||
|
|
||||||
if world.options.shuffle_boat:
|
if world.options.shuffle_boat:
|
||||||
adjustment_linesets_in_order.append(get_boat())
|
adjustment_linesets_in_order.append(get_boat())
|
||||||
|
|
||||||
if world.options.early_caves == 2:
|
if world.options.early_caves == "starting_inventory":
|
||||||
adjustment_linesets_in_order.append(get_early_caves_start_list())
|
adjustment_linesets_in_order.append(get_early_caves_start_list())
|
||||||
|
|
||||||
if world.options.early_caves == 1 and not doors:
|
if world.options.early_caves == "add_to_pool" and not doors:
|
||||||
adjustment_linesets_in_order.append(get_early_caves_list())
|
adjustment_linesets_in_order.append(get_early_caves_list())
|
||||||
|
|
||||||
if world.options.elevators_come_to_you:
|
if world.options.elevators_come_to_you:
|
||||||
|
@ -391,25 +441,21 @@ class WitnessPlayerLogic:
|
||||||
else:
|
else:
|
||||||
adjustment_linesets_in_order.append(["Disabled Locations:"] + get_ep_obelisks()[1:])
|
adjustment_linesets_in_order.append(["Disabled Locations:"] + get_ep_obelisks()[1:])
|
||||||
|
|
||||||
if world.options.shuffle_EPs == 0:
|
if not world.options.shuffle_EPs:
|
||||||
adjustment_linesets_in_order.append(["Irrelevant Locations:"] + get_ep_all_individual()[1:])
|
adjustment_linesets_in_order.append(["Irrelevant Locations:"] + get_ep_all_individual()[1:])
|
||||||
|
|
||||||
yaml_disabled_eps = []
|
|
||||||
|
|
||||||
for yaml_disabled_location in self.YAML_DISABLED_LOCATIONS:
|
for yaml_disabled_location in self.YAML_DISABLED_LOCATIONS:
|
||||||
if yaml_disabled_location not in self.REFERENCE_LOGIC.ENTITIES_BY_NAME:
|
if yaml_disabled_location not in self.REFERENCE_LOGIC.ENTITIES_BY_NAME:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
loc_obj = self.REFERENCE_LOGIC.ENTITIES_BY_NAME[yaml_disabled_location]
|
loc_obj = self.REFERENCE_LOGIC.ENTITIES_BY_NAME[yaml_disabled_location]
|
||||||
|
|
||||||
if loc_obj["entityType"] == "EP" and world.options.shuffle_EPs != 0:
|
if loc_obj["entityType"] == "EP":
|
||||||
yaml_disabled_eps.append(loc_obj["entity_hex"])
|
self.COMPLETELY_DISABLED_ENTITIES.add(loc_obj["entity_hex"])
|
||||||
|
|
||||||
if loc_obj["entityType"] in {"EP", "General", "Vault", "Discard"}:
|
elif loc_obj["entityType"] in {"General", "Vault", "Discard"}:
|
||||||
self.EXCLUDED_LOCATIONS.add(loc_obj["entity_hex"])
|
self.EXCLUDED_LOCATIONS.add(loc_obj["entity_hex"])
|
||||||
|
|
||||||
adjustment_linesets_in_order.append(["Disabled Locations:"] + yaml_disabled_eps)
|
|
||||||
|
|
||||||
for adjustment_lineset in adjustment_linesets_in_order:
|
for adjustment_lineset in adjustment_linesets_in_order:
|
||||||
current_adjustment_type = None
|
current_adjustment_type = None
|
||||||
|
|
||||||
|
@ -519,13 +565,13 @@ class WitnessPlayerLogic:
|
||||||
self.DOOR_ITEMS_BY_ID: Dict[str, List[str]] = {}
|
self.DOOR_ITEMS_BY_ID: Dict[str, List[str]] = {}
|
||||||
self.STARTING_INVENTORY = set()
|
self.STARTING_INVENTORY = set()
|
||||||
|
|
||||||
self.DIFFICULTY = world.options.puzzle_randomization.value
|
self.DIFFICULTY = world.options.puzzle_randomization
|
||||||
|
|
||||||
if self.DIFFICULTY == 0:
|
if self.DIFFICULTY == "sigma_normal":
|
||||||
self.REFERENCE_LOGIC = StaticWitnessLogic.sigma_normal
|
self.REFERENCE_LOGIC = StaticWitnessLogic.sigma_normal
|
||||||
elif self.DIFFICULTY == 1:
|
elif self.DIFFICULTY == "sigma_expert":
|
||||||
self.REFERENCE_LOGIC = StaticWitnessLogic.sigma_expert
|
self.REFERENCE_LOGIC = StaticWitnessLogic.sigma_expert
|
||||||
elif self.DIFFICULTY == 2:
|
elif self.DIFFICULTY == "none":
|
||||||
self.REFERENCE_LOGIC = StaticWitnessLogic.vanilla
|
self.REFERENCE_LOGIC = StaticWitnessLogic.vanilla
|
||||||
|
|
||||||
self.CONNECTIONS_BY_REGION_NAME = copy.copy(self.REFERENCE_LOGIC.STATIC_CONNECTIONS_BY_REGION_NAME)
|
self.CONNECTIONS_BY_REGION_NAME = copy.copy(self.REFERENCE_LOGIC.STATIC_CONNECTIONS_BY_REGION_NAME)
|
||||||
|
|
|
@ -134,13 +134,13 @@ class WitnessRegions:
|
||||||
world.multiworld.regions += final_regions_list
|
world.multiworld.regions += final_regions_list
|
||||||
|
|
||||||
def __init__(self, locat: WitnessPlayerLocations, world: "WitnessWorld"):
|
def __init__(self, locat: WitnessPlayerLocations, world: "WitnessWorld"):
|
||||||
difficulty = world.options.puzzle_randomization.value
|
difficulty = world.options.puzzle_randomization
|
||||||
|
|
||||||
if difficulty == 0:
|
if difficulty == "sigma_normal":
|
||||||
self.reference_logic = StaticWitnessLogic.sigma_normal
|
self.reference_logic = StaticWitnessLogic.sigma_normal
|
||||||
elif difficulty == 1:
|
elif difficulty == "sigma_expert":
|
||||||
self.reference_logic = StaticWitnessLogic.sigma_expert
|
self.reference_logic = StaticWitnessLogic.sigma_expert
|
||||||
elif difficulty == 2:
|
elif difficulty == "none":
|
||||||
self.reference_logic = StaticWitnessLogic.vanilla
|
self.reference_logic = StaticWitnessLogic.vanilla
|
||||||
|
|
||||||
self.locat = locat
|
self.locat = locat
|
||||||
|
|
Loading…
Reference in New Issue