From b429021d55cb0945b06569069290db072109777f Mon Sep 17 00:00:00 2001 From: CookieCat Date: Sat, 11 May 2024 21:00:56 -0400 Subject: [PATCH] DW review stuff --- worlds/ahit/Client.py | 3 --- worlds/ahit/DeathWishLocations.py | 10 ++-------- worlds/ahit/DeathWishRules.py | 17 +++++++---------- worlds/ahit/Regions.py | 4 ++-- 4 files changed, 11 insertions(+), 23 deletions(-) diff --git a/worlds/ahit/Client.py b/worlds/ahit/Client.py index f6f87a35a6..2cd67e4682 100644 --- a/worlds/ahit/Client.py +++ b/worlds/ahit/Client.py @@ -17,9 +17,6 @@ class AHITJSONToTextParser(JSONtoTextParser): class AHITCommandProcessor(ClientCommandProcessor): - def __init__(self, ctx: CommonContext): - super().__init__(ctx) - def _cmd_ahit(self): """Check AHIT Connection State""" if isinstance(self.ctx, AHITContext): diff --git a/worlds/ahit/DeathWishLocations.py b/worlds/ahit/DeathWishLocations.py index a6f19cd3e2..d614035f27 100644 --- a/worlds/ahit/DeathWishLocations.py +++ b/worlds/ahit/DeathWishLocations.py @@ -194,16 +194,11 @@ def create_dw_regions(world: "HatInTimeWorld"): dw_shuffle.append("Seal the Deal") world.dw_shuffle = dw_shuffle - prev_dw: Region + prev_dw = dw_map for i in range(len(dw_shuffle)): name = dw_shuffle[i] dw = create_region(world, name) - - if i == 0: - connect_regions(dw_map, dw, f"-> {name}", world.player) - else: - # noinspection PyUnboundLocalVariable - connect_regions(prev_dw, dw, f"{prev_dw.name} -> {name}", world.player) + connect_regions(prev_dw, dw, f"{prev_dw.name} -> {name}", world.player) loc_id = death_wishes[name] main_objective = HatInTimeLocation(world.player, f"{name} - Main Objective", loc_id, dw) @@ -252,7 +247,6 @@ def create_dw_regions(world: "HatInTimeWorld"): bonus_stamps.show_in_spoiler = False dw.locations.append(main_stamp) dw.locations.append(bonus_stamps) - main_stamp.place_locked_item(HatInTimeItem(f"1 Stamp - {key}", ItemClassification.progression, None, world.player)) bonus_stamps.place_locked_item(HatInTimeItem(f"2 Stamps - {key}", diff --git a/worlds/ahit/DeathWishRules.py b/worlds/ahit/DeathWishRules.py index e363813746..cd22f711a2 100644 --- a/worlds/ahit/DeathWishRules.py +++ b/worlds/ahit/DeathWishRules.py @@ -196,12 +196,9 @@ def set_dw_rules(world: "HatInTimeWorld"): add_rule(bonus_stamps, loc.access_rule) if world.options.DWShuffle.value > 0: - for i in range(len(world.dw_shuffle)): - if i == 0: - continue - - name = world.dw_shuffle[i] - prev_dw = world.multiworld.get_region(world.dw_shuffle[i-1], world.player) + for i in range(len(world.dw_shuffle)-1): + name = world.dw_shuffle[i+1] + prev_dw = world.multiworld.get_region(world.dw_shuffle[i], world.player) entrance = world.multiworld.get_entrance(f"{prev_dw.name} -> {name}", world.player) add_rule(entrance, lambda state, n=prev_dw.name: state.has(f"1 Stamp - {n}", world.player)) else: @@ -326,7 +323,7 @@ def set_candle_dw_rules(name: str, world: "HatInTimeWorld"): elif name == "Camera Tourist": add_rule(main_objective, lambda state: get_reachable_enemy_count(state, world) >= 8) add_rule(full_clear, lambda state: can_reach_all_bosses(state, world) - and state.has("Triple Enemy Picture", world.player)) + and state.has("Triple Enemy Photo", world.player)) elif "Snatcher Coins" in name: coins: List[str] = [] @@ -418,8 +415,8 @@ def create_enemy_events(world: "HatInTimeWorld"): continue region = world.multiworld.get_region(name, world.player) - event = HatInTimeLocation(world.player, f"Triple Enemy Picture - {name}", None, region) - event.place_locked_item(HatInTimeItem("Triple Enemy Picture", ItemClassification.progression, None, world.player)) + event = HatInTimeLocation(world.player, f"Triple Enemy Photo - {name}", None, region) + event.place_locked_item(HatInTimeItem("Triple Enemy Photo", ItemClassification.progression, None, world.player)) region.locations.append(event) event.show_in_spoiler = False if name == "The Mustache Gauntlet": @@ -528,7 +525,7 @@ hit_list = { "Mustache Girl": ["The Finale", "Boss Rush", "No More Bad Guys"], } -# Camera Tourist has a bonus that requires getting three different types of enemies in one picture. +# Camera Tourist has a bonus that requires getting three different types of enemies in one photo. triple_enemy_locations = [ "She Came from Outer Space", "She Speedran from Outer Space", diff --git a/worlds/ahit/Regions.py b/worlds/ahit/Regions.py index 2fb5cb16cd..b8dd678ae5 100644 --- a/worlds/ahit/Regions.py +++ b/worlds/ahit/Regions.py @@ -316,10 +316,10 @@ def create_regions(world: "HatInTimeWorld"): # Items near the Dead Bird Studio elevator can be reached from the basement act, and beyond in Expert ev_area = create_region_and_connect(w, "Dead Bird Studio - Elevator Area", "DBS -> Elevator Area", dbs) - post_ev_area = create_region_and_connect(w, "Dead Bird Studio - Post Elevator Area", "DBS -> Post Elevator Area", dbs) + post_ev = create_region_and_connect(w, "Dead Bird Studio - Post Elevator Area", "DBS -> Post Elevator Area", dbs) connect_regions(basement, ev_area, "DBS Basement -> Elevator Area", p) if world.options.LogicDifficulty.value >= int(Difficulty.EXPERT): - connect_regions(basement, post_ev_area, "DBS Basement -> Post Elevator Area", p) + connect_regions(basement, post_ev, "DBS Basement -> Post Elevator Area", p) # ------------------------------------------- SUBCON FOREST --------------------------------------- # subcon_forest = create_region_and_connect(w, "Subcon Forest", "Telescope -> Subcon Forest", spaceship)