From b6ab91fe4b5491c1d754aba35885f7b6e1923263 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 2 Dec 2024 20:50:30 -0500 Subject: [PATCH 01/36] LADX: Remove duplicate Magnifying Lens item (#3684) * LADX: Magnifying Glass fixes Removed the duplicate item (Magnifying Lens), and made the real one a filler item. * Update worlds/ladx/Items.py Co-authored-by: threeandthreee --------- Co-authored-by: threeandthreee --- worlds/ladx/Items.py | 2 -- worlds/ladx/LADXR/locations/constants.py | 2 +- worlds/ladx/LADXR/locations/items.py | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/worlds/ladx/Items.py b/worlds/ladx/Items.py index 1f9358a4f5a6..b9e1eeab3e69 100644 --- a/worlds/ladx/Items.py +++ b/worlds/ladx/Items.py @@ -69,7 +69,6 @@ class ItemName: BOMB = "Bomb" SWORD = "Progressive Sword" FLIPPERS = "Flippers" - MAGNIFYING_LENS = "Magnifying Lens" MEDICINE = "Medicine" TAIL_KEY = "Tail Key" ANGLER_KEY = "Angler Key" @@ -191,7 +190,6 @@ class ItemName: ItemData(ItemName.BOMB, "BOMB", ItemClassification.progression), ItemData(ItemName.SWORD, "SWORD", ItemClassification.progression), ItemData(ItemName.FLIPPERS, "FLIPPERS", ItemClassification.progression), - ItemData(ItemName.MAGNIFYING_LENS, "MAGNIFYING_LENS", ItemClassification.progression), ItemData(ItemName.MEDICINE, "MEDICINE", ItemClassification.useful), ItemData(ItemName.TAIL_KEY, "TAIL_KEY", ItemClassification.progression), ItemData(ItemName.ANGLER_KEY, "ANGLER_KEY", ItemClassification.progression), diff --git a/worlds/ladx/LADXR/locations/constants.py b/worlds/ladx/LADXR/locations/constants.py index 7bb8df5b3515..a0489febc316 100644 --- a/worlds/ladx/LADXR/locations/constants.py +++ b/worlds/ladx/LADXR/locations/constants.py @@ -25,7 +25,7 @@ PEGASUS_BOOTS: 0x05, OCARINA: 0x06, FEATHER: 0x07, SHOVEL: 0x08, MAGIC_POWDER: 0x09, BOMB: 0x0A, SWORD: 0x0B, FLIPPERS: 0x0C, - MAGNIFYING_LENS: 0x0D, MEDICINE: 0x10, + MEDICINE: 0x10, TAIL_KEY: 0x11, ANGLER_KEY: 0x12, FACE_KEY: 0x13, BIRD_KEY: 0x14, GOLD_LEAF: 0x15, RUPEES_50: 0x1B, RUPEES_20: 0x1C, RUPEES_100: 0x1D, RUPEES_200: 0x1E, RUPEES_500: 0x1F, SEASHELL: 0x20, MESSAGE: 0x21, GEL: 0x22, diff --git a/worlds/ladx/LADXR/locations/items.py b/worlds/ladx/LADXR/locations/items.py index 50186ef2a34c..1ecc331f8580 100644 --- a/worlds/ladx/LADXR/locations/items.py +++ b/worlds/ladx/LADXR/locations/items.py @@ -11,7 +11,6 @@ BOMB = "BOMB" SWORD = "SWORD" FLIPPERS = "FLIPPERS" -MAGNIFYING_LENS = "MAGNIFYING_LENS" MEDICINE = "MEDICINE" TAIL_KEY = "TAIL_KEY" ANGLER_KEY = "ANGLER_KEY" From 81b9a53a376df3f55f76abe941796fc7aef69e89 Mon Sep 17 00:00:00 2001 From: Mysteryem Date: Tue, 3 Dec 2024 01:51:10 +0000 Subject: [PATCH 02/36] KH2: Add missing indirect conditions for Final region access (#3923) * KH2: Add missing indirect conditions for Final region access Entrances to the Final region require being able to reach any one of a number of locations, but for a location to be reachable, its parent region must also be reachable, so indirect conditions must be added for these regions. * Use World.get_location Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> * Use World.get_location, for real this time --------- Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> --- worlds/kh2/Rules.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/worlds/kh2/Rules.py b/worlds/kh2/Rules.py index 4370ad36b540..0f26b56d0e54 100644 --- a/worlds/kh2/Rules.py +++ b/worlds/kh2/Rules.py @@ -355,6 +355,16 @@ def __init__(self, world: KH2World) -> None: RegionName.Master: lambda state: self.multi_form_region_access(), RegionName.Final: lambda state: self.final_form_region_access(state) } + # Accessing Final requires being able to reach one of the locations in final_leveling_access, but reaching a + # location requires being able to reach the region the location is in, so an indirect condition is required. + # The access rules of each of the locations in final_leveling_access do not check for being able to reach other + # locations or other regions, so it is only the parent region of each location that needs to be added as an + # indirect condition. + self.form_region_indirect_condition_regions = { + RegionName.Final: { + self.world.get_location(location).parent_region for location in final_leveling_access + } + } def final_form_region_access(self, state: CollectionState) -> bool: """ @@ -388,12 +398,15 @@ def set_kh2_form_rules(self): for region_name in drive_form_list: if region_name == RegionName.Summon and not self.world.options.SummonLevelLocationToggle: continue + indirect_condition_regions = self.form_region_indirect_condition_regions.get(region_name, ()) # could get the location of each of these, but I feel like that would be less optimal region = self.multiworld.get_region(region_name, self.player) # if region_name in form_region_rules if region_name != RegionName.Summon: for entrance in region.entrances: entrance.access_rule = self.form_region_rules[region_name] + for indirect_condition_region in indirect_condition_regions: + self.multiworld.register_indirect_condition(indirect_condition_region, entrance) for loc in region.locations: loc.access_rule = self.form_rules[loc.name] From 18e8d50768eff7ac6416048fd1d39b40551793b7 Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Mon, 2 Dec 2024 17:52:20 -0800 Subject: [PATCH 03/36] Pokemon Emerald: Clean up dexsanity spoiler and hints (#3832) * Pokemon Emerald: Clean up dexsanity spoiler and hints * Pokemon Emerald: Add +, do less hacks * Pokemon Emerald: Update changelog * Pokemon Emerald: Replace arrow with word in changelog * Pokemon Emerald: Fix changelog --- worlds/pokemon_emerald/CHANGELOG.md | 1 - worlds/pokemon_emerald/__init__.py | 53 ++++++++++++++++++----------- worlds/pokemon_emerald/data.py | 31 +++++++++++++++++ 3 files changed, 64 insertions(+), 21 deletions(-) diff --git a/worlds/pokemon_emerald/CHANGELOG.md b/worlds/pokemon_emerald/CHANGELOG.md index 72005d6f9d3f..0dd874b25029 100644 --- a/worlds/pokemon_emerald/CHANGELOG.md +++ b/worlds/pokemon_emerald/CHANGELOG.md @@ -2,7 +2,6 @@ ### Features -- Added many new item and location groups. - Added a Swedish translation of the setup guide. - The client communicates map transitions to any trackers connected to the slot. - Added the player's Normalize Encounter Rates option to slot data for trackers. diff --git a/worlds/pokemon_emerald/__init__.py b/worlds/pokemon_emerald/__init__.py index c99a0c11cdfb..040b89b1af51 100644 --- a/worlds/pokemon_emerald/__init__.py +++ b/worlds/pokemon_emerald/__init__.py @@ -629,21 +629,34 @@ def write_spoiler(self, spoiler_handle: TextIO): spoiler_handle.write(f"\n\nWild Pokemon ({self.player_name}):\n\n") + slot_to_rod_suffix = { + 0: " (Old Rod)", + 1: " (Old Rod)", + 2: " (Good Rod)", + 3: " (Good Rod)", + 4: " (Good Rod)", + 5: " (Super Rod)", + 6: " (Super Rod)", + 7: " (Super Rod)", + 8: " (Super Rod)", + 9: " (Super Rod)", + } + species_maps = defaultdict(set) for map in self.modified_maps.values(): if map.land_encounters is not None: for encounter in map.land_encounters.slots: - species_maps[encounter].add(map.name[4:]) + species_maps[encounter].add(map.label + " (Land)") if map.water_encounters is not None: for encounter in map.water_encounters.slots: - species_maps[encounter].add(map.name[4:]) + species_maps[encounter].add(map.label + " (Water)") if map.fishing_encounters is not None: - for encounter in map.fishing_encounters.slots: - species_maps[encounter].add(map.name[4:]) + for slot, encounter in enumerate(map.fishing_encounters.slots): + species_maps[encounter].add(map.label + slot_to_rod_suffix[slot]) - lines = [f"{emerald_data.species[species].label}: {', '.join(maps)}\n" + lines = [f"{emerald_data.species[species].label}: {', '.join(sorted(maps))}\n" for species, maps in species_maps.items()] lines.sort() for line in lines: @@ -655,35 +668,35 @@ def extend_hint_information(self, hint_data): if self.options.dexsanity: from collections import defaultdict - slot_to_rod = { - 0: "_OLD_ROD", - 1: "_OLD_ROD", - 2: "_GOOD_ROD", - 3: "_GOOD_ROD", - 4: "_GOOD_ROD", - 5: "_SUPER_ROD", - 6: "_SUPER_ROD", - 7: "_SUPER_ROD", - 8: "_SUPER_ROD", - 9: "_SUPER_ROD", + slot_to_rod_suffix = { + 0: " (Old Rod)", + 1: " (Old Rod)", + 2: " (Good Rod)", + 3: " (Good Rod)", + 4: " (Good Rod)", + 5: " (Super Rod)", + 6: " (Super Rod)", + 7: " (Super Rod)", + 8: " (Super Rod)", + 9: " (Super Rod)", } species_maps = defaultdict(set) for map in self.modified_maps.values(): if map.land_encounters is not None: for encounter in map.land_encounters.slots: - species_maps[encounter].add(map.name[4:] + "_GRASS") + species_maps[encounter].add(map.label + " (Land)") if map.water_encounters is not None: for encounter in map.water_encounters.slots: - species_maps[encounter].add(map.name[4:] + "_WATER") + species_maps[encounter].add(map.label + " (Water)") if map.fishing_encounters is not None: for slot, encounter in enumerate(map.fishing_encounters.slots): - species_maps[encounter].add(map.name[4:] + slot_to_rod[slot]) + species_maps[encounter].add(map.label + slot_to_rod_suffix[slot]) hint_data[self.player] = { - self.location_name_to_id[f"Pokedex - {emerald_data.species[species].label}"]: ", ".join(maps) + self.location_name_to_id[f"Pokedex - {emerald_data.species[species].label}"]: ", ".join(sorted(maps)) for species, maps in species_maps.items() } diff --git a/worlds/pokemon_emerald/data.py b/worlds/pokemon_emerald/data.py index c7af5ef2284a..d93ff926229b 100644 --- a/worlds/pokemon_emerald/data.py +++ b/worlds/pokemon_emerald/data.py @@ -151,6 +151,7 @@ class EncounterTableData(NamedTuple): @dataclass class MapData: name: str + label: str header_address: int land_encounters: Optional[EncounterTableData] water_encounters: Optional[EncounterTableData] @@ -357,6 +358,8 @@ def load_json_data(data_name: str) -> Union[List[Any], Dict[str, Any]]: def _init() -> None: + import re + extracted_data: Dict[str, Any] = load_json_data("extracted_data.json") data.constants = extracted_data["constants"] data.ram_addresses = extracted_data["misc_ram_addresses"] @@ -366,6 +369,7 @@ def _init() -> None: # Create map data for map_name, map_json in extracted_data["maps"].items(): + assert isinstance(map_name, str) if map_name in IGNORABLE_MAPS: continue @@ -389,8 +393,35 @@ def _init() -> None: map_json["fishing_encounters"]["address"] ) + # Derive a user-facing label + label = [] + for word in map_name[4:].split("_"): + # 1F, B1F, 2R, etc. + re_match = re.match("^B?\d+[FRP]$", word) + if re_match: + label.append(word) + continue + + # Route 103, Hall 1, House 5, etc. + re_match = re.match("^([A-Z]+)(\d+)$", word) + if re_match: + label.append(re_match.group(1).capitalize()) + label.append(re_match.group(2).lstrip("0")) + continue + + if word == "OF": + label.append("of") + continue + + if word == "SS": + label.append("S.S.") + continue + + label.append(word.capitalize()) + data.maps[map_name] = MapData( map_name, + " ".join(label), map_json["header_address"], land_encounters, water_encounters, From ffe0221deb41d93b5a2e5a663a43e96beec058db Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 3 Dec 2024 03:00:56 +0100 Subject: [PATCH 04/36] Core: log process ID (#4290) --- Utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utils.py b/Utils.py index 4f99d26ac402..50adb18f42be 100644 --- a/Utils.py +++ b/Utils.py @@ -557,7 +557,7 @@ def _cleanup(): import platform logging.info( f"Archipelago ({__version__}) logging initialized" - f" on {platform.platform()}" + f" on {platform.platform()} process {os.getpid()}" f" running Python {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}" f"{' (frozen)' if is_frozen() else ''}" ) From 6f2e1c2a7ea8395c1674124c1c7e51ffbd1bb7d9 Mon Sep 17 00:00:00 2001 From: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> Date: Mon, 2 Dec 2024 21:02:18 -0500 Subject: [PATCH 05/36] Lingo: Optimize imports and remove unused parameter (#4305) --- worlds/lingo/player_logic.py | 4 ++-- worlds/lingo/utils/pickle_static_data.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/worlds/lingo/player_logic.py b/worlds/lingo/player_logic.py index b21735c1f533..83217d7311a3 100644 --- a/worlds/lingo/player_logic.py +++ b/worlds/lingo/player_logic.py @@ -412,7 +412,7 @@ def randomize_paintings(self, world: "LingoWorld") -> bool: required_painting_rooms += REQUIRED_PAINTING_WHEN_NO_DOORS_ROOMS req_exits = [painting_id for painting_id, painting in PAINTINGS.items() if painting.required_when_no_doors] - def is_req_enterable(painting_id: str, painting: Painting) -> bool: + def is_req_enterable(painting: Painting) -> bool: if painting.exit_only or painting.disable or painting.req_blocked\ or painting.room in required_painting_rooms: return False @@ -433,7 +433,7 @@ def is_req_enterable(painting_id: str, painting: Painting) -> bool: return True req_enterable = [painting_id for painting_id, painting in PAINTINGS.items() - if is_req_enterable(painting_id, painting)] + if is_req_enterable(painting)] req_exits += [painting_id for painting_id, painting in PAINTINGS.items() if painting.exit_only and painting.required] req_entrances = world.random.sample(req_enterable, len(req_exits)) diff --git a/worlds/lingo/utils/pickle_static_data.py b/worlds/lingo/utils/pickle_static_data.py index 92bcb7a859ea..cd5c4b41df4b 100644 --- a/worlds/lingo/utils/pickle_static_data.py +++ b/worlds/lingo/utils/pickle_static_data.py @@ -11,7 +11,6 @@ import hashlib import pickle -import sys import Utils From 6896d631db6ab24dfef67538ff7e7a7c18ff560f Mon Sep 17 00:00:00 2001 From: Jouramie <16137441+Jouramie@users.noreply.github.com> Date: Tue, 3 Dec 2024 00:23:13 -0500 Subject: [PATCH 06/36] Stardew Valley: Fix a bug in equals between Or and And rules #4326 --- worlds/stardew_valley/stardew_rule/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/stardew_valley/stardew_rule/base.py b/worlds/stardew_valley/stardew_rule/base.py index 3e6eb327ea99..af4c3c35330d 100644 --- a/worlds/stardew_valley/stardew_rule/base.py +++ b/worlds/stardew_valley/stardew_rule/base.py @@ -293,7 +293,7 @@ def __repr__(self): def __eq__(self, other): return (isinstance(other, type(self)) and self.combinable_rules == other.combinable_rules and - self.simplification_state.original_simplifiable_rules == self.simplification_state.original_simplifiable_rules) + self.simplification_state.original_simplifiable_rules == other.simplification_state.original_simplifiable_rules) def __hash__(self): if len(self.combinable_rules) + len(self.simplification_state.original_simplifiable_rules) > 5: From ac8a206d4685e015494dd67f9a9e7ab2411773b3 Mon Sep 17 00:00:00 2001 From: threeandthreee Date: Tue, 3 Dec 2024 00:59:55 -0500 Subject: [PATCH 07/36] LADX: combine warp options (#4325) * combine warp options * fix * fix typo * mark old options as removed --- worlds/ladx/LADXR/generator.py | 6 +++--- worlds/ladx/Options.py | 30 ++++++++++++++---------------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/worlds/ladx/LADXR/generator.py b/worlds/ladx/LADXR/generator.py index f0f042c67db8..b402b3d88919 100644 --- a/worlds/ladx/LADXR/generator.py +++ b/worlds/ladx/LADXR/generator.py @@ -58,7 +58,7 @@ from .patches import bank34 from .utils import formatText -from ..Options import TrendyGame, Palette +from ..Options import TrendyGame, Palette, Warps from .roomEditor import RoomEditor, Object from .patches.aesthetics import rgb_to_bin, bin_to_rgb @@ -416,8 +416,8 @@ def speed(): for channel in range(3): color[channel] = color[channel] * 31 // 0xbc - if world.options.warp_improvements: - patches.core.addWarpImprovements(rom, world.options.additional_warp_points) + if world.options.warps != Warps.option_vanilla: + patches.core.addWarpImprovements(rom, world.options.warps == Warps.option_improved_additional) palette = world.options.palette if palette != Palette.option_normal: diff --git a/worlds/ladx/Options.py b/worlds/ladx/Options.py index 6c0b866b5071..863e80fd036b 100644 --- a/worlds/ladx/Options.py +++ b/worlds/ladx/Options.py @@ -3,7 +3,7 @@ import os.path import typing import logging -from Options import Choice, Toggle, DefaultOnToggle, Range, FreeText, PerGameCommonOptions, OptionGroup +from Options import Choice, Toggle, DefaultOnToggle, Range, FreeText, PerGameCommonOptions, OptionGroup, Removed from collections import defaultdict import Utils @@ -486,21 +486,18 @@ def to_ladxr_option(self, all_options): return self.ladxr_name, s -class WarpImprovements(DefaultOffToggle): +class Warps(Choice): """ - [On] Adds remake style warp screen to the game. Choose your warp destination on the map after jumping in a portal and press B to select. - [Off] No change + [Improved] Adds remake style warp screen to the game. Choose your warp destination on the map after jumping in a portal and press B to select. + [Improved Additional] Improved warps, and adds a warp point at Crazy Tracy's house (the Mambo teleport spot) and Eagle's Tower. """ - display_name = "Warp Improvements" + display_name = "Warps" + option_vanilla = 0 + option_improved = 1 + option_improved_additional = 2 + default = option_vanilla -class AdditionalWarpPoints(DefaultOffToggle): - """ - [On] (requires warp improvements) Adds a warp point at Crazy Tracy's house (the Mambo teleport spot) and Eagle's Tower - [Off] No change - """ - display_name = "Additional Warp Points" - ladx_option_groups = [ OptionGroup("Goal Options", [ Goal, @@ -515,8 +512,7 @@ class AdditionalWarpPoints(DefaultOffToggle): ShuffleStoneBeaks ]), OptionGroup("Warp Points", [ - WarpImprovements, - AdditionalWarpPoints, + Warps, ]), OptionGroup("Miscellaneous", [ TradeQuest, @@ -562,8 +558,7 @@ class LinksAwakeningOptions(PerGameCommonOptions): # 'bowwow': Bowwow, # 'overworld': Overworld, link_palette: LinkPalette - warp_improvements: WarpImprovements - additional_warp_points: AdditionalWarpPoints + warps: Warps trendy_game: TrendyGame gfxmod: GfxMod palette: Palette @@ -579,3 +574,6 @@ class LinksAwakeningOptions(PerGameCommonOptions): nag_messages: NagMessages ap_title_screen: APTitleScreen boots_controls: BootsControls + + warp_improvements: Removed + additional_warp_points: Removed From 5b0de6b6c77b76a7f40285565d4f688fb662e412 Mon Sep 17 00:00:00 2001 From: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:51:58 -0500 Subject: [PATCH 08/36] FFMQ: No Longer Allow Inaccessible Useful Items (#4323) Co-authored-by: Doug Hoskisson --- worlds/ffmq/Regions.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/worlds/ffmq/Regions.py b/worlds/ffmq/Regions.py index c1d3d619ffaa..4e26be1653a6 100644 --- a/worlds/ffmq/Regions.py +++ b/worlds/ffmq/Regions.py @@ -211,9 +211,12 @@ def stage_set_rules(multiworld): # If there's no enemies, there's no repeatable income sources no_enemies_players = [player for player in multiworld.get_game_players("Final Fantasy Mystic Quest") if multiworld.worlds[player].options.enemies_density == "none"] - if (len([item for item in multiworld.itempool if item.classification in (ItemClassification.filler, - ItemClassification.trap)]) > len([player for player in no_enemies_players if - multiworld.worlds[player].options.accessibility == "minimal"]) * 3): + if ( + len([item for item in multiworld.itempool if item.excludable]) > + len([player + for player in no_enemies_players + if multiworld.worlds[player].options.accessibility != "minimal"]) * 3 + ): for player in no_enemies_players: for location in vendor_locations: if multiworld.worlds[player].options.accessibility == "full": @@ -221,11 +224,8 @@ def stage_set_rules(multiworld): else: multiworld.get_location(location, player).access_rule = lambda state: False else: - # There are not enough junk items to fill non-minimal players' vendors. Just set an item rule not allowing - # advancement items so that useful items can be placed. - for player in no_enemies_players: - for location in vendor_locations: - multiworld.get_location(location, player).item_rule = lambda item: not item.advancement + raise Exception(f"Not enough filler/trap items for FFMQ players with full and items accessibility. " + f"Add more items or change the 'Enemies Density' option to something besides 'none'") class FFMQLocation(Location): From f43fa612d502c3b5ed307d97f266e6acc8eaa937 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Wed, 4 Dec 2024 05:39:29 +0100 Subject: [PATCH 09/36] The Witness: Another small access rule optimisation #4256 --- worlds/witness/rules.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/worlds/witness/rules.py b/worlds/witness/rules.py index 323d5943c853..dac1556e46d4 100644 --- a/worlds/witness/rules.py +++ b/worlds/witness/rules.py @@ -246,7 +246,22 @@ def convert_requirement_option(requirement: List[Union[CollectionRule, SimpleIte item_rules_converted = [lambda state: state.has(item, player, count)] else: item_counts = {item_rule.item_name: item_rule.item_count for item_rule in item_rules} - item_rules_converted = [lambda state: state.has_all_counts(item_counts, player)] + # Sort the list by which item you are least likely to have (E.g. last stage of progressive item chains) + sorted_item_list = sorted( + item_counts.keys(), + key=lambda item_name: item_counts[item_name] if ("Progressive" in item_name) else 1.5, + reverse=True + # 1.5 because you are less likely to have a single stage item than one copy of a 2-stage chain + # I did some testing and every part of this genuinely gives a tiiiiny performance boost over not having it! + ) + + if all(item_count == 1 for item_count in item_counts.values()): + # If all counts are one, just use state.has_all + item_rules_converted = [lambda state: state.has_all(sorted_item_list, player)] + else: + # If any count is higher than 1, use state.has_all_counts + sorted_item_counts = {item_name: item_counts[item_name] for item_name in sorted_item_list} + item_rules_converted = [lambda state: state.has_all_counts(sorted_item_counts, player)] return collection_rules + item_rules_converted From 769fbc55a9043f323684f6400424167eed2cea80 Mon Sep 17 00:00:00 2001 From: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> Date: Wed, 4 Dec 2024 02:51:56 -0500 Subject: [PATCH 10/36] HK: Remove unused variables and imports (#4303) * Remove unused variables and imports * Accidental duplication --- worlds/hk/Options.py | 2 +- worlds/hk/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/worlds/hk/Options.py b/worlds/hk/Options.py index e17abbb7ae47..02f04ab18eef 100644 --- a/worlds/hk/Options.py +++ b/worlds/hk/Options.py @@ -1,6 +1,6 @@ import typing import re -from dataclasses import dataclass, make_dataclass +from dataclasses import make_dataclass from .ExtractedData import logic_options, starts, pool_options from .Rules import cost_terms diff --git a/worlds/hk/__init__.py b/worlds/hk/__init__.py index aede8e59cca5..81d939dcf1ea 100644 --- a/worlds/hk/__init__.py +++ b/worlds/hk/__init__.py @@ -340,7 +340,7 @@ def _add(item_name: str, location_name: str, randomized: bool): for shop, locations in self.created_multi_locations.items(): for _ in range(len(locations), getattr(self.options, shop_to_option[shop]).value): - loc = self.create_location(shop) + self.create_location(shop) unfilled_locations += 1 # Balance the pool @@ -356,7 +356,7 @@ def _add(item_name: str, location_name: str, randomized: bool): if shops: for _ in range(additional_shop_items): shop = self.random.choice(shops) - loc = self.create_location(shop) + self.create_location(shop) unfilled_locations += 1 if len(self.created_multi_locations[shop]) >= 16: shops.remove(shop) From 58f22053048b97fd18d07843ea63638657257420 Mon Sep 17 00:00:00 2001 From: nmorale5 <76963132+nmorale5@users.noreply.github.com> Date: Thu, 5 Dec 2024 01:48:33 -0500 Subject: [PATCH 11/36] Pokemon RB: Fix Incorrect Hidden Item Location in Seafoam Islands B2F (#4304) --- worlds/pokemon_rb/locations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worlds/pokemon_rb/locations.py b/worlds/pokemon_rb/locations.py index 943204ceaf75..467139c39e94 100644 --- a/worlds/pokemon_rb/locations.py +++ b/worlds/pokemon_rb/locations.py @@ -401,7 +401,7 @@ def __init__(self, flag): LocationData("Cerulean Cave B1F-E", "Hidden Item Northeast Rocks", "Ultra Ball", rom_addresses['Hidden_Item_Cerulean_Cave_B1F'], Hidden(22), inclusion=hidden_items), LocationData("Power Plant", "Hidden Item Central Dead End", "Max Elixir", rom_addresses['Hidden_Item_Power_Plant_1'], Hidden(23), inclusion=hidden_items), LocationData("Power Plant", "Hidden Item Before Zapdos", "PP Up", rom_addresses['Hidden_Item_Power_Plant_2'], Hidden(24), inclusion=hidden_items), - LocationData("Seafoam Islands B2F-NW", "Hidden Item Rock", "Nugget", rom_addresses['Hidden_Item_Seafoam_Islands_B2F'], Hidden(25), inclusion=hidden_items), + LocationData("Seafoam Islands B2F-SW", "Hidden Item Rock", "Nugget", rom_addresses['Hidden_Item_Seafoam_Islands_B2F'], Hidden(25), inclusion=hidden_items), LocationData("Seafoam Islands B4F-W", "Hidden Item Corner Island", "Ultra Ball", rom_addresses['Hidden_Item_Seafoam_Islands_B4F'], Hidden(26), inclusion=hidden_items), LocationData("Pokemon Mansion 1F", "Hidden Item Block Near Entrance Carpet", "Moon Stone", rom_addresses['Hidden_Item_Pokemon_Mansion_1F'], Hidden(27), inclusion=hidden_moon_stones), LocationData("Pokemon Mansion 3F-SW", "Hidden Item Behind Burglar", "Max Revive", rom_addresses['Hidden_Item_Pokemon_Mansion_3F'], Hidden(28), inclusion=hidden_items), From 85a0d59f739a199bf4e72612d29183f86d00a66e Mon Sep 17 00:00:00 2001 From: threeandthreee Date: Thu, 5 Dec 2024 04:23:26 -0500 Subject: [PATCH 12/36] LADX: text shuffle exclusions (#3919) * text shuffle exclusions Exclude owl statues, library books, goal sign, signpost maze, and various rupee prices from text shuffle * clearer variable name --- worlds/ladx/LADXR/generator.py | 44 +++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/worlds/ladx/LADXR/generator.py b/worlds/ladx/LADXR/generator.py index b402b3d88919..504dfc78eced 100644 --- a/worlds/ladx/LADXR/generator.py +++ b/worlds/ladx/LADXR/generator.py @@ -340,11 +340,53 @@ def gen_hint(): patches.enemies.doubleTrouble(rom) if world.options.text_shuffle: + excluded_ids = [ + # Overworld owl statues + 0x1B6, 0x1B7, 0x1B8, 0x1B9, 0x1BA, 0x1BB, 0x1BC, 0x1BD, 0x1BE, 0x22D, + + # Dungeon owls + 0x288, 0x280, # D1 + 0x28A, 0x289, 0x281, # D2 + 0x282, 0x28C, 0x28B, # D3 + 0x283, # D4 + 0x28D, 0x284, # D5 + 0x285, 0x28F, 0x28E, # D6 + 0x291, 0x290, 0x286, # D7 + 0x293, 0x287, 0x292, # D8 + 0x263, # D0 + + # Hint books + 0x267, # color dungeon + 0x200, 0x201, + 0x202, 0x203, + 0x204, 0x205, + 0x206, 0x207, + 0x208, 0x209, + 0x20A, 0x20B, + 0x20C, + 0x20D, 0x20E, + 0x217, 0x218, 0x219, 0x21A, + + # Goal sign + 0x1A3, + + # Signpost maze + 0x1A9, 0x1AA, 0x1AB, 0x1AC, 0x1AD, + + # Prices + 0x02C, 0x02D, 0x030, 0x031, 0x032, 0x033, # Shop items + 0x03B, # Trendy Game + 0x045, # Fisherman + 0x018, 0x019, # Crazy Tracy + 0x0DC, # Mamu + 0x0F0, # Raft ride + ] + excluded_texts = [ rom.texts[excluded_id] for excluded_id in excluded_ids] buckets = defaultdict(list) # For each ROM bank, shuffle text within the bank for n, data in enumerate(rom.texts._PointerTable__data): # Don't muck up which text boxes are questions and which are statements - if type(data) != int and data and data != b'\xFF': + if type(data) != int and data and data != b'\xFF' and data not in excluded_texts: buckets[(rom.texts._PointerTable__banks[n], data[len(data) - 1] == 0xfe)].append((n, data)) for bucket in buckets.values(): # For each bucket, make a copy and shuffle From d80069385dc6166c2333d2c2360d47861a138d87 Mon Sep 17 00:00:00 2001 From: threeandthreee Date: Thu, 5 Dec 2024 06:03:16 -0500 Subject: [PATCH 13/36] LADX: tweak in-game hints (#3920) * dont show local player name in hint * add option to disable hints --------- Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> --- worlds/ladx/LADXR/generator.py | 4 +++- worlds/ladx/Options.py | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/worlds/ladx/LADXR/generator.py b/worlds/ladx/LADXR/generator.py index 504dfc78eced..046b51815cba 100644 --- a/worlds/ladx/LADXR/generator.py +++ b/worlds/ladx/LADXR/generator.py @@ -266,6 +266,8 @@ def generateRom(args, world: "LinksAwakeningWorld"): our_useful_items = [item for item in our_items if ItemClassification.progression in item.classification] def gen_hint(): + if not world.options.in_game_hints: + return 'Hints are disabled!' chance = world.random.uniform(0, 1) if chance < JUNK_HINT: return None @@ -286,7 +288,7 @@ def gen_hint(): else: location_name = location.name - hint = f"{name} {location.item} is at {location_name}" + hint = f"{name} {location.item.name} is at {location_name}" if location.player != world.player: # filter out { and } since they cause issues with string.format later on player_name = world.multiworld.player_name[location.player].replace("{", "").replace("}", "") diff --git a/worlds/ladx/Options.py b/worlds/ladx/Options.py index 863e80fd036b..9414a7e3c89b 100644 --- a/worlds/ladx/Options.py +++ b/worlds/ladx/Options.py @@ -498,6 +498,13 @@ class Warps(Choice): default = option_vanilla +class InGameHints(DefaultOnToggle): + """ + When enabled, owl statues and library books may indicate the location of your items in the multiworld. + """ + display_name = "In-game Hints" + + ladx_option_groups = [ OptionGroup("Goal Options", [ Goal, @@ -518,6 +525,7 @@ class Warps(Choice): TradeQuest, Rooster, TrendyGame, + InGameHints, NagMessages, BootsControls ]), @@ -574,6 +582,7 @@ class LinksAwakeningOptions(PerGameCommonOptions): nag_messages: NagMessages ap_title_screen: APTitleScreen boots_controls: BootsControls + in_game_hints: InGameHints warp_improvements: Removed additional_warp_points: Removed From 4d42814f5d6a7315bb177f76d1f690ff6454b9ef Mon Sep 17 00:00:00 2001 From: threeandthreee Date: Thu, 5 Dec 2024 06:06:52 -0500 Subject: [PATCH 14/36] LADX: more item groups, location groups, keysanity preset (#3936) * add groups and a preset * formatting * typing * alias groups for progressive items * add bush breakers item group * fix typo * some manual location groups * drop dummy dungeon items from groups --- worlds/ladx/Items.py | 136 ++++++++++++++++++++++++++++++++++++++- worlds/ladx/Locations.py | 35 +++++++++- worlds/ladx/__init__.py | 24 ++++--- 3 files changed, 184 insertions(+), 11 deletions(-) diff --git a/worlds/ladx/Items.py b/worlds/ladx/Items.py index b9e1eeab3e69..2a64c59394e6 100644 --- a/worlds/ladx/Items.py +++ b/worlds/ladx/Items.py @@ -26,7 +26,7 @@ class DungeonItemData(ItemData): @property def dungeon_index(self): return int(self.ladxr_id[-1]) - + @property def dungeon_item_type(self): s = self.ladxr_id[:-1] @@ -174,7 +174,7 @@ class ItemName: TRADING_ITEM_SCALE = "Scale" TRADING_ITEM_MAGNIFYING_GLASS = "Magnifying Glass" -trade_item_prog = ItemClassification.progression +trade_item_prog = ItemClassification.progression links_awakening_items = [ ItemData(ItemName.POWER_BRACELET, "POWER_BRACELET", ItemClassification.progression), @@ -303,3 +303,135 @@ class ItemName: links_awakening_items_by_name = { item.item_name : item for item in links_awakening_items } + +links_awakening_item_name_groups: typing.Dict[str, typing.Set[str]] = { + "Instruments": { + "Full Moon Cello", + "Conch Horn", + "Sea Lily's Bell", + "Surf Harp", + "Wind Marimba", + "Coral Triangle", + "Organ of Evening Calm", + "Thunder Drum", + }, + "Entrance Keys": { + "Tail Key", + "Angler Key", + "Face Key", + "Bird Key", + "Slime Key", + }, + "Nightmare Keys": { + "Nightmare Key (Angler's Tunnel)", + "Nightmare Key (Bottle Grotto)", + "Nightmare Key (Catfish's Maw)", + "Nightmare Key (Color Dungeon)", + "Nightmare Key (Eagle's Tower)", + "Nightmare Key (Face Shrine)", + "Nightmare Key (Key Cavern)", + "Nightmare Key (Tail Cave)", + "Nightmare Key (Turtle Rock)", + }, + "Small Keys": { + "Small Key (Angler's Tunnel)", + "Small Key (Bottle Grotto)", + "Small Key (Catfish's Maw)", + "Small Key (Color Dungeon)", + "Small Key (Eagle's Tower)", + "Small Key (Face Shrine)", + "Small Key (Key Cavern)", + "Small Key (Tail Cave)", + "Small Key (Turtle Rock)", + }, + "Compasses": { + "Compass (Angler's Tunnel)", + "Compass (Bottle Grotto)", + "Compass (Catfish's Maw)", + "Compass (Color Dungeon)", + "Compass (Eagle's Tower)", + "Compass (Face Shrine)", + "Compass (Key Cavern)", + "Compass (Tail Cave)", + "Compass (Turtle Rock)", + }, + "Maps": { + "Dungeon Map (Angler's Tunnel)", + "Dungeon Map (Bottle Grotto)", + "Dungeon Map (Catfish's Maw)", + "Dungeon Map (Color Dungeon)", + "Dungeon Map (Eagle's Tower)", + "Dungeon Map (Face Shrine)", + "Dungeon Map (Key Cavern)", + "Dungeon Map (Tail Cave)", + "Dungeon Map (Turtle Rock)", + }, + "Stone Beaks": { + "Stone Beak (Angler's Tunnel)", + "Stone Beak (Bottle Grotto)", + "Stone Beak (Catfish's Maw)", + "Stone Beak (Color Dungeon)", + "Stone Beak (Eagle's Tower)", + "Stone Beak (Face Shrine)", + "Stone Beak (Key Cavern)", + "Stone Beak (Tail Cave)", + "Stone Beak (Turtle Rock)", + }, + "Trading Items": { + "Yoshi Doll", + "Ribbon", + "Dog Food", + "Bananas", + "Stick", + "Honeycomb", + "Pineapple", + "Hibiscus", + "Letter", + "Broom", + "Fishing Hook", + "Necklace", + "Scale", + "Magnifying Glass", + }, + "Rupees": { + "20 Rupees", + "50 Rupees", + "100 Rupees", + "200 Rupees", + "500 Rupees", + }, + "Upgrades": { + "Max Powder Upgrade", + "Max Bombs Upgrade", + "Max Arrows Upgrade", + }, + "Songs": { + "Ballad of the Wind Fish", + "Manbo's Mambo", + "Frog's Song of Soul", + }, + "Tunics": { + "Red Tunic", + "Blue Tunic", + }, + "Bush Breakers": { + "Progressive Power Bracelet", + "Magic Rod", + "Magic Powder", + "Bomb", + "Progressive Sword", + "Boomerang", + }, + "Sword": { + "Progressive Sword", + }, + "Shield": { + "Progressive Shield", + }, + "Power Bracelet": { + "Progressive Power Bracelet", + }, + "Bracelet": { + "Progressive Power Bracelet", + }, +} diff --git a/worlds/ladx/Locations.py b/worlds/ladx/Locations.py index f29355f2ba86..8670738e0869 100644 --- a/worlds/ladx/Locations.py +++ b/worlds/ladx/Locations.py @@ -1,5 +1,5 @@ from BaseClasses import Region, Entrance, Location, CollectionState - +import typing from .LADXR.checkMetadata import checkMetadataTable from .Common import * @@ -25,6 +25,39 @@ def meta_to_name(meta): return f"{meta.name} ({meta.area})" +def get_location_name_groups() -> typing.Dict[str, typing.Set[str]]: + groups = { + "Instrument Pedestals": { + "Full Moon Cello (Tail Cave)", + "Conch Horn (Bottle Grotto)", + "Sea Lily's Bell (Key Cavern)", + "Surf Harp (Angler's Tunnel)", + "Wind Marimba (Catfish's Maw)", + "Coral Triangle (Face Shrine)", + "Organ of Evening Calm (Eagle's Tower)", + "Thunder Drum (Turtle Rock)", + }, + "Boss Rewards": { + "Moldorm Heart Container (Tail Cave)", + "Genie Heart Container (Bottle Grotto)", + "Slime Eye Heart Container (Key Cavern)", + "Angler Fish Heart Container (Angler's Tunnel)", + "Slime Eel Heart Container (Catfish's Maw)", + "Facade Heart Container (Face Shrine)", + "Evil Eagle Heart Container (Eagle's Tower)", + "Hot Head Heart Container (Turtle Rock)", + "Tunic Fairy Item 1 (Color Dungeon)", + "Tunic Fairy Item 2 (Color Dungeon)", + }, + } + # Add region groups + for s, v in checkMetadataTable.items(): + if s == "None": + continue + groups.setdefault(v.area, set()).add(meta_to_name(v)) + return groups + +links_awakening_location_name_groups = get_location_name_groups() def get_locations_to_id(): ret = { diff --git a/worlds/ladx/__init__.py b/worlds/ladx/__init__.py index 2846b40e67d9..7499aca8c404 100644 --- a/worlds/ladx/__init__.py +++ b/worlds/ladx/__init__.py @@ -13,7 +13,8 @@ from worlds.AutoWorld import WebWorld, World from .Common import * from .Items import (DungeonItemData, DungeonItemType, ItemName, LinksAwakeningItem, TradeItemData, - ladxr_item_to_la_item_name, links_awakening_items, links_awakening_items_by_name) + ladxr_item_to_la_item_name, links_awakening_items, links_awakening_items_by_name, + links_awakening_item_name_groups) from .LADXR import generator from .LADXR.itempool import ItemPool as LADXRItemPool from .LADXR.locations.constants import CHEST_ITEMS @@ -23,7 +24,8 @@ from .LADXR.settings import Settings as LADXRSettings from .LADXR.worldSetup import WorldSetup as LADXRWorldSetup from .Locations import (LinksAwakeningLocation, LinksAwakeningRegion, - create_regions_from_ladxr, get_locations_to_id) + create_regions_from_ladxr, get_locations_to_id, + links_awakening_location_name_groups) from .Options import DungeonItemShuffle, ShuffleInstruments, LinksAwakeningOptions, ladx_option_groups from .Rom import LADXDeltaPatch, get_base_rom_path @@ -66,6 +68,15 @@ class LinksAwakeningWebWorld(WebWorld): )] theme = "dirt" option_groups = ladx_option_groups + options_presets: typing.Dict[str, typing.Dict[str, typing.Any]] = { + "Keysanity": { + "shuffle_nightmare_keys": "any_world", + "shuffle_small_keys": "any_world", + "shuffle_maps": "any_world", + "shuffle_compasses": "any_world", + "shuffle_stone_beaks": "any_world", + } + } class LinksAwakeningWorld(World): """ @@ -98,12 +109,9 @@ class LinksAwakeningWorld(World): # Items can be grouped using their names to allow easy checking if any item # from that group has been collected. Group names can also be used for !hint - item_name_groups = { - "Instruments": { - "Full Moon Cello", "Conch Horn", "Sea Lily's Bell", "Surf Harp", - "Wind Marimba", "Coral Triangle", "Organ of Evening Calm", "Thunder Drum" - }, - } + item_name_groups = links_awakening_item_name_groups + + location_name_groups = links_awakening_location_name_groups prefill_dungeon_items = None From 203d89d1d38102800bfc0aa4c5338f7fc3113dec Mon Sep 17 00:00:00 2001 From: threeandthreee Date: Thu, 5 Dec 2024 10:32:45 -0500 Subject: [PATCH 15/36] LADX: upstream logic updates (#3963) * Fully updates requirements.py to live LADXR (#19) * Updates dungeon2.py to LADXR-Live (#20) No logic changes or bugfix are in this file. It is only code cleanup. * Update dungeon1.py (#21) - The Three of a Kind with Bomb is moved from Normal to Hard Logic The rest is code cleanup. lines 22-25 | 22-26 & 33 | 34 remain different in AP | Upstream with no effective difference * Fully updates dungeon3.py to LADXR-live (#22) Logic Changes: - Hard mode now considers killing the enemies in the top room with pot Everything else is cleanup. * Fully update dungeon4.py to LADXR-live logic (#23) Logic Changes: - Hard Logic: Removes Feather requirement from grabbing the Pit Key - Hell logic: new hookshot clip (line 64) - Hell logic: hookshot spam over the first pit of crossroads, then buffer down (line 69) - Hell logic: push block left of keyblock up, then shaq jump off the left wall and pause buffer to land on keyblock. - Hell logic: split zol for more entities, and clip through the block left of keyblock by hookshot spam The rest is code cleanup * Updates dungeon5.py mostly to LADXR-Live Logic (#24) Logic Changes: - Hell logic: use zoomerang dashing left to get an unclipped boots superjump off the right wall over the block. reverse is push block (line 69) The rest is cleanup. The upstream splits the post_gohma region into pre_gohma, gohma and post_gohma. I did not implement this yet as I do not know the implications. To port this the following lines need to be changed (AP | LADXR): 18 | 18-20; 55 | 58; 65 | 68-69 * Fully update dungeon6.py logic (#25) Logic Changes: - Hard logic: allow damage boosting past the mini thwomps - Glitched logic: bomb triggering elephants in two cases Everything else is cleanup * Fully update dungeon7.py to LADXR-live logic (#26) Logic Changes: - Hard logic: Three of a Kind is now possible with bombs only Everything else is code cleanup * Fully updates dungeon8.py to LADXR-live (#27) Logic change: - Hard logic: allows to drop the Gibdos into holes as a way to kill them - Glitched logic: underground section with fire balls jumping up out of lava. Use boots superjump off left wall to jump over the pot blocking the way The rest is code cleanup * Fully update dungeonColor.py to LADXR-live (#28) Logic changes: - Normal logic: Karakoros now need power bracelet to put them into their holes - Hard logic: Karakoros without power bracelet but with weapon - Hell logic: Karakoros with only bombs Everything else is code cleanup * Updating overworld.py (#29) * Updating overworld.py This tries to update all logic of the Overworld. Logic changes include: - Normal logic: requires hookshot or shield to traverse Armos Cave - Hard logic: Traverse Armos Cave with nothing (formerly normal logic) - Hard logic: get the animal village bomb cave check with jump and boomerang - Hard logic: use rooster to go to D7 - Lots of Jesus Rooster Jumps I stopped counting and need to go over this again. Also, please investigate line 474 AP because it's removed in LADXR-Upstream and I don't know why. * remove featherless fisher under bridge from hard it was moved to hell upstream and its already present in our code --------- Co-authored-by: Alex Nordstrom * fixes * add test messages * Adds Pegasus Boots to the test (#31) * Fix d6 boss_key logic (#30) * restore hardmode logic * higher logic fixes * add bush requirement to the raft in case the player needs to farm rupees to play again --------- Co-authored-by: palex00 <32203971+palex00@users.noreply.github.com> --- worlds/ladx/LADXR/logic/dungeon1.py | 15 +- worlds/ladx/LADXR/logic/dungeon2.py | 14 +- worlds/ladx/LADXR/logic/dungeon3.py | 38 ++-- worlds/ladx/LADXR/logic/dungeon4.py | 44 ++-- worlds/ladx/LADXR/logic/dungeon5.py | 49 ++--- worlds/ladx/LADXR/logic/dungeon6.py | 36 ++-- worlds/ladx/LADXR/logic/dungeon7.py | 35 +-- worlds/ladx/LADXR/logic/dungeon8.py | 50 +++-- worlds/ladx/LADXR/logic/dungeonColor.py | 16 +- worlds/ladx/LADXR/logic/overworld.py | 274 ++++++++++++++---------- worlds/ladx/LADXR/logic/requirements.py | 72 ++++++- worlds/ladx/test/TestDungeonLogic.py | 26 +-- 12 files changed, 399 insertions(+), 270 deletions(-) diff --git a/worlds/ladx/LADXR/logic/dungeon1.py b/worlds/ladx/LADXR/logic/dungeon1.py index 82321a1c0d65..645c50d1d5e5 100644 --- a/worlds/ladx/LADXR/logic/dungeon1.py +++ b/worlds/ladx/LADXR/logic/dungeon1.py @@ -9,7 +9,7 @@ def __init__(self, options, world_setup, r): entrance.add(DungeonChest(0x113), DungeonChest(0x115), DungeonChest(0x10E)) Location(dungeon=1).add(DroppedKey(0x116)).connect(entrance, OR(BOMB, r.push_hardhat)) # hardhat beetles (can kill with bomb) Location(dungeon=1).add(DungeonChest(0x10D)).connect(entrance, OR(r.attack_hookshot_powder, SHIELD)) # moldorm spawn chest - stalfos_keese_room = Location(dungeon=1).add(DungeonChest(0x114)).connect(entrance, r.attack_hookshot) # 2 stalfos 2 keese room + stalfos_keese_room = Location(dungeon=1).add(DungeonChest(0x114)).connect(entrance, AND(OR(r.attack_skeleton, SHIELD),r.attack_hookshot_powder)) # 2 stalfos 2 keese room Location(dungeon=1).add(DungeonChest(0x10C)).connect(entrance, BOMB) # hidden seashell room dungeon1_upper_left = Location(dungeon=1).connect(entrance, AND(KEY1, FOUND(KEY1, 3))) if options.owlstatues == "both" or options.owlstatues == "dungeon": @@ -19,21 +19,22 @@ def __init__(self, options, world_setup, r): dungeon1_right_side = Location(dungeon=1).connect(entrance, AND(KEY1, FOUND(KEY1, 3))) if options.owlstatues == "both" or options.owlstatues == "dungeon": Location(dungeon=1).add(OwlStatue(0x10A)).connect(dungeon1_right_side, STONE_BEAK1) - Location(dungeon=1).add(DungeonChest(0x10A)).connect(dungeon1_right_side, OR(r.attack_hookshot, SHIELD)) # three of a kind, shield stops the suit from changing + dungeon1_3_of_a_kind = Location(dungeon=1).add(DungeonChest(0x10A)).connect(dungeon1_right_side, OR(r.attack_hookshot_no_bomb, SHIELD)) # three of a kind, shield stops the suit from changing dungeon1_miniboss = Location(dungeon=1).connect(dungeon1_right_side, AND(r.miniboss_requirements[world_setup.miniboss_mapping[0]], FEATHER)) dungeon1_boss = Location(dungeon=1).connect(dungeon1_miniboss, NIGHTMARE_KEY1) - Location(dungeon=1).add(HeartContainer(0x106), Instrument(0x102)).connect(dungeon1_boss, r.boss_requirements[world_setup.boss_mapping[0]]) + boss = Location(dungeon=1).add(HeartContainer(0x106), Instrument(0x102)).connect(dungeon1_boss, r.boss_requirements[world_setup.boss_mapping[0]]) - if options.logic not in ('normal', 'casual'): + if options.logic == 'hard' or options.logic == 'glitched' or options.logic == 'hell': stalfos_keese_room.connect(entrance, r.attack_hookshot_powder) # stalfos jump away when you press a button. - + dungeon1_3_of_a_kind.connect(dungeon1_right_side, BOMB) # use timed bombs to match the 3 of a kinds + if options.logic == 'glitched' or options.logic == 'hell': - boss_key.connect(entrance, FEATHER) # super jump + boss_key.connect(entrance, r.super_jump_feather) # super jump dungeon1_miniboss.connect(dungeon1_right_side, r.miniboss_requirements[world_setup.miniboss_mapping[0]]) # damage boost or buffer pause over the pit to cross or mushroom if options.logic == 'hell': feather_chest.connect(dungeon1_upper_left, SWORD) # keep slashing the spiked beetles until they keep moving 1 pixel close towards you and the pit, to get them to fall - boss_key.connect(entrance, FOUND(KEY1,3)) # damage boost off the hardhat to cross the pit + boss_key.connect(entrance, AND(r.damage_boost, FOUND(KEY1,3))) # damage boost off the hardhat to cross the pit self.entrance = entrance diff --git a/worlds/ladx/LADXR/logic/dungeon2.py b/worlds/ladx/LADXR/logic/dungeon2.py index 3bb95edbc8bd..6ee6cc4a8020 100644 --- a/worlds/ladx/LADXR/logic/dungeon2.py +++ b/worlds/ladx/LADXR/logic/dungeon2.py @@ -14,7 +14,7 @@ def __init__(self, options, world_setup, r): Location(dungeon=2).add(DungeonChest(0x137)).connect(dungeon2_r2, AND(KEY2, FOUND(KEY2, 5), OR(r.rear_attack, r.rear_attack_range))) # compass chest if options.owlstatues == "both" or options.owlstatues == "dungeon": Location(dungeon=2).add(OwlStatue(0x133)).connect(dungeon2_r2, STONE_BEAK2) - dungeon2_r3 = Location(dungeon=2).add(DungeonChest(0x138)).connect(dungeon2_r2, r.attack_hookshot) # first chest with key, can hookshot the switch in previous room + dungeon2_r3 = Location(dungeon=2).add(DungeonChest(0x138)).connect(dungeon2_r2, r.hit_switch) # first chest with key, can hookshot the switch in previous room dungeon2_r4 = Location(dungeon=2).add(DungeonChest(0x139)).connect(dungeon2_r3, FEATHER) # button spawn chest if options.logic == "casual": shyguy_key_drop = Location(dungeon=2).add(DroppedKey(0x134)).connect(dungeon2_r3, AND(FEATHER, OR(r.rear_attack, r.rear_attack_range))) # shyguy drop key @@ -39,16 +39,16 @@ def __init__(self, options, world_setup, r): if options.logic == 'glitched' or options.logic == 'hell': dungeon2_ghosts_chest.connect(dungeon2_ghosts_room, SWORD) # use sword to spawn ghosts on other side of the room so they run away (logically irrelevant because of torches at start) - dungeon2_r6.connect(miniboss, FEATHER) # superjump to staircase next to hinox. + dungeon2_r6.connect(miniboss, r.super_jump_feather) # superjump to staircase next to hinox. if options.logic == 'hell': - dungeon2_map_chest.connect(dungeon2_l2, AND(r.attack_hookshot_powder, PEGASUS_BOOTS)) # use boots to jump over the pits - dungeon2_r4.connect(dungeon2_r3, OR(PEGASUS_BOOTS, HOOKSHOT)) # can use both pegasus boots bonks or hookshot spam to cross the pit room + dungeon2_map_chest.connect(dungeon2_l2, AND(r.attack_hookshot_powder, r.boots_bonk_pit)) # use boots to jump over the pits + dungeon2_r4.connect(dungeon2_r3, OR(r.boots_bonk_pit, r.hookshot_spam_pit)) # can use both pegasus boots bonks or hookshot spam to cross the pit room dungeon2_r4.connect(shyguy_key_drop, r.rear_attack_range, one_way=True) # adjust for alternate requirements for dungeon2_r4 - miniboss.connect(dungeon2_r5, AND(PEGASUS_BOOTS, r.miniboss_requirements[world_setup.miniboss_mapping[1]])) # use boots to dash over the spikes in the 2d section + miniboss.connect(dungeon2_r5, AND(r.boots_dash_2d, r.miniboss_requirements[world_setup.miniboss_mapping[1]])) # use boots to dash over the spikes in the 2d section dungeon2_pre_stairs_boss.connect(dungeon2_r6, AND(HOOKSHOT, OR(BOW, BOMB, MAGIC_ROD, AND(OCARINA, SONG1)), FOUND(KEY2, 5))) # hookshot clip through the pot using both pol's voice - dungeon2_post_stairs_boss.connect(dungeon2_pre_stairs_boss, OR(BOMB, AND(PEGASUS_BOOTS, FEATHER))) # use a bomb to lower the last platform, or boots + feather to cross over top (only relevant in hell logic) - dungeon2_pre_boss.connect(dungeon2_post_stairs_boss, AND(PEGASUS_BOOTS, HOOKSHOT)) # boots bonk off bottom wall + hookshot spam across the two 1 tile pits vertically + dungeon2_post_stairs_boss.connect(dungeon2_pre_stairs_boss, OR(BOMB, r.boots_jump)) # use a bomb to lower the last platform, or boots + feather to cross over top (only relevant in hell logic) + dungeon2_pre_boss.connect(dungeon2_post_stairs_boss, AND(r.boots_bonk_pit, r.hookshot_spam_pit)) # boots bonk off bottom wall + hookshot spam across the two 1 tile pits vertically self.entrance = entrance diff --git a/worlds/ladx/LADXR/logic/dungeon3.py b/worlds/ladx/LADXR/logic/dungeon3.py index e65c7da0bafc..33782be16c87 100644 --- a/worlds/ladx/LADXR/logic/dungeon3.py +++ b/worlds/ladx/LADXR/logic/dungeon3.py @@ -20,8 +20,8 @@ def __init__(self, options, world_setup, r): Location(dungeon=3).add(OwlStatue(0x154)).connect(area_up, STONE_BEAK3) dungeon3_raised_blocks_north = Location(dungeon=3).add(DungeonChest(0x14C)) # chest locked behind raised blocks near staircase dungeon3_raised_blocks_east = Location(dungeon=3).add(DungeonChest(0x150)) # chest locked behind raised blocks next to slime chest - area_up.connect(dungeon3_raised_blocks_north, r.attack_hookshot, one_way=True) # hit switch to reach north chest - area_up.connect(dungeon3_raised_blocks_east, r.attack_hookshot, one_way=True) # hit switch to reach east chest + area_up.connect(dungeon3_raised_blocks_north, r.hit_switch, one_way=True) # hit switch to reach north chest + area_up.connect(dungeon3_raised_blocks_east, r.hit_switch, one_way=True) # hit switch to reach east chest area_left = Location(dungeon=3).connect(area3, AND(KEY3, FOUND(KEY3, 8))) area_left_key_drop = Location(dungeon=3).add(DroppedKey(0x155)).connect(area_left, r.attack_hookshot) # west key drop (no longer requires feather to get across hole), can use boomerang to knock owls into pit @@ -54,28 +54,30 @@ def __init__(self, options, world_setup, r): if options.logic == 'hard' or options.logic == 'glitched' or options.logic == 'hell': dungeon3_3_bombite_room.connect(area_right, BOOMERANG) # 3 bombite room from the left side, grab item with boomerang - dungeon3_reverse_eye.connect(entrance, HOOKSHOT) # hookshot the chest to get to the right side - dungeon3_north_key_drop.connect(area_up, POWER_BRACELET) # use pots to kill the enemies - dungeon3_south_key_drop.connect(area_down, POWER_BRACELET) # use pots to kill enemies + dungeon3_reverse_eye.connect(entrance, r.hookshot_over_pit) # hookshot the chest to get to the right side + dungeon3_north_key_drop.connect(area_up, r.throw_pot) # use pots to kill the enemies + dungeon3_south_key_drop.connect(area_down, r.throw_pot) # use pots to kill enemies + area_up.connect(dungeon3_raised_blocks_north, r.throw_pot, one_way=True) # use pots to hit the switch + area_up.connect(dungeon3_raised_blocks_east, AND(r.throw_pot, r.attack_hookshot_powder), one_way=True) # use pots to hit the switch if options.logic == 'glitched' or options.logic == 'hell': - area2.connect(dungeon3_raised_blocks_east, AND(r.attack_hookshot_powder, FEATHER), one_way=True) # use superjump to get over the bottom left block - area3.connect(dungeon3_raised_blocks_north, AND(OR(PEGASUS_BOOTS, HOOKSHOT), FEATHER), one_way=True) # use shagjump (unclipped superjump next to movable block) from north wall to get on the blocks. Instead of boots can also get to that area with a hookshot clip past the movable block - area3.connect(dungeon3_zol_stalfos, HOOKSHOT, one_way=True) # hookshot clip through the northern push block next to raised blocks chest to get to the zol - dungeon3_nightmare_key_chest.connect(area_right, AND(FEATHER, BOMB)) # superjump to right side 3 gap via top wall and jump the 2 gap - dungeon3_post_dodongo_chest.connect(area_right, AND(FEATHER, FOUND(KEY3, 6))) # superjump from keyblock path. use 2 keys to open enough blocks TODO: nag messages to skip a key + area2.connect(dungeon3_raised_blocks_east, AND(r.attack_hookshot_powder, r.super_jump_feather), one_way=True) # use superjump to get over the bottom left block + area3.connect(dungeon3_raised_blocks_north, AND(OR(PEGASUS_BOOTS, r.hookshot_clip_block), r.shaq_jump), one_way=True) # use shagjump (unclipped superjump next to movable block) from north wall to get on the blocks. Instead of boots can also get to that area with a hookshot clip past the movable block + area3.connect(dungeon3_zol_stalfos, r.hookshot_clip_block, one_way=True) # hookshot clip through the northern push block next to raised blocks chest to get to the zol + dungeon3_nightmare_key_chest.connect(area_right, AND(r.super_jump_feather, BOMB)) # superjump to right side 3 gap via top wall and jump the 2 gap + dungeon3_post_dodongo_chest.connect(area_right, AND(r.super_jump_feather, FOUND(KEY3, 6))) # superjump from keyblock path. use 2 keys to open enough blocks TODO: nag messages to skip a key if options.logic == 'hell': - area2.connect(dungeon3_raised_blocks_east, AND(PEGASUS_BOOTS, OR(BOW, MAGIC_ROD)), one_way=True) # use boots superhop to get over the bottom left block - area3.connect(dungeon3_raised_blocks_north, AND(PEGASUS_BOOTS, OR(BOW, MAGIC_ROD)), one_way=True) # use boots superhop off top wall or left wall to get on raised blocks - area_up.connect(dungeon3_zol_stalfos, AND(FEATHER, OR(BOW, MAGIC_ROD, SWORD)), one_way=True) # use superjump near top blocks chest to get to zol without boots, keep wall clip on right wall to get a clip on left wall or use obstacles - area_left_key_drop.connect(area_left, SHIELD) # knock everything into the pit including the teleporting owls - dungeon3_south_key_drop.connect(area_down, SHIELD) # knock everything into the pit including the teleporting owls - dungeon3_nightmare_key_chest.connect(area_right, AND(FEATHER, SHIELD)) # superjump into jumping stalfos and shield bump to right ledge - dungeon3_nightmare_key_chest.connect(area_right, AND(BOMB, PEGASUS_BOOTS, HOOKSHOT)) # boots bonk across the pits with pit buffering and hookshot to the chest + area2.connect(dungeon3_raised_blocks_east, r.boots_superhop, one_way=True) # use boots superhop to get over the bottom left block + area3.connect(dungeon3_raised_blocks_north, r.boots_superhop, one_way=True) # use boots superhop off top wall or left wall to get on raised blocks + area_up.connect(dungeon3_zol_stalfos, AND(r.super_jump_feather, r.attack_skeleton), one_way=True) # use superjump near top blocks chest to get to zol without boots, keep wall clip on right wall to get a clip on left wall or use obstacles + area_left_key_drop.connect(area_left, r.shield_bump) # knock everything into the pit including the teleporting owls + dungeon3_south_key_drop.connect(area_down, r.shield_bump) # knock everything into the pit including the teleporting owls + dungeon3_nightmare_key_chest.connect(area_right, AND(r.super_jump_feather, r.shield_bump)) # superjump into jumping stalfos and shield bump to right ledge + dungeon3_nightmare_key_chest.connect(area_right, AND(BOMB, r.pit_buffer_boots, HOOKSHOT)) # boots bonk across the pits with pit buffering and hookshot to the chest compass_chest.connect(dungeon3_3_bombite_room, OR(BOW, MAGIC_ROD, AND(OR(FEATHER, PEGASUS_BOOTS), OR(SWORD, MAGIC_POWDER))), one_way=True) # 3 bombite room from the left side, use a bombite to blow open the wall without bombs pre_boss.connect(towards_boss4, AND(r.attack_no_boomerang, FEATHER, POWER_BRACELET)) # use bracelet super bounce glitch to pass through first part underground section - pre_boss.connect(towards_boss4, AND(r.attack_no_boomerang, PEGASUS_BOOTS, "MEDICINE2")) # use medicine invulnerability to pass through the 2d section with a boots bonk to reach the staircase + pre_boss.connect(towards_boss4, AND(r.attack_no_boomerang, r.boots_bonk_2d_spikepit)) # use medicine invulnerability to pass through the 2d section with a boots bonk to reach the staircase self.entrance = entrance diff --git a/worlds/ladx/LADXR/logic/dungeon4.py b/worlds/ladx/LADXR/logic/dungeon4.py index 7d71c89f0c86..a7e06557fa12 100644 --- a/worlds/ladx/LADXR/logic/dungeon4.py +++ b/worlds/ladx/LADXR/logic/dungeon4.py @@ -42,32 +42,36 @@ def __init__(self, options, world_setup, r): boss = Location(dungeon=4).add(HeartContainer(0x166), Instrument(0x162)).connect(before_boss, AND(NIGHTMARE_KEY4, r.boss_requirements[world_setup.boss_mapping[3]])) if options.logic == 'hard' or options.logic == 'glitched' or options.logic == 'hell': - sidescroller_key.connect(before_miniboss, AND(FEATHER, BOOMERANG)) # grab the key jumping over the water and boomerang downwards - sidescroller_key.connect(before_miniboss, AND(POWER_BRACELET, FLIPPERS)) # kill the zols with the pots in the room to spawn the key - rightside_crossroads.connect(entrance, FEATHER) # jump across the corners - puddle_crack_block_chest.connect(rightside_crossroads, FEATHER) # jump around the bombable block - north_crossroads.connect(entrance, FEATHER) # jump across the corners - after_double_lock.connect(entrance, FEATHER) # jump across the corners - dungeon4_puddle_before_crossroads.connect(after_double_lock, FEATHER) # With a tight jump feather is enough to cross the puddle without flippers - center_puddle_chest.connect(before_miniboss, FEATHER) # With a tight jump feather is enough to cross the puddle without flippers + sidescroller_key.connect(before_miniboss, BOOMERANG) # fall off the bridge and boomerang downwards before hitting the water to grab the item + sidescroller_key.connect(before_miniboss, AND(r.throw_pot, FLIPPERS)) # kill the zols with the pots in the room to spawn the key + rightside_crossroads.connect(entrance, r.tight_jump) # jump across the corners + puddle_crack_block_chest.connect(rightside_crossroads, r.tight_jump) # jump around the bombable block + north_crossroads.connect(entrance, r.tight_jump) # jump across the corners + after_double_lock.connect(entrance, r.tight_jump) # jump across the corners + dungeon4_puddle_before_crossroads.connect(after_double_lock, r.tight_jump) # With a tight jump feather is enough to cross the puddle without flippers + center_puddle_chest.connect(before_miniboss, r.tight_jump) # With a tight jump feather is enough to cross the puddle without flippers miniboss = Location(dungeon=4).connect(terrace_zols_chest, None, one_way=True) # reach flippers chest through the miniboss room without pulling the lever - to_the_nightmare_key.connect(left_water_area, FEATHER) # With a tight jump feather is enough to reach the top left switch without flippers, or use flippers for puzzle and boots to get through 2d section - before_boss.connect(left_water_area, FEATHER) # jump to the bottom right corner of boss door room + to_the_nightmare_key.connect(left_water_area, r.tight_jump) # With a tight jump feather is enough to reach the top left switch without flippers, or use flippers for puzzle and boots to get through 2d section + before_boss.connect(left_water_area, r.tight_jump) # jump to the bottom right corner of boss door room if options.logic == 'glitched' or options.logic == 'hell': - pushable_block_chest.connect(rightside_crossroads, FLIPPERS) # sideways block push to skip bombs - sidescroller_key.connect(before_miniboss, AND(FEATHER, OR(r.attack_hookshot_powder, POWER_BRACELET))) # superjump into the hole to grab the key while falling into the water - miniboss.connect(before_miniboss, FEATHER) # use jesus jump to transition over the water left of miniboss + pushable_block_chest.connect(rightside_crossroads, AND(r.sideways_block_push, FLIPPERS)) # sideways block push to skip bombs + sidescroller_key.connect(before_miniboss, AND(r.super_jump_feather, OR(r.attack_hookshot_powder, r.throw_pot))) # superjump into the hole to grab the key while falling into the water + miniboss.connect(before_miniboss, r.jesus_jump) # use jesus jump to transition over the water left of miniboss if options.logic == 'hell': - rightside_crossroads.connect(entrance, AND(PEGASUS_BOOTS, HOOKSHOT)) # pit buffer into the wall of the first pit, then boots bonk across the center, hookshot to get to the rightmost pit to a second villa buffer on the rightmost pit - pushable_block_chest.connect(rightside_crossroads, OR(PEGASUS_BOOTS, FEATHER)) # use feather to water clip into the top right corner of the bombable block, and sideways block push to gain access. Can boots bonk of top right wall, then water buffer to top of chest and boots bonk to water buffer next to chest - after_double_lock.connect(double_locked_room, AND(FOUND(KEY4, 4), PEGASUS_BOOTS), one_way=True) # use boots bonks to cross the water gaps + rightside_crossroads.connect(entrance, AND(r.pit_buffer_boots, r.hookshot_spam_pit)) # pit buffer into the wall of the first pit, then boots bonk across the center, hookshot to get to the rightmost pit to a second villa buffer on the rightmost pit + rightside_crossroads.connect(after_double_lock, AND(OR(BOMB, BOW), r.hookshot_clip_block)) # split zols for more entities, and clip through the block against the right wall + pushable_block_chest.connect(rightside_crossroads, AND(r.sideways_block_push, OR(r.jesus_buffer, r.jesus_jump))) # use feather to water clip into the top right corner of the bombable block, and sideways block push to gain access. Can boots bonk of top right wall, then water buffer to top of chest and boots bonk to water buffer next to chest + after_double_lock.connect(double_locked_room, AND(FOUND(KEY4, 4), r.pit_buffer_boots), one_way=True) # use boots bonks to cross the water gaps + after_double_lock.connect(entrance, r.pit_buffer_boots) # boots bonk + pit buffer to the bottom + after_double_lock.connect(entrance, AND(r.pit_buffer, r.hookshot_spam_pit)) # hookshot spam over the first pit of crossroads, then buffer down + dungeon4_puddle_before_crossroads.connect(after_double_lock, AND(r.pit_buffer_boots, HOOKSHOT)) # boots bonk across the water bottom wall to the bottom left corner, then hookshot up north_crossroads.connect(entrance, AND(PEGASUS_BOOTS, HOOKSHOT)) # pit buffer into wall of the first pit, then boots bonk towards the top and hookshot spam to get across (easier with Piece of Power) - after_double_lock.connect(entrance, PEGASUS_BOOTS) # boots bonk + pit buffer to the bottom - dungeon4_puddle_before_crossroads.connect(after_double_lock, AND(PEGASUS_BOOTS, HOOKSHOT)) # boots bonk across the water bottom wall to the bottom left corner, then hookshot up - to_the_nightmare_key.connect(left_water_area, AND(FLIPPERS, PEGASUS_BOOTS)) # Use flippers for puzzle and boots bonk to get through 2d section - before_boss.connect(left_water_area, PEGASUS_BOOTS) # boots bonk across bottom wall then boots bonk to the platform before boss door + before_miniboss.connect(north_crossroads, AND(r.shaq_jump, r.hookshot_clip_block)) # push block left of keyblock up, then shaq jump off the left wall and pause buffer to land on keyblock. + before_miniboss.connect(north_crossroads, AND(OR(BOMB, BOW), r.hookshot_clip_block)) # split zol for more entities, and clip through the block left of keyblock by hookshot spam + to_the_nightmare_key.connect(left_water_area, AND(FLIPPERS, r.boots_bonk)) # use flippers for puzzle and boots bonk to get through 2d section + before_boss.connect(left_water_area, r.pit_buffer_boots) # boots bonk across bottom wall then boots bonk to the platform before boss door self.entrance = entrance diff --git a/worlds/ladx/LADXR/logic/dungeon5.py b/worlds/ladx/LADXR/logic/dungeon5.py index b8e013066c50..b61e48e255d0 100644 --- a/worlds/ladx/LADXR/logic/dungeon5.py +++ b/worlds/ladx/LADXR/logic/dungeon5.py @@ -39,43 +39,44 @@ def __init__(self, options, world_setup, r): if options.logic == 'hard' or options.logic == 'glitched' or options.logic == 'hell': blade_trap_chest.connect(area2, AND(FEATHER, r.attack_hookshot_powder)) # jump past the blade traps - boss_key.connect(after_stalfos, AND(FLIPPERS, FEATHER, PEGASUS_BOOTS)) # boots jump across + boss_key.connect(after_stalfos, AND(FLIPPERS, r.boots_jump)) # boots jump across after_stalfos.connect(after_keyblock_boss, AND(FEATHER, r.attack_hookshot_powder)) # circumvent stalfos by going past gohma and backwards from boss door if butterfly_owl: - butterfly_owl.connect(after_stalfos, AND(PEGASUS_BOOTS, STONE_BEAK5)) # boots charge + bonk to cross 2d bridge - after_stalfos.connect(staircase_before_boss, AND(PEGASUS_BOOTS, r.attack_hookshot_powder), one_way=True) # pathway from stalfos to staircase: boots charge + bonk to cross bridge, past butterfly room and push the block - staircase_before_boss.connect(post_gohma, AND(PEGASUS_BOOTS, HOOKSHOT)) # boots bonk in 2d section to skip feather - north_of_crossroads.connect(after_stalfos, HOOKSHOT) # hookshot to the right block to cross pits - first_bridge_chest.connect(north_of_crossroads, FEATHER) # tight jump from bottom wall clipped to make it over the pits + butterfly_owl.connect(after_stalfos, AND(r.boots_bonk, STONE_BEAK5)) # boots charge + bonk to cross 2d bridge + after_stalfos.connect(staircase_before_boss, AND(r.boots_bonk, r.attack_hookshot_powder), one_way=True) # pathway from stalfos to staircase: boots charge + bonk to cross bridge, past butterfly room and push the block + staircase_before_boss.connect(post_gohma, AND(r.boots_bonk, HOOKSHOT)) # boots bonk in 2d section to skip feather + north_of_crossroads.connect(after_stalfos, r.hookshot_over_pit) # hookshot to the right block to cross pits + first_bridge_chest.connect(north_of_crossroads, AND(r.wall_clip, r.tight_jump)) # tight jump from bottom wall clipped to make it over the pits after_keyblock_boss.connect(after_stalfos, AND(FEATHER, r.attack_hookshot_powder)) # jump from bottom left to top right, skipping the keyblock - before_boss.connect(after_stalfos, AND(FEATHER, PEGASUS_BOOTS, r.attack_hookshot_powder)) # cross pits room from bottom left to top left with boots jump + before_boss.connect(after_stalfos, AND(r.boots_jump, r.attack_hookshot_powder)) # cross pits room from bottom left to top left with boots jump if options.logic == 'glitched' or options.logic == 'hell': - start_hookshot_chest.connect(entrance, FEATHER) # 1 pit buffer to clip bottom wall and jump across the pits + start_hookshot_chest.connect(entrance, r.pit_buffer) # 1 pit buffer to clip bottom wall and jump across the pits post_gohma.connect(area2, HOOKSHOT) # glitch through the blocks/pots with hookshot. Zoomerang can be used but has no logical implications because of 2d section requiring hookshot - north_bridge_chest.connect(north_of_crossroads, FEATHER) # 1 pit buffer to clip bottom wall and jump across the pits - east_bridge_chest.connect(first_bridge_chest, FEATHER) # 1 pit buffer to clip bottom wall and jump across the pits - #after_stalfos.connect(staircase_before_boss, AND(FEATHER, OR(SWORD, BOW, MAGIC_ROD))) # use the keyblock to get a wall clip in right wall to perform a superjump over the pushable block TODO: nagmessages - after_stalfos.connect(staircase_before_boss, AND(PEGASUS_BOOTS, FEATHER, OR(SWORD, BOW, MAGIC_ROD))) # charge a boots dash in bottom right corner to the right, jump before hitting the wall and use weapon to the left side before hitting the wall + north_bridge_chest.connect(north_of_crossroads, r.pit_buffer) # 1 pit buffer to clip bottom wall and jump across the pits + east_bridge_chest.connect(first_bridge_chest, r.pit_buffer) # 1 pit buffer to clip bottom wall and jump across the pits + #after_stalfos.connect(staircase_before_boss, AND(r.text_clip, r.super_jump)) # use the keyblock to get a wall clip in right wall to perform a superjump over the pushable block + after_stalfos.connect(staircase_before_boss, r.super_jump_boots) # charge a boots dash in bottom right corner to the right, jump before hitting the wall and use weapon to the left side before hitting the wall if options.logic == 'hell': - start_hookshot_chest.connect(entrance, PEGASUS_BOOTS) # use pit buffer to clip into the bottom wall and boots bonk off the wall again - fourth_stalfos_area.connect(compass, AND(PEGASUS_BOOTS, SWORD)) # do an incredibly hard boots bonk setup to get across the hanging platforms in the 2d section - blade_trap_chest.connect(area2, AND(PEGASUS_BOOTS, r.attack_hookshot_powder)) # boots bonk + pit buffer past the blade traps + start_hookshot_chest.connect(entrance, r.pit_buffer_boots) # use pit buffer to clip into the bottom wall and boots bonk off the wall again + fourth_stalfos_area.connect(compass, AND(r.boots_bonk_2d_hell, SWORD)) # do an incredibly hard boots bonk setup to get across the hanging platforms in the 2d section + blade_trap_chest.connect(area2, AND(r.pit_buffer_boots, r.attack_hookshot_powder)) # boots bonk + pit buffer past the blade traps post_gohma.connect(area2, AND(PEGASUS_BOOTS, FEATHER, POWER_BRACELET, r.attack_hookshot_powder)) # use boots jump in room with 2 zols + flying arrows to pit buffer above pot, then jump across. Sideways block push + pick up pots to reach post_gohma - staircase_before_boss.connect(post_gohma, AND(PEGASUS_BOOTS, FEATHER)) # to pass 2d section, tight jump on left screen: hug left wall on little platform, then dash right off platform and jump while in midair to bonk against right wall - after_stalfos.connect(staircase_before_boss, AND(FEATHER, SWORD)) # unclipped superjump in bottom right corner of staircase before boss room, jumping left over the pushable block. reverse is push block + staircase_before_boss.connect(post_gohma, r.boots_jump) # to pass 2d section, tight jump on left screen: hug left wall on little platform, then dash right off platform and jump while in midair to bonk against right wall + after_stalfos.connect(staircase_before_boss, r.super_jump_sword) # unclipped superjump in bottom right corner of staircase before boss room, jumping left over the pushable block. reverse is push block after_stalfos.connect(area2, SWORD) # knock master stalfos down 255 times (about 23 minutes) - north_bridge_chest.connect(north_of_crossroads, PEGASUS_BOOTS) # boots bonk across the pits with pit buffering - first_bridge_chest.connect(north_of_crossroads, PEGASUS_BOOTS) # get to first chest via the north chest with pit buffering - east_bridge_chest.connect(first_bridge_chest, PEGASUS_BOOTS) # boots bonk across the pits with pit buffering + after_stalfos.connect(staircase_before_boss, r.zoomerang) # use zoomerang dashing left to get an unclipped boots superjump off the right wall over the block. reverse is push block + north_bridge_chest.connect(north_of_crossroads, r.boots_bonk_pit) # boots bonk across the pits with pit buffering + first_bridge_chest.connect(north_of_crossroads, r.boots_bonk_pit) # get to first chest via the north chest with pit buffering + east_bridge_chest.connect(first_bridge_chest, r.boots_bonk_pit) # boots bonk across the pits with pit buffering third_arena.connect(north_of_crossroads, SWORD) # can beat 3rd m.stalfos with 255 sword spins m_stalfos_drop.connect(third_arena, AND(FEATHER, SWORD)) # beat master stalfos by knocking it down 255 times x 4 (takes about 1.5h total) - m_stalfos_drop.connect(third_arena, AND(PEGASUS_BOOTS, SWORD)) # can reach fourth arena from entrance with pegasus boots and sword - boss_key.connect(after_stalfos, FLIPPERS) # pit buffer across + m_stalfos_drop.connect(third_arena, AND(r.boots_bonk_2d_hell, SWORD)) # can reach fourth arena from entrance with pegasus boots and sword + boss_key.connect(after_stalfos, AND(r.pit_buffer_itemless, FLIPPERS)) # pit buffer across if butterfly_owl: - after_keyblock_boss.connect(butterfly_owl, STONE_BEAK5, one_way=True) # pit buffer from top right to bottom in right pits room - before_boss.connect(after_stalfos, AND(FEATHER, SWORD)) # cross pits room from bottom left to top left by unclipped superjump on bottom wall on top of side wall, then jump across + after_keyblock_boss.connect(butterfly_owl, AND(r.pit_buffer_itemless, STONE_BEAK5), one_way=True) # pit buffer from top right to bottom in right pits room + before_boss.connect(after_stalfos, r.super_jump_sword) # cross pits room from bottom left to top left by unclipped superjump on bottom wall on top of side wall, then jump across self.entrance = entrance diff --git a/worlds/ladx/LADXR/logic/dungeon6.py b/worlds/ladx/LADXR/logic/dungeon6.py index d67138b334a6..cde40a6b2df4 100644 --- a/worlds/ladx/LADXR/logic/dungeon6.py +++ b/worlds/ladx/LADXR/logic/dungeon6.py @@ -6,8 +6,8 @@ class Dungeon6: def __init__(self, options, world_setup, r, *, raft_game_chest=True): entrance = Location(dungeon=6) - Location(dungeon=6).add(DungeonChest(0x1CF)).connect(entrance, OR(BOMB, BOW, MAGIC_ROD, COUNT(POWER_BRACELET, 2))) # 50 rupees - Location(dungeon=6).add(DungeonChest(0x1C9)).connect(entrance, COUNT(POWER_BRACELET, 2)) # 100 rupees start + Location(dungeon=6).add(DungeonChest(0x1CF)).connect(entrance, OR(r.attack_wizrobe, COUNT(POWER_BRACELET, 2))) # 50 rupees + elephants_heart_chest = Location(dungeon=6).add(DungeonChest(0x1C9)).connect(entrance, COUNT(POWER_BRACELET, 2)) # 100 rupees start if options.owlstatues == "both" or options.owlstatues == "dungeon": Location(dungeon=6).add(OwlStatue(0x1BB)).connect(entrance, STONE_BEAK6) @@ -15,9 +15,9 @@ def __init__(self, options, world_setup, r, *, raft_game_chest=True): bracelet_chest = Location(dungeon=6).add(DungeonChest(0x1CE)).connect(entrance, AND(BOMB, FEATHER)) # left side - Location(dungeon=6).add(DungeonChest(0x1C0)).connect(entrance, AND(POWER_BRACELET, OR(BOMB, BOW, MAGIC_ROD))) # 3 wizrobes raised blocks dont need to hit the switch + Location(dungeon=6).add(DungeonChest(0x1C0)).connect(entrance, AND(POWER_BRACELET, r.attack_wizrobe)) # 3 wizrobes raised blocks don't need to hit the switch left_side = Location(dungeon=6).add(DungeonChest(0x1B9)).add(DungeonChest(0x1B3)).connect(entrance, AND(POWER_BRACELET, OR(BOMB, BOOMERANG))) - Location(dungeon=6).add(DroppedKey(0x1B4)).connect(left_side, OR(BOMB, BOW, MAGIC_ROD)) # 2 wizrobe drop key + Location(dungeon=6).add(DroppedKey(0x1B4)).connect(left_side, OR(r.attack_wizrobe, BOW)) # 2 wizrobe drop key, allow bow as only 2 top_left = Location(dungeon=6).add(DungeonChest(0x1B0)).connect(left_side, COUNT(POWER_BRACELET, 2)) # top left chest horseheads if raft_game_chest: Location().add(Chest(0x06C)).connect(top_left, POWER_BRACELET) # seashell chest in raft game @@ -25,14 +25,15 @@ def __init__(self, options, world_setup, r, *, raft_game_chest=True): # right side to_miniboss = Location(dungeon=6).connect(entrance, KEY6) miniboss = Location(dungeon=6).connect(to_miniboss, AND(BOMB, r.miniboss_requirements[world_setup.miniboss_mapping[5]])) - lower_right_side = Location(dungeon=6).add(DungeonChest(0x1BE)).connect(entrance, AND(OR(BOMB, BOW, MAGIC_ROD), COUNT(POWER_BRACELET, 2))) # waterway key + lower_right_side = Location(dungeon=6).add(DungeonChest(0x1BE)).connect(entrance, AND(r.attack_wizrobe, COUNT(POWER_BRACELET, 2))) # waterway key medicine_chest = Location(dungeon=6).add(DungeonChest(0x1D1)).connect(lower_right_side, FEATHER) # ledge chest medicine if options.owlstatues == "both" or options.owlstatues == "dungeon": lower_right_owl = Location(dungeon=6).add(OwlStatue(0x1D7)).connect(lower_right_side, AND(POWER_BRACELET, STONE_BEAK6)) center_1 = Location(dungeon=6).add(DroppedKey(0x1C3)).connect(miniboss, AND(COUNT(POWER_BRACELET, 2), FEATHER)) # tile room key drop - center_2_and_upper_right_side = Location(dungeon=6).add(DungeonChest(0x1B1)).connect(center_1, AND(KEY6, FOUND(KEY6, 2))) # top right chest horseheads + center_2_and_upper_right_side = Location(dungeon=6).add(DungeonChest(0x1B1)).connect(center_1, AND(COUNT(POWER_BRACELET, 2), PEGASUS_BOOTS, r.attack_pols_voice, KEY6, FOUND(KEY6, 2))) # top right chest horseheads boss_key = Location(dungeon=6).add(DungeonChest(0x1B6)).connect(center_2_and_upper_right_side, AND(AND(KEY6, FOUND(KEY6, 3), HOOKSHOT))) + center_2_and_upper_right_side.connect(boss_key, AND(HOOKSHOT, POWER_BRACELET, KEY6, FOUND(KEY6, 3)), one_way=True) if options.owlstatues == "both" or options.owlstatues == "dungeon": Location(dungeon=6).add(OwlStatue(0x1B6)).connect(boss_key, STONE_BEAK6) @@ -40,19 +41,22 @@ def __init__(self, options, world_setup, r, *, raft_game_chest=True): if options.logic == 'hard' or options.logic == 'glitched' or options.logic == 'hell': bracelet_chest.connect(entrance, BOMB) # get through 2d section by "fake" jumping to the ladders - center_1.connect(miniboss, AND(COUNT(POWER_BRACELET, 2), PEGASUS_BOOTS)) # use a boots dash to get over the platforms - + center_1.connect(miniboss, AND(COUNT(POWER_BRACELET, 2), r.boots_dash_2d)) # use a boots dash to get over the platforms + center_2_and_upper_right_side.connect(center_1, AND(COUNT(POWER_BRACELET, 2), r.damage_boost, r.attack_pols_voice, FOUND(KEY6, 2))) # damage_boost past the mini_thwomps + if options.logic == 'glitched' or options.logic == 'hell': - entrance.connect(left_side, AND(POWER_BRACELET, FEATHER), one_way=True) # path from entrance to left_side: use superjumps to pass raised blocks - lower_right_side.connect(center_2_and_upper_right_side, AND(FEATHER, OR(SWORD, BOW, MAGIC_ROD)), one_way=True) # path from lower_right_side to center_2: superjump from waterway towards dodongos. superjump next to corner block, so weapons added - center_2_and_upper_right_side.connect(center_1, AND(POWER_BRACELET, FEATHER), one_way=True) # going backwards from dodongos, use a shaq jump to pass by keyblock at tile room - boss_key.connect(lower_right_side, FEATHER) # superjump from waterway to the left. POWER_BRACELET is implied from lower_right_side + elephants_heart_chest.connect(entrance, BOMB) # kill moldorm on screen above wizrobes, then bomb trigger on the right side to break elephant statue to get to the second chest + entrance.connect(left_side, AND(POWER_BRACELET, r.super_jump_feather), one_way=True) # path from entrance to left_side: use superjumps to pass raised blocks + lower_right_side.connect(center_2_and_upper_right_side, r.super_jump, one_way=True) # path from lower_right_side to center_2: superjump from waterway towards dodongos. superjump next to corner block, so weapons added + center_1.connect(miniboss, AND(r.bomb_trigger, OR(r.boots_dash_2d, FEATHER))) # bomb trigger the elephant statue after the miniboss + center_2_and_upper_right_side.connect(center_1, AND(POWER_BRACELET, r.shaq_jump), one_way=True) # going backwards from dodongos, use a shaq jump to pass by keyblock at tile room + boss_key.connect(lower_right_side, AND(POWER_BRACELET, r.super_jump_feather)) # superjump from waterway to the left. if options.logic == 'hell': - entrance.connect(left_side, AND(POWER_BRACELET, PEGASUS_BOOTS, OR(BOW, MAGIC_ROD)), one_way=True) # can boots superhop off the top right corner in 3 wizrobe raised blocks room - medicine_chest.connect(lower_right_side, AND(PEGASUS_BOOTS, OR(MAGIC_ROD, BOW))) # can boots superhop off the top wall with bow or magic rod - center_1.connect(miniboss, AND(COUNT(POWER_BRACELET, 2))) # use a double damage boost from the sparks to get across (first one is free, second one needs to buffer while in midair for spark to get close enough) - lower_right_side.connect(center_2_and_upper_right_side, FEATHER, one_way=True) # path from lower_right_side to center_2: superjump from waterway towards dodongos. superjump next to corner block is super tight to get enough horizontal distance + entrance.connect(left_side, AND(POWER_BRACELET, r.boots_superhop), one_way=True) # can boots superhop off the top right corner in 3 wizrobe raised blocks room + medicine_chest.connect(lower_right_side, r.boots_superhop) # can boots superhop off the top wall with bow or magic rod + center_1.connect(miniboss, AND(r.damage_boost_special, OR(r.bomb_trigger, COUNT(POWER_BRACELET, 2)))) # use a double damage boost from the sparks to get across (first one is free, second one needs to buffer while in midair for spark to get close enough) + lower_right_side.connect(center_2_and_upper_right_side, r.super_jump_feather, one_way=True) # path from lower_right_side to center_2: superjump from waterway towards dodongos. superjump next to corner block is super tight to get enough horizontal distance self.entrance = entrance diff --git a/worlds/ladx/LADXR/logic/dungeon7.py b/worlds/ladx/LADXR/logic/dungeon7.py index 594b4d083ca7..6188138f38ef 100644 --- a/worlds/ladx/LADXR/logic/dungeon7.py +++ b/worlds/ladx/LADXR/logic/dungeon7.py @@ -14,8 +14,8 @@ def __init__(self, options, world_setup, r): if options.owlstatues == "both" or options.owlstatues == "dungeon": Location(dungeon=7).add(OwlStatue(0x204)).connect(topright_pillar_area, STONE_BEAK7) topright_pillar_area.add(DungeonChest(0x209)) # stone slab chest can be reached by dropping down a hole - three_of_a_kind_north = Location(dungeon=7).add(DungeonChest(0x211)).connect(topright_pillar_area, OR(r.attack_hookshot, AND(FEATHER, SHIELD))) # compass chest; path without feather with hitting switch by falling on the raised blocks. No bracelet because ball does not reset - bottomleftF2_area = Location(dungeon=7).connect(topright_pillar_area, r.attack_hookshot) # area with hinox, be able to hit a switch to reach that area + three_of_a_kind_north = Location(dungeon=7).add(DungeonChest(0x211)).connect(topright_pillar_area, OR(AND(r.hit_switch, r.attack_hookshot_no_bomb), AND(OR(BOMB, FEATHER), SHIELD))) # compass chest; either hit the switch, or have feather to fall on top of raised blocks. No bracelet because ball does not reset + bottomleftF2_area = Location(dungeon=7).connect(topright_pillar_area, r.hit_switch) # area with hinox, be able to hit a switch to reach that area topleftF1_chest = Location(dungeon=7).add(DungeonChest(0x201)) # top left chest on F1 bottomleftF2_area.connect(topleftF1_chest, None, one_way = True) # drop down in left most holes of hinox room or tile room Location(dungeon=7).add(DroppedKey(0x21B)).connect(bottomleftF2_area, r.attack_hookshot) # hinox drop key @@ -23,9 +23,9 @@ def __init__(self, options, world_setup, r): if options.owlstatues == "both" or options.owlstatues == "dungeon": bottomleft_owl = Location(dungeon=7).add(OwlStatue(0x21C)).connect(bottomleftF2_area, AND(BOMB, STONE_BEAK7)) nightmare_key = Location(dungeon=7).add(DungeonChest(0x224)).connect(bottomleftF2_area, r.miniboss_requirements[world_setup.miniboss_mapping[6]]) # nightmare key after the miniboss - mirror_shield_chest = Location(dungeon=7).add(DungeonChest(0x21A)).connect(bottomleftF2_area, r.attack_hookshot) # mirror shield chest, need to be able to hit a switch to reach or + mirror_shield_chest = Location(dungeon=7).add(DungeonChest(0x21A)).connect(bottomleftF2_area, r.hit_switch) # mirror shield chest, need to be able to hit a switch to reach or bottomleftF2_area.connect(mirror_shield_chest, AND(KEY7, FOUND(KEY7, 3)), one_way = True) # reach mirror shield chest from hinox area by opening keyblock - toprightF1_chest = Location(dungeon=7).add(DungeonChest(0x204)).connect(bottomleftF2_area, r.attack_hookshot) # chest on the F1 right ledge. Added attack_hookshot since switch needs to be hit to get back up + toprightF1_chest = Location(dungeon=7).add(DungeonChest(0x204)).connect(bottomleftF2_area, r.hit_switch) # chest on the F1 right ledge. Added attack_hookshot since switch needs to be hit to get back up final_pillar_area = Location(dungeon=7).add(DungeonChest(0x21C)).connect(bottomleftF2_area, AND(BOMB, HOOKSHOT)) # chest that needs to spawn to get to the last pillar final_pillar = Location(dungeon=7).connect(final_pillar_area, POWER_BRACELET) # decouple chest from pillar @@ -33,25 +33,28 @@ def __init__(self, options, world_setup, r): beamos_horseheads = Location(dungeon=7).add(DungeonChest(0x220)).connect(beamos_horseheads_area, POWER_BRACELET) # 100 rupee chest / medicine chest (DX) behind boss door pre_boss = Location(dungeon=7).connect(beamos_horseheads_area, HOOKSHOT) # raised plateau before boss staircase boss = Location(dungeon=7).add(HeartContainer(0x223), Instrument(0x22c)).connect(pre_boss, r.boss_requirements[world_setup.boss_mapping[6]]) - + + if options.logic == 'hard' or options.logic == 'glitched' or options.logic == 'hell': + three_of_a_kind_north.connect(topright_pillar_area, BOMB) # use timed bombs to match the 3 of a kinds (south 3 of a kind room is implicite as normal logic can not reach chest without hookshot) + if options.logic == 'glitched' or options.logic == 'hell': - topright_pillar_area.connect(entrance, AND(FEATHER, SWORD)) # superjump in the center to get on raised blocks, superjump in switch room to right side to walk down. center superjump has to be low so sword added - toprightF1_chest.connect(topright_pillar_area, FEATHER) # superjump from F1 switch room - topleftF2_area = Location(dungeon=7).connect(topright_pillar_area, FEATHER) # superjump in top left pillar room over the blocks from right to left, to reach tile room + topright_pillar_area.connect(entrance, r.super_jump_sword) # superjump in the center to get on raised blocks, superjump in switch room to right side to walk down. center superjump has to be low so sword added + toprightF1_chest.connect(topright_pillar_area, r.super_jump_feather) # superjump from F1 switch room + topleftF2_area = Location(dungeon=7).connect(topright_pillar_area, r.super_jump_feather) # superjump in top left pillar room over the blocks from right to left, to reach tile room topleftF2_area.connect(topleftF1_chest, None, one_way = True) # fall down tile room holes on left side to reach top left chest on ground floor - topleftF1_chest.connect(bottomleftF2_area, AND(PEGASUS_BOOTS, FEATHER), one_way = True) # without hitting the switch, jump on raised blocks at f1 pegs chest (0x209), and boots jump to stairs to reach hinox area - final_pillar_area.connect(bottomleftF2_area, OR(r.attack_hookshot, POWER_BRACELET, AND(FEATHER, SHIELD))) # sideways block push to get to the chest and pillar, kill requirement for 3 of a kind enemies to access chest. Assumes you do not get ball stuck on raised pegs for bracelet path + topleftF1_chest.connect(bottomleftF2_area, r.boots_jump, one_way = True) # without hitting the switch, jump on raised blocks at f1 pegs chest (0x209), and boots jump to stairs to reach hinox area + final_pillar_area.connect(bottomleftF2_area, AND(r.sideways_block_push, OR(r.attack_hookshot, POWER_BRACELET, AND(FEATHER, SHIELD)))) # sideways block push to get to the chest and pillar, kill requirement for 3 of a kind enemies to access chest. Assumes you do not get ball stuck on raised pegs for bracelet path if options.owlstatues == "both" or options.owlstatues == "dungeon": - bottomleft_owl.connect(bottomleftF2_area, STONE_BEAK7) # sideways block push to get to the owl statue + bottomleft_owl.connect(bottomleftF2_area, AND(r.sideways_block_push, STONE_BEAK7)) # sideways block push to get to the owl statue final_pillar.connect(bottomleftF2_area, BOMB) # bomb trigger pillar - pre_boss.connect(final_pillar, FEATHER) # superjump on top of goomba to extend superjump to boss door plateau + pre_boss.connect(final_pillar, r.super_jump_feather) # superjump on top of goomba to extend superjump to boss door plateau pre_boss.connect(beamos_horseheads_area, None, one_way=True) # can drop down from raised plateau to beamos horseheads area if options.logic == 'hell': - topright_pillar_area.connect(entrance, FEATHER) # superjump in the center to get on raised blocks, has to be low - topright_pillar_area.connect(entrance, AND(PEGASUS_BOOTS, OR(BOW, MAGIC_ROD))) # boots superhop in the center to get on raised blocks - toprightF1_chest.connect(topright_pillar_area, AND(PEGASUS_BOOTS, OR(BOW, MAGIC_ROD))) # boots superhop from F1 switch room - pre_boss.connect(final_pillar, AND(PEGASUS_BOOTS, OR(BOW, MAGIC_ROD))) # boots superhop on top of goomba to extend superhop to boss door plateau + topright_pillar_area.connect(entrance, r.super_jump_feather) # superjump in the center to get on raised blocks, has to be low + topright_pillar_area.connect(entrance, r.boots_superhop) # boots superhop in the center to get on raised blocks + toprightF1_chest.connect(topright_pillar_area, r.boots_superhop) # boots superhop from F1 switch room + pre_boss.connect(final_pillar, r.boots_superhop) # boots superhop on top of goomba to extend superhop to boss door plateau self.entrance = entrance diff --git a/worlds/ladx/LADXR/logic/dungeon8.py b/worlds/ladx/LADXR/logic/dungeon8.py index 4444ecbb1419..5da2f8234ec4 100644 --- a/worlds/ladx/LADXR/logic/dungeon8.py +++ b/worlds/ladx/LADXR/logic/dungeon8.py @@ -11,7 +11,10 @@ def __init__(self, options, world_setup, r, *, back_entrance_heartpiece=True): # left side entrance_left.add(DungeonChest(0x24D)) # zamboni room chest - Location(dungeon=8).add(DungeonChest(0x25C)).connect(entrance_left, r.attack_hookshot) # eye magnet chest + eye_magnet_chest = Location(dungeon=8).add(DungeonChest(0x25C)) # eye magnet chest bottom left below rolling bones + eye_magnet_chest.connect(entrance_left, OR(BOW, MAGIC_ROD, BOOMERANG, AND(FEATHER, r.attack_hookshot))) # damageless roller should be default + if options.hardmode != "ohko": + eye_magnet_chest.connect(entrance_left, r.attack_hookshot) # can take a hit vire_drop_key = Location(dungeon=8).add(DroppedKey(0x24C)).connect(entrance_left, r.attack_hookshot_no_bomb) # vire drop key sparks_chest = Location(dungeon=8).add(DungeonChest(0x255)).connect(entrance_left, OR(HOOKSHOT, FEATHER)) # chest before lvl1 miniboss Location(dungeon=8).add(DungeonChest(0x246)).connect(entrance_left, MAGIC_ROD) # key chest that spawns after creating fire @@ -30,7 +33,7 @@ def __init__(self, options, world_setup, r, *, back_entrance_heartpiece=True): upper_center = Location(dungeon=8).connect(lower_center, AND(KEY8, FOUND(KEY8, 2))) if options.owlstatues == "both" or options.owlstatues == "dungeon": Location(dungeon=8).add(OwlStatue(0x245)).connect(upper_center, STONE_BEAK8) - Location(dungeon=8).add(DroppedKey(0x23E)).connect(upper_center, r.attack_skeleton) # 2 gibdos cracked floor; technically possible to use pits to kill but dumb + gibdos_drop_key = Location(dungeon=8).add(DroppedKey(0x23E)).connect(upper_center, r.attack_gibdos) # 2 gibdos cracked floor; technically possible to use pits to kill but dumb medicine_chest = Location(dungeon=8).add(DungeonChest(0x235)).connect(upper_center, AND(FEATHER, HOOKSHOT)) # medicine chest middle_center_1 = Location(dungeon=8).connect(upper_center, BOMB) @@ -66,33 +69,36 @@ def __init__(self, options, world_setup, r, *, back_entrance_heartpiece=True): if options.logic == 'hard' or options.logic == 'glitched' or options.logic == 'hell': entrance_left.connect(entrance, BOMB) # use bombs to kill vire and hinox - vire_drop_key.connect(entrance_left, BOMB) # use bombs to kill rolling bones and vire - bottom_right.connect(slime_chest, FEATHER) # diagonal jump over the pits to reach rolling rock / zamboni + up_left.connect(vire_drop_key, BOMB, one_way=True) # use bombs to kill rolling bones and vire, do not allow pathway through hinox with just bombs, as not enough bombs are available + bottom_right.connect(slime_chest, r.tight_jump) # diagonal jump over the pits to reach rolling rock / zamboni + gibdos_drop_key.connect(upper_center, OR(HOOKSHOT, MAGIC_ROD)) # crack one of the floor tiles and hookshot the gibdos in, or burn the gibdos and make them jump into pit up_left.connect(lower_center, AND(BOMB, FEATHER)) # blow up hidden walls from peahat room -> dark room -> eye statue room slime_chest.connect(entrance, AND(r.attack_hookshot_powder, POWER_BRACELET)) # kill vire with powder or bombs if options.logic == 'glitched' or options.logic == 'hell': - sparks_chest.connect(entrance_left, OR(r.attack_hookshot, FEATHER, PEGASUS_BOOTS)) # 1 pit buffer across the pit. Add requirements for all the options to get to this area - lower_center.connect(entrance_up, None) # sideways block push in peahat room to get past keyblock - miniboss_entrance.connect(lower_center, AND(BOMB, FEATHER, HOOKSHOT)) # blow up hidden wall for darkroom, use feather + hookshot to clip past keyblock in front of stairs - miniboss_entrance.connect(lower_center, AND(BOMB, FEATHER, FOUND(KEY8, 7))) # same as above, but without clipping past the keyblock - up_left.connect(lower_center, FEATHER) # use jesus jump in refill room left of peahats to clip bottom wall and push bottom block left, to get a place to super jump - up_left.connect(upper_center, FEATHER) # from up left you can jesus jump / lava swim around the key door next to the boss. - top_left_stairs.connect(up_left, AND(FEATHER, SWORD)) # superjump - medicine_chest.connect(upper_center, FEATHER) # jesus super jump - up_left.connect(bossdoor, FEATHER, one_way=True) # superjump off the bottom or right wall to jump over to the boss door + sparks_chest.connect(entrance_left, r.pit_buffer_itemless) # 1 pit buffer across the pit. + entrance_up.connect(bottomright_pot_chest, r.super_jump_boots, one_way = True) # underground section with fire balls jumping up out of lava. Use boots superjump off left wall to jump over the pot blocking the way + lower_center.connect(entrance_up, r.sideways_block_push) # sideways block push in peahat room to get past keyblock + miniboss_entrance.connect(lower_center, AND(BOMB, r.bookshot)) # blow up hidden wall for darkroom, use feather + hookshot to clip past keyblock in front of stairs + miniboss_entrance.connect(lower_center, AND(BOMB, r.super_jump_feather, FOUND(KEY8, 7))) # same as above, but without clipping past the keyblock + up_left.connect(lower_center, r.jesus_jump) # use jesus jump in refill room left of peahats to clip bottom wall and push bottom block left, to get a place to super jump + up_left.connect(upper_center, r.jesus_jump) # from up left you can jesus jump / lava swim around the key door next to the boss. + top_left_stairs.connect(up_left, r.super_jump_feather) # superjump + medicine_chest.connect(upper_center, AND(r.super_jump_feather, r.jesus_jump)) # jesus super jump + up_left.connect(bossdoor, r.super_jump_feather, one_way=True) # superjump off the bottom or right wall to jump over to the boss door if options.logic == 'hell': if bottomright_owl: - bottomright_owl.connect(entrance, AND(SWORD, POWER_BRACELET, PEGASUS_BOOTS, STONE_BEAK8)) # underground section past mimics, boots bonking across the gap to the ladder - bottomright_pot_chest.connect(entrance, AND(SWORD, POWER_BRACELET, PEGASUS_BOOTS)) # underground section past mimics, boots bonking across the gap to the ladder - entrance.connect(bottomright_pot_chest, AND(FEATHER, SWORD), one_way=True) # use NW zamboni staircase backwards, subpixel manip for superjump past the pots - medicine_chest.connect(upper_center, AND(PEGASUS_BOOTS, HOOKSHOT)) # boots bonk + lava buffer to the bottom wall, then bonk onto the middle section - miniboss.connect(miniboss_entrance, AND(PEGASUS_BOOTS, r.miniboss_requirements[world_setup.miniboss_mapping[7]])) # get through 2d section with boots bonks - top_left_stairs.connect(map_chest, AND(PEGASUS_BOOTS, MAGIC_ROD)) # boots bonk + lava buffer from map chest to entrance_up, then boots bonk through 2d section - nightmare_key.connect(top_left_stairs, AND(PEGASUS_BOOTS, SWORD, FOUND(KEY8, 7))) # use a boots bonk to cross the 2d section + the lava in cueball room - bottom_right.connect(entrance_up, AND(POWER_BRACELET, PEGASUS_BOOTS), one_way=True) # take staircase to NW zamboni room, boots bonk onto the lava and water buffer all the way down to push the zamboni - bossdoor.connect(entrance_up, AND(PEGASUS_BOOTS, MAGIC_ROD)) # boots bonk through 2d section + bottomright_owl.connect(entrance, AND(SWORD, POWER_BRACELET, r.boots_bonk_2d_hell, STONE_BEAK8)) # underground section past mimics, boots bonking across the gap to the ladder + bottomright_pot_chest.connect(entrance, AND(SWORD, POWER_BRACELET, r.boots_bonk_2d_hell)) # underground section past mimics, boots bonking across the gap to the ladder + entrance.connect(bottomright_pot_chest, r.shaq_jump, one_way=True) # use NW zamboni staircase backwards, and get a naked shaq jump off the bottom wall in the bottom right corner to pass by the pot + gibdos_drop_key.connect(upper_center, AND(FEATHER, SHIELD)) # lock gibdos into pits and crack the tile they stand on, then use shield to bump them into the pit + medicine_chest.connect(upper_center, AND(r.pit_buffer_boots, HOOKSHOT)) # boots bonk + lava buffer to the bottom wall, then bonk onto the middle section + miniboss.connect(miniboss_entrance, AND(r.boots_bonk_2d_hell, r.miniboss_requirements[world_setup.miniboss_mapping[7]])) # get through 2d section with boots bonks + top_left_stairs.connect(map_chest, AND(r.jesus_buffer, r.boots_bonk_2d_hell, MAGIC_ROD)) # boots bonk + lava buffer from map chest to entrance_up, then boots bonk through 2d section + nightmare_key.connect(top_left_stairs, AND(r.boots_bonk_pit, SWORD, FOUND(KEY8, 7))) # use a boots bonk to cross the 2d section + the lava in cueball room + bottom_right.connect(entrance_up, AND(POWER_BRACELET, r.jesus_buffer), one_way=True) # take staircase to NW zamboni room, boots bonk onto the lava and water buffer all the way down to push the zamboni + bossdoor.connect(entrance_up, AND(r.boots_bonk_2d_hell, MAGIC_ROD)) # boots bonk through 2d section self.entrance = entrance diff --git a/worlds/ladx/LADXR/logic/dungeonColor.py b/worlds/ladx/LADXR/logic/dungeonColor.py index aa58c0bafa91..fc14f70dd7a6 100644 --- a/worlds/ladx/LADXR/logic/dungeonColor.py +++ b/worlds/ladx/LADXR/logic/dungeonColor.py @@ -10,7 +10,7 @@ def __init__(self, options, world_setup, r): room2.add(DungeonChest(0x314)) # key if options.owlstatues == "both" or options.owlstatues == "dungeon": Location(dungeon=9).add(OwlStatue(0x308), OwlStatue(0x30F)).connect(room2, STONE_BEAK9) - room2_weapon = Location(dungeon=9).connect(room2, r.attack_hookshot) + room2_weapon = Location(dungeon=9).connect(room2, AND(r.attack_hookshot, POWER_BRACELET)) room2_weapon.add(DungeonChest(0x311)) # stone beak room2_lights = Location(dungeon=9).connect(room2, OR(r.attack_hookshot, SHIELD)) room2_lights.add(DungeonChest(0x30F)) # compass chest @@ -20,22 +20,24 @@ def __init__(self, options, world_setup, r): room3 = Location(dungeon=9).connect(room2, AND(KEY9, FOUND(KEY9, 2), r.miniboss_requirements[world_setup.miniboss_mapping["c1"]])) # After the miniboss room4 = Location(dungeon=9).connect(room3, POWER_BRACELET) # need to lift a pot to reveal button room4.add(DungeonChest(0x306)) # map - room4karakoro = Location(dungeon=9).add(DroppedKey(0x307)).connect(room4, r.attack_hookshot) # require item to knock Karakoro enemies into shell + room4karakoro = Location(dungeon=9).add(DroppedKey(0x307)).connect(room4, AND(r.attack_hookshot, POWER_BRACELET)) # require item to knock Karakoro enemies into shell if options.owlstatues == "both" or options.owlstatues == "dungeon": Location(dungeon=9).add(OwlStatue(0x30A)).connect(room4, STONE_BEAK9) room5 = Location(dungeon=9).connect(room4, OR(r.attack_hookshot, SHIELD)) # lights room room6 = Location(dungeon=9).connect(room5, AND(KEY9, FOUND(KEY9, 3))) # room with switch and nightmare door - pre_boss = Location(dungeon=9).connect(room6, OR(r.attack_hookshot, AND(PEGASUS_BOOTS, FEATHER))) # before the boss, require item to hit switch or jump past raised blocks + pre_boss = Location(dungeon=9).connect(room6, OR(r.hit_switch, AND(PEGASUS_BOOTS, FEATHER))) # before the boss, require item to hit switch or jump past raised blocks boss = Location(dungeon=9).connect(pre_boss, AND(NIGHTMARE_KEY9, r.boss_requirements[world_setup.boss_mapping[8]])) boss.add(TunicFairy(0), TunicFairy(1)) if options.logic == 'hard' or options.logic == 'glitched' or options.logic == 'hell': - room2.connect(entrance, POWER_BRACELET) # throw pots at enemies - pre_boss.connect(room6, FEATHER) # before the boss, jump past raised blocks without boots + room2.connect(entrance, r.throw_pot) # throw pots at enemies + room2_weapon.connect(room2, r.attack_hookshot_no_bomb) # knock the karakoro into the pit without picking them up. + pre_boss.connect(room6, r.tight_jump) # before the boss, jump past raised blocks without boots if options.logic == 'hell': - room2_weapon.connect(room2, SHIELD) # shield bump karakoro into the holes - room4karakoro.connect(room4, SHIELD) # shield bump karakoro into the holes + room2_weapon.connect(room2, r.attack_hookshot) # also have a bomb as option to knock the karakoro into the pit without bracelet + room2_weapon.connect(room2, r.shield_bump) # shield bump karakoro into the holes + room4karakoro.connect(room4, r.shield_bump) # shield bump karakoro into the holes self.entrance = entrance diff --git a/worlds/ladx/LADXR/logic/overworld.py b/worlds/ladx/LADXR/logic/overworld.py index 3972796051f9..54da90f8931d 100644 --- a/worlds/ladx/LADXR/logic/overworld.py +++ b/worlds/ladx/LADXR/logic/overworld.py @@ -19,10 +19,13 @@ def __init__(self, options, world_setup, r): Location().add(DroppedKey(0x1E4)).connect(rooster_cave, AND(OCARINA, SONG3)) papahl_house = Location("Papahl House") - papahl_house.connect(Location().add(TradeSequenceItem(0x2A6, TRADING_ITEM_RIBBON)), TRADING_ITEM_YOSHI_DOLL) + mamasha_trade = Location().add(TradeSequenceItem(0x2A6, TRADING_ITEM_RIBBON)) + papahl_house.connect(mamasha_trade, TRADING_ITEM_YOSHI_DOLL) - trendy_shop = Location("Trendy Shop").add(TradeSequenceItem(0x2A0, TRADING_ITEM_YOSHI_DOLL)) - #trendy_shop.connect(Location()) + trendy_shop = Location("Trendy Shop") + trendy_shop.connect(Location().add(TradeSequenceItem(0x2A0, TRADING_ITEM_YOSHI_DOLL)), FOUND("RUPEES", 50)) + outside_trendy = Location() + outside_trendy.connect(mabe_village, r.bush) self._addEntrance("papahl_house_left", mabe_village, papahl_house, None) self._addEntrance("papahl_house_right", mabe_village, papahl_house, None) @@ -84,7 +87,7 @@ def __init__(self, options, world_setup, r): crazy_tracy_hut_inside = Location("Crazy Tracy's House") Location().add(KeyLocation("MEDICINE2")).connect(crazy_tracy_hut_inside, FOUND("RUPEES", 50)) self._addEntrance("crazy_tracy", crazy_tracy_hut, crazy_tracy_hut_inside, None) - start_house.connect(crazy_tracy_hut, SONG2, one_way=True) # Manbo's Mambo into the pond outside Tracy + start_house.connect(crazy_tracy_hut, AND(OCARINA, SONG2), one_way=True) # Manbo's Mambo into the pond outside Tracy forest_madbatter = Location("Forest Mad Batter") Location().add(MadBatter(0x1E1)).connect(forest_madbatter, MAGIC_POWDER) @@ -92,7 +95,7 @@ def __init__(self, options, world_setup, r): self._addEntranceRequirementExit("forest_madbatter", None) # if exiting, you do not need bracelet forest_cave = Location("Forest Cave") - Location().add(Chest(0x2BD)).connect(forest_cave, SWORD) # chest in forest cave on route to mushroom + forest_cave_crystal_chest = Location().add(Chest(0x2BD)).connect(forest_cave, SWORD) # chest in forest cave on route to mushroom log_cave_heartpiece = Location().add(HeartPiece(0x2AB)).connect(forest_cave, POWER_BRACELET) # piece of heart in the forest cave on route to the mushroom forest_toadstool = Location().add(Toadstool()) self._addEntrance("toadstool_entrance", forest, forest_cave, None) @@ -130,6 +133,7 @@ def __init__(self, options, world_setup, r): self._addEntranceRequirementExit("d0", None) # if exiting, you do not need bracelet ghost_grave = Location().connect(forest, POWER_BRACELET) Location().add(Seashell(0x074)).connect(ghost_grave, AND(r.bush, SHOVEL)) # next to grave cave, digging spot + graveyard.connect(forest_heartpiece, OR(BOOMERANG, HOOKSHOT), one_way=True) # grab the heart piece surrounded by pits from the north graveyard_cave_left = Location() graveyard_cave_right = Location().connect(graveyard_cave_left, OR(FEATHER, ROOSTER)) @@ -194,6 +198,7 @@ def __init__(self, options, world_setup, r): bay_madbatter_connector_exit = Location().connect(bay_madbatter_connector_entrance, FLIPPERS) bay_madbatter_connector_outside = Location() bay_madbatter = Location().connect(Location().add(MadBatter(0x1E0)), MAGIC_POWDER) + outside_bay_madbatter_entrance = Location() self._addEntrance("prairie_madbatter_connector_entrance", left_bay_area, bay_madbatter_connector_entrance, AND(OR(FEATHER, ROOSTER), OR(SWORD, MAGIC_ROD, BOOMERANG))) self._addEntranceRequirementExit("prairie_madbatter_connector_entrance", AND(OR(FEATHER, ROOSTER), r.bush)) # if exiting, you can pick up the bushes by normal means self._addEntrance("prairie_madbatter_connector_exit", bay_madbatter_connector_outside, bay_madbatter_connector_exit, None) @@ -239,7 +244,8 @@ def __init__(self, options, world_setup, r): castle_courtyard = Location() castle_frontdoor = Location().connect(castle_courtyard, r.bush) castle_frontdoor.connect(ukuku_prairie, "CASTLE_BUTTON") # the button in the castle connector allows access to the castle grounds in ER - self._addEntrance("castle_secret_entrance", next_to_castle, castle_secret_entrance_right, OR(BOMB, BOOMERANG, MAGIC_POWDER, MAGIC_ROD, SWORD)) + self._addEntrance("castle_secret_entrance", next_to_castle, castle_secret_entrance_right, r.pit_bush) + self._addEntranceRequirementExit("castle_secret_entrance", None) # leaving doesn't require pit_bush self._addEntrance("castle_secret_exit", castle_courtyard, castle_secret_entrance_left, None) Location().add(HeartPiece(0x078)).connect(bay_water, FLIPPERS) # in the moat of the castle @@ -247,7 +253,7 @@ def __init__(self, options, world_setup, r): Location().add(KeyLocation("CASTLE_BUTTON")).connect(castle_inside, None) castle_top_outside = Location() castle_top_inside = Location() - self._addEntrance("castle_main_entrance", castle_frontdoor, castle_inside, r.bush) + self._addEntrance("castle_main_entrance", castle_frontdoor, castle_inside, None) self._addEntrance("castle_upper_left", castle_top_outside, castle_inside, None) self._addEntrance("castle_upper_right", castle_top_outside, castle_top_inside, None) Location().add(GoldLeaf(0x05A)).connect(castle_courtyard, OR(SWORD, BOW, MAGIC_ROD)) # mad bomber, enemy hiding in the 6 holes @@ -276,7 +282,8 @@ def __init__(self, options, world_setup, r): animal_village.connect(ukuku_prairie, OR(HOOKSHOT, ROOSTER)) animal_village_connector_left = Location() animal_village_connector_right = Location().connect(animal_village_connector_left, PEGASUS_BOOTS) - self._addEntrance("prairie_to_animal_connector", ukuku_prairie, animal_village_connector_left, OR(BOMB, BOOMERANG, MAGIC_POWDER, MAGIC_ROD, SWORD)) # passage under river blocked by bush + self._addEntrance("prairie_to_animal_connector", ukuku_prairie, animal_village_connector_left, r.pit_bush) # passage under river blocked by bush + self._addEntranceRequirementExit("prairie_to_animal_connector", None) # leaving doesn't require pit_bush self._addEntrance("animal_to_prairie_connector", animal_village, animal_village_connector_right, None) if options.owlstatues == "both" or options.owlstatues == "overworld": animal_village.add(OwlStatue(0x0DA)) @@ -284,7 +291,7 @@ def __init__(self, options, world_setup, r): desert = Location().connect(animal_village, r.bush) # Note: We moved the walrus blocking the desert. if options.owlstatues == "both" or options.owlstatues == "overworld": desert.add(OwlStatue(0x0CF)) - desert_lanmola = Location().add(AnglerKey()).connect(desert, OR(BOW, SWORD, HOOKSHOT, MAGIC_ROD, BOOMERANG)) + desert_lanmola = Location().add(AnglerKey()).connect(desert, r.attack_hookshot_no_bomb) animal_village_bombcave = Location() self._addEntrance("animal_cave", desert, animal_village_bombcave, BOMB) @@ -298,13 +305,15 @@ def __init__(self, options, world_setup, r): Location().add(HeartPiece(0x1E8)).connect(desert_cave, BOMB) # above the quicksand cave Location().add(Seashell(0x0FF)).connect(desert, POWER_BRACELET) # bottom right corner of the map - armos_maze = Location().connect(animal_village, POWER_BRACELET) - armos_temple = Location() + armos_maze = Location("Armos Maze").connect(animal_village, POWER_BRACELET) + armos_temple = Location("Southern Shrine") Location().add(FaceKey()).connect(armos_temple, r.miniboss_requirements[world_setup.miniboss_mapping["armos_temple"]]) if options.owlstatues == "both" or options.owlstatues == "overworld": armos_maze.add(OwlStatue(0x08F)) - self._addEntrance("armos_maze_cave", armos_maze, Location().add(Chest(0x2FC)), None) - self._addEntrance("armos_temple", armos_maze, armos_temple, None) + outside_armos_cave = Location("Outside Armos Maze Cave").connect(armos_maze, OR(r.attack_hookshot, SHIELD)) + outside_armos_temple = Location("Outside Southern Shrine").connect(armos_maze, OR(r.attack_hookshot, SHIELD)) + self._addEntrance("armos_maze_cave", outside_armos_cave, Location().add(Chest(0x2FC)), None) + self._addEntrance("armos_temple", outside_armos_temple, armos_temple, None) armos_fairy_entrance = Location().connect(bay_water, FLIPPERS).connect(animal_village, POWER_BRACELET) self._addEntrance("armos_fairy", armos_fairy_entrance, None, BOMB) @@ -349,17 +358,21 @@ def __init__(self, options, world_setup, r): lower_right_taltal.connect(below_right_taltal, FLIPPERS, one_way=True) heartpiece_swim_cave = Location().connect(Location().add(HeartPiece(0x1F2)), FLIPPERS) + outside_swim_cave = Location() + below_right_taltal.connect(outside_swim_cave, FLIPPERS) self._addEntrance("heartpiece_swim_cave", below_right_taltal, heartpiece_swim_cave, FLIPPERS) # cave next to level 4 d4_entrance = Location().connect(below_right_taltal, FLIPPERS) lower_right_taltal.connect(d4_entrance, AND(ANGLER_KEY, "ANGLER_KEYHOLE"), one_way=True) self._addEntrance("d4", d4_entrance, None, ANGLER_KEY) self._addEntranceRequirementExit("d4", FLIPPERS) # if exiting, you can leave with flippers without opening the dungeon + outside_mambo = Location("Outside Manbo").connect(d4_entrance, FLIPPERS) + inside_mambo = Location("Manbo's Cave") mambo = Location().connect(Location().add(Song(0x2FD)), AND(OCARINA, FLIPPERS)) # Manbo's Mambo self._addEntrance("mambo", d4_entrance, mambo, FLIPPERS) # Raft game. raft_house = Location("Raft House") - Location().add(KeyLocation("RAFT")).connect(raft_house, COUNT("RUPEES", 100)) + Location().add(KeyLocation("RAFT")).connect(raft_house, AND(r.bush, COUNT("RUPEES", 100))) # add bush requirement for farming in case player has to try again raft_return_upper = Location() raft_return_lower = Location().connect(raft_return_upper, None, one_way=True) outside_raft_house = Location().connect(below_right_taltal, HOOKSHOT).connect(below_right_taltal, FLIPPERS, one_way=True) @@ -391,10 +404,13 @@ def __init__(self, options, world_setup, r): multichest_cave = Location() multichest_cave_secret = Location().connect(multichest_cave, BOMB) + multichest_cave.connect(multichest_cave_secret, BOMB, one_way=True) water_cave_hole = Location() # Location with the hole that drops you onto the hearth piece under water if options.logic != "casual": water_cave_hole.connect(heartpiece_swim_cave, FLIPPERS, one_way=True) + outside_multichest_left = Location() multichest_outside = Location().add(Chest(0x01D)) # chest after multichest puzzle outside + lower_right_taltal.connect(outside_multichest_left, OR(FLIPPERS, ROOSTER)) self._addEntrance("multichest_left", lower_right_taltal, multichest_cave, OR(FLIPPERS, ROOSTER)) self._addEntrance("multichest_right", water_cave_hole, multichest_cave, None) self._addEntrance("multichest_top", multichest_outside, multichest_cave_secret, None) @@ -432,7 +448,7 @@ def __init__(self, options, world_setup, r): left_right_connector_cave_exit = Location() left_right_connector_cave_entrance.connect(left_right_connector_cave_exit, OR(HOOKSHOT, ROOSTER), one_way=True) # pass through the underground passage to left side taltal_boulder_zone = Location() - self._addEntrance("left_to_right_taltalentrance", mountain_bridge_staircase, left_right_connector_cave_entrance, OR(BOMB, BOOMERANG, MAGIC_POWDER, MAGIC_ROD, SWORD)) + self._addEntrance("left_to_right_taltalentrance", mountain_bridge_staircase, left_right_connector_cave_entrance, r.pit_bush) self._addEntrance("left_taltal_entrance", taltal_boulder_zone, left_right_connector_cave_exit, None) mountain_heartpiece = Location().add(HeartPiece(0x2BA)) # heartpiece in connecting cave left_right_connector_cave_entrance.connect(mountain_heartpiece, BOMB, one_way=True) # in the connecting cave from right to left. one_way to prevent access to left_side_mountain via glitched logic @@ -464,130 +480,168 @@ def __init__(self, options, world_setup, r): windfish = Location("Windfish").connect(nightmare, AND(MAGIC_POWDER, SWORD, OR(BOOMERANG, BOW))) if options.logic == 'hard' or options.logic == 'glitched' or options.logic == 'hell': - hookshot_cave.connect(hookshot_cave_chest, AND(FEATHER, PEGASUS_BOOTS)) # boots jump the gap to the chest - graveyard_cave_left.connect(graveyard_cave_right, HOOKSHOT, one_way=True) # hookshot the block behind the stairs while over the pit - swamp_chest.connect(swamp, None) # Clip past the flower + hookshot_cave.connect(hookshot_cave_chest, r.boots_jump) # boots jump the gap to the chest + graveyard_cave_left.connect(graveyard_cave_right, r.hookshot_over_pit, one_way=True) # hookshot the block behind the stairs while over the pit + swamp_chest.connect(swamp, r.wall_clip) # Clip past the flower self._addEntranceRequirement("d2", POWER_BRACELET) # clip the top wall to walk between the goponga flower and the wall self._addEntranceRequirement("d2", COUNT(SWORD, 2)) # use l2 sword spin to kill goponga flowers - swamp.connect(writes_hut_outside, HOOKSHOT, one_way=True) # hookshot the sign in front of writes hut + self._addEntranceRequirementExit("d2", r.wall_clip) # Clip out at d2 entrance door + swamp.connect(writes_hut_outside, r.hookshot_over_pit, one_way=True) # hookshot the sign in front of writes hut graveyard_heartpiece.connect(graveyard_cave_right, FEATHER) # jump to the bottom right tile around the blocks - graveyard_heartpiece.connect(graveyard_cave_right, OR(HOOKSHOT, BOOMERANG)) # push bottom block, wall clip and hookshot/boomerang corner to grab item + graveyard_heartpiece.connect(graveyard_cave_right, AND(r.wall_clip, OR(HOOKSHOT, BOOMERANG))) # push bottom block, wall clip and hookshot/boomerang corner to grab item - self._addEntranceRequirement("mamu", AND(FEATHER, POWER_BRACELET)) # can clear the gaps at the start with just feather, can reach bottom left sign with a well timed jump while wall clipped + self._addEntranceRequirement("mamu", AND(r.wall_clip, FEATHER, POWER_BRACELET)) # can clear the gaps at the start with just feather, can reach bottom left sign with a well timed jump while wall clipped self._addEntranceRequirement("prairie_madbatter_connector_entrance", AND(OR(FEATHER, ROOSTER), OR(MAGIC_POWDER, BOMB))) # use bombs or powder to get rid of a bush on the other side by jumping across and placing the bomb/powder before you fall into the pit - fisher_under_bridge.connect(bay_water, AND(TRADING_ITEM_FISHING_HOOK, FLIPPERS)) # can talk to the fisherman from the water when the boat is low (requires swimming up out of the water a bit) crow_gold_leaf.connect(castle_courtyard, POWER_BRACELET) # bird on tree at left side kanalet, can use both rocks to kill the crow removing the kill requirement castle_inside.connect(kanalet_chain_trooper, BOOMERANG, one_way=True) # kill the ball and chain trooper from the left side, then use boomerang to grab the dropped item - animal_village_bombcave_heartpiece.connect(animal_village_bombcave, AND(PEGASUS_BOOTS, FEATHER)) # jump across horizontal 4 gap to heart piece + animal_village_bombcave_heartpiece.connect(animal_village_bombcave, r.boots_jump) # jump across horizontal 4 gap to heart piece + animal_village_bombcave_heartpiece.connect(animal_village_bombcave, AND(BOMB, FEATHER, BOOMERANG)) # use jump + boomerang to grab the item from below the ledge desert_lanmola.connect(desert, BOMB) # use bombs to kill lanmola + armos_maze.connect(outside_armos_cave, None) # dodge the armos statues by activating them and running + armos_maze.connect(outside_armos_temple, None) # dodge the armos statues by activating them and running d6_connector_left.connect(d6_connector_right, AND(OR(FLIPPERS, PEGASUS_BOOTS), FEATHER)) # jump the gap in underground passage to d6 left side to skip hookshot + obstacle_cave_exit.connect(obstacle_cave_inside, AND(FEATHER, r.hookshot_over_pit), one_way=True) # one way from right exit to middle, jump past the obstacle, and use hookshot to pull past the double obstacle if not options.rooster: bird_key.connect(bird_cave, COUNT(POWER_BRACELET, 2)) # corner walk past the one pit on the left side to get to the elephant statue - fire_cave_bottom.connect(fire_cave_top, PEGASUS_BOOTS, one_way=True) # flame skip + right_taltal_connector2.connect(right_taltal_connector3, ROOSTER, one_way=True) # jump off the ledge and grab rooster after landing on the pit + fire_cave_bottom.connect(fire_cave_top, AND(r.damage_boost_special, PEGASUS_BOOTS), one_way=True) # flame skip if options.logic == 'glitched' or options.logic == 'hell': + papahl_house.connect(mamasha_trade, r.bomb_trigger) # use a bomb trigger to trade with mamasha without having yoshi doll #self._addEntranceRequirement("dream_hut", FEATHER) # text clip TODO: require nag messages - self._addEntranceRequirementEnter("dream_hut", HOOKSHOT) # clip past the rocks in front of dream hut - dream_hut_right.connect(dream_hut_left, FEATHER) # super jump - forest.connect(swamp, BOMB) # bomb trigger tarin + self._addEntranceRequirementEnter("dream_hut", r.hookshot_clip) # clip past the rocks in front of dream hut + dream_hut_right.connect(dream_hut_left, r.super_jump_feather) # super jump + forest.connect(swamp, r.bomb_trigger) # bomb trigger tarin forest.connect(forest_heartpiece, BOMB, one_way=True) # bomb trigger heartpiece - self._addEntranceRequirementEnter("hookshot_cave", HOOKSHOT) # clip past the rocks in front of hookshot cave - swamp.connect(forest_toadstool, None, one_way=True) # villa buffer from top (swamp phonebooth area) to bottom (toadstool area) - writes_hut_outside.connect(swamp, None, one_way=True) # villa buffer from top (writes hut) to bottom (swamp phonebooth area) or damage boost + self._addEntranceRequirementEnter("hookshot_cave", r.hookshot_clip) # clip past the rocks in front of hookshot cave + swamp.connect(forest_toadstool, r.pit_buffer_itemless, one_way=True) # villa buffer from top (swamp phonebooth area) to bottom (toadstool area) + writes_hut_outside.connect(swamp, r.pit_buffer_itemless, one_way=True) # villa buffer from top (writes hut) to bottom (swamp phonebooth area) or damage boost graveyard.connect(forest_heartpiece, None, one_way=True) # villa buffer from top. - log_cave_heartpiece.connect(forest_cave, FEATHER) # super jump - log_cave_heartpiece.connect(forest_cave, BOMB) # bomb trigger - graveyard_cave_left.connect(graveyard_heartpiece, BOMB, one_way=True) # bomb trigger the heartpiece from the left side - graveyard_heartpiece.connect(graveyard_cave_right, None) # sideways block push from the right staircase. - - prairie_island_seashell.connect(ukuku_prairie, AND(FEATHER, r.bush)) # jesus jump from right side, screen transition on top of the water to reach the island - self._addEntranceRequirement("castle_jump_cave", FEATHER) # 1 pit buffer to clip bottom wall and jump across. - left_bay_area.connect(ghost_hut_outside, FEATHER) # 1 pit buffer to get across - tiny_island.connect(left_bay_area, AND(FEATHER, r.bush)) # jesus jump around - bay_madbatter_connector_exit.connect(bay_madbatter_connector_entrance, FEATHER, one_way=True) # jesus jump (3 screen) through the underground passage leading to martha's bay mad batter - self._addEntranceRequirement("prairie_madbatter_connector_entrance", AND(FEATHER, POWER_BRACELET)) # villa buffer into the top side of the bush, then pick it up - - ukuku_prairie.connect(richard_maze, OR(BOMB, BOOMERANG, MAGIC_POWDER, MAGIC_ROD, SWORD), one_way=True) # break bushes on north side of the maze, and 1 pit buffer into the maze - fisher_under_bridge.connect(bay_water, AND(BOMB, FLIPPERS)) # can bomb trigger the item without having the hook - animal_village.connect(ukuku_prairie, FEATHER) # jesus jump - below_right_taltal.connect(next_to_castle, FEATHER) # jesus jump (north of kanalet castle phonebooth) - animal_village_connector_right.connect(animal_village_connector_left, FEATHER) # text clip past the obstacles (can go both ways), feather to wall clip the obstacle without triggering text or shaq jump in bottom right corner if text is off - animal_village_bombcave_heartpiece.connect(animal_village_bombcave, AND(BOMB, OR(HOOKSHOT, FEATHER, PEGASUS_BOOTS))) # bomb trigger from right side, corner walking top right pit is stupid so hookshot or boots added - animal_village_bombcave_heartpiece.connect(animal_village_bombcave, FEATHER) # villa buffer across the pits - - d6_entrance.connect(ukuku_prairie, FEATHER, one_way=True) # jesus jump (2 screen) from d6 entrance bottom ledge to ukuku prairie - d6_entrance.connect(armos_fairy_entrance, FEATHER, one_way=True) # jesus jump (2 screen) from d6 entrance top ledge to armos fairy entrance - armos_fairy_entrance.connect(d6_armos_island, FEATHER, one_way=True) # jesus jump from top (fairy bomb cave) to armos island - armos_fairy_entrance.connect(raft_exit, FEATHER) # jesus jump (2-ish screen) from fairy cave to lower raft connector - self._addEntranceRequirementEnter("obstacle_cave_entrance", HOOKSHOT) # clip past the rocks in front of obstacle cave entrance - obstacle_cave_inside_chest.connect(obstacle_cave_inside, FEATHER) # jump to the rightmost pits + 1 pit buffer to jump across - obstacle_cave_exit.connect(obstacle_cave_inside, FEATHER) # 1 pit buffer above boots crystals to get past - lower_right_taltal.connect(hibiscus_item, AND(TRADING_ITEM_PINEAPPLE, BOMB), one_way=True) # bomb trigger papahl from below ledge, requires pineapple - - self._addEntranceRequirement("heartpiece_swim_cave", FEATHER) # jesus jump into the cave entrance after jumping down the ledge, can jesus jump back to the ladder 1 screen below - self._addEntranceRequirement("mambo", FEATHER) # jesus jump from (unlocked) d4 entrance to mambo's cave entrance - outside_raft_house.connect(below_right_taltal, FEATHER, one_way=True) # jesus jump from the ledge at raft to the staircase 1 screen south - - self._addEntranceRequirement("multichest_left", FEATHER) # jesus jump past staircase leading up the mountain - outside_rooster_house.connect(lower_right_taltal, FEATHER) # jesus jump (1 or 2 screen depending if angler key is used) to staircase leading up the mountain + graveyard.connect(forest, None, one_way=True) # villa buffer from the top twice to get to the main forest area + log_cave_heartpiece.connect(forest_cave, r.super_jump_feather) # super jump + log_cave_heartpiece.connect(forest_cave, r.bomb_trigger) # bomb trigger + graveyard_cave_left.connect(graveyard_heartpiece, r.bomb_trigger, one_way=True) # bomb trigger the heartpiece from the left side + graveyard_heartpiece.connect(graveyard_cave_right, r.sideways_block_push) # sideways block push from the right staircase. + + prairie_island_seashell.connect(ukuku_prairie, AND(r.jesus_jump, r.bush)) # jesus jump from right side, screen transition on top of the water to reach the island + self._addEntranceRequirement("castle_jump_cave", r.pit_buffer) # 1 pit buffer to clip bottom wall and jump across. + left_bay_area.connect(ghost_hut_outside, r.pit_buffer) # 1 pit buffer to get across + tiny_island.connect(left_bay_area, AND(r.jesus_jump, r.bush)) # jesus jump around + bay_madbatter_connector_exit.connect(bay_madbatter_connector_entrance, r.jesus_jump, one_way=True) # jesus jump (3 screen) through the underground passage leading to martha's bay mad batter + left_bay_area.connect(outside_bay_madbatter_entrance, AND(r.pit_buffer, POWER_BRACELET)) # villa buffer into the top side of the bush, then pick it up + + ukuku_prairie.connect(richard_maze, AND(r.pit_buffer_itemless, OR(AND(MAGIC_POWDER, MAX_POWDER_UPGRADE), BOMB, BOOMERANG, MAGIC_ROD, SWORD)), one_way=True) # break bushes on north side of the maze, and 1 pit buffer into the maze + richard_maze.connect(ukuku_prairie, AND(r.pit_buffer_itemless, OR(MAGIC_POWDER, BOMB, BOOMERANG, MAGIC_ROD, SWORD)), one_way=True) # same as above (without powder upgrade) in one of the two northern screens of the maze to escape + fisher_under_bridge.connect(bay_water, AND(r.bomb_trigger, AND(FEATHER, FLIPPERS))) # up-most left wall is a pit: bomb trigger with it. If photographer is there, clear that first which is why feather is required logically + animal_village.connect(ukuku_prairie, r.jesus_jump) # jesus jump + below_right_taltal.connect(next_to_castle, r.jesus_jump) # jesus jump (north of kanalet castle phonebooth) + #animal_village_connector_right.connect(animal_village_connector_left, AND(r.text_clip, FEATHER)) # text clip past the obstacles (can go both ways), feather to wall clip the obstacle without triggering text + animal_village_bombcave_heartpiece.connect(animal_village_bombcave, AND(r.bomb_trigger, OR(HOOKSHOT, FEATHER, r.boots_bonk_pit))) # bomb trigger from right side, corner walking top right pit is stupid so hookshot or boots added + animal_village_bombcave_heartpiece.connect(animal_village_bombcave, r.pit_buffer) # villa buffer across the pits + + d6_entrance.connect(ukuku_prairie, r.jesus_jump, one_way=True) # jesus jump (2 screen) from d6 entrance bottom ledge to ukuku prairie + d6_entrance.connect(armos_fairy_entrance, r.jesus_jump, one_way=True) # jesus jump (2 screen) from d6 entrance top ledge to armos fairy entrance + d6_connector_left.connect(d6_connector_right, r.jesus_jump) # jesus jump over water; left side is jumpable, or villa buffer if it's easier for you + armos_fairy_entrance.connect(d6_armos_island, r.jesus_jump, one_way=True) # jesus jump from top (fairy bomb cave) to armos island + armos_fairy_entrance.connect(raft_exit, r.jesus_jump) # jesus jump (2-ish screen) from fairy cave to lower raft connector + self._addEntranceRequirementEnter("obstacle_cave_entrance", r.hookshot_clip) # clip past the rocks in front of obstacle cave entrance + obstacle_cave_inside_chest.connect(obstacle_cave_inside, r.pit_buffer) # jump to the rightmost pits + 1 pit buffer to jump across + obstacle_cave_exit.connect(obstacle_cave_inside, r.pit_buffer) # 1 pit buffer above boots crystals to get past + lower_right_taltal.connect(hibiscus_item, AND(TRADING_ITEM_PINEAPPLE, r.bomb_trigger), one_way=True) # bomb trigger papahl from below ledge, requires pineapple + + self._addEntranceRequirement("heartpiece_swim_cave", r.jesus_jump) # jesus jump into the cave entrance after jumping down the ledge, can jesus jump back to the ladder 1 screen below + self._addEntranceRequirement("mambo", r.jesus_jump) # jesus jump from (unlocked) d4 entrance to mambo's cave entrance + outside_raft_house.connect(below_right_taltal, r.jesus_jump, one_way=True) # jesus jump from the ledge at raft to the staircase 1 screen south + + self._addEntranceRequirement("multichest_left", r.jesus_jump) # jesus jump past staircase leading up the mountain + outside_rooster_house.connect(lower_right_taltal, r.jesus_jump) # jesus jump (1 or 2 screen depending if angler key is used) to staircase leading up the mountain d7_platau.connect(water_cave_hole, None, one_way=True) # use save and quit menu to gain control while falling to dodge the water cave hole - mountain_bridge_staircase.connect(outside_rooster_house, AND(PEGASUS_BOOTS, FEATHER)) # cross bridge to staircase with pit buffer to clip bottom wall and jump across - bird_key.connect(bird_cave, AND(FEATHER, HOOKSHOT)) # hookshot jump across the big pits room - right_taltal_connector2.connect(right_taltal_connector3, None, one_way=True) # 2 seperate pit buffers so not obnoxious to get past the two pit rooms before d7 area. 2nd pits can pit buffer on top right screen, bottom wall to scroll on top of the wall on bottom screen - left_right_connector_cave_exit.connect(left_right_connector_cave_entrance, AND(HOOKSHOT, FEATHER), one_way=True) # pass through the passage in reverse using a superjump to get out of the dead end - obstacle_cave_inside.connect(mountain_heartpiece, BOMB, one_way=True) # bomb trigger from boots crystal cave - self._addEntranceRequirement("d8", OR(BOMB, AND(OCARINA, SONG3))) # bomb trigger the head and walk trough, or play the ocarina song 3 and walk through + mountain_bridge_staircase.connect(outside_rooster_house, AND(r.boots_jump, r.pit_buffer)) # cross bridge to staircase with pit buffer to clip bottom wall and jump across. added boots_jump to not require going through this section with just feather + bird_key.connect(bird_cave, r.hookshot_jump) # hookshot jump across the big pits room + right_taltal_connector2.connect(right_taltal_connector3, OR(r.pit_buffer, ROOSTER), one_way=True) # trigger a quick fall on the screen above the exit by transitioning down on the leftmost/rightmost pit and then buffering sq menu for control while in the air. or pick up the rooster while dropping off the ledge at exit + left_right_connector_cave_exit.connect(left_right_connector_cave_entrance, AND(HOOKSHOT, r.super_jump_feather), one_way=True) # pass through the passage in reverse using a superjump to get out of the dead end + obstacle_cave_inside.connect(mountain_heartpiece, r.bomb_trigger, one_way=True) # bomb trigger from boots crystal cave + self._addEntranceRequirement("d8", OR(r.bomb_trigger, AND(OCARINA, SONG3))) # bomb trigger the head and walk through, or play the ocarina song 3 and walk through if options.logic == 'hell': dream_hut_right.connect(dream_hut, None) # alternate diagonal movement with orthogonal movement to control the mimics. Get them clipped into the walls to walk past - swamp.connect(forest_toadstool, None) # damage boost from toadstool area across the pit - swamp.connect(forest, AND(r.bush, OR(PEGASUS_BOOTS, HOOKSHOT))) # boots bonk / hookshot spam over the pits right of forest_rear_chest + swamp.connect(forest_toadstool, r.damage_boost) # damage boost from toadstool area across the pit + swamp.connect(forest, AND(r.bush, OR(r.boots_bonk_pit, r.hookshot_spam_pit))) # boots bonk / hookshot spam over the pits right of forest_rear_chest forest.connect(forest_heartpiece, PEGASUS_BOOTS, one_way=True) # boots bonk across the pits + forest_cave_crystal_chest.connect(forest_cave, AND(r.super_jump_feather, r.hookshot_clip_block, r.sideways_block_push)) # superjump off the bottom wall to get between block and crystal, than use 3 keese to hookshot clip while facing right to get a sideways blockpush off log_cave_heartpiece.connect(forest_cave, BOOMERANG) # clip the boomerang through the corner gaps on top right to grab the item - log_cave_heartpiece.connect(forest_cave, AND(ROOSTER, OR(PEGASUS_BOOTS, SWORD, BOW, MAGIC_ROD))) # boots rooster hop in bottom left corner to "superjump" into the area. use buffers after picking up rooster to gain height / time to throw rooster again facing up - writes_hut_outside.connect(swamp, None) # damage boost with moblin arrow next to telephone booth - writes_cave_left_chest.connect(writes_cave, None) # damage boost off the zol to get across the pit. - graveyard.connect(crazy_tracy_hut, HOOKSHOT, one_way=True) # use hookshot spam to clip the rock on the right with the crow - graveyard.connect(forest, OR(PEGASUS_BOOTS, HOOKSHOT)) # boots bonk witches hut, or hookshot spam across the pit - graveyard_cave_left.connect(graveyard_cave_right, HOOKSHOT) # hookshot spam over the pit - graveyard_cave_right.connect(graveyard_cave_left, PEGASUS_BOOTS, one_way=True) # boots bonk off the cracked block - - self._addEntranceRequirementEnter("mamu", AND(PEGASUS_BOOTS, POWER_BRACELET)) # can clear the gaps at the start with multiple pit buffers, can reach bottom left sign with bonking along the bottom wall - self._addEntranceRequirement("castle_jump_cave", PEGASUS_BOOTS) # pit buffer to clip bottom wall and boots bonk across - prairie_cave_secret_exit.connect(prairie_cave, AND(BOMB, OR(PEGASUS_BOOTS, HOOKSHOT))) # hookshot spam or boots bonk across pits can go from left to right by pit buffering on top of the bottom wall then boots bonk across - richard_cave_chest.connect(richard_cave, None) # use the zol on the other side of the pit to damage boost across (requires damage from pit + zol) - castle_secret_entrance_right.connect(castle_secret_entrance_left, AND(PEGASUS_BOOTS, "MEDICINE2")) # medicine iframe abuse to get across spikes with a boots bonk - left_bay_area.connect(ghost_hut_outside, PEGASUS_BOOTS) # multiple pit buffers to bonk across the bottom wall - tiny_island.connect(left_bay_area, AND(PEGASUS_BOOTS, r.bush)) # jesus jump around with boots bonks, then one final bonk off the bottom wall to get on the staircase (needs to be centered correctly) - self._addEntranceRequirement("prairie_madbatter_connector_entrance", AND(PEGASUS_BOOTS, OR(MAGIC_POWDER, BOMB, SWORD, MAGIC_ROD, BOOMERANG))) # Boots bonk across the bottom wall, then remove one of the bushes to get on land - self._addEntranceRequirementExit("prairie_madbatter_connector_entrance", AND(PEGASUS_BOOTS, r.bush)) # if exiting, you can pick up the bushes by normal means and boots bonk across the bottom wall + log_cave_heartpiece.connect(forest_cave, OR(r.super_jump_rooster, r.boots_roosterhop)) # boots rooster hop in bottom left corner to "superjump" into the area. use buffers after picking up rooster to gain height / time to throw rooster again facing up + writes_hut_outside.connect(swamp, r.damage_boost) # damage boost with moblin arrow next to telephone booth + writes_cave_left_chest.connect(writes_cave, r.damage_boost) # damage boost off the zol to get across the pit. + graveyard.connect(crazy_tracy_hut, r.hookshot_spam_pit, one_way=True) # use hookshot spam to clip the rock on the right with the crow + graveyard.connect(forest, OR(r.boots_bonk_pit, r.hookshot_spam_pit)) # boots bonk over pits by witches hut, or hookshot spam across the pit + graveyard_cave_left.connect(graveyard_cave_right, r.hookshot_spam_pit) # hookshot spam over the pit + graveyard_cave_right.connect(graveyard_cave_left, OR(r.damage_boost, r.boots_bonk_pit), one_way=True) # boots bonk off the cracked block, or set up a damage boost with the keese + + self._addEntranceRequirementEnter("mamu", AND(r.pit_buffer_itemless, r.pit_buffer_boots, POWER_BRACELET)) # can clear the gaps at the start with multiple pit buffers, can reach bottom left sign with bonking along the bottom wall + self._addEntranceRequirement("castle_jump_cave", r.pit_buffer_boots) # pit buffer to clip bottom wall and boots bonk across + prairie_cave_secret_exit.connect(prairie_cave, AND(BOMB, OR(r.boots_bonk_pit, r.hookshot_spam_pit))) # hookshot spam or boots bonk across pits can go from left to right by pit buffering on top of the bottom wall then boots bonk across + richard_cave_chest.connect(richard_cave, r.damage_boost) # use the zol on the other side of the pit to damage boost across (requires damage from pit + zol) + castle_secret_entrance_right.connect(castle_secret_entrance_left, r.boots_bonk_2d_spikepit) # medicine iframe abuse to get across spikes with a boots bonk + left_bay_area.connect(ghost_hut_outside, r.pit_buffer_boots) # multiple pit buffers to bonk across the bottom wall + left_bay_area.connect(ukuku_prairie, r.hookshot_clip_block, one_way=True) # clip through the donuts blocking the path next to prairie plateau cave by hookshotting up and killing the two moblins that way which clips you further up two times. This is enough to move right + tiny_island.connect(left_bay_area, AND(r.jesus_buffer, r.boots_bonk_pit, r.bush)) # jesus jump around with boots bonks, then one final bonk off the bottom wall to get on the staircase (needs to be centered correctly) + left_bay_area.connect(outside_bay_madbatter_entrance, AND(r.pit_buffer_boots, OR(MAGIC_POWDER, SWORD, MAGIC_ROD, BOOMERANG))) # Boots bonk across the bottom wall, then remove one of the bushes to get on land + left_bay_area.connect(outside_bay_madbatter_entrance, AND(r.pit_buffer, r.hookshot_spam_pit, r.bush)) # hookshot spam to cross one pit at the top, then buffer until on top of the bush to be able to break it + outside_bay_madbatter_entrance.connect(left_bay_area, AND(r.pit_buffer_boots, r.bush), one_way=True) # if exiting, you can pick up the bushes by normal means and boots bonk across the bottom wall # bay_water connectors, only left_bay_area, ukuku_prairie and animal_village have to be connected with jesus jumps. below_right_taltal, d6_armos_island and armos_fairy_entrance are accounted for via ukuku prairie in glitch logic - left_bay_area.connect(bay_water, FEATHER) # jesus jump (can always reach bay_water with jesus jumping from every way to enter bay_water, so no one_way) - animal_village.connect(bay_water, FEATHER) # jesus jump (can always reach bay_water with jesus jumping from every way to enter bay_water, so no one_way) - ukuku_prairie.connect(bay_water, FEATHER, one_way=True) # jesus jump - bay_water.connect(d5_entrance, FEATHER) # jesus jump into d5 entrance (wall clip), wall clip + jesus jump to get out + left_bay_area.connect(bay_water, OR(r.jesus_jump, r.jesus_rooster)) # jesus jump/rooster (can always reach bay_water with jesus jumping from every way to enter bay_water, so no one_way) + animal_village.connect(bay_water, OR(r.jesus_jump, r.jesus_rooster)) # jesus jump/rooster (can always reach bay_water with jesus jumping from every way to enter bay_water, so no one_way) + ukuku_prairie.connect(bay_water, OR(r.jesus_jump, r.jesus_rooster), one_way=True) # jesus jump/rooster + bay_water.connect(d5_entrance, OR(r.jesus_jump, r.jesus_rooster)) # jesus jump/rooster into d5 entrance (wall clip), wall clip + jesus jump to get out - crow_gold_leaf.connect(castle_courtyard, BOMB) # bird on tree at left side kanalet, place a bomb against the tree and the crow flies off. With well placed second bomb the crow can be killed - mermaid_statue.connect(animal_village, AND(TRADING_ITEM_SCALE, FEATHER)) # early mermaid statue by buffering on top of the right ledge, then superjumping to the left (horizontal pixel perfect) - animal_village_bombcave_heartpiece.connect(animal_village_bombcave, PEGASUS_BOOTS) # boots bonk across bottom wall (both at entrance and in item room) + prairie_island_seashell.connect(ukuku_prairie, AND(r.jesus_rooster, r.bush)) # jesus rooster from right side, screen transition on top of the water to reach the island + bay_madbatter_connector_exit.connect(bay_madbatter_connector_entrance, r.jesus_rooster, one_way=True) # jesus rooster (3 screen) through the underground passage leading to martha's bay mad batter + # fisher_under_bridge.connect(bay_water, AND(TRADING_ITEM_FISHING_HOOK, OR(FEATHER, SWORD, BOW), FLIPPERS)) # just swing/shoot at fisher, if photographer is on screen it is dumb + fisher_under_bridge.connect(bay_water, AND(TRADING_ITEM_FISHING_HOOK, FLIPPERS)) # face the fisherman from the left, get within 4 pixels (a range, not exact) of his left side, hold up, and mash a until you get the textbox. + + #TODO: add jesus rooster to trick list - d6_armos_island.connect(ukuku_prairie, FEATHER) # jesus jump (3 screen) from seashell mansion to armos island - armos_fairy_entrance.connect(d6_armos_island, PEGASUS_BOOTS, one_way=True) # jesus jump from top (fairy bomb cave) to armos island with fast falling - d6_connector_right.connect(d6_connector_left, PEGASUS_BOOTS) # boots bonk across bottom wall at water and pits (can do both ways) + below_right_taltal.connect(next_to_castle, r.jesus_buffer, one_way=True) # face right, boots bonk and get far enough left to jesus buffer / boots bonk across the bottom wall to the stairs + crow_gold_leaf.connect(castle_courtyard, BOMB) # bird on tree at left side kanalet, place a bomb against the tree and the crow flies off. With well placed second bomb the crow can be killed + mermaid_statue.connect(animal_village, AND(TRADING_ITEM_SCALE, r.super_jump_feather)) # early mermaid statue by buffering on top of the right ledge, then superjumping to the left (horizontal pixel perfect) + animal_village_connector_right.connect(animal_village_connector_left, r.shaq_jump) # shaq jump off the obstacle to get through + animal_village_connector_left.connect(animal_village_connector_right, r.hookshot_clip_block, one_way=True) # use hookshot with an enemy to clip through the obstacle + animal_village_bombcave_heartpiece.connect(animal_village_bombcave, r.pit_buffer_boots) # boots bonk across bottom wall (both at entrance and in item room) + + d6_armos_island.connect(ukuku_prairie, OR(r.jesus_jump, r.jesus_rooster)) # jesus jump / rooster (3 screen) from seashell mansion to armos island + armos_fairy_entrance.connect(d6_armos_island, r.jesus_buffer, one_way=True) # jesus jump from top (fairy bomb cave) to armos island with fast falling + d6_connector_right.connect(d6_connector_left, r.pit_buffer_boots) # boots bonk across bottom wall at water and pits (can do both ways) + d6_entrance.connect(ukuku_prairie, r.jesus_rooster, one_way=True) # jesus rooster (2 screen) from d6 entrance bottom ledge to ukuku prairie + d6_entrance.connect(armos_fairy_entrance, r.jesus_rooster, one_way=True) # jesus rooster (2 screen) from d6 entrance top ledge to armos fairy entrance + armos_fairy_entrance.connect(d6_armos_island, r.jesus_rooster, one_way=True) # jesus rooster from top (fairy bomb cave) to armos island + armos_fairy_entrance.connect(raft_exit, r.jesus_rooster) # jesus rooster (2-ish screen) from fairy cave to lower raft connector + + obstacle_cave_entrance.connect(obstacle_cave_inside, OR(r.hookshot_clip_block, r.shaq_jump)) # get past crystal rocks by hookshotting into top pushable block, or boots dashing into top wall where the pushable block is to superjump down + obstacle_cave_entrance.connect(obstacle_cave_inside, r.boots_roosterhop) # get past crystal rocks pushing the top pushable block, then boots dashing up picking up the rooster before bonking. Pause buffer until rooster is fully picked up then throw it down before bonking into wall + d4_entrance.connect(below_right_taltal, OR(r.jesus_jump, r.jesus_rooster), one_way=True) # jesus jump/rooster 5 screens to staircase below damp cave + lower_right_taltal.connect(below_right_taltal, OR(r.jesus_jump, r.jesus_rooster), one_way=True) # jesus jump/rooster to upper ledges, jump off, enter and exit s+q menu to regain pauses, then jesus jump 4 screens to staircase below damp cave + below_right_taltal.connect(outside_swim_cave, r.jesus_rooster) # jesus rooster into the cave entrance after jumping down the ledge, can jesus jump back to the ladder 1 screen below + outside_mambo.connect(below_right_taltal, OR(r.jesus_rooster, r.jesus_jump)) # jesus jump/rooster to mambo's cave entrance + if options.hardmode != "oracle": # don't take damage from drowning in water. Could get it with more health probably but standard 3 hearts is not enough + mambo.connect(inside_mambo, AND(OCARINA, r.bomb_trigger)) # while drowning, buffer a bomb and after it explodes, buffer another bomb out of the save and quit menu. + outside_raft_house.connect(below_right_taltal, r.jesus_rooster, one_way=True) # jesus rooster from the ledge at raft to the staircase 1 screen south + lower_right_taltal.connect(outside_multichest_left, r.jesus_rooster) # jesus rooster past staircase leading up the mountain + outside_rooster_house.connect(lower_right_taltal, r.jesus_rooster, one_way=True) # jesus rooster down to staircase below damp cave - obstacle_cave_entrance.connect(obstacle_cave_inside, OR(HOOKSHOT, AND(FEATHER, PEGASUS_BOOTS, OR(SWORD, MAGIC_ROD, BOW)))) # get past crystal rocks by hookshotting into top pushable block, or boots dashing into top wall where the pushable block is to superjump down - obstacle_cave_entrance.connect(obstacle_cave_inside, AND(PEGASUS_BOOTS, ROOSTER)) # get past crystal rocks pushing the top pushable block, then boots dashing up picking up the rooster before bonking. Pause buffer until rooster is fully picked up then throw it down before bonking into wall - d4_entrance.connect(below_right_taltal, FEATHER) # jesus jump a long way if options.entranceshuffle in ("default", "simple"): # connector cave from armos d6 area to raft shop may not be randomized to add a flippers path since flippers stop you from jesus jumping - below_right_taltal.connect(raft_game, AND(FEATHER, r.attack_hookshot_powder), one_way=True) # jesus jump from heartpiece water cave, around the island and clip past the diagonal gap in the rock, then jesus jump all the way down the waterfall to the chests (attack req for hardlock flippers+feather scenario) - outside_raft_house.connect(below_right_taltal, AND(FEATHER, PEGASUS_BOOTS)) #superjump from ledge left to right, can buffer to land on ledge instead of water, then superjump right which is pixel perfect - bridge_seashell.connect(outside_rooster_house, AND(PEGASUS_BOOTS, POWER_BRACELET)) # boots bonk - bird_key.connect(bird_cave, AND(FEATHER, PEGASUS_BOOTS)) # boots jump above wall, use multiple pit buffers to get across - mountain_bridge_staircase.connect(outside_rooster_house, OR(PEGASUS_BOOTS, FEATHER)) # cross bridge to staircase with pit buffer to clip bottom wall and jump or boots bonk across - left_right_connector_cave_entrance.connect(left_right_connector_cave_exit, AND(PEGASUS_BOOTS, FEATHER), one_way=True) # boots jump to bottom left corner of pits, pit buffer and jump to left - left_right_connector_cave_exit.connect(left_right_connector_cave_entrance, AND(ROOSTER, OR(PEGASUS_BOOTS, SWORD, BOW, MAGIC_ROD)), one_way=True) # pass through the passage in reverse using a boots rooster hop or rooster superjump in the one way passage area + below_right_taltal.connect(raft_game, AND(OR(r.jesus_jump, r.jesus_rooster), r.attack_hookshot_powder), one_way=True) # jesus jump from heartpiece water cave, around the island and clip past the diagonal gap in the rock, then jesus jump all the way down the waterfall to the chests (attack req for hardlock flippers+feather scenario) + outside_raft_house.connect(below_right_taltal, AND(r.super_jump, PEGASUS_BOOTS)) #superjump from ledge left to right, can buffer to land on ledge instead of water, then superjump right which is pixel perfect. Boots to get out of wall after landing + bridge_seashell.connect(outside_rooster_house, AND(OR(r.hookshot_spam_pit, r.boots_bonk_pit), POWER_BRACELET)) # boots bonk or hookshot spam over the pit to get to the rock + bird_key.connect(bird_cave, AND(r.boots_jump, r.pit_buffer)) # boots jump above wall, use multiple pit buffers to get across + right_taltal_connector2.connect(right_taltal_connector3, r.pit_buffer_itemless, one_way=True) # 2 separate pit buffers so not obnoxious to get past the two pit rooms before d7 area. 2nd pits can pit buffer on top right screen, bottom wall to scroll on top of the wall on bottom screen + mountain_bridge_staircase.connect(outside_rooster_house, r.pit_buffer_boots) # cross bridge to staircase with pit buffer to clip bottom wall and jump or boots bonk across + left_right_connector_cave_entrance.connect(left_right_connector_cave_exit, AND(r.boots_jump, r.pit_buffer), one_way=True) # boots jump to bottom left corner of pits, pit buffer and jump to left + left_right_connector_cave_exit.connect(left_right_connector_cave_entrance, AND(ROOSTER, OR(r.boots_roosterhop, r.super_jump_rooster)), one_way=True) # pass through the passage in reverse using a boots rooster hop or rooster superjump in the one way passage area + + windfish.connect(nightmare, AND(SWORD, OR(BOOMERANG, BOW, BOMB, COUNT(SWORD, 2), AND(OCARINA, OR(SONG1, SONG3))))) # sword quick kill blob, can kill dethl with bombs or sword beams, and can use ocarina to freeze one of ganon's bats to skip dethl eye phase self.start = start_house self.egg = windfish_egg diff --git a/worlds/ladx/LADXR/logic/requirements.py b/worlds/ladx/LADXR/logic/requirements.py index a8e57327e78b..fa01627a15c3 100644 --- a/worlds/ladx/LADXR/logic/requirements.py +++ b/worlds/ladx/LADXR/logic/requirements.py @@ -254,18 +254,62 @@ def isConsumable(item) -> bool: class RequirementsSettings: def __init__(self, options): self.bush = OR(SWORD, MAGIC_POWDER, MAGIC_ROD, POWER_BRACELET, BOOMERANG) + self.pit_bush = OR(SWORD, MAGIC_POWDER, MAGIC_ROD, BOOMERANG, BOMB) # unique self.attack = OR(SWORD, BOMB, BOW, MAGIC_ROD, BOOMERANG) - self.attack_hookshot = OR(SWORD, BOMB, BOW, MAGIC_ROD, BOOMERANG, HOOKSHOT) # switches, hinox, shrouded stalfos + self.attack_hookshot = OR(SWORD, BOMB, BOW, MAGIC_ROD, BOOMERANG, HOOKSHOT) # hinox, shrouded stalfos + self.hit_switch = OR(SWORD, BOMB, BOW, MAGIC_ROD, BOOMERANG, HOOKSHOT) # hit switches in dungeons self.attack_hookshot_powder = OR(SWORD, BOMB, BOW, MAGIC_ROD, BOOMERANG, HOOKSHOT, MAGIC_POWDER) # zols, keese, moldorm self.attack_no_bomb = OR(SWORD, BOW, MAGIC_ROD, BOOMERANG, HOOKSHOT) # ? self.attack_hookshot_no_bomb = OR(SWORD, BOW, MAGIC_ROD, BOOMERANG, HOOKSHOT) # vire self.attack_no_boomerang = OR(SWORD, BOMB, BOW, MAGIC_ROD, HOOKSHOT) # teleporting owls self.attack_skeleton = OR(SWORD, BOMB, BOW, BOOMERANG, HOOKSHOT) # cannot kill skeletons with the fire rod + self.attack_gibdos = OR(SWORD, BOMB, BOW, BOOMERANG, AND(MAGIC_ROD, HOOKSHOT)) # gibdos are only stunned with hookshot, but can be burnt to jumping stalfos first with magic rod + self.attack_pols_voice = OR(BOMB, MAGIC_ROD, AND(OCARINA, SONG1)) # BOW works, but isn't as reliable as it needs 4 arrows. + self.attack_wizrobe = OR(BOMB, MAGIC_ROD) # BOW works, but isn't as reliable as it needs 4 arrows. + self.stun_wizrobe = OR(BOOMERANG, MAGIC_POWDER, HOOKSHOT) self.rear_attack = OR(SWORD, BOMB) # mimic self.rear_attack_range = OR(MAGIC_ROD, BOW) # mimic self.fire = OR(MAGIC_POWDER, MAGIC_ROD) # torches self.push_hardhat = OR(SHIELD, SWORD, HOOKSHOT, BOOMERANG) - self.shuffled_magnifier = TRADING_ITEM_MAGNIFYING_GLASS + self.shuffled_magnifier = TRADING_ITEM_MAGNIFYING_GLASS # overwritten if vanilla trade items + + self.throw_pot = POWER_BRACELET # grab pots to kill enemies + self.throw_enemy = POWER_BRACELET # grab stunned enemies to kill enemies + self.tight_jump = FEATHER # jumps that are possible but are tight to make it across + self.super_jump = AND(FEATHER, OR(SWORD, BOW, MAGIC_ROD)) # standard superjump for glitch logic + self.super_jump_boots = AND(PEGASUS_BOOTS, FEATHER, OR(SWORD, BOW, MAGIC_ROD)) # boots dash into wall for unclipped superjump + self.super_jump_feather = FEATHER # using only feather to align and jump off walls + self.super_jump_sword = AND(FEATHER, SWORD) # unclipped superjumps + self.super_jump_rooster = AND(ROOSTER, OR(SWORD, BOW, MAGIC_ROD)) # use rooster instead of feather to superjump off walls (only where rooster is allowed to be used) + self.shaq_jump = FEATHER # use interactable objects (keyblocks / pushable blocks) + self.boots_superhop = AND(PEGASUS_BOOTS, OR(MAGIC_ROD, BOW)) # dash into walls, pause, unpause and use weapon + hold direction away from wall. Only works in peg rooms + self.boots_roosterhop = AND(PEGASUS_BOOTS, ROOSTER) # dash towards a wall, pick up the rooster and throw it away from the wall before hitting the wall to get a superjump + self.jesus_jump = FEATHER # pause on the frame of hitting liquid (water / lava) to be able to jump again on unpause + self.jesus_buffer = PEGASUS_BOOTS # use a boots bonk to get on top of liquid (water / lava), then use buffers to get into positions + self.damage_boost_special = options.hardmode == "none" # use damage to cross pits / get through forced barriers without needing an enemy that can be eaten by bowwow + self.damage_boost = (options.bowwow == "normal") & (options.hardmode == "none") # Use damage to cross pits / get through forced barriers + self.sideways_block_push = True # wall clip pushable block, get against the edge and push block to move it sideways + self.wall_clip = True # push into corners to get further into walls, to avoid collision with enemies along path (see swamp flowers for example) or just getting a better position for jumps + self.pit_buffer_itemless = True # walk on top of pits and buffer down + self.pit_buffer = FEATHER # jump on top of pits and buffer to cross vertical gaps + self.pit_buffer_boots = OR(PEGASUS_BOOTS, FEATHER) # use boots or feather to cross gaps + self.boots_jump = AND(PEGASUS_BOOTS, FEATHER) # use boots jumps to cross 4 gap spots or other hard to reach spots + self.boots_bonk = PEGASUS_BOOTS # bonk against walls in 2d sections to get to higher places (no pits involved usually) + self.boots_bonk_pit = PEGASUS_BOOTS # use boots bonks to cross 1 tile gaps + self.boots_bonk_2d_spikepit = AND(PEGASUS_BOOTS, "MEDICINE2") # use iframes from medicine to get a boots dash going in 2d spike pits (kanalet secret passage, d3 2d section to boss) + self.boots_bonk_2d_hell = PEGASUS_BOOTS # seperate boots bonks from hell logic which are harder? + self.boots_dash_2d = PEGASUS_BOOTS # use boots to dash over 1 tile gaps in 2d sections + self.hookshot_spam_pit = HOOKSHOT # use hookshot with spam to cross 1 tile gaps + self.hookshot_clip = AND(HOOKSHOT, options.superweapons == False) # use hookshot at specific angles to hookshot past blocks (see forest north log cave, dream shrine entrance for example) + self.hookshot_clip_block = HOOKSHOT # use hookshot spam with enemies to clip through entire blocks (d5 room before gohma, d2 pots room before boss) + self.hookshot_over_pit = HOOKSHOT # use hookshot while over a pit to reach certain areas (see d3 vacuum room, d5 north of crossroads for example) + self.hookshot_jump = AND(HOOKSHOT, FEATHER) # while over pits, on the first frame after the hookshot is retracted you can input a jump to cross big pit gaps + self.bookshot = AND(FEATHER, HOOKSHOT) # use feather on A, hookshot on B on the same frame to get a speedy hookshot that can be used to clip past blocks + self.bomb_trigger = BOMB # drop two bombs at the same time to trigger cutscenes or pickup items (can use pits, or screen transitions + self.shield_bump = SHIELD # use shield to knock back enemies or knock off enemies when used in combination with superjumps + self.text_clip = False & options.nagmessages # trigger a text box on keyblock or rock or obstacle while holding diagonal to clip into the side. Removed from logic for now + self.jesus_rooster = AND(ROOSTER, options.hardmode != "oracle") # when transitioning on top of water, buffer the rooster out of sq menu to spawn it. Then do an unbuffered pickup of the rooster as soon as you spawn again to pick it up + self.zoomerang = AND(PEGASUS_BOOTS, FEATHER, BOOMERANG) # after starting a boots dash, buffer boomerang (on b), feather and the direction you're dashing in to get boosted in certain directions self.boss_requirements = [ SWORD, # D1 boss @@ -283,7 +327,7 @@ def __init__(self, options): "HINOX": self.attack_hookshot, "DODONGO": BOMB, "CUE_BALL": SWORD, - "GHOMA": OR(BOW, HOOKSHOT), + "GHOMA": OR(BOW, HOOKSHOT, MAGIC_ROD, BOOMERANG), "SMASHER": POWER_BRACELET, "GRIM_CREEPER": self.attack_hookshot_no_bomb, "BLAINO": SWORD, @@ -295,10 +339,14 @@ def __init__(self, options): # Adjust for options if not options.tradequest: - self.shuffled_magnifier = True - if options.bowwow != 'normal': + self.shuffled_magnifier = True # completing trade quest not required + if options.hardmode == "ohko": + self.miniboss_requirements["ROLLING_BONES"] = OR(BOW, MAGIC_ROD, BOOMERANG, AND(FEATHER, self.attack_hookshot)) # should not deal with roller damage + if options.bowwow != "normal": # We cheat in bowwow mode, we pretend we have the sword, as bowwow can pretty much do all what the sword ca$ # Except for taking out bushes (and crystal pillars are removed) self.bush.remove(SWORD) + self.pit_bush.remove(SWORD) + self.hit_switch.remove(SWORD) if options.logic == "casual": # In casual mode, remove the more complex kill methods self.bush.remove(MAGIC_POWDER) @@ -308,14 +356,18 @@ def __init__(self, options): self.attack_hookshot_powder.remove(BOMB) self.attack_no_boomerang.remove(BOMB) self.attack_skeleton.remove(BOMB) - if options.logic == "hard": + + if options.logic == 'hard' or options.logic == 'glitched' or options.logic == 'hell': + self.boss_requirements[1] = AND(OR(SWORD, MAGIC_ROD, BOMB), POWER_BRACELET) # bombs + bracelet genie self.boss_requirements[3] = AND(FLIPPERS, OR(SWORD, MAGIC_ROD, BOW, BOMB)) # bomb angler fish self.boss_requirements[6] = OR(MAGIC_ROD, AND(BOMB, BOW), COUNT(SWORD, 2), AND(OR(SWORD, HOOKSHOT, BOW), SHIELD)) # evil eagle 3 cycle magic rod / bomb arrows / l2 sword, and bow kill - if options.logic == "glitched": - self.boss_requirements[3] = AND(FLIPPERS, OR(SWORD, MAGIC_ROD, BOW, BOMB)) # bomb angler fish + self.attack_pols_voice = OR(BOMB, MAGIC_ROD, AND(OCARINA, SONG1), AND(self.stun_wizrobe, self.throw_enemy, BOW)) # wizrobe stun has same req as pols voice stun + self.attack_wizrobe = OR(BOMB, MAGIC_ROD, AND(self.stun_wizrobe, self.throw_enemy, BOW)) + + if options.logic == 'glitched' or options.logic == 'hell': self.boss_requirements[6] = OR(MAGIC_ROD, BOMB, BOW, HOOKSHOT, COUNT(SWORD, 2), AND(SWORD, SHIELD)) # evil eagle off screen kill or 3 cycle with bombs + if options.logic == "hell": - self.boss_requirements[3] = AND(FLIPPERS, OR(SWORD, MAGIC_ROD, BOW, BOMB)) # bomb angler fish - self.boss_requirements[6] = OR(MAGIC_ROD, BOMB, BOW, HOOKSHOT, COUNT(SWORD, 2), AND(SWORD, SHIELD)) # evil eagle off screen kill or 3 cycle with bombs self.boss_requirements[7] = OR(MAGIC_ROD, COUNT(SWORD, 2)) # hot head sword beams + self.miniboss_requirements["GHOMA"] = OR(BOW, HOOKSHOT, MAGIC_ROD, BOOMERANG, AND(OCARINA, BOMB, OR(SONG1, SONG3))) # use bombs to kill gohma, with ocarina to get good timings self.miniboss_requirements["GIANT_BUZZ_BLOB"] = OR(MAGIC_POWDER, COUNT(SWORD,2)) # use sword beams to damage buzz blob diff --git a/worlds/ladx/test/TestDungeonLogic.py b/worlds/ladx/test/TestDungeonLogic.py index b9b9672b9b16..3202afa95bc1 100644 --- a/worlds/ladx/test/TestDungeonLogic.py +++ b/worlds/ladx/test/TestDungeonLogic.py @@ -10,7 +10,7 @@ class TestD6(LADXTestBase): def test_keylogic(self): keys = self.get_items_by_name(ItemName.KEY6) - self.collect_by_name([ItemName.FACE_KEY, ItemName.HOOKSHOT, ItemName.POWER_BRACELET, ItemName.BOMB, ItemName.FEATHER, ItemName.FLIPPERS]) + self.collect_by_name([ItemName.FACE_KEY, ItemName.HOOKSHOT, ItemName.POWER_BRACELET, ItemName.BOMB, ItemName.PEGASUS_BOOTS, ItemName.FEATHER, ItemName.FLIPPERS]) # Can reach an un-keylocked item in the dungeon self.assertTrue(self.can_reach_location("L2 Bracelet Chest (Face Shrine)")) @@ -18,18 +18,18 @@ def test_keylogic(self): location_1 = "Tile Room Key (Face Shrine)" location_2 = "Top Right Horse Heads Chest (Face Shrine)" location_3 = "Pot Locked Chest (Face Shrine)" - self.assertFalse(self.can_reach_location(location_1)) - self.assertFalse(self.can_reach_location(location_2)) - self.assertFalse(self.can_reach_location(location_3)) + self.assertFalse(self.can_reach_location(location_1), "Tile Room Key, 0 keys") + self.assertFalse(self.can_reach_location(location_2), "Top Right Horse Heads Chest, 0 keys") + self.assertFalse(self.can_reach_location(location_3), "Pot Locked Chest, 0 keys") self.collect(keys[0]) - self.assertTrue(self.can_reach_location(location_1)) - self.assertFalse(self.can_reach_location(location_2)) - self.assertFalse(self.can_reach_location(location_3)) + self.assertTrue(self.can_reach_location(location_1), "Tile Room Key, 1 key") + self.assertFalse(self.can_reach_location(location_2), "Top Right Horse Heads Chest, 1 key") + self.assertFalse(self.can_reach_location(location_3), "Pot Locked Chest, 1 key") self.collect(keys[1]) - self.assertTrue(self.can_reach_location(location_1)) - self.assertTrue(self.can_reach_location(location_2)) - self.assertFalse(self.can_reach_location(location_3)) + self.assertTrue(self.can_reach_location(location_1), "Tile Room Key, 2 keys") + self.assertTrue(self.can_reach_location(location_2), "Top Right Horse Heads Chest, 2 keys") + self.assertFalse(self.can_reach_location(location_3), "Pot Locked Chest, 2 keys") self.collect(keys[2]) - self.assertTrue(self.can_reach_location(location_1)) - self.assertTrue(self.can_reach_location(location_2)) - self.assertTrue(self.can_reach_location(location_3)) + self.assertTrue(self.can_reach_location(location_1), "Tile Room Key, 3 keys") + self.assertTrue(self.can_reach_location(location_2), "Top Right Horse Heads Chest, 3 keys") + self.assertTrue(self.can_reach_location(location_3), "Pot Locked Chest, 3 keys") From f4b926ebbe491dc9a064b5d17bdd95051a5c6496 Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Thu, 5 Dec 2024 07:33:21 -0800 Subject: [PATCH 16/36] Pokemon Emerald: Exclude sacred ash post champion (#4207) * Pokemon Emerald: Exclude sacred ash post champion * Pokemon Emerald: Remove .value from toggle option check --- worlds/pokemon_emerald/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/worlds/pokemon_emerald/__init__.py b/worlds/pokemon_emerald/__init__.py index 040b89b1af51..7b62b9ef73b1 100644 --- a/worlds/pokemon_emerald/__init__.py +++ b/worlds/pokemon_emerald/__init__.py @@ -297,6 +297,12 @@ def exclude_locations(location_names: List[str]): "Safari Zone SE - Hidden Item in South Grass 2", "Safari Zone SE - Item in Grass", ]) + + # Sacred ash is on Navel Rock, which is locked behind the event tickets + if not self.options.event_tickets: + exclude_locations([ + "Navel Rock Top - Hidden Item Sacred Ash", + ]) elif self.options.goal == Goal.option_steven: exclude_locations([ "Meteor Falls 1F - Rival Steven", From ced93022b67532e8172fd217a7d3a7bd205b8177 Mon Sep 17 00:00:00 2001 From: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> Date: Fri, 6 Dec 2024 01:15:26 -0500 Subject: [PATCH 17/36] Adventure: Remove unused variables (#4301) * Remove unused variables * Provide old parameters to comment --- worlds/adventure/Locations.py | 2 -- worlds/adventure/Regions.py | 6 +++--- worlds/adventure/Rom.py | 2 -- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/worlds/adventure/Locations.py b/worlds/adventure/Locations.py index 27e504684cbf..ddaa266e5b74 100644 --- a/worlds/adventure/Locations.py +++ b/worlds/adventure/Locations.py @@ -47,8 +47,6 @@ def __init__(self, region, name, location_id, world_positions: [WorldPosition] = self.local_item: int = None def get_random_position(self, random): - x: int = None - y: int = None if self.world_positions is None or len(self.world_positions) == 0: if self.room_id is None: return None diff --git a/worlds/adventure/Regions.py b/worlds/adventure/Regions.py index e72806ca454f..4e4dd1e7baa1 100644 --- a/worlds/adventure/Regions.py +++ b/worlds/adventure/Regions.py @@ -76,10 +76,9 @@ def create_regions(options: PerGameCommonOptions, multiworld: MultiWorld, player multiworld.regions.append(credits_room_far_side) dragon_slay_check = options.dragon_slay_check.value - priority_locations = determine_priority_locations(multiworld, dragon_slay_check) + priority_locations = determine_priority_locations() for name, location_data in location_table.items(): - require_sword = False if location_data.region == "Varies": if location_data.name == "Slay Yorgle": if not dragon_slay_check: @@ -154,6 +153,7 @@ def create_regions(options: PerGameCommonOptions, multiworld: MultiWorld, player # Placeholder for adding sets of priority locations at generation, possibly as an option in the future -def determine_priority_locations(world: MultiWorld, dragon_slay_check: bool) -> {}: +# def determine_priority_locations(multiworld: MultiWorld, dragon_slay_check: bool) -> {}: +def determine_priority_locations() -> {}: priority_locations = {} return priority_locations diff --git a/worlds/adventure/Rom.py b/worlds/adventure/Rom.py index ca64e569716a..643f7a6c766c 100644 --- a/worlds/adventure/Rom.py +++ b/worlds/adventure/Rom.py @@ -86,9 +86,7 @@ class AdventureDeltaPatch(APPatch, metaclass=AutoPatchRegister): # locations: [], autocollect: [], seed_name: bytes, def __init__(self, *args: Any, **kwargs: Any) -> None: - patch_only = True if "autocollect" in kwargs: - patch_only = False self.foreign_items: [AdventureForeignItemInfo] = [AdventureForeignItemInfo(loc.short_location_id, loc.room_id, loc.room_x, loc.room_y) for loc in kwargs["locations"]] From c9625e1b35c36866ee727128fe73808580f37145 Mon Sep 17 00:00:00 2001 From: LeonarthCG <33758848+LeonarthCG@users.noreply.github.com> Date: Sat, 7 Dec 2024 11:29:27 +0100 Subject: [PATCH 18/36] Saving Princess: implement new game (#3238) * Saving Princess: initial commit * settings -> options Co-authored-by: Scipio Wright * settings -> options Co-authored-by: Scipio Wright * replace RegionData class with List[str] RegionData was only wrapping a List[str], so we can directly use List[str] * world: MultiWorld -> multiworld: MultiWorld * use world's random instead of multiworld's * use state's has_any and has_all where applicable * remove unused StartInventory import * reorder PerGameCommonOptions * fix relative AutoWorld import Co-authored-by: Scipio Wright * clean up double spaces * local commands -> Local Commands Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * remove redundant which items section Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> * game info rework * clean up item count redundancy * add game to readme and codeowners * fix get_region_entrance return type * world.multiworld.get -> world.get * add more events added events for the boss kills that open the gate, as well as for system power being restored these only apply if expanded pool is not selected * add client/autoupdater to launcher * reorder commands in game info * update docs with automated installation info * add quick links to doc * Update setup_en.md * remove standalone saving princess client * doc fixes * code improvements and redundant default removal as suggested by @Exempt-Medic this includes the removal of events from the item/location name to id, as well as checking for the player name being ASCII * add option to change launch coammnd the LaunchCommand option is filled to either the executable or wine with the necessary arguments based on Utils.is_windows * simplify valid install check * mod installer improvements now deletes possible existing files before installing the mod * add option groups and presets * add required client version * update docs about cheat items pop-ups items sent directly by the server (such as with starting inventory) now have pop-ups just like any other item * add Steam Input issue to faq * Saving Princess: BRAINOS requires all weapons * Saving Princess: Download dll and patch together Previously, gm-apclientpp.dll was downloaded from its own repo With this update, the dll is instead extracted from the same zip as the game's patch * Saving Princess: Add URI launch support * Saving Princess: goal also requires all weapons given it's past brainos * Saving Princess: update docs automatic connection support was added, docs now reflect this * Saving Princess: extend([item]) -> append(item) * Saving Princess: automatic connection validation also parses the slot, password and host:port into parameters for the game * Saving Princess: change subprocess .run to .Popen This keeps the game from freezing the launcher while it is running --------- Co-authored-by: Scipio Wright Co-authored-by: Nicholas Saylor <79181893+nicholassaylor@users.noreply.github.com> Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> --- README.md | 1 + docs/CODEOWNERS | 3 + worlds/saving_princess/Client.py | 258 ++++++++++++++++++ worlds/saving_princess/Constants.py | 97 +++++++ worlds/saving_princess/Items.py | 98 +++++++ worlds/saving_princess/Locations.py | 82 ++++++ worlds/saving_princess/Options.py | 183 +++++++++++++ worlds/saving_princess/Regions.py | 110 ++++++++ worlds/saving_princess/Rules.py | 132 +++++++++ worlds/saving_princess/__init__.py | 174 ++++++++++++ .../docs/en_Saving Princess.md | 55 ++++ worlds/saving_princess/docs/setup_en.md | 148 ++++++++++ 12 files changed, 1341 insertions(+) create mode 100644 worlds/saving_princess/Client.py create mode 100644 worlds/saving_princess/Constants.py create mode 100644 worlds/saving_princess/Items.py create mode 100644 worlds/saving_princess/Locations.py create mode 100644 worlds/saving_princess/Options.py create mode 100644 worlds/saving_princess/Regions.py create mode 100644 worlds/saving_princess/Rules.py create mode 100644 worlds/saving_princess/__init__.py create mode 100644 worlds/saving_princess/docs/en_Saving Princess.md create mode 100644 worlds/saving_princess/docs/setup_en.md diff --git a/README.md b/README.md index 2cc3c18aa09d..21a6faaa2698 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ Currently, the following games are supported: * Mega Man 2 * Yacht Dice * Faxanadu +* Saving Princess For setup and instructions check out our [tutorials page](https://archipelago.gg/tutorial/). Downloads can be found at [Releases](https://github.com/ArchipelagoMW/Archipelago/releases), including compiled diff --git a/docs/CODEOWNERS b/docs/CODEOWNERS index 64a1362bf380..1aec57fc90f6 100644 --- a/docs/CODEOWNERS +++ b/docs/CODEOWNERS @@ -142,6 +142,9 @@ # Risk of Rain 2 /worlds/ror2/ @kindasneaki +# Saving Princess +/worlds/saving_princess/ @LeonarthCG + # Shivers /worlds/shivers/ @GodlFire diff --git a/worlds/saving_princess/Client.py b/worlds/saving_princess/Client.py new file mode 100644 index 000000000000..29a97bb667c0 --- /dev/null +++ b/worlds/saving_princess/Client.py @@ -0,0 +1,258 @@ +import argparse +import zipfile +from io import BytesIO + +import bsdiff4 +from datetime import datetime +import hashlib +import json +import logging +import os +import requests +import secrets +import shutil +import subprocess +from tkinter import messagebox +from typing import Any, Dict, Set +import urllib +import urllib.parse + +import Utils +from .Constants import * +from . import SavingPrincessWorld + +files_to_clean: Set[str] = { + "D3DX9_43.dll", + "data.win", + "m_boss.ogg", + "m_brainos.ogg", + "m_coldarea.ogg", + "m_escape.ogg", + "m_hotarea.ogg", + "m_hsis_dark.ogg", + "m_hsis_power.ogg", + "m_introarea.ogg", + "m_malakhov.ogg", + "m_miniboss.ogg", + "m_ninja.ogg", + "m_purple.ogg", + "m_space_idle.ogg", + "m_stonearea.ogg", + "m_swamp.ogg", + "m_zzz.ogg", + "options.ini", + "Saving Princess v0_8.exe", + "splash.png", + "gm-apclientpp.dll", + "LICENSE", + "original_data.win", + "versions.json", +} + +file_hashes: Dict[str, str] = { + "D3DX9_43.dll": "86e39e9161c3d930d93822f1563c280d", + "Saving Princess v0_8.exe": "cc3ad10c782e115d93c5b9fbc5675eaf", + "original_data.win": "f97b80204bd9ae535faa5a8d1e5eb6ca", +} + + +class UrlResponse: + def __init__(self, response_code: int, data: Any): + self.response_code = response_code + self.data = data + + +def get_date(target_asset: str) -> str: + """Provided the name of an asset, fetches its update date""" + try: + with open("versions.json", "r") as versions_json: + return json.load(versions_json)[target_asset] + except (FileNotFoundError, KeyError, json.decoder.JSONDecodeError): + return "2000-01-01T00:00:00Z" # arbitrary old date + + +def set_date(target_asset: str, date: str) -> None: + """Provided the name of an asset and a date, sets it update date""" + try: + with open("versions.json", "r") as versions_json: + versions = json.load(versions_json) + versions[target_asset] = date + except (FileNotFoundError, KeyError, json.decoder.JSONDecodeError): + versions = {target_asset: date} + with open("versions.json", "w") as versions_json: + json.dump(versions, versions_json) + + +def get_timestamp(date: str) -> float: + """Parses a GitHub REST API date into a timestamp""" + return datetime.strptime(date, "%Y-%m-%dT%H:%M:%SZ").timestamp() + + +def send_request(request_url: str) -> UrlResponse: + """Fetches status code and json response from given url""" + response = requests.get(request_url) + if response.status_code == 200: # success + try: + data = response.json() + except requests.exceptions.JSONDecodeError: + raise RuntimeError(f"Unable to fetch data. (status code {response.status_code}).") + else: + data = {} + return UrlResponse(response.status_code, data) + + +def update(target_asset: str, url: str) -> bool: + """ + Returns True if the data was fetched and installed + (or it was already on the latest version, or the user refused the update) + Returns False if rate limit was exceeded + """ + try: + logging.info(f"Checking for {target_asset} updates.") + response = send_request(url) + if response.response_code == 403: # rate limit exceeded + return False + assets = response.data[0]["assets"] + for asset in assets: + if target_asset in asset["name"]: + newest_date: str = asset["updated_at"] + release_url: str = asset["browser_download_url"] + break + else: + raise RuntimeError(f"Failed to locate {target_asset} amongst the assets.") + except (KeyError, IndexError, TypeError, RuntimeError): + update_error = f"Failed to fetch latest {target_asset}." + messagebox.showerror("Failure", update_error) + raise RuntimeError(update_error) + try: + update_available = get_timestamp(newest_date) > get_timestamp(get_date(target_asset)) + if update_available and messagebox.askyesnocancel(f"New {target_asset}", + "Would you like to install the new version now?"): + # unzip and patch + with urllib.request.urlopen(release_url) as download: + with zipfile.ZipFile(BytesIO(download.read())) as zf: + zf.extractall() + patch_game() + set_date(target_asset, newest_date) + except (ValueError, RuntimeError, urllib.error.HTTPError): + update_error = f"Failed to apply update." + messagebox.showerror("Failure", update_error) + raise RuntimeError(update_error) + return True + + +def patch_game() -> None: + """Applies the patch to data.win""" + logging.info("Proceeding to patch.") + with open(PATCH_NAME, "rb") as patch: + with open("original_data.win", "rb") as data: + patched_data = bsdiff4.patch(data.read(), patch.read()) + with open("data.win", "wb") as data: + data.write(patched_data) + logging.info("Done!") + + +def is_install_valid() -> bool: + """Checks that the mandatory files that we cannot replace do exist in the current folder""" + for file_name, expected_hash in file_hashes.items(): + if not os.path.exists(file_name): + return False + with open(file_name, "rb") as clean: + current_hash = hashlib.md5(clean.read()).hexdigest() + if not secrets.compare_digest(current_hash, expected_hash): + return False + return True + + +def install() -> None: + """Extracts all the game files into the mod installation folder""" + logging.info("Mod installation missing or corrupted, proceeding to reinstall.") + # get the cab file and extract it into the installation folder + with open(SavingPrincessWorld.settings.exe_path, "rb") as exe: + # find the cab header + logging.info("Looking for cab archive inside exe.") + cab_found: bool = False + while not cab_found: + cab_found = exe.read(1) == b'M' and exe.read(1) == b'S' and exe.read(1) == b'C' and exe.read(1) == b'F' + exe.read(4) # skip reserved1, always 0 + cab_size: int = int.from_bytes(exe.read(4), "little") # read size in bytes + exe.seek(-12, 1) # move the cursor back to the start of the cab file + logging.info(f"Archive found at offset {hex(exe.seek(0, 1))}, size: {hex(cab_size)}.") + logging.info("Extracting cab archive from exe.") + with open("saving_princess.cab", "wb") as cab: + cab.write(exe.read(cab_size)) + + # clean up files from previous installations + for file_name in files_to_clean: + if os.path.exists(file_name): + os.remove(file_name) + + logging.info("Extracting files from cab archive.") + if Utils.is_windows: + subprocess.run(["Extrac32", "/Y", "/E", "saving_princess.cab"]) + else: + if shutil.which("wine") is not None: + subprocess.run(["wine", "Extrac32", "/Y", "/E", "saving_princess.cab"]) + elif shutil.which("7z") is not None: + subprocess.run(["7z", "e", "saving_princess.cab"]) + else: + error = "Could not find neither wine nor 7z.\n\nPlease install either the wine or the p7zip package." + messagebox.showerror("Missing package!", f"Error: {error}") + raise RuntimeError(error) + os.remove("saving_princess.cab") # delete the cab file + + shutil.copyfile("data.win", "original_data.win") # and make a copy of data.win + logging.info("Done!") + + +def launch(*args: str) -> Any: + """Check args, then the mod installation, then launch the game""" + name: str = "" + password: str = "" + server: str = "" + if args: + parser = argparse.ArgumentParser(description=f"{GAME_NAME} Client Launcher") + parser.add_argument("url", type=str, nargs="?", help="Archipelago Webhost uri to auto connect to.") + args = parser.parse_args(args) + + # handle if text client is launched using the "archipelago://name:pass@host:port" url from webhost + if args.url: + url = urllib.parse.urlparse(args.url) + if url.scheme == "archipelago": + server = f'--server="{url.hostname}:{url.port}"' + if url.username: + name = f'--name="{urllib.parse.unquote(url.username)}"' + if url.password: + password = f'--password="{urllib.parse.unquote(url.password)}"' + else: + parser.error(f"bad url, found {args.url}, expected url in form of archipelago://archipelago.gg:38281") + + Utils.init_logging(CLIENT_NAME, exception_logger="Client") + + os.chdir(SavingPrincessWorld.settings.install_folder) + + # check that the mod installation is valid + if not is_install_valid(): + if messagebox.askyesnocancel(f"Mod installation missing or corrupted!", + "Would you like to reinstall now?"): + install() + # if there is no mod installation, and we are not installing it, then there isn't much to do + else: + return + + # check for updates + if not update(DOWNLOAD_NAME, DOWNLOAD_URL): + messagebox.showinfo("Rate limit exceeded", + "GitHub REST API limit exceeded, could not check for updates.\n\n" + "This will not prevent the game from being played if it was already playable.") + + # and try to launch the game + if SavingPrincessWorld.settings.launch_game: + logging.info("Launching game.") + try: + subprocess.Popen(f"{SavingPrincessWorld.settings.launch_command} {name} {password} {server}") + except FileNotFoundError: + error = ("Could not run the game!\n\n" + "Please check that launch_command in options.yaml or host.yaml is set up correctly.") + messagebox.showerror("Command error!", f"Error: {error}") + raise RuntimeError(error) diff --git a/worlds/saving_princess/Constants.py b/worlds/saving_princess/Constants.py new file mode 100644 index 000000000000..0dde18779727 --- /dev/null +++ b/worlds/saving_princess/Constants.py @@ -0,0 +1,97 @@ +GAME_NAME: str = "Saving Princess" +BASE_ID: int = 0x53565052494E # SVPRIN + +# client installation data +CLIENT_NAME = f"{GAME_NAME.replace(' ', '')}Client" +GAME_HASH = "35a111d0149fae1f04b7b3fea42c5319" +PATCH_NAME = "saving_princess_basepatch.bsdiff4" +DOWNLOAD_NAME = "saving_princess_archipelago.zip" +DOWNLOAD_URL = "https://api.github.com/repos/LeonarthCG/saving-princess-archipelago/releases" + +# item names +ITEM_WEAPON_CHARGE: str = "Powered Blaster" +ITEM_WEAPON_FIRE: str = "Flamethrower" +ITEM_WEAPON_ICE: str = "Ice Spreadshot" +ITEM_WEAPON_VOLT: str = "Volt Laser" +ITEM_MAX_HEALTH: str = "Life Extension" +ITEM_MAX_AMMO: str = "Clip Extension" +ITEM_RELOAD_SPEED: str = "Faster Reload" +ITEM_SPECIAL_AMMO: str = "Special Extension" +ITEM_JACKET: str = "Jacket" + +EP_ITEM_GUARD_GONE: str = "Cave Key" +EP_ITEM_CLIFF_GONE: str = "Volcanic Key" +EP_ITEM_ACE_GONE: str = "Arctic Key" +EP_ITEM_SNAKE_GONE: str = "Swamp Key" +EP_ITEM_POWER_ON: str = "System Power" + +FILLER_ITEM_HEAL: str = "Full Heal" +FILLER_ITEM_QUICK_FIRE: str = "Quick-fire Mode" +FILLER_ITEM_ACTIVE_CAMO: str = "Active Camouflage" + +TRAP_ITEM_ICE: str = "Ice Trap" +TRAP_ITEM_SHAKES: str = "Shake Trap" +TRAP_ITEM_NINJA: str = "Ninja Trap" + +EVENT_ITEM_GUARD_GONE: str = "Guard neutralized" +EVENT_ITEM_CLIFF_GONE: str = "Cliff neutralized" +EVENT_ITEM_ACE_GONE: str = "Ace neutralized" +EVENT_ITEM_SNAKE_GONE: str = "Snake neutralized" +EVENT_ITEM_POWER_ON: str = "Power restored" +EVENT_ITEM_VICTORY: str = "PRINCESS" + +# location names, EP stands for Expanded Pool +LOCATION_CAVE_AMMO: str = "Cave: After Wallboss" +LOCATION_CAVE_RELOAD: str = "Cave: Balcony" +LOCATION_CAVE_HEALTH: str = "Cave: Spike pit" +LOCATION_CAVE_WEAPON: str = "Cave: Powered Blaster chest" +LOCATION_VOLCANIC_RELOAD: str = "Volcanic: Hot coals" +LOCATION_VOLCANIC_HEALTH: str = "Volcanic: Under bridge" +LOCATION_VOLCANIC_AMMO: str = "Volcanic: Behind wall" +LOCATION_VOLCANIC_WEAPON: str = "Volcanic: Flamethrower chest" +LOCATION_ARCTIC_AMMO: str = "Arctic: Before pipes" +LOCATION_ARCTIC_RELOAD: str = "Arctic: After Guard" +LOCATION_ARCTIC_HEALTH: str = "Arctic: Under snow" +LOCATION_ARCTIC_WEAPON: str = "Arctic: Ice Spreadshot chest" +LOCATION_JACKET: str = "Arctic: Jacket chest" +LOCATION_HUB_AMMO: str = "Hub: Hidden near Arctic" +LOCATION_HUB_HEALTH: str = "Hub: Hidden near Cave" +LOCATION_HUB_RELOAD: str = "Hub: Hidden near Swamp" +LOCATION_SWAMP_AMMO: str = "Swamp: Bramble room" +LOCATION_SWAMP_HEALTH: str = "Swamp: Down the chimney" +LOCATION_SWAMP_RELOAD: str = "Swamp: Wall maze" +LOCATION_SWAMP_SPECIAL: str = "Swamp: Special Extension chest" +LOCATION_ELECTRICAL_RELOAD: str = "Electrical: Near generator" +LOCATION_ELECTRICAL_HEALTH: str = "Electrical: Behind wall" +LOCATION_ELECTRICAL_AMMO: str = "Electrical: Before Malakhov" +LOCATION_ELECTRICAL_WEAPON: str = "Electrical: Volt Laser chest" + +EP_LOCATION_CAVE_MINIBOSS: str = "Cave: Wallboss (Boss)" +EP_LOCATION_CAVE_BOSS: str = "Cave: Guard (Boss)" +EP_LOCATION_VOLCANIC_BOSS: str = "Volcanic: Cliff (Boss)" +EP_LOCATION_ARCTIC_BOSS: str = "Arctic: Ace (Boss)" +EP_LOCATION_HUB_CONSOLE: str = "Hub: Console login" +EP_LOCATION_HUB_NINJA_SCARE: str = "Hub: Ninja scare (Boss?)" +EP_LOCATION_SWAMP_BOSS: str = "Swamp: Snake (Boss)" +EP_LOCATION_ELEVATOR_NINJA_FIGHT: str = "Elevator: Ninja (Boss)" +EP_LOCATION_ELECTRICAL_EXTRA: str = "Electrical: Tesla orb" +EP_LOCATION_ELECTRICAL_MINIBOSS: str = "Electrical: Generator (Boss)" +EP_LOCATION_ELECTRICAL_BOSS: str = "Electrical: Malakhov (Boss)" +EP_LOCATION_ELECTRICAL_FINAL_BOSS: str = "Electrical: BRAINOS (Boss)" + +EVENT_LOCATION_GUARD_GONE: str = "Cave status" +EVENT_LOCATION_CLIFF_GONE: str = "Volcanic status" +EVENT_LOCATION_ACE_GONE: str = "Arctic status" +EVENT_LOCATION_SNAKE_GONE: str = "Swamp status" +EVENT_LOCATION_POWER_ON: str = "Generator status" +EVENT_LOCATION_VICTORY: str = "Mission objective" + +# region names +REGION_MENU: str = "Menu" +REGION_CAVE: str = "Cave" +REGION_VOLCANIC: str = "Volcanic" +REGION_ARCTIC: str = "Arctic" +REGION_HUB: str = "Hub" +REGION_SWAMP: str = "Swamp" +REGION_ELECTRICAL: str = "Electrical" +REGION_ELECTRICAL_POWERED: str = "Electrical (Power On)" diff --git a/worlds/saving_princess/Items.py b/worlds/saving_princess/Items.py new file mode 100644 index 000000000000..4c1fe78a9c72 --- /dev/null +++ b/worlds/saving_princess/Items.py @@ -0,0 +1,98 @@ +from typing import Optional, Dict, Tuple + +from BaseClasses import Item, ItemClassification as ItemClass + +from .Constants import * + + +class SavingPrincessItem(Item): + game: str = GAME_NAME + + +class ItemData: + item_class: ItemClass + code: Optional[int] + count: int # Number of copies for the item that will be made of class item_class + count_extra: int # Number of extra copies for the item that will be made as useful + + def __init__(self, item_class: ItemClass, code: Optional[int] = None, count: int = 1, count_extra: int = 0): + self.item_class = item_class + + self.code = code + if code is not None: + self.code += BASE_ID + + # if this is filler, a trap or an event, ignore the count + if self.item_class == ItemClass.filler or self.item_class == ItemClass.trap or code is None: + self.count = 0 + self.count_extra = 0 + else: + self.count = count + self.count_extra = count_extra + + def create_item(self, player: int): + return SavingPrincessItem(item_data_names[self], self.item_class, self.code, player) + + +item_dict_weapons: Dict[str, ItemData] = { + ITEM_WEAPON_CHARGE: ItemData(ItemClass.progression, 0), + ITEM_WEAPON_FIRE: ItemData(ItemClass.progression, 1), + ITEM_WEAPON_ICE: ItemData(ItemClass.progression, 2), + ITEM_WEAPON_VOLT: ItemData(ItemClass.progression, 3), +} + +item_dict_upgrades: Dict[str, ItemData] = { + ITEM_MAX_HEALTH: ItemData(ItemClass.progression, 4, 2, 4), + ITEM_MAX_AMMO: ItemData(ItemClass.progression, 5, 2, 4), + ITEM_RELOAD_SPEED: ItemData(ItemClass.progression, 6, 4, 2), + ITEM_SPECIAL_AMMO: ItemData(ItemClass.useful, 7), +} + +item_dict_base: Dict[str, ItemData] = { + **item_dict_weapons, + **item_dict_upgrades, + ITEM_JACKET: ItemData(ItemClass.useful, 8), +} + +item_dict_keys: Dict[str, ItemData] = { + EP_ITEM_GUARD_GONE: ItemData(ItemClass.progression, 9), + EP_ITEM_CLIFF_GONE: ItemData(ItemClass.progression, 10), + EP_ITEM_ACE_GONE: ItemData(ItemClass.progression, 11), + EP_ITEM_SNAKE_GONE: ItemData(ItemClass.progression, 12), +} + +item_dict_expanded: Dict[str, ItemData] = { + **item_dict_base, + **item_dict_keys, + EP_ITEM_POWER_ON: ItemData(ItemClass.progression, 13), +} + +item_dict_filler: Dict[str, ItemData] = { + FILLER_ITEM_HEAL: ItemData(ItemClass.filler, 14), + FILLER_ITEM_QUICK_FIRE: ItemData(ItemClass.filler, 15), + FILLER_ITEM_ACTIVE_CAMO: ItemData(ItemClass.filler, 16), +} + +item_dict_traps: Dict[str, ItemData] = { + TRAP_ITEM_ICE: ItemData(ItemClass.trap, 17), + TRAP_ITEM_SHAKES: ItemData(ItemClass.trap, 18), + TRAP_ITEM_NINJA: ItemData(ItemClass.trap, 19), +} + +item_dict_events: Dict[str, ItemData] = { + EVENT_ITEM_GUARD_GONE: ItemData(ItemClass.progression), + EVENT_ITEM_CLIFF_GONE: ItemData(ItemClass.progression), + EVENT_ITEM_ACE_GONE: ItemData(ItemClass.progression), + EVENT_ITEM_SNAKE_GONE: ItemData(ItemClass.progression), + EVENT_ITEM_POWER_ON: ItemData(ItemClass.progression), + EVENT_ITEM_VICTORY: ItemData(ItemClass.progression), +} + +item_dict: Dict[str, ItemData] = { + **item_dict_expanded, + **item_dict_filler, + **item_dict_traps, + **item_dict_events, +} + +item_data_names: Dict[ItemData, str] = {value: key for key, value in item_dict.items()} diff --git a/worlds/saving_princess/Locations.py b/worlds/saving_princess/Locations.py new file mode 100644 index 000000000000..bc7b0f0d6efd --- /dev/null +++ b/worlds/saving_princess/Locations.py @@ -0,0 +1,82 @@ +from typing import Optional, Dict + +from BaseClasses import Location + +from .Constants import * + + +class SavingPrincessLocation(Location): + game: str = GAME_NAME + + +class LocData: + code: Optional[int] + + def __init__(self, code: Optional[int] = None): + if code is not None: + self.code = code + BASE_ID + else: + self.code = None + + +location_dict_base: Dict[str, LocData] = { + LOCATION_CAVE_AMMO: LocData(0), + LOCATION_CAVE_RELOAD: LocData(1), + LOCATION_CAVE_HEALTH: LocData(2), + LOCATION_CAVE_WEAPON: LocData(3), + LOCATION_VOLCANIC_RELOAD: LocData(4), + LOCATION_VOLCANIC_HEALTH: LocData(5), + LOCATION_VOLCANIC_AMMO: LocData(6), + LOCATION_VOLCANIC_WEAPON: LocData(7), + LOCATION_ARCTIC_AMMO: LocData(8), + LOCATION_ARCTIC_RELOAD: LocData(9), + LOCATION_ARCTIC_HEALTH: LocData(10), + LOCATION_ARCTIC_WEAPON: LocData(11), + LOCATION_JACKET: LocData(12), + LOCATION_HUB_AMMO: LocData(13), + LOCATION_HUB_HEALTH: LocData(14), + LOCATION_HUB_RELOAD: LocData(15), + LOCATION_SWAMP_AMMO: LocData(16), + LOCATION_SWAMP_HEALTH: LocData(17), + LOCATION_SWAMP_RELOAD: LocData(18), + LOCATION_SWAMP_SPECIAL: LocData(19), + LOCATION_ELECTRICAL_RELOAD: LocData(20), + LOCATION_ELECTRICAL_HEALTH: LocData(21), + LOCATION_ELECTRICAL_AMMO: LocData(22), + LOCATION_ELECTRICAL_WEAPON: LocData(23), +} + +location_dict_expanded: Dict[str, LocData] = { + **location_dict_base, + EP_LOCATION_CAVE_MINIBOSS: LocData(24), + EP_LOCATION_CAVE_BOSS: LocData(25), + EP_LOCATION_VOLCANIC_BOSS: LocData(26), + EP_LOCATION_ARCTIC_BOSS: LocData(27), + EP_LOCATION_HUB_CONSOLE: LocData(28), + EP_LOCATION_HUB_NINJA_SCARE: LocData(29), + EP_LOCATION_SWAMP_BOSS: LocData(30), + EP_LOCATION_ELEVATOR_NINJA_FIGHT: LocData(31), + EP_LOCATION_ELECTRICAL_EXTRA: LocData(32), + EP_LOCATION_ELECTRICAL_MINIBOSS: LocData(33), + EP_LOCATION_ELECTRICAL_BOSS: LocData(34), + EP_LOCATION_ELECTRICAL_FINAL_BOSS: LocData(35), +} + +location_dict_event_expanded: Dict[str, LocData] = { + EVENT_LOCATION_VICTORY: LocData(), +} + +# most event locations are only relevant without expanded pool +location_dict_events: Dict[str, LocData] = { + EVENT_LOCATION_GUARD_GONE: LocData(), + EVENT_LOCATION_CLIFF_GONE: LocData(), + EVENT_LOCATION_ACE_GONE: LocData(), + EVENT_LOCATION_SNAKE_GONE: LocData(), + EVENT_LOCATION_POWER_ON: LocData(), + **location_dict_event_expanded, +} + +location_dict: Dict[str, LocData] = { + **location_dict_expanded, + **location_dict_events, +} diff --git a/worlds/saving_princess/Options.py b/worlds/saving_princess/Options.py new file mode 100644 index 000000000000..75135a1d15bb --- /dev/null +++ b/worlds/saving_princess/Options.py @@ -0,0 +1,183 @@ +from dataclasses import dataclass +from typing import Dict, Any + +from Options import PerGameCommonOptions, DeathLink, StartInventoryPool, Choice, DefaultOnToggle, Range, Toggle, \ + OptionGroup + + +class ExpandedPool(DefaultOnToggle): + """ + Determines if places other than chests and special weapons will be locations. + This includes boss fights as well as powering the tesla orb and completing the console login. + In Expanded Pool, system power is instead restored when receiving the System Power item. + Similarly, the final area door will open once the four Key items, one for each main area, have been found. + """ + display_name = "Expanded Item Pool" + + +class InstantSaving(DefaultOnToggle): + """ + When enabled, save points activate with no delay when touched. + This makes saving much faster, at the cost of being unable to pick and choose when to save in order to save warp. + """ + display_name = "Instant Saving" + + +class SprintAvailability(Choice): + """ + Determines under which conditions the debug sprint is made accessible to the player. + To sprint, hold down Ctrl if playing on keyboard, or Left Bumper if on gamepad (remappable). + With Jacket: you will not be able to sprint until after the Jacket item has been found. + """ + display_name = "Sprint Availability" + option_never_available = 0 + option_always_available = 1 + option_available_with_jacket = 2 + default = option_available_with_jacket + + +class CliffWeaponUpgrade(Choice): + """ + Determines which weapon Cliff uses against you, base or upgraded. + This does not change the available strategies all that much. + Vanilla: Cliff adds fire to his grenades if Ace has been defeated. + If playing with the expanded pool, the Arctic Key will trigger the change instead. + """ + display_name = "Cliff Weapon Upgrade" + option_never_upgraded = 0 + option_always_upgraded = 1 + option_vanilla = 2 + default = option_always_upgraded + + +class AceWeaponUpgrade(Choice): + """ + Determines which weapon Ace uses against you, base or upgraded. + Ace with his base weapon is very hard to dodge, the upgraded weapon offers a more balanced experience. + Vanilla: Ace uses ice attacks if Cliff has been defeated. + If playing with the expanded pool, the Volcanic Key will trigger the change instead. + """ + display_name = "Ace Weapon Upgrade" + option_never_upgraded = 0 + option_always_upgraded = 1 + option_vanilla = 2 + default = option_always_upgraded + + +class ScreenShakeIntensity(Range): + """ + Percentage multiplier for screen shake effects. + 0% means the screen will not shake at all. + 100% means the screen shake will be the same as in vanilla. + """ + display_name = "Screen Shake Intensity %" + range_start = 0 + range_end = 100 + default = 50 + + +class IFramesDuration(Range): + """ + Percentage multiplier for Portia's invincibility frames. + 0% means you will have no invincibility frames. + 100% means invincibility frames will be the same as vanilla. + """ + display_name = "IFrame Duration %" + range_start = 0 + range_end = 400 + default = 100 + + +class TrapChance(Range): + """ + Likelihood of a filler item becoming a trap. + """ + display_name = "Trap Chance" + range_start = 0 + range_end = 100 + default = 50 + + +class MusicShuffle(Toggle): + """ + Enables music shuffling. + The title screen song is not shuffled, as it plays before the client connects. + """ + display_name = "Music Shuffle" + + +@dataclass +class SavingPrincessOptions(PerGameCommonOptions): + # generation options + start_inventory_from_pool: StartInventoryPool + expanded_pool: ExpandedPool + trap_chance: TrapChance + # gameplay options + death_link: DeathLink + instant_saving: InstantSaving + sprint_availability: SprintAvailability + cliff_weapon_upgrade: CliffWeaponUpgrade + ace_weapon_upgrade: AceWeaponUpgrade + iframes_duration: IFramesDuration + # aesthetic options + shake_intensity: ScreenShakeIntensity + music_shuffle: MusicShuffle + + +groups = [ + OptionGroup("Generation Options", [ + ExpandedPool, + TrapChance, + ]), + OptionGroup("Gameplay Options", [ + DeathLink, + InstantSaving, + SprintAvailability, + CliffWeaponUpgrade, + AceWeaponUpgrade, + IFramesDuration, + ]), + OptionGroup("Aesthetic Options", [ + ScreenShakeIntensity, + MusicShuffle, + ]), +] + +presets = { + "Vanilla-like": { + "expanded_pool": False, + "trap_chance": 0, + "death_link": False, + "instant_saving": False, + "sprint_availability": SprintAvailability.option_never_available, + "cliff_weapon_upgrade": CliffWeaponUpgrade.option_vanilla, + "ace_weapon_upgrade": AceWeaponUpgrade.option_vanilla, + "iframes_duration": 100, + "shake_intensity": 100, + "music_shuffle": False, + }, + "Easy": { + "expanded_pool": True, + "trap_chance": 0, + "death_link": False, + "instant_saving": True, + "sprint_availability": SprintAvailability.option_always_available, + "cliff_weapon_upgrade": CliffWeaponUpgrade.option_never_upgraded, + "ace_weapon_upgrade": AceWeaponUpgrade.option_always_upgraded, + "iframes_duration": 200, + "shake_intensity": 50, + "music_shuffle": False, + }, + "Hard": { + "expanded_pool": True, + "trap_chance": 100, + "death_link": True, + "instant_saving": True, + "sprint_availability": SprintAvailability.option_never_available, + "cliff_weapon_upgrade": CliffWeaponUpgrade.option_always_upgraded, + "ace_weapon_upgrade": AceWeaponUpgrade.option_never_upgraded, + "iframes_duration": 50, + "shake_intensity": 100, + "music_shuffle": False, + } +} diff --git a/worlds/saving_princess/Regions.py b/worlds/saving_princess/Regions.py new file mode 100644 index 000000000000..b67bda9b2784 --- /dev/null +++ b/worlds/saving_princess/Regions.py @@ -0,0 +1,110 @@ +from typing import List, Dict + +from BaseClasses import MultiWorld, Region, Entrance + +from . import Locations +from .Constants import * + + +region_dict: Dict[str, List[str]] = { + REGION_MENU: [], + REGION_CAVE: [ + LOCATION_CAVE_AMMO, + LOCATION_CAVE_RELOAD, + LOCATION_CAVE_HEALTH, + LOCATION_CAVE_WEAPON, + EP_LOCATION_CAVE_MINIBOSS, + EP_LOCATION_CAVE_BOSS, + EVENT_LOCATION_GUARD_GONE, + ], + REGION_VOLCANIC: [ + LOCATION_VOLCANIC_RELOAD, + LOCATION_VOLCANIC_HEALTH, + LOCATION_VOLCANIC_AMMO, + LOCATION_VOLCANIC_WEAPON, + EP_LOCATION_VOLCANIC_BOSS, + EVENT_LOCATION_CLIFF_GONE, + ], + REGION_ARCTIC: [ + LOCATION_ARCTIC_AMMO, + LOCATION_ARCTIC_RELOAD, + LOCATION_ARCTIC_HEALTH, + LOCATION_ARCTIC_WEAPON, + LOCATION_JACKET, + EP_LOCATION_ARCTIC_BOSS, + EVENT_LOCATION_ACE_GONE, + ], + REGION_HUB: [ + LOCATION_HUB_AMMO, + LOCATION_HUB_HEALTH, + LOCATION_HUB_RELOAD, + EP_LOCATION_HUB_CONSOLE, + EP_LOCATION_HUB_NINJA_SCARE, + ], + REGION_SWAMP: [ + LOCATION_SWAMP_AMMO, + LOCATION_SWAMP_HEALTH, + LOCATION_SWAMP_RELOAD, + LOCATION_SWAMP_SPECIAL, + EP_LOCATION_SWAMP_BOSS, + EVENT_LOCATION_SNAKE_GONE, + ], + REGION_ELECTRICAL: [ + EP_LOCATION_ELEVATOR_NINJA_FIGHT, + LOCATION_ELECTRICAL_WEAPON, + EP_LOCATION_ELECTRICAL_MINIBOSS, + EP_LOCATION_ELECTRICAL_EXTRA, + EVENT_LOCATION_POWER_ON, + ], + REGION_ELECTRICAL_POWERED: [ + LOCATION_ELECTRICAL_RELOAD, + LOCATION_ELECTRICAL_HEALTH, + LOCATION_ELECTRICAL_AMMO, + EP_LOCATION_ELECTRICAL_BOSS, + EP_LOCATION_ELECTRICAL_FINAL_BOSS, + EVENT_LOCATION_VICTORY, + ], +} + + +def set_region_locations(region: Region, location_names: List[str], is_pool_expanded: bool): + location_pool = {**Locations.location_dict_base, **Locations.location_dict_events} + if is_pool_expanded: + location_pool = {**Locations.location_dict_expanded, **Locations.location_dict_event_expanded} + region.locations = [ + Locations.SavingPrincessLocation( + region.player, + name, + Locations.location_dict[name].code, + region + ) for name in location_names if name in location_pool.keys() + ] + + +def create_regions(multiworld: MultiWorld, player: int, is_pool_expanded: bool): + for region_name, location_names in region_dict.items(): + region = Region(region_name, player, multiworld) + set_region_locations(region, location_names, is_pool_expanded) + multiworld.regions.append(region) + connect_regions(multiworld, player) + + +def connect_regions(multiworld: MultiWorld, player: int): + # and add a connection from the menu to the hub region + menu = multiworld.get_region(REGION_MENU, player) + hub = multiworld.get_region(REGION_HUB, player) + connection = Entrance(player, f"{REGION_HUB} entrance", menu) + menu.exits.append(connection) + connection.connect(hub) + + # now add an entrance from every other region to hub + for region_name in [REGION_CAVE, REGION_VOLCANIC, REGION_ARCTIC, REGION_SWAMP, REGION_ELECTRICAL]: + connection = Entrance(player, f"{region_name} entrance", hub) + hub.exits.append(connection) + connection.connect(multiworld.get_region(region_name, player)) + + # and finally, the connection between the final region and its powered version + electrical = multiworld.get_region(REGION_ELECTRICAL, player) + connection = Entrance(player, f"{REGION_ELECTRICAL_POWERED} entrance", electrical) + electrical.exits.append(connection) + connection.connect(multiworld.get_region(REGION_ELECTRICAL_POWERED, player)) diff --git a/worlds/saving_princess/Rules.py b/worlds/saving_princess/Rules.py new file mode 100644 index 000000000000..3ee8a4f2c433 --- /dev/null +++ b/worlds/saving_princess/Rules.py @@ -0,0 +1,132 @@ +from typing import TYPE_CHECKING +from BaseClasses import CollectionState, Location, Entrance +from worlds.generic.Rules import set_rule +from .Constants import * +if TYPE_CHECKING: + from . import SavingPrincessWorld + + +def set_rules(world: "SavingPrincessWorld"): + def get_location(name: str) -> Location: + return world.get_location(name) + + def get_region_entrance(name: str) -> Entrance: + return world.get_entrance(f"{name} entrance") + + def can_hover(state: CollectionState) -> bool: + # portia can hover if she has a weapon other than the powered blaster and 4 reload speed upgrades + return ( + state.has(ITEM_RELOAD_SPEED, world.player, 4) + and state.has_any({ITEM_WEAPON_FIRE, ITEM_WEAPON_ICE, ITEM_WEAPON_VOLT}, world.player) + ) + + # guarantees that the player will have some upgrades before having to face the area bosses, except for cave + def nice_check(state: CollectionState) -> bool: + return ( + state.has(ITEM_MAX_HEALTH, world.player) + and state.has(ITEM_MAX_AMMO, world.player) + and state.has(ITEM_RELOAD_SPEED, world.player, 2) + ) + + # same as above, but for the final area + def super_nice_check(state: CollectionState) -> bool: + return ( + state.has(ITEM_MAX_HEALTH, world.player, 2) + and state.has(ITEM_MAX_AMMO, world.player, 2) + and state.has(ITEM_RELOAD_SPEED, world.player, 4) + and state.has(ITEM_WEAPON_CHARGE, world.player) + # at least one special weapon, other than powered blaster + and state.has_any({ITEM_WEAPON_FIRE, ITEM_WEAPON_ICE, ITEM_WEAPON_VOLT}, world.player) + ) + + # all special weapons required so that the boss' weapons can be targeted + def all_weapons(state: CollectionState) -> bool: + return state.has_all({ITEM_WEAPON_FIRE, ITEM_WEAPON_ICE, ITEM_WEAPON_VOLT}, world.player) + + def is_gate_unlocked(state: CollectionState) -> bool: + # the gate unlocks with all 4 boss keys, although this only applies to extended pool + if world.is_pool_expanded: + # in expanded, the final area requires all the boss keys + return ( + state.has_all( + {EP_ITEM_GUARD_GONE, EP_ITEM_CLIFF_GONE, EP_ITEM_ACE_GONE, EP_ITEM_SNAKE_GONE}, + world.player + ) and super_nice_check(state) + ) + else: + # in base pool, check that the main area bosses can be defeated + return state.has_all( + {EVENT_ITEM_GUARD_GONE, EVENT_ITEM_CLIFF_GONE, EVENT_ITEM_ACE_GONE, EVENT_ITEM_SNAKE_GONE}, + world.player + ) and super_nice_check(state) + + def is_power_on(state: CollectionState) -> bool: + # in expanded pool, the power item is what determines this, else it happens when the generator is powered + return state.has(EP_ITEM_POWER_ON if world.is_pool_expanded else EVENT_ITEM_POWER_ON, world.player) + + # set the location rules + # this is behind the blast door to arctic + set_rule(get_location(LOCATION_HUB_AMMO), lambda state: state.has(ITEM_WEAPON_CHARGE, world.player)) + # these are behind frozen doors + for location_name in [LOCATION_ARCTIC_HEALTH, LOCATION_JACKET]: + set_rule(get_location(location_name), lambda state: state.has(ITEM_WEAPON_FIRE, world.player)) + # these would require damage boosting otherwise + set_rule(get_location(LOCATION_VOLCANIC_RELOAD), + lambda state: state.has(ITEM_WEAPON_ICE, world.player) or can_hover(state)) + set_rule(get_location(LOCATION_SWAMP_AMMO), lambda state: can_hover(state)) + if world.is_pool_expanded: + # does not spawn until the guard has been defeated + set_rule(get_location(EP_LOCATION_HUB_NINJA_SCARE), lambda state: state.has(EP_ITEM_GUARD_GONE, world.player)) + # generator cannot be turned on without the volt laser + set_rule( + get_location(EP_LOCATION_ELECTRICAL_EXTRA if world.is_pool_expanded else EVENT_LOCATION_POWER_ON), + lambda state: state.has(ITEM_WEAPON_VOLT, world.player) + ) + # the roller is not very intuitive to get past without 4 ammo + set_rule(get_location(LOCATION_CAVE_WEAPON), lambda state: state.has(ITEM_MAX_AMMO, world.player)) + set_rule( + get_location(EP_LOCATION_CAVE_BOSS if world.is_pool_expanded else EVENT_LOCATION_GUARD_GONE), + lambda state: state.has(ITEM_MAX_AMMO, world.player) + ) + + # guarantee some upgrades to be found before bosses + boss_locations = [LOCATION_VOLCANIC_WEAPON, LOCATION_ARCTIC_WEAPON, LOCATION_SWAMP_SPECIAL] + if world.is_pool_expanded: + boss_locations += [EP_LOCATION_VOLCANIC_BOSS, EP_LOCATION_ARCTIC_BOSS, EP_LOCATION_SWAMP_BOSS] + else: + boss_locations += [EVENT_LOCATION_CLIFF_GONE, EVENT_LOCATION_ACE_GONE, EVENT_LOCATION_SNAKE_GONE] + for location_name in boss_locations: + set_rule(get_location(location_name), lambda state: nice_check(state)) + + # set the basic access rules for the regions, these are all behind blast doors + for region_name in [REGION_VOLCANIC, REGION_ARCTIC, REGION_SWAMP]: + set_rule(get_region_entrance(region_name), lambda state: state.has(ITEM_WEAPON_CHARGE, world.player)) + + # now for the final area regions, which have different rules based on if ep is on + set_rule(get_region_entrance(REGION_ELECTRICAL), lambda state: is_gate_unlocked(state)) + set_rule(get_region_entrance(REGION_ELECTRICAL_POWERED), lambda state: is_power_on(state)) + + # brainos requires all weapons, cannot destroy the cannons otherwise + if world.is_pool_expanded: + set_rule(get_location(EP_LOCATION_ELECTRICAL_FINAL_BOSS), lambda state: all_weapons(state)) + # and we need to beat brainos to beat the game + set_rule(get_location(EVENT_LOCATION_VICTORY), lambda state: all_weapons(state)) + + # if not expanded pool, place the events for the boss kills and generator + if not world.is_pool_expanded: + # accessible with no items + cave_item = world.create_item(EVENT_ITEM_GUARD_GONE) + get_location(EVENT_LOCATION_GUARD_GONE).place_locked_item(cave_item) + volcanic_item = world.create_item(EVENT_ITEM_CLIFF_GONE) + get_location(EVENT_LOCATION_CLIFF_GONE).place_locked_item(volcanic_item) + arctic_item = world.create_item(EVENT_ITEM_ACE_GONE) + get_location(EVENT_LOCATION_ACE_GONE).place_locked_item(arctic_item) + swamp_item = world.create_item(EVENT_ITEM_SNAKE_GONE) + get_location(EVENT_LOCATION_SNAKE_GONE).place_locked_item(swamp_item) + power_item = world.create_item(EVENT_ITEM_POWER_ON) + get_location(EVENT_LOCATION_POWER_ON).place_locked_item(power_item) + + # and, finally, set the victory event + victory_item = world.create_item(EVENT_ITEM_VICTORY) + get_location(EVENT_LOCATION_VICTORY).place_locked_item(victory_item) + world.multiworld.completion_condition[world.player] = lambda state: state.has(EVENT_ITEM_VICTORY, world.player) diff --git a/worlds/saving_princess/__init__.py b/worlds/saving_princess/__init__.py new file mode 100644 index 000000000000..4109f356fd2e --- /dev/null +++ b/worlds/saving_princess/__init__.py @@ -0,0 +1,174 @@ +from typing import ClassVar, Dict, Any, Type, List, Union + +import Utils +from BaseClasses import Tutorial, ItemClassification as ItemClass +from Options import PerGameCommonOptions, OptionError +from settings import Group, UserFilePath, LocalFolderPath, Bool +from worlds.AutoWorld import World, WebWorld +from worlds.LauncherComponents import components, Component, launch_subprocess, Type as ComponentType +from . import Options, Items, Locations +from .Constants import * + + +def launch_client(*args: str): + from .Client import launch + launch_subprocess(launch(*args), name=CLIENT_NAME) + + +components.append( + Component(f"{GAME_NAME} Client", game_name=GAME_NAME, func=launch_client, component_type=ComponentType.CLIENT, supports_uri=True) +) + + +class SavingPrincessSettings(Group): + class GamePath(UserFilePath): + """Path to the game executable from which files are extracted""" + description = "the Saving Princess game executable" + is_exe = True + md5s = [GAME_HASH] + + class InstallFolder(LocalFolderPath): + """Path to the mod installation folder""" + description = "the folder to install Saving Princess Archipelago to" + + class LaunchGame(Bool): + """Set this to false to never autostart the game""" + + class LaunchCommand(str): + """ + The console command that will be used to launch the game + The command will be executed with the installation folder as the current directory + """ + + exe_path: GamePath = GamePath("Saving Princess.exe") + install_folder: InstallFolder = InstallFolder("Saving Princess") + launch_game: Union[LaunchGame, bool] = True + launch_command: LaunchCommand = LaunchCommand('"Saving Princess v0_8.exe"' if Utils.is_windows + else 'wine "Saving Princess v0_8.exe"') + + +class SavingPrincessWeb(WebWorld): + theme = "partyTime" + bug_report_page = "https://github.com/LeonarthCG/saving-princess-archipelago/issues" + setup_en = Tutorial( + "Multiworld Setup Guide", + "A guide to setting up Saving Princess for Archipelago multiworld.", + "English", + "setup_en.md", + "setup/en", + ["LeonarthCG"] + ) + tutorials = [setup_en] + options_presets = Options.presets + option_groups = Options.groups + + +class SavingPrincessWorld(World): + """ + Explore a space station crawling with rogue machines and even rival bounty hunters + with the same objective as you - but with far, far different intentions! + + Expand your arsenal as you collect upgrades to your trusty arm cannon and armor! + """ # Excerpt from itch + game = GAME_NAME + web = SavingPrincessWeb() + required_client_version = (0, 5, 0) + + topology_present = False + + item_name_to_id = { + key: value.code for key, value in (Items.item_dict.items() - Items.item_dict_events.items()) + } + location_name_to_id = { + key: value.code for key, value in (Locations.location_dict.items() - Locations.location_dict_events.items()) + } + + item_name_groups = { + "Weapons": {key for key in Items.item_dict_weapons.keys()}, + "Upgrades": {key for key in Items.item_dict_upgrades.keys()}, + "Keys": {key for key in Items.item_dict_keys.keys()}, + "Filler": {key for key in Items.item_dict_filler.keys()}, + "Traps": {key for key in Items.item_dict_traps.keys()}, + } + + options_dataclass: ClassVar[Type[PerGameCommonOptions]] = Options.SavingPrincessOptions + options: Options.SavingPrincessOptions + settings_key = "saving_princess_settings" + settings: ClassVar[SavingPrincessSettings] + + is_pool_expanded: bool = False + music_table: List[int] = list(range(16)) + + def generate_early(self) -> None: + if not self.player_name.isascii(): + raise OptionError(f"{self.player_name}'s name must be only ASCII.") + self.is_pool_expanded = self.options.expanded_pool > 0 + if self.options.music_shuffle: + self.random.shuffle(self.music_table) + # find zzz and purple and swap them back to their original positions + for song_id in [9, 13]: + song_index = self.music_table.index(song_id) + t = self.music_table[song_id] + self.music_table[song_id] = song_id + self.music_table[song_index] = t + + def create_regions(self) -> None: + from .Regions import create_regions + create_regions(self.multiworld, self.player, self.is_pool_expanded) + + def create_items(self) -> None: + items_made: int = 0 + + # now, for each item + item_dict = Items.item_dict_expanded if self.is_pool_expanded else Items.item_dict_base + for item_name, item_data in item_dict.items(): + # create count copies of the item + for i in range(item_data.count): + self.multiworld.itempool.append(self.create_item(item_name)) + items_made += item_data.count + # and create count_extra useful copies of the item + original_item_class: ItemClass = item_data.item_class + item_data.item_class = ItemClass.useful + for i in range(item_data.count_extra): + self.multiworld.itempool.append(self.create_item(item_name)) + item_data.item_class = original_item_class + items_made += item_data.count_extra + + # get the number of unfilled locations, that is, locations for items - items generated + location_count = len(Locations.location_dict_base) + if self.is_pool_expanded: + location_count = len(Locations.location_dict_expanded) + junk_count: int = location_count - items_made + + # and generate as many junk items as unfilled locations + for i in range(junk_count): + self.multiworld.itempool.append(self.create_item(self.get_filler_item_name())) + + def create_item(self, name: str) -> Items.SavingPrincessItem: + return Items.item_dict[name].create_item(self.player) + + def get_filler_item_name(self) -> str: + filler_list = list(Items.item_dict_filler.keys()) + # check if this is going to be a trap + if self.random.randint(0, 99) < self.options.trap_chance: + filler_list = list(Items.item_dict_traps.keys()) + # and return one of the names at random + return self.random.choice(filler_list) + + def set_rules(self): + from .Rules import set_rules + set_rules(self) + + def fill_slot_data(self) -> Dict[str, Any]: + slot_data = self.options.as_dict( + "death_link", + "expanded_pool", + "instant_saving", + "sprint_availability", + "cliff_weapon_upgrade", + "ace_weapon_upgrade", + "shake_intensity", + "iframes_duration", + ) + slot_data["music_table"] = self.music_table + return slot_data diff --git a/worlds/saving_princess/docs/en_Saving Princess.md b/worlds/saving_princess/docs/en_Saving Princess.md new file mode 100644 index 000000000000..3eb6b9831c38 --- /dev/null +++ b/worlds/saving_princess/docs/en_Saving Princess.md @@ -0,0 +1,55 @@ +# Saving Princess + +## Quick Links +- [Setup Guide](/tutorial/Saving%20Princess/setup/en) +- [Options Page](/games/Saving%20Princess/player-options) +- [Saving Princess Archipelago GitHub](https://github.com/LeonarthCG/saving-princess-archipelago) + +## What changes have been made? + +The game has had several changes made to add new features and prevent issues. The most important changes are the following: +- There is an in-game connection settings menu, autotracker and client console. +- New save files are created and used automatically for each seed and slot played. +- The game window can now be dragged and a new integer scaling option has been added. + +## What items and locations get shuffled? + +The chest contents and special weapons are the items and locations that get shuffled. + +Additionally, there are new items to work as filler and traps, ranging from a full health and ammo restore to spawning a Ninja on top of you. + +The Expanded Pool option, which is enabled by default, adds a few more items and locations: +- Completing the intro sequence, powering the generator with the Volt Laser and defeating each boss become locations. +- 4 Keys will be shuffled, which serve to open the door to the final area in place of defeating the main area bosses. +- A System Power item will be shuffled, which restores power to the final area instead of this happening when the generator is powered. + +## What does another world's item look like in Saving Princess? + +Some locations, such as boss kills, have no visual representation, but those that do will have the Archipelago icon. + +Once the item is picked up, a textbox will inform you of the item that was found as well as the player that will be receiving it. + +These textboxes will have colored backgrounds and comments about the item category. +For example, progression items will have a purple background and say "Looks plenty important!". + +## When the player receives an item, what happens? + +When you receive an item, a textbox will show up. +This textbox shows both which item you got and which player sent it to you. + +If you send an item to yourself, however, the sending player will be omitted. + +## Unique Local Commands + +The following commands are only available when using the in-game console in Saving Princess: +- `/help` Returns the help listing. +- `/options` Lists currently applied options. +- `/resync` Manually triggers a resync. This also resends all found locations. +- `/unstuck` Sets save point to the first save point. Portia is then killed. +- `/deathlink [on|off]` Toggles or sets death link mode. +- `/instantsaving [on|off]` Toggles or sets instant saving. +- `/sprint {never|always|jacket}` Sets sprint mode. +- `/cliff {never|always|vanilla}` Sets Cliff's weapon upgrade condition. +- `/ace {never|always|vanilla}` Sets Ace's weapon upgrade condition. +- `/iframes n` Sets the iframe duration % multiplier to n, where 0 <= n <= 400. +- `/shake n` Sets the shake intensity % multiplier to n, where 0 <= n <= 100. diff --git a/worlds/saving_princess/docs/setup_en.md b/worlds/saving_princess/docs/setup_en.md new file mode 100644 index 000000000000..5f7cfb49f560 --- /dev/null +++ b/worlds/saving_princess/docs/setup_en.md @@ -0,0 +1,148 @@ +# Saving Princess Setup Guide + +## Quick Links +- [Game Info](/games/Saving%20Princess/info/en) +- [Options Page](/games/Saving%20Princess/player-options) +- [Saving Princess Archipelago GitHub](https://github.com/LeonarthCG/saving-princess-archipelago) + +## Installation Procedures + +### Automated Installation + +*These instructions have only been tested on Windows and Ubuntu.* + +Once everything is set up, it is recommended to continue launching the game through this method, as it will check for any updates to the mod and automatically apply them. +This is also the method used by the Automatic Connection described further below. + +1. Purchase and download [Saving Princess](https://brainos.itch.io/savingprincess) +2. Download and install the latest [Archipelago release](https://github.com/ArchipelagoMW/Archipelago/releases/latest) +3. Launch `ArchipelagoLauncher` and click on "Saving Princess Client" + * You will probably need to scroll down on the Clients column to see it +4. Follow the prompts + * On Linux, you will need one of either Wine or 7z for the automated installation + +When launching the game, Windows machines will simply run the executable. For any other OS, the launcher defaults to trying to run the game through Wine. You can change this by modifying the `launch_command` in `options.yaml` or `host.yaml`, under the `saving_princess_settings` section. + +### Manual Windows Installation + +Required software: +- Saving Princess, found at its [itch.io Store Page](https://brainos.itch.io/savingprincess) +- `saving_princess_basepatch.bsdiff4` and `gm-apclientpp.dll`, from [saving_princess_archipelago.zip](https://github.com/LeonarthCG/saving-princess-archipelago/releases/latest) +- Software that can decompress the previous files, such as [7-zip](https://www.7-zip.org/download.html) +- A way to apply `.bsdiff4` patches, such as [bspatch](https://www.romhacking.net/utilities/929/) + +Steps: +1. Extract all files from `Saving Princess.exe`, as if it were a `.7z` file + * Feel free to rename `Saving Princess.exe` to `Saving Princess.exe.7z` if needed + * If installed through the itch app, you can find the installation directory from the game's page, pressing the cog button, then "Manage" and finally "Open folder in explorer" +2. Extract all files from `saving_princess_archipelago.zip` into the same directory as the files extracted in the previous step + * This should include, at least, `saving_princess_basepatch.bsdiff4` and `gm-apclientpp.dll` +3. If you don't have `original_data.win`, copy `data.win` and rename its copy to `original_data.win` + * By keeping an unmodified copy of `data.win`, you will have an easier time updating in the future +4. Apply the `saving_princess_basepatch.bsdiff4` patch using your patching software +5. To launch the game, run `Saving Princess v0_8.exe` + +### Manual Linux Installation + +*These instructions have only been tested on Ubuntu.* + +The game does run mostly well through Wine, so it is possible to play on Linux, although there are some minor sprite displacement and sound issues from time to time. + +You can follow the instructions for Windows with very few changes: + +* Using the `p7zip-full` package to decompress the file. +``` +7z e 'Saving Princess.exe' +``` +* And the `bsdiff` package for patching. +``` +bspatch original_data.win data.win saving_princess_basepatch.bsdiff4 +``` + +## Configuring your YAML file + +### What is a YAML file and why do I need one? + +See the guide on setting up a basic YAML at the Archipelago setup +guide: [Basic Multiworld Setup Guide](/tutorial/Archipelago/setup/en). + +### Where do I get a YAML file? + +You can customize your options by visiting the [Saving Princess Player Options Page](/games/Saving%20Princess/player-options). + +### Verifying your YAML file + +If you would like to validate your config file to make sure it works, you may do so on the YAML Validator page. YAML +validator page: [YAML Validation page](/check). + +## Joining a MultiWorld Game + +### Automatic Connection on archipelago.gg + +1. Go to the room page of the MultiWorld you are going to join. +2. Click on your slot name on the left side. +3. Click the "Saving Princess Client" button in the prompt. + * This launches the same client described in the Automated Installation section. +4. Upon reaching the title screen, a connection attempt will automatically be started. + +Note that this updates your Saving Princess saved connection details, which are described in the Manual Connection section. + +### Manual Connection + +After launching the game, enter the Archipelago options menu through the in-game button with the Archipelago icon. +From here, enter the different menus and type in the following details in their respective fields: +- **server:port** (e.g. `archipelago.gg:38281`) + * If hosting on the website, this detail will be shown in your created room. +- **slot name** (e.g. `Player`) + * This is your player name, which you chose along with your player options. +- **password** (e.g. `123456`) + * If the room does not have a password, it can be left empty. + +This configuration persists through launches and even updates. + +With your settings filled, start a connection attempt by pressing on the title screen's "CONNECT!" button. + +Once connected, the button will become one of either "NEW GAME" or "CONTINUE". +The game automatically keeps a save file for each seed and slot combination, so you do not need to manually move or delete save files. + +All that's left is pressing on the button again to start playing. If you are waiting for a countdown, press "NEW GAME" when the countdown finishes. + +## Gameplay Questions + +### Do I need to save the game before I stop playing? + +It is safe to close the game at any point while playing, your progress will be kept. + +### What happens if I lose connection? + +If a disconnection occurs, you will see the HUD connection indicator go grey. +From here, the game will automatically try to reconnect. +You can tell it succeeded if the indicator regains its color. + +If the game is unable to reconnect, save and restart. + +Although you can keep playing while disconnected, you won't get any items until you reconnect, not even items found in your own game. +Once reconnected, however, all of your progress will sync up. + +### I got an item, but it did not say who sent it to me + +Items sent to you by yourself do not list the sender. + +Additionally, if you get an item while already having the max for that item (for example, you have 9 ammo and get sent a Clip Extension), no message will be shown at all. + +### I pressed the release/collect button, but nothing happened + +It is likely that you do not have release or collect permissions, or that there is nothing to release or collect. +Another option is that your connection was interrupted. + +If you would still like to use release or collect, refer to [this section of the server commands page](https://archipelago.gg/tutorial/Archipelago/commands/en#collect/release). + +You may use the in-game console to execute the commands, if your slot has permissions to do so. + +### I am trying to configure my controller, but the menu keeps closing itself + +Steam Input will make your controller behave as a keyboard and mouse even while not playing any Steam games. + +To fix this, simply close Steam while playing Saving Princess. + +Another option is to disable Steam Input under `Steam -> Settings -> Controller -> External Gamepad Settings` From 6c69f590cf18d1224445ee86da7c85c7663f5fb7 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Sun, 8 Dec 2024 02:22:56 +0100 Subject: [PATCH 19/36] WebHost: fix host room not updating (ports in) slot table (#4308) --- WebHostLib/templates/hostRoom.html | 11 +++++++++-- WebHostLib/templates/macros.html | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/WebHostLib/templates/hostRoom.html b/WebHostLib/templates/hostRoom.html index 8e76dafc12fa..c5996d181ee0 100644 --- a/WebHostLib/templates/hostRoom.html +++ b/WebHostLib/templates/hostRoom.html @@ -178,8 +178,15 @@ }) .then(text => new DOMParser().parseFromString(text, 'text/html')) .then(newDocument => { - let el = newDocument.getElementById("host-room-info"); - document.getElementById("host-room-info").innerHTML = el.innerHTML; + ["host-room-info", "slots-table"].forEach(function(id) { + const newEl = newDocument.getElementById(id); + const oldEl = document.getElementById(id); + if (oldEl && newEl) { + oldEl.innerHTML = newEl.innerHTML; + } else if (newEl) { + console.warn(`Did not find element to replace for ${id}`) + } + }); }); } diff --git a/WebHostLib/templates/macros.html b/WebHostLib/templates/macros.html index 6b2a4b0ed784..b95b8820a72f 100644 --- a/WebHostLib/templates/macros.html +++ b/WebHostLib/templates/macros.html @@ -8,7 +8,7 @@ {%- endmacro %} {% macro list_patches_room(room) %} {% if room.seed.slots %} - +
From e3b5451672c694c12974801f5c89cc172db3ff5a Mon Sep 17 00:00:00 2001 From: qwint Date: Sun, 8 Dec 2024 14:43:16 -0500 Subject: [PATCH 20/36] CI: cap pytest-subtest version (#4344) --- .github/workflows/unittests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 88b5d12987ad..9db9de9b4042 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -53,7 +53,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pytest pytest-subtests pytest-xdist + pip install pytest "pytest-subtests<0.14.0" pytest-xdist python ModuleUpdate.py --yes --force --append "WebHostLib/requirements.txt" python Launcher.py --update_settings # make sure host.yaml exists for tests - name: Unittests From a948697f3a2387d13862a194690c39af8da2dbd8 Mon Sep 17 00:00:00 2001 From: Mysteryem Date: Mon, 9 Dec 2024 00:57:34 +0000 Subject: [PATCH 21/36] Raft: Place locked items in create_items and fix get_pre_fill_items (#4250) * Raft: Place locked items in create_items and fix get_pre_fill_items `pre_fill` runs after item plando, and item plando could place an item at a location where Raft was intending to place a locked item, which would crash generation. This patch moves the placement of these locked items earlier, into `create_items`. Setting items into `multiworld.raft_frequencyItemsPerPlayer` for each player has been replaced with passing `frequencyItems` to the new `place_frequencyItems` function. `setLocationItem` and `setLocationItemFromRegion` have been moved into the new `place_frequencyItems` function so that they can capture the `frequencyItems` argument variable. The `get_pre_fill_items` function could return a list of all previously placed items across the entire multiworld which was not correct. It should have returned the items in `multiworld.raft_frequencyItemsPerPlayer[self.player]`. Now that these items are placed in `create_items` instead of `pre_fill`, `get_pre_fill_items` is no longer necessary and has been removed. * self.multiworld.get_location -> self.get_location Changed the occurences in the modified code. --- worlds/raft/__init__.py | 68 +++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/worlds/raft/__init__.py b/worlds/raft/__init__.py index 71d5d1c7e44b..3e33b417c04b 100644 --- a/worlds/raft/__init__.py +++ b/worlds/raft/__init__.py @@ -57,10 +57,6 @@ def create_items(self): frequencyItems.append(raft_item) else: pool.append(raft_item) - if isFillingFrequencies: - if not hasattr(self.multiworld, "raft_frequencyItemsPerPlayer"): - self.multiworld.raft_frequencyItemsPerPlayer = {} - self.multiworld.raft_frequencyItemsPerPlayer[self.player] = frequencyItems extraItemNamePool = [] extras = len(location_table) - len(item_table) - 1 # Victory takes up 1 unaccounted-for slot @@ -109,17 +105,15 @@ def create_items(self): self.multiworld.get_location("Utopia Complete", self.player).place_locked_item( RaftItem("Victory", ItemClassification.progression, None, player=self.player)) + if frequencyItems: + self.place_frequencyItems(frequencyItems) + def set_rules(self): set_rules(self.multiworld, self.player) def create_regions(self): create_regions(self.multiworld, self.player) - def get_pre_fill_items(self): - if self.options.island_frequency_locations.is_filling_frequencies_in_world(): - return [loc.item for loc in self.multiworld.get_filled_locations()] - return [] - def create_item_replaceAsNecessary(self, name: str) -> Item: isFrequency = "Frequency" in name shouldUseProgressive = bool((isFrequency and self.options.island_frequency_locations == self.options.island_frequency_locations.option_progressive) @@ -152,23 +146,34 @@ def collect_item(self, state, item, remove=False): return super(RaftWorld, self).collect_item(state, item, remove) - def pre_fill(self): + def place_frequencyItems(self, frequencyItems): + def setLocationItem(location: str, itemName: str): + itemToUse = next(filter(lambda itm: itm.name == itemName, frequencyItems)) + frequencyItems.remove(itemToUse) + self.get_location(location).place_locked_item(itemToUse) + + def setLocationItemFromRegion(region: str, itemName: str): + itemToUse = next(filter(lambda itm: itm.name == itemName, frequencyItems)) + frequencyItems.remove(itemToUse) + location = self.random.choice(list(loc for loc in location_table if loc["region"] == region)) + self.get_location(location["name"]).place_locked_item(itemToUse) + if self.options.island_frequency_locations == self.options.island_frequency_locations.option_vanilla: - self.setLocationItem("Radio Tower Frequency to Vasagatan", "Vasagatan Frequency") - self.setLocationItem("Vasagatan Frequency to Balboa", "Balboa Island Frequency") - self.setLocationItem("Relay Station quest", "Caravan Island Frequency") - self.setLocationItem("Caravan Island Frequency to Tangaroa", "Tangaroa Frequency") - self.setLocationItem("Tangaroa Frequency to Varuna Point", "Varuna Point Frequency") - self.setLocationItem("Varuna Point Frequency to Temperance", "Temperance Frequency") - self.setLocationItem("Temperance Frequency to Utopia", "Utopia Frequency") + setLocationItem("Radio Tower Frequency to Vasagatan", "Vasagatan Frequency") + setLocationItem("Vasagatan Frequency to Balboa", "Balboa Island Frequency") + setLocationItem("Relay Station quest", "Caravan Island Frequency") + setLocationItem("Caravan Island Frequency to Tangaroa", "Tangaroa Frequency") + setLocationItem("Tangaroa Frequency to Varuna Point", "Varuna Point Frequency") + setLocationItem("Varuna Point Frequency to Temperance", "Temperance Frequency") + setLocationItem("Temperance Frequency to Utopia", "Utopia Frequency") elif self.options.island_frequency_locations == self.options.island_frequency_locations.option_random_on_island: - self.setLocationItemFromRegion("RadioTower", "Vasagatan Frequency") - self.setLocationItemFromRegion("Vasagatan", "Balboa Island Frequency") - self.setLocationItemFromRegion("BalboaIsland", "Caravan Island Frequency") - self.setLocationItemFromRegion("CaravanIsland", "Tangaroa Frequency") - self.setLocationItemFromRegion("Tangaroa", "Varuna Point Frequency") - self.setLocationItemFromRegion("Varuna Point", "Temperance Frequency") - self.setLocationItemFromRegion("Temperance", "Utopia Frequency") + setLocationItemFromRegion("RadioTower", "Vasagatan Frequency") + setLocationItemFromRegion("Vasagatan", "Balboa Island Frequency") + setLocationItemFromRegion("BalboaIsland", "Caravan Island Frequency") + setLocationItemFromRegion("CaravanIsland", "Tangaroa Frequency") + setLocationItemFromRegion("Tangaroa", "Varuna Point Frequency") + setLocationItemFromRegion("Varuna Point", "Temperance Frequency") + setLocationItemFromRegion("Temperance", "Utopia Frequency") elif self.options.island_frequency_locations in [ self.options.island_frequency_locations.option_random_island_order, self.options.island_frequency_locations.option_random_on_island_random_order @@ -201,22 +206,11 @@ def pre_fill(self): currentLocation = availableLocationList[0] # Utopia (only one left in list) availableLocationList.remove(currentLocation) if self.options.island_frequency_locations == self.options.island_frequency_locations.option_random_island_order: - self.setLocationItem(locationToVanillaFrequencyLocationMap[previousLocation], locationToFrequencyItemMap[currentLocation]) + setLocationItem(locationToVanillaFrequencyLocationMap[previousLocation], locationToFrequencyItemMap[currentLocation]) elif self.options.island_frequency_locations == self.options.island_frequency_locations.option_random_on_island_random_order: - self.setLocationItemFromRegion(previousLocation, locationToFrequencyItemMap[currentLocation]) + setLocationItemFromRegion(previousLocation, locationToFrequencyItemMap[currentLocation]) previousLocation = currentLocation - def setLocationItem(self, location: str, itemName: str): - itemToUse = next(filter(lambda itm: itm.name == itemName, self.multiworld.raft_frequencyItemsPerPlayer[self.player])) - self.multiworld.raft_frequencyItemsPerPlayer[self.player].remove(itemToUse) - self.multiworld.get_location(location, self.player).place_locked_item(itemToUse) - - def setLocationItemFromRegion(self, region: str, itemName: str): - itemToUse = next(filter(lambda itm: itm.name == itemName, self.multiworld.raft_frequencyItemsPerPlayer[self.player])) - self.multiworld.raft_frequencyItemsPerPlayer[self.player].remove(itemToUse) - location = self.random.choice(list(loc for loc in location_table if loc["region"] == region)) - self.multiworld.get_location(location["name"], self.player).place_locked_item(itemToUse) - def fill_slot_data(self): return { "IslandGenerationDistance": self.options.island_generation_distance.value, From 5b4d7c752670b9cdf79258792e8045d968a54e96 Mon Sep 17 00:00:00 2001 From: Scipio Wright Date: Sun, 8 Dec 2024 19:58:49 -0500 Subject: [PATCH 22/36] TUNIC: Add Shield to Ladder Storage logic (#4146) --- worlds/tunic/__init__.py | 5 +++++ worlds/tunic/options.py | 2 +- worlds/tunic/rules.py | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/worlds/tunic/__init__.py b/worlds/tunic/__init__.py index d1430aac1895..4c62b18b140f 100644 --- a/worlds/tunic/__init__.py +++ b/worlds/tunic/__init__.py @@ -286,6 +286,11 @@ def remove_filler(amount: int) -> None: tunic_items.append(self.create_item(page, ItemClassification.progression | ItemClassification.useful)) items_to_create[page] = 0 + # logically relevant if you have ladder storage enabled + if self.options.ladder_storage and not self.options.ladder_storage_without_items: + tunic_items.append(self.create_item("Shield", ItemClassification.progression)) + items_to_create["Shield"] = 0 + if self.options.maskless: tunic_items.append(self.create_item("Scavenger Mask", ItemClassification.useful)) items_to_create["Scavenger Mask"] = 0 diff --git a/worlds/tunic/options.py b/worlds/tunic/options.py index cdd37a889461..f1d53362f4c9 100644 --- a/worlds/tunic/options.py +++ b/worlds/tunic/options.py @@ -216,7 +216,7 @@ class LadderStorage(Choice): class LadderStorageWithoutItems(Toggle): """ - If disabled, you logically require Stick, Sword, or Magic Orb to perform Ladder Storage. + If disabled, you logically require Stick, Sword, Magic Orb, or Shield to perform Ladder Storage. If enabled, you will be expected to perform Ladder Storage without progression items. This can be done with the plushie code, a Golden Coin, Prayer, and many other options. diff --git a/worlds/tunic/rules.py b/worlds/tunic/rules.py index aa69666daeb6..58c987acbcee 100644 --- a/worlds/tunic/rules.py +++ b/worlds/tunic/rules.py @@ -18,6 +18,7 @@ prayer = "Pages 24-25 (Prayer)" holy_cross = "Pages 42-43 (Holy Cross)" icebolt = "Pages 52-53 (Icebolt)" +shield = "Shield" key = "Key" house_key = "Old House Key" vault_key = "Fortress Vault Key" @@ -82,7 +83,7 @@ def can_ladder_storage(state: CollectionState, world: "TunicWorld") -> bool: return False if world.options.ladder_storage_without_items: return True - return has_stick(state, world.player) or state.has(grapple, world.player) + return has_stick(state, world.player) or state.has_any((grapple, shield), world.player) def has_mask(state: CollectionState, world: "TunicWorld") -> bool: From 1f712d9a8754103e2bbeb13075f460ff366d55df Mon Sep 17 00:00:00 2001 From: qwint Date: Sun, 8 Dec 2024 19:59:40 -0500 Subject: [PATCH 23/36] Various Worlds: use / explicitly for pkgutil (#4232) --- worlds/kdl3/regions.py | 2 +- worlds/kdl3/rom.py | 8 ++++---- worlds/ladx/LADXR/patches/bank34.py | 2 +- worlds/ladx/LADXR/patches/bank3e.py | 2 +- worlds/lingo/static_logic.py | 2 +- worlds/minecraft/Constants.py | 2 +- worlds/mm2/rom.py | 2 +- worlds/shivers/Constants.py | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/worlds/kdl3/regions.py b/worlds/kdl3/regions.py index c47e5dee4095..af5208d365f0 100644 --- a/worlds/kdl3/regions.py +++ b/worlds/kdl3/regions.py @@ -57,7 +57,7 @@ def generate_valid_level(world: "KDL3World", level: int, stage: int, def generate_rooms(world: "KDL3World", level_regions: Dict[int, Region]) -> None: level_names = {location_name.level_names[level]: level for level in location_name.level_names} - room_data = orjson.loads(get_data(__name__, os.path.join("data", "Rooms.json"))) + room_data = orjson.loads(get_data(__name__, "data/Rooms.json")) rooms: Dict[str, KDL3Room] = dict() for room_entry in room_data: room = KDL3Room(room_entry["name"], world.player, world.multiworld, None, room_entry["level"], diff --git a/worlds/kdl3/rom.py b/worlds/kdl3/rom.py index 3dd10ce1c43f..741ea0083027 100644 --- a/worlds/kdl3/rom.py +++ b/worlds/kdl3/rom.py @@ -313,7 +313,7 @@ def handle_level_sprites(stages: List[Tuple[int, ...]], sprites: List[bytearray] def write_heart_star_sprites(rom: RomData) -> None: compressed = rom.read_bytes(heart_star_address, heart_star_size) decompressed = hal_decompress(compressed) - patch = get_data(__name__, os.path.join("data", "APHeartStar.bsdiff4")) + patch = get_data(__name__, "data/APHeartStar.bsdiff4") patched = bytearray(bsdiff4.patch(decompressed, patch)) rom.write_bytes(0x1AF7DF, patched) patched[0:0] = [0xE3, 0xFF] @@ -327,10 +327,10 @@ def write_consumable_sprites(rom: RomData, consumables: bool, stars: bool) -> No decompressed = hal_decompress(compressed) patched = bytearray(decompressed) if consumables: - patch = get_data(__name__, os.path.join("data", "APConsumable.bsdiff4")) + patch = get_data(__name__, "data/APConsumable.bsdiff4") patched = bytearray(bsdiff4.patch(bytes(patched), patch)) if stars: - patch = get_data(__name__, os.path.join("data", "APStars.bsdiff4")) + patch = get_data(__name__, "data/APStars.bsdiff4") patched = bytearray(bsdiff4.patch(bytes(patched), patch)) patched[0:0] = [0xE3, 0xFF] patched.append(0xFF) @@ -380,7 +380,7 @@ def get_source_data(cls) -> bytes: def patch_rom(world: "KDL3World", patch: KDL3ProcedurePatch) -> None: patch.write_file("kdl3_basepatch.bsdiff4", - get_data(__name__, os.path.join("data", "kdl3_basepatch.bsdiff4"))) + get_data(__name__, "data/kdl3_basepatch.bsdiff4")) # Write open world patch if world.options.open_world: diff --git a/worlds/ladx/LADXR/patches/bank34.py b/worlds/ladx/LADXR/patches/bank34.py index 31b9ca124436..e88727e868c6 100644 --- a/worlds/ladx/LADXR/patches/bank34.py +++ b/worlds/ladx/LADXR/patches/bank34.py @@ -75,7 +75,7 @@ def addBank34(rom, item_list): .notCavesA: add hl, de ret - """ + pkgutil.get_data(__name__, os.path.join("bank3e.asm", "message.asm")).decode().replace("\r", ""), 0x4000), fill_nop=True) + """ + pkgutil.get_data(__name__, "bank3e.asm/message.asm").decode().replace("\r", ""), 0x4000), fill_nop=True) nextItemLookup = ItemNameStringBufferStart nameLookup = { diff --git a/worlds/ladx/LADXR/patches/bank3e.py b/worlds/ladx/LADXR/patches/bank3e.py index 7e690349a335..632fffa7e63e 100644 --- a/worlds/ladx/LADXR/patches/bank3e.py +++ b/worlds/ladx/LADXR/patches/bank3e.py @@ -56,7 +56,7 @@ def addBank3E(rom, seed, player_id, player_name_list): """)) def get_asm(name): - return pkgutil.get_data(__name__, os.path.join("bank3e.asm", name)).decode().replace("\r", "") + return pkgutil.get_data(__name__, "bank3e.asm/" + name).decode().replace("\r", "") rom.patch(0x3E, 0x0000, 0x2F00, ASM(""" call MainJumpTable diff --git a/worlds/lingo/static_logic.py b/worlds/lingo/static_logic.py index 74eea449f228..9925e9582a2c 100644 --- a/worlds/lingo/static_logic.py +++ b/worlds/lingo/static_logic.py @@ -107,7 +107,7 @@ def find_class(self, module, name): return getattr(safe_builtins, name) raise pickle.UnpicklingError(f"global '{module}.{name}' is forbidden") - file = pkgutil.get_data(__name__, os.path.join("data", "generated.dat")) + file = pkgutil.get_data(__name__, "data/generated.dat") pickdata = RenameUnpickler(BytesIO(file)).load() HASHES.update(pickdata["HASHES"]) diff --git a/worlds/minecraft/Constants.py b/worlds/minecraft/Constants.py index 0d1101e802fd..1f7b6fa6acef 100644 --- a/worlds/minecraft/Constants.py +++ b/worlds/minecraft/Constants.py @@ -3,7 +3,7 @@ import pkgutil def load_data_file(*args) -> dict: - fname = os.path.join("data", *args) + fname = "/".join(["data", *args]) return json.loads(pkgutil.get_data(__name__, fname).decode()) # For historical reasons, these values are different. diff --git a/worlds/mm2/rom.py b/worlds/mm2/rom.py index cac0a8706007..e37c5bc2a148 100644 --- a/worlds/mm2/rom.py +++ b/worlds/mm2/rom.py @@ -126,7 +126,7 @@ def write_bytes(self, offset: int, value: Iterable[int]) -> None: def patch_rom(world: "MM2World", patch: MM2ProcedurePatch) -> None: - patch.write_file("mm2_basepatch.bsdiff4", pkgutil.get_data(__name__, os.path.join("data", "mm2_basepatch.bsdiff4"))) + patch.write_file("mm2_basepatch.bsdiff4", pkgutil.get_data(__name__, "data/mm2_basepatch.bsdiff4")) # text writing patch.write_bytes(0x37E2A, MM2TextEntry("FOR ", 0xCB).resolve()) patch.write_bytes(0x37EAA, MM2TextEntry("GET EQUIPPED ", 0x0B).resolve()) diff --git a/worlds/shivers/Constants.py b/worlds/shivers/Constants.py index 0b00cecec3ec..95b3c2d56ad9 100644 --- a/worlds/shivers/Constants.py +++ b/worlds/shivers/Constants.py @@ -3,7 +3,7 @@ import pkgutil def load_data_file(*args) -> dict: - fname = os.path.join("data", *args) + fname = "/".join(["data", *args]) return json.loads(pkgutil.get_data(__name__, fname).decode()) location_id_offset: int = 27000 From 26f9720e69d33af5f55950d4bc197460f39df3ab Mon Sep 17 00:00:00 2001 From: Louis M Date: Sun, 8 Dec 2024 20:18:00 -0500 Subject: [PATCH 24/36] Aquaria: mega refactoring (#3810) This PR is mainly refactoring. Here is what changed: - Changing item names so that each words are capitalized (`Energy Form` instead of `Energy form`) - Removing duplication of string literal by using: - Constants for items and locations, - Region's name attribute for entrances, - Clarify some documentations, - Adding some region to be more representative of the game and to remove listing of locations in the rules (prioritize entrance rules over individual location rules). This is the other minor modifications that are not refactoring: - Adding an early bind song option since that can be used to exit starting area. - Changing Sun God to Lumerean God to be coherent with the other gods. - Changing Home Water to Home Waters and Open Water to Open Waters to be coherent with the game. - Removing a rules to have an attack to go in Mithalas Cathedral since you can to get some checks in it without an attack. - Adding some options to slot data to be used with Poptracker. - Fixing a little but still potentially logic breaking bug. --- worlds/aquaria/Items.py | 440 ++++-- worlds/aquaria/Locations.py | 800 +++++++---- worlds/aquaria/Options.py | 52 +- worlds/aquaria/Regions.py | 1190 ++++++++--------- worlds/aquaria/__init__.py | 82 +- worlds/aquaria/docs/en_Aquaria.md | 2 +- worlds/aquaria/test/__init__.py | 405 +++--- worlds/aquaria/test/test_beast_form_access.py | 24 +- ...test_beast_form_or_arnassi_armor_access.py | 46 +- worlds/aquaria/test/test_bind_song_access.py | 33 +- .../test/test_bind_song_option_access.py | 40 +- .../aquaria/test/test_confined_home_water.py | 9 +- worlds/aquaria/test/test_dual_song_access.py | 17 +- .../aquaria/test/test_energy_form_access.py | 29 +- .../test_energy_form_or_dual_form_access.py | 132 +- worlds/aquaria/test/test_fish_form_access.py | 39 +- worlds/aquaria/test/test_li_song_access.py | 55 +- worlds/aquaria/test/test_light_access.py | 99 +- .../aquaria/test/test_nature_form_access.py | 79 +- ...st_no_progression_hard_hidden_locations.py | 51 +- .../test_progression_hard_hidden_locations.py | 51 +- .../aquaria/test/test_spirit_form_access.py | 38 +- worlds/aquaria/test/test_sun_form_access.py | 24 +- .../test_unconfine_home_water_via_both.py | 9 +- ...st_unconfine_home_water_via_energy_door.py | 9 +- ...st_unconfine_home_water_via_transturtle.py | 9 +- 26 files changed, 2119 insertions(+), 1645 deletions(-) diff --git a/worlds/aquaria/Items.py b/worlds/aquaria/Items.py index f822d675e6e7..88ac7c76e0a3 100644 --- a/worlds/aquaria/Items.py +++ b/worlds/aquaria/Items.py @@ -59,156 +59,316 @@ class ItemData: type: ItemType group: ItemGroup - def __init__(self, id: int, count: int, type: ItemType, group: ItemGroup): + def __init__(self, aId: int, count: int, aType: ItemType, group: ItemGroup): """ Initialisation of the item data - @param id: The item ID + @param aId: The item ID @param count: the number of items in the pool - @param type: the importance type of the item + @param aType: the importance type of the item @param group: the usage of the item in the game """ - self.id = id + self.id = aId self.count = count - self.type = type + self.type = aType self.group = group +class ItemNames: + """ + Constants used to represent the mane of every items. + """ + # Normal items + ANEMONE = "Anemone" + ARNASSI_STATUE = "Arnassi Statue" + BIG_SEED = "Big Seed" + GLOWING_SEED = "Glowing Seed" + BLACK_PEARL = "Black Pearl" + BABY_BLASTER = "Baby Blaster" + CRAB_ARMOR = "Crab Armor" + BABY_DUMBO = "Baby Dumbo" + TOOTH = "Tooth" + ENERGY_STATUE = "Energy Statue" + KROTITE_ARMOR = "Krotite Armor" + GOLDEN_STARFISH = "Golden Starfish" + GOLDEN_GEAR = "Golden Gear" + JELLY_BEACON = "Jelly Beacon" + JELLY_COSTUME = "Jelly Costume" + JELLY_PLANT = "Jelly Plant" + MITHALAS_DOLL = "Mithalas Doll" + MITHALAN_DRESS = "Mithalan Dress" + MITHALAS_BANNER = "Mithalas Banner" + MITHALAS_POT = "Mithalas Pot" + MUTANT_COSTUME = "Mutant Costume" + BABY_NAUTILUS = "Baby Nautilus" + BABY_PIRANHA = "Baby Piranha" + ARNASSI_ARMOR = "Arnassi Armor" + SEED_BAG = "Seed Bag" + KING_S_SKULL = "King's Skull" + SONG_PLANT_SPORE = "Song Plant Spore" + STONE_HEAD = "Stone Head" + SUN_KEY = "Sun Key" + GIRL_COSTUME = "Girl Costume" + ODD_CONTAINER = "Odd Container" + TRIDENT = "Trident" + TURTLE_EGG = "Turtle Egg" + JELLY_EGG = "Jelly Egg" + URCHIN_COSTUME = "Urchin Costume" + BABY_WALKER = "Baby Walker" + VEDHA_S_CURE_ALL = "Vedha's Cure-All" + ZUUNA_S_PEROGI = "Zuuna's Perogi" + ARCANE_POULTICE = "Arcane Poultice" + BERRY_ICE_CREAM = "Berry Ice Cream" + BUTTERY_SEA_LOAF = "Buttery Sea Loaf" + COLD_BORSCHT = "Cold Borscht" + COLD_SOUP = "Cold Soup" + CRAB_CAKE = "Crab Cake" + DIVINE_SOUP = "Divine Soup" + DUMBO_ICE_CREAM = "Dumbo Ice Cream" + FISH_OIL = "Fish Oil" + GLOWING_EGG = "Glowing Egg" + HAND_ROLL = "Hand Roll" + HEALING_POULTICE = "Healing Poultice" + HEARTY_SOUP = "Hearty Soup" + HOT_BORSCHT = "Hot Borscht" + HOT_SOUP = "Hot Soup" + ICE_CREAM = "Ice Cream" + LEADERSHIP_ROLL = "Leadership Roll" + LEAF_POULTICE = "Leaf Poultice" + LEECHING_POULTICE = "Leeching Poultice" + LEGENDARY_CAKE = "Legendary Cake" + LOAF_OF_LIFE = "Loaf of Life" + LONG_LIFE_SOUP = "Long Life Soup" + MAGIC_SOUP = "Magic Soup" + MUSHROOM_X_2 = "Mushroom x 2" + PEROGI = "Perogi" + PLANT_LEAF = "Plant Leaf" + PLUMP_PEROGI = "Plump Perogi" + POISON_LOAF = "Poison Loaf" + POISON_SOUP = "Poison Soup" + RAINBOW_MUSHROOM = "Rainbow Mushroom" + RAINBOW_SOUP = "Rainbow Soup" + RED_BERRY = "Red Berry" + RED_BULB_X_2 = "Red Bulb x 2" + ROTTEN_CAKE = "Rotten Cake" + ROTTEN_LOAF_X_8 = "Rotten Loaf x 8" + ROTTEN_MEAT = "Rotten Meat" + ROYAL_SOUP = "Royal Soup" + SEA_CAKE = "Sea Cake" + SEA_LOAF = "Sea Loaf" + SHARK_FIN_SOUP = "Shark Fin Soup" + SIGHT_POULTICE = "Sight Poultice" + SMALL_BONE_X_2 = "Small Bone x 2" + SMALL_EGG = "Small Egg" + SMALL_TENTACLE_X_2 = "Small Tentacle x 2" + SPECIAL_BULB = "Special Bulb" + SPECIAL_CAKE = "Special Cake" + SPICY_MEAT_X_2 = "Spicy Meat x 2" + SPICY_ROLL = "Spicy Roll" + SPICY_SOUP = "Spicy Soup" + SPIDER_ROLL = "Spider Roll" + SWAMP_CAKE = "Swamp Cake" + TASTY_CAKE = "Tasty Cake" + TASTY_ROLL = "Tasty Roll" + TOUGH_CAKE = "Tough Cake" + TURTLE_SOUP = "Turtle Soup" + VEDHA_SEA_CRISP = "Vedha Sea Crisp" + VEGGIE_CAKE = "Veggie Cake" + VEGGIE_ICE_CREAM = "Veggie Ice Cream" + VEGGIE_SOUP = "Veggie Soup" + VOLCANO_ROLL = "Volcano Roll" + HEALTH_UPGRADE = "Health Upgrade" + WOK = "Wok" + EEL_OIL_X_2 = "Eel Oil x 2" + FISH_MEAT_X_2 = "Fish Meat x 2" + FISH_OIL_X_3 = "Fish Oil x 3" + GLOWING_EGG_X_2 = "Glowing Egg x 2" + HEALING_POULTICE_X_2 = "Healing Poultice x 2" + HOT_SOUP_X_2 = "Hot Soup x 2" + LEADERSHIP_ROLL_X_2 = "Leadership Roll x 2" + LEAF_POULTICE_X_3 = "Leaf Poultice x 3" + PLANT_LEAF_X_2 = "Plant Leaf x 2" + PLANT_LEAF_X_3 = "Plant Leaf x 3" + ROTTEN_MEAT_X_2 = "Rotten Meat x 2" + ROTTEN_MEAT_X_8 = "Rotten Meat x 8" + SEA_LOAF_X_2 = "Sea Loaf x 2" + SMALL_BONE_X_3 = "Small Bone x 3" + SMALL_EGG_X_2 = "Small Egg x 2" + LI_AND_LI_SONG = "Li and Li Song" + SHIELD_SONG = "Shield Song" + BEAST_FORM = "Beast Form" + SUN_FORM = "Sun Form" + NATURE_FORM = "Nature Form" + ENERGY_FORM = "Energy Form" + BIND_SONG = "Bind Song" + FISH_FORM = "Fish Form" + SPIRIT_FORM = "Spirit Form" + DUAL_FORM = "Dual Form" + TRANSTURTLE_VEIL_TOP_LEFT = "Transturtle Veil top left" + TRANSTURTLE_VEIL_TOP_RIGHT = "Transturtle Veil top right" + TRANSTURTLE_OPEN_WATERS = "Transturtle Open Waters top right" + TRANSTURTLE_KELP_FOREST = "Transturtle Kelp Forest bottom left" + TRANSTURTLE_HOME_WATERS = "Transturtle Home Waters" + TRANSTURTLE_ABYSS = "Transturtle Abyss right" + TRANSTURTLE_BODY = "Transturtle Final Boss" + TRANSTURTLE_SIMON_SAYS = "Transturtle Simon Says" + TRANSTURTLE_ARNASSI_RUINS = "Transturtle Arnassi Ruins" + # Events name + BODY_TONGUE_CLEARED = "Body Tongue cleared" + HAS_SUN_CRYSTAL = "Has Sun Crystal" + FALLEN_GOD_BEATED = "Fallen God beated" + MITHALAN_GOD_BEATED = "Mithalan God beated" + DRUNIAN_GOD_BEATED = "Drunian God beated" + LUMEREAN_GOD_BEATED = "Lumerean God beated" + THE_GOLEM_BEATED = "The Golem beated" + NAUTILUS_PRIME_BEATED = "Nautilus Prime beated" + BLASTER_PEG_PRIME_BEATED = "Blaster Peg Prime beated" + MERGOG_BEATED = "Mergog beated" + MITHALAN_PRIESTS_BEATED = "Mithalan priests beated" + OCTOPUS_PRIME_BEATED = "Octopus Prime beated" + CRABBIUS_MAXIMUS_BEATED = "Crabbius Maximus beated" + MANTIS_SHRIMP_PRIME_BEATED = "Mantis Shrimp Prime beated" + KING_JELLYFISH_GOD_PRIME_BEATED = "King Jellyfish God Prime beated" + VICTORY = "Victory" + FIRST_SECRET_OBTAINED = "First Secret obtained" + SECOND_SECRET_OBTAINED = "Second Secret obtained" + THIRD_SECRET_OBTAINED = "Third Secret obtained" """Information data for every (not event) item.""" item_table = { # name: ID, Nb, Item Type, Item Group - "Anemone": ItemData(698000, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_anemone - "Arnassi Statue": ItemData(698001, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_arnassi_statue - "Big Seed": ItemData(698002, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_big_seed - "Glowing Seed": ItemData(698003, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_bio_seed - "Black Pearl": ItemData(698004, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_blackpearl - "Baby Blaster": ItemData(698005, 1, ItemType.NORMAL, ItemGroup.UTILITY), # collectible_blaster - "Crab Armor": ItemData(698006, 1, ItemType.NORMAL, ItemGroup.UTILITY), # collectible_crab_costume - "Baby Dumbo": ItemData(698007, 1, ItemType.PROGRESSION, ItemGroup.UTILITY), # collectible_dumbo - "Tooth": ItemData(698008, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_energy_boss - "Energy Statue": ItemData(698009, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_energy_statue - "Krotite Armor": ItemData(698010, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_energy_temple - "Golden Starfish": ItemData(698011, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_gold_star - "Golden Gear": ItemData(698012, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_golden_gear - "Jelly Beacon": ItemData(698013, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_jelly_beacon - "Jelly Costume": ItemData(698014, 1, ItemType.NORMAL, ItemGroup.UTILITY), # collectible_jelly_costume - "Jelly Plant": ItemData(698015, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_jelly_plant - "Mithalas Doll": ItemData(698016, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_mithala_doll - "Mithalan Dress": ItemData(698017, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_mithalan_costume - "Mithalas Banner": ItemData(698018, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_mithalas_banner - "Mithalas Pot": ItemData(698019, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_mithalas_pot - "Mutant Costume": ItemData(698020, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_mutant_costume - "Baby Nautilus": ItemData(698021, 1, ItemType.NORMAL, ItemGroup.UTILITY), # collectible_nautilus - "Baby Piranha": ItemData(698022, 1, ItemType.NORMAL, ItemGroup.UTILITY), # collectible_piranha - "Arnassi Armor": ItemData(698023, 1, ItemType.PROGRESSION, ItemGroup.UTILITY), # collectible_seahorse_costume - "Seed Bag": ItemData(698024, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_seed_bag - "King's Skull": ItemData(698025, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_skull - "Song Plant Spore": ItemData(698026, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_spore_seed - "Stone Head": ItemData(698027, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_stone_head - "Sun Key": ItemData(698028, 1, ItemType.NORMAL, ItemGroup.COLLECTIBLE), # collectible_sun_key - "Girl Costume": ItemData(698029, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_teen_costume - "Odd Container": ItemData(698030, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_treasure_chest - "Trident": ItemData(698031, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_trident_head - "Turtle Egg": ItemData(698032, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_turtle_egg - "Jelly Egg": ItemData(698033, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_upsidedown_seed - "Urchin Costume": ItemData(698034, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_urchin_costume - "Baby Walker": ItemData(698035, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_walker - "Vedha's Cure-All-All": ItemData(698036, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_Vedha'sCure-All - "Zuuna's perogi": ItemData(698037, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_Zuuna'sperogi - "Arcane poultice": ItemData(698038, 7, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_arcanepoultice - "Berry ice cream": ItemData(698039, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_berryicecream - "Buttery sea loaf": ItemData(698040, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_butterysealoaf - "Cold borscht": ItemData(698041, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_coldborscht - "Cold soup": ItemData(698042, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_coldsoup - "Crab cake": ItemData(698043, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_crabcake - "Divine soup": ItemData(698044, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_divinesoup - "Dumbo ice cream": ItemData(698045, 3, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_dumboicecream - "Fish oil": ItemData(698046, 2, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_fishoil - "Glowing egg": ItemData(698047, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_glowingegg - "Hand roll": ItemData(698048, 5, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_handroll - "Healing poultice": ItemData(698049, 4, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_healingpoultice - "Hearty soup": ItemData(698050, 5, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_heartysoup - "Hot borscht": ItemData(698051, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_hotborscht - "Hot soup": ItemData(698052, 3, ItemType.PROGRESSION, ItemGroup.RECIPE), # ingredient_hotsoup - "Ice cream": ItemData(698053, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_icecream - "Leadership roll": ItemData(698054, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_leadershiproll - "Leaf poultice": ItemData(698055, 5, ItemType.PROGRESSION, ItemGroup.RECIPE), # ingredient_leafpoultice - "Leeching poultice": ItemData(698056, 4, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_leechingpoultice - "Legendary cake": ItemData(698057, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_legendarycake - "Loaf of life": ItemData(698058, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_loafoflife - "Long life soup": ItemData(698059, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_longlifesoup - "Magic soup": ItemData(698060, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_magicsoup - "Mushroom x 2": ItemData(698061, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_mushroom - "Perogi": ItemData(698062, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_perogi - "Plant leaf": ItemData(698063, 3, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_plantleaf - "Plump perogi": ItemData(698064, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_plumpperogi - "Poison loaf": ItemData(698065, 1, ItemType.JUNK, ItemGroup.RECIPE), # ingredient_poisonloaf - "Poison soup": ItemData(698066, 1, ItemType.JUNK, ItemGroup.RECIPE), # ingredient_poisonsoup - "Rainbow mushroom": ItemData(698067, 4, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_rainbowmushroom - "Rainbow soup": ItemData(698068, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_rainbowsoup - "Red berry": ItemData(698069, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_redberry - "Red bulb x 2": ItemData(698070, 3, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_redbulb - "Rotten cake": ItemData(698071, 1, ItemType.JUNK, ItemGroup.RECIPE), # ingredient_rottencake - "Rotten loaf x 8": ItemData(698072, 1, ItemType.JUNK, ItemGroup.RECIPE), # ingredient_rottenloaf - "Rotten meat": ItemData(698073, 5, ItemType.JUNK, ItemGroup.INGREDIENT), # ingredient_rottenmeat - "Royal soup": ItemData(698074, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_royalsoup - "Sea cake": ItemData(698075, 4, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_seacake - "Sea loaf": ItemData(698076, 1, ItemType.JUNK, ItemGroup.RECIPE), # ingredient_sealoaf - "Shark fin soup": ItemData(698077, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_sharkfinsoup - "Sight poultice": ItemData(698078, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_sightpoultice - "Small bone x 2": ItemData(698079, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_smallbone - "Small egg": ItemData(698080, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_smallegg - "Small tentacle x 2": ItemData(698081, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_smalltentacle - "Special bulb": ItemData(698082, 5, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_specialbulb - "Special cake": ItemData(698083, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_specialcake - "Spicy meat x 2": ItemData(698084, 3, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_spicymeat - "Spicy roll": ItemData(698085, 11, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_spicyroll - "Spicy soup": ItemData(698086, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_spicysoup - "Spider roll": ItemData(698087, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_spiderroll - "Swamp cake": ItemData(698088, 3, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_swampcake - "Tasty cake": ItemData(698089, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_tastycake - "Tasty roll": ItemData(698090, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_tastyroll - "Tough cake": ItemData(698091, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_toughcake - "Turtle soup": ItemData(698092, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_turtlesoup - "Vedha sea crisp": ItemData(698093, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_vedhaseacrisp - "Veggie cake": ItemData(698094, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_veggiecake - "Veggie ice cream": ItemData(698095, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_veggieicecream - "Veggie soup": ItemData(698096, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_veggiesoup - "Volcano roll": ItemData(698097, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_volcanoroll - "Health upgrade": ItemData(698098, 5, ItemType.NORMAL, ItemGroup.HEALTH), # upgrade_health_? - "Wok": ItemData(698099, 1, ItemType.NORMAL, ItemGroup.UTILITY), # upgrade_wok - "Eel oil x 2": ItemData(698100, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_eeloil - "Fish meat x 2": ItemData(698101, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_fishmeat - "Fish oil x 3": ItemData(698102, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_fishoil - "Glowing egg x 2": ItemData(698103, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_glowingegg - "Healing poultice x 2": ItemData(698104, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_healingpoultice - "Hot soup x 2": ItemData(698105, 1, ItemType.PROGRESSION, ItemGroup.RECIPE), # ingredient_hotsoup - "Leadership roll x 2": ItemData(698106, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_leadershiproll - "Leaf poultice x 3": ItemData(698107, 2, ItemType.PROGRESSION, ItemGroup.RECIPE), # ingredient_leafpoultice - "Plant leaf x 2": ItemData(698108, 2, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_plantleaf - "Plant leaf x 3": ItemData(698109, 4, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_plantleaf - "Rotten meat x 2": ItemData(698110, 1, ItemType.JUNK, ItemGroup.INGREDIENT), # ingredient_rottenmeat - "Rotten meat x 8": ItemData(698111, 1, ItemType.JUNK, ItemGroup.INGREDIENT), # ingredient_rottenmeat - "Sea loaf x 2": ItemData(698112, 1, ItemType.JUNK, ItemGroup.RECIPE), # ingredient_sealoaf - "Small bone x 3": ItemData(698113, 3, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_smallbone - "Small egg x 2": ItemData(698114, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_smallegg - "Li and Li song": ItemData(698115, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_li - "Shield song": ItemData(698116, 1, ItemType.NORMAL, ItemGroup.SONG), # song_shield - "Beast form": ItemData(698117, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_beast - "Sun form": ItemData(698118, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_sun - "Nature form": ItemData(698119, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_nature - "Energy form": ItemData(698120, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_energy - "Bind song": ItemData(698121, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_bind - "Fish form": ItemData(698122, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_fish - "Spirit form": ItemData(698123, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_spirit - "Dual form": ItemData(698124, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_dual - "Transturtle Veil top left": ItemData(698125, 1, ItemType.PROGRESSION, ItemGroup.TURTLE), # transport_veil01 - "Transturtle Veil top right": ItemData(698126, 1, ItemType.PROGRESSION, ItemGroup.TURTLE), # transport_veil02 - "Transturtle Open Water top right": ItemData(698127, 1, ItemType.PROGRESSION, - ItemGroup.TURTLE), # transport_openwater03 - "Transturtle Forest bottom left": ItemData(698128, 1, ItemType.PROGRESSION, ItemGroup.TURTLE), # transport_forest04 - "Transturtle Home Water": ItemData(698129, 1, ItemType.NORMAL, ItemGroup.TURTLE), # transport_mainarea - "Transturtle Abyss right": ItemData(698130, 1, ItemType.PROGRESSION, ItemGroup.TURTLE), # transport_abyss03 - "Transturtle Final Boss": ItemData(698131, 1, ItemType.PROGRESSION, ItemGroup.TURTLE), # transport_finalboss - "Transturtle Simon Says": ItemData(698132, 1, ItemType.PROGRESSION, ItemGroup.TURTLE), # transport_forest05 - "Transturtle Arnassi Ruins": ItemData(698133, 1, ItemType.PROGRESSION, ItemGroup.TURTLE), # transport_seahorse + ItemNames.ANEMONE: ItemData(698000, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_anemone + ItemNames.ARNASSI_STATUE: ItemData(698001, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_arnassi_statue + ItemNames.BIG_SEED: ItemData(698002, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_big_seed + ItemNames.GLOWING_SEED: ItemData(698003, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_bio_seed + ItemNames.BLACK_PEARL: ItemData(698004, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_blackpearl + ItemNames.BABY_BLASTER: ItemData(698005, 1, ItemType.NORMAL, ItemGroup.UTILITY), # collectible_blaster + ItemNames.CRAB_ARMOR: ItemData(698006, 1, ItemType.NORMAL, ItemGroup.UTILITY), # collectible_crab_costume + ItemNames.BABY_DUMBO: ItemData(698007, 1, ItemType.PROGRESSION, ItemGroup.UTILITY), # collectible_dumbo + ItemNames.TOOTH: ItemData(698008, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_energy_boss + ItemNames.ENERGY_STATUE: ItemData(698009, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_energy_statue + ItemNames.KROTITE_ARMOR: ItemData(698010, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_energy_temple + ItemNames.GOLDEN_STARFISH: ItemData(698011, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_gold_star + ItemNames.GOLDEN_GEAR: ItemData(698012, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_golden_gear + ItemNames.JELLY_BEACON: ItemData(698013, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_jelly_beacon + ItemNames.JELLY_COSTUME: ItemData(698014, 1, ItemType.NORMAL, ItemGroup.UTILITY), # collectible_jelly_costume + ItemNames.JELLY_PLANT: ItemData(698015, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_jelly_plant + ItemNames.MITHALAS_DOLL: ItemData(698016, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_mithala_doll + ItemNames.MITHALAN_DRESS: ItemData(698017, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_mithalan_costume + ItemNames.MITHALAS_BANNER: ItemData(698018, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_mithalas_banner + ItemNames.MITHALAS_POT: ItemData(698019, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_mithalas_pot + ItemNames.MUTANT_COSTUME: ItemData(698020, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_mutant_costume + ItemNames.BABY_NAUTILUS: ItemData(698021, 1, ItemType.NORMAL, ItemGroup.UTILITY), # collectible_nautilus + ItemNames.BABY_PIRANHA: ItemData(698022, 1, ItemType.NORMAL, ItemGroup.UTILITY), # collectible_piranha + ItemNames.ARNASSI_ARMOR: ItemData(698023, 1, ItemType.PROGRESSION, ItemGroup.UTILITY), # collectible_seahorse_costume + ItemNames.SEED_BAG: ItemData(698024, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_seed_bag + ItemNames.KING_S_SKULL: ItemData(698025, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_skull + ItemNames.SONG_PLANT_SPORE: ItemData(698026, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_spore_seed + ItemNames.STONE_HEAD: ItemData(698027, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_stone_head + ItemNames.SUN_KEY: ItemData(698028, 1, ItemType.NORMAL, ItemGroup.COLLECTIBLE), # collectible_sun_key + ItemNames.GIRL_COSTUME: ItemData(698029, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_teen_costume + ItemNames.ODD_CONTAINER: ItemData(698030, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_treasure_chest + ItemNames.TRIDENT: ItemData(698031, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_trident_head + ItemNames.TURTLE_EGG: ItemData(698032, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_turtle_egg + ItemNames.JELLY_EGG: ItemData(698033, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_upsidedown_seed + ItemNames.URCHIN_COSTUME: ItemData(698034, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_urchin_costume + ItemNames.BABY_WALKER: ItemData(698035, 1, ItemType.JUNK, ItemGroup.COLLECTIBLE), # collectible_walker + ItemNames.VEDHA_S_CURE_ALL: ItemData(698036, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_Vedha'sCure-All + ItemNames.ZUUNA_S_PEROGI: ItemData(698037, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_Zuuna'sperogi + ItemNames.ARCANE_POULTICE: ItemData(698038, 7, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_arcanepoultice + ItemNames.BERRY_ICE_CREAM: ItemData(698039, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_berryicecream + ItemNames.BUTTERY_SEA_LOAF: ItemData(698040, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_butterysealoaf + ItemNames.COLD_BORSCHT: ItemData(698041, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_coldborscht + ItemNames.COLD_SOUP: ItemData(698042, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_coldsoup + ItemNames.CRAB_CAKE: ItemData(698043, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_crabcake + ItemNames.DIVINE_SOUP: ItemData(698044, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_divinesoup + ItemNames.DUMBO_ICE_CREAM: ItemData(698045, 3, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_dumboicecream + ItemNames.FISH_OIL: ItemData(698046, 2, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_fishoil + ItemNames.GLOWING_EGG: ItemData(698047, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_glowingegg + ItemNames.HAND_ROLL: ItemData(698048, 5, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_handroll + ItemNames.HEALING_POULTICE: ItemData(698049, 4, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_healingpoultice + ItemNames.HEARTY_SOUP: ItemData(698050, 5, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_heartysoup + ItemNames.HOT_BORSCHT: ItemData(698051, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_hotborscht + ItemNames.HOT_SOUP: ItemData(698052, 3, ItemType.PROGRESSION, ItemGroup.RECIPE), # ingredient_hotsoup + ItemNames.ICE_CREAM: ItemData(698053, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_icecream + ItemNames.LEADERSHIP_ROLL: ItemData(698054, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_leadershiproll + ItemNames.LEAF_POULTICE: ItemData(698055, 5, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_leafpoultice + ItemNames.LEECHING_POULTICE: ItemData(698056, 4, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_leechingpoultice + ItemNames.LEGENDARY_CAKE: ItemData(698057, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_legendarycake + ItemNames.LOAF_OF_LIFE: ItemData(698058, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_loafoflife + ItemNames.LONG_LIFE_SOUP: ItemData(698059, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_longlifesoup + ItemNames.MAGIC_SOUP: ItemData(698060, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_magicsoup + ItemNames.MUSHROOM_X_2: ItemData(698061, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_mushroom + ItemNames.PEROGI: ItemData(698062, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_perogi + ItemNames.PLANT_LEAF: ItemData(698063, 3, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_plantleaf + ItemNames.PLUMP_PEROGI: ItemData(698064, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_plumpperogi + ItemNames.POISON_LOAF: ItemData(698065, 1, ItemType.JUNK, ItemGroup.RECIPE), # ingredient_poisonloaf + ItemNames.POISON_SOUP: ItemData(698066, 1, ItemType.JUNK, ItemGroup.RECIPE), # ingredient_poisonsoup + ItemNames.RAINBOW_MUSHROOM: ItemData(698067, 4, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_rainbowmushroom + ItemNames.RAINBOW_SOUP: ItemData(698068, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_rainbowsoup + ItemNames.RED_BERRY: ItemData(698069, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_redberry + ItemNames.RED_BULB_X_2: ItemData(698070, 3, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_redbulb + ItemNames.ROTTEN_CAKE: ItemData(698071, 1, ItemType.JUNK, ItemGroup.RECIPE), # ingredient_rottencake + ItemNames.ROTTEN_LOAF_X_8: ItemData(698072, 1, ItemType.JUNK, ItemGroup.RECIPE), # ingredient_rottenloaf + ItemNames.ROTTEN_MEAT: ItemData(698073, 5, ItemType.JUNK, ItemGroup.INGREDIENT), # ingredient_rottenmeat + ItemNames.ROYAL_SOUP: ItemData(698074, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_royalsoup + ItemNames.SEA_CAKE: ItemData(698075, 4, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_seacake + ItemNames.SEA_LOAF: ItemData(698076, 1, ItemType.JUNK, ItemGroup.RECIPE), # ingredient_sealoaf + ItemNames.SHARK_FIN_SOUP: ItemData(698077, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_sharkfinsoup + ItemNames.SIGHT_POULTICE: ItemData(698078, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_sightpoultice + ItemNames.SMALL_BONE_X_2: ItemData(698079, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_smallbone + ItemNames.SMALL_EGG: ItemData(698080, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_smallegg + ItemNames.SMALL_TENTACLE_X_2: ItemData(698081, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_smalltentacle + ItemNames.SPECIAL_BULB: ItemData(698082, 5, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_specialbulb + ItemNames.SPECIAL_CAKE: ItemData(698083, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_specialcake + ItemNames.SPICY_MEAT_X_2: ItemData(698084, 3, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_spicymeat + ItemNames.SPICY_ROLL: ItemData(698085, 11, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_spicyroll + ItemNames.SPICY_SOUP: ItemData(698086, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_spicysoup + ItemNames.SPIDER_ROLL: ItemData(698087, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_spiderroll + ItemNames.SWAMP_CAKE: ItemData(698088, 3, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_swampcake + ItemNames.TASTY_CAKE: ItemData(698089, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_tastycake + ItemNames.TASTY_ROLL: ItemData(698090, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_tastyroll + ItemNames.TOUGH_CAKE: ItemData(698091, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_toughcake + ItemNames.TURTLE_SOUP: ItemData(698092, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_turtlesoup + ItemNames.VEDHA_SEA_CRISP: ItemData(698093, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_vedhaseacrisp + ItemNames.VEGGIE_CAKE: ItemData(698094, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_veggiecake + ItemNames.VEGGIE_ICE_CREAM: ItemData(698095, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_veggieicecream + ItemNames.VEGGIE_SOUP: ItemData(698096, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_veggiesoup + ItemNames.VOLCANO_ROLL: ItemData(698097, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_volcanoroll + ItemNames.HEALTH_UPGRADE: ItemData(698098, 5, ItemType.NORMAL, ItemGroup.HEALTH), # upgrade_health_? + ItemNames.WOK: ItemData(698099, 1, ItemType.NORMAL, ItemGroup.UTILITY), # upgrade_wok + ItemNames.EEL_OIL_X_2: ItemData(698100, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_eeloil + ItemNames.FISH_MEAT_X_2: ItemData(698101, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_fishmeat + ItemNames.FISH_OIL_X_3: ItemData(698102, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_fishoil + ItemNames.GLOWING_EGG_X_2: ItemData(698103, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_glowingegg + ItemNames.HEALING_POULTICE_X_2: ItemData(698104, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_healingpoultice + ItemNames.HOT_SOUP_X_2: ItemData(698105, 1, ItemType.PROGRESSION, ItemGroup.RECIPE), # ingredient_hotsoup + ItemNames.LEADERSHIP_ROLL_X_2: ItemData(698106, 1, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_leadershiproll + ItemNames.LEAF_POULTICE_X_3: ItemData(698107, 2, ItemType.NORMAL, ItemGroup.RECIPE), # ingredient_leafpoultice + ItemNames.PLANT_LEAF_X_2: ItemData(698108, 2, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_plantleaf + ItemNames.PLANT_LEAF_X_3: ItemData(698109, 4, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_plantleaf + ItemNames.ROTTEN_MEAT_X_2: ItemData(698110, 1, ItemType.JUNK, ItemGroup.INGREDIENT), # ingredient_rottenmeat + ItemNames.ROTTEN_MEAT_X_8: ItemData(698111, 1, ItemType.JUNK, ItemGroup.INGREDIENT), # ingredient_rottenmeat + ItemNames.SEA_LOAF_X_2: ItemData(698112, 1, ItemType.JUNK, ItemGroup.RECIPE), # ingredient_sealoaf + ItemNames.SMALL_BONE_X_3: ItemData(698113, 3, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_smallbone + ItemNames.SMALL_EGG_X_2: ItemData(698114, 1, ItemType.NORMAL, ItemGroup.INGREDIENT), # ingredient_smallegg + ItemNames.LI_AND_LI_SONG: ItemData(698115, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_li + ItemNames.SHIELD_SONG: ItemData(698116, 1, ItemType.NORMAL, ItemGroup.SONG), # song_shield + ItemNames.BEAST_FORM: ItemData(698117, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_beast + ItemNames.SUN_FORM: ItemData(698118, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_sun + ItemNames.NATURE_FORM: ItemData(698119, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_nature + ItemNames.ENERGY_FORM: ItemData(698120, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_energy + ItemNames.BIND_SONG: ItemData(698121, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_bind + ItemNames.FISH_FORM: ItemData(698122, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_fish + ItemNames.SPIRIT_FORM: ItemData(698123, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_spirit + ItemNames.DUAL_FORM: ItemData(698124, 1, ItemType.PROGRESSION, ItemGroup.SONG), # song_dual + ItemNames.TRANSTURTLE_VEIL_TOP_LEFT: ItemData(698125, 1, ItemType.PROGRESSION, ItemGroup.TURTLE), # transport_veil01 + ItemNames.TRANSTURTLE_VEIL_TOP_RIGHT: ItemData(698126, 1, ItemType.PROGRESSION, ItemGroup.TURTLE), # transport_veil02 + ItemNames.TRANSTURTLE_OPEN_WATERS: ItemData(698127, 1, ItemType.PROGRESSION, + ItemGroup.TURTLE), # transport_openwater03 + ItemNames.TRANSTURTLE_KELP_FOREST: ItemData(698128, 1, ItemType.PROGRESSION, ItemGroup.TURTLE), + # transport_forest04 + ItemNames.TRANSTURTLE_HOME_WATERS: ItemData(698129, 1, ItemType.NORMAL, ItemGroup.TURTLE), # transport_mainarea + ItemNames.TRANSTURTLE_ABYSS: ItemData(698130, 1, ItemType.PROGRESSION, ItemGroup.TURTLE), # transport_abyss03 + ItemNames.TRANSTURTLE_BODY: ItemData(698131, 1, ItemType.PROGRESSION, ItemGroup.TURTLE), # transport_finalboss + ItemNames.TRANSTURTLE_SIMON_SAYS: ItemData(698132, 1, ItemType.PROGRESSION, ItemGroup.TURTLE), # transport_forest05 + ItemNames.TRANSTURTLE_ARNASSI_RUINS: ItemData(698133, 1, ItemType.PROGRESSION, ItemGroup.TURTLE), # transport_seahorse } diff --git a/worlds/aquaria/Locations.py b/worlds/aquaria/Locations.py index f6e098103fdc..832d22f4ac87 100644 --- a/worlds/aquaria/Locations.py +++ b/worlds/aquaria/Locations.py @@ -26,476 +26,785 @@ def __init__(self, player: int, name="", code=None, parent=None) -> None: self.event = code is None -class AquariaLocations: +class AquariaLocationNames: + """ + Constants used to represent every name of every locations. + """ + + VERSE_CAVE_RIGHT_AREA_BULB_IN_THE_SKELETON_ROOM = "Verse Cave right area, bulb in the skeleton room" + VERSE_CAVE_RIGHT_AREA_BULB_IN_THE_PATH_RIGHT_OF_THE_SKELETON_ROOM = \ + "Verse Cave right area, bulb in the path right of the skeleton room" + VERSE_CAVE_RIGHT_AREA_BIG_SEED = "Verse Cave right area, Big Seed" + VERSE_CAVE_LEFT_AREA_THE_NAIJA_HINT_ABOUT_THE_SHIELD_ABILITY = \ + "Verse Cave left area, the Naija hint about the shield ability" + VERSE_CAVE_LEFT_AREA_BULB_IN_THE_CENTER_PART = "Verse Cave left area, bulb in the center part" + VERSE_CAVE_LEFT_AREA_BULB_IN_THE_RIGHT_PART = "Verse Cave left area, bulb in the right part" + VERSE_CAVE_LEFT_AREA_BULB_UNDER_THE_ROCK_AT_THE_END_OF_THE_PATH = \ + "Verse Cave left area, bulb under the rock at the end of the path" + HOME_WATERS_BULB_BELOW_THE_GROUPER_FISH = "Home Waters, bulb below the grouper fish" + HOME_WATERS_BULB_IN_THE_LITTLE_ROOM_ABOVE_THE_GROUPER_FISH = \ + "Home Waters, bulb in the little room above the grouper fish" + HOME_WATERS_BULB_IN_THE_END_OF_THE_PATH_CLOSE_TO_THE_VERSE_CAVE = \ + "Home Waters, bulb in the end of the path close to the Verse Cave" + HOME_WATERS_BULB_IN_THE_TOP_LEFT_PATH = "Home Waters, bulb in the top left path" + HOME_WATERS_BULB_CLOSE_TO_NAIJA_S_HOME = "Home Waters, bulb close to Naija's Home" + HOME_WATERS_BULB_UNDER_THE_ROCK_IN_THE_LEFT_PATH_FROM_THE_VERSE_CAVE = \ + "Home Waters, bulb under the rock in the left path from the Verse Cave" + HOME_WATERS_BULB_IN_THE_PATH_BELOW_NAUTILUS_PRIME = "Home Waters, bulb in the path below Nautilus Prime" + HOME_WATERS_BULB_IN_THE_BOTTOM_LEFT_ROOM = "Home Waters, bulb in the bottom left room" + HOME_WATERS_NAUTILUS_EGG = "Home Waters, Nautilus Egg" + HOME_WATERS_TRANSTURTLE = "Home Waters, Transturtle" + NAIJA_S_HOME_BULB_AFTER_THE_ENERGY_DOOR = "Naija's Home, bulb after the energy door" + NAIJA_S_HOME_BULB_UNDER_THE_ROCK_AT_THE_RIGHT_OF_THE_MAIN_PATH = \ + "Naija's Home, bulb under the rock at the right of the main path" + SONG_CAVE_ERULIAN_SPIRIT = "Song Cave, Erulian spirit" + SONG_CAVE_BULB_IN_THE_TOP_RIGHT_PART = "Song Cave, bulb in the top right part" + SONG_CAVE_BULB_IN_THE_BIG_ANEMONE_ROOM = "Song Cave, bulb in the big anemone room" + SONG_CAVE_BULB_IN_THE_PATH_TO_THE_SINGING_STATUES = "Song Cave, bulb in the path to the singing statues" + SONG_CAVE_BULB_UNDER_THE_ROCK_IN_THE_PATH_TO_THE_SINGING_STATUES = \ + "Song Cave, bulb under the rock in the path to the singing statues" + SONG_CAVE_BULB_UNDER_THE_ROCK_CLOSE_TO_THE_SONG_DOOR = "Song Cave, bulb under the rock close to the song door" + SONG_CAVE_VERSE_EGG = "Song Cave, Verse Egg" + SONG_CAVE_JELLY_BEACON = "Song Cave, Jelly Beacon" + SONG_CAVE_ANEMONE_SEED = "Song Cave, Anemone Seed" + ENERGY_TEMPLE_FIRST_AREA_BEATING_THE_ENERGY_STATUE = "Energy Temple first area, beating the Energy Statue" + ENERGY_TEMPLE_FIRST_AREA_BULB_IN_THE_BOTTOM_ROOM_BLOCKED_BY_A_ROCK =\ + "Energy Temple first area, bulb in the bottom room blocked by a rock" + ENERGY_TEMPLE_ENERGY_IDOL = "Energy Temple, Energy Idol" + ENERGY_TEMPLE_SECOND_AREA_BULB_UNDER_THE_ROCK = "Energy Temple second area, bulb under the rock" + ENERGY_TEMPLE_BOTTOM_ENTRANCE_KROTITE_ARMOR = "Energy Temple bottom entrance, Krotite Armor" + ENERGY_TEMPLE_THIRD_AREA_BULB_IN_THE_BOTTOM_PATH = "Energy Temple third area, bulb in the bottom path" + ENERGY_TEMPLE_BOSS_AREA_FALLEN_GOD_TOOTH = "Energy Temple boss area, Fallen God Tooth" + ENERGY_TEMPLE_BLASTER_ROOM_BLASTER_EGG = "Energy Temple blaster room, Blaster Egg" + OPEN_WATERS_TOP_LEFT_AREA_BULB_UNDER_THE_ROCK_IN_THE_RIGHT_PATH = \ + "Open Waters top left area, bulb under the rock in the right path" + OPEN_WATERS_TOP_LEFT_AREA_BULB_UNDER_THE_ROCK_IN_THE_LEFT_PATH = \ + "Open Waters top left area, bulb under the rock in the left path" + OPEN_WATERS_TOP_LEFT_AREA_BULB_TO_THE_RIGHT_OF_THE_SAVE_CRYSTAL = \ + "Open Waters top left area, bulb to the right of the save crystal" + OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_SMALL_PATH_BEFORE_MITHALAS = \ + "Open Waters top right area, bulb in the small path before Mithalas" + OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_PATH_FROM_THE_LEFT_ENTRANCE = \ + "Open Waters top right area, bulb in the path from the left entrance" + OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_CLEARING_CLOSE_TO_THE_BOTTOM_EXIT = \ + "Open Waters top right area, bulb in the clearing close to the bottom exit" + OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_BIG_CLEARING_CLOSE_TO_THE_SAVE_CRYSTAL = \ + "Open Waters top right area, bulb in the big clearing close to the save crystal" + OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_BIG_CLEARING_TO_THE_TOP_EXIT = \ + "Open Waters top right area, bulb in the big clearing to the top exit" + OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_TURTLE_ROOM = "Open Waters top right area, bulb in the turtle room" + OPEN_WATERS_TOP_RIGHT_AREA_TRANSTURTLE = "Open Waters top right area, Transturtle" + OPEN_WATERS_TOP_RIGHT_AREA_FIRST_URN_IN_THE_MITHALAS_EXIT = \ + "Open Waters top right area, first urn in the Mithalas exit" + OPEN_WATERS_TOP_RIGHT_AREA_SECOND_URN_IN_THE_MITHALAS_EXIT = \ + "Open Waters top right area, second urn in the Mithalas exit" + OPEN_WATERS_TOP_RIGHT_AREA_THIRD_URN_IN_THE_MITHALAS_EXIT = \ + "Open Waters top right area, third urn in the Mithalas exit" + OPEN_WATERS_BOTTOM_LEFT_AREA_BULB_BEHIND_THE_CHOMPER_FISH = \ + "Open Waters bottom left area, bulb behind the chomper fish" + OPEN_WATERS_BOTTOM_LEFT_AREA_BULB_INSIDE_THE_LOWEST_FISH_PASS = \ + "Open Waters bottom left area, bulb inside the lowest fish pass" + OPEN_WATERS_SKELETON_PATH_BULB_CLOSE_TO_THE_RIGHT_EXIT = "Open Waters skeleton path, bulb close to the right exit" + OPEN_WATERS_SKELETON_PATH_BULB_BEHIND_THE_CHOMPER_FISH = "Open Waters skeleton path, bulb behind the chomper fish" + OPEN_WATERS_SKELETON_PATH_KING_SKULL = "Open Waters skeleton path, King Skull" + ARNASSI_RUINS_BULB_IN_THE_RIGHT_PART = "Arnassi Ruins, bulb in the right part" + ARNASSI_RUINS_BULB_IN_THE_LEFT_PART = "Arnassi Ruins, bulb in the left part" + ARNASSI_RUINS_BULB_IN_THE_CENTER_PART = "Arnassi Ruins, bulb in the center part" + ARNASSI_RUINS_SONG_PLANT_SPORE = "Arnassi Ruins, Song Plant Spore" + ARNASSI_RUINS_ARNASSI_ARMOR = "Arnassi Ruins, Arnassi Armor" + ARNASSI_RUINS_ARNASSI_STATUE = "Arnassi Ruins, Arnassi Statue" + ARNASSI_RUINS_TRANSTURTLE = "Arnassi Ruins, Transturtle" + ARNASSI_RUINS_CRAB_ARMOR = "Arnassi Ruins, Crab Armor" + SIMON_SAYS_AREA_BEATING_SIMON_SAYS = "Simon Says area, beating Simon Says" + SIMON_SAYS_AREA_TRANSTURTLE = "Simon Says area, Transturtle" + MITHALAS_CITY_FIRST_BULB_IN_THE_LEFT_CITY_PART = "Mithalas City, first bulb in the left city part" + MITHALAS_CITY_SECOND_BULB_IN_THE_LEFT_CITY_PART = "Mithalas City, second bulb in the left city part" + MITHALAS_CITY_BULB_IN_THE_RIGHT_PART = "Mithalas City, bulb in the right part" + MITHALAS_CITY_BULB_AT_THE_TOP_OF_THE_CITY = "Mithalas City, bulb at the top of the city" + MITHALAS_CITY_FIRST_BULB_IN_A_BROKEN_HOME = "Mithalas City, first bulb in a broken home" + MITHALAS_CITY_SECOND_BULB_IN_A_BROKEN_HOME = "Mithalas City, second bulb in a broken home" + MITHALAS_CITY_BULB_IN_THE_BOTTOM_LEFT_PART = "Mithalas City, bulb in the bottom left part" + MITHALAS_CITY_FIRST_BULB_IN_ONE_OF_THE_HOMES = "Mithalas City, first bulb in one of the homes" + MITHALAS_CITY_SECOND_BULB_IN_ONE_OF_THE_HOMES = "Mithalas City, second bulb in one of the homes" + MITHALAS_CITY_FIRST_URN_IN_ONE_OF_THE_HOMES = "Mithalas City, first urn in one of the homes" + MITHALAS_CITY_SECOND_URN_IN_ONE_OF_THE_HOMES = "Mithalas City, second urn in one of the homes" + MITHALAS_CITY_FIRST_URN_IN_THE_CITY_RESERVE = "Mithalas City, first urn in the city reserve" + MITHALAS_CITY_SECOND_URN_IN_THE_CITY_RESERVE = "Mithalas City, second urn in the city reserve" + MITHALAS_CITY_THIRD_URN_IN_THE_CITY_RESERVE = "Mithalas City, third urn in the city reserve" + MITHALAS_CITY_FIRST_BULB_AT_THE_END_OF_THE_TOP_PATH = "Mithalas City, first bulb at the end of the top path" + MITHALAS_CITY_SECOND_BULB_AT_THE_END_OF_THE_TOP_PATH = "Mithalas City, second bulb at the end of the top path" + MITHALAS_CITY_BULB_IN_THE_TOP_PATH = "Mithalas City, bulb in the top path" + MITHALAS_CITY_MITHALAS_POT = "Mithalas City, Mithalas Pot" + MITHALAS_CITY_URN_IN_THE_CASTLE_FLOWER_TUBE_ENTRANCE = "Mithalas City, urn in the Castle flower tube entrance" + MITHALAS_CITY_DOLL = "Mithalas City, Doll" + MITHALAS_CITY_URN_INSIDE_A_HOME_FISH_PASS = "Mithalas City, urn inside a home fish pass" + MITHALAS_CITY_CASTLE_BULB_IN_THE_FLESH_HOLE = "Mithalas City Castle, bulb in the flesh hole" + MITHALAS_CITY_CASTLE_BLUE_BANNER = "Mithalas City Castle, Blue Banner" + MITHALAS_CITY_CASTLE_URN_IN_THE_BEDROOM = "Mithalas City Castle, urn in the bedroom" + MITHALAS_CITY_CASTLE_FIRST_URN_OF_THE_SINGLE_LAMP_PATH = "Mithalas City Castle, first urn of the single lamp path" + MITHALAS_CITY_CASTLE_SECOND_URN_OF_THE_SINGLE_LAMP_PATH = "Mithalas City Castle, second urn of the single lamp path" + MITHALAS_CITY_CASTLE_URN_IN_THE_BOTTOM_ROOM = "Mithalas City Castle, urn in the bottom room" + MITHALAS_CITY_CASTLE_FIRST_URN_ON_THE_ENTRANCE_PATH = "Mithalas City Castle, first urn on the entrance path" + MITHALAS_CITY_CASTLE_SECOND_URN_ON_THE_ENTRANCE_PATH = "Mithalas City Castle, second urn on the entrance path" + MITHALAS_CITY_CASTLE_BEATING_THE_PRIESTS = "Mithalas City Castle, beating the Priests" + MITHALAS_CITY_CASTLE_TRIDENT_HEAD = "Mithalas City Castle, Trident Head" + MITHALAS_CATHEDRAL_BULB_IN_THE_FLESH_ROOM_WITH_FLEAS = "Mithalas Cathedral, bulb in the flesh room with fleas" + MITHALAS_CATHEDRAL_MITHALAN_DRESS = "Mithalas Cathedral, Mithalan Dress" + MITHALAS_CATHEDRAL_FIRST_URN_IN_THE_TOP_RIGHT_ROOM = "Mithalas Cathedral, first urn in the top right room" + MITHALAS_CATHEDRAL_SECOND_URN_IN_THE_TOP_RIGHT_ROOM = "Mithalas Cathedral, second urn in the top right room" + MITHALAS_CATHEDRAL_THIRD_URN_IN_THE_TOP_RIGHT_ROOM = "Mithalas Cathedral, third urn in the top right room" + MITHALAS_CATHEDRAL_URN_BEHIND_THE_FLESH_VEIN = "Mithalas Cathedral, urn behind the flesh vein" + MITHALAS_CATHEDRAL_URN_IN_THE_TOP_LEFT_EYES_BOSS_ROOM = "Mithalas Cathedral, urn in the top left eyes boss room" + MITHALAS_CATHEDRAL_FIRST_URN_IN_THE_PATH_BEHIND_THE_FLESH_VEIN =\ + "Mithalas Cathedral, first urn in the path behind the flesh vein" + MITHALAS_CATHEDRAL_SECOND_URN_IN_THE_PATH_BEHIND_THE_FLESH_VEIN =\ + "Mithalas Cathedral, second urn in the path behind the flesh vein" + MITHALAS_CATHEDRAL_THIRD_URN_IN_THE_PATH_BEHIND_THE_FLESH_VEIN =\ + "Mithalas Cathedral, third urn in the path behind the flesh vein" + MITHALAS_CATHEDRAL_FOURTH_URN_IN_THE_TOP_RIGHT_ROOM = "Mithalas Cathedral, fourth urn in the top right room" + MITHALAS_CATHEDRAL_URN_BELOW_THE_LEFT_ENTRANCE = "Mithalas Cathedral, urn below the left entrance" + MITHALAS_CATHEDRAL_FIRST_URN_IN_THE_BOTTOM_RIGHT_PATH = "Mithalas Cathedral, first urn in the bottom right path" + MITHALAS_CATHEDRAL_SECOND_URN_IN_THE_BOTTOM_RIGHT_PATH = "Mithalas Cathedral, second urn in the bottom right path" + CATHEDRAL_UNDERGROUND_BULB_IN_THE_CENTER_PART = "Cathedral Underground, bulb in the center part" + CATHEDRAL_UNDERGROUND_FIRST_BULB_IN_THE_TOP_LEFT_PART = "Cathedral Underground, first bulb in the top left part" + CATHEDRAL_UNDERGROUND_SECOND_BULB_IN_THE_TOP_LEFT_PART = "Cathedral Underground, second bulb in the top left part" + CATHEDRAL_UNDERGROUND_THIRD_BULB_IN_THE_TOP_LEFT_PART = "Cathedral Underground, third bulb in the top left part" + CATHEDRAL_UNDERGROUND_BULB_CLOSE_TO_THE_SAVE_CRYSTAL = "Cathedral Underground, bulb close to the save crystal" + CATHEDRAL_UNDERGROUND_BULB_IN_THE_BOTTOM_RIGHT_PATH = "Cathedral Underground, bulb in the bottom right path" + MITHALAS_BOSS_AREA_BEATING_MITHALAN_GOD = "Mithalas boss area, beating Mithalan God" + KELP_FOREST_TOP_LEFT_AREA_BULB_IN_THE_BOTTOM_LEFT_CLEARING =\ + "Kelp Forest top left area, bulb in the bottom left clearing" + KELP_FOREST_TOP_LEFT_AREA_BULB_IN_THE_PATH_DOWN_FROM_THE_TOP_LEFT_CLEARING =\ + "Kelp Forest top left area, bulb in the path down from the top left clearing" + KELP_FOREST_TOP_LEFT_AREA_BULB_IN_THE_TOP_LEFT_CLEARING = "Kelp Forest top left area, bulb in the top left clearing" + KELP_FOREST_TOP_LEFT_AREA_JELLY_EGG = "Kelp Forest top left area, Jelly Egg" + KELP_FOREST_TOP_LEFT_AREA_BULB_CLOSE_TO_THE_VERSE_EGG = "Kelp Forest top left area, bulb close to the Verse Egg" + KELP_FOREST_TOP_LEFT_AREA_VERSE_EGG = "Kelp Forest top left area, Verse Egg" + KELP_FOREST_TOP_RIGHT_AREA_BULB_UNDER_THE_ROCK_IN_THE_RIGHT_PATH =\ + "Kelp Forest top right area, bulb under the rock in the right path" + KELP_FOREST_TOP_RIGHT_AREA_BULB_AT_THE_LEFT_OF_THE_CENTER_CLEARING =\ + "Kelp Forest top right area, bulb at the left of the center clearing" + KELP_FOREST_TOP_RIGHT_AREA_BULB_IN_THE_LEFT_PATH_S_BIG_ROOM =\ + "Kelp Forest top right area, bulb in the left path's big room" + KELP_FOREST_TOP_RIGHT_AREA_BULB_IN_THE_LEFT_PATH_S_SMALL_ROOM =\ + "Kelp Forest top right area, bulb in the left path's small room" + KELP_FOREST_TOP_RIGHT_AREA_BULB_AT_THE_TOP_OF_THE_CENTER_CLEARING =\ + "Kelp Forest top right area, bulb at the top of the center clearing" + KELP_FOREST_TOP_RIGHT_AREA_BLACK_PEARL = "Kelp Forest top right area, Black Pearl" + KELP_FOREST_TOP_RIGHT_AREA_BULB_IN_THE_TOP_FISH_PASS = "Kelp Forest top right area, bulb in the top fish pass" + KELP_FOREST_BOTTOM_LEFT_AREA_TRANSTURTLE = "Kelp Forest bottom left area, Transturtle" + KELP_FOREST_BOTTOM_LEFT_AREA_BULB_CLOSE_TO_THE_SPIRIT_CRYSTALS =\ + "Kelp Forest bottom left area, bulb close to the spirit crystals" + KELP_FOREST_BOTTOM_LEFT_AREA_WALKER_BABY = "Kelp Forest bottom left area, Walker Baby" + KELP_FOREST_BOTTOM_LEFT_AREA_FISH_CAVE_PUZZLE = "Kelp Forest bottom left area, Fish Cave puzzle" + KELP_FOREST_BOTTOM_RIGHT_AREA_ODD_CONTAINER = "Kelp Forest bottom right area, Odd Container" + KELP_FOREST_BOSS_AREA_BEATING_DRUNIAN_GOD = "Kelp Forest boss area, beating Drunian God" + KELP_FOREST_BOSS_ROOM_BULB_AT_THE_BOTTOM_OF_THE_AREA = "Kelp Forest boss room, bulb at the bottom of the area" + KELP_FOREST_SPRITE_CAVE_BULB_INSIDE_THE_FISH_PASS = "Kelp Forest sprite cave, bulb inside the fish pass" + KELP_FOREST_SPRITE_CAVE_BULB_IN_THE_SECOND_ROOM = "Kelp Forest sprite cave, bulb in the second room" + KELP_FOREST_SPRITE_CAVE_SEED_BAG = "Kelp Forest sprite cave, Seed Bag" + MERMOG_CAVE_BULB_IN_THE_LEFT_PART_OF_THE_CAVE = "Mermog cave, bulb in the left part of the cave" + MERMOG_CAVE_PIRANHA_EGG = "Mermog cave, Piranha Egg" + THE_VEIL_TOP_LEFT_AREA_IN_LI_S_CAVE = "The Veil top left area, In Li's cave" + THE_VEIL_TOP_LEFT_AREA_BULB_UNDER_THE_ROCK_IN_THE_TOP_RIGHT_PATH =\ + "The Veil top left area, bulb under the rock in the top right path" + THE_VEIL_TOP_LEFT_AREA_BULB_HIDDEN_BEHIND_THE_BLOCKING_ROCK =\ + "The Veil top left area, bulb hidden behind the blocking rock" + THE_VEIL_TOP_LEFT_AREA_TRANSTURTLE = "The Veil top left area, Transturtle" + THE_VEIL_TOP_LEFT_AREA_BULB_INSIDE_THE_FISH_PASS = "The Veil top left area, bulb inside the fish pass" + TURTLE_CAVE_TURTLE_EGG = "Turtle cave, Turtle Egg" + TURTLE_CAVE_BULB_IN_BUBBLE_CLIFF = "Turtle cave, bulb in Bubble Cliff" + TURTLE_CAVE_URCHIN_COSTUME = "Turtle cave, Urchin Costume" + THE_VEIL_TOP_RIGHT_AREA_BULB_IN_THE_MIDDLE_OF_THE_WALL_JUMP_CLIFF = \ + "The Veil top right area, bulb in the middle of the wall jump cliff" + THE_VEIL_TOP_RIGHT_AREA_GOLDEN_STARFISH = "The Veil top right area, Golden Starfish" + THE_VEIL_TOP_RIGHT_AREA_BULB_AT_THE_TOP_OF_THE_WATERFALL = \ + "The Veil top right area, bulb at the top of the waterfall" + THE_VEIL_TOP_RIGHT_AREA_TRANSTURTLE = "The Veil top right area, Transturtle" + THE_VEIL_BOTTOM_AREA_BULB_IN_THE_LEFT_PATH = "The Veil bottom area, bulb in the left path" + THE_VEIL_BOTTOM_AREA_BULB_IN_THE_SPIRIT_PATH = "The Veil bottom area, bulb in the spirit path" + THE_VEIL_BOTTOM_AREA_VERSE_EGG = "The Veil bottom area, Verse Egg" + THE_VEIL_BOTTOM_AREA_STONE_HEAD = "The Veil bottom area, Stone Head" + OCTOPUS_CAVE_DUMBO_EGG = "Octopus Cave, Dumbo Egg" + OCTOPUS_CAVE_BULB_IN_THE_PATH_BELOW_THE_OCTOPUS_CAVE_PATH =\ + "Octopus Cave, bulb in the path below the Octopus Cave path" + SUN_TEMPLE_BULB_IN_THE_TOP_LEFT_PART = "Sun Temple, bulb in the top left part" + SUN_TEMPLE_BULB_IN_THE_TOP_RIGHT_PART = "Sun Temple, bulb in the top right part" + SUN_TEMPLE_BULB_AT_THE_TOP_OF_THE_HIGH_DARK_ROOM = "Sun Temple, bulb at the top of the high dark room" + SUN_TEMPLE_GOLDEN_GEAR = "Sun Temple, Golden Gear" + SUN_TEMPLE_FIRST_BULB_OF_THE_TEMPLE = "Sun Temple, first bulb of the temple" + SUN_TEMPLE_BULB_ON_THE_RIGHT_PART = "Sun Temple, bulb on the right part" + SUN_TEMPLE_BULB_IN_THE_HIDDEN_ROOM_OF_THE_RIGHT_PART = "Sun Temple, bulb in the hidden room of the right part" + SUN_TEMPLE_SUN_KEY = "Sun Temple, Sun Key" + SUN_TEMPLE_BOSS_PATH_FIRST_PATH_BULB = "Sun Temple boss path, first path bulb" + SUN_TEMPLE_BOSS_PATH_SECOND_PATH_BULB = "Sun Temple boss path, second path bulb" + SUN_TEMPLE_BOSS_PATH_FIRST_CLIFF_BULB = "Sun Temple boss path, first cliff bulb" + SUN_TEMPLE_BOSS_PATH_SECOND_CLIFF_BULB = "Sun Temple boss path, second cliff bulb" + SUN_TEMPLE_BOSS_AREA_BEATING_LUMEREAN_GOD = "Sun Temple boss area, beating Lumerean God" + ABYSS_LEFT_AREA_BULB_IN_HIDDEN_PATH_ROOM = "Abyss left area, bulb in hidden path room" + ABYSS_LEFT_AREA_BULB_IN_THE_RIGHT_PART = "Abyss left area, bulb in the right part" + ABYSS_LEFT_AREA_GLOWING_SEED = "Abyss left area, Glowing Seed" + ABYSS_LEFT_AREA_GLOWING_PLANT = "Abyss left area, Glowing Plant" + ABYSS_LEFT_AREA_BULB_IN_THE_BOTTOM_FISH_PASS = "Abyss left area, bulb in the bottom fish pass" + ABYSS_RIGHT_AREA_BULB_IN_THE_MIDDLE_PATH = "Abyss right area, bulb in the middle path" + ABYSS_RIGHT_AREA_BULB_BEHIND_THE_ROCK_IN_THE_MIDDLE_PATH =\ + "Abyss right area, bulb behind the rock in the middle path" + ABYSS_RIGHT_AREA_BULB_IN_THE_LEFT_GREEN_ROOM = "Abyss right area, bulb in the left green room" + ABYSS_RIGHT_AREA_BULB_BEHIND_THE_ROCK_IN_THE_WHALE_ROOM = "Abyss right area, bulb behind the rock in the whale room" + ABYSS_RIGHT_AREA_TRANSTURTLE = "Abyss right area, Transturtle" + ICE_CAVERN_BULB_IN_THE_ROOM_TO_THE_RIGHT = "Ice Cavern, bulb in the room to the right" + ICE_CAVERN_FIRST_BULB_IN_THE_TOP_EXIT_ROOM = "Ice Cavern, first bulb in the top exit room" + ICE_CAVERN_SECOND_BULB_IN_THE_TOP_EXIT_ROOM = "Ice Cavern, second bulb in the top exit room" + ICE_CAVERN_THIRD_BULB_IN_THE_TOP_EXIT_ROOM = "Ice Cavern, third bulb in the top exit room" + ICE_CAVERN_BULB_IN_THE_LEFT_ROOM = "Ice Cavern, bulb in the left room" + BUBBLE_CAVE_BULB_IN_THE_LEFT_CAVE_WALL = "Bubble Cave, bulb in the left cave wall" + BUBBLE_CAVE_BULB_IN_THE_RIGHT_CAVE_WALL_BEHIND_THE_ICE_CRYSTAL =\ + "Bubble Cave, bulb in the right cave wall (behind the ice crystal)" + BUBBLE_CAVE_VERSE_EGG = "Bubble Cave, Verse Egg" + KING_JELLYFISH_CAVE_BULB_IN_THE_RIGHT_PATH_FROM_KING_JELLY =\ + "King Jellyfish Cave, bulb in the right path from King Jelly" + KING_JELLYFISH_CAVE_JELLYFISH_COSTUME = "King Jellyfish Cave, Jellyfish Costume" + THE_WHALE_VERSE_EGG = "The Whale, Verse Egg" + SUNKEN_CITY_RIGHT_AREA_CRATE_CLOSE_TO_THE_SAVE_CRYSTAL = "Sunken City right area, crate close to the save crystal" + SUNKEN_CITY_RIGHT_AREA_CRATE_IN_THE_LEFT_BOTTOM_ROOM = "Sunken City right area, crate in the left bottom room" + SUNKEN_CITY_LEFT_AREA_CRATE_IN_THE_LITTLE_PIPE_ROOM = "Sunken City left area, crate in the little pipe room" + SUNKEN_CITY_LEFT_AREA_CRATE_CLOSE_TO_THE_SAVE_CRYSTAL = "Sunken City left area, crate close to the save crystal" + SUNKEN_CITY_LEFT_AREA_CRATE_BEFORE_THE_BEDROOM = "Sunken City left area, crate before the bedroom" + SUNKEN_CITY_LEFT_AREA_GIRL_COSTUME = "Sunken City left area, Girl Costume" + SUNKEN_CITY_BULB_ON_TOP_OF_THE_BOSS_AREA = "Sunken City, bulb on top of the boss area" + THE_BODY_CENTER_AREA_BREAKING_LI_S_CAGE = "The Body center area, breaking Li's cage" + THE_BODY_CENTER_AREA_BULB_ON_THE_MAIN_PATH_BLOCKING_TUBE = \ + "The Body center area, bulb on the main path blocking tube" + THE_BODY_LEFT_AREA_FIRST_BULB_IN_THE_TOP_FACE_ROOM = "The Body left area, first bulb in the top face room" + THE_BODY_LEFT_AREA_SECOND_BULB_IN_THE_TOP_FACE_ROOM = "The Body left area, second bulb in the top face room" + THE_BODY_LEFT_AREA_BULB_BELOW_THE_WATER_STREAM = "The Body left area, bulb below the water stream" + THE_BODY_LEFT_AREA_BULB_IN_THE_TOP_PATH_TO_THE_TOP_FACE_ROOM = \ + "The Body left area, bulb in the top path to the top face room" + THE_BODY_LEFT_AREA_BULB_IN_THE_BOTTOM_FACE_ROOM = "The Body left area, bulb in the bottom face room" + THE_BODY_RIGHT_AREA_BULB_IN_THE_TOP_FACE_ROOM = "The Body right area, bulb in the top face room" + THE_BODY_RIGHT_AREA_BULB_IN_THE_TOP_PATH_TO_THE_BOTTOM_FACE_ROOM = \ + "The Body right area, bulb in the top path to the bottom face room" + THE_BODY_RIGHT_AREA_BULB_IN_THE_BOTTOM_FACE_ROOM = "The Body right area, bulb in the bottom face room" + THE_BODY_BOTTOM_AREA_BULB_IN_THE_JELLY_ZAP_ROOM = "The Body bottom area, bulb in the Jelly Zap room" + THE_BODY_BOTTOM_AREA_BULB_IN_THE_NAUTILUS_ROOM = "The Body bottom area, bulb in the nautilus room" + THE_BODY_BOTTOM_AREA_MUTANT_COSTUME = "The Body bottom area, Mutant Costume" + FINAL_BOSS_AREA_FIRST_BULB_IN_THE_TURTLE_ROOM = "Final Boss area, first bulb in the turtle room" + FINAL_BOSS_AREA_SECOND_BULB_IN_THE_TURTLE_ROOM = "Final Boss area, second bulb in the turtle room" + FINAL_BOSS_AREA_THIRD_BULB_IN_THE_TURTLE_ROOM = "Final Boss area, third bulb in the turtle room" + FINAL_BOSS_AREA_TRANSTURTLE = "Final Boss area, Transturtle" + FINAL_BOSS_AREA_BULB_IN_THE_BOSS_THIRD_FORM_ROOM = "Final Boss area, bulb in the boss third form room" + BEATING_FALLEN_GOD = "Beating Fallen God" + BEATING_MITHALAN_GOD = "Beating Mithalan God" + BEATING_DRUNIAN_GOD = "Beating Drunian God" + BEATING_LUMEREAN_GOD = "Beating Lumerean God" + BEATING_THE_GOLEM = "Beating the Golem" + BEATING_NAUTILUS_PRIME = "Beating Nautilus Prime" + BEATING_BLASTER_PEG_PRIME = "Beating Blaster Peg Prime" + BEATING_MERGOG = "Beating Mergog" + BEATING_MITHALAN_PRIESTS = "Beating Mithalan priests" + BEATING_OCTOPUS_PRIME = "Beating Octopus Prime" + BEATING_CRABBIUS_MAXIMUS = "Beating Crabbius Maximus" + BEATING_MANTIS_SHRIMP_PRIME = "Beating Mantis Shrimp Prime" + BEATING_KING_JELLYFISH_GOD_PRIME = "Beating King Jellyfish God Prime" + FIRST_SECRET = "First Secret" + SECOND_SECRET = "Second Secret" + THIRD_SECRET = "Third Secret" + SUNKEN_CITY_CLEARED = "Sunken City cleared" + SUN_CRYSTAL = "Sun Crystal" + OBJECTIVE_COMPLETE = "Objective complete" + +class AquariaLocations: locations_verse_cave_r = { - "Verse Cave, bulb in the skeleton room": 698107, - "Verse Cave, bulb in the path right of the skeleton room": 698108, - "Verse Cave right area, Big Seed": 698175, + AquariaLocationNames.VERSE_CAVE_RIGHT_AREA_BULB_IN_THE_SKELETON_ROOM: 698107, + AquariaLocationNames.VERSE_CAVE_RIGHT_AREA_BULB_IN_THE_PATH_RIGHT_OF_THE_SKELETON_ROOM: 698108, + AquariaLocationNames.VERSE_CAVE_RIGHT_AREA_BIG_SEED: 698175, } locations_verse_cave_l = { - "Verse Cave, the Naija hint about the shield ability": 698200, - "Verse Cave left area, bulb in the center part": 698021, - "Verse Cave left area, bulb in the right part": 698022, - "Verse Cave left area, bulb under the rock at the end of the path": 698023, + AquariaLocationNames.VERSE_CAVE_LEFT_AREA_THE_NAIJA_HINT_ABOUT_THE_SHIELD_ABILITY: 698200, + AquariaLocationNames.VERSE_CAVE_LEFT_AREA_BULB_IN_THE_CENTER_PART: 698021, + AquariaLocationNames.VERSE_CAVE_LEFT_AREA_BULB_IN_THE_RIGHT_PART: 698022, + AquariaLocationNames.VERSE_CAVE_LEFT_AREA_BULB_UNDER_THE_ROCK_AT_THE_END_OF_THE_PATH: 698023, } locations_home_water = { - "Home Water, bulb below the grouper fish": 698058, - "Home Water, bulb in the path below Nautilus Prime": 698059, - "Home Water, bulb in the little room above the grouper fish": 698060, - "Home Water, bulb in the end of the path close to the Verse Cave": 698061, - "Home Water, bulb in the top left path": 698062, - "Home Water, bulb in the bottom left room": 698063, - "Home Water, bulb close to Naija's Home": 698064, - "Home Water, bulb under the rock in the left path from the Verse Cave": 698065, + AquariaLocationNames.HOME_WATERS_BULB_BELOW_THE_GROUPER_FISH: 698058, + AquariaLocationNames.HOME_WATERS_BULB_IN_THE_LITTLE_ROOM_ABOVE_THE_GROUPER_FISH: 698060, + AquariaLocationNames.HOME_WATERS_BULB_IN_THE_END_OF_THE_PATH_CLOSE_TO_THE_VERSE_CAVE: 698061, + AquariaLocationNames.HOME_WATERS_BULB_IN_THE_TOP_LEFT_PATH: 698062, + AquariaLocationNames.HOME_WATERS_BULB_CLOSE_TO_NAIJA_S_HOME: 698064, + AquariaLocationNames.HOME_WATERS_BULB_UNDER_THE_ROCK_IN_THE_LEFT_PATH_FROM_THE_VERSE_CAVE: 698065, + } + + locations_home_water_behind_rocks = { + AquariaLocationNames.HOME_WATERS_BULB_IN_THE_PATH_BELOW_NAUTILUS_PRIME: 698059, + AquariaLocationNames.HOME_WATERS_BULB_IN_THE_BOTTOM_LEFT_ROOM: 698063, } locations_home_water_nautilus = { - "Home Water, Nautilus Egg": 698194, + AquariaLocationNames.HOME_WATERS_NAUTILUS_EGG: 698194, } locations_home_water_transturtle = { - "Home Water, Transturtle": 698213, + AquariaLocationNames.HOME_WATERS_TRANSTURTLE: 698213, } locations_naija_home = { - "Naija's Home, bulb after the energy door": 698119, - "Naija's Home, bulb under the rock at the right of the main path": 698120, + AquariaLocationNames.NAIJA_S_HOME_BULB_AFTER_THE_ENERGY_DOOR: 698119, + AquariaLocationNames.NAIJA_S_HOME_BULB_UNDER_THE_ROCK_AT_THE_RIGHT_OF_THE_MAIN_PATH: 698120, } locations_song_cave = { - "Song Cave, Erulian spirit": 698206, - "Song Cave, bulb in the top right part": 698071, - "Song Cave, bulb in the big anemone room": 698072, - "Song Cave, bulb in the path to the singing statues": 698073, - "Song Cave, bulb under the rock in the path to the singing statues": 698074, - "Song Cave, bulb under the rock close to the song door": 698075, - "Song Cave, Verse Egg": 698160, - "Song Cave, Jelly Beacon": 698178, - "Song Cave, Anemone Seed": 698162, + AquariaLocationNames.SONG_CAVE_ERULIAN_SPIRIT: 698206, + AquariaLocationNames.SONG_CAVE_BULB_IN_THE_TOP_RIGHT_PART: 698071, + AquariaLocationNames.SONG_CAVE_BULB_IN_THE_BIG_ANEMONE_ROOM: 698072, + AquariaLocationNames.SONG_CAVE_BULB_IN_THE_PATH_TO_THE_SINGING_STATUES: 698073, + AquariaLocationNames.SONG_CAVE_BULB_UNDER_THE_ROCK_IN_THE_PATH_TO_THE_SINGING_STATUES: 698074, + AquariaLocationNames.SONG_CAVE_BULB_UNDER_THE_ROCK_CLOSE_TO_THE_SONG_DOOR: 698075, + AquariaLocationNames.SONG_CAVE_VERSE_EGG: 698160, + AquariaLocationNames.SONG_CAVE_JELLY_BEACON: 698178, + AquariaLocationNames.SONG_CAVE_ANEMONE_SEED: 698162, } locations_energy_temple_1 = { - "Energy Temple first area, beating the Energy Statue": 698205, - "Energy Temple first area, bulb in the bottom room blocked by a rock": 698027, + AquariaLocationNames.ENERGY_TEMPLE_FIRST_AREA_BEATING_THE_ENERGY_STATUE: 698205, + AquariaLocationNames.ENERGY_TEMPLE_FIRST_AREA_BULB_IN_THE_BOTTOM_ROOM_BLOCKED_BY_A_ROCK: 698027, } locations_energy_temple_idol = { - "Energy Temple first area, Energy Idol": 698170, + AquariaLocationNames.ENERGY_TEMPLE_ENERGY_IDOL: 698170, } locations_energy_temple_2 = { - "Energy Temple second area, bulb under the rock": 698028, + AquariaLocationNames.ENERGY_TEMPLE_SECOND_AREA_BULB_UNDER_THE_ROCK: 698028, + # This can be accessible via locations_energy_temple_altar too } locations_energy_temple_altar = { - "Energy Temple bottom entrance, Krotite Armor": 698163, + AquariaLocationNames.ENERGY_TEMPLE_BOTTOM_ENTRANCE_KROTITE_ARMOR: 698163, } locations_energy_temple_3 = { - "Energy Temple third area, bulb in the bottom path": 698029, + AquariaLocationNames.ENERGY_TEMPLE_THIRD_AREA_BULB_IN_THE_BOTTOM_PATH: 698029, } locations_energy_temple_boss = { - "Energy Temple boss area, Fallen God Tooth": 698169, + AquariaLocationNames.ENERGY_TEMPLE_BOSS_AREA_FALLEN_GOD_TOOTH: 698169, } locations_energy_temple_blaster_room = { - "Energy Temple blaster room, Blaster Egg": 698195, + AquariaLocationNames.ENERGY_TEMPLE_BLASTER_ROOM_BLASTER_EGG: 698195, } locations_openwater_tl = { - "Open Water top left area, bulb under the rock in the right path": 698001, - "Open Water top left area, bulb under the rock in the left path": 698002, - "Open Water top left area, bulb to the right of the save crystal": 698003, + AquariaLocationNames.OPEN_WATERS_TOP_LEFT_AREA_BULB_UNDER_THE_ROCK_IN_THE_RIGHT_PATH: 698001, + AquariaLocationNames.OPEN_WATERS_TOP_LEFT_AREA_BULB_UNDER_THE_ROCK_IN_THE_LEFT_PATH: 698002, + AquariaLocationNames.OPEN_WATERS_TOP_LEFT_AREA_BULB_TO_THE_RIGHT_OF_THE_SAVE_CRYSTAL: 698003, } locations_openwater_tr = { - "Open Water top right area, bulb in the small path before Mithalas": 698004, - "Open Water top right area, bulb in the path from the left entrance": 698005, - "Open Water top right area, bulb in the clearing close to the bottom exit": 698006, - "Open Water top right area, bulb in the big clearing close to the save crystal": 698007, - "Open Water top right area, bulb in the big clearing to the top exit": 698008, - "Open Water top right area, first urn in the Mithalas exit": 698148, - "Open Water top right area, second urn in the Mithalas exit": 698149, - "Open Water top right area, third urn in the Mithalas exit": 698150, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_SMALL_PATH_BEFORE_MITHALAS: 698004, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_PATH_FROM_THE_LEFT_ENTRANCE: 698005, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_CLEARING_CLOSE_TO_THE_BOTTOM_EXIT: 698006, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_BIG_CLEARING_CLOSE_TO_THE_SAVE_CRYSTAL: 698007, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_BIG_CLEARING_TO_THE_TOP_EXIT: 698008, } locations_openwater_tr_turtle = { - "Open Water top right area, bulb in the turtle room": 698009, - "Open Water top right area, Transturtle": 698211, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_TURTLE_ROOM: 698009, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_TRANSTURTLE: 698211, + } + + locations_openwater_tr_urns = { + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_FIRST_URN_IN_THE_MITHALAS_EXIT: 698148, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_SECOND_URN_IN_THE_MITHALAS_EXIT: 698149, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_THIRD_URN_IN_THE_MITHALAS_EXIT: 698150, } locations_openwater_bl = { - "Open Water bottom left area, bulb behind the chomper fish": 698011, - "Open Water bottom left area, bulb inside the lowest fish pass": 698010, + AquariaLocationNames.OPEN_WATERS_BOTTOM_LEFT_AREA_BULB_BEHIND_THE_CHOMPER_FISH: 698011, + AquariaLocationNames.OPEN_WATERS_BOTTOM_LEFT_AREA_BULB_INSIDE_THE_LOWEST_FISH_PASS: 698010, } locations_skeleton_path = { - "Open Water skeleton path, bulb close to the right exit": 698012, - "Open Water skeleton path, bulb behind the chomper fish": 698013, + AquariaLocationNames.OPEN_WATERS_SKELETON_PATH_BULB_CLOSE_TO_THE_RIGHT_EXIT: 698012, + AquariaLocationNames.OPEN_WATERS_SKELETON_PATH_BULB_BEHIND_THE_CHOMPER_FISH: 698013, } locations_skeleton_path_sc = { - "Open Water skeleton path, King Skull": 698177, + AquariaLocationNames.OPEN_WATERS_SKELETON_PATH_KING_SKULL: 698177, } locations_arnassi = { - "Arnassi Ruins, bulb in the right part": 698014, - "Arnassi Ruins, bulb in the left part": 698015, - "Arnassi Ruins, bulb in the center part": 698016, - "Arnassi Ruins, Song Plant Spore": 698179, - "Arnassi Ruins, Arnassi Armor": 698191, + AquariaLocationNames.ARNASSI_RUINS_BULB_IN_THE_RIGHT_PART: 698014, + AquariaLocationNames.ARNASSI_RUINS_BULB_IN_THE_LEFT_PART: 698015, + AquariaLocationNames.ARNASSI_RUINS_BULB_IN_THE_CENTER_PART: 698016, + AquariaLocationNames.ARNASSI_RUINS_SONG_PLANT_SPORE: 698179, + AquariaLocationNames.ARNASSI_RUINS_ARNASSI_ARMOR: 698191, } - locations_arnassi_path = { - "Arnassi Ruins, Arnassi Statue": 698164, + locations_arnassi_cave = { + AquariaLocationNames.ARNASSI_RUINS_ARNASSI_STATUE: 698164, } locations_arnassi_cave_transturtle = { - "Arnassi Ruins, Transturtle": 698217, + AquariaLocationNames.ARNASSI_RUINS_TRANSTURTLE: 698217, } locations_arnassi_crab_boss = { - "Arnassi Ruins, Crab Armor": 698187, + AquariaLocationNames.ARNASSI_RUINS_CRAB_ARMOR: 698187, } locations_simon = { - "Simon Says area, beating Simon Says": 698156, - "Simon Says area, Transturtle": 698216, + AquariaLocationNames.SIMON_SAYS_AREA_BEATING_SIMON_SAYS: 698156, + AquariaLocationNames.SIMON_SAYS_AREA_TRANSTURTLE: 698216, } locations_mithalas_city = { - "Mithalas City, first bulb in the left city part": 698030, - "Mithalas City, second bulb in the left city part": 698035, - "Mithalas City, bulb in the right part": 698031, - "Mithalas City, bulb at the top of the city": 698033, - "Mithalas City, first bulb in a broken home": 698034, - "Mithalas City, second bulb in a broken home": 698041, - "Mithalas City, bulb in the bottom left part": 698037, - "Mithalas City, first bulb in one of the homes": 698038, - "Mithalas City, second bulb in one of the homes": 698039, - "Mithalas City, first urn in one of the homes": 698123, - "Mithalas City, second urn in one of the homes": 698124, - "Mithalas City, first urn in the city reserve": 698125, - "Mithalas City, second urn in the city reserve": 698126, - "Mithalas City, third urn in the city reserve": 698127, + AquariaLocationNames.MITHALAS_CITY_FIRST_BULB_IN_THE_LEFT_CITY_PART: 698030, + AquariaLocationNames.MITHALAS_CITY_SECOND_BULB_IN_THE_LEFT_CITY_PART: 698035, + AquariaLocationNames.MITHALAS_CITY_BULB_IN_THE_RIGHT_PART: 698031, + AquariaLocationNames.MITHALAS_CITY_BULB_AT_THE_TOP_OF_THE_CITY: 698033, + AquariaLocationNames.MITHALAS_CITY_FIRST_BULB_IN_A_BROKEN_HOME: 698034, + AquariaLocationNames.MITHALAS_CITY_SECOND_BULB_IN_A_BROKEN_HOME: 698041, + AquariaLocationNames.MITHALAS_CITY_BULB_IN_THE_BOTTOM_LEFT_PART: 698037, + AquariaLocationNames.MITHALAS_CITY_FIRST_BULB_IN_ONE_OF_THE_HOMES: 698038, + AquariaLocationNames.MITHALAS_CITY_SECOND_BULB_IN_ONE_OF_THE_HOMES: 698039, + } + + locations_mithalas_city_urns = { + AquariaLocationNames.MITHALAS_CITY_FIRST_URN_IN_ONE_OF_THE_HOMES: 698123, + AquariaLocationNames.MITHALAS_CITY_SECOND_URN_IN_ONE_OF_THE_HOMES: 698124, + AquariaLocationNames.MITHALAS_CITY_FIRST_URN_IN_THE_CITY_RESERVE: 698125, + AquariaLocationNames.MITHALAS_CITY_SECOND_URN_IN_THE_CITY_RESERVE: 698126, + AquariaLocationNames.MITHALAS_CITY_THIRD_URN_IN_THE_CITY_RESERVE: 698127, } locations_mithalas_city_top_path = { - "Mithalas City, first bulb at the end of the top path": 698032, - "Mithalas City, second bulb at the end of the top path": 698040, - "Mithalas City, bulb in the top path": 698036, - "Mithalas City, Mithalas Pot": 698174, - "Mithalas City, urn in the Castle flower tube entrance": 698128, + AquariaLocationNames.MITHALAS_CITY_FIRST_BULB_AT_THE_END_OF_THE_TOP_PATH: 698032, + AquariaLocationNames.MITHALAS_CITY_SECOND_BULB_AT_THE_END_OF_THE_TOP_PATH: 698040, + AquariaLocationNames.MITHALAS_CITY_BULB_IN_THE_TOP_PATH: 698036, + AquariaLocationNames.MITHALAS_CITY_MITHALAS_POT: 698174, + AquariaLocationNames.MITHALAS_CITY_URN_IN_THE_CASTLE_FLOWER_TUBE_ENTRANCE: 698128, } locations_mithalas_city_fishpass = { - "Mithalas City, Doll": 698173, - "Mithalas City, urn inside a home fish pass": 698129, + AquariaLocationNames.MITHALAS_CITY_DOLL: 698173, + AquariaLocationNames.MITHALAS_CITY_URN_INSIDE_A_HOME_FISH_PASS: 698129, + } + + locations_mithalas_castle = { + AquariaLocationNames.MITHALAS_CITY_CASTLE_BULB_IN_THE_FLESH_HOLE: 698042, + AquariaLocationNames.MITHALAS_CITY_CASTLE_BLUE_BANNER: 698165, + } + + locations_mithalas_castle_urns = { + AquariaLocationNames.MITHALAS_CITY_CASTLE_URN_IN_THE_BEDROOM: 698130, + AquariaLocationNames.MITHALAS_CITY_CASTLE_FIRST_URN_OF_THE_SINGLE_LAMP_PATH: 698131, + AquariaLocationNames.MITHALAS_CITY_CASTLE_SECOND_URN_OF_THE_SINGLE_LAMP_PATH: 698132, + AquariaLocationNames.MITHALAS_CITY_CASTLE_URN_IN_THE_BOTTOM_ROOM: 698133, + AquariaLocationNames.MITHALAS_CITY_CASTLE_FIRST_URN_ON_THE_ENTRANCE_PATH: 698134, + AquariaLocationNames.MITHALAS_CITY_CASTLE_SECOND_URN_ON_THE_ENTRANCE_PATH: 698135, } - locations_cathedral_l = { - "Mithalas City Castle, bulb in the flesh hole": 698042, - "Mithalas City Castle, Blue Banner": 698165, - "Mithalas City Castle, urn in the bedroom": 698130, - "Mithalas City Castle, first urn of the single lamp path": 698131, - "Mithalas City Castle, second urn of the single lamp path": 698132, - "Mithalas City Castle, urn in the bottom room": 698133, - "Mithalas City Castle, first urn on the entrance path": 698134, - "Mithalas City Castle, second urn on the entrance path": 698135, + locations_mithalas_castle_tube = { + AquariaLocationNames.MITHALAS_CITY_CASTLE_BEATING_THE_PRIESTS: 698208, } - locations_cathedral_l_tube = { - "Mithalas City Castle, beating the Priests": 698208, + locations_mithalas_castle_sc = { + AquariaLocationNames.MITHALAS_CITY_CASTLE_TRIDENT_HEAD: 698183, } - locations_cathedral_l_sc = { - "Mithalas City Castle, Trident Head": 698183, + locations_cathedral_top_start = { + AquariaLocationNames.MITHALAS_CATHEDRAL_BULB_IN_THE_FLESH_ROOM_WITH_FLEAS: 698139, + AquariaLocationNames.MITHALAS_CATHEDRAL_MITHALAN_DRESS: 698189, } - locations_cathedral_r = { - "Mithalas Cathedral, first urn in the top right room": 698136, - "Mithalas Cathedral, second urn in the top right room": 698137, - "Mithalas Cathedral, third urn in the top right room": 698138, - "Mithalas Cathedral, urn in the flesh room with fleas": 698139, - "Mithalas Cathedral, first urn in the bottom right path": 698140, - "Mithalas Cathedral, second urn in the bottom right path": 698141, - "Mithalas Cathedral, urn behind the flesh vein": 698142, - "Mithalas Cathedral, urn in the top left eyes boss room": 698143, - "Mithalas Cathedral, first urn in the path behind the flesh vein": 698144, - "Mithalas Cathedral, second urn in the path behind the flesh vein": 698145, - "Mithalas Cathedral, third urn in the path behind the flesh vein": 698146, - "Mithalas Cathedral, fourth urn in the top right room": 698147, - "Mithalas Cathedral, Mithalan Dress": 698189, - "Mithalas Cathedral, urn below the left entrance": 698198, + locations_cathedral_top_start_urns = { + AquariaLocationNames.MITHALAS_CATHEDRAL_FIRST_URN_IN_THE_TOP_RIGHT_ROOM: 698136, + AquariaLocationNames.MITHALAS_CATHEDRAL_SECOND_URN_IN_THE_TOP_RIGHT_ROOM: 698137, + AquariaLocationNames.MITHALAS_CATHEDRAL_THIRD_URN_IN_THE_TOP_RIGHT_ROOM: 698138, + AquariaLocationNames.MITHALAS_CATHEDRAL_URN_BEHIND_THE_FLESH_VEIN: 698142, + AquariaLocationNames.MITHALAS_CATHEDRAL_URN_IN_THE_TOP_LEFT_EYES_BOSS_ROOM: 698143, + AquariaLocationNames.MITHALAS_CATHEDRAL_FIRST_URN_IN_THE_PATH_BEHIND_THE_FLESH_VEIN: 698144, + AquariaLocationNames.MITHALAS_CATHEDRAL_SECOND_URN_IN_THE_PATH_BEHIND_THE_FLESH_VEIN: 698145, + AquariaLocationNames.MITHALAS_CATHEDRAL_THIRD_URN_IN_THE_PATH_BEHIND_THE_FLESH_VEIN: 698146, + AquariaLocationNames.MITHALAS_CATHEDRAL_FOURTH_URN_IN_THE_TOP_RIGHT_ROOM: 698147, + AquariaLocationNames.MITHALAS_CATHEDRAL_URN_BELOW_THE_LEFT_ENTRANCE: 698198, + } + + locations_cathedral_top_end = { + AquariaLocationNames.MITHALAS_CATHEDRAL_FIRST_URN_IN_THE_BOTTOM_RIGHT_PATH: 698140, + AquariaLocationNames.MITHALAS_CATHEDRAL_SECOND_URN_IN_THE_BOTTOM_RIGHT_PATH: 698141, } locations_cathedral_underground = { - "Cathedral Underground, bulb in the center part": 698113, - "Cathedral Underground, first bulb in the top left part": 698114, - "Cathedral Underground, second bulb in the top left part": 698115, - "Cathedral Underground, third bulb in the top left part": 698116, - "Cathedral Underground, bulb close to the save crystal": 698117, - "Cathedral Underground, bulb in the bottom right path": 698118, + AquariaLocationNames.CATHEDRAL_UNDERGROUND_BULB_IN_THE_CENTER_PART: 698113, + AquariaLocationNames.CATHEDRAL_UNDERGROUND_FIRST_BULB_IN_THE_TOP_LEFT_PART: 698114, + AquariaLocationNames.CATHEDRAL_UNDERGROUND_SECOND_BULB_IN_THE_TOP_LEFT_PART: 698115, + AquariaLocationNames.CATHEDRAL_UNDERGROUND_THIRD_BULB_IN_THE_TOP_LEFT_PART: 698116, + AquariaLocationNames.CATHEDRAL_UNDERGROUND_BULB_CLOSE_TO_THE_SAVE_CRYSTAL: 698117, + AquariaLocationNames.CATHEDRAL_UNDERGROUND_BULB_IN_THE_BOTTOM_RIGHT_PATH: 698118, } locations_cathedral_boss = { - "Mithalas boss area, beating Mithalan God": 698202, + AquariaLocationNames.MITHALAS_BOSS_AREA_BEATING_MITHALAN_GOD: 698202, } locations_forest_tl = { - "Kelp Forest top left area, bulb in the bottom left clearing": 698044, - "Kelp Forest top left area, bulb in the path down from the top left clearing": 698045, - "Kelp Forest top left area, bulb in the top left clearing": 698046, - "Kelp Forest top left area, Jelly Egg": 698185, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_BULB_IN_THE_BOTTOM_LEFT_CLEARING: 698044, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_BULB_IN_THE_PATH_DOWN_FROM_THE_TOP_LEFT_CLEARING: 698045, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_BULB_IN_THE_TOP_LEFT_CLEARING: 698046, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_JELLY_EGG: 698185, } - locations_forest_tl_fp = { - "Kelp Forest top left area, bulb close to the Verse Egg": 698047, - "Kelp Forest top left area, Verse Egg": 698158, + locations_forest_tl_verse_egg_room = { + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_BULB_CLOSE_TO_THE_VERSE_EGG: 698047, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_VERSE_EGG: 698158, } locations_forest_tr = { - "Kelp Forest top right area, bulb under the rock in the right path": 698048, - "Kelp Forest top right area, bulb at the left of the center clearing": 698049, - "Kelp Forest top right area, bulb in the left path's big room": 698051, - "Kelp Forest top right area, bulb in the left path's small room": 698052, - "Kelp Forest top right area, bulb at the top of the center clearing": 698053, - "Kelp Forest top right area, Black Pearl": 698167, + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BULB_UNDER_THE_ROCK_IN_THE_RIGHT_PATH: 698048, + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BULB_AT_THE_LEFT_OF_THE_CENTER_CLEARING: 698049, + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BULB_IN_THE_LEFT_PATH_S_BIG_ROOM: 698051, + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BULB_IN_THE_LEFT_PATH_S_SMALL_ROOM: 698052, + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BULB_AT_THE_TOP_OF_THE_CENTER_CLEARING: 698053, + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BLACK_PEARL: 698167, } locations_forest_tr_fp = { - "Kelp Forest top right area, bulb in the top fish pass": 698050, + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BULB_IN_THE_TOP_FISH_PASS: 698050, } locations_forest_bl = { - "Kelp Forest bottom left area, Transturtle": 698212, + AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_TRANSTURTLE: 698212, } locations_forest_bl_sc = { - "Kelp Forest bottom left area, bulb close to the spirit crystals": 698054, - "Kelp Forest bottom left area, Walker Baby": 698186, + AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_BULB_CLOSE_TO_THE_SPIRIT_CRYSTALS: 698054, + AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_WALKER_BABY: 698186, + } + + locations_forest_fish_cave = { + AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_FISH_CAVE_PUZZLE: 698207, } locations_forest_br = { - "Kelp Forest bottom right area, Odd Container": 698168, + AquariaLocationNames.KELP_FOREST_BOTTOM_RIGHT_AREA_ODD_CONTAINER: 698168, } locations_forest_boss = { - "Kelp Forest boss area, beating Drunian God": 698204, + AquariaLocationNames.KELP_FOREST_BOSS_AREA_BEATING_DRUNIAN_GOD: 698204, } locations_forest_boss_entrance = { - "Kelp Forest boss room, bulb at the bottom of the area": 698055, - } - - locations_forest_fish_cave = { - "Kelp Forest bottom left area, Fish Cave puzzle": 698207, + AquariaLocationNames.KELP_FOREST_BOSS_ROOM_BULB_AT_THE_BOTTOM_OF_THE_AREA: 698055, } - locations_forest_sprite_cave = { - "Kelp Forest sprite cave, bulb inside the fish pass": 698056, + locations_sprite_cave = { + AquariaLocationNames.KELP_FOREST_SPRITE_CAVE_BULB_INSIDE_THE_FISH_PASS: 698056, } - locations_forest_sprite_cave_tube = { - "Kelp Forest sprite cave, bulb in the second room": 698057, - "Kelp Forest sprite cave, Seed Bag": 698176, + locations_sprite_cave_tube = { + AquariaLocationNames.KELP_FOREST_SPRITE_CAVE_BULB_IN_THE_SECOND_ROOM: 698057, + AquariaLocationNames.KELP_FOREST_SPRITE_CAVE_SEED_BAG: 698176, } locations_mermog_cave = { - "Mermog cave, bulb in the left part of the cave": 698121, + AquariaLocationNames.MERMOG_CAVE_BULB_IN_THE_LEFT_PART_OF_THE_CAVE: 698121, } locations_mermog_boss = { - "Mermog cave, Piranha Egg": 698197, + AquariaLocationNames.MERMOG_CAVE_PIRANHA_EGG: 698197, } locations_veil_tl = { - "The Veil top left area, In Li's cave": 698199, - "The Veil top left area, bulb under the rock in the top right path": 698078, - "The Veil top left area, bulb hidden behind the blocking rock": 698076, - "The Veil top left area, Transturtle": 698209, + AquariaLocationNames.THE_VEIL_TOP_LEFT_AREA_IN_LI_S_CAVE: 698199, + AquariaLocationNames.THE_VEIL_TOP_LEFT_AREA_BULB_UNDER_THE_ROCK_IN_THE_TOP_RIGHT_PATH: 698078, + AquariaLocationNames.THE_VEIL_TOP_LEFT_AREA_BULB_HIDDEN_BEHIND_THE_BLOCKING_ROCK: 698076, + AquariaLocationNames.THE_VEIL_TOP_LEFT_AREA_TRANSTURTLE: 698209, } locations_veil_tl_fp = { - "The Veil top left area, bulb inside the fish pass": 698077, + AquariaLocationNames.THE_VEIL_TOP_LEFT_AREA_BULB_INSIDE_THE_FISH_PASS: 698077, } locations_turtle_cave = { - "Turtle cave, Turtle Egg": 698184, + AquariaLocationNames.TURTLE_CAVE_TURTLE_EGG: 698184, } locations_turtle_cave_bubble = { - "Turtle cave, bulb in Bubble Cliff": 698000, - "Turtle cave, Urchin Costume": 698193, + AquariaLocationNames.TURTLE_CAVE_BULB_IN_BUBBLE_CLIFF: 698000, + AquariaLocationNames.TURTLE_CAVE_URCHIN_COSTUME: 698193, } locations_veil_tr_r = { - "The Veil top right area, bulb in the middle of the wall jump cliff": 698079, - "The Veil top right area, Golden Starfish": 698180, + AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_BULB_IN_THE_MIDDLE_OF_THE_WALL_JUMP_CLIFF: 698079, + AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_GOLDEN_STARFISH: 698180, } locations_veil_tr_l = { - "The Veil top right area, bulb at the top of the waterfall": 698080, - "The Veil top right area, Transturtle": 698210, + AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_BULB_AT_THE_TOP_OF_THE_WATERFALL: 698080, + AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_TRANSTURTLE: 698210, } - locations_veil_bl = { - "The Veil bottom area, bulb in the left path": 698082, + locations_veil_b = { + AquariaLocationNames.THE_VEIL_BOTTOM_AREA_BULB_IN_THE_LEFT_PATH: 698082, } locations_veil_b_sc = { - "The Veil bottom area, bulb in the spirit path": 698081, + AquariaLocationNames.THE_VEIL_BOTTOM_AREA_BULB_IN_THE_SPIRIT_PATH: 698081, } - locations_veil_bl_fp = { - "The Veil bottom area, Verse Egg": 698157, + locations_veil_b_fp = { + AquariaLocationNames.THE_VEIL_BOTTOM_AREA_VERSE_EGG: 698157, } locations_veil_br = { - "The Veil bottom area, Stone Head": 698181, + AquariaLocationNames.THE_VEIL_BOTTOM_AREA_STONE_HEAD: 698181, } locations_octo_cave_t = { - "Octopus Cave, Dumbo Egg": 698196, + AquariaLocationNames.OCTOPUS_CAVE_DUMBO_EGG: 698196, } locations_octo_cave_b = { - "Octopus Cave, bulb in the path below the Octopus Cave path": 698122, + AquariaLocationNames.OCTOPUS_CAVE_BULB_IN_THE_PATH_BELOW_THE_OCTOPUS_CAVE_PATH: 698122, } locations_sun_temple_l = { - "Sun Temple, bulb in the top left part": 698094, - "Sun Temple, bulb in the top right part": 698095, - "Sun Temple, bulb at the top of the high dark room": 698096, - "Sun Temple, Golden Gear": 698171, + AquariaLocationNames.SUN_TEMPLE_BULB_IN_THE_TOP_LEFT_PART: 698094, + AquariaLocationNames.SUN_TEMPLE_BULB_IN_THE_TOP_RIGHT_PART: 698095, + AquariaLocationNames.SUN_TEMPLE_BULB_AT_THE_TOP_OF_THE_HIGH_DARK_ROOM: 698096, + AquariaLocationNames.SUN_TEMPLE_GOLDEN_GEAR: 698171, } locations_sun_temple_r = { - "Sun Temple, first bulb of the temple": 698091, - "Sun Temple, bulb on the right part": 698092, - "Sun Temple, bulb in the hidden room of the right part": 698093, - "Sun Temple, Sun Key": 698182, + AquariaLocationNames.SUN_TEMPLE_FIRST_BULB_OF_THE_TEMPLE: 698091, + AquariaLocationNames.SUN_TEMPLE_BULB_ON_THE_RIGHT_PART: 698092, + AquariaLocationNames.SUN_TEMPLE_BULB_IN_THE_HIDDEN_ROOM_OF_THE_RIGHT_PART: 698093, + AquariaLocationNames.SUN_TEMPLE_SUN_KEY: 698182, } locations_sun_temple_boss_path = { - "Sun Worm path, first path bulb": 698017, - "Sun Worm path, second path bulb": 698018, - "Sun Worm path, first cliff bulb": 698019, - "Sun Worm path, second cliff bulb": 698020, + AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_FIRST_PATH_BULB: 698017, + AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_SECOND_PATH_BULB: 698018, + AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_FIRST_CLIFF_BULB: 698019, + AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_SECOND_CLIFF_BULB: 698020, } locations_sun_temple_boss = { - "Sun Temple boss area, beating Sun God": 698203, + AquariaLocationNames.SUN_TEMPLE_BOSS_AREA_BEATING_LUMEREAN_GOD: 698203, } locations_abyss_l = { - "Abyss left area, bulb in hidden path room": 698024, - "Abyss left area, bulb in the right part": 698025, - "Abyss left area, Glowing Seed": 698166, - "Abyss left area, Glowing Plant": 698172, + AquariaLocationNames.ABYSS_LEFT_AREA_BULB_IN_HIDDEN_PATH_ROOM: 698024, + AquariaLocationNames.ABYSS_LEFT_AREA_BULB_IN_THE_RIGHT_PART: 698025, + AquariaLocationNames.ABYSS_LEFT_AREA_GLOWING_SEED: 698166, + AquariaLocationNames.ABYSS_LEFT_AREA_GLOWING_PLANT: 698172, } locations_abyss_lb = { - "Abyss left area, bulb in the bottom fish pass": 698026, + AquariaLocationNames.ABYSS_LEFT_AREA_BULB_IN_THE_BOTTOM_FISH_PASS: 698026, } locations_abyss_r = { - "Abyss right area, bulb behind the rock in the whale room": 698109, - "Abyss right area, bulb in the middle path": 698110, - "Abyss right area, bulb behind the rock in the middle path": 698111, - "Abyss right area, bulb in the left green room": 698112, + AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_IN_THE_MIDDLE_PATH: 698110, + AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_BEHIND_THE_ROCK_IN_THE_MIDDLE_PATH: 698111, + AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_IN_THE_LEFT_GREEN_ROOM: 698112, + } + + locations_abyss_r_whale = { + AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_BEHIND_THE_ROCK_IN_THE_WHALE_ROOM: 698109, } locations_abyss_r_transturtle = { - "Abyss right area, Transturtle": 698214, + AquariaLocationNames.ABYSS_RIGHT_AREA_TRANSTURTLE: 698214, } locations_ice_cave = { - "Ice Cave, bulb in the room to the right": 698083, - "Ice Cave, first bulb in the top exit room": 698084, - "Ice Cave, second bulb in the top exit room": 698085, - "Ice Cave, third bulb in the top exit room": 698086, - "Ice Cave, bulb in the left room": 698087, + AquariaLocationNames.ICE_CAVERN_BULB_IN_THE_ROOM_TO_THE_RIGHT: 698083, + AquariaLocationNames.ICE_CAVERN_FIRST_BULB_IN_THE_TOP_EXIT_ROOM: 698084, + AquariaLocationNames.ICE_CAVERN_SECOND_BULB_IN_THE_TOP_EXIT_ROOM: 698085, + AquariaLocationNames.ICE_CAVERN_THIRD_BULB_IN_THE_TOP_EXIT_ROOM: 698086, + AquariaLocationNames.ICE_CAVERN_BULB_IN_THE_LEFT_ROOM: 698087, } locations_bubble_cave = { - "Bubble Cave, bulb in the left cave wall": 698089, - "Bubble Cave, bulb in the right cave wall (behind the ice crystal)": 698090, + AquariaLocationNames.BUBBLE_CAVE_BULB_IN_THE_LEFT_CAVE_WALL: 698089, + AquariaLocationNames.BUBBLE_CAVE_BULB_IN_THE_RIGHT_CAVE_WALL_BEHIND_THE_ICE_CRYSTAL: 698090, } locations_bubble_cave_boss = { - "Bubble Cave, Verse Egg": 698161, + AquariaLocationNames.BUBBLE_CAVE_VERSE_EGG: 698161, } locations_king_jellyfish_cave = { - "King Jellyfish Cave, bulb in the right path from King Jelly": 698088, - "King Jellyfish Cave, Jellyfish Costume": 698188, + AquariaLocationNames.KING_JELLYFISH_CAVE_BULB_IN_THE_RIGHT_PATH_FROM_KING_JELLY: 698088, + AquariaLocationNames.KING_JELLYFISH_CAVE_JELLYFISH_COSTUME: 698188, } locations_whale = { - "The Whale, Verse Egg": 698159, + AquariaLocationNames.THE_WHALE_VERSE_EGG: 698159, } locations_sunken_city_r = { - "Sunken City right area, crate close to the save crystal": 698154, - "Sunken City right area, crate in the left bottom room": 698155, + AquariaLocationNames.SUNKEN_CITY_RIGHT_AREA_CRATE_CLOSE_TO_THE_SAVE_CRYSTAL: 698154, + AquariaLocationNames.SUNKEN_CITY_RIGHT_AREA_CRATE_IN_THE_LEFT_BOTTOM_ROOM: 698155, } locations_sunken_city_l = { - "Sunken City left area, crate in the little pipe room": 698151, - "Sunken City left area, crate close to the save crystal": 698152, - "Sunken City left area, crate before the bedroom": 698153, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_IN_THE_LITTLE_PIPE_ROOM: 698151, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_CLOSE_TO_THE_SAVE_CRYSTAL: 698152, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_BEFORE_THE_BEDROOM: 698153, } locations_sunken_city_l_bedroom = { - "Sunken City left area, Girl Costume": 698192, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_GIRL_COSTUME: 698192, } locations_sunken_city_boss = { - "Sunken City, bulb on top of the boss area": 698043, + AquariaLocationNames.SUNKEN_CITY_BULB_ON_TOP_OF_THE_BOSS_AREA: 698043, } locations_body_c = { - "The Body center area, breaking Li's cage": 698201, - "The Body center area, bulb on the main path blocking tube": 698097, + AquariaLocationNames.THE_BODY_CENTER_AREA_BREAKING_LI_S_CAGE: 698201, + AquariaLocationNames.THE_BODY_CENTER_AREA_BULB_ON_THE_MAIN_PATH_BLOCKING_TUBE: 698097, } locations_body_l = { - "The Body left area, first bulb in the top face room": 698066, - "The Body left area, second bulb in the top face room": 698069, - "The Body left area, bulb below the water stream": 698067, - "The Body left area, bulb in the top path to the top face room": 698068, - "The Body left area, bulb in the bottom face room": 698070, + AquariaLocationNames.THE_BODY_LEFT_AREA_FIRST_BULB_IN_THE_TOP_FACE_ROOM: 698066, + AquariaLocationNames.THE_BODY_LEFT_AREA_SECOND_BULB_IN_THE_TOP_FACE_ROOM: 698069, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_BELOW_THE_WATER_STREAM: 698067, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_IN_THE_TOP_PATH_TO_THE_TOP_FACE_ROOM: 698068, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_IN_THE_BOTTOM_FACE_ROOM: 698070, } locations_body_rt = { - "The Body right area, bulb in the top face room": 698100, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_TOP_FACE_ROOM: 698100, } locations_body_rb = { - "The Body right area, bulb in the top path to the bottom face room": 698098, - "The Body right area, bulb in the bottom face room": 698099, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_TOP_PATH_TO_THE_BOTTOM_FACE_ROOM: 698098, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_BOTTOM_FACE_ROOM: 698099, } locations_body_b = { - "The Body bottom area, bulb in the Jelly Zap room": 698101, - "The Body bottom area, bulb in the nautilus room": 698102, - "The Body bottom area, Mutant Costume": 698190, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_BULB_IN_THE_JELLY_ZAP_ROOM: 698101, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_BULB_IN_THE_NAUTILUS_ROOM: 698102, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_MUTANT_COSTUME: 698190, } locations_final_boss_tube = { - "Final Boss area, first bulb in the turtle room": 698103, - "Final Boss area, second bulb in the turtle room": 698104, - "Final Boss area, third bulb in the turtle room": 698105, - "Final Boss area, Transturtle": 698215, + AquariaLocationNames.FINAL_BOSS_AREA_FIRST_BULB_IN_THE_TURTLE_ROOM: 698103, + AquariaLocationNames.FINAL_BOSS_AREA_SECOND_BULB_IN_THE_TURTLE_ROOM: 698104, + AquariaLocationNames.FINAL_BOSS_AREA_THIRD_BULB_IN_THE_TURTLE_ROOM: 698105, + AquariaLocationNames.FINAL_BOSS_AREA_TRANSTURTLE: 698215, } locations_final_boss = { - "Final Boss area, bulb in the boss third form room": 698106, + AquariaLocationNames.FINAL_BOSS_AREA_BULB_IN_THE_BOSS_THIRD_FORM_ROOM: 698106, } @@ -503,11 +812,12 @@ class AquariaLocations: **AquariaLocations.locations_openwater_tl, **AquariaLocations.locations_openwater_tr, **AquariaLocations.locations_openwater_tr_turtle, + **AquariaLocations.locations_openwater_tr_urns, **AquariaLocations.locations_openwater_bl, **AquariaLocations.locations_skeleton_path, **AquariaLocations.locations_skeleton_path_sc, **AquariaLocations.locations_arnassi, - **AquariaLocations.locations_arnassi_path, + **AquariaLocations.locations_arnassi_cave, **AquariaLocations.locations_arnassi_cave_transturtle, **AquariaLocations.locations_arnassi_crab_boss, **AquariaLocations.locations_sun_temple_l, @@ -519,6 +829,7 @@ class AquariaLocations: **AquariaLocations.locations_abyss_l, **AquariaLocations.locations_abyss_lb, **AquariaLocations.locations_abyss_r, + **AquariaLocations.locations_abyss_r_whale, **AquariaLocations.locations_abyss_r_transturtle, **AquariaLocations.locations_energy_temple_1, **AquariaLocations.locations_energy_temple_2, @@ -528,16 +839,20 @@ class AquariaLocations: **AquariaLocations.locations_energy_temple_altar, **AquariaLocations.locations_energy_temple_idol, **AquariaLocations.locations_mithalas_city, + **AquariaLocations.locations_mithalas_city_urns, **AquariaLocations.locations_mithalas_city_top_path, **AquariaLocations.locations_mithalas_city_fishpass, - **AquariaLocations.locations_cathedral_l, - **AquariaLocations.locations_cathedral_l_tube, - **AquariaLocations.locations_cathedral_l_sc, - **AquariaLocations.locations_cathedral_r, + **AquariaLocations.locations_mithalas_castle, + **AquariaLocations.locations_mithalas_castle_urns, + **AquariaLocations.locations_mithalas_castle_tube, + **AquariaLocations.locations_mithalas_castle_sc, + **AquariaLocations.locations_cathedral_top_start, + **AquariaLocations.locations_cathedral_top_start_urns, + **AquariaLocations.locations_cathedral_top_end, **AquariaLocations.locations_cathedral_underground, **AquariaLocations.locations_cathedral_boss, **AquariaLocations.locations_forest_tl, - **AquariaLocations.locations_forest_tl_fp, + **AquariaLocations.locations_forest_tl_verse_egg_room, **AquariaLocations.locations_forest_tr, **AquariaLocations.locations_forest_tr_fp, **AquariaLocations.locations_forest_bl, @@ -545,10 +860,11 @@ class AquariaLocations: **AquariaLocations.locations_forest_br, **AquariaLocations.locations_forest_boss, **AquariaLocations.locations_forest_boss_entrance, - **AquariaLocations.locations_forest_sprite_cave, - **AquariaLocations.locations_forest_sprite_cave_tube, + **AquariaLocations.locations_sprite_cave, + **AquariaLocations.locations_sprite_cave_tube, **AquariaLocations.locations_forest_fish_cave, **AquariaLocations.locations_home_water, + **AquariaLocations.locations_home_water_behind_rocks, **AquariaLocations.locations_home_water_transturtle, **AquariaLocations.locations_home_water_nautilus, **AquariaLocations.locations_body_l, @@ -565,9 +881,9 @@ class AquariaLocations: **AquariaLocations.locations_turtle_cave_bubble, **AquariaLocations.locations_veil_tr_r, **AquariaLocations.locations_veil_tr_l, - **AquariaLocations.locations_veil_bl, + **AquariaLocations.locations_veil_b, **AquariaLocations.locations_veil_b_sc, - **AquariaLocations.locations_veil_bl_fp, + **AquariaLocations.locations_veil_b_fp, **AquariaLocations.locations_veil_br, **AquariaLocations.locations_ice_cave, **AquariaLocations.locations_king_jellyfish_cave, diff --git a/worlds/aquaria/Options.py b/worlds/aquaria/Options.py index 8c0142debff0..c73c108a9544 100644 --- a/worlds/aquaria/Options.py +++ b/worlds/aquaria/Options.py @@ -15,7 +15,10 @@ class IngredientRandomizer(Choice): """ display_name = "Randomize Ingredients" option_off = 0 + alias_false = 0 option_common_ingredients = 1 + alias_on = 1 + alias_true = 1 option_all_ingredients = 2 default = 0 @@ -29,14 +32,43 @@ class TurtleRandomizer(Choice): """Randomize the transportation turtle.""" display_name = "Turtle Randomizer" option_none = 0 + alias_off = 0 + alias_false = 0 option_all = 1 option_all_except_final = 2 + alias_on = 2 + alias_true = 2 default = 2 -class EarlyEnergyForm(DefaultOnToggle): - """ Force the Energy Form to be in a location early in the game """ - display_name = "Early Energy Form" +class EarlyBindSong(Choice): + """ + Force the Bind song to be in a location early in the multiworld (or directly in your world if Early and Local is + selected). + """ + display_name = "Early Bind song" + option_off = 0 + alias_false = 0 + option_early = 1 + alias_on = 1 + alias_true = 1 + option_early_and_local = 2 + default = 1 + + +class EarlyEnergyForm(Choice): + """ + Force the Energy form to be in a location early in the multiworld (or directly in your world if Early and Local is + selected). + """ + display_name = "Early Energy form" + option_off = 0 + alias_false = 0 + option_early = 1 + alias_on = 1 + alias_true = 1 + option_early_and_local = 2 + default = 1 class AquarianTranslation(Toggle): @@ -47,7 +79,7 @@ class AquarianTranslation(Toggle): class BigBossesToBeat(Range): """ The number of big bosses to beat before having access to the creator (the final boss). The big bosses are - "Fallen God", "Mithalan God", "Drunian God", "Sun God" and "The Golem". + "Fallen God", "Mithalan God", "Drunian God", "Lumerean God" and "The Golem". """ display_name = "Big bosses to beat" range_start = 0 @@ -104,7 +136,7 @@ class LightNeededToGetToDarkPlaces(DefaultOnToggle): display_name = "Light needed to get to dark places" -class BindSongNeededToGetUnderRockBulb(Toggle): +class BindSongNeededToGetUnderRockBulb(DefaultOnToggle): """ Make sure that the bind song can be acquired before having to obtain sing bulbs under rocks. """ @@ -121,13 +153,18 @@ class BlindGoal(Toggle): class UnconfineHomeWater(Choice): """ - Open the way out of the Home Water area so that Naija can go to open water and beyond without the bind song. + Open the way out of the Home Waters area so that Naija can go to open water and beyond without the bind song. + Note that if you turn this option off, it is recommended to turn on the Early Energy form and Early Bind Song + options. """ - display_name = "Unconfine Home Water Area" + display_name = "Unconfine Home Waters Area" option_off = 0 + alias_false = 0 option_via_energy_door = 1 option_via_transturtle = 2 option_via_both = 3 + alias_on = 3 + alias_true = 3 default = 0 @@ -142,6 +179,7 @@ class AquariaOptions(PerGameCommonOptions): big_bosses_to_beat: BigBossesToBeat turtle_randomizer: TurtleRandomizer early_energy_form: EarlyEnergyForm + early_bind_song: EarlyBindSong light_needed_to_get_to_dark_places: LightNeededToGetToDarkPlaces bind_song_needed_to_get_under_rock_bulb: BindSongNeededToGetUnderRockBulb unconfine_home_water: UnconfineHomeWater diff --git a/worlds/aquaria/Regions.py b/worlds/aquaria/Regions.py index 7a41e0d0c864..40170e0c3262 100755 --- a/worlds/aquaria/Regions.py +++ b/worlds/aquaria/Regions.py @@ -5,10 +5,10 @@ """ from typing import Dict, Optional -from BaseClasses import MultiWorld, Region, Entrance, ItemClassification, CollectionState -from .Items import AquariaItem -from .Locations import AquariaLocations, AquariaLocation -from .Options import AquariaOptions +from BaseClasses import MultiWorld, Region, Entrance, Item, ItemClassification, CollectionState +from .Items import AquariaItem, ItemNames +from .Locations import AquariaLocations, AquariaLocation, AquariaLocationNames +from .Options import AquariaOptions, UnconfineHomeWater from worlds.generic.Rules import add_rule, set_rule @@ -16,28 +16,28 @@ def _has_hot_soup(state: CollectionState, player: int) -> bool: """`player` in `state` has the hotsoup item""" - return state.has_any({"Hot soup", "Hot soup x 2"}, player) + return state.has_any({ItemNames.HOT_SOUP, ItemNames.HOT_SOUP_X_2}, player) def _has_tongue_cleared(state: CollectionState, player: int) -> bool: """`player` in `state` has the Body tongue cleared item""" - return state.has("Body tongue cleared", player) + return state.has(ItemNames.BODY_TONGUE_CLEARED, player) def _has_sun_crystal(state: CollectionState, player: int) -> bool: """`player` in `state` has the Sun crystal item""" - return state.has("Has sun crystal", player) and _has_bind_song(state, player) + return state.has(ItemNames.HAS_SUN_CRYSTAL, player) and _has_bind_song(state, player) def _has_li(state: CollectionState, player: int) -> bool: """`player` in `state` has Li in its team""" - return state.has("Li and Li song", player) + return state.has(ItemNames.LI_AND_LI_SONG, player) def _has_damaging_item(state: CollectionState, player: int) -> bool: """`player` in `state` has the shield song item""" - return state.has_any({"Energy form", "Nature form", "Beast form", "Li and Li song", "Baby Nautilus", - "Baby Piranha", "Baby Blaster"}, player) + return state.has_any({ItemNames.ENERGY_FORM, ItemNames.NATURE_FORM, ItemNames.BEAST_FORM, ItemNames.LI_AND_LI_SONG, + ItemNames.BABY_NAUTILUS, ItemNames.BABY_PIRANHA, ItemNames.BABY_BLASTER}, player) def _has_energy_attack_item(state: CollectionState, player: int) -> bool: @@ -47,22 +47,22 @@ def _has_energy_attack_item(state: CollectionState, player: int) -> bool: def _has_shield_song(state: CollectionState, player: int) -> bool: """`player` in `state` has the shield song item""" - return state.has("Shield song", player) + return state.has(ItemNames.SHIELD_SONG, player) def _has_bind_song(state: CollectionState, player: int) -> bool: """`player` in `state` has the bind song item""" - return state.has("Bind song", player) + return state.has(ItemNames.BIND_SONG, player) def _has_energy_form(state: CollectionState, player: int) -> bool: """`player` in `state` has the energy form item""" - return state.has("Energy form", player) + return state.has(ItemNames.ENERGY_FORM, player) def _has_beast_form(state: CollectionState, player: int) -> bool: """`player` in `state` has the beast form item""" - return state.has("Beast form", player) + return state.has(ItemNames.BEAST_FORM, player) def _has_beast_and_soup_form(state: CollectionState, player: int) -> bool: @@ -72,55 +72,61 @@ def _has_beast_and_soup_form(state: CollectionState, player: int) -> bool: def _has_beast_form_or_arnassi_armor(state: CollectionState, player: int) -> bool: """`player` in `state` has the beast form item""" - return _has_beast_form(state, player) or state.has("Arnassi Armor", player) + return _has_beast_form(state, player) or state.has(ItemNames.ARNASSI_ARMOR, player) def _has_nature_form(state: CollectionState, player: int) -> bool: """`player` in `state` has the nature form item""" - return state.has("Nature form", player) + return state.has(ItemNames.NATURE_FORM, player) def _has_sun_form(state: CollectionState, player: int) -> bool: """`player` in `state` has the sun form item""" - return state.has("Sun form", player) + return state.has(ItemNames.SUN_FORM, player) def _has_light(state: CollectionState, player: int) -> bool: """`player` in `state` has the light item""" - return state.has("Baby Dumbo", player) or _has_sun_form(state, player) + return state.has(ItemNames.BABY_DUMBO, player) or _has_sun_form(state, player) def _has_dual_form(state: CollectionState, player: int) -> bool: """`player` in `state` has the dual form item""" - return _has_li(state, player) and state.has("Dual form", player) + return _has_li(state, player) and state.has(ItemNames.DUAL_FORM, player) def _has_fish_form(state: CollectionState, player: int) -> bool: """`player` in `state` has the fish form item""" - return state.has("Fish form", player) + return state.has(ItemNames.FISH_FORM, player) def _has_spirit_form(state: CollectionState, player: int) -> bool: """`player` in `state` has the spirit form item""" - return state.has("Spirit form", player) + return state.has(ItemNames.SPIRIT_FORM, player) def _has_big_bosses(state: CollectionState, player: int) -> bool: """`player` in `state` has beated every big bosses""" - return state.has_all({"Fallen God beated", "Mithalan God beated", "Drunian God beated", - "Sun God beated", "The Golem beated"}, player) + return state.has_all({ItemNames.FALLEN_GOD_BEATED, ItemNames.MITHALAN_GOD_BEATED, ItemNames.DRUNIAN_GOD_BEATED, + ItemNames.LUMEREAN_GOD_BEATED, ItemNames.THE_GOLEM_BEATED}, player) def _has_mini_bosses(state: CollectionState, player: int) -> bool: """`player` in `state` has beated every big bosses""" - return state.has_all({"Nautilus Prime beated", "Blaster Peg Prime beated", "Mergog beated", - "Mithalan priests beated", "Octopus Prime beated", "Crabbius Maximus beated", - "Mantis Shrimp Prime beated", "King Jellyfish God Prime beated"}, player) + return state.has_all({ItemNames.NAUTILUS_PRIME_BEATED, ItemNames.BLASTER_PEG_PRIME_BEATED, ItemNames.MERGOG_BEATED, + ItemNames.MITHALAN_PRIESTS_BEATED, ItemNames.OCTOPUS_PRIME_BEATED, + ItemNames.CRABBIUS_MAXIMUS_BEATED, ItemNames.MANTIS_SHRIMP_PRIME_BEATED, + ItemNames.KING_JELLYFISH_GOD_PRIME_BEATED}, player) def _has_secrets(state: CollectionState, player: int) -> bool: - return state.has_all({"First secret obtained", "Second secret obtained", "Third secret obtained"}, player) + """The secrets have been acquired in the `state` of the `player`""" + return state.has_all({ItemNames.FIRST_SECRET_OBTAINED, ItemNames.SECOND_SECRET_OBTAINED, + ItemNames.THIRD_SECRET_OBTAINED}, player) +def _item_not_advancement(item: Item): + """The `item` is not an advancement item""" + return not item.advancement class AquariaRegions: """ @@ -130,6 +136,7 @@ class AquariaRegions: verse_cave_r: Region verse_cave_l: Region home_water: Region + home_water_behind_rocks: Region home_water_nautilus: Region home_water_transturtle: Region naija_home: Region @@ -138,33 +145,40 @@ class AquariaRegions: energy_temple_2: Region energy_temple_3: Region energy_temple_boss: Region + energy_temple_4: Region energy_temple_idol: Region energy_temple_blaster_room: Region energy_temple_altar: Region openwater_tl: Region openwater_tr: Region openwater_tr_turtle: Region + openwater_tr_urns: Region openwater_bl: Region openwater_br: Region skeleton_path: Region skeleton_path_sc: Region arnassi: Region arnassi_cave_transturtle: Region - arnassi_path: Region + arnassi_cave: Region arnassi_crab_boss: Region simon: Region mithalas_city: Region + mithalas_city_urns: Region mithalas_city_top_path: Region mithalas_city_fishpass: Region - cathedral_l: Region - cathedral_l_tube: Region - cathedral_l_sc: Region - cathedral_r: Region + mithalas_castle: Region + mithalas_castle_urns: Region + mithalas_castle_tube: Region + mithalas_castle_sc: Region + cathedral_top: Region + cathedral_top_start: Region + cathedral_top_start_urns: Region + cathedral_top_end: Region cathedral_underground: Region cathedral_boss_l: Region cathedral_boss_r: Region forest_tl: Region - forest_tl_fp: Region + forest_tl_verse_egg_room: Region forest_tr: Region forest_tr_fp: Region forest_bl: Region @@ -172,24 +186,26 @@ class AquariaRegions: forest_br: Region forest_boss: Region forest_boss_entrance: Region - forest_sprite_cave: Region - forest_sprite_cave_tube: Region + sprite_cave: Region + sprite_cave_tube: Region mermog_cave: Region mermog_boss: Region forest_fish_cave: Region veil_tl: Region veil_tl_fp: Region veil_tr_l: Region + veil_tr_l_fp: Region veil_tr_r: Region - veil_bl: Region + veil_b: Region veil_b_sc: Region - veil_bl_fp: Region + veil_b_fp: Region veil_br: Region octo_cave_t: Region octo_cave_b: Region turtle_cave: Region turtle_cave_bubble: Region sun_temple_l: Region + sun_temple_l_entrance: Region sun_temple_r: Region sun_temple_boss_path: Region sun_temple_boss: Region @@ -198,13 +214,16 @@ class AquariaRegions: abyss_r: Region abyss_r_transturtle: Region ice_cave: Region + frozen_feil: Region bubble_cave: Region bubble_cave_boss: Region king_jellyfish_cave: Region + abyss_r_whale: Region whale: Region first_secret: Region sunken_city_l: Region - sunken_city_r: Region + sunken_city_l_crates: Region + sunken_city_r_crates: Region sunken_city_boss: Region sunken_city_l_bedroom: Region body_c: Region @@ -250,11 +269,13 @@ def __create_home_water_area(self) -> None: AquariaLocations.locations_verse_cave_r) self.verse_cave_l = self.__add_region("Verse Cave left area", AquariaLocations.locations_verse_cave_l) - self.home_water = self.__add_region("Home Water", AquariaLocations.locations_home_water) - self.home_water_nautilus = self.__add_region("Home Water, Nautilus nest", + self.home_water = self.__add_region("Home Waters", AquariaLocations.locations_home_water) + self.home_water_nautilus = self.__add_region("Home Waters, Nautilus nest", AquariaLocations.locations_home_water_nautilus) - self.home_water_transturtle = self.__add_region("Home Water, turtle room", + self.home_water_transturtle = self.__add_region("Home Waters, turtle room", AquariaLocations.locations_home_water_transturtle) + self.home_water_behind_rocks = self.__add_region("Home Waters, behind rock", + AquariaLocations.locations_home_water_behind_rocks) self.naija_home = self.__add_region("Naija's Home", AquariaLocations.locations_naija_home) self.song_cave = self.__add_region("Song Cave", AquariaLocations.locations_song_cave) @@ -276,29 +297,32 @@ def __create_energy_temple(self) -> None: AquariaLocations.locations_energy_temple_idol) self.energy_temple_blaster_room = self.__add_region("Energy Temple blaster room", AquariaLocations.locations_energy_temple_blaster_room) + self.energy_temple_4 = self.__add_region("Energy Temple after boss path", None) def __create_openwater(self) -> None: """ Create the `openwater_*`, `skeleton_path`, `arnassi*` and `simon` regions """ - self.openwater_tl = self.__add_region("Open Water top left area", + self.openwater_tl = self.__add_region("Open Waters top left area", AquariaLocations.locations_openwater_tl) - self.openwater_tr = self.__add_region("Open Water top right area", + self.openwater_tr = self.__add_region("Open Waters top right area", AquariaLocations.locations_openwater_tr) - self.openwater_tr_turtle = self.__add_region("Open Water top right area, turtle room", + self.openwater_tr_turtle = self.__add_region("Open Waters top right area, turtle room", AquariaLocations.locations_openwater_tr_turtle) - self.openwater_bl = self.__add_region("Open Water bottom left area", + self.openwater_tr_urns = self.__add_region("Open Waters top right area, Mithalas entrance", + AquariaLocations.locations_openwater_tr_urns) + self.openwater_bl = self.__add_region("Open Waters bottom left area", AquariaLocations.locations_openwater_bl) - self.openwater_br = self.__add_region("Open Water bottom right area", None) - self.skeleton_path = self.__add_region("Open Water skeleton path", + self.openwater_br = self.__add_region("Open Waters bottom right area", None) + self.skeleton_path = self.__add_region("Open Waters skeleton path", AquariaLocations.locations_skeleton_path) - self.skeleton_path_sc = self.__add_region("Open Water skeleton path spirit crystal", + self.skeleton_path_sc = self.__add_region("Open Waters skeleton path spirit crystal", AquariaLocations.locations_skeleton_path_sc) self.arnassi = self.__add_region("Arnassi Ruins", AquariaLocations.locations_arnassi) - self.arnassi_path = self.__add_region("Arnassi Ruins, back entrance path", - AquariaLocations.locations_arnassi_path) - self.arnassi_cave_transturtle = self.__add_region("Arnassi Ruins, transturtle area", + self.arnassi_cave = self.__add_region("Arnassi Ruins cave", + AquariaLocations.locations_arnassi_cave) + self.arnassi_cave_transturtle = self.__add_region("Arnassi Ruins cave, transturtle area", AquariaLocations.locations_arnassi_cave_transturtle) self.arnassi_crab_boss = self.__add_region("Arnassi Ruins, Crabbius Maximus lair", AquariaLocations.locations_arnassi_crab_boss) @@ -309,22 +333,29 @@ def __create_mithalas(self) -> None: """ self.mithalas_city = self.__add_region("Mithalas City", AquariaLocations.locations_mithalas_city) + self.mithalas_city_urns = self.__add_region("Mithalas City urns", AquariaLocations.locations_mithalas_city_urns) self.mithalas_city_fishpass = self.__add_region("Mithalas City fish pass", AquariaLocations.locations_mithalas_city_fishpass) self.mithalas_city_top_path = self.__add_region("Mithalas City top path", AquariaLocations.locations_mithalas_city_top_path) - self.cathedral_l = self.__add_region("Mithalas castle", AquariaLocations.locations_cathedral_l) - self.cathedral_l_tube = self.__add_region("Mithalas castle, plant tube entrance", - AquariaLocations.locations_cathedral_l_tube) - self.cathedral_l_sc = self.__add_region("Mithalas castle spirit crystal", - AquariaLocations.locations_cathedral_l_sc) - self.cathedral_r = self.__add_region("Mithalas Cathedral", - AquariaLocations.locations_cathedral_r) + self.mithalas_castle = self.__add_region("Mithalas castle", AquariaLocations.locations_mithalas_castle) + self.mithalas_castle_urns = self.__add_region("Mithalas castle urns", + AquariaLocations.locations_mithalas_castle_urns) + self.mithalas_castle_tube = self.__add_region("Mithalas castle, plant tube entrance", + AquariaLocations.locations_mithalas_castle_tube) + self.mithalas_castle_sc = self.__add_region("Mithalas castle spirit crystal", + AquariaLocations.locations_mithalas_castle_sc) + self.cathedral_top_start = self.__add_region("Mithalas Cathedral start", + AquariaLocations.locations_cathedral_top_start) + self.cathedral_top_start_urns = self.__add_region("Mithalas Cathedral start urns", + AquariaLocations.locations_cathedral_top_start_urns) + self.cathedral_top_end = self.__add_region("Mithalas Cathedral end", + AquariaLocations.locations_cathedral_top_end) self.cathedral_underground = self.__add_region("Mithalas Cathedral underground", AquariaLocations.locations_cathedral_underground) - self.cathedral_boss_r = self.__add_region("Mithalas Cathedral, Mithalan God room", None) - self.cathedral_boss_l = self.__add_region("Mithalas Cathedral, after Mithalan God room", + self.cathedral_boss_l = self.__add_region("Mithalas Cathedral, after Mithalan God", AquariaLocations.locations_cathedral_boss) + self.cathedral_boss_r = self.__add_region("Mithalas Cathedral, before Mithalan God", None) def __create_forest(self) -> None: """ @@ -332,8 +363,8 @@ def __create_forest(self) -> None: """ self.forest_tl = self.__add_region("Kelp Forest top left area", AquariaLocations.locations_forest_tl) - self.forest_tl_fp = self.__add_region("Kelp Forest top left area fish pass", - AquariaLocations.locations_forest_tl_fp) + self.forest_tl_verse_egg_room = self.__add_region("Kelp Forest top left area fish pass", + AquariaLocations.locations_forest_tl_verse_egg_room) self.forest_tr = self.__add_region("Kelp Forest top right area", AquariaLocations.locations_forest_tr) self.forest_tr_fp = self.__add_region("Kelp Forest top right area fish pass", @@ -344,21 +375,21 @@ def __create_forest(self) -> None: AquariaLocations.locations_forest_bl_sc) self.forest_br = self.__add_region("Kelp Forest bottom right area", AquariaLocations.locations_forest_br) - self.forest_sprite_cave = self.__add_region("Kelp Forest spirit cave", - AquariaLocations.locations_forest_sprite_cave) - self.forest_sprite_cave_tube = self.__add_region("Kelp Forest spirit cave after the plant tube", - AquariaLocations.locations_forest_sprite_cave_tube) + self.sprite_cave = self.__add_region("Sprite cave", + AquariaLocations.locations_sprite_cave) + self.sprite_cave_tube = self.__add_region("Sprite cave after the plant tube", + AquariaLocations.locations_sprite_cave_tube) self.forest_boss = self.__add_region("Kelp Forest Drunian God room", AquariaLocations.locations_forest_boss) self.forest_boss_entrance = self.__add_region("Kelp Forest Drunian God room entrance", AquariaLocations.locations_forest_boss_entrance) - self.mermog_cave = self.__add_region("Kelp Forest Mermog cave", + self.mermog_cave = self.__add_region("Mermog cave", AquariaLocations.locations_mermog_cave) - self.mermog_boss = self.__add_region("Kelp Forest Mermog cave boss", + self.mermog_boss = self.__add_region("Mermog cave boss", AquariaLocations.locations_mermog_boss) self.forest_fish_cave = self.__add_region("Kelp Forest fish cave", AquariaLocations.locations_forest_fish_cave) - self.simon = self.__add_region("Kelp Forest, Simon's room", AquariaLocations.locations_simon) + self.simon = self.__add_region("Simon Says area", AquariaLocations.locations_simon) def __create_veil(self) -> None: """ @@ -373,18 +404,19 @@ def __create_veil(self) -> None: AquariaLocations.locations_turtle_cave_bubble) self.veil_tr_l = self.__add_region("The Veil top right area, left of temple", AquariaLocations.locations_veil_tr_l) + self.veil_tr_l_fp = self.__add_region("The Veil top right area, fish pass left of temple", None) self.veil_tr_r = self.__add_region("The Veil top right area, right of temple", AquariaLocations.locations_veil_tr_r) self.octo_cave_t = self.__add_region("Octopus Cave top entrance", AquariaLocations.locations_octo_cave_t) self.octo_cave_b = self.__add_region("Octopus Cave bottom entrance", AquariaLocations.locations_octo_cave_b) - self.veil_bl = self.__add_region("The Veil bottom left area", - AquariaLocations.locations_veil_bl) + self.veil_b = self.__add_region("The Veil bottom left area", + AquariaLocations.locations_veil_b) self.veil_b_sc = self.__add_region("The Veil bottom spirit crystal area", AquariaLocations.locations_veil_b_sc) - self.veil_bl_fp = self.__add_region("The Veil bottom left area, in the sunken ship", - AquariaLocations.locations_veil_bl_fp) + self.veil_b_fp = self.__add_region("The Veil bottom left area, in the sunken ship", + AquariaLocations.locations_veil_b_fp) self.veil_br = self.__add_region("The Veil bottom right area", AquariaLocations.locations_veil_br) @@ -394,6 +426,7 @@ def __create_sun_temple(self) -> None: """ self.sun_temple_l = self.__add_region("Sun Temple left area", AquariaLocations.locations_sun_temple_l) + self.sun_temple_l_entrance = self.__add_region("Sun Temple left area entrance", None) self.sun_temple_r = self.__add_region("Sun Temple right area", AquariaLocations.locations_sun_temple_r) self.sun_temple_boss_path = self.__add_region("Sun Temple before boss area", @@ -412,24 +445,29 @@ def __create_abyss(self) -> None: self.abyss_r = self.__add_region("Abyss right area", AquariaLocations.locations_abyss_r) self.abyss_r_transturtle = self.__add_region("Abyss right area, transturtle", AquariaLocations.locations_abyss_r_transturtle) - self.ice_cave = self.__add_region("Ice Cave", AquariaLocations.locations_ice_cave) + self.abyss_r_whale = self.__add_region("Abyss right area, outside the whale", + AquariaLocations.locations_abyss_r_whale) + self.ice_cave = self.__add_region("Ice Cavern", AquariaLocations.locations_ice_cave) + self.frozen_feil = self.__add_region("Frozen Veil", None) self.bubble_cave = self.__add_region("Bubble Cave", AquariaLocations.locations_bubble_cave) self.bubble_cave_boss = self.__add_region("Bubble Cave boss area", AquariaLocations.locations_bubble_cave_boss) self.king_jellyfish_cave = self.__add_region("Abyss left area, King jellyfish cave", AquariaLocations.locations_king_jellyfish_cave) self.whale = self.__add_region("Inside the whale", AquariaLocations.locations_whale) - self.first_secret = self.__add_region("First secret area", None) + self.first_secret = self.__add_region("First Secret area", None) def __create_sunken_city(self) -> None: """ Create the `sunken_city_*` regions """ - self.sunken_city_l = self.__add_region("Sunken City left area", - AquariaLocations.locations_sunken_city_l) + self.sunken_city_l = self.__add_region("Sunken City left area", None) + self.sunken_city_l_crates = self.__add_region("Sunken City left area", + AquariaLocations.locations_sunken_city_l) self.sunken_city_l_bedroom = self.__add_region("Sunken City left area, bedroom", AquariaLocations.locations_sunken_city_l_bedroom) - self.sunken_city_r = self.__add_region("Sunken City right area", - AquariaLocations.locations_sunken_city_r) + self.sunken_city_r = self.__add_region("Sunken City right area", None) + self.sunken_city_r_crates = self.__add_region("Sunken City right area crates", + AquariaLocations.locations_sunken_city_r) self.sunken_city_boss = self.__add_region("Sunken City boss area", AquariaLocations.locations_sunken_city_boss) @@ -454,249 +492,194 @@ def __create_body(self) -> None: AquariaLocations.locations_final_boss) self.final_boss_end = self.__add_region("The Body, final boss area", None) - def __connect_one_way_regions(self, source_name: str, destination_name: str, - source_region: Region, - destination_region: Region, rule=None) -> None: + def get_entrance_name(self, from_region: Region, to_region: Region): + """ + Return the name of an entrance between `from_region` and `to_region` + """ + return from_region.name + " to " + to_region.name + + def __connect_one_way_regions(self, source_region: Region, destination_region: Region, rule=None) -> None: """ Connect from the `source_region` to the `destination_region` """ - entrance = Entrance(source_region.player, source_name + " to " + destination_name, source_region) + entrance = Entrance(self.player, self.get_entrance_name(source_region, destination_region), source_region) source_region.exits.append(entrance) entrance.connect(destination_region) if rule is not None: set_rule(entrance, rule) - def __connect_regions(self, source_name: str, destination_name: str, - source_region: Region, + def __connect_regions(self, source_region: Region, destination_region: Region, rule=None) -> None: """ Connect the `source_region` and the `destination_region` (two-way) """ - self.__connect_one_way_regions(source_name, destination_name, source_region, destination_region, rule) - self.__connect_one_way_regions(destination_name, source_name, destination_region, source_region, rule) + self.__connect_one_way_regions(source_region, destination_region, rule) + self.__connect_one_way_regions(destination_region, source_region, rule) def __connect_home_water_regions(self) -> None: """ Connect entrances of the different regions around `home_water` """ - self.__connect_one_way_regions("Menu", "Verse Cave right area", - self.menu, self.verse_cave_r) - self.__connect_regions("Verse Cave left area", "Verse Cave right area", - self.verse_cave_l, self.verse_cave_r) - self.__connect_regions("Verse Cave", "Home Water", self.verse_cave_l, self.home_water) - self.__connect_regions("Home Water", "Haija's home", self.home_water, self.naija_home) - self.__connect_regions("Home Water", "Song Cave", self.home_water, self.song_cave) - self.__connect_regions("Home Water", "Home Water, nautilus nest", - self.home_water, self.home_water_nautilus, - lambda state: _has_energy_attack_item(state, self.player) and - _has_bind_song(state, self.player)) - self.__connect_regions("Home Water", "Home Water transturtle room", - self.home_water, self.home_water_transturtle) - self.__connect_regions("Home Water", "Energy Temple first area", - self.home_water, self.energy_temple_1, + self.__connect_one_way_regions(self.menu, self.verse_cave_r) + self.__connect_regions(self.verse_cave_l, self.verse_cave_r) + self.__connect_regions(self.verse_cave_l, self.home_water) + self.__connect_regions(self.home_water, self.naija_home) + self.__connect_regions(self.home_water, self.song_cave) + self.__connect_regions(self.home_water, self.home_water_behind_rocks, lambda state: _has_bind_song(state, self.player)) - self.__connect_regions("Home Water", "Energy Temple_altar", - self.home_water, self.energy_temple_altar, + self.__connect_regions(self.home_water_behind_rocks, self.home_water_nautilus, + lambda state: _has_energy_attack_item(state, self.player)) + self.__connect_regions(self.home_water, self.home_water_transturtle) + self.__connect_regions(self.home_water_behind_rocks, self.energy_temple_1) + self.__connect_regions(self.home_water_behind_rocks, self.energy_temple_altar, lambda state: _has_energy_attack_item(state, self.player) and _has_bind_song(state, self.player)) - self.__connect_regions("Energy Temple first area", "Energy Temple second area", - self.energy_temple_1, self.energy_temple_2, + self.__connect_regions(self.energy_temple_1, self.energy_temple_2, lambda state: _has_energy_form(state, self.player)) - self.__connect_regions("Energy Temple first area", "Energy Temple idol room", - self.energy_temple_1, self.energy_temple_idol, + self.__connect_regions(self.energy_temple_1, self.energy_temple_idol, lambda state: _has_fish_form(state, self.player)) - self.__connect_regions("Energy Temple idol room", "Energy Temple boss area", - self.energy_temple_idol, self.energy_temple_boss, + self.__connect_regions(self.energy_temple_idol, self.energy_temple_boss, lambda state: _has_energy_attack_item(state, self.player) and _has_fish_form(state, self.player)) - self.__connect_one_way_regions("Energy Temple first area", "Energy Temple boss area", - self.energy_temple_1, self.energy_temple_boss, - lambda state: _has_beast_form(state, self.player) and + self.__connect_one_way_regions(self.energy_temple_1, self.energy_temple_4, + lambda state: _has_beast_form(state, self.player)) + self.__connect_one_way_regions(self.energy_temple_4, self.energy_temple_1) + self.__connect_regions(self.energy_temple_4, self.energy_temple_boss, + lambda state: _has_energy_attack_item(state, self.player)) + self.__connect_regions(self.energy_temple_2, self.energy_temple_3) + self.__connect_one_way_regions(self.energy_temple_3, self.energy_temple_boss, + lambda state: _has_bind_song(state, self.player) and _has_energy_attack_item(state, self.player)) - self.__connect_one_way_regions("Energy Temple boss area", "Energy Temple first area", - self.energy_temple_boss, self.energy_temple_1, - lambda state: _has_energy_attack_item(state, self.player)) - self.__connect_regions("Energy Temple second area", "Energy Temple third area", - self.energy_temple_2, self.energy_temple_3, - lambda state: _has_energy_form(state, self.player)) - self.__connect_regions("Energy Temple boss area", "Energy Temple blaster room", - self.energy_temple_boss, self.energy_temple_blaster_room, - lambda state: _has_nature_form(state, self.player) and - _has_bind_song(state, self.player) and - _has_energy_attack_item(state, self.player)) - self.__connect_regions("Energy Temple first area", "Energy Temple blaster room", - self.energy_temple_1, self.energy_temple_blaster_room, - lambda state: _has_nature_form(state, self.player) and - _has_bind_song(state, self.player) and - _has_energy_attack_item(state, self.player) and - _has_beast_form(state, self.player)) - self.__connect_regions("Home Water", "Open Water top left area", - self.home_water, self.openwater_tl) + self.__connect_one_way_regions(self.energy_temple_4, self.energy_temple_blaster_room, + lambda state: _has_nature_form(state, self.player) and + _has_bind_song(state, self.player) and + _has_energy_attack_item(state, self.player)) + self.__connect_regions(self.home_water, self.openwater_tl) def __connect_open_water_regions(self) -> None: """ Connect entrances of the different regions around open water """ - self.__connect_regions("Open Water top left area", "Open Water top right area", - self.openwater_tl, self.openwater_tr) - self.__connect_regions("Open Water top left area", "Open Water bottom left area", - self.openwater_tl, self.openwater_bl) - self.__connect_regions("Open Water top left area", "forest bottom right area", - self.openwater_tl, self.forest_br) - self.__connect_regions("Open Water top right area", "Open Water top right area, turtle room", - self.openwater_tr, self.openwater_tr_turtle, - lambda state: _has_beast_form_or_arnassi_armor(state, self.player)) - self.__connect_regions("Open Water top right area", "Open Water bottom right area", - self.openwater_tr, self.openwater_br) - self.__connect_regions("Open Water top right area", "Mithalas City", - self.openwater_tr, self.mithalas_city) - self.__connect_regions("Open Water top right area", "Veil bottom left area", - self.openwater_tr, self.veil_bl) - self.__connect_one_way_regions("Open Water top right area", "Veil bottom right", - self.openwater_tr, self.veil_br, + self.__connect_regions(self.openwater_tl, self.openwater_tr) + self.__connect_regions(self.openwater_tl, self.openwater_bl) + self.__connect_regions(self.openwater_tl, self.forest_br) + self.__connect_one_way_regions(self.openwater_tr, self.openwater_tr_turtle, lambda state: _has_beast_form_or_arnassi_armor(state, self.player)) - self.__connect_one_way_regions("Veil bottom right", "Open Water top right area", - self.veil_br, self.openwater_tr) - self.__connect_regions("Open Water bottom left area", "Open Water bottom right area", - self.openwater_bl, self.openwater_br) - self.__connect_regions("Open Water bottom left area", "Skeleton path", - self.openwater_bl, self.skeleton_path) - self.__connect_regions("Abyss left area", "Open Water bottom left area", - self.abyss_l, self.openwater_bl) - self.__connect_regions("Skeleton path", "skeleton_path_sc", - self.skeleton_path, self.skeleton_path_sc, + self.__connect_one_way_regions(self.openwater_tr_turtle, self.openwater_tr) + self.__connect_one_way_regions(self.openwater_tr, self.openwater_tr_urns, + lambda state: _has_bind_song(state, self.player) or + _has_damaging_item(state, self.player)) + self.__connect_regions(self.openwater_tr, self.openwater_br) + self.__connect_regions(self.openwater_tr, self.mithalas_city) + self.__connect_regions(self.openwater_tr, self.veil_b) + self.__connect_one_way_regions(self.openwater_tr, self.veil_br, + lambda state: _has_beast_form_or_arnassi_armor(state, self.player)) + self.__connect_one_way_regions(self.veil_br, self.openwater_tr) + self.__connect_regions(self.openwater_bl, self.openwater_br) + self.__connect_regions(self.openwater_bl, self.skeleton_path) + self.__connect_regions(self.abyss_l, self.openwater_bl) + self.__connect_regions(self.skeleton_path, self.skeleton_path_sc, lambda state: _has_spirit_form(state, self.player)) - self.__connect_regions("Abyss right area", "Open Water bottom right area", - self.abyss_r, self.openwater_br) - self.__connect_one_way_regions("Open Water bottom right area", "Arnassi", - self.openwater_br, self.arnassi, + self.__connect_regions(self.abyss_r, self.openwater_br) + self.__connect_one_way_regions(self.openwater_br, self.arnassi, lambda state: _has_beast_form(state, self.player)) - self.__connect_one_way_regions("Arnassi", "Open Water bottom right area", - self.arnassi, self.openwater_br) - self.__connect_regions("Arnassi", "Arnassi path", - self.arnassi, self.arnassi_path) - self.__connect_regions("Arnassi ruins, transturtle area", "Arnassi path", - self.arnassi_cave_transturtle, self.arnassi_path, + self.__connect_one_way_regions(self.arnassi, self.openwater_br) + self.__connect_regions(self.arnassi, self.arnassi_cave) + self.__connect_regions(self.arnassi_cave_transturtle, self.arnassi_cave, lambda state: _has_fish_form(state, self.player)) - self.__connect_one_way_regions("Arnassi path", "Arnassi crab boss area", - self.arnassi_path, self.arnassi_crab_boss, + self.__connect_one_way_regions(self.arnassi_cave, self.arnassi_crab_boss, lambda state: _has_beast_form_or_arnassi_armor(state, self.player) and (_has_energy_attack_item(state, self.player) or _has_nature_form(state, self.player))) - self.__connect_one_way_regions("Arnassi crab boss area", "Arnassi path", - self.arnassi_crab_boss, self.arnassi_path) + self.__connect_one_way_regions(self.arnassi_crab_boss, self.arnassi_cave) def __connect_mithalas_regions(self) -> None: """ Connect entrances of the different regions around Mithalas """ - self.__connect_one_way_regions("Mithalas City", "Mithalas City top path", - self.mithalas_city, self.mithalas_city_top_path, + self.__connect_one_way_regions(self.mithalas_city, self.mithalas_city_urns, + lambda state: _has_damaging_item(state, self.player)) + self.__connect_one_way_regions(self.mithalas_city, self.mithalas_city_top_path, lambda state: _has_beast_form_or_arnassi_armor(state, self.player)) - self.__connect_one_way_regions("Mithalas City_top_path", "Mithalas City", - self.mithalas_city_top_path, self.mithalas_city) - self.__connect_regions("Mithalas City", "Mithalas City home with fishpass", - self.mithalas_city, self.mithalas_city_fishpass, + self.__connect_one_way_regions(self.mithalas_city_top_path, self.mithalas_city) + self.__connect_regions(self.mithalas_city, self.mithalas_city_fishpass, lambda state: _has_fish_form(state, self.player)) - self.__connect_regions("Mithalas City", "Mithalas castle", - self.mithalas_city, self.cathedral_l) - self.__connect_one_way_regions("Mithalas City top path", "Mithalas castle, flower tube", - self.mithalas_city_top_path, - self.cathedral_l_tube, + self.__connect_regions(self.mithalas_city, self.mithalas_castle) + self.__connect_one_way_regions(self.mithalas_city_top_path, + self.mithalas_castle_tube, lambda state: _has_nature_form(state, self.player) and _has_energy_attack_item(state, self.player)) - self.__connect_one_way_regions("Mithalas castle, flower tube area", "Mithalas City top path", - self.cathedral_l_tube, + self.__connect_one_way_regions(self.mithalas_castle_tube, self.mithalas_city_top_path, lambda state: _has_nature_form(state, self.player)) - self.__connect_one_way_regions("Mithalas castle flower tube area", "Mithalas castle, spirit crystals", - self.cathedral_l_tube, self.cathedral_l_sc, + self.__connect_one_way_regions(self.mithalas_castle_tube, self.mithalas_castle_sc, lambda state: _has_spirit_form(state, self.player)) - self.__connect_one_way_regions("Mithalas castle_flower tube area", "Mithalas castle", - self.cathedral_l_tube, self.cathedral_l, + self.__connect_one_way_regions(self.mithalas_castle_tube, self.mithalas_castle, lambda state: _has_spirit_form(state, self.player)) - self.__connect_regions("Mithalas castle", "Mithalas castle, spirit crystals", - self.cathedral_l, self.cathedral_l_sc, + self.__connect_one_way_regions(self.mithalas_castle, self.mithalas_castle_urns, + lambda state: _has_damaging_item(state, self.player)) + self.__connect_regions(self.mithalas_castle, self.mithalas_castle_sc, lambda state: _has_spirit_form(state, self.player)) - self.__connect_one_way_regions("Mithalas castle", "Cathedral boss right area", - self.cathedral_l, self.cathedral_boss_r, + self.__connect_one_way_regions(self.mithalas_castle, self.cathedral_boss_r, lambda state: _has_beast_form(state, self.player)) - self.__connect_one_way_regions("Cathedral boss left area", "Mithalas castle", - self.cathedral_boss_l, self.cathedral_l, + self.__connect_one_way_regions(self.cathedral_boss_l, self.mithalas_castle, lambda state: _has_beast_form(state, self.player)) - self.__connect_regions("Mithalas castle", "Mithalas Cathedral underground", - self.cathedral_l, self.cathedral_underground, + self.__connect_regions(self.mithalas_castle, self.cathedral_underground, lambda state: _has_beast_form(state, self.player)) - self.__connect_one_way_regions("Mithalas castle", "Mithalas Cathedral", - self.cathedral_l, self.cathedral_r, - lambda state: _has_bind_song(state, self.player) and - _has_energy_attack_item(state, self.player)) - self.__connect_one_way_regions("Mithalas Cathedral", "Mithalas Cathedral underground", - self.cathedral_r, self.cathedral_underground) - self.__connect_one_way_regions("Mithalas Cathedral underground", "Mithalas Cathedral", - self.cathedral_underground, self.cathedral_r, + self.__connect_one_way_regions(self.mithalas_castle, self.cathedral_top_start, + lambda state: _has_bind_song(state, self.player)) + self.__connect_one_way_regions(self.cathedral_top_start, self.cathedral_top_start_urns, + lambda state: _has_damaging_item(state, self.player)) + self.__connect_regions(self.cathedral_top_start, self.cathedral_top_end, + lambda state: _has_energy_attack_item(state, self.player)) + self.__connect_one_way_regions(self.cathedral_underground, self.cathedral_top_end, lambda state: _has_beast_form(state, self.player) and - _has_energy_attack_item(state, self.player)) - self.__connect_one_way_regions("Mithalas Cathedral underground", "Cathedral boss right area", - self.cathedral_underground, self.cathedral_boss_r) - self.__connect_one_way_regions("Cathedral boss right area", "Mithalas Cathedral underground", - self.cathedral_boss_r, self.cathedral_underground, + _has_damaging_item(state, self.player)) + self.__connect_one_way_regions(self.cathedral_top_end, self.cathedral_underground, + lambda state: _has_energy_attack_item(state, self.player) + ) + self.__connect_one_way_regions(self.cathedral_underground, self.cathedral_boss_r) + self.__connect_one_way_regions(self.cathedral_boss_r, self.cathedral_underground, lambda state: _has_beast_form(state, self.player)) - self.__connect_one_way_regions("Cathedral boss right area", "Cathedral boss left area", - self.cathedral_boss_r, self.cathedral_boss_l, + self.__connect_one_way_regions(self.cathedral_boss_r, self.cathedral_boss_l, lambda state: _has_bind_song(state, self.player) and _has_energy_attack_item(state, self.player)) - self.__connect_one_way_regions("Cathedral boss left area", "Cathedral boss right area", - self.cathedral_boss_l, self.cathedral_boss_r) + self.__connect_one_way_regions(self.cathedral_boss_l, self.cathedral_boss_r) def __connect_forest_regions(self) -> None: """ Connect entrances of the different regions around the Kelp Forest """ - self.__connect_regions("Forest bottom right", "Veil bottom left area", - self.forest_br, self.veil_bl) - self.__connect_regions("Forest bottom right", "Forest bottom left area", - self.forest_br, self.forest_bl) - self.__connect_one_way_regions("Forest bottom left area", "Forest bottom left area, spirit crystals", - self.forest_bl, self.forest_bl_sc, + self.__connect_regions(self.forest_br, self.veil_b) + self.__connect_regions(self.forest_br, self.forest_bl) + self.__connect_one_way_regions(self.forest_bl, self.forest_bl_sc, lambda state: _has_energy_attack_item(state, self.player) or _has_fish_form(state, self.player)) - self.__connect_one_way_regions("Forest bottom left area, spirit crystals", "Forest bottom left area", - self.forest_bl_sc, self.forest_bl) - self.__connect_regions("Forest bottom right", "Forest top right area", - self.forest_br, self.forest_tr) - self.__connect_regions("Forest bottom left area", "Forest fish cave", - self.forest_bl, self.forest_fish_cave) - self.__connect_regions("Forest bottom left area", "Forest top left area", - self.forest_bl, self.forest_tl) - self.__connect_regions("Forest bottom left area", "Forest boss entrance", - self.forest_bl, self.forest_boss_entrance, + self.__connect_one_way_regions(self.forest_bl_sc, self.forest_bl) + self.__connect_regions(self.forest_br, self.forest_tr) + self.__connect_regions(self.forest_bl, self.forest_fish_cave) + self.__connect_regions(self.forest_bl, self.forest_tl) + self.__connect_regions(self.forest_bl, self.forest_boss_entrance, lambda state: _has_nature_form(state, self.player)) - self.__connect_regions("Forest top left area", "Forest top left area, fish pass", - self.forest_tl, self.forest_tl_fp, - lambda state: _has_nature_form(state, self.player) and - _has_bind_song(state, self.player) and - _has_energy_attack_item(state, self.player) and - _has_fish_form(state, self.player)) - self.__connect_regions("Forest top left area", "Forest top right area", - self.forest_tl, self.forest_tr) - self.__connect_regions("Forest top left area", "Forest boss entrance", - self.forest_tl, self.forest_boss_entrance) - self.__connect_regions("Forest boss area", "Forest boss entrance", - self.forest_boss, self.forest_boss_entrance, - lambda state: _has_energy_attack_item(state, self.player)) - self.__connect_regions("Forest top right area", "Forest top right area fish pass", - self.forest_tr, self.forest_tr_fp, + self.__connect_one_way_regions(self.forest_tl, self.forest_tl_verse_egg_room, + lambda state: _has_nature_form(state, self.player) and + _has_bind_song(state, self.player) and + _has_energy_attack_item(state, self.player) and + _has_fish_form(state, self.player)) + self.__connect_one_way_regions(self.forest_tl_verse_egg_room, self.forest_tl, + lambda state: _has_fish_form(state, self.player)) + self.__connect_regions(self.forest_tl, self.forest_tr) + self.__connect_regions(self.forest_tl, self.forest_boss_entrance) + self.__connect_one_way_regions(self.forest_boss_entrance, self.forest_boss, + lambda state: _has_energy_attack_item(state, self.player)) + self.__connect_one_way_regions(self.forest_boss, self.forest_boss_entrance) + self.__connect_regions(self.forest_tr, self.forest_tr_fp, lambda state: _has_fish_form(state, self.player)) - self.__connect_regions("Forest top right area", "Forest sprite cave", - self.forest_tr, self.forest_sprite_cave) - self.__connect_regions("Forest sprite cave", "Forest sprite cave flower tube", - self.forest_sprite_cave, self.forest_sprite_cave_tube, + self.__connect_regions(self.forest_tr, self.sprite_cave) + self.__connect_regions(self.sprite_cave, self.sprite_cave_tube, lambda state: _has_nature_form(state, self.player)) - self.__connect_regions("Forest top right area", "Mermog cave", - self.forest_tr_fp, self.mermog_cave) - self.__connect_regions("Fermog cave", "Fermog boss", - self.mermog_cave, self.mermog_boss, + self.__connect_regions(self.forest_tr_fp, self.mermog_cave) + self.__connect_regions(self.mermog_cave, self.mermog_boss, lambda state: _has_beast_form(state, self.player) and _has_energy_attack_item(state, self.player)) @@ -704,113 +687,94 @@ def __connect_veil_regions(self) -> None: """ Connect entrances of the different regions around The Veil """ - self.__connect_regions("Veil bottom left area", "Veil bottom left area, fish pass", - self.veil_bl, self.veil_bl_fp, + self.__connect_regions(self.veil_b, self.veil_b_fp, lambda state: _has_fish_form(state, self.player) and - _has_bind_song(state, self.player) and - _has_damaging_item(state, self.player)) - self.__connect_regions("Veil bottom left area", "Veil bottom area spirit crystals path", - self.veil_bl, self.veil_b_sc, + _has_bind_song(state, self.player)) + self.__connect_regions(self.veil_b, self.veil_b_sc, lambda state: _has_spirit_form(state, self.player)) - self.__connect_regions("Veil bottom area spirit crystals path", "Veil bottom right", - self.veil_b_sc, self.veil_br, + self.__connect_regions(self.veil_b_sc, self.veil_br, lambda state: _has_spirit_form(state, self.player)) - self.__connect_regions("Veil bottom right", "Veil top left area", - self.veil_br, self.veil_tl) - self.__connect_regions("Veil top left area", "Veil_top left area, fish pass", - self.veil_tl, self.veil_tl_fp, + self.__connect_regions(self.veil_br, self.veil_tl) + self.__connect_regions(self.veil_tl, self.veil_tl_fp, lambda state: _has_fish_form(state, self.player)) - self.__connect_regions("Veil top left area", "Veil right of sun temple", - self.veil_tl, self.veil_tr_r) - self.__connect_regions("Veil top left area", "Turtle cave", - self.veil_tl, self.turtle_cave) - self.__connect_regions("Turtle cave", "Turtle cave Bubble Cliff", - self.turtle_cave, self.turtle_cave_bubble) - self.__connect_regions("Veil right of sun temple", "Sun Temple right area", - self.veil_tr_r, self.sun_temple_r) - self.__connect_one_way_regions("Sun Temple right area", "Sun Temple left area", - self.sun_temple_r, self.sun_temple_l, + self.__connect_regions(self.veil_tl, self.veil_tr_r) + self.__connect_regions(self.veil_tl, self.turtle_cave) + self.__connect_regions(self.turtle_cave, self.turtle_cave_bubble) + self.__connect_regions(self.veil_tr_r, self.sun_temple_r) + + self.__connect_one_way_regions(self.sun_temple_r, self.sun_temple_l_entrance, lambda state: _has_bind_song(state, self.player) or _has_light(state, self.player)) - self.__connect_one_way_regions("Sun Temple left area", "Sun Temple right area", - self.sun_temple_l, self.sun_temple_r, + self.__connect_one_way_regions(self.sun_temple_l_entrance, self.sun_temple_r, lambda state: _has_light(state, self.player)) - self.__connect_regions("Sun Temple left area", "Veil left of sun temple", - self.sun_temple_l, self.veil_tr_l) - self.__connect_regions("Sun Temple left area", "Sun Temple before boss area", - self.sun_temple_l, self.sun_temple_boss_path) - self.__connect_regions("Sun Temple before boss area", "Sun Temple boss area", - self.sun_temple_boss_path, self.sun_temple_boss, + self.__connect_regions(self.sun_temple_l_entrance, self.veil_tr_l) + self.__connect_regions(self.sun_temple_l, self.sun_temple_l_entrance) + self.__connect_one_way_regions(self.sun_temple_l, self.sun_temple_boss_path) + self.__connect_one_way_regions(self.sun_temple_boss_path, self.sun_temple_l) + self.__connect_regions(self.sun_temple_boss_path, self.sun_temple_boss, lambda state: _has_energy_attack_item(state, self.player)) - self.__connect_one_way_regions("Sun Temple boss area", "Veil left of sun temple", - self.sun_temple_boss, self.veil_tr_l) - self.__connect_regions("Veil left of sun temple", "Octo cave top path", - self.veil_tr_l, self.octo_cave_t, - lambda state: _has_fish_form(state, self.player) and - _has_sun_form(state, self.player) and - _has_beast_form(state, self.player) and - _has_energy_attack_item(state, self.player)) - self.__connect_regions("Veil left of sun temple", "Octo cave bottom path", - self.veil_tr_l, self.octo_cave_b, + self.__connect_one_way_regions(self.sun_temple_boss, self.veil_tr_l) + self.__connect_regions(self.veil_tr_l, self.veil_tr_l_fp, lambda state: _has_fish_form(state, self.player)) + self.__connect_one_way_regions(self.veil_tr_l_fp, self.octo_cave_t, + lambda state: _has_sun_form(state, self.player) and + _has_beast_form(state, self.player) and + _has_energy_attack_item(state, self.player)) + self.__connect_one_way_regions(self.octo_cave_t, self.veil_tr_l_fp) + self.__connect_regions(self.veil_tr_l_fp, self.octo_cave_b) def __connect_abyss_regions(self) -> None: """ Connect entrances of the different regions around The Abyss """ - self.__connect_regions("Abyss left area", "Abyss bottom of left area", - self.abyss_l, self.abyss_lb, + self.__connect_regions(self.abyss_l, self.abyss_lb, lambda state: _has_nature_form(state, self.player)) - self.__connect_regions("Abyss left bottom area", "Sunken City right area", - self.abyss_lb, self.sunken_city_r, + self.__connect_regions(self.abyss_lb, self.sunken_city_r, lambda state: _has_li(state, self.player)) - self.__connect_one_way_regions("Abyss left bottom area", "Body center area", - self.abyss_lb, self.body_c, + self.__connect_one_way_regions(self.abyss_lb, self.body_c, lambda state: _has_tongue_cleared(state, self.player)) - self.__connect_one_way_regions("Body center area", "Abyss left bottom area", - self.body_c, self.abyss_lb) - self.__connect_regions("Abyss left area", "King jellyfish cave", - self.abyss_l, self.king_jellyfish_cave, - lambda state: (_has_energy_form(state, self.player) and - _has_beast_form(state, self.player)) or - _has_dual_form(state, self.player)) - self.__connect_regions("Abyss left area", "Abyss right area", - self.abyss_l, self.abyss_r) - self.__connect_regions("Abyss right area", "Abyss right area, transturtle", - self.abyss_r, self.abyss_r_transturtle) - self.__connect_regions("Abyss right area", "Inside the whale", - self.abyss_r, self.whale, + self.__connect_one_way_regions(self.body_c, self.abyss_lb) + self.__connect_one_way_regions(self.abyss_l, self.king_jellyfish_cave, + lambda state: _has_dual_form(state, self.player) or + (_has_energy_form(state, self.player) and + _has_beast_form(state, self.player))) + self.__connect_one_way_regions(self.king_jellyfish_cave, self.abyss_l) + self.__connect_regions(self.abyss_l, self.abyss_r) + self.__connect_regions(self.abyss_r, self.abyss_r_whale, lambda state: _has_spirit_form(state, self.player) and _has_sun_form(state, self.player)) - self.__connect_regions("Abyss right area", "First secret area", - self.abyss_r, self.first_secret, + self.__connect_regions(self.abyss_r_whale, self.whale) + self.__connect_regions(self.abyss_r, self.abyss_r_transturtle) + self.__connect_regions(self.abyss_r, self.first_secret, lambda state: _has_spirit_form(state, self.player) and _has_sun_form(state, self.player) and _has_bind_song(state, self.player) and _has_energy_attack_item(state, self.player)) - self.__connect_regions("Abyss right area", "Ice Cave", - self.abyss_r, self.ice_cave, + self.__connect_regions(self.abyss_r, self.ice_cave, lambda state: _has_spirit_form(state, self.player)) - self.__connect_regions("Ice cave", "Bubble Cave", - self.ice_cave, self.bubble_cave, - lambda state: _has_beast_form(state, self.player) or - _has_hot_soup(state, self.player)) - self.__connect_regions("Bubble Cave boss area", "Bubble Cave", - self.bubble_cave, self.bubble_cave_boss, - lambda state: _has_nature_form(state, self.player) and _has_bind_song(state, self.player) - ) + self.__connect_regions(self.ice_cave, self.frozen_feil) + self.__connect_one_way_regions(self.frozen_feil, self.bubble_cave, + lambda state: _has_beast_form(state, self.player) or + _has_hot_soup(state, self.player)) + self.__connect_one_way_regions(self.bubble_cave, self.frozen_feil) + self.__connect_one_way_regions(self.bubble_cave, self.bubble_cave_boss, + lambda state: _has_nature_form(state, self.player) and + _has_bind_song(state, self.player) + ) + self.__connect_one_way_regions(self.bubble_cave_boss, self.bubble_cave) def __connect_sunken_city_regions(self) -> None: """ Connect entrances of the different regions around The Sunken City """ - self.__connect_regions("Sunken City right area", "Sunken City left area", - self.sunken_city_r, self.sunken_city_l) - self.__connect_regions("Sunken City left area", "Sunken City bedroom", - self.sunken_city_l, self.sunken_city_l_bedroom, + self.__connect_regions(self.sunken_city_r, self.sunken_city_l) + self.__connect_one_way_regions(self.sunken_city_r, self.sunken_city_r_crates, + lambda state: _has_energy_attack_item(state, self.player)) + self.__connect_regions(self.sunken_city_l, self.sunken_city_l_bedroom, lambda state: _has_spirit_form(state, self.player)) - self.__connect_regions("Sunken City left area", "Sunken City boss area", - self.sunken_city_l, self.sunken_city_boss, + self.__connect_one_way_regions(self.sunken_city_l, self.sunken_city_l_crates, + lambda state: _has_energy_attack_item(state, self.player)) + self.__connect_regions(self.sunken_city_l, self.sunken_city_boss, lambda state: _has_beast_form(state, self.player) and _has_sun_form(state, self.player) and _has_energy_attack_item(state, self.player) and @@ -820,62 +784,55 @@ def __connect_body_regions(self) -> None: """ Connect entrances of the different regions around The Body """ - self.__connect_regions("Body center area", "Body left area", - self.body_c, self.body_l, - lambda state: _has_energy_form(state, self.player)) - self.__connect_regions("Body center area", "Body right area top path", - self.body_c, self.body_rt) - self.__connect_regions("Body center area", "Body right area bottom path", - self.body_c, self.body_rb, - lambda state: _has_energy_form(state, self.player)) - self.__connect_regions("Body center area", "Body bottom area", - self.body_c, self.body_b, + self.__connect_one_way_regions(self.body_c, self.body_l, + lambda state: _has_energy_form(state, self.player)) + self.__connect_one_way_regions(self.body_l, self.body_c) + self.__connect_regions(self.body_c, self.body_rt) + self.__connect_one_way_regions(self.body_c, self.body_rb, + lambda state: _has_energy_form(state, self.player)) + self.__connect_one_way_regions(self.body_rb, self.body_c) + self.__connect_regions(self.body_c, self.body_b, lambda state: _has_dual_form(state, self.player)) - self.__connect_regions("Body bottom area", "Final Boss area", - self.body_b, self.final_boss_loby, + self.__connect_regions(self.body_b, self.final_boss_loby, lambda state: _has_dual_form(state, self.player)) - self.__connect_regions("Before Final Boss", "Final Boss tube", - self.final_boss_loby, self.final_boss_tube, + self.__connect_regions(self.final_boss_loby, self.final_boss_tube, lambda state: _has_nature_form(state, self.player)) - self.__connect_one_way_regions("Before Final Boss", "Final Boss", - self.final_boss_loby, self.final_boss, + self.__connect_one_way_regions(self.final_boss_loby, self.final_boss, lambda state: _has_energy_form(state, self.player) and _has_dual_form(state, self.player) and _has_sun_form(state, self.player) and _has_bind_song(state, self.player)) - self.__connect_one_way_regions("final boss third form area", "final boss end", - self.final_boss, self.final_boss_end) + self.__connect_one_way_regions(self.final_boss, self.final_boss_end) - def __connect_transturtle(self, item_source: str, item_target: str, region_source: Region, - region_target: Region) -> None: + def __connect_transturtle(self, item_target: str, region_source: Region, region_target: Region) -> None: """Connect a single transturtle to another one""" - if item_source != item_target: - self.__connect_one_way_regions(item_source, item_target, region_source, region_target, + if region_source != region_target: + self.__connect_one_way_regions(region_source, region_target, lambda state: state.has(item_target, self.player)) - def _connect_transturtle_to_other(self, item: str, region: Region) -> None: + def _connect_transturtle_to_other(self, region: Region) -> None: """Connect a single transturtle to all others""" - self.__connect_transturtle(item, "Transturtle Veil top left", region, self.veil_tl) - self.__connect_transturtle(item, "Transturtle Veil top right", region, self.veil_tr_l) - self.__connect_transturtle(item, "Transturtle Open Water top right", region, self.openwater_tr_turtle) - self.__connect_transturtle(item, "Transturtle Forest bottom left", region, self.forest_bl) - self.__connect_transturtle(item, "Transturtle Home Water", region, self.home_water_transturtle) - self.__connect_transturtle(item, "Transturtle Abyss right", region, self.abyss_r_transturtle) - self.__connect_transturtle(item, "Transturtle Final Boss", region, self.final_boss_tube) - self.__connect_transturtle(item, "Transturtle Simon Says", region, self.simon) - self.__connect_transturtle(item, "Transturtle Arnassi Ruins", region, self.arnassi_cave_transturtle) + self.__connect_transturtle(ItemNames.TRANSTURTLE_VEIL_TOP_LEFT, region, self.veil_tl) + self.__connect_transturtle(ItemNames.TRANSTURTLE_VEIL_TOP_RIGHT, region, self.veil_tr_l) + self.__connect_transturtle(ItemNames.TRANSTURTLE_OPEN_WATERS, region, self.openwater_tr_turtle) + self.__connect_transturtle(ItemNames.TRANSTURTLE_KELP_FOREST, region, self.forest_bl) + self.__connect_transturtle(ItemNames.TRANSTURTLE_HOME_WATERS, region, self.home_water_transturtle) + self.__connect_transturtle(ItemNames.TRANSTURTLE_ABYSS, region, self.abyss_r_transturtle) + self.__connect_transturtle(ItemNames.TRANSTURTLE_BODY, region, self.final_boss_tube) + self.__connect_transturtle(ItemNames.TRANSTURTLE_SIMON_SAYS, region, self.simon) + self.__connect_transturtle(ItemNames.TRANSTURTLE_ARNASSI_RUINS, region, self.arnassi_cave_transturtle) def __connect_transturtles(self) -> None: """Connect every transturtle with others""" - self._connect_transturtle_to_other("Transturtle Veil top left", self.veil_tl) - self._connect_transturtle_to_other("Transturtle Veil top right", self.veil_tr_l) - self._connect_transturtle_to_other("Transturtle Open Water top right", self.openwater_tr_turtle) - self._connect_transturtle_to_other("Transturtle Forest bottom left", self.forest_bl) - self._connect_transturtle_to_other("Transturtle Home Water", self.home_water_transturtle) - self._connect_transturtle_to_other("Transturtle Abyss right", self.abyss_r_transturtle) - self._connect_transturtle_to_other("Transturtle Final Boss", self.final_boss_tube) - self._connect_transturtle_to_other("Transturtle Simon Says", self.simon) - self._connect_transturtle_to_other("Transturtle Arnassi Ruins", self.arnassi_cave_transturtle) + self._connect_transturtle_to_other(self.veil_tl) + self._connect_transturtle_to_other(self.veil_tr_l) + self._connect_transturtle_to_other(self.openwater_tr_turtle) + self._connect_transturtle_to_other(self.forest_bl) + self._connect_transturtle_to_other(self.home_water_transturtle) + self._connect_transturtle_to_other(self.abyss_r_transturtle) + self._connect_transturtle_to_other(self.final_boss_tube) + self._connect_transturtle_to_other(self.simon) + self._connect_transturtle_to_other(self.arnassi_cave_transturtle) def connect_regions(self) -> None: """ @@ -910,20 +867,20 @@ def __add_event_big_bosses(self) -> None: Add every bit bosses (other than the creator) events to the `world` """ self.__add_event_location(self.energy_temple_boss, - "Beating Fallen God", - "Fallen God beated") + AquariaLocationNames.BEATING_FALLEN_GOD, + ItemNames.FALLEN_GOD_BEATED) self.__add_event_location(self.cathedral_boss_l, - "Beating Mithalan God", - "Mithalan God beated") + AquariaLocationNames.BEATING_MITHALAN_GOD, + ItemNames.MITHALAN_GOD_BEATED) self.__add_event_location(self.forest_boss, - "Beating Drunian God", - "Drunian God beated") + AquariaLocationNames.BEATING_DRUNIAN_GOD, + ItemNames.DRUNIAN_GOD_BEATED) self.__add_event_location(self.sun_temple_boss, - "Beating Sun God", - "Sun God beated") + AquariaLocationNames.BEATING_LUMEREAN_GOD, + ItemNames.LUMEREAN_GOD_BEATED) self.__add_event_location(self.sunken_city_boss, - "Beating the Golem", - "The Golem beated") + AquariaLocationNames.BEATING_THE_GOLEM, + ItemNames.THE_GOLEM_BEATED) def __add_event_mini_bosses(self) -> None: """ @@ -931,43 +888,44 @@ def __add_event_mini_bosses(self) -> None: events to the `world` """ self.__add_event_location(self.home_water_nautilus, - "Beating Nautilus Prime", - "Nautilus Prime beated") + AquariaLocationNames.BEATING_NAUTILUS_PRIME, + ItemNames.NAUTILUS_PRIME_BEATED) self.__add_event_location(self.energy_temple_blaster_room, - "Beating Blaster Peg Prime", - "Blaster Peg Prime beated") + AquariaLocationNames.BEATING_BLASTER_PEG_PRIME, + ItemNames.BLASTER_PEG_PRIME_BEATED) self.__add_event_location(self.mermog_boss, - "Beating Mergog", - "Mergog beated") - self.__add_event_location(self.cathedral_l_tube, - "Beating Mithalan priests", - "Mithalan priests beated") + AquariaLocationNames.BEATING_MERGOG, + ItemNames.MERGOG_BEATED) + self.__add_event_location(self.mithalas_castle_tube, + AquariaLocationNames.BEATING_MITHALAN_PRIESTS, + ItemNames.MITHALAN_PRIESTS_BEATED) self.__add_event_location(self.octo_cave_t, - "Beating Octopus Prime", - "Octopus Prime beated") + AquariaLocationNames.BEATING_OCTOPUS_PRIME, + ItemNames.OCTOPUS_PRIME_BEATED) self.__add_event_location(self.arnassi_crab_boss, - "Beating Crabbius Maximus", - "Crabbius Maximus beated") + AquariaLocationNames.BEATING_CRABBIUS_MAXIMUS, + ItemNames.CRABBIUS_MAXIMUS_BEATED) self.__add_event_location(self.bubble_cave_boss, - "Beating Mantis Shrimp Prime", - "Mantis Shrimp Prime beated") + AquariaLocationNames.BEATING_MANTIS_SHRIMP_PRIME, + ItemNames.MANTIS_SHRIMP_PRIME_BEATED) self.__add_event_location(self.king_jellyfish_cave, - "Beating King Jellyfish God Prime", - "King Jellyfish God Prime beated") + AquariaLocationNames.BEATING_KING_JELLYFISH_GOD_PRIME, + ItemNames.KING_JELLYFISH_GOD_PRIME_BEATED) def __add_event_secrets(self) -> None: """ Add secrets events to the `world` """ - self.__add_event_location(self.first_secret, # Doit ajouter une région pour le "first secret" - "First secret", - "First secret obtained") + self.__add_event_location(self.first_secret, + # Doit ajouter une région pour le AquariaLocationNames.FIRST_SECRET + AquariaLocationNames.FIRST_SECRET, + ItemNames.FIRST_SECRET_OBTAINED) self.__add_event_location(self.mithalas_city, - "Second secret", - "Second secret obtained") + AquariaLocationNames.SECOND_SECRET, + ItemNames.SECOND_SECRET_OBTAINED) self.__add_event_location(self.sun_temple_l, - "Third secret", - "Third secret obtained") + AquariaLocationNames.THIRD_SECRET, + ItemNames.THIRD_SECRET_OBTAINED) def add_event_locations(self) -> None: """ @@ -977,287 +935,236 @@ def add_event_locations(self) -> None: self.__add_event_big_bosses() self.__add_event_secrets() self.__add_event_location(self.sunken_city_boss, - "Sunken City cleared", - "Body tongue cleared") + AquariaLocationNames.SUNKEN_CITY_CLEARED, + ItemNames.BODY_TONGUE_CLEARED) self.__add_event_location(self.sun_temple_r, - "Sun Crystal", - "Has sun crystal") - self.__add_event_location(self.final_boss_end, "Objective complete", - "Victory") - - def __adjusting_urns_rules(self) -> None: - """Since Urns need to be broken, add a damaging item to rules""" - add_rule(self.multiworld.get_location("Open Water top right area, first urn in the Mithalas exit", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule( - self.multiworld.get_location("Open Water top right area, second urn in the Mithalas exit", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Open Water top right area, third urn in the Mithalas exit", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Mithalas City, first urn in one of the homes", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Mithalas City, second urn in one of the homes", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Mithalas City, first urn in the city reserve", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Mithalas City, second urn in the city reserve", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Mithalas City, third urn in the city reserve", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Mithalas City, urn in the Castle flower tube entrance", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Mithalas City Castle, urn in the bedroom", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Mithalas City Castle, first urn of the single lamp path", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Mithalas City Castle, second urn of the single lamp path", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Mithalas City Castle, urn in the bottom room", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Mithalas City Castle, first urn on the entrance path", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Mithalas City Castle, second urn on the entrance path", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Mithalas City, urn inside a home fish pass", self.player), - lambda state: _has_damaging_item(state, self.player)) - - def __adjusting_crates_rules(self) -> None: - """Since Crate need to be broken, add a damaging item to rules""" - add_rule(self.multiworld.get_location("Sunken City right area, crate close to the save crystal", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Sunken City right area, crate in the left bottom room", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Sunken City left area, crate in the little pipe room", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Sunken City left area, crate close to the save crystal", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Sunken City left area, crate before the bedroom", self.player), - lambda state: _has_damaging_item(state, self.player)) + AquariaLocationNames.SUN_CRYSTAL, + ItemNames.HAS_SUN_CRYSTAL) + self.__add_event_location(self.final_boss_end, AquariaLocationNames.OBJECTIVE_COMPLETE, + ItemNames.VICTORY) def __adjusting_soup_rules(self) -> None: """ Modify rules for location that need soup """ - add_rule(self.multiworld.get_location("Turtle cave, Urchin Costume", self.player), + add_rule(self.multiworld.get_location(AquariaLocationNames.TURTLE_CAVE_URCHIN_COSTUME, self.player), lambda state: _has_hot_soup(state, self.player)) - add_rule(self.multiworld.get_location("The Veil top right area, bulb at the top of the waterfall", self.player), - lambda state: _has_beast_and_soup_form(state, self.player)) + add_rule(self.multiworld.get_location(AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_FIRST_CLIFF_BULB, self.player), + lambda state: _has_beast_and_soup_form(state, self.player) or + state.has(ItemNames.LUMEREAN_GOD_BEATED, self.player), combine="or") + add_rule(self.multiworld.get_location(AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_SECOND_CLIFF_BULB, self.player), + lambda state: _has_beast_and_soup_form(state, self.player) or + state.has(ItemNames.LUMEREAN_GOD_BEATED, self.player), combine="or") + add_rule( + self.multiworld.get_location(AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_BULB_AT_THE_TOP_OF_THE_WATERFALL, + self.player), + lambda state: _has_beast_and_soup_form(state, self.player)) def __adjusting_under_rock_location(self) -> None: """ Modify rules implying bind song needed for bulb under rocks """ - add_rule(self.multiworld.get_location("Home Water, bulb under the rock in the left path from the Verse Cave", - self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Verse Cave left area, bulb under the rock at the end of the path", - self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Naija's Home, bulb under the rock at the right of the main path", - self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Song Cave, bulb under the rock in the path to the singing statues", - self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Song Cave, bulb under the rock close to the song door", - self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Energy Temple second area, bulb under the rock", - self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Open Water top left area, bulb under the rock in the right path", - self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Open Water top left area, bulb under the rock in the left path", - self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Kelp Forest top right area, bulb under the rock in the right path", - self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("The Veil top left area, bulb under the rock in the top right path", - self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Abyss right area, bulb behind the rock in the whale room", + add_rule(self.multiworld.get_location( + AquariaLocationNames.HOME_WATERS_BULB_UNDER_THE_ROCK_IN_THE_LEFT_PATH_FROM_THE_VERSE_CAVE, + self.player), lambda state: _has_bind_song(state, self.player)) + add_rule(self.multiworld.get_location( + AquariaLocationNames.VERSE_CAVE_LEFT_AREA_BULB_UNDER_THE_ROCK_AT_THE_END_OF_THE_PATH, + self.player), lambda state: _has_bind_song(state, self.player)) + add_rule(self.multiworld.get_location( + AquariaLocationNames.NAIJA_S_HOME_BULB_UNDER_THE_ROCK_AT_THE_RIGHT_OF_THE_MAIN_PATH, + self.player), lambda state: _has_bind_song(state, self.player)) + add_rule(self.multiworld.get_location( + AquariaLocationNames.SONG_CAVE_BULB_UNDER_THE_ROCK_IN_THE_PATH_TO_THE_SINGING_STATUES, + self.player), lambda state: _has_bind_song(state, self.player)) + add_rule(self.multiworld.get_location(AquariaLocationNames.SONG_CAVE_BULB_UNDER_THE_ROCK_CLOSE_TO_THE_SONG_DOOR, self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Abyss right area, bulb in the middle path", + add_rule(self.multiworld.get_location(AquariaLocationNames.ENERGY_TEMPLE_SECOND_AREA_BULB_UNDER_THE_ROCK, self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("The Veil top left area, bulb under the rock in the top right path", + add_rule(self.multiworld.get_location( + AquariaLocationNames.OPEN_WATERS_TOP_LEFT_AREA_BULB_UNDER_THE_ROCK_IN_THE_RIGHT_PATH, + self.player), lambda state: _has_bind_song(state, self.player)) + add_rule(self.multiworld.get_location( + AquariaLocationNames.OPEN_WATERS_TOP_LEFT_AREA_BULB_UNDER_THE_ROCK_IN_THE_LEFT_PATH, + self.player), lambda state: _has_bind_song(state, self.player)) + add_rule(self.multiworld.get_location( + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BULB_UNDER_THE_ROCK_IN_THE_RIGHT_PATH, + self.player), lambda state: _has_bind_song(state, self.player)) + add_rule(self.multiworld.get_location( + AquariaLocationNames.THE_VEIL_TOP_LEFT_AREA_BULB_UNDER_THE_ROCK_IN_THE_TOP_RIGHT_PATH, + self.player), lambda state: _has_bind_song(state, self.player)) + add_rule( + self.multiworld.get_location(AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_BEHIND_THE_ROCK_IN_THE_WHALE_ROOM, + self.player), lambda state: _has_bind_song(state, self.player)) + add_rule(self.multiworld.get_location(AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_IN_THE_MIDDLE_PATH, self.player), lambda state: _has_bind_song(state, self.player)) + add_rule(self.multiworld.get_location( + AquariaLocationNames.THE_VEIL_TOP_LEFT_AREA_BULB_UNDER_THE_ROCK_IN_THE_TOP_RIGHT_PATH, + self.player), lambda state: _has_bind_song(state, self.player)) def __adjusting_light_in_dark_place_rules(self) -> None: - add_rule(self.multiworld.get_location("Kelp Forest top right area, Black Pearl", self.player), + add_rule(self.multiworld.get_location(AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BLACK_PEARL, self.player), lambda state: _has_light(state, self.player)) - add_rule(self.multiworld.get_location("Kelp Forest bottom right area, Odd Container", self.player), - lambda state: _has_light(state, self.player)) - add_rule(self.multiworld.get_entrance("Body center area to Abyss left bottom area", self.player), - lambda state: _has_light(state, self.player)) - add_rule(self.multiworld.get_entrance("Veil left of sun temple to Octo cave top path", self.player), + add_rule( + self.multiworld.get_location(AquariaLocationNames.KELP_FOREST_BOTTOM_RIGHT_AREA_ODD_CONTAINER, self.player), + lambda state: _has_light(state, self.player)) + add_rule(self.multiworld.get_entrance(self.get_entrance_name(self.sun_temple_l_entrance, self.sun_temple_l), + self.player), lambda state: _has_light(state, self.player) or + _has_sun_crystal(state, self.player)) + add_rule(self.multiworld.get_entrance(self.get_entrance_name(self.sun_temple_boss_path, self.sun_temple_l), + self.player), lambda state: _has_light(state, self.player) or + _has_sun_crystal(state, self.player)) + add_rule(self.multiworld.get_entrance(self.get_entrance_name(self.abyss_r_transturtle, self.abyss_r), + self.player), lambda state: _has_light(state, self.player)) - add_rule(self.multiworld.get_entrance("Open Water bottom right area to Abyss right area", self.player), + add_rule(self.multiworld.get_entrance(self.get_entrance_name(self.body_c, self.abyss_lb), self.player), lambda state: _has_light(state, self.player)) - add_rule(self.multiworld.get_entrance("Open Water bottom left area to Abyss left area", self.player), + add_rule(self.multiworld.get_entrance(self.get_entrance_name(self.openwater_br, self.abyss_r), self.player), lambda state: _has_light(state, self.player)) - add_rule(self.multiworld.get_entrance("Veil left of sun temple to Sun Temple left area", self.player), - lambda state: _has_light(state, self.player) or _has_sun_crystal(state, self.player)) - add_rule(self.multiworld.get_entrance("Abyss right area, transturtle to Abyss right area", self.player), + add_rule(self.multiworld.get_entrance(self.get_entrance_name(self.openwater_bl, self.abyss_l), self.player), lambda state: _has_light(state, self.player)) def __adjusting_manual_rules(self) -> None: - add_rule(self.multiworld.get_location("Mithalas Cathedral, Mithalan Dress", self.player), + add_rule(self.multiworld.get_location(AquariaLocationNames.MITHALAS_CATHEDRAL_MITHALAN_DRESS, self.player), lambda state: _has_beast_form(state, self.player)) - add_rule( - self.multiworld.get_location("Open Water bottom left area, bulb inside the lowest fish pass", self.player), + add_rule(self.multiworld.get_location( + AquariaLocationNames.OPEN_WATERS_BOTTOM_LEFT_AREA_BULB_INSIDE_THE_LOWEST_FISH_PASS, self.player), lambda state: _has_fish_form(state, self.player)) - add_rule(self.multiworld.get_location("Kelp Forest bottom left area, Walker Baby", self.player), - lambda state: _has_spirit_form(state, self.player)) add_rule( - self.multiworld.get_location("The Veil top left area, bulb hidden behind the blocking rock", self.player), + self.multiworld.get_location(AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_WALKER_BABY, self.player), + lambda state: _has_spirit_form(state, self.player)) + add_rule( + self.multiworld.get_location( + AquariaLocationNames.THE_VEIL_TOP_LEFT_AREA_BULB_HIDDEN_BEHIND_THE_BLOCKING_ROCK, self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Turtle cave, Turtle Egg", self.player), + add_rule(self.multiworld.get_location(AquariaLocationNames.TURTLE_CAVE_TURTLE_EGG, self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Abyss left area, bulb in the bottom fish pass", self.player), + add_rule(self.multiworld.get_location(AquariaLocationNames.ABYSS_LEFT_AREA_BULB_IN_THE_BOTTOM_FISH_PASS, + self.player), lambda state: _has_fish_form(state, self.player)) - add_rule(self.multiworld.get_location("Song Cave, Anemone Seed", self.player), + add_rule(self.multiworld.get_location(AquariaLocationNames.SONG_CAVE_ANEMONE_SEED, self.player), lambda state: _has_nature_form(state, self.player)) - add_rule(self.multiworld.get_location("Song Cave, Verse Egg", self.player), + add_rule(self.multiworld.get_location(AquariaLocationNames.SONG_CAVE_VERSE_EGG, self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Verse Cave right area, Big Seed", self.player), + add_rule(self.multiworld.get_location(AquariaLocationNames.VERSE_CAVE_RIGHT_AREA_BIG_SEED, self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Arnassi Ruins, Song Plant Spore", self.player), + add_rule(self.multiworld.get_location(AquariaLocationNames.ARNASSI_RUINS_SONG_PLANT_SPORE, self.player), lambda state: _has_beast_form_or_arnassi_armor(state, self.player)) - add_rule(self.multiworld.get_location("Energy Temple first area, bulb in the bottom room blocked by a rock", - self.player), lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Home Water, bulb in the bottom left room", self.player), - lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Home Water, bulb in the path below Nautilus Prime", self.player), - lambda state: _has_bind_song(state, self.player)) - add_rule(self.multiworld.get_location("Naija's Home, bulb after the energy door", self.player), - lambda state: _has_energy_attack_item(state, self.player)) - add_rule(self.multiworld.get_location("Abyss right area, bulb behind the rock in the whale room", self.player), - lambda state: _has_spirit_form(state, self.player) and - _has_sun_form(state, self.player)) - add_rule(self.multiworld.get_location("Arnassi Ruins, Arnassi Armor", self.player), + add_rule(self.multiworld.get_location( + AquariaLocationNames.ENERGY_TEMPLE_FIRST_AREA_BULB_IN_THE_BOTTOM_ROOM_BLOCKED_BY_A_ROCK, + self.player), lambda state: _has_bind_song(state, self.player)) + add_rule( + self.multiworld.get_location(AquariaLocationNames.NAIJA_S_HOME_BULB_AFTER_THE_ENERGY_DOOR, self.player), + lambda state: _has_energy_attack_item(state, self.player)) + add_rule(self.multiworld.get_location(AquariaLocationNames.ARNASSI_RUINS_ARNASSI_ARMOR, self.player), lambda state: _has_fish_form(state, self.player) or _has_beast_and_soup_form(state, self.player)) - add_rule(self.multiworld.get_location("Mithalas City, urn inside a home fish pass", self.player), - lambda state: _has_damaging_item(state, self.player)) - add_rule(self.multiworld.get_location("Mithalas City, urn in the Castle flower tube entrance", self.player), + add_rule( + self.multiworld.get_location(AquariaLocationNames.MITHALAS_CITY_URN_INSIDE_A_HOME_FISH_PASS, self.player), + lambda state: _has_damaging_item(state, self.player)) + add_rule(self.multiworld.get_location(AquariaLocationNames.MITHALAS_CITY_URN_IN_THE_CASTLE_FLOWER_TUBE_ENTRANCE, + self.player), lambda state: _has_damaging_item(state, self.player)) add_rule(self.multiworld.get_location( - "The Veil top right area, bulb in the middle of the wall jump cliff", self.player + AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_BULB_IN_THE_MIDDLE_OF_THE_WALL_JUMP_CLIFF, self.player ), lambda state: _has_beast_form_or_arnassi_armor(state, self.player)) - add_rule(self.multiworld.get_location("Kelp Forest top left area, Jelly Egg", self.player), + add_rule(self.multiworld.get_location(AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_JELLY_EGG, self.player), lambda state: _has_beast_form(state, self.player)) - add_rule(self.multiworld.get_location("Sun Worm path, first cliff bulb", self.player), + add_rule(self.multiworld.get_location(AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_FIRST_CLIFF_BULB, self.player), lambda state: state.has("Sun God beated", self.player)) - add_rule(self.multiworld.get_location("Sun Worm path, second cliff bulb", self.player), + add_rule(self.multiworld.get_location(AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_SECOND_CLIFF_BULB, self.player), lambda state: state.has("Sun God beated", self.player)) - add_rule(self.multiworld.get_location("The Body center area, breaking Li's cage", self.player), - lambda state: _has_tongue_cleared(state, self.player)) + add_rule( + self.multiworld.get_location(AquariaLocationNames.THE_BODY_CENTER_AREA_BREAKING_LI_S_CAGE, self.player), + lambda state: _has_tongue_cleared(state, self.player)) add_rule(self.multiworld.get_location( - "Open Water top right area, bulb in the small path before Mithalas", - self.player), lambda state: _has_bind_song(state, self.player) + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_SMALL_PATH_BEFORE_MITHALAS, + self.player), lambda state: _has_bind_song(state, self.player) ) def __no_progression_hard_or_hidden_location(self) -> None: - self.multiworld.get_location("Energy Temple boss area, Fallen God Tooth", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Mithalas boss area, beating Mithalan God", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Kelp Forest boss area, beating Drunian God", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Sun Temple boss area, beating Sun God", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Sunken City, bulb on top of the boss area", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Home Water, Nautilus Egg", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Energy Temple blaster room, Blaster Egg", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Mithalas City Castle, beating the Priests", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Mermog cave, Piranha Egg", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Octopus Cave, Dumbo Egg", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("King Jellyfish Cave, bulb in the right path from King Jelly", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("King Jellyfish Cave, Jellyfish Costume", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Final Boss area, bulb in the boss third form room", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Sun Worm path, first cliff bulb", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Sun Worm path, second cliff bulb", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("The Veil top right area, bulb at the top of the waterfall", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Bubble Cave, bulb in the left cave wall", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Bubble Cave, bulb in the right cave wall (behind the ice crystal)", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Bubble Cave, Verse Egg", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Kelp Forest bottom left area, bulb close to the spirit crystals", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Kelp Forest bottom left area, Walker Baby", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Sun Temple, Sun Key", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("The Body bottom area, Mutant Costume", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Sun Temple, bulb in the hidden room of the right part", - self.player).item_rule = \ - lambda item: not item.advancement - self.multiworld.get_location("Arnassi Ruins, Arnassi Armor", - self.player).item_rule = \ - lambda item: not item.advancement + self.multiworld.get_location(AquariaLocationNames.ENERGY_TEMPLE_BOSS_AREA_FALLEN_GOD_TOOTH, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.MITHALAS_BOSS_AREA_BEATING_MITHALAN_GOD, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.KELP_FOREST_BOSS_AREA_BEATING_DRUNIAN_GOD, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.SUN_TEMPLE_BOSS_AREA_BEATING_LUMEREAN_GOD, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.SUNKEN_CITY_BULB_ON_TOP_OF_THE_BOSS_AREA, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.HOME_WATERS_NAUTILUS_EGG, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.ENERGY_TEMPLE_BLASTER_ROOM_BLASTER_EGG, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.MITHALAS_CITY_CASTLE_BEATING_THE_PRIESTS, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.MERMOG_CAVE_PIRANHA_EGG, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.OCTOPUS_CAVE_DUMBO_EGG, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.KING_JELLYFISH_CAVE_BULB_IN_THE_RIGHT_PATH_FROM_KING_JELLY, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.KING_JELLYFISH_CAVE_JELLYFISH_COSTUME, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.FINAL_BOSS_AREA_BULB_IN_THE_BOSS_THIRD_FORM_ROOM, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_FIRST_CLIFF_BULB, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_SECOND_CLIFF_BULB, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_BULB_AT_THE_TOP_OF_THE_WATERFALL, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.BUBBLE_CAVE_BULB_IN_THE_LEFT_CAVE_WALL, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location( + AquariaLocationNames.BUBBLE_CAVE_BULB_IN_THE_RIGHT_CAVE_WALL_BEHIND_THE_ICE_CRYSTAL, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.BUBBLE_CAVE_VERSE_EGG, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location( + AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_BULB_CLOSE_TO_THE_SPIRIT_CRYSTALS, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_WALKER_BABY, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.SUN_TEMPLE_SUN_KEY, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.THE_BODY_BOTTOM_AREA_MUTANT_COSTUME, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.SUN_TEMPLE_BULB_IN_THE_HIDDEN_ROOM_OF_THE_RIGHT_PART, + self.player).item_rule = _item_not_advancement + self.multiworld.get_location(AquariaLocationNames.ARNASSI_RUINS_ARNASSI_ARMOR, + self.player).item_rule = _item_not_advancement def adjusting_rules(self, options: AquariaOptions) -> None: """ Modify rules for single location or optional rules """ - self.multiworld.get_entrance("Before Final Boss to Final Boss", self.player) - self.__adjusting_urns_rules() - self.__adjusting_crates_rules() - self.__adjusting_soup_rules() self.__adjusting_manual_rules() + self.__adjusting_soup_rules() if options.light_needed_to_get_to_dark_places: self.__adjusting_light_in_dark_place_rules() if options.bind_song_needed_to_get_under_rock_bulb: self.__adjusting_under_rock_location() if options.mini_bosses_to_beat.value > 0: - add_rule(self.multiworld.get_entrance("Before Final Boss to Final Boss", self.player), - lambda state: _has_mini_bosses(state, self.player)) + add_rule(self.multiworld.get_entrance(self.get_entrance_name(self.final_boss_loby, self.final_boss), + self.player), lambda state: _has_mini_bosses(state, self.player)) if options.big_bosses_to_beat.value > 0: - add_rule(self.multiworld.get_entrance("Before Final Boss to Final Boss", self.player), - lambda state: _has_big_bosses(state, self.player)) - if options.objective.value == 1: - add_rule(self.multiworld.get_entrance("Before Final Boss to Final Boss", self.player), - lambda state: _has_secrets(state, self.player)) - if options.unconfine_home_water.value in [0, 1]: - add_rule(self.multiworld.get_entrance("Home Water to Home Water transturtle room", self.player), - lambda state: _has_bind_song(state, self.player)) - if options.unconfine_home_water.value in [0, 2]: - add_rule(self.multiworld.get_entrance("Home Water to Open Water top left area", self.player), - lambda state: _has_bind_song(state, self.player) and _has_energy_attack_item(state, self.player)) - if options.early_energy_form: - self.multiworld.early_items[self.player]["Energy form"] = 1 - + add_rule(self.multiworld.get_entrance(self.get_entrance_name(self.final_boss_loby, self.final_boss), + self.player), lambda state: _has_big_bosses(state, self.player)) + if options.objective.value == options.objective.option_obtain_secrets_and_kill_the_creator: + add_rule(self.multiworld.get_entrance(self.get_entrance_name(self.final_boss_loby, self.final_boss), + self.player), lambda state: _has_secrets(state, self.player)) + if (options.unconfine_home_water.value == UnconfineHomeWater.option_via_energy_door or + options.unconfine_home_water.value == UnconfineHomeWater.option_off): + add_rule(self.multiworld.get_entrance(self.get_entrance_name(self.home_water, self.home_water_transturtle), + self.player), lambda state: _has_bind_song(state, self.player)) + if (options.unconfine_home_water.value == UnconfineHomeWater.option_via_transturtle or + options.unconfine_home_water.value == UnconfineHomeWater.option_off): + add_rule(self.multiworld.get_entrance(self.get_entrance_name(self.home_water, self.openwater_tl), + self.player), + lambda state: _has_bind_song(state, self.player) and + _has_energy_attack_item(state, self.player)) if options.no_progression_hard_or_hidden_locations: self.__no_progression_hard_or_hidden_location() @@ -1292,9 +1199,9 @@ def __add_open_water_regions_to_world(self) -> None: self.multiworld.regions.append(self.skeleton_path) self.multiworld.regions.append(self.skeleton_path_sc) self.multiworld.regions.append(self.arnassi) - self.multiworld.regions.append(self.arnassi_path) - self.multiworld.regions.append(self.arnassi_crab_boss) + self.multiworld.regions.append(self.arnassi_cave) self.multiworld.regions.append(self.arnassi_cave_transturtle) + self.multiworld.regions.append(self.arnassi_crab_boss) self.multiworld.regions.append(self.simon) def __add_mithalas_regions_to_world(self) -> None: @@ -1304,10 +1211,12 @@ def __add_mithalas_regions_to_world(self) -> None: self.multiworld.regions.append(self.mithalas_city) self.multiworld.regions.append(self.mithalas_city_top_path) self.multiworld.regions.append(self.mithalas_city_fishpass) - self.multiworld.regions.append(self.cathedral_l) - self.multiworld.regions.append(self.cathedral_l_tube) - self.multiworld.regions.append(self.cathedral_l_sc) - self.multiworld.regions.append(self.cathedral_r) + self.multiworld.regions.append(self.mithalas_castle) + self.multiworld.regions.append(self.mithalas_castle_tube) + self.multiworld.regions.append(self.mithalas_castle_sc) + self.multiworld.regions.append(self.cathedral_top_start) + self.multiworld.regions.append(self.cathedral_top_start_urns) + self.multiworld.regions.append(self.cathedral_top_end) self.multiworld.regions.append(self.cathedral_underground) self.multiworld.regions.append(self.cathedral_boss_l) self.multiworld.regions.append(self.cathedral_boss_r) @@ -1317,7 +1226,7 @@ def __add_forest_regions_to_world(self) -> None: Add every region around the kelp forest to the `world` """ self.multiworld.regions.append(self.forest_tl) - self.multiworld.regions.append(self.forest_tl_fp) + self.multiworld.regions.append(self.forest_tl_verse_egg_room) self.multiworld.regions.append(self.forest_tr) self.multiworld.regions.append(self.forest_tr_fp) self.multiworld.regions.append(self.forest_bl) @@ -1325,8 +1234,8 @@ def __add_forest_regions_to_world(self) -> None: self.multiworld.regions.append(self.forest_br) self.multiworld.regions.append(self.forest_boss) self.multiworld.regions.append(self.forest_boss_entrance) - self.multiworld.regions.append(self.forest_sprite_cave) - self.multiworld.regions.append(self.forest_sprite_cave_tube) + self.multiworld.regions.append(self.sprite_cave) + self.multiworld.regions.append(self.sprite_cave_tube) self.multiworld.regions.append(self.mermog_cave) self.multiworld.regions.append(self.mermog_boss) self.multiworld.regions.append(self.forest_fish_cave) @@ -1338,16 +1247,18 @@ def __add_veil_regions_to_world(self) -> None: self.multiworld.regions.append(self.veil_tl) self.multiworld.regions.append(self.veil_tl_fp) self.multiworld.regions.append(self.veil_tr_l) + self.multiworld.regions.append(self.veil_tr_l_fp) self.multiworld.regions.append(self.veil_tr_r) - self.multiworld.regions.append(self.veil_bl) + self.multiworld.regions.append(self.veil_b) self.multiworld.regions.append(self.veil_b_sc) - self.multiworld.regions.append(self.veil_bl_fp) + self.multiworld.regions.append(self.veil_b_fp) self.multiworld.regions.append(self.veil_br) self.multiworld.regions.append(self.octo_cave_t) self.multiworld.regions.append(self.octo_cave_b) self.multiworld.regions.append(self.turtle_cave) self.multiworld.regions.append(self.turtle_cave_bubble) self.multiworld.regions.append(self.sun_temple_l) + self.multiworld.regions.append(self.sun_temple_l_entrance) self.multiworld.regions.append(self.sun_temple_r) self.multiworld.regions.append(self.sun_temple_boss_path) self.multiworld.regions.append(self.sun_temple_boss) @@ -1359,6 +1270,7 @@ def __add_abyss_regions_to_world(self) -> None: self.multiworld.regions.append(self.abyss_l) self.multiworld.regions.append(self.abyss_lb) self.multiworld.regions.append(self.abyss_r) + self.multiworld.regions.append(self.abyss_r_whale) self.multiworld.regions.append(self.abyss_r_transturtle) self.multiworld.regions.append(self.ice_cave) self.multiworld.regions.append(self.bubble_cave) diff --git a/worlds/aquaria/__init__.py b/worlds/aquaria/__init__.py index f620bf6d7306..1f7b956bb34b 100644 --- a/worlds/aquaria/__init__.py +++ b/worlds/aquaria/__init__.py @@ -7,9 +7,10 @@ from typing import List, Dict, ClassVar, Any from worlds.AutoWorld import World, WebWorld from BaseClasses import Tutorial, MultiWorld, ItemClassification -from .Items import item_table, AquariaItem, ItemType, ItemGroup -from .Locations import location_table -from .Options import AquariaOptions +from .Items import item_table, AquariaItem, ItemType, ItemGroup, ItemNames +from .Locations import location_table, AquariaLocationNames +from .Options import (AquariaOptions, IngredientRandomizer, TurtleRandomizer, EarlyBindSong, EarlyEnergyForm, + UnconfineHomeWater, Objective) from .Regions import AquariaRegions @@ -65,15 +66,15 @@ class AquariaWorld(World): web: WebWorld = AquariaWeb() "The web page generation informations" - item_name_to_id: ClassVar[Dict[str, int]] =\ + item_name_to_id: ClassVar[Dict[str, int]] = \ {name: data.id for name, data in item_table.items()} "The name and associated ID of each item of the world" item_name_groups = { - "Damage": {"Energy form", "Nature form", "Beast form", - "Li and Li song", "Baby Nautilus", "Baby Piranha", - "Baby Blaster"}, - "Light": {"Sun form", "Baby Dumbo"} + "Damage": {ItemNames.ENERGY_FORM, ItemNames.NATURE_FORM, ItemNames.BEAST_FORM, + ItemNames.LI_AND_LI_SONG, ItemNames.BABY_NAUTILUS, ItemNames.BABY_PIRANHA, + ItemNames.BABY_BLASTER}, + "Light": {ItemNames.SUN_FORM, ItemNames.BABY_DUMBO} } """Grouping item make it easier to find them""" @@ -148,23 +149,32 @@ def get_filler_item_name(self): def create_items(self) -> None: """Create every item in the world""" precollected = [item.name for item in self.multiworld.precollected_items[self.player]] - if self.options.turtle_randomizer.value > 0: - if self.options.turtle_randomizer.value == 2: - self.__pre_fill_item("Transturtle Final Boss", "Final Boss area, Transturtle", precollected) + if self.options.turtle_randomizer.value != TurtleRandomizer.option_none: + if self.options.turtle_randomizer.value == TurtleRandomizer.option_all_except_final: + self.__pre_fill_item(ItemNames.TRANSTURTLE_BODY, AquariaLocationNames.FINAL_BOSS_AREA_TRANSTURTLE, + precollected) else: - self.__pre_fill_item("Transturtle Veil top left", "The Veil top left area, Transturtle", precollected) - self.__pre_fill_item("Transturtle Veil top right", "The Veil top right area, Transturtle", precollected) - self.__pre_fill_item("Transturtle Open Water top right", "Open Water top right area, Transturtle", + self.__pre_fill_item(ItemNames.TRANSTURTLE_VEIL_TOP_LEFT, + AquariaLocationNames.THE_VEIL_TOP_LEFT_AREA_TRANSTURTLE, precollected) + self.__pre_fill_item(ItemNames.TRANSTURTLE_VEIL_TOP_RIGHT, + AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_TRANSTURTLE, precollected) + self.__pre_fill_item(ItemNames.TRANSTURTLE_OPEN_WATERS, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_TRANSTURTLE, precollected) - self.__pre_fill_item("Transturtle Forest bottom left", "Kelp Forest bottom left area, Transturtle", + self.__pre_fill_item(ItemNames.TRANSTURTLE_KELP_FOREST, + AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_TRANSTURTLE, + precollected) + self.__pre_fill_item(ItemNames.TRANSTURTLE_HOME_WATERS, AquariaLocationNames.HOME_WATERS_TRANSTURTLE, + precollected) + self.__pre_fill_item(ItemNames.TRANSTURTLE_ABYSS, AquariaLocationNames.ABYSS_RIGHT_AREA_TRANSTURTLE, + precollected) + self.__pre_fill_item(ItemNames.TRANSTURTLE_BODY, AquariaLocationNames.FINAL_BOSS_AREA_TRANSTURTLE, precollected) - self.__pre_fill_item("Transturtle Home Water", "Home Water, Transturtle", precollected) - self.__pre_fill_item("Transturtle Abyss right", "Abyss right area, Transturtle", precollected) - self.__pre_fill_item("Transturtle Final Boss", "Final Boss area, Transturtle", precollected) # The last two are inverted because in the original game, they are special turtle that communicate directly - self.__pre_fill_item("Transturtle Simon Says", "Arnassi Ruins, Transturtle", precollected, - ItemClassification.progression) - self.__pre_fill_item("Transturtle Arnassi Ruins", "Simon Says area, Transturtle", precollected) + self.__pre_fill_item(ItemNames.TRANSTURTLE_SIMON_SAYS, AquariaLocationNames.ARNASSI_RUINS_TRANSTURTLE, + precollected, ItemClassification.progression) + self.__pre_fill_item(ItemNames.TRANSTURTLE_ARNASSI_RUINS, AquariaLocationNames.SIMON_SAYS_AREA_TRANSTURTLE, + precollected) for name, data in item_table.items(): if name not in self.exclude: for i in range(data.count): @@ -175,10 +185,17 @@ def set_rules(self) -> None: """ Launched when the Multiworld generator is ready to generate rules """ - + if self.options.early_energy_form == EarlyEnergyForm.option_early: + self.multiworld.early_items[self.player][ItemNames.ENERGY_FORM] = 1 + elif self.options.early_energy_form == EarlyEnergyForm.option_early_and_local: + self.multiworld.local_early_items[self.player][ItemNames.ENERGY_FORM] = 1 + if self.options.early_bind_song == EarlyBindSong.option_early: + self.multiworld.early_items[self.player][ItemNames.BIND_SONG] = 1 + elif self.options.early_bind_song == EarlyBindSong.option_early_and_local: + self.multiworld.local_early_items[self.player][ItemNames.BIND_SONG] = 1 self.regions.adjusting_rules(self.options) self.multiworld.completion_condition[self.player] = lambda \ - state: state.has("Victory", self.player) + state: state.has(ItemNames.VICTORY, self.player) def generate_basic(self) -> None: """ @@ -186,13 +203,13 @@ def generate_basic(self) -> None: Used to fill then `ingredients_substitution` list """ simple_ingredients_substitution = [i for i in range(27)] - if self.options.ingredient_randomizer.value > 0: - if self.options.ingredient_randomizer.value == 1: + if self.options.ingredient_randomizer.value > IngredientRandomizer.option_off: + if self.options.ingredient_randomizer.value == IngredientRandomizer.option_common_ingredients: simple_ingredients_substitution.pop(-1) simple_ingredients_substitution.pop(-1) simple_ingredients_substitution.pop(-1) self.random.shuffle(simple_ingredients_substitution) - if self.options.ingredient_randomizer.value == 1: + if self.options.ingredient_randomizer.value == IngredientRandomizer.option_common_ingredients: simple_ingredients_substitution.extend([24, 25, 26]) dishes_substitution = [i for i in range(27, 76)] if self.options.dish_randomizer: @@ -205,14 +222,19 @@ def fill_slot_data(self) -> Dict[str, Any]: return {"ingredientReplacement": self.ingredients_substitution, "aquarian_translate": bool(self.options.aquarian_translation.value), "blind_goal": bool(self.options.blind_goal.value), - "secret_needed": self.options.objective.value > 0, + "secret_needed": + self.options.objective.value == Objective.option_obtain_secrets_and_kill_the_creator, "minibosses_to_kill": self.options.mini_bosses_to_beat.value, "bigbosses_to_kill": self.options.big_bosses_to_beat.value, "skip_first_vision": bool(self.options.skip_first_vision.value), - "unconfine_home_water_energy_door": self.options.unconfine_home_water.value in [1, 3], - "unconfine_home_water_transturtle": self.options.unconfine_home_water.value in [2, 3], + "unconfine_home_water_energy_door": + self.options.unconfine_home_water.value == UnconfineHomeWater.option_via_energy_door + or self.options.unconfine_home_water.value == UnconfineHomeWater.option_via_both, + "unconfine_home_water_transturtle": + self.options.unconfine_home_water.value == UnconfineHomeWater.option_via_transturtle + or self.options.unconfine_home_water.value == UnconfineHomeWater.option_via_both, "bind_song_needed_to_get_under_rock_bulb": bool(self.options.bind_song_needed_to_get_under_rock_bulb), "no_progression_hard_or_hidden_locations": bool(self.options.no_progression_hard_or_hidden_locations), "light_needed_to_get_to_dark_places": bool(self.options.light_needed_to_get_to_dark_places), - "turtle_randomizer": self.options.turtle_randomizer.value, + "turtle_randomizer": self.options.turtle_randomizer.value } diff --git a/worlds/aquaria/docs/en_Aquaria.md b/worlds/aquaria/docs/en_Aquaria.md index c3e5f54dd66a..836a942be741 100644 --- a/worlds/aquaria/docs/en_Aquaria.md +++ b/worlds/aquaria/docs/en_Aquaria.md @@ -24,7 +24,7 @@ The locations in the randomizer are: * Beating Mithalan God boss * Fish Cave puzzle * Beating Drunian God boss - * Beating Sun God boss + * Beating Lumerean God boss * Breaking Li cage in the body Note that, unlike the vanilla game, when opening sing bulbs, Mithalas urns and Sunken City crates, diff --git a/worlds/aquaria/test/__init__.py b/worlds/aquaria/test/__init__.py index 8c4f64c3452c..05f46fc76259 100644 --- a/worlds/aquaria/test/__init__.py +++ b/worlds/aquaria/test/__init__.py @@ -6,211 +6,212 @@ from test.bases import WorldTestBase +from ..Locations import AquariaLocationNames # Every location accessible after the home water. after_home_water_locations = [ - "Sun Crystal", - "Home Water, Transturtle", - "Open Water top left area, bulb under the rock in the right path", - "Open Water top left area, bulb under the rock in the left path", - "Open Water top left area, bulb to the right of the save crystal", - "Open Water top right area, bulb in the small path before Mithalas", - "Open Water top right area, bulb in the path from the left entrance", - "Open Water top right area, bulb in the clearing close to the bottom exit", - "Open Water top right area, bulb in the big clearing close to the save crystal", - "Open Water top right area, bulb in the big clearing to the top exit", - "Open Water top right area, first urn in the Mithalas exit", - "Open Water top right area, second urn in the Mithalas exit", - "Open Water top right area, third urn in the Mithalas exit", - "Open Water top right area, bulb in the turtle room", - "Open Water top right area, Transturtle", - "Open Water bottom left area, bulb behind the chomper fish", - "Open Water bottom left area, bulb inside the lowest fish pass", - "Open Water skeleton path, bulb close to the right exit", - "Open Water skeleton path, bulb behind the chomper fish", - "Open Water skeleton path, King Skull", - "Arnassi Ruins, bulb in the right part", - "Arnassi Ruins, bulb in the left part", - "Arnassi Ruins, bulb in the center part", - "Arnassi Ruins, Song Plant Spore", - "Arnassi Ruins, Arnassi Armor", - "Arnassi Ruins, Arnassi Statue", - "Arnassi Ruins, Transturtle", - "Arnassi Ruins, Crab Armor", - "Simon Says area, Transturtle", - "Mithalas City, first bulb in the left city part", - "Mithalas City, second bulb in the left city part", - "Mithalas City, bulb in the right part", - "Mithalas City, bulb at the top of the city", - "Mithalas City, first bulb in a broken home", - "Mithalas City, second bulb in a broken home", - "Mithalas City, bulb in the bottom left part", - "Mithalas City, first bulb in one of the homes", - "Mithalas City, second bulb in one of the homes", - "Mithalas City, first urn in one of the homes", - "Mithalas City, second urn in one of the homes", - "Mithalas City, first urn in the city reserve", - "Mithalas City, second urn in the city reserve", - "Mithalas City, third urn in the city reserve", - "Mithalas City, first bulb at the end of the top path", - "Mithalas City, second bulb at the end of the top path", - "Mithalas City, bulb in the top path", - "Mithalas City, Mithalas Pot", - "Mithalas City, urn in the Castle flower tube entrance", - "Mithalas City, Doll", - "Mithalas City, urn inside a home fish pass", - "Mithalas City Castle, bulb in the flesh hole", - "Mithalas City Castle, Blue Banner", - "Mithalas City Castle, urn in the bedroom", - "Mithalas City Castle, first urn of the single lamp path", - "Mithalas City Castle, second urn of the single lamp path", - "Mithalas City Castle, urn in the bottom room", - "Mithalas City Castle, first urn on the entrance path", - "Mithalas City Castle, second urn on the entrance path", - "Mithalas City Castle, beating the Priests", - "Mithalas City Castle, Trident Head", - "Mithalas Cathedral, first urn in the top right room", - "Mithalas Cathedral, second urn in the top right room", - "Mithalas Cathedral, third urn in the top right room", - "Mithalas Cathedral, urn in the flesh room with fleas", - "Mithalas Cathedral, first urn in the bottom right path", - "Mithalas Cathedral, second urn in the bottom right path", - "Mithalas Cathedral, urn behind the flesh vein", - "Mithalas Cathedral, urn in the top left eyes boss room", - "Mithalas Cathedral, first urn in the path behind the flesh vein", - "Mithalas Cathedral, second urn in the path behind the flesh vein", - "Mithalas Cathedral, third urn in the path behind the flesh vein", - "Mithalas Cathedral, fourth urn in the top right room", - "Mithalas Cathedral, Mithalan Dress", - "Mithalas Cathedral, urn below the left entrance", - "Cathedral Underground, bulb in the center part", - "Cathedral Underground, first bulb in the top left part", - "Cathedral Underground, second bulb in the top left part", - "Cathedral Underground, third bulb in the top left part", - "Cathedral Underground, bulb close to the save crystal", - "Cathedral Underground, bulb in the bottom right path", - "Mithalas boss area, beating Mithalan God", - "Kelp Forest top left area, bulb in the bottom left clearing", - "Kelp Forest top left area, bulb in the path down from the top left clearing", - "Kelp Forest top left area, bulb in the top left clearing", - "Kelp Forest top left area, Jelly Egg", - "Kelp Forest top left area, bulb close to the Verse Egg", - "Kelp Forest top left area, Verse Egg", - "Kelp Forest top right area, bulb under the rock in the right path", - "Kelp Forest top right area, bulb at the left of the center clearing", - "Kelp Forest top right area, bulb in the left path's big room", - "Kelp Forest top right area, bulb in the left path's small room", - "Kelp Forest top right area, bulb at the top of the center clearing", - "Kelp Forest top right area, Black Pearl", - "Kelp Forest top right area, bulb in the top fish pass", - "Kelp Forest bottom left area, bulb close to the spirit crystals", - "Kelp Forest bottom left area, Walker Baby", - "Kelp Forest bottom left area, Transturtle", - "Kelp Forest bottom right area, Odd Container", - "Kelp Forest boss area, beating Drunian God", - "Kelp Forest boss room, bulb at the bottom of the area", - "Kelp Forest bottom left area, Fish Cave puzzle", - "Kelp Forest sprite cave, bulb inside the fish pass", - "Kelp Forest sprite cave, bulb in the second room", - "Kelp Forest sprite cave, Seed Bag", - "Mermog cave, bulb in the left part of the cave", - "Mermog cave, Piranha Egg", - "The Veil top left area, In Li's cave", - "The Veil top left area, bulb under the rock in the top right path", - "The Veil top left area, bulb hidden behind the blocking rock", - "The Veil top left area, Transturtle", - "The Veil top left area, bulb inside the fish pass", - "Turtle cave, Turtle Egg", - "Turtle cave, bulb in Bubble Cliff", - "Turtle cave, Urchin Costume", - "The Veil top right area, bulb in the middle of the wall jump cliff", - "The Veil top right area, Golden Starfish", - "The Veil top right area, bulb at the top of the waterfall", - "The Veil top right area, Transturtle", - "The Veil bottom area, bulb in the left path", - "The Veil bottom area, bulb in the spirit path", - "The Veil bottom area, Verse Egg", - "The Veil bottom area, Stone Head", - "Octopus Cave, Dumbo Egg", - "Octopus Cave, bulb in the path below the Octopus Cave path", - "Bubble Cave, bulb in the left cave wall", - "Bubble Cave, bulb in the right cave wall (behind the ice crystal)", - "Bubble Cave, Verse Egg", - "Sun Temple, bulb in the top left part", - "Sun Temple, bulb in the top right part", - "Sun Temple, bulb at the top of the high dark room", - "Sun Temple, Golden Gear", - "Sun Temple, first bulb of the temple", - "Sun Temple, bulb on the right part", - "Sun Temple, bulb in the hidden room of the right part", - "Sun Temple, Sun Key", - "Sun Worm path, first path bulb", - "Sun Worm path, second path bulb", - "Sun Worm path, first cliff bulb", - "Sun Worm path, second cliff bulb", - "Sun Temple boss area, beating Sun God", - "Abyss left area, bulb in hidden path room", - "Abyss left area, bulb in the right part", - "Abyss left area, Glowing Seed", - "Abyss left area, Glowing Plant", - "Abyss left area, bulb in the bottom fish pass", - "Abyss right area, bulb behind the rock in the whale room", - "Abyss right area, bulb in the middle path", - "Abyss right area, bulb behind the rock in the middle path", - "Abyss right area, bulb in the left green room", - "Abyss right area, Transturtle", - "Ice Cave, bulb in the room to the right", - "Ice Cave, first bulb in the top exit room", - "Ice Cave, second bulb in the top exit room", - "Ice Cave, third bulb in the top exit room", - "Ice Cave, bulb in the left room", - "King Jellyfish Cave, bulb in the right path from King Jelly", - "King Jellyfish Cave, Jellyfish Costume", - "The Whale, Verse Egg", - "Sunken City right area, crate close to the save crystal", - "Sunken City right area, crate in the left bottom room", - "Sunken City left area, crate in the little pipe room", - "Sunken City left area, crate close to the save crystal", - "Sunken City left area, crate before the bedroom", - "Sunken City left area, Girl Costume", - "Sunken City, bulb on top of the boss area", - "The Body center area, breaking Li's cage", - "The Body center area, bulb on the main path blocking tube", - "The Body left area, first bulb in the top face room", - "The Body left area, second bulb in the top face room", - "The Body left area, bulb below the water stream", - "The Body left area, bulb in the top path to the top face room", - "The Body left area, bulb in the bottom face room", - "The Body right area, bulb in the top face room", - "The Body right area, bulb in the top path to the bottom face room", - "The Body right area, bulb in the bottom face room", - "The Body bottom area, bulb in the Jelly Zap room", - "The Body bottom area, bulb in the nautilus room", - "The Body bottom area, Mutant Costume", - "Final Boss area, first bulb in the turtle room", - "Final Boss area, second bulb in the turtle room", - "Final Boss area, third bulb in the turtle room", - "Final Boss area, Transturtle", - "Final Boss area, bulb in the boss third form room", - "Simon Says area, beating Simon Says", - "Beating Fallen God", - "Beating Mithalan God", - "Beating Drunian God", - "Beating Sun God", - "Beating the Golem", - "Beating Nautilus Prime", - "Beating Blaster Peg Prime", - "Beating Mergog", - "Beating Mithalan priests", - "Beating Octopus Prime", - "Beating Crabbius Maximus", - "Beating Mantis Shrimp Prime", - "Beating King Jellyfish God Prime", - "First secret", - "Second secret", - "Third secret", - "Sunken City cleared", - "Objective complete", + AquariaLocationNames.SUN_CRYSTAL, + AquariaLocationNames.HOME_WATERS_TRANSTURTLE, + AquariaLocationNames.OPEN_WATERS_TOP_LEFT_AREA_BULB_UNDER_THE_ROCK_IN_THE_RIGHT_PATH, + AquariaLocationNames.OPEN_WATERS_TOP_LEFT_AREA_BULB_UNDER_THE_ROCK_IN_THE_LEFT_PATH, + AquariaLocationNames.OPEN_WATERS_TOP_LEFT_AREA_BULB_TO_THE_RIGHT_OF_THE_SAVE_CRYSTAL, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_SMALL_PATH_BEFORE_MITHALAS, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_PATH_FROM_THE_LEFT_ENTRANCE, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_CLEARING_CLOSE_TO_THE_BOTTOM_EXIT, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_BIG_CLEARING_CLOSE_TO_THE_SAVE_CRYSTAL, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_BIG_CLEARING_TO_THE_TOP_EXIT, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_FIRST_URN_IN_THE_MITHALAS_EXIT, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_SECOND_URN_IN_THE_MITHALAS_EXIT, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_THIRD_URN_IN_THE_MITHALAS_EXIT, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_BULB_IN_THE_TURTLE_ROOM, + AquariaLocationNames.OPEN_WATERS_TOP_RIGHT_AREA_TRANSTURTLE, + AquariaLocationNames.OPEN_WATERS_BOTTOM_LEFT_AREA_BULB_BEHIND_THE_CHOMPER_FISH, + AquariaLocationNames.OPEN_WATERS_BOTTOM_LEFT_AREA_BULB_INSIDE_THE_LOWEST_FISH_PASS, + AquariaLocationNames.OPEN_WATERS_SKELETON_PATH_BULB_CLOSE_TO_THE_RIGHT_EXIT, + AquariaLocationNames.OPEN_WATERS_SKELETON_PATH_BULB_BEHIND_THE_CHOMPER_FISH, + AquariaLocationNames.OPEN_WATERS_SKELETON_PATH_KING_SKULL, + AquariaLocationNames.ARNASSI_RUINS_BULB_IN_THE_RIGHT_PART, + AquariaLocationNames.ARNASSI_RUINS_BULB_IN_THE_LEFT_PART, + AquariaLocationNames.ARNASSI_RUINS_BULB_IN_THE_CENTER_PART, + AquariaLocationNames.ARNASSI_RUINS_SONG_PLANT_SPORE, + AquariaLocationNames.ARNASSI_RUINS_ARNASSI_ARMOR, + AquariaLocationNames.ARNASSI_RUINS_ARNASSI_STATUE, + AquariaLocationNames.ARNASSI_RUINS_TRANSTURTLE, + AquariaLocationNames.ARNASSI_RUINS_CRAB_ARMOR, + AquariaLocationNames.SIMON_SAYS_AREA_TRANSTURTLE, + AquariaLocationNames.MITHALAS_CITY_FIRST_BULB_IN_THE_LEFT_CITY_PART, + AquariaLocationNames.MITHALAS_CITY_SECOND_BULB_IN_THE_LEFT_CITY_PART, + AquariaLocationNames.MITHALAS_CITY_BULB_IN_THE_RIGHT_PART, + AquariaLocationNames.MITHALAS_CITY_BULB_AT_THE_TOP_OF_THE_CITY, + AquariaLocationNames.MITHALAS_CITY_FIRST_BULB_IN_A_BROKEN_HOME, + AquariaLocationNames.MITHALAS_CITY_SECOND_BULB_IN_A_BROKEN_HOME, + AquariaLocationNames.MITHALAS_CITY_BULB_IN_THE_BOTTOM_LEFT_PART, + AquariaLocationNames.MITHALAS_CITY_FIRST_BULB_IN_ONE_OF_THE_HOMES, + AquariaLocationNames.MITHALAS_CITY_SECOND_BULB_IN_ONE_OF_THE_HOMES, + AquariaLocationNames.MITHALAS_CITY_FIRST_URN_IN_ONE_OF_THE_HOMES, + AquariaLocationNames.MITHALAS_CITY_SECOND_URN_IN_ONE_OF_THE_HOMES, + AquariaLocationNames.MITHALAS_CITY_FIRST_URN_IN_THE_CITY_RESERVE, + AquariaLocationNames.MITHALAS_CITY_SECOND_URN_IN_THE_CITY_RESERVE, + AquariaLocationNames.MITHALAS_CITY_THIRD_URN_IN_THE_CITY_RESERVE, + AquariaLocationNames.MITHALAS_CITY_FIRST_BULB_AT_THE_END_OF_THE_TOP_PATH, + AquariaLocationNames.MITHALAS_CITY_SECOND_BULB_AT_THE_END_OF_THE_TOP_PATH, + AquariaLocationNames.MITHALAS_CITY_BULB_IN_THE_TOP_PATH, + AquariaLocationNames.MITHALAS_CITY_MITHALAS_POT, + AquariaLocationNames.MITHALAS_CITY_URN_IN_THE_CASTLE_FLOWER_TUBE_ENTRANCE, + AquariaLocationNames.MITHALAS_CITY_DOLL, + AquariaLocationNames.MITHALAS_CITY_URN_INSIDE_A_HOME_FISH_PASS, + AquariaLocationNames.MITHALAS_CITY_CASTLE_BULB_IN_THE_FLESH_HOLE, + AquariaLocationNames.MITHALAS_CITY_CASTLE_BLUE_BANNER, + AquariaLocationNames.MITHALAS_CITY_CASTLE_URN_IN_THE_BEDROOM, + AquariaLocationNames.MITHALAS_CITY_CASTLE_FIRST_URN_OF_THE_SINGLE_LAMP_PATH, + AquariaLocationNames.MITHALAS_CITY_CASTLE_SECOND_URN_OF_THE_SINGLE_LAMP_PATH, + AquariaLocationNames.MITHALAS_CITY_CASTLE_URN_IN_THE_BOTTOM_ROOM, + AquariaLocationNames.MITHALAS_CITY_CASTLE_FIRST_URN_ON_THE_ENTRANCE_PATH, + AquariaLocationNames.MITHALAS_CITY_CASTLE_SECOND_URN_ON_THE_ENTRANCE_PATH, + AquariaLocationNames.MITHALAS_CITY_CASTLE_BEATING_THE_PRIESTS, + AquariaLocationNames.MITHALAS_CITY_CASTLE_TRIDENT_HEAD, + AquariaLocationNames.MITHALAS_CATHEDRAL_FIRST_URN_IN_THE_TOP_RIGHT_ROOM, + AquariaLocationNames.MITHALAS_CATHEDRAL_SECOND_URN_IN_THE_TOP_RIGHT_ROOM, + AquariaLocationNames.MITHALAS_CATHEDRAL_THIRD_URN_IN_THE_TOP_RIGHT_ROOM, + AquariaLocationNames.MITHALAS_CATHEDRAL_FIRST_URN_IN_THE_BOTTOM_RIGHT_PATH, + AquariaLocationNames.MITHALAS_CATHEDRAL_SECOND_URN_IN_THE_BOTTOM_RIGHT_PATH, + AquariaLocationNames.MITHALAS_CATHEDRAL_URN_BEHIND_THE_FLESH_VEIN, + AquariaLocationNames.MITHALAS_CATHEDRAL_URN_IN_THE_TOP_LEFT_EYES_BOSS_ROOM, + AquariaLocationNames.MITHALAS_CATHEDRAL_FIRST_URN_IN_THE_PATH_BEHIND_THE_FLESH_VEIN, + AquariaLocationNames.MITHALAS_CATHEDRAL_SECOND_URN_IN_THE_PATH_BEHIND_THE_FLESH_VEIN, + AquariaLocationNames.MITHALAS_CATHEDRAL_THIRD_URN_IN_THE_PATH_BEHIND_THE_FLESH_VEIN, + AquariaLocationNames.MITHALAS_CATHEDRAL_FOURTH_URN_IN_THE_TOP_RIGHT_ROOM, + AquariaLocationNames.MITHALAS_CATHEDRAL_MITHALAN_DRESS, + AquariaLocationNames.MITHALAS_CATHEDRAL_URN_BELOW_THE_LEFT_ENTRANCE, + AquariaLocationNames.MITHALAS_CATHEDRAL_BULB_IN_THE_FLESH_ROOM_WITH_FLEAS, + AquariaLocationNames.CATHEDRAL_UNDERGROUND_BULB_IN_THE_CENTER_PART, + AquariaLocationNames.CATHEDRAL_UNDERGROUND_FIRST_BULB_IN_THE_TOP_LEFT_PART, + AquariaLocationNames.CATHEDRAL_UNDERGROUND_SECOND_BULB_IN_THE_TOP_LEFT_PART, + AquariaLocationNames.CATHEDRAL_UNDERGROUND_THIRD_BULB_IN_THE_TOP_LEFT_PART, + AquariaLocationNames.CATHEDRAL_UNDERGROUND_BULB_CLOSE_TO_THE_SAVE_CRYSTAL, + AquariaLocationNames.CATHEDRAL_UNDERGROUND_BULB_IN_THE_BOTTOM_RIGHT_PATH, + AquariaLocationNames.MITHALAS_BOSS_AREA_BEATING_MITHALAN_GOD, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_BULB_IN_THE_BOTTOM_LEFT_CLEARING, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_BULB_IN_THE_PATH_DOWN_FROM_THE_TOP_LEFT_CLEARING, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_BULB_IN_THE_TOP_LEFT_CLEARING, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_JELLY_EGG, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_BULB_CLOSE_TO_THE_VERSE_EGG, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_VERSE_EGG, + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BULB_UNDER_THE_ROCK_IN_THE_RIGHT_PATH, + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BULB_AT_THE_LEFT_OF_THE_CENTER_CLEARING, + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BULB_IN_THE_LEFT_PATH_S_BIG_ROOM, + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BULB_IN_THE_LEFT_PATH_S_SMALL_ROOM, + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BULB_AT_THE_TOP_OF_THE_CENTER_CLEARING, + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BLACK_PEARL, + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BULB_IN_THE_TOP_FISH_PASS, + AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_BULB_CLOSE_TO_THE_SPIRIT_CRYSTALS, + AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_WALKER_BABY, + AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_TRANSTURTLE, + AquariaLocationNames.KELP_FOREST_BOTTOM_RIGHT_AREA_ODD_CONTAINER, + AquariaLocationNames.KELP_FOREST_BOSS_AREA_BEATING_DRUNIAN_GOD, + AquariaLocationNames.KELP_FOREST_BOSS_ROOM_BULB_AT_THE_BOTTOM_OF_THE_AREA, + AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_FISH_CAVE_PUZZLE, + AquariaLocationNames.KELP_FOREST_SPRITE_CAVE_BULB_INSIDE_THE_FISH_PASS, + AquariaLocationNames.KELP_FOREST_SPRITE_CAVE_BULB_IN_THE_SECOND_ROOM, + AquariaLocationNames.KELP_FOREST_SPRITE_CAVE_SEED_BAG, + AquariaLocationNames.MERMOG_CAVE_BULB_IN_THE_LEFT_PART_OF_THE_CAVE, + AquariaLocationNames.MERMOG_CAVE_PIRANHA_EGG, + AquariaLocationNames.THE_VEIL_TOP_LEFT_AREA_IN_LI_S_CAVE, + AquariaLocationNames.THE_VEIL_TOP_LEFT_AREA_BULB_UNDER_THE_ROCK_IN_THE_TOP_RIGHT_PATH, + AquariaLocationNames.THE_VEIL_TOP_LEFT_AREA_BULB_HIDDEN_BEHIND_THE_BLOCKING_ROCK, + AquariaLocationNames.THE_VEIL_TOP_LEFT_AREA_TRANSTURTLE, + AquariaLocationNames.THE_VEIL_TOP_LEFT_AREA_BULB_INSIDE_THE_FISH_PASS, + AquariaLocationNames.TURTLE_CAVE_TURTLE_EGG, + AquariaLocationNames.TURTLE_CAVE_BULB_IN_BUBBLE_CLIFF, + AquariaLocationNames.TURTLE_CAVE_URCHIN_COSTUME, + AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_BULB_IN_THE_MIDDLE_OF_THE_WALL_JUMP_CLIFF, + AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_GOLDEN_STARFISH, + AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_BULB_AT_THE_TOP_OF_THE_WATERFALL, + AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_TRANSTURTLE, + AquariaLocationNames.THE_VEIL_BOTTOM_AREA_BULB_IN_THE_LEFT_PATH, + AquariaLocationNames.THE_VEIL_BOTTOM_AREA_BULB_IN_THE_SPIRIT_PATH, + AquariaLocationNames.THE_VEIL_BOTTOM_AREA_VERSE_EGG, + AquariaLocationNames.THE_VEIL_BOTTOM_AREA_STONE_HEAD, + AquariaLocationNames.OCTOPUS_CAVE_DUMBO_EGG, + AquariaLocationNames.OCTOPUS_CAVE_BULB_IN_THE_PATH_BELOW_THE_OCTOPUS_CAVE_PATH, + AquariaLocationNames.BUBBLE_CAVE_BULB_IN_THE_LEFT_CAVE_WALL, + AquariaLocationNames.BUBBLE_CAVE_BULB_IN_THE_RIGHT_CAVE_WALL_BEHIND_THE_ICE_CRYSTAL, + AquariaLocationNames.BUBBLE_CAVE_VERSE_EGG, + AquariaLocationNames.SUN_TEMPLE_BULB_IN_THE_TOP_LEFT_PART, + AquariaLocationNames.SUN_TEMPLE_BULB_IN_THE_TOP_RIGHT_PART, + AquariaLocationNames.SUN_TEMPLE_BULB_AT_THE_TOP_OF_THE_HIGH_DARK_ROOM, + AquariaLocationNames.SUN_TEMPLE_GOLDEN_GEAR, + AquariaLocationNames.SUN_TEMPLE_FIRST_BULB_OF_THE_TEMPLE, + AquariaLocationNames.SUN_TEMPLE_BULB_ON_THE_RIGHT_PART, + AquariaLocationNames.SUN_TEMPLE_BULB_IN_THE_HIDDEN_ROOM_OF_THE_RIGHT_PART, + AquariaLocationNames.SUN_TEMPLE_SUN_KEY, + AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_FIRST_PATH_BULB, + AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_SECOND_PATH_BULB, + AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_FIRST_CLIFF_BULB, + AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_SECOND_CLIFF_BULB, + AquariaLocationNames.SUN_TEMPLE_BOSS_AREA_BEATING_LUMEREAN_GOD, + AquariaLocationNames.ABYSS_LEFT_AREA_BULB_IN_HIDDEN_PATH_ROOM, + AquariaLocationNames.ABYSS_LEFT_AREA_BULB_IN_THE_RIGHT_PART, + AquariaLocationNames.ABYSS_LEFT_AREA_GLOWING_SEED, + AquariaLocationNames.ABYSS_LEFT_AREA_GLOWING_PLANT, + AquariaLocationNames.ABYSS_LEFT_AREA_BULB_IN_THE_BOTTOM_FISH_PASS, + AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_BEHIND_THE_ROCK_IN_THE_WHALE_ROOM, + AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_IN_THE_MIDDLE_PATH, + AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_BEHIND_THE_ROCK_IN_THE_MIDDLE_PATH, + AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_IN_THE_LEFT_GREEN_ROOM, + AquariaLocationNames.ABYSS_RIGHT_AREA_TRANSTURTLE, + AquariaLocationNames.ICE_CAVERN_BULB_IN_THE_ROOM_TO_THE_RIGHT, + AquariaLocationNames.ICE_CAVERN_FIRST_BULB_IN_THE_TOP_EXIT_ROOM, + AquariaLocationNames.ICE_CAVERN_SECOND_BULB_IN_THE_TOP_EXIT_ROOM, + AquariaLocationNames.ICE_CAVERN_THIRD_BULB_IN_THE_TOP_EXIT_ROOM, + AquariaLocationNames.ICE_CAVERN_BULB_IN_THE_LEFT_ROOM, + AquariaLocationNames.KING_JELLYFISH_CAVE_BULB_IN_THE_RIGHT_PATH_FROM_KING_JELLY, + AquariaLocationNames.KING_JELLYFISH_CAVE_JELLYFISH_COSTUME, + AquariaLocationNames.THE_WHALE_VERSE_EGG, + AquariaLocationNames.SUNKEN_CITY_RIGHT_AREA_CRATE_CLOSE_TO_THE_SAVE_CRYSTAL, + AquariaLocationNames.SUNKEN_CITY_RIGHT_AREA_CRATE_IN_THE_LEFT_BOTTOM_ROOM, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_IN_THE_LITTLE_PIPE_ROOM, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_CLOSE_TO_THE_SAVE_CRYSTAL, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_BEFORE_THE_BEDROOM, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_GIRL_COSTUME, + AquariaLocationNames.SUNKEN_CITY_BULB_ON_TOP_OF_THE_BOSS_AREA, + AquariaLocationNames.THE_BODY_CENTER_AREA_BREAKING_LI_S_CAGE, + AquariaLocationNames.THE_BODY_CENTER_AREA_BULB_ON_THE_MAIN_PATH_BLOCKING_TUBE, + AquariaLocationNames.THE_BODY_LEFT_AREA_FIRST_BULB_IN_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_LEFT_AREA_SECOND_BULB_IN_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_BELOW_THE_WATER_STREAM, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_IN_THE_TOP_PATH_TO_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_IN_THE_BOTTOM_FACE_ROOM, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_TOP_PATH_TO_THE_BOTTOM_FACE_ROOM, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_BOTTOM_FACE_ROOM, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_BULB_IN_THE_JELLY_ZAP_ROOM, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_BULB_IN_THE_NAUTILUS_ROOM, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_MUTANT_COSTUME, + AquariaLocationNames.FINAL_BOSS_AREA_FIRST_BULB_IN_THE_TURTLE_ROOM, + AquariaLocationNames.FINAL_BOSS_AREA_SECOND_BULB_IN_THE_TURTLE_ROOM, + AquariaLocationNames.FINAL_BOSS_AREA_THIRD_BULB_IN_THE_TURTLE_ROOM, + AquariaLocationNames.FINAL_BOSS_AREA_TRANSTURTLE, + AquariaLocationNames.FINAL_BOSS_AREA_BULB_IN_THE_BOSS_THIRD_FORM_ROOM, + AquariaLocationNames.SIMON_SAYS_AREA_BEATING_SIMON_SAYS, + AquariaLocationNames.BEATING_FALLEN_GOD, + AquariaLocationNames.BEATING_MITHALAN_GOD, + AquariaLocationNames.BEATING_DRUNIAN_GOD, + AquariaLocationNames.BEATING_LUMEREAN_GOD, + AquariaLocationNames.BEATING_THE_GOLEM, + AquariaLocationNames.BEATING_NAUTILUS_PRIME, + AquariaLocationNames.BEATING_BLASTER_PEG_PRIME, + AquariaLocationNames.BEATING_MERGOG, + AquariaLocationNames.BEATING_MITHALAN_PRIESTS, + AquariaLocationNames.BEATING_OCTOPUS_PRIME, + AquariaLocationNames.BEATING_CRABBIUS_MAXIMUS, + AquariaLocationNames.BEATING_MANTIS_SHRIMP_PRIME, + AquariaLocationNames.BEATING_KING_JELLYFISH_GOD_PRIME, + AquariaLocationNames.FIRST_SECRET, + AquariaLocationNames.SECOND_SECRET, + AquariaLocationNames.THIRD_SECRET, + AquariaLocationNames.SUNKEN_CITY_CLEARED, + AquariaLocationNames.OBJECTIVE_COMPLETE, ] class AquariaTestBase(WorldTestBase): diff --git a/worlds/aquaria/test/test_beast_form_access.py b/worlds/aquaria/test/test_beast_form_access.py index c09586269d38..684c33115ffc 100644 --- a/worlds/aquaria/test/test_beast_form_access.py +++ b/worlds/aquaria/test/test_beast_form_access.py @@ -5,6 +5,8 @@ """ from . import AquariaTestBase +from ..Items import ItemNames +from ..Locations import AquariaLocationNames class BeastFormAccessTest(AquariaTestBase): @@ -13,16 +15,16 @@ class BeastFormAccessTest(AquariaTestBase): def test_beast_form_location(self) -> None: """Test locations that require beast form""" locations = [ - "Mermog cave, Piranha Egg", - "Kelp Forest top left area, Jelly Egg", - "Mithalas Cathedral, Mithalan Dress", - "The Veil top right area, bulb at the top of the waterfall", - "Sunken City, bulb on top of the boss area", - "Octopus Cave, Dumbo Egg", - "Beating the Golem", - "Beating Mergog", - "Beating Octopus Prime", - "Sunken City cleared", + AquariaLocationNames.MERMOG_CAVE_PIRANHA_EGG, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_JELLY_EGG, + AquariaLocationNames.MITHALAS_CATHEDRAL_MITHALAN_DRESS, + AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_BULB_AT_THE_TOP_OF_THE_WATERFALL, + AquariaLocationNames.SUNKEN_CITY_BULB_ON_TOP_OF_THE_BOSS_AREA, + AquariaLocationNames.OCTOPUS_CAVE_DUMBO_EGG, + AquariaLocationNames.BEATING_THE_GOLEM, + AquariaLocationNames.BEATING_MERGOG, + AquariaLocationNames.BEATING_OCTOPUS_PRIME, + AquariaLocationNames.SUNKEN_CITY_CLEARED, ] - items = [["Beast form"]] + items = [[ItemNames.BEAST_FORM]] self.assertAccessDependency(locations, items) diff --git a/worlds/aquaria/test/test_beast_form_or_arnassi_armor_access.py b/worlds/aquaria/test/test_beast_form_or_arnassi_armor_access.py index fa4c6923400a..4c93c309a119 100644 --- a/worlds/aquaria/test/test_beast_form_or_arnassi_armor_access.py +++ b/worlds/aquaria/test/test_beast_form_or_arnassi_armor_access.py @@ -5,6 +5,8 @@ """ from . import AquariaTestBase +from ..Items import ItemNames +from ..Locations import AquariaLocationNames class BeastForArnassiArmormAccessTest(AquariaTestBase): @@ -13,27 +15,27 @@ class BeastForArnassiArmormAccessTest(AquariaTestBase): def test_beast_form_arnassi_armor_location(self) -> None: """Test locations that require beast form or arnassi armor""" locations = [ - "Mithalas City Castle, beating the Priests", - "Arnassi Ruins, Crab Armor", - "Arnassi Ruins, Song Plant Spore", - "Mithalas City, first bulb at the end of the top path", - "Mithalas City, second bulb at the end of the top path", - "Mithalas City, bulb in the top path", - "Mithalas City, Mithalas Pot", - "Mithalas City, urn in the Castle flower tube entrance", - "Mermog cave, Piranha Egg", - "Mithalas Cathedral, Mithalan Dress", - "Kelp Forest top left area, Jelly Egg", - "The Veil top right area, bulb in the middle of the wall jump cliff", - "The Veil top right area, bulb at the top of the waterfall", - "Sunken City, bulb on top of the boss area", - "Octopus Cave, Dumbo Egg", - "Beating the Golem", - "Beating Mergog", - "Beating Crabbius Maximus", - "Beating Octopus Prime", - "Beating Mithalan priests", - "Sunken City cleared" + AquariaLocationNames.MITHALAS_CITY_CASTLE_BEATING_THE_PRIESTS, + AquariaLocationNames.ARNASSI_RUINS_CRAB_ARMOR, + AquariaLocationNames.ARNASSI_RUINS_SONG_PLANT_SPORE, + AquariaLocationNames.MITHALAS_CITY_FIRST_BULB_AT_THE_END_OF_THE_TOP_PATH, + AquariaLocationNames.MITHALAS_CITY_SECOND_BULB_AT_THE_END_OF_THE_TOP_PATH, + AquariaLocationNames.MITHALAS_CITY_BULB_IN_THE_TOP_PATH, + AquariaLocationNames.MITHALAS_CITY_MITHALAS_POT, + AquariaLocationNames.MITHALAS_CITY_URN_IN_THE_CASTLE_FLOWER_TUBE_ENTRANCE, + AquariaLocationNames.MERMOG_CAVE_PIRANHA_EGG, + AquariaLocationNames.MITHALAS_CATHEDRAL_MITHALAN_DRESS, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_JELLY_EGG, + AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_BULB_IN_THE_MIDDLE_OF_THE_WALL_JUMP_CLIFF, + AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_BULB_AT_THE_TOP_OF_THE_WATERFALL, + AquariaLocationNames.SUNKEN_CITY_BULB_ON_TOP_OF_THE_BOSS_AREA, + AquariaLocationNames.OCTOPUS_CAVE_DUMBO_EGG, + AquariaLocationNames.BEATING_THE_GOLEM, + AquariaLocationNames.BEATING_MERGOG, + AquariaLocationNames.BEATING_CRABBIUS_MAXIMUS, + AquariaLocationNames.BEATING_OCTOPUS_PRIME, + AquariaLocationNames.BEATING_MITHALAN_PRIESTS, + AquariaLocationNames.SUNKEN_CITY_CLEARED ] - items = [["Beast form", "Arnassi Armor"]] + items = [[ItemNames.BEAST_FORM, ItemNames.ARNASSI_ARMOR]] self.assertAccessDependency(locations, items) diff --git a/worlds/aquaria/test/test_bind_song_access.py b/worlds/aquaria/test/test_bind_song_access.py index 05f96edb9192..689f487c644e 100644 --- a/worlds/aquaria/test/test_bind_song_access.py +++ b/worlds/aquaria/test/test_bind_song_access.py @@ -6,31 +6,36 @@ """ from . import AquariaTestBase, after_home_water_locations +from ..Items import ItemNames +from ..Locations import AquariaLocationNames +from ..Options import UnconfineHomeWater, EarlyBindSong class BindSongAccessTest(AquariaTestBase): """Unit test used to test accessibility of locations with and without the bind song""" options = { "bind_song_needed_to_get_under_rock_bulb": False, + "unconfine_home_water": UnconfineHomeWater.option_off, + "early_bind_song": EarlyBindSong.option_off } def test_bind_song_location(self) -> None: """Test locations that require Bind song""" locations = [ - "Verse Cave right area, Big Seed", - "Home Water, bulb in the path below Nautilus Prime", - "Home Water, bulb in the bottom left room", - "Home Water, Nautilus Egg", - "Song Cave, Verse Egg", - "Energy Temple first area, beating the Energy Statue", - "Energy Temple first area, bulb in the bottom room blocked by a rock", - "Energy Temple first area, Energy Idol", - "Energy Temple second area, bulb under the rock", - "Energy Temple bottom entrance, Krotite Armor", - "Energy Temple third area, bulb in the bottom path", - "Energy Temple boss area, Fallen God Tooth", - "Energy Temple blaster room, Blaster Egg", + AquariaLocationNames.VERSE_CAVE_RIGHT_AREA_BIG_SEED, + AquariaLocationNames.HOME_WATERS_BULB_IN_THE_PATH_BELOW_NAUTILUS_PRIME, + AquariaLocationNames.HOME_WATERS_BULB_IN_THE_BOTTOM_LEFT_ROOM, + AquariaLocationNames.HOME_WATERS_NAUTILUS_EGG, + AquariaLocationNames.SONG_CAVE_VERSE_EGG, + AquariaLocationNames.ENERGY_TEMPLE_FIRST_AREA_BEATING_THE_ENERGY_STATUE, + AquariaLocationNames.ENERGY_TEMPLE_FIRST_AREA_BULB_IN_THE_BOTTOM_ROOM_BLOCKED_BY_A_ROCK, + AquariaLocationNames.ENERGY_TEMPLE_ENERGY_IDOL, + AquariaLocationNames.ENERGY_TEMPLE_SECOND_AREA_BULB_UNDER_THE_ROCK, + AquariaLocationNames.ENERGY_TEMPLE_BOTTOM_ENTRANCE_KROTITE_ARMOR, + AquariaLocationNames.ENERGY_TEMPLE_THIRD_AREA_BULB_IN_THE_BOTTOM_PATH, + AquariaLocationNames.ENERGY_TEMPLE_BOSS_AREA_FALLEN_GOD_TOOTH, + AquariaLocationNames.ENERGY_TEMPLE_BLASTER_ROOM_BLASTER_EGG, *after_home_water_locations ] - items = [["Bind song"]] + items = [[ItemNames.BIND_SONG]] self.assertAccessDependency(locations, items) diff --git a/worlds/aquaria/test/test_bind_song_option_access.py b/worlds/aquaria/test/test_bind_song_option_access.py index e391eef101bf..74dfa2ed7094 100644 --- a/worlds/aquaria/test/test_bind_song_option_access.py +++ b/worlds/aquaria/test/test_bind_song_option_access.py @@ -7,6 +7,8 @@ from . import AquariaTestBase from .test_bind_song_access import after_home_water_locations +from ..Items import ItemNames +from ..Locations import AquariaLocationNames class BindSongOptionAccessTest(AquariaTestBase): @@ -18,25 +20,25 @@ class BindSongOptionAccessTest(AquariaTestBase): def test_bind_song_location(self) -> None: """Test locations that require Bind song with the bind song needed option activated""" locations = [ - "Verse Cave right area, Big Seed", - "Verse Cave left area, bulb under the rock at the end of the path", - "Home Water, bulb under the rock in the left path from the Verse Cave", - "Song Cave, bulb under the rock close to the song door", - "Song Cave, bulb under the rock in the path to the singing statues", - "Naija's Home, bulb under the rock at the right of the main path", - "Home Water, bulb in the path below Nautilus Prime", - "Home Water, bulb in the bottom left room", - "Home Water, Nautilus Egg", - "Song Cave, Verse Egg", - "Energy Temple first area, beating the Energy Statue", - "Energy Temple first area, bulb in the bottom room blocked by a rock", - "Energy Temple first area, Energy Idol", - "Energy Temple second area, bulb under the rock", - "Energy Temple bottom entrance, Krotite Armor", - "Energy Temple third area, bulb in the bottom path", - "Energy Temple boss area, Fallen God Tooth", - "Energy Temple blaster room, Blaster Egg", + AquariaLocationNames.VERSE_CAVE_RIGHT_AREA_BIG_SEED, + AquariaLocationNames.VERSE_CAVE_LEFT_AREA_BULB_UNDER_THE_ROCK_AT_THE_END_OF_THE_PATH, + AquariaLocationNames.HOME_WATERS_BULB_UNDER_THE_ROCK_IN_THE_LEFT_PATH_FROM_THE_VERSE_CAVE, + AquariaLocationNames.SONG_CAVE_BULB_UNDER_THE_ROCK_CLOSE_TO_THE_SONG_DOOR, + AquariaLocationNames.SONG_CAVE_BULB_UNDER_THE_ROCK_IN_THE_PATH_TO_THE_SINGING_STATUES, + AquariaLocationNames.NAIJA_S_HOME_BULB_UNDER_THE_ROCK_AT_THE_RIGHT_OF_THE_MAIN_PATH, + AquariaLocationNames.HOME_WATERS_BULB_IN_THE_PATH_BELOW_NAUTILUS_PRIME, + AquariaLocationNames.HOME_WATERS_BULB_IN_THE_BOTTOM_LEFT_ROOM, + AquariaLocationNames.HOME_WATERS_NAUTILUS_EGG, + AquariaLocationNames.SONG_CAVE_VERSE_EGG, + AquariaLocationNames.ENERGY_TEMPLE_FIRST_AREA_BEATING_THE_ENERGY_STATUE, + AquariaLocationNames.ENERGY_TEMPLE_FIRST_AREA_BULB_IN_THE_BOTTOM_ROOM_BLOCKED_BY_A_ROCK, + AquariaLocationNames.ENERGY_TEMPLE_ENERGY_IDOL, + AquariaLocationNames.ENERGY_TEMPLE_SECOND_AREA_BULB_UNDER_THE_ROCK, + AquariaLocationNames.ENERGY_TEMPLE_BOTTOM_ENTRANCE_KROTITE_ARMOR, + AquariaLocationNames.ENERGY_TEMPLE_THIRD_AREA_BULB_IN_THE_BOTTOM_PATH, + AquariaLocationNames.ENERGY_TEMPLE_BOSS_AREA_FALLEN_GOD_TOOTH, + AquariaLocationNames.ENERGY_TEMPLE_BLASTER_ROOM_BLASTER_EGG, *after_home_water_locations ] - items = [["Bind song"]] + items = [[ItemNames.BIND_SONG]] self.assertAccessDependency(locations, items) diff --git a/worlds/aquaria/test/test_confined_home_water.py b/worlds/aquaria/test/test_confined_home_water.py index 89c51ac5c775..d809a3d5cb68 100644 --- a/worlds/aquaria/test/test_confined_home_water.py +++ b/worlds/aquaria/test/test_confined_home_water.py @@ -5,16 +5,17 @@ """ from . import AquariaTestBase +from ..Options import UnconfineHomeWater, EarlyEnergyForm class ConfinedHomeWaterAccessTest(AquariaTestBase): """Unit test used to test accessibility of region with the unconfine home water option disabled""" options = { - "unconfine_home_water": 0, - "early_energy_form": False + "unconfine_home_water": UnconfineHomeWater.option_off, + "early_energy_form": EarlyEnergyForm.option_off } def test_confine_home_water_location(self) -> None: """Test region accessible with confined home water""" - self.assertFalse(self.can_reach_region("Open Water top left area"), "Can reach Open Water top left area") - self.assertFalse(self.can_reach_region("Home Water, turtle room"), "Can reach Home Water, turtle room") + self.assertFalse(self.can_reach_region("Open Waters top left area"), "Can reach Open Waters top left area") + self.assertFalse(self.can_reach_region("Home Waters, turtle room"), "Can reach Home Waters, turtle room") diff --git a/worlds/aquaria/test/test_dual_song_access.py b/worlds/aquaria/test/test_dual_song_access.py index bb9b2e739604..448d9df0ef3e 100644 --- a/worlds/aquaria/test/test_dual_song_access.py +++ b/worlds/aquaria/test/test_dual_song_access.py @@ -5,22 +5,25 @@ """ from . import AquariaTestBase +from ..Items import ItemNames +from ..Locations import AquariaLocationNames +from ..Options import TurtleRandomizer class LiAccessTest(AquariaTestBase): """Unit test used to test accessibility of locations with and without the dual song""" options = { - "turtle_randomizer": 1, + "turtle_randomizer": TurtleRandomizer.option_all, } def test_li_song_location(self) -> None: """Test locations that require the dual song""" locations = [ - "The Body bottom area, bulb in the Jelly Zap room", - "The Body bottom area, bulb in the nautilus room", - "The Body bottom area, Mutant Costume", - "Final Boss area, bulb in the boss third form room", - "Objective complete" + AquariaLocationNames.THE_BODY_BOTTOM_AREA_BULB_IN_THE_JELLY_ZAP_ROOM, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_BULB_IN_THE_NAUTILUS_ROOM, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_MUTANT_COSTUME, + AquariaLocationNames.FINAL_BOSS_AREA_BULB_IN_THE_BOSS_THIRD_FORM_ROOM, + AquariaLocationNames.OBJECTIVE_COMPLETE ] - items = [["Dual form"]] + items = [[ItemNames.DUAL_FORM]] self.assertAccessDependency(locations, items) diff --git a/worlds/aquaria/test/test_energy_form_access.py b/worlds/aquaria/test/test_energy_form_access.py index b443166823bc..7eeb7c2e73c4 100644 --- a/worlds/aquaria/test/test_energy_form_access.py +++ b/worlds/aquaria/test/test_energy_form_access.py @@ -6,28 +6,31 @@ """ from . import AquariaTestBase +from ..Items import ItemNames +from ..Locations import AquariaLocationNames +from ..Options import EarlyEnergyForm class EnergyFormAccessTest(AquariaTestBase): """Unit test used to test accessibility of locations with and without the energy form""" options = { - "early_energy_form": False, + "early_energy_form": EarlyEnergyForm.option_off } def test_energy_form_location(self) -> None: """Test locations that require Energy form""" locations = [ - "Energy Temple second area, bulb under the rock", - "Energy Temple third area, bulb in the bottom path", - "The Body left area, first bulb in the top face room", - "The Body left area, second bulb in the top face room", - "The Body left area, bulb below the water stream", - "The Body left area, bulb in the top path to the top face room", - "The Body left area, bulb in the bottom face room", - "The Body right area, bulb in the top path to the bottom face room", - "The Body right area, bulb in the bottom face room", - "Final Boss area, bulb in the boss third form room", - "Objective complete", + AquariaLocationNames.ENERGY_TEMPLE_SECOND_AREA_BULB_UNDER_THE_ROCK, + AquariaLocationNames.ENERGY_TEMPLE_THIRD_AREA_BULB_IN_THE_BOTTOM_PATH, + AquariaLocationNames.THE_BODY_LEFT_AREA_FIRST_BULB_IN_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_LEFT_AREA_SECOND_BULB_IN_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_BELOW_THE_WATER_STREAM, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_IN_THE_TOP_PATH_TO_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_IN_THE_BOTTOM_FACE_ROOM, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_TOP_PATH_TO_THE_BOTTOM_FACE_ROOM, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_BOTTOM_FACE_ROOM, + AquariaLocationNames.FINAL_BOSS_AREA_BULB_IN_THE_BOSS_THIRD_FORM_ROOM, + AquariaLocationNames.OBJECTIVE_COMPLETE, ] - items = [["Energy form"]] + items = [[ItemNames.ENERGY_FORM]] self.assertAccessDependency(locations, items) diff --git a/worlds/aquaria/test/test_energy_form_or_dual_form_access.py b/worlds/aquaria/test/test_energy_form_or_dual_form_access.py index 8a765bc4e4e2..ba04405eea59 100644 --- a/worlds/aquaria/test/test_energy_form_or_dual_form_access.py +++ b/worlds/aquaria/test/test_energy_form_or_dual_form_access.py @@ -5,88 +5,74 @@ """ from . import AquariaTestBase +from ..Items import ItemNames +from ..Locations import AquariaLocationNames +from ..Options import EarlyEnergyForm, TurtleRandomizer class EnergyFormDualFormAccessTest(AquariaTestBase): """Unit test used to test accessibility of locations with and without the energy form and dual form (and Li)""" options = { - "early_energy_form": False, + "early_energy_form": EarlyEnergyForm.option_off, + "turtle_randomizer": TurtleRandomizer.option_all } def test_energy_form_or_dual_form_location(self) -> None: """Test locations that require Energy form or dual form""" locations = [ - "Naija's Home, bulb after the energy door", - "Home Water, Nautilus Egg", - "Energy Temple second area, bulb under the rock", - "Energy Temple bottom entrance, Krotite Armor", - "Energy Temple third area, bulb in the bottom path", - "Energy Temple blaster room, Blaster Egg", - "Energy Temple boss area, Fallen God Tooth", - "Mithalas City Castle, beating the Priests", - "Mithalas boss area, beating Mithalan God", - "Mithalas Cathedral, first urn in the top right room", - "Mithalas Cathedral, second urn in the top right room", - "Mithalas Cathedral, third urn in the top right room", - "Mithalas Cathedral, urn in the flesh room with fleas", - "Mithalas Cathedral, first urn in the bottom right path", - "Mithalas Cathedral, second urn in the bottom right path", - "Mithalas Cathedral, urn behind the flesh vein", - "Mithalas Cathedral, urn in the top left eyes boss room", - "Mithalas Cathedral, first urn in the path behind the flesh vein", - "Mithalas Cathedral, second urn in the path behind the flesh vein", - "Mithalas Cathedral, third urn in the path behind the flesh vein", - "Mithalas Cathedral, fourth urn in the top right room", - "Mithalas Cathedral, Mithalan Dress", - "Mithalas Cathedral, urn below the left entrance", - "Kelp Forest top left area, bulb close to the Verse Egg", - "Kelp Forest top left area, Verse Egg", - "Kelp Forest boss area, beating Drunian God", - "Mermog cave, Piranha Egg", - "Octopus Cave, Dumbo Egg", - "Sun Temple boss area, beating Sun God", - "King Jellyfish Cave, bulb in the right path from King Jelly", - "King Jellyfish Cave, Jellyfish Costume", - "Sunken City right area, crate close to the save crystal", - "Sunken City right area, crate in the left bottom room", - "Sunken City left area, crate in the little pipe room", - "Sunken City left area, crate close to the save crystal", - "Sunken City left area, crate before the bedroom", - "Sunken City left area, Girl Costume", - "Sunken City, bulb on top of the boss area", - "The Body center area, breaking Li's cage", - "The Body center area, bulb on the main path blocking tube", - "The Body left area, first bulb in the top face room", - "The Body left area, second bulb in the top face room", - "The Body left area, bulb below the water stream", - "The Body left area, bulb in the top path to the top face room", - "The Body left area, bulb in the bottom face room", - "The Body right area, bulb in the top face room", - "The Body right area, bulb in the top path to the bottom face room", - "The Body right area, bulb in the bottom face room", - "The Body bottom area, bulb in the Jelly Zap room", - "The Body bottom area, bulb in the nautilus room", - "The Body bottom area, Mutant Costume", - "Final Boss area, bulb in the boss third form room", - "Final Boss area, first bulb in the turtle room", - "Final Boss area, second bulb in the turtle room", - "Final Boss area, third bulb in the turtle room", - "Final Boss area, Transturtle", - "Beating Fallen God", - "Beating Blaster Peg Prime", - "Beating Mithalan God", - "Beating Drunian God", - "Beating Sun God", - "Beating the Golem", - "Beating Nautilus Prime", - "Beating Mergog", - "Beating Mithalan priests", - "Beating Octopus Prime", - "Beating King Jellyfish God Prime", - "Beating the Golem", - "Sunken City cleared", - "First secret", - "Objective complete" + AquariaLocationNames.NAIJA_S_HOME_BULB_AFTER_THE_ENERGY_DOOR, + AquariaLocationNames.HOME_WATERS_NAUTILUS_EGG, + AquariaLocationNames.ENERGY_TEMPLE_SECOND_AREA_BULB_UNDER_THE_ROCK, + AquariaLocationNames.ENERGY_TEMPLE_BOTTOM_ENTRANCE_KROTITE_ARMOR, + AquariaLocationNames.ENERGY_TEMPLE_THIRD_AREA_BULB_IN_THE_BOTTOM_PATH, + AquariaLocationNames.ENERGY_TEMPLE_BLASTER_ROOM_BLASTER_EGG, + AquariaLocationNames.ENERGY_TEMPLE_BOSS_AREA_FALLEN_GOD_TOOTH, + AquariaLocationNames.MITHALAS_CITY_CASTLE_BEATING_THE_PRIESTS, + AquariaLocationNames.MITHALAS_BOSS_AREA_BEATING_MITHALAN_GOD, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_BULB_CLOSE_TO_THE_VERSE_EGG, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_VERSE_EGG, + AquariaLocationNames.KELP_FOREST_BOSS_AREA_BEATING_DRUNIAN_GOD, + AquariaLocationNames.MERMOG_CAVE_PIRANHA_EGG, + AquariaLocationNames.OCTOPUS_CAVE_DUMBO_EGG, + AquariaLocationNames.SUN_TEMPLE_BOSS_AREA_BEATING_LUMEREAN_GOD, + AquariaLocationNames.KING_JELLYFISH_CAVE_BULB_IN_THE_RIGHT_PATH_FROM_KING_JELLY, + AquariaLocationNames.KING_JELLYFISH_CAVE_JELLYFISH_COSTUME, + AquariaLocationNames.SUNKEN_CITY_RIGHT_AREA_CRATE_CLOSE_TO_THE_SAVE_CRYSTAL, + AquariaLocationNames.SUNKEN_CITY_RIGHT_AREA_CRATE_IN_THE_LEFT_BOTTOM_ROOM, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_IN_THE_LITTLE_PIPE_ROOM, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_CLOSE_TO_THE_SAVE_CRYSTAL, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_BEFORE_THE_BEDROOM, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_GIRL_COSTUME, + AquariaLocationNames.SUNKEN_CITY_BULB_ON_TOP_OF_THE_BOSS_AREA, + AquariaLocationNames.THE_BODY_CENTER_AREA_BREAKING_LI_S_CAGE, + AquariaLocationNames.THE_BODY_CENTER_AREA_BULB_ON_THE_MAIN_PATH_BLOCKING_TUBE, + AquariaLocationNames.THE_BODY_LEFT_AREA_FIRST_BULB_IN_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_LEFT_AREA_SECOND_BULB_IN_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_BELOW_THE_WATER_STREAM, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_IN_THE_TOP_PATH_TO_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_IN_THE_BOTTOM_FACE_ROOM, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_TOP_PATH_TO_THE_BOTTOM_FACE_ROOM, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_BOTTOM_FACE_ROOM, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_BULB_IN_THE_JELLY_ZAP_ROOM, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_BULB_IN_THE_NAUTILUS_ROOM, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_MUTANT_COSTUME, + AquariaLocationNames.FINAL_BOSS_AREA_BULB_IN_THE_BOSS_THIRD_FORM_ROOM, + AquariaLocationNames.BEATING_FALLEN_GOD, + AquariaLocationNames.BEATING_BLASTER_PEG_PRIME, + AquariaLocationNames.BEATING_MITHALAN_GOD, + AquariaLocationNames.BEATING_DRUNIAN_GOD, + AquariaLocationNames.BEATING_LUMEREAN_GOD, + AquariaLocationNames.BEATING_THE_GOLEM, + AquariaLocationNames.BEATING_NAUTILUS_PRIME, + AquariaLocationNames.BEATING_MERGOG, + AquariaLocationNames.BEATING_MITHALAN_PRIESTS, + AquariaLocationNames.BEATING_OCTOPUS_PRIME, + AquariaLocationNames.BEATING_KING_JELLYFISH_GOD_PRIME, + AquariaLocationNames.BEATING_THE_GOLEM, + AquariaLocationNames.SUNKEN_CITY_CLEARED, + AquariaLocationNames.FIRST_SECRET, + AquariaLocationNames.OBJECTIVE_COMPLETE ] - items = [["Energy form", "Dual form", "Li and Li song", "Body tongue cleared"]] + items = [[ItemNames.ENERGY_FORM, ItemNames.DUAL_FORM, ItemNames.LI_AND_LI_SONG, ItemNames.BODY_TONGUE_CLEARED]] self.assertAccessDependency(locations, items) diff --git a/worlds/aquaria/test/test_fish_form_access.py b/worlds/aquaria/test/test_fish_form_access.py index 40b15a87cd35..3cbc750c7039 100644 --- a/worlds/aquaria/test/test_fish_form_access.py +++ b/worlds/aquaria/test/test_fish_form_access.py @@ -5,33 +5,36 @@ """ from . import AquariaTestBase +from ..Items import ItemNames +from ..Locations import AquariaLocationNames +from ..Options import TurtleRandomizer class FishFormAccessTest(AquariaTestBase): """Unit test used to test accessibility of locations with and without the fish form""" options = { - "turtle_randomizer": 1, + "turtle_randomizer": TurtleRandomizer.option_all, } def test_fish_form_location(self) -> None: """Test locations that require fish form""" locations = [ - "The Veil top left area, bulb inside the fish pass", - "Energy Temple first area, Energy Idol", - "Mithalas City, Doll", - "Mithalas City, urn inside a home fish pass", - "Kelp Forest top right area, bulb in the top fish pass", - "The Veil bottom area, Verse Egg", - "Open Water bottom left area, bulb inside the lowest fish pass", - "Kelp Forest top left area, bulb close to the Verse Egg", - "Kelp Forest top left area, Verse Egg", - "Mermog cave, bulb in the left part of the cave", - "Mermog cave, Piranha Egg", - "Beating Mergog", - "Octopus Cave, Dumbo Egg", - "Octopus Cave, bulb in the path below the Octopus Cave path", - "Beating Octopus Prime", - "Abyss left area, bulb in the bottom fish pass" + AquariaLocationNames.THE_VEIL_TOP_LEFT_AREA_BULB_INSIDE_THE_FISH_PASS, + AquariaLocationNames.ENERGY_TEMPLE_ENERGY_IDOL, + AquariaLocationNames.MITHALAS_CITY_DOLL, + AquariaLocationNames.MITHALAS_CITY_URN_INSIDE_A_HOME_FISH_PASS, + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BULB_IN_THE_TOP_FISH_PASS, + AquariaLocationNames.THE_VEIL_BOTTOM_AREA_VERSE_EGG, + AquariaLocationNames.OPEN_WATERS_BOTTOM_LEFT_AREA_BULB_INSIDE_THE_LOWEST_FISH_PASS, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_BULB_CLOSE_TO_THE_VERSE_EGG, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_VERSE_EGG, + AquariaLocationNames.MERMOG_CAVE_BULB_IN_THE_LEFT_PART_OF_THE_CAVE, + AquariaLocationNames.MERMOG_CAVE_PIRANHA_EGG, + AquariaLocationNames.BEATING_MERGOG, + AquariaLocationNames.OCTOPUS_CAVE_DUMBO_EGG, + AquariaLocationNames.OCTOPUS_CAVE_BULB_IN_THE_PATH_BELOW_THE_OCTOPUS_CAVE_PATH, + AquariaLocationNames.BEATING_OCTOPUS_PRIME, + AquariaLocationNames.ABYSS_LEFT_AREA_BULB_IN_THE_BOTTOM_FISH_PASS ] - items = [["Fish form"]] + items = [[ItemNames.FISH_FORM]] self.assertAccessDependency(locations, items) diff --git a/worlds/aquaria/test/test_li_song_access.py b/worlds/aquaria/test/test_li_song_access.py index f615fb10c640..6c8d6e5eebba 100644 --- a/worlds/aquaria/test/test_li_song_access.py +++ b/worlds/aquaria/test/test_li_song_access.py @@ -5,41 +5,44 @@ """ from . import AquariaTestBase +from ..Items import ItemNames +from ..Locations import AquariaLocationNames +from ..Options import TurtleRandomizer class LiAccessTest(AquariaTestBase): """Unit test used to test accessibility of locations with and without Li""" options = { - "turtle_randomizer": 1, + "turtle_randomizer": TurtleRandomizer.option_all, } def test_li_song_location(self) -> None: """Test locations that require Li""" locations = [ - "Sunken City right area, crate close to the save crystal", - "Sunken City right area, crate in the left bottom room", - "Sunken City left area, crate in the little pipe room", - "Sunken City left area, crate close to the save crystal", - "Sunken City left area, crate before the bedroom", - "Sunken City left area, Girl Costume", - "Sunken City, bulb on top of the boss area", - "The Body center area, breaking Li's cage", - "The Body center area, bulb on the main path blocking tube", - "The Body left area, first bulb in the top face room", - "The Body left area, second bulb in the top face room", - "The Body left area, bulb below the water stream", - "The Body left area, bulb in the top path to the top face room", - "The Body left area, bulb in the bottom face room", - "The Body right area, bulb in the top face room", - "The Body right area, bulb in the top path to the bottom face room", - "The Body right area, bulb in the bottom face room", - "The Body bottom area, bulb in the Jelly Zap room", - "The Body bottom area, bulb in the nautilus room", - "The Body bottom area, Mutant Costume", - "Final Boss area, bulb in the boss third form room", - "Beating the Golem", - "Sunken City cleared", - "Objective complete" + AquariaLocationNames.SUNKEN_CITY_RIGHT_AREA_CRATE_CLOSE_TO_THE_SAVE_CRYSTAL, + AquariaLocationNames.SUNKEN_CITY_RIGHT_AREA_CRATE_IN_THE_LEFT_BOTTOM_ROOM, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_IN_THE_LITTLE_PIPE_ROOM, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_CLOSE_TO_THE_SAVE_CRYSTAL, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_BEFORE_THE_BEDROOM, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_GIRL_COSTUME, + AquariaLocationNames.SUNKEN_CITY_BULB_ON_TOP_OF_THE_BOSS_AREA, + AquariaLocationNames.THE_BODY_CENTER_AREA_BREAKING_LI_S_CAGE, + AquariaLocationNames.THE_BODY_CENTER_AREA_BULB_ON_THE_MAIN_PATH_BLOCKING_TUBE, + AquariaLocationNames.THE_BODY_LEFT_AREA_FIRST_BULB_IN_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_LEFT_AREA_SECOND_BULB_IN_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_BELOW_THE_WATER_STREAM, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_IN_THE_TOP_PATH_TO_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_IN_THE_BOTTOM_FACE_ROOM, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_TOP_PATH_TO_THE_BOTTOM_FACE_ROOM, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_BOTTOM_FACE_ROOM, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_BULB_IN_THE_JELLY_ZAP_ROOM, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_BULB_IN_THE_NAUTILUS_ROOM, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_MUTANT_COSTUME, + AquariaLocationNames.FINAL_BOSS_AREA_BULB_IN_THE_BOSS_THIRD_FORM_ROOM, + AquariaLocationNames.BEATING_THE_GOLEM, + AquariaLocationNames.SUNKEN_CITY_CLEARED, + AquariaLocationNames.OBJECTIVE_COMPLETE ] - items = [["Li and Li song", "Body tongue cleared"]] + items = [[ItemNames.LI_AND_LI_SONG, ItemNames.BODY_TONGUE_CLEARED]] self.assertAccessDependency(locations, items) diff --git a/worlds/aquaria/test/test_light_access.py b/worlds/aquaria/test/test_light_access.py index 29d37d790b20..ca668505f7d2 100644 --- a/worlds/aquaria/test/test_light_access.py +++ b/worlds/aquaria/test/test_light_access.py @@ -5,12 +5,15 @@ """ from . import AquariaTestBase +from ..Items import ItemNames +from ..Locations import AquariaLocationNames +from ..Options import TurtleRandomizer class LightAccessTest(AquariaTestBase): """Unit test used to test accessibility of locations with and without light""" options = { - "turtle_randomizer": 1, + "turtle_randomizer": TurtleRandomizer.option_all, "light_needed_to_get_to_dark_places": True, } @@ -19,52 +22,52 @@ def test_light_location(self) -> None: locations = [ # Since the `assertAccessDependency` sweep for events even if I tell it not to, those location cannot be # tested. - # "Third secret", - # "Sun Temple, bulb in the top left part", - # "Sun Temple, bulb in the top right part", - # "Sun Temple, bulb at the top of the high dark room", - # "Sun Temple, Golden Gear", - # "Sun Worm path, first path bulb", - # "Sun Worm path, second path bulb", - # "Sun Worm path, first cliff bulb", - "Octopus Cave, Dumbo Egg", - "Kelp Forest bottom right area, Odd Container", - "Kelp Forest top right area, Black Pearl", - "Abyss left area, bulb in hidden path room", - "Abyss left area, bulb in the right part", - "Abyss left area, Glowing Seed", - "Abyss left area, Glowing Plant", - "Abyss left area, bulb in the bottom fish pass", - "Abyss right area, bulb behind the rock in the whale room", - "Abyss right area, bulb in the middle path", - "Abyss right area, bulb behind the rock in the middle path", - "Abyss right area, bulb in the left green room", - "Ice Cave, bulb in the room to the right", - "Ice Cave, first bulb in the top exit room", - "Ice Cave, second bulb in the top exit room", - "Ice Cave, third bulb in the top exit room", - "Ice Cave, bulb in the left room", - "Bubble Cave, bulb in the left cave wall", - "Bubble Cave, bulb in the right cave wall (behind the ice crystal)", - "Bubble Cave, Verse Egg", - "Beating Mantis Shrimp Prime", - "King Jellyfish Cave, bulb in the right path from King Jelly", - "King Jellyfish Cave, Jellyfish Costume", - "Beating King Jellyfish God Prime", - "The Whale, Verse Egg", - "First secret", - "Sunken City right area, crate close to the save crystal", - "Sunken City right area, crate in the left bottom room", - "Sunken City left area, crate in the little pipe room", - "Sunken City left area, crate close to the save crystal", - "Sunken City left area, crate before the bedroom", - "Sunken City left area, Girl Costume", - "Sunken City, bulb on top of the boss area", - "Sunken City cleared", - "Beating the Golem", - "Beating Octopus Prime", - "Final Boss area, bulb in the boss third form room", - "Objective complete", + # AquariaLocationNames.THIRD_SECRET, + # AquariaLocationNames.SUN_TEMPLE_BULB_IN_THE_TOP_LEFT_PART, + # AquariaLocationNames.SUN_TEMPLE_BULB_IN_THE_TOP_RIGHT_PART, + # AquariaLocationNames.SUN_TEMPLE_BULB_AT_THE_TOP_OF_THE_HIGH_DARK_ROOM, + # AquariaLocationNames.SUN_TEMPLE_GOLDEN_GEAR, + # AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_FIRST_PATH_BULB, + # AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_SECOND_PATH_BULB, + # AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_FIRST_CLIFF_BULB, + AquariaLocationNames.OCTOPUS_CAVE_DUMBO_EGG, + AquariaLocationNames.KELP_FOREST_BOTTOM_RIGHT_AREA_ODD_CONTAINER, + AquariaLocationNames.KELP_FOREST_TOP_RIGHT_AREA_BLACK_PEARL, + AquariaLocationNames.ABYSS_LEFT_AREA_BULB_IN_HIDDEN_PATH_ROOM, + AquariaLocationNames.ABYSS_LEFT_AREA_BULB_IN_THE_RIGHT_PART, + AquariaLocationNames.ABYSS_LEFT_AREA_GLOWING_SEED, + AquariaLocationNames.ABYSS_LEFT_AREA_GLOWING_PLANT, + AquariaLocationNames.ABYSS_LEFT_AREA_BULB_IN_THE_BOTTOM_FISH_PASS, + AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_BEHIND_THE_ROCK_IN_THE_WHALE_ROOM, + AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_IN_THE_MIDDLE_PATH, + AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_BEHIND_THE_ROCK_IN_THE_MIDDLE_PATH, + AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_IN_THE_LEFT_GREEN_ROOM, + AquariaLocationNames.ICE_CAVERN_BULB_IN_THE_ROOM_TO_THE_RIGHT, + AquariaLocationNames.ICE_CAVERN_FIRST_BULB_IN_THE_TOP_EXIT_ROOM, + AquariaLocationNames.ICE_CAVERN_SECOND_BULB_IN_THE_TOP_EXIT_ROOM, + AquariaLocationNames.ICE_CAVERN_THIRD_BULB_IN_THE_TOP_EXIT_ROOM, + AquariaLocationNames.ICE_CAVERN_BULB_IN_THE_LEFT_ROOM, + AquariaLocationNames.BUBBLE_CAVE_BULB_IN_THE_LEFT_CAVE_WALL, + AquariaLocationNames.BUBBLE_CAVE_BULB_IN_THE_RIGHT_CAVE_WALL_BEHIND_THE_ICE_CRYSTAL, + AquariaLocationNames.BUBBLE_CAVE_VERSE_EGG, + AquariaLocationNames.BEATING_MANTIS_SHRIMP_PRIME, + AquariaLocationNames.KING_JELLYFISH_CAVE_BULB_IN_THE_RIGHT_PATH_FROM_KING_JELLY, + AquariaLocationNames.KING_JELLYFISH_CAVE_JELLYFISH_COSTUME, + AquariaLocationNames.BEATING_KING_JELLYFISH_GOD_PRIME, + AquariaLocationNames.THE_WHALE_VERSE_EGG, + AquariaLocationNames.FIRST_SECRET, + AquariaLocationNames.SUNKEN_CITY_RIGHT_AREA_CRATE_CLOSE_TO_THE_SAVE_CRYSTAL, + AquariaLocationNames.SUNKEN_CITY_RIGHT_AREA_CRATE_IN_THE_LEFT_BOTTOM_ROOM, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_IN_THE_LITTLE_PIPE_ROOM, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_CLOSE_TO_THE_SAVE_CRYSTAL, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_BEFORE_THE_BEDROOM, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_GIRL_COSTUME, + AquariaLocationNames.SUNKEN_CITY_BULB_ON_TOP_OF_THE_BOSS_AREA, + AquariaLocationNames.SUNKEN_CITY_CLEARED, + AquariaLocationNames.BEATING_THE_GOLEM, + AquariaLocationNames.BEATING_OCTOPUS_PRIME, + AquariaLocationNames.FINAL_BOSS_AREA_BULB_IN_THE_BOSS_THIRD_FORM_ROOM, + AquariaLocationNames.OBJECTIVE_COMPLETE, ] - items = [["Sun form", "Baby Dumbo", "Has sun crystal"]] + items = [[ItemNames.SUN_FORM, ItemNames.BABY_DUMBO, ItemNames.HAS_SUN_CRYSTAL]] self.assertAccessDependency(locations, items) diff --git a/worlds/aquaria/test/test_nature_form_access.py b/worlds/aquaria/test/test_nature_form_access.py index 1d3b8f4150eb..61aebaef4816 100644 --- a/worlds/aquaria/test/test_nature_form_access.py +++ b/worlds/aquaria/test/test_nature_form_access.py @@ -5,53 +5,56 @@ """ from . import AquariaTestBase +from ..Items import ItemNames +from ..Locations import AquariaLocationNames +from ..Options import TurtleRandomizer class NatureFormAccessTest(AquariaTestBase): """Unit test used to test accessibility of locations with and without the nature form""" options = { - "turtle_randomizer": 1, + "turtle_randomizer": TurtleRandomizer.option_all, } def test_nature_form_location(self) -> None: """Test locations that require nature form""" locations = [ - "Song Cave, Anemone Seed", - "Energy Temple blaster room, Blaster Egg", - "Beating Blaster Peg Prime", - "Kelp Forest top left area, Verse Egg", - "Kelp Forest top left area, bulb close to the Verse Egg", - "Mithalas City Castle, beating the Priests", - "Kelp Forest sprite cave, bulb in the second room", - "Kelp Forest sprite cave, Seed Bag", - "Beating Mithalan priests", - "Abyss left area, bulb in the bottom fish pass", - "Bubble Cave, Verse Egg", - "Beating Mantis Shrimp Prime", - "Sunken City right area, crate close to the save crystal", - "Sunken City right area, crate in the left bottom room", - "Sunken City left area, crate in the little pipe room", - "Sunken City left area, crate close to the save crystal", - "Sunken City left area, crate before the bedroom", - "Sunken City left area, Girl Costume", - "Sunken City, bulb on top of the boss area", - "Beating the Golem", - "Sunken City cleared", - "The Body center area, breaking Li's cage", - "The Body center area, bulb on the main path blocking tube", - "The Body left area, first bulb in the top face room", - "The Body left area, second bulb in the top face room", - "The Body left area, bulb below the water stream", - "The Body left area, bulb in the top path to the top face room", - "The Body left area, bulb in the bottom face room", - "The Body right area, bulb in the top face room", - "The Body right area, bulb in the top path to the bottom face room", - "The Body right area, bulb in the bottom face room", - "The Body bottom area, bulb in the Jelly Zap room", - "The Body bottom area, bulb in the nautilus room", - "The Body bottom area, Mutant Costume", - "Final Boss area, bulb in the boss third form room", - "Objective complete" + AquariaLocationNames.SONG_CAVE_ANEMONE_SEED, + AquariaLocationNames.ENERGY_TEMPLE_BLASTER_ROOM_BLASTER_EGG, + AquariaLocationNames.BEATING_BLASTER_PEG_PRIME, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_VERSE_EGG, + AquariaLocationNames.KELP_FOREST_TOP_LEFT_AREA_BULB_CLOSE_TO_THE_VERSE_EGG, + AquariaLocationNames.MITHALAS_CITY_CASTLE_BEATING_THE_PRIESTS, + AquariaLocationNames.KELP_FOREST_SPRITE_CAVE_BULB_IN_THE_SECOND_ROOM, + AquariaLocationNames.KELP_FOREST_SPRITE_CAVE_SEED_BAG, + AquariaLocationNames.BEATING_MITHALAN_PRIESTS, + AquariaLocationNames.ABYSS_LEFT_AREA_BULB_IN_THE_BOTTOM_FISH_PASS, + AquariaLocationNames.BUBBLE_CAVE_VERSE_EGG, + AquariaLocationNames.BEATING_MANTIS_SHRIMP_PRIME, + AquariaLocationNames.SUNKEN_CITY_RIGHT_AREA_CRATE_CLOSE_TO_THE_SAVE_CRYSTAL, + AquariaLocationNames.SUNKEN_CITY_RIGHT_AREA_CRATE_IN_THE_LEFT_BOTTOM_ROOM, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_IN_THE_LITTLE_PIPE_ROOM, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_CLOSE_TO_THE_SAVE_CRYSTAL, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_CRATE_BEFORE_THE_BEDROOM, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_GIRL_COSTUME, + AquariaLocationNames.SUNKEN_CITY_BULB_ON_TOP_OF_THE_BOSS_AREA, + AquariaLocationNames.BEATING_THE_GOLEM, + AquariaLocationNames.SUNKEN_CITY_CLEARED, + AquariaLocationNames.THE_BODY_CENTER_AREA_BREAKING_LI_S_CAGE, + AquariaLocationNames.THE_BODY_CENTER_AREA_BULB_ON_THE_MAIN_PATH_BLOCKING_TUBE, + AquariaLocationNames.THE_BODY_LEFT_AREA_FIRST_BULB_IN_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_LEFT_AREA_SECOND_BULB_IN_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_BELOW_THE_WATER_STREAM, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_IN_THE_TOP_PATH_TO_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_LEFT_AREA_BULB_IN_THE_BOTTOM_FACE_ROOM, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_TOP_FACE_ROOM, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_TOP_PATH_TO_THE_BOTTOM_FACE_ROOM, + AquariaLocationNames.THE_BODY_RIGHT_AREA_BULB_IN_THE_BOTTOM_FACE_ROOM, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_BULB_IN_THE_JELLY_ZAP_ROOM, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_BULB_IN_THE_NAUTILUS_ROOM, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_MUTANT_COSTUME, + AquariaLocationNames.FINAL_BOSS_AREA_BULB_IN_THE_BOSS_THIRD_FORM_ROOM, + AquariaLocationNames.OBJECTIVE_COMPLETE ] - items = [["Nature form"]] + items = [[ItemNames.NATURE_FORM]] self.assertAccessDependency(locations, items) diff --git a/worlds/aquaria/test/test_no_progression_hard_hidden_locations.py b/worlds/aquaria/test/test_no_progression_hard_hidden_locations.py index 517af3028dd2..65139088f27c 100644 --- a/worlds/aquaria/test/test_no_progression_hard_hidden_locations.py +++ b/worlds/aquaria/test/test_no_progression_hard_hidden_locations.py @@ -6,6 +6,7 @@ from . import AquariaTestBase from BaseClasses import ItemClassification +from ..Locations import AquariaLocationNames class UNoProgressionHardHiddenTest(AquariaTestBase): @@ -15,31 +16,31 @@ class UNoProgressionHardHiddenTest(AquariaTestBase): } unfillable_locations = [ - "Energy Temple boss area, Fallen God Tooth", - "Mithalas boss area, beating Mithalan God", - "Kelp Forest boss area, beating Drunian God", - "Sun Temple boss area, beating Sun God", - "Sunken City, bulb on top of the boss area", - "Home Water, Nautilus Egg", - "Energy Temple blaster room, Blaster Egg", - "Mithalas City Castle, beating the Priests", - "Mermog cave, Piranha Egg", - "Octopus Cave, Dumbo Egg", - "King Jellyfish Cave, bulb in the right path from King Jelly", - "King Jellyfish Cave, Jellyfish Costume", - "Final Boss area, bulb in the boss third form room", - "Sun Worm path, first cliff bulb", - "Sun Worm path, second cliff bulb", - "The Veil top right area, bulb at the top of the waterfall", - "Bubble Cave, bulb in the left cave wall", - "Bubble Cave, bulb in the right cave wall (behind the ice crystal)", - "Bubble Cave, Verse Egg", - "Kelp Forest bottom left area, bulb close to the spirit crystals", - "Kelp Forest bottom left area, Walker Baby", - "Sun Temple, Sun Key", - "The Body bottom area, Mutant Costume", - "Sun Temple, bulb in the hidden room of the right part", - "Arnassi Ruins, Arnassi Armor", + AquariaLocationNames.ENERGY_TEMPLE_BOSS_AREA_FALLEN_GOD_TOOTH, + AquariaLocationNames.MITHALAS_BOSS_AREA_BEATING_MITHALAN_GOD, + AquariaLocationNames.KELP_FOREST_BOSS_AREA_BEATING_DRUNIAN_GOD, + AquariaLocationNames.SUN_TEMPLE_BOSS_AREA_BEATING_LUMEREAN_GOD, + AquariaLocationNames.SUNKEN_CITY_BULB_ON_TOP_OF_THE_BOSS_AREA, + AquariaLocationNames.HOME_WATERS_NAUTILUS_EGG, + AquariaLocationNames.ENERGY_TEMPLE_BLASTER_ROOM_BLASTER_EGG, + AquariaLocationNames.MITHALAS_CITY_CASTLE_BEATING_THE_PRIESTS, + AquariaLocationNames.MERMOG_CAVE_PIRANHA_EGG, + AquariaLocationNames.OCTOPUS_CAVE_DUMBO_EGG, + AquariaLocationNames.KING_JELLYFISH_CAVE_BULB_IN_THE_RIGHT_PATH_FROM_KING_JELLY, + AquariaLocationNames.KING_JELLYFISH_CAVE_JELLYFISH_COSTUME, + AquariaLocationNames.FINAL_BOSS_AREA_BULB_IN_THE_BOSS_THIRD_FORM_ROOM, + AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_FIRST_CLIFF_BULB, + AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_SECOND_CLIFF_BULB, + AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_BULB_AT_THE_TOP_OF_THE_WATERFALL, + AquariaLocationNames.BUBBLE_CAVE_BULB_IN_THE_LEFT_CAVE_WALL, + AquariaLocationNames.BUBBLE_CAVE_BULB_IN_THE_RIGHT_CAVE_WALL_BEHIND_THE_ICE_CRYSTAL, + AquariaLocationNames.BUBBLE_CAVE_VERSE_EGG, + AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_BULB_CLOSE_TO_THE_SPIRIT_CRYSTALS, + AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_WALKER_BABY, + AquariaLocationNames.SUN_TEMPLE_SUN_KEY, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_MUTANT_COSTUME, + AquariaLocationNames.SUN_TEMPLE_BULB_IN_THE_HIDDEN_ROOM_OF_THE_RIGHT_PART, + AquariaLocationNames.ARNASSI_RUINS_ARNASSI_ARMOR, ] def test_unconfine_home_water_both_location_fillable(self) -> None: diff --git a/worlds/aquaria/test/test_progression_hard_hidden_locations.py b/worlds/aquaria/test/test_progression_hard_hidden_locations.py index a1493c5d0f39..f6ac8e0e17e2 100644 --- a/worlds/aquaria/test/test_progression_hard_hidden_locations.py +++ b/worlds/aquaria/test/test_progression_hard_hidden_locations.py @@ -5,6 +5,7 @@ """ from . import AquariaTestBase +from ..Locations import AquariaLocationNames class UNoProgressionHardHiddenTest(AquariaTestBase): @@ -14,31 +15,31 @@ class UNoProgressionHardHiddenTest(AquariaTestBase): } unfillable_locations = [ - "Energy Temple boss area, Fallen God Tooth", - "Mithalas boss area, beating Mithalan God", - "Kelp Forest boss area, beating Drunian God", - "Sun Temple boss area, beating Sun God", - "Sunken City, bulb on top of the boss area", - "Home Water, Nautilus Egg", - "Energy Temple blaster room, Blaster Egg", - "Mithalas City Castle, beating the Priests", - "Mermog cave, Piranha Egg", - "Octopus Cave, Dumbo Egg", - "King Jellyfish Cave, bulb in the right path from King Jelly", - "King Jellyfish Cave, Jellyfish Costume", - "Final Boss area, bulb in the boss third form room", - "Sun Worm path, first cliff bulb", - "Sun Worm path, second cliff bulb", - "The Veil top right area, bulb at the top of the waterfall", - "Bubble Cave, bulb in the left cave wall", - "Bubble Cave, bulb in the right cave wall (behind the ice crystal)", - "Bubble Cave, Verse Egg", - "Kelp Forest bottom left area, bulb close to the spirit crystals", - "Kelp Forest bottom left area, Walker Baby", - "Sun Temple, Sun Key", - "The Body bottom area, Mutant Costume", - "Sun Temple, bulb in the hidden room of the right part", - "Arnassi Ruins, Arnassi Armor", + AquariaLocationNames.ENERGY_TEMPLE_BOSS_AREA_FALLEN_GOD_TOOTH, + AquariaLocationNames.MITHALAS_BOSS_AREA_BEATING_MITHALAN_GOD, + AquariaLocationNames.KELP_FOREST_BOSS_AREA_BEATING_DRUNIAN_GOD, + AquariaLocationNames.SUN_TEMPLE_BOSS_AREA_BEATING_LUMEREAN_GOD, + AquariaLocationNames.SUNKEN_CITY_BULB_ON_TOP_OF_THE_BOSS_AREA, + AquariaLocationNames.HOME_WATERS_NAUTILUS_EGG, + AquariaLocationNames.ENERGY_TEMPLE_BLASTER_ROOM_BLASTER_EGG, + AquariaLocationNames.MITHALAS_CITY_CASTLE_BEATING_THE_PRIESTS, + AquariaLocationNames.MERMOG_CAVE_PIRANHA_EGG, + AquariaLocationNames.OCTOPUS_CAVE_DUMBO_EGG, + AquariaLocationNames.KING_JELLYFISH_CAVE_BULB_IN_THE_RIGHT_PATH_FROM_KING_JELLY, + AquariaLocationNames.KING_JELLYFISH_CAVE_JELLYFISH_COSTUME, + AquariaLocationNames.FINAL_BOSS_AREA_BULB_IN_THE_BOSS_THIRD_FORM_ROOM, + AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_FIRST_CLIFF_BULB, + AquariaLocationNames.SUN_TEMPLE_BOSS_PATH_SECOND_CLIFF_BULB, + AquariaLocationNames.THE_VEIL_TOP_RIGHT_AREA_BULB_AT_THE_TOP_OF_THE_WATERFALL, + AquariaLocationNames.BUBBLE_CAVE_BULB_IN_THE_LEFT_CAVE_WALL, + AquariaLocationNames.BUBBLE_CAVE_BULB_IN_THE_RIGHT_CAVE_WALL_BEHIND_THE_ICE_CRYSTAL, + AquariaLocationNames.BUBBLE_CAVE_VERSE_EGG, + AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_BULB_CLOSE_TO_THE_SPIRIT_CRYSTALS, + AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_WALKER_BABY, + AquariaLocationNames.SUN_TEMPLE_SUN_KEY, + AquariaLocationNames.THE_BODY_BOTTOM_AREA_MUTANT_COSTUME, + AquariaLocationNames.SUN_TEMPLE_BULB_IN_THE_HIDDEN_ROOM_OF_THE_RIGHT_PART, + AquariaLocationNames.ARNASSI_RUINS_ARNASSI_ARMOR, ] def test_unconfine_home_water_both_location_fillable(self) -> None: diff --git a/worlds/aquaria/test/test_spirit_form_access.py b/worlds/aquaria/test/test_spirit_form_access.py index 7e31de9905e9..834661e0bd4d 100644 --- a/worlds/aquaria/test/test_spirit_form_access.py +++ b/worlds/aquaria/test/test_spirit_form_access.py @@ -5,6 +5,8 @@ """ from . import AquariaTestBase +from ..Items import ItemNames +from ..Locations import AquariaLocationNames class SpiritFormAccessTest(AquariaTestBase): @@ -13,23 +15,23 @@ class SpiritFormAccessTest(AquariaTestBase): def test_spirit_form_location(self) -> None: """Test locations that require spirit form""" locations = [ - "The Veil bottom area, bulb in the spirit path", - "Mithalas City Castle, Trident Head", - "Open Water skeleton path, King Skull", - "Kelp Forest bottom left area, Walker Baby", - "Abyss right area, bulb behind the rock in the whale room", - "The Whale, Verse Egg", - "Ice Cave, bulb in the room to the right", - "Ice Cave, first bulb in the top exit room", - "Ice Cave, second bulb in the top exit room", - "Ice Cave, third bulb in the top exit room", - "Ice Cave, bulb in the left room", - "Bubble Cave, bulb in the left cave wall", - "Bubble Cave, bulb in the right cave wall (behind the ice crystal)", - "Bubble Cave, Verse Egg", - "Sunken City left area, Girl Costume", - "Beating Mantis Shrimp Prime", - "First secret", + AquariaLocationNames.THE_VEIL_BOTTOM_AREA_BULB_IN_THE_SPIRIT_PATH, + AquariaLocationNames.MITHALAS_CITY_CASTLE_TRIDENT_HEAD, + AquariaLocationNames.OPEN_WATERS_SKELETON_PATH_KING_SKULL, + AquariaLocationNames.KELP_FOREST_BOTTOM_LEFT_AREA_WALKER_BABY, + AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_BEHIND_THE_ROCK_IN_THE_WHALE_ROOM, + AquariaLocationNames.THE_WHALE_VERSE_EGG, + AquariaLocationNames.ICE_CAVERN_BULB_IN_THE_ROOM_TO_THE_RIGHT, + AquariaLocationNames.ICE_CAVERN_FIRST_BULB_IN_THE_TOP_EXIT_ROOM, + AquariaLocationNames.ICE_CAVERN_SECOND_BULB_IN_THE_TOP_EXIT_ROOM, + AquariaLocationNames.ICE_CAVERN_THIRD_BULB_IN_THE_TOP_EXIT_ROOM, + AquariaLocationNames.ICE_CAVERN_BULB_IN_THE_LEFT_ROOM, + AquariaLocationNames.BUBBLE_CAVE_BULB_IN_THE_LEFT_CAVE_WALL, + AquariaLocationNames.BUBBLE_CAVE_BULB_IN_THE_RIGHT_CAVE_WALL_BEHIND_THE_ICE_CRYSTAL, + AquariaLocationNames.BUBBLE_CAVE_VERSE_EGG, + AquariaLocationNames.SUNKEN_CITY_LEFT_AREA_GIRL_COSTUME, + AquariaLocationNames.BEATING_MANTIS_SHRIMP_PRIME, + AquariaLocationNames.FIRST_SECRET, ] - items = [["Spirit form"]] + items = [[ItemNames.SPIRIT_FORM]] self.assertAccessDependency(locations, items) diff --git a/worlds/aquaria/test/test_sun_form_access.py b/worlds/aquaria/test/test_sun_form_access.py index 394d5e4b27ae..b37cceeed9c3 100644 --- a/worlds/aquaria/test/test_sun_form_access.py +++ b/worlds/aquaria/test/test_sun_form_access.py @@ -5,6 +5,8 @@ """ from . import AquariaTestBase +from ..Items import ItemNames +from ..Locations import AquariaLocationNames class SunFormAccessTest(AquariaTestBase): @@ -13,16 +15,16 @@ class SunFormAccessTest(AquariaTestBase): def test_sun_form_location(self) -> None: """Test locations that require sun form""" locations = [ - "First secret", - "The Whale, Verse Egg", - "Abyss right area, bulb behind the rock in the whale room", - "Octopus Cave, Dumbo Egg", - "Beating Octopus Prime", - "Sunken City, bulb on top of the boss area", - "Beating the Golem", - "Sunken City cleared", - "Final Boss area, bulb in the boss third form room", - "Objective complete" + AquariaLocationNames.FIRST_SECRET, + AquariaLocationNames.THE_WHALE_VERSE_EGG, + AquariaLocationNames.ABYSS_RIGHT_AREA_BULB_BEHIND_THE_ROCK_IN_THE_WHALE_ROOM, + AquariaLocationNames.OCTOPUS_CAVE_DUMBO_EGG, + AquariaLocationNames.BEATING_OCTOPUS_PRIME, + AquariaLocationNames.SUNKEN_CITY_BULB_ON_TOP_OF_THE_BOSS_AREA, + AquariaLocationNames.BEATING_THE_GOLEM, + AquariaLocationNames.SUNKEN_CITY_CLEARED, + AquariaLocationNames.FINAL_BOSS_AREA_BULB_IN_THE_BOSS_THIRD_FORM_ROOM, + AquariaLocationNames.OBJECTIVE_COMPLETE ] - items = [["Sun form"]] + items = [[ItemNames.SUN_FORM]] self.assertAccessDependency(locations, items) diff --git a/worlds/aquaria/test/test_unconfine_home_water_via_both.py b/worlds/aquaria/test/test_unconfine_home_water_via_both.py index 5b8689bc53a2..038e27782a16 100644 --- a/worlds/aquaria/test/test_unconfine_home_water_via_both.py +++ b/worlds/aquaria/test/test_unconfine_home_water_via_both.py @@ -6,16 +6,17 @@ """ from . import AquariaTestBase +from ..Options import UnconfineHomeWater, EarlyEnergyForm class UnconfineHomeWaterBothAccessTest(AquariaTestBase): """Unit test used to test accessibility of region with the unconfine home water option enabled""" options = { - "unconfine_home_water": 3, - "early_energy_form": False + "unconfine_home_water": UnconfineHomeWater.option_via_both, + "early_energy_form": EarlyEnergyForm.option_off } def test_unconfine_home_water_both_location(self) -> None: """Test locations accessible with unconfined home water via energy door and transportation turtle""" - self.assertTrue(self.can_reach_region("Open Water top left area"), "Cannot reach Open Water top left area") - self.assertTrue(self.can_reach_region("Home Water, turtle room"), "Cannot reach Home Water, turtle room") + self.assertTrue(self.can_reach_region("Open Waters top left area"), "Cannot reach Open Waters top left area") + self.assertTrue(self.can_reach_region("Home Waters, turtle room"), "Cannot reach Home Waters, turtle room") diff --git a/worlds/aquaria/test/test_unconfine_home_water_via_energy_door.py b/worlds/aquaria/test/test_unconfine_home_water_via_energy_door.py index 37a5c98610b5..269a4b33837e 100644 --- a/worlds/aquaria/test/test_unconfine_home_water_via_energy_door.py +++ b/worlds/aquaria/test/test_unconfine_home_water_via_energy_door.py @@ -5,16 +5,17 @@ """ from . import AquariaTestBase +from ..Options import UnconfineHomeWater, EarlyEnergyForm class UnconfineHomeWaterEnergyDoorAccessTest(AquariaTestBase): """Unit test used to test accessibility of region with the unconfine home water option enabled""" options = { - "unconfine_home_water": 1, - "early_energy_form": False + "unconfine_home_water": UnconfineHomeWater.option_via_energy_door, + "early_energy_form": EarlyEnergyForm.option_off } def test_unconfine_home_water_energy_door_location(self) -> None: """Test locations accessible with unconfined home water via energy door""" - self.assertTrue(self.can_reach_region("Open Water top left area"), "Cannot reach Open Water top left area") - self.assertFalse(self.can_reach_region("Home Water, turtle room"), "Can reach Home Water, turtle room") + self.assertTrue(self.can_reach_region("Open Waters top left area"), "Cannot reach Open Waters top left area") + self.assertFalse(self.can_reach_region("Home Waters, turtle room"), "Can reach Home Waters, turtle room") diff --git a/worlds/aquaria/test/test_unconfine_home_water_via_transturtle.py b/worlds/aquaria/test/test_unconfine_home_water_via_transturtle.py index da4c83c2bc7f..b8efb82471c4 100644 --- a/worlds/aquaria/test/test_unconfine_home_water_via_transturtle.py +++ b/worlds/aquaria/test/test_unconfine_home_water_via_transturtle.py @@ -5,16 +5,17 @@ """ from . import AquariaTestBase +from ..Options import UnconfineHomeWater, EarlyEnergyForm class UnconfineHomeWaterTransturtleAccessTest(AquariaTestBase): """Unit test used to test accessibility of region with the unconfine home water option enabled""" options = { - "unconfine_home_water": 2, - "early_energy_form": False + "unconfine_home_water": UnconfineHomeWater.option_via_transturtle, + "early_energy_form": EarlyEnergyForm.option_off } def test_unconfine_home_water_transturtle_location(self) -> None: """Test locations accessible with unconfined home water via transportation turtle""" - self.assertTrue(self.can_reach_region("Home Water, turtle room"), "Cannot reach Home Water, turtle room") - self.assertFalse(self.can_reach_region("Open Water top left area"), "Can reach Open Water top left area") + self.assertTrue(self.can_reach_region("Home Waters, turtle room"), "Cannot reach Home Waters, turtle room") + self.assertFalse(self.can_reach_region("Open Waters top left area"), "Can reach Open Waters top left area") From 51c4fe8f67511850a7d26fe07a183242683034f1 Mon Sep 17 00:00:00 2001 From: Jouramie <16137441+Jouramie@users.noreply.github.com> Date: Sun, 8 Dec 2024 21:00:30 -0500 Subject: [PATCH 25/36] Stardew Valley: Fix a bug where walnutsanity would get deactivated even tho ginger island got forced activated (and move some files) (#4311) --- worlds/stardew_valley/__init__.py | 40 +- worlds/stardew_valley/items.py | 32 +- worlds/stardew_valley/logic/walnut_logic.py | 22 +- worlds/stardew_valley/option_groups.py | 76 ---- worlds/stardew_valley/options/__init__.py | 6 + .../stardew_valley/options/forced_options.py | 48 +++ .../stardew_valley/options/option_groups.py | 68 ++++ .../stardew_valley/{ => options}/options.py | 23 +- worlds/stardew_valley/options/presets.py | 371 +++++++++++++++++ worlds/stardew_valley/presets.py | 376 ------------------ worlds/stardew_valley/rules.py | 10 +- .../strings/ap_names/ap_option_names.py | 35 +- .../strings/ap_names/mods/__init__.py | 0 worlds/stardew_valley/test/TestBooksanity.py | 1 - worlds/stardew_valley/test/TestOptions.py | 34 +- .../stardew_valley/test/TestOptionsPairs.py | 19 +- worlds/stardew_valley/test/TestRegions.py | 9 +- .../stardew_valley/test/TestWalnutsanity.py | 12 +- worlds/stardew_valley/test/__init__.py | 59 +-- worlds/stardew_valley/test/mods/TestMods.py | 5 +- .../test/options/TestForcedOptions.py | 84 ++++ .../test/{ => options}/TestPresets.py | 10 +- .../stardew_valley/test/options/__init__.py | 0 worlds/stardew_valley/test/options/utils.py | 68 ++++ .../test/stability/TestUniversalTracker.py | 4 +- 25 files changed, 752 insertions(+), 660 deletions(-) delete mode 100644 worlds/stardew_valley/option_groups.py create mode 100644 worlds/stardew_valley/options/__init__.py create mode 100644 worlds/stardew_valley/options/forced_options.py create mode 100644 worlds/stardew_valley/options/option_groups.py rename worlds/stardew_valley/{ => options}/options.py (97%) create mode 100644 worlds/stardew_valley/options/presets.py delete mode 100644 worlds/stardew_valley/presets.py create mode 100644 worlds/stardew_valley/strings/ap_names/mods/__init__.py create mode 100644 worlds/stardew_valley/test/options/TestForcedOptions.py rename worlds/stardew_valley/test/{ => options}/TestPresets.py (86%) create mode 100644 worlds/stardew_valley/test/options/__init__.py create mode 100644 worlds/stardew_valley/test/options/utils.py diff --git a/worlds/stardew_valley/__init__.py b/worlds/stardew_valley/__init__.py index 34c617f5013a..6ba0e35e0a3a 100644 --- a/worlds/stardew_valley/__init__.py +++ b/worlds/stardew_valley/__init__.py @@ -3,7 +3,7 @@ from typing import Dict, Any, Iterable, Optional, Union, List, TextIO from BaseClasses import Region, Entrance, Location, Item, Tutorial, ItemClassification, MultiWorld, CollectionState -from Options import PerGameCommonOptions, Accessibility +from Options import PerGameCommonOptions from worlds.AutoWorld import World, WebWorld from . import rules from .bundles.bundle_room import BundleRoom @@ -15,10 +15,11 @@ from .logic.bundle_logic import BundleLogic from .logic.logic import StardewLogic from .logic.time_logic import MAX_MONTHS -from .option_groups import sv_option_groups -from .options import StardewValleyOptions, SeasonRandomization, Goal, BundleRandomization, BundlePrice, EnabledFillerBuffs, NumberOfMovementBuffs, \ - BackpackProgression, BuildingProgression, ExcludeGingerIsland, TrapItems, EntranceRandomization, FarmType, Walnutsanity -from .presets import sv_options_presets +from .options import StardewValleyOptions, SeasonRandomization, Goal, BundleRandomization, EnabledFillerBuffs, NumberOfMovementBuffs, \ + BuildingProgression, ExcludeGingerIsland, TrapItems, EntranceRandomization, FarmType, Walnutsanity +from .options.forced_options import force_change_options_if_incompatible +from .options.option_groups import sv_option_groups +from .options.presets import sv_options_presets from .regions import create_regions from .rules import set_rules from .stardew_rule import True_, StardewRule, HasProgressionPercent, true_ @@ -112,36 +113,9 @@ def interpret_slot_data(self, slot_data: Dict[str, Any]) -> Optional[int]: return seed def generate_early(self): - self.force_change_options_if_incompatible() + force_change_options_if_incompatible(self.options, self.player, self.player_name) self.content = create_content(self.options) - def force_change_options_if_incompatible(self): - goal_is_walnut_hunter = self.options.goal == Goal.option_greatest_walnut_hunter - goal_is_perfection = self.options.goal == Goal.option_perfection - goal_is_island_related = goal_is_walnut_hunter or goal_is_perfection - exclude_ginger_island = self.options.exclude_ginger_island == ExcludeGingerIsland.option_true - - if goal_is_island_related and exclude_ginger_island: - self.options.exclude_ginger_island.value = ExcludeGingerIsland.option_false - goal_name = self.options.goal.current_key - logger.warning( - f"Goal '{goal_name}' requires Ginger Island. Exclude Ginger Island setting forced to 'False' for player {self.player} ({self.player_name})") - - if exclude_ginger_island and self.options.walnutsanity != Walnutsanity.preset_none: - self.options.walnutsanity.value = Walnutsanity.preset_none - logger.warning( - f"Walnutsanity requires Ginger Island. Ginger Island was excluded from {self.player} ({self.player_name})'s world, so walnutsanity was force disabled") - - if goal_is_perfection and self.options.accessibility == Accessibility.option_minimal: - self.options.accessibility.value = Accessibility.option_full - logger.warning( - f"Goal 'Perfection' requires full accessibility. Accessibility setting forced to 'Full' for player {self.player} ({self.player_name})") - - elif self.options.goal == Goal.option_allsanity and self.options.accessibility == Accessibility.option_minimal: - self.options.accessibility.value = Accessibility.option_full - logger.warning( - f"Goal 'Allsanity' requires full accessibility. Accessibility setting forced to 'Full' for player {self.player} ({self.player_name})") - def create_regions(self): def create_region(name: str, exits: Iterable[str]) -> Region: region = Region(name, self.player, self.multiworld) diff --git a/worlds/stardew_valley/items.py b/worlds/stardew_valley/items.py index 3d852a37f402..6ac827f869cc 100644 --- a/worlds/stardew_valley/items.py +++ b/worlds/stardew_valley/items.py @@ -17,7 +17,7 @@ from .options import StardewValleyOptions, TrapItems, FestivalLocations, ExcludeGingerIsland, SpecialOrderLocations, SeasonRandomization, Museumsanity, \ BuildingProgression, ToolProgression, ElevatorProgression, BackpackProgression, ArcadeMachineLocations, Monstersanity, Goal, \ Chefsanity, Craftsanity, BundleRandomization, EntranceRandomization, Shipsanity, Walnutsanity, EnabledFillerBuffs -from .strings.ap_names.ap_option_names import OptionName +from .strings.ap_names.ap_option_names import BuffOptionName, WalnutsanityOptionName from .strings.ap_names.ap_weapon_names import APWeapon from .strings.ap_names.buff_names import Buff from .strings.ap_names.community_upgrade_names import CommunityUpgrade @@ -538,16 +538,16 @@ def create_walnuts(item_factory: StardewItemFactory, options: StardewValleyOptio num_penta_walnuts = 1 # https://stardewvalleywiki.com/Golden_Walnut # Totals should be accurate, but distribution is slightly offset to make room for baseline walnuts - if OptionName.walnutsanity_puzzles in walnutsanity: # 61 + if WalnutsanityOptionName.puzzles in walnutsanity: # 61 num_single_walnuts += 6 # 6 num_triple_walnuts += 5 # 15 num_penta_walnuts += 8 # 40 - if OptionName.walnutsanity_bushes in walnutsanity: # 25 + if WalnutsanityOptionName.bushes in walnutsanity: # 25 num_single_walnuts += 16 # 16 num_triple_walnuts += 3 # 9 - if OptionName.walnutsanity_dig_spots in walnutsanity: # 18 + if WalnutsanityOptionName.dig_spots in walnutsanity: # 18 num_single_walnuts += 18 # 18 - if OptionName.walnutsanity_repeatables in walnutsanity: # 33 + if WalnutsanityOptionName.repeatables in walnutsanity: # 33 num_single_walnuts += 30 # 30 num_triple_walnuts += 1 # 3 @@ -833,27 +833,27 @@ def get_all_filler_items(include_traps: bool, exclude_ginger_island: bool) -> Li def get_allowed_player_buffs(buff_option: EnabledFillerBuffs) -> List[ItemData]: allowed_buffs = [] - if OptionName.buff_luck in buff_option: + if BuffOptionName.luck in buff_option: allowed_buffs.append(item_table[Buff.luck]) - if OptionName.buff_damage in buff_option: + if BuffOptionName.damage in buff_option: allowed_buffs.append(item_table[Buff.damage]) - if OptionName.buff_defense in buff_option: + if BuffOptionName.defense in buff_option: allowed_buffs.append(item_table[Buff.defense]) - if OptionName.buff_immunity in buff_option: + if BuffOptionName.immunity in buff_option: allowed_buffs.append(item_table[Buff.immunity]) - if OptionName.buff_health in buff_option: + if BuffOptionName.health in buff_option: allowed_buffs.append(item_table[Buff.health]) - if OptionName.buff_energy in buff_option: + if BuffOptionName.energy in buff_option: allowed_buffs.append(item_table[Buff.energy]) - if OptionName.buff_bite in buff_option: + if BuffOptionName.bite in buff_option: allowed_buffs.append(item_table[Buff.bite_rate]) - if OptionName.buff_fish_trap in buff_option: + if BuffOptionName.fish_trap in buff_option: allowed_buffs.append(item_table[Buff.fish_trap]) - if OptionName.buff_fishing_bar in buff_option: + if BuffOptionName.fishing_bar in buff_option: allowed_buffs.append(item_table[Buff.fishing_bar]) - if OptionName.buff_quality in buff_option: + if BuffOptionName.quality in buff_option: allowed_buffs.append(item_table[Buff.quality]) - if OptionName.buff_glow in buff_option: + if BuffOptionName.glow in buff_option: allowed_buffs.append(item_table[Buff.glow]) return allowed_buffs diff --git a/worlds/stardew_valley/logic/walnut_logic.py b/worlds/stardew_valley/logic/walnut_logic.py index 14fe1c339090..4ab3b46f70d9 100644 --- a/worlds/stardew_valley/logic/walnut_logic.py +++ b/worlds/stardew_valley/logic/walnut_logic.py @@ -7,10 +7,10 @@ from .has_logic import HasLogicMixin from .received_logic import ReceivedLogicMixin from .region_logic import RegionLogicMixin -from ..strings.ap_names.event_names import Event from ..options import ExcludeGingerIsland, Walnutsanity from ..stardew_rule import StardewRule, False_, True_ -from ..strings.ap_names.ap_option_names import OptionName +from ..strings.ap_names.ap_option_names import WalnutsanityOptionName +from ..strings.ap_names.event_names import Event from ..strings.craftable_names import Furniture from ..strings.crop_names import Fruit from ..strings.metal_names import Mineral, Fossil @@ -25,7 +25,7 @@ def __init__(self, *args, **kwargs): class WalnutLogic(BaseLogic[Union[WalnutLogicMixin, ReceivedLogicMixin, HasLogicMixin, RegionLogicMixin, CombatLogicMixin, - AbilityLogicMixin]]): +AbilityLogicMixin]]): def has_walnut(self, number: int) -> StardewRule: if self.options.exclude_ginger_island == ExcludeGingerIsland.option_true: @@ -44,22 +44,22 @@ def has_walnut(self, number: int) -> StardewRule: total_walnuts = puzzle_walnuts + bush_walnuts + dig_walnuts + repeatable_walnuts walnuts_to_receive = 0 walnuts_to_collect = number - if OptionName.walnutsanity_puzzles in self.options.walnutsanity: + if WalnutsanityOptionName.puzzles in self.options.walnutsanity: puzzle_walnut_rate = puzzle_walnuts / total_walnuts puzzle_walnuts_required = round(puzzle_walnut_rate * number) walnuts_to_receive += puzzle_walnuts_required walnuts_to_collect -= puzzle_walnuts_required - if OptionName.walnutsanity_bushes in self.options.walnutsanity: + if WalnutsanityOptionName.bushes in self.options.walnutsanity: bush_walnuts_rate = bush_walnuts / total_walnuts bush_walnuts_required = round(bush_walnuts_rate * number) walnuts_to_receive += bush_walnuts_required walnuts_to_collect -= bush_walnuts_required - if OptionName.walnutsanity_dig_spots in self.options.walnutsanity: + if WalnutsanityOptionName.dig_spots in self.options.walnutsanity: dig_walnuts_rate = dig_walnuts / total_walnuts dig_walnuts_required = round(dig_walnuts_rate * number) walnuts_to_receive += dig_walnuts_required walnuts_to_collect -= dig_walnuts_required - if OptionName.walnutsanity_repeatables in self.options.walnutsanity: + if WalnutsanityOptionName.repeatables in self.options.walnutsanity: repeatable_walnuts_rate = repeatable_walnuts / total_walnuts repeatable_walnuts_required = round(repeatable_walnuts_rate * number) walnuts_to_receive += repeatable_walnuts_required @@ -104,9 +104,9 @@ def can_get_walnuts(self, number: int) -> StardewRule: return reach_entire_island gems = (Mineral.amethyst, Mineral.aquamarine, Mineral.emerald, Mineral.ruby, Mineral.topaz) return reach_entire_island & self.logic.has(Fruit.banana) & self.logic.has_all(*gems) & \ - self.logic.ability.can_mine_perfectly() & self.logic.ability.can_fish_perfectly() & \ - self.logic.has(Furniture.flute_block) & self.logic.has(Seed.melon) & self.logic.has(Seed.wheat) & \ - self.logic.has(Seed.garlic) & self.can_complete_field_office() + self.logic.ability.can_mine_perfectly() & self.logic.ability.can_fish_perfectly() & \ + self.logic.has(Furniture.flute_block) & self.logic.has(Seed.melon) & self.logic.has(Seed.wheat) & \ + self.logic.has(Seed.garlic) & self.can_complete_field_office() @cached_property def can_start_field_office(self) -> StardewRule: @@ -132,4 +132,4 @@ def can_complete_bat_collection(self) -> StardewRule: def can_complete_field_office(self) -> StardewRule: return self.can_complete_large_animal_collection() & self.can_complete_snake_collection() & \ - self.can_complete_frog_collection() & self.can_complete_bat_collection() + self.can_complete_frog_collection() & self.can_complete_bat_collection() diff --git a/worlds/stardew_valley/option_groups.py b/worlds/stardew_valley/option_groups.py deleted file mode 100644 index d0f052348a7e..000000000000 --- a/worlds/stardew_valley/option_groups.py +++ /dev/null @@ -1,76 +0,0 @@ -import logging - -from Options import DeathLink, ProgressionBalancing, Accessibility -from .options import (Goal, StartingMoney, ProfitMargin, BundleRandomization, BundlePrice, - EntranceRandomization, SeasonRandomization, Cropsanity, BackpackProgression, - ToolProgression, ElevatorProgression, SkillProgression, BuildingProgression, - FestivalLocations, ArcadeMachineLocations, SpecialOrderLocations, - QuestLocations, Fishsanity, Museumsanity, Friendsanity, FriendsanityHeartSize, - NumberOfMovementBuffs, EnabledFillerBuffs, ExcludeGingerIsland, TrapItems, - MultipleDaySleepEnabled, MultipleDaySleepCost, ExperienceMultiplier, - FriendshipMultiplier, DebrisMultiplier, QuickStart, Gifting, FarmType, - Monstersanity, Shipsanity, Cooksanity, Chefsanity, Craftsanity, Mods, Booksanity, Walnutsanity, BundlePlando) - -sv_option_groups = [] -try: - from Options import OptionGroup -except: - logging.warning("Old AP Version, OptionGroup not available.") -else: - sv_option_groups = [ - OptionGroup("General", [ - Goal, - FarmType, - BundleRandomization, - BundlePrice, - EntranceRandomization, - ExcludeGingerIsland, - ]), - OptionGroup("Major Unlocks", [ - SeasonRandomization, - Cropsanity, - BackpackProgression, - ToolProgression, - ElevatorProgression, - SkillProgression, - BuildingProgression, - ]), - OptionGroup("Extra Shuffling", [ - FestivalLocations, - ArcadeMachineLocations, - SpecialOrderLocations, - QuestLocations, - Fishsanity, - Museumsanity, - Friendsanity, - FriendsanityHeartSize, - Monstersanity, - Shipsanity, - Cooksanity, - Chefsanity, - Craftsanity, - Booksanity, - Walnutsanity, - ]), - OptionGroup("Multipliers and Buffs", [ - StartingMoney, - ProfitMargin, - ExperienceMultiplier, - FriendshipMultiplier, - DebrisMultiplier, - NumberOfMovementBuffs, - EnabledFillerBuffs, - TrapItems, - MultipleDaySleepEnabled, - MultipleDaySleepCost, - QuickStart, - ]), - OptionGroup("Advanced Options", [ - Gifting, - DeathLink, - Mods, - BundlePlando, - ProgressionBalancing, - Accessibility, - ]), - ] diff --git a/worlds/stardew_valley/options/__init__.py b/worlds/stardew_valley/options/__init__.py new file mode 100644 index 000000000000..d1436b00dff7 --- /dev/null +++ b/worlds/stardew_valley/options/__init__.py @@ -0,0 +1,6 @@ +from .options import StardewValleyOption, Goal, FarmType, StartingMoney, ProfitMargin, BundleRandomization, BundlePrice, EntranceRandomization, \ + SeasonRandomization, Cropsanity, BackpackProgression, ToolProgression, ElevatorProgression, SkillProgression, BuildingProgression, FestivalLocations, \ + ArcadeMachineLocations, SpecialOrderLocations, QuestLocations, Fishsanity, Museumsanity, Monstersanity, Shipsanity, Cooksanity, Chefsanity, Craftsanity, \ + Friendsanity, FriendsanityHeartSize, Booksanity, Walnutsanity, NumberOfMovementBuffs, EnabledFillerBuffs, ExcludeGingerIsland, TrapItems, \ + MultipleDaySleepEnabled, MultipleDaySleepCost, ExperienceMultiplier, FriendshipMultiplier, DebrisMultiplier, QuickStart, Gifting, Mods, BundlePlando, \ + StardewValleyOptions diff --git a/worlds/stardew_valley/options/forced_options.py b/worlds/stardew_valley/options/forced_options.py new file mode 100644 index 000000000000..84cdc936b3f1 --- /dev/null +++ b/worlds/stardew_valley/options/forced_options.py @@ -0,0 +1,48 @@ +import logging + +import Options as ap_options +from . import options + +logger = logging.getLogger(__name__) + + +def force_change_options_if_incompatible(world_options: options.StardewValleyOptions, player: int, player_name: str) -> None: + force_ginger_island_inclusion_when_goal_is_ginger_island_related(world_options, player, player_name) + force_walnutsanity_deactivation_when_ginger_island_is_excluded(world_options, player, player_name) + force_accessibility_to_full_when_goal_requires_all_locations(player, player_name, world_options) + + +def force_ginger_island_inclusion_when_goal_is_ginger_island_related(world_options: options.StardewValleyOptions, player: int, player_name: str) -> None: + goal_is_walnut_hunter = world_options.goal == options.Goal.option_greatest_walnut_hunter + goal_is_perfection = world_options.goal == options.Goal.option_perfection + goal_is_island_related = goal_is_walnut_hunter or goal_is_perfection + ginger_island_is_excluded = world_options.exclude_ginger_island == options.ExcludeGingerIsland.option_true + + if goal_is_island_related and ginger_island_is_excluded: + world_options.exclude_ginger_island.value = options.ExcludeGingerIsland.option_false + goal_name = world_options.goal.current_option_name + logger.warning(f"Goal '{goal_name}' requires Ginger Island. " + f"Exclude Ginger Island option forced to 'False' for player {player} ({player_name})") + + +def force_walnutsanity_deactivation_when_ginger_island_is_excluded(world_options: options.StardewValleyOptions, player: int, player_name: str): + ginger_island_is_excluded = world_options.exclude_ginger_island == options.ExcludeGingerIsland.option_true + walnutsanity_is_active = world_options.walnutsanity != options.Walnutsanity.preset_none + + if ginger_island_is_excluded and walnutsanity_is_active: + world_options.walnutsanity.value = options.Walnutsanity.preset_none + logger.warning(f"Walnutsanity requires Ginger Island. " + f"Ginger Island was excluded from {player} ({player_name})'s world, so walnutsanity was force disabled") + + +def force_accessibility_to_full_when_goal_requires_all_locations(player, player_name, world_options): + goal_is_allsanity = world_options.goal == options.Goal.option_allsanity + goal_is_perfection = world_options.goal == options.Goal.option_perfection + goal_requires_all_locations = goal_is_allsanity or goal_is_perfection + accessibility_is_minimal = world_options.accessibility == ap_options.Accessibility.option_minimal + + if goal_requires_all_locations and accessibility_is_minimal: + world_options.accessibility.value = ap_options.Accessibility.option_full + goal_name = world_options.goal.current_option_name + logger.warning(f"Goal '{goal_name}' requires full accessibility. " + f"Accessibility option forced to 'Full' for player {player} ({player_name})") diff --git a/worlds/stardew_valley/options/option_groups.py b/worlds/stardew_valley/options/option_groups.py new file mode 100644 index 000000000000..bcb9bee77ff4 --- /dev/null +++ b/worlds/stardew_valley/options/option_groups.py @@ -0,0 +1,68 @@ +import logging + +import Options as ap_options +from . import options + +sv_option_groups = [] +try: + from Options import OptionGroup +except ImportError: + logging.warning("Old AP Version, OptionGroup not available.") +else: + sv_option_groups = [ + OptionGroup("General", [ + options.Goal, + options.FarmType, + options.BundleRandomization, + options.BundlePrice, + options.EntranceRandomization, + options.ExcludeGingerIsland, + ]), + OptionGroup("Major Unlocks", [ + options.SeasonRandomization, + options.Cropsanity, + options.BackpackProgression, + options.ToolProgression, + options.ElevatorProgression, + options.SkillProgression, + options.BuildingProgression, + ]), + OptionGroup("Extra Shuffling", [ + options.FestivalLocations, + options.ArcadeMachineLocations, + options.SpecialOrderLocations, + options.QuestLocations, + options.Fishsanity, + options.Museumsanity, + options.Friendsanity, + options.FriendsanityHeartSize, + options.Monstersanity, + options.Shipsanity, + options.Cooksanity, + options.Chefsanity, + options.Craftsanity, + options.Booksanity, + options.Walnutsanity, + ]), + OptionGroup("Multipliers and Buffs", [ + options.StartingMoney, + options.ProfitMargin, + options.ExperienceMultiplier, + options.FriendshipMultiplier, + options.DebrisMultiplier, + options.NumberOfMovementBuffs, + options.EnabledFillerBuffs, + options.TrapItems, + options.MultipleDaySleepEnabled, + options.MultipleDaySleepCost, + options.QuickStart, + ]), + OptionGroup("Advanced Options", [ + options.Gifting, + ap_options.DeathLink, + options.Mods, + options.BundlePlando, + ap_options.ProgressionBalancing, + ap_options.Accessibility, + ]), + ] diff --git a/worlds/stardew_valley/options.py b/worlds/stardew_valley/options/options.py similarity index 97% rename from worlds/stardew_valley/options.py rename to worlds/stardew_valley/options/options.py index 5369e88a2dcb..5d3b25b4da13 100644 --- a/worlds/stardew_valley/options.py +++ b/worlds/stardew_valley/options/options.py @@ -4,9 +4,9 @@ from typing import Protocol, ClassVar from Options import Range, NamedRange, Toggle, Choice, OptionSet, PerGameCommonOptions, DeathLink, OptionList, Visibility -from .mods.mod_data import ModNames -from .strings.ap_names.ap_option_names import OptionName -from .strings.bundle_names import all_cc_bundle_names +from ..mods.mod_data import ModNames +from ..strings.ap_names.ap_option_names import BuffOptionName, WalnutsanityOptionName +from ..strings.bundle_names import all_cc_bundle_names class StardewValleyOption(Protocol): @@ -582,8 +582,10 @@ class Walnutsanity(OptionSet): """ internal_name = "walnutsanity" display_name = "Walnutsanity" - valid_keys = frozenset({OptionName.walnutsanity_puzzles, OptionName.walnutsanity_bushes, OptionName.walnutsanity_dig_spots, - OptionName.walnutsanity_repeatables, }) + valid_keys = frozenset({ + WalnutsanityOptionName.puzzles, WalnutsanityOptionName.bushes, WalnutsanityOptionName.dig_spots, + WalnutsanityOptionName.repeatables, + }) preset_none = frozenset() preset_all = valid_keys default = preset_none @@ -622,12 +624,14 @@ class EnabledFillerBuffs(OptionSet): """ internal_name = "enabled_filler_buffs" display_name = "Enabled Filler Buffs" - valid_keys = frozenset({OptionName.buff_luck, OptionName.buff_damage, OptionName.buff_defense, OptionName.buff_immunity, OptionName.buff_health, - OptionName.buff_energy, OptionName.buff_bite, OptionName.buff_fish_trap, OptionName.buff_fishing_bar}) - # OptionName.buff_quality, OptionName.buff_glow}) # Disabled these two buffs because they are too hard to make on the mod side + valid_keys = frozenset({ + BuffOptionName.luck, BuffOptionName.damage, BuffOptionName.defense, BuffOptionName.immunity, BuffOptionName.health, + BuffOptionName.energy, BuffOptionName.bite, BuffOptionName.fish_trap, BuffOptionName.fishing_bar, + }) + # OptionName.buff_quality, OptionName.buff_glow}) # Disabled these two buffs because they are too hard to make on the mod side preset_none = frozenset() preset_all = valid_keys - default = frozenset({OptionName.buff_luck, OptionName.buff_defense, OptionName.buff_bite}) + default = frozenset({BuffOptionName.luck, BuffOptionName.defense, BuffOptionName.bite}) class ExcludeGingerIsland(Toggle): @@ -762,7 +766,6 @@ class Gifting(Toggle): ModNames.wellwick, ModNames.shiko, ModNames.delores, ModNames.riley, ModNames.boarding_house} - if 'unittest' in sys.modules.keys() or 'pytest' in sys.modules.keys(): disabled_mods = {} diff --git a/worlds/stardew_valley/options/presets.py b/worlds/stardew_valley/options/presets.py new file mode 100644 index 000000000000..c2c210e5ca6e --- /dev/null +++ b/worlds/stardew_valley/options/presets.py @@ -0,0 +1,371 @@ +from typing import Any, Dict + +import Options as ap_options +from . import options +from ..strings.ap_names.ap_option_names import WalnutsanityOptionName + +# @formatter:off +all_random_settings = { + "progression_balancing": "random", + "accessibility": "random", + options.Goal.internal_name: "random", + options.FarmType.internal_name: "random", + options.StartingMoney.internal_name: "random", + options.ProfitMargin.internal_name: "random", + options.BundleRandomization.internal_name: "random", + options.BundlePrice.internal_name: "random", + options.EntranceRandomization.internal_name: "random", + options.SeasonRandomization.internal_name: "random", + options.Cropsanity.internal_name: "random", + options.BackpackProgression.internal_name: "random", + options.ToolProgression.internal_name: "random", + options.ElevatorProgression.internal_name: "random", + options.SkillProgression.internal_name: "random", + options.BuildingProgression.internal_name: "random", + options.FestivalLocations.internal_name: "random", + options.ArcadeMachineLocations.internal_name: "random", + options.SpecialOrderLocations.internal_name: "random", + options.QuestLocations.internal_name: "random", + options.Fishsanity.internal_name: "random", + options.Museumsanity.internal_name: "random", + options.Monstersanity.internal_name: "random", + options.Shipsanity.internal_name: "random", + options.Cooksanity.internal_name: "random", + options.Chefsanity.internal_name: "random", + options.Craftsanity.internal_name: "random", + options.Friendsanity.internal_name: "random", + options.FriendsanityHeartSize.internal_name: "random", + options.Booksanity.internal_name: "random", + options.NumberOfMovementBuffs.internal_name: "random", + options.ExcludeGingerIsland.internal_name: "random", + options.TrapItems.internal_name: "random", + options.MultipleDaySleepEnabled.internal_name: "random", + options.MultipleDaySleepCost.internal_name: "random", + options.ExperienceMultiplier.internal_name: "random", + options.FriendshipMultiplier.internal_name: "random", + options.DebrisMultiplier.internal_name: "random", + options.QuickStart.internal_name: "random", + options.Gifting.internal_name: "random", + "death_link": "random", +} + +easy_settings = { + options.Goal.internal_name: options.Goal.option_community_center, + options.FarmType.internal_name: "random", + options.StartingMoney.internal_name: "very rich", + options.ProfitMargin.internal_name: "double", + options.BundleRandomization.internal_name: options.BundleRandomization.option_thematic, + options.BundlePrice.internal_name: options.BundlePrice.option_cheap, + options.EntranceRandomization.internal_name: options.EntranceRandomization.option_disabled, + options.SeasonRandomization.internal_name: options.SeasonRandomization.option_randomized_not_winter, + options.Cropsanity.internal_name: options.Cropsanity.option_enabled, + options.BackpackProgression.internal_name: options.BackpackProgression.option_early_progressive, + options.ToolProgression.internal_name: options.ToolProgression.option_progressive_very_cheap, + options.ElevatorProgression.internal_name: options.ElevatorProgression.option_progressive, + options.SkillProgression.internal_name: options.SkillProgression.option_progressive, + options.BuildingProgression.internal_name: options.BuildingProgression.option_progressive_very_cheap, + options.FestivalLocations.internal_name: options.FestivalLocations.option_easy, + options.ArcadeMachineLocations.internal_name: options.ArcadeMachineLocations.option_disabled, + options.SpecialOrderLocations.internal_name: options.SpecialOrderLocations.option_vanilla_very_short, + options.QuestLocations.internal_name: "minimum", + options.Fishsanity.internal_name: options.Fishsanity.option_only_easy_fish, + options.Museumsanity.internal_name: options.Museumsanity.option_milestones, + options.Monstersanity.internal_name: options.Monstersanity.option_one_per_category, + options.Shipsanity.internal_name: options.Shipsanity.option_none, + options.Cooksanity.internal_name: options.Cooksanity.option_none, + options.Chefsanity.internal_name: options.Chefsanity.option_none, + options.Craftsanity.internal_name: options.Craftsanity.option_none, + options.Friendsanity.internal_name: options.Friendsanity.option_none, + options.FriendsanityHeartSize.internal_name: 4, + options.Booksanity.internal_name: options.Booksanity.option_none, + options.Walnutsanity.internal_name: options.Walnutsanity.preset_none, + options.NumberOfMovementBuffs.internal_name: 8, + options.EnabledFillerBuffs.internal_name: options.EnabledFillerBuffs.preset_all, + options.ExcludeGingerIsland.internal_name: options.ExcludeGingerIsland.option_true, + options.TrapItems.internal_name: options.TrapItems.option_easy, + options.MultipleDaySleepEnabled.internal_name: options.MultipleDaySleepEnabled.option_true, + options.MultipleDaySleepCost.internal_name: "free", + options.ExperienceMultiplier.internal_name: "triple", + options.FriendshipMultiplier.internal_name: "quadruple", + options.DebrisMultiplier.internal_name: options.DebrisMultiplier.option_quarter, + options.QuickStart.internal_name: options.QuickStart.option_true, + options.Gifting.internal_name: options.Gifting.option_true, + "death_link": "false", +} + +medium_settings = { + options.Goal.internal_name: options.Goal.option_community_center, + options.FarmType.internal_name: "random", + options.StartingMoney.internal_name: "rich", + options.ProfitMargin.internal_name: 150, + options.BundleRandomization.internal_name: options.BundleRandomization.option_remixed, + options.BundlePrice.internal_name: options.BundlePrice.option_normal, + options.EntranceRandomization.internal_name: options.EntranceRandomization.option_non_progression, + options.SeasonRandomization.internal_name: options.SeasonRandomization.option_randomized, + options.Cropsanity.internal_name: options.Cropsanity.option_enabled, + options.BackpackProgression.internal_name: options.BackpackProgression.option_early_progressive, + options.ToolProgression.internal_name: options.ToolProgression.option_progressive_cheap, + options.ElevatorProgression.internal_name: options.ElevatorProgression.option_progressive, + options.SkillProgression.internal_name: options.SkillProgression.option_progressive, + options.BuildingProgression.internal_name: options.BuildingProgression.option_progressive_cheap, + options.FestivalLocations.internal_name: options.FestivalLocations.option_hard, + options.ArcadeMachineLocations.internal_name: options.ArcadeMachineLocations.option_victories_easy, + options.SpecialOrderLocations.internal_name: options.SpecialOrderLocations.option_board_short, + options.QuestLocations.internal_name: "normal", + options.Fishsanity.internal_name: options.Fishsanity.option_exclude_legendaries, + options.Museumsanity.internal_name: options.Museumsanity.option_milestones, + options.Monstersanity.internal_name: options.Monstersanity.option_one_per_monster, + options.Shipsanity.internal_name: options.Shipsanity.option_none, + options.Cooksanity.internal_name: options.Cooksanity.option_none, + options.Chefsanity.internal_name: options.Chefsanity.option_queen_of_sauce, + options.Craftsanity.internal_name: options.Craftsanity.option_none, + options.Friendsanity.internal_name: options.Friendsanity.option_starting_npcs, + options.FriendsanityHeartSize.internal_name: 4, + options.Booksanity.internal_name: options.Booksanity.option_power_skill, + options.Walnutsanity.internal_name: [WalnutsanityOptionName.puzzles], + options.NumberOfMovementBuffs.internal_name: 6, + options.EnabledFillerBuffs.internal_name: options.EnabledFillerBuffs.preset_all, + options.ExcludeGingerIsland.internal_name: options.ExcludeGingerIsland.option_true, + options.TrapItems.internal_name: options.TrapItems.option_medium, + options.MultipleDaySleepEnabled.internal_name: options.MultipleDaySleepEnabled.option_true, + options.MultipleDaySleepCost.internal_name: "free", + options.ExperienceMultiplier.internal_name: "double", + options.FriendshipMultiplier.internal_name: "triple", + options.DebrisMultiplier.internal_name: options.DebrisMultiplier.option_half, + options.QuickStart.internal_name: options.QuickStart.option_true, + options.Gifting.internal_name: options.Gifting.option_true, + "death_link": "false", +} + +hard_settings = { + options.Goal.internal_name: options.Goal.option_grandpa_evaluation, + options.FarmType.internal_name: "random", + options.StartingMoney.internal_name: "extra", + options.ProfitMargin.internal_name: "normal", + options.BundleRandomization.internal_name: options.BundleRandomization.option_remixed, + options.BundlePrice.internal_name: options.BundlePrice.option_expensive, + options.EntranceRandomization.internal_name: options.EntranceRandomization.option_buildings_without_house, + options.SeasonRandomization.internal_name: options.SeasonRandomization.option_randomized, + options.Cropsanity.internal_name: options.Cropsanity.option_enabled, + options.BackpackProgression.internal_name: options.BackpackProgression.option_progressive, + options.ToolProgression.internal_name: options.ToolProgression.option_progressive, + options.ElevatorProgression.internal_name: options.ElevatorProgression.option_progressive_from_previous_floor, + options.SkillProgression.internal_name: options.SkillProgression.option_progressive_with_masteries, + options.BuildingProgression.internal_name: options.BuildingProgression.option_progressive, + options.FestivalLocations.internal_name: options.FestivalLocations.option_hard, + options.ArcadeMachineLocations.internal_name: options.ArcadeMachineLocations.option_full_shuffling, + options.SpecialOrderLocations.internal_name: options.SpecialOrderLocations.option_board_qi_short, + options.QuestLocations.internal_name: "lots", + options.Fishsanity.internal_name: options.Fishsanity.option_all, + options.Museumsanity.internal_name: options.Museumsanity.option_all, + options.Monstersanity.internal_name: options.Monstersanity.option_progressive_goals, + options.Shipsanity.internal_name: options.Shipsanity.option_crops, + options.Cooksanity.internal_name: options.Cooksanity.option_queen_of_sauce, + options.Chefsanity.internal_name: options.Chefsanity.option_qos_and_purchases, + options.Craftsanity.internal_name: options.Craftsanity.option_none, + options.Friendsanity.internal_name: options.Friendsanity.option_all, + options.FriendsanityHeartSize.internal_name: 4, + options.Booksanity.internal_name: options.Booksanity.option_all, + options.Walnutsanity.internal_name: options.Walnutsanity.preset_all, + options.NumberOfMovementBuffs.internal_name: 4, + options.EnabledFillerBuffs.internal_name: options.EnabledFillerBuffs.default, + options.ExcludeGingerIsland.internal_name: options.ExcludeGingerIsland.option_false, + options.TrapItems.internal_name: options.TrapItems.option_hard, + options.MultipleDaySleepEnabled.internal_name: options.MultipleDaySleepEnabled.option_true, + options.MultipleDaySleepCost.internal_name: "cheap", + options.ExperienceMultiplier.internal_name: "vanilla", + options.FriendshipMultiplier.internal_name: "double", + options.DebrisMultiplier.internal_name: options.DebrisMultiplier.option_vanilla, + options.QuickStart.internal_name: options.QuickStart.option_true, + options.Gifting.internal_name: options.Gifting.option_true, + "death_link": "true", +} + +nightmare_settings = { + options.Goal.internal_name: options.Goal.option_community_center, + options.FarmType.internal_name: "random", + options.StartingMoney.internal_name: "vanilla", + options.ProfitMargin.internal_name: "half", + options.BundleRandomization.internal_name: options.BundleRandomization.option_shuffled, + options.BundlePrice.internal_name: options.BundlePrice.option_very_expensive, + options.EntranceRandomization.internal_name: options.EntranceRandomization.option_buildings, + options.SeasonRandomization.internal_name: options.SeasonRandomization.option_randomized, + options.Cropsanity.internal_name: options.Cropsanity.option_enabled, + options.BackpackProgression.internal_name: options.BackpackProgression.option_progressive, + options.ToolProgression.internal_name: options.ToolProgression.option_progressive, + options.ElevatorProgression.internal_name: options.ElevatorProgression.option_progressive_from_previous_floor, + options.SkillProgression.internal_name: options.SkillProgression.option_progressive_with_masteries, + options.BuildingProgression.internal_name: options.BuildingProgression.option_progressive, + options.FestivalLocations.internal_name: options.FestivalLocations.option_hard, + options.ArcadeMachineLocations.internal_name: options.ArcadeMachineLocations.option_full_shuffling, + options.SpecialOrderLocations.internal_name: options.SpecialOrderLocations.option_board_qi, + options.QuestLocations.internal_name: "maximum", + options.Fishsanity.internal_name: options.Fishsanity.option_special, + options.Museumsanity.internal_name: options.Museumsanity.option_all, + options.Monstersanity.internal_name: options.Monstersanity.option_split_goals, + options.Shipsanity.internal_name: options.Shipsanity.option_full_shipment_with_fish, + options.Cooksanity.internal_name: options.Cooksanity.option_queen_of_sauce, + options.Chefsanity.internal_name: options.Chefsanity.option_qos_and_purchases, + options.Craftsanity.internal_name: options.Craftsanity.option_none, + options.Friendsanity.internal_name: options.Friendsanity.option_all_with_marriage, + options.FriendsanityHeartSize.internal_name: 4, + options.Booksanity.internal_name: options.Booksanity.option_all, + options.Walnutsanity.internal_name: options.Walnutsanity.preset_all, + options.NumberOfMovementBuffs.internal_name: 2, + options.EnabledFillerBuffs.internal_name: options.EnabledFillerBuffs.preset_none, + options.ExcludeGingerIsland.internal_name: options.ExcludeGingerIsland.option_false, + options.TrapItems.internal_name: options.TrapItems.option_hell, + options.MultipleDaySleepEnabled.internal_name: options.MultipleDaySleepEnabled.option_true, + options.MultipleDaySleepCost.internal_name: "expensive", + options.ExperienceMultiplier.internal_name: "half", + options.FriendshipMultiplier.internal_name: "vanilla", + options.DebrisMultiplier.internal_name: options.DebrisMultiplier.option_vanilla, + options.QuickStart.internal_name: options.QuickStart.option_false, + options.Gifting.internal_name: options.Gifting.option_true, + "death_link": "true", +} + +short_settings = { + options.Goal.internal_name: options.Goal.option_bottom_of_the_mines, + options.FarmType.internal_name: "random", + options.StartingMoney.internal_name: "filthy rich", + options.ProfitMargin.internal_name: "quadruple", + options.BundleRandomization.internal_name: options.BundleRandomization.option_remixed, + options.BundlePrice.internal_name: options.BundlePrice.option_minimum, + options.EntranceRandomization.internal_name: options.EntranceRandomization.option_disabled, + options.SeasonRandomization.internal_name: options.SeasonRandomization.option_randomized_not_winter, + options.Cropsanity.internal_name: options.Cropsanity.option_disabled, + options.BackpackProgression.internal_name: options.BackpackProgression.option_early_progressive, + options.ToolProgression.internal_name: options.ToolProgression.option_progressive_very_cheap, + options.ElevatorProgression.internal_name: options.ElevatorProgression.option_progressive, + options.SkillProgression.internal_name: options.SkillProgression.option_progressive, + options.BuildingProgression.internal_name: options.BuildingProgression.option_progressive_very_cheap, + options.FestivalLocations.internal_name: options.FestivalLocations.option_disabled, + options.ArcadeMachineLocations.internal_name: options.ArcadeMachineLocations.option_disabled, + options.SpecialOrderLocations.internal_name: options.SpecialOrderLocations.option_vanilla_very_short, + options.QuestLocations.internal_name: "none", + options.Fishsanity.internal_name: options.Fishsanity.option_none, + options.Museumsanity.internal_name: options.Museumsanity.option_none, + options.Monstersanity.internal_name: options.Monstersanity.option_none, + options.Shipsanity.internal_name: options.Shipsanity.option_none, + options.Cooksanity.internal_name: options.Cooksanity.option_none, + options.Chefsanity.internal_name: options.Chefsanity.option_none, + options.Craftsanity.internal_name: options.Craftsanity.option_none, + options.Friendsanity.internal_name: options.Friendsanity.option_none, + options.FriendsanityHeartSize.internal_name: 4, + options.Booksanity.internal_name: options.Booksanity.option_none, + options.Walnutsanity.internal_name: options.Walnutsanity.preset_none, + options.NumberOfMovementBuffs.internal_name: 10, + options.EnabledFillerBuffs.internal_name: options.EnabledFillerBuffs.preset_all, + options.ExcludeGingerIsland.internal_name: options.ExcludeGingerIsland.option_true, + options.TrapItems.internal_name: options.TrapItems.option_easy, + options.MultipleDaySleepEnabled.internal_name: options.MultipleDaySleepEnabled.option_true, + options.MultipleDaySleepCost.internal_name: "free", + options.ExperienceMultiplier.internal_name: "quadruple", + options.FriendshipMultiplier.internal_name: 800, + options.DebrisMultiplier.internal_name: options.DebrisMultiplier.option_none, + options.QuickStart.internal_name: options.QuickStart.option_true, + options.Gifting.internal_name: options.Gifting.option_true, + "death_link": "false", +} + +minsanity_settings = { + options.Goal.internal_name: options.Goal.default, + options.FarmType.internal_name: "random", + options.StartingMoney.internal_name: options.StartingMoney.default, + options.ProfitMargin.internal_name: options.ProfitMargin.default, + options.BundleRandomization.internal_name: options.BundleRandomization.default, + options.BundlePrice.internal_name: options.BundlePrice.default, + options.EntranceRandomization.internal_name: options.EntranceRandomization.default, + options.SeasonRandomization.internal_name: options.SeasonRandomization.option_disabled, + options.Cropsanity.internal_name: options.Cropsanity.option_disabled, + options.BackpackProgression.internal_name: options.BackpackProgression.option_vanilla, + options.ToolProgression.internal_name: options.ToolProgression.option_vanilla, + options.ElevatorProgression.internal_name: options.ElevatorProgression.option_vanilla, + options.SkillProgression.internal_name: options.SkillProgression.option_vanilla, + options.BuildingProgression.internal_name: options.BuildingProgression.option_vanilla, + options.FestivalLocations.internal_name: options.FestivalLocations.option_disabled, + options.ArcadeMachineLocations.internal_name: options.ArcadeMachineLocations.option_disabled, + options.SpecialOrderLocations.internal_name: options.SpecialOrderLocations.option_vanilla_very_short, + options.QuestLocations.internal_name: "none", + options.Fishsanity.internal_name: options.Fishsanity.option_none, + options.Museumsanity.internal_name: options.Museumsanity.option_none, + options.Monstersanity.internal_name: options.Monstersanity.option_none, + options.Shipsanity.internal_name: options.Shipsanity.option_none, + options.Cooksanity.internal_name: options.Cooksanity.option_none, + options.Chefsanity.internal_name: options.Chefsanity.option_none, + options.Craftsanity.internal_name: options.Craftsanity.option_none, + options.Friendsanity.internal_name: options.Friendsanity.option_none, + options.FriendsanityHeartSize.internal_name: options.FriendsanityHeartSize.default, + options.Booksanity.internal_name: options.Booksanity.option_none, + options.Walnutsanity.internal_name: options.Walnutsanity.preset_none, + options.NumberOfMovementBuffs.internal_name: options.NumberOfMovementBuffs.default, + options.EnabledFillerBuffs.internal_name: options.EnabledFillerBuffs.default, + options.ExcludeGingerIsland.internal_name: options.ExcludeGingerIsland.option_true, + options.TrapItems.internal_name: options.TrapItems.default, + options.MultipleDaySleepEnabled.internal_name: options.MultipleDaySleepEnabled.default, + options.MultipleDaySleepCost.internal_name: options.MultipleDaySleepCost.default, + options.ExperienceMultiplier.internal_name: options.ExperienceMultiplier.default, + options.FriendshipMultiplier.internal_name: options.FriendshipMultiplier.default, + options.DebrisMultiplier.internal_name: options.DebrisMultiplier.default, + options.QuickStart.internal_name: options.QuickStart.default, + options.Gifting.internal_name: options.Gifting.default, + "death_link": ap_options.DeathLink.default, +} + +allsanity_settings = { + options.Goal.internal_name: options.Goal.default, + options.FarmType.internal_name: "random", + options.StartingMoney.internal_name: options.StartingMoney.default, + options.ProfitMargin.internal_name: options.ProfitMargin.default, + options.BundleRandomization.internal_name: options.BundleRandomization.default, + options.BundlePrice.internal_name: options.BundlePrice.default, + options.EntranceRandomization.internal_name: options.EntranceRandomization.option_buildings, + options.SeasonRandomization.internal_name: options.SeasonRandomization.option_randomized, + options.Cropsanity.internal_name: options.Cropsanity.option_enabled, + options.BackpackProgression.internal_name: options.BackpackProgression.option_early_progressive, + options.ToolProgression.internal_name: options.ToolProgression.option_progressive, + options.ElevatorProgression.internal_name: options.ElevatorProgression.option_progressive, + options.SkillProgression.internal_name: options.SkillProgression.option_progressive_with_masteries, + options.BuildingProgression.internal_name: options.BuildingProgression.option_progressive, + options.FestivalLocations.internal_name: options.FestivalLocations.option_hard, + options.ArcadeMachineLocations.internal_name: options.ArcadeMachineLocations.option_full_shuffling, + options.SpecialOrderLocations.internal_name: options.SpecialOrderLocations.option_board_qi, + options.QuestLocations.internal_name: "maximum", + options.Fishsanity.internal_name: options.Fishsanity.option_all, + options.Museumsanity.internal_name: options.Museumsanity.option_all, + options.Monstersanity.internal_name: options.Monstersanity.option_progressive_goals, + options.Shipsanity.internal_name: options.Shipsanity.option_everything, + options.Cooksanity.internal_name: options.Cooksanity.option_all, + options.Chefsanity.internal_name: options.Chefsanity.option_all, + options.Craftsanity.internal_name: options.Craftsanity.option_all, + options.Friendsanity.internal_name: options.Friendsanity.option_all, + options.FriendsanityHeartSize.internal_name: 1, + options.Booksanity.internal_name: options.Booksanity.option_all, + options.Walnutsanity.internal_name: options.Walnutsanity.preset_all, + options.NumberOfMovementBuffs.internal_name: 12, + options.EnabledFillerBuffs.internal_name: options.EnabledFillerBuffs.preset_all, + options.ExcludeGingerIsland.internal_name: options.ExcludeGingerIsland.option_false, + options.TrapItems.internal_name: options.TrapItems.default, + options.MultipleDaySleepEnabled.internal_name: options.MultipleDaySleepEnabled.default, + options.MultipleDaySleepCost.internal_name: options.MultipleDaySleepCost.default, + options.ExperienceMultiplier.internal_name: options.ExperienceMultiplier.default, + options.FriendshipMultiplier.internal_name: options.FriendshipMultiplier.default, + options.DebrisMultiplier.internal_name: options.DebrisMultiplier.default, + options.QuickStart.internal_name: options.QuickStart.default, + options.Gifting.internal_name: options.Gifting.default, + "death_link": ap_options.DeathLink.default, +} +# @formatter:on + + +sv_options_presets: Dict[str, Dict[str, Any]] = { + "All random": all_random_settings, + "Easy": easy_settings, + "Medium": medium_settings, + "Hard": hard_settings, + "Nightmare": nightmare_settings, + "Short": short_settings, + "Minsanity": minsanity_settings, + "Allsanity": allsanity_settings, +} diff --git a/worlds/stardew_valley/presets.py b/worlds/stardew_valley/presets.py deleted file mode 100644 index 62672f29e424..000000000000 --- a/worlds/stardew_valley/presets.py +++ /dev/null @@ -1,376 +0,0 @@ -from typing import Any, Dict - -from Options import Accessibility, ProgressionBalancing, DeathLink -from .options import Goal, StartingMoney, ProfitMargin, BundleRandomization, BundlePrice, EntranceRandomization, SeasonRandomization, Cropsanity, \ - BackpackProgression, ToolProgression, ElevatorProgression, SkillProgression, BuildingProgression, FestivalLocations, ArcadeMachineLocations, \ - SpecialOrderLocations, QuestLocations, Fishsanity, Museumsanity, Friendsanity, FriendsanityHeartSize, NumberOfMovementBuffs, ExcludeGingerIsland, TrapItems, \ - MultipleDaySleepEnabled, MultipleDaySleepCost, ExperienceMultiplier, FriendshipMultiplier, DebrisMultiplier, QuickStart, \ - Gifting, FarmType, Monstersanity, Shipsanity, Cooksanity, Chefsanity, Craftsanity, Booksanity, Walnutsanity, EnabledFillerBuffs - -# @formatter:off -from .strings.ap_names.ap_option_names import OptionName - -all_random_settings = { - "progression_balancing": "random", - "accessibility": "random", - Goal.internal_name: "random", - FarmType.internal_name: "random", - StartingMoney.internal_name: "random", - ProfitMargin.internal_name: "random", - BundleRandomization.internal_name: "random", - BundlePrice.internal_name: "random", - EntranceRandomization.internal_name: "random", - SeasonRandomization.internal_name: "random", - Cropsanity.internal_name: "random", - BackpackProgression.internal_name: "random", - ToolProgression.internal_name: "random", - ElevatorProgression.internal_name: "random", - SkillProgression.internal_name: "random", - BuildingProgression.internal_name: "random", - FestivalLocations.internal_name: "random", - ArcadeMachineLocations.internal_name: "random", - SpecialOrderLocations.internal_name: "random", - QuestLocations.internal_name: "random", - Fishsanity.internal_name: "random", - Museumsanity.internal_name: "random", - Monstersanity.internal_name: "random", - Shipsanity.internal_name: "random", - Cooksanity.internal_name: "random", - Chefsanity.internal_name: "random", - Craftsanity.internal_name: "random", - Friendsanity.internal_name: "random", - FriendsanityHeartSize.internal_name: "random", - Booksanity.internal_name: "random", - NumberOfMovementBuffs.internal_name: "random", - ExcludeGingerIsland.internal_name: "random", - TrapItems.internal_name: "random", - MultipleDaySleepEnabled.internal_name: "random", - MultipleDaySleepCost.internal_name: "random", - ExperienceMultiplier.internal_name: "random", - FriendshipMultiplier.internal_name: "random", - DebrisMultiplier.internal_name: "random", - QuickStart.internal_name: "random", - Gifting.internal_name: "random", - "death_link": "random", -} - -easy_settings = { - Goal.internal_name: Goal.option_community_center, - FarmType.internal_name: "random", - StartingMoney.internal_name: "very rich", - ProfitMargin.internal_name: "double", - BundleRandomization.internal_name: BundleRandomization.option_thematic, - BundlePrice.internal_name: BundlePrice.option_cheap, - EntranceRandomization.internal_name: EntranceRandomization.option_disabled, - SeasonRandomization.internal_name: SeasonRandomization.option_randomized_not_winter, - Cropsanity.internal_name: Cropsanity.option_enabled, - BackpackProgression.internal_name: BackpackProgression.option_early_progressive, - ToolProgression.internal_name: ToolProgression.option_progressive_very_cheap, - ElevatorProgression.internal_name: ElevatorProgression.option_progressive, - SkillProgression.internal_name: SkillProgression.option_progressive, - BuildingProgression.internal_name: BuildingProgression.option_progressive_very_cheap, - FestivalLocations.internal_name: FestivalLocations.option_easy, - ArcadeMachineLocations.internal_name: ArcadeMachineLocations.option_disabled, - SpecialOrderLocations.internal_name: SpecialOrderLocations.option_vanilla_very_short, - QuestLocations.internal_name: "minimum", - Fishsanity.internal_name: Fishsanity.option_only_easy_fish, - Museumsanity.internal_name: Museumsanity.option_milestones, - Monstersanity.internal_name: Monstersanity.option_one_per_category, - Shipsanity.internal_name: Shipsanity.option_none, - Cooksanity.internal_name: Cooksanity.option_none, - Chefsanity.internal_name: Chefsanity.option_none, - Craftsanity.internal_name: Craftsanity.option_none, - Friendsanity.internal_name: Friendsanity.option_none, - FriendsanityHeartSize.internal_name: 4, - Booksanity.internal_name: Booksanity.option_none, - Walnutsanity.internal_name: Walnutsanity.preset_none, - NumberOfMovementBuffs.internal_name: 8, - EnabledFillerBuffs.internal_name: EnabledFillerBuffs.preset_all, - ExcludeGingerIsland.internal_name: ExcludeGingerIsland.option_true, - TrapItems.internal_name: TrapItems.option_easy, - MultipleDaySleepEnabled.internal_name: MultipleDaySleepEnabled.option_true, - MultipleDaySleepCost.internal_name: "free", - ExperienceMultiplier.internal_name: "triple", - FriendshipMultiplier.internal_name: "quadruple", - DebrisMultiplier.internal_name: DebrisMultiplier.option_quarter, - QuickStart.internal_name: QuickStart.option_true, - Gifting.internal_name: Gifting.option_true, - "death_link": "false", -} - -medium_settings = { - Goal.internal_name: Goal.option_community_center, - FarmType.internal_name: "random", - StartingMoney.internal_name: "rich", - ProfitMargin.internal_name: 150, - BundleRandomization.internal_name: BundleRandomization.option_remixed, - BundlePrice.internal_name: BundlePrice.option_normal, - EntranceRandomization.internal_name: EntranceRandomization.option_non_progression, - SeasonRandomization.internal_name: SeasonRandomization.option_randomized, - Cropsanity.internal_name: Cropsanity.option_enabled, - BackpackProgression.internal_name: BackpackProgression.option_early_progressive, - ToolProgression.internal_name: ToolProgression.option_progressive_cheap, - ElevatorProgression.internal_name: ElevatorProgression.option_progressive, - SkillProgression.internal_name: SkillProgression.option_progressive, - BuildingProgression.internal_name: BuildingProgression.option_progressive_cheap, - FestivalLocations.internal_name: FestivalLocations.option_hard, - ArcadeMachineLocations.internal_name: ArcadeMachineLocations.option_victories_easy, - SpecialOrderLocations.internal_name: SpecialOrderLocations.option_board_short, - QuestLocations.internal_name: "normal", - Fishsanity.internal_name: Fishsanity.option_exclude_legendaries, - Museumsanity.internal_name: Museumsanity.option_milestones, - Monstersanity.internal_name: Monstersanity.option_one_per_monster, - Shipsanity.internal_name: Shipsanity.option_none, - Cooksanity.internal_name: Cooksanity.option_none, - Chefsanity.internal_name: Chefsanity.option_queen_of_sauce, - Craftsanity.internal_name: Craftsanity.option_none, - Friendsanity.internal_name: Friendsanity.option_starting_npcs, - FriendsanityHeartSize.internal_name: 4, - Booksanity.internal_name: Booksanity.option_power_skill, - Walnutsanity.internal_name: [OptionName.walnutsanity_puzzles], - NumberOfMovementBuffs.internal_name: 6, - EnabledFillerBuffs.internal_name: EnabledFillerBuffs.preset_all, - ExcludeGingerIsland.internal_name: ExcludeGingerIsland.option_true, - TrapItems.internal_name: TrapItems.option_medium, - MultipleDaySleepEnabled.internal_name: MultipleDaySleepEnabled.option_true, - MultipleDaySleepCost.internal_name: "free", - ExperienceMultiplier.internal_name: "double", - FriendshipMultiplier.internal_name: "triple", - DebrisMultiplier.internal_name: DebrisMultiplier.option_half, - QuickStart.internal_name: QuickStart.option_true, - Gifting.internal_name: Gifting.option_true, - "death_link": "false", -} - -hard_settings = { - Goal.internal_name: Goal.option_grandpa_evaluation, - FarmType.internal_name: "random", - StartingMoney.internal_name: "extra", - ProfitMargin.internal_name: "normal", - BundleRandomization.internal_name: BundleRandomization.option_remixed, - BundlePrice.internal_name: BundlePrice.option_expensive, - EntranceRandomization.internal_name: EntranceRandomization.option_buildings_without_house, - SeasonRandomization.internal_name: SeasonRandomization.option_randomized, - Cropsanity.internal_name: Cropsanity.option_enabled, - BackpackProgression.internal_name: BackpackProgression.option_progressive, - ToolProgression.internal_name: ToolProgression.option_progressive, - ElevatorProgression.internal_name: ElevatorProgression.option_progressive_from_previous_floor, - SkillProgression.internal_name: SkillProgression.option_progressive_with_masteries, - BuildingProgression.internal_name: BuildingProgression.option_progressive, - FestivalLocations.internal_name: FestivalLocations.option_hard, - ArcadeMachineLocations.internal_name: ArcadeMachineLocations.option_full_shuffling, - SpecialOrderLocations.internal_name: SpecialOrderLocations.option_board_qi_short, - QuestLocations.internal_name: "lots", - Fishsanity.internal_name: Fishsanity.option_all, - Museumsanity.internal_name: Museumsanity.option_all, - Monstersanity.internal_name: Monstersanity.option_progressive_goals, - Shipsanity.internal_name: Shipsanity.option_crops, - Cooksanity.internal_name: Cooksanity.option_queen_of_sauce, - Chefsanity.internal_name: Chefsanity.option_qos_and_purchases, - Craftsanity.internal_name: Craftsanity.option_none, - Friendsanity.internal_name: Friendsanity.option_all, - FriendsanityHeartSize.internal_name: 4, - Booksanity.internal_name: Booksanity.option_all, - Walnutsanity.internal_name: Walnutsanity.preset_all, - NumberOfMovementBuffs.internal_name: 4, - EnabledFillerBuffs.internal_name: EnabledFillerBuffs.default, - ExcludeGingerIsland.internal_name: ExcludeGingerIsland.option_false, - TrapItems.internal_name: TrapItems.option_hard, - MultipleDaySleepEnabled.internal_name: MultipleDaySleepEnabled.option_true, - MultipleDaySleepCost.internal_name: "cheap", - ExperienceMultiplier.internal_name: "vanilla", - FriendshipMultiplier.internal_name: "double", - DebrisMultiplier.internal_name: DebrisMultiplier.option_vanilla, - QuickStart.internal_name: QuickStart.option_true, - Gifting.internal_name: Gifting.option_true, - "death_link": "true", -} - -nightmare_settings = { - Goal.internal_name: Goal.option_community_center, - FarmType.internal_name: "random", - StartingMoney.internal_name: "vanilla", - ProfitMargin.internal_name: "half", - BundleRandomization.internal_name: BundleRandomization.option_shuffled, - BundlePrice.internal_name: BundlePrice.option_very_expensive, - EntranceRandomization.internal_name: EntranceRandomization.option_buildings, - SeasonRandomization.internal_name: SeasonRandomization.option_randomized, - Cropsanity.internal_name: Cropsanity.option_enabled, - BackpackProgression.internal_name: BackpackProgression.option_progressive, - ToolProgression.internal_name: ToolProgression.option_progressive, - ElevatorProgression.internal_name: ElevatorProgression.option_progressive_from_previous_floor, - SkillProgression.internal_name: SkillProgression.option_progressive_with_masteries, - BuildingProgression.internal_name: BuildingProgression.option_progressive, - FestivalLocations.internal_name: FestivalLocations.option_hard, - ArcadeMachineLocations.internal_name: ArcadeMachineLocations.option_full_shuffling, - SpecialOrderLocations.internal_name: SpecialOrderLocations.option_board_qi, - QuestLocations.internal_name: "maximum", - Fishsanity.internal_name: Fishsanity.option_special, - Museumsanity.internal_name: Museumsanity.option_all, - Monstersanity.internal_name: Monstersanity.option_split_goals, - Shipsanity.internal_name: Shipsanity.option_full_shipment_with_fish, - Cooksanity.internal_name: Cooksanity.option_queen_of_sauce, - Chefsanity.internal_name: Chefsanity.option_qos_and_purchases, - Craftsanity.internal_name: Craftsanity.option_none, - Friendsanity.internal_name: Friendsanity.option_all_with_marriage, - FriendsanityHeartSize.internal_name: 4, - Booksanity.internal_name: Booksanity.option_all, - Walnutsanity.internal_name: Walnutsanity.preset_all, - NumberOfMovementBuffs.internal_name: 2, - EnabledFillerBuffs.internal_name: EnabledFillerBuffs.preset_none, - ExcludeGingerIsland.internal_name: ExcludeGingerIsland.option_false, - TrapItems.internal_name: TrapItems.option_hell, - MultipleDaySleepEnabled.internal_name: MultipleDaySleepEnabled.option_true, - MultipleDaySleepCost.internal_name: "expensive", - ExperienceMultiplier.internal_name: "half", - FriendshipMultiplier.internal_name: "vanilla", - DebrisMultiplier.internal_name: DebrisMultiplier.option_vanilla, - QuickStart.internal_name: QuickStart.option_false, - Gifting.internal_name: Gifting.option_true, - "death_link": "true", -} - -short_settings = { - Goal.internal_name: Goal.option_bottom_of_the_mines, - FarmType.internal_name: "random", - StartingMoney.internal_name: "filthy rich", - ProfitMargin.internal_name: "quadruple", - BundleRandomization.internal_name: BundleRandomization.option_remixed, - BundlePrice.internal_name: BundlePrice.option_minimum, - EntranceRandomization.internal_name: EntranceRandomization.option_disabled, - SeasonRandomization.internal_name: SeasonRandomization.option_randomized_not_winter, - Cropsanity.internal_name: Cropsanity.option_disabled, - BackpackProgression.internal_name: BackpackProgression.option_early_progressive, - ToolProgression.internal_name: ToolProgression.option_progressive_very_cheap, - ElevatorProgression.internal_name: ElevatorProgression.option_progressive, - SkillProgression.internal_name: SkillProgression.option_progressive, - BuildingProgression.internal_name: BuildingProgression.option_progressive_very_cheap, - FestivalLocations.internal_name: FestivalLocations.option_disabled, - ArcadeMachineLocations.internal_name: ArcadeMachineLocations.option_disabled, - SpecialOrderLocations.internal_name: SpecialOrderLocations.option_vanilla_very_short, - QuestLocations.internal_name: "none", - Fishsanity.internal_name: Fishsanity.option_none, - Museumsanity.internal_name: Museumsanity.option_none, - Monstersanity.internal_name: Monstersanity.option_none, - Shipsanity.internal_name: Shipsanity.option_none, - Cooksanity.internal_name: Cooksanity.option_none, - Chefsanity.internal_name: Chefsanity.option_none, - Craftsanity.internal_name: Craftsanity.option_none, - Friendsanity.internal_name: Friendsanity.option_none, - FriendsanityHeartSize.internal_name: 4, - Booksanity.internal_name: Booksanity.option_none, - Walnutsanity.internal_name: Walnutsanity.preset_none, - NumberOfMovementBuffs.internal_name: 10, - EnabledFillerBuffs.internal_name: EnabledFillerBuffs.preset_all, - ExcludeGingerIsland.internal_name: ExcludeGingerIsland.option_true, - TrapItems.internal_name: TrapItems.option_easy, - MultipleDaySleepEnabled.internal_name: MultipleDaySleepEnabled.option_true, - MultipleDaySleepCost.internal_name: "free", - ExperienceMultiplier.internal_name: "quadruple", - FriendshipMultiplier.internal_name: 800, - DebrisMultiplier.internal_name: DebrisMultiplier.option_none, - QuickStart.internal_name: QuickStart.option_true, - Gifting.internal_name: Gifting.option_true, - "death_link": "false", -} - -minsanity_settings = { - Goal.internal_name: Goal.default, - FarmType.internal_name: "random", - StartingMoney.internal_name: StartingMoney.default, - ProfitMargin.internal_name: ProfitMargin.default, - BundleRandomization.internal_name: BundleRandomization.default, - BundlePrice.internal_name: BundlePrice.default, - EntranceRandomization.internal_name: EntranceRandomization.default, - SeasonRandomization.internal_name: SeasonRandomization.option_disabled, - Cropsanity.internal_name: Cropsanity.option_disabled, - BackpackProgression.internal_name: BackpackProgression.option_vanilla, - ToolProgression.internal_name: ToolProgression.option_vanilla, - ElevatorProgression.internal_name: ElevatorProgression.option_vanilla, - SkillProgression.internal_name: SkillProgression.option_vanilla, - BuildingProgression.internal_name: BuildingProgression.option_vanilla, - FestivalLocations.internal_name: FestivalLocations.option_disabled, - ArcadeMachineLocations.internal_name: ArcadeMachineLocations.option_disabled, - SpecialOrderLocations.internal_name: SpecialOrderLocations.option_vanilla_very_short, - QuestLocations.internal_name: "none", - Fishsanity.internal_name: Fishsanity.option_none, - Museumsanity.internal_name: Museumsanity.option_none, - Monstersanity.internal_name: Monstersanity.option_none, - Shipsanity.internal_name: Shipsanity.option_none, - Cooksanity.internal_name: Cooksanity.option_none, - Chefsanity.internal_name: Chefsanity.option_none, - Craftsanity.internal_name: Craftsanity.option_none, - Friendsanity.internal_name: Friendsanity.option_none, - FriendsanityHeartSize.internal_name: FriendsanityHeartSize.default, - Booksanity.internal_name: Booksanity.option_none, - Walnutsanity.internal_name: Walnutsanity.preset_none, - NumberOfMovementBuffs.internal_name: NumberOfMovementBuffs.default, - EnabledFillerBuffs.internal_name: EnabledFillerBuffs.default, - ExcludeGingerIsland.internal_name: ExcludeGingerIsland.option_true, - TrapItems.internal_name: TrapItems.default, - MultipleDaySleepEnabled.internal_name: MultipleDaySleepEnabled.default, - MultipleDaySleepCost.internal_name: MultipleDaySleepCost.default, - ExperienceMultiplier.internal_name: ExperienceMultiplier.default, - FriendshipMultiplier.internal_name: FriendshipMultiplier.default, - DebrisMultiplier.internal_name: DebrisMultiplier.default, - QuickStart.internal_name: QuickStart.default, - Gifting.internal_name: Gifting.default, - "death_link": DeathLink.default, -} - -allsanity_settings = { - Goal.internal_name: Goal.default, - FarmType.internal_name: "random", - StartingMoney.internal_name: StartingMoney.default, - ProfitMargin.internal_name: ProfitMargin.default, - BundleRandomization.internal_name: BundleRandomization.default, - BundlePrice.internal_name: BundlePrice.default, - EntranceRandomization.internal_name: EntranceRandomization.option_buildings, - SeasonRandomization.internal_name: SeasonRandomization.option_randomized, - Cropsanity.internal_name: Cropsanity.option_enabled, - BackpackProgression.internal_name: BackpackProgression.option_early_progressive, - ToolProgression.internal_name: ToolProgression.option_progressive, - ElevatorProgression.internal_name: ElevatorProgression.option_progressive, - SkillProgression.internal_name: SkillProgression.option_progressive_with_masteries, - BuildingProgression.internal_name: BuildingProgression.option_progressive, - FestivalLocations.internal_name: FestivalLocations.option_hard, - ArcadeMachineLocations.internal_name: ArcadeMachineLocations.option_full_shuffling, - SpecialOrderLocations.internal_name: SpecialOrderLocations.option_board_qi, - QuestLocations.internal_name: "maximum", - Fishsanity.internal_name: Fishsanity.option_all, - Museumsanity.internal_name: Museumsanity.option_all, - Monstersanity.internal_name: Monstersanity.option_progressive_goals, - Shipsanity.internal_name: Shipsanity.option_everything, - Cooksanity.internal_name: Cooksanity.option_all, - Chefsanity.internal_name: Chefsanity.option_all, - Craftsanity.internal_name: Craftsanity.option_all, - Friendsanity.internal_name: Friendsanity.option_all, - FriendsanityHeartSize.internal_name: 1, - Booksanity.internal_name: Booksanity.option_all, - Walnutsanity.internal_name: Walnutsanity.preset_all, - NumberOfMovementBuffs.internal_name: 12, - EnabledFillerBuffs.internal_name: EnabledFillerBuffs.preset_all, - ExcludeGingerIsland.internal_name: ExcludeGingerIsland.option_false, - TrapItems.internal_name: TrapItems.default, - MultipleDaySleepEnabled.internal_name: MultipleDaySleepEnabled.default, - MultipleDaySleepCost.internal_name: MultipleDaySleepCost.default, - ExperienceMultiplier.internal_name: ExperienceMultiplier.default, - FriendshipMultiplier.internal_name: FriendshipMultiplier.default, - DebrisMultiplier.internal_name: DebrisMultiplier.default, - QuickStart.internal_name: QuickStart.default, - Gifting.internal_name: Gifting.default, - "death_link": DeathLink.default, -} -# @formatter:on - - -sv_options_presets: Dict[str, Dict[str, Any]] = { - "All random": all_random_settings, - "Easy": easy_settings, - "Medium": medium_settings, - "Hard": hard_settings, - "Nightmare": nightmare_settings, - "Short": short_settings, - "Minsanity": minsanity_settings, - "Allsanity": allsanity_settings, -} diff --git a/worlds/stardew_valley/rules.py b/worlds/stardew_valley/rules.py index 96f081788041..54afc31eb892 100644 --- a/worlds/stardew_valley/rules.py +++ b/worlds/stardew_valley/rules.py @@ -25,7 +25,7 @@ from .stardew_rule import And, StardewRule, true_ from .stardew_rule.indirect_connection import look_for_indirect_connection from .stardew_rule.rule_explain import explain -from .strings.ap_names.ap_option_names import OptionName +from .strings.ap_names.ap_option_names import WalnutsanityOptionName from .strings.ap_names.community_upgrade_names import CommunityUpgrade from .strings.ap_names.mods.mod_items import SVEQuestItem, SVERunes from .strings.ap_names.transport_names import Transportation @@ -436,7 +436,7 @@ def set_walnut_rules(logic: StardewLogic, multiworld, player, world_options: Sta def set_walnut_puzzle_rules(logic: StardewLogic, multiworld, player, world_options): - if OptionName.walnutsanity_puzzles not in world_options.walnutsanity: + if WalnutsanityOptionName.puzzles not in world_options.walnutsanity: return MultiWorldRules.add_rule(multiworld.get_location("Open Golden Coconut", player), logic.has(Geode.golden_coconut)) @@ -463,14 +463,14 @@ def set_walnut_puzzle_rules(logic: StardewLogic, multiworld, player, world_optio def set_walnut_bushes_rules(logic, multiworld, player, world_options): - if OptionName.walnutsanity_bushes not in world_options.walnutsanity: + if WalnutsanityOptionName.bushes not in world_options.walnutsanity: return # I don't think any of the bushes require something special, but that might change with ER return def set_walnut_dig_spot_rules(logic, multiworld, player, world_options): - if OptionName.walnutsanity_dig_spots not in world_options.walnutsanity: + if WalnutsanityOptionName.dig_spots not in world_options.walnutsanity: return for dig_spot_walnut in locations.locations_by_tag[LocationTags.WALNUTSANITY_DIG]: @@ -483,7 +483,7 @@ def set_walnut_dig_spot_rules(logic, multiworld, player, world_options): def set_walnut_repeatable_rules(logic, multiworld, player, world_options): - if OptionName.walnutsanity_repeatables not in world_options.walnutsanity: + if WalnutsanityOptionName.repeatables not in world_options.walnutsanity: return for i in range(1, 6): MultiWorldRules.set_rule(multiworld.get_location(f"Fishing Walnut {i}", player), logic.tool.has_fishing_rod(1)) diff --git a/worlds/stardew_valley/strings/ap_names/ap_option_names.py b/worlds/stardew_valley/strings/ap_names/ap_option_names.py index a5cc10f7d7b8..7ff2cc783d11 100644 --- a/worlds/stardew_valley/strings/ap_names/ap_option_names.py +++ b/worlds/stardew_valley/strings/ap_names/ap_option_names.py @@ -1,16 +1,19 @@ -class OptionName: - walnutsanity_puzzles = "Puzzles" - walnutsanity_bushes = "Bushes" - walnutsanity_dig_spots = "Dig Spots" - walnutsanity_repeatables = "Repeatables" - buff_luck = "Luck" - buff_damage = "Damage" - buff_defense = "Defense" - buff_immunity = "Immunity" - buff_health = "Health" - buff_energy = "Energy" - buff_bite = "Bite Rate" - buff_fish_trap = "Fish Trap" - buff_fishing_bar = "Fishing Bar Size" - buff_quality = "Quality" - buff_glow = "Glow" +class WalnutsanityOptionName: + puzzles = "Puzzles" + bushes = "Bushes" + dig_spots = "Dig Spots" + repeatables = "Repeatables" + + +class BuffOptionName: + luck = "Luck" + damage = "Damage" + defense = "Defense" + immunity = "Immunity" + health = "Health" + energy = "Energy" + bite = "Bite Rate" + fish_trap = "Fish Trap" + fishing_bar = "Fishing Bar Size" + quality = "Quality" + glow = "Glow" diff --git a/worlds/stardew_valley/strings/ap_names/mods/__init__.py b/worlds/stardew_valley/strings/ap_names/mods/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/worlds/stardew_valley/test/TestBooksanity.py b/worlds/stardew_valley/test/TestBooksanity.py index 3ca52f5728c1..942f35d961a9 100644 --- a/worlds/stardew_valley/test/TestBooksanity.py +++ b/worlds/stardew_valley/test/TestBooksanity.py @@ -1,6 +1,5 @@ from . import SVTestBase from ..options import ExcludeGingerIsland, Booksanity, Shipsanity -from ..strings.ap_names.ap_option_names import OptionName from ..strings.book_names import Book, LostBook power_books = [Book.animal_catalogue, Book.book_of_mysteries, diff --git a/worlds/stardew_valley/test/TestOptions.py b/worlds/stardew_valley/test/TestOptions.py index 9db7f06ff5a5..2cd83f013ae5 100644 --- a/worlds/stardew_valley/test/TestOptions.py +++ b/worlds/stardew_valley/test/TestOptions.py @@ -1,6 +1,6 @@ import itertools -from Options import NamedRange, Accessibility +from Options import NamedRange from . import SVTestCase, allsanity_no_mods_6_x_x, allsanity_mods_6_x_x, solo_multiworld from .assertion import WorldAssertMixin from .long.option_names import all_option_choices @@ -54,23 +54,6 @@ def test_given_goal_when_generate_then_victory_is_in_correct_location(self): victory = multi_world.find_item("Victory", 1) self.assertEqual(victory.name, location) - def test_given_perfection_goal_when_generate_then_accessibility_is_forced_to_full(self): - """There is a bug with the current victory condition of the perfection goal that can create unwinnable seeds if the accessibility is set to minimal and - the world gets flooded with progression items through plando. This will increase the amount of collected progression items pass the total amount - calculated for the world when creating the item pool. This will cause the victory condition to be met before all locations are collected, so some could - be left inaccessible, which in practice will make the seed unwinnable. - """ - for accessibility in Accessibility.options.keys(): - world_options = {Goal.internal_name: Goal.option_perfection, "accessibility": accessibility} - with self.solo_world_sub_test(f"Accessibility: {accessibility}", world_options) as (_, world): - self.assertEqual(world.options.accessibility, Accessibility.option_full) - - def test_given_allsanity_goal_when_generate_then_accessibility_is_forced_to_full(self): - for accessibility in Accessibility.options.keys(): - world_options = {Goal.internal_name: Goal.option_allsanity, "accessibility": accessibility} - with self.solo_world_sub_test(f"Accessibility: {accessibility}", world_options) as (_, world): - self.assertEqual(world.options.accessibility, Accessibility.option_full) - class TestSeasonRandomization(SVTestCase): def test_given_disabled_when_generate_then_all_seasons_are_precollected(self): @@ -144,7 +127,7 @@ def test_given_progressive_when_generate_then_tool_upgrades_are_locations(self): class TestGenerateAllOptionsWithExcludeGingerIsland(WorldAssertMixin, SVTestCase): - def test_given_choice_when_generate_exclude_ginger_island(self): + def test_given_choice_when_generate_exclude_ginger_island_then_ginger_island_is_properly_excluded(self): for option, option_choice in all_option_choices: if option is ExcludeGingerIsland: continue @@ -163,19 +146,6 @@ def test_given_choice_when_generate_exclude_ginger_island(self): self.assert_basic_checks(multiworld) self.assert_no_ginger_island_content(multiworld) - def test_given_island_related_goal_then_override_exclude_ginger_island(self): - island_goals = ["greatest_walnut_hunter", "perfection"] - for goal, exclude_island in itertools.product(island_goals, ExcludeGingerIsland.options): - world_options = { - Goal: goal, - ExcludeGingerIsland: exclude_island - } - - with self.solo_world_sub_test(f"Goal: {goal}, {ExcludeGingerIsland.internal_name}: {exclude_island}", world_options) \ - as (multiworld, stardew_world): - self.assertEqual(stardew_world.options.exclude_ginger_island, ExcludeGingerIsland.option_false) - self.assert_basic_checks(multiworld) - class TestTraps(SVTestCase): def test_given_no_traps_when_generate_then_no_trap_in_pool(self): diff --git a/worlds/stardew_valley/test/TestOptionsPairs.py b/worlds/stardew_valley/test/TestOptionsPairs.py index d953696e887d..d489ab1ff282 100644 --- a/worlds/stardew_valley/test/TestOptionsPairs.py +++ b/worlds/stardew_valley/test/TestOptionsPairs.py @@ -1,13 +1,12 @@ from . import SVTestBase from .assertion import WorldAssertMixin from .. import options -from ..options import Goal, QuestLocations class TestCrypticNoteNoQuests(WorldAssertMixin, SVTestBase): options = { - Goal.internal_name: Goal.option_cryptic_note, - QuestLocations.internal_name: "none" + options.Goal.internal_name: options.Goal.option_cryptic_note, + options.QuestLocations.internal_name: "none" } def test_given_option_pair_then_basic_checks(self): @@ -16,8 +15,8 @@ def test_given_option_pair_then_basic_checks(self): class TestCompleteCollectionNoQuests(WorldAssertMixin, SVTestBase): options = { - Goal.internal_name: Goal.option_complete_collection, - QuestLocations.internal_name: "none" + options.Goal.internal_name: options.Goal.option_complete_collection, + options.QuestLocations.internal_name: "none" } def test_given_option_pair_then_basic_checks(self): @@ -26,8 +25,8 @@ def test_given_option_pair_then_basic_checks(self): class TestProtectorOfTheValleyNoQuests(WorldAssertMixin, SVTestBase): options = { - Goal.internal_name: Goal.option_protector_of_the_valley, - QuestLocations.internal_name: "none" + options.Goal.internal_name: options.Goal.option_protector_of_the_valley, + options.QuestLocations.internal_name: "none" } def test_given_option_pair_then_basic_checks(self): @@ -36,8 +35,8 @@ def test_given_option_pair_then_basic_checks(self): class TestCraftMasterNoQuests(WorldAssertMixin, SVTestBase): options = { - Goal.internal_name: Goal.option_craft_master, - QuestLocations.internal_name: "none" + options.Goal.internal_name: options.Goal.option_craft_master, + options.QuestLocations.internal_name: "none" } def test_given_option_pair_then_basic_checks(self): @@ -46,7 +45,7 @@ def test_given_option_pair_then_basic_checks(self): class TestCraftMasterNoSpecialOrder(WorldAssertMixin, SVTestBase): options = { - options.Goal.internal_name: Goal.option_craft_master, + options.Goal.internal_name: options.Goal.option_craft_master, options.SpecialOrderLocations.internal_name: options.SpecialOrderLocations.alias_disabled, options.ExcludeGingerIsland.internal_name: options.ExcludeGingerIsland.option_true, options.Craftsanity.internal_name: options.Craftsanity.option_none diff --git a/worlds/stardew_valley/test/TestRegions.py b/worlds/stardew_valley/test/TestRegions.py index c2e962d88a7e..bd1b67297473 100644 --- a/worlds/stardew_valley/test/TestRegions.py +++ b/worlds/stardew_valley/test/TestRegions.py @@ -3,7 +3,8 @@ from typing import Set from BaseClasses import get_seed -from . import SVTestCase, complete_options_with_default +from . import SVTestCase +from .options.utils import fill_dataclass_with_default from .. import create_content from ..options import EntranceRandomization, ExcludeGingerIsland, SkillProgression from ..regions import vanilla_regions, vanilla_connections, randomize_connections, RandomizationFlag, create_final_connections_and_regions @@ -59,7 +60,7 @@ def test_entrance_randomization(self): (EntranceRandomization.option_non_progression, RandomizationFlag.NON_PROGRESSION), (EntranceRandomization.option_buildings_without_house, RandomizationFlag.BUILDINGS), (EntranceRandomization.option_buildings, RandomizationFlag.BUILDINGS)]: - sv_options = complete_options_with_default({ + sv_options = fill_dataclass_with_default({ EntranceRandomization.internal_name: option, ExcludeGingerIsland.internal_name: ExcludeGingerIsland.option_false, SkillProgression.internal_name: SkillProgression.option_progressive_with_masteries, @@ -87,7 +88,7 @@ def test_entrance_randomization_without_island(self): (EntranceRandomization.option_buildings_without_house, RandomizationFlag.BUILDINGS), (EntranceRandomization.option_buildings, RandomizationFlag.BUILDINGS)]: - sv_options = complete_options_with_default({ + sv_options = fill_dataclass_with_default({ EntranceRandomization.internal_name: option, ExcludeGingerIsland.internal_name: ExcludeGingerIsland.option_true, SkillProgression.internal_name: SkillProgression.option_progressive_with_masteries, @@ -116,7 +117,7 @@ def test_entrance_randomization_without_island(self): f"Connections are duplicated in randomization.") def test_cannot_put_island_access_on_island(self): - sv_options = complete_options_with_default({ + sv_options = fill_dataclass_with_default({ EntranceRandomization.internal_name: EntranceRandomization.option_buildings, ExcludeGingerIsland.internal_name: ExcludeGingerIsland.option_false, SkillProgression.internal_name: SkillProgression.option_progressive_with_masteries, diff --git a/worlds/stardew_valley/test/TestWalnutsanity.py b/worlds/stardew_valley/test/TestWalnutsanity.py index e1ab348def41..c1e8c2c8f095 100644 --- a/worlds/stardew_valley/test/TestWalnutsanity.py +++ b/worlds/stardew_valley/test/TestWalnutsanity.py @@ -1,6 +1,6 @@ from . import SVTestBase from ..options import ExcludeGingerIsland, Walnutsanity -from ..strings.ap_names.ap_option_names import OptionName +from ..strings.ap_names.ap_option_names import WalnutsanityOptionName class TestWalnutsanityNone(SVTestBase): @@ -49,7 +49,7 @@ def test_logic_received_walnuts(self): class TestWalnutsanityPuzzles(SVTestBase): options = { ExcludeGingerIsland: ExcludeGingerIsland.option_false, - Walnutsanity: frozenset({OptionName.walnutsanity_puzzles}), + Walnutsanity: frozenset({WalnutsanityOptionName.puzzles}), } def test_only_puzzle_walnut_locations(self): @@ -90,7 +90,7 @@ def test_field_office_locations_require_professor_snail(self): class TestWalnutsanityBushes(SVTestBase): options = { ExcludeGingerIsland: ExcludeGingerIsland.option_false, - Walnutsanity: frozenset({OptionName.walnutsanity_bushes}), + Walnutsanity: frozenset({WalnutsanityOptionName.bushes}), } def test_only_bush_walnut_locations(self): @@ -108,7 +108,7 @@ def test_only_bush_walnut_locations(self): class TestWalnutsanityPuzzlesAndBushes(SVTestBase): options = { ExcludeGingerIsland: ExcludeGingerIsland.option_false, - Walnutsanity: frozenset({OptionName.walnutsanity_puzzles, OptionName.walnutsanity_bushes}), + Walnutsanity: frozenset({WalnutsanityOptionName.puzzles, WalnutsanityOptionName.bushes}), } def test_only_bush_walnut_locations(self): @@ -136,7 +136,7 @@ def test_logic_received_walnuts(self): class TestWalnutsanityDigSpots(SVTestBase): options = { ExcludeGingerIsland: ExcludeGingerIsland.option_false, - Walnutsanity: frozenset({OptionName.walnutsanity_dig_spots}), + Walnutsanity: frozenset({WalnutsanityOptionName.dig_spots}), } def test_only_dig_spots_walnut_locations(self): @@ -154,7 +154,7 @@ def test_only_dig_spots_walnut_locations(self): class TestWalnutsanityRepeatables(SVTestBase): options = { ExcludeGingerIsland: ExcludeGingerIsland.option_false, - Walnutsanity: frozenset({OptionName.walnutsanity_repeatables}), + Walnutsanity: frozenset({WalnutsanityOptionName.repeatables}), } def test_only_repeatable_walnut_locations(self): diff --git a/worlds/stardew_valley/test/__init__.py b/worlds/stardew_valley/test/__init__.py index 1a312e569d11..de0ed97882e3 100644 --- a/worlds/stardew_valley/test/__init__.py +++ b/worlds/stardew_valley/test/__init__.py @@ -2,18 +2,17 @@ import os import threading import unittest -from argparse import Namespace from contextlib import contextmanager from typing import Dict, ClassVar, Iterable, Tuple, Optional, List, Union, Any -from BaseClasses import MultiWorld, CollectionState, PlandoOptions, get_seed, Location, Item -from Options import VerifyKeys +from BaseClasses import MultiWorld, CollectionState, get_seed, Location, Item from test.bases import WorldTestBase from test.general import gen_steps, setup_solo_multiworld as setup_base_solo_multiworld from worlds.AutoWorld import call_all from .assertion import RuleAssertMixin +from .options.utils import fill_namespace_with_default, parse_class_option_keys, fill_dataclass_with_default from .. import StardewValleyWorld, options, StardewItem -from ..options import StardewValleyOptions, StardewValleyOption +from ..options import StardewValleyOption logger = logging.getLogger(__name__) @@ -360,15 +359,7 @@ def setup_solo_multiworld(test_options: Optional[Dict[Union[str, StardewValleyOp multiworld = setup_base_solo_multiworld(StardewValleyWorld, (), seed=seed) # print(f"Seed: {multiworld.seed}") # Uncomment to print the seed for every test - args = Namespace() - for name, option in StardewValleyWorld.options_dataclass.type_hints.items(): - value = option.from_any(test_options.get(name, option.default)) - - if issubclass(option, VerifyKeys): - # Values should already be verified, but just in case... - value.verify(StardewValleyWorld, "Tester", PlandoOptions.bosses) - - setattr(args, name, {1: value}) + args = fill_namespace_with_default(test_options) multiworld.set_options(args) if "start_inventory" in test_options: @@ -388,24 +379,6 @@ def setup_solo_multiworld(test_options: Optional[Dict[Union[str, StardewValleyOp return multiworld -def parse_class_option_keys(test_options: Optional[Dict]) -> dict: - """ Now the option class is allowed as key. """ - if test_options is None: - return {} - parsed_options = {} - - for option, value in test_options.items(): - if hasattr(option, "internal_name"): - assert option.internal_name not in test_options, "Defined two times by class and internal_name" - parsed_options[option.internal_name] = value - else: - assert option in StardewValleyOptions.type_hints, \ - f"All keys of world_options must be a possible Stardew Valley option, {option} is not." - parsed_options[option] = value - - return parsed_options - - def search_world_cache(cache: Dict[frozenset, MultiWorld], frozen_options: frozenset) -> Optional[MultiWorld]: try: return cache[frozen_options] @@ -421,16 +394,6 @@ def add_to_world_cache(cache: Dict[frozenset, MultiWorld], frozen_options: froze cache[frozen_options] = multi_world -def complete_options_with_default(options_to_complete=None) -> StardewValleyOptions: - if options_to_complete is None: - options_to_complete = {} - - for name, option in StardewValleyOptions.type_hints.items(): - options_to_complete[name] = option.from_any(options_to_complete.get(name, option.default)) - - return StardewValleyOptions(**options_to_complete) - - def setup_multiworld(test_options: Iterable[Dict[str, int]] = None, seed=None) -> MultiWorld: # noqa if test_options is None: test_options = [] @@ -442,22 +405,10 @@ def setup_multiworld(test_options: Iterable[Dict[str, int]] = None, seed=None) - for i in range(1, len(test_options) + 1): multiworld.game[i] = StardewValleyWorld.game multiworld.player_name.update({i: f"Tester{i}"}) - args = create_args(test_options) + args = fill_namespace_with_default(test_options) multiworld.set_options(args) for step in gen_steps: call_all(multiworld, step) return multiworld - - -def create_args(test_options): - args = Namespace() - for name, option in StardewValleyWorld.options_dataclass.type_hints.items(): - options = {} - for i in range(1, len(test_options) + 1): - player_options = test_options[i - 1] - value = option(player_options[name]) if name in player_options else option.from_any(option.default) - options.update({i: value}) - setattr(args, name, options) - return args diff --git a/worlds/stardew_valley/test/mods/TestMods.py b/worlds/stardew_valley/test/mods/TestMods.py index 56138cf582a7..89f82870e4a7 100644 --- a/worlds/stardew_valley/test/mods/TestMods.py +++ b/worlds/stardew_valley/test/mods/TestMods.py @@ -1,7 +1,8 @@ import random from BaseClasses import get_seed -from .. import SVTestBase, SVTestCase, allsanity_no_mods_6_x_x, allsanity_mods_6_x_x, complete_options_with_default, solo_multiworld +from .. import SVTestBase, SVTestCase, allsanity_no_mods_6_x_x, allsanity_mods_6_x_x, solo_multiworld, \ + fill_dataclass_with_default from ..assertion import ModAssertMixin, WorldAssertMixin from ... import items, Group, ItemClassification, create_content from ... import options @@ -122,7 +123,7 @@ def test_mod_entrance_randomization(self): (options.EntranceRandomization.option_non_progression, RandomizationFlag.NON_PROGRESSION), (options.EntranceRandomization.option_buildings_without_house, RandomizationFlag.BUILDINGS), (options.EntranceRandomization.option_buildings, RandomizationFlag.BUILDINGS)]: - sv_options = complete_options_with_default({ + sv_options = fill_dataclass_with_default({ options.EntranceRandomization.internal_name: option, options.ExcludeGingerIsland.internal_name: options.ExcludeGingerIsland.option_false, SkillProgression.internal_name: SkillProgression.option_progressive_with_masteries, diff --git a/worlds/stardew_valley/test/options/TestForcedOptions.py b/worlds/stardew_valley/test/options/TestForcedOptions.py new file mode 100644 index 000000000000..4c8f0f42c389 --- /dev/null +++ b/worlds/stardew_valley/test/options/TestForcedOptions.py @@ -0,0 +1,84 @@ +import itertools +import unittest + +import Options as ap_options +from .utils import fill_dataclass_with_default +from ... import options +from ...options.forced_options import force_change_options_if_incompatible + + +class TestGoalsRequiringAllLocationsOverrideAccessibility(unittest.TestCase): + + def test_given_goal_requiring_all_locations_when_generate_then_accessibility_is_forced_to_full(self): + """There is a bug with the current victory condition of the perfection goal that can create unwinnable seeds if the accessibility is set to minimal and + the world gets flooded with progression items through plando. This will increase the amount of collected progression items pass the total amount + calculated for the world when creating the item pool. This will cause the victory condition to be met before all locations are collected, so some could + be left inaccessible, which in practice will make the seed unwinnable. + """ + + for goal in [options.Goal.option_perfection, options.Goal.option_allsanity]: + for accessibility in ap_options.Accessibility.options.keys(): + with self.subTest(f"Goal: {options.Goal.get_option_name(goal)} Accessibility: {accessibility}"): + world_options = fill_dataclass_with_default({ + options.Goal: goal, + "accessibility": accessibility + }) + + force_change_options_if_incompatible(world_options, 1, "Tester") + + self.assertEqual(world_options.accessibility.value, ap_options.Accessibility.option_full) + + +class TestGingerIslandRelatedGoalsOverrideGingerIslandExclusion(unittest.TestCase): + + def test_given_island_related_goal_when_generate_then_override_exclude_ginger_island(self): + for goal in [options.Goal.option_greatest_walnut_hunter, options.Goal.option_perfection]: + for exclude_island in options.ExcludeGingerIsland.options: + with self.subTest(f"Goal: {options.Goal.get_option_name(goal)} Exclude Ginger Island: {exclude_island}"): + world_options = fill_dataclass_with_default({ + options.Goal: goal, + options.ExcludeGingerIsland: exclude_island + }) + + force_change_options_if_incompatible(world_options, 1, "Tester") + + self.assertEqual(world_options.exclude_ginger_island.value, options.ExcludeGingerIsland.option_false) + + +class TestGingerIslandExclusionOverridesWalnutsanity(unittest.TestCase): + + def test_given_ginger_island_excluded_when_generate_then_walnutsanity_is_forced_disabled(self): + walnutsanity_options = options.Walnutsanity.valid_keys + for walnutsanity in ( + walnutsanity + for r in range(len(walnutsanity_options) + 1) + for walnutsanity in itertools.combinations(walnutsanity_options, r) + ): + with self.subTest(f"Walnutsanity: {walnutsanity}"): + world_options = fill_dataclass_with_default({ + options.ExcludeGingerIsland: options.ExcludeGingerIsland.option_true, + options.Walnutsanity: walnutsanity + }) + + force_change_options_if_incompatible(world_options, 1, "Tester") + + self.assertEqual(world_options.walnutsanity.value, options.Walnutsanity.preset_none) + + def test_given_ginger_island_related_goal_and_ginger_island_excluded_when_generate_then_walnutsanity_is_not_changed(self): + for goal in [options.Goal.option_greatest_walnut_hunter, options.Goal.option_perfection]: + walnutsanity_options = options.Walnutsanity.valid_keys + for original_walnutsanity_choice in ( + set(walnutsanity) + for r in range(len(walnutsanity_options) + 1) + for walnutsanity in itertools.combinations(walnutsanity_options, r) + ): + with self.subTest(f"Goal: {options.Goal.get_option_name(goal)} Walnutsanity: {original_walnutsanity_choice}"): + world_options = fill_dataclass_with_default({ + options.Goal: goal, + options.ExcludeGingerIsland: options.ExcludeGingerIsland.option_true, + options.Walnutsanity: original_walnutsanity_choice + }) + + force_change_options_if_incompatible(world_options, 1, "Tester") + + self.assertEqual(world_options.walnutsanity.value, original_walnutsanity_choice) diff --git a/worlds/stardew_valley/test/TestPresets.py b/worlds/stardew_valley/test/options/TestPresets.py similarity index 86% rename from worlds/stardew_valley/test/TestPresets.py rename to worlds/stardew_valley/test/options/TestPresets.py index 2bb1c7fbaeaf..9384acd77060 100644 --- a/worlds/stardew_valley/test/TestPresets.py +++ b/worlds/stardew_valley/test/options/TestPresets.py @@ -1,9 +1,7 @@ -import builtins -import inspect - from Options import PerGameCommonOptions, OptionSet -from . import SVTestCase -from .. import sv_options_presets, StardewValleyOptions +from .. import SVTestCase +from ...options import StardewValleyOptions +from ...options.presets import sv_options_presets class TestPresets(SVTestCase): @@ -18,4 +16,4 @@ def test_all_presets_explicitly_set_all_options(self): with self.subTest(f"{preset_name}"): for option_name in mandatory_option_names: with self.subTest(f"{preset_name} -> {option_name}"): - self.assertIn(option_name, sv_options_presets[preset_name]) \ No newline at end of file + self.assertIn(option_name, sv_options_presets[preset_name]) diff --git a/worlds/stardew_valley/test/options/__init__.py b/worlds/stardew_valley/test/options/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/worlds/stardew_valley/test/options/utils.py b/worlds/stardew_valley/test/options/utils.py new file mode 100644 index 000000000000..9f02105da84f --- /dev/null +++ b/worlds/stardew_valley/test/options/utils.py @@ -0,0 +1,68 @@ +from argparse import Namespace +from typing import Any, Iterable + +from BaseClasses import PlandoOptions +from Options import VerifyKeys +from ... import StardewValleyWorld +from ...options import StardewValleyOptions, StardewValleyOption + + +def parse_class_option_keys(test_options: dict[str | StardewValleyOption, Any] | None) -> dict: + """ Now the option class is allowed as key. """ + if test_options is None: + return {} + parsed_options = {} + + for option, value in test_options.items(): + if hasattr(option, "internal_name"): + assert option.internal_name not in test_options, "Defined two times by class and internal_name" + parsed_options[option.internal_name] = value + else: + assert option in StardewValleyOptions.type_hints, \ + f"All keys of world_options must be a possible Stardew Valley option, {option} is not." + parsed_options[option] = value + + return parsed_options + + +def fill_dataclass_with_default(test_options: dict[str | StardewValleyOption, Any] | None) -> StardewValleyOptions: + test_options = parse_class_option_keys(test_options) + + filled_options = {} + for option_name, option_class in StardewValleyOptions.type_hints.items(): + + value = option_class.from_any(test_options.get(option_name, option_class.default)) + + if issubclass(option_class, VerifyKeys): + # Values should already be verified, but just in case... + value.verify(StardewValleyWorld, "Tester", PlandoOptions.bosses) + + filled_options[option_name] = value + + return StardewValleyOptions(**filled_options) + + +def fill_namespace_with_default(test_options: dict[str, Any] | Iterable[dict[str, Any]]) -> Namespace: + if isinstance(test_options, dict): + test_options = [test_options] + + args = Namespace() + for option_name, option_class in StardewValleyOptions.type_hints.items(): + all_players_option = {} + + for player_id, player_options in enumerate(test_options): + # Player id starts at 1 + player_id += 1 + player_name = f"Tester{player_id}" + + value = option_class.from_any(player_options.get(option_name, option_class.default)) + + if issubclass(option_class, VerifyKeys): + # Values should already be verified, but just in case... + value.verify(StardewValleyWorld, player_name, PlandoOptions.bosses) + + all_players_option[player_id] = value + + setattr(args, option_name, all_players_option) + + return args diff --git a/worlds/stardew_valley/test/stability/TestUniversalTracker.py b/worlds/stardew_valley/test/stability/TestUniversalTracker.py index 3e334098341d..4655b37adf07 100644 --- a/worlds/stardew_valley/test/stability/TestUniversalTracker.py +++ b/worlds/stardew_valley/test/stability/TestUniversalTracker.py @@ -1,7 +1,7 @@ import unittest from unittest.mock import Mock -from .. import SVTestBase, create_args, allsanity_mods_6_x_x +from .. import SVTestBase, allsanity_mods_6_x_x, fill_namespace_with_default from ... import STARDEW_VALLEY, FarmType, BundleRandomization, EntranceRandomization @@ -29,7 +29,7 @@ def test_all_locations_and_items_are_the_same_between_two_generations(self): fake_context = Mock() fake_context.re_gen_passthrough = {STARDEW_VALLEY: ut_data} - args = create_args({0: self.options}) + args = fill_namespace_with_default({0: self.options}) args.outputpath = None args.outputname = None args.multi = 1 From aa22b62b41226b62734988da0b5dcd6f5bff7a33 Mon Sep 17 00:00:00 2001 From: Jouramie <16137441+Jouramie@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:17:25 -0500 Subject: [PATCH 26/36] Stardew Valley: Force deactivation of Mr. Qi's special orders when ginger island is deactivated (#4348) --- .../stardew_valley/options/forced_options.py | 12 +++++++ .../test/options/TestForcedOptions.py | 31 +++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/worlds/stardew_valley/options/forced_options.py b/worlds/stardew_valley/options/forced_options.py index 84cdc936b3f1..7429f3cbfc65 100644 --- a/worlds/stardew_valley/options/forced_options.py +++ b/worlds/stardew_valley/options/forced_options.py @@ -9,6 +9,7 @@ def force_change_options_if_incompatible(world_options: options.StardewValleyOptions, player: int, player_name: str) -> None: force_ginger_island_inclusion_when_goal_is_ginger_island_related(world_options, player, player_name) force_walnutsanity_deactivation_when_ginger_island_is_excluded(world_options, player, player_name) + force_qi_special_orders_deactivation_when_ginger_island_is_excluded(world_options, player, player_name) force_accessibility_to_full_when_goal_requires_all_locations(player, player_name, world_options) @@ -35,6 +36,17 @@ def force_walnutsanity_deactivation_when_ginger_island_is_excluded(world_options f"Ginger Island was excluded from {player} ({player_name})'s world, so walnutsanity was force disabled") +def force_qi_special_orders_deactivation_when_ginger_island_is_excluded(world_options: options.StardewValleyOptions, player: int, player_name: str): + ginger_island_is_excluded = world_options.exclude_ginger_island == options.ExcludeGingerIsland.option_true + qi_board_is_active = world_options.special_order_locations.value & options.SpecialOrderLocations.value_qi + + if ginger_island_is_excluded and qi_board_is_active: + original_option_name = world_options.special_order_locations.current_option_name + world_options.special_order_locations.value -= options.SpecialOrderLocations.value_qi + logger.warning(f"Mr. Qi's Special Orders requires Ginger Island. " + f"Ginger Island was excluded from {player} ({player_name})'s world, so Special Order Locations was changed from {original_option_name} to {world_options.special_order_locations.current_option_name}") + + def force_accessibility_to_full_when_goal_requires_all_locations(player, player_name, world_options): goal_is_allsanity = world_options.goal == options.Goal.option_allsanity goal_is_perfection = world_options.goal == options.Goal.option_perfection diff --git a/worlds/stardew_valley/test/options/TestForcedOptions.py b/worlds/stardew_valley/test/options/TestForcedOptions.py index 4c8f0f42c389..c32def6c6ca8 100644 --- a/worlds/stardew_valley/test/options/TestForcedOptions.py +++ b/worlds/stardew_valley/test/options/TestForcedOptions.py @@ -82,3 +82,34 @@ def test_given_ginger_island_related_goal_and_ginger_island_excluded_when_genera force_change_options_if_incompatible(world_options, 1, "Tester") self.assertEqual(world_options.walnutsanity.value, original_walnutsanity_choice) + + +class TestGingerIslandExclusionOverridesQisSpecialOrders(unittest.TestCase): + + def test_given_ginger_island_excluded_when_generate_then_qis_special_orders_are_forced_disabled(self): + special_order_options = options.SpecialOrderLocations.options + for special_order in special_order_options.keys(): + with self.subTest(f"Special order: {special_order}"): + world_options = fill_dataclass_with_default({ + options.ExcludeGingerIsland: options.ExcludeGingerIsland.option_true, + options.SpecialOrderLocations: special_order + }) + + force_change_options_if_incompatible(world_options, 1, "Tester") + + self.assertEqual(world_options.special_order_locations.value & options.SpecialOrderLocations.value_qi, 0) + + def test_given_ginger_island_related_goal_and_ginger_island_excluded_when_generate_then_special_orders_is_not_changed(self): + for goal in [options.Goal.option_greatest_walnut_hunter, options.Goal.option_perfection]: + special_order_options = options.SpecialOrderLocations.options + for special_order, original_special_order_value in special_order_options.items(): + with self.subTest(f"Special order: {special_order}"): + world_options = fill_dataclass_with_default({ + options.Goal: goal, + options.ExcludeGingerIsland: options.ExcludeGingerIsland.option_true, + options.SpecialOrderLocations: special_order + }) + + force_change_options_if_incompatible(world_options, 1, "Tester") + + self.assertEqual(world_options.special_order_locations.value, original_special_order_value) From 0b3d34ab24ffab023800e6230ca95e840cdcb683 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Tue, 10 Dec 2024 02:25:09 +0100 Subject: [PATCH 27/36] CI: update scan-build to v19 (#4338) --- .github/workflows/scan-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scan-build.yml b/.github/workflows/scan-build.yml index 5234d862b4d3..ac842070625f 100644 --- a/.github/workflows/scan-build.yml +++ b/.github/workflows/scan-build.yml @@ -40,10 +40,10 @@ jobs: run: | wget https://apt.llvm.org/llvm.sh chmod +x ./llvm.sh - sudo ./llvm.sh 17 + sudo ./llvm.sh 19 - name: Install scan-build command run: | - sudo apt install clang-tools-17 + sudo apt install clang-tools-19 - name: Get a recent python uses: actions/setup-python@v5 with: @@ -56,7 +56,7 @@ jobs: - name: scan-build run: | source venv/bin/activate - scan-build-17 --status-bugs -o scan-build-reports -disable-checker deadcode.DeadStores python setup.py build -y + scan-build-19 --status-bugs -o scan-build-reports -disable-checker deadcode.DeadStores python setup.py build -y - name: Store report if: failure() uses: actions/upload-artifact@v4 From 4a5ba756b6d0d26b40a8c3ca5bb3ea3e1ed931b3 Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Tue, 10 Dec 2024 02:44:41 +0100 Subject: [PATCH 28/36] WebHost: Set Generator memory limit to 4GiB (#4319) * WebHost: Set Generator memory limit to 4GiB * WebHost: make generator memory limit configurable, better naming * Update WebHostLib/__init__.py Co-authored-by: Fabian Dill * Update docs/webhost configuration sample.yaml --------- Co-authored-by: Fabian Dill --- WebHostLib/__init__.py | 2 ++ WebHostLib/autolauncher.py | 21 ++++++++++++++++++--- docs/webhost configuration sample.yaml | 10 ++++++++-- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/WebHostLib/__init__.py b/WebHostLib/__init__.py index 9b2b6736f13c..9c713419c986 100644 --- a/WebHostLib/__init__.py +++ b/WebHostLib/__init__.py @@ -39,6 +39,8 @@ app.config["JOB_THRESHOLD"] = 1 # after what time in seconds should generation be aborted, freeing the queue slot. Can be set to None to disable. app.config["JOB_TIME"] = 600 +# memory limit for generator processes in bytes +app.config["GENERATOR_MEMORY_LIMIT"] = 4294967296 app.config['SESSION_PERMANENT'] = True # waitress uses one thread for I/O, these are for processing of views that then get sent diff --git a/WebHostLib/autolauncher.py b/WebHostLib/autolauncher.py index 08a1309ebc73..8ba093e014c5 100644 --- a/WebHostLib/autolauncher.py +++ b/WebHostLib/autolauncher.py @@ -6,6 +6,7 @@ import typing from datetime import timedelta, datetime from threading import Event, Thread +from typing import Any from uuid import UUID from pony.orm import db_session, select, commit @@ -53,7 +54,21 @@ def launch_generator(pool: multiprocessing.pool.Pool, generation: Generation): generation.state = STATE_STARTED -def init_db(pony_config: dict): +def init_generator(config: dict[str, Any]) -> None: + try: + import resource + except ModuleNotFoundError: + pass # unix only module + else: + # set soft limit for memory to from config (default 4GiB) + soft_limit = config["GENERATOR_MEMORY_LIMIT"] + old_limit, hard_limit = resource.getrlimit(resource.RLIMIT_AS) + if soft_limit != old_limit: + resource.setrlimit(resource.RLIMIT_AS, (soft_limit, hard_limit)) + logging.debug(f"Changed AS mem limit {old_limit} -> {soft_limit}") + del resource, soft_limit, hard_limit + + pony_config = config["PONY"] db.bind(**pony_config) db.generate_mapping() @@ -105,8 +120,8 @@ def keep_running(): try: with Locker("autogen"): - with multiprocessing.Pool(config["GENERATORS"], initializer=init_db, - initargs=(config["PONY"],), maxtasksperchild=10) as generator_pool: + with multiprocessing.Pool(config["GENERATORS"], initializer=init_generator, + initargs=(config,), maxtasksperchild=10) as generator_pool: with db_session: to_start = select(generation for generation in Generation if generation.state == STATE_STARTED) diff --git a/docs/webhost configuration sample.yaml b/docs/webhost configuration sample.yaml index afb87b399643..93094f1ce73f 100644 --- a/docs/webhost configuration sample.yaml +++ b/docs/webhost configuration sample.yaml @@ -27,8 +27,14 @@ # If you wish to deploy, uncomment the following line and set it to something not easily guessable. # SECRET_KEY: "Your secret key here" -# TODO -#JOB_THRESHOLD: 2 +# Slot limit to post a generation to Generator process pool instead of rolling directly in WebHost process +#JOB_THRESHOLD: 1 + +# After what time in seconds should generation be aborted, freeing the queue slot. Can be set to None to disable. +#JOB_TIME: 600 + +# Memory limit for Generator processes in bytes, -1 for unlimited. Currently only works on Linux. +#GENERATOR_MEMORY_LIMIT: 4294967296 # waitress uses one thread for I/O, these are for processing of view that get sent #WAITRESS_THREADS: 10 From f79657b41a8aa7904193331b7ae181e0ff9ab967 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 10 Dec 2024 19:53:42 +0100 Subject: [PATCH 29/36] WebHost: disable abbreviations for argparse (#4352) --- WebHost.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebHost.py b/WebHost.py index 3790a5f6f4d2..768eeb512289 100644 --- a/WebHost.py +++ b/WebHost.py @@ -34,7 +34,7 @@ def get_app() -> "Flask": app.config.from_file(configpath, yaml.safe_load) logging.info(f"Updated config from {configpath}") # inside get_app() so it's usable in systems like gunicorn, which do not run WebHost.py, but import it. - parser = argparse.ArgumentParser() + parser = argparse.ArgumentParser(allow_abbrev=False) parser.add_argument('--config_override', default=None, help="Path to yaml config file that overrules config.yaml.") args = parser.parse_known_args()[0] From 3fb0b57d19b9c223107308c84605e05e6b16e1cf Mon Sep 17 00:00:00 2001 From: black-sliver <59490463+black-sliver@users.noreply.github.com> Date: Tue, 10 Dec 2024 20:09:36 +0100 Subject: [PATCH 30/36] Core: fix exceptions coming from LocationStore (#4358) * Speedups: add instructions for ASAN * Speedups: move typevars out of classes * Speedups, NetUtils: raise correct exceptions * Speedups: double-check malloc * Tests: more LocationStore tests --- NetUtils.py | 2 ++ _speedups.pyx | 43 ++++++++++++++++++---------- _speedups.pyxbld | 18 ++++++++---- test/netutils/test_location_store.py | 41 ++++++++++++++++++++++++++ 4 files changed, 84 insertions(+), 20 deletions(-) diff --git a/NetUtils.py b/NetUtils.py index ec6ff3eb1d81..196a030f4969 100644 --- a/NetUtils.py +++ b/NetUtils.py @@ -410,6 +410,8 @@ def get_checked(self, state: typing.Dict[typing.Tuple[int, int], typing.Set[int] checked = state[team, slot] if not checked: # This optimizes the case where everyone connects to a fresh game at the same time. + if slot not in self: + raise KeyError(slot) return [] return [location_id for location_id in self[slot] if diff --git a/_speedups.pyx b/_speedups.pyx index dc039e336500..2ad1a2953a2b 100644 --- a/_speedups.pyx +++ b/_speedups.pyx @@ -69,6 +69,14 @@ cdef struct IndexEntry: size_t count +if TYPE_CHECKING: + State = Dict[Tuple[int, int], Set[int]] +else: + State = Union[Tuple[int, int], Set[int], defaultdict] + +T = TypeVar('T') + + @cython.auto_pickle(False) cdef class LocationStore: """Compact store for locations and their items in a MultiServer""" @@ -137,10 +145,16 @@ cdef class LocationStore: warnings.warn("Game has no locations") # allocate the arrays and invalidate index (0xff...) - self.entries = self._mem.alloc(count, sizeof(LocationEntry)) + if count: + # leaving entries as NULL if there are none, makes potential memory errors more visible + self.entries = self._mem.alloc(count, sizeof(LocationEntry)) self.sender_index = self._mem.alloc(max_sender + 1, sizeof(IndexEntry)) self._raw_proxies = self._mem.alloc(max_sender + 1, sizeof(PyObject*)) + assert (not self.entries) == (not count) + assert self.sender_index + assert self._raw_proxies + # build entries and index cdef size_t i = 0 for sender, locations in sorted(locations_dict.items()): @@ -190,8 +204,6 @@ cdef class LocationStore: raise KeyError(key) return self._raw_proxies[key] - T = TypeVar('T') - def get(self, key: int, default: T) -> Union[PlayerLocationProxy, T]: # calling into self.__getitem__ here is slow, but this is not used in MultiServer try: @@ -246,12 +258,11 @@ cdef class LocationStore: all_locations[sender].add(entry.location) return all_locations - if TYPE_CHECKING: - State = Dict[Tuple[int, int], Set[int]] - else: - State = Union[Tuple[int, int], Set[int], defaultdict] - def get_checked(self, state: State, team: int, slot: int) -> List[int]: + cdef ap_player_t sender = slot + if sender < 0 or sender >= self.sender_index_size: + raise KeyError(slot) + # This used to validate checks actually exist. A remnant from the past. # If the order of locations becomes relevant at some point, we could not do sorted(set), so leaving it. cdef set checked = state[team, slot] @@ -263,7 +274,6 @@ cdef class LocationStore: # Unless the set is close to empty, it's cheaper to use the python set directly, so we do that. cdef LocationEntry* entry - cdef ap_player_t sender = slot cdef size_t start = self.sender_index[sender].start cdef size_t count = self.sender_index[sender].count return [entry.location for @@ -273,9 +283,11 @@ cdef class LocationStore: def get_missing(self, state: State, team: int, slot: int) -> List[int]: cdef LocationEntry* entry cdef ap_player_t sender = slot + if sender < 0 or sender >= self.sender_index_size: + raise KeyError(slot) + cdef set checked = state[team, slot] cdef size_t start = self.sender_index[sender].start cdef size_t count = self.sender_index[sender].count - cdef set checked = state[team, slot] if not len(checked): # Skip `in` if none have been checked. # This optimizes the case where everyone connects to a fresh game at the same time. @@ -290,9 +302,11 @@ cdef class LocationStore: def get_remaining(self, state: State, team: int, slot: int) -> List[Tuple[int, int]]: cdef LocationEntry* entry cdef ap_player_t sender = slot + if sender < 0 or sender >= self.sender_index_size: + raise KeyError(slot) + cdef set checked = state[team, slot] cdef size_t start = self.sender_index[sender].start cdef size_t count = self.sender_index[sender].count - cdef set checked = state[team, slot] return sorted([(entry.receiver, entry.item) for entry in self.entries[start:start+count] if entry.location not in checked]) @@ -328,7 +342,8 @@ cdef class PlayerLocationProxy: cdef LocationEntry* entry = NULL # binary search cdef size_t l = self._store.sender_index[self._player].start - cdef size_t r = l + self._store.sender_index[self._player].count + cdef size_t e = l + self._store.sender_index[self._player].count + cdef size_t r = e cdef size_t m while l < r: m = (l + r) // 2 @@ -337,7 +352,7 @@ cdef class PlayerLocationProxy: l = m + 1 else: r = m - if entry: # count != 0 + if l < e: entry = self._store.entries + l if entry.location == loc: return entry @@ -349,8 +364,6 @@ cdef class PlayerLocationProxy: return entry.item, entry.receiver, entry.flags raise KeyError(f"No location {key} for player {self._player}") - T = TypeVar('T') - def get(self, key: int, default: T) -> Union[Tuple[int, int, int], T]: cdef LocationEntry* entry = self._get(key) if entry: diff --git a/_speedups.pyxbld b/_speedups.pyxbld index 974eaed03b6a..98f9734614cc 100644 --- a/_speedups.pyxbld +++ b/_speedups.pyxbld @@ -3,8 +3,16 @@ import os def make_ext(modname, pyxfilename): from distutils.extension import Extension - return Extension(name=modname, - sources=[pyxfilename], - depends=["intset.h"], - include_dirs=[os.getcwd()], - language="c") + return Extension( + name=modname, + sources=[pyxfilename], + depends=["intset.h"], + include_dirs=[os.getcwd()], + language="c", + # to enable ASAN and debug build: + # extra_compile_args=["-fsanitize=address", "-UNDEBUG", "-Og", "-g"], + # extra_objects=["-fsanitize=address"], + # NOTE: we can not put -lasan at the front of link args, so needs to be run with + # LD_PRELOAD=/usr/lib/libasan.so ASAN_OPTIONS=detect_leaks=0 path/to/exe + # NOTE: this can't find everything unless libpython and cymem are also built with ASAN + ) diff --git a/test/netutils/test_location_store.py b/test/netutils/test_location_store.py index 1b984015844d..264f35b3cc65 100644 --- a/test/netutils/test_location_store.py +++ b/test/netutils/test_location_store.py @@ -115,6 +115,7 @@ def test_find_item(self) -> None: def test_get_for_player(self) -> None: self.assertEqual(self.store.get_for_player(3), {4: {9}}) self.assertEqual(self.store.get_for_player(1), {1: {13}, 2: {22, 23}}) + self.assertEqual(self.store.get_for_player(9999), {}) def test_get_checked(self) -> None: self.assertEqual(self.store.get_checked(full_state, 0, 1), [11, 12, 13]) @@ -122,18 +123,48 @@ def test_get_checked(self) -> None: self.assertEqual(self.store.get_checked(empty_state, 0, 1), []) self.assertEqual(self.store.get_checked(full_state, 0, 3), [9]) + def test_get_checked_exception(self) -> None: + with self.assertRaises(KeyError): + self.store.get_checked(empty_state, 0, 9999) + bad_state = {(0, 6): {1}} + with self.assertRaises(KeyError): + self.store.get_checked(bad_state, 0, 6) + bad_state = {(0, 9999): set()} + with self.assertRaises(KeyError): + self.store.get_checked(bad_state, 0, 9999) + def test_get_missing(self) -> None: self.assertEqual(self.store.get_missing(full_state, 0, 1), []) self.assertEqual(self.store.get_missing(one_state, 0, 1), [11, 13]) self.assertEqual(self.store.get_missing(empty_state, 0, 1), [11, 12, 13]) self.assertEqual(self.store.get_missing(empty_state, 0, 3), [9]) + def test_get_missing_exception(self) -> None: + with self.assertRaises(KeyError): + self.store.get_missing(empty_state, 0, 9999) + bad_state = {(0, 6): {1}} + with self.assertRaises(KeyError): + self.store.get_missing(bad_state, 0, 6) + bad_state = {(0, 9999): set()} + with self.assertRaises(KeyError): + self.store.get_missing(bad_state, 0, 9999) + def test_get_remaining(self) -> None: self.assertEqual(self.store.get_remaining(full_state, 0, 1), []) self.assertEqual(self.store.get_remaining(one_state, 0, 1), [(1, 13), (2, 21)]) self.assertEqual(self.store.get_remaining(empty_state, 0, 1), [(1, 13), (2, 21), (2, 22)]) self.assertEqual(self.store.get_remaining(empty_state, 0, 3), [(4, 99)]) + def test_get_remaining_exception(self) -> None: + with self.assertRaises(KeyError): + self.store.get_remaining(empty_state, 0, 9999) + bad_state = {(0, 6): {1}} + with self.assertRaises(KeyError): + self.store.get_missing(bad_state, 0, 6) + bad_state = {(0, 9999): set()} + with self.assertRaises(KeyError): + self.store.get_remaining(bad_state, 0, 9999) + def test_location_set_intersection(self) -> None: locations = {10, 11, 12} locations.intersection_update(self.store[1]) @@ -181,6 +212,16 @@ def test_no_locations(self) -> None: }) self.assertEqual(len(store), 1) self.assertEqual(len(store[1]), 0) + self.assertEqual(sorted(store.find_item(set(), 1)), []) + self.assertEqual(sorted(store.find_item({1}, 1)), []) + self.assertEqual(sorted(store.find_item({1, 2}, 1)), []) + self.assertEqual(store.get_for_player(1), {}) + self.assertEqual(store.get_checked(empty_state, 0, 1), []) + self.assertEqual(store.get_checked(full_state, 0, 1), []) + self.assertEqual(store.get_missing(empty_state, 0, 1), []) + self.assertEqual(store.get_missing(full_state, 0, 1), []) + self.assertEqual(store.get_remaining(empty_state, 0, 1), []) + self.assertEqual(store.get_remaining(full_state, 0, 1), []) def test_no_locations_for_1(self) -> None: store = self.type({ From 781100a571fe7e4850272a8899c5ef9d078f19d8 Mon Sep 17 00:00:00 2001 From: Jouramie <16137441+Jouramie@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:26:33 -0500 Subject: [PATCH 31/36] CI: remove version restriction on pytest-subtests (#4356) This reverts commit e3b5451672c694c12974801f5c89cc172db3ff5a. --- .github/workflows/unittests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 9db9de9b4042..88b5d12987ad 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -53,7 +53,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pytest "pytest-subtests<0.14.0" pytest-xdist + pip install pytest pytest-subtests pytest-xdist python ModuleUpdate.py --yes --force --append "WebHostLib/requirements.txt" python Launcher.py --update_settings # make sure host.yaml exists for tests - name: Unittests From 5dd19fccd0dc89966095c93c3fdb3ad72b4bea08 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Tue, 10 Dec 2024 20:35:36 +0100 Subject: [PATCH 32/36] MultiServer/CommonClient: We forgot about Item Links again (Hint Priority) (#4314) * Vi don't forget about itemlinks challenge difficulty impossible * People other than Vi also don't forget about ItemLinks challenge difficulty impossible --- MultiServer.py | 2 +- NetUtils.py | 2 +- kvui.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MultiServer.py b/MultiServer.py index 2561b0692a3c..0601e179152c 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -1914,7 +1914,7 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict): hint = ctx.get_hint(client.team, player, location) if not hint: return # Ignored safely - if hint.receiving_player != client.slot: + if client.slot not in ctx.slot_set(hint.receiving_player): await ctx.send_msgs(client, [{'cmd': 'InvalidPacket', "type": "arguments", "text": 'UpdateHint: No Permission', "original_cmd": cmd}]) diff --git a/NetUtils.py b/NetUtils.py index 196a030f4969..a961850639a0 100644 --- a/NetUtils.py +++ b/NetUtils.py @@ -232,7 +232,7 @@ def _handle_text(self, node: JSONMessagePart): def _handle_player_id(self, node: JSONMessagePart): player = int(node["text"]) - node["color"] = 'magenta' if player == self.ctx.slot else 'yellow' + node["color"] = 'magenta' if self.ctx.slot_concerns_self(player) else 'yellow' node["text"] = self.ctx.player_names[player] return self._handle_color(node) diff --git a/kvui.py b/kvui.py index d98fc7ed9ab8..b2ab004e274a 100644 --- a/kvui.py +++ b/kvui.py @@ -371,7 +371,7 @@ def on_touch_down(self, touch): if self.hint["status"] == HintStatus.HINT_FOUND: return ctx = App.get_running_app().ctx - if ctx.slot == self.hint["receiving_player"]: # If this player owns this hint + if ctx.slot_concerns_self(self.hint["receiving_player"]): # If this player owns this hint # open a dropdown self.dropdown.open(self.ids["status"]) elif self.selected: @@ -800,7 +800,7 @@ def refresh_hints(self, hints): hint_status_node = self.parser.handle_node({"type": "color", "color": status_colors.get(hint["status"], "red"), "text": status_names.get(hint["status"], "Unknown")}) - if hint["status"] != HintStatus.HINT_FOUND and hint["receiving_player"] == ctx.slot: + if hint["status"] != HintStatus.HINT_FOUND and ctx.slot_concerns_self(hint["receiving_player"]): hint_status_node = f"[u]{hint_status_node}[/u]" data.append({ "receiving": {"text": self.parser.handle_node({"type": "player_id", "text": hint["receiving_player"]})}, From 925fb967d3274e64a8f88b73d81b97ce51c6d0d2 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 10 Dec 2024 14:36:38 -0500 Subject: [PATCH 33/36] Lingo: Fix number hunt issues on panels mode (#4342) --- worlds/lingo/data/generated.dat | Bin 149230 -> 149485 bytes worlds/lingo/test/TestDatafile.py | 7 ++++++- worlds/lingo/utils/pickle_static_data.py | 16 ++++++++++------ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/worlds/lingo/data/generated.dat b/worlds/lingo/data/generated.dat index 9abb0276c8b5ac2fb1e81eff1e2c2cc06489ddec..8b159d4ae4ac7c565e2372b1cc43d7a349b2ca7c 100644 GIT binary patch delta 5053 zcma)ZV~ zz$q=awm#WI(@LE!b3fMlM#V=7mV~xjuDu_tpWUAOJLfkby0xG64}ahJp7T5RchB#4 z@71r?`+m8>cbOCXK-uFD%Lk#q8C0}XK!DEfHL0WwzfFM<+%pLFb42aXo*(4lfkVs? zhGF9&hO95nHiMtbH5k70q~G4YTBk@_?Og7}mxsV^*y@^NfVB$f@oFTjfe2g>1v!-I zgImoIfNw{^FE9)DMMDnEa{U?&Qx$jk(Jaz&KD6(5?S_K~gUuKG@gT_k<* z{9N$E0)(udb>j9)C~#%XfQ??T*VQ%~)+w+7XWk2TcoDDM3%O#5uYgP)@1(1?0%APH zazqdDskxA$)8bjTiX58D4;GxM>~);+%Pqq~wO-dn4p;@HN^X>E{wnCBS2_o|tQ+B&C$wUw6UK;Pi4#VPVYd?=g=;vz z8Agd=akG%u@Qr5Ct|5syt_9L)T+{;TG``jXk0@*8i4f~@twHGLNwr%x!<{-ZSN{kj z`av`f+5tsA(JAhgeZ3ea;@%zNz|C+~z6v`AKn4yx2uWg?co2q(!Fo`f)eL-F{`&MF z#EM`255X|CcCd$smVudvAX{B3dF3I9Q5}+Z9)ehPtK^G^AVJ+H+5a$%Q1#*fiMjcQ zVT?Y4d6b8TJ=(GViNUz-Fa)c!WWu4tkfpvU+4l%cQrjfYIszr?Cz5v^fg<%s$#4`( zRaKl7QT(x^;vGaR* zw;YFo`X71%363)vA$a~cM5v(=T;=EEFj~!zWX@~_lUgPD(N@v!#gfkwuaq2e0>-Nw zCC@nl+1^hvk8*tb_U-uA2^g-vD1)Dipt@Uf@=3^14@h2mQuq^+-#sacbx8I(CH!!4 zltoKRPCe_Yp?KjGgm?#v$5iypQF3e``nSOVHJk+w zZxan&I+TN=MvNmMEC`$0AV{CsBcn+=`nRgMuMPav4IIGJB1wHw@)vF5kkG4Mtg6px z2vg|=A^48dFwjQNv)ryeWtEE!r4`lYDyy@Yo<)AI$ynbq^Fnj=%~AR;xTATM^DXr^ zN9nC1qx#~?YV%FO2Fuk(r?xFtWT<>n;vARTgRtwg*wRf#nuqEc@pSx2a?%+XrEZs8 zeFoCiy^^<|5!-%A@)yKsCC8r?d{A=LS(u=jhjGo_#4{!TbQTiTVe#yf&WZX{5}2#c zL5A8YdB-`Js9ux&(>W+qha_^&r1yk3N#61vWU7x#{)l++2+oOkUp%?jlbG*%U#yv4 zBjUcA--lxT3}$&MYWhPs_B{{5`u35OK{f_Af3c>%2isLjQIch}rGp_`Q;^gyM{L zD1c@7Y&!(aT$e5`x=j34q|lbzeNzl&4b_V(>S~?ZjhLs5jr^^cmyD&}8pD7NaRg-z zyrTmm{FqnJwSeYeZIqJeEw8cy9UTy9@(6&97;w ztGE1jST0weUpeo$qH@7{aoTThkth)8u7qI@vY*^Jd9qQ;@jZnxK8mkar4Yh@v358iH)7& zqv+<>dU96c9jZN3VyQg(xTO#|3fB9zTyIavDb|=mB~z#L*0R4|GxMhORKem);+@V7;fnIC zdzMX{-g_e7oVcmHX?fi@#o2t)?Yg{)1*Y=e`QFqFyI1kV;+vM`!w*LHkyCTB%gQHF zf==9v#-}btHo}IHmm#T}#c?y>M>$GA_deNh{bd-Nxj+jPXV=o9JxoJ^Rz!nY3l@VG zO}x%B+tSanUrQttO6E1qKtrYFj7$9(0>gZoTMIns4~F~-zwU`p8WRJqWYPm+)UJxL z(Br7;;Rtv=$fpnlHE5sV$wVc?_X~=t?pRu(H^;u@iQ3l`^AX0XeZ$76eMibyDD8Wq zK1Bb-StFG2zSl?u@ciqzYJ^gK@4tAG_5%e1xy+B!{7hy5n_t)%HIFQzf~Xu24J1;C zf{8qd1`&A?4JOiMVOf%rY*U31pHv?T7(~FT`AVZF6TzmhH2uj$vhkPZHZpzL+%C-k zGEr=TqzNVy%_fA6Q5#GuMkppZ6I+GPcVZ2ODAU~2*6QxNaGm1?z8>2RoRJu@FD$!^`4O*Hz zn2x_BDDamO+#J%=V{5#{m3aoCokq!wh8F|nDz=~^zCLSd|0 zo-_qyirARg*u5uLSnJJoOPqz1Sr=i^NF~iSS>~5eeklh^rI|wJPBvxIOeIssW|}n9 z$&|C1AwVb2pm>(pbsNW>e3`s4XOQk5Kl$6VR5b7;_hqsSrk6OmrX75~BNw{y;QWP=mHq zpg84?WX!@?wI()3Z5e)^sze4Zr-+4fSGXf9F(OS#AFzrdRa9>^(St;5usTf%3VMV@ zEs3>63wZiE+?=MwjkS}hr`UR;2BOD^77}eBT12#wXtAIMZIeKH;W%1GDF&O9e`zfg zUn=5O4c+l4Nj*f9Hxo7T070FhK!BPv(h|AW*M93rFntO3O3uMd5I6} z!>nGGYC9#ZWV1t>on%(A*(J^EWLC3z1255S?2!Q%1s>tRpQU+=%y2gQq}fkqEt|hc zbAZe`Ht$IDS2B;XImpJS9VTTL%HF@cW|6thkXKz_S5bYx*;%;$s7j4J;(k(}OjpK7 z9H;chMS6qQ$`!OzayTQ0_wa{wCCt_?e_aqmVKZOv18FXjX<^gJ#;A3XLZP%vL{AW1 zCVEm(gZ43}X@4iPnJ0cC%@s0R*!)A9&&WI_Oq5moT&gcgJ+NMHzDQzrm z29Kt-*4kE2hGy$CZLM8wy&&EYQ`AJQZP(h?*4k%#T(kB)=Y{dI7yg*{_x;X!&v(A} zeZOJ;_Pp5*mp?wJ?@*U-yp#fKm*IhkPh?O^Syp3hc($6JR|Y#B>9! zg-(~t09Sz0eQ-|_jN{5)UPZ;@FeVk^T|);$2tW-MCqt1KUPy*1P~*Cu47YrhvC%lQ z7WCNP0tVOMEa>Y4yKwYq*e8bXM~hof!`M0omWkqdd62K{(!0C!c6H^!SRL3frV#GP z)Qlqd6{KKG5eyZ>wIaxX6j#4uSgR8ix0ga0cZZ&3kRz#QS-kOjAqxr zA6fMFba+cf?&cWRz(Y7-8wBE|L~dY24I32ks0*vX4o&z&HH;HO z_B_bNt^Fa$wR#>zdg4n-&<9&gkcw~5fFS(V1Ver7x{89S1*J}WJ_4d}%tDC9&IplK zuoe1Z(?S@4KgEjswk(A0%Gw0nTqE@C8c0`i`68djb2TtgF(zQVS&mmtqDo4w=rpkm z1}M`KFoxzG9xMuN6)M!B-7%DadPDf`M7kR7 z<|w?@3gK!Ei!H}Qv)%(ZZ^$u7Qc?1(V=&ZjY&3al(BMdWJsfL}i=+1GG0>~k9Ko-T zL9%Mo^X!N=7^Lo!T-XK)e%qL7cB13vo=C^&y*hlc4MP2{y8|hX_7UOuSsTQtJ~3S7 zr#2X=rVM1xISxf?rR4VG;yro!I1Ewex<#J4Nb)BqMKJk<=w-P(7>t$^FvNQei!8^@ zKlH`lpMb&Yrh77e78&XeDbi0uzWT;J!RJnj;P0dmHyERSEZO^%*!I4$++pb{Nb##> zrsqs>#MJe}9j74NyFp6F$%B#DN#bT4&B$_;wT5EgY3QfkW`Rkk#X?sM;-DxI@8}a1 zf-6r$h@ZDx#*uXNZd397(-5fEZ~#w z8gs>~C^yq@eC^T)5{>R)uZr5`_ZOjeSWfh>FfBFJ-5*_WH(F3zV{W)Vy2KsD*V-Y> zZ>{?}$#Ly`2zIrLt*9FGqr|CM;JcR;G@oyz$ z!VgO2{1-oiT=g-@mx*sl)}Isa_t|vLnR-t2OkXzQxt!;q)Gv#f4++-y7GK4F=f!gD z&!h~p@wll#3BfUe;Eg5c!GIs0hY0+hJ~p0*{+Qb-s8dkC;BrfSjm2cO(kABDFRHgJ zv@JrvP6)^2g-STu>0^2)6vAxW*$E+4=4^43+2W%_p+jN!&Cpla>Xubo9&>7UW1cdW z`QKt*GB)hN7zSN{5LMQ|iJ$UK+s1vCfibN#43|Ay54|PB29BjFC zcS`P6h{LV~CD0wMClg?}$LzccvDoxE1jTcgT)P)_Y1QU~hsR2%-K$`EZA16+RN?h& zpbxlT#eDG}D)6%SYUhGgm~**j>1Y1mrRV7XUiz85^s?wo{OB@_O6D8Pa~HMReJ9jg z8}xY=Q?-*Cr(cuZjnBixF7Y2m&cGR65G8pQuILi~CfU!zz3!Y@c(qG>r?cn%iNlpY zg137i#V!rRpgcu&8?jgMy>;~d%W1PlzUEs+$~37RQS}DPJ`XEa#~q;1J&-OvFj>}CKnXk>*Y#& zjW3%r`CcvGMX#!Y$?hsR@fw6S@=|a`dFDMUil^T@QO7T8_s>B2xSY*L-mWVsE-dQV z4EElf?^Rk{dS6>U{D$m+nglj%psL z{Or?wV!Q|axuQW?mD=Y}F1;BB?T8qS9!FIVN1uHmK1L8^(~jctG-ZVEF^Z|(vEfE< zjgJx~Nm?fbg1O8E zX)clJ$L4c32Ca)!2$j1+6iRfJD2(VDQGcQ@h$4u-%*Dw=m7$G)5@w}S`!fafB4E}2 zBF)!iV%U5m&9`I*vbiD6-^uv1xhc&LWMbL;Lz;h*iDUC48-sR>RJ>5yzxojlBD_tM zK=e~ChGi(x}_6r4m!v#D>akGjTj45n9rO}Z|Wuvk&Xg;LU@Vntk7&Ku48BV5>O_nqx$V_1~QkonxQ`zK7Gn&ja zHe(v48cS+At9)q+$jo3fUYa5@Rcwl-DIxO+n+ejCl9|b-Oqxk#X0e&f#-LS_nk|&w ze=M#Vt{BEmAyX}kHkD`|(KMp@MAL~D2(oE21d5aX2pN+wR&6F5gEkw#8LkWroyg`XCh(w$ACePJ&%VCck z_TjA&N>t;1dF2v=v6=7mo;2^1*}~=nHU{kgDHKZkkZ3E>M?~8M*|d*2O*=^DMV|Pn nG>6D+XLDGZqhxjn6KmC4rD`Mf5+@y(rd None: "LL1.yaml hash does not match generated.dat. Please regenerate using 'python worlds/lingo/utils/pickle_static_data.py'") self.assertEqual(ids_file_hash, HASHES["ids.yaml"], "ids.yaml hash does not match generated.dat. Please regenerate using 'python worlds/lingo/utils/pickle_static_data.py'") + + def test_panel_doors_are_set(self) -> None: + # This panel is defined earlier in the file than the panel door, so we want to check that the panel door is + # correctly applied. + self.assertNotEqual(PANELS_BY_ROOM["Outside The Agreeable"]["FIVE (1)"].panel_door, None) diff --git a/worlds/lingo/utils/pickle_static_data.py b/worlds/lingo/utils/pickle_static_data.py index cd5c4b41df4b..df82a12861a4 100644 --- a/worlds/lingo/utils/pickle_static_data.py +++ b/worlds/lingo/utils/pickle_static_data.py @@ -111,6 +111,16 @@ def load_static_data(ll1_path, ids_path): with open(ll1_path, "r") as file: config = Utils.parse_yaml(file) + # We have to process all panel doors first so that panels can see what panel doors they're in even if they're + # defined earlier in the file than the panel door. + for room_name, room_data in config.items(): + if "panel_doors" in room_data: + PANEL_DOORS_BY_ROOM[room_name] = dict() + + for panel_door_name, panel_door_data in room_data["panel_doors"].items(): + process_panel_door(room_name, panel_door_name, panel_door_data) + + # Process the rest of the room. for room_name, room_data in config.items(): process_room(room_name, room_data) @@ -515,12 +525,6 @@ def process_room(room_name, room_data): for source_room, doors in room_data["entrances"].items(): process_entrance(source_room, doors, room_obj) - if "panel_doors" in room_data: - PANEL_DOORS_BY_ROOM[room_name] = dict() - - for panel_door_name, panel_door_data in room_data["panel_doors"].items(): - process_panel_door(room_name, panel_door_name, panel_door_data) - if "panels" in room_data: PANELS_BY_ROOM[room_name] = dict() From 704f14ffcd80d32a4c0ffed4bdf4cf38324b0dc5 Mon Sep 17 00:00:00 2001 From: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:37:54 -0500 Subject: [PATCH 34/36] Core: Add toggles_as_bools to options.as_dict (#3770) * Add toggles_as_bools to options.as_dict * Update Options.py Co-authored-by: Doug Hoskisson * Add param to docstring * if -> elif --------- Co-authored-by: Doug Hoskisson --- Options.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Options.py b/Options.py index d3b2e6c1ba11..4e26a0d56c5c 100644 --- a/Options.py +++ b/Options.py @@ -754,7 +754,7 @@ def __init__(self, value: int) -> None: elif value > self.range_end and value not in self.special_range_names.values(): raise Exception(f"{value} is higher than maximum {self.range_end} for option {self.__class__.__name__} " + f"and is also not one of the supported named special values: {self.special_range_names}") - + # See docstring for key in self.special_range_names: if key != key.lower(): @@ -1180,7 +1180,7 @@ def __len__(self) -> int: class Accessibility(Choice): """ Set rules for reachability of your items/locations. - + **Full:** ensure everything can be reached and acquired. **Minimal:** ensure what is needed to reach your goal can be acquired. @@ -1198,7 +1198,7 @@ class Accessibility(Choice): class ItemsAccessibility(Accessibility): """ Set rules for reachability of your items/locations. - + **Full:** ensure everything can be reached and acquired. **Minimal:** ensure what is needed to reach your goal can be acquired. @@ -1249,12 +1249,16 @@ class CommonOptions(metaclass=OptionsMetaProperty): progression_balancing: ProgressionBalancing accessibility: Accessibility - def as_dict(self, *option_names: str, casing: str = "snake") -> typing.Dict[str, typing.Any]: + def as_dict(self, + *option_names: str, + casing: typing.Literal["snake", "camel", "pascal", "kebab"] = "snake", + toggles_as_bools: bool = False) -> typing.Dict[str, typing.Any]: """ Returns a dictionary of [str, Option.value] :param option_names: names of the options to return :param casing: case of the keys to return. Supports `snake`, `camel`, `pascal`, `kebab` + :param toggles_as_bools: whether toggle options should be output as bools instead of strings """ assert option_names, "options.as_dict() was used without any option names." option_results = {} @@ -1276,6 +1280,8 @@ def as_dict(self, *option_names: str, casing: str = "snake") -> typing.Dict[str, value = getattr(self, option_name).value if isinstance(value, set): value = sorted(value) + elif toggles_as_bools and issubclass(type(self).type_hints[option_name], Toggle): + value = bool(value) option_results[display_name] = value else: raise ValueError(f"{option_name} not found in {tuple(type(self).type_hints)}") From 54a0a5ac0002ff1edf858441891625600b69e812 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:06:06 +0100 Subject: [PATCH 35/36] The Witness: Put progression + useful on some items. (#4027) * proguseful * ruff * variable rename * variable rename * Better (?) comment * Better way to do this? I guess * sure * ruff * Eh, it's not worth it. Here's the much simpler version * don't need this now * Improve some classification checks while we're at it * Only proguseful obelisk keys if eps are individual --- worlds/witness/player_items.py | 48 +++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/worlds/witness/player_items.py b/worlds/witness/player_items.py index 831e614f21c4..d1b951fa8e15 100644 --- a/worlds/witness/player_items.py +++ b/worlds/witness/player_items.py @@ -7,6 +7,7 @@ from BaseClasses import Item, ItemClassification, MultiWorld from .data import static_items as static_witness_items +from .data import static_logic as static_witness_logic from .data.item_definition_classes import ( DoorItemDefinition, ItemCategory, @@ -53,9 +54,8 @@ def __init__(self, world: "WitnessWorld", player_logic: WitnessPlayerLogic, # Remove all progression items that aren't actually in the game. self.item_data = { name: data for (name, data) in self.item_data.items() - if data.classification not in - {ItemClassification.progression, ItemClassification.progression_skip_balancing} - or name in player_logic.PROGRESSION_ITEMS_ACTUALLY_IN_THE_GAME + if ItemClassification.progression not in data.classification + or name in player_logic.PROGRESSION_ITEMS_ACTUALLY_IN_THE_GAME } # Downgrade door items @@ -72,7 +72,7 @@ def __init__(self, world: "WitnessWorld", player_logic: WitnessPlayerLogic, # Add progression items to the mandatory item list. progression_dict = { name: data for (name, data) in self.item_data.items() - if data.classification in {ItemClassification.progression, ItemClassification.progression_skip_balancing} + if ItemClassification.progression in data.classification } for item_name, item_data in progression_dict.items(): if isinstance(item_data.definition, ProgressiveItemDefinition): @@ -100,6 +100,46 @@ def __init__(self, world: "WitnessWorld", player_logic: WitnessPlayerLogic, self.item_data[location_name] = ItemData(None, ItemDefinition(0, ItemCategory.EVENT), ItemClassification.progression, False) + # Determine which items should be progression + useful, if they exist in some capacity. + # Note: Some of these may need to be updated for the "independent symbols" PR. + self._proguseful_items = { + "Dots", "Stars", "Shapers", "Black/White Squares", + "Caves Shortcuts", "Caves Mountain Shortcut (Door)", "Caves Swamp Shortcut (Door)", + "Boat", + } + + if self._world.options.shuffle_EPs == "individual": + self._proguseful_items |= { + "Town Obelisk Key", # Most checks + "Monastery Obelisk Key", # Most sphere 1 checks, and also super dense ("Jackpot" vibes)} + } + + if self._world.options.shuffle_discarded_panels: + # Discards only give a moderate amount of checks, but are very spread out and a lot of them are in sphere 1. + # Thus, you really want to have the discard-unlocking item as quickly as possible. + + if self._world.options.puzzle_randomization in ("none", "sigma_normal"): + self._proguseful_items.add("Triangles") + elif self._world.options.puzzle_randomization == "sigma_expert": + self._proguseful_items.add("Arrows") + # Discards require two symbols in Variety, so the "sphere 1 unlocking power" of Arrows is not there. + if self._world.options.puzzle_randomization == "sigma_expert": + self._proguseful_items.add("Triangles") + self._proguseful_items.add("Full Dots") + self._proguseful_items.add("Stars + Same Colored Symbol") + self._proguseful_items.discard("Stars") # Stars are not that useful on their own. + if self._world.options.puzzle_randomization == "umbra_variety": + self._proguseful_items.add("Triangles") + + # This needs to be improved when the improved independent&progressive symbols PR is merged + for item in list(self._proguseful_items): + self._proguseful_items.add(static_witness_logic.get_parent_progressive_item(item)) + + for item_name, item_data in self.item_data.items(): + if item_name in self._proguseful_items: + item_data.classification |= ItemClassification.useful + + def get_mandatory_items(self) -> Dict[str, int]: """ Returns the list of items that must be in the pool for the game to successfully generate. From 9a37a136a1ab02c561b704a144b6424eac5db416 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:13:45 +0100 Subject: [PATCH 36/36] The Witness: Add more panels to the "doors: panels" mode (#2916) * Add more panels that should be panels * Make it so the caves panel items don't exist in early caves * Remove unused import * oops * Remove Jungle to Monastery Garden from usefulification list * Add a basic test * ruff --------- Co-authored-by: Fabian Dill --- worlds/witness/data/WitnessItems.txt | 12 ++++++-- .../Door_Shuffle/Complex_Door_Panels.txt | 5 ++++ .../settings/Door_Shuffle/Simple_Panels.txt | 4 +-- worlds/witness/data/settings/Early_Caves.txt | 6 +++- .../data/settings/Early_Caves_Start.txt | 6 +++- worlds/witness/player_items.py | 7 +++-- worlds/witness/player_logic.py | 12 ++++++-- worlds/witness/test/test_door_shuffle.py | 28 ++++++++++++++++++- 8 files changed, 67 insertions(+), 13 deletions(-) diff --git a/worlds/witness/data/WitnessItems.txt b/worlds/witness/data/WitnessItems.txt index 782fa9c3d226..57aee28e45b6 100644 --- a/worlds/witness/data/WitnessItems.txt +++ b/worlds/witness/data/WitnessItems.txt @@ -56,6 +56,7 @@ Doors: 1119 - Quarry Stoneworks Entry (Panel) - 0x01E5A,0x01E59 1120 - Quarry Stoneworks Ramp Controls (Panel) - 0x03678,0x03676 1122 - Quarry Stoneworks Lift Controls (Panel) - 0x03679,0x03675 +1123 - Quarry Stoneworks Stairs (Panel) - 0x03677 1125 - Quarry Boathouse Ramp Height Control (Panel) - 0x03852 1127 - Quarry Boathouse Ramp Horizontal Control (Panel) - 0x03858 1129 - Quarry Boathouse Hook Control (Panel) - 0x275FA @@ -84,6 +85,7 @@ Doors: 1205 - Treehouse Laser House Door Timer (Panel) - 0x2700B,0x17CBC 1208 - Treehouse Drawbridge (Panel) - 0x037FF 1175 - Jungle Popup Wall (Panel) - 0x17CAB +1178 - Jungle Monastery Garden Shortcut (Panel) - 0x17CAA 1180 - Bunker Entry (Panel) - 0x17C2E 1183 - Bunker Tinted Glass Door (Panel) - 0x0A099 1186 - Bunker Elevator Control (Panel) - 0x0A079 @@ -94,12 +96,15 @@ Doors: 1195 - Swamp Rotating Bridge (Panel) - 0x181F5 1196 - Swamp Long Bridge (Panel) - 0x17E2B 1197 - Swamp Maze Controls (Panel) - 0x17C0A,0x17E07 +1199 - Swamp Laser Shortcut (Panel) - 0x17C05 1220 - Mountain Floor 1 Light Bridge (Panel) - 0x09E39 1225 - Mountain Floor 2 Light Bridge Near (Panel) - 0x09E86 1230 - Mountain Floor 2 Light Bridge Far (Panel) - 0x09ED8 1235 - Mountain Floor 2 Elevator Control (Panel) - 0x09EEB 1240 - Caves Entry (Panel) - 0x00FF8 1242 - Caves Elevator Controls (Panel) - 0x335AB,0x335AC,0x3369D +1243 - Caves Mountain Shortcut (Panel) - 0x021D7 +1244 - Caves Swamp Shortcut (Panel) - 0x17CF2 1245 - Challenge Entry (Panel) - 0x0A16E 1250 - Tunnels Entry (Panel) - 0x039B4 1255 - Tunnels Town Shortcut (Panel) - 0x09E85 @@ -250,19 +255,20 @@ Doors: 2101 - Outside Tutorial Outpost Panels - 0x0A171,0x04CA4 2105 - Desert Panels - 0x09FAA,0x1C2DF,0x1831E,0x1C260,0x1831C,0x1C2F3,0x1831D,0x1C2B1,0x1831B,0x0C339,0x0A249,0x0A015,0x09FA0,0x09F86 2110 - Quarry Outside Panels - 0x17C09,0x09E57,0x17CC4 -2115 - Quarry Stoneworks Panels - 0x01E5A,0x01E59,0x03678,0x03676,0x03679,0x03675 +2115 - Quarry Stoneworks Panels - 0x01E5A,0x01E59,0x03678,0x03676,0x03679,0x03675,0x03677 2120 - Quarry Boathouse Panels - 0x03852,0x03858,0x275FA 2122 - Keep Hedge Maze Panels - 0x00139,0x019DC,0x019E7,0x01A0F 2125 - Monastery Panels - 0x09D9B,0x00C92,0x00B10 +2127 - Jungle Panels - 0x17CAB,0x17CAA 2130 - Town Church & RGB House Panels - 0x28998,0x28A0D,0x334D8 2135 - Town Maze Panels - 0x2896A,0x28A79 2137 - Town Dockside House Panels - 0x0A0C8,0x09F98 2140 - Windmill & Theater Panels - 0x17D02,0x00815,0x17F5F,0x17F89,0x0A168,0x33AB2 2145 - Treehouse Panels - 0x0A182,0x0288C,0x02886,0x2700B,0x17CBC,0x037FF 2150 - Bunker Panels - 0x34BC5,0x34BC6,0x0A079,0x0A099,0x17C2E -2155 - Swamp Panels - 0x00609,0x18488,0x181F5,0x17E2B,0x17C0A,0x17E07,0x17C0D,0x0056E +2155 - Swamp Panels - 0x00609,0x18488,0x181F5,0x17E2B,0x17C0A,0x17E07,0x17C0D,0x0056E,0x17C05 2160 - Mountain Panels - 0x09ED8,0x09E86,0x09E39,0x09EEB -2165 - Caves Panels - 0x3369D,0x00FF8,0x0A16E,0x335AB,0x335AC +2165 - Caves Panels - 0x3369D,0x00FF8,0x0A16E,0x335AB,0x335AC,0x021D7,0x17CF2 2170 - Tunnels Panels - 0x09E85,0x039B4 2200 - Desert Obelisk Key - 0x0332B,0x03367,0x28B8A,0x037B6,0x037B2,0x000F7,0x3351D,0x0053C,0x00771,0x335C8,0x335C9,0x337F8,0x037BB,0x220E4,0x220E5,0x334B9,0x334BC,0x22106,0x0A14C,0x0A14D,0x00359 diff --git a/worlds/witness/data/settings/Door_Shuffle/Complex_Door_Panels.txt b/worlds/witness/data/settings/Door_Shuffle/Complex_Door_Panels.txt index 63d8a58d2676..6c3b328691f9 100644 --- a/worlds/witness/data/settings/Door_Shuffle/Complex_Door_Panels.txt +++ b/worlds/witness/data/settings/Door_Shuffle/Complex_Door_Panels.txt @@ -9,6 +9,7 @@ Desert Flood Room Entry (Panel) Quarry Entry 1 (Panel) Quarry Entry 2 (Panel) Quarry Stoneworks Entry (Panel) +Quarry Stoneworks Stairs (Panel) Shadows Door Timer (Panel) Keep Hedge Maze 1 (Panel) Keep Hedge Maze 2 (Panel) @@ -28,11 +29,15 @@ Treehouse Third Door (Panel) Treehouse Laser House Door Timer (Panel) Treehouse Drawbridge (Panel) Jungle Popup Wall (Panel) +Jungle Monastery Garden Shortcut (Panel) Bunker Entry (Panel) Bunker Tinted Glass Door (Panel) Swamp Entry (Panel) Swamp Platform Shortcut (Panel) +Swamp Laser Shortcut (Panel) Caves Entry (Panel) +Caves Mountain Shortcut (Panel) +Caves Swamp Shortcut (Panel) Challenge Entry (Panel) Tunnels Entry (Panel) Tunnels Town Shortcut (Panel) \ No newline at end of file diff --git a/worlds/witness/data/settings/Door_Shuffle/Simple_Panels.txt b/worlds/witness/data/settings/Door_Shuffle/Simple_Panels.txt index 23501d20d3a7..f9b8b1b43ae7 100644 --- a/worlds/witness/data/settings/Door_Shuffle/Simple_Panels.txt +++ b/worlds/witness/data/settings/Door_Shuffle/Simple_Panels.txt @@ -7,6 +7,7 @@ Quarry Stoneworks Panels Quarry Boathouse Panels Keep Hedge Maze Panels Monastery Panels +Jungle Panels Town Church & RGB House Panels Town Maze Panels Windmill & Theater Panels @@ -18,5 +19,4 @@ Mountain Panels Caves Panels Tunnels Panels Glass Factory Entry (Panel) -Shadows Door Timer (Panel) -Jungle Popup Wall (Panel) \ No newline at end of file +Shadows Door Timer (Panel) \ No newline at end of file diff --git a/worlds/witness/data/settings/Early_Caves.txt b/worlds/witness/data/settings/Early_Caves.txt index 48c8056bc7b6..df1e7b114a47 100644 --- a/worlds/witness/data/settings/Early_Caves.txt +++ b/worlds/witness/data/settings/Early_Caves.txt @@ -3,4 +3,8 @@ Caves Shortcuts Remove Items: Caves Mountain Shortcut (Door) -Caves Swamp Shortcut (Door) \ No newline at end of file +Caves Swamp Shortcut (Door) + +Forbidden Doors: +0x021D7 (Caves Mountain Shortcut Panel) +0x17CF2 (Caves Swamp Shortcut Panel) \ No newline at end of file diff --git a/worlds/witness/data/settings/Early_Caves_Start.txt b/worlds/witness/data/settings/Early_Caves_Start.txt index a16a6d02bb9f..bc79007fa54b 100644 --- a/worlds/witness/data/settings/Early_Caves_Start.txt +++ b/worlds/witness/data/settings/Early_Caves_Start.txt @@ -6,4 +6,8 @@ Caves Shortcuts Remove Items: Caves Mountain Shortcut (Door) -Caves Swamp Shortcut (Door) \ No newline at end of file +Caves Swamp Shortcut (Door) + +Forbidden Doors: +0x021D7 (Caves Mountain Shortcut Panel) +0x17CF2 (Caves Swamp Shortcut Panel) \ No newline at end of file diff --git a/worlds/witness/player_items.py b/worlds/witness/player_items.py index d1b951fa8e15..2fb987bb456a 100644 --- a/worlds/witness/player_items.py +++ b/worlds/witness/player_items.py @@ -227,10 +227,13 @@ def get_door_ids_in_pool(self) -> List[int]: Returns the total set of all door IDs that are controlled by items in the pool. """ output: List[int] = [] - for item_name, item_data in dict(self.item_data.items()).items(): + + for item_name, item_data in self.item_data.items(): if not isinstance(item_data.definition, DoorItemDefinition): continue - output += [int(hex_string, 16) for hex_string in item_data.definition.panel_id_hexes] + + output += [int(hex_string, 16) for hex_string in item_data.definition.panel_id_hexes + if hex_string not in self._logic.FORBIDDEN_DOORS] return output diff --git a/worlds/witness/player_logic.py b/worlds/witness/player_logic.py index 58f15532f58c..9e6c9597382b 100644 --- a/worlds/witness/player_logic.py +++ b/worlds/witness/player_logic.py @@ -82,6 +82,7 @@ def __init__(self, world: "WitnessWorld", disabled_locations: Set[str], start_in self.PARENT_ITEM_COUNT_PER_BASE_ITEM: Dict[str, int] = defaultdict(lambda: 1) self.PROGRESSIVE_LISTS: Dict[str, List[str]] = {} self.DOOR_ITEMS_BY_ID: Dict[str, List[str]] = {} + self.FORBIDDEN_DOORS: Set[str] = set() self.STARTING_INVENTORY: Set[str] = set() @@ -192,8 +193,9 @@ def reduce_req_within_region(self, entity_hex: str) -> WitnessRule: for subset in these_items: self.BASE_PROGESSION_ITEMS_ACTUALLY_IN_THE_GAME.update(subset) - # Handle door entities (door shuffle) - if entity_hex in self.DOOR_ITEMS_BY_ID: + # If this entity is opened by a door item that exists in the itempool, add that item to its requirements. + # Also, remove any original power requirements this entity might have had. + if entity_hex in self.DOOR_ITEMS_BY_ID and entity_hex not in self.FORBIDDEN_DOORS: # If this entity is opened by a door item that exists in the itempool, add that item to its requirements. door_items = frozenset({frozenset([item]) for item in self.DOOR_ITEMS_BY_ID[entity_hex]}) @@ -329,6 +331,10 @@ def make_single_adjustment(self, adj_type: str, line: str) -> None: if entity_hex in self.DOOR_ITEMS_BY_ID and item_name in self.DOOR_ITEMS_BY_ID[entity_hex]: self.DOOR_ITEMS_BY_ID[entity_hex].remove(item_name) + if adj_type == "Forbidden Doors": + entity_hex = line[:7] + self.FORBIDDEN_DOORS.add(entity_hex) + if adj_type == "Starting Inventory": self.STARTING_INVENTORY.add(line) @@ -704,7 +710,7 @@ def make_options_adjustments(self, world: "WitnessWorld") -> None: self.make_single_adjustment(current_adjustment_type, line) - for entity_id in self.COMPLETELY_DISABLED_ENTITIES: + for entity_id in self.COMPLETELY_DISABLED_ENTITIES | self.FORBIDDEN_DOORS: if entity_id in self.DOOR_ITEMS_BY_ID: del self.DOOR_ITEMS_BY_ID[entity_id] diff --git a/worlds/witness/test/test_door_shuffle.py b/worlds/witness/test/test_door_shuffle.py index 0e38c32d69e2..d593a84bdb8f 100644 --- a/worlds/witness/test/test_door_shuffle.py +++ b/worlds/witness/test/test_door_shuffle.py @@ -1,4 +1,4 @@ -from ..test import WitnessTestBase +from ..test import WitnessMultiworldTestBase, WitnessTestBase class TestIndividualDoors(WitnessTestBase): @@ -22,3 +22,29 @@ def test_swamp_laser_shortcut(self) -> None: ], only_check_listed=True, ) + + +class TestForbiddenDoors(WitnessMultiworldTestBase): + options_per_world = [ + { + "early_caves": "off", + }, + { + "early_caves": "add_to_pool", + }, + ] + + common_options = { + "shuffle_doors": "panels", + "shuffle_postgame": True, + } + + def test_forbidden_doors(self) -> None: + self.assertTrue( + self.get_items_by_name("Caves Mountain Shortcut (Panel)", 1), + "Caves Mountain Shortcut (Panel) should exist in panels shuffle, but it didn't." + ) + self.assertFalse( + self.get_items_by_name("Caves Mountain Shortcut (Panel)", 2), + "Caves Mountain Shortcut (Panel) should be removed when Early Caves is enabled, but it still exists." + )
Id