From 311966ca3a23f9f119e8f2be20a4bee4e03e119b Mon Sep 17 00:00:00 2001 From: CookieCat Date: Fri, 27 Oct 2023 20:46:42 -0400 Subject: [PATCH] some slight touch ups --- worlds/ahit/DeathWishRules.py | 6 +++--- worlds/ahit/Locations.py | 10 +++++----- worlds/ahit/Regions.py | 4 ++-- worlds/ahit/__init__.py | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/worlds/ahit/DeathWishRules.py b/worlds/ahit/DeathWishRules.py index 5a97518499..c448484036 100644 --- a/worlds/ahit/DeathWishRules.py +++ b/worlds/ahit/DeathWishRules.py @@ -321,7 +321,7 @@ def set_candle_dw_rules(name: str, world: World): 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: for coin in required_snatcher_coins[name]: @@ -408,8 +408,8 @@ def create_enemy_events(world: World): 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": diff --git a/worlds/ahit/Locations.py b/worlds/ahit/Locations.py index 00ec578624..bf31c8cba8 100644 --- a/worlds/ahit/Locations.py +++ b/worlds/ahit/Locations.py @@ -4,6 +4,9 @@ from typing import Dict from .Options import TasksanityCheckCount +TASKSANITY_START_ID = 2000300204 + + def get_total_locations(world: World) -> int: total: int = 0 @@ -96,7 +99,7 @@ def is_location_valid(world: World, location: str) -> bool: def get_location_names() -> Dict[str, int]: names = {name: data.id for name, data in location_table.items()} - id_start: int = get_tasksanity_start_id() + id_start: int = TASKSANITY_START_ID for i in range(TasksanityCheckCount.range_end): names.setdefault(f"Tasksanity Check {i+1}", id_start+i) @@ -107,10 +110,6 @@ def get_location_names() -> Dict[str, int]: return names -def get_tasksanity_start_id() -> int: - return 2000300204 - - ahit_locations = { "Spaceship - Rumbi Abuse": LocData(2000301000, "Spaceship", hit_requirement=1), @@ -848,6 +847,7 @@ zero_jumps = { dlc_flags=HatDLC.dlc2_dw), } +# noinspection PyDictDuplicateKeys snatcher_coins = { "Snatcher Coin - Top of HQ": LocData(0, "Down with the Mafia!", dlc_flags=HatDLC.death_wish), "Snatcher Coin - Top of HQ": LocData(0, "Cheating the Race", dlc_flags=HatDLC.death_wish), diff --git a/worlds/ahit/Regions.py b/worlds/ahit/Regions.py index 9245efd937..807f1ee77f 100644 --- a/worlds/ahit/Regions.py +++ b/worlds/ahit/Regions.py @@ -2,7 +2,7 @@ from worlds.AutoWorld import World from BaseClasses import Region, Entrance, ItemClassification, Location from .Types import ChapterIndex, Difficulty, HatInTimeLocation, HatInTimeItem from .Locations import location_table, storybook_pages, event_locs, is_location_valid, \ - shop_locations, get_tasksanity_start_id, snatcher_coins, zero_jumps, zero_jumps_expert, zero_jumps_hard + shop_locations, TASKSANITY_START_ID, snatcher_coins, zero_jumps, zero_jumps_expert, zero_jumps_hard import typing from .Rules import set_rift_rules, get_difficulty @@ -439,7 +439,7 @@ def create_rift_connections(world: World, region: Region): def create_tasksanity_locations(world: World): ship_shape: Region = world.multiworld.get_region("Ship Shape", world.player) - id_start: int = get_tasksanity_start_id() + id_start: int = TASKSANITY_START_ID for i in range(world.multiworld.TasksanityCheckCount[world.player].value): location = HatInTimeLocation(world.player, f"Tasksanity Check {i+1}", id_start+i, ship_shape) ship_shape.locations.append(location) diff --git a/worlds/ahit/__init__.py b/worlds/ahit/__init__.py index 64b3febc3e..0ed14c6376 100644 --- a/worlds/ahit/__init__.py +++ b/worlds/ahit/__init__.py @@ -1,7 +1,7 @@ from BaseClasses import Item, ItemClassification, Tutorial from .Items import item_table, create_item, relic_groups, act_contracts, create_itempool from .Regions import create_regions, randomize_act_entrances, chapter_act_info, create_events, get_shuffled_region -from .Locations import location_table, contract_locations, is_location_valid, get_location_names, get_tasksanity_start_id +from .Locations import location_table, contract_locations, is_location_valid, get_location_names, TASKSANITY_START_ID from .Rules import set_rules from .Options import ahit_options, slot_data_options, adjust_options from .Types import HatType, ChapterIndex, HatInTimeItem @@ -252,7 +252,7 @@ class HatInTimeWorld(World): if self.is_dlc1() and self.multiworld.Tasksanity[self.player].value > 0: ship_shape_region = get_shuffled_region(self, "Ship Shape") - id_start: int = get_tasksanity_start_id() + id_start: int = TASKSANITY_START_ID for i in range(self.multiworld.TasksanityCheckCount[self.player].value): new_hint_data[id_start+i] = ship_shape_region