diff --git a/worlds/ahit/DeathWishLocations.py b/worlds/ahit/DeathWishLocations.py index e8e2e7941a..b764690dc5 100644 --- a/worlds/ahit/DeathWishLocations.py +++ b/worlds/ahit/DeathWishLocations.py @@ -237,4 +237,4 @@ def create_dw_regions(world: World): full_clear.progress_type = LocationProgressType.EXCLUDED dw.locations.append(main_objective) - dw.locations.append(full_clear) \ No newline at end of file + dw.locations.append(full_clear) diff --git a/worlds/ahit/DeathWishRules.py b/worlds/ahit/DeathWishRules.py index d40da5d90f..8b51e9be03 100644 --- a/worlds/ahit/DeathWishRules.py +++ b/worlds/ahit/DeathWishRules.py @@ -377,8 +377,8 @@ def create_enemy_events(world: World): if (area == "Bon Voyage!" or area == "Time Rift - Deep Sea") and not world.is_dlc1(): continue - if area == "Time Rift - Tour" and not world.is_dlc1() \ - or world.multiworld.ExcludeTour[world.player].value > 0: + if area == "Time Rift - Tour" and (not world.is_dlc1() + or world.multiworld.ExcludeTour[world.player].value > 0): continue if area == "Bluefin Tunnel" and not world.is_dlc2(): diff --git a/worlds/ahit/Items.py b/worlds/ahit/Items.py index 729350da1d..f88702db7d 100644 --- a/worlds/ahit/Items.py +++ b/worlds/ahit/Items.py @@ -90,8 +90,7 @@ def create_itempool(world: World) -> List[Item]: itempool += create_multiple_items(world, name, item_frequencies.get(name, 1), item_type) - total_locations: int = get_total_locations(world) - itempool += create_junk_items(world, total_locations - len(itempool)) + itempool += create_junk_items(world, get_total_locations(world) - len(itempool)) return itempool diff --git a/worlds/ahit/Locations.py b/worlds/ahit/Locations.py index 8e63dad539..a817047423 100644 --- a/worlds/ahit/Locations.py +++ b/worlds/ahit/Locations.py @@ -79,6 +79,10 @@ def is_location_valid(world: World, location: str) -> bool: and location in storybook_pages.keys(): return False + if world.multiworld.ShuffleActContracts[world.player].value == 0 \ + and location in contract_locations.keys(): + return False + if location not in world.shop_locs and location in shop_locations: return False diff --git a/worlds/ahit/Regions.py b/worlds/ahit/Regions.py index d7711cbdd6..4dc0e3acec 100644 --- a/worlds/ahit/Regions.py +++ b/worlds/ahit/Regions.py @@ -601,6 +601,12 @@ def randomize_act_entrances(world: World): if region.name in blacklisted_combos.keys() and candidate.name in blacklisted_combos[region.name]: continue + # Prevent Contractual Obligations from being inaccessible if contracts are not shuffled + if world.multiworld.ShuffleActContracts[world.player].value == 0: + if (region.name == "Your Contract has Expired" or region.name == "The Subcon Well") \ + and candidate.name == "Contractual Obligations": + continue + if world.multiworld.FinaleShuffle[world.player].value > 0 and region.name in chapter_finales: if candidate.name not in chapter_finales: continue