diff --git a/worlds/ahit/Locations.py b/worlds/ahit/Locations.py index f48c3d0b4a..eb242c96b2 100644 --- a/worlds/ahit/Locations.py +++ b/worlds/ahit/Locations.py @@ -9,10 +9,8 @@ class LocData(NamedTuple): id: int region: str required_hats: Optional[List[HatType]] = [HatType.NONE] - required_tps: Optional[int] = 0 hookshot: Optional[bool] = False dlc_flags: Optional[HatDLC] = HatDLC.none - paintings: Optional[int] = 0 # Progressive paintings required for Subcon painting shuffle # For UmbrellaLogic setting umbrella: Optional[bool] = False # Umbrella required for this check @@ -79,8 +77,7 @@ def get_location_names() -> Dict[str, int]: ahit_locations = { - "Spaceship - Rumbi Abuse": LocData(301000, "Spaceship", required_tps=4, dweller_bell=1), - # "Spaceship - Cooking Cat": LocData(301001, "Spaceship", required_tps=5), + "Spaceship - Rumbi Abuse": LocData(301000, "Spaceship", dweller_bell=1), # 300000 range - Mafia Town/Batle of the Birds "Welcome to Mafia Town - Umbrella": LocData(301002, "Welcome to Mafia Town"), @@ -169,85 +166,66 @@ ahit_locations = { "Subcon Village - Graveyard Ice Cube": LocData(325077, "Subcon Forest Area"), "Subcon Village - House Top": LocData(325471, "Subcon Forest Area"), "Subcon Village - Ice Cube House": LocData(325469, "Subcon Forest Area"), - "Subcon Village - Snatcher Statue Chest": LocData(323730, "Subcon Forest Area", paintings=1), + "Subcon Village - Snatcher Statue Chest": LocData(323730, "Subcon Forest Area"), "Subcon Village - Stump Platform Chest": LocData(323729, "Subcon Forest Area"), "Subcon Forest - Giant Tree Climb": LocData(325470, "Subcon Forest Area"), - "Subcon Forest - Swamp Gravestone": LocData(326296, "Subcon Forest Area", - required_hats=[HatType.BREWING], - paintings=1), + "Subcon Forest - Swamp Gravestone": LocData(326296, "Subcon Forest Area", required_hats=[HatType.BREWING],), - "Subcon Forest - Swamp Near Well": LocData(324762, "Subcon Forest Area", paintings=1), - "Subcon Forest - Swamp Tree A": LocData(324763, "Subcon Forest Area", paintings=1), - "Subcon Forest - Swamp Tree B": LocData(324764, "Subcon Forest Area", paintings=1), - "Subcon Forest - Swamp Ice Wall": LocData(324706, "Subcon Forest Area", paintings=1), - "Subcon Forest - Swamp Treehouse": LocData(325468, "Subcon Forest Area", paintings=1), - "Subcon Forest - Swamp Tree Chest": LocData(323728, "Subcon Forest Area", paintings=1), + "Subcon Forest - Swamp Near Well": LocData(324762, "Subcon Forest Area"), + "Subcon Forest - Swamp Tree A": LocData(324763, "Subcon Forest Area"), + "Subcon Forest - Swamp Tree B": LocData(324764, "Subcon Forest Area"), + "Subcon Forest - Swamp Ice Wall": LocData(324706, "Subcon Forest Area"), + "Subcon Forest - Swamp Treehouse": LocData(325468, "Subcon Forest Area"), + "Subcon Forest - Swamp Tree Chest": LocData(323728, "Subcon Forest Area"), - "Subcon Forest - Dweller Stump": LocData(324767, "Subcon Forest Area", - required_hats=[HatType.DWELLER], - paintings=3), + "Subcon Forest - Dweller Stump": LocData(324767, "Subcon Forest Area", required_hats=[HatType.DWELLER]), - "Subcon Forest - Dweller Floating Rocks": LocData(324464, "Subcon Forest Area", - required_hats=[HatType.DWELLER], - paintings=3), + "Subcon Forest - Dweller Floating Rocks": LocData(324464, "Subcon Forest Area", required_hats=[HatType.DWELLER]), - "Subcon Forest - Dweller Platforming Tree A": LocData(324709, "Subcon Forest Area", paintings=3), + "Subcon Forest - Dweller Platforming Tree A": LocData(324709, "Subcon Forest Area"), - "Subcon Forest - Dweller Platforming Tree B": LocData(324855, "Subcon Forest Area", - required_hats=[HatType.DWELLER], - paintings=3), + "Subcon Forest - Dweller Platforming Tree B": LocData(324855, "Subcon Forest Area", required_hats=[HatType.DWELLER]), - "Subcon Forest - Giant Time Piece": LocData(325473, "Subcon Forest Area", paintings=1), - "Subcon Forest - Gallows": LocData(325472, "Subcon Forest Area", paintings=1), + "Subcon Forest - Giant Time Piece": LocData(325473, "Subcon Forest Area"), + "Subcon Forest - Gallows": LocData(325472, "Subcon Forest Area"), - "Subcon Forest - Green and Purple Dweller Rocks": LocData(325082, "Subcon Forest Area", - required_hats=[HatType.DWELLER], - paintings=3), + "Subcon Forest - Green and Purple Dweller Rocks": LocData(325082, "Subcon Forest Area"), - "Subcon Forest - Dweller Shack": LocData(324463, "Subcon Forest Area", - required_hats=[HatType.DWELLER], - paintings=1), + "Subcon Forest - Dweller Shack": LocData(324463, "Subcon Forest Area", required_hats=[HatType.DWELLER]), "Subcon Forest - Tall Tree Hookshot Swing": LocData(324766, "Subcon Forest Area", - paintings=3, required_hats=[HatType.DWELLER], hookshot=True), - "Subcon Forest - Burning House": LocData(324710, "Subcon Forest Area", paintings=2), - "Subcon Forest - Burning Tree Climb": LocData(325079, "Subcon Forest Area", paintings=2), - "Subcon Forest - Burning Stump Chest": LocData(323731, "Subcon Forest Area", paintings=2), - "Subcon Forest - Burning Forest Treehouse": LocData(325467, "Subcon Forest Area", paintings=2), - "Subcon Forest - Spider Bone Cage A": LocData(324462, "Subcon Forest Area", paintings=2), - "Subcon Forest - Spider Bone Cage B": LocData(325080, "Subcon Forest Area", paintings=2), - "Subcon Forest - Triple Spider Bounce": LocData(324765, "Subcon Forest Area", paintings=2), - "Subcon Forest - Noose Treehouse": LocData(324856, "Subcon Forest Area", hookshot=True, paintings=2), - "Subcon Forest - Ice Cube Shack": LocData(324465, "Subcon Forest Area", paintings=1), + "Subcon Forest - Burning House": LocData(324710, "Subcon Forest Area"), + "Subcon Forest - Burning Tree Climb": LocData(325079, "Subcon Forest Area"), + "Subcon Forest - Burning Stump Chest": LocData(323731, "Subcon Forest Area"), + "Subcon Forest - Burning Forest Treehouse": LocData(325467, "Subcon Forest Area"), + "Subcon Forest - Spider Bone Cage A": LocData(324462, "Subcon Forest Area"), + "Subcon Forest - Spider Bone Cage B": LocData(325080, "Subcon Forest Area"), + "Subcon Forest - Triple Spider Bounce": LocData(324765, "Subcon Forest Area"), + "Subcon Forest - Noose Treehouse": LocData(324856, "Subcon Forest Area", hookshot=True), + "Subcon Forest - Ice Cube Shack": LocData(324465, "Subcon Forest Area"), - "Subcon Forest - Long Tree Climb Chest": LocData(323734, "Subcon Forest Area", - required_hats=[HatType.DWELLER], - paintings=2), + "Subcon Forest - Long Tree Climb Chest": LocData(323734, "Subcon Forest Area", required_hats=[HatType.DWELLER]), "Subcon Forest - Boss Arena Chest": LocData(323735, "Subcon Forest Area"), - "Subcon Forest - Manor Rooftop": LocData(325466, "Subcon Forest Area", dweller_bell=2, paintings=1), + "Subcon Forest - Manor Rooftop": LocData(325466, "Subcon Forest Area", dweller_bell=2), - "Subcon Forest - Infinite Yarn Bush": LocData(325478, "Subcon Forest Area", - required_hats=[HatType.BREWING], - paintings=2), + "Subcon Forest - Infinite Yarn Bush": LocData(325478, "Subcon Forest Area", required_hats=[HatType.BREWING]), - "Subcon Forest - Magnet Badge Bush": LocData(325479, "Subcon Forest Area", - required_hats=[HatType.BREWING], - paintings=3), + "Subcon Forest - Magnet Badge Bush": LocData(325479, "Subcon Forest Area", required_hats=[HatType.BREWING]), - "Subcon Well - Hookshot Badge Chest": LocData(324114, "The Subcon Well", dweller_bell=1, paintings=1), - "Subcon Well - Above Chest": LocData(324612, "The Subcon Well", dweller_bell=1, paintings=1), - "Subcon Well - On Pipe": LocData(324311, "The Subcon Well", hookshot=True, dweller_bell=1, paintings=1), - "Subcon Well - Mushroom": LocData(325318, "The Subcon Well", dweller_bell=1, paintings=1), + "Subcon Well - Hookshot Badge Chest": LocData(324114, "The Subcon Well", dweller_bell=1), + "Subcon Well - Above Chest": LocData(324612, "The Subcon Well", dweller_bell=1), + "Subcon Well - On Pipe": LocData(324311, "The Subcon Well", hookshot=True, dweller_bell=1), + "Subcon Well - Mushroom": LocData(325318, "The Subcon Well", dweller_bell=1), - "Queen Vanessa's Manor - Cellar": LocData(324841, "Queen Vanessa's Manor", dweller_bell=2, paintings=1), - "Queen Vanessa's Manor - Bedroom Chest": LocData(323808, "Queen Vanessa's Manor", dweller_bell=2, paintings=1), - "Queen Vanessa's Manor - Hall Chest": LocData(323896, "Queen Vanessa's Manor", dweller_bell=2, paintings=1), - "Queen Vanessa's Manor - Chandelier": LocData(325546, "Queen Vanessa's Manor", dweller_bell=2, paintings=1), + "Queen Vanessa's Manor - Cellar": LocData(324841, "Queen Vanessa's Manor", dweller_bell=2), + "Queen Vanessa's Manor - Bedroom Chest": LocData(323808, "Queen Vanessa's Manor", dweller_bell=2), + "Queen Vanessa's Manor - Hall Chest": LocData(323896, "Queen Vanessa's Manor", dweller_bell=2), + "Queen Vanessa's Manor - Chandelier": LocData(325546, "Queen Vanessa's Manor", dweller_bell=2), # 330000 range - Alpine Skyline "Alpine Skyline - Goat Village: Below Hookpoint": LocData(334856, "Goat Village"), @@ -350,10 +328,10 @@ act_completions = { "Act Completion (Time Rift - The Moon)": LocData(312785, "Time Rift - The Moon"), "Act Completion (Time Rift - Dead Bird Studio)": LocData(312577, "Time Rift - Dead Bird Studio"), - "Act Completion (Contractual Obligations)": LocData(312317, "Contractual Obligations", paintings=1), - "Act Completion (The Subcon Well)": LocData(311160, "The Subcon Well", hookshot=True, umbrella=True, paintings=1), - "Act Completion (Toilet of Doom)": LocData(311984, "Toilet of Doom", hookshot=True, paintings=1), - "Act Completion (Queen Vanessa's Manor)": LocData(312017, "Queen Vanessa's Manor", umbrella=True, paintings=1), + "Act Completion (Contractual Obligations)": LocData(312317, "Contractual Obligations"), + "Act Completion (The Subcon Well)": LocData(311160, "The Subcon Well", hookshot=True, umbrella=True), + "Act Completion (Toilet of Doom)": LocData(311984, "Toilet of Doom", hookshot=True), + "Act Completion (Queen Vanessa's Manor)": LocData(312017, "Queen Vanessa's Manor", umbrella=True), "Act Completion (Mail Delivery Service)": LocData(312032, "Mail Delivery Service", required_hats=[HatType.SPRINT]), "Act Completion (Your Contract has Expired)": LocData(311390, "Your Contract has Expired", umbrella=True), "Act Completion (Time Rift - Pipe)": LocData(313069, "Time Rift - Pipe", hookshot=True), @@ -501,7 +479,7 @@ shop_locations = { "Badge Seller - Item 8": LocData(301010, "Badge Seller"), "Badge Seller - Item 9": LocData(301011, "Badge Seller"), "Badge Seller - Item 10": LocData(301012, "Badge Seller"), - "Mafia Boss Shop Item": LocData(301013, "Spaceship", required_tps=12), + "Mafia Boss Shop Item": LocData(301013, "Spaceship"), "Yellow Overpass Station - Yellow Ticket Booth": LocData(301014, "Yellow Overpass Station", dlc_flags=HatDLC.dlc2), "Green Clean Station - Green Ticket Booth": LocData(301015, "Green Clean Station", dlc_flags=HatDLC.dlc2), diff --git a/worlds/ahit/Rules.py b/worlds/ahit/Rules.py index 4ba0b45f1a..d9b39e0d11 100644 --- a/worlds/ahit/Rules.py +++ b/worlds/ahit/Rules.py @@ -229,9 +229,6 @@ def set_rules(world: World): if hat is not HatType.NONE: add_rule(location, lambda state: can_use_hat(state, w, hat)) - if data.required_tps > 0: - add_rule(location, lambda state: state.has("Time Piece", p, data.required_tps)) - if data.hookshot: add_rule(location, lambda state: can_use_hookshot(state, w)) @@ -244,10 +241,6 @@ def set_rules(world: World): else: # Can bypass with Dweller Mask add_rule(location, lambda state: can_hit_bells(state, w) or can_use_hat(state, w, HatType.DWELLER)) - if data.paintings > 0 and mw.ShuffleSubconPaintings[p].value > 0: - value: int = data.paintings - add_rule(location, lambda state: state.count("Progressive Painting Unlock", p) >= value) - set_specific_rules(w) if mw.LogicDifficulty[p].value >= 1: @@ -259,6 +252,9 @@ def set_rules(world: World): if mw.ShuffleAlpineZiplines[p].value > 0: set_alps_zipline_rules(w) + if mw.ShuffleSubconPaintings[p].value > 0: + set_painting_rules(w) + for (key, acts) in act_connections.items(): if "Arctic Cruise" in key and not dlc1: continue @@ -314,6 +310,13 @@ def set_specific_rules(world: World): add_rule(mw.get_entrance("Alpine Skyline - Finale", p), lambda state: can_clear_alpine(state, w)) + add_rule(mw.get_location("Mafia Boss Shop Item", p), + lambda state: state.has("Time Piece", p, 12) + and state.has("Time Piece", p, w.get_chapter_cost(ChapterIndex.BIRDS))) + + add_rule(mw.get_location("Spaceship - Rumbi Abuse", p), + lambda state: state.has("Time Piece", p, 4)) + # Normal logic if mw.LogicDifficulty[p].value == 0: add_rule(mw.get_entrance("-> The Birdhouse", p), @@ -680,3 +683,131 @@ def connect_regions(start_region: Region, exit_region: Region, entrancename: str start_region.exits.append(entrance) entrance.connect(exit_region) return entrance + + +def set_painting_rules(world: World): + add_rule(world.multiworld.get_location("Subcon Village - Snatcher Statue Chest", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Subcon Forest - Swamp Gravestone", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Subcon Forest - Swamp Near Well", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Subcon Forest - Swamp Tree A", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Subcon Forest - Swamp Tree B", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Subcon Forest - Swamp Ice Wall", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Subcon Forest - Swamp Treehouse", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Subcon Forest - Swamp Tree Chest", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Subcon Forest - Ice Cube Shack", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Subcon Forest - Manor Rooftop", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Subcon Well - Hookshot Badge Chest", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Subcon Well - Above Chest", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Subcon Well - On Pipe", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Subcon Well - Mushroom", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Queen Vanessa's Manor - Cellar", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Queen Vanessa's Manor - Bedroom Chest", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Queen Vanessa's Manor - Hall Chest", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Queen Vanessa's Manor - Chandelier", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Subcon Forest - Burning House", world.player), + lambda state: state.has("Progressive Painting Unlock", 2)) + + add_rule(world.multiworld.get_location("Subcon Forest - Burning Tree Climb", world.player), + lambda state: state.has("Progressive Painting Unlock", 2)) + + add_rule(world.multiworld.get_location("Subcon Forest - Burning Stump Chest", world.player), + lambda state: state.has("Progressive Painting Unlock", 2)) + + add_rule(world.multiworld.get_location("Subcon Forest - Burning Forest Treehouse", world.player), + lambda state: state.has("Progressive Painting Unlock", 2)) + + add_rule(world.multiworld.get_location("Subcon Forest - Spider Bone Cage A", world.player), + lambda state: state.has("Progressive Painting Unlock", 2)) + + add_rule(world.multiworld.get_location("Subcon Forest - Spider Bone Cage B", world.player), + lambda state: state.has("Progressive Painting Unlock", 2)) + + add_rule(world.multiworld.get_location("Subcon Forest - Triple Spider Bounce", world.player), + lambda state: state.has("Progressive Painting Unlock", 2)) + + add_rule(world.multiworld.get_location("Subcon Forest - Noose Treehouse", world.player), + lambda state: state.has("Progressive Painting Unlock", 2)) + + add_rule(world.multiworld.get_location("Subcon Forest - Long Tree Climb Chest", world.player), + lambda state: state.has("Progressive Painting Unlock", 2)) + + add_rule(world.multiworld.get_location("Subcon Forest - Infinite Yarn Bush", world.player), + lambda state: state.has("Progressive Painting Unlock", 2)) + + add_rule(world.multiworld.get_location("Subcon Forest - Dweller Stump", world.player), + lambda state: state.has("Progressive Painting Unlock", 3)) + + add_rule(world.multiworld.get_location("Subcon Forest - Dweller Floating Rocks", world.player), + lambda state: state.has("Progressive Painting Unlock", 3)) + + add_rule(world.multiworld.get_location("Subcon Forest - Dweller Platforming Tree A", world.player), + lambda state: state.has("Progressive Painting Unlock", 3)) + + add_rule(world.multiworld.get_location("Subcon Forest - Dweller Platforming Tree B", world.player), + lambda state: state.has("Progressive Painting Unlock", 3)) + + add_rule(world.multiworld.get_location("Subcon Forest - Giant Time Piece", world.player), + lambda state: state.has("Progressive Painting Unlock", 3)) + + add_rule(world.multiworld.get_location("Subcon Forest - Gallows", world.player), + lambda state: state.has("Progressive Painting Unlock", 3)) + + add_rule(world.multiworld.get_location("Subcon Forest - Green and Purple Dweller Rocks", world.player), + lambda state: state.has("Progressive Painting Unlock", 3)) + + add_rule(world.multiworld.get_location("Subcon Forest - Dweller Shack", world.player), + lambda state: state.has("Progressive Painting Unlock", 3)) + + add_rule(world.multiworld.get_location("Subcon Forest - Tall Tree Hookshot Swing", world.player), + lambda state: state.has("Progressive Painting Unlock", 3)) + + add_rule(world.multiworld.get_location("Subcon Forest - Magnet Badge Bush", world.player), + lambda state: state.has("Progressive Painting Unlock", 3)) + + add_rule(world.multiworld.get_location("Act Completion (Contractual Obligations)", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Act Completion (The Subcon Well)", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Act Completion (Toilet of Doom)", world.player), + lambda state: state.has("Progressive Painting Unlock", 1)) + + add_rule(world.multiworld.get_location("Act Completion (Queen Vanessa's Manor)", world.player), + lambda state: state.has("Progressive Painting Unlock", 1))