diff --git a/worlds/ahit/Items.py b/worlds/ahit/Items.py index 7c9b4297d3..fc6d82b1af 100644 --- a/worlds/ahit/Items.py +++ b/worlds/ahit/Items.py @@ -34,6 +34,9 @@ def get_total_time_pieces(world: World) -> int: if world.multiworld.EnableDLC1[world.player].value > 0: count += 6 + if world.multiworld.EnableDLC2[world.player].value > 0: + count += 10 + return min(40+world.multiworld.MaxExtraTimePieces[world.player].value, count) diff --git a/worlds/ahit/Options.py b/worlds/ahit/Options.py index 8044013b22..77daad0e2d 100644 --- a/worlds/ahit/Options.py +++ b/worlds/ahit/Options.py @@ -33,9 +33,15 @@ def adjust_options(world: World): if world.multiworld.HighestChapterCost[world.player].value > total_tps-5: world.multiworld.HighestChapterCost[world.player].value = min(45, total_tps-5) + if world.multiworld.LowestChapterCost[world.player].value > total_tps-5: + world.multiworld.LowestChapterCost[world.player].value = min(45, total_tps-5) + if world.multiworld.FinalChapterMaxCost[world.player].value > total_tps: world.multiworld.FinalChapterMaxCost[world.player].value = min(50, total_tps) + if world.multiworld.FinalChapterMinCost[world.player].value > total_tps: + world.multiworld.FinalChapterMinCost[world.player].value = min(50, total_tps-5) + # Don't allow Rush Hour goal if DLC2 content is disabled if world.multiworld.EndGoal[world.player].value == 2 and world.multiworld.EnableDLC2[world.player].value == 0: world.multiworld.EndGoal[world.player].value = 1 diff --git a/worlds/ahit/Regions.py b/worlds/ahit/Regions.py index a6dda2b368..260c31a596 100644 --- a/worlds/ahit/Regions.py +++ b/worlds/ahit/Regions.py @@ -152,7 +152,7 @@ rift_access_regions = { "Time Rift - Tour": ["Time's End"], "Time Rift - Balcony": ["Cruise Ship"], - "Time Rift - Deep Sea": ["Cruise Ship"], + "Time Rift - Deep Sea": ["Bon Voyage!"], "Time Rift - Rumbi Factory": ["Nyakuza Free Roam"], } @@ -481,11 +481,6 @@ def randomize_act_entrances(world: World): candidate_list.append(region) break - if world.multiworld.NoFreeRoamFinale[world.player].value > 0 and "Free Roam" in candidate.name: - # CTR entrance isn't a finale, but has a fuck ton of unlock requirements - if region.name in chapter_finales or region.name == "Cheating the Race": - continue - if region.name == "Rush Hour": if world.multiworld.EndGoal[world.player].value == 2 or \ world.multiworld.VanillaMetro[world.player].value == 2: @@ -537,6 +532,12 @@ def randomize_act_entrances(world: World): if region.name == "Rush Hour" and candidate.name == "Nyakuza Free Roam": continue + # CTR entrance and Tour aren't a finale, but have a fuck ton of unlock requirements + if world.multiworld.NoFreeRoamFinale[world.player].value > 0 and "Free Roam" in candidate.name: + if region.name in chapter_finales or region.name == "Cheating the Race" \ + or world.multiworld.EndGoal[world.player].value == 1 and region.name == "Time Rift - Tour": + continue + if region.name in rift_access_regions and candidate.name in rift_access_regions[region.name]: continue diff --git a/worlds/ahit/Rules.py b/worlds/ahit/Rules.py index 3a420c943e..83d0f19882 100644 --- a/worlds/ahit/Rules.py +++ b/worlds/ahit/Rules.py @@ -32,17 +32,17 @@ act_connections = { def can_use_hat(state: CollectionState, world: World, hat: HatType) -> bool: - return get_remaining_hat_cost(state, world, hat) <= 0 + return state.count("Yarn", world.player) >= get_hat_cost(world, hat) -def get_remaining_hat_cost(state: CollectionState, world: World, hat: HatType) -> int: +def get_hat_cost(world: World, hat: HatType) -> int: cost: int = 0 for h in world.get_hat_craft_order(): cost += world.get_hat_yarn_costs().get(h) if h == hat: break - return max(cost - state.count("Yarn", world.player), 0) + return cost def can_sdj(state: CollectionState, world: World): diff --git a/worlds/ahit/__init__.py b/worlds/ahit/__init__.py index ef4b9fc3fe..5dc5e48356 100644 --- a/worlds/ahit/__init__.py +++ b/worlds/ahit/__init__.py @@ -48,7 +48,8 @@ class HatInTimeWorld(World): start_chapter: int = self.multiworld.StartingChapter[self.player].value if start_chapter == 4 or start_chapter == 3: - if self.multiworld.ActRandomizer[self.player].value == 0: + if self.multiworld.ActRandomizer[self.player].value == 0 \ + or self.multiworld.VanillaAlpine[self.player].value > 0: if start_chapter == 4: self.multiworld.push_precollected(self.create_item("Hookshot Badge"))