From 949f152ec20f8a1104d3e4cc2473451aa564492d Mon Sep 17 00:00:00 2001 From: CookieCat Date: Wed, 30 Aug 2023 00:20:37 -0400 Subject: [PATCH] Ruh Roh Raggy, more r-r-r-random bugs! --- worlds/ahit/Locations.py | 1 + worlds/ahit/Regions.py | 14 ++++++++++++++ worlds/ahit/Rules.py | 14 ++++++-------- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/worlds/ahit/Locations.py b/worlds/ahit/Locations.py index ad107f9f73..874cb0edf3 100644 --- a/worlds/ahit/Locations.py +++ b/worlds/ahit/Locations.py @@ -646,6 +646,7 @@ tihs_locations = [ ] event_locs = { + "HUMT Access": LocData(0, "Heating Up Mafia Town", act_complete_event=False), "Birdhouse Cleared": LocData(0, "The Birdhouse"), "Lava Cake Cleared": LocData(0, "The Lava Cake"), "Windmill Cleared": LocData(0, "The Windmill"), diff --git a/worlds/ahit/Regions.py b/worlds/ahit/Regions.py index f4a019ad6d..b2e91103d6 100644 --- a/worlds/ahit/Regions.py +++ b/worlds/ahit/Regions.py @@ -474,16 +474,30 @@ def randomize_act_entrances(world: World): if world.multiworld.VanillaAlpine[world.player].value > 0 and region.name == "Alpine Free Roam" \ or world.multiworld.VanillaAlpine[world.player].value == 2 and region.name == "The Illness has Spread": + candidate_list.clear() candidate_list.append(region) break + if world.multiworld.VanillaAlpine[world.player].value > 0 and candidate.name == "Alpine Free Roam" \ + or world.multiworld.VanillaAlpine[world.player].value == 2 and candidate.name == "The Illness has Spread": + continue + if world.multiworld.VanillaMetro[world.player].value > 0 and region.name == "Nyakuza Free Roam": + candidate_list.clear() candidate_list.append(region) break + if world.multiworld.VanillaMetro[world.player].value > 0 and candidate.name == "Nyakuza Free Roam": + continue + + if candidate.name == "Rush Hour" and world.multiworld.EndGoal[world.player].value == 2 or \ + world.multiworld.VanillaMetro[world.player].value == 2: + continue + if region.name == "Rush Hour": if world.multiworld.EndGoal[world.player].value == 2 or \ world.multiworld.VanillaMetro[world.player].value == 2: + candidate_list.clear() candidate_list.append(region) break diff --git a/worlds/ahit/Rules.py b/worlds/ahit/Rules.py index c776d24a14..b4629a0d69 100644 --- a/worlds/ahit/Rules.py +++ b/worlds/ahit/Rules.py @@ -32,7 +32,7 @@ act_connections = { def can_use_hat(state: CollectionState, world: World, hat: HatType) -> bool: - return state.has("Yarn", world.player, get_hat_cost(world, hat)) + return state.count("Yarn", world.player) >= get_hat_cost(world, hat) def get_hat_cost(world: World, hat: HatType) -> int: @@ -387,14 +387,12 @@ def set_specific_rules(world: World): or state.can_reach("The Golden Vault", "Region", world.player)) # For some reason, the brewing crate is removed in HUMT - set_rule(world.multiworld.get_location("Mafia Town - Secret Cave", world.player), - lambda state: state.can_reach("Heating Up Mafia Town", "Region", world.player) - or can_use_hat(state, world, HatType.BREWING)) + add_rule(world.multiworld.get_location("Mafia Town - Secret Cave", world.player), + lambda state: state.has("HUMT Access", world.player), "or") - # Can bounce across the lava to get this without Hookshot (need to die though :world.player) - set_rule(world.multiworld.get_location("Mafia Town - Above Boats", world.player), - lambda state: state.can_reach("Heating Up Mafia Town", "Region", world.player) - or can_use_hookshot(state, world)) + # Can bounce across the lava to get this without Hookshot (need to die though) + add_rule(world.multiworld.get_location("Mafia Town - Above Boats", world.player), + lambda state: state.has("HUMT Access", world.player), "or") set_rule(world.multiworld.get_location("Act Completion (Cheating the Race)", world.player), lambda state: can_use_hat(state, world, HatType.TIME_STOP)