diff --git a/.gitattributes b/.gitattributes index 537a05f68b67..5ab537933405 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ worlds/blasphemous/region_data.py linguist-generated=true +worlds/yachtdice/YachtWeights.py linguist-generated=true diff --git a/.github/pyright-config.json b/.github/pyright-config.json index 6ad7fa5f19b5..7d981778905f 100644 --- a/.github/pyright-config.json +++ b/.github/pyright-config.json @@ -16,7 +16,7 @@ "reportMissingImports": true, "reportMissingTypeStubs": true, - "pythonVersion": "3.8", + "pythonVersion": "3.10", "pythonPlatform": "Windows", "executionEnvironments": [ diff --git a/.github/workflows/analyze-modified-files.yml b/.github/workflows/analyze-modified-files.yml index c9995fa2d043..b59336fafe9b 100644 --- a/.github/workflows/analyze-modified-files.yml +++ b/.github/workflows/analyze-modified-files.yml @@ -53,7 +53,7 @@ jobs: - uses: actions/setup-python@v5 if: env.diff != '' with: - python-version: 3.8 + python-version: '3.10' - name: "Install dependencies" if: env.diff != '' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23c463fb947a..27ca76e41f8f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,14 +24,15 @@ env: jobs: # build-release-macos: # LF volunteer - build-win-py38: # RCs will still be built and signed by hand + build-win: # RCs will still be built and signed by hand runs-on: windows-latest steps: - uses: actions/checkout@v4 - name: Install python uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '~3.12.7' + check-latest: true - name: Download run-time dependencies run: | Invoke-WebRequest -Uri https://github.com/Ijwu/Enemizer/releases/download/${Env:ENEMIZER_VERSION}/win-x64.zip -OutFile enemizer.zip @@ -111,10 +112,11 @@ jobs: - name: Get a recent python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '~3.12.7' + check-latest: true - name: Install build-time dependencies run: | - echo "PYTHON=python3.11" >> $GITHUB_ENV + echo "PYTHON=python3.12" >> $GITHUB_ENV wget -nv https://github.com/AppImage/AppImageKit/releases/download/$APPIMAGETOOL_VERSION/appimagetool-x86_64.AppImage chmod a+rx appimagetool-x86_64.AppImage ./appimagetool-x86_64.AppImage --appimage-extract diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b0cfe35d2bc5..3abbb5f6449f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -47,7 +47,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -58,7 +58,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -72,4 +72,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f8651d408e7..aec4f90998cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,10 +44,11 @@ jobs: - name: Get a recent python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '~3.12.7' + check-latest: true - name: Install build-time dependencies run: | - echo "PYTHON=python3.11" >> $GITHUB_ENV + echo "PYTHON=python3.12" >> $GITHUB_ENV wget -nv https://github.com/AppImage/AppImageKit/releases/download/$APPIMAGETOOL_VERSION/appimagetool-x86_64.AppImage chmod a+rx appimagetool-x86_64.AppImage ./appimagetool-x86_64.AppImage --appimage-extract diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 9a3a6d11217f..88b5d12987ad 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -33,13 +33,11 @@ jobs: matrix: os: [ubuntu-latest] python: - - {version: '3.8'} - - {version: '3.9'} - {version: '3.10'} - {version: '3.11'} - {version: '3.12'} include: - - python: {version: '3.8'} # win7 compat + - python: {version: '3.10'} # old compat os: windows-latest - python: {version: '3.12'} # current os: windows-latest @@ -89,4 +87,4 @@ jobs: run: | source venv/bin/activate export PYTHONPATH=$(pwd) - python test/hosting/__main__.py + timeout 600 python test/hosting/__main__.py diff --git a/BaseClasses.py b/BaseClasses.py index 0d4f34e51445..98ada4f861ec 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -1,18 +1,16 @@ from __future__ import annotations import collections -import itertools import functools import logging import random import secrets -import typing # this can go away when Python 3.8 support is dropped from argparse import Namespace from collections import Counter, deque from collections.abc import Collection, MutableSequence from enum import IntEnum, IntFlag from typing import (AbstractSet, Any, Callable, ClassVar, Dict, Iterable, Iterator, List, Mapping, NamedTuple, - Optional, Protocol, Set, Tuple, Union, Type) + Optional, Protocol, Set, Tuple, Union, TYPE_CHECKING) from typing_extensions import NotRequired, TypedDict @@ -20,7 +18,7 @@ import Options import Utils -if typing.TYPE_CHECKING: +if TYPE_CHECKING: from worlds import AutoWorld @@ -231,7 +229,7 @@ def set_options(self, args: Namespace) -> None: for player in self.player_ids: world_type = AutoWorld.AutoWorldRegister.world_types[self.game[player]] self.worlds[player] = world_type(self, player) - options_dataclass: typing.Type[Options.PerGameCommonOptions] = world_type.options_dataclass + options_dataclass: type[Options.PerGameCommonOptions] = world_type.options_dataclass self.worlds[player].options = options_dataclass(**{option_key: getattr(args, option_key)[player] for option_key in options_dataclass.type_hints}) @@ -341,7 +339,7 @@ def find_common_pool(players: Set[int], shared_pool: Set[str]) -> Tuple[ new_item.classification |= classifications[item_name] new_itempool.append(new_item) - region = Region("Menu", group_id, self, "ItemLink") + region = Region(group["world"].origin_region_name, group_id, self, "ItemLink") self.regions.append(region) locations = region.locations # ensure that progression items are linked first, then non-progression @@ -606,6 +604,49 @@ def get_spheres(self) -> Iterator[Set[Location]]: state.collect(location.item, True, location) locations -= sphere + def get_sendable_spheres(self) -> Iterator[Set[Location]]: + """ + yields a set of multiserver sendable locations (location.item.code: int) for each logical sphere + + If there are unreachable locations, the last sphere of reachable locations is followed by an empty set, + and then a set of all of the unreachable locations. + """ + state = CollectionState(self) + locations: Set[Location] = set() + events: Set[Location] = set() + for location in self.get_filled_locations(): + if type(location.item.code) is int: + locations.add(location) + else: + events.add(location) + + while locations: + sphere: Set[Location] = set() + + # cull events out + done_events: Set[Union[Location, None]] = {None} + while done_events: + done_events = set() + for event in events: + if event.can_reach(state): + state.collect(event.item, True, event) + done_events.add(event) + events -= done_events + + for location in locations: + if location.can_reach(state): + sphere.add(location) + + yield sphere + if not sphere: + if locations: + yield locations # unreachable locations + break + + for location in sphere: + state.collect(location.item, True, location) + locations -= sphere + def fulfills_accessibility(self, state: Optional[CollectionState] = None): """Check if accessibility rules are fulfilled with current or supplied state.""" if not state: @@ -975,7 +1016,7 @@ class Region: entrances: List[Entrance] exits: List[Entrance] locations: List[Location] - entrance_type: ClassVar[Type[Entrance]] = Entrance + entrance_type: ClassVar[type[Entrance]] = Entrance class Register(MutableSequence): region_manager: MultiWorld.RegionManager @@ -1075,7 +1116,7 @@ def get_connecting_entrance(self, is_main_entrance: Callable[[Entrance], bool]) return entrance.parent_region.get_connecting_entrance(is_main_entrance) def add_locations(self, locations: Dict[str, Optional[int]], - location_type: Optional[Type[Location]] = None) -> None: + location_type: Optional[type[Location]] = None) -> None: """ Adds locations to the Region object, where location_type is your Location class and locations is a dict of location names to address. @@ -1112,7 +1153,7 @@ def create_exit(self, name: str) -> Entrance: return exit_ def add_exits(self, exits: Union[Iterable[str], Dict[str, Optional[str]]], - rules: Dict[str, Callable[[CollectionState], bool]] = None) -> None: + rules: Dict[str, Callable[[CollectionState], bool]] = None) -> List[Entrance]: """ Connects current region to regions in exit dictionary. Passed region names must exist first. @@ -1122,10 +1163,14 @@ def add_exits(self, exits: Union[Iterable[str], Dict[str, Optional[str]]], """ if not isinstance(exits, Dict): exits = dict.fromkeys(exits) - for connecting_region, name in exits.items(): - self.connect(self.multiworld.get_region(connecting_region, self.player), - name, - rules[connecting_region] if rules and connecting_region in rules else None) + return [ + self.connect( + self.multiworld.get_region(connecting_region, self.player), + name, + rules[connecting_region] if rules and connecting_region in rules else None, + ) + for connecting_region, name in exits.items() + ] def __repr__(self): return self.multiworld.get_name_string_for_object(self) if self.multiworld else f'{self.name} (Player {self.player})' @@ -1264,6 +1309,14 @@ def useful(self) -> bool: def trap(self) -> bool: return ItemClassification.trap in self.classification + @property + def filler(self) -> bool: + return not (self.advancement or self.useful or self.trap) + + @property + def excludable(self) -> bool: + return not (self.advancement or self.useful) + @property def flags(self) -> int: return self.classification.as_flag() @@ -1382,14 +1435,21 @@ def create_playthrough(self, create_paths: bool = True) -> None: # second phase, sphere 0 removed_precollected: List[Item] = [] - for item in (i for i in chain.from_iterable(multiworld.precollected_items.values()) if i.advancement): - logging.debug('Checking if %s (Player %d) is required to beat the game.', item.name, item.player) - multiworld.precollected_items[item.player].remove(item) - multiworld.state.remove(item) - if not multiworld.can_beat_game(): - multiworld.push_precollected(item) - else: - removed_precollected.append(item) + + for precollected_items in multiworld.precollected_items.values(): + # The list of items is mutated by removing one item at a time to determine if each item is required to beat + # the game, and re-adding that item if it was required, so a copy needs to be made before iterating. + for item in precollected_items.copy(): + if not item.advancement: + continue + logging.debug('Checking if %s (Player %d) is required to beat the game.', item.name, item.player) + precollected_items.remove(item) + multiworld.state.remove(item) + if not multiworld.can_beat_game(): + # Add the item back into `precollected_items` and collect it into `multiworld.state`. + multiworld.push_precollected(item) + else: + removed_precollected.append(item) # we are now down to just the required progress items in collection_spheres. Unfortunately # the previous pruning stage could potentially have made certain items dependant on others @@ -1528,7 +1588,7 @@ def write_option(option_key: str, option_obj: Options.AssembleOptions) -> None: [f" {location}: {item}" for (location, item) in sphere.items()] if isinstance(sphere, dict) else [f" {item}" for item in sphere])) for (sphere_nr, sphere) in self.playthrough.items()])) if self.unreachables: - outfile.write('\n\nUnreachable Items:\n\n') + outfile.write('\n\nUnreachable Progression Items:\n\n') outfile.write( '\n'.join(['%s: %s' % (unreachable.item, unreachable) for unreachable in self.unreachables])) diff --git a/CommonClient.py b/CommonClient.py index 296c10ed4b4e..fc6ae6d9a5fa 100644 --- a/CommonClient.py +++ b/CommonClient.py @@ -23,7 +23,7 @@ from MultiServer import CommandProcessor from NetUtils import (Endpoint, decode, NetworkItem, encode, JSONtoTextParser, ClientStatus, Permission, NetworkSlot, - RawJSONtoTextParser, add_json_text, add_json_location, add_json_item, JSONTypes, SlotType) + RawJSONtoTextParser, add_json_text, add_json_location, add_json_item, JSONTypes, HintStatus, SlotType) from Utils import Version, stream_input, async_start from worlds import network_data_package, AutoWorldRegister import os @@ -355,6 +355,8 @@ def __init__(self, server_address: typing.Optional[str] = None, password: typing self.item_names = self.NameLookupDict(self, "item") self.location_names = self.NameLookupDict(self, "location") + self.versions = {} + self.checksums = {} self.jsontotextparser = JSONtoTextParser(self) self.rawjsontotextparser = RawJSONtoTextParser(self) @@ -410,6 +412,7 @@ async def disconnect(self, allow_autoreconnect: bool = False): await self.server.socket.close() if self.server_task is not None: await self.server_task + self.ui.update_hints() async def send_msgs(self, msgs: typing.List[typing.Any]) -> None: """ `msgs` JSON serializable """ @@ -549,7 +552,14 @@ async def shutdown(self): await self.ui_task if self.input_task: self.input_task.cancel() - + + # Hints + def update_hint(self, location: int, finding_player: int, status: typing.Optional[HintStatus]) -> None: + msg = {"cmd": "UpdateHint", "location": location, "player": finding_player} + if status is not None: + msg["status"] = status + async_start(self.send_msgs([msg]), name="update_hint") + # DataPackage async def prepare_data_package(self, relevant_games: typing.Set[str], remote_date_package_versions: typing.Dict[str, int], @@ -571,26 +581,34 @@ async def prepare_data_package(self, relevant_games: typing.Set[str], needed_updates.add(game) continue - local_version: int = network_data_package["games"].get(game, {}).get("version", 0) - local_checksum: typing.Optional[str] = network_data_package["games"].get(game, {}).get("checksum") - # no action required if local version is new enough - if (not remote_checksum and (remote_version > local_version or remote_version == 0)) \ - or remote_checksum != local_checksum: - cached_game = Utils.load_data_package_for_checksum(game, remote_checksum) - cache_version: int = cached_game.get("version", 0) - cache_checksum: typing.Optional[str] = cached_game.get("checksum") - # download remote version if cache is not new enough - if (not remote_checksum and (remote_version > cache_version or remote_version == 0)) \ - or remote_checksum != cache_checksum: - needed_updates.add(game) + cached_version: int = self.versions.get(game, 0) + cached_checksum: typing.Optional[str] = self.checksums.get(game) + # no action required if cached version is new enough + if (not remote_checksum and (remote_version > cached_version or remote_version == 0)) \ + or remote_checksum != cached_checksum: + local_version: int = network_data_package["games"].get(game, {}).get("version", 0) + local_checksum: typing.Optional[str] = network_data_package["games"].get(game, {}).get("checksum") + if ((remote_checksum or remote_version <= local_version and remote_version != 0) + and remote_checksum == local_checksum): + self.update_game(network_data_package["games"][game], game) else: - self.update_game(cached_game, game) + cached_game = Utils.load_data_package_for_checksum(game, remote_checksum) + cache_version: int = cached_game.get("version", 0) + cache_checksum: typing.Optional[str] = cached_game.get("checksum") + # download remote version if cache is not new enough + if (not remote_checksum and (remote_version > cache_version or remote_version == 0)) \ + or remote_checksum != cache_checksum: + needed_updates.add(game) + else: + self.update_game(cached_game, game) if needed_updates: await self.send_msgs([{"cmd": "GetDataPackage", "games": [game_name]} for game_name in needed_updates]) def update_game(self, game_package: dict, game: str): self.item_names.update_game(game, game_package["item_name_to_id"]) self.location_names.update_game(game, game_package["location_name_to_id"]) + self.versions[game] = game_package.get("version", 0) + self.checksums[game] = game_package.get("checksum") def update_data_package(self, data_package: dict): for game, game_data in data_package["games"].items(): @@ -700,6 +718,11 @@ def run_gui(self): def run_cli(self): if sys.stdin: + if sys.stdin.fileno() != 0: + from multiprocessing import parent_process + if parent_process(): + return # ignore MultiProcessing pipe + # steam overlay breaks when starting console_loop if 'gameoverlayrenderer' in os.environ.get('LD_PRELOAD', ''): logger.info("Skipping terminal input, due to conflicting Steam Overlay detected. Please use GUI only.") diff --git a/Fill.py b/Fill.py index 706cca657457..86a4639c51ce 100644 --- a/Fill.py +++ b/Fill.py @@ -36,7 +36,8 @@ def sweep_from_pool(base_state: CollectionState, itempool: typing.Sequence[Item] def fill_restrictive(multiworld: MultiWorld, base_state: CollectionState, locations: typing.List[Location], item_pool: typing.List[Item], single_player_placement: bool = False, lock: bool = False, swap: bool = True, on_place: typing.Optional[typing.Callable[[Location], None]] = None, - allow_partial: bool = False, allow_excluded: bool = False, name: str = "Unknown") -> None: + allow_partial: bool = False, allow_excluded: bool = False, one_item_per_player: bool = True, + name: str = "Unknown") -> None: """ :param multiworld: Multiworld to be filled. :param base_state: State assumed before fill. @@ -63,14 +64,22 @@ def fill_restrictive(multiworld: MultiWorld, base_state: CollectionState, locati placed = 0 while any(reachable_items.values()) and locations: - # grab one item per player - items_to_place = [items.pop() - for items in reachable_items.values() if items] + if one_item_per_player: + # grab one item per player + items_to_place = [items.pop() + for items in reachable_items.values() if items] + else: + next_player = multiworld.random.choice([player for player, items in reachable_items.items() if items]) + items_to_place = [] + if item_pool: + items_to_place.append(reachable_items[next_player].pop()) + for item in items_to_place: for p, pool_item in enumerate(item_pool): if pool_item is item: item_pool.pop(p) break + maximum_exploration_state = sweep_from_pool( base_state, item_pool + unplaced_items, multiworld.get_filled_locations(item.player) if single_player_placement else None) @@ -480,7 +489,8 @@ def mark_for_locking(location: Location): if prioritylocations: # "priority fill" fill_restrictive(multiworld, multiworld.state, prioritylocations, progitempool, - single_player_placement=single_player, swap=False, on_place=mark_for_locking, name="Priority") + single_player_placement=single_player, swap=False, on_place=mark_for_locking, + name="Priority", one_item_per_player=False) accessibility_corrections(multiworld, multiworld.state, prioritylocations, progitempool) defaultlocations = prioritylocations + defaultlocations @@ -978,15 +988,32 @@ def failed(warning: str, force: typing.Union[bool, str]) -> None: multiworld.random.shuffle(items) count = 0 err: typing.List[str] = [] - successful_pairs: typing.List[typing.Tuple[Item, Location]] = [] + successful_pairs: typing.List[typing.Tuple[int, Item, Location]] = [] + claimed_indices: typing.Set[typing.Optional[int]] = set() for item_name in items: - item = multiworld.worlds[player].create_item(item_name) + index_to_delete: typing.Optional[int] = None + if from_pool: + try: + # If from_pool, try to find an existing item with this name & player in the itempool and use it + index_to_delete, item = next( + (i, item) for i, item in enumerate(multiworld.itempool) + if item.player == player and item.name == item_name and i not in claimed_indices + ) + except StopIteration: + warn( + f"Could not remove {item_name} from pool for {multiworld.player_name[player]} as it's already missing from it.", + placement['force']) + item = multiworld.worlds[player].create_item(item_name) + else: + item = multiworld.worlds[player].create_item(item_name) + for location in reversed(candidates): if (location.address is None) == (item.code is None): # either both None or both not None if not location.item: if location.item_rule(item): if location.can_fill(multiworld.state, item, False): - successful_pairs.append((item, location)) + successful_pairs.append((index_to_delete, item, location)) + claimed_indices.add(index_to_delete) candidates.remove(location) count = count + 1 break @@ -998,6 +1025,7 @@ def failed(warning: str, force: typing.Union[bool, str]) -> None: err.append(f"Cannot place {item_name} into already filled location {location}.") else: err.append(f"Mismatch between {item_name} and {location}, only one is an event.") + if count == maxcount: break if count < placement['count']['min']: @@ -1005,17 +1033,16 @@ def failed(warning: str, force: typing.Union[bool, str]) -> None: failed( f"Plando block failed to place {m - count} of {m} item(s) for {multiworld.player_name[player]}, error(s): {' '.join(err)}", placement['force']) - for (item, location) in successful_pairs: + + # Sort indices in reverse so we can remove them one by one + successful_pairs = sorted(successful_pairs, key=lambda successful_pair: successful_pair[0] or 0, reverse=True) + + for (index, item, location) in successful_pairs: multiworld.push_item(location, item, collect=False) location.locked = True logging.debug(f"Plando placed {item} at {location}") - if from_pool: - try: - multiworld.itempool.remove(item) - except ValueError: - warn( - f"Could not remove {item} from pool for {multiworld.player_name[player]} as it's already missing from it.", - placement['force']) + if index is not None: # If this item is from_pool and was found in the pool, remove it. + multiworld.itempool.pop(index) except Exception as e: raise Exception( diff --git a/Generate.py b/Generate.py index 52babdf18839..35c39627b139 100644 --- a/Generate.py +++ b/Generate.py @@ -110,11 +110,18 @@ def main(args=None) -> Tuple[argparse.Namespace, int]: player_files = {} for file in os.scandir(args.player_files_path): fname = file.name - if file.is_file() and not fname.startswith(".") and \ + if file.is_file() and not fname.startswith(".") and not fname.lower().endswith(".ini") and \ os.path.join(args.player_files_path, fname) not in {args.meta_file_path, args.weights_file_path}: path = os.path.join(args.player_files_path, fname) try: - weights_cache[fname] = read_weights_yamls(path) + weights_for_file = [] + for doc_idx, yaml in enumerate(read_weights_yamls(path)): + if yaml is None: + logging.warning(f"Ignoring empty yaml document #{doc_idx + 1} in {fname}") + else: + weights_for_file.append(yaml) + weights_cache[fname] = tuple(weights_for_file) + except Exception as e: raise ValueError(f"File {fname} is invalid. Please fix your yaml.") from e @@ -453,6 +460,10 @@ def roll_settings(weights: dict, plando_options: PlandoOptions = PlandoOptions.b raise Exception(f"Option {option_key} has to be in a game's section, not on its own.") ret.game = get_choice("game", weights) + if not isinstance(ret.game, str): + if ret.game is None: + raise Exception('"game" not specified') + raise Exception(f"Invalid game: {ret.game}") if ret.game not in AutoWorldRegister.world_types: from worlds import failed_world_loads picks = Utils.get_fuzzy_results(ret.game, list(AutoWorldRegister.world_types) + failed_world_loads, limit=1)[0] diff --git a/Launcher.py b/Launcher.py index 42f93547cc9d..22c0944ab1a4 100644 --- a/Launcher.py +++ b/Launcher.py @@ -22,20 +22,21 @@ from shutil import which from typing import Callable, Optional, Sequence, Tuple, Union -import Utils -import settings -from worlds.LauncherComponents import Component, components, Type, SuffixIdentifier, icon_paths - if __name__ == "__main__": import ModuleUpdate ModuleUpdate.update() -from Utils import is_frozen, user_path, local_path, init_logging, open_filename, messagebox, \ - is_windows, is_macos, is_linux +import settings +import Utils +from Utils import (init_logging, is_frozen, is_linux, is_macos, is_windows, local_path, messagebox, open_filename, + user_path) +from worlds.LauncherComponents import Component, components, icon_paths, SuffixIdentifier, Type def open_host_yaml(): - file = settings.get_settings().filename + s = settings.get_settings() + file = s.filename + s.save() assert file, "host.yaml missing" if is_linux: exe = which('sensible-editor') or which('gedit') or \ @@ -102,6 +103,7 @@ def update_settings(): Component("Open host.yaml", func=open_host_yaml), Component("Open Patch", func=open_patch), Component("Generate Template Options", func=generate_yamls), + Component("Archipelago Website", func=lambda: webbrowser.open("https://archipelago.gg/")), Component("Discord Server", icon="discord", func=lambda: webbrowser.open("https://discord.gg/8Z65BR2")), Component("Unrated/18+ Discord Server", icon="discord", func=lambda: webbrowser.open("https://discord.gg/fqvNCCRsu4")), Component("Browse Files", func=browse_files), @@ -124,12 +126,13 @@ def handle_uri(path: str, launch_args: Tuple[str, ...]) -> None: elif component.display_name == "Text Client": text_client_component = component - from kvui import App, Button, BoxLayout, Label, Clock, Window + if client_component is None: + run_component(text_client_component, *launch_args) + return - class Popup(App): - timer_label: Label - remaining_time: Optional[int] + from kvui import App, Button, BoxLayout, Label, Window + class Popup(App): def __init__(self): self.title = "Connect to Multiworld" self.icon = r"data/icon.png" @@ -137,47 +140,29 @@ def __init__(self): def build(self): layout = BoxLayout(orientation="vertical") + layout.add_widget(Label(text="Select client to open and connect with.")) + button_row = BoxLayout(orientation="horizontal", size_hint=(1, 0.4)) - if client_component is None: - self.remaining_time = 7 - label_text = (f"A game client able to parse URIs was not detected for {game}.\n" - f"Launching Text Client in 7 seconds...") - self.timer_label = Label(text=label_text) - layout.add_widget(self.timer_label) - Clock.schedule_interval(self.update_label, 1) - else: - layout.add_widget(Label(text="Select client to open and connect with.")) - button_row = BoxLayout(orientation="horizontal", size_hint=(1, 0.4)) - - text_client_button = Button( - text=text_client_component.display_name, - on_release=lambda *args: run_component(text_client_component, *launch_args) - ) - button_row.add_widget(text_client_button) + text_client_button = Button( + text=text_client_component.display_name, + on_release=lambda *args: run_component(text_client_component, *launch_args) + ) + button_row.add_widget(text_client_button) - game_client_button = Button( - text=client_component.display_name, - on_release=lambda *args: run_component(client_component, *launch_args) - ) - button_row.add_widget(game_client_button) + game_client_button = Button( + text=client_component.display_name, + on_release=lambda *args: run_component(client_component, *launch_args) + ) + button_row.add_widget(game_client_button) - layout.add_widget(button_row) + layout.add_widget(button_row) return layout - def update_label(self, dt): - if self.remaining_time > 1: - # countdown the timer and string replace the number - self.remaining_time -= 1 - self.timer_label.text = self.timer_label.text.replace( - str(self.remaining_time + 1), str(self.remaining_time) - ) - else: - # our timer is finished so launch text client and close down - run_component(text_client_component, *launch_args) - Clock.unschedule(self.update_label) - App.get_running_app().stop() - Window.close() + def _stop(self, *largs): + # see run_gui Launcher _stop comment for details + self.root_window.close() + super()._stop(*largs) Popup().run() @@ -239,9 +224,8 @@ def launch(exe, in_terminal=False): def run_gui(): - from kvui import App, ContainerLayout, GridLayout, Button, Label, ScrollBox, Widget + from kvui import App, ContainerLayout, GridLayout, Button, Label, ScrollBox, Widget, ApAsyncImage from kivy.core.window import Window - from kivy.uix.image import AsyncImage from kivy.uix.relativelayout import RelativeLayout class Launcher(App): @@ -252,7 +236,7 @@ class Launcher(App): _client_layout: Optional[ScrollBox] = None def __init__(self, ctx=None): - self.title = self.base_title + self.title = self.base_title + " " + Utils.__version__ self.ctx = ctx self.icon = r"data/icon.png" super().__init__() @@ -274,8 +258,8 @@ def build_button(component: Component) -> Widget: button.component = component button.bind(on_release=self.component_action) if component.icon != "icon": - image = AsyncImage(source=icon_paths[component.icon], - size=(38, 38), size_hint=(None, 1), pos=(5, 0)) + image = ApAsyncImage(source=icon_paths[component.icon], + size=(38, 38), size_hint=(None, 1), pos=(5, 0)) box_layout = RelativeLayout(size_hint_y=None, height=40) box_layout.add_widget(button) box_layout.add_widget(image) diff --git a/Main.py b/Main.py index 4008ca5e9017..d105bd4ad0e5 100644 --- a/Main.py +++ b/Main.py @@ -153,45 +153,38 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No # remove starting inventory from pool items. # Because some worlds don't actually create items during create_items this has to be as late as possible. - if any(getattr(multiworld.worlds[player].options, "start_inventory_from_pool", None) for player in multiworld.player_ids): - new_items: List[Item] = [] - old_items: List[Item] = [] - depletion_pool: Dict[int, Dict[str, int]] = { - player: getattr(multiworld.worlds[player].options, - "start_inventory_from_pool", - StartInventoryPool({})).value.copy() - for player in multiworld.player_ids - } - for player, items in depletion_pool.items(): - player_world: AutoWorld.World = multiworld.worlds[player] - for count in items.values(): - for _ in range(count): - new_items.append(player_world.create_filler()) - target: int = sum(sum(items.values()) for items in depletion_pool.values()) - for i, item in enumerate(multiworld.itempool): + fallback_inventory = StartInventoryPool({}) + depletion_pool: Dict[int, Dict[str, int]] = { + player: getattr(multiworld.worlds[player].options, "start_inventory_from_pool", fallback_inventory).value.copy() + for player in multiworld.player_ids + } + target_per_player = { + player: sum(target_items.values()) for player, target_items in depletion_pool.items() if target_items + } + + if target_per_player: + new_itempool: List[Item] = [] + + # Make new itempool with start_inventory_from_pool items removed + for item in multiworld.itempool: if depletion_pool[item.player].get(item.name, 0): - target -= 1 depletion_pool[item.player][item.name] -= 1 - # quick abort if we have found all items - if not target: - old_items.extend(multiworld.itempool[i+1:]) - break else: - old_items.append(item) - - # leftovers? - if target: - for player, remaining_items in depletion_pool.items(): - remaining_items = {name: count for name, count in remaining_items.items() if count} - if remaining_items: - logger.warning(f"{multiworld.get_player_name(player)}" - f" is trying to remove items from their pool that don't exist: {remaining_items}") - # find all filler we generated for the current player and remove until it matches - removables = [item for item in new_items if item.player == player] - for _ in range(sum(remaining_items.values())): - new_items.remove(removables.pop()) - assert len(multiworld.itempool) == len(new_items + old_items), "Item Pool amounts should not change." - multiworld.itempool[:] = new_items + old_items + new_itempool.append(item) + + # Create filler in place of the removed items, warn if any items couldn't be found in the multiworld itempool + for player, target in target_per_player.items(): + unfound_items = {item: count for item, count in depletion_pool[player].items() if count} + + if unfound_items: + player_name = multiworld.get_player_name(player) + logger.warning(f"{player_name} tried to remove items from their pool that don't exist: {unfound_items}") + + needed_items = target_per_player[player] - sum(unfound_items.values()) + new_itempool += [multiworld.worlds[player].create_filler() for _ in range(needed_items)] + + assert len(multiworld.itempool) == len(new_itempool), "Item Pool amounts should not change." + multiworld.itempool[:] = new_itempool multiworld.link_items() @@ -249,6 +242,7 @@ def main(args, seed=None, baked_server_options: Optional[Dict[str, object]] = No def write_multidata(): import NetUtils + from NetUtils import HintStatus slot_data = {} client_versions = {} games = {} @@ -273,10 +267,10 @@ def write_multidata(): for slot in multiworld.player_ids: slot_data[slot] = multiworld.worlds[slot].fill_slot_data() - def precollect_hint(location): + def precollect_hint(location: Location, auto_status: HintStatus): entrance = er_hint_data.get(location.player, {}).get(location.address, "") hint = NetUtils.Hint(location.item.player, location.player, location.address, - location.item.code, False, entrance, location.item.flags) + location.item.code, False, entrance, location.item.flags, auto_status) precollected_hints[location.player].add(hint) if location.item.player not in multiworld.groups: precollected_hints[location.item.player].add(hint) @@ -289,19 +283,22 @@ def precollect_hint(location): if type(location.address) == int: assert location.item.code is not None, "item code None should be event, " \ "location.address should then also be None. Location: " \ - f" {location}" + f" {location}, Item: {location.item}" assert location.address not in locations_data[location.player], ( f"Locations with duplicate address. {location} and " f"{locations_data[location.player][location.address]}") locations_data[location.player][location.address] = \ location.item.code, location.item.player, location.item.flags + auto_status = HintStatus.HINT_AVOID if location.item.trap else HintStatus.HINT_PRIORITY if location.name in multiworld.worlds[location.player].options.start_location_hints: - precollect_hint(location) + if not location.item.trap: # Unspecified status for location hints, except traps + auto_status = HintStatus.HINT_UNSPECIFIED + precollect_hint(location, auto_status) elif location.item.name in multiworld.worlds[location.item.player].options.start_hints: - precollect_hint(location) + precollect_hint(location, auto_status) elif any([location.item.name in multiworld.worlds[player].options.start_hints for player in multiworld.groups.get(location.item.player, {}).get("players", [])]): - precollect_hint(location) + precollect_hint(location, auto_status) # embedded data package data_package = { @@ -313,11 +310,10 @@ def precollect_hint(location): # get spheres -> filter address==None -> skip empty spheres: List[Dict[int, Set[int]]] = [] - for sphere in multiworld.get_spheres(): + for sphere in multiworld.get_sendable_spheres(): current_sphere: Dict[int, Set[int]] = collections.defaultdict(set) for sphere_location in sphere: - if type(sphere_location.address) is int: - current_sphere[sphere_location.player].add(sphere_location.address) + current_sphere[sphere_location.player].add(sphere_location.address) if current_sphere: spheres.append(dict(current_sphere)) diff --git a/ModuleUpdate.py b/ModuleUpdate.py index f49182bb7863..04cf25ea5594 100644 --- a/ModuleUpdate.py +++ b/ModuleUpdate.py @@ -5,8 +5,15 @@ import warnings -if sys.version_info < (3, 8, 6): - raise RuntimeError("Incompatible Python Version. 3.8.7+ is supported.") +if sys.platform in ("win32", "darwin") and sys.version_info < (3, 10, 11): + # Official micro version updates. This should match the number in docs/running from source.md. + raise RuntimeError(f"Incompatible Python Version found: {sys.version_info}. Official 3.10.15+ is supported.") +elif sys.platform in ("win32", "darwin") and sys.version_info < (3, 10, 15): + # There are known security issues, but no easy way to install fixed versions on Windows for testing. + warnings.warn(f"Python Version {sys.version_info} has security issues. Don't use in production.") +elif sys.version_info < (3, 10, 1): + # Other platforms may get security backports instead of micro updates, so the number is unreliable. + raise RuntimeError(f"Incompatible Python Version found: {sys.version_info}. 3.10.1+ is supported.") # don't run update if environment is frozen/compiled or if not the parent process (skip in subprocess) _skip_update = bool(getattr(sys, "frozen", False) or multiprocessing.parent_process()) diff --git a/MultiServer.py b/MultiServer.py index 0fe950b5e4f3..2561b0692a3c 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -41,7 +41,8 @@ import Utils from Utils import version_tuple, restricted_loads, Version, async_start, get_intended_text from NetUtils import Endpoint, ClientStatus, NetworkItem, decode, encode, NetworkPlayer, Permission, NetworkSlot, \ - SlotType, LocationStore + SlotType, LocationStore, Hint, HintStatus +from BaseClasses import ItemClassification min_client_version = Version(0, 1, 6) colorama.init() @@ -185,11 +186,9 @@ class Context: slot_info: typing.Dict[int, NetworkSlot] generator_version = Version(0, 0, 0) checksums: typing.Dict[str, str] - item_names: typing.Dict[str, typing.Dict[int, str]] = ( - collections.defaultdict(lambda: Utils.KeyedDefaultDict(lambda code: f'Unknown item (ID:{code})'))) + item_names: typing.Dict[str, typing.Dict[int, str]] item_name_groups: typing.Dict[str, typing.Dict[str, typing.Set[str]]] - location_names: typing.Dict[str, typing.Dict[int, str]] = ( - collections.defaultdict(lambda: Utils.KeyedDefaultDict(lambda code: f'Unknown location (ID:{code})'))) + location_names: typing.Dict[str, typing.Dict[int, str]] location_name_groups: typing.Dict[str, typing.Dict[str, typing.Set[str]]] all_item_and_group_names: typing.Dict[str, typing.Set[str]] all_location_and_group_names: typing.Dict[str, typing.Set[str]] @@ -198,7 +197,6 @@ class Context: """ each sphere is { player: { location_id, ... } } """ logger: logging.Logger - def __init__(self, host: str, port: int, server_password: str, password: str, location_check_points: int, hint_cost: int, item_cheat: bool, release_mode: str = "disabled", collect_mode="disabled", remaining_mode: str = "disabled", auto_shutdown: typing.SupportsFloat = 0, compatibility: int = 2, @@ -231,7 +229,7 @@ def __init__(self, host: str, port: int, server_password: str, password: str, lo self.hint_cost = hint_cost self.location_check_points = location_check_points self.hints_used = collections.defaultdict(int) - self.hints: typing.Dict[team_slot, typing.Set[NetUtils.Hint]] = collections.defaultdict(set) + self.hints: typing.Dict[team_slot, typing.Set[Hint]] = collections.defaultdict(set) self.release_mode: str = release_mode self.remaining_mode: str = remaining_mode self.collect_mode: str = collect_mode @@ -269,6 +267,10 @@ def __init__(self, host: str, port: int, server_password: str, password: str, lo self.location_name_groups = {} self.all_item_and_group_names = {} self.all_location_and_group_names = {} + self.item_names = collections.defaultdict( + lambda: Utils.KeyedDefaultDict(lambda code: f'Unknown item (ID:{code})')) + self.location_names = collections.defaultdict( + lambda: Utils.KeyedDefaultDict(lambda code: f'Unknown location (ID:{code})')) self.non_hintable_names = collections.defaultdict(frozenset) self._load_game_data() @@ -655,13 +657,29 @@ def get_hint_cost(self, slot): return max(1, int(self.hint_cost * 0.01 * len(self.locations[slot]))) return 0 - def recheck_hints(self, team: typing.Optional[int] = None, slot: typing.Optional[int] = None): + def recheck_hints(self, team: typing.Optional[int] = None, slot: typing.Optional[int] = None, + changed: typing.Optional[typing.Set[team_slot]] = None) -> None: + """Refreshes the hints for the specified team/slot. Providing 'None' for either team or slot + will refresh all teams or all slots respectively. If a set is passed for 'changed', each (team,slot) + pair that has at least one hint modified will be added to the set. + """ for hint_team, hint_slot in self.hints: - if (team is None or team == hint_team) and (slot is None or slot == hint_slot): - self.hints[hint_team, hint_slot] = { - hint.re_check(self, hint_team) for hint in - self.hints[hint_team, hint_slot] - } + if team != hint_team and team is not None: + continue # Check specified team only, all if team is None + if slot != hint_slot and slot is not None: + continue # Check specified slot only, all if slot is None + new_hints: typing.Set[Hint] = set() + for hint in self.hints[hint_team, hint_slot]: + new_hint = hint.re_check(self, hint_team) + new_hints.add(new_hint) + if hint == new_hint: + continue + for player in self.slot_set(hint.receiving_player) | {hint.finding_player}: + if changed is not None: + changed.add((hint_team,player)) + if slot is not None and slot != player: + self.replace_hint(hint_team, player, hint, new_hint) + self.hints[hint_team, hint_slot] = new_hints def get_rechecked_hints(self, team: int, slot: int): self.recheck_hints(team, slot) @@ -710,7 +728,7 @@ def get_aliased_name(self, team: int, slot: int): else: return self.player_names[team, slot] - def notify_hints(self, team: int, hints: typing.List[NetUtils.Hint], only_new: bool = False, + def notify_hints(self, team: int, hints: typing.List[Hint], only_new: bool = False, recipients: typing.Sequence[int] = None): """Send and remember hints.""" if only_new: @@ -726,15 +744,15 @@ def notify_hints(self, team: int, hints: typing.List[NetUtils.Hint], only_new: b if not hint.local and data not in concerns[hint.finding_player]: concerns[hint.finding_player].append(data) # remember hints in all cases - if not hint.found: - # since hints are bidirectional, finding player and receiving player, - # we can check once if hint already exists - if hint not in self.hints[team, hint.finding_player]: - self.hints[team, hint.finding_player].add(hint) - new_hint_events.add(hint.finding_player) - for player in self.slot_set(hint.receiving_player): - self.hints[team, player].add(hint) - new_hint_events.add(player) + + # since hints are bidirectional, finding player and receiving player, + # we can check once if hint already exists + if hint not in self.hints[team, hint.finding_player]: + self.hints[team, hint.finding_player].add(hint) + new_hint_events.add(hint.finding_player) + for player in self.slot_set(hint.receiving_player): + self.hints[team, player].add(hint) + new_hint_events.add(player) self.logger.info("Notice (Team #%d): %s" % (team + 1, format_hint(self, team, hint))) for slot in new_hint_events: @@ -748,6 +766,17 @@ def notify_hints(self, team: int, hints: typing.List[NetUtils.Hint], only_new: b for client in clients: async_start(self.send_msgs(client, client_hints)) + def get_hint(self, team: int, finding_player: int, seeked_location: int) -> typing.Optional[Hint]: + for hint in self.hints[team, finding_player]: + if hint.location == seeked_location: + return hint + return None + + def replace_hint(self, team: int, slot: int, old_hint: Hint, new_hint: Hint) -> None: + if old_hint in self.hints[team, slot]: + self.hints[team, slot].remove(old_hint) + self.hints[team, slot].add(new_hint) + # "events" def on_goal_achieved(self, client: Client): @@ -946,9 +975,13 @@ def get_status_string(ctx: Context, team: int, tag: str): tagged = len([client for client in ctx.clients[team][slot] if tag in client.tags]) completion_text = f"({len(ctx.location_checks[team, slot])}/{len(ctx.locations[slot])})" tag_text = f" {tagged} of which are tagged {tag}" if connected and tag else "" - goal_text = " and has finished." if ctx.client_game_state[team, slot] == ClientStatus.CLIENT_GOAL else "." + status_text = ( + " and has finished." if ctx.client_game_state[team, slot] == ClientStatus.CLIENT_GOAL else + " and is ready." if ctx.client_game_state[team, slot] == ClientStatus.CLIENT_READY else + "." + ) text += f"\n{ctx.get_aliased_name(team, slot)} has {connected} connection{'' if connected == 1 else 's'}" \ - f"{tag_text}{goal_text} {completion_text}" + f"{tag_text}{status_text} {completion_text}" return text @@ -1049,14 +1082,15 @@ def register_location_checks(ctx: Context, team: int, slot: int, locations: typi "hint_points": get_slot_points(ctx, team, slot), "checked_locations": new_locations, # send back new checks only }]) - old_hints = ctx.hints[team, slot].copy() - ctx.recheck_hints(team, slot) - if old_hints != ctx.hints[team, slot]: - ctx.on_changed_hints(team, slot) + updated_slots: typing.Set[tuple[int, int]] = set() + ctx.recheck_hints(team, slot, updated_slots) + for hint_team, hint_slot in updated_slots: + ctx.on_changed_hints(hint_team, hint_slot) ctx.save() -def collect_hints(ctx: Context, team: int, slot: int, item: typing.Union[int, str]) -> typing.List[NetUtils.Hint]: +def collect_hints(ctx: Context, team: int, slot: int, item: typing.Union[int, str], auto_status: HintStatus) \ + -> typing.List[Hint]: hints = [] slots: typing.Set[int] = {slot} for group_id, group in ctx.groups.items(): @@ -1066,31 +1100,58 @@ def collect_hints(ctx: Context, team: int, slot: int, item: typing.Union[int, st seeked_item_id = item if isinstance(item, int) else ctx.item_names_for_game(ctx.games[slot])[item] for finding_player, location_id, item_id, receiving_player, item_flags \ in ctx.locations.find_item(slots, seeked_item_id): - found = location_id in ctx.location_checks[team, finding_player] - entrance = ctx.er_hint_data.get(finding_player, {}).get(location_id, "") - hints.append(NetUtils.Hint(receiving_player, finding_player, location_id, item_id, found, entrance, - item_flags)) + prev_hint = ctx.get_hint(team, slot, location_id) + if prev_hint: + hints.append(prev_hint) + else: + found = location_id in ctx.location_checks[team, finding_player] + entrance = ctx.er_hint_data.get(finding_player, {}).get(location_id, "") + new_status = auto_status + if found: + new_status = HintStatus.HINT_FOUND + elif item_flags & ItemClassification.trap: + new_status = HintStatus.HINT_AVOID + hints.append(Hint(receiving_player, finding_player, location_id, item_id, found, entrance, + item_flags, new_status)) return hints -def collect_hint_location_name(ctx: Context, team: int, slot: int, location: str) -> typing.List[NetUtils.Hint]: +def collect_hint_location_name(ctx: Context, team: int, slot: int, location: str, auto_status: HintStatus) \ + -> typing.List[Hint]: seeked_location: int = ctx.location_names_for_game(ctx.games[slot])[location] - return collect_hint_location_id(ctx, team, slot, seeked_location) + return collect_hint_location_id(ctx, team, slot, seeked_location, auto_status) -def collect_hint_location_id(ctx: Context, team: int, slot: int, seeked_location: int) -> typing.List[NetUtils.Hint]: +def collect_hint_location_id(ctx: Context, team: int, slot: int, seeked_location: int, auto_status: HintStatus) \ + -> typing.List[Hint]: + prev_hint = ctx.get_hint(team, slot, seeked_location) + if prev_hint: + return [prev_hint] result = ctx.locations[slot].get(seeked_location, (None, None, None)) if any(result): item_id, receiving_player, item_flags = result found = seeked_location in ctx.location_checks[team, slot] entrance = ctx.er_hint_data.get(slot, {}).get(seeked_location, "") - return [NetUtils.Hint(receiving_player, slot, seeked_location, item_id, found, entrance, item_flags)] + new_status = auto_status + if found: + new_status = HintStatus.HINT_FOUND + elif item_flags & ItemClassification.trap: + new_status = HintStatus.HINT_AVOID + return [Hint(receiving_player, slot, seeked_location, item_id, found, entrance, item_flags, + new_status)] return [] -def format_hint(ctx: Context, team: int, hint: NetUtils.Hint) -> str: +status_names: typing.Dict[HintStatus, str] = { + HintStatus.HINT_FOUND: "(found)", + HintStatus.HINT_UNSPECIFIED: "(unspecified)", + HintStatus.HINT_NO_PRIORITY: "(no priority)", + HintStatus.HINT_AVOID: "(avoid)", + HintStatus.HINT_PRIORITY: "(priority)", +} +def format_hint(ctx: Context, team: int, hint: Hint) -> str: text = f"[Hint]: {ctx.player_names[team, hint.receiving_player]}'s " \ f"{ctx.item_names[ctx.slot_info[hint.receiving_player].game][hint.item]} is " \ f"at {ctx.location_names[ctx.slot_info[hint.finding_player].game][hint.location]} " \ @@ -1098,7 +1159,8 @@ def format_hint(ctx: Context, team: int, hint: NetUtils.Hint) -> str: if hint.entrance: text += f" at {hint.entrance}" - return text + (". (found)" if hint.found else ".") + + return text + ". " + status_names.get(hint.status, "(unknown)") def json_format_send_event(net_item: NetworkItem, receiving_player: int): @@ -1153,7 +1215,10 @@ def __call__(self, raw: str) -> typing.Optional[bool]: if not raw: return try: - command = shlex.split(raw, comments=False) + try: + command = shlex.split(raw, comments=False) + except ValueError: # most likely: "ValueError: No closing quotation" + command = raw.split() basecommand = command[0] if basecommand[0] == self.marker: method = self.commands.get(basecommand[1:].lower(), None) @@ -1499,7 +1564,7 @@ def _cmd_getitem(self, item_name: str) -> bool: def get_hints(self, input_text: str, for_location: bool = False) -> bool: points_available = get_client_points(self.ctx, self.client) cost = self.ctx.get_hint_cost(self.client.slot) - + auto_status = HintStatus.HINT_UNSPECIFIED if for_location else HintStatus.HINT_PRIORITY if not input_text: hints = {hint.re_check(self.ctx, self.client.team) for hint in self.ctx.hints[self.client.team, self.client.slot]} @@ -1525,9 +1590,9 @@ def get_hints(self, input_text: str, for_location: bool = False) -> bool: self.output(f"Sorry, \"{hint_name}\" is marked as non-hintable.") hints = [] elif not for_location: - hints = collect_hints(self.ctx, self.client.team, self.client.slot, hint_id) + hints = collect_hints(self.ctx, self.client.team, self.client.slot, hint_id, auto_status) else: - hints = collect_hint_location_id(self.ctx, self.client.team, self.client.slot, hint_id) + hints = collect_hint_location_id(self.ctx, self.client.team, self.client.slot, hint_id, auto_status) else: game = self.ctx.games[self.client.slot] @@ -1547,16 +1612,16 @@ def get_hints(self, input_text: str, for_location: bool = False) -> bool: hints = [] for item_name in self.ctx.item_name_groups[game][hint_name]: if item_name in self.ctx.item_names_for_game(game): # ensure item has an ID - hints.extend(collect_hints(self.ctx, self.client.team, self.client.slot, item_name)) + hints.extend(collect_hints(self.ctx, self.client.team, self.client.slot, item_name, auto_status)) elif not for_location and hint_name in self.ctx.item_names_for_game(game): # item name - hints = collect_hints(self.ctx, self.client.team, self.client.slot, hint_name) + hints = collect_hints(self.ctx, self.client.team, self.client.slot, hint_name, auto_status) elif hint_name in self.ctx.location_name_groups[game]: # location group name hints = [] for loc_name in self.ctx.location_name_groups[game][hint_name]: if loc_name in self.ctx.location_names_for_game(game): - hints.extend(collect_hint_location_name(self.ctx, self.client.team, self.client.slot, loc_name)) + hints.extend(collect_hint_location_name(self.ctx, self.client.team, self.client.slot, loc_name, auto_status)) else: # location name - hints = collect_hint_location_name(self.ctx, self.client.team, self.client.slot, hint_name) + hints = collect_hint_location_name(self.ctx, self.client.team, self.client.slot, hint_name, auto_status) else: self.output(response) @@ -1828,13 +1893,56 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict): target_item, target_player, flags = ctx.locations[client.slot][location] if create_as_hint: - hints.extend(collect_hint_location_id(ctx, client.team, client.slot, location)) + hints.extend(collect_hint_location_id(ctx, client.team, client.slot, location, + HintStatus.HINT_UNSPECIFIED)) locs.append(NetworkItem(target_item, location, target_player, flags)) ctx.notify_hints(client.team, hints, only_new=create_as_hint == 2) if locs and create_as_hint: ctx.save() await ctx.send_msgs(client, [{'cmd': 'LocationInfo', 'locations': locs}]) - + + elif cmd == 'UpdateHint': + location = args["location"] + player = args["player"] + status = args["status"] + if not isinstance(player, int) or not isinstance(location, int) \ + or (status is not None and not isinstance(status, int)): + await ctx.send_msgs(client, + [{'cmd': 'InvalidPacket', "type": "arguments", "text": 'UpdateHint', + "original_cmd": cmd}]) + return + hint = ctx.get_hint(client.team, player, location) + if not hint: + return # Ignored safely + if hint.receiving_player != client.slot: + await ctx.send_msgs(client, + [{'cmd': 'InvalidPacket', "type": "arguments", "text": 'UpdateHint: No Permission', + "original_cmd": cmd}]) + return + new_hint = hint + if status is None: + return + try: + status = HintStatus(status) + except ValueError: + await ctx.send_msgs(client, + [{'cmd': 'InvalidPacket', "type": "arguments", + "text": 'UpdateHint: Invalid Status', "original_cmd": cmd}]) + return + if status == HintStatus.HINT_FOUND: + await ctx.send_msgs(client, + [{'cmd': 'InvalidPacket', "type": "arguments", + "text": 'UpdateHint: Cannot manually update status to "HINT_FOUND"', "original_cmd": cmd}]) + return + new_hint = new_hint.re_prioritize(ctx, status) + if hint == new_hint: + return + ctx.replace_hint(client.team, hint.finding_player, hint, new_hint) + ctx.replace_hint(client.team, hint.receiving_player, hint, new_hint) + ctx.save() + ctx.on_changed_hints(client.team, hint.finding_player) + ctx.on_changed_hints(client.team, hint.receiving_player) + elif cmd == 'StatusUpdate': update_client_status(ctx, client, args["status"]) @@ -1956,8 +2064,10 @@ def _cmd_status(self, tag: str = "") -> bool: def _cmd_exit(self) -> bool: """Shutdown the server""" - self.ctx.server.ws_server.close() - self.ctx.exit_event.set() + try: + self.ctx.server.ws_server.close() + finally: + self.ctx.exit_event.set() return True @mark_raw @@ -2137,9 +2247,9 @@ def _cmd_hint(self, player_name: str, *item_name: str) -> bool: hints = [] for item_name_from_group in self.ctx.item_name_groups[game][item]: if item_name_from_group in self.ctx.item_names_for_game(game): # ensure item has an ID - hints.extend(collect_hints(self.ctx, team, slot, item_name_from_group)) + hints.extend(collect_hints(self.ctx, team, slot, item_name_from_group, HintStatus.HINT_PRIORITY)) else: # item name or id - hints = collect_hints(self.ctx, team, slot, item) + hints = collect_hints(self.ctx, team, slot, item, HintStatus.HINT_PRIORITY) if hints: self.ctx.notify_hints(team, hints) @@ -2173,14 +2283,17 @@ def _cmd_hint_location(self, player_name: str, *location_name: str) -> bool: if usable: if isinstance(location, int): - hints = collect_hint_location_id(self.ctx, team, slot, location) + hints = collect_hint_location_id(self.ctx, team, slot, location, + HintStatus.HINT_UNSPECIFIED) elif game in self.ctx.location_name_groups and location in self.ctx.location_name_groups[game]: hints = [] for loc_name_from_group in self.ctx.location_name_groups[game][location]: if loc_name_from_group in self.ctx.location_names_for_game(game): - hints.extend(collect_hint_location_name(self.ctx, team, slot, loc_name_from_group)) + hints.extend(collect_hint_location_name(self.ctx, team, slot, loc_name_from_group, + HintStatus.HINT_UNSPECIFIED)) else: - hints = collect_hint_location_name(self.ctx, team, slot, location) + hints = collect_hint_location_name(self.ctx, team, slot, location, + HintStatus.HINT_UNSPECIFIED) if hints: self.ctx.notify_hints(team, hints) else: @@ -2270,6 +2383,8 @@ def parse_args() -> argparse.Namespace: parser.add_argument('--cert_key', help="Path to SSL Certificate Key file") parser.add_argument('--loglevel', default=defaults["loglevel"], choices=['debug', 'info', 'warning', 'error', 'critical']) + parser.add_argument('--logtime', help="Add timestamps to STDOUT", + default=defaults["logtime"], action='store_true') parser.add_argument('--location_check_points', default=defaults["location_check_points"], type=int) parser.add_argument('--hint_cost', default=defaults["hint_cost"], type=int) parser.add_argument('--disable_item_cheat', default=defaults["disable_item_cheat"], action='store_true') @@ -2350,7 +2465,9 @@ def load_server_cert(path: str, cert_key: typing.Optional[str]) -> "ssl.SSLConte async def main(args: argparse.Namespace): - Utils.init_logging("Server", loglevel=args.loglevel.lower()) + Utils.init_logging(name="Server", + loglevel=args.loglevel.lower(), + add_timestamp=args.logtime) ctx = Context(args.host, args.port, args.server_password, args.password, args.location_check_points, args.hint_cost, not args.disable_item_cheat, args.release_mode, args.collect_mode, diff --git a/NetUtils.py b/NetUtils.py index 4776b228db17..ec6ff3eb1d81 100644 --- a/NetUtils.py +++ b/NetUtils.py @@ -29,6 +29,14 @@ class ClientStatus(ByValue, enum.IntEnum): CLIENT_GOAL = 30 +class HintStatus(enum.IntEnum): + HINT_FOUND = 0 + HINT_UNSPECIFIED = 1 + HINT_NO_PRIORITY = 10 + HINT_AVOID = 20 + HINT_PRIORITY = 30 + + class SlotType(ByValue, enum.IntFlag): spectator = 0b00 player = 0b01 @@ -297,6 +305,20 @@ def add_json_location(parts: list, location_id: int, player: int = 0, **kwargs) parts.append({"text": str(location_id), "player": player, "type": JSONTypes.location_id, **kwargs}) +status_names: typing.Dict[HintStatus, str] = { + HintStatus.HINT_FOUND: "(found)", + HintStatus.HINT_UNSPECIFIED: "(unspecified)", + HintStatus.HINT_NO_PRIORITY: "(no priority)", + HintStatus.HINT_AVOID: "(avoid)", + HintStatus.HINT_PRIORITY: "(priority)", +} +status_colors: typing.Dict[HintStatus, str] = { + HintStatus.HINT_FOUND: "green", + HintStatus.HINT_UNSPECIFIED: "white", + HintStatus.HINT_NO_PRIORITY: "slateblue", + HintStatus.HINT_AVOID: "salmon", + HintStatus.HINT_PRIORITY: "plum", +} class Hint(typing.NamedTuple): receiving_player: int finding_player: int @@ -305,14 +327,21 @@ class Hint(typing.NamedTuple): found: bool entrance: str = "" item_flags: int = 0 + status: HintStatus = HintStatus.HINT_UNSPECIFIED def re_check(self, ctx, team) -> Hint: - if self.found: + if self.found and self.status == HintStatus.HINT_FOUND: return self found = self.location in ctx.location_checks[team, self.finding_player] if found: - return Hint(self.receiving_player, self.finding_player, self.location, self.item, found, self.entrance, - self.item_flags) + return self._replace(found=found, status=HintStatus.HINT_FOUND) + return self + + def re_prioritize(self, ctx, status: HintStatus) -> Hint: + if self.found and status != HintStatus.HINT_FOUND: + status = HintStatus.HINT_FOUND + if status != self.status: + return self._replace(status=status) return self def __hash__(self): @@ -334,10 +363,8 @@ def as_network_message(self) -> dict: else: add_json_text(parts, "'s World") add_json_text(parts, ". ") - if self.found: - add_json_text(parts, "(found)", type="color", color="green") - else: - add_json_text(parts, "(not found)", type="color", color="red") + add_json_text(parts, status_names.get(self.status, "(unknown)"), type="color", + color=status_colors.get(self.status, "red")) return {"cmd": "PrintJSON", "data": parts, "type": "Hint", "receiving": self.receiving_player, diff --git a/Options.py b/Options.py index aa6f175fa58d..d3b2e6c1ba11 100644 --- a/Options.py +++ b/Options.py @@ -15,7 +15,7 @@ from schema import And, Optional, Or, Schema from typing_extensions import Self -from Utils import get_fuzzy_results, is_iterable_except_str, output_path +from Utils import get_file_safe_name, get_fuzzy_results, is_iterable_except_str, output_path if typing.TYPE_CHECKING: from BaseClasses import MultiWorld, PlandoOptions @@ -828,7 +828,10 @@ def verify(self, world: typing.Type[World], player_name: str, plando_options: "P f"is not a valid location name from {world.game}. " f"Did you mean '{picks[0][0]}' ({picks[0][1]}% sure)") + def __iter__(self) -> typing.Iterator[typing.Any]: + return self.value.__iter__() + class OptionDict(Option[typing.Dict[str, typing.Any]], VerifyKeys, typing.Mapping[str, typing.Any]): default = {} supports_weighting = False @@ -860,6 +863,8 @@ class ItemDict(OptionDict): verify_item_name = True def __init__(self, value: typing.Dict[str, int]): + if any(item_count is None for item_count in value.values()): + raise Exception("Items must have counts associated with them. Please provide positive integer values in the format \"item\": count .") if any(item_count < 1 for item_count in value.values()): raise Exception("Cannot have non-positive item counts.") super(ItemDict, self).__init__(value) @@ -1460,22 +1465,26 @@ class OptionGroup(typing.NamedTuple): def get_option_groups(world: typing.Type[World], visibility_level: Visibility = Visibility.template) -> typing.Dict[ str, typing.Dict[str, typing.Type[Option[typing.Any]]]]: """Generates and returns a dictionary for the option groups of a specified world.""" - option_groups = {option: option_group.name - for option_group in world.web.option_groups - for option in option_group.options} - # add a default option group for uncategorized options to get thrown into - ordered_groups = ["Game Options"] - [ordered_groups.append(group) for group in option_groups.values() if group not in ordered_groups] - grouped_options = {group: {} for group in ordered_groups} - for option_name, option in world.options_dataclass.type_hints.items(): - if visibility_level & option.visibility: - grouped_options[option_groups.get(option, "Game Options")][option_name] = option + option_to_name = {option: option_name for option_name, option in world.options_dataclass.type_hints.items()} - # if the world doesn't have any ungrouped options, this group will be empty so just remove it - if not grouped_options["Game Options"]: - del grouped_options["Game Options"] + ordered_groups = {group.name: group.options for group in world.web.option_groups} - return grouped_options + # add a default option group for uncategorized options to get thrown into + if "Game Options" not in ordered_groups: + grouped_options = set(option for group in ordered_groups.values() for option in group) + ungrouped_options = [option for option in option_to_name if option not in grouped_options] + # only add the game options group if we have ungrouped options + if ungrouped_options: + ordered_groups = {**{"Game Options": ungrouped_options}, **ordered_groups} + + return { + group: { + option_to_name[option]: option + for option in group_options + if (visibility_level in option.visibility and option in option_to_name) + } + for group, group_options in ordered_groups.items() + } def generate_yaml_templates(target_folder: typing.Union[str, "pathlib.Path"], generate_hidden: bool = True) -> None: @@ -1531,7 +1540,7 @@ def yaml_dump_scalar(scalar) -> str: del file_data - with open(os.path.join(target_folder, game_name + ".yaml"), "w", encoding="utf-8-sig") as f: + with open(os.path.join(target_folder, get_file_safe_name(game_name) + ".yaml"), "w", encoding="utf-8-sig") as f: f.write(res) diff --git a/README.md b/README.md index 0e57bce53b51..2cc3c18aa09d 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,7 @@ Currently, the following games are supported: * Kingdom Hearts 1 * Mega Man 2 * Yacht Dice +* Faxanadu 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/SNIClient.py b/SNIClient.py index 222ed54f5cc5..19440e1dc5be 100644 --- a/SNIClient.py +++ b/SNIClient.py @@ -633,7 +633,13 @@ async def game_watcher(ctx: SNIContext) -> None: if not ctx.client_handler: continue - rom_validated = await ctx.client_handler.validate_rom(ctx) + try: + rom_validated = await ctx.client_handler.validate_rom(ctx) + except Exception as e: + snes_logger.error(f"An error occurred, see logs for details: {e}") + text_file_logger = logging.getLogger() + text_file_logger.exception(e) + rom_validated = False if not rom_validated or (ctx.auth and ctx.auth != ctx.rom): snes_logger.warning("ROM change detected, please reconnect to the multiworld server") @@ -649,7 +655,13 @@ async def game_watcher(ctx: SNIContext) -> None: perf_counter = time.perf_counter() - await ctx.client_handler.game_watcher(ctx) + try: + await ctx.client_handler.game_watcher(ctx) + except Exception as e: + snes_logger.error(f"An error occurred, see logs for details: {e}") + text_file_logger = logging.getLogger() + text_file_logger.exception(e) + await snes_disconnect(ctx) async def run_game(romfile: str) -> None: diff --git a/Utils.py b/Utils.py index d6709431d32c..50adb18f42be 100644 --- a/Utils.py +++ b/Utils.py @@ -18,8 +18,8 @@ from argparse import Namespace from settings import Settings, get_settings -from typing import BinaryIO, Coroutine, Optional, Set, Dict, Any, Union -from typing_extensions import TypeGuard +from time import sleep +from typing import BinaryIO, Coroutine, Optional, Set, Dict, Any, Union, TypeGuard from yaml import load, load_all, dump try: @@ -31,6 +31,7 @@ import tkinter import pathlib from BaseClasses import Region + import multiprocessing def tuplize_version(version: str) -> Version: @@ -46,7 +47,7 @@ def as_simple_string(self) -> str: return ".".join(str(item) for item in self) -__version__ = "0.5.1" +__version__ = "0.6.0" version_tuple = tuplize_version(__version__) is_linux = sys.platform.startswith("linux") @@ -420,10 +421,11 @@ def find_class(self, module: str, name: str) -> type: if module == "builtins" and name in safe_builtins: return getattr(builtins, name) # used by MultiServer -> savegame/multidata - if module == "NetUtils" and name in {"NetworkItem", "ClientStatus", "Hint", "SlotType", "NetworkSlot"}: + if module == "NetUtils" and name in {"NetworkItem", "ClientStatus", "Hint", + "SlotType", "NetworkSlot", "HintStatus"}: return getattr(self.net_utils_module, name) # Options and Plando are unpickled by WebHost -> Generate - if module == "worlds.generic" and name in {"PlandoItem", "PlandoConnection"}: + if module == "worlds.generic" and name == "PlandoItem": if not self.generic_properties_module: self.generic_properties_module = importlib.import_module("worlds.generic") return getattr(self.generic_properties_module, name) @@ -434,7 +436,7 @@ def find_class(self, module: str, name: str) -> type: else: mod = importlib.import_module(module) obj = getattr(mod, name) - if issubclass(obj, self.options_module.Option): + if issubclass(obj, (self.options_module.Option, self.options_module.PlandoConnection)): return obj # Forbid everything else. raise pickle.UnpicklingError(f"global '{module}.{name}' is forbidden") @@ -483,9 +485,9 @@ def get_text_after(text: str, start: str) -> str: loglevel_mapping = {'error': logging.ERROR, 'info': logging.INFO, 'warning': logging.WARNING, 'debug': logging.DEBUG} -def init_logging(name: str, loglevel: typing.Union[str, int] = logging.INFO, write_mode: str = "w", - log_format: str = "[%(name)s at %(asctime)s]: %(message)s", - exception_logger: typing.Optional[str] = None): +def init_logging(name: str, loglevel: typing.Union[str, int] = logging.INFO, + write_mode: str = "w", log_format: str = "[%(name)s at %(asctime)s]: %(message)s", + add_timestamp: bool = False, exception_logger: typing.Optional[str] = None): import datetime loglevel: int = loglevel_mapping.get(loglevel, loglevel) log_folder = user_path("logs") @@ -513,10 +515,14 @@ def filter(self, record: logging.LogRecord) -> bool: return self.condition(record) file_handler.addFilter(Filter("NoStream", lambda record: not getattr(record, "NoFile", False))) + file_handler.addFilter(Filter("NoCarriageReturn", lambda record: '\r' not in record.msg)) root_logger.addHandler(file_handler) if sys.stdout: + formatter = logging.Formatter(fmt='[%(asctime)s] %(message)s', datefmt='%Y-%m-%d %H:%M:%S') stream_handler = logging.StreamHandler(sys.stdout) stream_handler.addFilter(Filter("NoFile", lambda record: not getattr(record, "NoStream", False))) + if add_timestamp: + stream_handler.setFormatter(formatter) root_logger.addHandler(stream_handler) # Relay unhandled exceptions to logger. @@ -551,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 ''}" ) @@ -567,6 +573,8 @@ def queuer(): else: if text: queue.put_nowait(text) + else: + sleep(0.01) # non-blocking stream from threading import Thread thread = Thread(target=queuer, name=f"Stream handler for {stream.name}", daemon=True) @@ -664,6 +672,19 @@ def get_input_text_from_response(text: str, command: str) -> typing.Optional[str return None +def is_kivy_running() -> bool: + if "kivy" in sys.modules: + from kivy.app import App + return App.get_running_app() is not None + return False + + +def _mp_open_filename(res: "multiprocessing.Queue[typing.Optional[str]]", *args: Any) -> None: + if is_kivy_running(): + raise RuntimeError("kivy should not be running in multiprocess") + res.put(open_filename(*args)) + + def open_filename(title: str, filetypes: typing.Iterable[typing.Tuple[str, typing.Iterable[str]]], suggest: str = "") \ -> typing.Optional[str]: logging.info(f"Opening file input dialog for {title}.") @@ -693,6 +714,13 @@ def run(*args: str): f'This attempt was made because open_filename was used for "{title}".') raise e else: + if is_macos and is_kivy_running(): + # on macOS, mixing kivy and tk does not work, so spawn a new process + # FIXME: performance of this is pretty bad, and we should (also) look into alternatives + from multiprocessing import Process, Queue + res: "Queue[typing.Optional[str]]" = Queue() + Process(target=_mp_open_filename, args=(res, title, filetypes, suggest)).start() + return res.get() try: root = tkinter.Tk() except tkinter.TclError: @@ -702,6 +730,12 @@ def run(*args: str): initialfile=suggest or None) +def _mp_open_directory(res: "multiprocessing.Queue[typing.Optional[str]]", *args: Any) -> None: + if is_kivy_running(): + raise RuntimeError("kivy should not be running in multiprocess") + res.put(open_directory(*args)) + + def open_directory(title: str, suggest: str = "") -> typing.Optional[str]: def run(*args: str): return subprocess.run(args, capture_output=True, text=True).stdout.split("\n", 1)[0] or None @@ -725,9 +759,16 @@ def run(*args: str): import tkinter.filedialog except Exception as e: logging.error('Could not load tkinter, which is likely not installed. ' - f'This attempt was made because open_filename was used for "{title}".') + f'This attempt was made because open_directory was used for "{title}".') raise e else: + if is_macos and is_kivy_running(): + # on macOS, mixing kivy and tk does not work, so spawn a new process + # FIXME: performance of this is pretty bad, and we should (also) look into alternatives + from multiprocessing import Process, Queue + res: "Queue[typing.Optional[str]]" = Queue() + Process(target=_mp_open_directory, args=(res, title, suggest)).start() + return res.get() try: root = tkinter.Tk() except tkinter.TclError: @@ -740,12 +781,6 @@ def messagebox(title: str, text: str, error: bool = False) -> None: def run(*args: str): return subprocess.run(args, capture_output=True, text=True).stdout.split("\n", 1)[0] or None - def is_kivy_running(): - if "kivy" in sys.modules: - from kivy.app import App - return App.get_running_app() is not None - return False - if is_kivy_running(): from kvui import MessageBox MessageBox(title, text, error).open() @@ -824,11 +859,10 @@ def async_start(co: Coroutine[None, None, typing.Any], name: Optional[str] = Non task.add_done_callback(_faf_tasks.discard) -def deprecate(message: str): +def deprecate(message: str, add_stacklevels: int = 0): if __debug__: raise Exception(message) - import warnings - warnings.warn(message) + warnings.warn(message, stacklevel=2 + add_stacklevels) class DeprecateDict(dict): @@ -842,10 +876,9 @@ def __init__(self, message: str, error: bool = False) -> None: def __getitem__(self, item: Any) -> Any: if self.should_error: - deprecate(self.log_message) + deprecate(self.log_message, add_stacklevels=1) elif __debug__: - import warnings - warnings.warn(self.log_message) + warnings.warn(self.log_message, stacklevel=2) return super().__getitem__(item) diff --git a/WebHost.py b/WebHost.py index e597de24763d..3790a5f6f4d2 100644 --- a/WebHost.py +++ b/WebHost.py @@ -12,11 +12,12 @@ # in case app gets imported by something like gunicorn import Utils import settings +from Utils import get_file_safe_name if typing.TYPE_CHECKING: from flask import Flask -Utils.local_path.cached_path = os.path.dirname(__file__) or "." # py3.8 is not abs. remove "." when dropping 3.8 +Utils.local_path.cached_path = os.path.dirname(__file__) settings.no_gui = True configpath = os.path.abspath("config.yaml") if not os.path.exists(configpath): # fall back to config.yaml in home @@ -71,7 +72,7 @@ def create_ordered_tutorials_file() -> typing.List[typing.Dict[str, typing.Any]] shutil.rmtree(base_target_path, ignore_errors=True) for game, world in worlds.items(): # copy files from world's docs folder to the generated folder - target_path = os.path.join(base_target_path, game) + target_path = os.path.join(base_target_path, get_file_safe_name(game)) os.makedirs(target_path, exist_ok=True) if world.zip_path: diff --git a/WebHostLib/__init__.py b/WebHostLib/__init__.py index fdf3037fe015..9b2b6736f13c 100644 --- a/WebHostLib/__init__.py +++ b/WebHostLib/__init__.py @@ -9,7 +9,7 @@ from pony.flask import Pony from werkzeug.routing import BaseConverter -from Utils import title_sorted +from Utils import title_sorted, get_file_safe_name UPLOAD_FOLDER = os.path.relpath('uploads') LOGS_FOLDER = os.path.relpath('logs') @@ -20,6 +20,7 @@ app.jinja_env.filters['any'] = any app.jinja_env.filters['all'] = all +app.jinja_env.filters['get_file_safe_name'] = get_file_safe_name app.config["SELFHOST"] = True # application process is in charge of running the websites app.config["GENERATORS"] = 8 # maximum concurrent world gens @@ -84,6 +85,6 @@ def register(): from WebHostLib.customserver import run_server_process # to trigger app routing picking up on it - from . import tracker, upload, landing, check, generate, downloads, api, stats, misc, robots, options + from . import tracker, upload, landing, check, generate, downloads, api, stats, misc, robots, options, session app.register_blueprint(api.api_endpoints) diff --git a/WebHostLib/check.py b/WebHostLib/check.py index 97cb797f7a56..4e0cf1178f4b 100644 --- a/WebHostLib/check.py +++ b/WebHostLib/check.py @@ -105,8 +105,9 @@ def roll_options(options: Dict[str, Union[dict, str]], plando_options=plando_options) else: for i, yaml_data in enumerate(yaml_datas): - rolled_results[f"{filename}/{i + 1}"] = roll_settings(yaml_data, - plando_options=plando_options) + if yaml_data is not None: + rolled_results[f"{filename}/{i + 1}"] = roll_settings(yaml_data, + plando_options=plando_options) except Exception as e: if e.__cause__: results[filename] = f"Failed to generate options in {filename}: {e} - {e.__cause__}" diff --git a/WebHostLib/generate.py b/WebHostLib/generate.py index dbe7dd958910..b19f3d483515 100644 --- a/WebHostLib/generate.py +++ b/WebHostLib/generate.py @@ -81,6 +81,7 @@ def start_generation(options: Dict[str, Union[dict, str]], meta: Dict[str, Any]) elif len(gen_options) > app.config["MAX_ROLL"]: flash(f"Sorry, generating of multiworlds is limited to {app.config['MAX_ROLL']} players. " f"If you have a larger group, please generate it yourself and upload it.") + return redirect(url_for(request.endpoint, **(request.view_args or {}))) elif len(gen_options) >= app.config["JOB_THRESHOLD"]: gen = Generation( options=pickle.dumps({name: vars(options) for name, options in gen_options.items()}), diff --git a/WebHostLib/misc.py b/WebHostLib/misc.py index 4784fcd9da63..6be0e470b3b4 100644 --- a/WebHostLib/misc.py +++ b/WebHostLib/misc.py @@ -5,6 +5,7 @@ import jinja2.exceptions from flask import request, redirect, url_for, render_template, Response, session, abort, send_from_directory from pony.orm import count, commit, db_session +from werkzeug.utils import secure_filename from worlds.AutoWorld import AutoWorldRegister from . import app, cache @@ -17,13 +18,6 @@ def get_world_theme(game_name: str): return 'grass' -@app.before_request -def register_session(): - session.permanent = True # technically 31 days after the last visit - if not session.get("_id", None): - session["_id"] = uuid4() # uniquely identify each session without needing a login - - @app.errorhandler(404) @app.errorhandler(jinja2.exceptions.TemplateNotFound) def page_not_found(err): @@ -69,14 +63,40 @@ def tutorial_landing(): @app.route('/faq//') @cache.cached() -def faq(lang): - return render_template("faq.html", lang=lang) +def faq(lang: str): + import markdown + with open(os.path.join(app.static_folder, "assets", "faq", secure_filename(lang)+".md")) as f: + document = f.read() + return render_template( + "markdown_document.html", + title="Frequently Asked Questions", + html_from_markdown=markdown.markdown( + document, + extensions=["toc", "mdx_breakless_lists"], + extension_configs={ + "toc": {"anchorlink": True} + } + ), + ) @app.route('/glossary//') @cache.cached() -def terms(lang): - return render_template("glossary.html", lang=lang) +def glossary(lang: str): + import markdown + with open(os.path.join(app.static_folder, "assets", "glossary", secure_filename(lang)+".md")) as f: + document = f.read() + return render_template( + "markdown_document.html", + title="Glossary", + html_from_markdown=markdown.markdown( + document, + extensions=["toc", "mdx_breakless_lists"], + extension_configs={ + "toc": {"anchorlink": True} + } + ), + ) @app.route('/seed/') diff --git a/WebHostLib/requirements.txt b/WebHostLib/requirements.txt index c593cd63df7e..b7b14dea1e6f 100644 --- a/WebHostLib/requirements.txt +++ b/WebHostLib/requirements.txt @@ -1,11 +1,11 @@ flask>=3.0.3 -werkzeug>=3.0.4 +werkzeug>=3.0.6 pony>=0.7.19 waitress>=3.0.0 Flask-Caching>=2.3.0 Flask-Compress>=1.15 Flask-Limiter>=3.8.0 -bokeh>=3.1.1; python_version <= '3.8' -bokeh>=3.4.3; python_version == '3.9' -bokeh>=3.5.2; python_version >= '3.10' +bokeh>=3.5.2 markupsafe>=2.1.5 +Markdown>=3.7 +mdx-breakless-lists>=1.0.1 diff --git a/WebHostLib/session.py b/WebHostLib/session.py new file mode 100644 index 000000000000..d5dab7d6e6e6 --- /dev/null +++ b/WebHostLib/session.py @@ -0,0 +1,31 @@ +from uuid import uuid4, UUID + +from flask import session, render_template + +from WebHostLib import app + + +@app.before_request +def register_session(): + session.permanent = True # technically 31 days after the last visit + if not session.get("_id", None): + session["_id"] = uuid4() # uniquely identify each session without needing a login + + +@app.route('/session') +def show_session(): + return render_template( + "session.html", + ) + + +@app.route('/session/') +def set_session(_id: str): + new_id: UUID = UUID(_id, version=4) + old_id: UUID = session["_id"] + if old_id != new_id: + session["_id"] = new_id + return render_template( + "session.html", + old_id=old_id, + ) diff --git a/WebHostLib/static/assets/faq.js b/WebHostLib/static/assets/faq.js deleted file mode 100644 index 1bf5e5a65995..000000000000 --- a/WebHostLib/static/assets/faq.js +++ /dev/null @@ -1,51 +0,0 @@ -window.addEventListener('load', () => { - const tutorialWrapper = document.getElementById('faq-wrapper'); - new Promise((resolve, reject) => { - const ajax = new XMLHttpRequest(); - ajax.onreadystatechange = () => { - if (ajax.readyState !== 4) { return; } - if (ajax.status === 404) { - reject("Sorry, the tutorial is not available in that language yet."); - return; - } - if (ajax.status !== 200) { - reject("Something went wrong while loading the tutorial."); - return; - } - resolve(ajax.responseText); - }; - ajax.open('GET', `${window.location.origin}/static/assets/faq/` + - `faq_${tutorialWrapper.getAttribute('data-lang')}.md`, true); - ajax.send(); - }).then((results) => { - // Populate page with HTML generated from markdown - showdown.setOption('tables', true); - showdown.setOption('strikethrough', true); - showdown.setOption('literalMidWordUnderscores', true); - tutorialWrapper.innerHTML += (new showdown.Converter()).makeHtml(results); - adjustHeaderWidth(); - - // Reset the id of all header divs to something nicer - for (const header of document.querySelectorAll('h1, h2, h3, h4, h5, h6')) { - const headerId = header.innerText.replace(/\s+/g, '-').toLowerCase(); - header.setAttribute('id', headerId); - header.addEventListener('click', () => { - window.location.hash = `#${headerId}`; - header.scrollIntoView(); - }); - } - - // Manually scroll the user to the appropriate header if anchor navigation is used - document.fonts.ready.finally(() => { - if (window.location.hash) { - const scrollTarget = document.getElementById(window.location.hash.substring(1)); - scrollTarget?.scrollIntoView(); - } - }); - }).catch((error) => { - console.error(error); - tutorialWrapper.innerHTML = - `

This page is out of logic!

-

Click here to return to safety.

`; - }); -}); diff --git a/WebHostLib/static/assets/faq/faq_en.md b/WebHostLib/static/assets/faq/en.md similarity index 100% rename from WebHostLib/static/assets/faq/faq_en.md rename to WebHostLib/static/assets/faq/en.md diff --git a/WebHostLib/static/assets/glossary.js b/WebHostLib/static/assets/glossary.js deleted file mode 100644 index 04a292008655..000000000000 --- a/WebHostLib/static/assets/glossary.js +++ /dev/null @@ -1,51 +0,0 @@ -window.addEventListener('load', () => { - const tutorialWrapper = document.getElementById('glossary-wrapper'); - new Promise((resolve, reject) => { - const ajax = new XMLHttpRequest(); - ajax.onreadystatechange = () => { - if (ajax.readyState !== 4) { return; } - if (ajax.status === 404) { - reject("Sorry, the glossary page is not available in that language yet."); - return; - } - if (ajax.status !== 200) { - reject("Something went wrong while loading the glossary."); - return; - } - resolve(ajax.responseText); - }; - ajax.open('GET', `${window.location.origin}/static/assets/faq/` + - `glossary_${tutorialWrapper.getAttribute('data-lang')}.md`, true); - ajax.send(); - }).then((results) => { - // Populate page with HTML generated from markdown - showdown.setOption('tables', true); - showdown.setOption('strikethrough', true); - showdown.setOption('literalMidWordUnderscores', true); - tutorialWrapper.innerHTML += (new showdown.Converter()).makeHtml(results); - adjustHeaderWidth(); - - // Reset the id of all header divs to something nicer - for (const header of document.querySelectorAll('h1, h2, h3, h4, h5, h6')) { - const headerId = header.innerText.replace(/\s+/g, '-').toLowerCase(); - header.setAttribute('id', headerId); - header.addEventListener('click', () => { - window.location.hash = `#${headerId}`; - header.scrollIntoView(); - }); - } - - // Manually scroll the user to the appropriate header if anchor navigation is used - document.fonts.ready.finally(() => { - if (window.location.hash) { - const scrollTarget = document.getElementById(window.location.hash.substring(1)); - scrollTarget?.scrollIntoView(); - } - }); - }).catch((error) => { - console.error(error); - tutorialWrapper.innerHTML = - `

This page is out of logic!

-

Click here to return to safety.

`; - }); -}); diff --git a/WebHostLib/static/assets/faq/glossary_en.md b/WebHostLib/static/assets/glossary/en.md similarity index 100% rename from WebHostLib/static/assets/faq/glossary_en.md rename to WebHostLib/static/assets/glossary/en.md diff --git a/WebHostLib/static/assets/playerOptions.js b/WebHostLib/static/assets/playerOptions.js index d0f2e388c2a6..fbf96a3a71c2 100644 --- a/WebHostLib/static/assets/playerOptions.js +++ b/WebHostLib/static/assets/playerOptions.js @@ -288,6 +288,11 @@ const applyPresets = (presetName) => { } }); namedRangeSelect.value = trueValue; + // It is also possible for a preset to use an unnamed value. If this happens, set the dropdown to "Custom" + if (namedRangeSelect.selectedIndex == -1) + { + namedRangeSelect.value = "custom"; + } } // Handle options whose presets are "random" diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-atlas.png b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-atlas.png new file mode 100644 index 000000000000..537e27979180 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-atlas.png differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-atlas.webp b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-atlas.webp new file mode 100644 index 000000000000..f34cd5ff2ec1 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-atlas.webp differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom-left-corner.png b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom-left-corner.png index 326670b7ebc4..a0b41b0f8cac 100644 Binary files a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom-left-corner.png and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom-left-corner.png differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom-left-corner.webp b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom-left-corner.webp new file mode 100644 index 000000000000..4a5f2d75a0d4 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom-left-corner.webp differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom-right-corner.png b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom-right-corner.png index c8297d34578c..6e1608d82b7f 100644 Binary files a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom-right-corner.png and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom-right-corner.png differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom-right-corner.webp b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom-right-corner.webp new file mode 100644 index 000000000000..30bd2d047a76 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom-right-corner.webp differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom.png b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom.png index 2a28958e0931..3d3e089ef79f 100644 Binary files a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom.png and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom.png differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom.webp b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom.webp new file mode 100644 index 000000000000..f575ac5d9d48 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-bottom.webp differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-left.png b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-left.png index 9bc84ff603ec..08730d98489c 100644 Binary files a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-left.png and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-left.png differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-left.webp b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-left.webp new file mode 100644 index 000000000000..f9227e8f2286 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-left.webp differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-right.png b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-right.png index a1e9c7c8b6f5..0bc82fa70e9b 100644 Binary files a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-right.png and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-right.png differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-right.webp b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-right.webp new file mode 100644 index 000000000000..3c0a57740263 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-right.webp differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top-left-corner.png b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top-left-corner.png index a40bca60f080..05e675d6a97c 100644 Binary files a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top-left-corner.png and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top-left-corner.png differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top-left-corner.webp b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top-left-corner.webp new file mode 100644 index 000000000000..4283cd42b16a Binary files /dev/null and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top-left-corner.webp differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top-right-corner.png b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top-right-corner.png index b8a8c6a7265e..e0683a74bba5 100644 Binary files a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top-right-corner.png and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top-right-corner.png differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top-right-corner.webp b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top-right-corner.webp new file mode 100644 index 000000000000..3075cec96add Binary files /dev/null and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top-right-corner.webp differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top.png b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top.png index bb6ccec3d583..cded7ad108d3 100644 Binary files a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top.png and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top.png differ diff --git a/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top.webp b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top.webp new file mode 100644 index 000000000000..781b8e4df0d0 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/cliffs/grass/cliff-top.webp differ diff --git a/WebHostLib/static/static/backgrounds/clouds/cloud-0001.png b/WebHostLib/static/static/backgrounds/clouds/cloud-0001.png index dba338f58552..1015819bc8f6 100644 Binary files a/WebHostLib/static/static/backgrounds/clouds/cloud-0001.png and b/WebHostLib/static/static/backgrounds/clouds/cloud-0001.png differ diff --git a/WebHostLib/static/static/backgrounds/clouds/cloud-0001.webp b/WebHostLib/static/static/backgrounds/clouds/cloud-0001.webp new file mode 100644 index 000000000000..73e249f6e530 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/clouds/cloud-0001.webp differ diff --git a/WebHostLib/static/static/backgrounds/clouds/cloud-0002.png b/WebHostLib/static/static/backgrounds/clouds/cloud-0002.png index 33f09b19ce86..7b479bfe7b0b 100644 Binary files a/WebHostLib/static/static/backgrounds/clouds/cloud-0002.png and b/WebHostLib/static/static/backgrounds/clouds/cloud-0002.png differ diff --git a/WebHostLib/static/static/backgrounds/clouds/cloud-0002.webp b/WebHostLib/static/static/backgrounds/clouds/cloud-0002.webp new file mode 100644 index 000000000000..e4ac19bef687 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/clouds/cloud-0002.webp differ diff --git a/WebHostLib/static/static/backgrounds/clouds/cloud-0003.png b/WebHostLib/static/static/backgrounds/clouds/cloud-0003.png index f665015b0d01..59844e31ac42 100644 Binary files a/WebHostLib/static/static/backgrounds/clouds/cloud-0003.png and b/WebHostLib/static/static/backgrounds/clouds/cloud-0003.png differ diff --git a/WebHostLib/static/static/backgrounds/clouds/cloud-0003.webp b/WebHostLib/static/static/backgrounds/clouds/cloud-0003.webp new file mode 100644 index 000000000000..36abe6e552a3 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/clouds/cloud-0003.webp differ diff --git a/WebHostLib/static/static/backgrounds/dirt.png b/WebHostLib/static/static/backgrounds/dirt.png index 4ac930edc698..db6bc34635e3 100644 Binary files a/WebHostLib/static/static/backgrounds/dirt.png and b/WebHostLib/static/static/backgrounds/dirt.png differ diff --git a/WebHostLib/static/static/backgrounds/dirt.webp b/WebHostLib/static/static/backgrounds/dirt.webp new file mode 100644 index 000000000000..5a8635506f9f Binary files /dev/null and b/WebHostLib/static/static/backgrounds/dirt.webp differ diff --git a/WebHostLib/static/static/backgrounds/footer/footer-0001.png b/WebHostLib/static/static/backgrounds/footer/footer-0001.png index b863a3d42952..6752ab4e3279 100644 Binary files a/WebHostLib/static/static/backgrounds/footer/footer-0001.png and b/WebHostLib/static/static/backgrounds/footer/footer-0001.png differ diff --git a/WebHostLib/static/static/backgrounds/footer/footer-0001.webp b/WebHostLib/static/static/backgrounds/footer/footer-0001.webp new file mode 100644 index 000000000000..fb278c3b1643 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/footer/footer-0001.webp differ diff --git a/WebHostLib/static/static/backgrounds/footer/footer-0002.png b/WebHostLib/static/static/backgrounds/footer/footer-0002.png index 90fdfe95d015..3bacab4134e2 100644 Binary files a/WebHostLib/static/static/backgrounds/footer/footer-0002.png and b/WebHostLib/static/static/backgrounds/footer/footer-0002.png differ diff --git a/WebHostLib/static/static/backgrounds/footer/footer-0002.webp b/WebHostLib/static/static/backgrounds/footer/footer-0002.webp new file mode 100644 index 000000000000..9b8e457c52a9 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/footer/footer-0002.webp differ diff --git a/WebHostLib/static/static/backgrounds/footer/footer-0003.png b/WebHostLib/static/static/backgrounds/footer/footer-0003.png index 5fc31d1ee970..f8223e690171 100644 Binary files a/WebHostLib/static/static/backgrounds/footer/footer-0003.png and b/WebHostLib/static/static/backgrounds/footer/footer-0003.png differ diff --git a/WebHostLib/static/static/backgrounds/footer/footer-0003.webp b/WebHostLib/static/static/backgrounds/footer/footer-0003.webp new file mode 100644 index 000000000000..c2ded77536d6 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/footer/footer-0003.webp differ diff --git a/WebHostLib/static/static/backgrounds/footer/footer-0004.png b/WebHostLib/static/static/backgrounds/footer/footer-0004.png index 4a95ce9a3aaf..d4476e53f759 100644 Binary files a/WebHostLib/static/static/backgrounds/footer/footer-0004.png and b/WebHostLib/static/static/backgrounds/footer/footer-0004.png differ diff --git a/WebHostLib/static/static/backgrounds/footer/footer-0004.webp b/WebHostLib/static/static/backgrounds/footer/footer-0004.webp new file mode 100644 index 000000000000..a2100817461a Binary files /dev/null and b/WebHostLib/static/static/backgrounds/footer/footer-0004.webp differ diff --git a/WebHostLib/static/static/backgrounds/footer/footer-0005.png b/WebHostLib/static/static/backgrounds/footer/footer-0005.png index 7b7cd502f36c..794615962454 100644 Binary files a/WebHostLib/static/static/backgrounds/footer/footer-0005.png and b/WebHostLib/static/static/backgrounds/footer/footer-0005.png differ diff --git a/WebHostLib/static/static/backgrounds/footer/footer-0005.webp b/WebHostLib/static/static/backgrounds/footer/footer-0005.webp new file mode 100644 index 000000000000..c0ee5205ca22 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/footer/footer-0005.webp differ diff --git a/WebHostLib/static/static/backgrounds/grass-flowers.png b/WebHostLib/static/static/backgrounds/grass-flowers.png index 464fdbe58155..ea39c5419004 100644 Binary files a/WebHostLib/static/static/backgrounds/grass-flowers.png and b/WebHostLib/static/static/backgrounds/grass-flowers.png differ diff --git a/WebHostLib/static/static/backgrounds/grass-flowers.webp b/WebHostLib/static/static/backgrounds/grass-flowers.webp new file mode 100644 index 000000000000..1b8ebd7706ad Binary files /dev/null and b/WebHostLib/static/static/backgrounds/grass-flowers.webp differ diff --git a/WebHostLib/static/static/backgrounds/grass.png b/WebHostLib/static/static/backgrounds/grass.png index b88c33dec44b..6a99c4d94310 100644 Binary files a/WebHostLib/static/static/backgrounds/grass.png and b/WebHostLib/static/static/backgrounds/grass.png differ diff --git a/WebHostLib/static/static/backgrounds/grass.webp b/WebHostLib/static/static/backgrounds/grass.webp new file mode 100644 index 000000000000..212ab377a624 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/grass.webp differ diff --git a/WebHostLib/static/static/backgrounds/header/dirt-header.png b/WebHostLib/static/static/backgrounds/header/dirt-header.png index 7c9e298e228b..8a9c0963e72f 100644 Binary files a/WebHostLib/static/static/backgrounds/header/dirt-header.png and b/WebHostLib/static/static/backgrounds/header/dirt-header.png differ diff --git a/WebHostLib/static/static/backgrounds/header/dirt-header.webp b/WebHostLib/static/static/backgrounds/header/dirt-header.webp new file mode 100644 index 000000000000..6c2b0bd8bf9b Binary files /dev/null and b/WebHostLib/static/static/backgrounds/header/dirt-header.webp differ diff --git a/WebHostLib/static/static/backgrounds/header/grass-header.png b/WebHostLib/static/static/backgrounds/header/grass-header.png index c2acc588071c..6d620e5033a2 100644 Binary files a/WebHostLib/static/static/backgrounds/header/grass-header.png and b/WebHostLib/static/static/backgrounds/header/grass-header.png differ diff --git a/WebHostLib/static/static/backgrounds/header/grass-header.webp b/WebHostLib/static/static/backgrounds/header/grass-header.webp new file mode 100644 index 000000000000..ca5d1e23bc2b Binary files /dev/null and b/WebHostLib/static/static/backgrounds/header/grass-header.webp differ diff --git a/WebHostLib/static/static/backgrounds/header/ocean-header.png b/WebHostLib/static/static/backgrounds/header/ocean-header.png index a0ff51f924f8..1e1c18e93c65 100644 Binary files a/WebHostLib/static/static/backgrounds/header/ocean-header.png and b/WebHostLib/static/static/backgrounds/header/ocean-header.png differ diff --git a/WebHostLib/static/static/backgrounds/header/ocean-header.webp b/WebHostLib/static/static/backgrounds/header/ocean-header.webp new file mode 100644 index 000000000000..fc1803ca0e4b Binary files /dev/null and b/WebHostLib/static/static/backgrounds/header/ocean-header.webp differ diff --git a/WebHostLib/static/static/backgrounds/header/party-time-header.png b/WebHostLib/static/static/backgrounds/header/party-time-header.png index 799f32f2282e..601ad829f1fa 100644 Binary files a/WebHostLib/static/static/backgrounds/header/party-time-header.png and b/WebHostLib/static/static/backgrounds/header/party-time-header.png differ diff --git a/WebHostLib/static/static/backgrounds/header/party-time-header.webp b/WebHostLib/static/static/backgrounds/header/party-time-header.webp new file mode 100644 index 000000000000..0b3c70871ada Binary files /dev/null and b/WebHostLib/static/static/backgrounds/header/party-time-header.webp differ diff --git a/WebHostLib/static/static/backgrounds/header/stone-header.png b/WebHostLib/static/static/backgrounds/header/stone-header.png index e0c9787e5735..f0d2f2fee56e 100644 Binary files a/WebHostLib/static/static/backgrounds/header/stone-header.png and b/WebHostLib/static/static/backgrounds/header/stone-header.png differ diff --git a/WebHostLib/static/static/backgrounds/header/stone-header.webp b/WebHostLib/static/static/backgrounds/header/stone-header.webp new file mode 100644 index 000000000000..9f26d1a505d4 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/header/stone-header.webp differ diff --git a/WebHostLib/static/static/backgrounds/ice.png b/WebHostLib/static/static/backgrounds/ice.png index fcf7299b3582..c64f1b20f3b0 100644 Binary files a/WebHostLib/static/static/backgrounds/ice.png and b/WebHostLib/static/static/backgrounds/ice.png differ diff --git a/WebHostLib/static/static/backgrounds/ice.webp b/WebHostLib/static/static/backgrounds/ice.webp new file mode 100644 index 000000000000..a129d5f439c6 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/ice.webp differ diff --git a/WebHostLib/static/static/backgrounds/jungle.png b/WebHostLib/static/static/backgrounds/jungle.png index e27d7e992086..c4ec5b964847 100644 Binary files a/WebHostLib/static/static/backgrounds/jungle.png and b/WebHostLib/static/static/backgrounds/jungle.png differ diff --git a/WebHostLib/static/static/backgrounds/jungle.webp b/WebHostLib/static/static/backgrounds/jungle.webp new file mode 100644 index 000000000000..d21edc8e55f2 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/jungle.webp differ diff --git a/WebHostLib/static/static/backgrounds/ocean.png b/WebHostLib/static/static/backgrounds/ocean.png index 5c22c0b92aa1..d6c9d285c963 100644 Binary files a/WebHostLib/static/static/backgrounds/ocean.png and b/WebHostLib/static/static/backgrounds/ocean.png differ diff --git a/WebHostLib/static/static/backgrounds/ocean.webp b/WebHostLib/static/static/backgrounds/ocean.webp new file mode 100644 index 000000000000..a50b7b27f743 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/ocean.webp differ diff --git a/WebHostLib/static/static/backgrounds/party-time.png b/WebHostLib/static/static/backgrounds/party-time.png index ad00851ba4dc..3fcea8a46eef 100644 Binary files a/WebHostLib/static/static/backgrounds/party-time.png and b/WebHostLib/static/static/backgrounds/party-time.png differ diff --git a/WebHostLib/static/static/backgrounds/party-time.webp b/WebHostLib/static/static/backgrounds/party-time.webp new file mode 100644 index 000000000000..7cd547329a40 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/party-time.webp differ diff --git a/WebHostLib/static/static/backgrounds/stone.png b/WebHostLib/static/static/backgrounds/stone.png index 9e15a34375e4..2956beaaa80b 100644 Binary files a/WebHostLib/static/static/backgrounds/stone.png and b/WebHostLib/static/static/backgrounds/stone.png differ diff --git a/WebHostLib/static/static/backgrounds/stone.webp b/WebHostLib/static/static/backgrounds/stone.webp new file mode 100644 index 000000000000..96303c816227 Binary files /dev/null and b/WebHostLib/static/static/backgrounds/stone.webp differ diff --git a/WebHostLib/static/static/branding/header-logo-full.svg b/WebHostLib/static/static/branding/header-logo-full.svg new file mode 100644 index 000000000000..3e22500905f3 --- /dev/null +++ b/WebHostLib/static/static/branding/header-logo-full.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WebHostLib/static/static/branding/header-logo.png b/WebHostLib/static/static/branding/header-logo.png index e5d7f9b4a0c0..5a3dbe7dafc5 100644 Binary files a/WebHostLib/static/static/branding/header-logo.png and b/WebHostLib/static/static/branding/header-logo.png differ diff --git a/WebHostLib/static/static/branding/header-logo.svg b/WebHostLib/static/static/branding/header-logo.svg index 3e22500905f3..ceedba43385a 100644 --- a/WebHostLib/static/static/branding/header-logo.svg +++ b/WebHostLib/static/static/branding/header-logo.svg @@ -1,66 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/WebHostLib/static/static/branding/header-logo.webp b/WebHostLib/static/static/branding/header-logo.webp new file mode 100644 index 000000000000..c8088e826266 Binary files /dev/null and b/WebHostLib/static/static/branding/header-logo.webp differ diff --git a/WebHostLib/static/static/branding/landing-logo.png b/WebHostLib/static/static/branding/landing-logo.png index 1f2b967a9844..d4845a475daa 100644 Binary files a/WebHostLib/static/static/branding/landing-logo.png and b/WebHostLib/static/static/branding/landing-logo.png differ diff --git a/WebHostLib/static/static/branding/landing-logo.webp b/WebHostLib/static/static/branding/landing-logo.webp new file mode 100644 index 000000000000..7bd4673e99e0 Binary files /dev/null and b/WebHostLib/static/static/branding/landing-logo.webp differ diff --git a/WebHostLib/static/static/button-images/hamburger-menu-icon.png b/WebHostLib/static/static/button-images/hamburger-menu-icon.png index f1c96316358d..c834501453ab 100644 Binary files a/WebHostLib/static/static/button-images/hamburger-menu-icon.png and b/WebHostLib/static/static/button-images/hamburger-menu-icon.png differ diff --git a/WebHostLib/static/static/button-images/hamburger-menu-icon.webp b/WebHostLib/static/static/button-images/hamburger-menu-icon.webp new file mode 100644 index 000000000000..970754d7bfc8 Binary files /dev/null and b/WebHostLib/static/static/button-images/hamburger-menu-icon.webp differ diff --git a/WebHostLib/static/static/button-images/island-button-a.png b/WebHostLib/static/static/button-images/island-button-a.png index f3872dfd6cdf..552e4d8f6d34 100644 Binary files a/WebHostLib/static/static/button-images/island-button-a.png and b/WebHostLib/static/static/button-images/island-button-a.png differ diff --git a/WebHostLib/static/static/button-images/island-button-a.webp b/WebHostLib/static/static/button-images/island-button-a.webp new file mode 100644 index 000000000000..6da0c1720030 Binary files /dev/null and b/WebHostLib/static/static/button-images/island-button-a.webp differ diff --git a/WebHostLib/static/static/button-images/island-button-b.png b/WebHostLib/static/static/button-images/island-button-b.png index 65008eaf59ef..fd4a256c7c9f 100644 Binary files a/WebHostLib/static/static/button-images/island-button-b.png and b/WebHostLib/static/static/button-images/island-button-b.png differ diff --git a/WebHostLib/static/static/button-images/island-button-b.webp b/WebHostLib/static/static/button-images/island-button-b.webp new file mode 100644 index 000000000000..6b7c3a279ed0 Binary files /dev/null and b/WebHostLib/static/static/button-images/island-button-b.webp differ diff --git a/WebHostLib/static/static/button-images/island-button-c.png b/WebHostLib/static/static/button-images/island-button-c.png index 9e5f9f50d2be..2f10f45828c4 100644 Binary files a/WebHostLib/static/static/button-images/island-button-c.png and b/WebHostLib/static/static/button-images/island-button-c.png differ diff --git a/WebHostLib/static/static/button-images/island-button-c.webp b/WebHostLib/static/static/button-images/island-button-c.webp new file mode 100644 index 000000000000..83ce413da807 Binary files /dev/null and b/WebHostLib/static/static/button-images/island-button-c.webp differ diff --git a/WebHostLib/static/static/button-images/popover.png b/WebHostLib/static/static/button-images/popover.png index cbc863410489..e3247194b06b 100644 Binary files a/WebHostLib/static/static/button-images/popover.png and b/WebHostLib/static/static/button-images/popover.png differ diff --git a/WebHostLib/static/static/button-images/popover.webp b/WebHostLib/static/static/button-images/popover.webp new file mode 100644 index 000000000000..cd1c006221b0 Binary files /dev/null and b/WebHostLib/static/static/button-images/popover.webp differ diff --git a/WebHostLib/static/static/decorations/island-a.png b/WebHostLib/static/static/decorations/island-a.png index d931aed0bdc7..4f5d7c264198 100644 Binary files a/WebHostLib/static/static/decorations/island-a.png and b/WebHostLib/static/static/decorations/island-a.png differ diff --git a/WebHostLib/static/static/decorations/island-a.webp b/WebHostLib/static/static/decorations/island-a.webp new file mode 100644 index 000000000000..32c9cc8f6bd6 Binary files /dev/null and b/WebHostLib/static/static/decorations/island-a.webp differ diff --git a/WebHostLib/static/static/decorations/island-b.png b/WebHostLib/static/static/decorations/island-b.png index d6902281922c..cceb79af33b0 100644 Binary files a/WebHostLib/static/static/decorations/island-b.png and b/WebHostLib/static/static/decorations/island-b.png differ diff --git a/WebHostLib/static/static/decorations/island-b.webp b/WebHostLib/static/static/decorations/island-b.webp new file mode 100644 index 000000000000..3ec6aae438ba Binary files /dev/null and b/WebHostLib/static/static/decorations/island-b.webp differ diff --git a/WebHostLib/static/static/decorations/island-c.png b/WebHostLib/static/static/decorations/island-c.png index 790c7b01d53c..2beedce19d26 100644 Binary files a/WebHostLib/static/static/decorations/island-c.png and b/WebHostLib/static/static/decorations/island-c.png differ diff --git a/WebHostLib/static/static/decorations/island-c.webp b/WebHostLib/static/static/decorations/island-c.webp new file mode 100644 index 000000000000..98e1add91ee3 Binary files /dev/null and b/WebHostLib/static/static/decorations/island-c.webp differ diff --git a/WebHostLib/static/static/decorations/rock-in-water.png b/WebHostLib/static/static/decorations/rock-in-water.png index 25c62acd24fb..1320bef7cee1 100644 Binary files a/WebHostLib/static/static/decorations/rock-in-water.png and b/WebHostLib/static/static/decorations/rock-in-water.png differ diff --git a/WebHostLib/static/static/decorations/rock-in-water.webp b/WebHostLib/static/static/decorations/rock-in-water.webp new file mode 100644 index 000000000000..2c8af460d5e2 Binary files /dev/null and b/WebHostLib/static/static/decorations/rock-in-water.webp differ diff --git a/WebHostLib/static/static/decorations/rock-single.png b/WebHostLib/static/static/decorations/rock-single.png index cc237d132ef4..c003abe0d173 100644 Binary files a/WebHostLib/static/static/decorations/rock-single.png and b/WebHostLib/static/static/decorations/rock-single.png differ diff --git a/WebHostLib/static/static/decorations/rock-single.webp b/WebHostLib/static/static/decorations/rock-single.webp new file mode 100644 index 000000000000..e53a2fb5c480 Binary files /dev/null and b/WebHostLib/static/static/decorations/rock-single.webp differ diff --git a/WebHostLib/static/styles/markdown.css b/WebHostLib/static/styles/markdown.css index e0165b7489ef..5ead2c60f791 100644 --- a/WebHostLib/static/styles/markdown.css +++ b/WebHostLib/static/styles/markdown.css @@ -28,7 +28,7 @@ font-weight: normal; font-family: LondrinaSolid-Regular, sans-serif; text-transform: uppercase; - cursor: pointer; + cursor: pointer; /* TODO: remove once we drop showdown.js */ width: 100%; text-shadow: 1px 1px 4px #000000; } @@ -37,7 +37,7 @@ font-size: 38px; font-weight: normal; font-family: LondrinaSolid-Light, sans-serif; - cursor: pointer; + cursor: pointer; /* TODO: remove once we drop showdown.js */ width: 100%; margin-top: 20px; margin-bottom: 0.5rem; @@ -50,7 +50,7 @@ font-family: LexendDeca-Regular, sans-serif; text-transform: none; text-align: left; - cursor: pointer; + cursor: pointer; /* TODO: remove once we drop showdown.js */ width: 100%; margin-bottom: 0.5rem; } @@ -59,7 +59,7 @@ font-family: LexendDeca-Regular, sans-serif; text-transform: none; font-size: 24px; - cursor: pointer; + cursor: pointer; /* TODO: remove once we drop showdown.js */ margin-bottom: 24px; } @@ -67,20 +67,29 @@ font-family: LexendDeca-Regular, sans-serif; text-transform: none; font-size: 22px; - cursor: pointer; + cursor: pointer; /* TODO: remove once we drop showdown.js */ } .markdown h6, .markdown details summary.h6{ font-family: LexendDeca-Regular, sans-serif; text-transform: none; font-size: 20px; - cursor: pointer;; + cursor: pointer; /* TODO: remove once we drop showdown.js */ } .markdown h4, .markdown h5, .markdown h6{ margin-bottom: 0.5rem; } +.markdown h1 > a, +.markdown h2 > a, +.markdown h3 > a, +.markdown h4 > a, +.markdown h5 > a, +.markdown h6 > a { + color: inherit; +} + .markdown ul{ margin-top: 0.5rem; margin-bottom: 0.5rem; diff --git a/WebHostLib/templates/faq.html b/WebHostLib/templates/faq.html deleted file mode 100644 index 76bdb96d2ef8..000000000000 --- a/WebHostLib/templates/faq.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends 'pageWrapper.html' %} - -{% block head %} - {% include 'header/grassHeader.html' %} - Frequently Asked Questions - - - -{% endblock %} - -{% block body %} -
- -
-{% endblock %} diff --git a/WebHostLib/templates/gameInfo.html b/WebHostLib/templates/gameInfo.html index c5ebba82848d..3b908004b1be 100644 --- a/WebHostLib/templates/gameInfo.html +++ b/WebHostLib/templates/gameInfo.html @@ -11,7 +11,7 @@ {% block body %} {% include 'header/'+theme+'Header.html' %} -
+
{% endblock %} diff --git a/WebHostLib/templates/genericTracker.html b/WebHostLib/templates/genericTracker.html index 947cf2837278..b92097ceea08 100644 --- a/WebHostLib/templates/genericTracker.html +++ b/WebHostLib/templates/genericTracker.html @@ -98,6 +98,8 @@ {% if hint.finding_player == player %} {{ player_names_with_alias[(team, hint.finding_player)] }} + {% elif get_slot_info(team, hint.finding_player).type == 2 %} + {{ player_names_with_alias[(team, hint.finding_player)] }} {% else %} {{ player_names_with_alias[(team, hint.finding_player)] }} @@ -107,6 +109,8 @@ {% if hint.receiving_player == player %} {{ player_names_with_alias[(team, hint.receiving_player)] }} + {% elif get_slot_info(team, hint.receiving_player).type == 2 %} + {{ player_names_with_alias[(team, hint.receiving_player)] }} {% else %} {{ player_names_with_alias[(team, hint.receiving_player)] }} diff --git a/WebHostLib/templates/glossary.html b/WebHostLib/templates/glossary.html deleted file mode 100644 index 921f678157fc..000000000000 --- a/WebHostLib/templates/glossary.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends 'pageWrapper.html' %} - -{% block head %} - {% include 'header/grassHeader.html' %} - Glossary - - - -{% endblock %} - -{% block body %} -
- -
-{% endblock %} diff --git a/WebHostLib/templates/markdown_document.html b/WebHostLib/templates/markdown_document.html new file mode 100644 index 000000000000..07b3c8354d0d --- /dev/null +++ b/WebHostLib/templates/markdown_document.html @@ -0,0 +1,13 @@ +{% extends 'pageWrapper.html' %} + +{% block head %} + {% include 'header/grassHeader.html' %} + {{ title }} + +{% endblock %} + +{% block body %} +
+ {{ html_from_markdown | safe}} +
+{% endblock %} diff --git a/WebHostLib/templates/multitrackerHintTable.html b/WebHostLib/templates/multitrackerHintTable.html index a931e9b04845..fcc15fb37a9f 100644 --- a/WebHostLib/templates/multitrackerHintTable.html +++ b/WebHostLib/templates/multitrackerHintTable.html @@ -21,8 +21,20 @@ ) -%} - {{ player_names_with_alias[(team, hint.finding_player)] }} - {{ player_names_with_alias[(team, hint.receiving_player)] }} + + {% if get_slot_info(team, hint.finding_player).type == 2 %} + {{ player_names_with_alias[(team, hint.finding_player)] }} + {% else %} + {{ player_names_with_alias[(team, hint.finding_player)] }} + {% endif %} + + + {% if get_slot_info(team, hint.receiving_player).type == 2 %} + {{ player_names_with_alias[(team, hint.receiving_player)] }} + {% else %} + {{ player_names_with_alias[(team, hint.receiving_player)] }} + {% endif %} + {{ item_id_to_name[games[(team, hint.receiving_player)]][hint.item] }} {{ location_id_to_name[games[(team, hint.finding_player)]][hint.location] }} {{ games[(team, hint.finding_player)] }} diff --git a/WebHostLib/templates/playerOptions/macros.html b/WebHostLib/templates/playerOptions/macros.html index 30a4fc78dff3..64f0f140de95 100644 --- a/WebHostLib/templates/playerOptions/macros.html +++ b/WebHostLib/templates/playerOptions/macros.html @@ -196,13 +196,14 @@ {% macro OptionTitle(option_name, option) %}
User Content Page.
You may also download the - template file for this game. + template file for this game.

diff --git a/WebHostLib/templates/session.html b/WebHostLib/templates/session.html new file mode 100644 index 000000000000..b75474483a8f --- /dev/null +++ b/WebHostLib/templates/session.html @@ -0,0 +1,30 @@ +{% extends 'pageWrapper.html' %} + +{% block head %} + {% include 'header/stoneHeader.html' %} + Session + +{% endblock %} + +{% block body %} +
+ {% if old_id is defined %} +

Your old code was:

+ {{ old_id }} +
+ {% endif %} +

The following code is your unique identifier, it binds your uploaded content, such as rooms and seeds to you. + Treat it like a combined login name and password. + You should save this securely if you ever need to restore access. + You can also paste it into another device to access your content from multiple devices / browsers. + Some browsers, such as Brave, will delete your identifier cookie on a timer.

+ {{ session["_id"] }} +
+

+ The following link can be used to set the identifier. Do not share the code or link with others.
+ + {{ url_for('set_session', _id=session['_id'], _external=True) }} + +

+
+{% endblock %} diff --git a/WebHostLib/templates/siteMap.html b/WebHostLib/templates/siteMap.html index cdd6ad45eb27..b7db8227dc50 100644 --- a/WebHostLib/templates/siteMap.html +++ b/WebHostLib/templates/siteMap.html @@ -26,6 +26,7 @@

Base Pages

  • User Content
  • Game Statistics
  • Glossary
  • +
  • Session / Login
  • Tutorials

    diff --git a/WebHostLib/templates/templates.html b/WebHostLib/templates/templates.html index fb6ea7e9eab5..3b2418ae15b6 100644 --- a/WebHostLib/templates/templates.html +++ b/WebHostLib/templates/templates.html @@ -4,9 +4,6 @@ {% include 'header/grassHeader.html' %} Option Templates (YAML) - {% endblock %} {% block body %} diff --git a/WebHostLib/templates/tutorial.html b/WebHostLib/templates/tutorial.html index d3a7e0a05ecc..4b6622c31336 100644 --- a/WebHostLib/templates/tutorial.html +++ b/WebHostLib/templates/tutorial.html @@ -11,7 +11,7 @@ {% endblock %} {% block body %} -
    +
    {% endblock %} diff --git a/WebHostLib/templates/weightedOptions/macros.html b/WebHostLib/templates/weightedOptions/macros.html index 68d3968a178a..d18d0f0b8957 100644 --- a/WebHostLib/templates/weightedOptions/macros.html +++ b/WebHostLib/templates/weightedOptions/macros.html @@ -53,7 +53,7 @@ {{ RangeRow(option_name, option, option.range_start, option.range_start, True) }} - {% if option.range_start < option.default < option.range_end %} + {% if option.default is number and option.range_start < option.default < option.range_end %} {{ RangeRow(option_name, option, option.default, option.default, True) }} {% endif %} {{ RangeRow(option_name, option, option.range_end, option.range_end, True) }} diff --git a/WebHostLib/tracker.py b/WebHostLib/tracker.py index 75b5fb0202d9..043764a53b08 100644 --- a/WebHostLib/tracker.py +++ b/WebHostLib/tracker.py @@ -5,7 +5,7 @@ from uuid import UUID from email.utils import parsedate_to_datetime -from flask import render_template, make_response, Response, request +from flask import make_response, render_template, request, Request, Response from werkzeug.exceptions import abort from MultiServer import Context, get_saving_second @@ -298,17 +298,25 @@ def get_spheres(self) -> List[List[int]]: return self._multidata.get("spheres", []) -def _process_if_request_valid(incoming_request, room: Optional[Room]) -> Optional[Response]: +def _process_if_request_valid(incoming_request: Request, room: Optional[Room]) -> Optional[Response]: if not room: abort(404) - if_modified = incoming_request.headers.get("If-Modified-Since", None) - if if_modified: - if_modified = parsedate_to_datetime(if_modified) + if_modified_str: Optional[str] = incoming_request.headers.get("If-Modified-Since", None) + if if_modified_str: + if_modified = parsedate_to_datetime(if_modified_str) + if if_modified.tzinfo is None: + abort(400) # standard requires "GMT" timezone + # database may use datetime.utcnow(), which is timezone-naive. convert to timezone-aware. + last_activity = room.last_activity + if last_activity.tzinfo is None: + last_activity = room.last_activity.replace(tzinfo=datetime.timezone.utc) # if_modified has less precision than last_activity, so we bring them to same precision - if if_modified >= room.last_activity.replace(microsecond=0): + if if_modified >= last_activity.replace(microsecond=0): return make_response("", 304) + return None + @app.route("/tracker///") def get_player_tracker(tracker: UUID, tracked_team: int, tracked_player: int, generic: bool = False) -> Response: @@ -415,6 +423,7 @@ def render_generic_tracker(tracker_data: TrackerData, team: int, player: int) -> template_name_or_list="genericTracker.html", game_specific_tracker=game in _player_trackers, room=tracker_data.room, + get_slot_info=tracker_data.get_slot_info, team=team, player=player, player_name=tracker_data.get_room_long_player_names()[team, player], @@ -438,6 +447,7 @@ def render_generic_multiworld_tracker(tracker_data: TrackerData, enabled_tracker enabled_trackers=enabled_trackers, current_tracker="Generic", room=tracker_data.room, + get_slot_info=tracker_data.get_slot_info, all_slots=tracker_data.get_all_slots(), room_players=tracker_data.get_all_players(), locations=tracker_data.get_room_locations(), @@ -489,7 +499,7 @@ def render_Factorio_multiworld_tracker(tracker_data: TrackerData, enabled_tracke (team, player): collections.Counter({ tracker_data.item_id_to_name["Factorio"][item_id]: count for item_id, count in tracker_data.get_player_inventory_counts(team, player).items() - }) for team, players in tracker_data.get_all_slots().items() for player in players + }) for team, players in tracker_data.get_all_players().items() for player in players if tracker_data.get_player_game(team, player) == "Factorio" } @@ -498,6 +508,7 @@ def render_Factorio_multiworld_tracker(tracker_data: TrackerData, enabled_tracke enabled_trackers=enabled_trackers, current_tracker="Factorio", room=tracker_data.room, + get_slot_info=tracker_data.get_slot_info, all_slots=tracker_data.get_all_slots(), room_players=tracker_data.get_all_players(), locations=tracker_data.get_room_locations(), @@ -630,6 +641,7 @@ def render_ALinkToThePast_multiworld_tracker(tracker_data: TrackerData, enabled_ enabled_trackers=enabled_trackers, current_tracker="A Link to the Past", room=tracker_data.room, + get_slot_info=tracker_data.get_slot_info, all_slots=tracker_data.get_all_slots(), room_players=tracker_data.get_all_players(), locations=tracker_data.get_room_locations(), diff --git a/data/client.kv b/data/client.kv index dc8a5c9c9d72..3455f2a23657 100644 --- a/data/client.kv +++ b/data/client.kv @@ -59,7 +59,7 @@ finding_text: "Finding Player" location_text: "Location" entrance_text: "Entrance" - found_text: "Found?" + status_text: "Status" TooltipLabel: id: receiving sort_key: 'receiving' @@ -96,9 +96,9 @@ valign: 'center' pos_hint: {"center_y": 0.5} TooltipLabel: - id: found - sort_key: 'found' - text: root.found_text + id: status + sort_key: 'status' + text: root.status_text halign: 'center' valign: 'center' pos_hint: {"center_y": 0.5} diff --git a/data/options.yaml b/data/options.yaml index ee8866627d52..09bfcdcec1f6 100644 --- a/data/options.yaml +++ b/data/options.yaml @@ -28,9 +28,9 @@ name: Player{number} # Used to describe your yaml. Useful if you have multiple files. -description: Default {{ game }} Template +description: {{ yaml_dump("Default %s Template" % game) }} -game: {{ game }} +game: {{ yaml_dump(game) }} requires: version: {{ __version__ }} # Version of Archipelago required for this yaml to work as expected. @@ -44,7 +44,7 @@ requires: {%- endfor -%} {% endmacro %} -{{ game }}: +{{ yaml_dump(game) }}: {%- for group_name, group_options in option_groups.items() %} # {{ group_name }} diff --git a/docs/CODEOWNERS b/docs/CODEOWNERS index ee7fd7ed863b..64a1362bf380 100644 --- a/docs/CODEOWNERS +++ b/docs/CODEOWNERS @@ -55,19 +55,22 @@ /worlds/dlcquest/ @axe-y @agilbert1412 # DOOM 1993 -/worlds/doom_1993/ @Daivuk +/worlds/doom_1993/ @Daivuk @KScl # DOOM II -/worlds/doom_ii/ @Daivuk +/worlds/doom_ii/ @Daivuk @KScl # Factorio /worlds/factorio/ @Berserker66 +# Faxanadu +/worlds/faxanadu/ @Daivuk + # Final Fantasy Mystic Quest /worlds/ffmq/ @Alchav @wildham0 # Heretic -/worlds/heretic/ @Daivuk +/worlds/heretic/ @Daivuk @KScl # Hollow Knight /worlds/hk/ @BadMagic100 @qwint @@ -143,7 +146,7 @@ /worlds/shivers/ @GodlFire # A Short Hike -/worlds/shorthike/ @chandler05 +/worlds/shorthike/ @chandler05 @BrandenEK # Sonic Adventure 2 Battle /worlds/sa2b/ @PoryGone @RaspberrySpace diff --git a/docs/contributing.md b/docs/contributing.md index 9fd21408eb7b..96fc316be82c 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -16,7 +16,7 @@ game contributions: * **Do not introduce unit test failures/regressions.** Archipelago supports multiple versions of Python. You may need to download older Python versions to fully test your changes. Currently, the oldest supported version - is [Python 3.8](https://www.python.org/downloads/release/python-380/). + is [Python 3.10](https://www.python.org/downloads/release/python-31015/). It is recommended that automated github actions are turned on in your fork to have github run unit tests after pushing. You can turn them on here: diff --git a/docs/network protocol.md b/docs/network protocol.md index 1c4579c4066f..4331cf971007 100644 --- a/docs/network protocol.md +++ b/docs/network protocol.md @@ -268,9 +268,11 @@ Additional arguments added to the [Set](#Set) package that triggered this [SetRe These packets are sent purely from client to server. They are not accepted by clients. * [Connect](#Connect) +* [ConnectUpdate](#ConnectUpdate) * [Sync](#Sync) * [LocationChecks](#LocationChecks) * [LocationScouts](#LocationScouts) +* [UpdateHint](#UpdateHint) * [StatusUpdate](#StatusUpdate) * [Say](#Say) * [GetDataPackage](#GetDataPackage) @@ -341,6 +343,33 @@ This is useful in cases where an item appears in the game world, such as 'ledge | locations | list\[int\] | The ids of the locations seen by the client. May contain any number of locations, even ones sent before; duplicates do not cause issues with the Archipelago server. | | create_as_hint | int | If non-zero, the scouted locations get created and broadcasted as a player-visible hint.
    If 2 only new hints are broadcast, however this does not remove them from the LocationInfo reply. | +### UpdateHint +Sent to the server to update the status of a Hint. The client must be the 'receiving_player' of the Hint, or the update fails. + +### Arguments +| Name | Type | Notes | +| ---- | ---- | ----- | +| player | int | The ID of the player whose location is being hinted for. | +| location | int | The ID of the location to update the hint for. If no hint exists for this location, the packet is ignored. | +| status | [HintStatus](#HintStatus) | Optional. If included, sets the status of the hint to this status. Cannot set `HINT_FOUND`, or change the status from `HINT_FOUND`. | + +#### HintStatus +An enumeration containing the possible hint states. + +```python +import enum +class HintStatus(enum.IntEnum): + HINT_FOUND = 0 # The location has been collected. Status cannot be changed once found. + HINT_UNSPECIFIED = 1 # The receiving player has not specified any status + HINT_NO_PRIORITY = 10 # The receiving player has specified that the item is unneeded + HINT_AVOID = 20 # The receiving player has specified that the item is detrimental + HINT_PRIORITY = 30 # The receiving player has specified that the item is needed +``` +- Hints for items with `ItemClassification.trap` default to `HINT_AVOID`. +- Hints created with `LocationScouts`, `!hint_location`, or similar (hinting a location) default to `HINT_UNSPECIFIED`. +- Hints created with `!hint` or similar (hinting an item for yourself) default to `HINT_PRIORITY`. +- Once a hint is collected, its' status is updated to `HINT_FOUND` automatically, and can no longer be changed. + ### StatusUpdate Sent to the server to update on the sender's status. Examples include readiness or goal completion. (Example: defeated Ganon in A Link to the Past) @@ -643,6 +672,7 @@ class Hint(typing.NamedTuple): found: bool entrance: str = "" item_flags: int = 0 + status: HintStatus = HintStatus.HINT_UNSPECIFIED ``` ### Data Package Contents diff --git a/docs/running from source.md b/docs/running from source.md index a161265fcb74..33d6b3928e54 100644 --- a/docs/running from source.md +++ b/docs/running from source.md @@ -7,7 +7,9 @@ use that version. These steps are for developers or platforms without compiled r ## General What you'll need: - * [Python 3.8.7 or newer](https://www.python.org/downloads/), not the Windows Store version + * [Python 3.10.11 or newer](https://www.python.org/downloads/), not the Windows Store version + * On Windows, please consider only using the latest supported version in production environments since security + updates for older versions are not easily available. * Python 3.12.x is currently the newest supported version * pip: included in downloads from python.org, separate in many Linux distributions * Matching C compiler @@ -85,4 +87,4 @@ PyCharm has a built-in version control integration that supports Git. ## Running tests -Run `pip install pytest pytest-subtests`, then use your IDE to run tests or run `pytest` from the source folder. +Information about running tests can be found in [tests.md](https://github.com/ArchipelagoMW/Archipelago/blob/main/docs/tests.md#running-tests) diff --git a/docs/tests.md b/docs/tests.md index 7a3531f0f84f..c8655ccf3f4d 100644 --- a/docs/tests.md +++ b/docs/tests.md @@ -84,7 +84,19 @@ testing portions of your code that can be tested without relying on a multiworld ## Running Tests -In PyCharm, running all tests can be done by right-clicking the root `test` directory and selecting `run Python tests`. -If you do not have pytest installed, you may get import failures. To solve this, edit the run configuration, and set the -working directory of the run to the Archipelago directory. If you only want to run your world's defined tests, repeat -the steps for the test directory within your world. +#### Using Pycharm + +In PyCharm, running all tests can be done by right-clicking the root test directory and selecting Run 'Archipelago Unittests'. +Unless you configured PyCharm to use pytest as a test runner, you may get import failures. To solve this, edit the run configuration, +and set the working directory to the Archipelago directory which contains all the project files. + +If you only want to run your world's defined tests, repeat the steps for the test directory within your world. +Your working directory should be the directory of your world in the worlds directory and the script should be the +tests folder within your world. + +You can also find the 'Archipelago Unittests' as an option in the dropdown at the top of the window +next to the run and debug buttons. + +#### Running Tests without Pycharm + +Run `pip install pytest pytest-subtests`, then use your IDE to run tests or run `pytest` from the source folder. diff --git a/docs/world api.md b/docs/world api.md index bf09d965f11d..20669d7ae7be 100644 --- a/docs/world api.md +++ b/docs/world api.md @@ -288,8 +288,8 @@ like entrance randomization in logic. Regions have a list called `exits`, containing `Entrance` objects representing transitions to other regions. -There must be one special region, "Menu", from which the logic unfolds. AP assumes that a player will always be able to -return to the "Menu" region by resetting the game ("Save and quit"). +There must be one special region (Called "Menu" by default, but configurable using [origin_region_name](https://github.com/ArchipelagoMW/Archipelago/blob/main/worlds/AutoWorld.py#L295-L296)), +from which the logic unfolds. AP assumes that a player will always be able to return to this starting region by resetting the game ("Save and quit"). ### Entrances @@ -328,6 +328,9 @@ Even doing `state.can_reach_location` or `state.can_reach_entrance` is problemat You can use `multiworld.register_indirect_condition(region, entrance)` to explicitly tell the generator that, when a given region becomes accessible, it is necessary to re-check a specific entrance. You **must** use `multiworld.register_indirect_condition` if you perform this kind of `can_reach` from an entrance access rule, unless you have a **very** good technical understanding of the relevant code and can reason why it will never lead to problems in your case. +Alternatively, you can set [world.explicit_indirect_conditions = False](https://github.com/ArchipelagoMW/Archipelago/blob/main/worlds/AutoWorld.py#L298-L301), +avoiding the need for indirect conditions at the expense of performance. + ### Item Rules An item rule is a function that returns `True` or `False` for a `Location` based on a single item. It can be used to @@ -463,7 +466,7 @@ The world has to provide the following things for generation: * the properties mentioned above * additions to the item pool -* additions to the regions list: at least one called "Menu" +* additions to the regions list: at least one named after the world class's origin_region_name ("Menu" by default) * locations placed inside those regions * a `def create_item(self, item: str) -> MyGameItem` to create any item on demand * applying `self.multiworld.push_precollected` for world-defined start inventory @@ -516,7 +519,7 @@ def generate_early(self) -> None: ```python def create_regions(self) -> None: - # Add regions to the multiworld. "Menu" is the required starting point. + # Add regions to the multiworld. One of them must use the origin_region_name as its name ("Menu" by default). # Arguments to Region() are name, player, multiworld, and optionally hint_text menu_region = Region("Menu", self.player, self.multiworld) self.multiworld.regions.append(menu_region) # or use += [menu_region...] diff --git a/kvui.py b/kvui.py index 74d8ad06734a..d98fc7ed9ab8 100644 --- a/kvui.py +++ b/kvui.py @@ -3,6 +3,8 @@ import sys import typing import re +import io +import pkgutil from collections import deque assert "kivy" not in sys.modules, "kvui should be imported before kivy for frozen compatibility" @@ -12,10 +14,7 @@ # kivy 2.2.0 introduced DPI awareness on Windows, but it makes the UI enter an infinitely recursive re-layout # by setting the application to not DPI Aware, Windows handles scaling the entire window on its own, ignoring kivy's - try: - ctypes.windll.shcore.SetProcessDpiAwareness(0) - except FileNotFoundError: # shcore may not be found on <= Windows 7 - pass # TODO: remove silent except when Python 3.8 is phased out. + ctypes.windll.shcore.SetProcessDpiAwareness(0) os.environ["KIVY_NO_CONSOLELOG"] = "1" os.environ["KIVY_NO_FILELOG"] = "1" @@ -37,6 +36,7 @@ from kivy.core.window import Window from kivy.core.clipboard import Clipboard from kivy.core.text.markup import MarkupLabel +from kivy.core.image import ImageLoader, ImageLoaderBase, ImageData from kivy.base import ExceptionHandler, ExceptionManager from kivy.clock import Clock from kivy.factory import Factory @@ -55,6 +55,7 @@ from kivy.uix.floatlayout import FloatLayout from kivy.uix.label import Label from kivy.uix.progressbar import ProgressBar +from kivy.uix.dropdown import DropDown from kivy.utils import escape_markup from kivy.lang import Builder from kivy.uix.recycleview.views import RecycleDataViewBehavior @@ -63,10 +64,11 @@ from kivy.uix.recycleview.layout import LayoutSelectionBehavior from kivy.animation import Animation from kivy.uix.popup import Popup +from kivy.uix.image import AsyncImage fade_in_animation = Animation(opacity=0, duration=0) + Animation(opacity=1, duration=0.25) -from NetUtils import JSONtoTextParser, JSONMessagePart, SlotType +from NetUtils import JSONtoTextParser, JSONMessagePart, SlotType, HintStatus from Utils import async_start, get_input_text_from_response if typing.TYPE_CHECKING: @@ -303,11 +305,11 @@ def apply_selection(self, rv, index, is_selected): """ Respond to the selection of items in the view. """ self.selected = is_selected - class HintLabel(RecycleDataViewBehavior, BoxLayout): selected = BooleanProperty(False) striped = BooleanProperty(False) index = None + dropdown: DropDown def __init__(self): super(HintLabel, self).__init__() @@ -316,10 +318,32 @@ def __init__(self): self.finding_text = "" self.location_text = "" self.entrance_text = "" - self.found_text = "" + self.status_text = "" + self.hint = {} for child in self.children: child.bind(texture_size=self.set_height) + + ctx = App.get_running_app().ctx + self.dropdown = DropDown() + + def set_value(button): + self.dropdown.select(button.status) + + def select(instance, data): + ctx.update_hint(self.hint["location"], + self.hint["finding_player"], + data) + + for status in (HintStatus.HINT_NO_PRIORITY, HintStatus.HINT_PRIORITY, HintStatus.HINT_AVOID): + name = status_names[status] + status_button = Button(text=name, size_hint_y=None, height=dp(50)) + status_button.status = status + status_button.bind(on_release=set_value) + self.dropdown.add_widget(status_button) + + self.dropdown.bind(on_select=select) + def set_height(self, instance, value): self.height = max([child.texture_size[1] for child in self.children]) @@ -331,7 +355,8 @@ def refresh_view_attrs(self, rv, index, data): self.finding_text = data["finding"]["text"] self.location_text = data["location"]["text"] self.entrance_text = data["entrance"]["text"] - self.found_text = data["found"]["text"] + self.status_text = data["status"]["text"] + self.hint = data["status"]["hint"] self.height = self.minimum_height return super(HintLabel, self).refresh_view_attrs(rv, index, data) @@ -341,13 +366,21 @@ def on_touch_down(self, touch): return True if self.index: # skip header if self.collide_point(*touch.pos): - if self.selected: + status_label = self.ids["status"] + if status_label.collide_point(*touch.pos): + 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 + # open a dropdown + self.dropdown.open(self.ids["status"]) + elif self.selected: self.parent.clear_selection() else: text = "".join((self.receiving_text, "\'s ", self.item_text, " is at ", self.location_text, " in ", self.finding_text, "\'s World", (" at " + self.entrance_text) if self.entrance_text != "Vanilla" - else "", ". (", self.found_text.lower(), ")")) + else "", ". (", self.status_text.lower(), ")")) temp = MarkupLabel(text).markup text = "".join( part for part in temp if not part.startswith(("[color", "[/color]", "[ref=", "[/ref]"))) @@ -361,18 +394,16 @@ def on_touch_down(self, touch): for child in self.children: if child.collide_point(*touch.pos): key = child.sort_key - parent.hint_sorter = lambda element: remove_between_brackets.sub("", element[key]["text"]).lower() + if key == "status": + parent.hint_sorter = lambda element: element["status"]["hint"]["status"] + else: parent.hint_sorter = lambda element: remove_between_brackets.sub("", element[key]["text"]).lower() if key == parent.sort_key: # second click reverses order parent.reversed = not parent.reversed else: parent.sort_key = key parent.reversed = False - break - else: - logging.warning("Did not find clicked header for sorting.") - - App.get_running_app().update_hints() + App.get_running_app().update_hints() def apply_selection(self, rv, index, is_selected): """ Respond to the selection of items in the view. """ @@ -666,7 +697,7 @@ def set_new_energy_link_value(self): self.energy_link_label.text = f"EL: {Utils.format_SI_prefix(self.ctx.current_energy_link_value)}J" def update_hints(self): - hints = self.ctx.stored_data[f"_read_hints_{self.ctx.team}_{self.ctx.slot}"] + hints = self.ctx.stored_data.get(f"_read_hints_{self.ctx.team}_{self.ctx.slot}", []) self.log_panels["Hints"].refresh_hints(hints) # default F1 keybind, opens a settings menu, that seems to break the layout engine once closed @@ -722,6 +753,22 @@ def fix_heights(self): element.height = element.texture_size[1] +status_names: typing.Dict[HintStatus, str] = { + HintStatus.HINT_FOUND: "Found", + HintStatus.HINT_UNSPECIFIED: "Unspecified", + HintStatus.HINT_NO_PRIORITY: "No Priority", + HintStatus.HINT_AVOID: "Avoid", + HintStatus.HINT_PRIORITY: "Priority", +} +status_colors: typing.Dict[HintStatus, str] = { + HintStatus.HINT_FOUND: "green", + HintStatus.HINT_UNSPECIFIED: "white", + HintStatus.HINT_NO_PRIORITY: "cyan", + HintStatus.HINT_AVOID: "salmon", + HintStatus.HINT_PRIORITY: "plum", +} + + class HintLog(RecycleView): header = { "receiving": {"text": "[u]Receiving Player[/u]"}, @@ -729,12 +776,13 @@ class HintLog(RecycleView): "finding": {"text": "[u]Finding Player[/u]"}, "location": {"text": "[u]Location[/u]"}, "entrance": {"text": "[u]Entrance[/u]"}, - "found": {"text": "[u]Status[/u]"}, + "status": {"text": "[u]Status[/u]", + "hint": {"receiving_player": -1, "location": -1, "finding_player": -1, "status": ""}}, "striped": True, } sort_key: str = "" - reversed: bool = False + reversed: bool = True def __init__(self, parser): super(HintLog, self).__init__() @@ -742,8 +790,18 @@ def __init__(self, parser): self.parser = parser def refresh_hints(self, hints): + if not hints: # Fix the scrolling looking visually wrong in some edge cases + self.scroll_y = 1.0 data = [] + ctx = App.get_running_app().ctx for hint in hints: + if not hint.get("status"): # Allows connecting to old servers + hint["status"] = HintStatus.HINT_FOUND if hint["found"] else HintStatus.HINT_UNSPECIFIED + 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: + hint_status_node = f"[u]{hint_status_node}[/u]" data.append({ "receiving": {"text": self.parser.handle_node({"type": "player_id", "text": hint["receiving_player"]})}, "item": {"text": self.parser.handle_node({ @@ -761,9 +819,10 @@ def refresh_hints(self, hints): "entrance": {"text": self.parser.handle_node({"type": "color" if hint["entrance"] else "text", "color": "blue", "text": hint["entrance"] if hint["entrance"] else "Vanilla"})}, - "found": { - "text": self.parser.handle_node({"type": "color", "color": "green" if hint["found"] else "red", - "text": "Found" if hint["found"] else "Not Found"})}, + "status": { + "text": hint_status_node, + "hint": hint, + }, }) data.sort(key=self.hint_sorter, reverse=self.reversed) @@ -774,7 +833,7 @@ def refresh_hints(self, hints): @staticmethod def hint_sorter(element: dict) -> str: - return "" + return element["status"]["hint"]["status"] # By status by default def fix_heights(self): """Workaround fix for divergent texture and layout heights""" @@ -783,6 +842,40 @@ def fix_heights(self): element.height = max_height +class ApAsyncImage(AsyncImage): + def is_uri(self, filename: str) -> bool: + if filename.startswith("ap:"): + return True + else: + return super().is_uri(filename) + + +class ImageLoaderPkgutil(ImageLoaderBase): + def load(self, filename: str) -> typing.List[ImageData]: + # take off the "ap:" prefix + module, path = filename[3:].split("/", 1) + data = pkgutil.get_data(module, path) + return self._bytes_to_data(data) + + def _bytes_to_data(self, data: typing.Union[bytes, bytearray]) -> typing.List[ImageData]: + loader = next(loader for loader in ImageLoader.loaders if loader.can_load_memory()) + return loader.load(loader, io.BytesIO(data)) + + +# grab the default loader method so we can override it but use it as a fallback +_original_image_loader_load = ImageLoader.load + + +def load_override(filename: str, default_load=_original_image_loader_load, **kwargs): + if filename.startswith("ap:"): + return ImageLoaderPkgutil(filename) + else: + return default_load(filename, **kwargs) + + +ImageLoader.load = load_override + + class E(ExceptionHandler): logger = logging.getLogger("Client") diff --git a/requirements.txt b/requirements.txt index 6fe14c9f32ce..946546cb6961 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ colorama>=0.4.6 -websockets>=13.0.1 +websockets>=13.0.1,<14 PyYAML>=6.0.2 jellyfish>=1.1.0 jinja2>=3.1.4 diff --git a/settings.py b/settings.py index 792770521459..04d8760c3cd3 100644 --- a/settings.py +++ b/settings.py @@ -7,6 +7,7 @@ import os.path import shutil import sys +import types import typing import warnings from enum import IntEnum @@ -162,8 +163,13 @@ def update(self, dct: Dict[str, Any]) -> None: else: # assign value, try to upcast to type hint annotation = self.get_type_hints().get(k, None) - candidates = [] if annotation is None else \ - typing.get_args(annotation) if typing.get_origin(annotation) is Union else [annotation] + candidates = ( + [] if annotation is None else ( + typing.get_args(annotation) + if typing.get_origin(annotation) in (Union, types.UnionType) + else [annotation] + ) + ) none_type = type(None) for cls in candidates: assert isinstance(cls, type), f"{self.__class__.__name__}.{k}: type {cls} not supported in settings" @@ -593,6 +599,7 @@ class LogNetwork(IntEnum): savefile: Optional[str] = None disable_save: bool = False loglevel: str = "info" + logtime: bool = False server_password: Optional[ServerPassword] = None disable_item_cheat: Union[DisableItemCheat, bool] = False location_check_points: LocationCheckPoints = LocationCheckPoints(1) diff --git a/setup.py b/setup.py index 0c9ee2c29302..59c2d698d35b 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,6 @@ import shutil import sys import sysconfig -import typing import warnings import zipfile import urllib.request @@ -14,14 +13,14 @@ import threading import subprocess -from collections.abc import Iterable from hashlib import sha3_512 from pathlib import Path +from typing import Dict, Iterable, List, Optional, Sequence, Set, Tuple, Union # This is a bit jank. We need cx-Freeze to be able to run anything from this script, so install it +requirement = 'cx-Freeze==7.2.0' try: - requirement = 'cx-Freeze==7.2.0' import pkg_resources try: pkg_resources.require(requirement) @@ -30,7 +29,7 @@ install_cx_freeze = True except ImportError: install_cx_freeze = True - pkg_resources = None # type: ignore [assignment] + pkg_resources = None # type: ignore[assignment] if install_cx_freeze: # check if pip is available @@ -61,7 +60,7 @@ # On Python < 3.10 LogicMixin is not currently supported. -non_apworlds: set = { +non_apworlds: Set[str] = { "A Link to the Past", "Adventure", "ArchipIDLE", @@ -84,7 +83,7 @@ if sys.version_info < (3,10): non_apworlds.add("Hollow Knight") -def download_SNI(): +def download_SNI() -> None: print("Updating SNI") machine_to_go = { "x86_64": "amd64", @@ -94,7 +93,7 @@ def download_SNI(): platform_name = platform.system().lower() machine_name = platform.machine().lower() # force amd64 on macos until we have universal2 sni, otherwise resolve to GOARCH - machine_name = "amd64" if platform_name == "darwin" else machine_to_go.get(machine_name, machine_name) + machine_name = "universal" if platform_name == "darwin" else machine_to_go.get(machine_name, machine_name) with urllib.request.urlopen("https://api.github.com/repos/alttpo/sni/releases/latest") as request: data = json.load(request) files = data["assets"] @@ -105,17 +104,19 @@ def download_SNI(): download_url: str = file["browser_download_url"] machine_match = download_url.rsplit("-", 1)[1].split(".", 1)[0] == machine_name if platform_name in download_url and machine_match: + source_url = download_url # prefer "many" builds if "many" in download_url: - source_url = download_url break - source_url = download_url + # prefer the correct windows or windows7 build + if platform_name == "windows" and ("windows7" in download_url) == (sys.version_info < (3, 9)): + break if source_url and source_url.endswith(".zip"): with urllib.request.urlopen(source_url) as download: with zipfile.ZipFile(io.BytesIO(download.read()), "r") as zf: - for member in zf.infolist(): - zf.extract(member, path="SNI") + for zf_member in zf.infolist(): + zf.extract(zf_member, path="SNI") print(f"Downloaded SNI from {source_url}") elif source_url and (source_url.endswith(".tar.xz") or source_url.endswith(".tar.gz")): @@ -129,11 +130,13 @@ def download_SNI(): raise ValueError(f"Unexpected file '{member.name}' in {source_url}") elif member.isdir() and not sni_dir: sni_dir = member.name - elif member.isfile() and not sni_dir or not member.name.startswith(sni_dir): + elif member.isfile() and not sni_dir or sni_dir and not member.name.startswith(sni_dir): raise ValueError(f"Expected folder before '{member.name}' in {source_url}") elif member.isfile() and sni_dir: tf.extract(member) # sadly SNI is in its own folder on non-windows, so we need to rename + if not sni_dir: + raise ValueError("Did not find SNI in archive") shutil.rmtree("SNI", True) os.rename(sni_dir, "SNI") print(f"Downloaded SNI from {source_url}") @@ -145,7 +148,7 @@ def download_SNI(): print(f"No SNI found for system spec {platform_name} {machine_name}") -signtool: typing.Optional[str] +signtool: Optional[str] if os.path.exists("X:/pw.txt"): print("Using signtool") with open("X:/pw.txt", encoding="utf-8-sig") as f: @@ -197,13 +200,13 @@ def resolve_icon(icon_name: str): extra_libs = ["libssl.so", "libcrypto.so"] if is_linux else [] -def remove_sprites_from_folder(folder): +def remove_sprites_from_folder(folder: Path) -> None: for file in os.listdir(folder): if file != ".gitignore": os.remove(folder / file) -def _threaded_hash(filepath): +def _threaded_hash(filepath: Union[str, Path]) -> str: hasher = sha3_512() hasher.update(open(filepath, "rb").read()) return base64.b85encode(hasher.digest()).decode() @@ -217,11 +220,11 @@ class BuildCommand(setuptools.command.build.build): yes: bool last_yes: bool = False # used by sub commands of build - def initialize_options(self): + def initialize_options(self) -> None: super().initialize_options() type(self).last_yes = self.yes = False - def finalize_options(self): + def finalize_options(self) -> None: super().finalize_options() type(self).last_yes = self.yes @@ -233,27 +236,27 @@ class BuildExeCommand(cx_Freeze.command.build_exe.build_exe): ('extra-data=', None, 'Additional files to add.'), ] yes: bool - extra_data: Iterable # [any] not available in 3.8 - extra_libs: Iterable # work around broken include_files + extra_data: Iterable[str] + extra_libs: Iterable[str] # work around broken include_files buildfolder: Path libfolder: Path library: Path buildtime: datetime.datetime - def initialize_options(self): + def initialize_options(self) -> None: super().initialize_options() self.yes = BuildCommand.last_yes self.extra_data = [] self.extra_libs = [] - def finalize_options(self): + def finalize_options(self) -> None: super().finalize_options() self.buildfolder = self.build_exe self.libfolder = Path(self.buildfolder, "lib") self.library = Path(self.libfolder, "library.zip") - def installfile(self, path, subpath=None, keep_content: bool = False): + def installfile(self, path: Path, subpath: Optional[Union[str, Path]] = None, keep_content: bool = False) -> None: folder = self.buildfolder if subpath: folder /= subpath @@ -268,7 +271,7 @@ def installfile(self, path, subpath=None, keep_content: bool = False): else: print('Warning,', path, 'not found') - def create_manifest(self, create_hashes=False): + def create_manifest(self, create_hashes: bool = False) -> None: # Since the setup is now split into components and the manifest is not, # it makes most sense to just remove the hashes for now. Not aware of anyone using them. hashes = {} @@ -290,7 +293,7 @@ def create_manifest(self, create_hashes=False): json.dump(manifest, open(manifestpath, "wt"), indent=4) print("Created Manifest") - def run(self): + def run(self) -> None: # start downloading sni asap sni_thread = threading.Thread(target=download_SNI, name="SNI Downloader") sni_thread.start() @@ -318,7 +321,7 @@ def run(self): f"{ex}\nPlease close all AP instances and delete manually.") # regular cx build - self.buildtime = datetime.datetime.utcnow() + self.buildtime = datetime.datetime.now(datetime.timezone.utc) super().run() # manually copy built modules to lib folder. cx_Freeze does not know they exist. @@ -341,7 +344,7 @@ def run(self): # post build steps if is_windows: # kivy_deps is win32 only, linux picks them up automatically - from kivy_deps import sdl2, glew + from kivy_deps import sdl2, glew # type: ignore for folder in sdl2.dep_bins + glew.dep_bins: shutil.copytree(folder, self.libfolder, dirs_exist_ok=True) print(f"copying {folder} -> {self.libfolder}") @@ -362,7 +365,7 @@ def run(self): self.installfile(Path(data)) # kivi data files - import kivy + import kivy # type: ignore[import-untyped] shutil.copytree(os.path.join(os.path.dirname(kivy.__file__), "data"), self.buildfolder / "data", dirs_exist_ok=True) @@ -372,7 +375,7 @@ def run(self): from worlds.AutoWorld import AutoWorldRegister assert not non_apworlds - set(AutoWorldRegister.world_types), \ f"Unknown world {non_apworlds - set(AutoWorldRegister.world_types)} designated for .apworld" - folders_to_remove: typing.List[str] = [] + folders_to_remove: List[str] = [] disabled_worlds_folder = "worlds_disabled" for entry in os.listdir(disabled_worlds_folder): if os.path.isdir(os.path.join(disabled_worlds_folder, entry)): @@ -393,7 +396,7 @@ def run(self): shutil.rmtree(world_directory) shutil.copyfile("meta.yaml", self.buildfolder / "Players" / "Templates" / "meta.yaml") try: - from maseya import z3pr + from maseya import z3pr # type: ignore[import-untyped] except ImportError: print("Maseya Palette Shuffle not found, skipping data files.") else: @@ -444,16 +447,16 @@ class AppImageCommand(setuptools.Command): ("app-exec=", None, "The application to run inside the image."), ("yes", "y", 'Answer "yes" to all questions.'), ] - build_folder: typing.Optional[Path] - dist_file: typing.Optional[Path] - app_dir: typing.Optional[Path] + build_folder: Optional[Path] + dist_file: Optional[Path] + app_dir: Optional[Path] app_name: str - app_exec: typing.Optional[Path] - app_icon: typing.Optional[Path] # source file + app_exec: Optional[Path] + app_icon: Optional[Path] # source file app_id: str # lower case name, used for icon and .desktop yes: bool - def write_desktop(self): + def write_desktop(self) -> None: assert self.app_dir, "Invalid app_dir" desktop_filename = self.app_dir / f"{self.app_id}.desktop" with open(desktop_filename, 'w', encoding="utf-8") as f: @@ -468,7 +471,7 @@ def write_desktop(self): ))) desktop_filename.chmod(0o755) - def write_launcher(self, default_exe: Path): + def write_launcher(self, default_exe: Path) -> None: assert self.app_dir, "Invalid app_dir" launcher_filename = self.app_dir / "AppRun" with open(launcher_filename, 'w', encoding="utf-8") as f: @@ -491,7 +494,7 @@ def write_launcher(self, default_exe: Path): """) launcher_filename.chmod(0o755) - def install_icon(self, src: Path, name: typing.Optional[str] = None, symlink: typing.Optional[Path] = None): + def install_icon(self, src: Path, name: Optional[str] = None, symlink: Optional[Path] = None) -> None: assert self.app_dir, "Invalid app_dir" try: from PIL import Image @@ -513,7 +516,8 @@ def install_icon(self, src: Path, name: typing.Optional[str] = None, symlink: ty if symlink: symlink.symlink_to(dest_file.relative_to(symlink.parent)) - def initialize_options(self): + def initialize_options(self) -> None: + assert self.distribution.metadata.name self.build_folder = None self.app_dir = None self.app_name = self.distribution.metadata.name @@ -527,17 +531,22 @@ def initialize_options(self): )) self.yes = False - def finalize_options(self): + def finalize_options(self) -> None: + assert self.build_folder if not self.app_dir: self.app_dir = self.build_folder.parent / "AppDir" self.app_id = self.app_name.lower() - def run(self): + def run(self) -> None: + assert self.build_folder and self.dist_file, "Command not properly set up" + assert ( + self.app_icon and self.app_id and self.app_dir and self.app_exec and self.app_name + ), "AppImageCommand not properly set up" self.dist_file.parent.mkdir(parents=True, exist_ok=True) if self.app_dir.is_dir(): shutil.rmtree(self.app_dir) self.app_dir.mkdir(parents=True) - opt_dir = self.app_dir / "opt" / self.distribution.metadata.name + opt_dir = self.app_dir / "opt" / self.app_name shutil.copytree(self.build_folder, opt_dir) root_icon = self.app_dir / f'{self.app_id}{self.app_icon.suffix}' self.install_icon(self.app_icon, self.app_id, symlink=root_icon) @@ -548,7 +557,7 @@ def run(self): subprocess.call(f'ARCH={build_arch} ./appimagetool -n "{self.app_dir}" "{self.dist_file}"', shell=True) -def find_libs(*args: str) -> typing.Sequence[typing.Tuple[str, str]]: +def find_libs(*args: str) -> Sequence[Tuple[str, str]]: """Try to find system libraries to be included.""" if not args: return [] @@ -556,7 +565,7 @@ def find_libs(*args: str) -> typing.Sequence[typing.Tuple[str, str]]: arch = build_arch.replace('_', '-') libc = 'libc6' # we currently don't support musl - def parse(line): + def parse(line: str) -> Tuple[Tuple[str, str, str], str]: lib, path = line.strip().split(' => ') lib, typ = lib.split(' ', 1) for test_arch in ('x86-64', 'i386', 'aarch64'): @@ -577,26 +586,29 @@ def parse(line): ldconfig = shutil.which("ldconfig") assert ldconfig, "Make sure ldconfig is in PATH" data = subprocess.run([ldconfig, "-p"], capture_output=True, text=True).stdout.split("\n")[1:] - find_libs.cache = { # type: ignore [attr-defined] + find_libs.cache = { # type: ignore[attr-defined] k: v for k, v in (parse(line) for line in data if "=>" in line) } - def find_lib(lib, arch, libc): - for k, v in find_libs.cache.items(): + def find_lib(lib: str, arch: str, libc: str) -> Optional[str]: + cache: Dict[Tuple[str, str, str], str] = getattr(find_libs, "cache") + for k, v in cache.items(): if k == (lib, arch, libc): return v - for k, v, in find_libs.cache.items(): + for k, v, in cache.items(): if k[0].startswith(lib) and k[1] == arch and k[2] == libc: return v return None - res = [] + res: List[Tuple[str, str]] = [] for arg in args: # try exact match, empty libc, empty arch, empty arch and libc file = find_lib(arg, arch, libc) file = file or find_lib(arg, arch, '') file = file or find_lib(arg, '', libc) file = file or find_lib(arg, '', '') + if not file: + raise ValueError(f"Could not find lib {arg}") # resolve symlinks for n in range(0, 5): res.append((file, os.path.join('lib', os.path.basename(file)))) @@ -620,9 +632,9 @@ def find_lib(lib, arch, libc): "packages": ["worlds", "kivy", "cymem", "websockets"], "includes": [], "excludes": ["numpy", "Cython", "PySide2", "PIL", - "pandas"], + "pandas", "zstandard"], "zip_include_packages": ["*"], - "zip_exclude_packages": ["worlds", "sc2", "orjson"], # TODO: remove orjson here once we drop py3.8 support + "zip_exclude_packages": ["worlds", "sc2"], "include_files": [], # broken in cx 6.14.0, we use more special sauce now "include_msvcr": False, "replace_paths": ["*."], diff --git a/test/__init__.py b/test/__init__.py index 37ebe3f62743..ab9383b3cd90 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -4,6 +4,7 @@ import settings warnings.simplefilter("always") +warnings.filterwarnings(action="ignore", category=DeprecationWarning, module="s2clientprotocol") settings.no_gui = True settings.skip_autosave = True diff --git a/test/general/test_fill.py b/test/general/test_fill.py index 2dba147aca84..c8bcec9581ac 100644 --- a/test/general/test_fill.py +++ b/test/general/test_fill.py @@ -688,8 +688,8 @@ def test_non_excluded_local_items(self): for item in multiworld.get_items(): item.classification = ItemClassification.useful - multiworld.local_items[player1.id].value = set(names(player1.basic_items)) - multiworld.local_items[player2.id].value = set(names(player2.basic_items)) + multiworld.worlds[player1.id].options.local_items.value = set(names(player1.basic_items)) + multiworld.worlds[player2.id].options.local_items.value = set(names(player2.basic_items)) locality_rules(multiworld) distribute_items_restrictive(multiworld) @@ -795,8 +795,8 @@ def setUp(self) -> None: def test_balances_progression(self) -> None: """Tests that progression balancing moves progression items earlier""" - self.multiworld.progression_balancing[self.player1.id].value = 50 - self.multiworld.progression_balancing[self.player2.id].value = 50 + self.multiworld.worlds[self.player1.id].options.progression_balancing.value = 50 + self.multiworld.worlds[self.player2.id].options.progression_balancing.value = 50 self.assertRegionContains( self.player1.regions[2], self.player2.prog_items[0]) @@ -808,8 +808,8 @@ def test_balances_progression(self) -> None: def test_balances_progression_light(self) -> None: """Test that progression balancing still moves items earlier on minimum value""" - self.multiworld.progression_balancing[self.player1.id].value = 1 - self.multiworld.progression_balancing[self.player2.id].value = 1 + self.multiworld.worlds[self.player1.id].options.progression_balancing.value = 1 + self.multiworld.worlds[self.player2.id].options.progression_balancing.value = 1 self.assertRegionContains( self.player1.regions[2], self.player2.prog_items[0]) @@ -822,8 +822,8 @@ def test_balances_progression_light(self) -> None: def test_balances_progression_heavy(self) -> None: """Test that progression balancing moves items earlier on maximum value""" - self.multiworld.progression_balancing[self.player1.id].value = 99 - self.multiworld.progression_balancing[self.player2.id].value = 99 + self.multiworld.worlds[self.player1.id].options.progression_balancing.value = 99 + self.multiworld.worlds[self.player2.id].options.progression_balancing.value = 99 self.assertRegionContains( self.player1.regions[2], self.player2.prog_items[0]) @@ -836,8 +836,8 @@ def test_balances_progression_heavy(self) -> None: def test_skips_balancing_progression(self) -> None: """Test that progression balancing is skipped when players have it disabled""" - self.multiworld.progression_balancing[self.player1.id].value = 0 - self.multiworld.progression_balancing[self.player2.id].value = 0 + self.multiworld.worlds[self.player1.id].options.progression_balancing.value = 0 + self.multiworld.worlds[self.player2.id].options.progression_balancing.value = 0 self.assertRegionContains( self.player1.regions[2], self.player2.prog_items[0]) @@ -849,8 +849,8 @@ def test_skips_balancing_progression(self) -> None: def test_ignores_priority_locations(self) -> None: """Test that progression items on priority locations don't get moved by balancing""" - self.multiworld.progression_balancing[self.player1.id].value = 50 - self.multiworld.progression_balancing[self.player2.id].value = 50 + self.multiworld.worlds[self.player1.id].options.progression_balancing.value = 50 + self.multiworld.worlds[self.player2.id].options.progression_balancing.value = 50 self.player2.prog_items[0].location.progress_type = LocationProgressType.PRIORITY diff --git a/test/general/test_items.py b/test/general/test_items.py index 9cc91a1b00ef..64ce1b6997b7 100644 --- a/test/general/test_items.py +++ b/test/general/test_items.py @@ -80,3 +80,21 @@ def test_itempool_not_modified(self): call_all(multiworld, step) self.assertEqual(created_items, multiworld.itempool, f"{game_name} modified the itempool during {step}") + + def test_locality_not_modified(self): + """Test that worlds don't modify the locality of items after duplicates are resolved""" + gen_steps = ("generate_early", "create_regions", "create_items") + additional_steps = ("set_rules", "generate_basic", "pre_fill") + worlds_to_test = {game: world for game, world in AutoWorldRegister.world_types.items()} + for game_name, world_type in worlds_to_test.items(): + with self.subTest("Game", game=game_name): + multiworld = setup_solo_multiworld(world_type, gen_steps) + local_items = multiworld.worlds[1].options.local_items.value.copy() + non_local_items = multiworld.worlds[1].options.non_local_items.value.copy() + for step in additional_steps: + with self.subTest("step", step=step): + call_all(multiworld, step) + self.assertEqual(local_items, multiworld.worlds[1].options.local_items.value, + f"{game_name} modified local_items during {step}") + self.assertEqual(non_local_items, multiworld.worlds[1].options.non_local_items.value, + f"{game_name} modified non_local_items during {step}") diff --git a/test/general/test_options.py b/test/general/test_options.py index 2229b7ea7e66..7a3743e5a4e7 100644 --- a/test/general/test_options.py +++ b/test/general/test_options.py @@ -21,6 +21,17 @@ def test_options_are_not_set_by_world(self): self.assertFalse(hasattr(world_type, "options"), f"Unexpected assignment to {world_type.__name__}.options!") + def test_duplicate_options(self) -> None: + """Tests that a world doesn't reuse the same option class.""" + for game_name, world_type in AutoWorldRegister.world_types.items(): + with self.subTest(game=game_name): + seen_options = set() + for option in world_type.options_dataclass.type_hints.values(): + if not option.visibility: + continue + self.assertFalse(option in seen_options, f"{option} found in assigned options multiple times.") + seen_options.add(option) + def test_item_links_name_groups(self): """Tests that item links successfully unfold item_name_groups""" item_link_groups = [ @@ -59,3 +70,12 @@ def test_item_links_resolve(self): item_links = {1: ItemLinks.from_any(item_link_group), 2: ItemLinks.from_any(item_link_group)} for link in item_links.values(): self.assertEqual(link.value[0], item_link_group[0]) + + def test_pickle_dumps(self): + """Test options can be pickled into database for WebHost generation""" + import pickle + for gamename, world_type in AutoWorldRegister.world_types.items(): + if not world_type.hidden: + for option_key, option in world_type.options_dataclass.type_hints.items(): + with self.subTest(game=gamename, option=option_key): + pickle.dumps(option.from_any(option.default)) diff --git a/test/general/test_settings.py b/test/general/test_settings.py new file mode 100644 index 000000000000..165d7982b5fb --- /dev/null +++ b/test/general/test_settings.py @@ -0,0 +1,16 @@ +from unittest import TestCase + +from settings import Group +from worlds.AutoWorld import AutoWorldRegister + + +class TestSettings(TestCase): + def test_settings_can_update(self) -> None: + """ + Test that world settings can update. + """ + for game_name, world_type in AutoWorldRegister.world_types.items(): + with self.subTest(game=game_name): + if world_type.settings is not None: + assert isinstance(world_type.settings, Group) + world_type.settings.update({}) # a previous bug had a crash in this call to update diff --git a/test/options/test_generate_templates.py b/test/options/test_generate_templates.py new file mode 100644 index 000000000000..cab97c54b129 --- /dev/null +++ b/test/options/test_generate_templates.py @@ -0,0 +1,55 @@ +import unittest + +from pathlib import Path +from tempfile import TemporaryDirectory +from typing import TYPE_CHECKING, Dict, Type +from Utils import parse_yaml + +if TYPE_CHECKING: + from worlds.AutoWorld import World + + +class TestGenerateYamlTemplates(unittest.TestCase): + old_world_types: Dict[str, Type["World"]] + + def setUp(self) -> None: + import worlds.AutoWorld + + self.old_world_types = worlds.AutoWorld.AutoWorldRegister.world_types + + def tearDown(self) -> None: + import worlds.AutoWorld + + worlds.AutoWorld.AutoWorldRegister.world_types = self.old_world_types + + if "World: with colon" in worlds.AutoWorld.AutoWorldRegister.world_types: + del worlds.AutoWorld.AutoWorldRegister.world_types["World: with colon"] + + def test_name_with_colon(self) -> None: + from Options import generate_yaml_templates + from worlds.AutoWorld import AutoWorldRegister + from worlds.AutoWorld import World + + class WorldWithColon(World): + game = "World: with colon" + item_name_to_id = {} + location_name_to_id = {} + + AutoWorldRegister.world_types = {WorldWithColon.game: WorldWithColon} + with TemporaryDirectory(f"archipelago_{__name__}") as temp_dir: + generate_yaml_templates(temp_dir) + path: Path + for path in Path(temp_dir).iterdir(): + self.assertTrue(path.is_file()) + self.assertTrue(path.suffix == ".yaml") + with path.open(encoding="utf-8") as f: + try: + data = parse_yaml(f) + except: + f.seek(0) + print(f"Error in {path.name}:\n{f.read()}") + raise + self.assertIn("game", data) + self.assertIn(":", data["game"]) + self.assertIn(data["game"], data) + self.assertIsInstance(data[data["game"]], dict) diff --git a/test/programs/data/weights/weights.yaml b/test/programs/data/weights/weights.yaml new file mode 100644 index 000000000000..1e3c65d8f9c1 --- /dev/null +++ b/test/programs/data/weights/weights.yaml @@ -0,0 +1,10 @@ +name: Player{number} +game: Archipelago # we only need to test options work and this "supports" all the base options +Archipelago: + progression_balancing: + 0: 50 + 50: 50 + 99: 50 + accessibility: + 0: 50 + 2: 50 diff --git a/test/programs/test_generate.py b/test/programs/test_generate.py index 9281c9c753cd..51800a0ec5c2 100644 --- a/test/programs/test_generate.py +++ b/test/programs/test_generate.py @@ -92,3 +92,48 @@ def test_generate_yaml(self): user_path.cached_path = user_path_backup self.assertOutput(self.output_tempdir.name) + + +class TestGenerateWeights(TestGenerateMain): + """Tests Generate.py using a weighted file to generate for multiple players.""" + + # this test will probably break if something in generation is changed that affects the seed before the weights get processed + # can be fixed by changing the expected_results dict + generate_dir = TestGenerateMain.generate_dir + run_dir = TestGenerateMain.run_dir + abs_input_dir = Path(__file__).parent / "data" / "weights" + rel_input_dir = abs_input_dir.relative_to(run_dir) # directly supplied relative paths are relative to cwd + yaml_input_dir = abs_input_dir.relative_to(generate_dir) # yaml paths are relative to user_path + + # don't need to run these tests + test_generate_absolute = None + test_generate_relative = None + + def test_generate_yaml(self): + from settings import get_settings + from Utils import user_path, local_path + settings = get_settings() + settings.generator.player_files_path = settings.generator.PlayerFilesPath(self.yaml_input_dir) + settings.generator.players = 5 # arbitrary number, should be enough + settings._filename = None + user_path_backup = user_path.cached_path + user_path.cached_path = local_path() + try: + sys.argv = [sys.argv[0], "--seed", "1"] + namespace, seed = Generate.main() + finally: + user_path.cached_path = user_path_backup + + # there's likely a better way to do this, but hardcode the results from seed 1 to ensure they're always this + expected_results = { + "accessibility": [0, 2, 0, 2, 2], + "progression_balancing": [0, 50, 99, 0, 50], + } + + self.assertEqual(seed, 1) + for option_name, results in expected_results.items(): + for player, result in enumerate(results, 1): + self.assertEqual( + result, getattr(namespace, option_name)[player].value, + "Generated results from weights file did not match expected value." + ) diff --git a/test/webhost/data/One_Archipelago.archipelago b/test/webhost/data/One_Archipelago.archipelago new file mode 100644 index 000000000000..8b7a8ce0a8a1 Binary files /dev/null and b/test/webhost/data/One_Archipelago.archipelago differ diff --git a/test/webhost/test_docs.py b/test/webhost/test_docs.py index 68aba05f9dcc..1e6c1b88f42c 100644 --- a/test/webhost/test_docs.py +++ b/test/webhost/test_docs.py @@ -30,10 +30,16 @@ def test_has_tutorial(self): def test_has_game_info(self): for game_name, world_type in AutoWorldRegister.world_types.items(): if not world_type.hidden: - target_path = Utils.local_path("WebHostLib", "static", "generated", "docs", game_name) + safe_name = Utils.get_file_safe_name(game_name) + target_path = Utils.local_path("WebHostLib", "static", "generated", "docs", safe_name) for game_info_lang in world_type.web.game_info_languages: with self.subTest(game_name): self.assertTrue( - os.path.isfile(Utils.local_path(target_path, f'{game_info_lang}_{game_name}.md')), + safe_name == game_name or + not os.path.isfile(Utils.local_path(target_path, f'{game_info_lang}_{game_name}.md')), + f'Info docs have be named _{safe_name}.md for {game_name}.' + ) + self.assertTrue( + os.path.isfile(Utils.local_path(target_path, f'{game_info_lang}_{safe_name}.md')), f'{game_name} missing game info file for "{game_info_lang}" language.' ) diff --git a/test/webhost/test_generate.py b/test/webhost/test_generate.py new file mode 100644 index 000000000000..5440f6e02bec --- /dev/null +++ b/test/webhost/test_generate.py @@ -0,0 +1,73 @@ +import zipfile +from io import BytesIO + +from flask import url_for + +from . import TestBase + + +class TestGenerate(TestBase): + def test_valid_yaml(self) -> None: + """ + Verify that posting a valid yaml will start generating a game. + """ + with self.app.app_context(), self.app.test_request_context(): + yaml_data = """ + name: Player1 + game: Archipelago + Archipelago: {} + """ + response = self.client.post(url_for("generate"), + data={"file": (BytesIO(yaml_data.encode("utf-8")), "test.yaml")}, + follow_redirects=True) + self.assertEqual(response.status_code, 200) + self.assertTrue("/seed/" in response.request.path or + "/wait/" in response.request.path, + f"Response did not properly redirect ({response.request.path})") + + def test_empty_zip(self) -> None: + """ + Verify that posting an empty zip will give an error. + """ + with self.app.app_context(), self.app.test_request_context(): + zip_data = BytesIO() + zipfile.ZipFile(zip_data, "w").close() + zip_data.seek(0) + self.assertGreater(len(zip_data.read()), 0) + zip_data.seek(0) + response = self.client.post(url_for("generate"), + data={"file": (zip_data, "test.zip")}, + follow_redirects=True) + self.assertIn("user-message", response.text, + "Request did not call flash()") + self.assertIn("not find any valid files", response.text, + "Response shows unexpected error") + self.assertIn("generate-game-form", response.text, + "Response did not get user back to the form") + + def test_too_many_players(self) -> None: + """ + Verify that posting too many players will give an error. + """ + max_roll = self.app.config["MAX_ROLL"] + # validate that max roll has a sensible value, otherwise we probably changed how it works + self.assertIsInstance(max_roll, int) + self.assertGreater(max_roll, 1) + self.assertLess(max_roll, 100) + # create a yaml with max_roll+1 players and watch it fail + with self.app.app_context(), self.app.test_request_context(): + yaml_data = "---\n".join([ + f"name: Player{n}\n" + "game: Archipelago\n" + "Archipelago: {}\n" + for n in range(1, max_roll + 2) + ]) + response = self.client.post(url_for("generate"), + data={"file": (BytesIO(yaml_data.encode("utf-8")), "test.yaml")}, + follow_redirects=True) + self.assertIn("user-message", response.text, + "Request did not call flash()") + self.assertIn("limited to", response.text, + "Response shows unexpected error") + self.assertIn("generate-game-form", response.text, + "Response did not get user back to the form") diff --git a/test/webhost/test_option_presets.py b/test/webhost/test_option_presets.py index b0af8a871183..7105c7f80593 100644 --- a/test/webhost/test_option_presets.py +++ b/test/webhost/test_option_presets.py @@ -1,5 +1,6 @@ import unittest +from BaseClasses import PlandoOptions from worlds import AutoWorldRegister from Options import ItemDict, NamedRange, NumericOption, OptionList, OptionSet @@ -14,6 +15,10 @@ def test_option_presets_have_valid_options(self): with self.subTest(game=game_name, preset=preset_name, option=option_name): try: option = world_type.options_dataclass.type_hints[option_name].from_any(option_value) + # some options may need verification to ensure the provided option is actually valid + # pass in all plando options in case a preset wants to require certain plando options + # for some reason + option.verify(world_type, "Test Player", PlandoOptions(sum(PlandoOptions))) supported_types = [NumericOption, OptionSet, OptionList, ItemDict] if not any([issubclass(option.__class__, t) for t in supported_types]): self.fail(f"'{option_name}' in preset '{preset_name}' for game '{game_name}' " diff --git a/test/webhost/test_tracker.py b/test/webhost/test_tracker.py new file mode 100644 index 000000000000..58145d77f3bc --- /dev/null +++ b/test/webhost/test_tracker.py @@ -0,0 +1,95 @@ +import os +import pickle +from pathlib import Path +from typing import ClassVar +from uuid import UUID, uuid4 + +from flask import url_for + +from . import TestBase + + +class TestTracker(TestBase): + room_id: UUID + tracker_uuid: UUID + log_filename: str + data: ClassVar[bytes] + + @classmethod + def setUpClass(cls) -> None: + super().setUpClass() + with (Path(__file__).parent / "data" / "One_Archipelago.archipelago").open("rb") as f: + cls.data = f.read() + + def setUp(self) -> None: + from pony.orm import db_session + from MultiServer import Context as MultiServerContext + from Utils import user_path + from WebHostLib.models import GameDataPackage, Room, Seed + + super().setUp() + + multidata = MultiServerContext.decompress(self.data) + + with self.client.session_transaction() as session: + session["_id"] = uuid4() + self.tracker_uuid = uuid4() + with db_session: + # store game datapackage(s) + for game, game_data in multidata["datapackage"].items(): + if not GameDataPackage.get(checksum=game_data["checksum"]): + GameDataPackage(checksum=game_data["checksum"], + data=pickle.dumps(game_data)) + # create an empty seed and a room from it + seed = Seed(multidata=self.data, owner=session["_id"]) + room = Room(seed=seed, owner=session["_id"], tracker=self.tracker_uuid) + self.room_id = room.id + self.log_filename = user_path("logs", f"{self.room_id}.txt") + + def tearDown(self) -> None: + from pony.orm import db_session, select + from WebHostLib.models import Command, Room + + with db_session: + for command in select(command for command in Command if command.room.id == self.room_id): # type: ignore + command.delete() + room: Room = Room.get(id=self.room_id) + room.seed.delete() + room.delete() + + try: + os.unlink(self.log_filename) + except FileNotFoundError: + pass + + def test_valid_if_modified_since(self) -> None: + """ + Verify that we get a 200 response for valid If-Modified-Since + """ + with self.app.app_context(), self.app.test_request_context(): + response = self.client.get( + url_for( + "get_player_tracker", + tracker=self.tracker_uuid, + tracked_team=0, + tracked_player=1, + ), + headers={"If-Modified-Since": "Wed, 21 Oct 2015 07:28:00 GMT"}, + ) + self.assertEqual(response.status_code, 200) + + def test_invalid_if_modified_since(self) -> None: + """ + Verify that we get a 400 response for invalid If-Modified-Since + """ + with self.app.app_context(), self.app.test_request_context(): + response = self.client.get( + url_for( + "get_player_tracker", + tracker=self.tracker_uuid, + tracked_team=1, + tracked_player=0, + ), + headers={"If-Modified-Since": "Wed, 21 Oct 2015 07:28:00"}, # missing timezone + ) + self.assertEqual(response.status_code, 400) diff --git a/worlds/AutoSNIClient.py b/worlds/AutoSNIClient.py index 2b984d9c8846..f9444eee73c6 100644 --- a/worlds/AutoSNIClient.py +++ b/worlds/AutoSNIClient.py @@ -1,9 +1,8 @@ from __future__ import annotations import abc -from typing import TYPE_CHECKING, ClassVar, Dict, Iterable, Tuple, Any, Optional, Union - -from typing_extensions import TypeGuard +import logging +from typing import TYPE_CHECKING, ClassVar, Dict, Iterable, Tuple, Any, Optional, Union, TypeGuard from worlds.LauncherComponents import Component, SuffixIdentifier, Type, components @@ -60,8 +59,12 @@ def __new__(cls, name: str, bases: Tuple[type, ...], dct: Dict[str, Any]) -> Aut @staticmethod async def get_handler(ctx: SNIContext) -> Optional[SNIClient]: for _game, handler in AutoSNIClientRegister.game_handlers.items(): - if await handler.validate_rom(ctx): - return handler + try: + if await handler.validate_rom(ctx): + return handler + except Exception as e: + text_file_logger = logging.getLogger() + text_file_logger.exception(e) return None diff --git a/worlds/AutoWorld.py b/worlds/AutoWorld.py index f7dae2b92750..ded8701d3b61 100644 --- a/worlds/AutoWorld.py +++ b/worlds/AutoWorld.py @@ -10,7 +10,7 @@ from typing import (Any, Callable, ClassVar, Dict, FrozenSet, List, Mapping, Optional, Set, TextIO, Tuple, TYPE_CHECKING, Type, Union) -from Options import item_and_loc_options, OptionGroup, PerGameCommonOptions +from Options import item_and_loc_options, ItemsAccessibility, OptionGroup, PerGameCommonOptions from BaseClasses import CollectionState if TYPE_CHECKING: @@ -33,7 +33,10 @@ def settings(cls) -> Any: # actual type is defined in World # lazy loading + caching to minimize runtime cost if cls.__settings is None: from settings import get_settings - cls.__settings = get_settings()[cls.settings_key] + try: + cls.__settings = get_settings()[cls.settings_key] + except AttributeError: + return None return cls.__settings def __new__(mcs, name: str, bases: Tuple[type, ...], dct: Dict[str, Any]) -> AutoWorldRegister: @@ -480,6 +483,7 @@ def create_group(cls, multiworld: "MultiWorld", new_player_id: int, players: Set group = cls(multiworld, new_player_id) group.options = cls.options_dataclass(**{option_key: option.from_any(option.default) for option_key, option in cls.options_dataclass.type_hints.items()}) + group.options.accessibility = ItemsAccessibility(ItemsAccessibility.option_items) return group diff --git a/worlds/LauncherComponents.py b/worlds/LauncherComponents.py index fe6e44bb308e..7f178f1739fc 100644 --- a/worlds/LauncherComponents.py +++ b/worlds/LauncherComponents.py @@ -100,10 +100,16 @@ def _install_apworld(apworld_src: str = "") -> Optional[Tuple[pathlib.Path, path apworld_path = pathlib.Path(apworld_src) - module_name = pathlib.Path(apworld_path.name).stem try: import zipfile - zipfile.ZipFile(apworld_path).open(module_name + "/__init__.py") + zip = zipfile.ZipFile(apworld_path) + directories = [f.name for f in zipfile.Path(zip).iterdir() if f.is_dir()] + if len(directories) == 1 and directories[0] in apworld_path.stem: + module_name = directories[0] + apworld_name = module_name + ".apworld" + else: + raise Exception("APWorld appears to be invalid or damaged. (expected a single directory)") + zip.open(module_name + "/__init__.py") except ValueError as e: raise Exception("Archive appears invalid or damaged.") from e except KeyError as e: @@ -122,7 +128,7 @@ def _install_apworld(apworld_src: str = "") -> Optional[Tuple[pathlib.Path, path # TODO: run generic test suite over the apworld. # TODO: have some kind of version system to tell from metadata if the apworld should be compatible. - target = pathlib.Path(worlds.user_folder) / apworld_path.name + target = pathlib.Path(worlds.user_folder) / apworld_name import shutil shutil.copyfile(apworld_path, target) @@ -201,6 +207,7 @@ def install_apworld(apworld_path: str = "") -> None: ] +# if registering an icon from within an apworld, the format "ap:module.name/path/to/file.png" can be used icon_paths = { 'icon': local_path('data', 'icon.png'), 'mcicon': local_path('data', 'mcicon.png'), diff --git a/worlds/__init__.py b/worlds/__init__.py index c277ac9ca1de..7db651bdd9e3 100644 --- a/worlds/__init__.py +++ b/worlds/__init__.py @@ -66,19 +66,12 @@ def load(self) -> bool: start = time.perf_counter() if self.is_zip: importer = zipimport.zipimporter(self.resolved_path) - if hasattr(importer, "find_spec"): # new in Python 3.10 - spec = importer.find_spec(os.path.basename(self.path).rsplit(".", 1)[0]) - assert spec, f"{self.path} is not a loadable module" - mod = importlib.util.module_from_spec(spec) - else: # TODO: remove with 3.8 support - mod = importer.load_module(os.path.basename(self.path).rsplit(".", 1)[0]) - - if mod.__package__ is not None: - mod.__package__ = f"worlds.{mod.__package__}" - else: - # load_module does not populate package, we'll have to assume mod.__name__ is correct here - # probably safe to remove with 3.8 support - mod.__package__ = f"worlds.{mod.__name__}" + spec = importer.find_spec(os.path.basename(self.path).rsplit(".", 1)[0]) + assert spec, f"{self.path} is not a loadable module" + mod = importlib.util.module_from_spec(spec) + + mod.__package__ = f"worlds.{mod.__package__}" + mod.__name__ = f"worlds.{mod.__name__}" sys.modules[mod.__name__] = mod with warnings.catch_warnings(): diff --git a/worlds/adventure/__init__.py b/worlds/adventure/__init__.py index ed5ebbd3dc56..4fde1482cfe1 100644 --- a/worlds/adventure/__init__.py +++ b/worlds/adventure/__init__.py @@ -446,7 +446,7 @@ def generate_output(self, output_directory: str) -> None: # end of ordered Main.py calls def create_item(self, name: str) -> Item: - item_data: ItemData = item_table.get(name) + item_data: ItemData = item_table[name] return AdventureItem(name, item_data.classification, item_data.id, self.player) def create_event(self, name: str, classification: ItemClassification) -> Item: diff --git a/worlds/ahit/Regions.py b/worlds/ahit/Regions.py index c70f08b475eb..31edf1d0b057 100644 --- a/worlds/ahit/Regions.py +++ b/worlds/ahit/Regions.py @@ -740,17 +740,20 @@ def is_valid_first_act(world: "HatInTimeWorld", act: Region) -> bool: def connect_time_rift(world: "HatInTimeWorld", time_rift: Region, exit_region: Region): - i = 1 - while i <= len(rift_access_regions[time_rift.name]): + for i, access_region in enumerate(rift_access_regions[time_rift.name], start=1): + # Matches the naming convention and iteration order in `create_rift_connections()`. name = f"{time_rift.name} Portal - Entrance {i}" entrance: Entrance try: - entrance = world.multiworld.get_entrance(name, world.player) + entrance = world.get_entrance(name) + # Reconnect the rift access region to the new exit region. reconnect_regions(entrance, entrance.parent_region, exit_region) except KeyError: - time_rift.connect(exit_region, name) - - i += 1 + # The original entrance to the time rift has been deleted by already reconnecting a telescope act to the + # time rift, so create a new entrance from the original rift access region to the new exit region. + # Normally, acts and time rifts are sorted such that time rifts are reconnected to acts/rifts first, but + # starting acts/rifts and act-plando can reconnect acts to time rifts before this happens. + world.get_region(access_region).connect(exit_region, name) def get_shuffleable_act_regions(world: "HatInTimeWorld") -> List[Region]: diff --git a/worlds/alttp/EntranceShuffle.py b/worlds/alttp/EntranceShuffle.py index f759b6309a0e..d0487494aa64 100644 --- a/worlds/alttp/EntranceShuffle.py +++ b/worlds/alttp/EntranceShuffle.py @@ -3338,25 +3338,6 @@ def plando_connect(world, player: int): ('Turtle Rock Exit (Front)', 'Dark Death Mountain'), ('Ice Palace Exit', 'Dark Lake Hylia')] -# Regions that can be required to access entrances through rules, not paths -indirect_connections = { - "Turtle Rock (Top)": "Turtle Rock", - "East Dark World": "Pyramid Fairy", - "Dark Desert": "Pyramid Fairy", - "West Dark World": "Pyramid Fairy", - "South Dark World": "Pyramid Fairy", - "Light World": "Pyramid Fairy", - "Old Man Cave": "Old Man S&Q" -} - -indirect_connections_inverted = { - "Inverted Big Bomb Shop": "Pyramid Fairy", -} - -indirect_connections_not_inverted = { - "Big Bomb Shop": "Pyramid Fairy", -} - # format: # Key=Name # addr = (door_index, exitdata) # multiexit diff --git a/worlds/alttp/Options.py b/worlds/alttp/Options.py index bd87cbf2c3ea..097458611734 100644 --- a/worlds/alttp/Options.py +++ b/worlds/alttp/Options.py @@ -1,7 +1,7 @@ -import typing +from dataclasses import dataclass from BaseClasses import MultiWorld -from Options import Choice, Range, DeathLink, DefaultOnToggle, FreeText, ItemsAccessibility, Option, \ +from Options import Choice, Range, DeathLink, DefaultOnToggle, FreeText, ItemsAccessibility, PerGameCommonOptions, \ PlandoBosses, PlandoConnections, PlandoTexts, Removed, StartInventoryPool, Toggle from .EntranceShuffle import default_connections, default_dungeon_connections, \ inverted_default_connections, inverted_default_dungeon_connections @@ -742,86 +742,86 @@ class ALttPPlandoTexts(PlandoTexts): valid_keys = TextTable.valid_keys -alttp_options: typing.Dict[str, type(Option)] = { - "accessibility": ItemsAccessibility, - "plando_connections": ALttPPlandoConnections, - "plando_texts": ALttPPlandoTexts, - "start_inventory_from_pool": StartInventoryPool, - "goal": Goal, - "mode": Mode, - "glitches_required": GlitchesRequired, - "dark_room_logic": DarkRoomLogic, - "open_pyramid": OpenPyramid, - "crystals_needed_for_gt": CrystalsTower, - "crystals_needed_for_ganon": CrystalsGanon, - "triforce_pieces_mode": TriforcePiecesMode, - "triforce_pieces_percentage": TriforcePiecesPercentage, - "triforce_pieces_required": TriforcePiecesRequired, - "triforce_pieces_available": TriforcePiecesAvailable, - "triforce_pieces_extra": TriforcePiecesExtra, - "entrance_shuffle": EntranceShuffle, - "entrance_shuffle_seed": EntranceShuffleSeed, - "big_key_shuffle": big_key_shuffle, - "small_key_shuffle": small_key_shuffle, - "key_drop_shuffle": key_drop_shuffle, - "compass_shuffle": compass_shuffle, - "map_shuffle": map_shuffle, - "restrict_dungeon_item_on_boss": RestrictBossItem, - "item_pool": ItemPool, - "item_functionality": ItemFunctionality, - "enemy_health": EnemyHealth, - "enemy_damage": EnemyDamage, - "progressive": Progressive, - "swordless": Swordless, - "dungeon_counters": DungeonCounters, - "retro_bow": RetroBow, - "retro_caves": RetroCaves, - "hints": Hints, - "scams": Scams, - "boss_shuffle": LTTPBosses, - "pot_shuffle": PotShuffle, - "enemy_shuffle": EnemyShuffle, - "killable_thieves": KillableThieves, - "bush_shuffle": BushShuffle, - "shop_item_slots": ShopItemSlots, - "randomize_shop_inventories": RandomizeShopInventories, - "shuffle_shop_inventories": ShuffleShopInventories, - "include_witch_hut": IncludeWitchHut, - "randomize_shop_prices": RandomizeShopPrices, - "randomize_cost_types": RandomizeCostTypes, - "shop_price_modifier": ShopPriceModifier, - "shuffle_capacity_upgrades": ShuffleCapacityUpgrades, - "bombless_start": BomblessStart, - "shuffle_prizes": ShufflePrizes, - "tile_shuffle": TileShuffle, - "misery_mire_medallion": MiseryMireMedallion, - "turtle_rock_medallion": TurtleRockMedallion, - "glitch_boots": GlitchBoots, - "beemizer_total_chance": BeemizerTotalChance, - "beemizer_trap_chance": BeemizerTrapChance, - "timer": Timer, - "countdown_start_time": CountdownStartTime, - "red_clock_time": RedClockTime, - "blue_clock_time": BlueClockTime, - "green_clock_time": GreenClockTime, - "death_link": DeathLink, - "allow_collect": AllowCollect, - "ow_palettes": OWPalette, - "uw_palettes": UWPalette, - "hud_palettes": HUDPalette, - "sword_palettes": SwordPalette, - "shield_palettes": ShieldPalette, - # "link_palettes": LinkPalette, - "heartbeep": HeartBeep, - "heartcolor": HeartColor, - "quickswap": QuickSwap, - "menuspeed": MenuSpeed, - "music": Music, - "reduceflashing": ReduceFlashing, - "triforcehud": TriforceHud, +@dataclass +class ALTTPOptions(PerGameCommonOptions): + accessibility: ItemsAccessibility + plando_connections: ALttPPlandoConnections + plando_texts: ALttPPlandoTexts + start_inventory_from_pool: StartInventoryPool + goal: Goal + mode: Mode + glitches_required: GlitchesRequired + dark_room_logic: DarkRoomLogic + open_pyramid: OpenPyramid + crystals_needed_for_gt: CrystalsTower + crystals_needed_for_ganon: CrystalsGanon + triforce_pieces_mode: TriforcePiecesMode + triforce_pieces_percentage: TriforcePiecesPercentage + triforce_pieces_required: TriforcePiecesRequired + triforce_pieces_available: TriforcePiecesAvailable + triforce_pieces_extra: TriforcePiecesExtra + entrance_shuffle: EntranceShuffle + entrance_shuffle_seed: EntranceShuffleSeed + big_key_shuffle: big_key_shuffle + small_key_shuffle: small_key_shuffle + key_drop_shuffle: key_drop_shuffle + compass_shuffle: compass_shuffle + map_shuffle: map_shuffle + restrict_dungeon_item_on_boss: RestrictBossItem + item_pool: ItemPool + item_functionality: ItemFunctionality + enemy_health: EnemyHealth + enemy_damage: EnemyDamage + progressive: Progressive + swordless: Swordless + dungeon_counters: DungeonCounters + retro_bow: RetroBow + retro_caves: RetroCaves + hints: Hints + scams: Scams + boss_shuffle: LTTPBosses + pot_shuffle: PotShuffle + enemy_shuffle: EnemyShuffle + killable_thieves: KillableThieves + bush_shuffle: BushShuffle + shop_item_slots: ShopItemSlots + randomize_shop_inventories: RandomizeShopInventories + shuffle_shop_inventories: ShuffleShopInventories + include_witch_hut: IncludeWitchHut + randomize_shop_prices: RandomizeShopPrices + randomize_cost_types: RandomizeCostTypes + shop_price_modifier: ShopPriceModifier + shuffle_capacity_upgrades: ShuffleCapacityUpgrades + bombless_start: BomblessStart + shuffle_prizes: ShufflePrizes + tile_shuffle: TileShuffle + misery_mire_medallion: MiseryMireMedallion + turtle_rock_medallion: TurtleRockMedallion + glitch_boots: GlitchBoots + beemizer_total_chance: BeemizerTotalChance + beemizer_trap_chance: BeemizerTrapChance + timer: Timer + countdown_start_time: CountdownStartTime + red_clock_time: RedClockTime + blue_clock_time: BlueClockTime + green_clock_time: GreenClockTime + death_link: DeathLink + allow_collect: AllowCollect + ow_palettes: OWPalette + uw_palettes: UWPalette + hud_palettes: HUDPalette + sword_palettes: SwordPalette + shield_palettes: ShieldPalette + # link_palettes: LinkPalette + heartbeep: HeartBeep + heartcolor: HeartColor + quickswap: QuickSwap + menuspeed: MenuSpeed + music: Music + reduceflashing: ReduceFlashing + triforcehud: TriforceHud # removed: - "goals": Removed, - "smallkey_shuffle": Removed, - "bigkey_shuffle": Removed, -} + goals: Removed + smallkey_shuffle: Removed + bigkey_shuffle: Removed diff --git a/worlds/alttp/Rom.py b/worlds/alttp/Rom.py index 224de6aaf7f3..73a77b03f532 100644 --- a/worlds/alttp/Rom.py +++ b/worlds/alttp/Rom.py @@ -782,8 +782,8 @@ def get_nonnative_item_sprite(code: int) -> int: def patch_rom(world: MultiWorld, rom: LocalRom, player: int, enemized: bool): - local_random = world.per_slot_randoms[player] local_world = world.worlds[player] + local_random = local_world.random # patch items @@ -1867,7 +1867,7 @@ def apply_oof_sfx(rom, oof: str): def apply_rom_settings(rom, beep, color, quickswap, menuspeed, music: bool, sprite: str, oof: str, palettes_options, world=None, player=1, allow_random_on_event=False, reduceflashing=False, triforcehud: str = None, deathlink: bool = False, allowcollect: bool = False): - local_random = random if not world else world.per_slot_randoms[player] + local_random = random if not world else world.worlds[player].random disable_music: bool = not music # enable instant item menu if menuspeed == 'instant': @@ -2197,8 +2197,9 @@ def write_string_to_rom(rom, target, string): def write_strings(rom, world, player): from . import ALTTPWorld - local_random = world.per_slot_randoms[player] + w: ALTTPWorld = world.worlds[player] + local_random = w.random tt = TextTable() tt.removeUnwantedText() @@ -2425,7 +2426,7 @@ def hint_text(dest, ped_hint=False): if world.worlds[player].has_progressive_bows and (w.difficulty_requirements.progressive_bow_limit >= 2 or ( world.swordless[player] or world.glitches_required[player] == 'no_glitches')): prog_bow_locs = world.find_item_locations('Progressive Bow', player, True) - world.per_slot_randoms[player].shuffle(prog_bow_locs) + local_random.shuffle(prog_bow_locs) found_bow = False found_bow_alt = False while prog_bow_locs and not (found_bow and found_bow_alt): diff --git a/worlds/alttp/__init__.py b/worlds/alttp/__init__.py index 3cdbb1cb458a..b5489906889f 100644 --- a/worlds/alttp/__init__.py +++ b/worlds/alttp/__init__.py @@ -1,29 +1,27 @@ import logging import os import random -import settings import threading import typing -import Utils +import settings from BaseClasses import Item, CollectionState, Tutorial, MultiWorld +from worlds.AutoWorld import World, WebWorld, LogicMixin +from .Client import ALTTPSNIClient from .Dungeons import create_dungeons, Dungeon -from .EntranceShuffle import link_entrances, link_inverted_entrances, plando_connect, \ - indirect_connections, indirect_connections_inverted, indirect_connections_not_inverted +from .EntranceShuffle import link_entrances, link_inverted_entrances, plando_connect from .InvertedRegions import create_inverted_regions, mark_dark_world_regions from .ItemPool import generate_itempool, difficulties from .Items import item_init_table, item_name_groups, item_table, GetBeemizerItem -from .Options import alttp_options, small_key_shuffle +from .Options import ALTTPOptions, small_key_shuffle from .Regions import lookup_name_to_id, create_regions, mark_light_world_regions, lookup_vanilla_location_to_entrance, \ is_main_entrance, key_drop_data -from .Client import ALTTPSNIClient from .Rom import LocalRom, patch_rom, patch_race_rom, check_enemizer, patch_enemizer, apply_rom_settings, \ get_hash_string, get_base_rom_path, LttPDeltaPatch from .Rules import set_rules from .Shops import create_shops, Shop, push_shop_inventories, ShopType, price_rate_display, price_type_display_name -from .SubClasses import ALttPItem, LTTPRegionType -from worlds.AutoWorld import World, WebWorld, LogicMixin from .StateHelpers import can_buy_unlimited +from .SubClasses import ALttPItem, LTTPRegionType lttp_logger = logging.getLogger("A Link to the Past") @@ -133,10 +131,12 @@ class ALTTPWorld(World): Ganon! """ game = "A Link to the Past" - option_definitions = alttp_options + options_dataclass = ALTTPOptions + options: ALTTPOptions settings_key = "lttp_options" settings: typing.ClassVar[ALTTPSettings] topology_present = True + explicit_indirect_conditions = False item_name_groups = item_name_groups location_name_groups = { "Blind's Hideout": {"Blind's Hideout - Top", "Blind's Hideout - Left", "Blind's Hideout - Right", @@ -286,13 +286,22 @@ def stage_assert_generate(cls, multiworld: MultiWorld): if not os.path.exists(rom_file): raise FileNotFoundError(rom_file) if multiworld.is_race: - import xxtea + import xxtea # noqa for player in multiworld.get_game_players(cls.game): if multiworld.worlds[player].use_enemizer: check_enemizer(multiworld.worlds[player].enemizer_path) break def generate_early(self): + # write old options + import dataclasses + is_first = self.player == min(self.multiworld.get_game_players(self.game)) + + for field in dataclasses.fields(self.options_dataclass): + if is_first: + setattr(self.multiworld, field.name, {}) + getattr(self.multiworld, field.name)[self.player] = getattr(self.options, field.name) + # end of old options re-establisher player = self.player multiworld = self.multiworld @@ -394,23 +403,13 @@ def create_regions(self): if multiworld.mode[player] != 'inverted': link_entrances(multiworld, player) mark_light_world_regions(multiworld, player) - for region_name, entrance_name in indirect_connections_not_inverted.items(): - multiworld.register_indirect_condition(multiworld.get_region(region_name, player), - multiworld.get_entrance(entrance_name, player)) else: link_inverted_entrances(multiworld, player) mark_dark_world_regions(multiworld, player) - for region_name, entrance_name in indirect_connections_inverted.items(): - multiworld.register_indirect_condition(multiworld.get_region(region_name, player), - multiworld.get_entrance(entrance_name, player)) multiworld.random = old_random plando_connect(multiworld, player) - for region_name, entrance_name in indirect_connections.items(): - multiworld.register_indirect_condition(multiworld.get_region(region_name, player), - multiworld.get_entrance(entrance_name, player)) - def collect_item(self, state: CollectionState, item: Item, remove=False): item_name = item.name if item_name.startswith('Progressive '): @@ -546,12 +545,10 @@ def stage_generate_output(cls, multiworld, output_directory): @property def use_enemizer(self) -> bool: - world = self.multiworld - player = self.player - return bool(world.boss_shuffle[player] or world.enemy_shuffle[player] - or world.enemy_health[player] != 'default' or world.enemy_damage[player] != 'default' - or world.pot_shuffle[player] or world.bush_shuffle[player] - or world.killable_thieves[player]) + return bool(self.options.boss_shuffle or self.options.enemy_shuffle + or self.options.enemy_health != 'default' or self.options.enemy_damage != 'default' + or self.options.pot_shuffle or self.options.bush_shuffle + or self.options.killable_thieves) def generate_output(self, output_directory: str): multiworld = self.multiworld diff --git a/worlds/alttp/docs/fr_A Link to the Past.md b/worlds/alttp/docs/fr_A Link to the Past.md new file mode 100644 index 000000000000..a9ff8646b3f2 --- /dev/null +++ b/worlds/alttp/docs/fr_A Link to the Past.md @@ -0,0 +1,32 @@ +# A Link to the Past + +## OÚ se trouve la page des paramètres ? + +La [page des paramètres du joueur pour ce jeu](../player-options) contient tous les paramètres dont vous avez besoin +pour configurer et exporter le fichier. + +## Quel est l'effet de la randomisation sur ce jeu ? + +Les objets que le joueur devrait normalement obtenir au cours du jeu ont ÊtÊ dÊplacÊs. Il y a tout de mÃĒme une logique +pour que le jeu puisse ÃĒtre terminÊ, mais dÃģ au mÊlange des objets, le joueur peut avoir besoin d'accÊder à certaines +zones plus tôt que dans le jeu original. + +## Quels sont les objets et endroits mÊlangÊs ? + +Tous les objets principaux, les collectibles et munitions peuvent ÃĒtre mÊlangÊs, et tous les endroits qui +pourraient contenir un de ces objets peuvent avoir leur contenu modifiÊ. + +## Quels objets peuvent ÃĒtre dans le monde d'un autre joueur ? + +Un objet pouvant ÃĒtre mÊlangÊ peut ÃĒtre aussi placÊ dans le monde d'un autre joueur. Il est possible de limiter certains +objets à votre propre monde. + +## À quoi ressemble un objet d'un autre monde dans LttP ? + +Les objets appartenant à d'autres mondes sont reprÊsentÊs par une Étoile de Super Mario World. + +## Quand le joueur reçoit un objet, que ce passe-t-il ? + +Quand le joueur reçoit un objet, Link montrera l'objet au monde en le mettant au-dessus de sa tÃĒte. C'est bon pour +les affaires ! + diff --git a/worlds/alttp/docs/multiworld_fr.md b/worlds/alttp/docs/multiworld_fr.md index 310f3a4f96c4..0638d843e810 100644 --- a/worlds/alttp/docs/multiworld_fr.md +++ b/worlds/alttp/docs/multiworld_fr.md @@ -1,41 +1,28 @@ # Guide d'installation du MultiWorld de A Link to the Past Randomizer -
    - -
    - ## Logiciels requis -- [Archipelago](https://github.com/ArchipelagoMW/Archipelago/releases) -- [QUsb2Snes](https://github.com/Skarsnik/QUsb2snes/releases) (Inclus dans les utilitaires prÊcÊdents) +- [Archipelago](https://github.com/ArchipelagoMW/Archipelago/releases). +- [SNI](https://github.com/alttpo/sni/releases). Inclus avec l'installation d'Archipelago ci-dessus. + - SNI n'est pas compatible avec (Q)Usb2Snes. - Une solution logicielle ou matÊrielle capable de charger et de lancer des fichiers ROM de SNES - - Un Êmulateur capable d'ÊxÊcuter des scripts Lua - ([snes9x rr](https://github.com/gocha/snes9x-rr/releases), - [BizHawk](https://tasvideos.org/BizHawk)) - - Un SD2SNES, [FXPak Pro](https://krikzz.com/store/home/54-fxpak-pro.html), ou une autre solution matÊrielle - compatible -- Le fichier ROM de la v1.0 japonaise, sÃģrement nommÊ `Zelda no Densetsu - Kamigami no Triforce (Japan).sfc` + - Un Êmulateur capable de se connecter à SNI + [snes9x-nwa](https://github.com/Skarsnik/snes9x-emunwa/releases), ([snes9x rr](https://github.com/gocha/snes9x-rr/releases), + [BSNES-plus](https://github.com/black-sliver/bsnes-plus), + [BizHawk](https://tasvideos.org/BizHawk), ou + [RetroArch](https://retroarch.com?page=platforms) 1.10.1 ou plus rÊcent). Ou, + - Un SD2SNES, [FXPak Pro](https://krikzz.com/store/home/54-fxpak-pro.html), ou une autre solution matÊrielle compatible. **À noter: + les SNES minis ne sont pas encore supportÊs par SNI. Certains utilisateurs rapportent avoir du succès avec QUsb2Snes pour ce système, + mais ce n'est pas supportÊ.** +- Le fichier ROM de la v1.0 japonaise, habituellement nommÊ `Zelda no Densetsu - Kamigami no Triforce (Japan).sfc` ## ProcÊdure d'installation -### Installation sur Windows - -1. TÊlÊchargez et installez les utilitaires du MultiWorld à l'aide du lien au-dessus, faites attention à bien installer - la version la plus rÊcente. - **Le fichier se situe dans la section "assets" en bas des informations de version**. Si vous voulez jouer des parties - classiques de multiworld, tÊlÊchargez `Setup.BerserkerMultiWorld.exe` - - Si vous voulez jouer à la version alternative avec le mÊlangeur de portes dans les donjons, vous tÊlÊchargez le - fichier - `Setup.BerserkerMultiWorld.Doors.exe`. - - Durant le processus d'installation, il vous sera demandÊ de localiser votre ROM v1.0 japonaise. Si vous avez dÊjà - installÊ le logiciel auparavant et qu'il s'agit simplement d'une mise à jour, la localisation de la ROM originale - ne sera pas requise. - - Il vous sera peut-ÃĒtre Êgalement demandÊ d'installer Microsoft Visual C++. Si vous le possÊdez dÊjà (possiblement - parce qu'un jeu Steam l'a dÊjà installÊ), l'installateur ne reproposera pas de l'installer. - -2. Si vous utilisez un Êmulateur, il est recommandÊ d'assigner votre Êmulateur capable d'ÊxÊcuter des scripts Lua comme +1. TÊlÊchargez et installez [Archipelago](https://github.com/ArchipelagoMW/Archipelago/releases). **L'installateur se situe dans la section "assets" en bas des informations de version**. + +2. Si c'est la première fois que vous faites une gÊnÊration locale ou un patch, il vous sera demandÊ votre fichier ROM de base. Il s'agit de votre fichier ROM Link to the Past japonais. Cet Êtape n'a besoin d'ÃĒtre faite qu'une seule fois. + +3. Si vous utilisez un Êmulateur, il est recommandÊ d'assigner votre Êmulateur capable d'ÊxÊcuter des scripts Lua comme programme par dÊfaut pour ouvrir vos ROMs. 1. Extrayez votre dossier d'Êmulateur sur votre Bureau, ou à un endroit dont vous vous souviendrez. 2. Faites un clic droit sur un fichier ROM et sÊlectionnez **Ouvrir avec...** @@ -44,58 +31,6 @@ 5. Naviguez dans les dossiers jusqu'au fichier `.exe` de votre Êmulateur et choisissez **Ouvrir**. Ce fichier devrait se trouver dans le dossier que vous avez extrait à la première Êtape. -### Installation sur Mac - -- Des volontaires sont recherchÊs pour remplir cette section ! Contactez **Farrak Kilhn** sur Discord si vous voulez - aider. - -## Configurer son fichier YAML - -### Qu'est-ce qu'un fichier YAML et pourquoi en ai-je besoin ? - -Votre fichier YAML contient un ensemble d'options de configuration qui fournissent au gÊnÊrateur des informations sur -comment il devrait gÊnÊrer votre seed. Chaque joueur d'un multiwolrd devra fournir son propre fichier YAML. Cela permet -à chaque joueur d'apprÊcier une expÊrience customisÊe selon ses goÃģts, et les diffÊrents joueurs d'un mÃĒme multiworld -peuvent avoir diffÊrentes options. - -### OÚ est-ce que j'obtiens un fichier YAML ? - -La page [GÊnÊration de partie](/games/A%20Link%20to%20the%20Past/player-options) vous permet de configurer vos -paramètres personnels et de les exporter vers un fichier YAML. - -### Configuration avancÊe du fichier YAML - -Une version plus avancÊe du fichier YAML peut ÃĒtre crÊÊe en utilisant la page -des [paramètres de pondÊration](/games/A Link to the Past/weighted-options), qui vous permet de configurer jusqu'à -trois prÊrÊglages. Cette page a de nombreuses options qui sont essentiellement reprÊsentÊes avec des curseurs -glissants. Cela vous permet de choisir quelles sont les chances qu'une certaine option apparaisse par rapport aux -autres disponibles dans une mÃĒme catÊgorie. - -Par exemple, imaginez que le gÊnÊrateur crÊe un seau ÊtiquetÊ "MÊlange des cartes", et qu'il place un morceau de papier -pour chaque sous-option. Imaginez Êgalement que la valeur pour "On" est 20 et la valeur pour "Off" est 40. - -Dans cet exemple, il y a soixante morceaux de papier dans le seau : vingt pour "On" et quarante pour "Off". Quand le -gÊnÊrateur dÊcide s'il doit oui ou non activer le mÊlange des cartes pour votre partie, , il tire alÊatoirement un -papier dans le seau. Dans cet exemple, il y a de plus grandes chances d'avoir le mÊlange de cartes dÊsactivÊ. - -S'il y a une option dont vous ne voulez jamais, mettez simplement sa valeur à zÊro. N'oubliez pas qu'il faut que pour -chaque paramètre il faut au moins une option qui soit paramÊtrÊe sur un nombre strictement positif. - -### VÊrifier son fichier YAML - -Si vous voulez valider votre fichier YAML pour ÃĒtre sÃģr qu'il fonctionne, vous pouvez le vÊrifier sur la page du -[Validateur de YAML](/check). - -## GÊnÊrer une partie pour un joueur - -1. Aller sur la page [GÊnÊration de partie](/games/A%20Link%20to%20the%20Past/player-options), configurez vos options, - et cliquez sur le bouton "Generate Game". -2. Il vous sera alors prÊsentÊ une page d'informations sur la seed, oÚ vous pourrez tÊlÊcharger votre patch. -3. Double-cliquez sur le patch et l'Êmulateur devrait se lancer automatiquement avec la seed. Etant donnÊ que le client - n'est pas requis pour les parties à un joueur, vous pouvez le fermer ainsi que l'interface Web (WebUI). - -## Rejoindre un MultiWorld - ### Obtenir son patch et crÊer sa ROM Quand vous rejoignez un multiworld, il vous sera demandÊ de fournir votre fichier YAML à celui qui hÊberge la partie ou @@ -109,35 +44,58 @@ automatiquement le client, et devrait crÊer la ROM dans le mÃĒme dossier que vo #### Avec un Êmulateur -Quand le client se lance automatiquement, QUsb2Snes devrait se lancer automatiquement Êgalement en arrière-plan. Si +Quand le client se lance automatiquement, SNI devrait se lancer automatiquement Êgalement en arrière-plan. Si c'est la première fois qu'il dÊmarre, il vous sera peut-ÃĒtre demandÊ de l'autoriser à communiquer à travers le pare-feu Windows. +#### snes9x-nwa + +1. Cliquez sur 'Network Menu' et cochez **Enable Emu Network Control** +2. Chargez votre ROM si ce n'est pas dÊjà fait. + ##### snes9x-rr 1. Chargez votre ROM si ce n'est pas dÊjà fait. 2. Cliquez sur le menu "File" et survolez l'option **Lua Scripting** 3. Cliquez alors sur **New Lua Script Window...** 4. Dans la nouvelle fenÃĒtre, sÊlectionnez **Browse...** -5. Dirigez vous vers le dossier oÚ vous avez extrait snes9x-rr, allez dans le dossier `lua`, puis - choisissez `multibridge.lua` -6. Remarquez qu'un nom vous a ÊtÊ assignÊ, et que l'interface Web affiche "SNES Device: Connected", avec ce mÃĒme nom - dans le coin en haut à gauche. +5. SÊlectionnez le fichier lua connecteur inclus avec votre client + - Recherchez `/SNI/lua/` dans votre fichier Archipelago. +6. Si vous avez une erreur en chargeant le script indiquant `socket.dll missing` ou similaire, naviguez vers le fichier du +lua que vous utilisez dans votre explorateur de fichiers et copiez le `socket.dll` à la base de votre installation snes9x. + +#### BSNES-Plus + +1. Chargez votre ROM si ce n'est pas dÊjà fait. +2. L'Êmulateur devrait automatiquement se connecter lorsque SNI se lancera. ##### BizHawk -1. Assurez vous d'avoir le coeur BSNES chargÊ. Cela est possible en cliquant sur le menu "Tools" de BizHawk et suivant +1. Assurez vous d'avoir le cœur BSNES chargÊ. Cela est possible en cliquant sur le menu "Tools" de BizHawk et suivant ces options de menu : - `Config --> Cores --> SNES --> BSNES` - Une fois le coeur changÊ, vous devez redÊmarrer BizHawk. + - (≤ 2.8) `Config` âŒĒ `Cores` âŒĒ `SNES` âŒĒ `BSNES` + - (â‰Ĩ 2.9) `Config` âŒĒ `Preferred Cores` âŒĒ `SNES` âŒĒ `BSNESv115+` + Une fois le cœur changÊ, rechargez le avec Ctrl+R (par dÊfaut). 2. Chargez votre ROM si ce n'est pas dÊjà fait. -3. Cliquez sur le menu "Tools" et cliquez sur **Lua Console** -4. Cliquez sur le bouton pour ouvrir un nouveau script Lua. -5. Dirigez vous vers le dossier d'installation des utilitaires du MultiWorld, puis dans les dossiers suivants : - `QUsb2Snes/Qusb2Snes/LuaBridge` -6. SÊlectionnez `luabridge.lua` et cliquez sur "Open". -7. Remarquez qu'un nom vous a ÊtÊ assignÊ, et que l'interface Web affiche "SNES Device: Connected", avec ce mÃĒme nom - dans le coin en haut à gauche. +3. Glissez et dÊposez le fichier `Connector.lua` que vous avez tÊlÊchargÊ ci-dessus sur la fenÃĒtre principale EmuHawk. + - Recherchez `/SNI/lua/` dans votre fichier Archipelago. + - Vous pouvez aussi ouvrir la console Lua manuellement, cliquez sur `Script` âŒĒ `Open Script`, et naviguez sur `Connecteur.lua` + avec le sÊlecteur de fichiers. + +##### RetroArch 1.10.1 ou plus rÊcent + +Vous n'avez qu'à faire ces Êtapes qu'une fois. + +1. Entrez dans le menu principal RetroArch +2. Allez dans RÊglages --> Interface utilisateur. Mettez "Afficher les rÊglages avancÊs" sur ON. +3. Allez dans RÊglages --> RÊseau. Mettez "Commandes RÊseau" sur ON. (trouvÊ sous Request Device 16.) Laissez le +Port des commandes rÊseau à 555355. + +![Screenshot of Network Commands setting](/static/generated/docs/A%20Link%20to%20the%20Past/retroarch-network-commands-fr.png) +4. Allez dans Menu Principal --> Mise à jour en ligne --> TÊlÊchargement de cœurs. Descendez jusqu'a"Nintendo - SNES / SFC (bsnes-mercury Performance)" et + sÊlectionnez le. + +Quand vous chargez une ROM, veillez a sÊlectionner un cœur **bsnes-mercury**. Ce sont les seuls cœurs qui autorisent les outils externs à lire les donnÊes d'une ROM. #### Avec une solution matÊrielle @@ -147,10 +105,7 @@ le maintenant. Les utilisateurs de SD2SNES et de FXPak Pro peuvent tÊlÊcharger [sur cette page](http://usb2snes.com/#supported-platforms). 1. Fermez votre Êmulateur, qui s'est potentiellement lancÊ automatiquement. -2. Fermez QUsb2Snes, qui s'est lancÊ automatiquement avec le client. -3. Lancez la version appropriÊe de QUsb2Snes (v0.7.16). -4. Lancer votre console et chargez la ROM. -5. Remarquez que l'interface Web affiche "SNES Device: Connected", avec le nom de votre appareil. +2. Lancez votre console et chargez la ROM. ### Se connecter au MultiServer @@ -165,47 +120,6 @@ l'interface Web. ### Jouer au jeu -Une fois que l'interface Web affiche que la SNES et le serveur sont connectÊs, vous ÃĒtes prÃĒt à jouer. FÊlicitations -pour avoir rejoint un multiworld ! - -## HÊberger un MultiWorld - -La mÊthode recommandÊe pour hÊberger une partie est d'utiliser le service d'hÊbergement fourni par -[le site](https://berserkermulti.world/generate). Le processus est relativement simple : - -1. RÊcupÊrez les fichiers YAML des joueurs. -2. CrÊez une archive zip contenant ces fichiers YAML. -3. TÊlÊversez l'archive zip sur le lien ci-dessus. -4. Attendez un moment que les seed soient gÊnÊrÊes. -5. Lorsque les seeds sont gÊnÊrÊes, vous serez redirigÊ vers une page d'informations "Seed Info". -6. Cliquez sur "Create New Room". Cela vous amènera à la page du serveur. Fournissez le lien de cette page aux autres - joueurs afin qu'ils puissent rÊcupÊrer leurs patchs. - **Note:** Les patchs fournis sur cette page permettront aux joueurs de se connecteur automatiquement au serveur, - tandis que ceux de la page "Seed Info" non. -7. Remarquez qu'un lien vers le traqueur du MultiWorld est en haut de la page de la salle. Vous devriez Êgalement - fournir ce lien aux joueurs pour qu'ils puissent suivre la progression de la partie. N'importe quel personne voulant - observer devrait avoir accès à ce lien. -8. Une fois que tous les joueurs ont rejoint, vous pouvez commencer à jouer. - -## Auto-tracking - -Si vous voulez utiliser l'auto-tracking, plusieurs logiciels offrent cette possibilitÊ. -Le logiciel recommandÊ pour l'auto-tracking actuellement est -[OpenTracker](https://github.com/trippsc2/OpenTracker/releases). - -### Installation - -1. TÊlÊchargez le fichier d'installation appropriÊ pour votre ordinateur (Les utilisateurs Windows voudront le - fichier `.msi`). -2. Durant le processus d'installation, il vous sera peut-ÃĒtre demandÊ d'installer les outils "Microsoft Visual Studio - Build Tools". Un lien est fourni durant l'installation d'OpenTracker, et celle des outils doit se faire manuellement. - -### Activer l'auto-tracking - -1. Une fois OpenTracker dÊmarrÊ, cliquez sur le menu "Tracking" en haut de la fenÃĒtre, puis choisissez ** - AutoTracker...** -2. Appuyez sur le bouton **Get Devices** -3. SÊlectionnez votre appareil SNES dans la liste dÊroulante. -4. Si vous voulez tracquer les petites clÊs ainsi que les objets des donjons, cochez la case **Race Illegal Tracking** -5. Cliquez sur le bouton **Start Autotracking** -6. Fermez la fenÃĒtre "AutoTracker" maintenant, elle n'est plus nÊcessaire +Une fois que l'interface Web affiche que la SNES et le serveur sont connectÊs, vous ÃĒtes prÃĒt à jouer. FÊlicitations, +vous venez de rejoindre un multiworld ! Vous pouvez exÊcuter diffÊrentes commandes dans votre client. Pour plus d'informations +sur ces commandes, vous pouvez utiliser `/help` pour les commandes locales et `!help` pour les commandes serveur. diff --git a/worlds/alttp/docs/retroarch-network-commands-fr.png b/worlds/alttp/docs/retroarch-network-commands-fr.png new file mode 100644 index 000000000000..60eba5b1b0fb Binary files /dev/null and b/worlds/alttp/docs/retroarch-network-commands-fr.png differ diff --git a/worlds/alttp/test/items/TestDifficulty.py b/worlds/alttp/test/items/TestDifficulty.py index 8fee56f393c7..69dd8a4dc6ba 100644 --- a/worlds/alttp/test/items/TestDifficulty.py +++ b/worlds/alttp/test/items/TestDifficulty.py @@ -1,5 +1,5 @@ from worlds.alttp.ItemPool import difficulties -from test.TestBase import TestBase +from test.bases import TestBase base_items = 41 extra_counts = (15, 15, 10, 5, 25) diff --git a/worlds/alttp/test/items/TestPrizes.py b/worlds/alttp/test/items/TestPrizes.py index 5e729093f9b3..5a9f6aa9c9ae 100644 --- a/worlds/alttp/test/items/TestPrizes.py +++ b/worlds/alttp/test/items/TestPrizes.py @@ -1,7 +1,7 @@ from typing import List from BaseClasses import Item, Location -from test.TestBase import WorldTestBase +from test.bases import WorldTestBase class TestPrizes(WorldTestBase): diff --git a/worlds/alttp/test/minor_glitches/TestMinor.py b/worlds/alttp/test/minor_glitches/TestMinor.py index 8432028bf007..7663c20a2943 100644 --- a/worlds/alttp/test/minor_glitches/TestMinor.py +++ b/worlds/alttp/test/minor_glitches/TestMinor.py @@ -2,7 +2,7 @@ from worlds.alttp.InvertedRegions import mark_dark_world_regions from worlds.alttp.ItemPool import difficulties from worlds.alttp.Items import item_factory -from test.TestBase import TestBase +from test.bases import TestBase from worlds.alttp.Options import GlitchesRequired from worlds.alttp.test import LTTPTestBase diff --git a/worlds/alttp/test/owg/TestVanillaOWG.py b/worlds/alttp/test/owg/TestVanillaOWG.py index 67156eb97275..e51970bc50b6 100644 --- a/worlds/alttp/test/owg/TestVanillaOWG.py +++ b/worlds/alttp/test/owg/TestVanillaOWG.py @@ -2,7 +2,7 @@ from worlds.alttp.InvertedRegions import mark_dark_world_regions from worlds.alttp.ItemPool import difficulties from worlds.alttp.Items import item_factory -from test.TestBase import TestBase +from test.bases import TestBase from worlds.alttp.Options import GlitchesRequired from worlds.alttp.test import LTTPTestBase diff --git a/worlds/alttp/test/shops/TestSram.py b/worlds/alttp/test/shops/TestSram.py index f5feedfb373e..74a41a628988 100644 --- a/worlds/alttp/test/shops/TestSram.py +++ b/worlds/alttp/test/shops/TestSram.py @@ -1,5 +1,5 @@ from worlds.alttp.Shops import shop_table -from test.TestBase import TestBase +from test.bases import TestBase class TestSram(TestBase): diff --git a/worlds/alttp/test/vanilla/TestVanilla.py b/worlds/alttp/test/vanilla/TestVanilla.py index 7eebc349d43f..9b5db7b12291 100644 --- a/worlds/alttp/test/vanilla/TestVanilla.py +++ b/worlds/alttp/test/vanilla/TestVanilla.py @@ -2,7 +2,7 @@ from worlds.alttp.InvertedRegions import mark_dark_world_regions from worlds.alttp.ItemPool import difficulties from worlds.alttp.Items import item_factory -from test.TestBase import TestBase +from test.bases import TestBase from worlds.alttp.Options import GlitchesRequired from worlds.alttp.test import LTTPTestBase diff --git a/worlds/aquaria/Regions.py b/worlds/aquaria/Regions.py index 3ec1fb880e13..7a41e0d0c864 100755 --- a/worlds/aquaria/Regions.py +++ b/worlds/aquaria/Regions.py @@ -738,9 +738,7 @@ def __connect_veil_regions(self) -> None: 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, - lambda state: _has_light(state, self.player) or - _has_sun_crystal(state, self.player)) + 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, lambda state: _has_energy_attack_item(state, self.player)) @@ -775,14 +773,11 @@ def __connect_abyss_regions(self) -> None: 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)) + _has_dual_form(state, self.player)) self.__connect_regions("Abyss left area", "Abyss right area", self.abyss_l, self.abyss_r) - self.__connect_one_way_regions("Abyss right area", "Abyss right area, transturtle", + self.__connect_regions("Abyss right area", "Abyss right area, transturtle", self.abyss_r, self.abyss_r_transturtle) - self.__connect_one_way_regions("Abyss right area, transturtle", "Abyss right area", - self.abyss_r_transturtle, self.abyss_r, - lambda state: _has_light(state, self.player)) self.__connect_regions("Abyss right area", "Inside the whale", self.abyss_r, self.whale, lambda state: _has_spirit_form(state, self.player) and @@ -1092,12 +1087,10 @@ def __adjusting_light_in_dark_place_rules(self) -> None: lambda state: _has_light(state, self.player)) add_rule(self.multiworld.get_entrance("Open Water bottom left area to Abyss left area", self.player), lambda state: _has_light(state, self.player)) - add_rule(self.multiworld.get_entrance("Sun Temple left area to Sun Temple right area", self.player), - lambda state: _has_light(state, self.player) or _has_sun_crystal(state, self.player)) - add_rule(self.multiworld.get_entrance("Sun Temple right area 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("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), + 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), @@ -1151,83 +1144,87 @@ def __adjusting_manual_rules(self) -> None: 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( + "Open Water 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: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("Mithalas boss area, beating Mithalan God", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("Kelp Forest boss area, beating Drunian God", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("Sun Temple boss area, beating Sun God", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("Sunken City, bulb on top of the boss area", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("Home Water, Nautilus Egg", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("Energy Temple blaster room, Blaster Egg", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("Mithalas City Castle, beating the Priests", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("Mermog cave, Piranha Egg", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("Octopus Cave, Dumbo Egg", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + 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: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("King Jellyfish Cave, Jellyfish Costume", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + 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: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("Sun Worm path, first cliff bulb", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("Sun Worm path, second cliff bulb", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + 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: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("Bubble Cave, bulb in the left cave wall", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + 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: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("Bubble Cave, Verse Egg", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + 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: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("Kelp Forest bottom left area, Walker Baby", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("Sun Temple, Sun Key", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("The Body bottom area, Mutant Costume", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + 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: item.classification != ItemClassification.progression + lambda item: not item.advancement self.multiworld.get_location("Arnassi Ruins, Arnassi Armor", self.player).item_rule = \ - lambda item: item.classification != ItemClassification.progression + lambda item: not item.advancement def adjusting_rules(self, options: AquariaOptions) -> None: """ diff --git a/worlds/aquaria/__init__.py b/worlds/aquaria/__init__.py index 1fb04036d81b..f620bf6d7306 100644 --- a/worlds/aquaria/__init__.py +++ b/worlds/aquaria/__init__.py @@ -117,25 +117,23 @@ def create_item(self, name: str) -> AquariaItem: Create an AquariaItem using 'name' as item name. """ result: AquariaItem - try: - data = item_table[name] - classification: ItemClassification = ItemClassification.useful - if data.type == ItemType.JUNK: - classification = ItemClassification.filler - elif data.type == ItemType.PROGRESSION: - classification = ItemClassification.progression - result = AquariaItem(name, classification, data.id, self.player) - except BaseException: - raise Exception('The item ' + name + ' is not valid.') + data = item_table[name] + classification: ItemClassification = ItemClassification.useful + if data.type == ItemType.JUNK: + classification = ItemClassification.filler + elif data.type == ItemType.PROGRESSION: + classification = ItemClassification.progression + result = AquariaItem(name, classification, data.id, self.player) return result - def __pre_fill_item(self, item_name: str, location_name: str, precollected) -> None: + def __pre_fill_item(self, item_name: str, location_name: str, precollected, + itemClassification: ItemClassification = ItemClassification.useful) -> None: """Pre-assign an item to a location""" if item_name not in precollected: self.exclude.append(item_name) data = item_table[item_name] - item = AquariaItem(item_name, ItemClassification.useful, data.id, self.player) + item = AquariaItem(item_name, itemClassification, data.id, self.player) self.multiworld.get_location(location_name, self.player).place_locked_item(item) def get_filler_item_name(self): @@ -164,7 +162,8 @@ def create_items(self) -> None: 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) + 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) for name, data in item_table.items(): if name not in self.exclude: @@ -212,4 +211,8 @@ def fill_slot_data(self) -> Dict[str, Any]: "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], + "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, } diff --git a/worlds/aquaria/docs/setup_en.md b/worlds/aquaria/docs/setup_en.md index 34196757a31c..8177725ded64 100644 --- a/worlds/aquaria/docs/setup_en.md +++ b/worlds/aquaria/docs/setup_en.md @@ -8,6 +8,8 @@ ## Optional Software - For sending [commands](/tutorial/Archipelago/commands/en) like `!hint`: the TextClient from [the most recent Archipelago release](https://github.com/ArchipelagoMW/Archipelago/releases) +- [Aquaria AP Tracker](https://github.com/palex00/aquaria-ap-tracker/releases/latest), for use with +[PopTracker](https://github.com/black-sliver/PopTracker/releases/latest) ## Installation and execution Procedures @@ -113,3 +115,16 @@ sure that your executable has executable permission: ```bash chmod +x aquaria_randomizer ``` + +## Auto-Tracking + +Aquaria has a fully functional map tracker that supports auto-tracking. + +1. Download [Aquaria AP Tracker](https://github.com/palex00/aquaria-ap-tracker/releases/latest) and +[PopTracker](https://github.com/black-sliver/PopTracker/releases/latest). +2. Put the tracker pack into /packs/ in your PopTracker install. +3. Open PopTracker, and load the Aquaria pack. +4. For autotracking, click on the "AP" symbol at the top. +5. Enter the Archipelago server address (the one you connected your client to), slot name, and password. + +This pack will automatically prompt you to update if one is available. diff --git a/worlds/aquaria/docs/setup_fr.md b/worlds/aquaria/docs/setup_fr.md index 2c34f1e6a50f..66b6d6119708 100644 --- a/worlds/aquaria/docs/setup_fr.md +++ b/worlds/aquaria/docs/setup_fr.md @@ -2,9 +2,14 @@ ## Logiciels nÊcessaires -- Le jeu Aquaria original (trouvable sur la majoritÊ des sites de ventes de jeux vidÊo en ligne) -- Le client Randomizer d'Aquaria [Aquaria randomizer](https://github.com/tioui/Aquaria_Randomizer/releases) +- Une copie du jeu Aquaria non-modifiÊe (disponible sur la majoritÊ des sites de ventes de jeux vidÊos en ligne) +- Le client du Randomizer d'Aquaria [Aquaria randomizer] +(https://github.com/tioui/Aquaria_Randomizer/releases) + +## Logiciels optionnels + - De manière optionnel, pour pouvoir envoyer des [commandes](/tutorial/Archipelago/commands/en) comme `!hint`: utilisez le client texte de [la version la plus rÊcente d'Archipelago](https://github.com/ArchipelagoMW/Archipelago/releases) +- [Aquaria AP Tracker](https://github.com/palex00/aquaria-ap-tracker/releases/latest), pour utiliser avec [PopTracker](https://github.com/black-sliver/PopTracker/releases/latest) ## ProcÊdures d'installation et d'exÊcution @@ -116,3 +121,15 @@ pour vous assurer que votre fichier est exÊcutable: ```bash chmod +x aquaria_randomizer ``` + +## Tracking automatique + +Aquaria a un tracker complet qui supporte le tracking automatique. + +1. TÊlÊchargez [Aquaria AP Tracker](https://github.com/palex00/aquaria-ap-tracker/releases/latest) et [PopTracker](https://github.com/black-sliver/PopTracker/releases/latest). +2. Mettre le fichier compressÊ du tracker dans le sous-rÊpertoire /packs/ du rÊpertoire d'installation de PopTracker. +3. Lancez PopTracker, et ouvrez le pack d'Aquaria. +4. Pour activer le tracking automatique, cliquez sur le symbole "AP" dans le haut de la fenÃĒtre. +5. Entrez l'adresse du serveur Archipelago (le serveur auquel vous avez connectÊ le client), le nom de votre slot, et le mot de passe (si un mot de passe est nÊcessaire). + +Le logiciel vous indiquera si une mise à jour du pack est disponible. 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 f015b26de10b..517af3028dd2 100644 --- a/worlds/aquaria/test/test_no_progression_hard_hidden_locations.py +++ b/worlds/aquaria/test/test_no_progression_hard_hidden_locations.py @@ -49,7 +49,7 @@ def test_unconfine_home_water_both_location_fillable(self) -> None: for location in self.unfillable_locations: for item_name in self.world.item_names: item = self.get_item_by_name(item_name) - if item.classification == ItemClassification.progression: + if item.advancement: self.assertFalse( self.world.get_location(location).can_fill(self.multiworld.state, item, False), "The location \"" + location + "\" can be filled with \"" + item_name + "\"") diff --git a/worlds/blasphemous/Options.py b/worlds/blasphemous/Options.py index 0bd08b13b260..e0bbcd770758 100644 --- a/worlds/blasphemous/Options.py +++ b/worlds/blasphemous/Options.py @@ -1,5 +1,5 @@ from dataclasses import dataclass -from Options import Choice, Toggle, DefaultOnToggle, DeathLink, PerGameCommonOptions, OptionGroup +from Options import Choice, Toggle, DefaultOnToggle, DeathLink, PerGameCommonOptions, StartInventoryPool, OptionGroup import random @@ -213,6 +213,7 @@ class BlasphemousDeathLink(DeathLink): @dataclass class BlasphemousOptions(PerGameCommonOptions): + start_inventory_from_pool: StartInventoryPool prie_dieu_warp: PrieDieuWarp skip_cutscenes: SkipCutscenes corpse_hints: CorpseHints diff --git a/worlds/blasphemous/__init__.py b/worlds/blasphemous/__init__.py index 67031710e4eb..a967fbac9289 100644 --- a/worlds/blasphemous/__init__.py +++ b/worlds/blasphemous/__init__.py @@ -137,12 +137,6 @@ def create_items(self): ] skipped_items = [] - junk: int = 0 - - for item, count in self.options.start_inventory.value.items(): - for _ in range(count): - skipped_items.append(item) - junk += 1 skipped_items.extend(unrandomized_dict.values()) @@ -194,9 +188,6 @@ def create_items(self): for _ in range(count): pool.append(self.create_item(item["name"])) - for _ in range(junk): - pool.append(self.create_item(self.get_filler_item_name())) - self.multiworld.itempool += pool self.place_items_from_dict(unrandomized_dict) diff --git a/worlds/bumpstik/test/__init__.py b/worlds/bumpstik/test/__init__.py index 1199d7b8e506..5f40426e5b10 100644 --- a/worlds/bumpstik/test/__init__.py +++ b/worlds/bumpstik/test/__init__.py @@ -1,4 +1,4 @@ -from test.TestBase import WorldTestBase +from test.bases import WorldTestBase class BumpStikTestBase(WorldTestBase): diff --git a/worlds/checksfinder/__init__.py b/worlds/checksfinder/__init__.py index 9ba57b059185..0b9b7105bfc4 100644 --- a/worlds/checksfinder/__init__.py +++ b/worlds/checksfinder/__init__.py @@ -11,19 +11,18 @@ class ChecksFinderWeb(WebWorld): tutorials = [Tutorial( "Multiworld Setup Guide", - "A guide to setting up the Archipelago ChecksFinder software on your computer. This guide covers " - "single-player, multiworld, and related software.", + "A guide to playing Archipelago ChecksFinder.", "English", "setup_en.md", "setup/en", - ["Mewlif"] + ["SunCat"] )] class ChecksFinderWorld(World): """ - ChecksFinder is a game where you avoid mines and find checks inside the board - with the mines! You win when you get all your items and beat the board! + ChecksFinder is a game where you avoid mines and collect checks by beating boards! + You win when you get all your items and beat the last board! """ game = "ChecksFinder" options_dataclass = PerGameCommonOptions diff --git a/worlds/cv64/__init__.py b/worlds/cv64/__init__.py index 0d384acc8f3d..1bd069a2cea8 100644 --- a/worlds/cv64/__init__.py +++ b/worlds/cv64/__init__.py @@ -89,7 +89,7 @@ class CV64World(World): def generate_early(self) -> None: # Generate the player's unique authentication - self.auth = bytearray(self.multiworld.random.getrandbits(8) for _ in range(16)) + self.auth = bytearray(self.random.getrandbits(8) for _ in range(16)) self.total_s1s = self.options.total_special1s.value self.s1s_per_warp = self.options.special1s_per_warp.value diff --git a/worlds/cv64/client.py b/worlds/cv64/client.py index 2430cc5ffc67..cec5f551b9e5 100644 --- a/worlds/cv64/client.py +++ b/worlds/cv64/client.py @@ -66,8 +66,9 @@ def on_package(self, ctx: "BizHawkClientContext", cmd: str, args: dict) -> None: self.received_deathlinks += 1 if "cause" in args["data"]: cause = args["data"]["cause"] - if len(cause) > 88: - cause = cause[0x00:0x89] + # Truncate the death cause message at 120 characters. + if len(cause) > 120: + cause = cause[0:120] else: cause = f"{args['data']['source']} killed you!" self.death_causes.append(cause) @@ -146,8 +147,18 @@ async def game_watcher(self, ctx: "BizHawkClientContext") -> None: text_color = bytearray([0xA2, 0x0B]) else: text_color = bytearray([0xA2, 0x02]) + + # Get the item's player's name. If it's longer than 40 characters, truncate it at 40. + # 35 should be the max number of characters in a server player name right now (16 for the original + # name + 16 for the alias + 3 for the added parenthesis and space), but if it ever goes higher it + # should be future-proofed now. No need to truncate CV64 items names because its longest item name + # gets nowhere near the limit. + player_name = ctx.player_names[next_item.player] + if len(player_name) > 40: + player_name = player_name[0:40] + received_text, num_lines = cv64_text_wrap(f"{ctx.item_names.lookup_in_game(next_item.item)}\n" - f"from {ctx.player_names[next_item.player]}", 96) + f"from {player_name}", 96) await bizhawk.guarded_write(ctx.bizhawk_ctx, [(0x389BE1, [next_item.item & 0xFF], "RDRAM"), (0x18C0A8, text_color + cv64_string_to_bytearray(received_text, False), diff --git a/worlds/cv64/data/patches.py b/worlds/cv64/data/patches.py index 938b615b3213..6ef4eafb67d3 100644 --- a/worlds/cv64/data/patches.py +++ b/worlds/cv64/data/patches.py @@ -197,6 +197,23 @@ 0xA168FFFD, # SB T0, 0xFFFD (T3) ] +deathlink_nitro_state_checker = [ + # Checks to see if the player is in an alright state before exploding them. If not, then the Nitro explosion spawn + # code will be aborted, and they should eventually explode after getting out of that state. + # + # Invalid states so far include: interacting/going through a door, being grabbed by a vampire. + 0x90880009, # LBU T0, 0x0009 (A0) + 0x24090005, # ADDIU T1, R0, 0x0005 + 0x11090005, # BEQ T0, T1, [forward 0x05] + 0x24090002, # ADDIU T1, R0, 0x0002 + 0x11090003, # BEQ T0, T1, [forward 0x03] + 0x00000000, # NOP + 0x08000660, # J 0x80001980 + 0x00000000, # NOP + 0x03E00008, # JR RA + 0xAC400048 # SW R0, 0x0048 (V0) +] + launch_fall_killer = [ # Custom code to force the instant fall death if at a high enough falling speed after getting killed by something # that launches you (whether it be the Nitro explosion or a Big Toss hit). The game doesn't normally run the check diff --git a/worlds/cv64/rom.py b/worlds/cv64/rom.py index ab4371b0ac12..7af4e3807ac2 100644 --- a/worlds/cv64/rom.py +++ b/worlds/cv64/rom.py @@ -357,8 +357,12 @@ def apply_patches(caller: APProcedurePatch, rom: bytes, options_file: str) -> by # Make received DeathLinks blow you to smithereens instead of kill you normally. if options["death_link"] == DeathLink.option_explosive: - rom_data.write_int32(0x27A70, 0x10000008) # B [forward 0x08] rom_data.write_int32s(0xBFC0D0, patches.deathlink_nitro_edition) + rom_data.write_int32(0x27A70, 0x10000008) # B [forward 0x08] + rom_data.write_int32(0x27AA0, 0x0C0FFA78) # JAL 0x803FE9E0 + rom_data.write_int32s(0xBFE9E0, patches.deathlink_nitro_state_checker) + # NOP the function call to subtract Nitro from the inventory after exploding, just in case. + rom_data.write_int32(0x32DBC, 0x00000000) # Set the DeathLink ROM flag if it's on at all. if options["death_link"] != DeathLink.option_off: @@ -680,38 +684,37 @@ def apply_patches(caller: APProcedurePatch, rom: bytes, options_file: str) -> by # Disable the 3HBs checking and setting flags when breaking them and enable their individual items checking and # setting flags instead. - if options["multi_hit_breakables"]: - rom_data.write_int32(0xE87F8, 0x00000000) # NOP - rom_data.write_int16(0xE836C, 0x1000) - rom_data.write_int32(0xE8B40, 0x0C0FF3CD) # JAL 0x803FCF34 - rom_data.write_int32s(0xBFCF34, patches.three_hit_item_flags_setter) - # Villa foyer chandelier-specific functions (yeah, IDK why KCEK made different functions for this one) - rom_data.write_int32(0xE7D54, 0x00000000) # NOP - rom_data.write_int16(0xE7908, 0x1000) - rom_data.write_byte(0xE7A5C, 0x10) - rom_data.write_int32(0xE7F08, 0x0C0FF3DF) # JAL 0x803FCF7C - rom_data.write_int32s(0xBFCF7C, patches.chandelier_item_flags_setter) - - # New flag values to put in each 3HB vanilla flag's spot - rom_data.write_int32(0x10C7C8, 0x8000FF48) # FoS dirge maiden rock - rom_data.write_int32(0x10C7B0, 0x0200FF48) # FoS S1 bridge rock - rom_data.write_int32(0x10C86C, 0x0010FF48) # CW upper rampart save nub - rom_data.write_int32(0x10C878, 0x4000FF49) # CW Dracula switch slab - rom_data.write_int32(0x10CAD8, 0x0100FF49) # Tunnel twin arrows slab - rom_data.write_int32(0x10CAE4, 0x0004FF49) # Tunnel lonesome bucket pit rock - rom_data.write_int32(0x10CB54, 0x4000FF4A) # UW poison parkour ledge - rom_data.write_int32(0x10CB60, 0x0080FF4A) # UW skeleton crusher ledge - rom_data.write_int32(0x10CBF0, 0x0008FF4A) # CC Behemoth crate - rom_data.write_int32(0x10CC2C, 0x2000FF4B) # CC elevator pedestal - rom_data.write_int32(0x10CC70, 0x0200FF4B) # CC lizard locker slab - rom_data.write_int32(0x10CD88, 0x0010FF4B) # ToE pre-midsavepoint platforms ledge - rom_data.write_int32(0x10CE6C, 0x4000FF4C) # ToSci invisible bridge crate - rom_data.write_int32(0x10CF20, 0x0080FF4C) # CT inverted battery slab - rom_data.write_int32(0x10CF2C, 0x0008FF4C) # CT inverted door slab - rom_data.write_int32(0x10CF38, 0x8000FF4D) # CT final room door slab - rom_data.write_int32(0x10CF44, 0x1000FF4D) # CT Renon slab - rom_data.write_int32(0x10C908, 0x0008FF4D) # Villa foyer chandelier - rom_data.write_byte(0x10CF37, 0x04) # pointer for CT final room door slab item data + rom_data.write_int32(0xE87F8, 0x00000000) # NOP + rom_data.write_int16(0xE836C, 0x1000) + rom_data.write_int32(0xE8B40, 0x0C0FF3CD) # JAL 0x803FCF34 + rom_data.write_int32s(0xBFCF34, patches.three_hit_item_flags_setter) + # Villa foyer chandelier-specific functions (yeah, IDK why KCEK made different functions for this one) + rom_data.write_int32(0xE7D54, 0x00000000) # NOP + rom_data.write_int16(0xE7908, 0x1000) + rom_data.write_byte(0xE7A5C, 0x10) + rom_data.write_int32(0xE7F08, 0x0C0FF3DF) # JAL 0x803FCF7C + rom_data.write_int32s(0xBFCF7C, patches.chandelier_item_flags_setter) + + # New flag values to put in each 3HB vanilla flag's spot + rom_data.write_int32(0x10C7C8, 0x8000FF48) # FoS dirge maiden rock + rom_data.write_int32(0x10C7B0, 0x0200FF48) # FoS S1 bridge rock + rom_data.write_int32(0x10C86C, 0x0010FF48) # CW upper rampart save nub + rom_data.write_int32(0x10C878, 0x4000FF49) # CW Dracula switch slab + rom_data.write_int32(0x10CAD8, 0x0100FF49) # Tunnel twin arrows slab + rom_data.write_int32(0x10CAE4, 0x0004FF49) # Tunnel lonesome bucket pit rock + rom_data.write_int32(0x10CB54, 0x4000FF4A) # UW poison parkour ledge + rom_data.write_int32(0x10CB60, 0x0080FF4A) # UW skeleton crusher ledge + rom_data.write_int32(0x10CBF0, 0x0008FF4A) # CC Behemoth crate + rom_data.write_int32(0x10CC2C, 0x2000FF4B) # CC elevator pedestal + rom_data.write_int32(0x10CC70, 0x0200FF4B) # CC lizard locker slab + rom_data.write_int32(0x10CD88, 0x0010FF4B) # ToE pre-midsavepoint platforms ledge + rom_data.write_int32(0x10CE6C, 0x4000FF4C) # ToSci invisible bridge crate + rom_data.write_int32(0x10CF20, 0x0080FF4C) # CT inverted battery slab + rom_data.write_int32(0x10CF2C, 0x0008FF4C) # CT inverted door slab + rom_data.write_int32(0x10CF38, 0x8000FF4D) # CT final room door slab + rom_data.write_int32(0x10CF44, 0x1000FF4D) # CT Renon slab + rom_data.write_int32(0x10C908, 0x0008FF4D) # Villa foyer chandelier + rom_data.write_byte(0x10CF37, 0x04) # pointer for CT final room door slab item data # Once-per-frame gameplay checks rom_data.write_int32(0x6C848, 0x080FF40D) # J 0x803FD034 @@ -944,13 +947,19 @@ def write_patch(world: "CV64World", patch: CV64ProcedurePatch, offset_data: Dict for loc in active_locations: if loc.address is None or get_location_info(loc.name, "type") == "shop" or loc.item.player == world.player: continue - if len(loc.item.name) > 67: - item_name = loc.item.name[0x00:0x68] + # If the Item's name is longer than 104 characters, truncate the name to inject at 104. + if len(loc.item.name) > 104: + item_name = loc.item.name[0:104] else: item_name = loc.item.name + # Get the item's player's name. If it's longer than 16 characters (which can happen if it's an ItemLinked item), + # truncate it at 16. + player_name = world.multiworld.get_player_name(loc.item.player) + if len(player_name) > 16: + player_name = player_name[0:16] + inject_address = 0xBB7164 + (256 * (loc.address & 0xFFF)) - wrapped_name, num_lines = cv64_text_wrap(item_name + "\nfor " + - world.multiworld.get_player_name(loc.item.player), 96) + wrapped_name, num_lines = cv64_text_wrap(item_name + "\nfor " + player_name, 96) patch.write_token(APTokenTypes.WRITE, inject_address, bytes(get_item_text_color(loc) + cv64_string_to_bytearray(wrapped_name))) patch.write_token(APTokenTypes.WRITE, inject_address + 255, bytes([num_lines])) diff --git a/worlds/dark_souls_3/Bosses.py b/worlds/dark_souls_3/Bosses.py index fac7d913c338..ce2ba5d1700e 100644 --- a/worlds/dark_souls_3/Bosses.py +++ b/worlds/dark_souls_3/Bosses.py @@ -253,10 +253,10 @@ class DS3BossInfo: }), DS3BossInfo("Lords of Cinder", 4100800, locations = { "KFF: Soul of the Lords", - "FS: Billed Mask - Yuria after killing KFF boss", - "FS: Black Dress - Yuria after killing KFF boss", - "FS: Black Gauntlets - Yuria after killing KFF boss", - "FS: Black Leggings - Yuria after killing KFF boss" + "FS: Billed Mask - shop after killing Yuria", + "FS: Black Dress - shop after killing Yuria", + "FS: Black Gauntlets - shop after killing Yuria", + "FS: Black Leggings - shop after killing Yuria" }), ] diff --git a/worlds/dark_souls_3/Locations.py b/worlds/dark_souls_3/Locations.py index 08f4b7cd1a80..cc202c76e8be 100644 --- a/worlds/dark_souls_3/Locations.py +++ b/worlds/dark_souls_3/Locations.py @@ -764,29 +764,29 @@ def __init__( DS3LocationData("US -> RS", None), # Yoel/Yuria of Londor - DS3LocationData("FS: Soul Arrow - Yoel/Yuria", "Soul Arrow", + DS3LocationData("FS: Soul Arrow - Yoel/Yuria shop", "Soul Arrow", static='99,0:-1:50000,110000,70000116:', missable=True, npc=True, shop=True), - DS3LocationData("FS: Heavy Soul Arrow - Yoel/Yuria", "Heavy Soul Arrow", + DS3LocationData("FS: Heavy Soul Arrow - Yoel/Yuria shop", "Heavy Soul Arrow", static='99,0:-1:50000,110000,70000116:', missable=True, npc=True, shop=True), - DS3LocationData("FS: Magic Weapon - Yoel/Yuria", "Magic Weapon", + DS3LocationData("FS: Magic Weapon - Yoel/Yuria shop", "Magic Weapon", static='99,0:-1:50000,110000,70000116:', missable=True, npc=True, shop=True), - DS3LocationData("FS: Magic Shield - Yoel/Yuria", "Magic Shield", + DS3LocationData("FS: Magic Shield - Yoel/Yuria shop", "Magic Shield", static='99,0:-1:50000,110000,70000116:', missable=True, npc=True, shop=True), - DS3LocationData("FS: Soul Greatsword - Yoel/Yuria", "Soul Greatsword", + DS3LocationData("FS: Soul Greatsword - Yoel/Yuria shop", "Soul Greatsword", static='99,0:-1:50000,110000,70000450,70000475:', missable=True, npc=True, shop=True), - DS3LocationData("FS: Dark Hand - Yoel/Yuria", "Dark Hand", missable=True, npc=True), - DS3LocationData("FS: Untrue White Ring - Yoel/Yuria", "Untrue White Ring", missable=True, + DS3LocationData("FS: Dark Hand - Yuria shop", "Dark Hand", missable=True, npc=True), + DS3LocationData("FS: Untrue White Ring - Yuria shop", "Untrue White Ring", missable=True, npc=True), - DS3LocationData("FS: Untrue Dark Ring - Yoel/Yuria", "Untrue Dark Ring", missable=True, + DS3LocationData("FS: Untrue Dark Ring - Yuria shop", "Untrue Dark Ring", missable=True, npc=True), - DS3LocationData("FS: Londor Braille Divine Tome - Yoel/Yuria", "Londor Braille Divine Tome", + DS3LocationData("FS: Londor Braille Divine Tome - Yuria shop", "Londor Braille Divine Tome", static='99,0:-1:40000,110000,70000116:', missable=True, npc=True), - DS3LocationData("FS: Darkdrift - Yoel/Yuria", "Darkdrift", missable=True, drop=True, + DS3LocationData("FS: Darkdrift - kill Yuria", "Darkdrift", missable=True, drop=True, npc=True), # kill her or kill Soul of Cinder # Cornyx of the Great Swamp @@ -2476,13 +2476,13 @@ def __init__( "Firelink Leggings", boss=True, shop=True), # Yuria (quest, after Soul of Cinder) - DS3LocationData("FS: Billed Mask - Yuria after killing KFF boss", "Billed Mask", + DS3LocationData("FS: Billed Mask - shop after killing Yuria", "Billed Mask", missable=True, npc=True), - DS3LocationData("FS: Black Dress - Yuria after killing KFF boss", "Black Dress", + DS3LocationData("FS: Black Dress - shop after killing Yuria", "Black Dress", missable=True, npc=True), - DS3LocationData("FS: Black Gauntlets - Yuria after killing KFF boss", "Black Gauntlets", + DS3LocationData("FS: Black Gauntlets - shop after killing Yuria", "Black Gauntlets", missable=True, npc=True), - DS3LocationData("FS: Black Leggings - Yuria after killing KFF boss", "Black Leggings", + DS3LocationData("FS: Black Leggings - shop after killing Yuria", "Black Leggings", missable=True, npc=True), ], diff --git a/worlds/dark_souls_3/__init__.py b/worlds/dark_souls_3/__init__.py index b51668539be2..765ffb1fc544 100644 --- a/worlds/dark_souls_3/__init__.py +++ b/worlds/dark_souls_3/__init__.py @@ -89,6 +89,7 @@ def __init__(self, multiworld: MultiWorld, player: int): self.all_excluded_locations = set() def generate_early(self) -> None: + self.created_regions = set() self.all_excluded_locations.update(self.options.exclude_locations.value) # Inform Universal Tracker where Yhorm is being randomized to. @@ -294,6 +295,7 @@ def create_region(self, region_name, location_table) -> Region: new_region.locations.append(new_location) self.multiworld.regions.append(new_region) + self.created_regions.add(region_name) return new_region def create_items(self) -> None: @@ -1305,7 +1307,7 @@ def _add_location_rule(self, location: Union[str, List[str]], rule: Union[Collec def _add_entrance_rule(self, region: str, rule: Union[CollectionRule, str]) -> None: """Sets a rule for the entrance to the given region.""" assert region in location_tables - if not any(region == reg for reg in self.multiworld.regions.region_cache[self.player]): return + if region not in self.created_regions: return if isinstance(rule, str): if " -> " not in rule: assert item_dictionary[rule].classification == ItemClassification.progression @@ -1566,6 +1568,16 @@ def fill_slot_data(self) -> Dict[str, object]: "apIdsToItemIds": ap_ids_to_ds3_ids, "itemCounts": item_counts, "locationIdsToKeys": location_ids_to_keys, + # The range of versions of the static randomizer that are compatible + # with this slot data. Incompatible versions should have at least a + # minor version bump. Pre-release versions should generally only be + # compatible with a single version, except very close to a stable + # release when no changes are expected. + # + # This is checked by the static randomizer, which will surface an + # error to the user if its version doesn't fall into the allowed + # range. + "versions": ">=3.0.0-beta.24 <3.1.0", } return slot_data diff --git a/worlds/dark_souls_3/detailed_location_descriptions.py b/worlds/dark_souls_3/detailed_location_descriptions.py index e20c700ab1bc..6e6cf1eb0bc8 100644 --- a/worlds/dark_souls_3/detailed_location_descriptions.py +++ b/worlds/dark_souls_3/detailed_location_descriptions.py @@ -84,7 +84,11 @@ table += f"
    \n" table += "
    {html.escape(name)}{html.escape(description)}
    \n" - with open(os.path.join(os.path.dirname(__file__), 'docs/locations_en.md'), 'r+') as f: + with open( + os.path.join(os.path.dirname(__file__), 'docs/locations_en.md'), + 'r+', + encoding='utf-8' + ) as f: original = f.read() start_flag = "\n" start = original.index(start_flag) + len(start_flag) diff --git a/worlds/dark_souls_3/docs/locations_en.md b/worlds/dark_souls_3/docs/locations_en.md index ef07b84b2b34..8411b8c42aa0 100644 --- a/worlds/dark_souls_3/docs/locations_en.md +++ b/worlds/dark_souls_3/docs/locations_en.md @@ -1020,7 +1020,7 @@ static _Dark Souls III_ randomizer]. CKG: Drakeblood Helm - tomb, after killing AP mausoleum NPCOn the Drakeblood Knight after Oceiros fight, after defeating the Drakeblood Knight from the Serpent-Man Summoner CKG: Drakeblood Leggings - tomb, after killing AP mausoleum NPCOn the Drakeblood Knight after Oceiros fight, after defeating the Drakeblood Knight from the Serpent-Man Summoner CKG: Estus Shard - balconyFrom the middle level of the first Consumed King's Gardens elevator, out the balcony and to the right -CKG: Human Pine Resin - by lone stairway bottomOn the right side of the garden, following the wall past the entrance to the shortcut elevator building, in a toxic pool +CKG: Human Pine Resin - pool by liftOn the right side of the garden, following the wall past the entrance to the shortcut elevator building, in a toxic pool CKG: Human Pine Resin - toxic pool, past rotundaIn between two platforms near the middle of the garden, by a tree in a toxic pool CKG: Magic Stoneplate Ring - mob drop before bossDropped by the Cathedral Knight closest to the Oceiros fog gate CKG: Ring of Sacrifice - under balconyAlong the right wall of the garden, next to the first elevator building @@ -1181,16 +1181,18 @@ static _Dark Souls III_ randomizer]. FS: Alluring Skull - Mortician's AshesSold by Handmaid after giving Mortician's Ashes FS: Arstor's Spear - Ludleth for GreatwoodBoss weapon for Curse-Rotted Greatwood FS: Aural Decoy - OrbeckSold by Orbeck -FS: Billed Mask - Yuria after killing KFF bossDropped by Yuria upon death or quest completion. -FS: Black Dress - Yuria after killing KFF bossDropped by Yuria upon death or quest completion. +FS: Billed Mask - shop after killing YuriaDropped by Yuria upon death or quest completion. +FS: Black Dress - shop after killing YuriaDropped by Yuria upon death or quest completion. FS: Black Fire Orb - Karla for Grave Warden TomeSold by Karla after giving her the Grave Warden Pyromancy Tome FS: Black Flame - Karla for Grave Warden TomeSold by Karla after giving her the Grave Warden Pyromancy Tome -FS: Black Gauntlets - Yuria after killing KFF bossDropped by Yuria upon death or quest completion. +FS: Black Gauntlets - shop after killing YuriaDropped by Yuria upon death or quest completion. +FS: Black Hand Armor - shop after killing GA NPCSold by Handmaid after killing Black Hand Kumai +FS: Black Hand Hat - shop after killing GA NPCSold by Handmaid after killing Black Hand Kumai FS: Black Iron Armor - shop after killing TsorigSold by Handmaid after killing Knight Slayer Tsorig in Smouldering Lake FS: Black Iron Gauntlets - shop after killing TsorigSold by Handmaid after killing Knight Slayer Tsorig in Smouldering Lake FS: Black Iron Helm - shop after killing TsorigSold by Handmaid after killing Knight Slayer Tsorig in Smouldering Lake FS: Black Iron Leggings - shop after killing TsorigSold by Handmaid after killing Knight Slayer Tsorig in Smouldering Lake -FS: Black Leggings - Yuria after killing KFF bossDropped by Yuria upon death or quest completion. +FS: Black Leggings - shop after killing YuriaDropped by Yuria upon death or quest completion. FS: Black Serpent - Ludleth for WolnirBoss weapon for High Lord Wolnir FS: Blessed Weapon - Irina for Tome of LothricSold by Irina after giving her the Braille Divine Tome of Lothric FS: Blue Tearstone Ring - GreiratGiven by Greirat upon rescuing him from the High Wall cell @@ -1220,8 +1222,8 @@ static _Dark Souls III_ randomizer]. FS: Dancer's Leggings - shop after killing LC entry bossSold by Handmaid after defeating Dancer of the Boreal Valley FS: Dark Blade - Karla for Londor TomeSold by Irina or Karla after giving one the Londor Braille Divine Tome FS: Dark Edge - KarlaSold by Karla after recruiting her, or in her ashes -FS: Dark Hand - Yoel/YuriaSold by Yuria -FS: Darkdrift - Yoel/YuriaDropped by Yuria upon death or quest completion. +FS: Dark Hand - Yuria shopSold by Yuria +FS: Darkdrift - kill YuriaDropped by Yuria upon death or quest completion. FS: Darkmoon Longbow - Ludleth for AldrichBoss weapon for Aldrich FS: Dead Again - Karla for Londor TomeSold by Irina or Karla after giving one the Londor Braille Divine Tome FS: Deep Protection - Karla for Deep Braille TomeSold by Irina or Karla after giving one the Deep Braille Divine Tome @@ -1264,6 +1266,9 @@ static _Dark Souls III_ randomizer]. FS: Exile Gauntlets - shop after killing NPCs in RSSold by Handmaid after killing the exiles just before Farron Keep FS: Exile Leggings - shop after killing NPCs in RSSold by Handmaid after killing the exiles just before Farron Keep FS: Exile Mask - shop after killing NPCs in RSSold by Handmaid after killing the exiles just before Farron Keep +FS: Faraam Armor - shop after killing GA NPCSold by Handmaid after killing Lion Knight Albert +FS: Faraam Boots - shop after killing GA NPCSold by Handmaid after killing Lion Knight Albert +FS: Faraam Gauntlets - shop after killing GA NPCSold by Handmaid after killing Lion Knight Albert FS: Faraam Helm - shop after killing GA NPCSold by Handmaid after killing Lion Knight Albert FS: Farron Dart - OrbeckSold by Orbeck FS: Farron Dart - shopSold by Handmaid @@ -1308,7 +1313,7 @@ static _Dark Souls III_ randomizer]. FS: Heal - IrinaSold by Irina after recruiting her, or in her ashes FS: Heal Aid - shopSold by Handmaid FS: Heavy Soul Arrow - OrbeckSold by Orbeck -FS: Heavy Soul Arrow - Yoel/YuriaSold by Yoel/Yuria +FS: Heavy Soul Arrow - Yoel/Yuria shopSold by Yoel/Yuria FS: Helm of Favor - shop after killing water reserve minibossesSold by Handmaid after killing Sulyvahn's Beasts in Water Reserve FS: Hidden Blessing - Dreamchaser's AshesSold by Greirat after pillaging Irithyll FS: Hidden Blessing - Greirat from IBVSold by Greirat after pillaging Irithyll @@ -1338,7 +1343,7 @@ static _Dark Souls III_ randomizer]. FS: Lift Chamber Key - LeonhardGiven by Ringfinger Leonhard after acquiring a Pale Tongue. FS: Lightning Storm - Ludleth for NamelessBoss weapon for Nameless King FS: Lloyd's Shield Ring - Paladin's AshesSold by Handmaid after giving Paladin's Ashes -FS: Londor Braille Divine Tome - Yoel/YuriaSold by Yuria +FS: Londor Braille Divine Tome - Yuria shopSold by Yuria FS: Lorian's Armor - shop after killing GA bossSold by Handmaid after defeating Lothric, Younger Prince FS: Lorian's Gauntlets - shop after killing GA bossSold by Handmaid after defeating Lothric, Younger Prince FS: Lorian's Greatsword - Ludleth for PrincesBoss weapon for Twin Princes @@ -1347,9 +1352,9 @@ static _Dark Souls III_ randomizer]. FS: Lothric's Holy Sword - Ludleth for PrincesBoss weapon for Twin Princes FS: Magic Barrier - Irina for Tome of LothricSold by Irina after giving her the Braille Divine Tome of Lothric FS: Magic Shield - OrbeckSold by Orbeck -FS: Magic Shield - Yoel/YuriaSold by Yoel/Yuria +FS: Magic Shield - Yoel/Yuria shopSold by Yoel/Yuria FS: Magic Weapon - OrbeckSold by Orbeck -FS: Magic Weapon - Yoel/YuriaSold by Yoel/Yuria +FS: Magic Weapon - Yoel/Yuria shopSold by Yoel/Yuria FS: Mail Breaker - Sirris for killing CreightonGiven by Sirris talking to her in Firelink Shrine after invading and vanquishing Creighton. FS: Master's Attire - NPC dropDropped by Sword Master FS: Master's Gloves - NPC dropDropped by Sword Master @@ -1401,10 +1406,10 @@ static _Dark Souls III_ randomizer]. FS: Sneering Mask - Yoel's room, kill Londor Pale Shade twiceIn Yoel/Yuria's area after defeating both Londor Pale Shade invasions FS: Soothing Sunlight - Ludleth for DancerBoss weapon for Dancer of the Boreal Valley FS: Soul Arrow - OrbeckSold by Orbeck -FS: Soul Arrow - Yoel/YuriaSold by Yoel/Yuria +FS: Soul Arrow - Yoel/Yuria shopSold by Yoel/Yuria FS: Soul Arrow - shopSold by Handmaid FS: Soul Greatsword - OrbeckSold by Orbeck -FS: Soul Greatsword - Yoel/YuriaSold by Yoel/Yuria after using Draw Out True Strength +FS: Soul Greatsword - Yoel/Yuria shopSold by Yoel/Yuria after using Draw Out True Strength FS: Soul Spear - Orbeck for Logan's ScrollSold by Orbeck after giving him Logan's Scroll FS: Soul of a Deserted Corpse - bell tower doorNext to the door requiring the Tower Key FS: Spook - OrbeckSold by Orbeck @@ -1427,8 +1432,8 @@ static _Dark Souls III_ randomizer]. FS: Undead Legion Gauntlet - shop after killing FK bossSold by Handmaid after defeating Abyss Watchers FS: Undead Legion Helm - shop after killing FK bossSold by Handmaid after defeating Abyss Watchers FS: Undead Legion Leggings - shop after killing FK bossSold by Handmaid after defeating Abyss Watchers -FS: Untrue Dark Ring - Yoel/YuriaSold by Yuria -FS: Untrue White Ring - Yoel/YuriaSold by Yuria +FS: Untrue Dark Ring - Yuria shopSold by Yuria +FS: Untrue White Ring - Yuria shopSold by Yuria FS: Vordt's Great Hammer - Ludleth for VordtBoss weapon for Vordt of the Boreal Valley FS: Vow of Silence - Karla for Londor TomeSold by Irina or Karla after giving one the Londor Braille Divine Tome FS: Washing Pole - Easterner's AshesSold by Handmaid after giving Easterner's Ashes @@ -1477,8 +1482,6 @@ static _Dark Souls III_ randomizer]. FSBT: Twinkling Titanite - lizard behind FirelinkDropped by the Crystal Lizard behind Firelink Shrine. Can be accessed with tree jump by going all the way around the roof, left of the entrance to the rafters, or alternatively dropping down from the Bell Tower. FSBT: Very good! Carving - crow for Divine BlessingTrade Divine Blessing with crow GA: Avelyn - 1F, drop from 3F onto bookshelvesOn top of a bookshelf on the Archive first floor, accessible by going halfway up the stairs to the third floor, dropping down past the Grand Archives Scholar, and then dropping down again -GA: Black Hand Armor - shop after killing GA NPCSold by Handmaid after killing Black Hand Kumai -GA: Black Hand Hat - shop after killing GA NPCSold by Handmaid after killing Black Hand Kumai GA: Blessed Gem - raftersOn the rafters high above the Archives, can be accessed by dropping down from the Winged Knight roof area GA: Chaos Gem - dark room, lizardDropped by a Crystal Lizard on the Archives first floor in the dark room past the large wax pool GA: Cinders of a Lord - Lothric PrinceDropped by Twin Princes @@ -1489,9 +1492,6 @@ static _Dark Souls III_ randomizer]. GA: Divine Pillars of Light - cage above raftersIn a cage above the rafters high above the Archives, can be accessed by dropping down from the Winged Knight roof area GA: Ember - 5F, by entranceOn a balcony high in the Archives overlooking the area with the Grand Archives Scholars with a shortcut ladder, on the opposite side from the wax pool GA: Estus Shard - dome, far balconyOn the Archives roof near the three Winged Knights, in a side area overlooking the ocean. -GA: Faraam Armor - shop after killing GA NPCSold by Handmaid after killing Lion Knight Albert -GA: Faraam Boots - shop after killing GA NPCSold by Handmaid after killing Lion Knight Albert -GA: Faraam Gauntlets - shop after killing GA NPCSold by Handmaid after killing Lion Knight Albert GA: Fleshbite Ring - up stairs from 4FFrom the first shortcut elevator with the movable bookshelf, past the Scholars right before going outside onto the roof, in an alcove to the right with many Clawed Curse bookshelves GA: Golden Wing Crest Shield - outside 5F, NPC dropDropped by Lion Knight Albert before the stairs leading up to Twin Princes GA: Heavy Gem - rooftops, lizardDropped by one of the pair of Crystal Lizards, on the right side, found going up a slope past the gargoyle on the Archives roof @@ -1525,15 +1525,15 @@ static _Dark Souls III_ randomizer]. GA: Titanite Chunk - 2F, by wax poolUp the stairs from the Archives second floor on the right side from the entrance, in a corner near the small wax pool GA: Titanite Chunk - 2F, right after dark roomExiting from the dark room with the Crystal Lizards on the first floor onto the second floor main room, then taking an immediate right GA: Titanite Chunk - 5F, far balconyOn a balcony outside where Lothric Knight stands on the top floor of the Archives, accessing by going right from the final wax pool or by dropping down from the gargoyle area -GA: Titanite Chunk - rooftops, balconyGoing onto the roof and down the first ladder, all the way down the ledge facing the ocean to the right GA: Titanite Chunk - rooftops lower, ledge by buttressGoing onto the roof and down the first ladder, dropping down on either side from the ledge facing the ocean, on a roof ledge to the right +GA: Titanite Chunk - rooftops, balconyGoing onto the roof and down the first ladder, all the way down the ledge facing the ocean to the right GA: Titanite Chunk - rooftops, just before 5FOn the Archives roof, after a short dropdown, in the small area where the two Gargoyles attack you GA: Titanite Scale - 1F, drop from 2F late onto bookshelves, lizardDropped by a Crystal Lizard on first floor bookshelves. Can be accessed by dropping down to the left at the end of the bridge which is the Crystal Sage's final location GA: Titanite Scale - 1F, up stairs on bookshelfOn the Archives first floor, up a movable set of stairs near the large wax pool, on top of a bookshelf GA: Titanite Scale - 2F, titanite scale atop bookshelfOn top of a bookshelf on the Archive second floor, accessible by going halfway up the stairs to the third floor and dropping down near a Grand Archives Scholar GA: Titanite Scale - 3F, by ladder to 2F lateGoing from the Crystal Sage's location on the third floor to its location on the bridge, on the left side of the ladder you descend, behind a table GA: Titanite Scale - 3F, corner up stairsFrom the Grand Archives third floor up past the thralls, in a corner with bookshelves to the left -GA: Titanite Scale - 5F, chest by exitIn a chest after the first elevator shortcut with the movable bookshelf, in the area with the Grand Archives Scholars, to the left of the stairwell leading up to the roof +GA: Titanite Scale - 4F, chest by exitIn a chest after the first elevator shortcut with the movable bookshelf, in the area with the Grand Archives Scholars, to the left of the stairwell leading up to the roof GA: Titanite Scale - dark room, upstairsRight after going up the stairs to the Archives second floor, on the left guarded by a Grand Archives Scholar and a sequence of Clawed Curse bookshelves GA: Titanite Scale - rooftops lower, path to 2FGoing onto the roof and down the first ladder, dropping down on either side from the ledge facing the ocean, then going past the corvians all the way to the left and making a jump GA: Titanite Slab - 1F, after pulling 2F switchIn a chest on the Archives first floor, behind a bookshelf moved by pulling a lever in the middle of the second floor between two cursed bookshelves @@ -1633,7 +1633,7 @@ static _Dark Souls III_ randomizer]. IBV: Large Soul of a Nameless Soldier - central, by bonfireBy the Central Irithyll bonfire IBV: Large Soul of a Nameless Soldier - central, by second fountainNext to the fountain up the stairs from the Central Irithyll bonfire IBV: Large Soul of a Nameless Soldier - lake islandOn an island in the lake leading to the Distant Manor bonfire -IBV: Large Soul of a Nameless Soldier - stairs to plazaOn the path from Central Irithyll bonfire, before making the left toward Church of Yorshka +IBV: Large Soul of a Nameless Soldier - path to plazaOn the path from Central Irithyll bonfire, before making the left toward Church of Yorshka IBV: Large Titanite Shard - Distant Manor, under overhangUnder overhang next to second set of stairs leading from Distant Manor bonfire IBV: Large Titanite Shard - ascent, by elevator doorOn the path from the sewer leading up to Pontiff's cathedral, to the right of the statue surrounded by dogs IBV: Large Titanite Shard - ascent, down ladder in last buildingOutside the final building before Pontiff's cathedral, coming from the sewer, dropping down to the left before the entrance @@ -1701,7 +1701,7 @@ static _Dark Souls III_ randomizer]. ID: Large Titanite Shard - B1 far, rightmost cellIn a cell on the far end of the top corridor opposite to the bonfire in Irithyll Dungeon, nearby the Jailer ID: Large Titanite Shard - B1 near, by doorAt the end of the top corridor on the bonfire side in Irithyll Dungeon, before the Jailbreaker's Key door ID: Large Titanite Shard - B3 near, right cornerIn the main Jailer cell block, to the left of the hallway leading to the Path of the Dragon area -ID: Large Titanite Shard - after bonfire, second cell on rightIn the second cell on the right after Irithyll Dungeon bonfire +ID: Large Titanite Shard - after bonfire, second cell on leftIn the second cell on the right after Irithyll Dungeon bonfire ID: Large Titanite Shard - pit #1On the floor where the Giant Slave is standing ID: Large Titanite Shard - pit #2On the floor where the Giant Slave is standing ID: Lightning Blade - B3 lift, middle platformOn the middle platform riding the elevator up from the Path of the Dragon area diff --git a/worlds/dark_souls_3/docs/setup_en.md b/worlds/dark_souls_3/docs/setup_en.md index 9755cce1c6a8..484afdce3fcb 100644 --- a/worlds/dark_souls_3/docs/setup_en.md +++ b/worlds/dark_souls_3/docs/setup_en.md @@ -18,7 +18,8 @@ installation folder. Version 3.0.0 of the randomizer _only_ supports the latest version of _Dark Souls III_, 1.15.2. This is the latest version, so you don't need to do any downpatching! However, if you've already downpatched your game to use an older version of the randomizer, you'll need to reinstall the latest -version before using this version. +version before using this version. You should also delete the `dinput8.dll` file if you still have +one from an older randomizer version. ### One-Time Setup diff --git a/worlds/dark_souls_3/test/TestDarkSouls3.py b/worlds/dark_souls_3/test/TestDarkSouls3.py index e590cd732b41..7acdad465da7 100644 --- a/worlds/dark_souls_3/test/TestDarkSouls3.py +++ b/worlds/dark_souls_3/test/TestDarkSouls3.py @@ -1,4 +1,4 @@ -from test.TestBase import WorldTestBase +from test.bases import WorldTestBase from worlds.dark_souls_3.Items import item_dictionary from worlds.dark_souls_3.Locations import location_tables diff --git a/worlds/dlcquest/__init__.py b/worlds/dlcquest/__init__.py index b8f2aad6ff94..37eae9b447d1 100644 --- a/worlds/dlcquest/__init__.py +++ b/worlds/dlcquest/__init__.py @@ -72,8 +72,16 @@ def create_items(self): self.multiworld.itempool += created_items - if self.options.campaign == Options.Campaign.option_basic or self.options.campaign == Options.Campaign.option_both: - self.multiworld.early_items[self.player]["Movement Pack"] = 1 + campaign = self.options.campaign + has_both = campaign == Options.Campaign.option_both + has_base = campaign == Options.Campaign.option_basic or has_both + has_big_bundles = self.options.coinsanity and self.options.coinbundlequantity > 50 + early_items = self.multiworld.early_items + if has_base: + if has_both and has_big_bundles: + early_items[self.player]["Incredibly Important Pack"] = 1 + else: + early_items[self.player]["Movement Pack"] = 1 for item in items_to_exclude: if item in self.multiworld.itempool: @@ -82,7 +90,7 @@ def create_items(self): def precollect_coinsanity(self): if self.options.campaign == Options.Campaign.option_basic: if self.options.coinsanity == Options.CoinSanity.option_coin and self.options.coinbundlequantity >= 5: - self.multiworld.push_precollected(self.create_item("Movement Pack")) + self.multiworld.push_precollected(self.create_item("DLC Quest: Coin Bundle")) def create_item(self, item: Union[str, ItemData], classification: ItemClassification = None) -> DLCQuestItem: if isinstance(item, str): diff --git a/worlds/dlcquest/test/TestOptionsLong.py b/worlds/dlcquest/test/TestOptionsLong.py index 3e9acac7e791..c6c594b6a004 100644 --- a/worlds/dlcquest/test/TestOptionsLong.py +++ b/worlds/dlcquest/test/TestOptionsLong.py @@ -5,7 +5,6 @@ from .option_names import options_to_include from .checks.world_checks import assert_can_win, assert_same_number_items_locations from . import DLCQuestTestBase, setup_dlc_quest_solo_multiworld -from ... import AutoWorldRegister def basic_checks(tester: DLCQuestTestBase, multiworld: MultiWorld): diff --git a/worlds/dlcquest/test/__init__.py b/worlds/dlcquest/test/__init__.py index 8a39b43a2cfd..0432ae8b60ba 100644 --- a/worlds/dlcquest/test/__init__.py +++ b/worlds/dlcquest/test/__init__.py @@ -4,7 +4,7 @@ from argparse import Namespace from BaseClasses import MultiWorld -from test.TestBase import WorldTestBase +from test.bases import WorldTestBase from .. import DLCqworld from test.general import gen_steps, setup_solo_multiworld as setup_base_solo_multiworld from worlds.AutoWorld import call_all diff --git a/worlds/dlcquest/test/checks/world_checks.py b/worlds/dlcquest/test/checks/world_checks.py index cc2fa7f51ad2..48c919c0f62b 100644 --- a/worlds/dlcquest/test/checks/world_checks.py +++ b/worlds/dlcquest/test/checks/world_checks.py @@ -1,6 +1,6 @@ from typing import List -from BaseClasses import MultiWorld, ItemClassification +from BaseClasses import MultiWorld from .. import DLCQuestTestBase from ... import Options @@ -14,7 +14,7 @@ def get_all_location_names(multiworld: MultiWorld) -> List[str]: def assert_victory_exists(tester: DLCQuestTestBase, multiworld: MultiWorld): - campaign = multiworld.campaign[1] + campaign = multiworld.worlds[1].options.campaign all_items = [item.name for item in multiworld.get_items()] if campaign == Options.Campaign.option_basic or campaign == Options.Campaign.option_both: tester.assertIn("Victory Basic", all_items) @@ -25,7 +25,7 @@ def assert_victory_exists(tester: DLCQuestTestBase, multiworld: MultiWorld): def collect_all_then_assert_can_win(tester: DLCQuestTestBase, multiworld: MultiWorld): for item in multiworld.get_items(): multiworld.state.collect(item) - campaign = multiworld.campaign[1] + campaign = multiworld.worlds[1].options.campaign if campaign == Options.Campaign.option_basic or campaign == Options.Campaign.option_both: tester.assertTrue(multiworld.find_item("Victory Basic", 1).can_reach(multiworld.state)) if campaign == Options.Campaign.option_live_freemium_or_die or campaign == Options.Campaign.option_both: @@ -39,4 +39,4 @@ def assert_can_win(tester: DLCQuestTestBase, multiworld: MultiWorld): def assert_same_number_items_locations(tester: DLCQuestTestBase, multiworld: MultiWorld): non_event_locations = [location for location in multiworld.get_locations() if not location.advancement] - tester.assertEqual(len(multiworld.itempool), len(non_event_locations)) \ No newline at end of file + tester.assertEqual(len(multiworld.itempool), len(non_event_locations)) diff --git a/worlds/doom_1993/Options.py b/worlds/doom_1993/Options.py index f65952d3eb49..c9c61110328c 100644 --- a/worlds/doom_1993/Options.py +++ b/worlds/doom_1993/Options.py @@ -16,9 +16,9 @@ class Goal(Choice): class Difficulty(Choice): """ - Choose the difficulty option. Those match DOOM's difficulty options. - baby (I'm too young to die.) double ammos, half damage, less monsters or strength. - easy (Hey, not too rough.) less monsters or strength. + Choose the game difficulty. These options match DOOM's skill levels. + baby (I'm too young to die.) Same as easy, with double ammo pickups and half damage taken. + easy (Hey, not too rough.) Less monsters or strength. medium (Hurt me plenty.) Default. hard (Ultra-Violence.) More monsters or strength. nightmare (Nightmare!) Monsters attack more rapidly and respawn. @@ -29,6 +29,11 @@ class Difficulty(Choice): option_medium = 2 option_hard = 3 option_nightmare = 4 + alias_itytd = 0 + alias_hntr = 1 + alias_hmp = 2 + alias_uv = 3 + alias_nm = 4 default = 2 @@ -112,7 +117,7 @@ class StartWithComputerAreaMaps(Toggle): class ResetLevelOnDeath(DefaultOnToggle): """When dying, levels are reset and monsters respawned. But inventory and checks are kept. Turning this setting off is considered easy mode. Good for new players that don't know the levels well.""" - display_name="Reset Level on Death" + display_name = "Reset Level on Death" class Episode1(DefaultOnToggle): diff --git a/worlds/doom_1993/docs/setup_en.md b/worlds/doom_1993/docs/setup_en.md index 5d96e6a8056e..85061609abbb 100644 --- a/worlds/doom_1993/docs/setup_en.md +++ b/worlds/doom_1993/docs/setup_en.md @@ -17,7 +17,7 @@ You can find the folder in steam by finding the game in your library, right-clicking it and choosing **Manage -> Browse Local Files**. The WAD file is in the `/base/` folder. -## Joining a MultiWorld Game +## Joining a MultiWorld Game (via Launcher) 1. Launch apdoom-launcher.exe 2. Select `Ultimate DOOM` from the drop-down @@ -28,6 +28,24 @@ To continue a game, follow the same connection steps. Connecting with a different seed won't erase your progress in other seeds. +## Joining a MultiWorld Game (via command line) + +1. In your command line, navigate to the directory where APDOOM is installed. +2. Run `crispy-apdoom -game doom -apserver -applayer `, where: + - `` is the Archipelago server address, e.g. "`archipelago.gg:38281`" + - `` is your slot name; if it contains spaces, surround it with double quotes + - If the server has a password, add `-password`, followed by the server password +3. Enjoy! + +Optionally, you can override some randomization settings from the command line: +- `-apmonsterrando 0` will disable monster rando. +- `-apitemrando 0` will disable item rando. +- `-apmusicrando 0` will disable music rando. +- `-apfliplevels 0` will disable flipping levels. +- `-apresetlevelondeath 0` will disable resetting the level on death. +- `-apdeathlinkoff` will force DeathLink off if it's enabled. +- `-skill <1-5>` changes the game difficulty, from 1 (I'm too young to die) to 5 (Nightmare!) + ## Archipelago Text Client We recommend having Archipelago's Text Client open on the side to keep track of what items you receive and send. diff --git a/worlds/doom_ii/Options.py b/worlds/doom_ii/Options.py index cc39512a176e..98c8ebc56e16 100644 --- a/worlds/doom_ii/Options.py +++ b/worlds/doom_ii/Options.py @@ -6,9 +6,9 @@ class Difficulty(Choice): """ - Choose the difficulty option. Those match DOOM's difficulty options. - baby (I'm too young to die.) double ammos, half damage, less monsters or strength. - easy (Hey, not too rough.) less monsters or strength. + Choose the game difficulty. These options match DOOM's skill levels. + baby (I'm too young to die.) Same as easy, with double ammo pickups and half damage taken. + easy (Hey, not too rough.) Less monsters or strength. medium (Hurt me plenty.) Default. hard (Ultra-Violence.) More monsters or strength. nightmare (Nightmare!) Monsters attack more rapidly and respawn. @@ -19,6 +19,11 @@ class Difficulty(Choice): option_medium = 2 option_hard = 3 option_nightmare = 4 + alias_itytd = 0 + alias_hntr = 1 + alias_hmp = 2 + alias_uv = 3 + alias_nm = 4 default = 2 @@ -102,7 +107,7 @@ class StartWithComputerAreaMaps(Toggle): class ResetLevelOnDeath(DefaultOnToggle): """When dying, levels are reset and monsters respawned. But inventory and checks are kept. Turning this setting off is considered easy mode. Good for new players that don't know the levels well.""" - display_message="Reset level on death" + display_name = "Reset Level on Death" class Episode1(DefaultOnToggle): diff --git a/worlds/doom_ii/docs/setup_en.md b/worlds/doom_ii/docs/setup_en.md index ec6697c76da2..e444f85bd7c7 100644 --- a/worlds/doom_ii/docs/setup_en.md +++ b/worlds/doom_ii/docs/setup_en.md @@ -15,7 +15,7 @@ You can find the folder in steam by finding the game in your library, right clicking it and choosing *Manage→Browse Local Files*. The WAD file is in the `/base/` folder. -## Joining a MultiWorld Game +## Joining a MultiWorld Game (via Launcher) 1. Launch apdoom-launcher.exe 2. Select `DOOM II` from the drop-down @@ -26,6 +26,24 @@ To continue a game, follow the same connection steps. Connecting with a different seed won't erase your progress in other seeds. +## Joining a MultiWorld Game (via command line) + +1. In your command line, navigate to the directory where APDOOM is installed. +2. Run `crispy-apdoom -game doom2 -apserver -applayer `, where: + - `` is the Archipelago server address, e.g. "`archipelago.gg:38281`" + - `` is your slot name; if it contains spaces, surround it with double quotes + - If the server has a password, add `-password`, followed by the server password +3. Enjoy! + +Optionally, you can override some randomization settings from the command line: +- `-apmonsterrando 0` will disable monster rando. +- `-apitemrando 0` will disable item rando. +- `-apmusicrando 0` will disable music rando. +- `-apfliplevels 0` will disable flipping levels. +- `-apresetlevelondeath 0` will disable resetting the level on death. +- `-apdeathlinkoff` will force DeathLink off if it's enabled. +- `-skill <1-5>` changes the game difficulty, from 1 (I'm too young to die) to 5 (Nightmare!) + ## Archipelago Text Client We recommend having Archipelago's Text Client open on the side to keep track of what items you receive and send. diff --git a/worlds/factorio/Client.py b/worlds/factorio/Client.py index 23dfa0633eb4..3c35c4cb0986 100644 --- a/worlds/factorio/Client.py +++ b/worlds/factorio/Client.py @@ -304,13 +304,13 @@ def queuer(): async def factorio_server_watcher(ctx: FactorioContext): - savegame_name = os.path.abspath(ctx.savegame_name) + savegame_name = os.path.abspath(os.path.join(ctx.write_data_path, "saves", "Archipelago", ctx.savegame_name)) if not os.path.exists(savegame_name): logger.info(f"Creating savegame {savegame_name}") subprocess.run(( executable, "--create", savegame_name, "--preset", "archipelago" )) - factorio_process = subprocess.Popen((executable, "--start-server", ctx.savegame_name, + factorio_process = subprocess.Popen((executable, "--start-server", savegame_name, *(str(elem) for elem in server_args)), stderr=subprocess.PIPE, stdout=subprocess.PIPE, @@ -331,7 +331,8 @@ async def factorio_server_watcher(ctx: FactorioContext): factorio_queue.task_done() if not ctx.rcon_client and "Starting RCON interface at IP ADDR:" in msg: - ctx.rcon_client = factorio_rcon.RCONClient("localhost", rcon_port, rcon_password) + ctx.rcon_client = factorio_rcon.RCONClient("localhost", rcon_port, rcon_password, + timeout=5) if not ctx.server: logger.info("Established bridge to Factorio Server. " "Ready to connect to Archipelago via /connect") @@ -405,8 +406,7 @@ async def get_info(ctx: FactorioContext, rcon_client: factorio_rcon.RCONClient): info = json.loads(rcon_client.send_command("/ap-rcon-info")) ctx.auth = info["slot_name"] ctx.seed_name = info["seed_name"] - # 0.2.0 addition, not present earlier - death_link = bool(info.get("death_link", False)) + death_link = info["death_link"] ctx.energy_link_increment = info.get("energy_link", 0) logger.debug(f"Energy Link Increment: {ctx.energy_link_increment}") if ctx.energy_link_increment and ctx.ui: diff --git a/worlds/factorio/Mod.py b/worlds/factorio/Mod.py index 7eec71875829..7dee04afbee3 100644 --- a/worlds/factorio/Mod.py +++ b/worlds/factorio/Mod.py @@ -35,9 +35,11 @@ "author": "Berserker", "homepage": "https://archipelago.gg", "description": "Integration client for the Archipelago Randomizer", - "factorio_version": "1.1", + "factorio_version": "2.0", "dependencies": [ - "base >= 1.1.0", + "base >= 2.0.15", + "? quality >= 2.0.15", + "! space-age", "? science-not-invited", "? factory-levels" ] @@ -133,21 +135,21 @@ def flop_random(low, high, base=None): "allowed_science_packs": world.options.max_science_pack.get_allowed_packs(), "custom_technologies": world.custom_technologies, "tech_tree_layout_prerequisites": world.tech_tree_layout_prerequisites, - "slot_name": world.player_name, "seed_name": multiworld.seed_name, + "slot_name": world.player_name, + "seed_name": multiworld.seed_name, "slot_player": player, - "starting_items": world.options.starting_items, "recipes": recipes, - "random": random, "flop_random": flop_random, + "recipes": recipes, + "random": random, + "flop_random": flop_random, "recipe_time_scale": recipe_time_scales.get(world.options.recipe_time.value, None), "recipe_time_range": recipe_time_ranges.get(world.options.recipe_time.value, None), "free_sample_blacklist": {item: 1 for item in free_sample_exclusions}, + "free_sample_quality_name": world.options.free_samples_quality.current_key, "progressive_technology_table": {tech.name: tech.progressive for tech in progressive_technology_table.values()}, "custom_recipes": world.custom_recipes, - "max_science_pack": world.options.max_science_pack.value, "liquids": fluids, - "goal": world.options.goal.value, - "energy_link": world.options.energy_link.value, - "useless_technologies": useless_technologies, + "removed_technologies": world.removed_technologies, "chunk_shuffle": 0, } diff --git a/worlds/factorio/Options.py b/worlds/factorio/Options.py index 788d1f9e1d92..72f438778b60 100644 --- a/worlds/factorio/Options.py +++ b/worlds/factorio/Options.py @@ -1,13 +1,12 @@ from __future__ import annotations from dataclasses import dataclass -import datetime import typing from schema import Schema, Optional, And, Or -from Options import Choice, OptionDict, OptionSet, Option, DefaultOnToggle, Range, DeathLink, Toggle, \ - StartInventoryPool, PerGameCommonOptions +from Options import Choice, OptionDict, OptionSet, DefaultOnToggle, Range, DeathLink, Toggle, \ + StartInventoryPool, PerGameCommonOptions, OptionGroup # schema helpers FloatRange = lambda low, high: And(Or(int, float), lambda f: low <= f <= high) @@ -122,6 +121,18 @@ class FreeSamples(Choice): default = 3 +class FreeSamplesQuality(Choice): + """If free samples are on, determine the quality of the granted items. + Requires the quality mod, which is part of the Space Age DLC. Without it, normal quality is given.""" + display_name = "Free Samples Quality" + option_normal = 0 + option_uncommon = 1 + option_rare = 2 + option_epic = 3 + option_legendary = 4 + default = 0 + + class TechTreeLayout(Choice): """Selects how the tech tree nodes are interwoven. Single: No dependencies @@ -261,6 +272,12 @@ class AtomicRocketTrapCount(TrapCount): display_name = "Atomic Rocket Traps" +class AtomicCliffRemoverTrapCount(TrapCount): + """Trap items that when received trigger an atomic rocket explosion on a random cliff. + Warning: there is no warning. The launch is instantaneous.""" + display_name = "Atomic Cliff Remover Traps" + + class EvolutionTrapCount(TrapCount): """Trap items that when received increase the enemy evolution.""" display_name = "Evolution Traps" @@ -282,19 +299,23 @@ class FactorioWorldGen(OptionDict): with in-depth documentation at https://lua-api.factorio.com/latest/Concepts.html#MapGenSettings""" display_name = "World Generation" # FIXME: do we want default be a rando-optimized default or in-game DS? - value: typing.Dict[str, typing.Dict[str, typing.Any]] + value: dict[str, dict[str, typing.Any]] default = { - "terrain_segmentation": 0.5, - "water": 1.5, "autoplace_controls": { + # terrain + "water": {"frequency": 1, "size": 1, "richness": 1}, + "nauvis_cliff": {"frequency": 1, "size": 1, "richness": 1}, + "starting_area_moisture": {"frequency": 1, "size": 1, "richness": 1}, + # resources "coal": {"frequency": 1, "size": 3, "richness": 6}, "copper-ore": {"frequency": 1, "size": 3, "richness": 6}, "crude-oil": {"frequency": 1, "size": 3, "richness": 6}, - "enemy-base": {"frequency": 1, "size": 1, "richness": 1}, "iron-ore": {"frequency": 1, "size": 3, "richness": 6}, "stone": {"frequency": 1, "size": 3, "richness": 6}, + "uranium-ore": {"frequency": 1, "size": 3, "richness": 6}, + # misc "trees": {"frequency": 1, "size": 1, "richness": 1}, - "uranium-ore": {"frequency": 1, "size": 3, "richness": 6} + "enemy-base": {"frequency": 1, "size": 1, "richness": 1}, }, "seed": None, "starting_area": 1, @@ -336,8 +357,6 @@ class FactorioWorldGen(OptionDict): } schema = Schema({ "basic": { - Optional("terrain_segmentation"): FloatRange(0.166, 6), - Optional("water"): FloatRange(0.166, 6), Optional("autoplace_controls"): { str: { "frequency": FloatRange(0, 6), @@ -389,7 +408,7 @@ class FactorioWorldGen(OptionDict): } }) - def __init__(self, value: typing.Dict[str, typing.Any]): + def __init__(self, value: dict[str, typing.Any]): advanced = {"pollution", "enemy_evolution", "enemy_expansion"} self.value = { "basic": {k: v for k, v in value.items() if k not in advanced}, @@ -408,7 +427,7 @@ def optional_min_lte_max(container, min_key, max_key): optional_min_lte_max(enemy_expansion, "min_expansion_cooldown", "max_expansion_cooldown") @classmethod - def from_any(cls, data: typing.Dict[str, typing.Any]) -> FactorioWorldGen: + def from_any(cls, data: dict[str, typing.Any]) -> FactorioWorldGen: if type(data) == dict: return cls(data) else: @@ -422,7 +441,7 @@ class ImportedBlueprint(DefaultOnToggle): class EnergyLink(Toggle): """Allow sending energy to other worlds. 25% of the energy is lost in the transfer.""" - display_name = "EnergyLink" + display_name = "Energy Link" @dataclass @@ -438,6 +457,7 @@ class FactorioOptions(PerGameCommonOptions): silo: Silo satellite: Satellite free_samples: FreeSamples + free_samples_quality: FreeSamplesQuality tech_tree_information: TechTreeInformation starting_items: FactorioStartItems free_sample_blacklist: FactorioFreeSampleBlacklist @@ -453,9 +473,42 @@ class FactorioOptions(PerGameCommonOptions): cluster_grenade_traps: ClusterGrenadeTrapCount artillery_traps: ArtilleryTrapCount atomic_rocket_traps: AtomicRocketTrapCount + atomic_cliff_remover_traps: AtomicCliffRemoverTrapCount attack_traps: AttackTrapCount evolution_traps: EvolutionTrapCount evolution_trap_increase: EvolutionTrapIncrease death_link: DeathLink energy_link: EnergyLink start_inventory_from_pool: StartInventoryPool + + +option_groups: list[OptionGroup] = [ + OptionGroup( + "Technologies", + [ + TechTreeLayout, + Progressive, + MinTechCost, + MaxTechCost, + TechCostDistribution, + TechCostMix, + RampingTechCosts, + TechTreeInformation, + ] + ), + OptionGroup( + "Traps", + [ + AttackTrapCount, + EvolutionTrapCount, + EvolutionTrapIncrease, + TeleportTrapCount, + GrenadeTrapCount, + ClusterGrenadeTrapCount, + ArtilleryTrapCount, + AtomicRocketTrapCount, + AtomicCliffRemoverTrapCount, + ], + start_collapsed=True + ), +] diff --git a/worlds/factorio/Technologies.py b/worlds/factorio/Technologies.py index 112cc49f0920..6111462e8ca9 100644 --- a/worlds/factorio/Technologies.py +++ b/worlds/factorio/Technologies.py @@ -1,13 +1,13 @@ from __future__ import annotations -import orjson -import logging -import os -import string +import functools import pkgutil +import string from collections import Counter from concurrent.futures import ThreadPoolExecutor -from typing import Dict, Set, FrozenSet, Tuple, Union, List, Any +from typing import Dict, Set, FrozenSet, Tuple, Union, List, Any, Optional + +import orjson import Utils from . import Options @@ -32,8 +32,23 @@ def load_json_data(data_name: str) -> Union[List[str], Dict[str, Any]]: tech_table: Dict[str, int] = {} technology_table: Dict[str, Technology] = {} +start_unlocked_recipes = { + "offshore-pump", + "boiler", + "steam-engine", + "automation-science-pack", + "inserter", + "small-electric-pole", + "copper-cable", + "lab", + "electronic-circuit", + "electric-mining-drill", + "pipe", + "pipe-to-ground", +} + -def always(state): +def always(state) -> bool: return True @@ -50,15 +65,13 @@ def __hash__(self): class Technology(FactorioElement): # maybe make subclass of Location? has_modifier: bool factorio_id: int - ingredients: Set[str] progressive: Tuple[str] unlocks: Union[Set[str], bool] # bool case is for progressive technologies - def __init__(self, name: str, ingredients: Set[str], factorio_id: int, progressive: Tuple[str] = (), + def __init__(self, technology_name: str, factorio_id: int, progressive: Tuple[str] = (), has_modifier: bool = False, unlocks: Union[Set[str], bool] = None): - self.name = name + self.name = technology_name self.factorio_id = factorio_id - self.ingredients = ingredients self.progressive = progressive self.has_modifier = has_modifier if unlocks: @@ -66,19 +79,6 @@ def __init__(self, name: str, ingredients: Set[str], factorio_id: int, progressi else: self.unlocks = set() - def build_rule(self, player: int): - logging.debug(f"Building rules for {self.name}") - - return lambda state: all(state.has(f"Automated {ingredient}", player) - for ingredient in self.ingredients) - - def get_prior_technologies(self) -> Set[Technology]: - """Get Technologies that have to precede this one to resolve tree connections.""" - technologies = set() - for ingredient in self.ingredients: - technologies |= required_technologies[ingredient] # technologies that unlock the recipes - return technologies - def __hash__(self): return self.factorio_id @@ -91,22 +91,22 @@ def useful(self) -> bool: class CustomTechnology(Technology): """A particularly configured Technology for a world.""" + ingredients: Set[str] def __init__(self, origin: Technology, world, allowed_packs: Set[str], player: int): - ingredients = origin.ingredients & allowed_packs - military_allowed = "military-science-pack" in allowed_packs \ - and ((ingredients & {"chemical-science-pack", "production-science-pack", "utility-science-pack"}) - or origin.name == "rocket-silo") + ingredients = allowed_packs self.player = player if origin.name not in world.special_nodes: - if military_allowed: - ingredients.add("military-science-pack") - ingredients = list(ingredients) - ingredients.sort() # deterministic sample - ingredients = world.random.sample(ingredients, world.random.randint(1, len(ingredients))) - elif origin.name == "rocket-silo" and military_allowed: - ingredients.add("military-science-pack") - super(CustomTechnology, self).__init__(origin.name, ingredients, origin.factorio_id) + ingredients = set(world.random.sample(list(ingredients), world.random.randint(1, len(ingredients)))) + self.ingredients = ingredients + super(CustomTechnology, self).__init__(origin.name, origin.factorio_id) + + def get_prior_technologies(self) -> Set[Technology]: + """Get Technologies that have to precede this one to resolve tree connections.""" + technologies = set() + for ingredient in self.ingredients: + technologies |= required_technologies[ingredient] # technologies that unlock the recipes + return technologies class Recipe(FactorioElement): @@ -149,19 +149,22 @@ def rel_cost(self) -> float: ingredients = sum(self.ingredients.values()) return min(ingredients / amount for product, amount in self.products.items()) - @property + @functools.cached_property def base_cost(self) -> Dict[str, int]: ingredients = Counter() - for ingredient, cost in self.ingredients.items(): - if ingredient in all_product_sources: - for recipe in all_product_sources[ingredient]: - if recipe.ingredients: - ingredients.update({name: amount * cost / recipe.products[ingredient] for name, amount in - recipe.base_cost.items()}) - else: - ingredients[ingredient] += recipe.energy * cost / recipe.products[ingredient] - else: - ingredients[ingredient] += cost + try: + for ingredient, cost in self.ingredients.items(): + if ingredient in all_product_sources: + for recipe in all_product_sources[ingredient]: + if recipe.ingredients: + ingredients.update({name: amount * cost / recipe.products[ingredient] for name, amount in + recipe.base_cost.items()}) + else: + ingredients[ingredient] += recipe.energy * cost / recipe.products[ingredient] + else: + ingredients[ingredient] += cost + except RecursionError as e: + raise Exception(f"Infinite recursion in ingredients of {self}.") from e return ingredients @property @@ -191,9 +194,12 @@ def __init__(self, name, categories): # recipes and technologies can share names in Factorio for technology_name, data in sorted(techs_future.result().items()): - current_ingredients = set(data["ingredients"]) - technology = Technology(technology_name, current_ingredients, factorio_tech_id, - has_modifier=data["has_modifier"], unlocks=set(data["unlocks"])) + technology = Technology( + technology_name, + factorio_tech_id, + has_modifier=data["has_modifier"], + unlocks=set(data["unlocks"]) - start_unlocked_recipes, + ) factorio_tech_id += 1 tech_table[technology_name] = technology.factorio_id technology_table[technology_name] = technology @@ -226,11 +232,12 @@ def __init__(self, name, categories): recipes[recipe_name] = recipe if set(recipe.products).isdisjoint( # prevents loop recipes like uranium centrifuging - set(recipe.ingredients)) and ("empty-barrel" not in recipe.products or recipe.name == "empty-barrel") and \ + set(recipe.ingredients)) and ("barrel" not in recipe.products or recipe.name == "barrel") and \ not recipe_name.endswith("-reprocessing"): for product_name in recipe.products: all_product_sources.setdefault(product_name, set()).add(recipe) +assert all(recipe_name in raw_recipes for recipe_name in start_unlocked_recipes), "Unknown Recipe defined." machines: Dict[str, Machine] = {} @@ -248,9 +255,7 @@ def __init__(self, name, categories): # build requirements graph for all technology ingredients -all_ingredient_names: Set[str] = set() -for technology in technology_table.values(): - all_ingredient_names |= technology.ingredients +all_ingredient_names: Set[str] = set(Options.MaxSciencePack.get_ordered_science_packs()) def unlock_just_tech(recipe: Recipe, _done) -> Set[Technology]: @@ -319,13 +324,17 @@ def recursively_get_unlocking_technologies(ingredient_name, _done=None, unlock_f recursively_get_unlocking_technologies(ingredient_name, unlock_func=unlock))) -def get_rocket_requirements(silo_recipe: Recipe, part_recipe: Recipe, satellite_recipe: Recipe) -> Set[str]: +def get_rocket_requirements(silo_recipe: Optional[Recipe], part_recipe: Recipe, + satellite_recipe: Optional[Recipe], cargo_landing_pad_recipe: Optional[Recipe]) -> Set[str]: techs = set() if silo_recipe: for ingredient in silo_recipe.ingredients: techs |= recursively_get_unlocking_technologies(ingredient) for ingredient in part_recipe.ingredients: techs |= recursively_get_unlocking_technologies(ingredient) + if cargo_landing_pad_recipe: + for ingredient in cargo_landing_pad_recipe.ingredients: + techs |= recursively_get_unlocking_technologies(ingredient) if satellite_recipe: techs |= satellite_recipe.unlocking_technologies for ingredient in satellite_recipe.ingredients: @@ -382,15 +391,15 @@ def get_rocket_requirements(silo_recipe: Recipe, part_recipe: Recipe, satellite_ "uranium-processing", "kovarex-enrichment-process", "nuclear-fuel-reprocessing") progressive_rows["progressive-rocketry"] = ("rocketry", "explosive-rocketry", "atomic-bomb") progressive_rows["progressive-vehicle"] = ("automobilism", "tank", "spidertron") -progressive_rows["progressive-train-network"] = ("railway", "fluid-wagon", - "automated-rail-transportation", "rail-signals") +progressive_rows["progressive-fluid-handling"] = ("fluid-handling", "fluid-wagon") +progressive_rows["progressive-train-network"] = ("railway", "automated-rail-transportation") progressive_rows["progressive-engine"] = ("engine", "electric-engine") progressive_rows["progressive-armor"] = ("heavy-armor", "modular-armor", "power-armor", "power-armor-mk2") progressive_rows["progressive-personal-battery"] = ("battery-equipment", "battery-mk2-equipment") progressive_rows["progressive-energy-shield"] = ("energy-shield-equipment", "energy-shield-mk2-equipment") progressive_rows["progressive-wall"] = ("stone-wall", "gate") progressive_rows["progressive-follower"] = ("defender", "distractor", "destroyer") -progressive_rows["progressive-inserter"] = ("fast-inserter", "stack-inserter") +progressive_rows["progressive-inserter"] = ("fast-inserter", "bulk-inserter") progressive_rows["progressive-turret"] = ("gun-turret", "laser-turret") progressive_rows["progressive-flamethrower"] = ("flamethrower",) # leaving out flammables, as they do nothing progressive_rows["progressive-personal-roboport-equipment"] = ("personal-roboport-equipment", @@ -402,7 +411,7 @@ def get_rocket_requirements(silo_recipe: Recipe, part_recipe: Recipe, satellite_ source_target_mapping: Dict[str, str] = { "progressive-braking-force": "progressive-train-network", "progressive-inserter-capacity-bonus": "progressive-inserter", - "progressive-refined-flammables": "progressive-flamethrower" + "progressive-refined-flammables": "progressive-flamethrower", } for source, target in source_target_mapping.items(): @@ -416,12 +425,14 @@ def get_rocket_requirements(silo_recipe: Recipe, part_recipe: Recipe, satellite_ for root in sorted_rows: progressive = progressive_rows[root] - assert all(tech in tech_table for tech in progressive), "declared a progressive technology without base technology" + assert all(tech in tech_table for tech in progressive), \ + (f"Declared a progressive technology ({root}) without base technology. " + f"Missing: f{tuple(tech for tech in progressive if tech not in tech_table)}") factorio_tech_id += 1 - progressive_technology = Technology(root, technology_table[progressive[0]].ingredients, factorio_tech_id, - progressive, + progressive_technology = Technology(root, factorio_tech_id, + tuple(progressive), has_modifier=any(technology_table[tech].has_modifier for tech in progressive), - unlocks=any(technology_table[tech].unlocks for tech in progressive)) + unlocks=any(technology_table[tech].unlocks for tech in progressive),) progressive_tech_table[root] = progressive_technology.factorio_id progressive_technology_table[root] = progressive_technology diff --git a/worlds/factorio/__init__.py b/worlds/factorio/__init__.py index 925327655a24..8f8abeb292f1 100644 --- a/worlds/factorio/__init__.py +++ b/worlds/factorio/__init__.py @@ -2,19 +2,21 @@ import collections import logging -import settings import typing -from BaseClasses import Region, Entrance, Location, Item, Tutorial, ItemClassification +import Utils +import settings +from BaseClasses import Region, Location, Item, Tutorial, ItemClassification from worlds.AutoWorld import World, WebWorld from worlds.LauncherComponents import Component, components, Type, launch_subprocess from worlds.generic import Rules from .Locations import location_pools, location_table from .Mod import generate_mod -from .Options import FactorioOptions, MaxSciencePack, Silo, Satellite, TechTreeInformation, Goal, TechCostDistribution +from .Options import (FactorioOptions, MaxSciencePack, Silo, Satellite, TechTreeInformation, Goal, + TechCostDistribution, option_groups) from .Shapes import get_shapes from .Technologies import base_tech_table, recipe_sources, base_technology_table, \ - all_ingredient_names, all_product_sources, required_technologies, get_rocket_requirements, \ + all_product_sources, required_technologies, get_rocket_requirements, \ progressive_technology_table, common_tech_table, tech_to_progressive_lookup, progressive_tech_table, \ get_science_pack_pools, Recipe, recipes, technology_table, tech_table, factorio_base_id, useless_technologies, \ fluids, stacking_items, valid_ingredients, progressive_rows @@ -60,6 +62,7 @@ class FactorioWeb(WebWorld): "setup/en", ["Berserker, Farrak Kilhn"] )] + option_groups = option_groups class FactorioItem(Item): @@ -74,6 +77,7 @@ class FactorioItem(Item): all_items["Cluster Grenade Trap"] = factorio_base_id - 5 all_items["Artillery Trap"] = factorio_base_id - 6 all_items["Atomic Rocket Trap"] = factorio_base_id - 7 +all_items["Atomic Cliff Remover Trap"] = factorio_base_id - 8 class Factorio(World): @@ -97,19 +101,21 @@ class Factorio(World): item_name_groups = { "Progressive": set(progressive_tech_table.keys()), } - required_client_version = (0, 5, 0) - + required_client_version = (0, 5, 1) + if Utils.version_tuple < required_client_version: + raise Exception(f"Update Archipelago to use this world ({game}).") ordered_science_packs: typing.List[str] = MaxSciencePack.get_ordered_science_packs() tech_tree_layout_prerequisites: typing.Dict[FactorioScienceLocation, typing.Set[FactorioScienceLocation]] tech_mix: int = 0 skip_silo: bool = False origin_region_name = "Nauvis" science_locations: typing.List[FactorioScienceLocation] - + removed_technologies: typing.Set[str] settings: typing.ClassVar[FactorioSettings] def __init__(self, world, player: int): super(Factorio, self).__init__(world, player) + self.removed_technologies = useless_technologies.copy() self.advancement_technologies = set() self.custom_recipes = {} self.science_locations = [] @@ -137,6 +143,7 @@ def create_regions(self): self.options.grenade_traps + \ self.options.cluster_grenade_traps + \ self.options.atomic_rocket_traps + \ + self.options.atomic_cliff_remover_traps + \ self.options.artillery_traps location_pool = [] @@ -189,7 +196,8 @@ def sorter(loc: FactorioScienceLocation): def create_items(self) -> None: self.custom_technologies = self.set_custom_technologies() self.set_custom_recipes() - traps = ("Evolution", "Attack", "Teleport", "Grenade", "Cluster Grenade", "Artillery", "Atomic Rocket") + traps = ("Evolution", "Attack", "Teleport", "Grenade", "Cluster Grenade", "Artillery", "Atomic Rocket", + "Atomic Cliff Remover") for trap_name in traps: self.multiworld.itempool.extend(self.create_item(f"{trap_name} Trap") for _ in range(getattr(self.options, @@ -208,11 +216,9 @@ def create_items(self) -> None: for loc in self.science_locations: loc.revealed = True if self.skip_silo: - removed = useless_technologies | {"rocket-silo"} - else: - removed = useless_technologies + self.removed_technologies |= {"rocket-silo"} for tech_name in base_tech_table: - if tech_name not in removed: + if tech_name not in self.removed_technologies: progressive_item_name = tech_to_progressive_lookup.get(tech_name, tech_name) want_progressive = want_progressives[progressive_item_name] item_name = progressive_item_name if want_progressive else tech_name @@ -240,40 +246,49 @@ def set_rules(self): custom_recipe = self.custom_recipes[ingredient] location.access_rule = lambda state, ingredient=ingredient, custom_recipe=custom_recipe: \ - (ingredient not in technology_table or state.has(ingredient, player)) and \ + (not technology_table[ingredient].unlocks or state.has(ingredient, player)) and \ all(state.has(technology.name, player) for sub_ingredient in custom_recipe.ingredients for technology in required_technologies[sub_ingredient]) and \ all(state.has(technology.name, player) for technology in required_technologies[custom_recipe.crafting_machine]) + else: location.access_rule = lambda state, ingredient=ingredient: \ all(state.has(technology.name, player) for technology in required_technologies[ingredient]) for location in self.science_locations: - Rules.set_rule(location, lambda state, ingredients=location.ingredients: + Rules.set_rule(location, lambda state, ingredients=frozenset(location.ingredients): all(state.has(f"Automated {ingredient}", player) for ingredient in ingredients)) prerequisites = shapes.get(location) if prerequisites: - Rules.add_rule(location, lambda state, locations= - prerequisites: all(state.can_reach(loc) for loc in locations)) + Rules.add_rule(location, lambda state, locations=frozenset(prerequisites): + all(state.can_reach(loc) for loc in locations)) silo_recipe = None + cargo_pad_recipe = None if self.options.silo == Silo.option_spawn: - silo_recipe = self.custom_recipes["rocket-silo"] if "rocket-silo" in self.custom_recipes \ - else next(iter(all_product_sources.get("rocket-silo"))) + silo_recipe = self.get_recipe("rocket-silo") + cargo_pad_recipe = self.get_recipe("cargo-landing-pad") part_recipe = self.custom_recipes["rocket-part"] satellite_recipe = None if self.options.goal == Goal.option_satellite: - satellite_recipe = self.custom_recipes["satellite"] if "satellite" in self.custom_recipes \ - else next(iter(all_product_sources.get("satellite"))) - victory_tech_names = get_rocket_requirements(silo_recipe, part_recipe, satellite_recipe) - if self.options.silo != Silo.option_spawn: - victory_tech_names.add("rocket-silo") + satellite_recipe = self.get_recipe("satellite") + victory_tech_names = get_rocket_requirements(silo_recipe, part_recipe, satellite_recipe, cargo_pad_recipe) + if self.options.silo == Silo.option_spawn: + victory_tech_names -= {"rocket-silo"} + else: + victory_tech_names |= {"rocket-silo"} self.get_location("Rocket Launch").access_rule = lambda state: all(state.has(technology, player) for technology in victory_tech_names) - + for tech_name in victory_tech_names: + if not self.multiworld.get_all_state(True).has(tech_name, player): + print(tech_name) self.multiworld.completion_condition[player] = lambda state: state.has('Victory', player) + def get_recipe(self, name: str) -> Recipe: + return self.custom_recipes[name] if name in self.custom_recipes \ + else next(iter(all_product_sources.get(name))) + def generate_basic(self): map_basic_settings = self.options.world_gen.value["basic"] if map_basic_settings.get("seed", None) is None: # allow seed 0 @@ -321,9 +336,11 @@ def get_category(category: str, liquids: int) -> str: def make_quick_recipe(self, original: Recipe, pool: list, allow_liquids: int = 2, ingredients_offset: int = 0) -> Recipe: + count: int = len(original.ingredients) + ingredients_offset + assert len(pool) >= count, f"Can't pick {count} many items from pool {pool}." new_ingredients = {} liquids_used = 0 - for _ in range(len(original.ingredients) + ingredients_offset): + for _ in range(count): new_ingredient = pool.pop() if new_ingredient in fluids: while liquids_used == allow_liquids and new_ingredient in fluids: @@ -440,7 +457,8 @@ def set_custom_recipes(self): ingredients_offset = self.options.recipe_ingredients_offset original_rocket_part = recipes["rocket-part"] science_pack_pools = get_science_pack_pools() - valid_pool = sorted(science_pack_pools[self.options.max_science_pack.get_max_pack()] & valid_ingredients) + valid_pool = sorted(science_pack_pools[self.options.max_science_pack.get_max_pack()] + & valid_ingredients) self.random.shuffle(valid_pool) self.custom_recipes = {"rocket-part": Recipe("rocket-part", original_rocket_part.category, {valid_pool[x]: 10 for x in range(3 + ingredients_offset)}, @@ -489,7 +507,7 @@ def set_custom_recipes(self): needed_recipes = self.options.max_science_pack.get_allowed_packs() | {"rocket-part"} if self.options.silo != Silo.option_spawn: - needed_recipes |= {"rocket-silo"} + needed_recipes |= {"rocket-silo", "cargo-landing-pad"} if self.options.goal.value == Goal.option_satellite: needed_recipes |= {"satellite"} diff --git a/worlds/factorio/data/fluids.json b/worlds/factorio/data/fluids.json index 448ccf4e4921..6972690f5355 100644 --- a/worlds/factorio/data/fluids.json +++ b/worlds/factorio/data/fluids.json @@ -1 +1 @@ -["fluid-unknown","water","crude-oil","steam","heavy-oil","light-oil","petroleum-gas","sulfuric-acid","lubricant"] \ No newline at end of file +["water","steam","crude-oil","petroleum-gas","light-oil","heavy-oil","lubricant","sulfuric-acid","parameter-0","parameter-1","parameter-2","parameter-3","parameter-4","parameter-5","parameter-6","parameter-7","parameter-8","parameter-9","fluid-unknown"] \ No newline at end of file diff --git a/worlds/factorio/data/items.json b/worlds/factorio/data/items.json index fa34430f40c4..d9ec7befba90 100644 --- a/worlds/factorio/data/items.json +++ b/worlds/factorio/data/items.json @@ -1 +1 @@ -{"wooden-chest":50,"iron-chest":50,"steel-chest":50,"storage-tank":50,"transport-belt":100,"fast-transport-belt":100,"express-transport-belt":100,"underground-belt":50,"fast-underground-belt":50,"express-underground-belt":50,"splitter":50,"fast-splitter":50,"express-splitter":50,"loader":50,"fast-loader":50,"express-loader":50,"burner-inserter":50,"inserter":50,"long-handed-inserter":50,"fast-inserter":50,"filter-inserter":50,"stack-inserter":50,"stack-filter-inserter":50,"small-electric-pole":50,"medium-electric-pole":50,"big-electric-pole":50,"substation":50,"pipe":100,"pipe-to-ground":50,"pump":50,"rail":100,"train-stop":10,"rail-signal":50,"rail-chain-signal":50,"locomotive":5,"cargo-wagon":5,"fluid-wagon":5,"artillery-wagon":5,"car":1,"tank":1,"spidertron":1,"spidertron-remote":1,"logistic-robot":50,"construction-robot":50,"logistic-chest-active-provider":50,"logistic-chest-passive-provider":50,"logistic-chest-storage":50,"logistic-chest-buffer":50,"logistic-chest-requester":50,"roboport":10,"small-lamp":50,"red-wire":200,"green-wire":200,"arithmetic-combinator":50,"decider-combinator":50,"constant-combinator":50,"power-switch":50,"programmable-speaker":50,"stone-brick":100,"concrete":100,"hazard-concrete":100,"refined-concrete":100,"refined-hazard-concrete":100,"landfill":100,"cliff-explosives":20,"dummy-steel-axe":1,"repair-pack":100,"blueprint":1,"deconstruction-planner":1,"upgrade-planner":1,"blueprint-book":1,"copy-paste-tool":1,"cut-paste-tool":1,"boiler":50,"steam-engine":10,"solar-panel":50,"accumulator":50,"nuclear-reactor":10,"heat-pipe":50,"heat-exchanger":50,"steam-turbine":10,"burner-mining-drill":50,"electric-mining-drill":50,"offshore-pump":20,"pumpjack":20,"stone-furnace":50,"steel-furnace":50,"electric-furnace":50,"assembling-machine-1":50,"assembling-machine-2":50,"assembling-machine-3":50,"oil-refinery":10,"chemical-plant":10,"centrifuge":50,"lab":10,"beacon":10,"speed-module":50,"speed-module-2":50,"speed-module-3":50,"effectivity-module":50,"effectivity-module-2":50,"effectivity-module-3":50,"productivity-module":50,"productivity-module-2":50,"productivity-module-3":50,"rocket-silo":1,"satellite":1,"wood":100,"coal":50,"stone":50,"iron-ore":50,"copper-ore":50,"uranium-ore":50,"raw-fish":100,"iron-plate":100,"copper-plate":100,"solid-fuel":50,"steel-plate":100,"plastic-bar":100,"sulfur":50,"battery":200,"explosives":50,"crude-oil-barrel":10,"heavy-oil-barrel":10,"light-oil-barrel":10,"lubricant-barrel":10,"petroleum-gas-barrel":10,"sulfuric-acid-barrel":10,"water-barrel":10,"copper-cable":200,"iron-stick":100,"iron-gear-wheel":100,"empty-barrel":10,"electronic-circuit":200,"advanced-circuit":200,"processing-unit":100,"engine-unit":50,"electric-engine-unit":50,"flying-robot-frame":50,"rocket-control-unit":10,"low-density-structure":10,"rocket-fuel":10,"rocket-part":5,"nuclear-fuel":1,"uranium-235":100,"uranium-238":100,"uranium-fuel-cell":50,"used-up-uranium-fuel-cell":50,"automation-science-pack":200,"logistic-science-pack":200,"military-science-pack":200,"chemical-science-pack":200,"production-science-pack":200,"utility-science-pack":200,"space-science-pack":2000,"coin":100000,"pistol":5,"submachine-gun":5,"tank-machine-gun":1,"vehicle-machine-gun":1,"tank-flamethrower":1,"shotgun":5,"combat-shotgun":5,"rocket-launcher":5,"flamethrower":5,"land-mine":100,"artillery-wagon-cannon":1,"spidertron-rocket-launcher-1":1,"spidertron-rocket-launcher-2":1,"spidertron-rocket-launcher-3":1,"spidertron-rocket-launcher-4":1,"tank-cannon":1,"firearm-magazine":200,"piercing-rounds-magazine":200,"uranium-rounds-magazine":200,"shotgun-shell":200,"piercing-shotgun-shell":200,"cannon-shell":200,"explosive-cannon-shell":200,"uranium-cannon-shell":200,"explosive-uranium-cannon-shell":200,"artillery-shell":1,"rocket":200,"explosive-rocket":200,"atomic-bomb":10,"flamethrower-ammo":100,"grenade":100,"cluster-grenade":100,"poison-capsule":100,"slowdown-capsule":100,"defender-capsule":100,"distractor-capsule":100,"destroyer-capsule":100,"light-armor":1,"heavy-armor":1,"modular-armor":1,"power-armor":1,"power-armor-mk2":1,"solar-panel-equipment":20,"fusion-reactor-equipment":20,"battery-equipment":20,"battery-mk2-equipment":20,"belt-immunity-equipment":20,"exoskeleton-equipment":20,"personal-roboport-equipment":20,"personal-roboport-mk2-equipment":20,"night-vision-equipment":20,"energy-shield-equipment":20,"energy-shield-mk2-equipment":20,"personal-laser-defense-equipment":20,"discharge-defense-equipment":20,"discharge-defense-remote":1,"stone-wall":100,"gate":50,"gun-turret":50,"laser-turret":50,"flamethrower-turret":50,"artillery-turret":10,"artillery-targeting-remote":1,"radar":50,"player-port":50,"item-unknown":1,"electric-energy-interface":50,"linked-chest":10,"heat-interface":20,"linked-belt":10,"infinity-chest":10,"infinity-pipe":10,"selection-tool":1,"item-with-inventory":1,"item-with-label":1,"item-with-tags":1,"simple-entity-with-force":50,"simple-entity-with-owner":50,"burner-generator":10} \ No newline at end of file +{"wooden-chest":50,"iron-chest":50,"steel-chest":50,"storage-tank":50,"transport-belt":100,"fast-transport-belt":100,"express-transport-belt":100,"underground-belt":50,"fast-underground-belt":50,"express-underground-belt":50,"splitter":50,"fast-splitter":50,"express-splitter":50,"loader":50,"fast-loader":50,"express-loader":50,"burner-inserter":50,"inserter":50,"long-handed-inserter":50,"fast-inserter":50,"bulk-inserter":50,"small-electric-pole":50,"medium-electric-pole":50,"big-electric-pole":50,"substation":50,"pipe":100,"pipe-to-ground":50,"pump":50,"rail":100,"train-stop":10,"rail-signal":50,"rail-chain-signal":50,"locomotive":5,"cargo-wagon":5,"fluid-wagon":5,"artillery-wagon":5,"car":1,"tank":1,"spidertron":1,"logistic-robot":50,"construction-robot":50,"active-provider-chest":50,"passive-provider-chest":50,"storage-chest":50,"buffer-chest":50,"requester-chest":50,"roboport":10,"small-lamp":50,"arithmetic-combinator":50,"decider-combinator":50,"selector-combinator":50,"constant-combinator":50,"power-switch":10,"programmable-speaker":10,"display-panel":10,"stone-brick":100,"concrete":100,"hazard-concrete":100,"refined-concrete":100,"refined-hazard-concrete":100,"landfill":100,"cliff-explosives":20,"repair-pack":100,"blueprint":1,"deconstruction-planner":1,"upgrade-planner":1,"blueprint-book":1,"copy-paste-tool":1,"cut-paste-tool":1,"boiler":50,"steam-engine":10,"solar-panel":50,"accumulator":50,"nuclear-reactor":10,"heat-pipe":50,"heat-exchanger":50,"steam-turbine":10,"burner-mining-drill":50,"electric-mining-drill":50,"offshore-pump":20,"pumpjack":20,"stone-furnace":50,"steel-furnace":50,"electric-furnace":50,"assembling-machine-1":50,"assembling-machine-2":50,"assembling-machine-3":50,"oil-refinery":10,"chemical-plant":10,"centrifuge":50,"lab":10,"beacon":20,"speed-module":50,"speed-module-2":50,"speed-module-3":50,"efficiency-module":50,"efficiency-module-2":50,"efficiency-module-3":50,"productivity-module":50,"productivity-module-2":50,"productivity-module-3":50,"empty-module-slot":1,"rocket-silo":1,"cargo-landing-pad":1,"satellite":1,"wood":100,"coal":50,"stone":50,"iron-ore":50,"copper-ore":50,"uranium-ore":50,"raw-fish":100,"iron-plate":100,"copper-plate":100,"steel-plate":100,"solid-fuel":50,"plastic-bar":100,"sulfur":50,"battery":200,"explosives":50,"water-barrel":10,"crude-oil-barrel":10,"petroleum-gas-barrel":10,"light-oil-barrel":10,"heavy-oil-barrel":10,"lubricant-barrel":10,"sulfuric-acid-barrel":10,"iron-gear-wheel":100,"iron-stick":100,"copper-cable":200,"barrel":10,"electronic-circuit":200,"advanced-circuit":200,"processing-unit":100,"engine-unit":50,"electric-engine-unit":50,"flying-robot-frame":50,"low-density-structure":50,"rocket-fuel":20,"rocket-part":5,"uranium-235":100,"uranium-238":100,"uranium-fuel-cell":50,"depleted-uranium-fuel-cell":50,"nuclear-fuel":1,"automation-science-pack":200,"logistic-science-pack":200,"military-science-pack":200,"chemical-science-pack":200,"production-science-pack":200,"utility-science-pack":200,"space-science-pack":2000,"coin":100000,"science":1,"pistol":5,"submachine-gun":5,"tank-machine-gun":1,"vehicle-machine-gun":1,"tank-flamethrower":1,"shotgun":5,"combat-shotgun":5,"rocket-launcher":5,"flamethrower":5,"artillery-wagon-cannon":1,"spidertron-rocket-launcher-1":1,"spidertron-rocket-launcher-2":1,"spidertron-rocket-launcher-3":1,"spidertron-rocket-launcher-4":1,"tank-cannon":1,"firearm-magazine":100,"piercing-rounds-magazine":100,"uranium-rounds-magazine":100,"shotgun-shell":100,"piercing-shotgun-shell":100,"cannon-shell":100,"explosive-cannon-shell":100,"uranium-cannon-shell":100,"explosive-uranium-cannon-shell":100,"artillery-shell":1,"rocket":100,"explosive-rocket":100,"atomic-bomb":10,"flamethrower-ammo":100,"grenade":100,"cluster-grenade":100,"poison-capsule":100,"slowdown-capsule":100,"defender-capsule":100,"distractor-capsule":100,"destroyer-capsule":100,"light-armor":1,"heavy-armor":1,"modular-armor":1,"power-armor":1,"power-armor-mk2":1,"solar-panel-equipment":20,"fission-reactor-equipment":20,"battery-equipment":20,"battery-mk2-equipment":20,"belt-immunity-equipment":20,"exoskeleton-equipment":20,"personal-roboport-equipment":20,"personal-roboport-mk2-equipment":20,"night-vision-equipment":20,"energy-shield-equipment":20,"energy-shield-mk2-equipment":20,"personal-laser-defense-equipment":20,"discharge-defense-equipment":20,"stone-wall":100,"gate":50,"radar":50,"land-mine":100,"gun-turret":50,"laser-turret":50,"flamethrower-turret":50,"artillery-turret":10,"parameter-0":1,"parameter-1":1,"parameter-2":1,"parameter-3":1,"parameter-4":1,"parameter-5":1,"parameter-6":1,"parameter-7":1,"parameter-8":1,"parameter-9":1,"copper-wire":1,"green-wire":1,"red-wire":1,"spidertron-remote":1,"discharge-defense-remote":1,"artillery-targeting-remote":1,"item-unknown":1,"electric-energy-interface":50,"linked-chest":10,"heat-interface":20,"lane-splitter":50,"linked-belt":10,"infinity-chest":10,"infinity-pipe":10,"selection-tool":1,"simple-entity-with-force":50,"simple-entity-with-owner":50,"burner-generator":10} \ No newline at end of file diff --git a/worlds/factorio/data/machines.json b/worlds/factorio/data/machines.json index 15a79580d060..c8629ab8bef0 100644 --- a/worlds/factorio/data/machines.json +++ b/worlds/factorio/data/machines.json @@ -1 +1 @@ -{"stone-furnace":{"smelting":true},"steel-furnace":{"smelting":true},"electric-furnace":{"smelting":true},"assembling-machine-1":{"crafting":true,"basic-crafting":true,"advanced-crafting":true},"assembling-machine-2":{"basic-crafting":true,"crafting":true,"advanced-crafting":true,"crafting-with-fluid":true},"assembling-machine-3":{"basic-crafting":true,"crafting":true,"advanced-crafting":true,"crafting-with-fluid":true},"oil-refinery":{"oil-processing":true},"chemical-plant":{"chemistry":true},"centrifuge":{"centrifuging":true},"rocket-silo":{"rocket-building":true},"character":{"crafting":true}} \ No newline at end of file +{"stone-furnace":{"smelting":true},"steel-furnace":{"smelting":true},"electric-furnace":{"smelting":true},"assembling-machine-1":{"crafting":true,"basic-crafting":true,"advanced-crafting":true,"parameters":true},"assembling-machine-2":{"basic-crafting":true,"crafting":true,"advanced-crafting":true,"crafting-with-fluid":true,"parameters":true},"assembling-machine-3":{"basic-crafting":true,"crafting":true,"advanced-crafting":true,"crafting-with-fluid":true,"parameters":true},"oil-refinery":{"oil-processing":true,"parameters":true},"chemical-plant":{"chemistry":true,"parameters":true},"centrifuge":{"centrifuging":true,"parameters":true},"rocket-silo":{"rocket-building":true,"parameters":true},"character":{"crafting":true}} \ No newline at end of file diff --git a/worlds/factorio/data/mod/lib.lua b/worlds/factorio/data/mod/lib.lua index 2b18f119a427..517a54e3d642 100644 --- a/worlds/factorio/data/mod/lib.lua +++ b/worlds/factorio/data/mod/lib.lua @@ -1,9 +1,9 @@ function get_any_stack_size(name) - local item = game.item_prototypes[name] + local item = prototypes.item[name] if item ~= nil then return item.stack_size end - item = game.equipment_prototypes[name] + item = prototypes.equipment[name] if item ~= nil then return item.stack_size end @@ -24,16 +24,27 @@ function split(s, sep) end function random_offset_position(position, offset) - return {x=position.x+math.random(-offset, offset), y=position.y+math.random(-1024, 1024)} + return {x=position.x+math.random(-offset, offset), y=position.y+math.random(-offset, offset)} end function fire_entity_at_players(entity_name, speed) + local entities = {} for _, player in ipairs(game.forces["player"].players) do - current_character = player.character - if current_character ~= nil then - current_character.surface.create_entity{name=entity_name, - position=random_offset_position(current_character.position, 128), - target=current_character, speed=speed} + if player.character ~= nil then + table.insert(entities, player.character) end end -end \ No newline at end of file + return fire_entity_at_entities(entity_name, entities, speed) +end + +function fire_entity_at_entities(entity_name, entities, speed) + for _, current_entity in ipairs(entities) do + local target = current_entity + if target.health == nil then + target = target.position + end + current_entity.surface.create_entity{name=entity_name, + position=random_offset_position(current_entity.position, 128), + target=target, speed=speed} + end +end diff --git a/worlds/factorio/data/mod_template/control.lua b/worlds/factorio/data/mod_template/control.lua index ace231e12b4b..e486c7433095 100644 --- a/worlds/factorio/data/mod_template/control.lua +++ b/worlds/factorio/data/mod_template/control.lua @@ -105,8 +105,8 @@ function on_player_changed_position(event) end local target_direction = exit_table[outbound_direction] - local target_position = {(CHUNK_OFFSET[target_direction][1] + last_x_chunk) * 32 + 16, - (CHUNK_OFFSET[target_direction][2] + last_y_chunk) * 32 + 16} + local target_position = {(CHUNK_OFFSET[target_direction][1] + last_x_chunk) * 32 + 16, + (CHUNK_OFFSET[target_direction][2] + last_y_chunk) * 32 + 16} target_position = character.surface.find_non_colliding_position(character.prototype.name, target_position, 32, 0.5) if target_position ~= nil then @@ -134,40 +134,96 @@ end script.on_event(defines.events.on_player_changed_position, on_player_changed_position) {% endif %} - +function count_energy_bridges() + local count = 0 + for i, bridge in pairs(storage.energy_link_bridges) do + if validate_energy_link_bridge(i, bridge) then + count = count + 1 + (bridge.quality.level * 0.3) + end + end + return count +end +function get_energy_increment(bridge) + return ENERGY_INCREMENT + (ENERGY_INCREMENT * 0.3 * bridge.quality.level) +end function on_check_energy_link(event) --- assuming 1 MJ increment and 5MJ battery: --- first 2 MJ request fill, last 2 MJ push energy, middle 1 MJ does nothing if event.tick % 60 == 30 then - local surface = game.get_surface(1) local force = "player" - local bridges = surface.find_entities_filtered({name="ap-energy-bridge", force=force}) - local bridgecount = table_size(bridges) - global.forcedata[force].energy_bridges = bridgecount - if global.forcedata[force].energy == nil then - global.forcedata[force].energy = 0 + local bridges = storage.energy_link_bridges + local bridgecount = count_energy_bridges() + storage.forcedata[force].energy_bridges = bridgecount + if storage.forcedata[force].energy == nil then + storage.forcedata[force].energy = 0 end - if global.forcedata[force].energy < ENERGY_INCREMENT * bridgecount * 5 then - for i, bridge in ipairs(bridges) do - if bridge.energy > ENERGY_INCREMENT*3 then - global.forcedata[force].energy = global.forcedata[force].energy + (ENERGY_INCREMENT * ENERGY_LINK_EFFICIENCY) - bridge.energy = bridge.energy - ENERGY_INCREMENT + if storage.forcedata[force].energy < ENERGY_INCREMENT * bridgecount * 5 then + for i, bridge in pairs(bridges) do + if validate_energy_link_bridge(i, bridge) then + energy_increment = get_energy_increment(bridge) + if bridge.energy > energy_increment*3 then + storage.forcedata[force].energy = storage.forcedata[force].energy + (energy_increment * ENERGY_LINK_EFFICIENCY) + bridge.energy = bridge.energy - energy_increment + end end end end - for i, bridge in ipairs(bridges) do - if global.forcedata[force].energy < ENERGY_INCREMENT then - break - end - if bridge.energy < ENERGY_INCREMENT*2 and global.forcedata[force].energy > ENERGY_INCREMENT then - global.forcedata[force].energy = global.forcedata[force].energy - ENERGY_INCREMENT - bridge.energy = bridge.energy + ENERGY_INCREMENT + for i, bridge in pairs(bridges) do + if validate_energy_link_bridge(i, bridge) then + energy_increment = get_energy_increment(bridge) + if storage.forcedata[force].energy < energy_increment and bridge.quality.level == 0 then + break + end + if bridge.energy < energy_increment*2 and storage.forcedata[force].energy > energy_increment then + storage.forcedata[force].energy = storage.forcedata[force].energy - energy_increment + bridge.energy = bridge.energy + energy_increment + end end end end end +function string_starts_with(str, start) + return str:sub(1, #start) == start +end +function validate_energy_link_bridge(unit_number, entity) + if not entity then + if storage.energy_link_bridges[unit_number] == nil then return false end + storage.energy_link_bridges[unit_number] = nil + return false + end + if not entity.valid then + if storage.energy_link_bridges[unit_number] == nil then return false end + storage.energy_link_bridges[unit_number] = nil + return false + end + return true +end +function on_energy_bridge_constructed(entity) + if entity and entity.valid then + if string_starts_with(entity.prototype.name, "ap-energy-bridge") then + storage.energy_link_bridges[entity.unit_number] = entity + end + end +end +function on_energy_bridge_removed(entity) + if string_starts_with(entity.prototype.name, "ap-energy-bridge") then + if storage.energy_link_bridges[entity.unit_number] == nil then return end + storage.energy_link_bridges[entity.unit_number] = nil + end +end if (ENERGY_INCREMENT) then script.on_event(defines.events.on_tick, on_check_energy_link) + + script.on_event({defines.events.on_built_entity}, function(event) on_energy_bridge_constructed(event.entity) end) + script.on_event({defines.events.on_robot_built_entity}, function(event) on_energy_bridge_constructed(event.entity) end) + script.on_event({defines.events.on_entity_cloned}, function(event) on_energy_bridge_constructed(event.destination) end) + + script.on_event({defines.events.script_raised_revive}, function(event) on_energy_bridge_constructed(event.entity) end) + script.on_event({defines.events.script_raised_built}, function(event) on_energy_bridge_constructed(event.entity) end) + + script.on_event({defines.events.on_entity_died}, function(event) on_energy_bridge_removed(event.entity) end) + script.on_event({defines.events.on_player_mined_entity}, function(event) on_energy_bridge_removed(event.entity) end) + script.on_event({defines.events.on_robot_mined_entity}, function(event) on_energy_bridge_removed(event.entity) end) end {% if not imported_blueprints -%} @@ -186,23 +242,41 @@ function check_spawn_silo(force) local surface = game.get_surface(1) local spawn_position = force.get_spawn_position(surface) spawn_entity(surface, force, "rocket-silo", spawn_position.x, spawn_position.y, 80, true, true) + spawn_entity(surface, force, "cargo-landing-pad", spawn_position.x, spawn_position.y, 80, true, true) end end function check_despawn_silo(force) - if not force.players or #force.players < 1 and force.get_entity_count("rocket-silo") > 0 then - local surface = game.get_surface(1) - local spawn_position = force.get_spawn_position(surface) - local x1 = spawn_position.x - 41 - local x2 = spawn_position.x + 41 - local y1 = spawn_position.y - 41 - local y2 = spawn_position.y + 41 - local silos = surface.find_entities_filtered{area = { {x1, y1}, {x2, y2} }, - name = "rocket-silo", - force = force} - for i,silo in ipairs(silos) do - silo.destructible = true - silo.destroy() + if not force.players or #force.players < 1 then + if force.get_entity_count("rocket-silo") > 0 then + local surface = game.get_surface(1) + local spawn_position = force.get_spawn_position(surface) + local x1 = spawn_position.x - 41 + local x2 = spawn_position.x + 41 + local y1 = spawn_position.y - 41 + local y2 = spawn_position.y + 41 + local silos = surface.find_entities_filtered{area = { {x1, y1}, {x2, y2} }, + name = "rocket-silo", + force = force} + for i, silo in ipairs(silos) do + silo.destructible = true + silo.destroy() + end + end + if force.get_entity_count("cargo-landing-pad") > 0 then + local surface = game.get_surface(1) + local spawn_position = force.get_spawn_position(surface) + local x1 = spawn_position.x - 41 + local x2 = spawn_position.x + 41 + local y1 = spawn_position.y - 41 + local y2 = spawn_position.y + 41 + local pads = surface.find_entities_filtered{area = { {x1, y1}, {x2, y2} }, + name = "cargo-landing-pad", + force = force} + for i, pad in ipairs(pads) do + pad.destructible = true + pad.destroy() + end end end end @@ -214,19 +288,18 @@ function on_force_created(event) if type(event.force) == "string" then -- should be of type LuaForce force = game.forces[force] end - force.research_queue_enabled = true local data = {} data['earned_samples'] = {{ dict_to_lua(starting_items) }} data["victory"] = 0 data["death_link_tick"] = 0 data["energy"] = 0 data["energy_bridges"] = 0 - global.forcedata[event.force] = data + storage.forcedata[event.force] = data {%- if silo == 2 %} check_spawn_silo(force) {%- endif %} -{%- for tech_name in useless_technologies %} - force.technologies.{{ tech_name }}.researched = true +{%- for tech_name in removed_technologies %} + force.technologies["{{ tech_name }}"].researched = true {%- endfor %} end script.on_event(defines.events.on_force_created, on_force_created) @@ -236,7 +309,7 @@ function on_force_destroyed(event) {%- if silo == 2 %} check_despawn_silo(event.force) {%- endif %} - global.forcedata[event.force.name] = nil + storage.forcedata[event.force.name] = nil end function on_runtime_mod_setting_changed(event) @@ -267,8 +340,8 @@ function on_player_created(event) -- FIXME: This (probably) fires before any other mod has a chance to change the player's force -- For now, they will (probably) always be on the 'player' force when this event fires. local data = {} - data['pending_samples'] = table.deepcopy(global.forcedata[player.force.name]['earned_samples']) - global.playerdata[player.index] = data + data['pending_samples'] = table.deepcopy(storage.forcedata[player.force.name]['earned_samples']) + storage.playerdata[player.index] = data update_player(player.index) -- Attempt to send pending free samples, if relevant. {%- if silo == 2 %} check_spawn_silo(game.players[event.player_index].force) @@ -287,14 +360,19 @@ end script.on_event(defines.events.on_player_changed_force, on_player_changed_force) function on_player_removed(event) - global.playerdata[event.player_index] = nil + storage.playerdata[event.player_index] = nil end script.on_event(defines.events.on_player_removed, on_player_removed) function on_rocket_launched(event) - if event.rocket and event.rocket.valid and global.forcedata[event.rocket.force.name]['victory'] == 0 then - if event.rocket.get_item_count("satellite") > 0 or GOAL == 0 then - global.forcedata[event.rocket.force.name]['victory'] = 1 + if event.rocket and event.rocket.valid and storage.forcedata[event.rocket.force.name]['victory'] == 0 then + satellite_count = 0 + cargo_pod = event.rocket.cargo_pod + if cargo_pod then + satellite_count = cargo_pod.get_item_count("satellite") + end + if satellite_count > 0 or GOAL == 0 then + storage.forcedata[event.rocket.force.name]['victory'] = 1 dumpInfo(event.rocket.force) game.set_game_state { @@ -318,7 +396,7 @@ function update_player(index) if not character or not character.valid then return end - local data = global.playerdata[index] + local data = storage.playerdata[index] local samples = data['pending_samples'] local sent --player.print(serpent.block(data['pending_samples'])) @@ -327,14 +405,17 @@ function update_player(index) for name, count in pairs(samples) do stack.name = name stack.count = count - if game.item_prototypes[name] then + if script.active_mods["quality"] then + stack.quality = "{{ free_sample_quality_name }}" + end + if prototypes.item[name] then if character.can_insert(stack) then sent = character.insert(stack) else sent = 0 end if sent > 0 then - player.print("Received " .. sent .. "x [item=" .. name .. "]") + player.print("Received " .. sent .. "x [item=" .. name .. ",quality={{ free_sample_quality_name }}]") data.suppress_full_inventory_message = false end if sent ~= count then -- Couldn't full send. @@ -372,19 +453,20 @@ function add_samples(force, name, count) end t[name] = (t[name] or 0) + count end - -- Add to global table of earned samples for future new players - add_to_table(global.forcedata[force.name]['earned_samples']) + -- Add to storage table of earned samples for future new players + add_to_table(storage.forcedata[force.name]['earned_samples']) -- Add to existing players for _, player in pairs(force.players) do - add_to_table(global.playerdata[player.index]['pending_samples']) + add_to_table(storage.playerdata[player.index]['pending_samples']) update_player(player.index) end end script.on_init(function() {% if not imported_blueprints %}set_permissions(){% endif %} - global.forcedata = {} - global.playerdata = {} + storage.forcedata = {} + storage.playerdata = {} + storage.energy_link_bridges = {} -- Fire dummy events for all currently existing forces. local e = {} for name, _ in pairs(game.forces) do @@ -420,12 +502,12 @@ script.on_event(defines.events.on_research_finished, function(event) if FREE_SAMPLES == 0 then return -- Nothing else to do end - if not technology.effects then + if not technology.prototype.effects then return -- No technology effects, so nothing to do. end - for _, effect in pairs(technology.effects) do + for _, effect in pairs(technology.prototype.effects) do if effect.type == "unlock-recipe" then - local recipe = game.recipe_prototypes[effect.recipe] + local recipe = prototypes.recipe[effect.recipe] for _, result in pairs(recipe.products) do if result.type == "item" and result.amount then local name = result.name @@ -477,7 +559,7 @@ function kill_players(force) end function spawn_entity(surface, force, name, x, y, radius, randomize, avoid_ores) - local prototype = game.entity_prototypes[name] + local prototype = prototypes.entity[name] local args = { -- For can_place_entity and place_entity name = prototype.name, position = {x = x, y = y}, @@ -537,7 +619,7 @@ function spawn_entity(surface, force, name, x, y, radius, randomize, avoid_ores) } local entities = surface.find_entities_filtered { area = collision_area, - collision_mask = prototype.collision_mask + collision_mask = prototype.collision_mask.layers } local can_place = true for _, entity in pairs(entities) do @@ -560,6 +642,9 @@ function spawn_entity(surface, force, name, x, y, radius, randomize, avoid_ores) end args.build_check_type = defines.build_check_type.script args.create_build_effect_smoke = false + if script.active_mods["quality"] then + args.quality = "{{ free_sample_quality_name }}" + end new_entity = surface.create_entity(args) if new_entity then new_entity.destructible = false @@ -585,7 +670,7 @@ script.on_event(defines.events.on_entity_died, function(event) end local force = event.entity.force - global.forcedata[force.name].death_link_tick = game.tick + storage.forcedata[force.name].death_link_tick = game.tick dumpInfo(force) kill_players(force) end, {LuaEntityDiedEventFilter = {["filter"] = "name", ["name"] = "character"}}) @@ -600,7 +685,7 @@ commands.add_command("ap-sync", "Used by the Archipelago client to get progress force = game.players[call.player_index].force end local research_done = {} - local forcedata = chain_lookup(global, "forcedata", force.name) + local forcedata = chain_lookup(storage, "forcedata", force.name) local data_collection = { ["research_done"] = research_done, ["victory"] = chain_lookup(forcedata, "victory"), @@ -616,7 +701,7 @@ commands.add_command("ap-sync", "Used by the Archipelago client to get progress research_done[tech_name] = tech.researched end end - rcon.print(game.table_to_json({["slot_name"] = SLOT_NAME, ["seed_name"] = SEED_NAME, ["info"] = data_collection})) + rcon.print(helpers.table_to_json({["slot_name"] = SLOT_NAME, ["seed_name"] = SEED_NAME, ["info"] = data_collection})) end) commands.add_command("ap-print", "Used by the Archipelago client to print messages", function (call) @@ -652,11 +737,18 @@ end, ["Atomic Rocket Trap"] = function () fire_entity_at_players("atomic-rocket", 0.1) end, +["Atomic Cliff Remover Trap"] = function () + local cliffs = game.surfaces["nauvis"].find_entities_filtered{type = "cliff"} + + if #cliffs > 0 then + fire_entity_at_entities("atomic-rocket", {cliffs[math.random(#cliffs)]}, 0.1) + end +end, } commands.add_command("ap-get-technology", "Grant a technology, used by the Archipelago Client.", function(call) - if global.index_sync == nil then - global.index_sync = {} + if storage.index_sync == nil then + storage.index_sync = {} end local tech local force = game.forces["player"] @@ -680,8 +772,8 @@ commands.add_command("ap-get-technology", "Grant a technology, used by the Archi end return elseif progressive_technologies[item_name] ~= nil then - if global.index_sync[index] ~= item_name then -- not yet received prog item - global.index_sync[index] = item_name + if storage.index_sync[index] ~= item_name then -- not yet received prog item + storage.index_sync[index] = item_name local tech_stack = progressive_technologies[item_name] for _, item_name in ipairs(tech_stack) do tech = force.technologies[item_name] @@ -696,7 +788,7 @@ commands.add_command("ap-get-technology", "Grant a technology, used by the Archi elseif force.technologies[item_name] ~= nil then tech = force.technologies[item_name] if tech ~= nil then - global.index_sync[index] = tech + storage.index_sync[index] = tech if tech.researched ~= true then game.print({"", "Received [technology=" .. tech.name .. "] from ", source}) game.play_sound({path="utility/research_completed"}) @@ -704,8 +796,8 @@ commands.add_command("ap-get-technology", "Grant a technology, used by the Archi end end elseif TRAP_TABLE[item_name] ~= nil then - if global.index_sync[index] ~= item_name then -- not yet received trap - global.index_sync[index] = item_name + if storage.index_sync[index] ~= item_name then -- not yet received trap + storage.index_sync[index] = item_name game.print({"", "Received ", item_name, " from ", source}) TRAP_TABLE[item_name]() end @@ -716,7 +808,7 @@ end) commands.add_command("ap-rcon-info", "Used by the Archipelago client to get information", function(call) - rcon.print(game.table_to_json({ + rcon.print(helpers.table_to_json({ ["slot_name"] = SLOT_NAME, ["seed_name"] = SEED_NAME, ["death_link"] = DEATH_LINK, @@ -726,7 +818,7 @@ end) {% if allow_cheats -%} -commands.add_command("ap-spawn-silo", "Attempts to spawn a silo around 0,0", function(call) +commands.add_command("ap-spawn-silo", "Attempts to spawn a silo and cargo landing pad around 0,0", function(call) spawn_entity(game.player.surface, game.player.force, "rocket-silo", 0, 0, 80, true, true) end) {% endif -%} @@ -742,7 +834,7 @@ end) commands.add_command("ap-energylink", "Used by the Archipelago client to manage Energy Link", function(call) local change = tonumber(call.parameter or "0") local force = "player" - global.forcedata[force].energy = global.forcedata[force].energy + change + storage.forcedata[force].energy = storage.forcedata[force].energy + change end) commands.add_command("energy-link", "Print the status of the Archipelago energy link.", function(call) diff --git a/worlds/factorio/data/mod_template/data-final-fixes.lua b/worlds/factorio/data/mod_template/data-final-fixes.lua index 3021fd5dadca..dc068c4f62aa 100644 --- a/worlds/factorio/data/mod_template/data-final-fixes.lua +++ b/worlds/factorio/data/mod_template/data-final-fixes.lua @@ -6,43 +6,46 @@ data.raw["rocket-silo"]["rocket-silo"].fluid_boxes = { production_type = "input", pipe_picture = assembler2pipepictures(), pipe_covers = pipecoverspictures(), + volume = 1000, base_area = 10, base_level = -1, pipe_connections = { - { type = "input", position = { 0, 5 } }, - { type = "input", position = { 0, -5 } }, - { type = "input", position = { 5, 0 } }, - { type = "input", position = { -5, 0 } } + { flow_direction = "input", direction = defines.direction.south, position = { 0, 4.2 } }, + { flow_direction = "input", direction = defines.direction.north, position = { 0, -4.2 } }, + { flow_direction = "input", direction = defines.direction.east, position = { 4.2, 0 } }, + { flow_direction = "input", direction = defines.direction.west, position = { -4.2, 0 } } } }, { production_type = "input", pipe_picture = assembler2pipepictures(), pipe_covers = pipecoverspictures(), + volume = 1000, base_area = 10, base_level = -1, pipe_connections = { - { type = "input", position = { -3, 5 } }, - { type = "input", position = { -3, -5 } }, - { type = "input", position = { 5, -3 } }, - { type = "input", position = { -5, -3 } } + { flow_direction = "input", direction = defines.direction.south, position = { -3, 4.2 } }, + { flow_direction = "input", direction = defines.direction.north, position = { -3, -4.2 } }, + { flow_direction = "input", direction = defines.direction.east, position = { 4.2, -3 } }, + { flow_direction = "input", direction = defines.direction.west, position = { -4.2, -3 } } } }, { production_type = "input", pipe_picture = assembler2pipepictures(), pipe_covers = pipecoverspictures(), + volume = 1000, base_area = 10, base_level = -1, pipe_connections = { - { type = "input", position = { 3, 5 } }, - { type = "input", position = { 3, -5 } }, - { type = "input", position = { 5, 3 } }, - { type = "input", position = { -5, 3 } } + { flow_direction = "input", direction = defines.direction.south, position = { 3, 4.2 } }, + { flow_direction = "input", direction = defines.direction.north, position = { 3, -4.2 } }, + { flow_direction = "input", direction = defines.direction.east, position = { 4.2, 3 } }, + { flow_direction = "input", direction = defines.direction.west, position = { -4.2, 3 } } } - }, - off_when_no_fluid_recipe = true + } } +data.raw["rocket-silo"]["rocket-silo"].fluid_boxes_off_when_no_fluid_recipe = true {%- for recipe_name, recipe in custom_recipes.items() %} data.raw["recipe"]["{{recipe_name}}"].category = "{{recipe.category}}" diff --git a/worlds/factorio/data/mod_template/data.lua b/worlds/factorio/data/mod_template/data.lua index 82053453eadf..43151ff00840 100644 --- a/worlds/factorio/data/mod_template/data.lua +++ b/worlds/factorio/data/mod_template/data.lua @@ -18,12 +18,9 @@ energy_bridge.energy_source.buffer_capacity = "50MJ" energy_bridge.energy_source.input_flow_limit = "10MW" energy_bridge.energy_source.output_flow_limit = "10MW" tint_icon(energy_bridge, energy_bridge_tint()) -energy_bridge.picture.layers[1].tint = energy_bridge_tint() -energy_bridge.picture.layers[1].hr_version.tint = energy_bridge_tint() -energy_bridge.charge_animation.layers[1].layers[1].tint = energy_bridge_tint() -energy_bridge.charge_animation.layers[1].layers[1].hr_version.tint = energy_bridge_tint() -energy_bridge.discharge_animation.layers[1].layers[1].tint = energy_bridge_tint() -energy_bridge.discharge_animation.layers[1].layers[1].hr_version.tint = energy_bridge_tint() +energy_bridge.chargable_graphics.picture.layers[1].tint = energy_bridge_tint() +energy_bridge.chargable_graphics.charge_animation.layers[1].layers[1].tint = energy_bridge_tint() +energy_bridge.chargable_graphics.discharge_animation.layers[1].layers[1].tint = energy_bridge_tint() data.raw["accumulator"]["ap-energy-bridge"] = energy_bridge local energy_bridge_item = table.deepcopy(data.raw["item"]["accumulator"]) @@ -35,9 +32,9 @@ data.raw["item"]["ap-energy-bridge"] = energy_bridge_item local energy_bridge_recipe = table.deepcopy(data.raw["recipe"]["accumulator"]) energy_bridge_recipe.name = "ap-energy-bridge" -energy_bridge_recipe.result = energy_bridge_item.name +energy_bridge_recipe.results = { {type = "item", name = energy_bridge_item.name, amount = 1} } energy_bridge_recipe.energy_required = 1 -energy_bridge_recipe.enabled = {{ energy_link }} +energy_bridge_recipe.enabled = {% if energy_link %}true{% else %}false{% endif %} energy_bridge_recipe.localised_name = "Archipelago EnergyLink Bridge" data.raw["recipe"]["ap-energy-bridge"] = energy_bridge_recipe diff --git a/worlds/factorio/data/mod_template/macros.lua b/worlds/factorio/data/mod_template/macros.lua index 1b271031a393..f1530359c823 100644 --- a/worlds/factorio/data/mod_template/macros.lua +++ b/worlds/factorio/data/mod_template/macros.lua @@ -26,4 +26,4 @@ {type = {% if key in liquids %}"fluid"{% else %}"item"{% endif %}, name = "{{ key }}", amount = {{ value | safe }}}{% if not loop.last %},{% endif %} {% endfor -%} } -{%- endmacro %} \ No newline at end of file +{%- endmacro %} diff --git a/worlds/factorio/data/mod_template/settings.lua b/worlds/factorio/data/mod_template/settings.lua index 73e131a60e7c..41d30e58d552 100644 --- a/worlds/factorio/data/mod_template/settings.lua +++ b/worlds/factorio/data/mod_template/settings.lua @@ -27,4 +27,4 @@ data:extend({ default_value = false {% endif %} } -}) \ No newline at end of file +}) diff --git a/worlds/factorio/data/recipes.json b/worlds/factorio/data/recipes.json index 4c4ab81526af..b0633b493d79 100644 --- a/worlds/factorio/data/recipes.json +++ b/worlds/factorio/data/recipes.json @@ -1 +1 @@ -{"accumulator":{"ingredients":{"iron-plate":2,"battery":5},"products":{"accumulator":1},"category":"crafting","energy":10},"advanced-circuit":{"ingredients":{"plastic-bar":2,"copper-cable":4,"electronic-circuit":2},"products":{"advanced-circuit":1},"category":"crafting","energy":6},"arithmetic-combinator":{"ingredients":{"copper-cable":5,"electronic-circuit":5},"products":{"arithmetic-combinator":1},"category":"crafting","energy":0.5},"artillery-shell":{"ingredients":{"explosives":8,"explosive-cannon-shell":4,"radar":1},"products":{"artillery-shell":1},"category":"crafting","energy":15},"artillery-targeting-remote":{"ingredients":{"processing-unit":1,"radar":1},"products":{"artillery-targeting-remote":1},"category":"crafting","energy":0.5},"artillery-turret":{"ingredients":{"steel-plate":60,"iron-gear-wheel":40,"advanced-circuit":20,"concrete":60},"products":{"artillery-turret":1},"category":"crafting","energy":40},"artillery-wagon":{"ingredients":{"steel-plate":40,"iron-gear-wheel":10,"advanced-circuit":20,"engine-unit":64,"pipe":16},"products":{"artillery-wagon":1},"category":"crafting","energy":4},"assembling-machine-1":{"ingredients":{"iron-plate":9,"iron-gear-wheel":5,"electronic-circuit":3},"products":{"assembling-machine-1":1},"category":"crafting","energy":0.5},"assembling-machine-2":{"ingredients":{"steel-plate":2,"iron-gear-wheel":5,"electronic-circuit":3,"assembling-machine-1":1},"products":{"assembling-machine-2":1},"category":"crafting","energy":0.5},"assembling-machine-3":{"ingredients":{"assembling-machine-2":2,"speed-module":4},"products":{"assembling-machine-3":1},"category":"crafting","energy":0.5},"atomic-bomb":{"ingredients":{"explosives":10,"rocket-control-unit":10,"uranium-235":30},"products":{"atomic-bomb":1},"category":"crafting","energy":50},"automation-science-pack":{"ingredients":{"copper-plate":1,"iron-gear-wheel":1},"products":{"automation-science-pack":1},"category":"crafting","energy":5},"battery":{"ingredients":{"iron-plate":1,"copper-plate":1,"sulfuric-acid":20},"products":{"battery":1},"category":"chemistry","energy":4},"battery-equipment":{"ingredients":{"steel-plate":10,"battery":5},"products":{"battery-equipment":1},"category":"crafting","energy":10},"battery-mk2-equipment":{"ingredients":{"processing-unit":15,"low-density-structure":5,"battery-equipment":10},"products":{"battery-mk2-equipment":1},"category":"crafting","energy":10},"beacon":{"ingredients":{"steel-plate":10,"copper-cable":10,"electronic-circuit":20,"advanced-circuit":20},"products":{"beacon":1},"category":"crafting","energy":15},"belt-immunity-equipment":{"ingredients":{"steel-plate":10,"advanced-circuit":5},"products":{"belt-immunity-equipment":1},"category":"crafting","energy":10},"big-electric-pole":{"ingredients":{"copper-plate":5,"steel-plate":5,"iron-stick":8},"products":{"big-electric-pole":1},"category":"crafting","energy":0.5},"boiler":{"ingredients":{"pipe":4,"stone-furnace":1},"products":{"boiler":1},"category":"crafting","energy":0.5},"burner-inserter":{"ingredients":{"iron-plate":1,"iron-gear-wheel":1},"products":{"burner-inserter":1},"category":"crafting","energy":0.5},"burner-mining-drill":{"ingredients":{"iron-plate":3,"iron-gear-wheel":3,"stone-furnace":1},"products":{"burner-mining-drill":1},"category":"crafting","energy":2},"cannon-shell":{"ingredients":{"steel-plate":2,"plastic-bar":2,"explosives":1},"products":{"cannon-shell":1},"category":"crafting","energy":8},"car":{"ingredients":{"iron-plate":20,"steel-plate":5,"engine-unit":8},"products":{"car":1},"category":"crafting","energy":2},"cargo-wagon":{"ingredients":{"iron-plate":20,"steel-plate":20,"iron-gear-wheel":10},"products":{"cargo-wagon":1},"category":"crafting","energy":1},"centrifuge":{"ingredients":{"steel-plate":50,"iron-gear-wheel":100,"advanced-circuit":100,"concrete":100},"products":{"centrifuge":1},"category":"crafting","energy":4},"chemical-plant":{"ingredients":{"steel-plate":5,"iron-gear-wheel":5,"electronic-circuit":5,"pipe":5},"products":{"chemical-plant":1},"category":"crafting","energy":5},"chemical-science-pack":{"ingredients":{"sulfur":1,"advanced-circuit":3,"engine-unit":2},"products":{"chemical-science-pack":2},"category":"crafting","energy":24},"cliff-explosives":{"ingredients":{"explosives":10,"empty-barrel":1,"grenade":1},"products":{"cliff-explosives":1},"category":"crafting","energy":8},"cluster-grenade":{"ingredients":{"steel-plate":5,"explosives":5,"grenade":7},"products":{"cluster-grenade":1},"category":"crafting","energy":8},"combat-shotgun":{"ingredients":{"wood":10,"copper-plate":10,"steel-plate":15,"iron-gear-wheel":5},"products":{"combat-shotgun":1},"category":"crafting","energy":10},"concrete":{"ingredients":{"iron-ore":1,"stone-brick":5,"water":100},"products":{"concrete":10},"category":"crafting-with-fluid","energy":10},"constant-combinator":{"ingredients":{"copper-cable":5,"electronic-circuit":2},"products":{"constant-combinator":1},"category":"crafting","energy":0.5},"construction-robot":{"ingredients":{"electronic-circuit":2,"flying-robot-frame":1},"products":{"construction-robot":1},"category":"crafting","energy":0.5},"copper-cable":{"ingredients":{"copper-plate":1},"products":{"copper-cable":2},"category":"crafting","energy":0.5},"copper-plate":{"ingredients":{"copper-ore":1},"products":{"copper-plate":1},"category":"smelting","energy":3.20000000000000017763568394002504646778106689453125},"decider-combinator":{"ingredients":{"copper-cable":5,"electronic-circuit":5},"products":{"decider-combinator":1},"category":"crafting","energy":0.5},"defender-capsule":{"ingredients":{"iron-gear-wheel":3,"electronic-circuit":3,"piercing-rounds-magazine":3},"products":{"defender-capsule":1},"category":"crafting","energy":8},"destroyer-capsule":{"ingredients":{"speed-module":1,"distractor-capsule":4},"products":{"destroyer-capsule":1},"category":"crafting","energy":15},"discharge-defense-equipment":{"ingredients":{"steel-plate":20,"processing-unit":5,"laser-turret":10},"products":{"discharge-defense-equipment":1},"category":"crafting","energy":10},"discharge-defense-remote":{"ingredients":{"electronic-circuit":1},"products":{"discharge-defense-remote":1},"category":"crafting","energy":0.5},"distractor-capsule":{"ingredients":{"advanced-circuit":3,"defender-capsule":4},"products":{"distractor-capsule":1},"category":"crafting","energy":15},"effectivity-module":{"ingredients":{"electronic-circuit":5,"advanced-circuit":5},"products":{"effectivity-module":1},"category":"crafting","energy":15},"effectivity-module-2":{"ingredients":{"advanced-circuit":5,"processing-unit":5,"effectivity-module":4},"products":{"effectivity-module-2":1},"category":"crafting","energy":30},"effectivity-module-3":{"ingredients":{"advanced-circuit":5,"processing-unit":5,"effectivity-module-2":5},"products":{"effectivity-module-3":1},"category":"crafting","energy":60},"electric-engine-unit":{"ingredients":{"electronic-circuit":2,"engine-unit":1,"lubricant":15},"products":{"electric-engine-unit":1},"category":"crafting-with-fluid","energy":10},"electric-furnace":{"ingredients":{"steel-plate":10,"advanced-circuit":5,"stone-brick":10},"products":{"electric-furnace":1},"category":"crafting","energy":5},"electric-mining-drill":{"ingredients":{"iron-plate":10,"iron-gear-wheel":5,"electronic-circuit":3},"products":{"electric-mining-drill":1},"category":"crafting","energy":2},"electronic-circuit":{"ingredients":{"iron-plate":1,"copper-cable":3},"products":{"electronic-circuit":1},"category":"crafting","energy":0.5},"empty-barrel":{"ingredients":{"steel-plate":1},"products":{"empty-barrel":1},"category":"crafting","energy":1},"energy-shield-equipment":{"ingredients":{"steel-plate":10,"advanced-circuit":5},"products":{"energy-shield-equipment":1},"category":"crafting","energy":10},"energy-shield-mk2-equipment":{"ingredients":{"processing-unit":5,"low-density-structure":5,"energy-shield-equipment":10},"products":{"energy-shield-mk2-equipment":1},"category":"crafting","energy":10},"engine-unit":{"ingredients":{"steel-plate":1,"iron-gear-wheel":1,"pipe":2},"products":{"engine-unit":1},"category":"advanced-crafting","energy":10},"exoskeleton-equipment":{"ingredients":{"steel-plate":20,"processing-unit":10,"electric-engine-unit":30},"products":{"exoskeleton-equipment":1},"category":"crafting","energy":10},"explosive-cannon-shell":{"ingredients":{"steel-plate":2,"plastic-bar":2,"explosives":2},"products":{"explosive-cannon-shell":1},"category":"crafting","energy":8},"explosive-rocket":{"ingredients":{"explosives":2,"rocket":1},"products":{"explosive-rocket":1},"category":"crafting","energy":8},"explosive-uranium-cannon-shell":{"ingredients":{"uranium-238":1,"explosive-cannon-shell":1},"products":{"explosive-uranium-cannon-shell":1},"category":"crafting","energy":12},"explosives":{"ingredients":{"coal":1,"sulfur":1,"water":10},"products":{"explosives":2},"category":"chemistry","energy":4},"express-splitter":{"ingredients":{"iron-gear-wheel":10,"advanced-circuit":10,"fast-splitter":1,"lubricant":80},"products":{"express-splitter":1},"category":"crafting-with-fluid","energy":2},"express-transport-belt":{"ingredients":{"iron-gear-wheel":10,"fast-transport-belt":1,"lubricant":20},"products":{"express-transport-belt":1},"category":"crafting-with-fluid","energy":0.5},"express-underground-belt":{"ingredients":{"iron-gear-wheel":80,"fast-underground-belt":2,"lubricant":40},"products":{"express-underground-belt":2},"category":"crafting-with-fluid","energy":2},"fast-inserter":{"ingredients":{"iron-plate":2,"electronic-circuit":2,"inserter":1},"products":{"fast-inserter":1},"category":"crafting","energy":0.5},"fast-splitter":{"ingredients":{"iron-gear-wheel":10,"electronic-circuit":10,"splitter":1},"products":{"fast-splitter":1},"category":"crafting","energy":2},"fast-transport-belt":{"ingredients":{"iron-gear-wheel":5,"transport-belt":1},"products":{"fast-transport-belt":1},"category":"crafting","energy":0.5},"fast-underground-belt":{"ingredients":{"iron-gear-wheel":40,"underground-belt":2},"products":{"fast-underground-belt":2},"category":"crafting","energy":2},"filter-inserter":{"ingredients":{"electronic-circuit":4,"fast-inserter":1},"products":{"filter-inserter":1},"category":"crafting","energy":0.5},"firearm-magazine":{"ingredients":{"iron-plate":4},"products":{"firearm-magazine":1},"category":"crafting","energy":1},"flamethrower":{"ingredients":{"steel-plate":5,"iron-gear-wheel":10},"products":{"flamethrower":1},"category":"crafting","energy":10},"flamethrower-ammo":{"ingredients":{"steel-plate":5,"crude-oil":100},"products":{"flamethrower-ammo":1},"category":"chemistry","energy":6},"flamethrower-turret":{"ingredients":{"steel-plate":30,"iron-gear-wheel":15,"engine-unit":5,"pipe":10},"products":{"flamethrower-turret":1},"category":"crafting","energy":20},"fluid-wagon":{"ingredients":{"steel-plate":16,"iron-gear-wheel":10,"storage-tank":1,"pipe":8},"products":{"fluid-wagon":1},"category":"crafting","energy":1.5},"flying-robot-frame":{"ingredients":{"steel-plate":1,"battery":2,"electronic-circuit":3,"electric-engine-unit":1},"products":{"flying-robot-frame":1},"category":"crafting","energy":20},"fusion-reactor-equipment":{"ingredients":{"processing-unit":200,"low-density-structure":50},"products":{"fusion-reactor-equipment":1},"category":"crafting","energy":10},"gate":{"ingredients":{"steel-plate":2,"electronic-circuit":2,"stone-wall":1},"products":{"gate":1},"category":"crafting","energy":0.5},"green-wire":{"ingredients":{"copper-cable":1,"electronic-circuit":1},"products":{"green-wire":1},"category":"crafting","energy":0.5},"grenade":{"ingredients":{"coal":10,"iron-plate":5},"products":{"grenade":1},"category":"crafting","energy":8},"gun-turret":{"ingredients":{"iron-plate":20,"copper-plate":10,"iron-gear-wheel":10},"products":{"gun-turret":1},"category":"crafting","energy":8},"hazard-concrete":{"ingredients":{"concrete":10},"products":{"hazard-concrete":10},"category":"crafting","energy":0.25},"heat-exchanger":{"ingredients":{"copper-plate":100,"steel-plate":10,"pipe":10},"products":{"heat-exchanger":1},"category":"crafting","energy":3},"heat-pipe":{"ingredients":{"copper-plate":20,"steel-plate":10},"products":{"heat-pipe":1},"category":"crafting","energy":1},"heavy-armor":{"ingredients":{"copper-plate":100,"steel-plate":50},"products":{"heavy-armor":1},"category":"crafting","energy":8},"inserter":{"ingredients":{"iron-plate":1,"iron-gear-wheel":1,"electronic-circuit":1},"products":{"inserter":1},"category":"crafting","energy":0.5},"iron-chest":{"ingredients":{"iron-plate":8},"products":{"iron-chest":1},"category":"crafting","energy":0.5},"iron-gear-wheel":{"ingredients":{"iron-plate":2},"products":{"iron-gear-wheel":1},"category":"crafting","energy":0.5},"iron-plate":{"ingredients":{"iron-ore":1},"products":{"iron-plate":1},"category":"smelting","energy":3.20000000000000017763568394002504646778106689453125},"iron-stick":{"ingredients":{"iron-plate":1},"products":{"iron-stick":2},"category":"crafting","energy":0.5},"lab":{"ingredients":{"iron-gear-wheel":10,"electronic-circuit":10,"transport-belt":4},"products":{"lab":1},"category":"crafting","energy":2},"land-mine":{"ingredients":{"steel-plate":1,"explosives":2},"products":{"land-mine":4},"category":"crafting","energy":5},"landfill":{"ingredients":{"stone":20},"products":{"landfill":1},"category":"crafting","energy":0.5},"laser-turret":{"ingredients":{"steel-plate":20,"battery":12,"electronic-circuit":20},"products":{"laser-turret":1},"category":"crafting","energy":20},"light-armor":{"ingredients":{"iron-plate":40},"products":{"light-armor":1},"category":"crafting","energy":3},"locomotive":{"ingredients":{"steel-plate":30,"electronic-circuit":10,"engine-unit":20},"products":{"locomotive":1},"category":"crafting","energy":4},"logistic-chest-active-provider":{"ingredients":{"electronic-circuit":3,"advanced-circuit":1,"steel-chest":1},"products":{"logistic-chest-active-provider":1},"category":"crafting","energy":0.5},"logistic-chest-buffer":{"ingredients":{"electronic-circuit":3,"advanced-circuit":1,"steel-chest":1},"products":{"logistic-chest-buffer":1},"category":"crafting","energy":0.5},"logistic-chest-passive-provider":{"ingredients":{"electronic-circuit":3,"advanced-circuit":1,"steel-chest":1},"products":{"logistic-chest-passive-provider":1},"category":"crafting","energy":0.5},"logistic-chest-requester":{"ingredients":{"electronic-circuit":3,"advanced-circuit":1,"steel-chest":1},"products":{"logistic-chest-requester":1},"category":"crafting","energy":0.5},"logistic-chest-storage":{"ingredients":{"electronic-circuit":3,"advanced-circuit":1,"steel-chest":1},"products":{"logistic-chest-storage":1},"category":"crafting","energy":0.5},"logistic-robot":{"ingredients":{"advanced-circuit":2,"flying-robot-frame":1},"products":{"logistic-robot":1},"category":"crafting","energy":0.5},"logistic-science-pack":{"ingredients":{"transport-belt":1,"inserter":1},"products":{"logistic-science-pack":1},"category":"crafting","energy":6},"long-handed-inserter":{"ingredients":{"iron-plate":1,"iron-gear-wheel":1,"inserter":1},"products":{"long-handed-inserter":1},"category":"crafting","energy":0.5},"low-density-structure":{"ingredients":{"copper-plate":20,"steel-plate":2,"plastic-bar":5},"products":{"low-density-structure":1},"category":"crafting","energy":20},"lubricant":{"ingredients":{"heavy-oil":10},"products":{"lubricant":10},"category":"chemistry","energy":1},"medium-electric-pole":{"ingredients":{"copper-plate":2,"steel-plate":2,"iron-stick":4},"products":{"medium-electric-pole":1},"category":"crafting","energy":0.5},"military-science-pack":{"ingredients":{"piercing-rounds-magazine":1,"grenade":1,"stone-wall":2},"products":{"military-science-pack":2},"category":"crafting","energy":10},"modular-armor":{"ingredients":{"steel-plate":50,"advanced-circuit":30},"products":{"modular-armor":1},"category":"crafting","energy":15},"night-vision-equipment":{"ingredients":{"steel-plate":10,"advanced-circuit":5},"products":{"night-vision-equipment":1},"category":"crafting","energy":10},"nuclear-fuel":{"ingredients":{"rocket-fuel":1,"uranium-235":1},"products":{"nuclear-fuel":1},"category":"centrifuging","energy":90},"nuclear-reactor":{"ingredients":{"copper-plate":500,"steel-plate":500,"advanced-circuit":500,"concrete":500},"products":{"nuclear-reactor":1},"category":"crafting","energy":8},"offshore-pump":{"ingredients":{"iron-gear-wheel":1,"electronic-circuit":2,"pipe":1},"products":{"offshore-pump":1},"category":"crafting","energy":0.5},"oil-refinery":{"ingredients":{"steel-plate":15,"iron-gear-wheel":10,"electronic-circuit":10,"pipe":10,"stone-brick":10},"products":{"oil-refinery":1},"category":"crafting","energy":8},"personal-laser-defense-equipment":{"ingredients":{"processing-unit":20,"low-density-structure":5,"laser-turret":5},"products":{"personal-laser-defense-equipment":1},"category":"crafting","energy":10},"personal-roboport-equipment":{"ingredients":{"steel-plate":20,"battery":45,"iron-gear-wheel":40,"advanced-circuit":10},"products":{"personal-roboport-equipment":1},"category":"crafting","energy":10},"personal-roboport-mk2-equipment":{"ingredients":{"processing-unit":100,"low-density-structure":20,"personal-roboport-equipment":5},"products":{"personal-roboport-mk2-equipment":1},"category":"crafting","energy":20},"piercing-rounds-magazine":{"ingredients":{"copper-plate":5,"steel-plate":1,"firearm-magazine":1},"products":{"piercing-rounds-magazine":1},"category":"crafting","energy":3},"piercing-shotgun-shell":{"ingredients":{"copper-plate":5,"steel-plate":2,"shotgun-shell":2},"products":{"piercing-shotgun-shell":1},"category":"crafting","energy":8},"pipe":{"ingredients":{"iron-plate":1},"products":{"pipe":1},"category":"crafting","energy":0.5},"pipe-to-ground":{"ingredients":{"iron-plate":5,"pipe":10},"products":{"pipe-to-ground":2},"category":"crafting","energy":0.5},"pistol":{"ingredients":{"iron-plate":5,"copper-plate":5},"products":{"pistol":1},"category":"crafting","energy":5},"plastic-bar":{"ingredients":{"coal":1,"petroleum-gas":20},"products":{"plastic-bar":2},"category":"chemistry","energy":1},"poison-capsule":{"ingredients":{"coal":10,"steel-plate":3,"electronic-circuit":3},"products":{"poison-capsule":1},"category":"crafting","energy":8},"power-armor":{"ingredients":{"steel-plate":40,"processing-unit":40,"electric-engine-unit":20},"products":{"power-armor":1},"category":"crafting","energy":20},"power-armor-mk2":{"ingredients":{"processing-unit":60,"electric-engine-unit":40,"low-density-structure":30,"speed-module-2":25,"effectivity-module-2":25},"products":{"power-armor-mk2":1},"category":"crafting","energy":25},"power-switch":{"ingredients":{"iron-plate":5,"copper-cable":5,"electronic-circuit":2},"products":{"power-switch":1},"category":"crafting","energy":2},"processing-unit":{"ingredients":{"electronic-circuit":20,"advanced-circuit":2,"sulfuric-acid":5},"products":{"processing-unit":1},"category":"crafting-with-fluid","energy":10},"production-science-pack":{"ingredients":{"rail":30,"electric-furnace":1,"productivity-module":1},"products":{"production-science-pack":3},"category":"crafting","energy":21},"productivity-module":{"ingredients":{"electronic-circuit":5,"advanced-circuit":5},"products":{"productivity-module":1},"category":"crafting","energy":15},"productivity-module-2":{"ingredients":{"advanced-circuit":5,"processing-unit":5,"productivity-module":4},"products":{"productivity-module-2":1},"category":"crafting","energy":30},"productivity-module-3":{"ingredients":{"advanced-circuit":5,"processing-unit":5,"productivity-module-2":5},"products":{"productivity-module-3":1},"category":"crafting","energy":60},"programmable-speaker":{"ingredients":{"iron-plate":3,"copper-cable":5,"iron-stick":4,"electronic-circuit":4},"products":{"programmable-speaker":1},"category":"crafting","energy":2},"pump":{"ingredients":{"steel-plate":1,"engine-unit":1,"pipe":1},"products":{"pump":1},"category":"crafting","energy":2},"pumpjack":{"ingredients":{"steel-plate":5,"iron-gear-wheel":10,"electronic-circuit":5,"pipe":10},"products":{"pumpjack":1},"category":"crafting","energy":5},"radar":{"ingredients":{"iron-plate":10,"iron-gear-wheel":5,"electronic-circuit":5},"products":{"radar":1},"category":"crafting","energy":0.5},"rail":{"ingredients":{"stone":1,"steel-plate":1,"iron-stick":1},"products":{"rail":2},"category":"crafting","energy":0.5},"rail-chain-signal":{"ingredients":{"iron-plate":5,"electronic-circuit":1},"products":{"rail-chain-signal":1},"category":"crafting","energy":0.5},"rail-signal":{"ingredients":{"iron-plate":5,"electronic-circuit":1},"products":{"rail-signal":1},"category":"crafting","energy":0.5},"red-wire":{"ingredients":{"copper-cable":1,"electronic-circuit":1},"products":{"red-wire":1},"category":"crafting","energy":0.5},"refined-concrete":{"ingredients":{"steel-plate":1,"iron-stick":8,"concrete":20,"water":100},"products":{"refined-concrete":10},"category":"crafting-with-fluid","energy":15},"refined-hazard-concrete":{"ingredients":{"refined-concrete":10},"products":{"refined-hazard-concrete":10},"category":"crafting","energy":0.25},"repair-pack":{"ingredients":{"iron-gear-wheel":2,"electronic-circuit":2},"products":{"repair-pack":1},"category":"crafting","energy":0.5},"roboport":{"ingredients":{"steel-plate":45,"iron-gear-wheel":45,"advanced-circuit":45},"products":{"roboport":1},"category":"crafting","energy":5},"rocket":{"ingredients":{"iron-plate":2,"explosives":1,"electronic-circuit":1},"products":{"rocket":1},"category":"crafting","energy":8},"rocket-control-unit":{"ingredients":{"processing-unit":1,"speed-module":1},"products":{"rocket-control-unit":1},"category":"crafting","energy":30},"rocket-fuel":{"ingredients":{"solid-fuel":10,"light-oil":10},"products":{"rocket-fuel":1},"category":"crafting-with-fluid","energy":30},"rocket-launcher":{"ingredients":{"iron-plate":5,"iron-gear-wheel":5,"electronic-circuit":5},"products":{"rocket-launcher":1},"category":"crafting","energy":10},"rocket-part":{"ingredients":{"rocket-control-unit":10,"low-density-structure":10,"rocket-fuel":10},"products":{"rocket-part":1},"category":"rocket-building","energy":3},"rocket-silo":{"ingredients":{"steel-plate":1000,"processing-unit":200,"electric-engine-unit":200,"pipe":100,"concrete":1000},"products":{"rocket-silo":1},"category":"crafting","energy":30},"satellite":{"ingredients":{"processing-unit":100,"low-density-structure":100,"rocket-fuel":50,"solar-panel":100,"accumulator":100,"radar":5},"products":{"satellite":1},"category":"crafting","energy":5},"shotgun":{"ingredients":{"wood":5,"iron-plate":15,"copper-plate":10,"iron-gear-wheel":5},"products":{"shotgun":1},"category":"crafting","energy":10},"shotgun-shell":{"ingredients":{"iron-plate":2,"copper-plate":2},"products":{"shotgun-shell":1},"category":"crafting","energy":3},"slowdown-capsule":{"ingredients":{"coal":5,"steel-plate":2,"electronic-circuit":2},"products":{"slowdown-capsule":1},"category":"crafting","energy":8},"small-electric-pole":{"ingredients":{"wood":1,"copper-cable":2},"products":{"small-electric-pole":2},"category":"crafting","energy":0.5},"small-lamp":{"ingredients":{"iron-plate":1,"copper-cable":3,"electronic-circuit":1},"products":{"small-lamp":1},"category":"crafting","energy":0.5},"solar-panel":{"ingredients":{"copper-plate":5,"steel-plate":5,"electronic-circuit":15},"products":{"solar-panel":1},"category":"crafting","energy":10},"solar-panel-equipment":{"ingredients":{"steel-plate":5,"advanced-circuit":2,"solar-panel":1},"products":{"solar-panel-equipment":1},"category":"crafting","energy":10},"speed-module":{"ingredients":{"electronic-circuit":5,"advanced-circuit":5},"products":{"speed-module":1},"category":"crafting","energy":15},"speed-module-2":{"ingredients":{"advanced-circuit":5,"processing-unit":5,"speed-module":4},"products":{"speed-module-2":1},"category":"crafting","energy":30},"speed-module-3":{"ingredients":{"advanced-circuit":5,"processing-unit":5,"speed-module-2":5},"products":{"speed-module-3":1},"category":"crafting","energy":60},"spidertron":{"ingredients":{"raw-fish":1,"rocket-control-unit":16,"low-density-structure":150,"effectivity-module-3":2,"rocket-launcher":4,"fusion-reactor-equipment":2,"exoskeleton-equipment":4,"radar":2},"products":{"spidertron":1},"category":"crafting","energy":10},"spidertron-remote":{"ingredients":{"rocket-control-unit":1,"radar":1},"products":{"spidertron-remote":1},"category":"crafting","energy":0.5},"splitter":{"ingredients":{"iron-plate":5,"electronic-circuit":5,"transport-belt":4},"products":{"splitter":1},"category":"crafting","energy":1},"stack-filter-inserter":{"ingredients":{"electronic-circuit":5,"stack-inserter":1},"products":{"stack-filter-inserter":1},"category":"crafting","energy":0.5},"stack-inserter":{"ingredients":{"iron-gear-wheel":15,"electronic-circuit":15,"advanced-circuit":1,"fast-inserter":1},"products":{"stack-inserter":1},"category":"crafting","energy":0.5},"steam-engine":{"ingredients":{"iron-plate":10,"iron-gear-wheel":8,"pipe":5},"products":{"steam-engine":1},"category":"crafting","energy":0.5},"steam-turbine":{"ingredients":{"copper-plate":50,"iron-gear-wheel":50,"pipe":20},"products":{"steam-turbine":1},"category":"crafting","energy":3},"steel-chest":{"ingredients":{"steel-plate":8},"products":{"steel-chest":1},"category":"crafting","energy":0.5},"steel-furnace":{"ingredients":{"steel-plate":6,"stone-brick":10},"products":{"steel-furnace":1},"category":"crafting","energy":3},"steel-plate":{"ingredients":{"iron-plate":5},"products":{"steel-plate":1},"category":"smelting","energy":16},"stone-brick":{"ingredients":{"stone":2},"products":{"stone-brick":1},"category":"smelting","energy":3.20000000000000017763568394002504646778106689453125},"stone-furnace":{"ingredients":{"stone":5},"products":{"stone-furnace":1},"category":"crafting","energy":0.5},"stone-wall":{"ingredients":{"stone-brick":5},"products":{"stone-wall":1},"category":"crafting","energy":0.5},"storage-tank":{"ingredients":{"iron-plate":20,"steel-plate":5},"products":{"storage-tank":1},"category":"crafting","energy":3},"submachine-gun":{"ingredients":{"iron-plate":10,"copper-plate":5,"iron-gear-wheel":10},"products":{"submachine-gun":1},"category":"crafting","energy":10},"substation":{"ingredients":{"copper-plate":5,"steel-plate":10,"advanced-circuit":5},"products":{"substation":1},"category":"crafting","energy":0.5},"sulfur":{"ingredients":{"water":30,"petroleum-gas":30},"products":{"sulfur":2},"category":"chemistry","energy":1},"sulfuric-acid":{"ingredients":{"iron-plate":1,"sulfur":5,"water":100},"products":{"sulfuric-acid":50},"category":"chemistry","energy":1},"tank":{"ingredients":{"steel-plate":50,"iron-gear-wheel":15,"advanced-circuit":10,"engine-unit":32},"products":{"tank":1},"category":"crafting","energy":5},"train-stop":{"ingredients":{"iron-plate":6,"steel-plate":3,"iron-stick":6,"electronic-circuit":5},"products":{"train-stop":1},"category":"crafting","energy":0.5},"transport-belt":{"ingredients":{"iron-plate":1,"iron-gear-wheel":1},"products":{"transport-belt":2},"category":"crafting","energy":0.5},"underground-belt":{"ingredients":{"iron-plate":10,"transport-belt":5},"products":{"underground-belt":2},"category":"crafting","energy":1},"uranium-cannon-shell":{"ingredients":{"uranium-238":1,"cannon-shell":1},"products":{"uranium-cannon-shell":1},"category":"crafting","energy":12},"uranium-fuel-cell":{"ingredients":{"iron-plate":10,"uranium-235":1,"uranium-238":19},"products":{"uranium-fuel-cell":10},"category":"crafting","energy":10},"uranium-rounds-magazine":{"ingredients":{"uranium-238":1,"piercing-rounds-magazine":1},"products":{"uranium-rounds-magazine":1},"category":"crafting","energy":10},"utility-science-pack":{"ingredients":{"processing-unit":2,"flying-robot-frame":1,"low-density-structure":3},"products":{"utility-science-pack":3},"category":"crafting","energy":21},"wooden-chest":{"ingredients":{"wood":2},"products":{"wooden-chest":1},"category":"crafting","energy":0.5},"basic-oil-processing":{"ingredients":{"crude-oil":100},"products":{"petroleum-gas":45},"category":"oil-processing","energy":5},"advanced-oil-processing":{"ingredients":{"water":50,"crude-oil":100},"products":{"heavy-oil":25,"light-oil":45,"petroleum-gas":55},"category":"oil-processing","energy":5},"coal-liquefaction":{"ingredients":{"coal":10,"heavy-oil":25,"steam":50},"products":{"heavy-oil":90,"light-oil":20,"petroleum-gas":10},"category":"oil-processing","energy":5},"fill-crude-oil-barrel":{"ingredients":{"empty-barrel":1,"crude-oil":50},"products":{"crude-oil-barrel":1},"category":"crafting-with-fluid","energy":0.2},"fill-heavy-oil-barrel":{"ingredients":{"empty-barrel":1,"heavy-oil":50},"products":{"heavy-oil-barrel":1},"category":"crafting-with-fluid","energy":0.2},"fill-light-oil-barrel":{"ingredients":{"empty-barrel":1,"light-oil":50},"products":{"light-oil-barrel":1},"category":"crafting-with-fluid","energy":0.2},"fill-lubricant-barrel":{"ingredients":{"empty-barrel":1,"lubricant":50},"products":{"lubricant-barrel":1},"category":"crafting-with-fluid","energy":0.2},"fill-petroleum-gas-barrel":{"ingredients":{"empty-barrel":1,"petroleum-gas":50},"products":{"petroleum-gas-barrel":1},"category":"crafting-with-fluid","energy":0.2},"fill-sulfuric-acid-barrel":{"ingredients":{"empty-barrel":1,"sulfuric-acid":50},"products":{"sulfuric-acid-barrel":1},"category":"crafting-with-fluid","energy":0.2},"fill-water-barrel":{"ingredients":{"empty-barrel":1,"water":50},"products":{"water-barrel":1},"category":"crafting-with-fluid","energy":0.2},"heavy-oil-cracking":{"ingredients":{"water":30,"heavy-oil":40},"products":{"light-oil":30},"category":"chemistry","energy":2},"light-oil-cracking":{"ingredients":{"water":30,"light-oil":30},"products":{"petroleum-gas":20},"category":"chemistry","energy":2},"solid-fuel-from-light-oil":{"ingredients":{"light-oil":10},"products":{"solid-fuel":1},"category":"chemistry","energy":2},"solid-fuel-from-petroleum-gas":{"ingredients":{"petroleum-gas":20},"products":{"solid-fuel":1},"category":"chemistry","energy":2},"solid-fuel-from-heavy-oil":{"ingredients":{"heavy-oil":20},"products":{"solid-fuel":1},"category":"chemistry","energy":2},"empty-crude-oil-barrel":{"ingredients":{"crude-oil-barrel":1},"products":{"empty-barrel":1,"crude-oil":50},"category":"crafting-with-fluid","energy":0.2},"empty-heavy-oil-barrel":{"ingredients":{"heavy-oil-barrel":1},"products":{"empty-barrel":1,"heavy-oil":50},"category":"crafting-with-fluid","energy":0.2},"empty-light-oil-barrel":{"ingredients":{"light-oil-barrel":1},"products":{"empty-barrel":1,"light-oil":50},"category":"crafting-with-fluid","energy":0.2},"empty-lubricant-barrel":{"ingredients":{"lubricant-barrel":1},"products":{"empty-barrel":1,"lubricant":50},"category":"crafting-with-fluid","energy":0.2},"empty-petroleum-gas-barrel":{"ingredients":{"petroleum-gas-barrel":1},"products":{"empty-barrel":1,"petroleum-gas":50},"category":"crafting-with-fluid","energy":0.2},"empty-sulfuric-acid-barrel":{"ingredients":{"sulfuric-acid-barrel":1},"products":{"empty-barrel":1,"sulfuric-acid":50},"category":"crafting-with-fluid","energy":0.2},"empty-water-barrel":{"ingredients":{"water-barrel":1},"products":{"empty-barrel":1,"water":50},"category":"crafting-with-fluid","energy":0.2},"uranium-processing":{"ingredients":{"uranium-ore":10},"products":{"uranium-235":1,"uranium-238":1},"category":"centrifuging","energy":12},"nuclear-fuel-reprocessing":{"ingredients":{"used-up-uranium-fuel-cell":5},"products":{"uranium-238":3},"category":"centrifuging","energy":60},"kovarex-enrichment-process":{"ingredients":{"uranium-235":40,"uranium-238":5},"products":{"uranium-235":41,"uranium-238":2},"category":"centrifuging","energy":60}} \ No newline at end of file +{"wooden-chest":{"ingredients":{"wood":2},"products":{"wooden-chest":1},"category":"crafting","energy":0.5},"iron-chest":{"ingredients":{"iron-plate":8},"products":{"iron-chest":1},"category":"crafting","energy":0.5},"steel-chest":{"ingredients":{"steel-plate":8},"products":{"steel-chest":1},"category":"crafting","energy":0.5},"storage-tank":{"ingredients":{"iron-plate":20,"steel-plate":5},"products":{"storage-tank":1},"category":"crafting","energy":3},"transport-belt":{"ingredients":{"iron-plate":1,"iron-gear-wheel":1},"products":{"transport-belt":2},"category":"crafting","energy":0.5},"fast-transport-belt":{"ingredients":{"iron-gear-wheel":5,"transport-belt":1},"products":{"fast-transport-belt":1},"category":"crafting","energy":0.5},"express-transport-belt":{"ingredients":{"iron-gear-wheel":10,"fast-transport-belt":1,"lubricant":20},"products":{"express-transport-belt":1},"category":"crafting-with-fluid","energy":0.5},"underground-belt":{"ingredients":{"iron-plate":10,"transport-belt":5},"products":{"underground-belt":2},"category":"crafting","energy":1},"fast-underground-belt":{"ingredients":{"iron-gear-wheel":40,"underground-belt":2},"products":{"fast-underground-belt":2},"category":"crafting","energy":2},"express-underground-belt":{"ingredients":{"iron-gear-wheel":80,"fast-underground-belt":2,"lubricant":40},"products":{"express-underground-belt":2},"category":"crafting-with-fluid","energy":2},"splitter":{"ingredients":{"iron-plate":5,"electronic-circuit":5,"transport-belt":4},"products":{"splitter":1},"category":"crafting","energy":1},"fast-splitter":{"ingredients":{"iron-gear-wheel":10,"electronic-circuit":10,"splitter":1},"products":{"fast-splitter":1},"category":"crafting","energy":2},"express-splitter":{"ingredients":{"iron-gear-wheel":10,"advanced-circuit":10,"fast-splitter":1,"lubricant":80},"products":{"express-splitter":1},"category":"crafting-with-fluid","energy":2},"burner-inserter":{"ingredients":{"iron-plate":1,"iron-gear-wheel":1},"products":{"burner-inserter":1},"category":"crafting","energy":0.5},"inserter":{"ingredients":{"iron-plate":1,"iron-gear-wheel":1,"electronic-circuit":1},"products":{"inserter":1},"category":"crafting","energy":0.5},"long-handed-inserter":{"ingredients":{"iron-plate":1,"iron-gear-wheel":1,"inserter":1},"products":{"long-handed-inserter":1},"category":"crafting","energy":0.5},"fast-inserter":{"ingredients":{"iron-plate":2,"electronic-circuit":2,"inserter":1},"products":{"fast-inserter":1},"category":"crafting","energy":0.5},"bulk-inserter":{"ingredients":{"iron-gear-wheel":15,"electronic-circuit":15,"advanced-circuit":1,"fast-inserter":1},"products":{"bulk-inserter":1},"category":"crafting","energy":0.5},"small-electric-pole":{"ingredients":{"wood":1,"copper-cable":2},"products":{"small-electric-pole":2},"category":"crafting","energy":0.5},"medium-electric-pole":{"ingredients":{"steel-plate":2,"iron-stick":4,"copper-cable":2},"products":{"medium-electric-pole":1},"category":"crafting","energy":0.5},"big-electric-pole":{"ingredients":{"steel-plate":5,"iron-stick":8,"copper-cable":4},"products":{"big-electric-pole":1},"category":"crafting","energy":0.5},"substation":{"ingredients":{"steel-plate":10,"copper-cable":6,"advanced-circuit":5},"products":{"substation":1},"category":"crafting","energy":0.5},"pipe":{"ingredients":{"iron-plate":1},"products":{"pipe":1},"category":"crafting","energy":0.5},"pipe-to-ground":{"ingredients":{"iron-plate":5,"pipe":10},"products":{"pipe-to-ground":2},"category":"crafting","energy":0.5},"pump":{"ingredients":{"steel-plate":1,"engine-unit":1,"pipe":1},"products":{"pump":1},"category":"crafting","energy":2},"rail":{"ingredients":{"stone":1,"steel-plate":1,"iron-stick":1},"products":{"rail":2},"category":"crafting","energy":0.5},"train-stop":{"ingredients":{"iron-plate":6,"steel-plate":3,"iron-stick":6,"electronic-circuit":5},"products":{"train-stop":1},"category":"crafting","energy":0.5},"rail-signal":{"ingredients":{"iron-plate":5,"electronic-circuit":1},"products":{"rail-signal":1},"category":"crafting","energy":0.5},"rail-chain-signal":{"ingredients":{"iron-plate":5,"electronic-circuit":1},"products":{"rail-chain-signal":1},"category":"crafting","energy":0.5},"locomotive":{"ingredients":{"steel-plate":30,"electronic-circuit":10,"engine-unit":20},"products":{"locomotive":1},"category":"crafting","energy":4},"cargo-wagon":{"ingredients":{"iron-plate":20,"steel-plate":20,"iron-gear-wheel":10},"products":{"cargo-wagon":1},"category":"crafting","energy":1},"fluid-wagon":{"ingredients":{"steel-plate":16,"iron-gear-wheel":10,"storage-tank":1,"pipe":8},"products":{"fluid-wagon":1},"category":"crafting","energy":1.5},"artillery-wagon":{"ingredients":{"steel-plate":40,"iron-gear-wheel":10,"advanced-circuit":20,"engine-unit":64,"pipe":16},"products":{"artillery-wagon":1},"category":"crafting","energy":4},"car":{"ingredients":{"iron-plate":20,"steel-plate":5,"engine-unit":8},"products":{"car":1},"category":"crafting","energy":2},"tank":{"ingredients":{"steel-plate":50,"iron-gear-wheel":15,"advanced-circuit":10,"engine-unit":32},"products":{"tank":1},"category":"crafting","energy":5},"spidertron":{"ingredients":{"raw-fish":1,"processing-unit":16,"low-density-structure":150,"efficiency-module-3":2,"rocket-launcher":4,"fission-reactor-equipment":2,"exoskeleton-equipment":4,"radar":2},"products":{"spidertron":1},"category":"crafting","energy":10},"logistic-robot":{"ingredients":{"advanced-circuit":2,"flying-robot-frame":1},"products":{"logistic-robot":1},"category":"crafting","energy":0.5},"construction-robot":{"ingredients":{"electronic-circuit":2,"flying-robot-frame":1},"products":{"construction-robot":1},"category":"crafting","energy":0.5},"active-provider-chest":{"ingredients":{"electronic-circuit":3,"advanced-circuit":1,"steel-chest":1},"products":{"active-provider-chest":1},"category":"crafting","energy":0.5},"passive-provider-chest":{"ingredients":{"electronic-circuit":3,"advanced-circuit":1,"steel-chest":1},"products":{"passive-provider-chest":1},"category":"crafting","energy":0.5},"storage-chest":{"ingredients":{"electronic-circuit":3,"advanced-circuit":1,"steel-chest":1},"products":{"storage-chest":1},"category":"crafting","energy":0.5},"buffer-chest":{"ingredients":{"electronic-circuit":3,"advanced-circuit":1,"steel-chest":1},"products":{"buffer-chest":1},"category":"crafting","energy":0.5},"requester-chest":{"ingredients":{"electronic-circuit":3,"advanced-circuit":1,"steel-chest":1},"products":{"requester-chest":1},"category":"crafting","energy":0.5},"roboport":{"ingredients":{"steel-plate":45,"iron-gear-wheel":45,"advanced-circuit":45},"products":{"roboport":1},"category":"crafting","energy":5},"small-lamp":{"ingredients":{"iron-plate":1,"copper-cable":3,"electronic-circuit":1},"products":{"small-lamp":1},"category":"crafting","energy":0.5},"arithmetic-combinator":{"ingredients":{"copper-cable":5,"electronic-circuit":5},"products":{"arithmetic-combinator":1},"category":"crafting","energy":0.5},"decider-combinator":{"ingredients":{"copper-cable":5,"electronic-circuit":5},"products":{"decider-combinator":1},"category":"crafting","energy":0.5},"selector-combinator":{"ingredients":{"advanced-circuit":2,"decider-combinator":5},"products":{"selector-combinator":1},"category":"crafting","energy":0.5},"constant-combinator":{"ingredients":{"copper-cable":5,"electronic-circuit":2},"products":{"constant-combinator":1},"category":"crafting","energy":0.5},"power-switch":{"ingredients":{"iron-plate":5,"copper-cable":5,"electronic-circuit":2},"products":{"power-switch":1},"category":"crafting","energy":2},"programmable-speaker":{"ingredients":{"iron-plate":3,"iron-stick":4,"copper-cable":5,"electronic-circuit":4},"products":{"programmable-speaker":1},"category":"crafting","energy":2},"display-panel":{"ingredients":{"iron-plate":1,"electronic-circuit":1},"products":{"display-panel":1},"category":"crafting","energy":0.5},"stone-brick":{"ingredients":{"stone":2},"products":{"stone-brick":1},"category":"smelting","energy":3.20000000000000017763568394002504646778106689453125},"concrete":{"ingredients":{"iron-ore":1,"stone-brick":5,"water":100},"products":{"concrete":10},"category":"crafting-with-fluid","energy":10},"hazard-concrete":{"ingredients":{"concrete":10},"products":{"hazard-concrete":10},"category":"crafting","energy":0.25},"refined-concrete":{"ingredients":{"steel-plate":1,"iron-stick":8,"concrete":20,"water":100},"products":{"refined-concrete":10},"category":"crafting-with-fluid","energy":15},"refined-hazard-concrete":{"ingredients":{"refined-concrete":10},"products":{"refined-hazard-concrete":10},"category":"crafting","energy":0.25},"landfill":{"ingredients":{"stone":50},"products":{"landfill":1},"category":"crafting","energy":0.5},"cliff-explosives":{"ingredients":{"explosives":10,"barrel":1,"grenade":1},"products":{"cliff-explosives":1},"category":"crafting","energy":8},"repair-pack":{"ingredients":{"iron-gear-wheel":2,"electronic-circuit":2},"products":{"repair-pack":1},"category":"crafting","energy":0.5},"boiler":{"ingredients":{"pipe":4,"stone-furnace":1},"products":{"boiler":1},"category":"crafting","energy":0.5},"steam-engine":{"ingredients":{"iron-plate":10,"iron-gear-wheel":8,"pipe":5},"products":{"steam-engine":1},"category":"crafting","energy":0.5},"solar-panel":{"ingredients":{"copper-plate":5,"steel-plate":5,"electronic-circuit":15},"products":{"solar-panel":1},"category":"crafting","energy":10},"accumulator":{"ingredients":{"iron-plate":2,"battery":5},"products":{"accumulator":1},"category":"crafting","energy":10},"nuclear-reactor":{"ingredients":{"copper-plate":500,"steel-plate":500,"advanced-circuit":500,"concrete":500},"products":{"nuclear-reactor":1},"category":"crafting","energy":8},"heat-pipe":{"ingredients":{"copper-plate":20,"steel-plate":10},"products":{"heat-pipe":1},"category":"crafting","energy":1},"heat-exchanger":{"ingredients":{"copper-plate":100,"steel-plate":10,"pipe":10},"products":{"heat-exchanger":1},"category":"crafting","energy":3},"steam-turbine":{"ingredients":{"copper-plate":50,"iron-gear-wheel":50,"pipe":20},"products":{"steam-turbine":1},"category":"crafting","energy":3},"burner-mining-drill":{"ingredients":{"iron-plate":3,"iron-gear-wheel":3,"stone-furnace":1},"products":{"burner-mining-drill":1},"category":"crafting","energy":2},"electric-mining-drill":{"ingredients":{"iron-plate":10,"iron-gear-wheel":5,"electronic-circuit":3},"products":{"electric-mining-drill":1},"category":"crafting","energy":2},"offshore-pump":{"ingredients":{"iron-gear-wheel":2,"pipe":3},"products":{"offshore-pump":1},"category":"crafting","energy":0.5},"pumpjack":{"ingredients":{"steel-plate":5,"iron-gear-wheel":10,"electronic-circuit":5,"pipe":10},"products":{"pumpjack":1},"category":"crafting","energy":5},"stone-furnace":{"ingredients":{"stone":5},"products":{"stone-furnace":1},"category":"crafting","energy":0.5},"steel-furnace":{"ingredients":{"steel-plate":6,"stone-brick":10},"products":{"steel-furnace":1},"category":"crafting","energy":3},"electric-furnace":{"ingredients":{"steel-plate":10,"advanced-circuit":5,"stone-brick":10},"products":{"electric-furnace":1},"category":"crafting","energy":5},"assembling-machine-1":{"ingredients":{"iron-plate":9,"iron-gear-wheel":5,"electronic-circuit":3},"products":{"assembling-machine-1":1},"category":"crafting","energy":0.5},"assembling-machine-2":{"ingredients":{"steel-plate":2,"iron-gear-wheel":5,"electronic-circuit":3,"assembling-machine-1":1},"products":{"assembling-machine-2":1},"category":"crafting","energy":0.5},"assembling-machine-3":{"ingredients":{"assembling-machine-2":2,"speed-module":4},"products":{"assembling-machine-3":1},"category":"crafting","energy":0.5},"oil-refinery":{"ingredients":{"steel-plate":15,"iron-gear-wheel":10,"electronic-circuit":10,"pipe":10,"stone-brick":10},"products":{"oil-refinery":1},"category":"crafting","energy":8},"chemical-plant":{"ingredients":{"steel-plate":5,"iron-gear-wheel":5,"electronic-circuit":5,"pipe":5},"products":{"chemical-plant":1},"category":"crafting","energy":5},"centrifuge":{"ingredients":{"steel-plate":50,"iron-gear-wheel":100,"advanced-circuit":100,"concrete":100},"products":{"centrifuge":1},"category":"crafting","energy":4},"lab":{"ingredients":{"iron-gear-wheel":10,"electronic-circuit":10,"transport-belt":4},"products":{"lab":1},"category":"crafting","energy":2},"beacon":{"ingredients":{"steel-plate":10,"copper-cable":10,"electronic-circuit":20,"advanced-circuit":20},"products":{"beacon":1},"category":"crafting","energy":15},"speed-module":{"ingredients":{"electronic-circuit":5,"advanced-circuit":5},"products":{"speed-module":1},"category":"crafting","energy":15},"speed-module-2":{"ingredients":{"advanced-circuit":5,"processing-unit":5,"speed-module":4},"products":{"speed-module-2":1},"category":"crafting","energy":30},"speed-module-3":{"ingredients":{"advanced-circuit":5,"processing-unit":5,"speed-module-2":4},"products":{"speed-module-3":1},"category":"crafting","energy":60},"efficiency-module":{"ingredients":{"electronic-circuit":5,"advanced-circuit":5},"products":{"efficiency-module":1},"category":"crafting","energy":15},"efficiency-module-2":{"ingredients":{"advanced-circuit":5,"processing-unit":5,"efficiency-module":4},"products":{"efficiency-module-2":1},"category":"crafting","energy":30},"efficiency-module-3":{"ingredients":{"advanced-circuit":5,"processing-unit":5,"efficiency-module-2":4},"products":{"efficiency-module-3":1},"category":"crafting","energy":60},"productivity-module":{"ingredients":{"electronic-circuit":5,"advanced-circuit":5},"products":{"productivity-module":1},"category":"crafting","energy":15},"productivity-module-2":{"ingredients":{"advanced-circuit":5,"processing-unit":5,"productivity-module":4},"products":{"productivity-module-2":1},"category":"crafting","energy":30},"productivity-module-3":{"ingredients":{"advanced-circuit":5,"processing-unit":5,"productivity-module-2":4},"products":{"productivity-module-3":1},"category":"crafting","energy":60},"rocket-silo":{"ingredients":{"steel-plate":1000,"processing-unit":200,"electric-engine-unit":200,"pipe":100,"concrete":1000},"products":{"rocket-silo":1},"category":"crafting","energy":30},"cargo-landing-pad":{"ingredients":{"steel-plate":25,"processing-unit":10,"concrete":200},"products":{"cargo-landing-pad":1},"category":"crafting","energy":30},"satellite":{"ingredients":{"processing-unit":100,"low-density-structure":100,"rocket-fuel":50,"solar-panel":100,"accumulator":100,"radar":5},"products":{"satellite":1},"category":"crafting","energy":5},"basic-oil-processing":{"ingredients":{"crude-oil":100},"products":{"petroleum-gas":45},"category":"oil-processing","energy":5},"advanced-oil-processing":{"ingredients":{"water":50,"crude-oil":100},"products":{"heavy-oil":25,"light-oil":45,"petroleum-gas":55},"category":"oil-processing","energy":5},"coal-liquefaction":{"ingredients":{"coal":10,"heavy-oil":25,"steam":50},"products":{"heavy-oil":90,"light-oil":20,"petroleum-gas":10},"category":"oil-processing","energy":5},"heavy-oil-cracking":{"ingredients":{"water":30,"heavy-oil":40},"products":{"light-oil":30},"category":"chemistry","energy":2},"light-oil-cracking":{"ingredients":{"water":30,"light-oil":30},"products":{"petroleum-gas":20},"category":"chemistry","energy":2},"solid-fuel-from-petroleum-gas":{"ingredients":{"petroleum-gas":20},"products":{"solid-fuel":1},"category":"chemistry","energy":1},"solid-fuel-from-light-oil":{"ingredients":{"light-oil":10},"products":{"solid-fuel":1},"category":"chemistry","energy":1},"solid-fuel-from-heavy-oil":{"ingredients":{"heavy-oil":20},"products":{"solid-fuel":1},"category":"chemistry","energy":1},"lubricant":{"ingredients":{"heavy-oil":10},"products":{"lubricant":10},"category":"chemistry","energy":1},"sulfuric-acid":{"ingredients":{"iron-plate":1,"sulfur":5,"water":100},"products":{"sulfuric-acid":50},"category":"chemistry","energy":1},"iron-plate":{"ingredients":{"iron-ore":1},"products":{"iron-plate":1},"category":"smelting","energy":3.20000000000000017763568394002504646778106689453125},"copper-plate":{"ingredients":{"copper-ore":1},"products":{"copper-plate":1},"category":"smelting","energy":3.20000000000000017763568394002504646778106689453125},"steel-plate":{"ingredients":{"iron-plate":5},"products":{"steel-plate":1},"category":"smelting","energy":16},"plastic-bar":{"ingredients":{"coal":1,"petroleum-gas":20},"products":{"plastic-bar":2},"category":"chemistry","energy":1},"sulfur":{"ingredients":{"water":30,"petroleum-gas":30},"products":{"sulfur":2},"category":"chemistry","energy":1},"battery":{"ingredients":{"iron-plate":1,"copper-plate":1,"sulfuric-acid":20},"products":{"battery":1},"category":"chemistry","energy":4},"explosives":{"ingredients":{"coal":1,"sulfur":1,"water":10},"products":{"explosives":2},"category":"chemistry","energy":4},"water-barrel":{"ingredients":{"barrel":1,"water":50},"products":{"water-barrel":1},"category":"crafting-with-fluid","energy":0.2},"crude-oil-barrel":{"ingredients":{"barrel":1,"crude-oil":50},"products":{"crude-oil-barrel":1},"category":"crafting-with-fluid","energy":0.2},"petroleum-gas-barrel":{"ingredients":{"barrel":1,"petroleum-gas":50},"products":{"petroleum-gas-barrel":1},"category":"crafting-with-fluid","energy":0.2},"light-oil-barrel":{"ingredients":{"barrel":1,"light-oil":50},"products":{"light-oil-barrel":1},"category":"crafting-with-fluid","energy":0.2},"heavy-oil-barrel":{"ingredients":{"barrel":1,"heavy-oil":50},"products":{"heavy-oil-barrel":1},"category":"crafting-with-fluid","energy":0.2},"lubricant-barrel":{"ingredients":{"barrel":1,"lubricant":50},"products":{"lubricant-barrel":1},"category":"crafting-with-fluid","energy":0.2},"sulfuric-acid-barrel":{"ingredients":{"barrel":1,"sulfuric-acid":50},"products":{"sulfuric-acid-barrel":1},"category":"crafting-with-fluid","energy":0.2},"empty-water-barrel":{"ingredients":{"water-barrel":1},"products":{"barrel":1,"water":50},"category":"crafting-with-fluid","energy":0.2},"empty-crude-oil-barrel":{"ingredients":{"crude-oil-barrel":1},"products":{"barrel":1,"crude-oil":50},"category":"crafting-with-fluid","energy":0.2},"empty-petroleum-gas-barrel":{"ingredients":{"petroleum-gas-barrel":1},"products":{"barrel":1,"petroleum-gas":50},"category":"crafting-with-fluid","energy":0.2},"empty-light-oil-barrel":{"ingredients":{"light-oil-barrel":1},"products":{"barrel":1,"light-oil":50},"category":"crafting-with-fluid","energy":0.2},"empty-heavy-oil-barrel":{"ingredients":{"heavy-oil-barrel":1},"products":{"barrel":1,"heavy-oil":50},"category":"crafting-with-fluid","energy":0.2},"empty-lubricant-barrel":{"ingredients":{"lubricant-barrel":1},"products":{"barrel":1,"lubricant":50},"category":"crafting-with-fluid","energy":0.2},"empty-sulfuric-acid-barrel":{"ingredients":{"sulfuric-acid-barrel":1},"products":{"barrel":1,"sulfuric-acid":50},"category":"crafting-with-fluid","energy":0.2},"iron-gear-wheel":{"ingredients":{"iron-plate":2},"products":{"iron-gear-wheel":1},"category":"crafting","energy":0.5},"iron-stick":{"ingredients":{"iron-plate":1},"products":{"iron-stick":2},"category":"crafting","energy":0.5},"copper-cable":{"ingredients":{"copper-plate":1},"products":{"copper-cable":2},"category":"crafting","energy":0.5},"barrel":{"ingredients":{"steel-plate":1},"products":{"barrel":1},"category":"crafting","energy":1},"electronic-circuit":{"ingredients":{"iron-plate":1,"copper-cable":3},"products":{"electronic-circuit":1},"category":"crafting","energy":0.5},"advanced-circuit":{"ingredients":{"plastic-bar":2,"copper-cable":4,"electronic-circuit":2},"products":{"advanced-circuit":1},"category":"crafting","energy":6},"processing-unit":{"ingredients":{"electronic-circuit":20,"advanced-circuit":2,"sulfuric-acid":5},"products":{"processing-unit":1},"category":"crafting-with-fluid","energy":10},"engine-unit":{"ingredients":{"steel-plate":1,"iron-gear-wheel":1,"pipe":2},"products":{"engine-unit":1},"category":"advanced-crafting","energy":10},"electric-engine-unit":{"ingredients":{"electronic-circuit":2,"engine-unit":1,"lubricant":15},"products":{"electric-engine-unit":1},"category":"crafting-with-fluid","energy":10},"flying-robot-frame":{"ingredients":{"steel-plate":1,"battery":2,"electronic-circuit":3,"electric-engine-unit":1},"products":{"flying-robot-frame":1},"category":"crafting","energy":20},"low-density-structure":{"ingredients":{"copper-plate":20,"steel-plate":2,"plastic-bar":5},"products":{"low-density-structure":1},"category":"crafting","energy":15},"rocket-fuel":{"ingredients":{"solid-fuel":10,"light-oil":10},"products":{"rocket-fuel":1},"category":"crafting-with-fluid","energy":15},"rocket-part":{"ingredients":{"processing-unit":10,"low-density-structure":10,"rocket-fuel":10},"products":{"rocket-part":1},"category":"rocket-building","energy":3},"uranium-processing":{"ingredients":{"uranium-ore":10},"products":{"uranium-235":1,"uranium-238":1},"category":"centrifuging","energy":12},"uranium-fuel-cell":{"ingredients":{"iron-plate":10,"uranium-235":1,"uranium-238":19},"products":{"uranium-fuel-cell":10},"category":"crafting","energy":10},"nuclear-fuel-reprocessing":{"ingredients":{"depleted-uranium-fuel-cell":5},"products":{"uranium-238":3},"category":"centrifuging","energy":60},"kovarex-enrichment-process":{"ingredients":{"uranium-235":40,"uranium-238":5},"products":{"uranium-235":41,"uranium-238":2},"category":"centrifuging","energy":60},"nuclear-fuel":{"ingredients":{"rocket-fuel":1,"uranium-235":1},"products":{"nuclear-fuel":1},"category":"centrifuging","energy":90},"automation-science-pack":{"ingredients":{"copper-plate":1,"iron-gear-wheel":1},"products":{"automation-science-pack":1},"category":"crafting","energy":5},"logistic-science-pack":{"ingredients":{"transport-belt":1,"inserter":1},"products":{"logistic-science-pack":1},"category":"crafting","energy":6},"military-science-pack":{"ingredients":{"piercing-rounds-magazine":1,"grenade":1,"stone-wall":2},"products":{"military-science-pack":2},"category":"crafting","energy":10},"chemical-science-pack":{"ingredients":{"sulfur":1,"advanced-circuit":3,"engine-unit":2},"products":{"chemical-science-pack":2},"category":"crafting","energy":24},"production-science-pack":{"ingredients":{"rail":30,"electric-furnace":1,"productivity-module":1},"products":{"production-science-pack":3},"category":"crafting","energy":21},"utility-science-pack":{"ingredients":{"processing-unit":2,"flying-robot-frame":1,"low-density-structure":3},"products":{"utility-science-pack":3},"category":"crafting","energy":21},"submachine-gun":{"ingredients":{"iron-plate":10,"copper-plate":5,"iron-gear-wheel":10},"products":{"submachine-gun":1},"category":"crafting","energy":10},"shotgun":{"ingredients":{"wood":5,"iron-plate":15,"copper-plate":10,"iron-gear-wheel":5},"products":{"shotgun":1},"category":"crafting","energy":10},"combat-shotgun":{"ingredients":{"wood":10,"copper-plate":10,"steel-plate":15,"iron-gear-wheel":5},"products":{"combat-shotgun":1},"category":"crafting","energy":10},"rocket-launcher":{"ingredients":{"iron-plate":5,"iron-gear-wheel":5,"electronic-circuit":5},"products":{"rocket-launcher":1},"category":"crafting","energy":10},"flamethrower":{"ingredients":{"steel-plate":5,"iron-gear-wheel":10},"products":{"flamethrower":1},"category":"crafting","energy":10},"firearm-magazine":{"ingredients":{"iron-plate":4},"products":{"firearm-magazine":1},"category":"crafting","energy":1},"piercing-rounds-magazine":{"ingredients":{"copper-plate":5,"steel-plate":1,"firearm-magazine":1},"products":{"piercing-rounds-magazine":1},"category":"crafting","energy":3},"uranium-rounds-magazine":{"ingredients":{"uranium-238":1,"piercing-rounds-magazine":1},"products":{"uranium-rounds-magazine":1},"category":"crafting","energy":10},"shotgun-shell":{"ingredients":{"iron-plate":2,"copper-plate":2},"products":{"shotgun-shell":1},"category":"crafting","energy":3},"piercing-shotgun-shell":{"ingredients":{"copper-plate":5,"steel-plate":2,"shotgun-shell":2},"products":{"piercing-shotgun-shell":1},"category":"crafting","energy":8},"cannon-shell":{"ingredients":{"steel-plate":2,"plastic-bar":2,"explosives":1},"products":{"cannon-shell":1},"category":"crafting","energy":8},"explosive-cannon-shell":{"ingredients":{"steel-plate":2,"plastic-bar":2,"explosives":2},"products":{"explosive-cannon-shell":1},"category":"crafting","energy":8},"uranium-cannon-shell":{"ingredients":{"uranium-238":1,"cannon-shell":1},"products":{"uranium-cannon-shell":1},"category":"crafting","energy":12},"explosive-uranium-cannon-shell":{"ingredients":{"uranium-238":1,"explosive-cannon-shell":1},"products":{"explosive-uranium-cannon-shell":1},"category":"crafting","energy":12},"artillery-shell":{"ingredients":{"explosives":8,"explosive-cannon-shell":4,"radar":1},"products":{"artillery-shell":1},"category":"crafting","energy":15},"rocket":{"ingredients":{"iron-plate":2,"explosives":1},"products":{"rocket":1},"category":"crafting","energy":4},"explosive-rocket":{"ingredients":{"explosives":2,"rocket":1},"products":{"explosive-rocket":1},"category":"crafting","energy":8},"atomic-bomb":{"ingredients":{"explosives":10,"processing-unit":10,"uranium-235":30},"products":{"atomic-bomb":1},"category":"crafting","energy":50},"flamethrower-ammo":{"ingredients":{"steel-plate":5,"crude-oil":100},"products":{"flamethrower-ammo":1},"category":"chemistry","energy":6},"grenade":{"ingredients":{"coal":10,"iron-plate":5},"products":{"grenade":1},"category":"crafting","energy":8},"cluster-grenade":{"ingredients":{"steel-plate":5,"explosives":5,"grenade":7},"products":{"cluster-grenade":1},"category":"crafting","energy":8},"poison-capsule":{"ingredients":{"coal":10,"steel-plate":3,"electronic-circuit":3},"products":{"poison-capsule":1},"category":"crafting","energy":8},"slowdown-capsule":{"ingredients":{"coal":5,"steel-plate":2,"electronic-circuit":2},"products":{"slowdown-capsule":1},"category":"crafting","energy":8},"defender-capsule":{"ingredients":{"iron-gear-wheel":3,"electronic-circuit":3,"piercing-rounds-magazine":3},"products":{"defender-capsule":1},"category":"crafting","energy":8},"distractor-capsule":{"ingredients":{"advanced-circuit":3,"defender-capsule":4},"products":{"distractor-capsule":1},"category":"crafting","energy":15},"destroyer-capsule":{"ingredients":{"speed-module":1,"distractor-capsule":4},"products":{"destroyer-capsule":1},"category":"crafting","energy":15},"light-armor":{"ingredients":{"iron-plate":40},"products":{"light-armor":1},"category":"crafting","energy":3},"heavy-armor":{"ingredients":{"copper-plate":100,"steel-plate":50},"products":{"heavy-armor":1},"category":"crafting","energy":8},"modular-armor":{"ingredients":{"steel-plate":50,"advanced-circuit":30},"products":{"modular-armor":1},"category":"crafting","energy":15},"power-armor":{"ingredients":{"steel-plate":40,"processing-unit":40,"electric-engine-unit":20},"products":{"power-armor":1},"category":"crafting","energy":20},"power-armor-mk2":{"ingredients":{"processing-unit":60,"electric-engine-unit":40,"low-density-structure":30,"speed-module-2":25,"efficiency-module-2":25},"products":{"power-armor-mk2":1},"category":"crafting","energy":25},"solar-panel-equipment":{"ingredients":{"steel-plate":5,"advanced-circuit":2,"solar-panel":1},"products":{"solar-panel-equipment":1},"category":"crafting","energy":10},"fission-reactor-equipment":{"ingredients":{"processing-unit":200,"low-density-structure":50,"uranium-fuel-cell":4},"products":{"fission-reactor-equipment":1},"category":"crafting","energy":10},"battery-equipment":{"ingredients":{"steel-plate":10,"battery":5},"products":{"battery-equipment":1},"category":"crafting","energy":10},"battery-mk2-equipment":{"ingredients":{"processing-unit":15,"low-density-structure":5,"battery-equipment":10},"products":{"battery-mk2-equipment":1},"category":"crafting","energy":10},"belt-immunity-equipment":{"ingredients":{"steel-plate":10,"advanced-circuit":5},"products":{"belt-immunity-equipment":1},"category":"crafting","energy":10},"exoskeleton-equipment":{"ingredients":{"steel-plate":20,"processing-unit":10,"electric-engine-unit":30},"products":{"exoskeleton-equipment":1},"category":"crafting","energy":10},"personal-roboport-equipment":{"ingredients":{"steel-plate":20,"battery":45,"iron-gear-wheel":40,"advanced-circuit":10},"products":{"personal-roboport-equipment":1},"category":"crafting","energy":10},"personal-roboport-mk2-equipment":{"ingredients":{"processing-unit":100,"low-density-structure":20,"personal-roboport-equipment":5},"products":{"personal-roboport-mk2-equipment":1},"category":"crafting","energy":20},"night-vision-equipment":{"ingredients":{"steel-plate":10,"advanced-circuit":5},"products":{"night-vision-equipment":1},"category":"crafting","energy":10},"energy-shield-equipment":{"ingredients":{"steel-plate":10,"advanced-circuit":5},"products":{"energy-shield-equipment":1},"category":"crafting","energy":10},"energy-shield-mk2-equipment":{"ingredients":{"processing-unit":5,"low-density-structure":5,"energy-shield-equipment":10},"products":{"energy-shield-mk2-equipment":1},"category":"crafting","energy":10},"personal-laser-defense-equipment":{"ingredients":{"processing-unit":20,"low-density-structure":5,"laser-turret":5},"products":{"personal-laser-defense-equipment":1},"category":"crafting","energy":10},"discharge-defense-equipment":{"ingredients":{"steel-plate":20,"processing-unit":5,"laser-turret":10},"products":{"discharge-defense-equipment":1},"category":"crafting","energy":10},"stone-wall":{"ingredients":{"stone-brick":5},"products":{"stone-wall":1},"category":"crafting","energy":0.5},"gate":{"ingredients":{"steel-plate":2,"electronic-circuit":2,"stone-wall":1},"products":{"gate":1},"category":"crafting","energy":0.5},"radar":{"ingredients":{"iron-plate":10,"iron-gear-wheel":5,"electronic-circuit":5},"products":{"radar":1},"category":"crafting","energy":0.5},"land-mine":{"ingredients":{"steel-plate":1,"explosives":2},"products":{"land-mine":4},"category":"crafting","energy":5},"gun-turret":{"ingredients":{"iron-plate":20,"copper-plate":10,"iron-gear-wheel":10},"products":{"gun-turret":1},"category":"crafting","energy":8},"laser-turret":{"ingredients":{"steel-plate":20,"battery":12,"electronic-circuit":20},"products":{"laser-turret":1},"category":"crafting","energy":20},"flamethrower-turret":{"ingredients":{"steel-plate":30,"iron-gear-wheel":15,"engine-unit":5,"pipe":10},"products":{"flamethrower-turret":1},"category":"crafting","energy":20},"artillery-turret":{"ingredients":{"steel-plate":60,"iron-gear-wheel":40,"advanced-circuit":20,"concrete":60},"products":{"artillery-turret":1},"category":"crafting","energy":40},"parameter-0":{"ingredients":{},"products":{},"category":"parameters","energy":0.5},"parameter-1":{"ingredients":{},"products":{},"category":"parameters","energy":0.5},"parameter-2":{"ingredients":{},"products":{},"category":"parameters","energy":0.5},"parameter-3":{"ingredients":{},"products":{},"category":"parameters","energy":0.5},"parameter-4":{"ingredients":{},"products":{},"category":"parameters","energy":0.5},"parameter-5":{"ingredients":{},"products":{},"category":"parameters","energy":0.5},"parameter-6":{"ingredients":{},"products":{},"category":"parameters","energy":0.5},"parameter-7":{"ingredients":{},"products":{},"category":"parameters","energy":0.5},"parameter-8":{"ingredients":{},"products":{},"category":"parameters","energy":0.5},"parameter-9":{"ingredients":{},"products":{},"category":"parameters","energy":0.5},"recipe-unknown":{"ingredients":{},"products":{},"category":"crafting","energy":0.5}} \ No newline at end of file diff --git a/worlds/factorio/data/resources.json b/worlds/factorio/data/resources.json index 10279db37955..80c00fe3df42 100644 --- a/worlds/factorio/data/resources.json +++ b/worlds/factorio/data/resources.json @@ -1 +1 @@ -{"iron-ore":{"minable":true,"infinite":false,"category":"basic-solid","mining_time":1,"products":{"iron-ore":{"name":"iron-ore","amount":1}}},"copper-ore":{"minable":true,"infinite":false,"category":"basic-solid","mining_time":1,"products":{"copper-ore":{"name":"copper-ore","amount":1}}},"stone":{"minable":true,"infinite":false,"category":"basic-solid","mining_time":1,"products":{"stone":{"name":"stone","amount":1}}},"coal":{"minable":true,"infinite":false,"category":"basic-solid","mining_time":1,"products":{"coal":{"name":"coal","amount":1}}},"uranium-ore":{"minable":true,"infinite":false,"category":"basic-solid","mining_time":2,"required_fluid":"sulfuric-acid","fluid_amount":10,"products":{"uranium-ore":{"name":"uranium-ore","amount":1}}},"crude-oil":{"minable":true,"infinite":true,"infinite_depletion":10,"category":"basic-fluid","mining_time":1,"products":{"crude-oil":{"name":"crude-oil","amount":10}}}} \ No newline at end of file +{"iron-ore":{"minable":true,"infinite":false,"category":"basic-solid","mining_time":1,"products":{"iron-ore":{"name":"iron-ore","amount":1}}},"copper-ore":{"minable":true,"infinite":false,"category":"basic-solid","mining_time":1,"products":{"copper-ore":{"name":"copper-ore","amount":1}}},"stone":{"minable":true,"infinite":false,"category":"basic-solid","mining_time":1,"products":{"stone":{"name":"stone","amount":1}}},"coal":{"minable":true,"infinite":false,"category":"basic-solid","mining_time":1,"products":{"coal":{"name":"coal","amount":1}}},"crude-oil":{"minable":true,"infinite":true,"infinite_depletion":10,"category":"basic-fluid","mining_time":1,"products":{"crude-oil":{"name":"crude-oil","amount":10}}},"uranium-ore":{"minable":true,"infinite":false,"category":"basic-solid","mining_time":2,"required_fluid":"sulfuric-acid","fluid_amount":10,"products":{"uranium-ore":{"name":"uranium-ore","amount":1}}}} \ No newline at end of file diff --git a/worlds/factorio/data/techs.json b/worlds/factorio/data/techs.json index d9977f2986d6..ecb31126e1dc 100644 --- a/worlds/factorio/data/techs.json +++ b/worlds/factorio/data/techs.json @@ -1 +1 @@ -{"automation":{"unlocks":["assembling-machine-1","long-handed-inserter"],"requires":{},"ingredients":["automation-science-pack"],"has_modifier":false},"automation-2":{"unlocks":["assembling-machine-2"],"requires":["electronics","steel-processing","logistic-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"automation-3":{"unlocks":["assembling-machine-3"],"requires":["speed-module","production-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":false},"electronics":{"unlocks":{},"requires":["automation"],"ingredients":["automation-science-pack"],"has_modifier":false},"fast-inserter":{"unlocks":["fast-inserter","filter-inserter"],"requires":["electronics"],"ingredients":["automation-science-pack"],"has_modifier":false},"advanced-electronics":{"unlocks":["advanced-circuit"],"requires":["plastics"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"advanced-electronics-2":{"unlocks":["processing-unit"],"requires":["chemical-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"circuit-network":{"unlocks":["red-wire","green-wire","arithmetic-combinator","decider-combinator","constant-combinator","power-switch","programmable-speaker"],"requires":["electronics","logistic-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"explosives":{"unlocks":["explosives"],"requires":["sulfur-processing"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"logistics":{"unlocks":["underground-belt","splitter"],"requires":{},"ingredients":["automation-science-pack"],"has_modifier":false},"logistics-2":{"unlocks":["fast-transport-belt","fast-underground-belt","fast-splitter"],"requires":["logistics","logistic-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"logistics-3":{"unlocks":["express-transport-belt","express-underground-belt","express-splitter"],"requires":["production-science-pack","lubricant"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":false},"optics":{"unlocks":["small-lamp"],"requires":{},"ingredients":["automation-science-pack"],"has_modifier":false},"laser":{"unlocks":{},"requires":["optics","battery","chemical-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"solar-energy":{"unlocks":["solar-panel"],"requires":["optics","electronics","steel-processing","logistic-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"gun-turret":{"unlocks":["gun-turret"],"requires":{},"ingredients":["automation-science-pack"],"has_modifier":false},"laser-turret":{"unlocks":["laser-turret"],"requires":["laser","military-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":false},"stone-wall":{"unlocks":["stone-wall"],"requires":{},"ingredients":["automation-science-pack"],"has_modifier":false},"gate":{"unlocks":["gate"],"requires":["stone-wall","military-2"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"engine":{"unlocks":["engine-unit"],"requires":["steel-processing","logistic-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"electric-engine":{"unlocks":["electric-engine-unit"],"requires":["lubricant"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"lubricant":{"unlocks":["lubricant"],"requires":["advanced-oil-processing"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"battery":{"unlocks":["battery"],"requires":["sulfur-processing"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"landfill":{"unlocks":["landfill"],"requires":["logistic-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"braking-force-1":{"unlocks":{},"requires":["railway","chemical-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":true},"braking-force-2":{"unlocks":{},"requires":["braking-force-1"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":true},"braking-force-3":{"unlocks":{},"requires":["braking-force-2"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":true},"braking-force-4":{"unlocks":{},"requires":["braking-force-3"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":true},"braking-force-5":{"unlocks":{},"requires":["braking-force-4"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":true},"braking-force-6":{"unlocks":{},"requires":["braking-force-5"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack","utility-science-pack"],"has_modifier":true},"braking-force-7":{"unlocks":{},"requires":["braking-force-6"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack","utility-science-pack"],"has_modifier":true},"chemical-science-pack":{"unlocks":["chemical-science-pack"],"requires":["advanced-electronics","sulfur-processing"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"logistic-science-pack":{"unlocks":["logistic-science-pack"],"requires":{},"ingredients":["automation-science-pack"],"has_modifier":false},"military-science-pack":{"unlocks":["military-science-pack"],"requires":["military-2","stone-wall"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"production-science-pack":{"unlocks":["production-science-pack"],"requires":["productivity-module","advanced-material-processing-2","railway"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"space-science-pack":{"unlocks":["satellite"],"requires":["rocket-silo","electric-energy-accumulators","solar-energy"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack","utility-science-pack"],"has_modifier":false},"steel-processing":{"unlocks":["steel-plate","steel-chest"],"requires":{},"ingredients":["automation-science-pack"],"has_modifier":false},"utility-science-pack":{"unlocks":["utility-science-pack"],"requires":["robotics","advanced-electronics-2","low-density-structure"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"advanced-material-processing":{"unlocks":["steel-furnace"],"requires":["steel-processing","logistic-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"steel-axe":{"unlocks":{},"requires":["steel-processing"],"ingredients":["automation-science-pack"],"has_modifier":true},"advanced-material-processing-2":{"unlocks":["electric-furnace"],"requires":["advanced-material-processing","chemical-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"concrete":{"unlocks":["concrete","hazard-concrete","refined-concrete","refined-hazard-concrete"],"requires":["advanced-material-processing","automation-2"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"electric-energy-accumulators":{"unlocks":["accumulator"],"requires":["electric-energy-distribution-1","battery"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"electric-energy-distribution-1":{"unlocks":["medium-electric-pole","big-electric-pole"],"requires":["electronics","steel-processing","logistic-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"electric-energy-distribution-2":{"unlocks":["substation"],"requires":["electric-energy-distribution-1","chemical-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"railway":{"unlocks":["rail","locomotive","cargo-wagon"],"requires":["logistics-2","engine"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"fluid-wagon":{"unlocks":["fluid-wagon"],"requires":["railway","fluid-handling"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"automated-rail-transportation":{"unlocks":["train-stop"],"requires":["railway"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"rail-signals":{"unlocks":["rail-signal","rail-chain-signal"],"requires":["automated-rail-transportation"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"robotics":{"unlocks":["flying-robot-frame"],"requires":["electric-engine","battery"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"construction-robotics":{"unlocks":["roboport","logistic-chest-passive-provider","logistic-chest-storage","construction-robot"],"requires":["robotics"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":true},"logistic-robotics":{"unlocks":["roboport","logistic-chest-passive-provider","logistic-chest-storage","logistic-robot"],"requires":["robotics"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":true},"logistic-system":{"unlocks":["logistic-chest-active-provider","logistic-chest-requester","logistic-chest-buffer"],"requires":["utility-science-pack","logistic-robotics"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":false},"personal-roboport-equipment":{"unlocks":["personal-roboport-equipment"],"requires":["construction-robotics","solar-panel-equipment"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"personal-roboport-mk2-equipment":{"unlocks":["personal-roboport-mk2-equipment"],"requires":["personal-roboport-equipment","utility-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":false},"worker-robots-speed-1":{"unlocks":{},"requires":["robotics"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":true},"worker-robots-speed-2":{"unlocks":{},"requires":["worker-robots-speed-1"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":true},"worker-robots-speed-3":{"unlocks":{},"requires":["worker-robots-speed-2"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"worker-robots-speed-4":{"unlocks":{},"requires":["worker-robots-speed-3"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"mining-productivity-1":{"unlocks":{},"requires":["advanced-electronics"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":true},"mining-productivity-2":{"unlocks":{},"requires":["mining-productivity-1"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":true},"mining-productivity-3":{"unlocks":{},"requires":["mining-productivity-2"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack","utility-science-pack"],"has_modifier":true},"worker-robots-speed-5":{"unlocks":{},"requires":["worker-robots-speed-4"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack","utility-science-pack"],"has_modifier":true},"worker-robots-storage-1":{"unlocks":{},"requires":["robotics"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":true},"worker-robots-storage-2":{"unlocks":{},"requires":["worker-robots-storage-1"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":true},"worker-robots-storage-3":{"unlocks":{},"requires":["worker-robots-storage-2"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack","utility-science-pack"],"has_modifier":true},"toolbelt":{"unlocks":{},"requires":["logistic-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":true},"research-speed-1":{"unlocks":{},"requires":["automation-2"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":true},"research-speed-2":{"unlocks":{},"requires":["research-speed-1"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":true},"research-speed-3":{"unlocks":{},"requires":["research-speed-2"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":true},"research-speed-4":{"unlocks":{},"requires":["research-speed-3"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":true},"research-speed-5":{"unlocks":{},"requires":["research-speed-4"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":true},"research-speed-6":{"unlocks":{},"requires":["research-speed-5"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack","utility-science-pack"],"has_modifier":true},"stack-inserter":{"unlocks":["stack-inserter","stack-filter-inserter"],"requires":["fast-inserter","logistics-2","advanced-electronics"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":true},"inserter-capacity-bonus-1":{"unlocks":{},"requires":["stack-inserter"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":true},"inserter-capacity-bonus-2":{"unlocks":{},"requires":["inserter-capacity-bonus-1"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":true},"inserter-capacity-bonus-3":{"unlocks":{},"requires":["inserter-capacity-bonus-2"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":true},"inserter-capacity-bonus-4":{"unlocks":{},"requires":["inserter-capacity-bonus-3"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":true},"inserter-capacity-bonus-5":{"unlocks":{},"requires":["inserter-capacity-bonus-4"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":true},"inserter-capacity-bonus-6":{"unlocks":{},"requires":["inserter-capacity-bonus-5"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":true},"inserter-capacity-bonus-7":{"unlocks":{},"requires":["inserter-capacity-bonus-6"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack","utility-science-pack"],"has_modifier":true},"oil-processing":{"unlocks":["pumpjack","oil-refinery","chemical-plant","basic-oil-processing","solid-fuel-from-petroleum-gas"],"requires":["fluid-handling"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"fluid-handling":{"unlocks":["storage-tank","pump","empty-barrel","fill-water-barrel","empty-water-barrel","fill-sulfuric-acid-barrel","empty-sulfuric-acid-barrel","fill-crude-oil-barrel","empty-crude-oil-barrel","fill-heavy-oil-barrel","empty-heavy-oil-barrel","fill-light-oil-barrel","empty-light-oil-barrel","fill-petroleum-gas-barrel","empty-petroleum-gas-barrel","fill-lubricant-barrel","empty-lubricant-barrel"],"requires":["automation-2","engine"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"advanced-oil-processing":{"unlocks":["advanced-oil-processing","heavy-oil-cracking","light-oil-cracking","solid-fuel-from-heavy-oil","solid-fuel-from-light-oil"],"requires":["chemical-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"coal-liquefaction":{"unlocks":["coal-liquefaction"],"requires":["advanced-oil-processing","production-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":false},"sulfur-processing":{"unlocks":["sulfuric-acid","sulfur"],"requires":["oil-processing"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"plastics":{"unlocks":["plastic-bar"],"requires":["oil-processing"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"artillery":{"unlocks":["artillery-wagon","artillery-turret","artillery-shell","artillery-targeting-remote"],"requires":["military-4","tank"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":false},"spidertron":{"unlocks":["spidertron","spidertron-remote"],"requires":["military-4","exoskeleton-equipment","fusion-reactor-equipment","rocketry","rocket-control-unit","effectivity-module-3"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","production-science-pack","utility-science-pack"],"has_modifier":false},"military":{"unlocks":["submachine-gun","shotgun","shotgun-shell"],"requires":{},"ingredients":["automation-science-pack"],"has_modifier":false},"atomic-bomb":{"unlocks":["atomic-bomb"],"requires":["military-4","kovarex-enrichment-process","rocket-control-unit","rocketry"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","production-science-pack","utility-science-pack"],"has_modifier":false},"military-2":{"unlocks":["piercing-rounds-magazine","grenade"],"requires":["military","steel-processing","logistic-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"uranium-ammo":{"unlocks":["uranium-rounds-magazine","uranium-cannon-shell","explosive-uranium-cannon-shell"],"requires":["uranium-processing","military-4","tank"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":false},"military-3":{"unlocks":["poison-capsule","slowdown-capsule","combat-shotgun"],"requires":["chemical-science-pack","military-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":false},"military-4":{"unlocks":["piercing-shotgun-shell","cluster-grenade"],"requires":["military-3","utility-science-pack","explosives"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":false},"automobilism":{"unlocks":["car"],"requires":["logistics-2","engine"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"flammables":{"unlocks":{},"requires":["oil-processing"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"flamethrower":{"unlocks":["flamethrower","flamethrower-ammo","flamethrower-turret"],"requires":["flammables","military-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack"],"has_modifier":false},"tank":{"unlocks":["tank","cannon-shell","explosive-cannon-shell"],"requires":["automobilism","military-3","explosives"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":false},"land-mine":{"unlocks":["land-mine"],"requires":["explosives","military-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack"],"has_modifier":false},"rocketry":{"unlocks":["rocket-launcher","rocket"],"requires":["explosives","flammables","military-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack"],"has_modifier":false},"explosive-rocketry":{"unlocks":["explosive-rocket"],"requires":["rocketry","military-3"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":false},"energy-weapons-damage-1":{"unlocks":{},"requires":["laser","military-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":true},"refined-flammables-1":{"unlocks":{},"requires":["flamethrower"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack"],"has_modifier":true},"stronger-explosives-1":{"unlocks":{},"requires":["military-2"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":true},"weapon-shooting-speed-1":{"unlocks":{},"requires":["military"],"ingredients":["automation-science-pack"],"has_modifier":true},"physical-projectile-damage-1":{"unlocks":{},"requires":["military"],"ingredients":["automation-science-pack"],"has_modifier":true},"energy-weapons-damage-2":{"unlocks":{},"requires":["energy-weapons-damage-1"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":true},"physical-projectile-damage-2":{"unlocks":{},"requires":["physical-projectile-damage-1"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":true},"refined-flammables-2":{"unlocks":{},"requires":["refined-flammables-1"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack"],"has_modifier":true},"stronger-explosives-2":{"unlocks":{},"requires":["stronger-explosives-1"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack"],"has_modifier":true},"weapon-shooting-speed-2":{"unlocks":{},"requires":["weapon-shooting-speed-1"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":true},"energy-weapons-damage-3":{"unlocks":{},"requires":["energy-weapons-damage-2"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":true},"physical-projectile-damage-3":{"unlocks":{},"requires":["physical-projectile-damage-2"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack"],"has_modifier":true},"refined-flammables-3":{"unlocks":{},"requires":["refined-flammables-2"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":true},"stronger-explosives-3":{"unlocks":{},"requires":["stronger-explosives-2"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":true},"weapon-shooting-speed-3":{"unlocks":{},"requires":["weapon-shooting-speed-2"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack"],"has_modifier":true},"energy-weapons-damage-4":{"unlocks":{},"requires":["energy-weapons-damage-3"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":true},"physical-projectile-damage-4":{"unlocks":{},"requires":["physical-projectile-damage-3"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack"],"has_modifier":true},"refined-flammables-4":{"unlocks":{},"requires":["refined-flammables-3"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"stronger-explosives-4":{"unlocks":{},"requires":["stronger-explosives-3"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"weapon-shooting-speed-4":{"unlocks":{},"requires":["weapon-shooting-speed-3"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack"],"has_modifier":true},"energy-weapons-damage-5":{"unlocks":{},"requires":["energy-weapons-damage-4"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"physical-projectile-damage-5":{"unlocks":{},"requires":["physical-projectile-damage-4"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":true},"refined-flammables-5":{"unlocks":{},"requires":["refined-flammables-4"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"stronger-explosives-5":{"unlocks":{},"requires":["stronger-explosives-4"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"weapon-shooting-speed-5":{"unlocks":{},"requires":["weapon-shooting-speed-4"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":true},"energy-weapons-damage-6":{"unlocks":{},"requires":["energy-weapons-damage-5"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"physical-projectile-damage-6":{"unlocks":{},"requires":["physical-projectile-damage-5"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"refined-flammables-6":{"unlocks":{},"requires":["refined-flammables-5"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"stronger-explosives-6":{"unlocks":{},"requires":["stronger-explosives-5"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"weapon-shooting-speed-6":{"unlocks":{},"requires":["weapon-shooting-speed-5"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"laser-shooting-speed-1":{"unlocks":{},"requires":["laser","military-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":true},"laser-shooting-speed-2":{"unlocks":{},"requires":["laser-shooting-speed-1"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":true},"laser-shooting-speed-3":{"unlocks":{},"requires":["laser-shooting-speed-2"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":true},"laser-shooting-speed-4":{"unlocks":{},"requires":["laser-shooting-speed-3"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":true},"laser-shooting-speed-5":{"unlocks":{},"requires":["laser-shooting-speed-4"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"laser-shooting-speed-6":{"unlocks":{},"requires":["laser-shooting-speed-5"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"laser-shooting-speed-7":{"unlocks":{},"requires":["laser-shooting-speed-6"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"defender":{"unlocks":["defender-capsule"],"requires":["military-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack"],"has_modifier":true},"distractor":{"unlocks":["distractor-capsule"],"requires":["defender","military-3","laser"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":false},"destroyer":{"unlocks":["destroyer-capsule"],"requires":["military-4","distractor","speed-module"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":false},"follower-robot-count-1":{"unlocks":{},"requires":["defender"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack"],"has_modifier":true},"follower-robot-count-2":{"unlocks":{},"requires":["follower-robot-count-1"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack"],"has_modifier":true},"follower-robot-count-3":{"unlocks":{},"requires":["follower-robot-count-2"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":true},"follower-robot-count-4":{"unlocks":{},"requires":["follower-robot-count-3"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":true},"follower-robot-count-5":{"unlocks":{},"requires":["follower-robot-count-4","destroyer"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"follower-robot-count-6":{"unlocks":{},"requires":["follower-robot-count-5"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":true},"kovarex-enrichment-process":{"unlocks":["kovarex-enrichment-process","nuclear-fuel"],"requires":["production-science-pack","uranium-processing","rocket-fuel"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":false},"nuclear-fuel-reprocessing":{"unlocks":["nuclear-fuel-reprocessing"],"requires":["nuclear-power","production-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":false},"nuclear-power":{"unlocks":["nuclear-reactor","heat-exchanger","heat-pipe","steam-turbine"],"requires":["uranium-processing"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"uranium-processing":{"unlocks":["centrifuge","uranium-processing","uranium-fuel-cell"],"requires":["chemical-science-pack","concrete"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"heavy-armor":{"unlocks":["heavy-armor"],"requires":["military","steel-processing"],"ingredients":["automation-science-pack"],"has_modifier":false},"modular-armor":{"unlocks":["modular-armor"],"requires":["heavy-armor","advanced-electronics"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"power-armor":{"unlocks":["power-armor"],"requires":["modular-armor","electric-engine","advanced-electronics-2"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"power-armor-mk2":{"unlocks":["power-armor-mk2"],"requires":["power-armor","military-4","speed-module-2","effectivity-module-2"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":false},"energy-shield-equipment":{"unlocks":["energy-shield-equipment"],"requires":["solar-panel-equipment","military-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack"],"has_modifier":false},"energy-shield-mk2-equipment":{"unlocks":["energy-shield-mk2-equipment"],"requires":["energy-shield-equipment","military-3","low-density-structure","power-armor"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":false},"night-vision-equipment":{"unlocks":["night-vision-equipment"],"requires":["solar-panel-equipment"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"belt-immunity-equipment":{"unlocks":["belt-immunity-equipment"],"requires":["solar-panel-equipment"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"exoskeleton-equipment":{"unlocks":["exoskeleton-equipment"],"requires":["advanced-electronics-2","electric-engine","solar-panel-equipment"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"battery-equipment":{"unlocks":["battery-equipment"],"requires":["battery","solar-panel-equipment"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"battery-mk2-equipment":{"unlocks":["battery-mk2-equipment"],"requires":["battery-equipment","low-density-structure","power-armor"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"solar-panel-equipment":{"unlocks":["solar-panel-equipment"],"requires":["modular-armor","solar-energy"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"fusion-reactor-equipment":{"unlocks":["fusion-reactor-equipment"],"requires":["utility-science-pack","power-armor","military-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":false},"personal-laser-defense-equipment":{"unlocks":["personal-laser-defense-equipment"],"requires":["laser-turret","military-3","low-density-structure","power-armor","solar-panel-equipment"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":false},"discharge-defense-equipment":{"unlocks":["discharge-defense-equipment","discharge-defense-remote"],"requires":["laser-turret","military-3","power-armor","solar-panel-equipment"],"ingredients":["automation-science-pack","logistic-science-pack","military-science-pack","chemical-science-pack"],"has_modifier":false},"modules":{"unlocks":{},"requires":["advanced-electronics"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"speed-module":{"unlocks":["speed-module"],"requires":["modules"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"speed-module-2":{"unlocks":["speed-module-2"],"requires":["speed-module","advanced-electronics-2"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"speed-module-3":{"unlocks":["speed-module-3"],"requires":["speed-module-2","production-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":false},"productivity-module":{"unlocks":["productivity-module"],"requires":["modules"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"productivity-module-2":{"unlocks":["productivity-module-2"],"requires":["productivity-module","advanced-electronics-2"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"productivity-module-3":{"unlocks":["productivity-module-3"],"requires":["productivity-module-2","production-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":false},"effectivity-module":{"unlocks":["effectivity-module"],"requires":["modules"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false},"effectivity-module-2":{"unlocks":["effectivity-module-2"],"requires":["effectivity-module","advanced-electronics-2"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"effectivity-module-3":{"unlocks":["effectivity-module-3"],"requires":["effectivity-module-2","production-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":false},"effect-transmission":{"unlocks":["beacon"],"requires":["advanced-electronics-2","production-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack"],"has_modifier":false},"low-density-structure":{"unlocks":["low-density-structure"],"requires":["advanced-material-processing","chemical-science-pack"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"rocket-control-unit":{"unlocks":["rocket-control-unit"],"requires":["utility-science-pack","speed-module"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","utility-science-pack"],"has_modifier":false},"rocket-fuel":{"unlocks":["rocket-fuel"],"requires":["flammables","advanced-oil-processing"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack"],"has_modifier":false},"rocket-silo":{"unlocks":["rocket-silo","rocket-part"],"requires":["concrete","speed-module-3","productivity-module-3","rocket-fuel","rocket-control-unit"],"ingredients":["automation-science-pack","logistic-science-pack","chemical-science-pack","production-science-pack","utility-science-pack"],"has_modifier":false},"cliff-explosives":{"unlocks":["cliff-explosives"],"requires":["explosives","military-2"],"ingredients":["automation-science-pack","logistic-science-pack"],"has_modifier":false}} \ No newline at end of file +{"advanced-circuit":{"unlocks":["advanced-circuit"],"requires":["plastics"],"has_modifier":false},"advanced-combinators":{"unlocks":["selector-combinator"],"requires":["circuit-network","chemical-science-pack"],"has_modifier":false},"advanced-material-processing":{"unlocks":["steel-furnace"],"requires":["steel-processing","logistic-science-pack"],"has_modifier":false},"advanced-material-processing-2":{"unlocks":["electric-furnace"],"requires":["advanced-material-processing","chemical-science-pack"],"has_modifier":false},"advanced-oil-processing":{"unlocks":["advanced-oil-processing","heavy-oil-cracking","light-oil-cracking","solid-fuel-from-heavy-oil","solid-fuel-from-light-oil"],"requires":["chemical-science-pack"],"has_modifier":false},"artillery":{"unlocks":["artillery-wagon","artillery-turret","artillery-shell"],"requires":["military-4","tank","concrete","radar"],"has_modifier":false},"atomic-bomb":{"unlocks":["atomic-bomb"],"requires":["military-4","kovarex-enrichment-process","rocketry"],"has_modifier":false},"automated-rail-transportation":{"unlocks":["train-stop","rail-signal","rail-chain-signal"],"requires":["railway"],"has_modifier":false},"automation":{"unlocks":["assembling-machine-1","long-handed-inserter"],"requires":["automation-science-pack"],"has_modifier":false},"automation-2":{"unlocks":["assembling-machine-2"],"requires":["automation","steel-processing","logistic-science-pack"],"has_modifier":false},"automation-3":{"unlocks":["assembling-machine-3"],"requires":["speed-module","production-science-pack","electric-engine"],"has_modifier":false},"automation-science-pack":{"unlocks":["automation-science-pack"],"requires":["steam-power","electronics"],"has_modifier":false},"automobilism":{"unlocks":["car"],"requires":["logistics-2","engine"],"has_modifier":false},"battery":{"unlocks":["battery"],"requires":["sulfur-processing"],"has_modifier":false},"battery-equipment":{"unlocks":["battery-equipment"],"requires":["battery","solar-panel-equipment"],"has_modifier":false},"battery-mk2-equipment":{"unlocks":["battery-mk2-equipment"],"requires":["battery-equipment","low-density-structure","power-armor"],"has_modifier":false},"belt-immunity-equipment":{"unlocks":["belt-immunity-equipment"],"requires":["solar-panel-equipment"],"has_modifier":false},"braking-force-1":{"unlocks":{},"requires":["railway","chemical-science-pack"],"has_modifier":true},"braking-force-2":{"unlocks":{},"requires":["braking-force-1"],"has_modifier":true},"braking-force-3":{"unlocks":{},"requires":["braking-force-2","production-science-pack"],"has_modifier":true},"braking-force-4":{"unlocks":{},"requires":["braking-force-3"],"has_modifier":true},"braking-force-5":{"unlocks":{},"requires":["braking-force-4"],"has_modifier":true},"braking-force-6":{"unlocks":{},"requires":["braking-force-5","utility-science-pack"],"has_modifier":true},"braking-force-7":{"unlocks":{},"requires":["braking-force-6"],"has_modifier":true},"bulk-inserter":{"unlocks":["bulk-inserter"],"requires":["fast-inserter","logistics-2","advanced-circuit"],"has_modifier":true},"chemical-science-pack":{"unlocks":["chemical-science-pack"],"requires":["advanced-circuit","sulfur-processing"],"has_modifier":false},"circuit-network":{"unlocks":["arithmetic-combinator","decider-combinator","constant-combinator","power-switch","programmable-speaker","display-panel","iron-stick"],"requires":["logistic-science-pack"],"has_modifier":true},"cliff-explosives":{"unlocks":["cliff-explosives"],"requires":["explosives","military-2"],"has_modifier":true},"coal-liquefaction":{"unlocks":["coal-liquefaction"],"requires":["advanced-oil-processing","production-science-pack"],"has_modifier":false},"concrete":{"unlocks":["concrete","hazard-concrete","refined-concrete","refined-hazard-concrete","iron-stick"],"requires":["advanced-material-processing","automation-2"],"has_modifier":false},"construction-robotics":{"unlocks":["roboport","passive-provider-chest","storage-chest","construction-robot"],"requires":["robotics"],"has_modifier":true},"defender":{"unlocks":["defender-capsule"],"requires":["military-science-pack"],"has_modifier":true},"destroyer":{"unlocks":["destroyer-capsule"],"requires":["military-4","distractor","speed-module"],"has_modifier":false},"discharge-defense-equipment":{"unlocks":["discharge-defense-equipment"],"requires":["laser-turret","military-3","power-armor","solar-panel-equipment"],"has_modifier":false},"distractor":{"unlocks":["distractor-capsule"],"requires":["defender","military-3","laser"],"has_modifier":false},"effect-transmission":{"unlocks":["beacon"],"requires":["processing-unit","production-science-pack"],"has_modifier":false},"efficiency-module":{"unlocks":["efficiency-module"],"requires":["modules"],"has_modifier":false},"efficiency-module-2":{"unlocks":["efficiency-module-2"],"requires":["efficiency-module","processing-unit"],"has_modifier":false},"efficiency-module-3":{"unlocks":["efficiency-module-3"],"requires":["efficiency-module-2","production-science-pack"],"has_modifier":false},"electric-energy-accumulators":{"unlocks":["accumulator"],"requires":["electric-energy-distribution-1","battery"],"has_modifier":false},"electric-energy-distribution-1":{"unlocks":["medium-electric-pole","big-electric-pole","iron-stick"],"requires":["steel-processing","logistic-science-pack"],"has_modifier":false},"electric-energy-distribution-2":{"unlocks":["substation"],"requires":["electric-energy-distribution-1","chemical-science-pack"],"has_modifier":false},"electric-engine":{"unlocks":["electric-engine-unit"],"requires":["lubricant"],"has_modifier":false},"electric-mining-drill":{"unlocks":["electric-mining-drill"],"requires":["automation-science-pack"],"has_modifier":false},"electronics":{"unlocks":["copper-cable","electronic-circuit","lab","inserter","small-electric-pole"],"requires":{},"has_modifier":false},"energy-shield-equipment":{"unlocks":["energy-shield-equipment"],"requires":["solar-panel-equipment","military-science-pack"],"has_modifier":false},"energy-shield-mk2-equipment":{"unlocks":["energy-shield-mk2-equipment"],"requires":["energy-shield-equipment","military-3","low-density-structure","power-armor"],"has_modifier":false},"engine":{"unlocks":["engine-unit"],"requires":["steel-processing","logistic-science-pack"],"has_modifier":false},"exoskeleton-equipment":{"unlocks":["exoskeleton-equipment"],"requires":["processing-unit","electric-engine","solar-panel-equipment"],"has_modifier":false},"explosive-rocketry":{"unlocks":["explosive-rocket"],"requires":["rocketry","military-3"],"has_modifier":false},"explosives":{"unlocks":["explosives"],"requires":["sulfur-processing"],"has_modifier":false},"fast-inserter":{"unlocks":["fast-inserter"],"requires":["automation-science-pack"],"has_modifier":false},"fission-reactor-equipment":{"unlocks":["fission-reactor-equipment"],"requires":["utility-science-pack","power-armor","military-science-pack","nuclear-power"],"has_modifier":false},"flamethrower":{"unlocks":["flamethrower","flamethrower-ammo","flamethrower-turret"],"requires":["flammables","military-science-pack"],"has_modifier":false},"flammables":{"unlocks":{},"requires":["oil-processing"],"has_modifier":false},"fluid-handling":{"unlocks":["storage-tank","pump","barrel","water-barrel","empty-water-barrel","sulfuric-acid-barrel","empty-sulfuric-acid-barrel","crude-oil-barrel","empty-crude-oil-barrel","heavy-oil-barrel","empty-heavy-oil-barrel","light-oil-barrel","empty-light-oil-barrel","petroleum-gas-barrel","empty-petroleum-gas-barrel","lubricant-barrel","empty-lubricant-barrel"],"requires":["automation-2","engine"],"has_modifier":false},"fluid-wagon":{"unlocks":["fluid-wagon"],"requires":["railway","fluid-handling"],"has_modifier":false},"follower-robot-count-1":{"unlocks":{},"requires":["defender"],"has_modifier":true},"follower-robot-count-2":{"unlocks":{},"requires":["follower-robot-count-1"],"has_modifier":true},"follower-robot-count-3":{"unlocks":{},"requires":["follower-robot-count-2","chemical-science-pack"],"has_modifier":true},"follower-robot-count-4":{"unlocks":{},"requires":["follower-robot-count-3","destroyer"],"has_modifier":true},"gate":{"unlocks":["gate"],"requires":["stone-wall","military-2"],"has_modifier":false},"gun-turret":{"unlocks":["gun-turret"],"requires":["automation-science-pack"],"has_modifier":false},"heavy-armor":{"unlocks":["heavy-armor"],"requires":["military","steel-processing"],"has_modifier":false},"inserter-capacity-bonus-1":{"unlocks":{},"requires":["bulk-inserter"],"has_modifier":true},"inserter-capacity-bonus-2":{"unlocks":{},"requires":["inserter-capacity-bonus-1"],"has_modifier":true},"inserter-capacity-bonus-3":{"unlocks":{},"requires":["inserter-capacity-bonus-2","chemical-science-pack"],"has_modifier":true},"inserter-capacity-bonus-4":{"unlocks":{},"requires":["inserter-capacity-bonus-3","production-science-pack"],"has_modifier":true},"inserter-capacity-bonus-5":{"unlocks":{},"requires":["inserter-capacity-bonus-4"],"has_modifier":true},"inserter-capacity-bonus-6":{"unlocks":{},"requires":["inserter-capacity-bonus-5"],"has_modifier":true},"inserter-capacity-bonus-7":{"unlocks":{},"requires":["inserter-capacity-bonus-6","utility-science-pack"],"has_modifier":true},"kovarex-enrichment-process":{"unlocks":["kovarex-enrichment-process","nuclear-fuel"],"requires":["production-science-pack","uranium-processing","rocket-fuel"],"has_modifier":false},"lamp":{"unlocks":["small-lamp"],"requires":["automation-science-pack"],"has_modifier":false},"land-mine":{"unlocks":["land-mine"],"requires":["explosives","military-science-pack"],"has_modifier":false},"landfill":{"unlocks":["landfill"],"requires":["logistic-science-pack"],"has_modifier":false},"laser":{"unlocks":{},"requires":["battery","chemical-science-pack"],"has_modifier":false},"laser-shooting-speed-1":{"unlocks":{},"requires":["laser","military-science-pack"],"has_modifier":true},"laser-shooting-speed-2":{"unlocks":{},"requires":["laser-shooting-speed-1"],"has_modifier":true},"laser-shooting-speed-3":{"unlocks":{},"requires":["laser-shooting-speed-2"],"has_modifier":true},"laser-shooting-speed-4":{"unlocks":{},"requires":["laser-shooting-speed-3"],"has_modifier":true},"laser-shooting-speed-5":{"unlocks":{},"requires":["laser-shooting-speed-4","utility-science-pack"],"has_modifier":true},"laser-shooting-speed-6":{"unlocks":{},"requires":["laser-shooting-speed-5"],"has_modifier":true},"laser-shooting-speed-7":{"unlocks":{},"requires":["laser-shooting-speed-6"],"has_modifier":true},"laser-turret":{"unlocks":["laser-turret"],"requires":["laser","military-science-pack"],"has_modifier":false},"laser-weapons-damage-1":{"unlocks":{},"requires":["laser","military-science-pack"],"has_modifier":true},"laser-weapons-damage-2":{"unlocks":{},"requires":["laser-weapons-damage-1"],"has_modifier":true},"laser-weapons-damage-3":{"unlocks":{},"requires":["laser-weapons-damage-2"],"has_modifier":true},"laser-weapons-damage-4":{"unlocks":{},"requires":["laser-weapons-damage-3"],"has_modifier":true},"laser-weapons-damage-5":{"unlocks":{},"requires":["laser-weapons-damage-4","utility-science-pack"],"has_modifier":true},"laser-weapons-damage-6":{"unlocks":{},"requires":["laser-weapons-damage-5"],"has_modifier":true},"logistic-robotics":{"unlocks":["roboport","passive-provider-chest","storage-chest","logistic-robot"],"requires":["robotics"],"has_modifier":true},"logistic-science-pack":{"unlocks":["logistic-science-pack"],"requires":["automation-science-pack"],"has_modifier":false},"logistic-system":{"unlocks":["active-provider-chest","requester-chest","buffer-chest"],"requires":["utility-science-pack","logistic-robotics"],"has_modifier":true},"logistics":{"unlocks":["underground-belt","splitter"],"requires":["automation-science-pack"],"has_modifier":false},"logistics-2":{"unlocks":["fast-transport-belt","fast-underground-belt","fast-splitter"],"requires":["logistics","logistic-science-pack"],"has_modifier":false},"logistics-3":{"unlocks":["express-transport-belt","express-underground-belt","express-splitter"],"requires":["production-science-pack","lubricant"],"has_modifier":false},"low-density-structure":{"unlocks":["low-density-structure"],"requires":["advanced-material-processing","chemical-science-pack"],"has_modifier":false},"lubricant":{"unlocks":["lubricant"],"requires":["advanced-oil-processing"],"has_modifier":false},"military":{"unlocks":["submachine-gun","shotgun","shotgun-shell"],"requires":["automation-science-pack"],"has_modifier":false},"military-2":{"unlocks":["piercing-rounds-magazine","grenade"],"requires":["military","steel-processing","logistic-science-pack"],"has_modifier":false},"military-3":{"unlocks":["poison-capsule","slowdown-capsule","combat-shotgun"],"requires":["chemical-science-pack","military-science-pack"],"has_modifier":false},"military-4":{"unlocks":["piercing-shotgun-shell","cluster-grenade"],"requires":["military-3","utility-science-pack","explosives"],"has_modifier":false},"military-science-pack":{"unlocks":["military-science-pack"],"requires":["military-2","stone-wall"],"has_modifier":false},"mining-productivity-1":{"unlocks":{},"requires":["advanced-circuit"],"has_modifier":true},"mining-productivity-2":{"unlocks":{},"requires":["mining-productivity-1","chemical-science-pack"],"has_modifier":true},"mining-productivity-3":{"unlocks":{},"requires":["mining-productivity-2","production-science-pack","utility-science-pack"],"has_modifier":true},"modular-armor":{"unlocks":["modular-armor"],"requires":["heavy-armor","advanced-circuit"],"has_modifier":false},"modules":{"unlocks":{},"requires":["advanced-circuit"],"has_modifier":false},"night-vision-equipment":{"unlocks":["night-vision-equipment"],"requires":["solar-panel-equipment"],"has_modifier":false},"nuclear-fuel-reprocessing":{"unlocks":["nuclear-fuel-reprocessing"],"requires":["nuclear-power","production-science-pack"],"has_modifier":false},"nuclear-power":{"unlocks":["nuclear-reactor","heat-exchanger","heat-pipe","steam-turbine","uranium-fuel-cell"],"requires":["uranium-processing"],"has_modifier":false},"oil-gathering":{"unlocks":["pumpjack"],"requires":["fluid-handling"],"has_modifier":false},"oil-processing":{"unlocks":["oil-refinery","chemical-plant","basic-oil-processing","solid-fuel-from-petroleum-gas"],"requires":["oil-gathering"],"has_modifier":false},"personal-laser-defense-equipment":{"unlocks":["personal-laser-defense-equipment"],"requires":["laser-turret","military-3","low-density-structure","power-armor","solar-panel-equipment"],"has_modifier":false},"personal-roboport-equipment":{"unlocks":["personal-roboport-equipment"],"requires":["construction-robotics","solar-panel-equipment"],"has_modifier":false},"personal-roboport-mk2-equipment":{"unlocks":["personal-roboport-mk2-equipment"],"requires":["personal-roboport-equipment","utility-science-pack"],"has_modifier":false},"physical-projectile-damage-1":{"unlocks":{},"requires":["military"],"has_modifier":true},"physical-projectile-damage-2":{"unlocks":{},"requires":["physical-projectile-damage-1","logistic-science-pack"],"has_modifier":true},"physical-projectile-damage-3":{"unlocks":{},"requires":["physical-projectile-damage-2","military-science-pack"],"has_modifier":true},"physical-projectile-damage-4":{"unlocks":{},"requires":["physical-projectile-damage-3"],"has_modifier":true},"physical-projectile-damage-5":{"unlocks":{},"requires":["physical-projectile-damage-4","chemical-science-pack"],"has_modifier":true},"physical-projectile-damage-6":{"unlocks":{},"requires":["physical-projectile-damage-5","utility-science-pack"],"has_modifier":true},"plastics":{"unlocks":["plastic-bar"],"requires":["oil-processing"],"has_modifier":false},"power-armor":{"unlocks":["power-armor"],"requires":["modular-armor","electric-engine","processing-unit"],"has_modifier":false},"power-armor-mk2":{"unlocks":["power-armor-mk2"],"requires":["power-armor","military-4","speed-module-2","efficiency-module-2"],"has_modifier":false},"processing-unit":{"unlocks":["processing-unit"],"requires":["chemical-science-pack"],"has_modifier":false},"production-science-pack":{"unlocks":["production-science-pack"],"requires":["productivity-module","advanced-material-processing-2","railway"],"has_modifier":false},"productivity-module":{"unlocks":["productivity-module"],"requires":["modules"],"has_modifier":false},"productivity-module-2":{"unlocks":["productivity-module-2"],"requires":["productivity-module","processing-unit"],"has_modifier":false},"productivity-module-3":{"unlocks":["productivity-module-3"],"requires":["productivity-module-2","production-science-pack"],"has_modifier":false},"radar":{"unlocks":["radar"],"requires":["automation-science-pack"],"has_modifier":false},"railway":{"unlocks":["rail","locomotive","cargo-wagon","iron-stick"],"requires":["logistics-2","engine"],"has_modifier":false},"refined-flammables-1":{"unlocks":{},"requires":["flamethrower"],"has_modifier":true},"refined-flammables-2":{"unlocks":{},"requires":["refined-flammables-1"],"has_modifier":true},"refined-flammables-3":{"unlocks":{},"requires":["refined-flammables-2","chemical-science-pack"],"has_modifier":true},"refined-flammables-4":{"unlocks":{},"requires":["refined-flammables-3","utility-science-pack"],"has_modifier":true},"refined-flammables-5":{"unlocks":{},"requires":["refined-flammables-4"],"has_modifier":true},"refined-flammables-6":{"unlocks":{},"requires":["refined-flammables-5"],"has_modifier":true},"repair-pack":{"unlocks":["repair-pack"],"requires":["automation-science-pack"],"has_modifier":false},"research-speed-1":{"unlocks":{},"requires":["automation-2"],"has_modifier":true},"research-speed-2":{"unlocks":{},"requires":["research-speed-1"],"has_modifier":true},"research-speed-3":{"unlocks":{},"requires":["research-speed-2","chemical-science-pack"],"has_modifier":true},"research-speed-4":{"unlocks":{},"requires":["research-speed-3"],"has_modifier":true},"research-speed-5":{"unlocks":{},"requires":["research-speed-4","production-science-pack"],"has_modifier":true},"research-speed-6":{"unlocks":{},"requires":["research-speed-5","utility-science-pack"],"has_modifier":true},"robotics":{"unlocks":["flying-robot-frame"],"requires":["electric-engine","battery"],"has_modifier":false},"rocket-fuel":{"unlocks":["rocket-fuel"],"requires":["flammables","advanced-oil-processing"],"has_modifier":false},"rocket-silo":{"unlocks":["rocket-silo","rocket-part","cargo-landing-pad","satellite"],"requires":["concrete","rocket-fuel","electric-energy-accumulators","solar-energy","utility-science-pack","speed-module-3","productivity-module-3","radar"],"has_modifier":false},"rocketry":{"unlocks":["rocket-launcher","rocket"],"requires":["explosives","flammables","military-science-pack"],"has_modifier":false},"solar-energy":{"unlocks":["solar-panel"],"requires":["steel-processing","logistic-science-pack"],"has_modifier":false},"solar-panel-equipment":{"unlocks":["solar-panel-equipment"],"requires":["modular-armor","solar-energy"],"has_modifier":false},"space-science-pack":{"unlocks":{},"requires":["rocket-silo"],"has_modifier":false},"speed-module":{"unlocks":["speed-module"],"requires":["modules"],"has_modifier":false},"speed-module-2":{"unlocks":["speed-module-2"],"requires":["speed-module","processing-unit"],"has_modifier":false},"speed-module-3":{"unlocks":["speed-module-3"],"requires":["speed-module-2","production-science-pack"],"has_modifier":false},"spidertron":{"unlocks":["spidertron"],"requires":["military-4","exoskeleton-equipment","fission-reactor-equipment","rocketry","efficiency-module-3","radar"],"has_modifier":false},"steam-power":{"unlocks":["pipe","pipe-to-ground","offshore-pump","boiler","steam-engine"],"requires":{},"has_modifier":false},"steel-axe":{"unlocks":{},"requires":["steel-processing"],"has_modifier":true},"steel-processing":{"unlocks":["steel-plate","steel-chest"],"requires":["automation-science-pack"],"has_modifier":false},"stone-wall":{"unlocks":["stone-wall"],"requires":["automation-science-pack"],"has_modifier":false},"stronger-explosives-1":{"unlocks":{},"requires":["military-2"],"has_modifier":true},"stronger-explosives-2":{"unlocks":{},"requires":["stronger-explosives-1","military-science-pack"],"has_modifier":true},"stronger-explosives-3":{"unlocks":{},"requires":["stronger-explosives-2","chemical-science-pack"],"has_modifier":true},"stronger-explosives-4":{"unlocks":{},"requires":["stronger-explosives-3","utility-science-pack"],"has_modifier":true},"stronger-explosives-5":{"unlocks":{},"requires":["stronger-explosives-4"],"has_modifier":true},"stronger-explosives-6":{"unlocks":{},"requires":["stronger-explosives-5"],"has_modifier":true},"sulfur-processing":{"unlocks":["sulfuric-acid","sulfur"],"requires":["oil-processing"],"has_modifier":false},"tank":{"unlocks":["tank","cannon-shell","explosive-cannon-shell"],"requires":["automobilism","military-3","explosives"],"has_modifier":false},"toolbelt":{"unlocks":{},"requires":["logistic-science-pack"],"has_modifier":true},"uranium-ammo":{"unlocks":["uranium-rounds-magazine","uranium-cannon-shell","explosive-uranium-cannon-shell"],"requires":["uranium-processing","military-4","tank"],"has_modifier":false},"uranium-mining":{"unlocks":{},"requires":["chemical-science-pack","concrete"],"has_modifier":true},"uranium-processing":{"unlocks":["centrifuge","uranium-processing"],"requires":["uranium-mining"],"has_modifier":false},"utility-science-pack":{"unlocks":["utility-science-pack"],"requires":["robotics","processing-unit","low-density-structure"],"has_modifier":false},"weapon-shooting-speed-1":{"unlocks":{},"requires":["military"],"has_modifier":true},"weapon-shooting-speed-2":{"unlocks":{},"requires":["weapon-shooting-speed-1","logistic-science-pack"],"has_modifier":true},"weapon-shooting-speed-3":{"unlocks":{},"requires":["weapon-shooting-speed-2","military-science-pack"],"has_modifier":true},"weapon-shooting-speed-4":{"unlocks":{},"requires":["weapon-shooting-speed-3"],"has_modifier":true},"weapon-shooting-speed-5":{"unlocks":{},"requires":["weapon-shooting-speed-4","chemical-science-pack"],"has_modifier":true},"weapon-shooting-speed-6":{"unlocks":{},"requires":["weapon-shooting-speed-5","utility-science-pack"],"has_modifier":true},"worker-robots-speed-1":{"unlocks":{},"requires":["robotics"],"has_modifier":true},"worker-robots-speed-2":{"unlocks":{},"requires":["worker-robots-speed-1"],"has_modifier":true},"worker-robots-speed-3":{"unlocks":{},"requires":["worker-robots-speed-2","utility-science-pack"],"has_modifier":true},"worker-robots-speed-4":{"unlocks":{},"requires":["worker-robots-speed-3"],"has_modifier":true},"worker-robots-speed-5":{"unlocks":{},"requires":["worker-robots-speed-4","production-science-pack"],"has_modifier":true},"worker-robots-storage-1":{"unlocks":{},"requires":["robotics"],"has_modifier":true},"worker-robots-storage-2":{"unlocks":{},"requires":["worker-robots-storage-1","production-science-pack"],"has_modifier":true},"worker-robots-storage-3":{"unlocks":{},"requires":["worker-robots-storage-2","utility-science-pack"],"has_modifier":true}} \ No newline at end of file diff --git a/worlds/faxanadu/Items.py b/worlds/faxanadu/Items.py new file mode 100644 index 000000000000..4815fde9de66 --- /dev/null +++ b/worlds/faxanadu/Items.py @@ -0,0 +1,58 @@ +from BaseClasses import ItemClassification +from typing import List, Optional + + +class ItemDef: + def __init__(self, + id: Optional[int], + name: str, + classification: ItemClassification, + count: int, + progression_count: int, + prefill_location: Optional[str]): + self.id = id + self.name = name + self.classification = classification + self.count = count + self.progression_count = progression_count + self.prefill_location = prefill_location + + +items: List[ItemDef] = [ + ItemDef(400000, 'Progressive Sword', ItemClassification.progression, 4, 0, None), + ItemDef(400001, 'Progressive Armor', ItemClassification.progression, 3, 0, None), + ItemDef(400002, 'Progressive Shield', ItemClassification.useful, 4, 0, None), + ItemDef(400003, 'Spring Elixir', ItemClassification.progression, 1, 0, None), + ItemDef(400004, 'Mattock', ItemClassification.progression, 1, 0, None), + ItemDef(400005, 'Unlock Wingboots', ItemClassification.progression, 1, 0, None), + ItemDef(400006, 'Key Jack', ItemClassification.progression, 1, 0, None), + ItemDef(400007, 'Key Queen', ItemClassification.progression, 1, 0, None), + ItemDef(400008, 'Key King', ItemClassification.progression, 1, 0, None), + ItemDef(400009, 'Key Joker', ItemClassification.progression, 1, 0, None), + ItemDef(400010, 'Key Ace', ItemClassification.progression, 1, 0, None), + ItemDef(400011, 'Ring of Ruby', ItemClassification.progression, 1, 0, None), + ItemDef(400012, 'Ring of Dworf', ItemClassification.progression, 1, 0, None), + ItemDef(400013, 'Demons Ring', ItemClassification.progression, 1, 0, None), + ItemDef(400014, 'Black Onyx', ItemClassification.progression, 1, 0, None), + ItemDef(None, 'Sky Spring Flow', ItemClassification.progression, 1, 0, 'Sky Spring'), + ItemDef(None, 'Tower of Fortress Spring Flow', ItemClassification.progression, 1, 0, 'Tower of Fortress Spring'), + ItemDef(None, 'Joker Spring Flow', ItemClassification.progression, 1, 0, 'Joker Spring'), + ItemDef(400015, 'Deluge', ItemClassification.progression, 1, 0, None), + ItemDef(400016, 'Thunder', ItemClassification.useful, 1, 0, None), + ItemDef(400017, 'Fire', ItemClassification.useful, 1, 0, None), + ItemDef(400018, 'Death', ItemClassification.useful, 1, 0, None), + ItemDef(400019, 'Tilte', ItemClassification.useful, 1, 0, None), + ItemDef(400020, 'Ring of Elf', ItemClassification.useful, 1, 0, None), + ItemDef(400021, 'Magical Rod', ItemClassification.useful, 1, 0, None), + ItemDef(400022, 'Pendant', ItemClassification.useful, 1, 0, None), + ItemDef(400023, 'Hourglass', ItemClassification.filler, 6, 0, None), + # We need at least 4 red potions for the Tower of Red Potion. Up to the player to save them up! + ItemDef(400024, 'Red Potion', ItemClassification.filler, 15, 4, None), + ItemDef(400025, 'Elixir', ItemClassification.filler, 4, 0, None), + ItemDef(400026, 'Glove', ItemClassification.filler, 5, 0, None), + ItemDef(400027, 'Ointment', ItemClassification.filler, 8, 0, None), + ItemDef(400028, 'Poison', ItemClassification.trap, 13, 0, None), + ItemDef(None, 'Killed Evil One', ItemClassification.progression, 1, 0, 'Evil One'), + # Placeholder item so the game knows which shop slot to prefill wingboots + ItemDef(400029, 'Wingboots', ItemClassification.useful, 0, 0, None), +] diff --git a/worlds/faxanadu/Locations.py b/worlds/faxanadu/Locations.py new file mode 100644 index 000000000000..ebb785f9391a --- /dev/null +++ b/worlds/faxanadu/Locations.py @@ -0,0 +1,199 @@ +from typing import List, Optional + + +class LocationType(): + world = 1 # Just standing there in the world + hidden = 2 # Kill all monsters in the room to reveal, each "item room" counter tick. + boss_reward = 3 # Kill a boss to reveal the item + shop = 4 # Buy at a shop + give = 5 # Given by an NPC + spring = 6 # Activatable spring + boss = 7 # Entity to kill to trigger the check + + +class ItemType(): + unknown = 0 # Or don't care + red_potion = 1 + + +class LocationDef: + def __init__(self, id: Optional[int], name: str, region: str, type: int, original_item: int): + self.id = id + self.name = name + self.region = region + self.type = type + self.original_item = original_item + + +locations: List[LocationDef] = [ + # Eolis + LocationDef(400100, 'Eolis Guru', 'Eolis', LocationType.give, ItemType.unknown), + LocationDef(400101, 'Eolis Key Jack', 'Eolis', LocationType.shop, ItemType.unknown), + LocationDef(400102, 'Eolis Hand Dagger', 'Eolis', LocationType.shop, ItemType.unknown), + LocationDef(400103, 'Eolis Red Potion', 'Eolis', LocationType.shop, ItemType.red_potion), + LocationDef(400104, 'Eolis Elixir', 'Eolis', LocationType.shop, ItemType.unknown), + LocationDef(400105, 'Eolis Deluge', 'Eolis', LocationType.shop, ItemType.unknown), + + # Path to Apolune + LocationDef(400106, 'Path to Apolune Magic Shield', 'Path to Apolune', LocationType.shop, ItemType.unknown), + LocationDef(400107, 'Path to Apolune Death', 'Path to Apolune', LocationType.shop, ItemType.unknown), + + # Apolune + LocationDef(400108, 'Apolune Small Shield', 'Apolune', LocationType.shop, ItemType.unknown), + LocationDef(400109, 'Apolune Hand Dagger', 'Apolune', LocationType.shop, ItemType.unknown), + LocationDef(400110, 'Apolune Deluge', 'Apolune', LocationType.shop, ItemType.unknown), + LocationDef(400111, 'Apolune Red Potion', 'Apolune', LocationType.shop, ItemType.red_potion), + LocationDef(400112, 'Apolune Key Jack', 'Apolune', LocationType.shop, ItemType.unknown), + + # Tower of Trunk + LocationDef(400113, 'Tower of Trunk Hidden Mattock', 'Tower of Trunk', LocationType.hidden, ItemType.unknown), + LocationDef(400114, 'Tower of Trunk Hidden Hourglass', 'Tower of Trunk', LocationType.hidden, ItemType.unknown), + LocationDef(400115, 'Tower of Trunk Boss Mattock', 'Tower of Trunk', LocationType.boss_reward, ItemType.unknown), + + # Path to Forepaw + LocationDef(400116, 'Path to Forepaw Hidden Red Potion', 'Path to Forepaw', LocationType.hidden, ItemType.red_potion), + LocationDef(400117, 'Path to Forepaw Glove', 'Path to Forepaw', LocationType.world, ItemType.unknown), + + # Forepaw + LocationDef(400118, 'Forepaw Long Sword', 'Forepaw', LocationType.shop, ItemType.unknown), + LocationDef(400119, 'Forepaw Studded Mail', 'Forepaw', LocationType.shop, ItemType.unknown), + LocationDef(400120, 'Forepaw Small Shield', 'Forepaw', LocationType.shop, ItemType.unknown), + LocationDef(400121, 'Forepaw Red Potion', 'Forepaw', LocationType.shop, ItemType.red_potion), + LocationDef(400122, 'Forepaw Wingboots', 'Forepaw', LocationType.shop, ItemType.unknown), + LocationDef(400123, 'Forepaw Key Jack', 'Forepaw', LocationType.shop, ItemType.unknown), + LocationDef(400124, 'Forepaw Key Queen', 'Forepaw', LocationType.shop, ItemType.unknown), + + # Trunk + LocationDef(400125, 'Trunk Hidden Ointment', 'Trunk', LocationType.hidden, ItemType.unknown), + LocationDef(400126, 'Trunk Hidden Red Potion', 'Trunk', LocationType.hidden, ItemType.red_potion), + LocationDef(400127, 'Trunk Red Potion', 'Trunk', LocationType.world, ItemType.red_potion), + LocationDef(None, 'Sky Spring', 'Trunk', LocationType.spring, ItemType.unknown), + + # Joker Spring + LocationDef(400128, 'Joker Spring Ruby Ring', 'Joker Spring', LocationType.give, ItemType.unknown), + LocationDef(None, 'Joker Spring', 'Joker Spring', LocationType.spring, ItemType.unknown), + + # Tower of Fortress + LocationDef(400129, 'Tower of Fortress Poison 1', 'Tower of Fortress', LocationType.world, ItemType.unknown), + LocationDef(400130, 'Tower of Fortress Poison 2', 'Tower of Fortress', LocationType.world, ItemType.unknown), + LocationDef(400131, 'Tower of Fortress Hidden Wingboots', 'Tower of Fortress', LocationType.world, ItemType.unknown), + LocationDef(400132, 'Tower of Fortress Ointment', 'Tower of Fortress', LocationType.world, ItemType.unknown), + LocationDef(400133, 'Tower of Fortress Boss Wingboots', 'Tower of Fortress', LocationType.boss_reward, ItemType.unknown), + LocationDef(400134, 'Tower of Fortress Elixir', 'Tower of Fortress', LocationType.world, ItemType.unknown), + LocationDef(400135, 'Tower of Fortress Guru', 'Tower of Fortress', LocationType.give, ItemType.unknown), + LocationDef(None, 'Tower of Fortress Spring', 'Tower of Fortress', LocationType.spring, ItemType.unknown), + + # Path to Mascon + LocationDef(400136, 'Path to Mascon Hidden Wingboots', 'Path to Mascon', LocationType.hidden, ItemType.unknown), + + # Tower of Red Potion + LocationDef(400137, 'Tower of Red Potion', 'Tower of Red Potion', LocationType.world, ItemType.red_potion), + + # Mascon + LocationDef(400138, 'Mascon Large Shield', 'Mascon', LocationType.shop, ItemType.unknown), + LocationDef(400139, 'Mascon Thunder', 'Mascon', LocationType.shop, ItemType.unknown), + LocationDef(400140, 'Mascon Mattock', 'Mascon', LocationType.shop, ItemType.unknown), + LocationDef(400141, 'Mascon Red Potion', 'Mascon', LocationType.shop, ItemType.red_potion), + LocationDef(400142, 'Mascon Key Jack', 'Mascon', LocationType.shop, ItemType.unknown), + LocationDef(400143, 'Mascon Key Queen', 'Mascon', LocationType.shop, ItemType.unknown), + + # Path to Victim + LocationDef(400144, 'Misty Shop Death', 'Path to Victim', LocationType.shop, ItemType.unknown), + LocationDef(400145, 'Misty Shop Hourglass', 'Path to Victim', LocationType.shop, ItemType.unknown), + LocationDef(400146, 'Misty Shop Elixir', 'Path to Victim', LocationType.shop, ItemType.unknown), + LocationDef(400147, 'Misty Shop Red Potion', 'Path to Victim', LocationType.shop, ItemType.red_potion), + LocationDef(400148, 'Misty Doctor Office', 'Path to Victim', LocationType.hidden, ItemType.unknown), + + # Tower of Suffer + LocationDef(400149, 'Tower of Suffer Hidden Wingboots', 'Tower of Suffer', LocationType.hidden, ItemType.unknown), + LocationDef(400150, 'Tower of Suffer Hidden Hourglass', 'Tower of Suffer', LocationType.hidden, ItemType.unknown), + LocationDef(400151, 'Tower of Suffer Pendant', 'Tower of Suffer', LocationType.boss_reward, ItemType.unknown), + + # Victim + LocationDef(400152, 'Victim Full Plate', 'Victim', LocationType.shop, ItemType.unknown), + LocationDef(400153, 'Victim Mattock', 'Victim', LocationType.shop, ItemType.unknown), + LocationDef(400154, 'Victim Red Potion', 'Victim', LocationType.shop, ItemType.red_potion), + LocationDef(400155, 'Victim Key King', 'Victim', LocationType.shop, ItemType.unknown), + LocationDef(400156, 'Victim Key Queen', 'Victim', LocationType.shop, ItemType.unknown), + LocationDef(400157, 'Victim Tavern', 'Mist', LocationType.give, ItemType.unknown), + + # Mist + LocationDef(400158, 'Mist Hidden Poison 1', 'Mist', LocationType.hidden, ItemType.unknown), + LocationDef(400159, 'Mist Hidden Poison 2', 'Mist', LocationType.hidden, ItemType.unknown), + LocationDef(400160, 'Mist Hidden Wingboots', 'Mist', LocationType.hidden, ItemType.unknown), + LocationDef(400161, 'Misty Magic Hall', 'Mist', LocationType.give, ItemType.unknown), + LocationDef(400162, 'Misty House', 'Mist', LocationType.give, ItemType.unknown), + + # Useless Tower + LocationDef(400163, 'Useless Tower', 'Useless Tower', LocationType.hidden, ItemType.unknown), + + # Tower of Mist + LocationDef(400164, 'Tower of Mist Hidden Ointment', 'Tower of Mist', LocationType.hidden, ItemType.unknown), + LocationDef(400165, 'Tower of Mist Elixir', 'Tower of Mist', LocationType.world, ItemType.unknown), + LocationDef(400166, 'Tower of Mist Black Onyx', 'Tower of Mist', LocationType.boss_reward, ItemType.unknown), + + # Path to Conflate + LocationDef(400167, 'Path to Conflate Hidden Ointment', 'Path to Conflate', LocationType.hidden, ItemType.unknown), + LocationDef(400168, 'Path to Conflate Poison', 'Path to Conflate', LocationType.hidden, ItemType.unknown), + + # Helm Branch + LocationDef(400169, 'Helm Branch Hidden Glove', 'Helm Branch', LocationType.hidden, ItemType.unknown), + LocationDef(400170, 'Helm Branch Battle Helmet', 'Helm Branch', LocationType.boss_reward, ItemType.unknown), + + # Conflate + LocationDef(400171, 'Conflate Giant Blade', 'Conflate', LocationType.shop, ItemType.unknown), + LocationDef(400172, 'Conflate Magic Shield', 'Conflate', LocationType.shop, ItemType.unknown), + LocationDef(400173, 'Conflate Wingboots', 'Conflate', LocationType.shop, ItemType.unknown), + LocationDef(400174, 'Conflate Red Potion', 'Conflate', LocationType.shop, ItemType.red_potion), + LocationDef(400175, 'Conflate Guru', 'Conflate', LocationType.give, ItemType.unknown), + + # Branches + LocationDef(400176, 'Branches Hidden Ointment', 'Branches', LocationType.hidden, ItemType.unknown), + LocationDef(400177, 'Branches Poison', 'Branches', LocationType.world, ItemType.unknown), + LocationDef(400178, 'Branches Hidden Mattock', 'Branches', LocationType.hidden, ItemType.unknown), + LocationDef(400179, 'Branches Hidden Hourglass', 'Branches', LocationType.hidden, ItemType.unknown), + + # Path to Daybreak + LocationDef(400180, 'Path to Daybreak Hidden Wingboots 1', 'Path to Daybreak', LocationType.hidden, ItemType.unknown), + LocationDef(400181, 'Path to Daybreak Magical Rod', 'Path to Daybreak', LocationType.world, ItemType.unknown), + LocationDef(400182, 'Path to Daybreak Hidden Wingboots 2', 'Path to Daybreak', LocationType.hidden, ItemType.unknown), + LocationDef(400183, 'Path to Daybreak Poison', 'Path to Daybreak', LocationType.world, ItemType.unknown), + LocationDef(400184, 'Path to Daybreak Glove', 'Path to Daybreak', LocationType.world, ItemType.unknown), + LocationDef(400185, 'Path to Daybreak Battle Suit', 'Path to Daybreak', LocationType.boss_reward, ItemType.unknown), + + # Daybreak + LocationDef(400186, 'Daybreak Tilte', 'Daybreak', LocationType.shop, ItemType.unknown), + LocationDef(400187, 'Daybreak Giant Blade', 'Daybreak', LocationType.shop, ItemType.unknown), + LocationDef(400188, 'Daybreak Red Potion', 'Daybreak', LocationType.shop, ItemType.red_potion), + LocationDef(400189, 'Daybreak Key King', 'Daybreak', LocationType.shop, ItemType.unknown), + LocationDef(400190, 'Daybreak Key Queen', 'Daybreak', LocationType.shop, ItemType.unknown), + + # Dartmoor Castle + LocationDef(400191, 'Dartmoor Castle Hidden Hourglass', 'Dartmoor Castle', LocationType.hidden, ItemType.unknown), + LocationDef(400192, 'Dartmoor Castle Hidden Red Potion', 'Dartmoor Castle', LocationType.hidden, ItemType.red_potion), + + # Dartmoor + LocationDef(400193, 'Dartmoor Giant Blade', 'Dartmoor', LocationType.shop, ItemType.unknown), + LocationDef(400194, 'Dartmoor Red Potion', 'Dartmoor', LocationType.shop, ItemType.red_potion), + LocationDef(400195, 'Dartmoor Key King', 'Dartmoor', LocationType.shop, ItemType.unknown), + + # Fraternal Castle + LocationDef(400196, 'Fraternal Castle Hidden Ointment', 'Fraternal Castle', LocationType.hidden, ItemType.unknown), + LocationDef(400197, 'Fraternal Castle Shop Hidden Ointment', 'Fraternal Castle', LocationType.hidden, ItemType.unknown), + LocationDef(400198, 'Fraternal Castle Poison 1', 'Fraternal Castle', LocationType.world, ItemType.unknown), + LocationDef(400199, 'Fraternal Castle Poison 2', 'Fraternal Castle', LocationType.world, ItemType.unknown), + LocationDef(400200, 'Fraternal Castle Poison 3', 'Fraternal Castle', LocationType.world, ItemType.unknown), + # LocationDef(400201, 'Fraternal Castle Red Potion', 'Fraternal Castle', LocationType.world, ItemType.red_potion), # This location is inaccessible. Keeping commented for context. + LocationDef(400202, 'Fraternal Castle Hidden Hourglass', 'Fraternal Castle', LocationType.hidden, ItemType.unknown), + LocationDef(400203, 'Fraternal Castle Dragon Slayer', 'Fraternal Castle', LocationType.boss_reward, ItemType.unknown), + LocationDef(400204, 'Fraternal Castle Guru', 'Fraternal Castle', LocationType.give, ItemType.unknown), + + # Evil Fortress + LocationDef(400205, 'Evil Fortress Ointment', 'Evil Fortress', LocationType.world, ItemType.unknown), + LocationDef(400206, 'Evil Fortress Poison 1', 'Evil Fortress', LocationType.world, ItemType.unknown), + LocationDef(400207, 'Evil Fortress Glove', 'Evil Fortress', LocationType.world, ItemType.unknown), + LocationDef(400208, 'Evil Fortress Poison 2', 'Evil Fortress', LocationType.world, ItemType.unknown), + LocationDef(400209, 'Evil Fortress Poison 3', 'Evil Fortress', LocationType.world, ItemType.unknown), + LocationDef(400210, 'Evil Fortress Hidden Glove', 'Evil Fortress', LocationType.hidden, ItemType.unknown), + LocationDef(None, 'Evil One', 'Evil Fortress', LocationType.boss, ItemType.unknown), +] diff --git a/worlds/faxanadu/Options.py b/worlds/faxanadu/Options.py new file mode 100644 index 000000000000..dbcb5789944f --- /dev/null +++ b/worlds/faxanadu/Options.py @@ -0,0 +1,107 @@ +from Options import PerGameCommonOptions, Toggle, DefaultOnToggle, StartInventoryPool, Choice +from dataclasses import dataclass + + +class KeepShopRedPotions(Toggle): + """ + Prevents the Shop's Red Potions from being shuffled. Those locations + will have purchasable Red Potion as usual for their usual price. + """ + display_name = "Keep Shop Red Potions" + + +class IncludePendant(Toggle): + """ + Pendant is an item that boosts your attack power permanently when picked up. + However, due to a programming error in the original game, it has the reverse + effect. You start with the Pendant power, and lose it when picking + it up. So this item is essentially a trap. + There is a setting in the client to reverse the effect back to its original intend. + This could be used in conjunction with this option to increase or lower difficulty. + """ + display_name = "Include Pendant" + + +class IncludePoisons(DefaultOnToggle): + """ + Whether or not to include Poison Potions in the pool of items. Including them + effectively turn them into traps in multiplayer. + """ + display_name = "Include Poisons" + + +class RequireDragonSlayer(Toggle): + """ + Requires the Dragon Slayer to be available before fighting the final boss is required. + Turning this on will turn Progressive Shields into progression items. + + This setting does not force you to use Dragon Slayer to kill the final boss. + Instead, it ensures that you will have the Dragon Slayer and be able to equip + it before you are expected to beat the final boss. + """ + display_name = "Require Dragon Slayer" + + +class RandomMusic(Toggle): + """ + All levels' music is shuffled. Except the title screen because it's finite. + This is an aesthetic option and doesn't affect gameplay. + """ + display_name = "Random Musics" + + +class RandomSound(Toggle): + """ + All sounds are shuffled. + This is an aesthetic option and doesn't affect gameplay. + """ + display_name = "Random Sounds" + + +class RandomNPC(Toggle): + """ + NPCs and their portraits are shuffled. + This is an aesthetic option and doesn't affect gameplay. + """ + display_name = "Random NPCs" + + +class RandomMonsters(Choice): + """ + Choose how monsters are randomized. + "Vanilla": No randomization + "Level Shuffle": Monsters are shuffled within a level + "Level Random": Monsters are picked randomly, balanced based on the ratio of the current level + "World Shuffle": Monsters are shuffled across the entire world + "World Random": Monsters are picked randomly, balanced based on the ratio of the entire world + "Chaotic": Completely random, except big vs small ratio is kept. Big are mini-bosses. + """ + display_name = "Random Monsters" + option_vanilla = 0 + option_level_shuffle = 1 + option_level_random = 2 + option_world_shuffle = 3 + option_world_random = 4 + option_chaotic = 5 + default = 0 + + +class RandomRewards(Toggle): + """ + Monsters drops are shuffled. + """ + display_name = "Random Rewards" + + +@dataclass +class FaxanaduOptions(PerGameCommonOptions): + start_inventory_from_pool: StartInventoryPool + keep_shop_red_potions: KeepShopRedPotions + include_pendant: IncludePendant + include_poisons: IncludePoisons + require_dragon_slayer: RequireDragonSlayer + random_musics: RandomMusic + random_sounds: RandomSound + random_npcs: RandomNPC + random_monsters: RandomMonsters + random_rewards: RandomRewards diff --git a/worlds/faxanadu/Regions.py b/worlds/faxanadu/Regions.py new file mode 100644 index 000000000000..9db11d8ef114 --- /dev/null +++ b/worlds/faxanadu/Regions.py @@ -0,0 +1,66 @@ +from BaseClasses import Region +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from . import FaxanaduWorld + + +def create_region(name, player, multiworld): + region = Region(name, player, multiworld) + multiworld.regions.append(region) + return region + + +def create_regions(faxanadu_world: "FaxanaduWorld"): + player = faxanadu_world.player + multiworld = faxanadu_world.multiworld + + # Create regions + menu = create_region("Menu", player, multiworld) + eolis = create_region("Eolis", player, multiworld) + path_to_apolune = create_region("Path to Apolune", player, multiworld) + apolune = create_region("Apolune", player, multiworld) + create_region("Tower of Trunk", player, multiworld) + path_to_forepaw = create_region("Path to Forepaw", player, multiworld) + forepaw = create_region("Forepaw", player, multiworld) + trunk = create_region("Trunk", player, multiworld) + create_region("Joker Spring", player, multiworld) + create_region("Tower of Fortress", player, multiworld) + path_to_mascon = create_region("Path to Mascon", player, multiworld) + create_region("Tower of Red Potion", player, multiworld) + mascon = create_region("Mascon", player, multiworld) + path_to_victim = create_region("Path to Victim", player, multiworld) + create_region("Tower of Suffer", player, multiworld) + victim = create_region("Victim", player, multiworld) + mist = create_region("Mist", player, multiworld) + create_region("Useless Tower", player, multiworld) + create_region("Tower of Mist", player, multiworld) + path_to_conflate = create_region("Path to Conflate", player, multiworld) + create_region("Helm Branch", player, multiworld) + create_region("Conflate", player, multiworld) + branches = create_region("Branches", player, multiworld) + path_to_daybreak = create_region("Path to Daybreak", player, multiworld) + daybreak = create_region("Daybreak", player, multiworld) + dartmoor_castle = create_region("Dartmoor Castle", player, multiworld) + create_region("Dartmoor", player, multiworld) + create_region("Fraternal Castle", player, multiworld) + create_region("Evil Fortress", player, multiworld) + + # Create connections + menu.add_exits(["Eolis"]) + eolis.add_exits(["Path to Apolune"]) + path_to_apolune.add_exits(["Apolune"]) + apolune.add_exits(["Tower of Trunk", "Path to Forepaw"]) + path_to_forepaw.add_exits(["Forepaw"]) + forepaw.add_exits(["Trunk"]) + trunk.add_exits(["Joker Spring", "Tower of Fortress", "Path to Mascon"]) + path_to_mascon.add_exits(["Tower of Red Potion", "Mascon"]) + mascon.add_exits(["Path to Victim"]) + path_to_victim.add_exits(["Tower of Suffer", "Victim"]) + victim.add_exits(["Mist"]) + mist.add_exits(["Useless Tower", "Tower of Mist", "Path to Conflate"]) + path_to_conflate.add_exits(["Helm Branch", "Conflate", "Branches"]) + branches.add_exits(["Path to Daybreak"]) + path_to_daybreak.add_exits(["Daybreak"]) + daybreak.add_exits(["Dartmoor Castle"]) + dartmoor_castle.add_exits(["Dartmoor", "Fraternal Castle", "Evil Fortress"]) diff --git a/worlds/faxanadu/Rules.py b/worlds/faxanadu/Rules.py new file mode 100644 index 000000000000..a48b442c107a --- /dev/null +++ b/worlds/faxanadu/Rules.py @@ -0,0 +1,79 @@ +from typing import TYPE_CHECKING +from worlds.generic.Rules import set_rule + +if TYPE_CHECKING: + from . import FaxanaduWorld + + +def can_buy_in_eolis(state, player): + # Sword or Deluge so we can farm for gold. + # Ring of Elf so we can get 1500 from the King. + return state.has_any(["Progressive Sword", "Deluge", "Ring of Elf"], player) + + +def has_any_magic(state, player): + return state.has_any(["Deluge", "Thunder", "Fire", "Death", "Tilte"], player) + + +def set_rules(faxanadu_world: "FaxanaduWorld"): + player = faxanadu_world.player + multiworld = faxanadu_world.multiworld + + # Region rules + set_rule(multiworld.get_entrance("Eolis -> Path to Apolune", player), lambda state: + state.has_all(["Key Jack", "Progressive Sword"], player)) # You can't go far with magic only + set_rule(multiworld.get_entrance("Apolune -> Tower of Trunk", player), lambda state: state.has("Key Jack", player)) + set_rule(multiworld.get_entrance("Apolune -> Path to Forepaw", player), lambda state: state.has("Mattock", player)) + set_rule(multiworld.get_entrance("Trunk -> Joker Spring", player), lambda state: state.has("Key Joker", player)) + set_rule(multiworld.get_entrance("Trunk -> Tower of Fortress", player), lambda state: state.has("Key Jack", player)) + set_rule(multiworld.get_entrance("Trunk -> Path to Mascon", player), lambda state: + state.has_all(["Key Queen", "Ring of Ruby", "Sky Spring Flow", "Tower of Fortress Spring Flow", "Joker Spring Flow"], player) and + state.has("Progressive Sword", player, 2)) + set_rule(multiworld.get_entrance("Path to Mascon -> Tower of Red Potion", player), lambda state: + state.has("Key Queen", player) and + state.has("Red Potion", player, 4)) # It's impossible to go through the tower of Red Potion without at least 1-2 potions. Give them 4 for good measure. + set_rule(multiworld.get_entrance("Path to Victim -> Tower of Suffer", player), lambda state: state.has("Key Queen", player)) + set_rule(multiworld.get_entrance("Path to Victim -> Victim", player), lambda state: state.has("Unlock Wingboots", player)) + set_rule(multiworld.get_entrance("Mist -> Useless Tower", player), lambda state: + state.has_all(["Key King", "Unlock Wingboots"], player)) + set_rule(multiworld.get_entrance("Mist -> Tower of Mist", player), lambda state: state.has("Key King", player)) + set_rule(multiworld.get_entrance("Mist -> Path to Conflate", player), lambda state: state.has("Key Ace", player)) + set_rule(multiworld.get_entrance("Path to Conflate -> Helm Branch", player), lambda state: state.has("Key King", player)) + set_rule(multiworld.get_entrance("Path to Conflate -> Branches", player), lambda state: state.has("Key King", player)) + set_rule(multiworld.get_entrance("Daybreak -> Dartmoor Castle", player), lambda state: state.has("Ring of Dworf", player)) + set_rule(multiworld.get_entrance("Dartmoor Castle -> Evil Fortress", player), lambda state: state.has("Demons Ring", player)) + + # Location rules + set_rule(multiworld.get_location("Eolis Key Jack", player), lambda state: can_buy_in_eolis(state, player)) + set_rule(multiworld.get_location("Eolis Hand Dagger", player), lambda state: can_buy_in_eolis(state, player)) + set_rule(multiworld.get_location("Eolis Elixir", player), lambda state: can_buy_in_eolis(state, player)) + set_rule(multiworld.get_location("Eolis Deluge", player), lambda state: can_buy_in_eolis(state, player)) + set_rule(multiworld.get_location("Eolis Red Potion", player), lambda state: can_buy_in_eolis(state, player)) + set_rule(multiworld.get_location("Path to Apolune Magic Shield", player), lambda state: state.has("Key King", player)) # Mid-late cost, make sure we've progressed + set_rule(multiworld.get_location("Path to Apolune Death", player), lambda state: state.has("Key Ace", player)) # Mid-late cost, make sure we've progressed + set_rule(multiworld.get_location("Tower of Trunk Hidden Mattock", player), lambda state: + # This is actually possible if the monster drop into the stairs and kill it with dagger. But it's a "pro move" + state.has("Deluge", player, 1) or + state.has("Progressive Sword", player, 2)) + set_rule(multiworld.get_location("Path to Forepaw Glove", player), lambda state: + state.has_all(["Deluge", "Unlock Wingboots"], player)) + set_rule(multiworld.get_location("Trunk Red Potion", player), lambda state: state.has("Unlock Wingboots", player)) + set_rule(multiworld.get_location("Sky Spring", player), lambda state: state.has("Unlock Wingboots", player)) + set_rule(multiworld.get_location("Tower of Fortress Spring", player), lambda state: state.has("Spring Elixir", player)) + set_rule(multiworld.get_location("Tower of Fortress Guru", player), lambda state: state.has("Sky Spring Flow", player)) + set_rule(multiworld.get_location("Tower of Suffer Hidden Wingboots", player), lambda state: + state.has("Deluge", player) or + state.has("Progressive Sword", player, 2)) + set_rule(multiworld.get_location("Misty House", player), lambda state: state.has("Black Onyx", player)) + set_rule(multiworld.get_location("Misty Doctor Office", player), lambda state: has_any_magic(state, player)) + set_rule(multiworld.get_location("Conflate Guru", player), lambda state: state.has("Progressive Armor", player, 3)) + set_rule(multiworld.get_location("Branches Hidden Mattock", player), lambda state: state.has("Unlock Wingboots", player)) + set_rule(multiworld.get_location("Path to Daybreak Glove", player), lambda state: state.has("Unlock Wingboots", player)) + set_rule(multiworld.get_location("Dartmoor Castle Hidden Hourglass", player), lambda state: state.has("Unlock Wingboots", player)) + set_rule(multiworld.get_location("Dartmoor Castle Hidden Red Potion", player), lambda state: has_any_magic(state, player)) + set_rule(multiworld.get_location("Fraternal Castle Guru", player), lambda state: state.has("Progressive Sword", player, 4)) + set_rule(multiworld.get_location("Fraternal Castle Shop Hidden Ointment", player), lambda state: has_any_magic(state, player)) + + if faxanadu_world.options.require_dragon_slayer.value: + set_rule(multiworld.get_location("Evil One", player), lambda state: + state.has_all_counts({"Progressive Sword": 4, "Progressive Armor": 3, "Progressive Shield": 4}, player)) diff --git a/worlds/faxanadu/__init__.py b/worlds/faxanadu/__init__.py new file mode 100644 index 000000000000..c4ae1ccaa198 --- /dev/null +++ b/worlds/faxanadu/__init__.py @@ -0,0 +1,190 @@ +from typing import Any, Dict, List + +from BaseClasses import Item, Location, Tutorial, ItemClassification, MultiWorld +from worlds.AutoWorld import WebWorld, World +from . import Items, Locations, Regions, Rules +from .Options import FaxanaduOptions +from worlds.generic.Rules import set_rule + + +DAXANADU_VERSION = "0.3.0" + + +class FaxanaduLocation(Location): + game: str = "Faxanadu" + + +class FaxanaduItem(Item): + game: str = "Faxanadu" + + +class FaxanaduWeb(WebWorld): + tutorials = [Tutorial( + "Multiworld Setup Guide", + "A guide to setting up the Faxanadu randomizer connected to an Archipelago Multiworld", + "English", + "setup_en.md", + "setup/en", + ["Daivuk"] + )] + theme = "dirt" + + +class FaxanaduWorld(World): + """ + Faxanadu is an action role-playing platform video game developed by Hudson Soft for the Nintendo Entertainment System + """ + options_dataclass = FaxanaduOptions + options: FaxanaduOptions + game = "Faxanadu" + web = FaxanaduWeb() + + item_name_to_id = {item.name: item.id for item in Items.items if item.id is not None} + item_name_to_item = {item.name: item for item in Items.items} + location_name_to_id = {loc.name: loc.id for loc in Locations.locations if loc.id is not None} + + def __init__(self, world: MultiWorld, player: int): + self.filler_ratios: Dict[str, int] = {} + + super().__init__(world, player) + + def create_regions(self): + Regions.create_regions(self) + + # Add locations into regions + for region in self.multiworld.get_regions(self.player): + for loc in [location for location in Locations.locations if location.region == region.name]: + location = FaxanaduLocation(self.player, loc.name, loc.id, region) + + # In Faxanadu, Poison hurts you when picked up. It makes no sense to sell them in shops + if loc.type == Locations.LocationType.shop: + location.item_rule = lambda item, player=self.player: not (player == item.player and item.name == "Poison") + + region.locations.append(location) + + def set_rules(self): + Rules.set_rules(self) + self.multiworld.completion_condition[self.player] = lambda state: state.has("Killed Evil One", self.player) + + def create_item(self, name: str) -> FaxanaduItem: + item: Items.ItemDef = self.item_name_to_item[name] + return FaxanaduItem(name, item.classification, item.id, self.player) + + # Returns how many red potions were prefilled into shops + def prefill_shop_red_potions(self) -> int: + red_potion_in_shop_count = 0 + if self.options.keep_shop_red_potions: + red_potion_item = self.item_name_to_item["Red Potion"] + red_potion_shop_locations = [ + loc + for loc in Locations.locations + if loc.type == Locations.LocationType.shop and loc.original_item == Locations.ItemType.red_potion + ] + for loc in red_potion_shop_locations: + location = self.get_location(loc.name) + location.place_locked_item(FaxanaduItem(red_potion_item.name, red_potion_item.classification, red_potion_item.id, self.player)) + red_potion_in_shop_count += 1 + return red_potion_in_shop_count + + def put_wingboot_in_shop(self, shops, region_name): + item = self.item_name_to_item["Wingboots"] + shop = shops.pop(region_name) + slot = self.random.randint(0, len(shop) - 1) + loc = shop[slot] + location = self.get_location(loc.name) + location.place_locked_item(FaxanaduItem(item.name, item.classification, item.id, self.player)) + + # Put a rule right away that we need to have to unlocked. + set_rule(location, lambda state: state.has("Unlock Wingboots", self.player)) + + # Returns how many wingboots were prefilled into shops + def prefill_shop_wingboots(self) -> int: + # Collect shops + shops: Dict[str, List[Locations.LocationDef]] = {} + for loc in Locations.locations: + if loc.type == Locations.LocationType.shop: + if self.options.keep_shop_red_potions and loc.original_item == Locations.ItemType.red_potion: + continue # Don't override our red potions + shops.setdefault(loc.region, []).append(loc) + + shop_count = len(shops) + wingboots_count = round(shop_count / 2.5) # On 10 shops, we should have about 4 shops with wingboots + + # At least one should be in the first 4 shops. Because we require wingboots to progress past that point. + must_have_regions = [region for i, region in enumerate(shops) if i < 4] + self.put_wingboot_in_shop(shops, self.random.choice(must_have_regions)) + + # Fill in the rest randomly in remaining shops + for i in range(wingboots_count - 1): # -1 because we added one already + region = self.random.choice(list(shops.keys())) + self.put_wingboot_in_shop(shops, region) + + return wingboots_count + + def create_items(self) -> None: + itempool: List[FaxanaduItem] = [] + + # Prefill red potions in shops if option is set + red_potion_in_shop_count = self.prefill_shop_red_potions() + + # Prefill wingboots in shops + wingboots_in_shop_count = self.prefill_shop_wingboots() + + # Create the item pool, excluding fillers. + prefilled_count = red_potion_in_shop_count + wingboots_in_shop_count + for item in Items.items: + # Ignore pendant if turned off + if item.name == "Pendant" and not self.options.include_pendant: + continue + + # ignore fillers for now, we will fill them later + if item.classification in [ItemClassification.filler, ItemClassification.trap] and \ + item.progression_count == 0: + continue + + prefill_loc = None + if item.prefill_location: + prefill_loc = self.get_location(item.prefill_location) + + # if require dragon slayer is turned on, we need progressive shields to be progression + item_classification = item.classification + if self.options.require_dragon_slayer and item.name == "Progressive Shield": + item_classification = ItemClassification.progression + + if prefill_loc: + prefill_loc.place_locked_item(FaxanaduItem(item.name, item_classification, item.id, self.player)) + prefilled_count += 1 + else: + for i in range(item.count - item.progression_count): + itempool.append(FaxanaduItem(item.name, item_classification, item.id, self.player)) + for i in range(item.progression_count): + itempool.append(FaxanaduItem(item.name, ItemClassification.progression, item.id, self.player)) + + # Set up filler ratios + self.filler_ratios = { + item.name: item.count + for item in Items.items + if item.classification in [ItemClassification.filler, ItemClassification.trap] + } + + # If red potions are locked in shops, remove the count from the ratio. + self.filler_ratios["Red Potion"] -= red_potion_in_shop_count + + # Remove poisons if not desired + if not self.options.include_poisons: + self.filler_ratios["Poison"] = 0 + + # Randomly add fillers to the pool with ratios based on og game occurrence counts. + filler_count = len(Locations.locations) - len(itempool) - prefilled_count + for i in range(filler_count): + itempool.append(self.create_item(self.get_filler_item_name())) + + self.multiworld.itempool += itempool + + def get_filler_item_name(self) -> str: + return self.random.choices(list(self.filler_ratios.keys()), weights=list(self.filler_ratios.values()))[0] + + def fill_slot_data(self) -> Dict[str, Any]: + slot_data = self.options.as_dict("keep_shop_red_potions", "random_musics", "random_sounds", "random_npcs", "random_monsters", "random_rewards") + slot_data["daxanadu_version"] = DAXANADU_VERSION + return slot_data diff --git a/worlds/faxanadu/docs/en_Faxanadu.md b/worlds/faxanadu/docs/en_Faxanadu.md new file mode 100644 index 000000000000..7f5c4ab293ce --- /dev/null +++ b/worlds/faxanadu/docs/en_Faxanadu.md @@ -0,0 +1,27 @@ +# Faxanadu + +## Where is the settings page? + +The [player options page](../player-options) contains the options needed to configure your game session. + +## What does randomization do to this game? + +All game items collected in the map, shops, and boss drops are randomized. + +Keys are unique. Once you get the Jack Key, you can open all Jack doors; the key stays in your inventory. + +Wingboots are randomized across shops only. They are LOCKED and cannot be bought until you get the item that unlocks them. + +Normal Elixirs don't revive the tower spring. A new item, Spring Elixir, is necessary. This new item is unique. + +## What is the goal? + +The goal is to kill the Evil One. + +## What is a "check" in The Faxanadu? + +Shop items, item locations in the world, boss drops, and secret items. + +## What "items" can you unlock in Faxanadu? + +Keys, Armors, Weapons, Potions, Shields, Magics, Poisons, Gloves, etc. diff --git a/worlds/faxanadu/docs/setup_en.md b/worlds/faxanadu/docs/setup_en.md new file mode 100644 index 000000000000..4ff714c61393 --- /dev/null +++ b/worlds/faxanadu/docs/setup_en.md @@ -0,0 +1,32 @@ +# Faxanadu Randomizer Setup + +## Required Software + +- [Daxanadu](https://github.com/Daivuk/Daxanadu/releases/) +- Faxanadu ROM, English version + +## Optional Software + +- [ArchipelagoTextClient](https://github.com/ArchipelagoMW/Archipelago/releases) + +## Installing Daxanadu +1. Download [Daxanadu.zip](https://github.com/Daivuk/Daxanadu/releases/) and extract it. +2. Copy your rom `Faxanadu (U).nes` into the newly extracted folder. + +## Joining a MultiWorld Game + +1. Launch Daxanadu.exe +2. From the Main menu, go to the `ARCHIPELAGO` menu. Enter the server's address, slot name, and password. Then select `PLAY`. +3. Enjoy! + +To continue a game, follow the same connection steps. +Connecting with a different seed won't erase your progress in other seeds. + +## Archipelago Text Client + +We recommend having Archipelago's Text Client open on the side to keep track of what items you receive and send. +Daxanadu doesn't display messages. You'll only get popups when picking them up. + +## Auto-Tracking + +Daxanadu has an integrated tracker that can be toggled in the options. diff --git a/worlds/ffmq/Client.py b/worlds/ffmq/Client.py index 93688a6116f6..401c240a46ba 100644 --- a/worlds/ffmq/Client.py +++ b/worlds/ffmq/Client.py @@ -47,6 +47,17 @@ def get_flag(data, flag): bit = int(0x80 / (2 ** (flag % 8))) return (data[byte] & bit) > 0 +def validate_read_state(data1, data2): + validation_array = bytes([0x01, 0x46, 0x46, 0x4D, 0x51, 0x52]) + + if data1 is None or data2 is None: + return False + for i in range(6): + if data1[i] != validation_array[i] or data2[i] != validation_array[i]: + return False; + return True + + class FFMQClient(SNIClient): game = "Final Fantasy Mystic Quest" @@ -67,11 +78,11 @@ async def validate_rom(self, ctx): async def game_watcher(self, ctx): from SNIClient import snes_buffered_write, snes_flush_writes, snes_read - check_1 = await snes_read(ctx, 0xF53749, 1) + check_1 = await snes_read(ctx, 0xF53749, 6) received = await snes_read(ctx, RECEIVED_DATA[0], RECEIVED_DATA[1]) data = await snes_read(ctx, READ_DATA_START, READ_DATA_END - READ_DATA_START) - check_2 = await snes_read(ctx, 0xF53749, 1) - if check_1 != b'\x01' or check_2 != b'\x01': + check_2 = await snes_read(ctx, 0xF53749, 6) + if not validate_read_state(check_1, check_2): return def get_range(data_range): 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): diff --git a/worlds/generic/Rules.py b/worlds/generic/Rules.py index e930c4b8d6e9..31d725bff722 100644 --- a/worlds/generic/Rules.py +++ b/worlds/generic/Rules.py @@ -69,7 +69,7 @@ def forbid(sender: int, receiver: int, items: typing.Set[str]): if (location.player, location.item_rule) in func_cache: location.item_rule = func_cache[location.player, location.item_rule] # empty rule that just returns True, overwrite - elif location.item_rule is location.__class__.item_rule: + elif location.item_rule is Location.item_rule: func_cache[location.player, location.item_rule] = location.item_rule = \ lambda i, sending_blockers = forbid_data[location.player], \ old_rule = location.item_rule: \ @@ -103,7 +103,7 @@ def set_rule(spot: typing.Union["BaseClasses.Location", "BaseClasses.Entrance"], def add_rule(spot: typing.Union["BaseClasses.Location", "BaseClasses.Entrance"], rule: CollectionRule, combine="and"): old_rule = spot.access_rule # empty rule, replace instead of add - if old_rule is spot.__class__.access_rule: + if old_rule is Location.access_rule or old_rule is Entrance.access_rule: spot.access_rule = rule if combine == "and" else old_rule else: if combine == "and": @@ -115,7 +115,7 @@ def add_rule(spot: typing.Union["BaseClasses.Location", "BaseClasses.Entrance"], def forbid_item(location: "BaseClasses.Location", item: str, player: int): old_rule = location.item_rule # empty rule - if old_rule is location.__class__.item_rule: + if old_rule is Location.item_rule: location.item_rule = lambda i: i.name != item or i.player != player else: location.item_rule = lambda i: (i.name != item or i.player != player) and old_rule(i) @@ -135,7 +135,7 @@ def forbid_items(location: "BaseClasses.Location", items: typing.Set[str]): def add_item_rule(location: "BaseClasses.Location", rule: ItemRule, combine: str = "and"): old_rule = location.item_rule # empty rule, replace instead of add - if old_rule is location.__class__.item_rule: + if old_rule is Location.item_rule: location.item_rule = rule if combine == "and" else old_rule else: if combine == "and": diff --git a/worlds/generic/docs/mac_en.md b/worlds/generic/docs/mac_en.md index 2904781862da..76b1ee4a3827 100644 --- a/worlds/generic/docs/mac_en.md +++ b/worlds/generic/docs/mac_en.md @@ -2,8 +2,8 @@ Archipelago does not have a compiled release on macOS. However, it is possible to run from source code on macOS. This guide expects you to have some experience with running software from the terminal. ## Prerequisite Software Here is a list of software to install and source code to download. -1. Python 3.9 "universal2" or newer from the [macOS Python downloads page](https://www.python.org/downloads/macos/). - **Python 3.11 is not supported yet.** +1. Python 3.10 "universal2" or newer from the [macOS Python downloads page](https://www.python.org/downloads/macos/). + **Python 3.13 is not supported yet.** 2. Xcode from the [macOS App Store](https://apps.apple.com/us/app/xcode/id497799835). 3. The source code from the [Archipelago releases page](https://github.com/ArchipelagoMW/Archipelago/releases). 4. The asset with darwin in the name from the [SNI Github releases page](https://github.com/alttpo/sni/releases). diff --git a/worlds/heretic/Options.py b/worlds/heretic/Options.py index 75e2257a7336..7d98207b0f8e 100644 --- a/worlds/heretic/Options.py +++ b/worlds/heretic/Options.py @@ -16,14 +16,8 @@ class Goal(Choice): class Difficulty(Choice): """ - Choose the difficulty option. Those match DOOM's difficulty options. - baby (I'm too young to die.) double ammos, half damage, less monsters or strength. - easy (Hey, not too rough.) less monsters or strength. - medium (Hurt me plenty.) Default. - hard (Ultra-Violence.) More monsters or strength. - nightmare (Nightmare!) Monsters attack more rapidly and respawn. - - wet nurse (hou needeth a wet-nurse) - Fewer monsters and more items than medium. Damage taken is halved, and ammo pickups carry twice as much ammo. Any Quartz Flasks and Mystic Urns are automatically used when the player nears death. + Choose the game difficulty. These options match Heretic's skill levels. + wet nurse (Thou needeth a wet-nurse) - Fewer monsters and more items than medium. Damage taken is halved, and ammo pickups carry twice as much ammo. Any Quartz Flasks and Mystic Urns are automatically used when the player nears death. easy (Yellowbellies-r-us) - Fewer monsters and more items than medium. medium (Bringest them oneth) - Completely balanced, this is the standard difficulty level. hard (Thou art a smite-meister) - More monsters and fewer items than medium. @@ -35,6 +29,11 @@ class Difficulty(Choice): option_medium = 2 option_hard = 3 option_black_plague = 4 + alias_wn = 0 + alias_yru = 1 + alias_bto = 2 + alias_sm = 3 + alias_bp = 4 default = 2 @@ -104,7 +103,7 @@ class StartWithMapScrolls(Toggle): class ResetLevelOnDeath(DefaultOnToggle): """When dying, levels are reset and monsters respawned. But inventory and checks are kept. Turning this setting off is considered easy mode. Good for new players that don't know the levels well.""" - display_message="Reset level on death" + display_name = "Reset Level on Death" class CheckSanity(Toggle): diff --git a/worlds/heretic/docs/setup_en.md b/worlds/heretic/docs/setup_en.md index 41b7fdab8078..5985dbb0992a 100644 --- a/worlds/heretic/docs/setup_en.md +++ b/worlds/heretic/docs/setup_en.md @@ -15,7 +15,7 @@ You can find the folder in steam by finding the game in your library, right clicking it and choosing *Manage→Browse Local Files*. The WAD file is in the `/base/` folder. -## Joining a MultiWorld Game +## Joining a MultiWorld Game (via Launcher) 1. Launch apdoom-launcher.exe 2. Choose Heretic in the dropdown @@ -26,6 +26,23 @@ To continue a game, follow the same connection steps. Connecting with a different seed won't erase your progress in other seeds. +## Joining a MultiWorld Game (via command line) + +1. In your command line, navigate to the directory where APDOOM is installed. +2. Run `crispy-apheretic -apserver -applayer `, where: + - `` is the Archipelago server address, e.g. "`archipelago.gg:38281`" + - `` is your slot name; if it contains spaces, surround it with double quotes + - If the server has a password, add `-password`, followed by the server password +3. Enjoy! + +Optionally, you can override some randomization settings from the command line: +- `-apmonsterrando 0` will disable monster rando. +- `-apitemrando 0` will disable item rando. +- `-apmusicrando 0` will disable music rando. +- `-apresetlevelondeath 0` will disable resetting the level on death. +- `-apdeathlinkoff` will force DeathLink off if it's enabled. +- `-skill <1-5>` changes the game difficulty, from 1 (thou needeth a wet-nurse) to 5 (black plague possesses thee) + ## Archipelago Text Client We recommend having Archipelago's Text Client open on the side to keep track of what items you receive and send. diff --git a/worlds/hk/Extractor.py b/worlds/hk/Extractor.py index 61fabc4da0d9..866608489ec2 100644 --- a/worlds/hk/Extractor.py +++ b/worlds/hk/Extractor.py @@ -9,11 +9,7 @@ import jinja2 -try: - from ast import unparse -except ImportError: - # Py 3.8 and earlier compatibility module - from astunparse import unparse +from ast import unparse from Utils import get_text_between diff --git a/worlds/hk/Items.py b/worlds/hk/Items.py index 8515465826a5..a2b7c06d62a6 100644 --- a/worlds/hk/Items.py +++ b/worlds/hk/Items.py @@ -61,6 +61,7 @@ class HKItemData(NamedTuple): "VesselFragments": lookup_type_to_names["Vessel"], "WhisperingRoots": lookup_type_to_names["Root"], "WhiteFragments": {"Queen_Fragment", "King_Fragment", "Void_Heart"}, + "DreamNails": {"Dream_Nail", "Dream_Gate", "Awoken_Dream_Nail"}, }) item_name_groups['Horizontal'] = item_name_groups['Cloak'] | item_name_groups['CDash'] item_name_groups['Vertical'] = item_name_groups['Claw'] | {'Monarch_Wings'} diff --git a/worlds/hk/Options.py b/worlds/hk/Options.py index c1206d41ee2c..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 @@ -77,7 +77,7 @@ "RandomizeLoreTablets": "Randomize Lore items into the itempool, one per Lore Tablet, and place randomized item " "grants on the tablets themselves.\n You must still read the tablet to get the item.", "PreciseMovement": "Places skips into logic which require extremely precise player movement, possibly without " - "movement skills such as\n dash or hook.", + "movement skills such as\n dash or claw.", "ProficientCombat": "Places skips into logic which require proficient combat, possibly with limited items.", "BackgroundObjectPogos": "Places skips into logic for locations which are reachable via pogoing off of " "background objects.", @@ -300,7 +300,7 @@ class PlandoCharmCosts(OptionDict): display_name = "Charm Notch Cost Plando" valid_keys = frozenset(charm_names) schema = Schema({ - Optional(name): And(int, lambda n: 6 >= n >= 0) for name in charm_names + Optional(name): And(int, lambda n: 6 >= n >= 0, error="Charm costs must be integers in the range 0-6.") for name in charm_names }) def get_costs(self, charm_costs: typing.List[int]) -> typing.List[int]: diff --git a/worlds/hk/__init__.py b/worlds/hk/__init__.py index 9ec77e6bf0cd..81d939dcf1ea 100644 --- a/worlds/hk/__init__.py +++ b/worlds/hk/__init__.py @@ -231,7 +231,7 @@ def create_regions(self): all_event_names.update(set(godhome_event_names)) # Link regions - for event_name in all_event_names: + for event_name in sorted(all_event_names): #if event_name in wp_exclusions: # continue loc = HKLocation(self.player, event_name, None, menu_region) @@ -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) @@ -509,9 +509,13 @@ def set_goal(player, grub_rule: typing.Callable[[CollectionState], bool]): per_player_grubs_per_player[player][player] += 1 if grub.location and grub.location.player in group_lookup.keys(): - for real_player in group_lookup[grub.location.player]: + # will count the item linked grub instead + pass + elif player in group_lookup: + for real_player in group_lookup[player]: grub_count_per_player[real_player] += 1 else: + # for non-linked grubs grub_count_per_player[player] += 1 for player, count in grub_count_per_player.items(): diff --git a/worlds/hk/requirements.txt b/worlds/hk/requirements.txt deleted file mode 100644 index 1b410ffb2aed..000000000000 --- a/worlds/hk/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -astunparse>=1.6.3; python_version <= '3.8' \ No newline at end of file diff --git a/worlds/hk/test/__init__.py b/worlds/hk/test/__init__.py new file mode 100644 index 000000000000..c41d20127fcc --- /dev/null +++ b/worlds/hk/test/__init__.py @@ -0,0 +1,62 @@ +import typing +from argparse import Namespace +from BaseClasses import CollectionState, MultiWorld +from Options import ItemLinks +from test.bases import WorldTestBase +from worlds.AutoWorld import AutoWorldRegister, call_all +from .. import HKWorld + + +class linkedTestHK(): + run_default_tests = False + game = "Hollow Knight" + world: HKWorld + expected_grubs: int + item_link_group: typing.List[typing.Dict[str, typing.Any]] + + def setup_item_links(self, args): + setattr(args, "item_links", + { + 1: ItemLinks.from_any(self.item_link_group), + 2: ItemLinks.from_any([{ + "name": "ItemLinkTest", + "item_pool": ["Grub"], + "link_replacement": False, + "replacement_item": "One_Geo", + }]) + }) + return args + + def world_setup(self) -> None: + """ + Create a multiworld with two players that share an itemlink + """ + self.multiworld = MultiWorld(2) + self.multiworld.game = {1: self.game, 2: self.game} + self.multiworld.player_name = {1: "Linker 1", 2: "Linker 2"} + self.multiworld.set_seed() + args = Namespace() + options_dataclass = AutoWorldRegister.world_types[self.game].options_dataclass + for name, option in options_dataclass.type_hints.items(): + setattr(args, name, { + 1: option.from_any(self.options.get(name, option.default)), + 2: option.from_any(self.options.get(name, option.default)) + }) + args = self.setup_item_links(args) + self.multiworld.set_options(args) + self.multiworld.set_item_links() + # groups get added to state during its constructor so this has to be after item links are set + self.multiworld.state = CollectionState(self.multiworld) + gen_steps = ("generate_early", "create_regions", "create_items", "set_rules", "generate_basic") + for step in gen_steps: + call_all(self.multiworld, step) + # link the items together and stop at prefill + self.multiworld.link_items() + self.multiworld._all_state = None + call_all(self.multiworld, "pre_fill") + + self.world = self.multiworld.worlds[self.player] + + def test_grub_count(self) -> None: + assert self.world.grub_count == self.expected_grubs, \ + f"Expected {self.expected_grubs} but found {self.world.grub_count}" diff --git a/worlds/hk/test/test_grub_count.py b/worlds/hk/test/test_grub_count.py new file mode 100644 index 000000000000..dba15b614dd9 --- /dev/null +++ b/worlds/hk/test/test_grub_count.py @@ -0,0 +1,165 @@ +from . import linkedTestHK, WorldTestBase +from Options import ItemLinks + + +class test_grubcount_limited(linkedTestHK, WorldTestBase): + options = { + "RandomizeGrubs": True, + "GrubHuntGoal": 20, + "Goal": "any", + } + item_link_group = [{ + "name": "ItemLinkTest", + "item_pool": ["Grub"], + "link_replacement": True, + "replacement_item": "Grub", + }] + expected_grubs = 20 + + +class test_grubcount_default(linkedTestHK, WorldTestBase): + options = { + "RandomizeGrubs": True, + "Goal": "any", + } + item_link_group = [{ + "name": "ItemLinkTest", + "item_pool": ["Grub"], + "link_replacement": True, + "replacement_item": "Grub", + }] + expected_grubs = 46 + + +class test_grubcount_all_unlinked(linkedTestHK, WorldTestBase): + options = { + "RandomizeGrubs": True, + "GrubHuntGoal": "all", + "Goal": "any", + } + item_link_group = [] + expected_grubs = 46 + + +class test_grubcount_all_linked(linkedTestHK, WorldTestBase): + options = { + "RandomizeGrubs": True, + "GrubHuntGoal": "all", + "Goal": "any", + } + item_link_group = [{ + "name": "ItemLinkTest", + "item_pool": ["Grub"], + "link_replacement": True, + "replacement_item": "Grub", + }] + expected_grubs = 46 + 23 + + +class test_replacement_only(linkedTestHK, WorldTestBase): + options = { + "RandomizeGrubs": True, + "GrubHuntGoal": "all", + "Goal": "any", + } + expected_grubs = 46 + 18 # the count of grubs + skills removed from item links + + def setup_item_links(self, args): + setattr(args, "item_links", + { + 1: ItemLinks.from_any([{ + "name": "ItemLinkTest", + "item_pool": ["Skills"], + "link_replacement": True, + "replacement_item": "Grub", + }]), + 2: ItemLinks.from_any([{ + "name": "ItemLinkTest", + "item_pool": ["Skills"], + "link_replacement": True, + "replacement_item": "Grub", + }]) + }) + return args + + +class test_replacement_only_unlinked(linkedTestHK, WorldTestBase): + options = { + "RandomizeGrubs": True, + "GrubHuntGoal": "all", + "Goal": "any", + } + expected_grubs = 46 + 9 # Player1s replacement Grubs + + def setup_item_links(self, args): + setattr(args, "item_links", + { + 1: ItemLinks.from_any([{ + "name": "ItemLinkTest", + "item_pool": ["Skills"], + "link_replacement": False, + "replacement_item": "Grub", + }]), + 2: ItemLinks.from_any([{ + "name": "ItemLinkTest", + "item_pool": ["Skills"], + "link_replacement": False, + "replacement_item": "Grub", + }]) + }) + return args + + +class test_ignore_others(linkedTestHK, WorldTestBase): + options = { + "RandomizeGrubs": True, + "GrubHuntGoal": "all", + "Goal": "any", + } + # player2 has more than 46 grubs but they are unlinked so player1s grubs are vanilla + expected_grubs = 46 + + def setup_item_links(self, args): + setattr(args, "item_links", + { + 1: ItemLinks.from_any([{ + "name": "ItemLinkTest", + "item_pool": ["Skills"], + "link_replacement": False, + "replacement_item": "One_Geo", + }]), + 2: ItemLinks.from_any([{ + "name": "ItemLinkTest", + "item_pool": ["Skills"], + "link_replacement": False, + "replacement_item": "Grub", + }]) + }) + return args + + +class test_replacement_only_linked(linkedTestHK, WorldTestBase): + options = { + "RandomizeGrubs": True, + "GrubHuntGoal": "all", + "Goal": "any", + } + expected_grubs = 46 + 9 # Player2s linkreplacement grubs + + def setup_item_links(self, args): + setattr(args, "item_links", + { + 1: ItemLinks.from_any([{ + "name": "ItemLinkTest", + "item_pool": ["Skills"], + "link_replacement": True, + "replacement_item": "One_Geo", + }]), + 2: ItemLinks.from_any([{ + "name": "ItemLinkTest", + "item_pool": ["Skills"], + "link_replacement": True, + "replacement_item": "Grub", + }]) + }) + return args diff --git a/worlds/kh1/Rules.py b/worlds/kh1/Rules.py index e1f72f5b3e54..130238e5048e 100644 --- a/worlds/kh1/Rules.py +++ b/worlds/kh1/Rules.py @@ -235,6 +235,11 @@ def set_rules(kh1world): lambda state: ( state.has("Progressive Glide", player) or + ( + state.has("High Jump", player, 2) + and state.has("Footprints", player) + ) + or ( options.advanced_logic and state.has_all({ @@ -246,6 +251,11 @@ def set_rules(kh1world): lambda state: ( state.has("Progressive Glide", player) or + ( + state.has("High Jump", player, 2) + and state.has("Footprints", player) + ) + or ( options.advanced_logic and state.has_all({ @@ -258,7 +268,6 @@ def set_rules(kh1world): state.has("Footprints", player) or (options.advanced_logic and state.has("Progressive Glide", player)) - or state.has("High Jump", player, 2) )) add_rule(kh1world.get_location("Wonderland Tea Party Garden Across From Bizarre Room Entrance Chest"), lambda state: ( @@ -376,7 +385,7 @@ def set_rules(kh1world): lambda state: state.has("White Trinity", player)) add_rule(kh1world.get_location("Monstro Chamber 6 Other Platform Chest"), lambda state: ( - state.has("High Jump", player) + state.has_all(("High Jump", "Progressive Glide"), player) or (options.advanced_logic and state.has("Combo Master", player)) )) add_rule(kh1world.get_location("Monstro Chamber 6 Platform Near Chamber 5 Entrance Chest"), @@ -386,7 +395,7 @@ def set_rules(kh1world): )) add_rule(kh1world.get_location("Monstro Chamber 6 Raised Area Near Chamber 1 Entrance Chest"), lambda state: ( - state.has("High Jump", player) + state.has_all(("High Jump", "Progressive Glide"), player) or (options.advanced_logic and state.has("Combo Master", player)) )) add_rule(kh1world.get_location("Halloween Town Moonlight Hill White Trinity Chest"), @@ -595,6 +604,7 @@ def set_rules(kh1world): lambda state: ( state.has("Green Trinity", player) and has_all_magic_lvx(state, player, 2) + and has_defensive_tools(state, player) )) add_rule(kh1world.get_location("Neverland Hold Flight 2nd Chest"), lambda state: ( @@ -710,8 +720,7 @@ def set_rules(kh1world): lambda state: state.has("White Trinity", player)) add_rule(kh1world.get_location("End of the World Giant Crevasse 5th Chest"), lambda state: ( - state.has("High Jump", player) - or state.has("Progressive Glide", player) + state.has("Progressive Glide", player) )) add_rule(kh1world.get_location("End of the World Giant Crevasse 1st Chest"), lambda state: ( @@ -1441,10 +1450,11 @@ def set_rules(kh1world): has_emblems(state, player, options.keyblades_unlock_chests) and has_x_worlds(state, player, 7, options.keyblades_unlock_chests) and has_defensive_tools(state, player) + and state.has("Progressive Blizzard", player, 3) )) add_rule(kh1world.get_location("Agrabah Defeat Kurt Zisa Zantetsuken Event"), lambda state: ( - has_emblems(state, player, options.keyblades_unlock_chests) and has_x_worlds(state, player, 7, options.keyblades_unlock_chests) and has_defensive_tools(state, player) + has_emblems(state, player, options.keyblades_unlock_chests) and has_x_worlds(state, player, 7, options.keyblades_unlock_chests) and has_defensive_tools(state, player) and state.has("Progressive Blizzard", player, 3) )) if options.super_bosses or options.goal.current_key == "sephiroth": add_rule(kh1world.get_location("Olympus Coliseum Defeat Sephiroth Ansem's Report 12"), 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] diff --git a/worlds/kh2/docs/setup_en.md b/worlds/kh2/docs/setup_en.md index ed4d90bb54fb..9fe9b23a1350 100644 --- a/worlds/kh2/docs/setup_en.md +++ b/worlds/kh2/docs/setup_en.md @@ -36,10 +36,16 @@ When you generate a game you will see a download link for a KH2 .zip seed on the Make sure the seed is on the top of the list (Highest Priority)
    After Installing the seed click `Mod Loader -> Build/Build and Run`. Every slot is a unique mod to install and will be needed be repatched for different slots/rooms. +

    Optional Software:

    + +- [Kingdom Hearts 2 AP Tracker](https://github.com/palex00/kh2-ap-tracker/releases/latest/), for use with +[PopTracker](https://github.com/black-sliver/PopTracker/releases) +

    What the Mod Manager Should Look Like.

    ![image](https://i.imgur.com/Si4oZ8w.png) +

    Using the KH2 Client

    Once you have started the game through OpenKH Mod Manager and are on the title screen run the [ArchipelagoKH2Client.exe](https://github.com/ArchipelagoMW/Archipelago/releases).
    @@ -73,10 +79,24 @@ Enter `The room's port number` into the top box where the x's are and pr - Run the game in windows/borderless windowed mode. Fullscreen is stable but the game can crash if you alt-tab out. - Make sure to save in a different save slot when playing in an async or disconnecting from the server to play a different seed -

    Logic Sheet

    +

    Logic Sheet & PopTracker Autotracking

    Have any questions on what's in logic? This spreadsheet made by Bulcon has the answer [Requirements/logic sheet](https://docs.google.com/spreadsheets/d/1nNi8ohEs1fv-sDQQRaP45o6NoRcMlLJsGckBonweDMY/edit?usp=sharing) +Alternatively you can use the Kingdom Hearts 2 PopTracker Pack that is based off of the logic sheet above and does all the work for you. + +

    PopTracker Pack

    + +1. Download [Kingdom Hearts 2 AP Tracker](https://github.com/palex00/kh2-ap-tracker/releases/latest/) and +[PopTracker](https://github.com/black-sliver/PopTracker/releases). +2. Put the tracker pack into packs/ in your PopTracker install. +3. Open PopTracker, and load the Kingdom Hearts 2 pack. +4. For autotracking, click on the "AP" symbol at the top. +5. Enter the Archipelago server address (the one you connected your client to), slot name, and password. + +This pack will handle logic, received items, checked locations and autotabbing for you! + +

    F.A.Q.

    - Why is my Client giving me a "Cannot Open Process: " error? diff --git a/worlds/ladx/Items.py b/worlds/ladx/Items.py index 1f9358a4f5a6..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] @@ -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" @@ -175,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), @@ -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), @@ -305,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/LADXR/generator.py b/worlds/ladx/LADXR/generator.py index 69e856f3541b..046b51815cba 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 @@ -153,7 +153,9 @@ def generateRom(args, world: "LinksAwakeningWorld"): if world.ladxr_settings.witch: patches.witch.updateWitch(rom) patches.softlock.fixAll(rom) - patches.maptweaks.tweakMap(rom) + if not world.ladxr_settings.rooster: + patches.maptweaks.tweakMap(rom) + patches.maptweaks.tweakBirdKeyRoom(rom) patches.chest.fixChests(rom) patches.shop.fixShop(rom) patches.rooster.patchRooster(rom) @@ -176,11 +178,7 @@ def generateRom(args, world: "LinksAwakeningWorld"): patches.songs.upgradeMarin(rom) patches.songs.upgradeManbo(rom) patches.songs.upgradeMamu(rom) - if world.ladxr_settings.tradequest: - patches.tradeSequence.patchTradeSequence(rom, world.ladxr_settings.boomerang) - else: - # Monkey bridge patch, always have the bridge there. - rom.patch(0x00, 0x333D, assembler.ASM("bit 4, e\njr Z, $05"), b"", fill_nop=True) + patches.tradeSequence.patchTradeSequence(rom, world.ladxr_settings) patches.bowwow.fixBowwow(rom, everywhere=world.ladxr_settings.bowwow != 'normal') if world.ladxr_settings.bowwow != 'normal': patches.bowwow.bowwowMapPatches(rom) @@ -268,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 @@ -288,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("}", "") @@ -342,11 +342,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 @@ -418,8 +460,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/LADXR/locations/birdKey.py b/worlds/ladx/LADXR/locations/birdKey.py index 12418c61aa46..0dbdd8653fe2 100644 --- a/worlds/ladx/LADXR/locations/birdKey.py +++ b/worlds/ladx/LADXR/locations/birdKey.py @@ -1,23 +1,6 @@ from .droppedKey import DroppedKey -from ..roomEditor import RoomEditor -from ..assembler import ASM class BirdKey(DroppedKey): def __init__(self): super().__init__(0x27A) - - def patch(self, rom, option, *, multiworld=None): - super().patch(rom, option, multiworld=multiworld) - - re = RoomEditor(rom, self.room) - - # Make the bird key accessible without the rooster - re.removeObject(1, 6) - re.removeObject(2, 6) - re.removeObject(3, 5) - re.removeObject(3, 6) - re.moveObject(1, 5, 2, 6) - re.moveObject(2, 5, 3, 6) - re.addEntity(3, 5, 0x9D) - re.store(rom) diff --git a/worlds/ladx/LADXR/locations/boomerangGuy.py b/worlds/ladx/LADXR/locations/boomerangGuy.py index 92d76cebdf5d..23fcc867617b 100644 --- a/worlds/ladx/LADXR/locations/boomerangGuy.py +++ b/worlds/ladx/LADXR/locations/boomerangGuy.py @@ -24,11 +24,6 @@ def configure(self, options): # But SHIELD, BOMB and MAGIC_POWDER would most likely break things. # SWORD and POWER_BRACELET would most likely introduce the lv0 shield/bracelet issue def patch(self, rom, option, *, multiworld=None): - # Always have the boomerang trade guy enabled (normally you need the magnifier) - rom.patch(0x19, 0x05EC, ASM("ld a, [wTradeSequenceItem]\ncp $0E"), ASM("ld a, $0E\ncp $0E"), fill_nop=True) # show the guy - rom.patch(0x00, 0x3199, ASM("ld a, [wTradeSequenceItem]\ncp $0E"), ASM("ld a, $0E\ncp $0E"), fill_nop=True) # load the proper room layout - rom.patch(0x19, 0x05F4, ASM("ld a, [wTradeSequenceItem2]\nand a"), ASM("xor a"), fill_nop=True) - if self.setting == 'trade': inv = INVENTORY_MAP[option] # Patch the check if you traded back the boomerang (so traded twice) 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" diff --git a/worlds/ladx/LADXR/logic/overworld.py b/worlds/ladx/LADXR/logic/overworld.py index 551cf8353f4a..3972796051f9 100644 --- a/worlds/ladx/LADXR/logic/overworld.py +++ b/worlds/ladx/LADXR/logic/overworld.py @@ -61,9 +61,9 @@ def __init__(self, options, world_setup, r): self._addEntrance("banana_seller", sword_beach, banana_seller, r.bush) boomerang_cave = Location("Boomerang Cave") if options.boomerang == 'trade': - Location().add(BoomerangGuy()).connect(boomerang_cave, OR(BOOMERANG, HOOKSHOT, MAGIC_ROD, PEGASUS_BOOTS, FEATHER, SHOVEL)) + Location().add(BoomerangGuy()).connect(boomerang_cave, AND(r.shuffled_magnifier, OR(BOOMERANG, HOOKSHOT, MAGIC_ROD, PEGASUS_BOOTS, FEATHER, SHOVEL))) elif options.boomerang == 'gift': - Location().add(BoomerangGuy()).connect(boomerang_cave, None) + Location().add(BoomerangGuy()).connect(boomerang_cave, r.shuffled_magnifier) self._addEntrance("boomerang_cave", sword_beach, boomerang_cave, BOMB) self._addEntranceRequirementExit("boomerang_cave", None) # if exiting, you do not need bombs @@ -167,7 +167,9 @@ def __init__(self, options, world_setup, r): prairie_island_seashell = Location().add(Seashell(0x0A6)).connect(ukuku_prairie, AND(FLIPPERS, r.bush)) # next to lv3 Location().add(Seashell(0x08B)).connect(ukuku_prairie, r.bush) # next to seashell house Location().add(Seashell(0x0A4)).connect(ukuku_prairie, PEGASUS_BOOTS) # smash into tree next to phonehouse - self._addEntrance("castle_jump_cave", ukuku_prairie, Location().add(Chest(0x1FD)), OR(AND(FEATHER, PEGASUS_BOOTS), ROOSTER)) # left of the castle, 5 holes turned into 3 + self._addEntrance("castle_jump_cave", ukuku_prairie, Location().add(Chest(0x1FD)), ROOSTER) + if not options.rooster: + self._addEntranceRequirement("castle_jump_cave", AND(FEATHER, PEGASUS_BOOTS)) # left of the castle, 5 holes turned into 3 Location().add(Seashell(0x0B9)).connect(ukuku_prairie, POWER_BRACELET) # under the rock left_bay_area = Location() @@ -353,7 +355,7 @@ def __init__(self, options, world_setup, r): self._addEntrance("d4", d4_entrance, None, ANGLER_KEY) self._addEntranceRequirementExit("d4", FLIPPERS) # if exiting, you can leave with flippers without opening the dungeon mambo = Location().connect(Location().add(Song(0x2FD)), AND(OCARINA, FLIPPERS)) # Manbo's Mambo - self._addEntrance("mambo", d4_entrance, mambo, FLIPPERS) + self._addEntrance("mambo", d4_entrance, mambo, FLIPPERS) # Raft game. raft_house = Location("Raft House") @@ -379,7 +381,9 @@ def __init__(self, options, world_setup, r): self._addEntrance("rooster_house", outside_rooster_house, None, None) bird_cave = Location() bird_key = Location().add(BirdKey()) - bird_cave.connect(bird_key, OR(AND(FEATHER, COUNT(POWER_BRACELET, 2)), ROOSTER)) + bird_cave.connect(bird_key, ROOSTER) + if not options.rooster: + bird_cave.connect(bird_key, AND(FEATHER, COUNT(POWER_BRACELET, 2))) # elephant statue added if options.logic != "casual": bird_cave.connect(lower_right_taltal, None, one_way=True) # Drop in a hole at bird cave self._addEntrance("bird_cave", outside_rooster_house, bird_cave, None) @@ -468,7 +472,7 @@ def __init__(self, options, world_setup, r): swamp.connect(writes_hut_outside, HOOKSHOT, 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 - + 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("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) @@ -476,9 +480,10 @@ def __init__(self, options, world_setup, r): 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 desert_lanmola.connect(desert, BOMB) # use bombs to kill lanmola - + 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 - 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 + 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 if options.logic == 'glitched' or options.logic == 'hell': @@ -502,9 +507,9 @@ def __init__(self, options, world_setup, r): 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 + 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 @@ -519,12 +524,12 @@ def __init__(self, options, world_setup, r): 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 + 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 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 @@ -547,7 +552,7 @@ def __init__(self, options, world_setup, r): 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 @@ -563,15 +568,15 @@ def __init__(self, options, world_setup, r): 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 - + 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) 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 + 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) - + 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 @@ -583,7 +588,7 @@ def __init__(self, options, world_setup, r): 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 - + self.start = start_house self.egg = windfish_egg self.nightmare = nightmare @@ -659,7 +664,7 @@ def __init__(self, outside, requirement, one_way_enter_requirement="UNSET", one_ self.requirement = requirement self.one_way_enter_requirement = one_way_enter_requirement self.one_way_exit_requirement = one_way_exit_requirement - + def addRequirement(self, new_requirement): self.requirement = OR(self.requirement, new_requirement) @@ -674,9 +679,9 @@ def addEnterRequirement(self, new_requirement): self.one_way_enter_requirement = new_requirement else: self.one_way_enter_requirement = OR(self.one_way_enter_requirement, new_requirement) - + def enterIsSet(self): return self.one_way_enter_requirement != "UNSET" - + def exitIsSet(self): return self.one_way_exit_requirement != "UNSET" diff --git a/worlds/ladx/LADXR/logic/requirements.py b/worlds/ladx/LADXR/logic/requirements.py index acc969ba938d..a8e57327e78b 100644 --- a/worlds/ladx/LADXR/logic/requirements.py +++ b/worlds/ladx/LADXR/logic/requirements.py @@ -265,6 +265,7 @@ def __init__(self, options): 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.boss_requirements = [ SWORD, # D1 boss @@ -293,6 +294,8 @@ def __init__(self, options): } # Adjust for options + if not options.tradequest: + self.shuffled_magnifier = True 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) diff --git a/worlds/ladx/LADXR/patches/maptweaks.py b/worlds/ladx/LADXR/patches/maptweaks.py index c25dd83dcada..8a5171b3540d 100644 --- a/worlds/ladx/LADXR/patches/maptweaks.py +++ b/worlds/ladx/LADXR/patches/maptweaks.py @@ -25,3 +25,16 @@ def addBetaRoom(rom): re.store(rom) rom.room_sprite_data_indoor[0x0FC] = rom.room_sprite_data_indoor[0x1A1] + + +def tweakBirdKeyRoom(rom): + # Make the bird key accessible without the rooster + re = RoomEditor(rom, 0x27A) + re.removeObject(1, 6) + re.removeObject(2, 6) + re.removeObject(3, 5) + re.removeObject(3, 6) + re.moveObject(1, 5, 2, 6) + re.moveObject(2, 5, 3, 6) + re.addEntity(3, 5, 0x9D) + re.store(rom) diff --git a/worlds/ladx/LADXR/patches/songs.py b/worlds/ladx/LADXR/patches/songs.py index 59ca01c4c8c4..b080cf06bc92 100644 --- a/worlds/ladx/LADXR/patches/songs.py +++ b/worlds/ladx/LADXR/patches/songs.py @@ -72,6 +72,10 @@ def upgradeMarin(rom): rst 8 """), fill_nop=True) + # Load marin singing even if you have the marin date + rom.patch(0x03, 0x0A91, ASM("jp nz, $3F8D"), "", fill_nop=True) + rom.patch(0x05, 0x0E6E, ASM("jp nz, $7B4B"), "", fill_nop=True) + def upgradeManbo(rom): # Instead of checking if we have the song, check if we have a specific room flag set diff --git a/worlds/ladx/LADXR/patches/tradeSequence.py b/worlds/ladx/LADXR/patches/tradeSequence.py index 5b608977f20d..0eb46ae23ae2 100644 --- a/worlds/ladx/LADXR/patches/tradeSequence.py +++ b/worlds/ladx/LADXR/patches/tradeSequence.py @@ -1,7 +1,7 @@ from ..assembler import ASM -def patchTradeSequence(rom, boomerang_option): +def patchTradeSequence(rom, settings): patchTrendy(rom) patchPapahlsWife(rom) patchYipYip(rom) @@ -16,7 +16,7 @@ def patchTradeSequence(rom, boomerang_option): patchMermaid(rom) patchMermaidStatue(rom) patchSharedCode(rom) - patchVarious(rom, boomerang_option) + patchVarious(rom, settings) patchInventoryMenu(rom) @@ -265,8 +265,11 @@ def patchMermaidStatue(rom): and $10 ; scale ret z ldh a, [$F8] - and $20 + and $20 ; ROOM_STATUS_EVENT_2 ret nz + + ld hl, wTradeSequenceItem2 + res 4, [hl] ; take the trade item """), fill_nop=True) @@ -317,7 +320,7 @@ def patchSharedCode(rom): rom.patch(0x07, 0x3F7F, "00" * 7, ASM("ldh a, [$F8]\nor $20\nldh [$F8], a\nret")) -def patchVarious(rom, boomerang_option): +def patchVarious(rom, settings): # Make the zora photo work with the magnifier rom.patch(0x18, 0x09F3, 0x0A02, ASM(""" ld a, [wTradeSequenceItem2] @@ -330,22 +333,71 @@ def patchVarious(rom, boomerang_option): jp z, $3F8D ; UnloadEntity """), fill_nop=True) # Mimic invisibility - rom.patch(0x18, 0x2AC8, 0x2ACE, "", fill_nop=True) + rom.patch(0x19, 0x2AC0, ASM(""" + cp $97 + jr z, mermaidStatueCave + cp $98 + jr nz, visible + mermaidStatueCave: + ld a, [$DB7F] + and a + jr nz, 6 + visible: + """), ASM(""" + dec a ; save one byte by only doing one cp + or $01 + cp $97 + jr nz, visible + mermaidStatueCave: + ld a, [wTradeSequenceItem2] + and $20 ; MAGNIFYING_GLASS + jr z, 6 + visible: + """)) + # Zol invisibility + rom.patch(0x06, 0x3BE9, ASM(""" + cp $97 + jr z, mermaidStatueCave + cp $98 + ret nz ; visible + mermaidStatueCave: + ld a, [$DB7F] + and a + ret z + """), ASM(""" + dec a ; save one byte by only doing one cp + or $01 + cp $97 + ret nz ; visible + mermaidStatueCave: + ld a, [wTradeSequenceItem2] + and $20 ; MAGNIFYING_GLASS + ret nz + """)) # Ignore trade quest state for marin at beach rom.patch(0x18, 0x219E, 0x21A6, "", fill_nop=True) # Shift the magnifier 8 pixels rom.patch(0x03, 0x0F68, 0x0F6F, ASM(""" ldh a, [$F6] ; map room - cp $97 ; check if we are in the maginfier room + cp $97 ; check if we are in the magnifier room jp z, $4F83 """), fill_nop=True) # Something with the photographer rom.patch(0x36, 0x0948, 0x0950, "", fill_nop=True) - if boomerang_option not in {'trade', 'gift'}: # Boomerang cave is not patched, so adjust it + # Boomerang trade guy + # if settings.boomerang not in {'trade', 'gift'} or settings.overworld in {'normal', 'nodungeons'}: + if settings.tradequest: + # Update magnifier checks rom.patch(0x19, 0x05EC, ASM("ld a, [wTradeSequenceItem]\ncp $0E\njp nz, $7E61"), ASM("ld a, [wTradeSequenceItem2]\nand $20\njp z, $7E61")) # show the guy rom.patch(0x00, 0x3199, ASM("ld a, [wTradeSequenceItem]\ncp $0E\njr nz, $06"), ASM("ld a, [wTradeSequenceItem2]\nand $20\njr z, $06")) # load the proper room layout - rom.patch(0x19, 0x05F4, 0x05FB, "", fill_nop=True) + else: + # Monkey bridge patch, always have the bridge there. + rom.patch(0x00, 0x333D, ASM("bit 4, e\njr Z, $05"), b"", fill_nop=True) + # Always have the boomerang trade guy enabled (magnifier not needed) + rom.patch(0x19, 0x05EC, ASM("ld a, [wTradeSequenceItem]\ncp $0E"), ASM("ld a, $0E\ncp $0E"), fill_nop=True) # show the guy + rom.patch(0x00, 0x3199, ASM("ld a, [wTradeSequenceItem]\ncp $0E"), ASM("ld a, $0E\ncp $0E"), fill_nop=True) # load the proper room layout + rom.patch(0x19, 0x05F4, ASM("ld a, [wTradeSequenceItem2]\nand a"), ASM("xor a"), fill_nop=True) def patchInventoryMenu(rom): 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/Options.py b/worlds/ladx/Options.py index 12078246b68c..08b76dec62a2 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 @@ -58,7 +58,7 @@ class TextShuffle(DefaultOffToggle): class Rooster(DefaultOnToggle, LADXROption): """ [On] Adds the rooster to the item pool. - [Off] The rooster spot is still a check giving an item. But you will never find the rooster. Any rooster spot is accessible without rooster by other means. + [Off] The rooster spot is still a check giving an item. But you will never find the rooster. In that case, any rooster spot is accessible without rooster by other means. """ display_name = "Rooster" ladxr_name = "rooster" @@ -511,20 +511,24 @@ 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): +class InGameHints(DefaultOnToggle): """ - [On] (requires warp improvements) Adds a warp point at Crazy Tracy's house (the Mambo teleport spot) and Eagle's Tower - [Off] No change + When enabled, owl statues and library books may indicate the location of your items in the multiworld. """ - display_name = "Additional Warp Points" + display_name = "In-game Hints" + ladx_option_groups = [ OptionGroup("Goal Options", [ @@ -540,13 +544,13 @@ class AdditionalWarpPoints(DefaultOffToggle): ShuffleStoneBeaks ]), OptionGroup("Warp Points", [ - WarpImprovements, - AdditionalWarpPoints, + Warps, ]), OptionGroup("Miscellaneous", [ TradeQuest, Rooster, TrendyGame, + InGameHints, NagMessages, Quickswap, HardMode, @@ -590,8 +594,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 @@ -612,3 +615,7 @@ class LinksAwakeningOptions(PerGameCommonOptions): low_hp_beep: LowHpBeep text_mode: TextMode no_flash: NoFlash + in_game_hints: InGameHints + + warp_improvements: Removed + additional_warp_points: Removed diff --git a/worlds/ladx/__init__.py b/worlds/ladx/__init__.py index 0432d727abc5..4c3bac26f171 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 diff --git a/worlds/ladx/test/__init__.py b/worlds/ladx/test/__init__.py index 0e616ac557d0..059a09b0728d 100644 --- a/worlds/ladx/test/__init__.py +++ b/worlds/ladx/test/__init__.py @@ -1,4 +1,4 @@ -from test.TestBase import WorldTestBase +from test.bases import WorldTestBase from ..Common import LINKS_AWAKENING class LADXTestBase(WorldTestBase): game = LINKS_AWAKENING diff --git a/worlds/landstalker/Locations.py b/worlds/landstalker/Locations.py index b0148269eab3..0fe63526c63b 100644 --- a/worlds/landstalker/Locations.py +++ b/worlds/landstalker/Locations.py @@ -34,7 +34,7 @@ def create_locations(player: int, regions_table: Dict[str, LandstalkerRegion], n for data in WORLD_PATHS_JSON: if "requiredNodes" in data: regions_with_entrance_checks.extend([region_id for region_id in data["requiredNodes"]]) - regions_with_entrance_checks = list(set(regions_with_entrance_checks)) + regions_with_entrance_checks = sorted(set(regions_with_entrance_checks)) for region_id in regions_with_entrance_checks: region = regions_table[region_id] location = LandstalkerLocation(player, 'event_visited_' + region_id, None, region, "event") diff --git a/worlds/landstalker/__init__.py b/worlds/landstalker/__init__.py index 2b3dc41239c3..8463e56e54c1 100644 --- a/worlds/landstalker/__init__.py +++ b/worlds/landstalker/__init__.py @@ -38,7 +38,7 @@ class LandstalkerWorld(World): item_name_to_id = build_item_name_to_id_table() location_name_to_id = build_location_name_to_id_table() - cached_spheres: ClassVar[List[Set[Location]]] + cached_spheres: List[Set[Location]] def __init__(self, multiworld, player): super().__init__(multiworld, player) @@ -47,6 +47,7 @@ def __init__(self, multiworld, player): self.dark_region_ids = [] self.teleport_tree_pairs = [] self.jewel_items = [] + self.cached_spheres = [] def fill_slot_data(self) -> dict: # Generate hints. @@ -220,14 +221,17 @@ def get_starting_health(self): return 4 @classmethod - def stage_post_fill(cls, multiworld): + def stage_post_fill(cls, multiworld: MultiWorld): # Cache spheres for hint calculation after fill completes. - cls.cached_spheres = list(multiworld.get_spheres()) + cached_spheres = list(multiworld.get_spheres()) + for world in multiworld.get_game_worlds(cls.game): + world.cached_spheres = cached_spheres @classmethod - def stage_modify_multidata(cls, *_): + def stage_modify_multidata(cls, multiworld: MultiWorld, *_): # Clean up all references in cached spheres after generation completes. - del cls.cached_spheres + for world in multiworld.get_game_worlds(cls.game): + world.cached_spheres = [] def adjust_shop_prices(self): # Calculate prices for items in shops once all items have their final position diff --git a/worlds/lingo/data/LL1.yaml b/worlds/lingo/data/LL1.yaml index bbed1464530b..3783b68af98c 100644 --- a/worlds/lingo/data/LL1.yaml +++ b/worlds/lingo/data/LL1.yaml @@ -1966,7 +1966,10 @@ entrances: The Observant: warp: True - Eight Room: True + Eight Room: + # It is possible to get to the second floor warpless, but there are no warpless exits from the second floor, + # meaning that this connection is essentially always a warp for the purposes of Pilgrimage. + warp: True Eight Alcove: door: Eight Door Orange Tower Sixth Floor: diff --git a/worlds/lingo/data/generated.dat b/worlds/lingo/data/generated.dat index 789fc0856d62..9abb0276c8b5 100644 Binary files a/worlds/lingo/data/generated.dat and b/worlds/lingo/data/generated.dat differ diff --git a/worlds/lingo/options.py b/worlds/lingo/options.py index 2fd57ff5ede3..2d6e9967dfc4 100644 --- a/worlds/lingo/options.py +++ b/worlds/lingo/options.py @@ -80,10 +80,15 @@ class ShuffleColors(DefaultOnToggle): class ShufflePanels(Choice): - """If on, the puzzles on each panel are randomized. + """Determines how panel puzzles are randomized. - On "rearrange", the puzzles are the same as the ones in the base game, but - are placed in different areas. + - **None:** Most panels remain the same as in the base game. Note that there are + some panels (in particular, in Starting Room and Second Room) that are changed + by the randomizer even when panel shuffle is disabled. + - **Rearrange:** The puzzles are the same as the ones in the base game, but are + placed in different areas. + + More options for puzzle randomization are planned in the future. """ display_name = "Shuffle Panels" option_none = 0 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 diff --git a/worlds/lufia2ac/__init__.py b/worlds/lufia2ac/__init__.py index 6433452cefea..96de24a4b6a0 100644 --- a/worlds/lufia2ac/__init__.py +++ b/worlds/lufia2ac/__init__.py @@ -118,7 +118,7 @@ def create_regions(self) -> None: L2ACItem("Progressive chest access", ItemClassification.progression, None, self.player)) chest_access.show_in_spoiler = False ancient_dungeon.locations.append(chest_access) - for iris in self.item_name_groups["Iris treasures"]: + for iris in sorted(self.item_name_groups["Iris treasures"]): treasure_name: str = f"Iris treasure {self.item_name_to_id[iris] - self.item_name_to_id['Iris sword'] + 1}" iris_treasure: Location = \ L2ACLocation(self.player, treasure_name, self.location_name_to_id[treasure_name], ancient_dungeon) diff --git a/worlds/lufia2ac/test/__init__.py b/worlds/lufia2ac/test/__init__.py index 24925675e36b..306ffa771660 100644 --- a/worlds/lufia2ac/test/__init__.py +++ b/worlds/lufia2ac/test/__init__.py @@ -1,4 +1,4 @@ -from test.TestBase import WorldTestBase +from test.bases import WorldTestBase class L2ACTestBase(WorldTestBase): diff --git a/worlds/messenger/__init__.py b/worlds/messenger/__init__.py index 9a38953ffbdf..59e724d3fb7f 100644 --- a/worlds/messenger/__init__.py +++ b/worlds/messenger/__init__.py @@ -1,5 +1,5 @@ import logging -from typing import Any, ClassVar, Dict, List, Optional, Set, TextIO +from typing import Any, ClassVar, TextIO from BaseClasses import CollectionState, Entrance, Item, ItemClassification, MultiWorld, Tutorial from Options import Accessibility @@ -120,16 +120,16 @@ class MessengerWorld(World): required_seals: int = 0 created_seals: int = 0 total_shards: int = 0 - shop_prices: Dict[str, int] - figurine_prices: Dict[str, int] - _filler_items: List[str] - starting_portals: List[str] - plando_portals: List[str] - spoiler_portal_mapping: Dict[str, str] - portal_mapping: List[int] - transitions: List[Entrance] + shop_prices: dict[str, int] + figurine_prices: dict[str, int] + _filler_items: list[str] + starting_portals: list[str] + plando_portals: list[str] + spoiler_portal_mapping: dict[str, str] + portal_mapping: list[int] + transitions: list[Entrance] reachable_locs: int = 0 - filler: Dict[str, int] + filler: dict[str, int] def generate_early(self) -> None: if self.options.goal == Goal.option_power_seal_hunt: @@ -178,7 +178,7 @@ def create_regions(self) -> None: for reg_name in sub_region] for region in complex_regions: - region_name = region.name.replace(f"{region.parent} - ", "") + region_name = region.name.removeprefix(f"{region.parent} - ") connection_data = CONNECTIONS[region.parent][region_name] for exit_region in connection_data: region.connect(self.multiworld.get_region(exit_region, self.player)) @@ -191,7 +191,7 @@ def create_items(self) -> None: # create items that are always in the item pool main_movement_items = ["Rope Dart", "Wingsuit"] precollected_names = [item.name for item in self.multiworld.precollected_items[self.player]] - itempool: List[MessengerItem] = [ + itempool: list[MessengerItem] = [ self.create_item(item) for item in self.item_name_to_id if item not in { @@ -290,7 +290,7 @@ def write_spoiler_header(self, spoiler_handle: TextIO) -> None: for portal, output in portal_info: spoiler.set_entrance(f"{portal} Portal", output, "I can write anything I want here lmao", self.player) - def fill_slot_data(self) -> Dict[str, Any]: + def fill_slot_data(self) -> dict[str, Any]: slot_data = { "shop": {SHOP_ITEMS[item].internal_name: price for item, price in self.shop_prices.items()}, "figures": {FIGURINES[item].internal_name: price for item, price in self.figurine_prices.items()}, @@ -316,7 +316,7 @@ def get_filler_item_name(self) -> str: return self._filler_items.pop(0) def create_item(self, name: str) -> MessengerItem: - item_id: Optional[int] = self.item_name_to_id.get(name, None) + item_id: int | None = self.item_name_to_id.get(name, None) return MessengerItem( name, ItemClassification.progression if item_id is None else self.get_item_classification(name), @@ -351,7 +351,7 @@ def get_item_classification(self, name: str) -> ItemClassification: return ItemClassification.filler @classmethod - def create_group(cls, multiworld: "MultiWorld", new_player_id: int, players: Set[int]) -> World: + def create_group(cls, multiworld: "MultiWorld", new_player_id: int, players: set[int]) -> World: group = super().create_group(multiworld, new_player_id, players) assert isinstance(group, MessengerWorld) diff --git a/worlds/messenger/client_setup.py b/worlds/messenger/client_setup.py index 77a0f634326c..6b98a1b44013 100644 --- a/worlds/messenger/client_setup.py +++ b/worlds/messenger/client_setup.py @@ -5,7 +5,7 @@ import subprocess import urllib.request from shutil import which -from typing import Any, Optional +from typing import Any from zipfile import ZipFile from Utils import open_file @@ -17,7 +17,7 @@ MOD_URL = "https://api.github.com/repos/alwaysintreble/TheMessengerRandomizerModAP/releases/latest" -def ask_yes_no_cancel(title: str, text: str) -> Optional[bool]: +def ask_yes_no_cancel(title: str, text: str) -> bool | None: """ Wrapper for tkinter.messagebox.askyesnocancel, that creates a popup dialog box with yes, no, and cancel buttons. @@ -33,7 +33,6 @@ def ask_yes_no_cancel(title: str, text: str) -> Optional[bool]: return ret - def launch_game(*args) -> None: """Check the game installation, then launch it""" def courier_installed() -> bool: diff --git a/worlds/messenger/connections.py b/worlds/messenger/connections.py index 69dd7aa7f286..79912a5688c2 100644 --- a/worlds/messenger/connections.py +++ b/worlds/messenger/connections.py @@ -1,6 +1,4 @@ -from typing import Dict, List - -CONNECTIONS: Dict[str, Dict[str, List[str]]] = { +CONNECTIONS: dict[str, dict[str, list[str]]] = { "Ninja Village": { "Right": [ "Autumn Hills - Left", @@ -640,7 +638,7 @@ }, } -RANDOMIZED_CONNECTIONS: Dict[str, str] = { +RANDOMIZED_CONNECTIONS: dict[str, str] = { "Ninja Village - Right": "Autumn Hills - Left", "Autumn Hills - Left": "Ninja Village - Right", "Autumn Hills - Right": "Forlorn Temple - Left", @@ -680,7 +678,7 @@ "Sunken Shrine - Left": "Howling Grotto - Bottom", } -TRANSITIONS: List[str] = [ +TRANSITIONS: list[str] = [ "Ninja Village - Right", "Autumn Hills - Left", "Autumn Hills - Right", diff --git a/worlds/messenger/constants.py b/worlds/messenger/constants.py index ea15c71068db..47b5a1a85cff 100644 --- a/worlds/messenger/constants.py +++ b/worlds/messenger/constants.py @@ -2,7 +2,7 @@ # items # listing individual groups first for easy lookup -NOTES = [ +NOTES: list[str] = [ "Key of Hope", "Key of Chaos", "Key of Courage", @@ -11,7 +11,7 @@ "Key of Symbiosis", ] -PROG_ITEMS = [ +PROG_ITEMS: list[str] = [ "Wingsuit", "Rope Dart", "Lightfoot Tabi", @@ -28,18 +28,18 @@ "Seashell", ] -PHOBEKINS = [ +PHOBEKINS: list[str] = [ "Necro", "Pyro", "Claustro", "Acro", ] -USEFUL_ITEMS = [ +USEFUL_ITEMS: list[str] = [ "Windmill Shuriken", ] -FILLER = { +FILLER: dict[str, int] = { "Time Shard": 5, "Time Shard (10)": 10, "Time Shard (50)": 20, @@ -48,13 +48,13 @@ "Time Shard (500)": 5, } -TRAPS = { +TRAPS: dict[str, int] = { "Teleport Trap": 5, "Prophecy Trap": 10, } # item_name_to_id needs to be deterministic and match upstream -ALL_ITEMS = [ +ALL_ITEMS: list[str] = [ *NOTES, "Windmill Shuriken", "Wingsuit", @@ -83,7 +83,7 @@ # locations # the names of these don't actually matter, but using the upstream's names for now # order must be exactly the same as upstream -ALWAYS_LOCATIONS = [ +ALWAYS_LOCATIONS: list[str] = [ # notes "Sunken Shrine - Key of Love", "Corrupted Future - Key of Courage", @@ -160,7 +160,7 @@ "Elemental Skylands Seal - Fire", ] -BOSS_LOCATIONS = [ +BOSS_LOCATIONS: list[str] = [ "Autumn Hills - Leaf Golem", "Catacombs - Ruxxtin", "Howling Grotto - Emerald Golem", diff --git a/worlds/messenger/options.py b/worlds/messenger/options.py index 59e694cd3963..8b61a9435422 100644 --- a/worlds/messenger/options.py +++ b/worlds/messenger/options.py @@ -1,5 +1,4 @@ from dataclasses import dataclass -from typing import Dict from schema import And, Optional, Or, Schema @@ -167,7 +166,7 @@ class ShopPrices(Range): default = 100 -def planned_price(location: str) -> Dict[Optional, Or]: +def planned_price(location: str) -> dict[Optional, Or]: return { Optional(location): Or( And(int, lambda n: n >= 0), diff --git a/worlds/messenger/portals.py b/worlds/messenger/portals.py index 17152a1a1538..896fefa686f1 100644 --- a/worlds/messenger/portals.py +++ b/worlds/messenger/portals.py @@ -1,5 +1,5 @@ from copy import deepcopy -from typing import List, TYPE_CHECKING +from typing import TYPE_CHECKING from BaseClasses import CollectionState, PlandoOptions from Options import PlandoConnection @@ -8,7 +8,7 @@ from . import MessengerWorld -PORTALS = [ +PORTALS: list[str] = [ "Autumn Hills", "Riviere Turquoise", "Howling Grotto", @@ -18,7 +18,7 @@ ] -SHOP_POINTS = { +SHOP_POINTS: dict[str, list[str]] = { "Autumn Hills": [ "Climbing Claws", "Hope Path", @@ -113,7 +113,7 @@ } -CHECKPOINTS = { +CHECKPOINTS: dict[str, list[str]] = { "Autumn Hills": [ "Hope Latch", "Key of Hope", @@ -186,7 +186,7 @@ } -REGION_ORDER = [ +REGION_ORDER: list[str] = [ "Autumn Hills", "Forlorn Temple", "Catacombs", @@ -228,7 +228,7 @@ def create_mapping(in_portal: str, warp: str) -> str: return parent - def handle_planned_portals(plando_connections: List[PlandoConnection]) -> None: + def handle_planned_portals(plando_connections: list[PlandoConnection]) -> None: """checks the provided plando connections for portals and connects them""" nonlocal available_portals diff --git a/worlds/messenger/regions.py b/worlds/messenger/regions.py index 153f8510f1bd..d53b84fe3401 100644 --- a/worlds/messenger/regions.py +++ b/worlds/messenger/regions.py @@ -1,7 +1,4 @@ -from typing import Dict, List - - -LOCATIONS: Dict[str, List[str]] = { +LOCATIONS: dict[str, list[str]] = { "Ninja Village - Nest": [ "Ninja Village - Candle", "Ninja Village - Astral Seed", @@ -201,7 +198,7 @@ } -SUB_REGIONS: Dict[str, List[str]] = { +SUB_REGIONS: dict[str, list[str]] = { "Ninja Village": [ "Right", ], @@ -385,7 +382,7 @@ # order is slightly funky here for back compat -MEGA_SHARDS: Dict[str, List[str]] = { +MEGA_SHARDS: dict[str, list[str]] = { "Autumn Hills - Lakeside Checkpoint": ["Autumn Hills Mega Shard"], "Forlorn Temple - Outside Shop": ["Hidden Entrance Mega Shard"], "Catacombs - Top Left": ["Catacombs Mega Shard"], @@ -414,7 +411,7 @@ } -REGION_CONNECTIONS: Dict[str, Dict[str, str]] = { +REGION_CONNECTIONS: dict[str, dict[str, str]] = { "Menu": {"Tower HQ": "Start Game"}, "Tower HQ": { "Autumn Hills - Portal": "ToTHQ Autumn Hills Portal", @@ -436,7 +433,7 @@ # regions that don't have sub-regions -LEVELS: List[str] = [ +LEVELS: list[str] = [ "Menu", "Tower HQ", "The Shop", diff --git a/worlds/messenger/rules.py b/worlds/messenger/rules.py index 85b73dec4147..f09025c7edce 100644 --- a/worlds/messenger/rules.py +++ b/worlds/messenger/rules.py @@ -1,4 +1,4 @@ -from typing import Dict, TYPE_CHECKING +from typing import TYPE_CHECKING from BaseClasses import CollectionState from worlds.generic.Rules import CollectionRule, add_rule, allow_self_locking_items @@ -12,9 +12,9 @@ class MessengerRules: player: int world: "MessengerWorld" - connection_rules: Dict[str, CollectionRule] - region_rules: Dict[str, CollectionRule] - location_rules: Dict[str, CollectionRule] + connection_rules: dict[str, CollectionRule] + region_rules: dict[str, CollectionRule] + location_rules: dict[str, CollectionRule] maximum_price: int required_seals: int @@ -220,6 +220,8 @@ def __init__(self, world: "MessengerWorld") -> None: } self.location_rules = { + # hq + "Money Wrench": self.can_shop, # ninja village "Ninja Village Seal - Tree House": self.has_dart, diff --git a/worlds/messenger/shop.py b/worlds/messenger/shop.py index 3c8c7bf6f21e..6ab72f9765f3 100644 --- a/worlds/messenger/shop.py +++ b/worlds/messenger/shop.py @@ -1,11 +1,11 @@ -from typing import Dict, List, NamedTuple, Optional, Set, TYPE_CHECKING, Tuple, Union +from typing import NamedTuple, TYPE_CHECKING if TYPE_CHECKING: from . import MessengerWorld else: MessengerWorld = object -PROG_SHOP_ITEMS: List[str] = [ +PROG_SHOP_ITEMS: list[str] = [ "Path of Resilience", "Meditation", "Strike of the Ninja", @@ -14,7 +14,7 @@ "Aerobatics Warrior", ] -USEFUL_SHOP_ITEMS: List[str] = [ +USEFUL_SHOP_ITEMS: list[str] = [ "Karuta Plates", "Serendipitous Bodies", "Kusari Jacket", @@ -29,10 +29,10 @@ class ShopData(NamedTuple): internal_name: str min_price: int max_price: int - prerequisite: Optional[Union[str, Set[str]]] = None + prerequisite: str | set[str] | None = None -SHOP_ITEMS: Dict[str, ShopData] = { +SHOP_ITEMS: dict[str, ShopData] = { "Karuta Plates": ShopData("HP_UPGRADE_1", 20, 200), "Serendipitous Bodies": ShopData("ENEMY_DROP_HP", 20, 300, "The Shop - Karuta Plates"), "Path of Resilience": ShopData("DAMAGE_REDUCTION", 100, 500, "The Shop - Serendipitous Bodies"), @@ -56,7 +56,7 @@ class ShopData(NamedTuple): "Focused Power Sense": ShopData("POWER_SEAL_WORLD_MAP", 300, 600, "The Shop - Power Sense"), } -FIGURINES: Dict[str, ShopData] = { +FIGURINES: dict[str, ShopData] = { "Green Kappa Figurine": ShopData("GREEN_KAPPA", 100, 500), "Blue Kappa Figurine": ShopData("BLUE_KAPPA", 100, 500), "Ountarde Figurine": ShopData("OUNTARDE", 100, 500), @@ -73,12 +73,12 @@ class ShopData(NamedTuple): } -def shuffle_shop_prices(world: MessengerWorld) -> Tuple[Dict[str, int], Dict[str, int]]: +def shuffle_shop_prices(world: MessengerWorld) -> tuple[dict[str, int], dict[str, int]]: shop_price_mod = world.options.shop_price.value shop_price_planned = world.options.shop_price_plan - shop_prices: Dict[str, int] = {} - figurine_prices: Dict[str, int] = {} + shop_prices: dict[str, int] = {} + figurine_prices: dict[str, int] = {} for item, price in shop_price_planned.value.items(): if not isinstance(price, int): price = world.random.choices(list(price.keys()), weights=list(price.values()))[0] diff --git a/worlds/messenger/subclasses.py b/worlds/messenger/subclasses.py index b60aeb179feb..29e3ea8953ec 100644 --- a/worlds/messenger/subclasses.py +++ b/worlds/messenger/subclasses.py @@ -1,5 +1,5 @@ from functools import cached_property -from typing import Optional, TYPE_CHECKING +from typing import TYPE_CHECKING from BaseClasses import CollectionState, Entrance, Item, ItemClassification, Location, Region from .regions import LOCATIONS, MEGA_SHARDS @@ -10,14 +10,14 @@ class MessengerEntrance(Entrance): - world: Optional["MessengerWorld"] = None + world: "MessengerWorld | None" = None class MessengerRegion(Region): parent: str entrance_type = MessengerEntrance - def __init__(self, name: str, world: "MessengerWorld", parent: Optional[str] = None) -> None: + def __init__(self, name: str, world: "MessengerWorld", parent: str | None = None) -> None: super().__init__(name, world.player, world.multiworld) self.parent = parent locations = [] @@ -48,7 +48,7 @@ def __init__(self, name: str, world: "MessengerWorld", parent: Optional[str] = N class MessengerLocation(Location): game = "The Messenger" - def __init__(self, player: int, name: str, loc_id: Optional[int], parent: MessengerRegion) -> None: + def __init__(self, player: int, name: str, loc_id: int | None, parent: MessengerRegion) -> None: super().__init__(player, name, loc_id, parent) if loc_id is None: if name == "Rescue Phantom": @@ -59,7 +59,7 @@ def __init__(self, player: int, name: str, loc_id: Optional[int], parent: Messen class MessengerShopLocation(MessengerLocation): @cached_property def cost(self) -> int: - name = self.name.replace("The Shop - ", "") # TODO use `remove_prefix` when 3.8 finally gets dropped + name = self.name.removeprefix("The Shop - ") world = self.parent_region.multiworld.worlds[self.player] shop_data = SHOP_ITEMS[name] if shop_data.prerequisite: diff --git a/worlds/messenger/test/test_shop.py b/worlds/messenger/test/test_shop.py index 971ff1763b47..21a0c352bff4 100644 --- a/worlds/messenger/test/test_shop.py +++ b/worlds/messenger/test/test_shop.py @@ -1,5 +1,6 @@ from typing import Dict +from BaseClasses import CollectionState from . import MessengerTestBase from ..shop import SHOP_ITEMS, FIGURINES @@ -76,7 +77,7 @@ def test_costs(self) -> None: loc = f"The Shop - {loc}" self.assertLessEqual(price, self.multiworld.get_location(loc, self.player).cost) - self.assertTrue(loc.replace("The Shop - ", "") in SHOP_ITEMS) + self.assertTrue(loc.removeprefix("The Shop - ") in SHOP_ITEMS) self.assertEqual(len(prices), len(SHOP_ITEMS)) figures = self.world.figurine_prices @@ -89,3 +90,15 @@ def test_costs(self) -> None: self.assertTrue(loc in FIGURINES) self.assertEqual(len(figures), len(FIGURINES)) + + max_cost_state = CollectionState(self.multiworld) + self.assertFalse(self.world.get_location("Money Wrench").can_reach(max_cost_state)) + prog_shards = [] + for item in self.multiworld.itempool: + if "Time Shard " in item.name: + value = int(item.name.strip("Time Shard ()")) + if value >= 100: + prog_shards.append(item) + for shard in prog_shards: + max_cost_state.collect(shard, True) + self.assertTrue(self.world.get_location("Money Wrench").can_reach(max_cost_state)) diff --git a/worlds/minecraft/Structures.py b/worlds/minecraft/Structures.py index df3d944a6c65..d4f62f3498e9 100644 --- a/worlds/minecraft/Structures.py +++ b/worlds/minecraft/Structures.py @@ -29,7 +29,7 @@ def set_pair(exit, struct): # Connect plando structures first if self.options.plando_connections: - for conn in self.plando_connections: + for conn in self.options.plando_connections: set_pair(conn.entrance, conn.exit) # The algorithm tries to place the most restrictive structures first. This algorithm always works on the diff --git a/worlds/mm2/__init__.py b/worlds/mm2/__init__.py index 07e1823f9387..4a43ee8df0f0 100644 --- a/worlds/mm2/__init__.py +++ b/worlds/mm2/__init__.py @@ -96,13 +96,13 @@ class MM2World(World): location_name_groups = location_groups web = MM2WebWorld() rom_name: bytearray - world_version: Tuple[int, int, int] = (0, 3, 1) + world_version: Tuple[int, int, int] = (0, 3, 2) wily_5_weapons: Dict[int, List[int]] - def __init__(self, world: MultiWorld, player: int): + def __init__(self, multiworld: MultiWorld, player: int): self.rom_name = bytearray() self.rom_name_available_event = threading.Event() - super().__init__(world, player) + super().__init__(multiworld, player) self.weapon_damage = deepcopy(weapon_damage) self.wily_5_weapons = {} diff --git a/worlds/mm2/rules.py b/worlds/mm2/rules.py index eddd09927445..7e2ce1f3c752 100644 --- a/worlds/mm2/rules.py +++ b/worlds/mm2/rules.py @@ -133,28 +133,6 @@ def set_rules(world: "MM2World") -> None: # Wily Machine needs all three weaknesses present, so allow elif 4 > world.weapon_damage[weapon][i] > 0: world.weapon_damage[weapon][i] = 0 - # handle special cases - for boss in range(14): - for weapon in (1, 3, 6, 8): - if (0 < world.weapon_damage[weapon][boss] < minimum_weakness_requirement[weapon] and - not any(world.weapon_damage[i][boss] > 0 for i in range(1, 8) if i != weapon)): - # Weapon does not have enough possible ammo to kill the boss, raise the damage - if boss == 9: - if weapon != 3: - # Atomic Fire and Crash Bomber cannot be Picopico-kun's only weakness - world.weapon_damage[weapon][boss] = 0 - weakness = world.random.choice((2, 3, 4, 5, 7, 8)) - world.weapon_damage[weakness][boss] = minimum_weakness_requirement[weakness] - elif boss == 11: - if weapon == 1: - # Atomic Fire cannot be Boobeam Trap's only weakness - world.weapon_damage[weapon][boss] = 0 - weakness = world.random.choice((2, 3, 4, 5, 6, 7, 8)) - world.weapon_damage[weakness][boss] = minimum_weakness_requirement[weakness] - else: - world.weapon_damage[weapon][boss] = minimum_weakness_requirement[weapon] - starting = world.options.starting_robot_master.value - world.weapon_damage[0][starting] = 1 for p_boss in world.options.plando_weakness: for p_weapon in world.options.plando_weakness[p_boss]: @@ -168,6 +146,28 @@ def set_rules(world: "MM2World") -> None: world.weapon_damage[weapons_to_id[p_weapon]][bosses[p_boss]] \ = world.options.plando_weakness[p_boss][p_weapon] + # handle special cases + for boss in range(14): + for weapon in (1, 2, 3, 6, 8): + if (0 < world.weapon_damage[weapon][boss] < minimum_weakness_requirement[weapon] and + not any(world.weapon_damage[i][boss] >= minimum_weakness_requirement[weapon] + for i in range(9) if i != weapon)): + # Weapon does not have enough possible ammo to kill the boss, raise the damage + if boss == 9: + if weapon in (1, 6): + # Atomic Fire and Crash Bomber cannot be Picopico-kun's only weakness + world.weapon_damage[weapon][boss] = 0 + weakness = world.random.choice((2, 3, 4, 5, 7, 8)) + world.weapon_damage[weakness][boss] = minimum_weakness_requirement[weakness] + elif boss == 11: + if weapon == 1: + # Atomic Fire cannot be Boobeam Trap's only weakness + world.weapon_damage[weapon][boss] = 0 + weakness = world.random.choice((2, 3, 4, 5, 6, 7, 8)) + world.weapon_damage[weakness][boss] = minimum_weakness_requirement[weakness] + else: + world.weapon_damage[weapon][boss] = minimum_weakness_requirement[weapon] + if world.weapon_damage[0][world.options.starting_robot_master.value] < 1: world.weapon_damage[0][world.options.starting_robot_master.value] = weapon_damage[0][world.options.starting_robot_master.value] @@ -209,11 +209,11 @@ def set_rules(world: "MM2World") -> None: continue highest, wp = max(zip(weapon_weight.values(), weapon_weight.keys())) uses = weapon_energy[wp] // weapon_costs[wp] - used_weapons[boss].add(wp) if int(uses * boss_damage[wp]) > boss_health[boss]: used = ceil(boss_health[boss] / boss_damage[wp]) weapon_energy[wp] -= weapon_costs[wp] * used boss_health[boss] = 0 + used_weapons[boss].add(wp) elif highest <= 0: # we are out of weapons that can actually damage the boss # so find the weapon that has the most uses, and apply that as an additional weakness @@ -221,18 +221,21 @@ def set_rules(world: "MM2World") -> None: # Quick Boomerang and no other, it would only be 28 off from defeating all 9, which Metal Blade should # be able to cover wp, max_uses = max((weapon, weapon_energy[weapon] // weapon_costs[weapon]) for weapon in weapon_weight - if weapon != 0) + if weapon != 0 and (weapon != 8 or boss != 12)) + # Wily Machine cannot under any circumstances take damage from Time Stopper, prevent this world.weapon_damage[wp][boss] = minimum_weakness_requirement[wp] used = min(int(weapon_energy[wp] // weapon_costs[wp]), - ceil(boss_health[boss] // minimum_weakness_requirement[wp])) + ceil(boss_health[boss] / minimum_weakness_requirement[wp])) weapon_energy[wp] -= weapon_costs[wp] * used boss_health[boss] -= int(used * minimum_weakness_requirement[wp]) weapon_weight.pop(wp) + used_weapons[boss].add(wp) else: # drain the weapon and continue boss_health[boss] -= int(uses * boss_damage[wp]) weapon_energy[wp] -= weapon_costs[wp] * uses weapon_weight.pop(wp) + used_weapons[boss].add(wp) world.wily_5_weapons = {boss: sorted(used_weapons[boss]) for boss in used_weapons} diff --git a/worlds/mm2/text.py b/worlds/mm2/text.py index 32d665bf6c7f..7dda12ac0346 100644 --- a/worlds/mm2/text.py +++ b/worlds/mm2/text.py @@ -1,7 +1,7 @@ from typing import DefaultDict from collections import defaultdict -MM2_WEAPON_ENCODING: DefaultDict[str, int] = defaultdict(lambda x: 0x6F, { +MM2_WEAPON_ENCODING: DefaultDict[str, int] = defaultdict(lambda: 0x6F, { ' ': 0x40, 'A': 0x41, 'B': 0x42, diff --git a/worlds/mmbn3/Items.py b/worlds/mmbn3/Items.py index 2e249ce79e8c..30ec311ecbe2 100644 --- a/worlds/mmbn3/Items.py +++ b/worlds/mmbn3/Items.py @@ -171,7 +171,7 @@ class MMBN3Item(Item): ItemData(0xB31063, ItemName.SandStage_C, ItemClassification.filler, ItemType.Chip, 182, chip_code('C')), ItemData(0xB31064, ItemName.SideGun_S, ItemClassification.filler, ItemType.Chip, 12, chip_code('S')), ItemData(0xB31065, ItemName.Slasher_B, ItemClassification.useful, ItemType.Chip, 43, chip_code('B')), - ItemData(0xB31066, ItemName.SloGuage_star, ItemClassification.filler, ItemType.Chip, 157, chip_code('*')), + ItemData(0xB31066, ItemName.SloGauge_star, ItemClassification.filler, ItemType.Chip, 157, chip_code('*')), ItemData(0xB31067, ItemName.Snake_D, ItemClassification.useful, ItemType.Chip, 131, chip_code('D')), ItemData(0xB31068, ItemName.Snctuary_C, ItemClassification.useful, ItemType.Chip, 184, chip_code('C')), ItemData(0xB31069, ItemName.Spreader_star, ItemClassification.useful, ItemType.Chip, 13, chip_code('*')), diff --git a/worlds/mmbn3/Names/ItemName.py b/worlds/mmbn3/Names/ItemName.py index 441bdc591c51..677eff22b353 100644 --- a/worlds/mmbn3/Names/ItemName.py +++ b/worlds/mmbn3/Names/ItemName.py @@ -72,7 +72,7 @@ class ItemName(): SandStage_C = "SandStage C" SideGun_S = "SideGun S" Slasher_B = "Slasher B" - SloGuage_star = "SloGuage *" + SloGauge_star = "SloGauge *" Snake_D = "Snake D" Snctuary_C = "Snctuary C" Spreader_star = "Spreader *" @@ -235,4 +235,4 @@ class ItemName(): RegUP3 = "RegUP3" SubMem = "SubMem" - Victory = "Victory" \ No newline at end of file + Victory = "Victory" diff --git a/worlds/musedash/MuseDashData.txt b/worlds/musedash/MuseDashData.txt index 1f1a2a011cff..d913449ed540 100644 --- a/worlds/musedash/MuseDashData.txt +++ b/worlds/musedash/MuseDashData.txt @@ -31,7 +31,7 @@ Blackest Luxury Car|0-18|Default Music|True|3|6|8| Medicine of Sing|0-19|Default Music|False|3|6|8| irregulyze|0-20|Default Music|True|3|6|8| I don't care about Christmas though|0-47|Default Music|False|4|6|8| -Imaginary World|0-21|Default Music|True|4|6|8| +Imaginary World|0-21|Default Music|True|4|6|8|10 Dysthymia|0-22|Default Music|True|4|7|9| From the New World|0-42|Default Music|False|2|5|7| NISEGAO|0-33|Default Music|True|4|7|9| @@ -266,7 +266,7 @@ Medusa|31-1|Happy Otaku Pack Vol.11|False|4|6|8|10 Final Step!|31-2|Happy Otaku Pack Vol.11|False|5|7|10| MAGENTA POTION|31-3|Happy Otaku Pack Vol.11|False|4|7|9| Cross Ray|31-4|Happy Otaku Pack Vol.11|False|3|6|9| -Square Lake|31-5|Happy Otaku Pack Vol.11|True|6|8|9|11 +Square Lake|31-5|Happy Otaku Pack Vol.11|False|6|8|9|11 Girly Cupid|30-0|Cute Is Everything Vol.6|False|3|6|8| sheep in the light|30-1|Cute Is Everything Vol.6|False|2|5|8| Breaker city|30-2|Cute Is Everything Vol.6|False|4|6|9| @@ -353,7 +353,7 @@ Re End of a Dream|16-1|Give Up TREATMENT Vol.6|False|5|8|11| Etude -Storm-|16-2|Give Up TREATMENT Vol.6|True|6|8|10| Unlimited Katharsis|16-3|Give Up TREATMENT Vol.6|False|4|6|10| Magic Knight Girl|16-4|Give Up TREATMENT Vol.6|False|4|7|9| -Eeliaas|16-5|Give Up TREATMENT Vol.6|True|6|9|11| +Eeliaas|16-5|Give Up TREATMENT Vol.6|False|6|9|11| Magic Spell|15-0|Cute Is Everything Vol.3|True|2|5|7| Colorful Star, Colored Drawing, Travel Poem|15-1|Cute Is Everything Vol.3|False|3|4|6| Satell Knight|15-2|Cute Is Everything Vol.3|False|3|6|8| @@ -396,7 +396,7 @@ Chronomia|9-2|Happy Otaku Pack Vol.4|False|5|7|10| Dandelion's Daydream|9-3|Happy Otaku Pack Vol.4|True|5|7|8| Lorikeet Flat design|9-4|Happy Otaku Pack Vol.4|True|5|7|10| GOODRAGE|9-5|Happy Otaku Pack Vol.4|False|6|9|11| -Altale|8-0|Give Up TREATMENT Vol.3|False|3|5|7| +Altale|8-0|Give Up TREATMENT Vol.3|False|3|5|7|10 Brain Power|8-1|Give Up TREATMENT Vol.3|False|4|7|10| Berry Go!!|8-2|Give Up TREATMENT Vol.3|False|3|6|9| Sweet* Witch* Girl*|8-3|Give Up TREATMENT Vol.3|False|6|8|10|? @@ -579,4 +579,19 @@ The Whole Rest|77-1|Let's Rhythm Jam!|False|5|8|10|11 Hydra|77-2|Let's Rhythm Jam!|False|4|7|11| Pastel Lines|77-3|Let's Rhythm Jam!|False|3|6|9| LINK x LIN#S|77-4|Let's Rhythm Jam!|False|3|6|9| -Arcade ViruZ|77-5|Let's Rhythm Jam!|False|6|8|10| +Arcade ViruZ|77-5|Let's Rhythm Jam!|False|6|8|11| +Eve Avenir|78-0|Endless Pirouette|True|6|8|10| +Silverstring|78-1|Endless Pirouette|True|5|7|10| +Melusia|78-2|Endless Pirouette|False|5|7|10|11 +Devil's Castle|78-3|Endless Pirouette|True|4|7|10| +Abatement|78-4|Endless Pirouette|True|6|8|10|11 +Azalea|78-5|Endless Pirouette|False|4|8|10| +Brightly World|78-6|Endless Pirouette|True|6|8|10| +We'll meet in every world ***|78-7|Endless Pirouette|True|7|9|11| +Collapsar|78-8|Endless Pirouette|True|7|9|10|11 +Parousia|78-9|Endless Pirouette|False|6|8|10| +Gunners in the Rain|79-0|Ensemble Arcanum|False|5|8|10| +Halzion|79-1|Ensemble Arcanum|False|2|5|8| +SHOWTIME!!|79-2|Ensemble Arcanum|False|6|8|10| +Achromic Riddle|79-3|Ensemble Arcanum|False|6|8|10|11 +karanosu|79-4|Ensemble Arcanum|False|3|6|8| diff --git a/worlds/musedash/Options.py b/worlds/musedash/Options.py index 7164aa3e1362..e647c18d7096 100644 --- a/worlds/musedash/Options.py +++ b/worlds/musedash/Options.py @@ -39,7 +39,7 @@ class AdditionalSongs(Range): - The final song count may be lower due to other settings. """ range_start = 15 - range_end = 534 # Note will probably not reach this high if any other settings are done. + range_end = 600 # Note will probably not reach this high if any other settings are done. default = 40 display_name = "Additional Song Count" diff --git a/worlds/musedash/__init__.py b/worlds/musedash/__init__.py index ab3a4819fc48..be2eec2f87b8 100644 --- a/worlds/musedash/__init__.py +++ b/worlds/musedash/__init__.py @@ -183,7 +183,7 @@ def create_item(self, name: str) -> Item: if album: return MuseDashSongItem(name, self.player, album) - song = self.md_collection.song_items.get(name) + song = self.md_collection.song_items[name] return MuseDashSongItem(name, self.player, song) def get_filler_item_name(self) -> str: diff --git a/worlds/noita/items.py b/worlds/noita/items.py index 6b662fbee692..1cb7d9601386 100644 --- a/worlds/noita/items.py +++ b/worlds/noita/items.py @@ -100,13 +100,13 @@ def create_all_items(world: NoitaWorld) -> None: "Wand (Tier 5)": ItemData(110010, "Wands", ItemClassification.useful, 1), "Wand (Tier 6)": ItemData(110011, "Wands", ItemClassification.useful, 1), "Kantele": ItemData(110012, "Wands", ItemClassification.useful), - "Fire Immunity Perk": ItemData(110013, "Perks", ItemClassification.progression, 1), - "Toxic Immunity Perk": ItemData(110014, "Perks", ItemClassification.progression, 1), - "Explosion Immunity Perk": ItemData(110015, "Perks", ItemClassification.progression, 1), - "Melee Immunity Perk": ItemData(110016, "Perks", ItemClassification.progression, 1), - "Electricity Immunity Perk": ItemData(110017, "Perks", ItemClassification.progression, 1), - "Tinker with Wands Everywhere Perk": ItemData(110018, "Perks", ItemClassification.progression, 1), - "All-Seeing Eye Perk": ItemData(110019, "Perks", ItemClassification.progression, 1), + "Fire Immunity Perk": ItemData(110013, "Perks", ItemClassification.progression | ItemClassification.useful, 1), + "Toxic Immunity Perk": ItemData(110014, "Perks", ItemClassification.progression | ItemClassification.useful, 1), + "Explosion Immunity Perk": ItemData(110015, "Perks", ItemClassification.progression | ItemClassification.useful, 1), + "Melee Immunity Perk": ItemData(110016, "Perks", ItemClassification.progression | ItemClassification.useful, 1), + "Electricity Immunity Perk": ItemData(110017, "Perks", ItemClassification.progression | ItemClassification.useful, 1), + "Tinker with Wands Everywhere Perk": ItemData(110018, "Perks", ItemClassification.progression | ItemClassification.useful, 1), + "All-Seeing Eye Perk": ItemData(110019, "Perks", ItemClassification.progression | ItemClassification.useful, 1), "Spatial Awareness Perk": ItemData(110020, "Perks", ItemClassification.progression), "Extra Life Perk": ItemData(110021, "Repeatable Perks", ItemClassification.useful, 1), "Orb": ItemData(110022, "Orbs", ItemClassification.progression_skip_balancing), diff --git a/worlds/oot/Options.py b/worlds/oot/Options.py index 613c5d01b381..797b276b766c 100644 --- a/worlds/oot/Options.py +++ b/worlds/oot/Options.py @@ -1,7 +1,7 @@ import typing import random from dataclasses import dataclass -from Options import Option, DefaultOnToggle, Toggle, Range, OptionList, OptionSet, DeathLink, PlandoConnections, \ +from Options import Option, DefaultOnToggle, Toggle, Range, OptionSet, DeathLink, PlandoConnections, \ PerGameCommonOptions, OptionGroup from .EntranceShuffle import entrance_shuffle_table from .LogicTricks import normalized_name_tricks @@ -1272,7 +1272,7 @@ class SfxOcarina(Choice): } -class LogicTricks(OptionList): +class LogicTricks(OptionSet): """Set various tricks for logic in Ocarina of Time. Format as a comma-separated list of "nice" names: ["Fewer Tunic Requirements", "Hidden Grottos without Stone of Agony"]. A full list of supported tricks can be found at: diff --git a/worlds/oot/__init__.py b/worlds/oot/__init__.py index b93f60b2a08e..975902ae6e64 100644 --- a/worlds/oot/__init__.py +++ b/worlds/oot/__init__.py @@ -184,6 +184,10 @@ class OOTWorld(World): "Small Key Ring (Spirit Temple)", "Small Key Ring (Thieves Hideout)", "Small Key Ring (Water Temple)", "Boss Key (Fire Temple)", "Boss Key (Forest Temple)", "Boss Key (Ganons Castle)", "Boss Key (Shadow Temple)", "Boss Key (Spirit Temple)", "Boss Key (Water Temple)"}, + + # aliases + "Longshot": {"Progressive Hookshot"}, # fuzzy hinting thought Longshot was Slingshot + "Hookshot": {"Progressive Hookshot"}, # for consistency, mostly } location_name_groups = build_location_name_groups() @@ -1344,23 +1348,9 @@ def get_shuffled_entrances(self, type=None, only_primary=False): def get_locations(self): return self.multiworld.get_locations(self.player) - def get_location(self, location): - return self.multiworld.get_location(location, self.player) - - def get_region(self, region_name): - try: - return self._regions_cache[region_name] - except KeyError: - ret = self.multiworld.get_region(region_name, self.player) - self._regions_cache[region_name] = ret - return ret - def get_entrances(self): return self.multiworld.get_entrances(self.player) - def get_entrance(self, entrance): - return self.multiworld.get_entrance(entrance, self.player) - def is_major_item(self, item: OOTItem): if item.type == 'Token': return self.bridge == 'tokens' or self.lacs_condition == 'tokens' diff --git a/worlds/osrs/LogicCSV/locations_generated.py b/worlds/osrs/LogicCSV/locations_generated.py index 073e505ad8f4..2d617a7038fe 100644 --- a/worlds/osrs/LogicCSV/locations_generated.py +++ b/worlds/osrs/LogicCSV/locations_generated.py @@ -57,11 +57,11 @@ LocationRow('Catch a Swordfish', 'fishing', ['Lobster Spot', ], [SkillRequirement('Fishing', 50), ], [], 12), LocationRow('Bake a Redberry Pie', 'cooking', ['Redberry Bush', 'Wheat', 'Windmill', 'Pie Dish', ], [SkillRequirement('Cooking', 10), ], [], 0), LocationRow('Cook some Stew', 'cooking', ['Bowl', 'Meat', 'Potato', ], [SkillRequirement('Cooking', 25), ], [], 0), - LocationRow('Bake an Apple Pie', 'cooking', ['Cooking Apple', 'Wheat', 'Windmill', 'Pie Dish', ], [SkillRequirement('Cooking', 30), ], [], 2), + LocationRow('Bake an Apple Pie', 'cooking', ['Cooking Apple', 'Wheat', 'Windmill', 'Pie Dish', ], [SkillRequirement('Cooking', 32), ], [], 2), LocationRow('Bake a Cake', 'cooking', ['Wheat', 'Windmill', 'Egg', 'Milk', 'Cake Tin', ], [SkillRequirement('Cooking', 40), ], [], 6), LocationRow('Bake a Meat Pizza', 'cooking', ['Wheat', 'Windmill', 'Cheese', 'Tomato', 'Meat', ], [SkillRequirement('Cooking', 45), ], [], 8), - LocationRow('Burn some Oak Logs', 'firemaking', ['Oak Tree', ], [SkillRequirement('Firemaking', 15), ], [], 0), - LocationRow('Burn some Willow Logs', 'firemaking', ['Willow Tree', ], [SkillRequirement('Firemaking', 30), ], [], 0), + LocationRow('Burn some Oak Logs', 'firemaking', ['Oak Tree', ], [SkillRequirement('Firemaking', 15), SkillRequirement('Woodcutting', 15), ], [], 0), + LocationRow('Burn some Willow Logs', 'firemaking', ['Willow Tree', ], [SkillRequirement('Firemaking', 30), SkillRequirement('Woodcutting', 30), ], [], 0), LocationRow('Travel on a Canoe', 'woodcutting', ['Canoe Tree', ], [SkillRequirement('Woodcutting', 12), ], [], 0), LocationRow('Cut an Oak Log', 'woodcutting', ['Oak Tree', ], [SkillRequirement('Woodcutting', 15), ], [], 0), LocationRow('Cut a Willow Log', 'woodcutting', ['Willow Tree', ], [SkillRequirement('Woodcutting', 30), ], [], 0), diff --git a/worlds/osrs/Names.py b/worlds/osrs/Names.py index cc92439ef859..1a44aa389c6a 100644 --- a/worlds/osrs/Names.py +++ b/worlds/osrs/Names.py @@ -31,7 +31,7 @@ class RegionNames(str, Enum): Mudskipper_Point = "Mudskipper Point" Karamja = "Karamja" Corsair_Cove = "Corsair Cove" - Wilderness = "The Wilderness" + Wilderness = "Wilderness" Crandor = "Crandor" # Resource Regions Egg = "Egg" diff --git a/worlds/osrs/Rules.py b/worlds/osrs/Rules.py new file mode 100644 index 000000000000..22a19934c8e1 --- /dev/null +++ b/worlds/osrs/Rules.py @@ -0,0 +1,337 @@ +""" + Ensures a target level can be reached with available resources + """ +from worlds.generic.Rules import CollectionRule, add_rule +from .Names import RegionNames, ItemNames + + +def get_fishing_skill_rule(level, player, options) -> CollectionRule: + if options.max_fishing_level < level: + return lambda state: False + + if options.brutal_grinds or level < 5: + return lambda state: state.can_reach_region(RegionNames.Shrimp, player) + if level < 20: + return lambda state: state.can_reach_region(RegionNames.Shrimp, player) and \ + state.can_reach_region(RegionNames.Port_Sarim, player) + else: + return lambda state: state.can_reach_region(RegionNames.Shrimp, player) and \ + state.can_reach_region(RegionNames.Port_Sarim, player) and \ + state.can_reach_region(RegionNames.Fly_Fish, player) + + +def get_mining_skill_rule(level, player, options) -> CollectionRule: + if options.max_mining_level < level: + return lambda state: False + + if options.brutal_grinds or level < 15: + return lambda state: state.can_reach_region(RegionNames.Bronze_Ores, player) or \ + state.can_reach_region(RegionNames.Clay_Rock, player) + else: + # Iron is the best way to train all the way to 99, so having access to iron is all you need to check for + return lambda state: (state.can_reach_region(RegionNames.Bronze_Ores, player) or + state.can_reach_region(RegionNames.Clay_Rock, player)) and \ + state.can_reach_region(RegionNames.Iron_Rock, player) + + +def get_woodcutting_skill_rule(level, player, options) -> CollectionRule: + if options.max_woodcutting_level < level: + return lambda state: False + + if options.brutal_grinds or level < 15: + # I've checked. There is not a single chunk in the f2p that does not have at least one normal tree. + # Even the desert. + return lambda state: True + if level < 30: + return lambda state: state.can_reach_region(RegionNames.Oak_Tree, player) + else: + return lambda state: state.can_reach_region(RegionNames.Oak_Tree, player) and \ + state.can_reach_region(RegionNames.Willow_Tree, player) + + +def get_smithing_skill_rule(level, player, options) -> CollectionRule: + if options.max_smithing_level < level: + return lambda state: False + + if options.brutal_grinds: + return lambda state: state.can_reach_region(RegionNames.Bronze_Ores, player) and \ + state.can_reach_region(RegionNames.Furnace, player) + if level < 15: + # Lumbridge has a special bronze-only anvil. This is the only anvil of its type so it's not included + # in the "Anvil" resource region. We still need to check for it though. + return lambda state: state.can_reach_region(RegionNames.Bronze_Ores, player) and \ + state.can_reach_region(RegionNames.Furnace, player) and \ + (state.can_reach_region(RegionNames.Anvil, player) or + state.can_reach_region(RegionNames.Lumbridge, player)) + if level < 30: + # For levels between 15 and 30, the lumbridge anvil won't cut it. Only a real one will do + return lambda state: state.can_reach_region(RegionNames.Bronze_Ores, player) and \ + state.can_reach_region(RegionNames.Iron_Rock, player) and \ + state.can_reach_region(RegionNames.Furnace, player) and \ + state.can_reach_region(RegionNames.Anvil, player) + else: + return lambda state: state.can_reach_region(RegionNames.Bronze_Ores, player) and \ + state.can_reach_region(RegionNames.Iron_Rock, player) and \ + state.can_reach_region(RegionNames.Coal_Rock, player) and \ + state.can_reach_region(RegionNames.Furnace, player) and \ + state.can_reach_region(RegionNames.Anvil, player) + + +def get_crafting_skill_rule(level, player, options): + if options.max_crafting_level < level: + return lambda state: False + + # Crafting is really complex. Need a lot of sub-rules to make this even remotely readable + def can_spin(state): + return state.can_reach_region(RegionNames.Sheep, player) and \ + state.can_reach_region(RegionNames.Spinning_Wheel, player) + + def can_pot(state): + return state.can_reach_region(RegionNames.Clay_Rock, player) and \ + state.can_reach_region(RegionNames.Barbarian_Village, player) + + def can_tan(state): + return state.can_reach_region(RegionNames.Milk, player) and \ + state.can_reach_region(RegionNames.Al_Kharid, player) + + def mould_access(state): + return state.can_reach_region(RegionNames.Al_Kharid, player) or \ + state.can_reach_region(RegionNames.Rimmington, player) + + def can_silver(state): + return state.can_reach_region(RegionNames.Silver_Rock, player) and \ + state.can_reach_region(RegionNames.Furnace, player) and mould_access(state) + + def can_gold(state): + return state.can_reach_region(RegionNames.Gold_Rock, player) and \ + state.can_reach_region(RegionNames.Furnace, player) and mould_access(state) + + if options.brutal_grinds or level < 5: + return lambda state: can_spin(state) or can_pot(state) or can_tan(state) + + can_smelt_gold = get_smithing_skill_rule(40, player, options) + can_smelt_silver = get_smithing_skill_rule(20, player, options) + if level < 16: + return lambda state: can_pot(state) or can_tan(state) or (can_gold(state) and can_smelt_gold(state)) + else: + return lambda state: can_tan(state) or (can_silver(state) and can_smelt_silver(state)) or \ + (can_gold(state) and can_smelt_gold(state)) + + +def get_cooking_skill_rule(level, player, options) -> CollectionRule: + if options.max_cooking_level < level: + return lambda state: False + + if options.brutal_grinds or level < 15: + return lambda state: state.can_reach_region(RegionNames.Milk, player) or \ + state.can_reach_region(RegionNames.Egg, player) or \ + state.can_reach_region(RegionNames.Shrimp, player) or \ + (state.can_reach_region(RegionNames.Wheat, player) and + state.can_reach_region(RegionNames.Windmill, player)) + else: + can_catch_fly_fish = get_fishing_skill_rule(20, player, options) + + return lambda state: ( + (state.can_reach_region(RegionNames.Fly_Fish, player) and can_catch_fly_fish(state)) or + (state.can_reach_region(RegionNames.Port_Sarim, player)) + ) and ( + state.can_reach_region(RegionNames.Milk, player) or + state.can_reach_region(RegionNames.Egg, player) or + state.can_reach_region(RegionNames.Shrimp, player) or + (state.can_reach_region(RegionNames.Wheat, player) and + state.can_reach_region(RegionNames.Windmill, player)) + ) + + +def get_runecraft_skill_rule(level, player, options) -> CollectionRule: + if options.max_runecraft_level < level: + return lambda state: False + if not options.brutal_grinds: + # Ensure access to the relevant altars + if level >= 5: + return lambda state: state.has(ItemNames.QP_Rune_Mysteries, player) and \ + state.can_reach_region(RegionNames.Falador_Farm, player) and \ + state.can_reach_region(RegionNames.Lumbridge_Swamp, player) + if level >= 9: + return lambda state: state.has(ItemNames.QP_Rune_Mysteries, player) and \ + state.can_reach_region(RegionNames.Falador_Farm, player) and \ + state.can_reach_region(RegionNames.Lumbridge_Swamp, player) and \ + state.can_reach_region(RegionNames.East_Of_Varrock, player) + if level >= 14: + return lambda state: state.has(ItemNames.QP_Rune_Mysteries, player) and \ + state.can_reach_region(RegionNames.Falador_Farm, player) and \ + state.can_reach_region(RegionNames.Lumbridge_Swamp, player) and \ + state.can_reach_region(RegionNames.East_Of_Varrock, player) and \ + state.can_reach_region(RegionNames.Al_Kharid, player) + + return lambda state: state.has(ItemNames.QP_Rune_Mysteries, player) and \ + state.can_reach_region(RegionNames.Falador_Farm, player) + + +def get_magic_skill_rule(level, player, options) -> CollectionRule: + if options.max_magic_level < level: + return lambda state: False + + return lambda state: state.can_reach_region(RegionNames.Mind_Runes, player) + + +def get_firemaking_skill_rule(level, player, options) -> CollectionRule: + if options.max_firemaking_level < level: + return lambda state: False + if not options.brutal_grinds: + if level >= 30: + can_chop_willows = get_woodcutting_skill_rule(30, player, options) + return lambda state: state.can_reach_region(RegionNames.Willow_Tree, player) and can_chop_willows(state) + if level >= 15: + can_chop_oaks = get_woodcutting_skill_rule(15, player, options) + return lambda state: state.can_reach_region(RegionNames.Oak_Tree, player) and can_chop_oaks(state) + # If brutal grinds are on, or if the level is less than 15, you can train it. + return lambda state: True + + +def get_skill_rule(skill, level, player, options) -> CollectionRule: + if skill.lower() == "fishing": + return get_fishing_skill_rule(level, player, options) + if skill.lower() == "mining": + return get_mining_skill_rule(level, player, options) + if skill.lower() == "woodcutting": + return get_woodcutting_skill_rule(level, player, options) + if skill.lower() == "smithing": + return get_smithing_skill_rule(level, player, options) + if skill.lower() == "crafting": + return get_crafting_skill_rule(level, player, options) + if skill.lower() == "cooking": + return get_cooking_skill_rule(level, player, options) + if skill.lower() == "runecraft": + return get_runecraft_skill_rule(level, player, options) + if skill.lower() == "magic": + return get_magic_skill_rule(level, player, options) + if skill.lower() == "firemaking": + return get_firemaking_skill_rule(level, player, options) + + return lambda state: True + + +def generate_special_rules_for(entrance, region_row, outbound_region_name, player, options): + if outbound_region_name == RegionNames.Cooks_Guild: + add_rule(entrance, get_cooking_skill_rule(32, player, options)) + elif outbound_region_name == RegionNames.Crafting_Guild: + add_rule(entrance, get_crafting_skill_rule(40, player, options)) + elif outbound_region_name == RegionNames.Corsair_Cove: + # Need to be able to start Corsair Curse in addition to having the item + add_rule(entrance, lambda state: state.can_reach(RegionNames.Falador_Farm, "Region", player)) + elif outbound_region_name == "Camdozaal*": + add_rule(entrance, lambda state: state.has(ItemNames.QP_Below_Ice_Mountain, player)) + elif region_row.name == "Dwarven Mountain Pass" and outbound_region_name == "Anvil*": + add_rule(entrance, lambda state: state.has(ItemNames.QP_Dorics_Quest, player)) + + # Special logic for canoes + canoe_regions = [RegionNames.Lumbridge, RegionNames.South_Of_Varrock, RegionNames.Barbarian_Village, + RegionNames.Edgeville, RegionNames.Wilderness] + if region_row.name in canoe_regions: + # Skill rules for greater distances + woodcutting_rule_d1 = get_woodcutting_skill_rule(12, player, options) + woodcutting_rule_d2 = get_woodcutting_skill_rule(27, player, options) + woodcutting_rule_d3 = get_woodcutting_skill_rule(42, player, options) + woodcutting_rule_all = get_woodcutting_skill_rule(57, player, options) + + if region_row.name == RegionNames.Lumbridge: + # Canoe Tree access for the Location + if outbound_region_name == RegionNames.Canoe_Tree: + add_rule(entrance, + lambda state: (state.can_reach_region(RegionNames.South_Of_Varrock, player) + and woodcutting_rule_d1(state)) or + (state.can_reach_region(RegionNames.Barbarian_Village, player) + and woodcutting_rule_d2(state)) or + (state.can_reach_region(RegionNames.Edgeville, player) + and woodcutting_rule_d3(state)) or + (state.can_reach_region(RegionNames.Wilderness, player) + and woodcutting_rule_all(state))) + + # Access to other chunks based on woodcutting settings + elif outbound_region_name == RegionNames.South_Of_Varrock: + add_rule(entrance, woodcutting_rule_d1) + elif outbound_region_name == RegionNames.Barbarian_Village: + add_rule(entrance, woodcutting_rule_d2) + elif outbound_region_name == RegionNames.Edgeville: + add_rule(entrance, woodcutting_rule_d3) + elif outbound_region_name == RegionNames.Wilderness: + add_rule(entrance, woodcutting_rule_all) + + elif region_row.name == RegionNames.South_Of_Varrock: + if outbound_region_name == RegionNames.Canoe_Tree: + add_rule(entrance, + lambda state: (state.can_reach_region(RegionNames.Lumbridge, player) + and woodcutting_rule_d1(state)) or + (state.can_reach_region(RegionNames.Barbarian_Village, player) + and woodcutting_rule_d1(state)) or + (state.can_reach_region(RegionNames.Edgeville, player) + and woodcutting_rule_d2(state)) or + (state.can_reach_region(RegionNames.Wilderness, player) + and woodcutting_rule_d3(state))) + + # Access to other chunks based on woodcutting settings + elif outbound_region_name == RegionNames.Lumbridge: + add_rule(entrance, woodcutting_rule_d1) + elif outbound_region_name == RegionNames.Barbarian_Village: + add_rule(entrance, woodcutting_rule_d1) + elif outbound_region_name == RegionNames.Edgeville: + add_rule(entrance, woodcutting_rule_d3) + elif outbound_region_name == RegionNames.Wilderness: + add_rule(entrance, woodcutting_rule_all) + elif region_row.name == RegionNames.Barbarian_Village: + if outbound_region_name == RegionNames.Canoe_Tree: + add_rule(entrance, + lambda state: (state.can_reach_region(RegionNames.Lumbridge, player) + and woodcutting_rule_d2(state)) or (state.can_reach_region(RegionNames.South_Of_Varrock, player) + and woodcutting_rule_d1(state)) or (state.can_reach_region(RegionNames.Edgeville, player) + and woodcutting_rule_d1(state)) or (state.can_reach_region(RegionNames.Wilderness, player) + and woodcutting_rule_d2(state))) + + # Access to other chunks based on woodcutting settings + elif outbound_region_name == RegionNames.Lumbridge: + add_rule(entrance, woodcutting_rule_d2) + elif outbound_region_name == RegionNames.South_Of_Varrock: + add_rule(entrance, woodcutting_rule_d1) + # Edgeville does not need to be checked, because it's already adjacent + elif outbound_region_name == RegionNames.Wilderness: + add_rule(entrance, woodcutting_rule_d3) + elif region_row.name == RegionNames.Edgeville: + if outbound_region_name == RegionNames.Canoe_Tree: + add_rule(entrance, + lambda state: (state.can_reach_region(RegionNames.Lumbridge, player) + and woodcutting_rule_d3(state)) or + (state.can_reach_region(RegionNames.South_Of_Varrock, player) + and woodcutting_rule_d2(state)) or + (state.can_reach_region(RegionNames.Barbarian_Village, player) + and woodcutting_rule_d1(state)) or + (state.can_reach_region(RegionNames.Wilderness, player) + and woodcutting_rule_d1(state))) + + # Access to other chunks based on woodcutting settings + elif outbound_region_name == RegionNames.Lumbridge: + add_rule(entrance, woodcutting_rule_d3) + elif outbound_region_name == RegionNames.South_Of_Varrock: + add_rule(entrance, woodcutting_rule_d2) + # Barbarian Village does not need to be checked, because it's already adjacent + # Wilderness does not need to be checked, because it's already adjacent + elif region_row.name == RegionNames.Wilderness: + if outbound_region_name == RegionNames.Canoe_Tree: + add_rule(entrance, + lambda state: (state.can_reach_region(RegionNames.Lumbridge, player) + and woodcutting_rule_all(state)) or + (state.can_reach_region(RegionNames.South_Of_Varrock, player) + and woodcutting_rule_d3(state)) or + (state.can_reach_region(RegionNames.Barbarian_Village, player) + and woodcutting_rule_d2(state)) or + (state.can_reach_region(RegionNames.Edgeville, player) + and woodcutting_rule_d1(state))) + + # Access to other chunks based on woodcutting settings + elif outbound_region_name == RegionNames.Lumbridge: + add_rule(entrance, woodcutting_rule_all) + elif outbound_region_name == RegionNames.South_Of_Varrock: + add_rule(entrance, woodcutting_rule_d3) + elif outbound_region_name == RegionNames.Barbarian_Village: + add_rule(entrance, woodcutting_rule_d2) + # Edgeville does not need to be checked, because it's already adjacent diff --git a/worlds/osrs/__init__.py b/worlds/osrs/__init__.py index 9ed55f218d9f..d6ddd63875f4 100644 --- a/worlds/osrs/__init__.py +++ b/worlds/osrs/__init__.py @@ -1,12 +1,12 @@ import typing -from BaseClasses import Item, Tutorial, ItemClassification, Region, MultiWorld +from BaseClasses import Item, Tutorial, ItemClassification, Region, MultiWorld, CollectionState +from Fill import fill_restrictive, FillError from worlds.AutoWorld import WebWorld, World -from worlds.generic.Rules import add_rule, CollectionRule from .Items import OSRSItem, starting_area_dict, chunksanity_starting_chunks, QP_Items, ItemRow, \ chunksanity_special_region_names from .Locations import OSRSLocation, LocationRow - +from .Rules import * from .Options import OSRSOptions, StartingArea from .Names import LocationNames, ItemNames, RegionNames @@ -46,6 +46,7 @@ class OSRSWorld(World): web = OSRSWeb() base_id = 0x070000 data_version = 1 + explicit_indirect_conditions = False item_name_to_id = {item_rows[i].name: 0x070000 + i for i in range(len(item_rows))} location_name_to_id = {location_rows[i].name: 0x070000 + i for i in range(len(location_rows))} @@ -61,6 +62,7 @@ class OSRSWorld(World): starting_area_item: str locations_by_category: typing.Dict[str, typing.List[LocationRow]] + available_QP_locations: typing.List[str] def __init__(self, multiworld: MultiWorld, player: int): super().__init__(multiworld, player) @@ -75,6 +77,7 @@ def __init__(self, multiworld: MultiWorld, player: int): self.starting_area_item = "" self.locations_by_category = {} + self.available_QP_locations = [] def generate_early(self) -> None: location_categories = [location_row.category for location_row in location_rows] @@ -90,9 +93,9 @@ def generate_early(self) -> None: rnd = self.random starting_area = self.options.starting_area - + #UT specific override, if we are in normal gen, resolve starting area, we will get it from slot_data in UT - if not hasattr(self.multiworld, "generation_is_fake"): + if not hasattr(self.multiworld, "generation_is_fake"): if starting_area.value == StartingArea.option_any_bank: self.starting_area_item = rnd.choice(starting_area_dict) elif starting_area.value < StartingArea.option_chunksanity: @@ -127,7 +130,6 @@ def interpret_slot_data(self, slot_data: typing.Dict[str, typing.Any]) -> None: starting_entrance.access_rule = lambda state: state.has(self.starting_area_item, self.player) starting_entrance.connect(self.region_name_to_data[starting_area_region]) - def create_regions(self) -> None: """ called to place player's regions into the MultiWorld's regions list. If it's hard to separate, this can be done @@ -145,7 +147,8 @@ def create_regions(self) -> None: # Removes the word "Area: " from the item name to get the region it applies to. # I figured tacking "Area: " at the beginning would make it _easier_ to tell apart. Turns out it made it worse - if self.starting_area_item != "": #if area hasn't been set, then we shouldn't connect it + # if area hasn't been set, then we shouldn't connect it + if self.starting_area_item != "": if self.starting_area_item in chunksanity_special_region_names: starting_area_region = chunksanity_special_region_names[self.starting_area_item] else: @@ -164,11 +167,8 @@ def create_regions(self) -> None: entrance.connect(self.region_name_to_data[parsed_outbound]) item_name = self.region_rows_by_name[parsed_outbound].itemReq - if "*" not in outbound_region_name and "*" not in item_name: - entrance.access_rule = lambda state, item_name=item_name: state.has(item_name, self.player) - continue - - self.generate_special_rules_for(entrance, region_row, outbound_region_name) + entrance.access_rule = lambda state, item_name=item_name.replace("*",""): state.has(item_name, self.player) + generate_special_rules_for(entrance, region_row, outbound_region_name, self.player, self.options) for resource_region in region_row.resources: if not resource_region: @@ -178,217 +178,34 @@ def create_regions(self) -> None: if "*" not in resource_region: entrance.connect(self.region_name_to_data[resource_region]) else: - self.generate_special_rules_for(entrance, region_row, resource_region) entrance.connect(self.region_name_to_data[resource_region.replace('*', '')]) + generate_special_rules_for(entrance, region_row, resource_region, self.player, self.options) self.roll_locations() - def generate_special_rules_for(self, entrance, region_row, outbound_region_name): - # print(f"Special rules required to access region {outbound_region_name} from {region_row.name}") - if outbound_region_name == RegionNames.Cooks_Guild: - item_name = self.region_rows_by_name[outbound_region_name].itemReq.replace('*', '') - cooking_level_rule = self.get_skill_rule("cooking", 32) - entrance.access_rule = lambda state: state.has(item_name, self.player) and \ - cooking_level_rule(state) - return - if outbound_region_name == RegionNames.Crafting_Guild: - item_name = self.region_rows_by_name[outbound_region_name].itemReq.replace('*', '') - crafting_level_rule = self.get_skill_rule("crafting", 40) - entrance.access_rule = lambda state: state.has(item_name, self.player) and \ - crafting_level_rule(state) - return - if outbound_region_name == RegionNames.Corsair_Cove: - item_name = self.region_rows_by_name[outbound_region_name].itemReq.replace('*', '') - # Need to be able to start Corsair Curse in addition to having the item - entrance.access_rule = lambda state: state.has(item_name, self.player) and \ - state.can_reach(RegionNames.Falador_Farm, "Region", self.player) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Falador_Farm, self.player), entrance) - - return - if outbound_region_name == "Camdozaal*": - item_name = self.region_rows_by_name[outbound_region_name.replace('*', '')].itemReq - entrance.access_rule = lambda state: state.has(item_name, self.player) and \ - state.has(ItemNames.QP_Below_Ice_Mountain, self.player) - return - if region_row.name == "Dwarven Mountain Pass" and outbound_region_name == "Anvil*": - entrance.access_rule = lambda state: state.has(ItemNames.QP_Dorics_Quest, self.player) - return - # Special logic for canoes - canoe_regions = [RegionNames.Lumbridge, RegionNames.South_Of_Varrock, RegionNames.Barbarian_Village, - RegionNames.Edgeville, RegionNames.Wilderness] - if region_row.name in canoe_regions: - # Skill rules for greater distances - woodcutting_rule_d1 = self.get_skill_rule("woodcutting", 12) - woodcutting_rule_d2 = self.get_skill_rule("woodcutting", 27) - woodcutting_rule_d3 = self.get_skill_rule("woodcutting", 42) - woodcutting_rule_all = self.get_skill_rule("woodcutting", 57) - - if region_row.name == RegionNames.Lumbridge: - # Canoe Tree access for the Location - if outbound_region_name == RegionNames.Canoe_Tree: - entrance.access_rule = \ - lambda state: (state.can_reach_region(RegionNames.South_Of_Varrock, self.player) - and woodcutting_rule_d1(state) and self.options.max_woodcutting_level >= 12) or \ - (state.can_reach_region(RegionNames.Barbarian_Village) - and woodcutting_rule_d2(state) and self.options.max_woodcutting_level >= 27) or \ - (state.can_reach_region(RegionNames.Edgeville) - and woodcutting_rule_d3(state) and self.options.max_woodcutting_level >= 42) or \ - (state.can_reach_region(RegionNames.Wilderness) - and woodcutting_rule_all(state) and self.options.max_woodcutting_level >= 57) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.South_Of_Varrock, self.player), entrance) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Barbarian_Village, self.player), entrance) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Edgeville, self.player), entrance) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Wilderness, self.player), entrance) - # Access to other chunks based on woodcutting settings - # South of Varrock does not need to be checked, because it's already adjacent - if outbound_region_name == RegionNames.Barbarian_Village: - entrance.access_rule = lambda state: woodcutting_rule_d2(state) \ - and self.options.max_woodcutting_level >= 27 - if outbound_region_name == RegionNames.Edgeville: - entrance.access_rule = lambda state: woodcutting_rule_d3(state) \ - and self.options.max_woodcutting_level >= 42 - if outbound_region_name == RegionNames.Wilderness: - entrance.access_rule = lambda state: woodcutting_rule_all(state) \ - and self.options.max_woodcutting_level >= 57 - - if region_row.name == RegionNames.South_Of_Varrock: - if outbound_region_name == RegionNames.Canoe_Tree: - entrance.access_rule = \ - lambda state: (state.can_reach_region(RegionNames.Lumbridge, self.player) - and woodcutting_rule_d1(state) and self.options.max_woodcutting_level >= 12) or \ - (state.can_reach_region(RegionNames.Barbarian_Village) - and woodcutting_rule_d1(state) and self.options.max_woodcutting_level >= 12) or \ - (state.can_reach_region(RegionNames.Edgeville) - and woodcutting_rule_d2(state) and self.options.max_woodcutting_level >= 27) or \ - (state.can_reach_region(RegionNames.Wilderness) - and woodcutting_rule_d3(state) and self.options.max_woodcutting_level >= 42) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Lumbridge, self.player), entrance) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Barbarian_Village, self.player), entrance) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Edgeville, self.player), entrance) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Wilderness, self.player), entrance) - # Access to other chunks based on woodcutting settings - # Lumbridge does not need to be checked, because it's already adjacent - if outbound_region_name == RegionNames.Barbarian_Village: - entrance.access_rule = lambda state: woodcutting_rule_d1(state) \ - and self.options.max_woodcutting_level >= 12 - if outbound_region_name == RegionNames.Edgeville: - entrance.access_rule = lambda state: woodcutting_rule_d3(state) \ - and self.options.max_woodcutting_level >= 27 - if outbound_region_name == RegionNames.Wilderness: - entrance.access_rule = lambda state: woodcutting_rule_all(state) \ - and self.options.max_woodcutting_level >= 42 - if region_row.name == RegionNames.Barbarian_Village: - if outbound_region_name == RegionNames.Canoe_Tree: - entrance.access_rule = \ - lambda state: (state.can_reach_region(RegionNames.Lumbridge, self.player) - and woodcutting_rule_d2(state) and self.options.max_woodcutting_level >= 27) or \ - (state.can_reach_region(RegionNames.South_Of_Varrock) - and woodcutting_rule_d1(state) and self.options.max_woodcutting_level >= 12) or \ - (state.can_reach_region(RegionNames.Edgeville) - and woodcutting_rule_d1(state) and self.options.max_woodcutting_level >= 12) or \ - (state.can_reach_region(RegionNames.Wilderness) - and woodcutting_rule_d2(state) and self.options.max_woodcutting_level >= 27) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Lumbridge, self.player), entrance) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.South_Of_Varrock, self.player), entrance) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Edgeville, self.player), entrance) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Wilderness, self.player), entrance) - # Access to other chunks based on woodcutting settings - if outbound_region_name == RegionNames.Lumbridge: - entrance.access_rule = lambda state: woodcutting_rule_d2(state) \ - and self.options.max_woodcutting_level >= 27 - if outbound_region_name == RegionNames.South_Of_Varrock: - entrance.access_rule = lambda state: woodcutting_rule_d1(state) \ - and self.options.max_woodcutting_level >= 12 - # Edgeville does not need to be checked, because it's already adjacent - if outbound_region_name == RegionNames.Wilderness: - entrance.access_rule = lambda state: woodcutting_rule_d3(state) \ - and self.options.max_woodcutting_level >= 42 - if region_row.name == RegionNames.Edgeville: - if outbound_region_name == RegionNames.Canoe_Tree: - entrance.access_rule = \ - lambda state: (state.can_reach_region(RegionNames.Lumbridge, self.player) - and woodcutting_rule_d3(state) and self.options.max_woodcutting_level >= 42) or \ - (state.can_reach_region(RegionNames.South_Of_Varrock) - and woodcutting_rule_d2(state) and self.options.max_woodcutting_level >= 27) or \ - (state.can_reach_region(RegionNames.Barbarian_Village) - and woodcutting_rule_d1(state) and self.options.max_woodcutting_level >= 12) or \ - (state.can_reach_region(RegionNames.Wilderness) - and woodcutting_rule_d1(state) and self.options.max_woodcutting_level >= 12) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Lumbridge, self.player), entrance) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.South_Of_Varrock, self.player), entrance) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Barbarian_Village, self.player), entrance) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Wilderness, self.player), entrance) - # Access to other chunks based on woodcutting settings - if outbound_region_name == RegionNames.Lumbridge: - entrance.access_rule = lambda state: woodcutting_rule_d3(state) \ - and self.options.max_woodcutting_level >= 42 - if outbound_region_name == RegionNames.South_Of_Varrock: - entrance.access_rule = lambda state: woodcutting_rule_d2(state) \ - and self.options.max_woodcutting_level >= 27 - # Barbarian Village does not need to be checked, because it's already adjacent - # Wilderness does not need to be checked, because it's already adjacent - if region_row.name == RegionNames.Wilderness: - if outbound_region_name == RegionNames.Canoe_Tree: - entrance.access_rule = \ - lambda state: (state.can_reach_region(RegionNames.Lumbridge, self.player) - and woodcutting_rule_all(state) and self.options.max_woodcutting_level >= 57) or \ - (state.can_reach_region(RegionNames.South_Of_Varrock) - and woodcutting_rule_d3(state) and self.options.max_woodcutting_level >= 42) or \ - (state.can_reach_region(RegionNames.Barbarian_Village) - and woodcutting_rule_d2(state) and self.options.max_woodcutting_level >= 27) or \ - (state.can_reach_region(RegionNames.Edgeville) - and woodcutting_rule_d1(state) and self.options.max_woodcutting_level >= 12) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Lumbridge, self.player), entrance) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.South_Of_Varrock, self.player), entrance) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Barbarian_Village, self.player), entrance) - self.multiworld.register_indirect_condition( - self.multiworld.get_region(RegionNames.Edgeville, self.player), entrance) - # Access to other chunks based on woodcutting settings - if outbound_region_name == RegionNames.Lumbridge: - entrance.access_rule = lambda state: woodcutting_rule_all(state) \ - and self.options.max_woodcutting_level >= 57 - if outbound_region_name == RegionNames.South_Of_Varrock: - entrance.access_rule = lambda state: woodcutting_rule_d3(state) \ - and self.options.max_woodcutting_level >= 42 - if outbound_region_name == RegionNames.Barbarian_Village: - entrance.access_rule = lambda state: woodcutting_rule_d2(state) \ - and self.options.max_woodcutting_level >= 27 - # Edgeville does not need to be checked, because it's already adjacent + def task_within_skill_levels(self, skills_required): + # Loop through each required skill. If any of its requirements are out of the defined limit, return false + for skill in skills_required: + max_level_for_skill = getattr(self.options, f"max_{skill.skill.lower()}_level") + if skill.level > max_level_for_skill: + return False + return True def roll_locations(self): - locations_required = 0 generation_is_fake = hasattr(self.multiworld, "generation_is_fake") # UT specific override + locations_required = 0 for item_row in item_rows: locations_required += item_row.amount locations_added = 1 # At this point we've already added the starting area, so we start at 1 instead of 0 - # Quests are always added + # Quests are always added first, before anything else is rolled for i, location_row in enumerate(location_rows): if location_row.category in {"quest", "points", "goal"}: - self.create_and_add_location(i) - if location_row.category == "quest": - locations_added += 1 + if self.task_within_skill_levels(location_row.skills): + self.create_and_add_location(i) + if location_row.category == "quest": + locations_added += 1 # Build up the weighted Task Pool rnd = self.random @@ -412,10 +229,9 @@ def roll_locations(self): task_types = ["prayer", "magic", "runecraft", "mining", "crafting", "smithing", "fishing", "cooking", "firemaking", "woodcutting", "combat"] for task_type in task_types: - max_level_for_task_type = getattr(self.options, f"max_{task_type}_level") max_amount_for_task_type = getattr(self.options, f"max_{task_type}_tasks") tasks_for_this_type = [task for task in self.locations_by_category[task_type] - if task.skills[0].level <= max_level_for_task_type] + if self.task_within_skill_levels(task.skills)] if not self.options.progressive_tasks: rnd.shuffle(tasks_for_this_type) else: @@ -464,6 +280,7 @@ def roll_locations(self): self.add_location(task) locations_added += 1 + def add_location(self, location): index = [i for i in range(len(location_rows)) if location_rows[i].name == location.name][0] self.create_and_add_location(index) @@ -482,11 +299,15 @@ def get_filler_item_name(self) -> str: def create_and_add_location(self, row_index) -> None: location_row = location_rows[row_index] - # print(f"Adding task {location_row.name}") + + # Quest Points are handled differently now, but in case this gets fed an older version of the data sheet, + # the points might still be listed in a different row + if location_row.category == "points": + return # Create Location location_id = self.base_id + row_index - if location_row.category == "points" or location_row.category == "goal": + if location_row.category == "goal": location_id = None location = OSRSLocation(self.player, location_row.name, location_id) self.location_name_to_data[location_row.name] = location @@ -498,6 +319,14 @@ def create_and_add_location(self, row_index) -> None: location.parent_region = region region.locations.append(location) + # If it's a quest, generate a "Points" location we'll add an event to + if location_row.category == "quest": + points_name = location_row.name.replace("Quest:", "Points:") + points_location = OSRSLocation(self.player, points_name) + self.location_name_to_data[points_name] = points_location + points_location.parent_region = region + region.locations.append(points_location) + def set_rules(self) -> None: """ called to set access and item rules on locations and entrances. @@ -508,18 +337,26 @@ def set_rules(self) -> None: "Witchs_Potion", "Knights_Sword", "Goblin_Diplomacy", "Pirates_Treasure", "Rune_Mysteries", "Misthalin_Mystery", "Corsair_Curse", "X_Marks_the_Spot", "Below_Ice_Mountain"] - for qp_attr_name in quest_attr_names: - loc_name = getattr(LocationNames, f"QP_{qp_attr_name}") - item_name = getattr(ItemNames, f"QP_{qp_attr_name}") - self.multiworld.get_location(loc_name, self.player) \ - .place_locked_item(self.create_event(item_name)) for quest_attr_name in quest_attr_names: qp_loc_name = getattr(LocationNames, f"QP_{quest_attr_name}") + qp_loc = self.location_name_to_data.get(qp_loc_name) + q_loc_name = getattr(LocationNames, f"Q_{quest_attr_name}") - add_rule(self.multiworld.get_location(qp_loc_name, self.player), lambda state, q_loc_name=q_loc_name: ( - self.multiworld.get_location(q_loc_name, self.player).can_reach(state) - )) + q_loc = self.location_name_to_data.get(q_loc_name) + + # Checks to make sure the task is actually in the list before trying to create its rules + if qp_loc and q_loc: + # Create the QP Event Item + item_name = getattr(ItemNames, f"QP_{quest_attr_name}") + qp_loc.place_locked_item(self.create_event(item_name)) + + # If a quest is excluded, don't actually consider it for quest point progression + if q_loc_name not in self.options.exclude_locations: + self.available_QP_locations.append(item_name) + + # Set the access rule for the QP Location + add_rule(qp_loc, lambda state, loc=q_loc: (loc.can_reach(state))) # place "Victory" at "Dragon Slayer" and set collection as win condition self.multiworld.get_location(LocationNames.Q_Dragon_Slayer, self.player) \ @@ -535,7 +372,7 @@ def set_rules(self) -> None: lambda state, region_required=region_required: state.can_reach(region_required, "Region", self.player)) for skill_req in location_row.skills: - add_rule(location, self.get_skill_rule(skill_req.skill, skill_req.level)) + add_rule(location, get_skill_rule(skill_req.skill, skill_req.level, self.player, self.options)) for item_req in location_row.items: add_rule(location, lambda state, item_req=item_req: state.has(item_req, self.player)) if location_row.qp: @@ -560,124 +397,8 @@ def create_event(self, event: str): def quest_points(self, state): qp = 0 - for qp_event in QP_Items: + for qp_event in self.available_QP_locations: if state.has(qp_event, self.player): qp += int(qp_event[0]) return qp - """ - Ensures a target level can be reached with available resources - """ - - def get_skill_rule(self, skill, level) -> CollectionRule: - if skill.lower() == "fishing": - if self.options.brutal_grinds or level < 5: - return lambda state: state.can_reach(RegionNames.Shrimp, "Region", self.player) - if level < 20: - return lambda state: state.can_reach(RegionNames.Shrimp, "Region", self.player) and \ - state.can_reach(RegionNames.Port_Sarim, "Region", self.player) - else: - return lambda state: state.can_reach(RegionNames.Shrimp, "Region", self.player) and \ - state.can_reach(RegionNames.Port_Sarim, "Region", self.player) and \ - state.can_reach(RegionNames.Fly_Fish, "Region", self.player) - if skill.lower() == "mining": - if self.options.brutal_grinds or level < 15: - return lambda state: state.can_reach(RegionNames.Bronze_Ores, "Region", self.player) or \ - state.can_reach(RegionNames.Clay_Rock, "Region", self.player) - else: - # Iron is the best way to train all the way to 99, so having access to iron is all you need to check for - return lambda state: (state.can_reach(RegionNames.Bronze_Ores, "Region", self.player) or - state.can_reach(RegionNames.Clay_Rock, "Region", self.player)) and \ - state.can_reach(RegionNames.Iron_Rock, "Region", self.player) - if skill.lower() == "woodcutting": - if self.options.brutal_grinds or level < 15: - # I've checked. There is not a single chunk in the f2p that does not have at least one normal tree. - # Even the desert. - return lambda state: True - if level < 30: - return lambda state: state.can_reach(RegionNames.Oak_Tree, "Region", self.player) - else: - return lambda state: state.can_reach(RegionNames.Oak_Tree, "Region", self.player) and \ - state.can_reach(RegionNames.Willow_Tree, "Region", self.player) - if skill.lower() == "smithing": - if self.options.brutal_grinds: - return lambda state: state.can_reach(RegionNames.Bronze_Ores, "Region", self.player) and \ - state.can_reach(RegionNames.Furnace, "Region", self.player) - if level < 15: - # Lumbridge has a special bronze-only anvil. This is the only anvil of its type so it's not included - # in the "Anvil" resource region. We still need to check for it though. - return lambda state: state.can_reach(RegionNames.Bronze_Ores, "Region", self.player) and \ - state.can_reach(RegionNames.Furnace, "Region", self.player) and \ - (state.can_reach(RegionNames.Anvil, "Region", self.player) or - state.can_reach(RegionNames.Lumbridge, "Region", self.player)) - if level < 30: - # For levels between 15 and 30, the lumbridge anvil won't cut it. Only a real one will do - return lambda state: state.can_reach(RegionNames.Bronze_Ores, "Region", self.player) and \ - state.can_reach(RegionNames.Iron_Rock, "Region", self.player) and \ - state.can_reach(RegionNames.Furnace, "Region", self.player) and \ - state.can_reach(RegionNames.Anvil, "Region", self.player) - else: - return lambda state: state.can_reach(RegionNames.Bronze_Ores, "Region", self.player) and \ - state.can_reach(RegionNames.Iron_Rock, "Region", self.player) and \ - state.can_reach(RegionNames.Coal_Rock, "Region", self.player) and \ - state.can_reach(RegionNames.Furnace, "Region", self.player) and \ - state.can_reach(RegionNames.Anvil, "Region", self.player) - if skill.lower() == "crafting": - # Crafting is really complex. Need a lot of sub-rules to make this even remotely readable - def can_spin(state): - return state.can_reach(RegionNames.Sheep, "Region", self.player) and \ - state.can_reach(RegionNames.Spinning_Wheel, "Region", self.player) - - def can_pot(state): - return state.can_reach(RegionNames.Clay_Rock, "Region", self.player) and \ - state.can_reach(RegionNames.Barbarian_Village, "Region", self.player) - - def can_tan(state): - return state.can_reach(RegionNames.Milk, "Region", self.player) and \ - state.can_reach(RegionNames.Al_Kharid, "Region", self.player) - - def mould_access(state): - return state.can_reach(RegionNames.Al_Kharid, "Region", self.player) or \ - state.can_reach(RegionNames.Rimmington, "Region", self.player) - - def can_silver(state): - - return state.can_reach(RegionNames.Silver_Rock, "Region", self.player) and \ - state.can_reach(RegionNames.Furnace, "Region", self.player) and mould_access(state) - - def can_gold(state): - return state.can_reach(RegionNames.Gold_Rock, "Region", self.player) and \ - state.can_reach(RegionNames.Furnace, "Region", self.player) and mould_access(state) - - if self.options.brutal_grinds or level < 5: - return lambda state: can_spin(state) or can_pot(state) or can_tan(state) - - can_smelt_gold = self.get_skill_rule("smithing", 40) - can_smelt_silver = self.get_skill_rule("smithing", 20) - if level < 16: - return lambda state: can_pot(state) or can_tan(state) or (can_gold(state) and can_smelt_gold(state)) - else: - return lambda state: can_tan(state) or (can_silver(state) and can_smelt_silver(state)) or \ - (can_gold(state) and can_smelt_gold(state)) - if skill.lower() == "cooking": - if self.options.brutal_grinds or level < 15: - return lambda state: state.can_reach(RegionNames.Milk, "Region", self.player) or \ - state.can_reach(RegionNames.Egg, "Region", self.player) or \ - state.can_reach(RegionNames.Shrimp, "Region", self.player) or \ - (state.can_reach(RegionNames.Wheat, "Region", self.player) and - state.can_reach(RegionNames.Windmill, "Region", self.player)) - else: - can_catch_fly_fish = self.get_skill_rule("fishing", 20) - return lambda state: state.can_reach(RegionNames.Fly_Fish, "Region", self.player) and \ - can_catch_fly_fish(state) and \ - (state.can_reach(RegionNames.Milk, "Region", self.player) or - state.can_reach(RegionNames.Egg, "Region", self.player) or - state.can_reach(RegionNames.Shrimp, "Region", self.player) or - (state.can_reach(RegionNames.Wheat, "Region", self.player) and - state.can_reach(RegionNames.Windmill, "Region", self.player))) - if skill.lower() == "runecraft": - return lambda state: state.has(ItemNames.QP_Rune_Mysteries, self.player) - if skill.lower() == "magic": - return lambda state: state.can_reach(RegionNames.Mind_Runes, "Region", self.player) - - return lambda state: True diff --git a/worlds/overcooked2/Logic.py b/worlds/overcooked2/Logic.py index 20111aa01d66..cf268509493c 100644 --- a/worlds/overcooked2/Logic.py +++ b/worlds/overcooked2/Logic.py @@ -35,17 +35,13 @@ def has_requirements_for_level_star( state: CollectionState, level: Overcooked2GenericLevel, stars: int, player: int) -> bool: assert 0 <= stars <= 3 - # First ensure that previous stars are obtainable - if stars > 1: - if not has_requirements_for_level_star(state, level, stars-1, player): - return False - - # Second, ensure that global requirements are met + # First, ensure that global requirements for this many stars are met. + # Lower numbers of stars are implied meetable if this level is meetable. if not meets_requirements(state, "*", stars, player): return False - # Finally, return success only if this level's requirements are met - return meets_requirements(state, level.shortname, stars, player) + # Then return success only if this level's requirements are met at all stars up through this one + return all(meets_requirements(state, level.shortname, s, player) for s in range(1, stars + 1)) def meets_requirements(state: CollectionState, name: str, stars: int, player: int): @@ -421,6 +417,7 @@ def can_reach_kevin_eight_island(state: CollectionState, player: int, allow_tric }, ), ( # 3-star + # Necessarily implies 2-star [ # Exclusive "Progressive Dash", "Spare Plate", diff --git a/worlds/pokemon_emerald/CHANGELOG.md b/worlds/pokemon_emerald/CHANGELOG.md index 2d7db0dad4d5..0dd874b25029 100644 --- a/worlds/pokemon_emerald/CHANGELOG.md +++ b/worlds/pokemon_emerald/CHANGELOG.md @@ -11,6 +11,8 @@ - Fixed a rare issue where receiving a wonder trade could partially corrupt the save data, preventing the player from receiving new items. - Fixed the client spamming the "goal complete" status update to the server instead of sending it once. +- Fixed the `trainer_party_blacklist` option checking for the existence of the "_Legendaries" shortcut in the +`starter_blacklist` option instead of itself. - Fixed a logic issue where the "Mauville City - Coin Case from Lady in House" location only required a Harbor Mail if the player randomized NPC gifts. - The Dig tutor has its compatibility percentage raised to 50% if the player's TM/tutor compatibility is set lower. @@ -18,6 +20,8 @@ the player randomized NPC gifts. with another NPC was moved to an unoccupied space. - Fixed a problem where the client would crash on certain operating systems while using certain python versions if the player tried to wonder trade. +- Prevent the poke flute sound from replacing the evolution fanfare, which would cause the game to wait in silence for +a long time during the evolution scene. # 2.2.0 diff --git a/worlds/pokemon_emerald/__init__.py b/worlds/pokemon_emerald/__init__.py index d281dde23cb0..040b89b1af51 100644 --- a/worlds/pokemon_emerald/__init__.py +++ b/worlds/pokemon_emerald/__init__.py @@ -15,11 +15,11 @@ from worlds.AutoWorld import WebWorld, World from .client import PokemonEmeraldClient # Unused, but required to register with BizHawkClient -from .data import LEGENDARY_POKEMON, MapData, SpeciesData, TrainerData, data as emerald_data -from .items import (ITEM_GROUPS, PokemonEmeraldItem, create_item_label_to_code_map, get_item_classification, - offset_item_value) -from .locations import (LOCATION_GROUPS, PokemonEmeraldLocation, create_location_label_to_id_map, - create_locations_with_tags, set_free_fly, set_legendary_cave_entrances) +from .data import LEGENDARY_POKEMON, MapData, SpeciesData, TrainerData, LocationCategory, data as emerald_data +from .groups import ITEM_GROUPS, LOCATION_GROUPS +from .items import PokemonEmeraldItem, create_item_label_to_code_map, get_item_classification, offset_item_value +from .locations import (PokemonEmeraldLocation, create_location_label_to_id_map, create_locations_by_category, + set_free_fly, set_legendary_cave_entrances) from .opponents import randomize_opponent_parties from .options import (Goal, DarkCavesRequireFlash, HmRequirements, ItemPoolType, PokemonEmeraldOptions, RandomizeWildPokemon, RandomizeBadges, RandomizeHms, NormanRequirement) @@ -133,9 +133,10 @@ def __init__(self, multiworld, player): @classmethod def stage_assert_generate(cls, multiworld: MultiWorld) -> None: - from .sanity_check import validate_regions + from .sanity_check import validate_regions, validate_group_maps assert validate_regions() + assert validate_group_maps() def get_filler_item_name(self) -> str: return "Great Ball" @@ -177,7 +178,7 @@ def generate_early(self) -> None: for species_name in self.options.trainer_party_blacklist.value if species_name != "_Legendaries" } - if "_Legendaries" in self.options.starter_blacklist.value: + if "_Legendaries" in self.options.trainer_party_blacklist.value: self.blacklisted_opponent_pokemon |= LEGENDARY_POKEMON # In race mode we don't patch any item location information into the ROM @@ -237,24 +238,32 @@ def generate_early(self) -> None: def create_regions(self) -> None: from .regions import create_regions - regions = create_regions(self) - - tags = {"Badge", "HM", "KeyItem", "Rod", "Bike", "EventTicket"} # Tags with progression items always included + all_regions = create_regions(self) + + # Categories with progression items always included + categories = { + LocationCategory.BADGE, + LocationCategory.HM, + LocationCategory.KEY, + LocationCategory.ROD, + LocationCategory.BIKE, + LocationCategory.TICKET + } if self.options.overworld_items: - tags.add("OverworldItem") + categories.add(LocationCategory.OVERWORLD_ITEM) if self.options.hidden_items: - tags.add("HiddenItem") + categories.add(LocationCategory.HIDDEN_ITEM) if self.options.npc_gifts: - tags.add("NpcGift") + categories.add(LocationCategory.GIFT) if self.options.berry_trees: - tags.add("BerryTree") + categories.add(LocationCategory.BERRY_TREE) if self.options.dexsanity: - tags.add("Pokedex") + categories.add(LocationCategory.POKEDEX) if self.options.trainersanity: - tags.add("Trainer") - create_locations_with_tags(self, regions, tags) + categories.add(LocationCategory.TRAINER) + create_locations_by_category(self, all_regions, categories) - self.multiworld.regions.extend(regions.values()) + self.multiworld.regions.extend(all_regions.values()) # Exclude locations which are always locked behind the player's goal def exclude_locations(location_names: List[str]): @@ -325,21 +334,21 @@ def create_items(self) -> None: # Filter progression items which shouldn't be shuffled into the itempool. # Their locations will still exist, but event items will be placed and # locked at their vanilla locations instead. - filter_tags = set() + filter_categories = set() if not self.options.key_items: - filter_tags.add("KeyItem") + filter_categories.add(LocationCategory.KEY) if not self.options.rods: - filter_tags.add("Rod") + filter_categories.add(LocationCategory.ROD) if not self.options.bikes: - filter_tags.add("Bike") + filter_categories.add(LocationCategory.BIKE) if not self.options.event_tickets: - filter_tags.add("EventTicket") + filter_categories.add(LocationCategory.TICKET) if self.options.badges in {RandomizeBadges.option_vanilla, RandomizeBadges.option_shuffle}: - filter_tags.add("Badge") + filter_categories.add(LocationCategory.BADGE) if self.options.hms in {RandomizeHms.option_vanilla, RandomizeHms.option_shuffle}: - filter_tags.add("HM") + filter_categories.add(LocationCategory.HM) # If Badges and HMs are set to the `shuffle` option, don't add them to # the normal item pool, but do create their items and save them and @@ -347,17 +356,17 @@ def create_items(self) -> None: if self.options.badges == RandomizeBadges.option_shuffle: self.badge_shuffle_info = [ (location, self.create_item_by_code(location.default_item_code)) - for location in [l for l in item_locations if "Badge" in l.tags] + for location in [l for l in item_locations if emerald_data.locations[l.key].category == LocationCategory.BADGE] ] if self.options.hms == RandomizeHms.option_shuffle: self.hm_shuffle_info = [ (location, self.create_item_by_code(location.default_item_code)) - for location in [l for l in item_locations if "HM" in l.tags] + for location in [l for l in item_locations if emerald_data.locations[l.key].category == LocationCategory.HM] ] # Filter down locations to actual items that will be filled and create # the itempool. - item_locations = [location for location in item_locations if len(filter_tags & location.tags) == 0] + item_locations = [location for location in item_locations if emerald_data.locations[location.key].category not in filter_categories] default_itempool = [self.create_item_by_code(location.default_item_code) for location in item_locations] # Take the itempool as-is @@ -366,7 +375,8 @@ def create_items(self) -> None: # Recreate the itempool from random items elif self.options.item_pool_type in (ItemPoolType.option_diverse, ItemPoolType.option_diverse_balanced): - item_categories = ["Ball", "Heal", "Candy", "Vitamin", "EvoStone", "Money", "TM", "Held", "Misc", "Berry"] + item_categories = ["Ball", "Healing", "Rare Candy", "Vitamin", "Evolution Stone", + "Money", "TM", "Held", "Misc", "Berry"] # Count occurrences of types of vanilla items in pool item_category_counter = Counter() @@ -436,25 +446,26 @@ def generate_basic(self) -> None: # Key items which are considered in access rules but not randomized are converted to events and placed # in their vanilla locations so that the player can have them in their inventory for logic. - def convert_unrandomized_items_to_events(tag: str) -> None: + def convert_unrandomized_items_to_events(category: LocationCategory) -> None: for location in self.multiworld.get_locations(self.player): - if location.tags is not None and tag in location.tags: + assert isinstance(location, PokemonEmeraldLocation) + if location.key is not None and emerald_data.locations[location.key].category == category: location.place_locked_item(self.create_event(self.item_id_to_name[location.default_item_code])) location.progress_type = LocationProgressType.DEFAULT location.address = None if self.options.badges == RandomizeBadges.option_vanilla: - convert_unrandomized_items_to_events("Badge") + convert_unrandomized_items_to_events(LocationCategory.BADGE) if self.options.hms == RandomizeHms.option_vanilla: - convert_unrandomized_items_to_events("HM") + convert_unrandomized_items_to_events(LocationCategory.HM) if not self.options.rods: - convert_unrandomized_items_to_events("Rod") + convert_unrandomized_items_to_events(LocationCategory.ROD) if not self.options.bikes: - convert_unrandomized_items_to_events("Bike") + convert_unrandomized_items_to_events(LocationCategory.BIKE) if not self.options.event_tickets: - convert_unrandomized_items_to_events("EventTicket") + convert_unrandomized_items_to_events(LocationCategory.TICKET) if not self.options.key_items: - convert_unrandomized_items_to_events("KeyItem") + convert_unrandomized_items_to_events(LocationCategory.KEY) def pre_fill(self) -> None: # Badges and HMs that are set to shuffle need to be placed at @@ -618,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: @@ -644,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/client.py b/worlds/pokemon_emerald/client.py index 4405b34074e0..5add7b3fca40 100644 --- a/worlds/pokemon_emerald/client.py +++ b/worlds/pokemon_emerald/client.py @@ -117,6 +117,11 @@ DEFEATED_LEGENDARY_FLAG_MAP = {data.constants[f"FLAG_DEFEATED_{name}"]: name for name in LEGENDARY_NAMES.values()} CAUGHT_LEGENDARY_FLAG_MAP = {data.constants[f"FLAG_CAUGHT_{name}"]: name for name in LEGENDARY_NAMES.values()} +SHOAL_CAVE_MAPS = tuple(data.constants[map_name] for map_name in [ + "MAP_SHOAL_CAVE_LOW_TIDE_ENTRANCE_ROOM", + "MAP_SHOAL_CAVE_LOW_TIDE_INNER_ROOM", +]) + class PokemonEmeraldClient(BizHawkClient): game = "Pokemon Emerald" @@ -414,13 +419,17 @@ async def handle_tracker_info(self, ctx: "BizHawkClientContext", guards: Dict[st read_result = await bizhawk.guarded_read( ctx.bizhawk_ctx, - [(sb1_address + 0x4, 2, "System Bus")], - [guards["SAVE BLOCK 1"]] + [ + (sb1_address + 0x4, 2, "System Bus"), # Current map + (sb1_address + 0x1450 + (data.constants["FLAG_SYS_SHOAL_TIDE"] // 8), 1, "System Bus"), + ], + [guards["IN OVERWORLD"], guards["SAVE BLOCK 1"]] ) if read_result is None: # Save block moved return current_map = int.from_bytes(read_result[0], "big") + shoal_cave = int(read_result[1][0] & (1 << (data.constants["FLAG_SYS_SHOAL_TIDE"] % 8)) > 0) if current_map != self.current_map: self.current_map = current_map await ctx.send_msgs([{ @@ -429,6 +438,7 @@ async def handle_tracker_info(self, ctx: "BizHawkClientContext", guards: Dict[st "data": { "type": "MapUpdate", "mapId": current_map, + **({"tide": shoal_cave} if current_map in SHOAL_CAVE_MAPS else {}), }, }]) diff --git a/worlds/pokemon_emerald/data.py b/worlds/pokemon_emerald/data.py index 432d59387391..d93ff926229b 100644 --- a/worlds/pokemon_emerald/data.py +++ b/worlds/pokemon_emerald/data.py @@ -117,6 +117,21 @@ class ItemData(NamedTuple): tags: FrozenSet[str] +class LocationCategory(IntEnum): + BADGE = 0 + HM = 1 + KEY = 2 + ROD = 3 + BIKE = 4 + TICKET = 5 + OVERWORLD_ITEM = 6 + HIDDEN_ITEM = 7 + GIFT = 8 + BERRY_TREE = 9 + TRAINER = 10 + POKEDEX = 11 + + class LocationData(NamedTuple): name: str label: str @@ -124,6 +139,7 @@ class LocationData(NamedTuple): default_item: int address: Union[int, List[int]] flag: int + category: LocationCategory tags: FrozenSet[str] @@ -135,6 +151,7 @@ class EncounterTableData(NamedTuple): @dataclass class MapData: name: str + label: str header_address: int land_encounters: Optional[EncounterTableData] water_encounters: Optional[EncounterTableData] @@ -341,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"] @@ -350,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 @@ -373,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, @@ -431,6 +478,7 @@ def _init() -> None: location_json["default_item"], [location_json["address"]] + [j["address"] for j in alternate_rival_jsons], location_json["flag"], + LocationCategory[location_attributes_json[location_name]["category"]], frozenset(location_attributes_json[location_name]["tags"]) ) else: @@ -441,6 +489,7 @@ def _init() -> None: location_json["default_item"], location_json["address"], location_json["flag"], + LocationCategory[location_attributes_json[location_name]["category"]], frozenset(location_attributes_json[location_name]["tags"]) ) new_region.locations.append(location_name) @@ -948,6 +997,7 @@ def _init() -> None: evo_stage_to_ball_map[evo_stage], data.locations[dex_location_name].address, data.locations[dex_location_name].flag, + data.locations[dex_location_name].category, data.locations[dex_location_name].tags ) diff --git a/worlds/pokemon_emerald/data/items.json b/worlds/pokemon_emerald/data/items.json index 139d75aad0ab..4c09d215cf3c 100644 --- a/worlds/pokemon_emerald/data/items.json +++ b/worlds/pokemon_emerald/data/items.json @@ -52,49 +52,49 @@ "ITEM_HM_CUT": { "label": "HM01 Cut", "classification": "PROGRESSION", - "tags": ["HM", "Unique"], + "tags": ["HM", "HM01", "Unique"], "modern_id": 420 }, "ITEM_HM_FLY": { "label": "HM02 Fly", "classification": "PROGRESSION", - "tags": ["HM", "Unique"], + "tags": ["HM", "HM02", "Unique"], "modern_id": 421 }, "ITEM_HM_SURF": { "label": "HM03 Surf", "classification": "PROGRESSION", - "tags": ["HM", "Unique"], + "tags": ["HM", "HM03", "Unique"], "modern_id": 422 }, "ITEM_HM_STRENGTH": { "label": "HM04 Strength", "classification": "PROGRESSION", - "tags": ["HM", "Unique"], + "tags": ["HM", "HM04", "Unique"], "modern_id": 423 }, "ITEM_HM_FLASH": { "label": "HM05 Flash", "classification": "PROGRESSION", - "tags": ["HM", "Unique"], + "tags": ["HM", "HM05", "Unique"], "modern_id": 424 }, "ITEM_HM_ROCK_SMASH": { "label": "HM06 Rock Smash", "classification": "PROGRESSION", - "tags": ["HM", "Unique"], + "tags": ["HM", "HM06", "Unique"], "modern_id": 425 }, "ITEM_HM_WATERFALL": { "label": "HM07 Waterfall", "classification": "PROGRESSION", - "tags": ["HM", "Unique"], + "tags": ["HM", "HM07", "Unique"], "modern_id": 737 }, "ITEM_HM_DIVE": { "label": "HM08 Dive", "classification": "PROGRESSION", - "tags": ["HM", "Unique"], + "tags": ["HM", "HM08", "Unique"], "modern_id": null }, @@ -375,169 +375,169 @@ "ITEM_POTION": { "label": "Potion", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 17 }, "ITEM_ANTIDOTE": { "label": "Antidote", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 18 }, "ITEM_BURN_HEAL": { "label": "Burn Heal", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 19 }, "ITEM_ICE_HEAL": { "label": "Ice Heal", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 20 }, "ITEM_AWAKENING": { "label": "Awakening", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 21 }, "ITEM_PARALYZE_HEAL": { "label": "Paralyze Heal", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 22 }, "ITEM_FULL_RESTORE": { "label": "Full Restore", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 23 }, "ITEM_MAX_POTION": { "label": "Max Potion", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 24 }, "ITEM_HYPER_POTION": { "label": "Hyper Potion", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 25 }, "ITEM_SUPER_POTION": { "label": "Super Potion", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 26 }, "ITEM_FULL_HEAL": { "label": "Full Heal", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 27 }, "ITEM_REVIVE": { "label": "Revive", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 28 }, "ITEM_MAX_REVIVE": { "label": "Max Revive", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 29 }, "ITEM_FRESH_WATER": { "label": "Fresh Water", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 30 }, "ITEM_SODA_POP": { "label": "Soda Pop", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 31 }, "ITEM_LEMONADE": { "label": "Lemonade", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 32 }, "ITEM_MOOMOO_MILK": { "label": "Moomoo Milk", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 33 }, "ITEM_ENERGY_POWDER": { "label": "Energy Powder", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 34 }, "ITEM_ENERGY_ROOT": { "label": "Energy Root", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 35 }, "ITEM_HEAL_POWDER": { "label": "Heal Powder", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 36 }, "ITEM_REVIVAL_HERB": { "label": "Revival Herb", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 37 }, "ITEM_ETHER": { "label": "Ether", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 38 }, "ITEM_MAX_ETHER": { "label": "Max Ether", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 39 }, "ITEM_ELIXIR": { "label": "Elixir", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 40 }, "ITEM_MAX_ELIXIR": { "label": "Max Elixir", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 41 }, "ITEM_LAVA_COOKIE": { "label": "Lava Cookie", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 42 }, "ITEM_BERRY_JUICE": { "label": "Berry Juice", "classification": "FILLER", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 43 }, "ITEM_SACRED_ASH": { "label": "Sacred Ash", "classification": "USEFUL", - "tags": ["Heal"], + "tags": ["Healing"], "modern_id": 44 }, @@ -736,19 +736,19 @@ }, "ITEM_BLACK_FLUTE": { "label": "Black Flute", - "classification": "FILLER", + "classification": "USEFUL", "tags": ["Misc"], "modern_id": 68 }, "ITEM_WHITE_FLUTE": { "label": "White Flute", - "classification": "FILLER", + "classification": "USEFUL", "tags": ["Misc"], "modern_id": 69 }, "ITEM_HEART_SCALE": { "label": "Heart Scale", - "classification": "FILLER", + "classification": "USEFUL", "tags": ["Misc"], "modern_id": 93 }, @@ -757,37 +757,37 @@ "ITEM_SUN_STONE": { "label": "Sun Stone", "classification": "USEFUL", - "tags": ["EvoStone"], + "tags": ["Evolution Stone"], "modern_id": 80 }, "ITEM_MOON_STONE": { "label": "Moon Stone", "classification": "USEFUL", - "tags": ["EvoStone"], + "tags": ["Evolution Stone"], "modern_id": 81 }, "ITEM_FIRE_STONE": { "label": "Fire Stone", "classification": "USEFUL", - "tags": ["EvoStone"], + "tags": ["Evolution Stone"], "modern_id": 82 }, "ITEM_THUNDER_STONE": { "label": "Thunder Stone", "classification": "USEFUL", - "tags": ["EvoStone"], + "tags": ["Evolution Stone"], "modern_id": 83 }, "ITEM_WATER_STONE": { "label": "Water Stone", "classification": "USEFUL", - "tags": ["EvoStone"], + "tags": ["Evolution Stone"], "modern_id": 84 }, "ITEM_LEAF_STONE": { "label": "Leaf Stone", "classification": "USEFUL", - "tags": ["EvoStone"], + "tags": ["Evolution Stone"], "modern_id": 85 }, @@ -1215,7 +1215,7 @@ "ITEM_KINGS_ROCK": { "label": "King's Rock", "classification": "USEFUL", - "tags": ["Held"], + "tags": ["Held", "Evolution Stone"], "modern_id": 221 }, "ITEM_SILVER_POWDER": { @@ -1245,13 +1245,13 @@ "ITEM_DEEP_SEA_TOOTH": { "label": "Deep Sea Tooth", "classification": "USEFUL", - "tags": ["Held"], + "tags": ["Held", "Evolution Stone"], "modern_id": 226 }, "ITEM_DEEP_SEA_SCALE": { "label": "Deep Sea Scale", "classification": "USEFUL", - "tags": ["Held"], + "tags": ["Held", "Evolution Stone"], "modern_id": 227 }, "ITEM_SMOKE_BALL": { @@ -1287,7 +1287,7 @@ "ITEM_METAL_COAT": { "label": "Metal Coat", "classification": "USEFUL", - "tags": ["Held"], + "tags": ["Held", "Evolution Stone"], "modern_id": 233 }, "ITEM_LEFTOVERS": { @@ -1299,7 +1299,7 @@ "ITEM_DRAGON_SCALE": { "label": "Dragon Scale", "classification": "USEFUL", - "tags": ["Held"], + "tags": ["Held", "Evolution Stone"], "modern_id": 235 }, "ITEM_LIGHT_BALL": { @@ -1401,7 +1401,7 @@ "ITEM_UP_GRADE": { "label": "Up-Grade", "classification": "USEFUL", - "tags": ["Held"], + "tags": ["Held", "Evolution Stone"], "modern_id": 252 }, "ITEM_SHELL_BELL": { diff --git a/worlds/pokemon_emerald/data/locations.json b/worlds/pokemon_emerald/data/locations.json index 55ef15d871bb..63f42340cce4 100644 --- a/worlds/pokemon_emerald/data/locations.json +++ b/worlds/pokemon_emerald/data/locations.json @@ -1,5364 +1,6702 @@ { "BADGE_1": { "label": "Rustboro Gym - Stone Badge", - "tags": ["Badge"] + "tags": [], + "category": "BADGE" }, "BADGE_2": { "label": "Dewford Gym - Knuckle Badge", - "tags": ["Badge"] + "tags": [], + "category": "BADGE" }, "BADGE_3": { "label": "Mauville Gym - Dynamo Badge", - "tags": ["Badge"] + "tags": [], + "category": "BADGE" }, "BADGE_4": { "label": "Lavaridge Gym - Heat Badge", - "tags": ["Badge"] + "tags": [], + "category": "BADGE" }, "BADGE_5": { "label": "Petalburg Gym - Balance Badge", - "tags": ["Badge"] + "tags": [], + "category": "BADGE" }, "BADGE_6": { "label": "Fortree Gym - Feather Badge", - "tags": ["Badge"] + "tags": [], + "category": "BADGE" }, "BADGE_7": { "label": "Mossdeep Gym - Mind Badge", - "tags": ["Badge"] + "tags": [], + "category": "BADGE" }, "BADGE_8": { "label": "Sootopolis Gym - Rain Badge", - "tags": ["Badge"] + "tags": [], + "category": "BADGE" }, "NPC_GIFT_RECEIVED_HM_CUT": { "label": "Rustboro City - HM01 from Cutter's House", - "tags": ["HM"] + "tags": [], + "category": "HM" }, "NPC_GIFT_RECEIVED_HM_FLY": { "label": "Route 119 - HM02 from Rival Battle", - "tags": ["HM"] + "tags": [], + "category": "HM" }, "NPC_GIFT_RECEIVED_HM_SURF": { "label": "Petalburg City - HM03 from Wally's Uncle", - "tags": ["HM"] + "tags": [], + "category": "HM" }, "NPC_GIFT_RECEIVED_HM_STRENGTH": { "label": "Rusturf Tunnel - HM04 from Tunneler", - "tags": ["HM"] + "tags": [], + "category": "HM" }, "NPC_GIFT_RECEIVED_HM_FLASH": { "label": "Granite Cave 1F - HM05 from Hiker", - "tags": ["HM"] + "tags": [], + "category": "HM" }, "NPC_GIFT_RECEIVED_HM_ROCK_SMASH": { "label": "Mauville City - HM06 from Rock Smash Guy", - "tags": ["HM"] + "tags": [], + "category": "HM" }, "NPC_GIFT_RECEIVED_HM_WATERFALL": { "label": "Sootopolis City - HM07 from Wallace", - "tags": ["HM"] + "tags": [], + "category": "HM" }, "NPC_GIFT_RECEIVED_HM_DIVE": { "label": "Mossdeep City - HM08 from Steven's House", - "tags": ["HM"] + "tags": [], + "category": "HM" }, "NPC_GIFT_RECEIVED_ACRO_BIKE": { "label": "Mauville City - Acro Bike", - "tags": ["Bike"] + "tags": [], + "category": "BIKE" }, "NPC_GIFT_RECEIVED_MACH_BIKE": { "label": "Mauville City - Mach Bike", - "tags": ["Bike"] + "tags": [], + "category": "BIKE" }, "NPC_GIFT_RECEIVED_WAILMER_PAIL": { "label": "Route 104 - Wailmer Pail from Flower Shop Lady", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "NPC_GIFT_RECEIVED_DEVON_GOODS_RUSTURF_TUNNEL": { "label": "Rusturf Tunnel - Recover Devon Goods", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "NPC_GIFT_RECEIVED_LETTER": { "label": "Devon Corp 3F - Letter from Mr. Stone", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "NPC_GIFT_RECEIVED_COIN_CASE": { "label": "Mauville City - Coin Case from Lady in House", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "NPC_GIFT_RECEIVED_METEORITE": { "label": "Mt Chimney - Meteorite from Machine", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "NPC_GIFT_RECEIVED_GO_GOGGLES": { "label": "Lavaridge Town - Go Goggles from Rival", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "NPC_GIFT_GOT_BASEMENT_KEY_FROM_WATTSON": { "label": "Mauville City - Basement Key from Wattson", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "NPC_GIFT_RECEIVED_ITEMFINDER": { "label": "Route 110 - Itemfinder from Rival", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "NPC_GIFT_RECEIVED_DEVON_SCOPE": { "label": "Route 120 - Devon Scope from Steven", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "NPC_GIFT_RECEIVED_MAGMA_EMBLEM": { "label": "Mt Pyre Summit - Magma Emblem from Old Lady", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "ITEM_ABANDONED_SHIP_CAPTAINS_OFFICE_STORAGE_KEY": { "label": "Abandoned Ship - Captain's Office Key", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "HIDDEN_ITEM_ABANDONED_SHIP_RM_4_KEY": { "label": "Abandoned Ship HF - Room 4 Key", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "HIDDEN_ITEM_ABANDONED_SHIP_RM_1_KEY": { "label": "Abandoned Ship HF - Room 1 Key", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "HIDDEN_ITEM_ABANDONED_SHIP_RM_6_KEY": { "label": "Abandoned Ship HF - Room 6 Key", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "HIDDEN_ITEM_ABANDONED_SHIP_RM_2_KEY": { "label": "Abandoned Ship HF - Room 2 Key", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_2_SCANNER": { "label": "Abandoned Ship HF - Scanner", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "NPC_GIFT_RECEIVED_POKEBLOCK_CASE": { "label": "Lilycove City - Pokeblock Case from Contest Hall", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "NPC_GIFT_RECEIVED_SS_TICKET": { "label": "Littleroot Town - S.S. Ticket from Norman", - "tags": ["KeyItem"] + "tags": [], + "category": "KEY" }, "NPC_GIFT_RECEIVED_AURORA_TICKET": { "label": "Littleroot Town - Aurora Ticket from Norman", - "tags": ["EventTicket"] + "tags": [], + "category": "TICKET" }, "NPC_GIFT_RECEIVED_EON_TICKET": { "label": "Littleroot Town - Eon Ticket from Norman", - "tags": ["EventTicket"] + "tags": [], + "category": "TICKET" }, "NPC_GIFT_RECEIVED_MYSTIC_TICKET": { "label": "Littleroot Town - Mystic Ticket from Norman", - "tags": ["EventTicket"] + "tags": [], + "category": "TICKET" }, "NPC_GIFT_RECEIVED_OLD_SEA_MAP": { "label": "Littleroot Town - Old Sea Map from Norman", - "tags": ["EventTicket"] + "tags": [], + "category": "TICKET" }, "NPC_GIFT_RECEIVED_OLD_ROD": { "label": "Dewford Town - Old Rod from Fisherman", - "tags": ["Rod"] + "tags": [], + "category": "ROD" }, "NPC_GIFT_RECEIVED_GOOD_ROD": { "label": "Route 118 - Good Rod from Fisherman", - "tags": ["Rod"] + "tags": [], + "category": "ROD" }, "NPC_GIFT_RECEIVED_SUPER_ROD": { "label": "Mossdeep City - Super Rod from Fisherman in House", - "tags": ["Rod"] + "tags": [], + "category": "ROD" }, "HIDDEN_ITEM_ARTISAN_CAVE_B1F_CALCIUM": { "label": "Artisan Cave B1F - Hidden Item 1", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ARTISAN_CAVE_B1F_IRON": { "label": "Artisan Cave B1F - Hidden Item 2", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ARTISAN_CAVE_B1F_PROTEIN": { "label": "Artisan Cave B1F - Hidden Item 3", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ARTISAN_CAVE_B1F_ZINC": { "label": "Artisan Cave B1F - Hidden Item 4", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_FALLARBOR_TOWN_NUGGET": { "label": "Fallarbor Town - Hidden Item in Crater", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_GRANITE_CAVE_B2F_EVERSTONE_1": { "label": "Granite Cave B2F - Hidden Item After Crumbling Floor", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_GRANITE_CAVE_B2F_EVERSTONE_2": { "label": "Granite Cave B2F - Hidden Item on Platform", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_JAGGED_PASS_FULL_HEAL": { "label": "Jagged Pass - Hidden Item in Grass", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_JAGGED_PASS_GREAT_BALL": { "label": "Jagged Pass - Hidden Item in Corner", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_LAVARIDGE_TOWN_ICE_HEAL": { "label": "Lavaridge Town - Hidden Item in Springs", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_LILYCOVE_CITY_HEART_SCALE": { "label": "Lilycove City - Hidden Item on Beach West", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_LILYCOVE_CITY_POKE_BALL": { "label": "Lilycove City - Hidden Item on Beach East", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_LILYCOVE_CITY_PP_UP": { "label": "Lilycove City - Hidden Item on Beach North", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_MT_PYRE_EXTERIOR_MAX_ETHER": { "label": "Mt Pyre Exterior - Hidden Item First Grave", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_MT_PYRE_EXTERIOR_ULTRA_BALL": { "label": "Mt Pyre Exterior - Hidden Item Second Grave", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_MT_PYRE_SUMMIT_RARE_CANDY": { "label": "Mt Pyre Summit - Hidden Item in Grass", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_MT_PYRE_SUMMIT_ZINC": { "label": "Mt Pyre Summit - Hidden Item Grave", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_PETALBURG_CITY_RARE_CANDY": { "label": "Petalburg City - Hidden Item Past Pond South", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_PETALBURG_WOODS_POKE_BALL": { "label": "Petalburg Woods - Hidden Item After Grunt", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_PETALBURG_WOODS_POTION": { "label": "Petalburg Woods - Hidden Item Southeast", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_PETALBURG_WOODS_TINY_MUSHROOM_1": { "label": "Petalburg Woods - Hidden Item Past Tree North", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_PETALBURG_WOODS_TINY_MUSHROOM_2": { "label": "Petalburg Woods - Hidden Item Past Tree South", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_104_ANTIDOTE": { "label": "Route 104 - Hidden Item on Beach 1", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_104_HEART_SCALE": { "label": "Route 104 - Hidden Item on Beach 2", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_104_POTION": { "label": "Route 104 - Hidden Item on Beach 3", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_104_POKE_BALL": { "label": "Route 104 - Hidden Item Behind Flower Shop 1", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_104_SUPER_POTION": { "label": "Route 104 - Hidden Item Behind Flower Shop 2", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_105_BIG_PEARL": { "label": "Route 105 - Hidden Item Between Trainers", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_105_HEART_SCALE": { "label": "Route 105 - Hidden Item on Small Island", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_106_HEART_SCALE": { "label": "Route 106 - Hidden Item on Beach 1", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_106_STARDUST": { "label": "Route 106 - Hidden Item on Beach 2", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_106_POKE_BALL": { "label": "Route 106 - Hidden Item on Beach 3", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_108_RARE_CANDY": { "label": "Route 108 - Hidden Item on Rock", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_109_REVIVE": { "label": "Route 109 - Hidden Item on Beach Southwest", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_109_ETHER": { "label": "Route 109 - Hidden Item on Beach Southeast", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_109_HEART_SCALE_2": { "label": "Route 109 - Hidden Item on Beach Under Umbrella", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_109_GREAT_BALL": { "label": "Route 109 - Hidden Item on Beach West", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_109_HEART_SCALE_1": { "label": "Route 109 - Hidden Item on Beach Behind Old Man", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_109_HEART_SCALE_3": { "label": "Route 109 - Hidden Item in Front of Couple", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_110_FULL_HEAL": { "label": "Route 110 - Hidden Item South of Rival", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_110_GREAT_BALL": { "label": "Route 110 - Hidden Item North of Rival", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_110_REVIVE": { "label": "Route 110 - Hidden Item Behind Two Trainers", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_110_POKE_BALL": { "label": "Route 110 - Hidden Item South of Berries", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_111_PROTEIN": { "label": "Route 111 - Hidden Item Desert Behind Tower", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_111_RARE_CANDY": { "label": "Route 111 - Hidden Item Desert on Rock 1", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_111_STARDUST": { "label": "Route 111 - Hidden Item Desert on Rock 2", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_113_ETHER": { "label": "Route 113 - Hidden Item Mound West of Three Trainers", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_113_NUGGET": { "label": "Route 113 - Hidden Item Mound Between Trainers", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_113_TM_DOUBLE_TEAM": { "label": "Route 113 - Hidden Item Mound West of Workshop", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_114_CARBOS": { "label": "Route 114 - Hidden Item Rock in Grass", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_114_REVIVE": { "label": "Route 114 - Hidden Item West of Bridge", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_115_HEART_SCALE": { "label": "Route 115 - Hidden Item Behind Trainer on Beach", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_116_BLACK_GLASSES": { "label": "Route 116 - Hidden Item in East", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_116_SUPER_POTION": { "label": "Route 116 - Hidden Item in Tree Maze", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_117_REPEL": { "label": "Route 117 - Hidden Item Behind Flower Patch", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_118_HEART_SCALE": { "label": "Route 118 - Hidden Item West on Rock", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_118_IRON": { "label": "Route 118 - Hidden Item East on Rock", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_119_FULL_HEAL": { "label": "Route 119 - Hidden Item in South Tall Grass", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_119_CALCIUM": { "label": "Route 119 - Hidden Item Across South Rail", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_119_ULTRA_BALL": { "label": "Route 119 - Hidden Item in East Tall Grass", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_119_MAX_ETHER": { "label": "Route 119 - Hidden Item Next to Waterfall", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_120_RARE_CANDY_1": { "label": "Route 120 - Hidden Item Behind Trees", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_120_REVIVE": { "label": "Route 120 - Hidden Item in North Tall Grass", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_120_ZINC": { "label": "Route 120 - Hidden Item in Tall Grass Maze", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_120_RARE_CANDY_2": { "label": "Route 120 - Hidden Item Behind Southwest Pool", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_121_HP_UP": { "label": "Route 121 - Hidden Item West of Grunts", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_121_FULL_HEAL": { "label": "Route 121 - Hidden Item in Maze 1", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_121_MAX_REVIVE": { "label": "Route 121 - Hidden Item in Maze 2", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_121_NUGGET": { "label": "Route 121 - Hidden Item Behind Tree", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_123_PP_UP": { "label": "Route 123 - Hidden Item East Behind Tree 1", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_123_RARE_CANDY": { "label": "Route 123 - Hidden Item East Behind Tree 2", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_123_HYPER_POTION": { "label": "Route 123 - Hidden Item on Rock Before Ledges", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_123_SUPER_REPEL": { "label": "Route 123 - Hidden Item in North Path Grass", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_123_REVIVE": { "label": "Route 123 - Hidden Item Behind House", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_128_HEART_SCALE_1": { "label": "Route 128 - Hidden Item North Island", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_128_HEART_SCALE_2": { "label": "Route 128 - Hidden Item Center Island", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_ROUTE_128_HEART_SCALE_3": { "label": "Route 128 - Hidden Item Southwest Island", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_SAFARI_ZONE_NORTH_EAST_ZINC": { "label": "Safari Zone NE - Hidden Item North", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_SAFARI_ZONE_NORTH_EAST_RARE_CANDY": { "label": "Safari Zone NE - Hidden Item East", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_SAFARI_ZONE_SOUTH_EAST_FULL_RESTORE": { "label": "Safari Zone SE - Hidden Item in South Grass 1", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_SAFARI_ZONE_SOUTH_EAST_PP_UP": { "label": "Safari Zone SE - Hidden Item in South Grass 2", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_SS_TIDAL_LOWER_DECK_LEFTOVERS": { "label": "SS Tidal - Hidden Item in Lower Deck Trash Can", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_124_GREEN_SHARD": { "label": "Route 124 UW - Hidden Item in Big Area", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_124_CARBOS": { "label": "Route 124 UW - Hidden Item in Tunnel Alcove", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_124_CALCIUM": { "label": "Route 124 UW - Hidden Item in North Tunnel 1", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_124_HEART_SCALE_2": { "label": "Route 124 UW - Hidden Item in North Tunnel 2", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_124_PEARL": { "label": "Route 124 UW - Hidden Item in Small Area North", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_124_BIG_PEARL": { "label": "Route 124 UW - Hidden Item in Small Area Middle", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_124_HEART_SCALE_1": { "label": "Route 124 UW - Hidden Item in Small Area South", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_126_STARDUST": { "label": "Route 126 UW - Hidden Item Northeast", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_126_ULTRA_BALL": { "label": "Route 126 UW - Hidden Item in North Alcove", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_126_BIG_PEARL": { "label": "Route 126 UW - Hidden Item in Southeast", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_126_HEART_SCALE": { "label": "Route 126 UW - Hidden Item in Northwest Alcove", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_126_BLUE_SHARD": { "label": "Route 126 UW - Hidden Item in Southwest Area", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_126_IRON": { "label": "Route 126 UW - Hidden Item in West Area 1", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_126_PEARL": { "label": "Route 126 UW - Hidden Item in West Area 2", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_126_YELLOW_SHARD": { "label": "Route 126 UW - Hidden Item in West Area 3", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_127_STAR_PIECE": { "label": "Route 127 UW - Hidden Item in West Area", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_127_HEART_SCALE": { "label": "Route 127 UW - Hidden Item in Center Area", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_127_HP_UP": { "label": "Route 127 UW - Hidden Item in East Area", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_127_RED_SHARD": { "label": "Route 127 UW - Hidden Item in Northeast Area", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_128_PEARL": { "label": "Route 128 UW - Hidden Item in East Area", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_UNDERWATER_128_PROTEIN": { "label": "Route 128 UW - Hidden Item in Small Area", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_VICTORY_ROAD_1F_ULTRA_BALL": { "label": "Victory Road 1F - Hidden Item on Southeast Ledge", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_VICTORY_ROAD_B2F_ELIXIR": { "label": "Victory Road B2F - Hidden Item Above Waterfall", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_VICTORY_ROAD_B2F_MAX_REPEL": { "label": "Victory Road B2F - Hidden Item in Northeast Corner", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "HIDDEN_ITEM_NAVEL_ROCK_TOP_SACRED_ASH": { "label": "Navel Rock Top - Hidden Item Sacred Ash", - "tags": ["HiddenItem"] + "tags": [], + "category": "HIDDEN_ITEM" }, "ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_1_TM_RAIN_DANCE": { "label": "Abandoned Ship HF - Item in Room 1", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_3_WATER_STONE": { "label": "Abandoned Ship HF - Item in Room 3", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_6_LUXURY_BALL": { "label": "Abandoned Ship HF - Item in Room 6", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ABANDONED_SHIP_ROOMS_1F_HARBOR_MAIL": { "label": "Abandoned Ship 1F - Item in East Side Northwest Room", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ABANDONED_SHIP_ROOMS_2_1F_REVIVE": { "label": "Abandoned Ship 1F - Item in West Side North Room", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ABANDONED_SHIP_ROOMS_B1F_ESCAPE_ROPE": { "label": "Abandoned Ship B1F - Item in South Rooms", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ABANDONED_SHIP_ROOMS_B1F_TM_ICE_BEAM": { "label": "Abandoned Ship B1F - Item in Storage Room", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ABANDONED_SHIP_ROOMS_2_B1F_DIVE_BALL": { "label": "Abandoned Ship B1F - Item in North Rooms", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_AQUA_HIDEOUT_B1F_MASTER_BALL": { "label": "Aqua Hideout B1F - Item in Center Room 1", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_AQUA_HIDEOUT_B1F_NUGGET": { "label": "Aqua Hideout B1F - Item in Center Room 2", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_AQUA_HIDEOUT_B1F_MAX_ELIXIR": { "label": "Aqua Hideout B1F - Item in East Room", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_AQUA_HIDEOUT_B2F_NEST_BALL": { "label": "Aqua Hideout B2F - Item in Long Hallway", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ARTISAN_CAVE_1F_CARBOS": { "label": "Artisan Cave 1F - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ARTISAN_CAVE_B1F_HP_UP": { "label": "Artisan Cave B1F - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_FIERY_PATH_FIRE_STONE": { "label": "Fiery Path - Item Behind Boulders 1", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_FIERY_PATH_TM_TOXIC": { "label": "Fiery Path - Item Behind Boulders 2", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_GRANITE_CAVE_1F_ESCAPE_ROPE": { "label": "Granite Cave 1F - Item Before Ladder", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_GRANITE_CAVE_B1F_POKE_BALL": { "label": "Granite Cave B1F - Item in Alcove", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_GRANITE_CAVE_B2F_RARE_CANDY": { "label": "Granite Cave B2F - Item After Crumbling Floor", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_GRANITE_CAVE_B2F_REPEL": { "label": "Granite Cave B2F - Item After Mud Slope", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_JAGGED_PASS_BURN_HEAL": { "label": "Jagged Pass - Item Below Hideout", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_LILYCOVE_CITY_MAX_REPEL": { "label": "Lilycove City - Item on Peninsula", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_MAGMA_HIDEOUT_1F_RARE_CANDY": { "label": "Magma Hideout 1F - Item on Ledge", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_MAGMA_HIDEOUT_2F_2R_FULL_RESTORE": { "label": "Magma Hideout 2F - Item on West Platform", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_MAGMA_HIDEOUT_2F_2R_MAX_ELIXIR": { "label": "Magma Hideout 2F - Item on East Platform", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_MAGMA_HIDEOUT_3F_1R_NUGGET": { "label": "Magma Hideout 3F - Item Before Last Floor", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_MAGMA_HIDEOUT_3F_2R_PP_MAX": { "label": "Magma Hideout 3F - Item in Drill Room", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_MAGMA_HIDEOUT_3F_3R_ECAPE_ROPE": { "label": "Magma Hideout 3F - Item After Groudon", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_MAGMA_HIDEOUT_4F_MAX_REVIVE": { "label": "Magma Hideout 4F - Item Before Groudon", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_MAUVILLE_CITY_X_SPEED": { "label": "Mauville City - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_METEOR_FALLS_1F_1R_FULL_HEAL": { "label": "Meteor Falls 1F - Item Northeast", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_METEOR_FALLS_1F_1R_MOON_STONE": { "label": "Meteor Falls 1F - Item West", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_METEOR_FALLS_1F_1R_PP_UP": { "label": "Meteor Falls 1F - Item Below Waterfall", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_METEOR_FALLS_1F_1R_TM_IRON_TAIL": { "label": "Meteor Falls 1F - Item Before Steven's Cave", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_METEOR_FALLS_B1F_2R_TM_DRAGON_CLAW": { "label": "Meteor Falls B1F - Item in North Cave", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_MOSSDEEP_CITY_NET_BALL": { "label": "Mossdeep City - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_MT_PYRE_2F_ULTRA_BALL": { "label": "Mt Pyre 2F - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_MT_PYRE_3F_SUPER_REPEL": { "label": "Mt Pyre 3F - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_MT_PYRE_4F_SEA_INCENSE": { "label": "Mt Pyre 4F - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_MT_PYRE_5F_LAX_INCENSE": { "label": "Mt Pyre 5F - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_MT_PYRE_6F_TM_SHADOW_BALL": { "label": "Mt Pyre 6F - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_MT_PYRE_EXTERIOR_TM_SKILL_SWAP": { "label": "Mt Pyre Exterior - Item 1", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_MT_PYRE_EXTERIOR_MAX_POTION": { "label": "Mt Pyre Exterior - Item 2", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_NEW_MAUVILLE_ESCAPE_ROPE": { "label": "New Mauville - Item 1", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_NEW_MAUVILLE_PARALYZE_HEAL": { "label": "New Mauville - Item 2", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_NEW_MAUVILLE_FULL_HEAL": { "label": "New Mauville - Item 3", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_NEW_MAUVILLE_THUNDER_STONE": { "label": "New Mauville - Item 4", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_NEW_MAUVILLE_ULTRA_BALL": { "label": "New Mauville - Item 5", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_PETALBURG_CITY_ETHER": { "label": "Petalburg City - Item Past Pond South", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_PETALBURG_CITY_MAX_REVIVE": { "label": "Petalburg City - Item Past Pond North", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_PETALBURG_WOODS_ETHER": { "label": "Petalburg Woods - Item Northwest", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_PETALBURG_WOODS_PARALYZE_HEAL": { "label": "Petalburg Woods - Item Southwest", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_PETALBURG_WOODS_GREAT_BALL": { "label": "Petalburg Woods - Item Past Tree Northeast", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_PETALBURG_WOODS_X_ATTACK": { "label": "Petalburg Woods - Item Past Tree South", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_102_POTION": { "label": "Route 102 - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_103_GUARD_SPEC": { "label": "Route 103 - Item Near Berries", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_103_PP_UP": { "label": "Route 103 - Item in Tree Maze", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_104_POKE_BALL": { "label": "Route 104 - Item Near Briney on Ledge", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_104_POTION": { "label": "Route 104 - Item Behind Flower Shop", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_104_X_ACCURACY": { "label": "Route 104 - Item Behind Tree", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_104_PP_UP": { "label": "Route 104 - Item East Past Pond", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_105_IRON": { "label": "Route 105 - Item on Island", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_106_PROTEIN": { "label": "Route 106 - Item on West Beach", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_108_STAR_PIECE": { "label": "Route 108 - Item Between Trainers", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_109_POTION": { "label": "Route 109 - Item on Beach", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_109_PP_UP": { "label": "Route 109 - Item on Island", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_110_DIRE_HIT": { "label": "Route 110 - Item South of Rival", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_110_ELIXIR": { "label": "Route 110 - Item South of Berries", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_110_RARE_CANDY": { "label": "Route 110 - Item on Island", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_111_ELIXIR": { "label": "Route 111 - Item Near Winstrates", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_111_HP_UP": { "label": "Route 111 - Item West of Pond Near Winstrates", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_111_STARDUST": { "label": "Route 111 - Item Desert Near Tower", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_111_TM_SANDSTORM": { "label": "Route 111 - Item Desert South", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_112_NUGGET": { "label": "Route 112 - Item on Ledges", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_113_SUPER_REPEL": { "label": "Route 113 - Item Past Three Trainers", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_113_MAX_ETHER": { "label": "Route 113 - Item on Ledge", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_113_HYPER_POTION": { "label": "Route 113 - Item Near Fallarbor South", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_114_ENERGY_POWDER": { "label": "Route 114 - Item Between Trainers", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_114_PROTEIN": { "label": "Route 114 - Item Behind Smashable Rock", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_114_RARE_CANDY": { "label": "Route 114 - Item Above Waterfall", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_115_SUPER_POTION": { "label": "Route 115 - Item on Beach", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_115_PP_UP": { "label": "Route 115 - Item on Ledge", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_115_GREAT_BALL": { "label": "Route 115 - Item Behind Smashable Rock", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_115_HEAL_POWDER": { "label": "Route 115 - Item North Near Trainers", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_115_TM_FOCUS_PUNCH": { "label": "Route 115 - Item Near Mud Slope", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_115_IRON": { "label": "Route 115 - Item Past Mud Slope", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_116_REPEL": { "label": "Route 116 - Item in Grass", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_116_X_SPECIAL": { "label": "Route 116 - Item Near Tunnel", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_116_POTION": { "label": "Route 116 - Item in Tree Maze 1", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_116_ETHER": { "label": "Route 116 - Item in Tree Maze 2", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_116_HP_UP": { "label": "Route 116 - Item in East", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_117_GREAT_BALL": { "label": "Route 117 - Item Behind Flower Patch", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_117_REVIVE": { "label": "Route 117 - Item Behind Tree", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_118_HYPER_POTION": { "label": "Route 118 - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_119_SUPER_REPEL": { "label": "Route 119 - Item in South Tall Grass 1", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_119_HYPER_POTION_1": { "label": "Route 119 - Item in South Tall Grass 2", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_119_ZINC": { "label": "Route 119 - Item Across River South", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_119_HYPER_POTION_2": { "label": "Route 119 - Item Near Mud Slope", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_119_ELIXIR_1": { "label": "Route 119 - Item East of Mud Slope", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_119_ELIXIR_2": { "label": "Route 119 - Item on River Bank", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_119_LEAF_STONE": { "label": "Route 119 - Item Near South Waterfall", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_119_NUGGET": { "label": "Route 119 - Item Above North Waterfall 1", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_119_RARE_CANDY": { "label": "Route 119 - Item Above North Waterfall 2", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_120_NEST_BALL": { "label": "Route 120 - Item Near North Pond", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_120_REVIVE": { "label": "Route 120 - Item in North Puddles", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_120_NUGGET": { "label": "Route 120 - Item in Tall Grass Maze", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_120_HYPER_POTION": { "label": "Route 120 - Item in Tall Grass South", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_120_FULL_HEAL": { "label": "Route 120 - Item Behind Southwest Pool", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_121_ZINC": { "label": "Route 121 - Item Near Safari Zone", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_121_REVIVE": { "label": "Route 121 - Item in Maze 1", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_121_CARBOS": { "label": "Route 121 - Item in Maze 2", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_123_ULTRA_BALL": { "label": "Route 123 - Item Below Ledges", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_123_ELIXIR": { "label": "Route 123 - Item on Ledges 1", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_123_REVIVAL_HERB": { "label": "Route 123 - Item on Ledges 2", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_123_PP_UP": { "label": "Route 123 - Item on Ledges 3", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_123_CALCIUM": { "label": "Route 123 - Item on Ledges 4", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_124_RED_SHARD": { "label": "Route 124 - Item in Northwest Area", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_124_YELLOW_SHARD": { "label": "Route 124 - Item in Northeast Area", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_124_BLUE_SHARD": { "label": "Route 124 - Item in Southwest Area", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_125_BIG_PEARL": { "label": "Route 125 - Item Between Trainers", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_126_GREEN_SHARD": { "label": "Route 126 - Item in Separated Area", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_127_ZINC": { "label": "Route 127 - Item North", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_127_CARBOS": { "label": "Route 127 - Item East", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_127_RARE_CANDY": { "label": "Route 127 - Item Between Trainers", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_132_PROTEIN": { "label": "Route 132 - Item 1", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_132_RARE_CANDY": { "label": "Route 132 - Item 2", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_133_BIG_PEARL": { "label": "Route 133 - Item 1", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_133_MAX_REVIVE": { "label": "Route 133 - Item 2", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_133_STAR_PIECE": { "label": "Route 133 - Item 3", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_134_CARBOS": { "label": "Route 134 - Item 1", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_ROUTE_134_STAR_PIECE": { "label": "Route 134 - Item 2", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_RUSTBORO_CITY_X_DEFEND": { "label": "Rustboro City - Item Behind Fences", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_RUSTURF_TUNNEL_POKE_BALL": { "label": "Rusturf Tunnel - Item West", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_RUSTURF_TUNNEL_MAX_ETHER": { "label": "Rusturf Tunnel - Item East", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_SAFARI_ZONE_NORTH_CALCIUM": { "label": "Safari Zone N - Item in Grass", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_SAFARI_ZONE_NORTH_EAST_NUGGET": { "label": "Safari Zone NE - Item on Ledge", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_SAFARI_ZONE_NORTH_WEST_TM_SOLAR_BEAM": { "label": "Safari Zone NW - Item Behind Pond", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_SAFARI_ZONE_SOUTH_EAST_BIG_PEARL": { "label": "Safari Zone SE - Item in Grass", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_SAFARI_ZONE_SOUTH_WEST_MAX_REVIVE": { "label": "Safari Zone SW - Item Behind Pond", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_SCORCHED_SLAB_TM_SUNNY_DAY": { "label": "Scorched Slab - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_SEAFLOOR_CAVERN_ROOM_9_TM_EARTHQUAKE": { "label": "Seafloor Cavern Room 9 - Item Before Kyogre", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_SHOAL_CAVE_ENTRANCE_BIG_PEARL": { "label": "Shoal Cave Entrance - Item on Ledge", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_SHOAL_CAVE_ICE_ROOM_NEVER_MELT_ICE": { "label": "Shoal Cave Ice Room - Item 1", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_SHOAL_CAVE_ICE_ROOM_TM_HAIL": { "label": "Shoal Cave Ice Room - Item 2", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_SHOAL_CAVE_INNER_ROOM_RARE_CANDY": { "label": "Shoal Cave Inner Room - Item in Center", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_SHOAL_CAVE_STAIRS_ROOM_ICE_HEAL": { "label": "Shoal Cave Stairs Room - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_TRICK_HOUSE_PUZZLE_1_ORANGE_MAIL": { "label": "Trick House Puzzle 1 - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_TRICK_HOUSE_PUZZLE_2_HARBOR_MAIL": { "label": "Trick House Puzzle 2 - Item 1", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_TRICK_HOUSE_PUZZLE_2_WAVE_MAIL": { "label": "Trick House Puzzle 2 - Item 2", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_TRICK_HOUSE_PUZZLE_3_SHADOW_MAIL": { "label": "Trick House Puzzle 3 - Item 1", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_TRICK_HOUSE_PUZZLE_3_WOOD_MAIL": { "label": "Trick House Puzzle 3 - Item 2", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_TRICK_HOUSE_PUZZLE_4_MECH_MAIL": { "label": "Trick House Puzzle 4 - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_TRICK_HOUSE_PUZZLE_6_GLITTER_MAIL": { "label": "Trick House Puzzle 6 - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_TRICK_HOUSE_PUZZLE_7_TROPIC_MAIL": { "label": "Trick House Puzzle 7 - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_TRICK_HOUSE_PUZZLE_8_BEAD_MAIL": { "label": "Trick House Puzzle 8 - Item", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_VICTORY_ROAD_1F_MAX_ELIXIR": { "label": "Victory Road 1F - Item East", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_VICTORY_ROAD_1F_PP_UP": { "label": "Victory Road 1F - Item on Southeast Ledge", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_VICTORY_ROAD_B1F_FULL_RESTORE": { "label": "Victory Road B1F - Item Behind Boulders", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_VICTORY_ROAD_B1F_TM_PSYCHIC": { "label": "Victory Road B1F - Item on Northeast Ledge", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "ITEM_VICTORY_ROAD_B2F_FULL_HEAL": { "label": "Victory Road B2F - Item Above Waterfall", - "tags": ["OverworldItem"] + "tags": [], + "category": "OVERWORLD_ITEM" }, "NPC_GIFT_GOT_TM_THUNDERBOLT_FROM_WATTSON": { "label": "Mauville City - TM24 from Wattson", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_6_SODA_POP": { "label": "Route 109 - Seashore House Reward", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_AMULET_COIN": { "label": "Littleroot Town - Amulet Coin from Mom", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_CHARCOAL": { "label": "Lavaridge Town Herb Shop - Charcoal from Man", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_CHESTO_BERRY_ROUTE_104": { "label": "Route 104 - Gift from Woman Near Berries", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_CLEANSE_TAG": { "label": "Mt Pyre 1F - Cleanse Tag from Woman in NE Corner", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_EXP_SHARE": { "label": "Devon Corp 3F - Exp. Share from Mr. Stone", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_FOCUS_BAND": { "label": "Shoal Cave Lower Room - Focus Band from Black Belt", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_GREAT_BALL_PETALBURG_WOODS": { "label": "Petalburg Woods - Gift from Devon Employee", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_GREAT_BALL_RUSTBORO_CITY": { "label": "Rustboro City - Gift from Devon Employee", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_KINGS_ROCK": { "label": "Mossdeep City - King's Rock from Boy", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_MACHO_BRACE": { "label": "Route 111 - Winstrate Family Reward", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_MENTAL_HERB": { "label": "Fortree City - Wingull Delivery Reward", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_MIRACLE_SEED": { "label": "Petalburg Woods - Miracle Seed from Lady", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_POTION_OLDALE": { "label": "Oldale Town - Gift from Shop Tutorial", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_POWDER_JAR": { "label": "Slateport City - Powder Jar from Lady in Market", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_PREMIER_BALL_RUSTBORO": { "label": "Rustboro City - Gift from Boy in Apartments", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_QUICK_CLAW": { "label": "Rustboro City - Quick Claw from School Teacher", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_REPEAT_BALL": { "label": "Route 116 - Gift from Devon Researcher", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_SECRET_POWER": { "label": "Route 111 - Secret Power from Man Near Tree", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_SILK_SCARF": { "label": "Dewford Town - Silk Scarf from Man in House", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_SOFT_SAND": { "label": "Route 109 - Soft Sand from Tuber", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_SOOT_SACK": { "label": "Route 113 - Soot Sack from Glass Blower", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_SOOTHE_BELL": { "label": "Slateport City - Soothe Bell from Woman in Fan Club", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_SUN_STONE_MOSSDEEP": { "label": "Space Center - Gift from Man", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_WATER_PULSE": { "label": "Sootopolis Gym - TM03 from Juan", - "tags": ["NpcGift"] + "tags": ["Gym TMs"], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_CALM_MIND": { "label": "Mossdeep Gym - TM04 from Tate and Liza", - "tags": ["NpcGift"] + "tags": ["Gym TMs"], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_ROAR": { "label": "Route 114 - TM05 from Roaring Man", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_BULK_UP": { "label": "Dewford Gym - TM08 from Brawly", - "tags": ["NpcGift"] + "tags": ["Gym TMs"], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_BULLET_SEED": { "label": "Route 104 - TM09 from Boy", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_HIDDEN_POWER": { "label": "Fortree City - TM10 from Hidden Power Lady", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_GIGA_DRAIN": { "label": "Route 123 - TM19 from Girl near Berries", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_FRUSTRATION": { "label": "Pacifidlog Town - TM21 from Man in House", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_RETURN": { "label": "Fallarbor Town - TM27 from Cozmo", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_RETURN_2": { "label": "Pacifidlog Town - TM27 from Man in House", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_DIG": { "label": "Route 114 - TM28 from Fossil Maniac's Brother", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_BRICK_BREAK": { "label": "Sootopolis City - TM31 from Black Belt in House", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_SHOCK_WAVE": { "label": "Mauville Gym - TM34 from Wattson", - "tags": ["NpcGift"] + "tags": ["Gym TMs"], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_SLUDGE_BOMB": { "label": "Dewford Town - TM36 from Sludge Bomb Man", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_ROCK_TOMB": { "label": "Rustboro Gym - TM39 from Roxanne", - "tags": ["NpcGift"] + "tags": ["Gym TMs"], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_AERIAL_ACE": { "label": "Fortree Gym - TM40 from Winona", - "tags": ["NpcGift"] + "tags": ["Gym TMs"], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_TORMENT": { "label": "Slateport City - TM41 from Sailor in Battle Tent", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_FACADE": { "label": "Petalburg Gym - TM42 from Norman", - "tags": ["NpcGift"] + "tags": ["Gym TMs"], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_REST": { "label": "Lilycove City - TM44 from Man in House", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_ATTRACT": { "label": "Verdanturf Town - TM45 from Woman in Battle Tent", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_THIEF": { "label": "Oceanic Museum - TM46 from Aqua Grunt in Museum", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_STEEL_WING": { "label": "Granite Cave 1F - TM47 from Steven", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_SNATCH": { "label": "SS Tidal - TM49 from Thief", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TM_OVERHEAT": { "label": "Lavaridge Gym - TM50 from Flannery", - "tags": ["NpcGift"] + "tags": ["Gym TMs"], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_WHITE_HERB": { "label": "Route 104 - White Herb from Lady Near Flower Shop", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_FLOWER_SHOP_RECEIVED_BERRY": { "label": "Route 104 - Berry from Girl in Flower Shop", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_DEEP_SEA_SCALE": { "label": "Slateport City - Deep Sea Scale from Capt. Stern", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_DEEP_SEA_TOOTH": { "label": "Slateport City - Deep Sea Tooth from Capt. Stern", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TRICK_HOUSE_REWARD_1": { "label": "Trick House Puzzle 1 - Reward", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TRICK_HOUSE_REWARD_2": { "label": "Trick House Puzzle 2 - Reward", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TRICK_HOUSE_REWARD_3": { "label": "Trick House Puzzle 3 - Reward", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TRICK_HOUSE_REWARD_4": { "label": "Trick House Puzzle 4 - Reward", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TRICK_HOUSE_REWARD_5": { "label": "Trick House Puzzle 5 - Reward", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TRICK_HOUSE_REWARD_6": { "label": "Trick House Puzzle 6 - Reward", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_TRICK_HOUSE_REWARD_7": { "label": "Trick House Puzzle 7 - Reward", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_RECEIVED_FIRST_POKEBALLS": { "label": "Littleroot Town - Pokeballs from Rival", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_SOOTOPOLIS_RECEIVED_BERRY_1": { "label": "Sootopolis City - Berry from Girl on Grass 1", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_SOOTOPOLIS_RECEIVED_BERRY_2": { "label": "Sootopolis City - Berry from Girl on Grass 2", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_ROUTE_111_RECEIVED_BERRY": { "label": "Route 111 - Berry from Girl Near Berry Trees", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_ROUTE_114_RECEIVED_BERRY": { "label": "Route 114 - Berry from Man Near House", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_ROUTE_120_RECEIVED_BERRY": { "label": "Route 120 - Berry from Lady Near Berry Trees", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_BERRY_MASTER_RECEIVED_BERRY_1": { "label": "Route 123 - Berry from Berry Master 1", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_BERRY_MASTER_RECEIVED_BERRY_2": { "label": "Route 123 - Berry from Berry Master 2", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_BERRY_MASTERS_WIFE": { "label": "Route 123 - Berry from Berry Master's Wife", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "NPC_GIFT_LILYCOVE_RECEIVED_BERRY": { "label": "Lilycove City - Berry from Gentleman Above Ledges", - "tags": ["NpcGift"] + "tags": [], + "category": "GIFT" }, "BERRY_TREE_01": { "label": "Route 102 - Berry Tree 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_02": { "label": "Route 102 - Berry Tree 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_03": { "label": "Route 104 - Berry Tree Flower Shop 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_04": { "label": "Route 104 - Berry Tree Flower Shop 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_05": { "label": "Route 103 - Berry Tree 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_06": { "label": "Route 103 - Berry Tree 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_07": { "label": "Route 103 - Berry Tree 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_08": { "label": "Route 104 - Berry Tree North 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_09": { "label": "Route 104 - Berry Tree North 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_10": { "label": "Route 104 - Berry Tree North 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_11": { "label": "Route 104 - Berry Tree South 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_12": { "label": "Route 104 - Berry Tree South 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_13": { "label": "Route 104 - Berry Tree South 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_14": { "label": "Route 123 - Berry Tree Berry Master 6", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_15": { "label": "Route 123 - Berry Tree Berry Master 7", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_16": { "label": "Route 110 - Berry Tree 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_17": { "label": "Route 110 - Berry Tree 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_18": { "label": "Route 110 - Berry Tree 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_19": { "label": "Route 111 - Berry Tree 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_20": { "label": "Route 111 - Berry Tree 4", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_21": { "label": "Route 112 - Berry Tree 4", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_22": { "label": "Route 112 - Berry Tree 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_23": { "label": "Route 112 - Berry Tree 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_24": { "label": "Route 112 - Berry Tree 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_25": { "label": "Route 116 - Berry Tree 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_26": { "label": "Route 116 - Berry Tree 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_27": { "label": "Route 117 - Berry Tree 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_28": { "label": "Route 117 - Berry Tree 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_29": { "label": "Route 117 - Berry Tree 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_30": { "label": "Route 123 - Berry Tree Berry Master 8", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_31": { "label": "Route 118 - Berry Tree 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_32": { "label": "Route 118 - Berry Tree 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_33": { "label": "Route 118 - Berry Tree 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_34": { "label": "Route 119 - Berry Tree North 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_35": { "label": "Route 119 - Berry Tree North 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_36": { "label": "Route 119 - Berry Tree North 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_37": { "label": "Route 120 - Berry Tree in Side Area 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_38": { "label": "Route 120 - Berry Tree in Side Area 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_39": { "label": "Route 120 - Berry Tree in Side Area 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_40": { "label": "Route 120 - Berry Tree South 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_41": { "label": "Route 120 - Berry Tree South 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_42": { "label": "Route 120 - Berry Tree South 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_43": { "label": "Route 120 - Berry Tree Pond 4", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_44": { "label": "Route 120 - Berry Tree Pond 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_45": { "label": "Route 120 - Berry Tree Pond 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_46": { "label": "Route 120 - Berry Tree Pond 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_47": { "label": "Route 121 - Berry Tree West 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_48": { "label": "Route 121 - Berry Tree West 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_49": { "label": "Route 121 - Berry Tree West 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_50": { "label": "Route 121 - Berry Tree West 4", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_51": { "label": "Route 121 - Berry Tree East 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_52": { "label": "Route 121 - Berry Tree East 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_53": { "label": "Route 121 - Berry Tree East 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_54": { "label": "Route 121 - Berry Tree East 4", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_55": { "label": "Route 115 - Berry Tree Behind Smashable Rock 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_56": { "label": "Route 115 - Berry Tree Behind Smashable Rock 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_57": { "label": "Route 123 - Berry Tree East 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_58": { "label": "Route 123 - Berry Tree Berry Master 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_59": { "label": "Route 123 - Berry Tree Berry Master 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_60": { "label": "Route 123 - Berry Tree Berry Master 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_61": { "label": "Route 123 - Berry Tree Berry Master 4", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_62": { "label": "Route 123 - Berry Tree East 4", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_63": { "label": "Route 123 - Berry Tree East 5", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_64": { "label": "Route 123 - Berry Tree East 6", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_65": { "label": "Route 123 - Berry Tree Berry Master 9", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_66": { "label": "Route 116 - Berry Tree 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_67": { "label": "Route 116 - Berry Tree 4", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_68": { "label": "Route 114 - Berry Tree 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_69": { "label": "Route 115 - Berry Tree North 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_70": { "label": "Route 115 - Berry Tree North 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_71": { "label": "Route 115 - Berry Tree North 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_72": { "label": "Route 123 - Berry Tree Berry Master 10", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_73": { "label": "Route 123 - Berry Tree Berry Master 11", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_74": { "label": "Route 123 - Berry Tree Berry Master 12", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_75": { "label": "Route 104 - Berry Tree Flower Shop 3", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_76": { "label": "Route 104 - Berry Tree Flower Shop 4", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_77": { "label": "Route 114 - Berry Tree 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_78": { "label": "Route 114 - Berry Tree 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_79": { "label": "Route 123 - Berry Tree Berry Master 5", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_80": { "label": "Route 111 - Berry Tree 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_81": { "label": "Route 111 - Berry Tree 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_82": { "label": "Route 130 - Berry Tree on Mirage Island", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_83": { "label": "Route 119 - Berry Tree Above Waterfall 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_84": { "label": "Route 119 - Berry Tree Above Waterfall 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_85": { "label": "Route 119 - Berry Tree South 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_86": { "label": "Route 119 - Berry Tree South 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_87": { "label": "Route 123 - Berry Tree East 1", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "BERRY_TREE_88": { "label": "Route 123 - Berry Tree East 2", - "tags": ["BerryTree"] + "tags": [], + "category": "BERRY_TREE" }, "POKEDEX_REWARD_001": { "label": "Pokedex - Bulbasaur", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_002": { "label": "Pokedex - Ivysaur", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_003": { "label": "Pokedex - Venusaur", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_004": { "label": "Pokedex - Charmander", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_005": { "label": "Pokedex - Charmeleon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_006": { "label": "Pokedex - Charizard", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_007": { "label": "Pokedex - Squirtle", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_008": { "label": "Pokedex - Wartortle", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_009": { "label": "Pokedex - Blastoise", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_010": { "label": "Pokedex - Caterpie", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_011": { "label": "Pokedex - Metapod", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_012": { "label": "Pokedex - Butterfree", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_013": { "label": "Pokedex - Weedle", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_014": { "label": "Pokedex - Kakuna", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_015": { "label": "Pokedex - Beedrill", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_016": { "label": "Pokedex - Pidgey", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_017": { "label": "Pokedex - Pidgeotto", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_018": { "label": "Pokedex - Pidgeot", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_019": { "label": "Pokedex - Rattata", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_020": { "label": "Pokedex - Raticate", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_021": { "label": "Pokedex - Spearow", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_022": { "label": "Pokedex - Fearow", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_023": { "label": "Pokedex - Ekans", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_024": { "label": "Pokedex - Arbok", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_025": { "label": "Pokedex - Pikachu", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_026": { "label": "Pokedex - Raichu", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_027": { "label": "Pokedex - Sandshrew", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_028": { "label": "Pokedex - Sandslash", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_029": { "label": "Pokedex - Nidoran Female", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_030": { "label": "Pokedex - Nidorina", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_031": { "label": "Pokedex - Nidoqueen", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_032": { "label": "Pokedex - Nidoran Male", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_033": { "label": "Pokedex - Nidorino", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_034": { "label": "Pokedex - Nidoking", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_035": { "label": "Pokedex - Clefairy", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_036": { "label": "Pokedex - Clefable", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_037": { "label": "Pokedex - Vulpix", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_038": { "label": "Pokedex - Ninetales", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_039": { "label": "Pokedex - Jigglypuff", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_040": { "label": "Pokedex - Wigglytuff", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_041": { "label": "Pokedex - Zubat", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_042": { "label": "Pokedex - Golbat", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_043": { "label": "Pokedex - Oddish", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_044": { "label": "Pokedex - Gloom", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_045": { "label": "Pokedex - Vileplume", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_046": { "label": "Pokedex - Paras", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_047": { "label": "Pokedex - Parasect", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_048": { "label": "Pokedex - Venonat", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_049": { "label": "Pokedex - Venomoth", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_050": { "label": "Pokedex - Diglett", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_051": { "label": "Pokedex - Dugtrio", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_052": { "label": "Pokedex - Meowth", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_053": { "label": "Pokedex - Persian", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_054": { "label": "Pokedex - Psyduck", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_055": { "label": "Pokedex - Golduck", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_056": { "label": "Pokedex - Mankey", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_057": { "label": "Pokedex - Primeape", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_058": { "label": "Pokedex - Growlithe", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_059": { "label": "Pokedex - Arcanine", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_060": { "label": "Pokedex - Poliwag", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_061": { "label": "Pokedex - Poliwhirl", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_062": { "label": "Pokedex - Poliwrath", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_063": { "label": "Pokedex - Abra", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_064": { "label": "Pokedex - Kadabra", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_065": { "label": "Pokedex - Alakazam", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_066": { "label": "Pokedex - Machop", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_067": { "label": "Pokedex - Machoke", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_068": { "label": "Pokedex - Machamp", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_069": { "label": "Pokedex - Bellsprout", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_070": { "label": "Pokedex - Weepinbell", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_071": { "label": "Pokedex - Victreebel", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_072": { "label": "Pokedex - Tentacool", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_073": { "label": "Pokedex - Tentacruel", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_074": { "label": "Pokedex - Geodude", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_075": { "label": "Pokedex - Graveler", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_076": { "label": "Pokedex - Golem", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_077": { "label": "Pokedex - Ponyta", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_078": { "label": "Pokedex - Rapidash", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_079": { "label": "Pokedex - Slowpoke", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_080": { "label": "Pokedex - Slowbro", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_081": { "label": "Pokedex - Magnemite", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_082": { "label": "Pokedex - Magneton", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_083": { "label": "Pokedex - Farfetch'd", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_084": { "label": "Pokedex - Doduo", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_085": { "label": "Pokedex - Dodrio", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_086": { "label": "Pokedex - Seel", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_087": { "label": "Pokedex - Dewgong", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_088": { "label": "Pokedex - Grimer", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_089": { "label": "Pokedex - Muk", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_090": { "label": "Pokedex - Shellder", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_091": { "label": "Pokedex - Cloyster", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_092": { "label": "Pokedex - Gastly", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_093": { "label": "Pokedex - Haunter", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_094": { "label": "Pokedex - Gengar", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_095": { "label": "Pokedex - Onix", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_096": { "label": "Pokedex - Drowzee", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_097": { "label": "Pokedex - Hypno", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_098": { "label": "Pokedex - Krabby", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_099": { "label": "Pokedex - Kingler", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_100": { "label": "Pokedex - Voltorb", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_101": { "label": "Pokedex - Electrode", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_102": { "label": "Pokedex - Exeggcute", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_103": { "label": "Pokedex - Exeggutor", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_104": { "label": "Pokedex - Cubone", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_105": { "label": "Pokedex - Marowak", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_106": { "label": "Pokedex - Hitmonlee", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_107": { "label": "Pokedex - Hitmonchan", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_108": { "label": "Pokedex - Lickitung", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_109": { "label": "Pokedex - Koffing", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_110": { "label": "Pokedex - Weezing", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_111": { "label": "Pokedex - Rhyhorn", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_112": { "label": "Pokedex - Rhydon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_113": { "label": "Pokedex - Chansey", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_114": { "label": "Pokedex - Tangela", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_115": { "label": "Pokedex - Kangaskhan", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_116": { "label": "Pokedex - Horsea", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_117": { "label": "Pokedex - Seadra", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_118": { "label": "Pokedex - Goldeen", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_119": { "label": "Pokedex - Seaking", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_120": { "label": "Pokedex - Staryu", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_121": { "label": "Pokedex - Starmie", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_122": { "label": "Pokedex - Mr. Mime", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_123": { "label": "Pokedex - Scyther", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_124": { "label": "Pokedex - Jynx", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_125": { "label": "Pokedex - Electabuzz", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_126": { "label": "Pokedex - Magmar", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_127": { "label": "Pokedex - Pinsir", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_128": { "label": "Pokedex - Tauros", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_129": { "label": "Pokedex - Magikarp", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_130": { "label": "Pokedex - Gyarados", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_131": { "label": "Pokedex - Lapras", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_132": { "label": "Pokedex - Ditto", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_133": { "label": "Pokedex - Eevee", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_134": { "label": "Pokedex - Vaporeon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_135": { "label": "Pokedex - Jolteon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_136": { "label": "Pokedex - Flareon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_137": { "label": "Pokedex - Porygon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_138": { "label": "Pokedex - Omanyte", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_139": { "label": "Pokedex - Omastar", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_140": { "label": "Pokedex - Kabuto", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_141": { "label": "Pokedex - Kabutops", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_142": { "label": "Pokedex - Aerodactyl", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_143": { "label": "Pokedex - Snorlax", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_144": { "label": "Pokedex - Articuno", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_145": { "label": "Pokedex - Zapdos", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_146": { "label": "Pokedex - Moltres", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_147": { "label": "Pokedex - Dratini", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_148": { "label": "Pokedex - Dragonair", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_149": { "label": "Pokedex - Dragonite", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_150": { "label": "Pokedex - Mewtwo", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_151": { "label": "Pokedex - Mew", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_152": { "label": "Pokedex - Chikorita", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_153": { "label": "Pokedex - Bayleef", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_154": { "label": "Pokedex - Meganium", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_155": { "label": "Pokedex - Cyndaquil", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_156": { "label": "Pokedex - Quilava", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_157": { "label": "Pokedex - Typhlosion", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_158": { "label": "Pokedex - Totodile", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_159": { "label": "Pokedex - Croconaw", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_160": { "label": "Pokedex - Feraligatr", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_161": { "label": "Pokedex - Sentret", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_162": { "label": "Pokedex - Furret", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_163": { "label": "Pokedex - Hoothoot", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_164": { "label": "Pokedex - Noctowl", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_165": { "label": "Pokedex - Ledyba", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_166": { "label": "Pokedex - Ledian", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_167": { "label": "Pokedex - Spinarak", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_168": { "label": "Pokedex - Ariados", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_169": { "label": "Pokedex - Crobat", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_170": { "label": "Pokedex - Chinchou", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_171": { "label": "Pokedex - Lanturn", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_172": { "label": "Pokedex - Pichu", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_173": { "label": "Pokedex - Cleffa", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_174": { "label": "Pokedex - Igglybuff", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_175": { "label": "Pokedex - Togepi", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_176": { "label": "Pokedex - Togetic", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_177": { "label": "Pokedex - Natu", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_178": { "label": "Pokedex - Xatu", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_179": { "label": "Pokedex - Mareep", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_180": { "label": "Pokedex - Flaaffy", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_181": { "label": "Pokedex - Ampharos", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_182": { "label": "Pokedex - Bellossom", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_183": { "label": "Pokedex - Marill", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_184": { "label": "Pokedex - Azumarill", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_185": { "label": "Pokedex - Sudowoodo", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_186": { "label": "Pokedex - Politoed", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_187": { "label": "Pokedex - Hoppip", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_188": { "label": "Pokedex - Skiploom", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_189": { "label": "Pokedex - Jumpluff", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_190": { "label": "Pokedex - Aipom", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_191": { "label": "Pokedex - Sunkern", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_192": { "label": "Pokedex - Sunflora", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_193": { "label": "Pokedex - Yanma", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_194": { "label": "Pokedex - Wooper", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_195": { "label": "Pokedex - Quagsire", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_196": { "label": "Pokedex - Espeon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_197": { "label": "Pokedex - Umbreon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_198": { "label": "Pokedex - Murkrow", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_199": { "label": "Pokedex - Slowking", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_200": { "label": "Pokedex - Misdreavus", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_201": { "label": "Pokedex - Unown", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_202": { "label": "Pokedex - Wobbuffet", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_203": { "label": "Pokedex - Girafarig", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_204": { "label": "Pokedex - Pineco", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_205": { "label": "Pokedex - Forretress", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_206": { "label": "Pokedex - Dunsparce", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_207": { "label": "Pokedex - Gligar", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_208": { "label": "Pokedex - Steelix", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_209": { "label": "Pokedex - Snubbull", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_210": { "label": "Pokedex - Granbull", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_211": { "label": "Pokedex - Qwilfish", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_212": { "label": "Pokedex - Scizor", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_213": { "label": "Pokedex - Shuckle", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_214": { "label": "Pokedex - Heracross", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_215": { "label": "Pokedex - Sneasel", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_216": { "label": "Pokedex - Teddiursa", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_217": { "label": "Pokedex - Ursaring", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_218": { "label": "Pokedex - Slugma", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_219": { "label": "Pokedex - Magcargo", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_220": { "label": "Pokedex - Swinub", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_221": { "label": "Pokedex - Piloswine", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_222": { "label": "Pokedex - Corsola", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_223": { "label": "Pokedex - Remoraid", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_224": { "label": "Pokedex - Octillery", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_225": { "label": "Pokedex - Delibird", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_226": { "label": "Pokedex - Mantine", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_227": { "label": "Pokedex - Skarmory", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_228": { "label": "Pokedex - Houndour", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_229": { "label": "Pokedex - Houndoom", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_230": { "label": "Pokedex - Kingdra", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_231": { "label": "Pokedex - Phanpy", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_232": { "label": "Pokedex - Donphan", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_233": { "label": "Pokedex - Porygon2", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_234": { "label": "Pokedex - Stantler", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_235": { "label": "Pokedex - Smeargle", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_236": { "label": "Pokedex - Tyrogue", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_237": { "label": "Pokedex - Hitmontop", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_238": { "label": "Pokedex - Smoochum", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_239": { "label": "Pokedex - Elekid", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_240": { "label": "Pokedex - Magby", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_241": { "label": "Pokedex - Miltank", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_242": { "label": "Pokedex - Blissey", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_243": { "label": "Pokedex - Raikou", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_244": { "label": "Pokedex - Entei", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_245": { "label": "Pokedex - Suicune", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_246": { "label": "Pokedex - Larvitar", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_247": { "label": "Pokedex - Pupitar", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_248": { "label": "Pokedex - Tyranitar", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_249": { "label": "Pokedex - Lugia", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_250": { "label": "Pokedex - Ho-Oh", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_251": { "label": "Pokedex - Celebi", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_252": { "label": "Pokedex - Treecko", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_253": { "label": "Pokedex - Grovyle", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_254": { "label": "Pokedex - Sceptile", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_255": { "label": "Pokedex - Torchic", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_256": { "label": "Pokedex - Combusken", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_257": { "label": "Pokedex - Blaziken", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_258": { "label": "Pokedex - Mudkip", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_259": { "label": "Pokedex - Marshtomp", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_260": { "label": "Pokedex - Swampert", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_261": { "label": "Pokedex - Poochyena", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_262": { "label": "Pokedex - Mightyena", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_263": { "label": "Pokedex - Zigzagoon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_264": { "label": "Pokedex - Linoone", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_265": { "label": "Pokedex - Wurmple", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_266": { "label": "Pokedex - Silcoon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_267": { "label": "Pokedex - Beautifly", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_268": { "label": "Pokedex - Cascoon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_269": { "label": "Pokedex - Dustox", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_270": { "label": "Pokedex - Lotad", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_271": { "label": "Pokedex - Lombre", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_272": { "label": "Pokedex - Ludicolo", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_273": { "label": "Pokedex - Seedot", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_274": { "label": "Pokedex - Nuzleaf", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_275": { "label": "Pokedex - Shiftry", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_276": { "label": "Pokedex - Taillow", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_277": { "label": "Pokedex - Swellow", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_278": { "label": "Pokedex - Wingull", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_279": { "label": "Pokedex - Pelipper", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_280": { "label": "Pokedex - Ralts", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_281": { "label": "Pokedex - Kirlia", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_282": { "label": "Pokedex - Gardevoir", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_283": { "label": "Pokedex - Surskit", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_284": { "label": "Pokedex - Masquerain", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_285": { "label": "Pokedex - Shroomish", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_286": { "label": "Pokedex - Breloom", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_287": { "label": "Pokedex - Slakoth", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_288": { "label": "Pokedex - Vigoroth", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_289": { "label": "Pokedex - Slaking", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_290": { "label": "Pokedex - Nincada", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_291": { "label": "Pokedex - Ninjask", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_292": { "label": "Pokedex - Shedinja", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_293": { "label": "Pokedex - Whismur", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_294": { "label": "Pokedex - Loudred", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_295": { "label": "Pokedex - Exploud", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_296": { "label": "Pokedex - Makuhita", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_297": { "label": "Pokedex - Hariyama", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_298": { "label": "Pokedex - Azurill", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_299": { "label": "Pokedex - Nosepass", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_300": { "label": "Pokedex - Skitty", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_301": { "label": "Pokedex - Delcatty", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_302": { "label": "Pokedex - Sableye", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_303": { "label": "Pokedex - Mawile", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_304": { "label": "Pokedex - Aron", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_305": { "label": "Pokedex - Lairon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_306": { "label": "Pokedex - Aggron", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_307": { "label": "Pokedex - Meditite", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_308": { "label": "Pokedex - Medicham", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_309": { "label": "Pokedex - Electrike", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_310": { "label": "Pokedex - Manectric", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_311": { "label": "Pokedex - Plusle", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_312": { "label": "Pokedex - Minun", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_313": { "label": "Pokedex - Volbeat", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_314": { "label": "Pokedex - Illumise", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_315": { "label": "Pokedex - Roselia", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_316": { "label": "Pokedex - Gulpin", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_317": { "label": "Pokedex - Swalot", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_318": { "label": "Pokedex - Carvanha", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_319": { "label": "Pokedex - Sharpedo", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_320": { "label": "Pokedex - Wailmer", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_321": { "label": "Pokedex - Wailord", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_322": { "label": "Pokedex - Numel", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_323": { "label": "Pokedex - Camerupt", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_324": { "label": "Pokedex - Torkoal", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_325": { "label": "Pokedex - Spoink", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_326": { "label": "Pokedex - Grumpig", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_327": { "label": "Pokedex - Spinda", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_328": { "label": "Pokedex - Trapinch", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_329": { "label": "Pokedex - Vibrava", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_330": { "label": "Pokedex - Flygon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_331": { "label": "Pokedex - Cacnea", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_332": { "label": "Pokedex - Cacturne", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_333": { "label": "Pokedex - Swablu", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_334": { "label": "Pokedex - Altaria", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_335": { "label": "Pokedex - Zangoose", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_336": { "label": "Pokedex - Seviper", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_337": { "label": "Pokedex - Lunatone", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_338": { "label": "Pokedex - Solrock", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_339": { "label": "Pokedex - Barboach", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_340": { "label": "Pokedex - Whiscash", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_341": { "label": "Pokedex - Corphish", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_342": { "label": "Pokedex - Crawdaunt", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_343": { "label": "Pokedex - Baltoy", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_344": { "label": "Pokedex - Claydol", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_345": { "label": "Pokedex - Lileep", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_346": { "label": "Pokedex - Cradily", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_347": { "label": "Pokedex - Anorith", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_348": { "label": "Pokedex - Armaldo", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_349": { "label": "Pokedex - Feebas", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_350": { "label": "Pokedex - Milotic", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_351": { "label": "Pokedex - Castform", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_352": { "label": "Pokedex - Kecleon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_353": { "label": "Pokedex - Shuppet", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_354": { "label": "Pokedex - Banette", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_355": { "label": "Pokedex - Duskull", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_356": { "label": "Pokedex - Dusclops", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_357": { "label": "Pokedex - Tropius", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_358": { "label": "Pokedex - Chimecho", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_359": { "label": "Pokedex - Absol", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_360": { "label": "Pokedex - Wynaut", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_361": { "label": "Pokedex - Snorunt", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_362": { "label": "Pokedex - Glalie", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_363": { "label": "Pokedex - Spheal", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_364": { "label": "Pokedex - Sealeo", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_365": { "label": "Pokedex - Walrein", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_366": { "label": "Pokedex - Clamperl", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_367": { "label": "Pokedex - Huntail", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_368": { "label": "Pokedex - Gorebyss", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_369": { "label": "Pokedex - Relicanth", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_370": { "label": "Pokedex - Luvdisc", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_371": { "label": "Pokedex - Bagon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_372": { "label": "Pokedex - Shelgon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_373": { "label": "Pokedex - Salamence", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_374": { "label": "Pokedex - Beldum", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_375": { "label": "Pokedex - Metang", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_376": { "label": "Pokedex - Metagross", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_377": { "label": "Pokedex - Regirock", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_378": { "label": "Pokedex - Regice", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_379": { "label": "Pokedex - Registeel", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_380": { "label": "Pokedex - Latias", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_381": { "label": "Pokedex - Latios", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_382": { "label": "Pokedex - Kyogre", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_383": { "label": "Pokedex - Groudon", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_384": { "label": "Pokedex - Rayquaza", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_385": { "label": "Pokedex - Jirachi", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "POKEDEX_REWARD_386": { "label": "Pokedex - Deoxys", - "tags": ["Pokedex"] + "tags": [], + "category": "POKEDEX" }, "TRAINER_AARON_REWARD": { "label": "Route 134 - Dragon Tamer Aaron", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ABIGAIL_1_REWARD": { "label": "Route 110 - Triathlete Abigail", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_AIDAN_REWARD": { "label": "Route 127 - Bird Keeper Aidan", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_AISHA_REWARD": { "label": "Route 117 - Battle Girl Aisha", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ALBERTO_REWARD": { "label": "Route 123 - Bird Keeper Alberto", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ALBERT_REWARD": { "label": "Victory Road 1F - Cooltrainer Albert", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ALEXA_REWARD": { "label": "Route 128 - Cooltrainer Alexa", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ALEXIA_REWARD": { "label": "Petalburg Gym - Cooltrainer Alexia", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ALEX_REWARD": { "label": "Route 134 - Bird Keeper Alex", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ALICE_REWARD": { "label": "Route 109 - Swimmer Alice", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ALIX_REWARD": { "label": "Route 115 - Psychic Alix", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ALLEN_REWARD": { "label": "Route 102 - Youngster Allen", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ALLISON_REWARD": { "label": "Route 129 - Triathlete Allison", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ALYSSA_REWARD": { "label": "Route 110 - Triathlete Alyssa", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_AMY_AND_LIV_1_REWARD": { "label": "Route 103 - Twins Amy and Liv", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ANNA_AND_MEG_1_REWARD": { "label": "Route 117 - Sr. and Jr. Anna and Meg", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ANDREA_REWARD": { "label": "Sootopolis Gym - Lass Andrea", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ANDRES_1_REWARD": { "label": "Route 105 - Ruin Maniac Andres", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ANDREW_REWARD": { "label": "Route 103 - Fisherman Andrew", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ANGELICA_REWARD": { "label": "Route 120 - Parasol Lady Angelica", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ANGELINA_REWARD": { "label": "Route 114 - Picnicker Angelina", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ANGELO_REWARD": { "label": "Mauville Gym - Bug Maniac Angelo", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ANNIKA_REWARD": { "label": "Sootopolis Gym - Pokefan Annika", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ANTHONY_REWARD": { "label": "Route 110 - Triathlete Anthony", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ARCHIE_REWARD": { "label": "Seafloor Cavern Room 9 - Aqua Leader Archie", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ASHLEY_REWARD": { "label": "Fortree Gym - Picnicker Ashley", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ATHENA_REWARD": { "label": "Route 127 - Cooltrainer Athena", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ATSUSHI_REWARD": { "label": "Mt Pyre 5F - Black Belt Atsushi", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_AURON_REWARD": { "label": "Route 125 - Expert Auron", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_AUSTINA_REWARD": { "label": "Route 109 - Tuber Austina", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_AUTUMN_REWARD": { "label": "Jagged Pass - Picnicker Autumn", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_AXLE_REWARD": { "label": "Lavaridge Gym - Kindler Axle", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BARNY_REWARD": { "label": "Route 118 - Fisherman Barny", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BARRY_REWARD": { "label": "Route 126 - Swimmer Barry", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BEAU_REWARD": { "label": "Route 111 - Camper Beau", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BECKY_REWARD": { "label": "Route 111 - Picnicker Becky", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BECK_REWARD": { "label": "Route 133 - Bird Keeper Beck", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BENJAMIN_1_REWARD": { "label": "Route 110 - Triathlete Benjamin", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BEN_REWARD": { "label": "Mauville Gym - Youngster Ben", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BERKE_REWARD": { "label": "Petalburg Gym - Cooltrainer Berke", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BERNIE_1_REWARD": { "label": "Route 114 - Kindler Bernie", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BETHANY_REWARD": { "label": "Sootopolis Gym - Pokefan Bethany", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BETH_REWARD": { "label": "Route 107 - Swimmer Beth", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BEVERLY_REWARD": { "label": "Route 105 - Swimmer Beverly", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BIANCA_REWARD": { "label": "Route 111 - Picnicker Bianca", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BILLY_REWARD": { "label": "Route 104 - Youngster Billy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BLAKE_REWARD": { "label": "Mossdeep Gym - Psychic Blake", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRANDEN_REWARD": { "label": "Route 111 - Camper Branden", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRANDI_REWARD": { "label": "Route 117 - Psychic Brandi", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRAWLY_1_REWARD": { "label": "Dewford Gym - Leader Brawly", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRAXTON_REWARD": { "label": "Route 123 - Cooltrainer Braxton", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRENDAN_LILYCOVE_MUDKIP_REWARD": { "label": "Lilycove City - Rival Brendan/May", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRENDAN_ROUTE_103_MUDKIP_REWARD": { "label": "Route 103 - Rival Brendan/May", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRENDAN_ROUTE_110_MUDKIP_REWARD": { "label": "Route 110 - Rival Brendan/May", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRENDAN_ROUTE_119_MUDKIP_REWARD": { "label": "Route 119 - Rival Brendan/May", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRENDAN_RUSTBORO_MUDKIP_REWARD": { "label": "Rustboro City - Rival Brendan/May", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRENDA_REWARD": { "label": "Route 126 - Swimmer Brenda", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRENDEN_REWARD": { "label": "Dewford Gym - Sailor Brenden", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRENT_REWARD": { "label": "Route 119 - Bug Maniac Brent", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRIANNA_REWARD": { "label": "Sootopolis Gym - Lady Brianna", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRICE_REWARD": { "label": "Route 112 - Hiker Brice", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRIDGET_REWARD": { "label": "Sootopolis Gym - Beauty Bridget", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BROOKE_1_REWARD": { "label": "Route 111 - Cooltrainer Brooke", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRYANT_REWARD": { "label": "Route 112 - Kindler Bryant", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_BRYAN_REWARD": { "label": "Route 111 - Ruin Maniac Bryan", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CALE_REWARD": { "label": "Route 121 - Bug Maniac Cale", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CALLIE_REWARD": { "label": "Route 120 - Battle Girl Callie", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CALVIN_1_REWARD": { "label": "Route 102 - Youngster Calvin", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CAMDEN_REWARD": { "label": "Route 127 - Triathlete Camden", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CAMERON_1_REWARD": { "label": "Route 123 - Psychic Cameron", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CAMRON_REWARD": { "label": "Route 107 - Triathlete Camron", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CARLEE_REWARD": { "label": "Route 128 - Swimmer Carlee", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CAROLINA_REWARD": { "label": "Route 108 - Cooltrainer Carolina", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CAROLINE_REWARD": { "label": "Victory Road B2F - Cooltrainer Caroline", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CAROL_REWARD": { "label": "Route 112 - Picnicker Carol", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CARTER_REWARD": { "label": "Route 109 - Fisherman Carter", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CATHERINE_1_REWARD": { "label": "Route 119 - Pokemon Ranger Catherine", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CEDRIC_REWARD": { "label": "Mt Pyre 6F - Psychic Cedric", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CELIA_REWARD": { "label": "Route 111 - Picnicker Celia", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CELINA_REWARD": { "label": "Route 111 - Aroma Lady Celina", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CHAD_REWARD": { "label": "Route 124 - Swimmer Chad", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CHANDLER_REWARD": { "label": "Route 109 - Tuber Chandler", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CHARLIE_REWARD": { "label": "Abandoned Ship 1F - Tuber Charlie", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CHARLOTTE_REWARD": { "label": "Route 114 - Picnicker Charlotte", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CHASE_REWARD": { "label": "Route 129 - Triathlete Chase", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CHESTER_REWARD": { "label": "Route 118 - Bird Keeper Chester", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CHIP_REWARD": { "label": "Route 120 - Ruin Maniac Chip", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CHRIS_REWARD": { "label": "Route 119 - Fisherman Chris", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CINDY_1_REWARD": { "label": "Route 104 - Lady Cindy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CLARENCE_REWARD": { "label": "Route 129 - Swimmer Clarence", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CLARISSA_REWARD": { "label": "Route 120 - Parasol Lady Clarissa", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CLARK_REWARD": { "label": "Route 116 - Hiker Clark", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CLAUDE_REWARD": { "label": "Route 114 - Fisherman Claude", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CLIFFORD_REWARD": { "label": "Mossdeep Gym - Gentleman Clifford", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_COBY_REWARD": { "label": "Route 113 - Bird Keeper Coby", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_COLE_REWARD": { "label": "Lavaridge Gym - Kindler Cole", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_COLIN_REWARD": { "label": "Route 120 - Bird Keeper Colin", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_COLTON_REWARD": { "label": "SS Tidal - Pokefan Colton", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CONNIE_REWARD": { "label": "Sootopolis Gym - Beauty Connie", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CONOR_REWARD": { "label": "Route 133 - Expert Conor", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CORY_1_REWARD": { "label": "Route 108 - Sailor Cory", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CRISSY_REWARD": { "label": "Sootopolis Gym - Lass Crissy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CRISTIAN_REWARD": { "label": "Dewford Gym - Black Belt Cristian", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CRISTIN_1_REWARD": { "label": "Route 121 - Cooltrainer Cristin", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_CYNDY_1_REWARD": { "label": "Route 115 - Battle Girl Cyndy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DAISUKE_REWARD": { "label": "Route 111 - Black Belt Daisuke", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DAISY_REWARD": { "label": "Route 103 - Aroma Lady Daisy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DALE_REWARD": { "label": "Route 110 - Fisherman Dale", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DALTON_1_REWARD": { "label": "Route 118 - Guitarist Dalton", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DANA_REWARD": { "label": "Route 132 - Swimmer Dana", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DANIELLE_REWARD": { "label": "Lavaridge Gym - Battle Girl Danielle", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DAPHNE_REWARD": { "label": "Sootopolis Gym - Lady Daphne", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DARCY_REWARD": { "label": "Route 132 - Cooltrainer Darcy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DARIAN_REWARD": { "label": "Route 104 - Fisherman Darian", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DARIUS_REWARD": { "label": "Fortree Gym - Bird Keeper Darius", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DARRIN_REWARD": { "label": "Route 107 - Swimmer Darrin", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DAVID_REWARD": { "label": "Route 109 - Swimmer David", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DAVIS_REWARD": { "label": "Route 123 - Bug Catcher Davis", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DAWSON_REWARD": { "label": "Route 116 - Rich Boy Dawson", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DAYTON_REWARD": { "label": "Route 119 - Kindler Dayton", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DEANDRE_REWARD": { "label": "Route 118 - Youngster Deandre", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DEAN_REWARD": { "label": "Route 126 - Swimmer Dean", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DEBRA_REWARD": { "label": "Route 133 - Swimmer Debra", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DECLAN_REWARD": { "label": "Route 124 - Swimmer Declan", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DEMETRIUS_REWARD": { "label": "Abandoned Ship 1F - Youngster Demetrius", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DENISE_REWARD": { "label": "Route 107 - Swimmer Denise", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DEREK_REWARD": { "label": "Route 117 - Bug Maniac Derek", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DEVAN_REWARD": { "label": "Route 116 - Hiker Devan", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DIANA_1_REWARD": { "label": "Jagged Pass - Picnicker Diana", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DIANNE_REWARD": { "label": "Victory Road B2F - Cooltrainer Dianne", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DILLON_REWARD": { "label": "Route 113 - Youngster Dillon", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DOMINIK_REWARD": { "label": "Route 105 - Swimmer Dominik", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DONALD_REWARD": { "label": "Route 119 - Bug Maniac Donald", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DONNY_REWARD": { "label": "Route 127 - Triathlete Donny", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DOUGLAS_REWARD": { "label": "Route 106 - Swimmer Douglas", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DOUG_REWARD": { "label": "Route 119 - Bug Catcher Doug", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DRAKE_REWARD": { "label": "Ever Grande City - Elite Four Drake", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DREW_REWARD": { "label": "Route 111 - Camper Drew", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DUNCAN_REWARD": { "label": "Abandoned Ship B1F - Sailor Duncan", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DUSTY_1_REWARD": { "label": "Route 111 - Ruin Maniac Dusty", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DWAYNE_REWARD": { "label": "Route 109 - Sailor Dwayne", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DYLAN_1_REWARD": { "label": "Route 117 - Triathlete Dylan", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_DEZ_AND_LUKE_REWARD": { "label": "Mt Pyre 2F - Young Couple Dez and Luke", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_EDGAR_REWARD": { "label": "Victory Road 1F - Cooltrainer Edgar", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_EDMOND_REWARD": { "label": "Route 109 - Sailor Edmond", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_EDWARDO_REWARD": { "label": "Fortree Gym - Bird Keeper Edwardo", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_EDWARD_REWARD": { "label": "Route 110 - Psychic Edward", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_EDWIN_1_REWARD": { "label": "Route 110 - Collector Edwin", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ED_REWARD": { "label": "Route 123 - Collector Ed", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ELIJAH_REWARD": { "label": "Route 109 - Bird Keeper Elijah", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ELI_REWARD": { "label": "Lavaridge Gym - Hiker Eli", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ELLIOT_1_REWARD": { "label": "Route 106 - Fisherman Elliot", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ERIC_REWARD": { "label": "Jagged Pass - Hiker Eric", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ERNEST_1_REWARD": { "label": "Route 125 - Sailor Ernest", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ETHAN_1_REWARD": { "label": "Jagged Pass - Camper Ethan", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_FABIAN_REWARD": { "label": "Route 119 - Guitarist Fabian", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_FELIX_REWARD": { "label": "Victory Road B2F - Cooltrainer Felix", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_FERNANDO_1_REWARD": { "label": "Route 123 - Guitarist Fernando", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_FLANNERY_1_REWARD": { "label": "Lavaridge Gym - Leader Flannery", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_FLINT_REWARD": { "label": "Fortree Gym - Camper Flint", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_FOSTER_REWARD": { "label": "Route 105 - Ruin Maniac Foster", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_FRANKLIN_REWARD": { "label": "Route 133 - Swimmer Franklin", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_FREDRICK_REWARD": { "label": "Route 123 - Expert Fredrick", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GABRIELLE_1_REWARD": { "label": "Mt Pyre 3F - Pokemon Breeder Gabrielle", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GARRET_REWARD": { "label": "SS Tidal - Rich Boy Garret", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GARRISON_REWARD": { "label": "Abandoned Ship 1F - Ruin Maniac Garrison", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GEORGE_REWARD": { "label": "Petalburg Gym - Cooltrainer George", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GERALD_REWARD": { "label": "Lavaridge Gym - Cooltrainer Gerald", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GILBERT_REWARD": { "label": "Route 132 - Swimmer Gilbert", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GINA_AND_MIA_1_REWARD": { "label": "Route 104 - Twins Gina and Mia", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GLACIA_REWARD": { "label": "Ever Grande City - Elite Four Glacia", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRACE_REWARD": { "label": "Route 124 - Swimmer Grace", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GREG_REWARD": { "label": "Route 119 - Bug Catcher Greg", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_AQUA_HIDEOUT_1_REWARD": { "label": "Aqua Hideout 1F - Team Aqua Grunt", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_AQUA_HIDEOUT_2_REWARD": { "label": "Aqua Hideout B1F - Team Aqua Grunt 2", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_AQUA_HIDEOUT_3_REWARD": { "label": "Aqua Hideout B1F - Team Aqua Grunt 4", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_AQUA_HIDEOUT_4_REWARD": { "label": "Aqua Hideout B2F - Team Aqua Grunt 1", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_AQUA_HIDEOUT_5_REWARD": { "label": "Aqua Hideout B1F - Team Aqua Grunt 1", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_AQUA_HIDEOUT_6_REWARD": { "label": "Aqua Hideout B2F - Team Aqua Grunt 2", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_AQUA_HIDEOUT_7_REWARD": { "label": "Aqua Hideout B1F - Team Aqua Grunt 3", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_AQUA_HIDEOUT_8_REWARD": { "label": "Aqua Hideout B2F - Team Aqua Grunt 3", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MAGMA_HIDEOUT_10_REWARD": { "label": "Magma Hideout 3F - Team Magma Grunt 3", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MAGMA_HIDEOUT_11_REWARD": { "label": "Magma Hideout 4F - Team Magma Grunt 1", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MAGMA_HIDEOUT_12_REWARD": { "label": "Magma Hideout 4F - Team Magma Grunt 2", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MAGMA_HIDEOUT_13_REWARD": { "label": "Magma Hideout 4F - Team Magma Grunt 3", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MAGMA_HIDEOUT_14_REWARD": { "label": "Magma Hideout 2F - Team Magma Grunt 2", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MAGMA_HIDEOUT_15_REWARD": { "label": "Magma Hideout 2F - Team Magma Grunt 5", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MAGMA_HIDEOUT_16_REWARD": { "label": "Magma Hideout 3F - Team Magma Grunt 2", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MAGMA_HIDEOUT_1_REWARD": { "label": "Magma Hideout 1F - Team Magma Grunt 2", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MAGMA_HIDEOUT_2_REWARD": { "label": "Magma Hideout 1F - Team Magma Grunt 1", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MAGMA_HIDEOUT_3_REWARD": { "label": "Magma Hideout 2F - Team Magma Grunt 1", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MAGMA_HIDEOUT_4_REWARD": { "label": "Magma Hideout 2F - Team Magma Grunt 4", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MAGMA_HIDEOUT_5_REWARD": { "label": "Magma Hideout 2F - Team Magma Grunt 3", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MAGMA_HIDEOUT_6_REWARD": { "label": "Magma Hideout 2F - Team Magma Grunt 6", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MAGMA_HIDEOUT_7_REWARD": { "label": "Magma Hideout 2F - Team Magma Grunt 7", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MAGMA_HIDEOUT_8_REWARD": { "label": "Magma Hideout 2F - Team Magma Grunt 8", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MAGMA_HIDEOUT_9_REWARD": { "label": "Magma Hideout 3F - Team Magma Grunt 1", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MT_CHIMNEY_1_REWARD": { "label": "Mt Chimney - Team Magma Grunt 1", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MT_CHIMNEY_2_REWARD": { "label": "Mt Chimney - Team Magma Grunt 2", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MT_PYRE_1_REWARD": { "label": "Mt Pyre Summit - Team Aqua Grunt 2", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MT_PYRE_2_REWARD": { "label": "Mt Pyre Summit - Team Aqua Grunt 1", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MT_PYRE_3_REWARD": { "label": "Mt Pyre Summit - Team Aqua Grunt 4", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MT_PYRE_4_REWARD": { "label": "Mt Pyre Summit - Team Aqua Grunt 3", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MUSEUM_1_REWARD": { "label": "Oceanic Museum - Team Aqua Grunt 1", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_MUSEUM_2_REWARD": { "label": "Oceanic Museum - Team Aqua Grunt 2", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_PETALBURG_WOODS_REWARD": { "label": "Petalburg Woods - Team Aqua Grunt", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_RUSTURF_TUNNEL_REWARD": { "label": "Rusturf Tunnel - Team Aqua Grunt", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_SEAFLOOR_CAVERN_1_REWARD": { "label": "Seafloor Cavern Room 1 - Team Aqua Grunt 1", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_SEAFLOOR_CAVERN_2_REWARD": { "label": "Seafloor Cavern Room 1 - Team Aqua Grunt 2", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_SEAFLOOR_CAVERN_3_REWARD": { "label": "Seafloor Cavern Room 4 - Team Aqua Grunt 1", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_SEAFLOOR_CAVERN_4_REWARD": { "label": "Seafloor Cavern Room 4 - Team Aqua Grunt 2", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_SEAFLOOR_CAVERN_5_REWARD": { "label": "Seafloor Cavern Room 3 - Team Aqua Grunt", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_SPACE_CENTER_1_REWARD": { "label": "Space Center - Team Magma Grunt 2", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_SPACE_CENTER_2_REWARD": { "label": "Space Center - Team Magma Grunt 4", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_SPACE_CENTER_3_REWARD": { "label": "Space Center - Team Magma Grunt 1", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_SPACE_CENTER_4_REWARD": { "label": "Space Center - Team Magma Grunt 3", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_SPACE_CENTER_5_REWARD": { "label": "Space Center - Team Magma Grunt 5", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_SPACE_CENTER_6_REWARD": { "label": "Space Center - Team Magma Grunt 6", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_SPACE_CENTER_7_REWARD": { "label": "Space Center - Team Magma Grunt 7", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_WEATHER_INST_1_REWARD": { "label": "Weather Institute 1F - Team Aqua Grunt 2", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_WEATHER_INST_2_REWARD": { "label": "Weather Institute 2F - Team Aqua Grunt 1", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_WEATHER_INST_3_REWARD": { "label": "Weather Institute 2F - Team Aqua Grunt 3", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_WEATHER_INST_4_REWARD": { "label": "Weather Institute 1F - Team Aqua Grunt 1", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GRUNT_WEATHER_INST_5_REWARD": { "label": "Weather Institute 2F - Team Aqua Grunt 2", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_GWEN_REWARD": { "label": "Route 109 - Tuber Gwen", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HAILEY_REWARD": { "label": "Route 109 - Tuber Hailey", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HALEY_1_REWARD": { "label": "Route 104 - Lass Haley", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HALLE_REWARD": { "label": "Victory Road B1F - Cooltrainer Halle", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HANNAH_REWARD": { "label": "Mossdeep Gym - Psychic Hannah", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HARRISON_REWARD": { "label": "Route 128 - Swimmer Harrison", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HAYDEN_REWARD": { "label": "Route 111 - Kindler Hayden", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HECTOR_REWARD": { "label": "Route 115 - Collector Hector", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HEIDI_REWARD": { "label": "Route 111 - Picnicker Heidi", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HELENE_REWARD": { "label": "Route 115 - Battle Girl Helene", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HENRY_REWARD": { "label": "Route 127 - Fisherman Henry", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HERMAN_REWARD": { "label": "Route 131 - Swimmer Herman", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HIDEO_REWARD": { "label": "Route 119 - Ninja Boy Hideo", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HITOSHI_REWARD": { "label": "Route 134 - Black Belt Hitoshi", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HOPE_REWARD": { "label": "Victory Road 1F - Cooltrainer Hope", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HUDSON_REWARD": { "label": "Route 134 - Sailor Hudson", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HUEY_REWARD": { "label": "Route 109 - Sailor Huey", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HUGH_REWARD": { "label": "Route 119 - Bird Keeper Hugh", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_HUMBERTO_REWARD": { "label": "Fortree Gym - Bird Keeper Humberto", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_IMANI_REWARD": { "label": "Route 105 - Swimmer Imani", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_IRENE_REWARD": { "label": "Route 111 - Picnicker Irene", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ISAAC_1_REWARD": { "label": "Route 117 - Pokemon Breeder Isaac", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ISABELLA_REWARD": { "label": "Route 124 - Triathlete Isabella", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ISABELLE_REWARD": { "label": "Route 103 - Swimmer Isabelle", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ISABEL_1_REWARD": { "label": "Route 110 - Pokefan Isabel", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ISAIAH_1_REWARD": { "label": "Route 128 - Triathlete Isaiah", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ISOBEL_REWARD": { "label": "Route 126 - Triathlete Isobel", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_IVAN_REWARD": { "label": "Route 104 - Fisherman Ivan", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JACE_REWARD": { "label": "Lavaridge Gym - Kindler Jace", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JACKI_1_REWARD": { "label": "Route 123 - Psychic Jacki", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JACKSON_1_REWARD": { "label": "Route 119 - Pokemon Ranger Jackson", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JACK_REWARD": { "label": "Route 134 - Swimmer Jack", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JACLYN_REWARD": { "label": "Route 110 - Psychic Jaclyn", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JACOB_REWARD": { "label": "Route 110 - Triathlete Jacob", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JAIDEN_REWARD": { "label": "Route 115 - Ninja Boy Jaiden", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JAMES_1_REWARD": { "label": "Petalburg Woods - Bug Catcher James", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JANICE_REWARD": { "label": "Route 116 - Lass Janice", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JANI_REWARD": { "label": "Abandoned Ship 1F - Tuber Jani", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JARED_REWARD": { "label": "Fortree Gym - Bird Keeper Jared", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JASMINE_REWARD": { "label": "Route 110 - Triathlete Jasmine", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JAYLEN_REWARD": { "label": "Route 113 - Youngster Jaylen", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JAZMYN_REWARD": { "label": "Route 123 - Cooltrainer Jazmyn", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JEFFREY_1_REWARD": { "label": "Route 120 - Bug Maniac Jeffrey", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JEFF_REWARD": { "label": "Lavaridge Gym - Kindler Jeff", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JENNA_REWARD": { "label": "Route 120 - Pokemon Ranger Jenna", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JENNIFER_REWARD": { "label": "Route 120 - Cooltrainer Jennifer", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JENNY_1_REWARD": { "label": "Route 124 - Swimmer Jenny", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JEROME_REWARD": { "label": "Route 108 - Swimmer Jerome", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JERRY_1_REWARD": { "label": "Route 116 - School Kid Jerry", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JESSICA_1_REWARD": { "label": "Route 121 - Beauty Jessica", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JOCELYN_REWARD": { "label": "Dewford Gym - Battle Girl Jocelyn", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JODY_REWARD": { "label": "Petalburg Gym - Cooltrainer Jody", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JOEY_REWARD": { "label": "Route 116 - Youngster Joey", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JOHANNA_REWARD": { "label": "Route 109 - Beauty Johanna", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JOHN_AND_JAY_1_REWARD": { "label": "Meteor Falls 1F - Old Couple John and Jay", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JOHNSON_REWARD": { "label": "Route 116 - Youngster Johnson", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JONAH_REWARD": { "label": "Route 127 - Fisherman Jonah", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JONAS_REWARD": { "label": "Route 123 - Ninja Boy Jonas", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JONATHAN_REWARD": { "label": "Route 132 - Cooltrainer Jonathan", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JOSEPH_REWARD": { "label": "Route 110 - Guitarist Joseph", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JOSE_REWARD": { "label": "Route 116 - Bug Catcher Jose", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JOSH_REWARD": { "label": "Rustboro Gym - Youngster Josh", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JOSUE_REWARD": { "label": "Route 105 - Bird Keeper Josue", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JUAN_1_REWARD": { "label": "Sootopolis Gym - Leader Juan", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JULIE_REWARD": { "label": "Victory Road B2F - Cooltrainer Julie", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_JULIO_REWARD": { "label": "Jagged Pass - Triathlete Julio", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KAI_REWARD": { "label": "Route 114 - Fisherman Kai", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KALEB_REWARD": { "label": "Route 110 - Pokefan Kaleb", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KARA_REWARD": { "label": "Route 131 - Swimmer Kara", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KAREN_1_REWARD": { "label": "Route 116 - School Kid Karen", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KATE_AND_JOY_REWARD": { "label": "Route 121 - Sr. and Jr. Kate and Joy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KATELYNN_REWARD": { "label": "Victory Road 1F - Cooltrainer Katelynn", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KATELYN_1_REWARD": { "label": "Route 128 - Triathlete Katelyn", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KATHLEEN_REWARD": { "label": "Mossdeep Gym - Hex Maniac Kathleen", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KATIE_REWARD": { "label": "Route 130 - Swimmer Katie", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KAYLA_REWARD": { "label": "Mt Pyre 3F - Psychic Kayla", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KAYLEY_REWARD": { "label": "Route 123 - Parasol Lady Kayley", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KEEGAN_REWARD": { "label": "Lavaridge Gym - Kindler Keegan", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KEIGO_REWARD": { "label": "Route 120 - Ninja Boy Keigo", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KELVIN_REWARD": { "label": "Route 134 - Sailor Kelvin", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KENT_REWARD": { "label": "Route 119 - Bug Catcher Kent", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KEVIN_REWARD": { "label": "Route 131 - Swimmer Kevin", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KIM_AND_IRIS_REWARD": { "label": "Route 125 - Sr. and Jr. Kim and Iris", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KINDRA_REWARD": { "label": "Route 123 - Hex Maniac Kindra", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KIRA_AND_DAN_1_REWARD": { "label": "Abandoned Ship 1F - Young Couple Kira and Dan", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KIRK_REWARD": { "label": "Mauville Gym - Guitarist Kirk", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KIYO_REWARD": { "label": "Route 132 - Black Belt Kiyo", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KOICHI_REWARD": { "label": "Route 115 - Black Belt Koichi", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KOJI_1_REWARD": { "label": "Route 127 - Black Belt Koji", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KYLA_REWARD": { "label": "Route 106 - Swimmer Kyla", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_KYRA_REWARD": { "label": "Route 115 - Triathlete Kyra", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LAO_1_REWARD": { "label": "Route 113 - Ninja Boy Lao", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LARRY_REWARD": { "label": "Route 112 - Camper Larry", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LAURA_REWARD": { "label": "Dewford Gym - Battle Girl Laura", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LAUREL_REWARD": { "label": "Route 134 - Swimmer Laurel", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LAWRENCE_REWARD": { "label": "Route 113 - Camper Lawrence", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LEA_AND_JED_REWARD": { "label": "SS Tidal - Young Couple Lea and Jed", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LEAH_REWARD": { "label": "Mt Pyre 2F - Hex Maniac Leah", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LENNY_REWARD": { "label": "Route 114 - Hiker Lenny", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LEONARDO_REWARD": { "label": "Route 126 - Swimmer Leonardo", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LEONARD_REWARD": { "label": "SS Tidal - Sailor Leonard", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LEONEL_REWARD": { "label": "Route 120 - Cooltrainer Leonel", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LILA_AND_ROY_1_REWARD": { "label": "Route 124 - Sis and Bro Lila and Roy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LILITH_REWARD": { "label": "Dewford Gym - Battle Girl Lilith", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LINDA_REWARD": { "label": "Route 133 - Swimmer Linda", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LISA_AND_RAY_REWARD": { "label": "Route 107 - Sis and Bro Lisa and Ray", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LOLA_1_REWARD": { "label": "Route 109 - Tuber Lola", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LORENZO_REWARD": { "label": "Route 120 - Pokemon Ranger Lorenzo", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LUCAS_1_REWARD": { "label": "Route 114 - Hiker Lucas", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LUIS_REWARD": { "label": "Route 105 - Swimmer Luis", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LUNG_REWARD": { "label": "Route 113 - Ninja Boy Lung", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LYDIA_1_REWARD": { "label": "Route 117 - Pokemon Breeder Lydia", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_LYLE_REWARD": { "label": "Petalburg Woods - Bug Catcher Lyle", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MACEY_REWARD": { "label": "Mossdeep Gym - Psychic Macey", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MADELINE_1_REWARD": { "label": "Route 113 - Parasol Lady Madeline", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MAKAYLA_REWARD": { "label": "Route 132 - Expert Makayla", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MARCEL_REWARD": { "label": "Route 121 - Cooltrainer Marcel", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MARCOS_REWARD": { "label": "Route 103 - Guitarist Marcos", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MARC_REWARD": { "label": "Rustboro Gym - Hiker Marc", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MARIA_1_REWARD": { "label": "Route 117 - Triathlete Maria", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MARK_REWARD": { "label": "Mt Pyre 2F - Pokemaniac Mark", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MARLENE_REWARD": { "label": "Route 115 - Psychic Marlene", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MARLEY_REWARD": { "label": "Route 134 - Cooltrainer Marley", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MARY_REWARD": { "label": "Petalburg Gym - Cooltrainer Mary", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MATTHEW_REWARD": { "label": "Route 108 - Swimmer Matthew", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MATT_REWARD": { "label": "Aqua Hideout B2F - Aqua Admin Matt", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MAURA_REWARD": { "label": "Mossdeep Gym - Psychic Maura", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MAXIE_MAGMA_HIDEOUT_REWARD": { "label": "Magma Hideout 4F - Magma Leader Maxie", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MAXIE_MT_CHIMNEY_REWARD": { "label": "Mt Chimney - Magma Leader Maxie", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MEL_AND_PAUL_REWARD": { "label": "Route 109 - Young Couple Mel and Paul", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MELINA_REWARD": { "label": "Route 117 - Triathlete Melina", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MELISSA_REWARD": { "label": "Mt Chimney - Beauty Melissa", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MICAH_REWARD": { "label": "SS Tidal - Gentleman Micah", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MICHELLE_REWARD": { "label": "Victory Road B1F - Cooltrainer Michelle", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MIGUEL_1_REWARD": { "label": "Route 103 - Pokefan Miguel", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MIKE_2_REWARD": { "label": "Rusturf Tunnel - Hiker Mike", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MISSY_REWARD": { "label": "Route 108 - Swimmer Missy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MITCHELL_REWARD": { "label": "Victory Road B1F - Cooltrainer Mitchell", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MIU_AND_YUKI_REWARD": { "label": "Route 123 - Twins Miu and Yuki", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MOLLIE_REWARD": { "label": "Route 133 - Expert Mollie", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_MYLES_REWARD": { "label": "Route 121 - Pokemon Breeder Myles", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_NANCY_REWARD": { "label": "Route 114 - Picnicker Nancy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_NAOMI_REWARD": { "label": "SS Tidal - Lady Naomi", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_NATE_REWARD": { "label": "Mossdeep Gym - Gentleman Nate", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_NED_REWARD": { "label": "Route 106 - Fisherman Ned", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_NICHOLAS_REWARD": { "label": "Mossdeep Gym - Psychic Nicholas", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_NICOLAS_1_REWARD": { "label": "Meteor Falls 1F - Dragon Tamer Nicolas", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_NIKKI_REWARD": { "label": "Route 126 - Swimmer Nikki", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_NOB_1_REWARD": { "label": "Route 115 - Black Belt Nob", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_NOLAN_REWARD": { "label": "Route 114 - Fisherman Nolan", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_NOLEN_REWARD": { "label": "Route 125 - Swimmer Nolen", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_NORMAN_1_REWARD": { "label": "Petalburg Gym - Leader Norman", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_OLIVIA_REWARD": { "label": "Sootopolis Gym - Beauty Olivia", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_OWEN_REWARD": { "label": "Victory Road B2F - Cooltrainer Owen", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_PABLO_1_REWARD": { "label": "Route 126 - Triathlete Pablo", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_PARKER_REWARD": { "label": "Petalburg Gym - Cooltrainer Parker", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_PAT_REWARD": { "label": "Route 121 - Pokemon Breeder Pat", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_PAXTON_REWARD": { "label": "Route 132 - Expert Paxton", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_PERRY_REWARD": { "label": "Route 118 - Bird Keeper Perry", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_PETE_REWARD": { "label": "Route 103 - Swimmer Pete", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_PHILLIP_REWARD": { "label": "SS Tidal - Sailor Phillip", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_PHIL_REWARD": { "label": "Route 119 - Bird Keeper Phil", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_PHOEBE_REWARD": { "label": "Ever Grande City - Elite Four Phoebe", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_PRESLEY_REWARD": { "label": "Route 125 - Bird Keeper Presley", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_PRESTON_REWARD": { "label": "Mossdeep Gym - Psychic Preston", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_QUINCY_REWARD": { "label": "Victory Road 1F - Cooltrainer Quincy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_RACHEL_REWARD": { "label": "Route 119 - Parasol Lady Rachel", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_RANDALL_REWARD": { "label": "Petalburg Gym - Cooltrainer Randall", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_REED_REWARD": { "label": "Route 129 - Swimmer Reed", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_RELI_AND_IAN_REWARD": { "label": "Route 131 - Sis and Bro Reli and Ian", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_REYNA_REWARD": { "label": "Route 134 - Battle Girl Reyna", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_RHETT_REWARD": { "label": "Route 103 - Black Belt Rhett", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_RICHARD_REWARD": { "label": "Route 131 - Swimmer Richard", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_RICKY_1_REWARD": { "label": "Route 109 - Tuber Ricky", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_RICK_REWARD": { "label": "Route 102 - Bug Catcher Rick", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_RILEY_REWARD": { "label": "Route 120 - Ninja Boy Riley", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ROBERT_1_REWARD": { "label": "Route 120 - Bird Keeper Robert", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_RODNEY_REWARD": { "label": "Route 130 - Swimmer Rodney", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ROGER_REWARD": { "label": "Route 127 - Fisherman Roger", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ROLAND_REWARD": { "label": "Route 124 - Swimmer Roland", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_RONALD_REWARD": { "label": "Route 132 - Fisherman Ronald", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ROSE_1_REWARD": { "label": "Route 118 - Aroma Lady Rose", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ROXANNE_1_REWARD": { "label": "Rustboro Gym - Leader Roxanne", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_RUBEN_REWARD": { "label": "Route 128 - Cooltrainer Ruben", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SAMANTHA_REWARD": { "label": "Mossdeep Gym - Psychic Samantha", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SAMUEL_REWARD": { "label": "Victory Road B1F - Cooltrainer Samuel", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SANTIAGO_REWARD": { "label": "Route 130 - Swimmer Santiago", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SARAH_REWARD": { "label": "Route 116 - Lady Sarah", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SAWYER_1_REWARD": { "label": "Mt Chimney - Hiker Sawyer", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SHANE_REWARD": { "label": "Route 114 - Camper Shane", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SHANNON_REWARD": { "label": "Victory Road B1F - Cooltrainer Shannon", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SHARON_REWARD": { "label": "Route 125 - Swimmer Sharon", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SHAWN_REWARD": { "label": "Mauville Gym - Guitarist Shawn", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SHAYLA_REWARD": { "label": "Route 112 - Aroma Lady Shayla", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SHEILA_REWARD": { "label": "Mt Chimney - Beauty Sheila", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SHELBY_1_REWARD": { "label": "Mt Chimney - Expert Shelby", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SHELLY_SEAFLOOR_CAVERN_REWARD": { "label": "Seafloor Cavern Room 3 - Aqua Admin Shelly", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SHELLY_WEATHER_INSTITUTE_REWARD": { "label": "Weather Institute 2F - Aqua Admin Shelly", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SHIRLEY_REWARD": { "label": "Mt Chimney - Beauty Shirley", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SIDNEY_REWARD": { "label": "Ever Grande City - Elite Four Sidney", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SIENNA_REWARD": { "label": "Route 126 - Swimmer Sienna", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SIMON_REWARD": { "label": "Route 109 - Tuber Simon", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SOPHIE_REWARD": { "label": "Route 113 - Picnicker Sophie", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SPENCER_REWARD": { "label": "Route 124 - Swimmer Spencer", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_STAN_REWARD": { "label": "Route 125 - Swimmer Stan", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_STEVEN_REWARD": { "label": "Meteor Falls 1F - Rival Steven", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_STEVE_1_REWARD": { "label": "Route 114 - Pokemaniac Steve", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SUSIE_REWARD": { "label": "Route 131 - Swimmer Susie", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_SYLVIA_REWARD": { "label": "Mossdeep Gym - Hex Maniac Sylvia", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TABITHA_MAGMA_HIDEOUT_REWARD": { "label": "Magma Hideout 4F - Magma Admin Tabitha", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TABITHA_MT_CHIMNEY_REWARD": { "label": "Mt Chimney - Magma Admin Tabitha", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TAKAO_REWARD": { "label": "Dewford Gym - Black Belt Takao", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TAKASHI_REWARD": { "label": "Route 119 - Ninja Boy Takashi", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TALIA_REWARD": { "label": "Route 131 - Triathlete Talia", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TAMMY_REWARD": { "label": "Route 121 - Hex Maniac Tammy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TANYA_REWARD": { "label": "Route 125 - Swimmer Tanya", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TARA_REWARD": { "label": "Route 108 - Swimmer Tara", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TASHA_REWARD": { "label": "Mt Pyre 4F - Hex Maniac Tasha", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TATE_AND_LIZA_1_REWARD": { "label": "Mossdeep Gym - Leader Tate and Liza", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TAYLOR_REWARD": { "label": "Route 119 - Bug Maniac Taylor", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TYRA_AND_IVY_REWARD": { "label": "Route 114 - Sr. and Jr. Tyra and Ivy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_THALIA_1_REWARD": { "label": "Abandoned Ship 1F - Beauty Thalia", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_THOMAS_REWARD": { "label": "SS Tidal - Gentleman Thomas", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TIANA_REWARD": { "label": "Route 102 - Lass Tiana", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TIFFANY_REWARD": { "label": "Sootopolis Gym - Beauty Tiffany", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TIMMY_REWARD": { "label": "Route 110 - Youngster Timmy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TIMOTHY_1_REWARD": { "label": "Route 115 - Expert Timothy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TISHA_REWARD": { "label": "Route 129 - Swimmer Tisha", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TOMMY_REWARD": { "label": "Rustboro Gym - Youngster Tommy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TONY_1_REWARD": { "label": "Route 107 - Swimmer Tony", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TORI_AND_TIA_REWARD": { "label": "Route 113 - Twins Tori and Tia", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TRAVIS_REWARD": { "label": "Route 111 - Camper Travis", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TRENT_1_REWARD": { "label": "Route 112 - Hiker Trent", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_TYRON_REWARD": { "label": "Route 111 - Camper Tyron", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_VALERIE_1_REWARD": { "label": "Mt Pyre 6F - Hex Maniac Valerie", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_VANESSA_REWARD": { "label": "Route 121 - Pokefan Vanessa", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_VICKY_REWARD": { "label": "Route 111 - Winstrate Vicky", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_VICTORIA_REWARD": { "label": "Route 111 - Winstrate Victoria", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_VICTOR_REWARD": { "label": "Route 111 - Winstrate Victor", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_VIOLET_REWARD": { "label": "Route 123 - Aroma Lady Violet", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_VIRGIL_REWARD": { "label": "Mossdeep Gym - Psychic Virgil", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_VITO_REWARD": { "label": "Victory Road B2F - Cooltrainer Vito", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_VIVIAN_REWARD": { "label": "Mauville Gym - Battle Girl Vivian", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_VIVI_REWARD": { "label": "Route 111 - Winstrate Vivi", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_WADE_REWARD": { "label": "Route 118 - Fisherman Wade", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_WALLACE_REWARD": { "label": "Ever Grande City - Champion Wallace", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_WALTER_1_REWARD": { "label": "Route 121 - Gentleman Walter", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_WALLY_MAUVILLE_REWARD": { "label": "Mauville City - Rival Wally", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_WALLY_VR_1_REWARD": { "label": "Victory Road 1F - Rival Wally", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_WATTSON_1_REWARD": { "label": "Mauville Gym - Leader Wattson", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_WARREN_REWARD": { "label": "Route 133 - Cooltrainer Warren", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_WAYNE_REWARD": { "label": "Route 128 - Fisherman Wayne", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_WENDY_REWARD": { "label": "Route 123 - Cooltrainer Wendy", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_WILLIAM_REWARD": { "label": "Mt Pyre 3F - Psychic William", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_WILTON_1_REWARD": { "label": "Route 111 - Cooltrainer Wilton", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_WINONA_1_REWARD": { "label": "Fortree Gym - Leader Winona", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_WINSTON_1_REWARD": { "label": "Route 104 - Rich Boy Winston", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_WYATT_REWARD": { "label": "Route 113 - Pokemaniac Wyatt", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_YASU_REWARD": { "label": "Route 119 - Ninja Boy Yasu", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" }, "TRAINER_ZANDER_REWARD": { "label": "Mt Pyre 2F - Black Belt Zander", - "tags": ["Trainer"] + "tags": [], + "category": "TRAINER" } } diff --git a/worlds/pokemon_emerald/docs/en_Pokemon Emerald.md b/worlds/pokemon_emerald/docs/en_Pokemon Emerald.md index 9a3991e97f75..732b2092a28c 100644 --- a/worlds/pokemon_emerald/docs/en_Pokemon Emerald.md +++ b/worlds/pokemon_emerald/docs/en_Pokemon Emerald.md @@ -30,7 +30,7 @@ randomizer. Here are some of the more important ones: - The Wally catching tutorial is skipped - All text is instant and, with an option, can be automatically progressed by holding A - When a Repel runs out, you will be prompted to use another -- Many more minor improvementsâ€Ļ +- [Many more minor improvementsâ€Ļ](/tutorial/Pokemon%20Emerald/rom_changes/en) ## Where is my starting inventory? diff --git a/worlds/pokemon_emerald/docs/rom changes.md b/worlds/pokemon_emerald/docs/rom_changes_en.md similarity index 100% rename from worlds/pokemon_emerald/docs/rom changes.md rename to worlds/pokemon_emerald/docs/rom_changes_en.md diff --git a/worlds/pokemon_emerald/groups.py b/worlds/pokemon_emerald/groups.py new file mode 100644 index 000000000000..d358da18350f --- /dev/null +++ b/worlds/pokemon_emerald/groups.py @@ -0,0 +1,721 @@ +from typing import Dict, Set + +from .data import LocationCategory, data + + +# Item Groups +ITEM_GROUPS: Dict[str, Set[str]] = {} + +for item in data.items.values(): + for tag in item.tags: + if tag not in ITEM_GROUPS: + ITEM_GROUPS[tag] = set() + ITEM_GROUPS[tag].add(item.label) + +# Location Groups +_LOCATION_GROUP_MAPS = { + "Abandoned Ship": { + "MAP_ABANDONED_SHIP_CAPTAINS_OFFICE", + "MAP_ABANDONED_SHIP_CORRIDORS_1F", + "MAP_ABANDONED_SHIP_CORRIDORS_B1F", + "MAP_ABANDONED_SHIP_DECK", + "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS", + "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_ROOMS", + "MAP_ABANDONED_SHIP_ROOMS2_1F", + "MAP_ABANDONED_SHIP_ROOMS2_B1F", + "MAP_ABANDONED_SHIP_ROOMS_1F", + "MAP_ABANDONED_SHIP_ROOMS_B1F", + "MAP_ABANDONED_SHIP_ROOM_B1F", + "MAP_ABANDONED_SHIP_UNDERWATER1", + "MAP_ABANDONED_SHIP_UNDERWATER2", + }, + "Aqua Hideout": { + "MAP_AQUA_HIDEOUT_1F", + "MAP_AQUA_HIDEOUT_B1F", + "MAP_AQUA_HIDEOUT_B2F", + }, + "Battle Frontier": { + "MAP_ARTISAN_CAVE_1F", + "MAP_ARTISAN_CAVE_B1F", + "MAP_BATTLE_FRONTIER_BATTLE_ARENA_BATTLE_ROOM", + "MAP_BATTLE_FRONTIER_BATTLE_ARENA_CORRIDOR", + "MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY", + "MAP_BATTLE_FRONTIER_BATTLE_DOME_BATTLE_ROOM", + "MAP_BATTLE_FRONTIER_BATTLE_DOME_CORRIDOR", + "MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY", + "MAP_BATTLE_FRONTIER_BATTLE_DOME_PRE_BATTLE_ROOM", + "MAP_BATTLE_FRONTIER_BATTLE_FACTORY_BATTLE_ROOM", + "MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY", + "MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM", + "MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM", + "MAP_BATTLE_FRONTIER_BATTLE_PALACE_CORRIDOR", + "MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY", + "MAP_BATTLE_FRONTIER_BATTLE_PIKE_CORRIDOR", + "MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY", + "MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_FINAL", + "MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_NORMAL", + "MAP_BATTLE_FRONTIER_BATTLE_PIKE_ROOM_WILD_MONS", + "MAP_BATTLE_FRONTIER_BATTLE_PIKE_THREE_PATH_ROOM", + "MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR", + "MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY", + "MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_TOP", + "MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM", + "MAP_BATTLE_FRONTIER_BATTLE_TOWER_CORRIDOR", + "MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR", + "MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY", + "MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_BATTLE_ROOM", + "MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_CORRIDOR", + "MAP_BATTLE_FRONTIER_BATTLE_TOWER_MULTI_PARTNER_ROOM", + "MAP_BATTLE_FRONTIER_EXCHANGE_SERVICE_CORNER", + "MAP_BATTLE_FRONTIER_LOUNGE1", + "MAP_BATTLE_FRONTIER_LOUNGE2", + "MAP_BATTLE_FRONTIER_LOUNGE3", + "MAP_BATTLE_FRONTIER_LOUNGE4", + "MAP_BATTLE_FRONTIER_LOUNGE5", + "MAP_BATTLE_FRONTIER_LOUNGE6", + "MAP_BATTLE_FRONTIER_LOUNGE7", + "MAP_BATTLE_FRONTIER_LOUNGE8", + "MAP_BATTLE_FRONTIER_LOUNGE9", + "MAP_BATTLE_FRONTIER_MART", + "MAP_BATTLE_FRONTIER_OUTSIDE_EAST", + "MAP_BATTLE_FRONTIER_OUTSIDE_WEST", + "MAP_BATTLE_FRONTIER_POKEMON_CENTER_1F", + "MAP_BATTLE_FRONTIER_POKEMON_CENTER_2F", + "MAP_BATTLE_FRONTIER_RANKING_HALL", + "MAP_BATTLE_FRONTIER_RECEPTION_GATE", + "MAP_BATTLE_FRONTIER_SCOTTS_HOUSE", + "MAP_BATTLE_PYRAMID_SQUARE01", + "MAP_BATTLE_PYRAMID_SQUARE02", + "MAP_BATTLE_PYRAMID_SQUARE03", + "MAP_BATTLE_PYRAMID_SQUARE04", + "MAP_BATTLE_PYRAMID_SQUARE05", + "MAP_BATTLE_PYRAMID_SQUARE06", + "MAP_BATTLE_PYRAMID_SQUARE07", + "MAP_BATTLE_PYRAMID_SQUARE08", + "MAP_BATTLE_PYRAMID_SQUARE09", + "MAP_BATTLE_PYRAMID_SQUARE10", + "MAP_BATTLE_PYRAMID_SQUARE11", + "MAP_BATTLE_PYRAMID_SQUARE12", + "MAP_BATTLE_PYRAMID_SQUARE13", + "MAP_BATTLE_PYRAMID_SQUARE14", + "MAP_BATTLE_PYRAMID_SQUARE15", + "MAP_BATTLE_PYRAMID_SQUARE16", + }, + "Birth Island": { + "MAP_BIRTH_ISLAND_EXTERIOR", + "MAP_BIRTH_ISLAND_HARBOR", + }, + "Contest Hall": { + "MAP_CONTEST_HALL", + "MAP_CONTEST_HALL_BEAUTY", + "MAP_CONTEST_HALL_COOL", + "MAP_CONTEST_HALL_CUTE", + "MAP_CONTEST_HALL_SMART", + "MAP_CONTEST_HALL_TOUGH", + }, + "Dewford Town": { + "MAP_DEWFORD_TOWN", + "MAP_DEWFORD_TOWN_GYM", + "MAP_DEWFORD_TOWN_HALL", + "MAP_DEWFORD_TOWN_HOUSE1", + "MAP_DEWFORD_TOWN_HOUSE2", + "MAP_DEWFORD_TOWN_POKEMON_CENTER_1F", + "MAP_DEWFORD_TOWN_POKEMON_CENTER_2F", + }, + "Ever Grande City": { + "MAP_EVER_GRANDE_CITY", + "MAP_EVER_GRANDE_CITY_CHAMPIONS_ROOM", + "MAP_EVER_GRANDE_CITY_DRAKES_ROOM", + "MAP_EVER_GRANDE_CITY_GLACIAS_ROOM", + "MAP_EVER_GRANDE_CITY_HALL1", + "MAP_EVER_GRANDE_CITY_HALL2", + "MAP_EVER_GRANDE_CITY_HALL3", + "MAP_EVER_GRANDE_CITY_HALL4", + "MAP_EVER_GRANDE_CITY_HALL5", + "MAP_EVER_GRANDE_CITY_HALL_OF_FAME", + "MAP_EVER_GRANDE_CITY_PHOEBES_ROOM", + "MAP_EVER_GRANDE_CITY_POKEMON_CENTER_1F", + "MAP_EVER_GRANDE_CITY_POKEMON_CENTER_2F", + "MAP_EVER_GRANDE_CITY_POKEMON_LEAGUE_1F", + "MAP_EVER_GRANDE_CITY_POKEMON_LEAGUE_2F", + "MAP_EVER_GRANDE_CITY_SIDNEYS_ROOM", + }, + "Fallarbor Town": { + "MAP_FALLARBOR_TOWN", + "MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM", + "MAP_FALLARBOR_TOWN_BATTLE_TENT_CORRIDOR", + "MAP_FALLARBOR_TOWN_BATTLE_TENT_LOBBY", + "MAP_FALLARBOR_TOWN_COZMOS_HOUSE", + "MAP_FALLARBOR_TOWN_MART", + "MAP_FALLARBOR_TOWN_MOVE_RELEARNERS_HOUSE", + "MAP_FALLARBOR_TOWN_POKEMON_CENTER_1F", + "MAP_FALLARBOR_TOWN_POKEMON_CENTER_2F", + }, + "Faraway Island": { + "MAP_FARAWAY_ISLAND_ENTRANCE", + "MAP_FARAWAY_ISLAND_INTERIOR", + }, + "Fiery Path": {"MAP_FIERY_PATH"}, + "Fortree City": { + "MAP_FORTREE_CITY", + "MAP_FORTREE_CITY_DECORATION_SHOP", + "MAP_FORTREE_CITY_GYM", + "MAP_FORTREE_CITY_HOUSE1", + "MAP_FORTREE_CITY_HOUSE2", + "MAP_FORTREE_CITY_HOUSE3", + "MAP_FORTREE_CITY_HOUSE4", + "MAP_FORTREE_CITY_HOUSE5", + "MAP_FORTREE_CITY_MART", + "MAP_FORTREE_CITY_POKEMON_CENTER_1F", + "MAP_FORTREE_CITY_POKEMON_CENTER_2F", + }, + "Granite Cave": { + "MAP_GRANITE_CAVE_1F", + "MAP_GRANITE_CAVE_B1F", + "MAP_GRANITE_CAVE_B2F", + "MAP_GRANITE_CAVE_STEVENS_ROOM", + }, + "Jagged Pass": {"MAP_JAGGED_PASS"}, + "Lavaridge Town": { + "MAP_LAVARIDGE_TOWN", + "MAP_LAVARIDGE_TOWN_GYM_1F", + "MAP_LAVARIDGE_TOWN_GYM_B1F", + "MAP_LAVARIDGE_TOWN_HERB_SHOP", + "MAP_LAVARIDGE_TOWN_HOUSE", + "MAP_LAVARIDGE_TOWN_MART", + "MAP_LAVARIDGE_TOWN_POKEMON_CENTER_1F", + "MAP_LAVARIDGE_TOWN_POKEMON_CENTER_2F", + }, + "Lilycove City": { + "MAP_LILYCOVE_CITY", + "MAP_LILYCOVE_CITY_CONTEST_HALL", + "MAP_LILYCOVE_CITY_CONTEST_LOBBY", + "MAP_LILYCOVE_CITY_COVE_LILY_MOTEL_1F", + "MAP_LILYCOVE_CITY_COVE_LILY_MOTEL_2F", + "MAP_LILYCOVE_CITY_DEPARTMENT_STORE_1F", + "MAP_LILYCOVE_CITY_DEPARTMENT_STORE_2F", + "MAP_LILYCOVE_CITY_DEPARTMENT_STORE_3F", + "MAP_LILYCOVE_CITY_DEPARTMENT_STORE_4F", + "MAP_LILYCOVE_CITY_DEPARTMENT_STORE_5F", + "MAP_LILYCOVE_CITY_DEPARTMENT_STORE_ELEVATOR", + "MAP_LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP", + "MAP_LILYCOVE_CITY_HARBOR", + "MAP_LILYCOVE_CITY_HOUSE1", + "MAP_LILYCOVE_CITY_HOUSE2", + "MAP_LILYCOVE_CITY_HOUSE3", + "MAP_LILYCOVE_CITY_HOUSE4", + "MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_1F", + "MAP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F", + "MAP_LILYCOVE_CITY_MOVE_DELETERS_HOUSE", + "MAP_LILYCOVE_CITY_POKEMON_CENTER_1F", + "MAP_LILYCOVE_CITY_POKEMON_CENTER_2F", + "MAP_LILYCOVE_CITY_POKEMON_TRAINER_FAN_CLUB", + }, + "Littleroot Town": { + "MAP_INSIDE_OF_TRUCK", + "MAP_LITTLEROOT_TOWN", + "MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_1F", + "MAP_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F", + "MAP_LITTLEROOT_TOWN_MAYS_HOUSE_1F", + "MAP_LITTLEROOT_TOWN_MAYS_HOUSE_2F", + "MAP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB", + }, + "Magma Hideout": { + "MAP_MAGMA_HIDEOUT_1F", + "MAP_MAGMA_HIDEOUT_2F_1R", + "MAP_MAGMA_HIDEOUT_2F_2R", + "MAP_MAGMA_HIDEOUT_2F_3R", + "MAP_MAGMA_HIDEOUT_3F_1R", + "MAP_MAGMA_HIDEOUT_3F_2R", + "MAP_MAGMA_HIDEOUT_3F_3R", + "MAP_MAGMA_HIDEOUT_4F", + }, + "Marine Cave": { + "MAP_MARINE_CAVE_END", + "MAP_MARINE_CAVE_ENTRANCE", + "MAP_UNDERWATER_MARINE_CAVE", + }, + "Mauville City": { + "MAP_MAUVILLE_CITY", + "MAP_MAUVILLE_CITY_BIKE_SHOP", + "MAP_MAUVILLE_CITY_GAME_CORNER", + "MAP_MAUVILLE_CITY_GYM", + "MAP_MAUVILLE_CITY_HOUSE1", + "MAP_MAUVILLE_CITY_HOUSE2", + "MAP_MAUVILLE_CITY_MART", + "MAP_MAUVILLE_CITY_POKEMON_CENTER_1F", + "MAP_MAUVILLE_CITY_POKEMON_CENTER_2F", + }, + "Meteor Falls": { + "MAP_METEOR_FALLS_1F_1R", + "MAP_METEOR_FALLS_1F_2R", + "MAP_METEOR_FALLS_B1F_1R", + "MAP_METEOR_FALLS_B1F_2R", + "MAP_METEOR_FALLS_STEVENS_CAVE", + }, + "Mirage Tower": { + "MAP_MIRAGE_TOWER_1F", + "MAP_MIRAGE_TOWER_2F", + "MAP_MIRAGE_TOWER_3F", + "MAP_MIRAGE_TOWER_4F", + }, + "Mossdeep City": { + "MAP_MOSSDEEP_CITY", + "MAP_MOSSDEEP_CITY_GAME_CORNER_1F", + "MAP_MOSSDEEP_CITY_GAME_CORNER_B1F", + "MAP_MOSSDEEP_CITY_GYM", + "MAP_MOSSDEEP_CITY_HOUSE1", + "MAP_MOSSDEEP_CITY_HOUSE2", + "MAP_MOSSDEEP_CITY_HOUSE3", + "MAP_MOSSDEEP_CITY_HOUSE4", + "MAP_MOSSDEEP_CITY_MART", + "MAP_MOSSDEEP_CITY_POKEMON_CENTER_1F", + "MAP_MOSSDEEP_CITY_POKEMON_CENTER_2F", + "MAP_MOSSDEEP_CITY_SPACE_CENTER_1F", + "MAP_MOSSDEEP_CITY_SPACE_CENTER_2F", + "MAP_MOSSDEEP_CITY_STEVENS_HOUSE", + }, + "Mt. Chimney": { + "MAP_MT_CHIMNEY", + "MAP_MT_CHIMNEY_CABLE_CAR_STATION", + }, + "Mt. Pyre": { + "MAP_MT_PYRE_1F", + "MAP_MT_PYRE_2F", + "MAP_MT_PYRE_3F", + "MAP_MT_PYRE_4F", + "MAP_MT_PYRE_5F", + "MAP_MT_PYRE_6F", + "MAP_MT_PYRE_EXTERIOR", + "MAP_MT_PYRE_SUMMIT", + }, + "Navel Rock": { + "MAP_NAVEL_ROCK_B1F", + "MAP_NAVEL_ROCK_BOTTOM", + "MAP_NAVEL_ROCK_DOWN01", + "MAP_NAVEL_ROCK_DOWN02", + "MAP_NAVEL_ROCK_DOWN03", + "MAP_NAVEL_ROCK_DOWN04", + "MAP_NAVEL_ROCK_DOWN05", + "MAP_NAVEL_ROCK_DOWN06", + "MAP_NAVEL_ROCK_DOWN07", + "MAP_NAVEL_ROCK_DOWN08", + "MAP_NAVEL_ROCK_DOWN09", + "MAP_NAVEL_ROCK_DOWN10", + "MAP_NAVEL_ROCK_DOWN11", + "MAP_NAVEL_ROCK_ENTRANCE", + "MAP_NAVEL_ROCK_EXTERIOR", + "MAP_NAVEL_ROCK_FORK", + "MAP_NAVEL_ROCK_HARBOR", + "MAP_NAVEL_ROCK_TOP", + "MAP_NAVEL_ROCK_UP1", + "MAP_NAVEL_ROCK_UP2", + "MAP_NAVEL_ROCK_UP3", + "MAP_NAVEL_ROCK_UP4", + }, + "New Mauville": { + "MAP_NEW_MAUVILLE_ENTRANCE", + "MAP_NEW_MAUVILLE_INSIDE", + }, + "Oldale Town": { + "MAP_OLDALE_TOWN", + "MAP_OLDALE_TOWN_HOUSE1", + "MAP_OLDALE_TOWN_HOUSE2", + "MAP_OLDALE_TOWN_MART", + "MAP_OLDALE_TOWN_POKEMON_CENTER_1F", + "MAP_OLDALE_TOWN_POKEMON_CENTER_2F", + }, + "Pacifidlog Town": { + "MAP_PACIFIDLOG_TOWN", + "MAP_PACIFIDLOG_TOWN_HOUSE1", + "MAP_PACIFIDLOG_TOWN_HOUSE2", + "MAP_PACIFIDLOG_TOWN_HOUSE3", + "MAP_PACIFIDLOG_TOWN_HOUSE4", + "MAP_PACIFIDLOG_TOWN_HOUSE5", + "MAP_PACIFIDLOG_TOWN_POKEMON_CENTER_1F", + "MAP_PACIFIDLOG_TOWN_POKEMON_CENTER_2F", + }, + "Petalburg City": { + "MAP_PETALBURG_CITY", + "MAP_PETALBURG_CITY_GYM", + "MAP_PETALBURG_CITY_HOUSE1", + "MAP_PETALBURG_CITY_HOUSE2", + "MAP_PETALBURG_CITY_MART", + "MAP_PETALBURG_CITY_POKEMON_CENTER_1F", + "MAP_PETALBURG_CITY_POKEMON_CENTER_2F", + "MAP_PETALBURG_CITY_WALLYS_HOUSE", + }, + "Petalburg Woods": {"MAP_PETALBURG_WOODS"}, + "Route 101": {"MAP_ROUTE101"}, + "Route 102": {"MAP_ROUTE102"}, + "Route 103": {"MAP_ROUTE103"}, + "Route 104": { + "MAP_ROUTE104", + "MAP_ROUTE104_MR_BRINEYS_HOUSE", + "MAP_ROUTE104_PRETTY_PETAL_FLOWER_SHOP", + }, + "Route 105": { + "MAP_ISLAND_CAVE", + "MAP_ROUTE105", + "MAP_UNDERWATER_ROUTE105", + }, + "Route 106": {"MAP_ROUTE106"}, + "Route 107": {"MAP_ROUTE107"}, + "Route 108": {"MAP_ROUTE108"}, + "Route 109": { + "MAP_ROUTE109", + "MAP_ROUTE109_SEASHORE_HOUSE", + }, + "Route 110": { + "MAP_ROUTE110", + "MAP_ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE", + "MAP_ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE", + }, + "Trick House": { + "MAP_ROUTE110_TRICK_HOUSE_CORRIDOR", + "MAP_ROUTE110_TRICK_HOUSE_END", + "MAP_ROUTE110_TRICK_HOUSE_ENTRANCE", + "MAP_ROUTE110_TRICK_HOUSE_PUZZLE1", + "MAP_ROUTE110_TRICK_HOUSE_PUZZLE2", + "MAP_ROUTE110_TRICK_HOUSE_PUZZLE3", + "MAP_ROUTE110_TRICK_HOUSE_PUZZLE4", + "MAP_ROUTE110_TRICK_HOUSE_PUZZLE5", + "MAP_ROUTE110_TRICK_HOUSE_PUZZLE6", + "MAP_ROUTE110_TRICK_HOUSE_PUZZLE7", + "MAP_ROUTE110_TRICK_HOUSE_PUZZLE8", + }, + "Route 111": { + "MAP_DESERT_RUINS", + "MAP_ROUTE111", + "MAP_ROUTE111_OLD_LADYS_REST_STOP", + "MAP_ROUTE111_WINSTRATE_FAMILYS_HOUSE", + }, + "Route 112": { + "MAP_ROUTE112", + "MAP_ROUTE112_CABLE_CAR_STATION", + }, + "Route 113": { + "MAP_ROUTE113", + "MAP_ROUTE113_GLASS_WORKSHOP", + }, + "Route 114": { + "MAP_DESERT_UNDERPASS", + "MAP_ROUTE114", + "MAP_ROUTE114_FOSSIL_MANIACS_HOUSE", + "MAP_ROUTE114_FOSSIL_MANIACS_TUNNEL", + "MAP_ROUTE114_LANETTES_HOUSE", + }, + "Route 115": {"MAP_ROUTE115"}, + "Route 116": { + "MAP_ROUTE116", + "MAP_ROUTE116_TUNNELERS_REST_HOUSE", + }, + "Route 117": { + "MAP_ROUTE117", + "MAP_ROUTE117_POKEMON_DAY_CARE", + }, + "Route 118": {"MAP_ROUTE118"}, + "Route 119": { + "MAP_ROUTE119", + "MAP_ROUTE119_HOUSE", + "MAP_ROUTE119_WEATHER_INSTITUTE_1F", + "MAP_ROUTE119_WEATHER_INSTITUTE_2F", + }, + "Route 120": { + "MAP_ANCIENT_TOMB", + "MAP_ROUTE120", + "MAP_SCORCHED_SLAB", + }, + "Route 121": { + "MAP_ROUTE121", + }, + "Route 122": {"MAP_ROUTE122"}, + "Route 123": { + "MAP_ROUTE123", + "MAP_ROUTE123_BERRY_MASTERS_HOUSE", + }, + "Route 124": { + "MAP_ROUTE124", + "MAP_ROUTE124_DIVING_TREASURE_HUNTERS_HOUSE", + "MAP_UNDERWATER_ROUTE124", + }, + "Route 125": { + "MAP_ROUTE125", + "MAP_UNDERWATER_ROUTE125", + }, + "Route 126": { + "MAP_ROUTE126", + "MAP_UNDERWATER_ROUTE126", + }, + "Route 127": { + "MAP_ROUTE127", + "MAP_UNDERWATER_ROUTE127", + }, + "Route 128": { + "MAP_ROUTE128", + "MAP_UNDERWATER_ROUTE128", + }, + "Route 129": { + "MAP_ROUTE129", + "MAP_UNDERWATER_ROUTE129", + }, + "Route 130": {"MAP_ROUTE130"}, + "Route 131": {"MAP_ROUTE131"}, + "Route 132": {"MAP_ROUTE132"}, + "Route 133": {"MAP_ROUTE133"}, + "Route 134": { + "MAP_ROUTE134", + "MAP_UNDERWATER_ROUTE134", + "MAP_SEALED_CHAMBER_INNER_ROOM", + "MAP_SEALED_CHAMBER_OUTER_ROOM", + "MAP_UNDERWATER_SEALED_CHAMBER", + }, + "Rustboro City": { + "MAP_RUSTBORO_CITY", + "MAP_RUSTBORO_CITY_CUTTERS_HOUSE", + "MAP_RUSTBORO_CITY_DEVON_CORP_1F", + "MAP_RUSTBORO_CITY_DEVON_CORP_2F", + "MAP_RUSTBORO_CITY_DEVON_CORP_3F", + "MAP_RUSTBORO_CITY_FLAT1_1F", + "MAP_RUSTBORO_CITY_FLAT1_2F", + "MAP_RUSTBORO_CITY_FLAT2_1F", + "MAP_RUSTBORO_CITY_FLAT2_2F", + "MAP_RUSTBORO_CITY_FLAT2_3F", + "MAP_RUSTBORO_CITY_GYM", + "MAP_RUSTBORO_CITY_HOUSE1", + "MAP_RUSTBORO_CITY_HOUSE2", + "MAP_RUSTBORO_CITY_HOUSE3", + "MAP_RUSTBORO_CITY_MART", + "MAP_RUSTBORO_CITY_POKEMON_CENTER_1F", + "MAP_RUSTBORO_CITY_POKEMON_CENTER_2F", + "MAP_RUSTBORO_CITY_POKEMON_SCHOOL", + }, + "Rusturf Tunnel": {"MAP_RUSTURF_TUNNEL"}, + "Safari Zone": { + "MAP_ROUTE121_SAFARI_ZONE_ENTRANCE", + "MAP_SAFARI_ZONE_NORTH", + "MAP_SAFARI_ZONE_NORTHEAST", + "MAP_SAFARI_ZONE_NORTHWEST", + "MAP_SAFARI_ZONE_REST_HOUSE", + "MAP_SAFARI_ZONE_SOUTH", + "MAP_SAFARI_ZONE_SOUTHEAST", + "MAP_SAFARI_ZONE_SOUTHWEST", + }, + "Seafloor Cavern": { + "MAP_SEAFLOOR_CAVERN_ENTRANCE", + "MAP_SEAFLOOR_CAVERN_ROOM1", + "MAP_SEAFLOOR_CAVERN_ROOM2", + "MAP_SEAFLOOR_CAVERN_ROOM3", + "MAP_SEAFLOOR_CAVERN_ROOM4", + "MAP_SEAFLOOR_CAVERN_ROOM5", + "MAP_SEAFLOOR_CAVERN_ROOM6", + "MAP_SEAFLOOR_CAVERN_ROOM7", + "MAP_SEAFLOOR_CAVERN_ROOM8", + "MAP_SEAFLOOR_CAVERN_ROOM9", + "MAP_UNDERWATER_SEAFLOOR_CAVERN", + }, + "Shoal Cave": { + "MAP_SHOAL_CAVE_HIGH_TIDE_ENTRANCE_ROOM", + "MAP_SHOAL_CAVE_HIGH_TIDE_INNER_ROOM", + "MAP_SHOAL_CAVE_LOW_TIDE_ENTRANCE_ROOM", + "MAP_SHOAL_CAVE_LOW_TIDE_ICE_ROOM", + "MAP_SHOAL_CAVE_LOW_TIDE_INNER_ROOM", + "MAP_SHOAL_CAVE_LOW_TIDE_LOWER_ROOM", + "MAP_SHOAL_CAVE_LOW_TIDE_STAIRS_ROOM", + }, + "Sky Pillar": { + "MAP_SKY_PILLAR_1F", + "MAP_SKY_PILLAR_2F", + "MAP_SKY_PILLAR_3F", + "MAP_SKY_PILLAR_4F", + "MAP_SKY_PILLAR_5F", + "MAP_SKY_PILLAR_ENTRANCE", + "MAP_SKY_PILLAR_OUTSIDE", + "MAP_SKY_PILLAR_TOP", + }, + "Slateport City": { + "MAP_SLATEPORT_CITY", + "MAP_SLATEPORT_CITY_BATTLE_TENT_BATTLE_ROOM", + "MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR", + "MAP_SLATEPORT_CITY_BATTLE_TENT_LOBBY", + "MAP_SLATEPORT_CITY_HARBOR", + "MAP_SLATEPORT_CITY_HOUSE", + "MAP_SLATEPORT_CITY_MART", + "MAP_SLATEPORT_CITY_NAME_RATERS_HOUSE", + "MAP_SLATEPORT_CITY_OCEANIC_MUSEUM_1F", + "MAP_SLATEPORT_CITY_OCEANIC_MUSEUM_2F", + "MAP_SLATEPORT_CITY_POKEMON_CENTER_1F", + "MAP_SLATEPORT_CITY_POKEMON_CENTER_2F", + "MAP_SLATEPORT_CITY_POKEMON_FAN_CLUB", + "MAP_SLATEPORT_CITY_STERNS_SHIPYARD_1F", + "MAP_SLATEPORT_CITY_STERNS_SHIPYARD_2F", + }, + "Sootopolis City": { + "MAP_CAVE_OF_ORIGIN_1F", + "MAP_CAVE_OF_ORIGIN_B1F", + "MAP_CAVE_OF_ORIGIN_ENTRANCE", + "MAP_SOOTOPOLIS_CITY", + "MAP_SOOTOPOLIS_CITY_GYM_1F", + "MAP_SOOTOPOLIS_CITY_GYM_B1F", + "MAP_SOOTOPOLIS_CITY_HOUSE1", + "MAP_SOOTOPOLIS_CITY_HOUSE2", + "MAP_SOOTOPOLIS_CITY_HOUSE3", + "MAP_SOOTOPOLIS_CITY_HOUSE4", + "MAP_SOOTOPOLIS_CITY_HOUSE5", + "MAP_SOOTOPOLIS_CITY_HOUSE6", + "MAP_SOOTOPOLIS_CITY_HOUSE7", + "MAP_SOOTOPOLIS_CITY_LOTAD_AND_SEEDOT_HOUSE", + "MAP_SOOTOPOLIS_CITY_MART", + "MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_1F", + "MAP_SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_B1F", + "MAP_SOOTOPOLIS_CITY_POKEMON_CENTER_1F", + "MAP_SOOTOPOLIS_CITY_POKEMON_CENTER_2F", + "MAP_UNDERWATER_SOOTOPOLIS_CITY", + }, + "Southern Island": { + "MAP_SOUTHERN_ISLAND_EXTERIOR", + "MAP_SOUTHERN_ISLAND_INTERIOR", + }, + "S.S. Tidal": { + "MAP_SS_TIDAL_CORRIDOR", + "MAP_SS_TIDAL_LOWER_DECK", + "MAP_SS_TIDAL_ROOMS", + }, + "Terra Cave": { + "MAP_TERRA_CAVE_END", + "MAP_TERRA_CAVE_ENTRANCE", + }, + "Trainer Hill": { + "MAP_TRAINER_HILL_2F", + "MAP_TRAINER_HILL_3F", + "MAP_TRAINER_HILL_4F", + "MAP_TRAINER_HILL_ELEVATOR", + "MAP_TRAINER_HILL_ENTRANCE", + "MAP_TRAINER_HILL_ROOF", + }, + "Verdanturf Town": { + "MAP_VERDANTURF_TOWN", + "MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM", + "MAP_VERDANTURF_TOWN_BATTLE_TENT_CORRIDOR", + "MAP_VERDANTURF_TOWN_BATTLE_TENT_LOBBY", + "MAP_VERDANTURF_TOWN_FRIENDSHIP_RATERS_HOUSE", + "MAP_VERDANTURF_TOWN_HOUSE", + "MAP_VERDANTURF_TOWN_MART", + "MAP_VERDANTURF_TOWN_POKEMON_CENTER_1F", + "MAP_VERDANTURF_TOWN_POKEMON_CENTER_2F", + "MAP_VERDANTURF_TOWN_WANDAS_HOUSE", + }, + "Victory Road": { + "MAP_VICTORY_ROAD_1F", + "MAP_VICTORY_ROAD_B1F", + "MAP_VICTORY_ROAD_B2F", + }, +} + +_LOCATION_CATEGORY_TO_GROUP_NAME = { + LocationCategory.BADGE: "Badges", + LocationCategory.HM: "HMs", + LocationCategory.KEY: "Key Items", + LocationCategory.ROD: "Fishing Rods", + LocationCategory.BIKE: "Bikes", + LocationCategory.TICKET: "Tickets", + LocationCategory.OVERWORLD_ITEM: "Overworld Items", + LocationCategory.HIDDEN_ITEM: "Hidden Items", + LocationCategory.GIFT: "NPC Gifts", + LocationCategory.BERRY_TREE: "Berry Trees", + LocationCategory.TRAINER: "Trainers", + LocationCategory.POKEDEX: "Pokedex", +} + +LOCATION_GROUPS: Dict[str, Set[str]] = {group_name: set() for group_name in _LOCATION_CATEGORY_TO_GROUP_NAME.values()} +for location in data.locations.values(): + # Category groups + LOCATION_GROUPS[_LOCATION_CATEGORY_TO_GROUP_NAME[location.category]].add(location.label) + + # Tag groups + for tag in location.tags: + if tag not in LOCATION_GROUPS: + LOCATION_GROUPS[tag] = set() + LOCATION_GROUPS[tag].add(location.label) + + # Geographic groups + if location.parent_region != "REGION_POKEDEX": + map_name = data.regions[location.parent_region].parent_map.name + for group, maps in _LOCATION_GROUP_MAPS.items(): + if map_name in maps: + if group not in LOCATION_GROUPS: + LOCATION_GROUPS[group] = set() + LOCATION_GROUPS[group].add(location.label) + break + +# Meta-groups +LOCATION_GROUPS["Cities"] = { + *LOCATION_GROUPS.get("Littleroot Town", set()), + *LOCATION_GROUPS.get("Oldale Town", set()), + *LOCATION_GROUPS.get("Petalburg City", set()), + *LOCATION_GROUPS.get("Rustboro City", set()), + *LOCATION_GROUPS.get("Dewford Town", set()), + *LOCATION_GROUPS.get("Slateport City", set()), + *LOCATION_GROUPS.get("Mauville City", set()), + *LOCATION_GROUPS.get("Verdanturf Town", set()), + *LOCATION_GROUPS.get("Fallarbor Town", set()), + *LOCATION_GROUPS.get("Lavaridge Town", set()), + *LOCATION_GROUPS.get("Fortree City", set()), + *LOCATION_GROUPS.get("Mossdeep City", set()), + *LOCATION_GROUPS.get("Sootopolis City", set()), + *LOCATION_GROUPS.get("Pacifidlog Town", set()), + *LOCATION_GROUPS.get("Ever Grande City", set()), +} + +LOCATION_GROUPS["Dungeons"] = { + *LOCATION_GROUPS.get("Petalburg Woods", set()), + *LOCATION_GROUPS.get("Rusturf Tunnel", set()), + *LOCATION_GROUPS.get("Granite Cave", set()), + *LOCATION_GROUPS.get("Fiery Path", set()), + *LOCATION_GROUPS.get("Meteor Falls", set()), + *LOCATION_GROUPS.get("Jagged Pass", set()), + *LOCATION_GROUPS.get("Mt. Chimney", set()), + *LOCATION_GROUPS.get("Abandoned Ship", set()), + *LOCATION_GROUPS.get("New Mauville", set()), + *LOCATION_GROUPS.get("Mt. Pyre", set()), + *LOCATION_GROUPS.get("Seafloor Cavern", set()), + *LOCATION_GROUPS.get("Sky Pillar", set()), + *LOCATION_GROUPS.get("Victory Road", set()), +} + +LOCATION_GROUPS["Routes"] = { + *LOCATION_GROUPS.get("Route 101", set()), + *LOCATION_GROUPS.get("Route 102", set()), + *LOCATION_GROUPS.get("Route 103", set()), + *LOCATION_GROUPS.get("Route 104", set()), + *LOCATION_GROUPS.get("Route 105", set()), + *LOCATION_GROUPS.get("Route 106", set()), + *LOCATION_GROUPS.get("Route 107", set()), + *LOCATION_GROUPS.get("Route 108", set()), + *LOCATION_GROUPS.get("Route 109", set()), + *LOCATION_GROUPS.get("Route 110", set()), + *LOCATION_GROUPS.get("Route 111", set()), + *LOCATION_GROUPS.get("Route 112", set()), + *LOCATION_GROUPS.get("Route 113", set()), + *LOCATION_GROUPS.get("Route 114", set()), + *LOCATION_GROUPS.get("Route 115", set()), + *LOCATION_GROUPS.get("Route 116", set()), + *LOCATION_GROUPS.get("Route 117", set()), + *LOCATION_GROUPS.get("Route 118", set()), + *LOCATION_GROUPS.get("Route 119", set()), + *LOCATION_GROUPS.get("Route 120", set()), + *LOCATION_GROUPS.get("Route 121", set()), + *LOCATION_GROUPS.get("Route 122", set()), + *LOCATION_GROUPS.get("Route 123", set()), + *LOCATION_GROUPS.get("Route 124", set()), + *LOCATION_GROUPS.get("Route 125", set()), + *LOCATION_GROUPS.get("Route 126", set()), + *LOCATION_GROUPS.get("Route 127", set()), + *LOCATION_GROUPS.get("Route 128", set()), + *LOCATION_GROUPS.get("Route 129", set()), + *LOCATION_GROUPS.get("Route 130", set()), + *LOCATION_GROUPS.get("Route 131", set()), + *LOCATION_GROUPS.get("Route 132", set()), + *LOCATION_GROUPS.get("Route 133", set()), + *LOCATION_GROUPS.get("Route 134", set()), +} diff --git a/worlds/pokemon_emerald/items.py b/worlds/pokemon_emerald/items.py index 436db771d396..922bbbc0dbfb 100644 --- a/worlds/pokemon_emerald/items.py +++ b/worlds/pokemon_emerald/items.py @@ -1,7 +1,7 @@ """ Classes and functions related to AP items for Pokemon Emerald """ -from typing import Dict, FrozenSet, Optional +from typing import Dict, FrozenSet, Set, Optional from BaseClasses import Item, ItemClassification @@ -46,30 +46,6 @@ def create_item_label_to_code_map() -> Dict[str, int]: return label_to_code_map -ITEM_GROUPS = { - "Badges": { - "Stone Badge", "Knuckle Badge", - "Dynamo Badge", "Heat Badge", - "Balance Badge", "Feather Badge", - "Mind Badge", "Rain Badge", - }, - "HMs": { - "HM01 Cut", "HM02 Fly", - "HM03 Surf", "HM04 Strength", - "HM05 Flash", "HM06 Rock Smash", - "HM07 Waterfall", "HM08 Dive", - }, - "HM01": {"HM01 Cut"}, - "HM02": {"HM02 Fly"}, - "HM03": {"HM03 Surf"}, - "HM04": {"HM04 Strength"}, - "HM05": {"HM05 Flash"}, - "HM06": {"HM06 Rock Smash"}, - "HM07": {"HM07 Waterfall"}, - "HM08": {"HM08 Dive"}, -} - - def get_item_classification(item_code: int) -> ItemClassification: """ Returns the item classification for a given AP item id (code) diff --git a/worlds/pokemon_emerald/locations.py b/worlds/pokemon_emerald/locations.py index 9123690bead7..473c189166be 100644 --- a/worlds/pokemon_emerald/locations.py +++ b/worlds/pokemon_emerald/locations.py @@ -1,59 +1,17 @@ """ Classes and functions related to AP locations for Pokemon Emerald """ -from typing import TYPE_CHECKING, Dict, Optional, FrozenSet, Iterable +from typing import TYPE_CHECKING, Dict, Optional, Set from BaseClasses import Location, Region -from .data import BASE_OFFSET, NATIONAL_ID_TO_SPECIES_ID, POKEDEX_OFFSET, data +from .data import BASE_OFFSET, NATIONAL_ID_TO_SPECIES_ID, POKEDEX_OFFSET, LocationCategory, data from .items import offset_item_value if TYPE_CHECKING: from . import PokemonEmeraldWorld -LOCATION_GROUPS = { - "Badges": { - "Rustboro Gym - Stone Badge", - "Dewford Gym - Knuckle Badge", - "Mauville Gym - Dynamo Badge", - "Lavaridge Gym - Heat Badge", - "Petalburg Gym - Balance Badge", - "Fortree Gym - Feather Badge", - "Mossdeep Gym - Mind Badge", - "Sootopolis Gym - Rain Badge", - }, - "Gym TMs": { - "Rustboro Gym - TM39 from Roxanne", - "Dewford Gym - TM08 from Brawly", - "Mauville Gym - TM34 from Wattson", - "Lavaridge Gym - TM50 from Flannery", - "Petalburg Gym - TM42 from Norman", - "Fortree Gym - TM40 from Winona", - "Mossdeep Gym - TM04 from Tate and Liza", - "Sootopolis Gym - TM03 from Juan", - }, - "Trick House": { - "Trick House Puzzle 1 - Item", - "Trick House Puzzle 2 - Item 1", - "Trick House Puzzle 2 - Item 2", - "Trick House Puzzle 3 - Item 1", - "Trick House Puzzle 3 - Item 2", - "Trick House Puzzle 4 - Item", - "Trick House Puzzle 6 - Item", - "Trick House Puzzle 7 - Item", - "Trick House Puzzle 8 - Item", - "Trick House Puzzle 1 - Reward", - "Trick House Puzzle 2 - Reward", - "Trick House Puzzle 3 - Reward", - "Trick House Puzzle 4 - Reward", - "Trick House Puzzle 5 - Reward", - "Trick House Puzzle 6 - Reward", - "Trick House Puzzle 7 - Reward", - } -} - - VISITED_EVENT_NAME_TO_ID = { "EVENT_VISITED_LITTLEROOT_TOWN": 0, "EVENT_VISITED_OLDALE_TOWN": 1, @@ -80,7 +38,7 @@ class PokemonEmeraldLocation(Location): game: str = "Pokemon Emerald" item_address: Optional[int] default_item_code: Optional[int] - tags: FrozenSet[str] + key: Optional[str] def __init__( self, @@ -88,13 +46,13 @@ def __init__( name: str, address: Optional[int], parent: Optional[Region] = None, + key: Optional[str] = None, item_address: Optional[int] = None, - default_item_value: Optional[int] = None, - tags: FrozenSet[str] = frozenset()) -> None: + default_item_value: Optional[int] = None) -> None: super().__init__(player, name, address, parent) self.default_item_code = None if default_item_value is None else offset_item_value(default_item_value) self.item_address = item_address - self.tags = tags + self.key = key def offset_flag(flag: int) -> int: @@ -115,16 +73,14 @@ def reverse_offset_flag(location_id: int) -> int: return location_id - BASE_OFFSET -def create_locations_with_tags(world: "PokemonEmeraldWorld", regions: Dict[str, Region], tags: Iterable[str]) -> None: +def create_locations_by_category(world: "PokemonEmeraldWorld", regions: Dict[str, Region], categories: Set[LocationCategory]) -> None: """ Iterates through region data and adds locations to the multiworld if those locations include any of the provided tags. """ - tags = set(tags) - for region_name, region_data in data.regions.items(): region = regions[region_name] - filtered_locations = [loc for loc in region_data.locations if len(tags & data.locations[loc].tags) > 0] + filtered_locations = [loc for loc in region_data.locations if data.locations[loc].category in categories] for location_name in filtered_locations: location_data = data.locations[location_name] @@ -144,9 +100,9 @@ def create_locations_with_tags(world: "PokemonEmeraldWorld", regions: Dict[str, location_data.label, location_id, region, + location_name, location_data.address, - location_data.default_item, - location_data.tags + location_data.default_item ) region.locations.append(location) diff --git a/worlds/pokemon_emerald/options.py b/worlds/pokemon_emerald/options.py index e05b5d96ac74..8fcc74d1c34a 100644 --- a/worlds/pokemon_emerald/options.py +++ b/worlds/pokemon_emerald/options.py @@ -123,6 +123,8 @@ class Dexsanity(Toggle): Defeating gym leaders provides dex info, allowing you to see where on the map you can catch species you need. Each pokedex entry adds a Poke Ball, Great Ball, or Ultra Ball to the pool. + + Warning: This adds a lot of locations and will slow you down significantly. """ display_name = "Dexsanity" @@ -132,6 +134,8 @@ class Trainersanity(Toggle): Defeating a trainer gives you an item. Trainers are no longer missable. Trainers no longer give you money for winning. Each trainer adds a valuable item (Nugget, Stardust, etc.) to the pool. + + Warning: This adds a lot of locations and will slow you down significantly. """ display_name = "Trainersanity" @@ -265,6 +269,8 @@ class RandomizeWildPokemon(Choice): """ Randomizes wild pokemon encounters (grass, caves, water, fishing). + Warning: Matching both base stats and type may severely limit the variety for certain pokemon. + - Vanilla: Wild encounters are unchanged - Match Base Stats: Wild pokemon are replaced with species with approximately the same bst - Match Type: Wild pokemon are replaced with species that share a type with the original @@ -327,6 +333,8 @@ class RandomizeTrainerParties(Choice): """ Randomizes the parties of all trainers. + Warning: Matching both base stats and type may severely limit the variety for certain pokemon. + - Vanilla: Parties are unchanged - Match Base Stats: Trainer pokemon are replaced with species with approximately the same bst - Match Type: Trainer pokemon are replaced with species that share a type with the original @@ -357,6 +365,10 @@ class TrainerPartyBlacklist(OptionSet): class ForceFullyEvolved(Range): """ When an opponent uses a pokemon of the specified level or higher, restricts the species to only fully evolved pokemon. + + Only applies when trainer parties are randomized. + + Warning: Combining a low value with matched base stats may severely limit the variety for certain pokemon. """ display_name = "Force Fully Evolved" range_start = 1 diff --git a/worlds/pokemon_emerald/rom.py b/worlds/pokemon_emerald/rom.py index 2c0b5021d099..e2a7a4800bfb 100644 --- a/worlds/pokemon_emerald/rom.py +++ b/worlds/pokemon_emerald/rom.py @@ -73,6 +73,7 @@ "MUS_OBTAIN_SYMBOL": 318, "MUS_REGISTER_MATCH_CALL": 135, } +_EVOLUTION_FANFARE_INDEX = list(_FANFARES.keys()).index("MUS_EVOLVED") CAVE_EVENT_NAME_TO_ID = { "TERRA_CAVE_ROUTE_114_1": 1, @@ -661,6 +662,15 @@ def write_tokens(world: "PokemonEmeraldWorld", patch: PokemonEmeraldProcedurePat # Shuffle the lists, pair new tracks with original tracks, set the new track ids, and set new fanfare durations randomized_fanfares = [fanfare_name for fanfare_name in _FANFARES] world.random.shuffle(randomized_fanfares) + + # Prevent the evolution fanfare from receiving the poke flute by swapping it with something else. + # The poke flute sound causes the evolution scene to get stuck for like 40 seconds + if randomized_fanfares[_EVOLUTION_FANFARE_INDEX] == "MUS_RG_POKE_FLUTE": + swap_index = (_EVOLUTION_FANFARE_INDEX + 1) % len(_FANFARES) + temp = randomized_fanfares[_EVOLUTION_FANFARE_INDEX] + randomized_fanfares[_EVOLUTION_FANFARE_INDEX] = randomized_fanfares[swap_index] + randomized_fanfares[swap_index] = temp + for i, fanfare_pair in enumerate(zip(_FANFARES.keys(), randomized_fanfares)): patch.write_token( APTokenTypes.WRITE, diff --git a/worlds/pokemon_emerald/rules.py b/worlds/pokemon_emerald/rules.py index 5f83686ebeec..b8d1efb1a98d 100644 --- a/worlds/pokemon_emerald/rules.py +++ b/worlds/pokemon_emerald/rules.py @@ -6,7 +6,8 @@ from BaseClasses import CollectionState from worlds.generic.Rules import add_rule, set_rule -from .data import NATIONAL_ID_TO_SPECIES_ID, NUM_REAL_SPECIES, data +from .data import LocationCategory, NATIONAL_ID_TO_SPECIES_ID, NUM_REAL_SPECIES, data +from .locations import PokemonEmeraldLocation from .options import DarkCavesRequireFlash, EliteFourRequirement, NormanRequirement, Goal if TYPE_CHECKING: @@ -23,7 +24,7 @@ def set_rules(world: "PokemonEmeraldWorld") -> None: state.has(hm, world.player) and state.has_all(badges, world.player) else: hm_rules[hm] = lambda state, hm=hm, badges=badges: \ - state.has(hm, world.player) and state.has_group_unique("Badges", world.player, badges) + state.has(hm, world.player) and state.has_group_unique("Badge", world.player, badges) def has_acro_bike(state: CollectionState): return state.has("Acro Bike", world.player) @@ -236,11 +237,11 @@ def get_location(location: str): if world.options.norman_requirement == NormanRequirement.option_badges: set_rule( get_entrance("MAP_PETALBURG_CITY_GYM:2/MAP_PETALBURG_CITY_GYM:3"), - lambda state: state.has_group_unique("Badges", world.player, world.options.norman_count.value) + lambda state: state.has_group_unique("Badge", world.player, world.options.norman_count.value) ) set_rule( get_entrance("MAP_PETALBURG_CITY_GYM:5/MAP_PETALBURG_CITY_GYM:6"), - lambda state: state.has_group_unique("Badges", world.player, world.options.norman_count.value) + lambda state: state.has_group_unique("Badge", world.player, world.options.norman_count.value) ) else: set_rule( @@ -1506,7 +1507,7 @@ def get_location(location: str): if world.options.elite_four_requirement == EliteFourRequirement.option_badges: set_rule( get_entrance("REGION_EVER_GRANDE_CITY_POKEMON_LEAGUE_1F/MAIN -> REGION_EVER_GRANDE_CITY_POKEMON_LEAGUE_1F/BEHIND_BADGE_CHECKERS"), - lambda state: state.has_group_unique("Badges", world.player, world.options.elite_four_count.value) + lambda state: state.has_group_unique("Badge", world.player, world.options.elite_four_count.value) ) else: set_rule( @@ -1659,7 +1660,8 @@ def get_location(location: str): # Add Itemfinder requirement to hidden items if world.options.require_itemfinder: for location in world.multiworld.get_locations(world.player): - if location.tags is not None and "HiddenItem" in location.tags: + assert isinstance(location, PokemonEmeraldLocation) + if location.key is not None and data.locations[location.key].category == LocationCategory.HIDDEN_ITEM: add_rule( location, lambda state: state.has("Itemfinder", world.player) diff --git a/worlds/pokemon_emerald/sanity_check.py b/worlds/pokemon_emerald/sanity_check.py index 24eb768bfbc5..048b19b46919 100644 --- a/worlds/pokemon_emerald/sanity_check.py +++ b/worlds/pokemon_emerald/sanity_check.py @@ -5,8 +5,6 @@ import logging from typing import List -from .data import load_json_data, data - _IGNORABLE_LOCATIONS = frozenset({ "HIDDEN_ITEM_TRICK_HOUSE_NUGGET", # Is permanently mssiable and has special behavior that sets the flag early @@ -247,12 +245,29 @@ }) +def validate_group_maps() -> bool: + from .data import data + from .groups import _LOCATION_GROUP_MAPS + + failed = False + + for group_name, map_set in _LOCATION_GROUP_MAPS.items(): + for map_name in map_set: + if map_name not in data.maps: + failed = True + logging.error("Pokemon Emerald: Map named %s in location group %s does not exist", map_name, group_name) + + return not failed + + def validate_regions() -> bool: """ Verifies that Emerald's data doesn't have duplicate or missing regions/warps/locations. Meant to catch problems during development like forgetting to add a new location or incorrectly splitting a region. """ + from .data import load_json_data, data + extracted_data_json = load_json_data("extracted_data.json") error_messages: List[str] = [] warn_messages: List[str] = [] diff --git a/worlds/pokemon_emerald/test/__init__.py b/worlds/pokemon_emerald/test/__init__.py index 84ce64003d57..bf2a8da5b0c5 100644 --- a/worlds/pokemon_emerald/test/__init__.py +++ b/worlds/pokemon_emerald/test/__init__.py @@ -1,4 +1,4 @@ -from test.TestBase import WorldTestBase +from test.bases import WorldTestBase class PokemonEmeraldTestBase(WorldTestBase): diff --git a/worlds/pokemon_emerald/test/test_warps.py b/worlds/pokemon_emerald/test/test_warps.py index 75a2417dfbe6..d1b5b01dcf7f 100644 --- a/worlds/pokemon_emerald/test/test_warps.py +++ b/worlds/pokemon_emerald/test/test_warps.py @@ -1,4 +1,4 @@ -from test.TestBase import TestBase +from test.bases import TestBase from ..data import Warp diff --git a/worlds/pokemon_rb/__init__.py b/worlds/pokemon_rb/__init__.py index 2065507e0d59..809179cbef74 100644 --- a/worlds/pokemon_rb/__init__.py +++ b/worlds/pokemon_rb/__init__.py @@ -526,15 +526,24 @@ def stage_post_fill(cls, multiworld): # This cuts down on time spent calculating the spoiler playthrough. found_mons = set() for sphere in multiworld.get_spheres(): + mon_locations_in_sphere = {} for location in sphere: - if (location.game == "Pokemon Red and Blue" and (location.item.name in poke_data.pokemon_data.keys() - or "Static " in location.item.name) + if (location.game == location.item.game == "Pokemon Red and Blue" + and (location.item.name in poke_data.pokemon_data.keys() or "Static " in location.item.name) and location.item.advancement): key = (location.player, location.item.name) if key in found_mons: location.item.classification = ItemClassification.useful else: - found_mons.add(key) + mon_locations_in_sphere.setdefault(key, []).append(location) + for key, mon_locations in mon_locations_in_sphere.items(): + found_mons.add(key) + if len(mon_locations) > 1: + # Sort for deterministic results. + mon_locations.sort() + # Convert all but the first to useful classification. + for location in mon_locations[1:]: + location.item.classification = ItemClassification.useful def create_regions(self): if (self.options.old_man == "vanilla" or @@ -703,6 +712,7 @@ def fill_slot_data(self) -> dict: "require_pokedex": self.options.require_pokedex.value, "area_1_to_1_mapping": self.options.area_1_to_1_mapping.value, "blind_trainers": self.options.blind_trainers.value, + "v5_update": True, } if self.options.type_chart_seed == "random" or self.options.type_chart_seed.value.isdigit(): diff --git a/worlds/pokemon_rb/docs/setup_es.md b/worlds/pokemon_rb/docs/setup_es.md index 6499c9501263..67024c5b52ec 100644 --- a/worlds/pokemon_rb/docs/setup_es.md +++ b/worlds/pokemon_rb/docs/setup_es.md @@ -11,8 +11,7 @@ Al usar BizHawk, esta guía solo es aplicable en los sistemas de Windows y Linux - Instrucciones de instalaciÃŗn detalladas para BizHawk se pueden encontrar en el enlace de arriba. - Los usuarios de Windows deben ejecutar el instalador de prerrequisitos (prereq installer) primero, que tambiÊn se encuentra en el enlace de arriba. -- El cliente incorporado de Archipelago, que se puede encontrar [aquí](https://github.com/ArchipelagoMW/Archipelago/releases) - (selecciona `Pokemon Client` durante la instalaciÃŗn). +- El cliente incorporado de Archipelago, que se puede encontrar [aquí](https://github.com/ArchipelagoMW/Archipelago/releases). - Los ROMs originales de PokÊmon Red y/o Blue. La comunidad de Archipelago no puede proveerlos. ## Software Opcional @@ -75,27 +74,41 @@ Y los siguientes caracteres especiales (cada uno ocupa un carÃĄcter): ## Unirse a un juego MultiWorld -### Obtener tu parche de PokÊmon +### Generar y parchar un juego -Cuando te unes a un juego multiworld, se te pedirÃĄ que entregues tu archivo YAML a quien lo estÊ organizando. -Una vez que la generaciÃŗn acabe, el anfitriÃŗn te darÃĄ un enlace a tu archivo, o un .zip con los archivos de -todos. Tu archivo tiene una extensiÃŗn `.apred` o `.apblue`. +1. Crea tu archivo de opciones (YAML). +2. Sigue las instrucciones generales de Archipelago para [generar un juego](../../Archipelago/setup/en#generating-a-game). +Haciendo esto se generarÃĄ un archivo de salida. Tu parche tendrÃĄ la extensiÃŗn de archivo `.apred` o `.apblue`. +3. Abre `ArchipelagoLauncher.exe` +4. Selecciona "Open Patch" en el lado izquierdo y selecciona tu parche. +5. Si es tu primera vez parchando, se te pedirÃĄ que selecciones tu ROM original. +6. Un archivo `.gb` parchado serÃĄ creado en el mismo lugar donde estÃĄ el parche. +7. La primera vez que abras un parche con BizHawk Client, tambiÊn se te pedira ubicar `EmuHawk.exe` en tu +instalaciÃŗn de BizHawk. -Haz doble clic en tu archivo `.apred` o `.apblue` para que se ejecute el cliente y realice el parcheado del ROM. -Una vez acabe ese proceso (esto puede tardar un poco), el cliente y el emulador se abrirÃĄn automÃĄticamente (si es que se -ha asociado la extensiÃŗn al emulador tal como fue recomendado) +Si estÃĄs jugando una semilla single-player y no te importa tener seguimiento ni pistas, puedes terminar aqui, cerrar el +cliente, y cargar el ROM parchado en cualquier emulador. Sin embargo, para multiworlds y otras funciones de Archipelago, +continÃēa con los pasos abajo, usando el emulador BizHawk. ### Conectarse al multiserver -Una vez ejecutado tanto el cliente como el emulador, hay que conectarlos. Abre la carpeta de instalaciÃŗn de Archipelago, -luego abre `data/lua`, y simplemente arrastra el archivo `connector_pkmn_rb.lua` a la ventana principal de Emuhawk. -(Alternativamente, puedes abrir la consola de Lua manualmente. En Emuhawk ir a Tools > Lua Console, luego ir al menÃē -`Script` âŒĒ `Open Script`, navegar a la ubicaciÃŗn de `connector_pkmn_rb.lua` y seleccionarlo.) - -Para conectar el cliente con el servidor, simplemente pon `:` en la caja de texto superior y presiona -enter (si el servidor tiene contraseÃąa, en la caja de texto inferior escribir `/connect : [contraseÃąa]`) - -Ahora ya estÃĄs listo para tu aventura en Kanto. +Por defecto, abrir un parche harÃĄ los pasos del 1 al 5 automÃĄticamente. Incluso asi, es bueno memorizarlos en caso de +que tengas que cerrar y volver a abrir el juego por alguna razÃŗn. + +1. PokÊmon Red/Blue usa el BizHawk Client de Archipelago. Si el cliente no estÃĄ abierto desde cuando parchaste tu juego, +puedes volverlo a abrir desde el Launcher. +2. AsegÃērate que EmuHawk esta cargando el ROM parchado. +3. En EmuHawk, ir a `Tools > Lua Console`. Esta ventana debe quedarse abierta mientras se juega. +4. En la ventana de Lua Console, ir a `Script > Open Scriptâ€Ļ`. +5. Navegar a tu carpeta de instalaciÃŗn de Archipelago y abrir `data/lua/connector_bizhawk_generic.lua`. +6. El emulador se puede congelar por unos segundos hasta que logre conectarse al cliente. Esto es normal. La ventana del +BizHawk Client debería indicar que se logro conectar y reconocer PokÊmon Red/Blue. +7. Para conectar el cliente al servidor, ingresa la direcciÃŗn y el puerto (por ejemplo, `archipelago.gg:38281`) en el +campo de texto superior del cliente y y haz clic en Connect. + +Para conectar el cliente al multiserver simplemente escribe `:` en el campo de texto superior y +presiona enter (si el servidor usa contraseÃąa, escribe en el campo de texto inferior +`/connect :[contraseÃąa]`) ## Auto-Tracking diff --git a/worlds/pokemon_rb/encounters.py b/worlds/pokemon_rb/encounters.py index fbe4abfe4466..aa20114787c3 100644 --- a/worlds/pokemon_rb/encounters.py +++ b/worlds/pokemon_rb/encounters.py @@ -170,6 +170,8 @@ def process_pokemon_locations(self): encounter_slots = encounter_slots_master.copy() zone_mapping = {} + zone_placed_mons = {} + if self.options.randomize_wild_pokemon: mons_list = [pokemon for pokemon in poke_data.pokemon_data.keys() if pokemon not in poke_data.legendary_pokemon or self.options.randomize_legendary_pokemon.value == 3] @@ -180,11 +182,13 @@ def process_pokemon_locations(self): zone = " - ".join(location.name.split(" - ")[:-1]) if zone not in zone_mapping: zone_mapping[zone] = {} + if zone not in zone_placed_mons: + zone_placed_mons[zone] = [] original_mon = slot.original_item if self.options.area_1_to_1_mapping and original_mon in zone_mapping[zone]: mon = zone_mapping[zone][original_mon] else: - mon = randomize_pokemon(self, original_mon, mons_list, + mon = randomize_pokemon(self, original_mon, [m for m in mons_list if m not in zone_placed_mons[zone]], self.options.randomize_wild_pokemon.value, self.random) # while ("Pokemon Tower 6F" in slot.name and @@ -201,6 +205,7 @@ def process_pokemon_locations(self): location.item.location = location locations.append(location) zone_mapping[zone][original_mon] = mon + zone_placed_mons[zone].append(mon) mons_to_add = [] remaining_pokemon = [pokemon for pokemon in poke_data.pokemon_data.keys() if placed_mons[pokemon] == 0 and @@ -270,4 +275,4 @@ def process_pokemon_locations(self): location.item = self.create_item(slot.original_item) location.locked = True location.item.location = location - placed_mons[location.item.name] += 1 \ No newline at end of file + placed_mons[location.item.name] += 1 diff --git a/worlds/pokemon_rb/locations.py b/worlds/pokemon_rb/locations.py index 5885183baa9c..467139c39e94 100644 --- a/worlds/pokemon_rb/locations.py +++ b/worlds/pokemon_rb/locations.py @@ -223,7 +223,7 @@ def __init__(self, flag): Missable(92)), LocationData("Victory Road 2F-C", "East Item", "Full Heal", rom_addresses["Missable_Victory_Road_2F_Item_2"], Missable(93)), - LocationData("Victory Road 2F-W", "West Item", "TM05 Mega Kick", rom_addresses["Missable_Victory_Road_2F_Item_3"], + LocationData("Victory Road 2F-C", "West Item", "TM05 Mega Kick", rom_addresses["Missable_Victory_Road_2F_Item_3"], Missable(94)), LocationData("Victory Road 2F-NW", "North Item Near Moltres", "Guard Spec", rom_addresses["Missable_Victory_Road_2F_Item_4"], Missable(95)), @@ -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), diff --git a/worlds/pokemon_rb/rules.py b/worlds/pokemon_rb/rules.py index ba4bfd471c52..3c1cdc57e99b 100644 --- a/worlds/pokemon_rb/rules.py +++ b/worlds/pokemon_rb/rules.py @@ -94,6 +94,9 @@ def prize_rule(i): "Route 22 - Trainer Parties": lambda state: state.has("Oak's Parcel", player), + "Victory Road 1F - Top Item": lambda state: logic.can_strength(state, world, player), + "Victory Road 1F - Left Item": lambda state: logic.can_strength(state, world, player), + # # Rock Tunnel "Rock Tunnel 1F - PokeManiac": lambda state: logic.rock_tunnel(state, world, player), "Rock Tunnel 1F - Hiker 1": lambda state: logic.rock_tunnel(state, world, player), diff --git a/worlds/rogue_legacy/__init__.py b/worlds/rogue_legacy/__init__.py index 290f4a60ac21..7ffdd459db48 100644 --- a/worlds/rogue_legacy/__init__.py +++ b/worlds/rogue_legacy/__init__.py @@ -46,30 +46,6 @@ def fill_slot_data(self) -> dict: return self.options.as_dict(*[name for name in self.options_dataclass.type_hints.keys()]) def generate_early(self): - location_ids_used_per_game = { - world.game: set(world.location_id_to_name) for world in self.multiworld.worlds.values() - } - item_ids_used_per_game = { - world.game: set(world.item_id_to_name) for world in self.multiworld.worlds.values() - } - overlapping_games = set() - - for id_lookup in (location_ids_used_per_game, item_ids_used_per_game): - for game_1, ids_1 in id_lookup.items(): - for game_2, ids_2 in id_lookup.items(): - if game_1 == game_2: - continue - - if ids_1 & ids_2: - overlapping_games.add(tuple(sorted([game_1, game_2]))) - - if overlapping_games: - raise RuntimeError( - "In this multiworld, there are games with overlapping item/location IDs.\n" - "The current Rogue Legacy does not support these and a fix is not currently planned.\n" - f"The overlapping games are: {overlapping_games}" - ) - # Check validation of names. additional_lady_names = len(self.options.additional_lady_names.value) additional_sir_names = len(self.options.additional_sir_names.value) diff --git a/worlds/sc2/Locations.py b/worlds/sc2/Locations.py index bf9c06fa3f78..b9c30bb70106 100644 --- a/worlds/sc2/Locations.py +++ b/worlds/sc2/Locations.py @@ -1387,7 +1387,7 @@ def get_locations(world: Optional[World]) -> Tuple[LocationData, ...]: lambda state: logic.templars_return_requirement(state)), LocationData("The Host", "The Host: Victory", SC2LOTV_LOC_ID_OFFSET + 2100, LocationType.VICTORY, lambda state: logic.the_host_requirement(state)), - LocationData("The Host", "The Host: Southeast Void Shard", SC2LOTV_LOC_ID_OFFSET + 2101, LocationType.VICTORY, + LocationData("The Host", "The Host: Southeast Void Shard", SC2LOTV_LOC_ID_OFFSET + 2101, LocationType.EXTRA, lambda state: logic.the_host_requirement(state)), LocationData("The Host", "The Host: South Void Shard", SC2LOTV_LOC_ID_OFFSET + 2102, LocationType.EXTRA, lambda state: logic.the_host_requirement(state)), @@ -1445,11 +1445,11 @@ def get_locations(world: Optional[World]) -> Tuple[LocationData, ...]: LocationData("The Escape", "The Escape: Agent Stone", SC2NCO_LOC_ID_OFFSET + 105, LocationType.VANILLA, lambda state: logic.the_escape_requirement(state)), LocationData("Sudden Strike", "Sudden Strike: Victory", SC2NCO_LOC_ID_OFFSET + 200, LocationType.VICTORY, - lambda state: logic.sudden_strike_can_reach_objectives(state)), + lambda state: logic.sudden_strike_requirement(state)), LocationData("Sudden Strike", "Sudden Strike: Research Center", SC2NCO_LOC_ID_OFFSET + 201, LocationType.VANILLA, lambda state: logic.sudden_strike_can_reach_objectives(state)), LocationData("Sudden Strike", "Sudden Strike: Weaponry Labs", SC2NCO_LOC_ID_OFFSET + 202, LocationType.VANILLA, - lambda state: logic.sudden_strike_requirement(state)), + lambda state: logic.sudden_strike_can_reach_objectives(state)), LocationData("Sudden Strike", "Sudden Strike: Brutalisk", SC2NCO_LOC_ID_OFFSET + 203, LocationType.EXTRA, lambda state: logic.sudden_strike_requirement(state)), LocationData("Enemy Intelligence", "Enemy Intelligence: Victory", SC2NCO_LOC_ID_OFFSET + 300, LocationType.VICTORY, diff --git a/worlds/sc2/MissionTables.py b/worlds/sc2/MissionTables.py index 4dece46411bf..08e1f133deda 100644 --- a/worlds/sc2/MissionTables.py +++ b/worlds/sc2/MissionTables.py @@ -43,6 +43,9 @@ def __init__(self, campaign_id: int, name: str, goal_priority: SC2CampaignGoalPr self.goal_priority = goal_priority self.race = race + def __lt__(self, other: "SC2Campaign"): + return self.id < other.id + GLOBAL = 0, "Global", SC2CampaignGoalPriority.NONE, SC2Race.ANY WOL = 1, "Wings of Liberty", SC2CampaignGoalPriority.VERY_HARD, SC2Race.TERRAN PROPHECY = 2, "Prophecy", SC2CampaignGoalPriority.MINI_CAMPAIGN, SC2Race.PROTOSS diff --git a/worlds/sc2/Regions.py b/worlds/sc2/Regions.py index 84830a9a32bd..273bc4a5e87c 100644 --- a/worlds/sc2/Regions.py +++ b/worlds/sc2/Regions.py @@ -50,7 +50,7 @@ def create_vanilla_regions( names: Dict[str, int] = {} # Generating all regions and locations for each enabled campaign - for campaign in enabled_campaigns: + for campaign in sorted(enabled_campaigns): for region_name in vanilla_mission_req_table[campaign].keys(): regions.append(create_region(world, locations_per_region, location_cache, region_name)) world.multiworld.regions += regions diff --git a/worlds/sm/__init__.py b/worlds/sm/__init__.py index bf9d6d087edd..160b7e4ec78b 100644 --- a/worlds/sm/__init__.py +++ b/worlds/sm/__init__.py @@ -313,9 +313,11 @@ def remove(self, state: CollectionState, item: Item) -> bool: return super(SMWorld, self).remove(state, item) def create_item(self, name: str) -> Item: - item = next(x for x in ItemManager.Items.values() if x.Name == name) - return SMItem(item.Name, ItemClassification.progression if item.Class != 'Minor' else ItemClassification.filler, item.Type, self.item_name_to_id[item.Name], + item = next((x for x in ItemManager.Items.values() if x.Name == name), None) + if item: + return SMItem(item.Name, ItemClassification.progression if item.Class != 'Minor' else ItemClassification.filler, item.Type, self.item_name_to_id[item.Name], player=self.player) + raise KeyError(f"Item {name} for {self.player_name} is invalid.") def get_filler_item_name(self) -> str: if self.multiworld.random.randint(0, 100) < self.options.minor_qty.value: diff --git a/worlds/sm64ex/Options.py b/worlds/sm64ex/Options.py index 60ec4bbe13c2..6cf233558ce2 100644 --- a/worlds/sm64ex/Options.py +++ b/worlds/sm64ex/Options.py @@ -1,6 +1,6 @@ import typing from dataclasses import dataclass -from Options import DefaultOnToggle, Range, Toggle, DeathLink, Choice, PerGameCommonOptions, OptionSet +from Options import DefaultOnToggle, Range, Toggle, DeathLink, Choice, PerGameCommonOptions, OptionSet, OptionGroup from .Items import action_item_table class EnableCoinStars(DefaultOnToggle): @@ -91,12 +91,11 @@ class BuddyChecks(Toggle): display_name = "Bob-omb Buddy Checks" -class ExclamationBoxes(Choice): +class ExclamationBoxes(Toggle): """Include 1Up Exclamation Boxes during randomization. Adds 29 locations to the pool.""" display_name = "Randomize 1Up !-Blocks" - option_Off = 0 - option_1Ups_Only = 1 + alias_1Ups_Only = 1 class CompletionType(Choice): @@ -128,6 +127,32 @@ class MoveRandomizerActions(OptionSet): valid_keys = [action for action in action_item_table if action != 'Double Jump'] default = valid_keys +sm64_options_groups = [ + OptionGroup("Logic Options", [ + AreaRandomizer, + BuddyChecks, + ExclamationBoxes, + ProgressiveKeys, + EnableCoinStars, + StrictCapRequirements, + StrictCannonRequirements, + ]), + OptionGroup("Ability Options", [ + EnableMoveRandomizer, + MoveRandomizerActions, + StrictMoveRequirements, + ]), + OptionGroup("Star Options", [ + AmountOfStars, + FirstBowserStarDoorCost, + BasementStarDoorCost, + SecondFloorStarDoorCost, + MIPS1Cost, + MIPS2Cost, + StarsToFinish, + ]), +] + @dataclass class SM64Options(PerGameCommonOptions): area_rando: AreaRandomizer diff --git a/worlds/sm64ex/__init__.py b/worlds/sm64ex/__init__.py index 833ae56ca302..40c778ebe66c 100644 --- a/worlds/sm64ex/__init__.py +++ b/worlds/sm64ex/__init__.py @@ -3,7 +3,7 @@ import json from .Items import item_table, action_item_table, cannon_item_table, SM64Item from .Locations import location_table, SM64Location -from .Options import SM64Options +from .Options import sm64_options_groups, SM64Options from .Rules import set_rules from .Regions import create_regions, sm64_level_to_entrances, SM64Levels from BaseClasses import Item, Tutorial, ItemClassification, Region @@ -20,6 +20,8 @@ class SM64Web(WebWorld): ["N00byKing"] )] + option_groups = sm64_options_groups + class SM64World(World): """ @@ -55,7 +57,7 @@ def generate_early(self): for action in self.options.move_rando_actions.value: max_stars -= 1 self.move_rando_bitvec |= (1 << (action_item_table[action] - action_item_table['Double Jump'])) - if (self.options.exclamation_boxes > 0): + if self.options.exclamation_boxes: max_stars += 29 self.number_of_stars = min(self.options.amount_of_stars, max_stars) self.filler_count = max_stars - self.number_of_stars @@ -133,7 +135,7 @@ def generate_basic(self): self.multiworld.get_location("THI: Bob-omb Buddy", self.player).place_locked_item(self.create_item("Cannon Unlock THI")) self.multiworld.get_location("RR: Bob-omb Buddy", self.player).place_locked_item(self.create_item("Cannon Unlock RR")) - if (self.options.exclamation_boxes == 0): + if not self.options.exclamation_boxes: self.multiworld.get_location("CCM: 1Up Block Near Snowman", self.player).place_locked_item(self.create_item("1Up Mushroom")) self.multiworld.get_location("CCM: 1Up Block Ice Pillar", self.player).place_locked_item(self.create_item("1Up Mushroom")) self.multiworld.get_location("CCM: 1Up Block Secret Slide", self.player).place_locked_item(self.create_item("1Up Mushroom")) diff --git a/worlds/sm64ex/docs/setup_en.md b/worlds/sm64ex/docs/setup_en.md index 7456bcb70b62..9963d3945a10 100644 --- a/worlds/sm64ex/docs/setup_en.md +++ b/worlds/sm64ex/docs/setup_en.md @@ -29,13 +29,25 @@ Then continue to `Using the Launcher` *Using the Launcher* -1. Go to the page linked for SM64AP-Launcher, and press on the topmost entry +1. Go to the page linked for SM64AP-Launcher, and press on the topmost entry. 2. Scroll down, and download the zip file for your OS. -3. Unpack the zip file in an empty folder +3. Unpack the zip file in an empty folder. 4. Run the Launcher. On first start, press `Check Requirements`, which will guide you through the rest of the needed steps. - Windows: If you did not use the default install directory for MSYS, close this window, check `Show advanced options` and reopen using `Re-check Requirements`. You can then set the path manually. -5. When finished, use `Compile default SM64AP build` to continue - - Advanced user can use `Show advanced options` to build with custom makeflags (`BETTERCAMERA`, `NODRAWINGDISTANCE`, ...), different repos and branches, and game patches such as 60FPS, Enhanced Moveset and others. +5. When finished, use `Compile default SM64AP build` to continue. + - **Advanced configuration:** If you want to use additional build options such as Better Camera, No Drawing Distance, etc or apply game patches such as 60FPS, Enhanced Moveset, etc, then use the `Compile custom build` option: + - Set a name for your build, e.g. "archipelago" or whatever you like. + - Press the `Download Files` button. + - Set Make Flags, e.g. `-j8 BETTERCAMERA=1 NODRAWINGDISTANCE=1` to enable Better Camera and No Drawing Distance. + - Press `Apply Patches` to select patches to apply. Example patches include: + - 60FPS: Improves frame rate. + - Enhanced Moveset: Gives Mario new abilities. [Details here](https://github.com/TheGag96/sm64-port). + - Nonstop Mode: Makes it possible to fetch multiple stars in a level without exiting the level first. + - Press `Create Build`. This will take several minutes. + - You can also use the Repository and Branch fields to build with different repos or branches if you want to build using a fork or development version of SM64AP. + - For more details, see: + - [Available Makeflags](https://github.com/sm64pc/sm64ex/wiki/Build-options) + - [Included Game Patches](https://github.com/N00byKing/sm64ex/blob/archipelago/enhancements/README.md) 6. Press `Download Files` to prepare the build, afterwards `Create Build`. 7. SM64EX will now be compiled. This can take a while. diff --git a/worlds/smz3/Options.py b/worlds/smz3/Options.py index 7df01f8710e1..02521d695a7a 100644 --- a/worlds/smz3/Options.py +++ b/worlds/smz3/Options.py @@ -1,5 +1,6 @@ import typing -from Options import Choice, Option, PerGameCommonOptions, Toggle, DefaultOnToggle, Range, ItemsAccessibility + +from Options import Choice, Option, PerGameCommonOptions, Toggle, DefaultOnToggle, Range, ItemsAccessibility, StartInventoryPool from dataclasses import dataclass class SMLogic(Choice): @@ -129,6 +130,7 @@ class EnergyBeep(DefaultOnToggle): @dataclass class SMZ3Options(PerGameCommonOptions): + start_inventory_from_pool: StartInventoryPool accessibility: ItemsAccessibility sm_logic: SMLogic sword_location: SwordLocation diff --git a/worlds/smz3/Rom.py b/worlds/smz3/Rom.py index 3fec151dc679..d66d9239792d 100644 --- a/worlds/smz3/Rom.py +++ b/worlds/smz3/Rom.py @@ -3,18 +3,38 @@ import Utils from Utils import read_snes_rom -from worlds.Files import APDeltaPatch +from worlds.Files import APProcedurePatch, APPatchExtension, APTokenMixin, APTokenTypes +from worlds.smz3.ips import IPS_Patch SMJUHASH = '21f3e98df4780ee1c667b84e57d88675' LTTPJPN10HASH = '03a63945398191337e896e5771f77173' ROM_PLAYER_LIMIT = 256 +world_folder = os.path.dirname(__file__) -class SMZ3DeltaPatch(APDeltaPatch): +class SMZ3PatchExtensions(APPatchExtension): + game = "SMZ3" + + @staticmethod + def apply_basepatch(caller: APProcedurePatch, rom: bytes) -> bytes: + basepatch = IPS_Patch.load(world_folder + "/data/zsm.ips") + return basepatch.apply(rom) + +class SMZ3ProcedurePatch(APProcedurePatch, APTokenMixin): hash = "3a177ba9879e3dd04fb623a219d175b2" game = "SMZ3" patch_file_ending = ".apsmz3" + procedure = [ + ("apply_basepatch", []), + ("apply_tokens", ["token_data.bin"]), + ] + + def write_tokens(self, patches): + for addr, data in patches.items(): + self.write_token(APTokenTypes.WRITE, addr, bytes(data)) + self.write_file("token_data.bin", self.get_token_binary()) + @classmethod def get_source_data(cls) -> bytes: return get_base_rom_bytes() diff --git a/worlds/smz3/__init__.py b/worlds/smz3/__init__.py index 5e6a6ac60965..838db1f7e745 100644 --- a/worlds/smz3/__init__.py +++ b/worlds/smz3/__init__.py @@ -19,11 +19,10 @@ from .TotalSMZ3.Region import IReward, IMedallionAccess from .TotalSMZ3.Text.Texts import openFile from worlds.AutoWorld import World, AutoLogicRegister, WebWorld -from .Client import SMZ3SNIClient -from .Rom import get_base_rom_bytes, SMZ3DeltaPatch -from .ips import IPS_Patch +from .Rom import SMZ3ProcedurePatch from .Options import SMZ3Options -from Options import Accessibility, ItemsAccessibility +from Options import ItemsAccessibility +from .Client import SMZ3SNIClient world_folder = os.path.dirname(__file__) logger = logging.getLogger("SMZ3") @@ -183,10 +182,6 @@ def isProgression(cls, itemType): } return itemType in progressionTypes - @classmethod - def stage_assert_generate(cls, multiworld: MultiWorld): - base_combined_rom = get_base_rom_bytes() - def generate_early(self): self.config = Config() self.config.GameMode = GameMode.Multiworld @@ -444,10 +439,6 @@ def apply_customization(self): def generate_output(self, output_directory: str): try: - base_combined_rom = get_base_rom_bytes() - basepatch = IPS_Patch.load(world_folder + "/data/zsm.ips") - base_combined_rom = basepatch.apply(base_combined_rom) - patcher = TotalSMZ3Patch(self.smz3World, [world.smz3World for key, world in self.multiworld.worlds.items() if isinstance(world, SMZ3World) and hasattr(world, "smz3World")], self.multiworld.seed_name, @@ -459,21 +450,13 @@ def generate_output(self, output_directory: str): patches.update(self.apply_sm_custom_sprite()) patches.update(self.apply_item_names()) patches.update(self.apply_customization()) - for addr, bytes in patches.items(): - offset = 0 - for byte in bytes: - base_combined_rom[addr + offset] = byte - offset += 1 - - outfilebase = self.multiworld.get_out_file_name_base(self.player) - - filename = os.path.join(output_directory, f"{outfilebase}.sfc") - with open(filename, "wb") as binary_file: - binary_file.write(base_combined_rom) - patch = SMZ3DeltaPatch(os.path.splitext(filename)[0] + SMZ3DeltaPatch.patch_file_ending, player=self.player, - player_name=self.multiworld.player_name[self.player], patched_path=filename) - patch.write() - os.remove(filename) + + patch = SMZ3ProcedurePatch(player=self.player, player_name=self.player_name) + patch.write_tokens(patches) + rom_path = os.path.join(output_directory, f"{self.multiworld.get_out_file_name_base(self.player)}" + f"{patch.patch_file_ending}") + patch.write(rom_path) + self.rom_name = bytearray(patcher.title, 'utf8') except: raise diff --git a/worlds/stardew_valley/__init__.py b/worlds/stardew_valley/__init__.py index f9df8c292e37..34c617f5013a 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 +from Options import PerGameCommonOptions, Accessibility from worlds.AutoWorld import World, WebWorld from . import rules from .bundles.bundle_room import BundleRoom @@ -91,15 +91,14 @@ class StardewValleyWorld(World): web = StardewWebWorld() modified_bundles: List[BundleRoom] randomized_entrances: Dict[str, str] - total_progression_items: int - # all_progression_items: Dict[str, int] # If you need to debug total_progression_items, uncommenting this will help tremendously + total_progression_items: int + excluded_from_total_progression_items: List[str] = [Event.received_walnuts] def __init__(self, multiworld: MultiWorld, player: int): super().__init__(multiworld, player) self.filler_item_pool_names = [] self.total_progression_items = 0 - # self.all_progression_items = dict() # Taking the seed specified in slot data for UT, otherwise just generating the seed. self.seed = getattr(multiworld, "re_gen_passthrough", {}).get(STARDEW_VALLEY, self.random.getrandbits(64)) @@ -121,17 +120,27 @@ def force_change_options_if_incompatible(self): 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 - player_name = self.multiworld.player_name[self.player] logger.warning( - f"Goal '{goal_name}' requires Ginger Island. Exclude Ginger Island setting forced to 'False' for player {self.player} ({player_name})") + 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 - player_name = self.multiworld.player_name[self.player] logger.warning( - f"Walnutsanity requires Ginger Island. Ginger Island was excluded from {self.player} ({player_name})'s world, so walnutsanity was force disabled") + 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: @@ -139,7 +148,7 @@ def create_region(name: str, exits: Iterable[str]) -> Region: region.exits = [Entrance(self.player, exit_name, region) for exit_name in exits] return region - world_regions, world_entrances, self.randomized_entrances = create_regions(create_region, self.random, self.options) + world_regions, world_entrances, self.randomized_entrances = create_regions(create_region, self.random, self.options, self.content) self.logic = StardewLogic(self.player, self.options, self.content, world_regions.keys()) self.modified_bundles = get_all_bundles(self.random, @@ -171,15 +180,26 @@ def create_items(self): for location in self.multiworld.get_locations(self.player) if location.address is not None]) - created_items = create_items(self.create_item, self.delete_item, locations_count, items_to_exclude, self.options, self.content, - self.random) + created_items = create_items(self.create_item, locations_count, items_to_exclude, self.options, self.content, self.random) self.multiworld.itempool += created_items - setup_early_items(self.multiworld, self.options, self.player, self.random) + setup_early_items(self.multiworld, self.options, self.content, self.player, self.random) self.setup_player_events() self.setup_victory() + # This is really a best-effort to get the total progression items count. It is mostly used to spread grinds across spheres are push back locations that + # only become available after months or years in game. In most cases, not having the exact count will not impact the logic. + # + # The actual total can be impacted by the start_inventory_from_pool, when items are removed from the pool but not from the total. The is also a bug + # with plando where additional progression items can be created without being accounted for, which impact the real amount of progression items. This can + # ultimately create unwinnable seeds where some items (like Blueberry seeds) are locked in Shipsanity: Blueberry, but world is deemed winnable as the + # winning rule only check the count of collected progression items. + self.total_progression_items += sum(1 for i in self.multiworld.precollected_items[self.player] if i.advancement) + self.total_progression_items += sum(1 for i in self.multiworld.get_filled_locations(self.player) if i.advancement) + self.total_progression_items += sum(1 for i in created_items if i.advancement) + self.total_progression_items -= 1 # -1 for the victory event + def precollect_starting_season(self): if self.options.season_randomization == SeasonRandomization.option_progressive: return @@ -206,25 +226,10 @@ def precollect_farm_type_items(self): self.multiworld.push_precollected(self.create_starting_item("Progressive Coop")) def setup_player_events(self): - self.setup_construction_events() - self.setup_quest_events() self.setup_action_events() self.setup_logic_events() - def setup_construction_events(self): - can_construct_buildings = LocationData(None, RegionName.carpenter, Event.can_construct_buildings) - self.create_event_location(can_construct_buildings, True_(), Event.can_construct_buildings) - - def setup_quest_events(self): - start_dark_talisman_quest = LocationData(None, RegionName.railroad, Event.start_dark_talisman_quest) - self.create_event_location(start_dark_talisman_quest, self.logic.wallet.has_rusty_key(), Event.start_dark_talisman_quest) - def setup_action_events(self): - can_ship_event = LocationData(None, LogicRegion.shipping, Event.can_ship_items) - self.create_event_location(can_ship_event, true_, Event.can_ship_items) - can_shop_pierre_event = LocationData(None, RegionName.pierre_store, Event.can_shop_at_pierre) - self.create_event_location(can_shop_pierre_event, true_, Event.can_shop_at_pierre) - spring_farming = LocationData(None, LogicRegion.spring_farming, Event.spring_farming) self.create_event_location(spring_farming, true_, Event.spring_farming) summer_farming = LocationData(None, LogicRegion.summer_farming, Event.summer_farming) @@ -319,14 +324,8 @@ def create_item(self, item: Union[str, ItemData], override_classification: ItemC if override_classification is None: override_classification = item.classification - if override_classification == ItemClassification.progression: - self.total_progression_items += 1 return StardewItem(item.name, override_classification, item.code, self.player) - def delete_item(self, item: Item): - if item.classification & ItemClassification.progression: - self.total_progression_items -= 1 - def create_starting_item(self, item: Union[str, ItemData]) -> StardewItem: if isinstance(item, str): item = item_table[item] @@ -345,10 +344,6 @@ def create_event_location(self, location_data: LocationData, rule: StardewRule = region.locations.append(location) location.place_locked_item(StardewItem(item, ItemClassification.progression, None, self.player)) - # This is not ideal, but the rule count them so... - if item != Event.victory: - self.total_progression_items += 1 - def set_rules(self): set_rules(self) @@ -441,15 +436,25 @@ def fill_slot_data(self) -> Dict[str, Any]: def collect(self, state: CollectionState, item: StardewItem) -> bool: change = super().collect(state, item) - if change: - state.prog_items[self.player][Event.received_walnuts] += self.get_walnut_amount(item.name) - return change + if not change: + return False + + walnut_amount = self.get_walnut_amount(item.name) + if walnut_amount: + state.prog_items[self.player][Event.received_walnuts] += walnut_amount + + return True def remove(self, state: CollectionState, item: StardewItem) -> bool: change = super().remove(state, item) - if change: - state.prog_items[self.player][Event.received_walnuts] -= self.get_walnut_amount(item.name) - return change + if not change: + return False + + walnut_amount = self.get_walnut_amount(item.name) + if walnut_amount: + state.prog_items[self.player][Event.received_walnuts] -= walnut_amount + + return True @staticmethod def get_walnut_amount(item_name: str) -> int: diff --git a/worlds/stardew_valley/bundles/bundle_item.py b/worlds/stardew_valley/bundles/bundle_item.py index 7dc9c0e1a3b5..91e279d2a623 100644 --- a/worlds/stardew_valley/bundles/bundle_item.py +++ b/worlds/stardew_valley/bundles/bundle_item.py @@ -3,8 +3,8 @@ from abc import ABC, abstractmethod from dataclasses import dataclass -from ..content import StardewContent -from ..options import StardewValleyOptions, ExcludeGingerIsland, FestivalLocations, SkillProgression +from ..content import StardewContent, content_packs +from ..options import StardewValleyOptions, FestivalLocations from ..strings.crop_names import Fruit from ..strings.currency_names import Currency from ..strings.quality_names import CropQuality, FishQuality, ForageQuality @@ -12,34 +12,35 @@ class BundleItemSource(ABC): @abstractmethod - def can_appear(self, options: StardewValleyOptions) -> bool: + def can_appear(self, content: StardewContent, options: StardewValleyOptions) -> bool: ... class VanillaItemSource(BundleItemSource): - def can_appear(self, options: StardewValleyOptions) -> bool: + def can_appear(self, content: StardewContent, options: StardewValleyOptions) -> bool: return True class IslandItemSource(BundleItemSource): - def can_appear(self, options: StardewValleyOptions) -> bool: - return options.exclude_ginger_island == ExcludeGingerIsland.option_false + def can_appear(self, content: StardewContent, options: StardewValleyOptions) -> bool: + return content_packs.ginger_island_content_pack.name in content.registered_packs class FestivalItemSource(BundleItemSource): - def can_appear(self, options: StardewValleyOptions) -> bool: + def can_appear(self, content: StardewContent, options: StardewValleyOptions) -> bool: return options.festival_locations != FestivalLocations.option_disabled +# FIXME remove this once recipes are in content packs class MasteryItemSource(BundleItemSource): - def can_appear(self, options: StardewValleyOptions) -> bool: - return options.skill_progression == SkillProgression.option_progressive_with_masteries + def can_appear(self, content: StardewContent, options: StardewValleyOptions) -> bool: + return content.features.skill_progression.are_masteries_shuffled class ContentItemSource(BundleItemSource): """This is meant to be used for items that are managed by the content packs.""" - def can_appear(self, options: StardewValleyOptions) -> bool: + def can_appear(self, content: StardewContent, options: StardewValleyOptions) -> bool: raise ValueError("This should not be called, check if the item is in the content instead.") @@ -97,5 +98,4 @@ def can_appear(self, content: StardewContent, options: StardewValleyOptions) -> if isinstance(self.source, ContentItemSource): return self.get_item() in content.game_items - return self.source.can_appear(options) - + return self.source.can_appear(content, options) diff --git a/worlds/stardew_valley/content/__init__.py b/worlds/stardew_valley/content/__init__.py index 9130873fa405..54b4d75d5e5c 100644 --- a/worlds/stardew_valley/content/__init__.py +++ b/worlds/stardew_valley/content/__init__.py @@ -1,5 +1,5 @@ from . import content_packs -from .feature import cropsanity, friendsanity, fishsanity, booksanity +from .feature import cropsanity, friendsanity, fishsanity, booksanity, skill_progression from .game_content import ContentPack, StardewContent, StardewFeatures from .unpacking import unpack_content from .. import options @@ -31,7 +31,8 @@ def choose_features(player_options: options.StardewValleyOptions) -> StardewFeat choose_booksanity(player_options.booksanity), choose_cropsanity(player_options.cropsanity), choose_fishsanity(player_options.fishsanity), - choose_friendsanity(player_options.friendsanity, player_options.friendsanity_heart_size) + choose_friendsanity(player_options.friendsanity, player_options.friendsanity_heart_size), + choose_skill_progression(player_options.skill_progression), ) @@ -105,3 +106,19 @@ def choose_friendsanity(friendsanity_option: options.Friendsanity, heart_size: o return friendsanity.FriendsanityAllWithMarriage(heart_size.value) raise ValueError(f"No friendsanity feature mapped to {str(friendsanity_option.value)}") + + +skill_progression_by_option = { + options.SkillProgression.option_vanilla: skill_progression.SkillProgressionVanilla(), + options.SkillProgression.option_progressive: skill_progression.SkillProgressionProgressive(), + options.SkillProgression.option_progressive_with_masteries: skill_progression.SkillProgressionProgressiveWithMasteries(), +} + + +def choose_skill_progression(skill_progression_option: options.SkillProgression) -> skill_progression.SkillProgressionFeature: + skill_progression_feature = skill_progression_by_option.get(skill_progression_option) + + if skill_progression_feature is None: + raise ValueError(f"No skill progression feature mapped to {str(skill_progression_option.value)}") + + return skill_progression_feature diff --git a/worlds/stardew_valley/content/feature/__init__.py b/worlds/stardew_valley/content/feature/__init__.py index 74249c808257..f3e5c6732e32 100644 --- a/worlds/stardew_valley/content/feature/__init__.py +++ b/worlds/stardew_valley/content/feature/__init__.py @@ -2,3 +2,4 @@ from . import cropsanity from . import fishsanity from . import friendsanity +from . import skill_progression diff --git a/worlds/stardew_valley/content/feature/skill_progression.py b/worlds/stardew_valley/content/feature/skill_progression.py new file mode 100644 index 000000000000..1325d4b35ff2 --- /dev/null +++ b/worlds/stardew_valley/content/feature/skill_progression.py @@ -0,0 +1,46 @@ +from abc import ABC, abstractmethod +from typing import ClassVar, Iterable, Tuple + +from ...data.skill import Skill + + +class SkillProgressionFeature(ABC): + is_progressive: ClassVar[bool] + are_masteries_shuffled: ClassVar[bool] + + @abstractmethod + def get_randomized_level_names_by_level(self, skill: Skill) -> Iterable[Tuple[int, str]]: + ... + + @abstractmethod + def is_mastery_randomized(self, skill: Skill) -> bool: + ... + + +class SkillProgressionVanilla(SkillProgressionFeature): + is_progressive = False + are_masteries_shuffled = False + + def get_randomized_level_names_by_level(self, skill: Skill) -> Iterable[Tuple[int, str]]: + return () + + def is_mastery_randomized(self, skill: Skill) -> bool: + return False + + +class SkillProgressionProgressive(SkillProgressionFeature): + is_progressive = True + are_masteries_shuffled = False + + def get_randomized_level_names_by_level(self, skill: Skill) -> Iterable[Tuple[int, str]]: + return skill.level_names_by_level + + def is_mastery_randomized(self, skill: Skill) -> bool: + return False + + +class SkillProgressionProgressiveWithMasteries(SkillProgressionProgressive): + are_masteries_shuffled = True + + def is_mastery_randomized(self, skill: Skill) -> bool: + return skill.has_mastery diff --git a/worlds/stardew_valley/content/game_content.py b/worlds/stardew_valley/content/game_content.py index 8dcf933145e3..7ff3217b04ed 100644 --- a/worlds/stardew_valley/content/game_content.py +++ b/worlds/stardew_valley/content/game_content.py @@ -3,7 +3,7 @@ from dataclasses import dataclass, field from typing import Dict, Iterable, Set, Any, Mapping, Type, Tuple, Union -from .feature import booksanity, cropsanity, fishsanity, friendsanity +from .feature import booksanity, cropsanity, fishsanity, friendsanity, skill_progression from ..data.fish_data import FishItem from ..data.game_item import GameItem, ItemSource, ItemTag from ..data.skill import Skill @@ -53,6 +53,7 @@ class StardewFeatures: cropsanity: cropsanity.CropsanityFeature fishsanity: fishsanity.FishsanityFeature friendsanity: friendsanity.FriendsanityFeature + skill_progression: skill_progression.SkillProgressionFeature @dataclass(frozen=True) diff --git a/worlds/stardew_valley/content/unpacking.py b/worlds/stardew_valley/content/unpacking.py index f069866d56cd..3c57f91afe3a 100644 --- a/worlds/stardew_valley/content/unpacking.py +++ b/worlds/stardew_valley/content/unpacking.py @@ -1,16 +1,12 @@ from __future__ import annotations +from graphlib import TopologicalSorter from typing import Iterable, Mapping, Callable from .game_content import StardewContent, ContentPack, StardewFeatures from .vanilla.base import base_game as base_game_content_pack from ..data.game_item import GameItem, ItemSource -try: - from graphlib import TopologicalSorter -except ImportError: - from graphlib_backport import TopologicalSorter # noqa - def unpack_content(features: StardewFeatures, packs: Iterable[ContentPack]) -> StardewContent: # Base game is always registered first. diff --git a/worlds/stardew_valley/data/artisan.py b/worlds/stardew_valley/data/artisan.py index 593ab6a3ddf0..90be5b1684f0 100644 --- a/worlds/stardew_valley/data/artisan.py +++ b/worlds/stardew_valley/data/artisan.py @@ -1,9 +1,9 @@ from dataclasses import dataclass -from .game_item import kw_only, ItemSource +from .game_item import ItemSource -@dataclass(frozen=True, **kw_only) +@dataclass(frozen=True, kw_only=True) class MachineSource(ItemSource): item: str # this should be optional (worm bin) machine: str diff --git a/worlds/stardew_valley/data/craftable_data.py b/worlds/stardew_valley/data/craftable_data.py index d83478a62051..713db4732075 100644 --- a/worlds/stardew_valley/data/craftable_data.py +++ b/worlds/stardew_valley/data/craftable_data.py @@ -1,7 +1,7 @@ from typing import Dict, List, Optional from .recipe_source import RecipeSource, StarterSource, QueenOfSauceSource, ShopSource, SkillSource, FriendshipSource, ShopTradeSource, CutsceneSource, \ - ArchipelagoSource, LogicSource, SpecialOrderSource, FestivalShopSource, QuestSource, MasterySource + ArchipelagoSource, LogicSource, SpecialOrderSource, FestivalShopSource, QuestSource, MasterySource, SkillCraftsanitySource from ..mods.mod_data import ModNames from ..strings.animal_product_names import AnimalProduct from ..strings.artisan_good_names import ArtisanGood @@ -64,6 +64,11 @@ def skill_recipe(name: str, skill: str, level: int, ingredients: Dict[str, int], return create_recipe(name, ingredients, source, mod_name) +def skill_craftsanity_recipe(name: str, skill: str, level: int, ingredients: Dict[str, int], mod_name: Optional[str] = None) -> CraftingRecipe: + source = SkillCraftsanitySource(skill, level) + return create_recipe(name, ingredients, source, mod_name) + + def mastery_recipe(name: str, skill: str, ingredients: Dict[str, int], mod_name: Optional[str] = None) -> CraftingRecipe: source = MasterySource(skill) return create_recipe(name, ingredients, source, mod_name) @@ -249,7 +254,9 @@ def create_recipe(name: str, ingredients: Dict[str, int], source: RecipeSource, charcoal_kiln = skill_recipe(Machine.charcoal_kiln, Skill.foraging, 2, {Material.wood: 20, MetalBar.copper: 2}) crystalarium = skill_recipe(Machine.crystalarium, Skill.mining, 9, {Material.stone: 99, MetalBar.gold: 5, MetalBar.iridium: 2, ArtisanGood.battery_pack: 1}) -furnace = skill_recipe(Machine.furnace, Skill.mining, 1, {Ore.copper: 20, Material.stone: 25}) +# In-Game, the Furnace recipe is completely unique. It is the only recipe that is obtained in a cutscene after doing a skill-related action. +# So it has a custom source that needs both the craftsanity item from AP and the skill, if craftsanity is enabled. +furnace = skill_craftsanity_recipe(Machine.furnace, Skill.mining, 1, {Ore.copper: 20, Material.stone: 25}) geode_crusher = special_order_recipe(Machine.geode_crusher, SpecialOrder.cave_patrol, {MetalBar.gold: 2, Material.stone: 50, Mineral.diamond: 1}) mushroom_log = skill_recipe(Machine.mushroom_log, Skill.foraging, 4, {Material.hardwood: 10, Material.moss: 10}) heavy_tapper = ap_recipe(Machine.heavy_tapper, {Material.hardwood: 30, MetalBar.radioactive: 1}) diff --git a/worlds/stardew_valley/data/game_item.py b/worlds/stardew_valley/data/game_item.py index 6c8d30ed8e6f..c6e4717cd1e0 100644 --- a/worlds/stardew_valley/data/game_item.py +++ b/worlds/stardew_valley/data/game_item.py @@ -1,5 +1,4 @@ import enum -import sys from abc import ABC from dataclasses import dataclass, field from types import MappingProxyType @@ -7,11 +6,6 @@ from ..stardew_rule.protocol import StardewRule -if sys.version_info >= (3, 10): - kw_only = {"kw_only": True} -else: - kw_only = {} - DEFAULT_REQUIREMENT_TAGS = MappingProxyType({}) @@ -36,21 +30,17 @@ class ItemTag(enum.Enum): class ItemSource(ABC): add_tags: ClassVar[Tuple[ItemTag]] = () + other_requirements: Tuple[Requirement, ...] = field(kw_only=True, default_factory=tuple) + @property def requirement_tags(self) -> Mapping[str, Tuple[ItemTag, ...]]: return DEFAULT_REQUIREMENT_TAGS - # FIXME this should just be an optional field, but kw_only requires python 3.10... - @property - def other_requirements(self) -> Iterable[Requirement]: - return () - -@dataclass(frozen=True, **kw_only) +@dataclass(frozen=True, kw_only=True) class GenericSource(ItemSource): regions: Tuple[str, ...] = () """No region means it's available everywhere.""" - other_requirements: Tuple[Requirement, ...] = () @dataclass(frozen=True) @@ -59,7 +49,7 @@ class CustomRuleSource(ItemSource): create_rule: Callable[[Any], StardewRule] -@dataclass(frozen=True, **kw_only) +@dataclass(frozen=True, kw_only=True) class CompoundSource(ItemSource): sources: Tuple[ItemSource, ...] = () diff --git a/worlds/stardew_valley/data/harvest.py b/worlds/stardew_valley/data/harvest.py index 087d7c3fa86b..0fdae9549587 100644 --- a/worlds/stardew_valley/data/harvest.py +++ b/worlds/stardew_valley/data/harvest.py @@ -1,18 +1,17 @@ from dataclasses import dataclass from typing import Tuple, Sequence, Mapping -from .game_item import ItemSource, kw_only, ItemTag, Requirement +from .game_item import ItemSource, ItemTag from ..strings.season_names import Season -@dataclass(frozen=True, **kw_only) +@dataclass(frozen=True, kw_only=True) class ForagingSource(ItemSource): regions: Tuple[str, ...] seasons: Tuple[str, ...] = Season.all - other_requirements: Tuple[Requirement, ...] = () -@dataclass(frozen=True, **kw_only) +@dataclass(frozen=True, kw_only=True) class SeasonalForagingSource(ItemSource): season: str days: Sequence[int] @@ -22,17 +21,17 @@ def as_foraging_source(self) -> ForagingSource: return ForagingSource(seasons=(self.season,), regions=self.regions) -@dataclass(frozen=True, **kw_only) +@dataclass(frozen=True, kw_only=True) class FruitBatsSource(ItemSource): ... -@dataclass(frozen=True, **kw_only) +@dataclass(frozen=True, kw_only=True) class MushroomCaveSource(ItemSource): ... -@dataclass(frozen=True, **kw_only) +@dataclass(frozen=True, kw_only=True) class HarvestFruitTreeSource(ItemSource): add_tags = (ItemTag.CROPSANITY,) @@ -46,7 +45,7 @@ def requirement_tags(self) -> Mapping[str, Tuple[ItemTag, ...]]: } -@dataclass(frozen=True, **kw_only) +@dataclass(frozen=True, kw_only=True) class HarvestCropSource(ItemSource): add_tags = (ItemTag.CROPSANITY,) @@ -61,6 +60,6 @@ def requirement_tags(self) -> Mapping[str, Tuple[ItemTag, ...]]: } -@dataclass(frozen=True, **kw_only) +@dataclass(frozen=True, kw_only=True) class ArtifactSpotSource(ItemSource): amount: int diff --git a/worlds/stardew_valley/data/items.csv b/worlds/stardew_valley/data/items.csv index ffcae223e251..05af275ba472 100644 --- a/worlds/stardew_valley/data/items.csv +++ b/worlds/stardew_valley/data/items.csv @@ -7,7 +7,7 @@ id,name,classification,groups,mod_name 19,Glittering Boulder Removed,progression,COMMUNITY_REWARD, 20,Minecarts Repair,useful,COMMUNITY_REWARD, 21,Bus Repair,progression,COMMUNITY_REWARD, -22,Progressive Movie Theater,progression,COMMUNITY_REWARD, +22,Progressive Movie Theater,"progression,trap",COMMUNITY_REWARD, 23,Stardrop,progression,, 24,Progressive Backpack,progression,, 25,Rusty Sword,filler,"WEAPON,DEPRECATED", diff --git a/worlds/stardew_valley/data/recipe_source.py b/worlds/stardew_valley/data/recipe_source.py index 24b03bf77bd4..ead4d62f1650 100644 --- a/worlds/stardew_valley/data/recipe_source.py +++ b/worlds/stardew_valley/data/recipe_source.py @@ -94,6 +94,11 @@ def __repr__(self): return f"SkillSource at level {self.level} {self.skill}" +class SkillCraftsanitySource(SkillSource): + def __repr__(self): + return f"SkillCraftsanitySource at level {self.level} {self.skill}" + + class MasterySource(RecipeSource): skill: str diff --git a/worlds/stardew_valley/data/shop.py b/worlds/stardew_valley/data/shop.py index f14dbac82131..cc9506023f19 100644 --- a/worlds/stardew_valley/data/shop.py +++ b/worlds/stardew_valley/data/shop.py @@ -1,40 +1,39 @@ from dataclasses import dataclass from typing import Tuple, Optional -from .game_item import ItemSource, kw_only, Requirement +from .game_item import ItemSource from ..strings.season_names import Season ItemPrice = Tuple[int, str] -@dataclass(frozen=True, **kw_only) +@dataclass(frozen=True, kw_only=True) class ShopSource(ItemSource): shop_region: str money_price: Optional[int] = None items_price: Optional[Tuple[ItemPrice, ...]] = None seasons: Tuple[str, ...] = Season.all - other_requirements: Tuple[Requirement, ...] = () def __post_init__(self): assert self.money_price is not None or self.items_price is not None, "At least money price or items price need to be defined." assert self.items_price is None or all(isinstance(p, tuple) for p in self.items_price), "Items price should be a tuple." -@dataclass(frozen=True, **kw_only) +@dataclass(frozen=True, kw_only=True) class MysteryBoxSource(ItemSource): amount: int -@dataclass(frozen=True, **kw_only) +@dataclass(frozen=True, kw_only=True) class ArtifactTroveSource(ItemSource): amount: int -@dataclass(frozen=True, **kw_only) +@dataclass(frozen=True, kw_only=True) class PrizeMachineSource(ItemSource): amount: int -@dataclass(frozen=True, **kw_only) +@dataclass(frozen=True, kw_only=True) class FishingTreasureChestSource(ItemSource): amount: int diff --git a/worlds/stardew_valley/data/skill.py b/worlds/stardew_valley/data/skill.py index d0674f34c0e1..df4ff9feed6d 100644 --- a/worlds/stardew_valley/data/skill.py +++ b/worlds/stardew_valley/data/skill.py @@ -1,9 +1,21 @@ from dataclasses import dataclass, field - -from ..data.game_item import kw_only +from functools import cached_property +from typing import Iterable, Tuple @dataclass(frozen=True) class Skill: name: str - has_mastery: bool = field(**kw_only) + has_mastery: bool = field(kw_only=True) + + @cached_property + def mastery_name(self) -> str: + return f"{self.name} Mastery" + + @cached_property + def level_name(self) -> str: + return f"{self.name} Level" + + @cached_property + def level_names_by_level(self) -> Iterable[Tuple[int, str]]: + return tuple((level, f"Level {level} {self.name}") for level in range(1, 11)) diff --git a/worlds/stardew_valley/docs/en_Stardew Valley.md b/worlds/stardew_valley/docs/en_Stardew Valley.md index 0ed693031b82..62755dad798d 100644 --- a/worlds/stardew_valley/docs/en_Stardew Valley.md +++ b/worlds/stardew_valley/docs/en_Stardew Valley.md @@ -138,7 +138,7 @@ This means that, for these specific mods, if you decide to include them in your with the assumption that you will install and play with these mods. The multiworld will contain related items and locations for these mods, the specifics will vary from mod to mod -[Supported Mods Documentation](https://github.com/agilbert1412/StardewArchipelago/blob/5.x.x/Documentation/Supported%20Mods.md) +[Supported Mods Documentation](https://github.com/agilbert1412/StardewArchipelago/blob/6.x.x/Documentation/Supported%20Mods.md) List of supported mods: diff --git a/worlds/stardew_valley/docs/setup_en.md b/worlds/stardew_valley/docs/setup_en.md index c672152543cf..801bf345e916 100644 --- a/worlds/stardew_valley/docs/setup_en.md +++ b/worlds/stardew_valley/docs/setup_en.md @@ -12,7 +12,7 @@ - Archipelago from the [Archipelago Releases Page](https://github.com/ArchipelagoMW/Archipelago/releases) * (Only for the TextClient) - Other Stardew Valley Mods [Nexus Mods](https://www.nexusmods.com/stardewvalley) - * There are [supported mods](https://github.com/agilbert1412/StardewArchipelago/blob/5.x.x/Documentation/Supported%20Mods.md) + * There are [supported mods](https://github.com/agilbert1412/StardewArchipelago/blob/6.x.x/Documentation/Supported%20Mods.md) that you can add to your yaml to include them with the Archipelago randomization * It is **not** recommended to further mod Stardew Valley with unsupported mods, although it is possible to do so. diff --git a/worlds/stardew_valley/early_items.py b/worlds/stardew_valley/early_items.py index e1ad8cebfd4a..81e28956b3cf 100644 --- a/worlds/stardew_valley/early_items.py +++ b/worlds/stardew_valley/early_items.py @@ -1,11 +1,13 @@ from random import Random from . import options as stardew_options +from .content import StardewContent from .strings.ap_names.ap_weapon_names import APWeapon from .strings.ap_names.transport_names import Transportation from .strings.building_names import Building from .strings.region_names import Region from .strings.season_names import Season +from .strings.skill_names import Skill from .strings.tv_channel_names import Channel from .strings.wallet_item_names import Wallet @@ -14,7 +16,7 @@ seasons = [Season.spring, Season.summer, Season.fall, Season.winter] -def setup_early_items(multiworld, options: stardew_options.StardewValleyOptions, player: int, random: Random): +def setup_early_items(multiworld, options: stardew_options.StardewValleyOptions, content: StardewContent, player: int, random: Random): early_forced = [] early_candidates = [] early_candidates.extend(always_early_candidates) @@ -31,12 +33,13 @@ def setup_early_items(multiworld, options: stardew_options.StardewValleyOptions, early_forced.append("Progressive Backpack") if options.tool_progression & stardew_options.ToolProgression.option_progressive: - if options.fishsanity != stardew_options.Fishsanity.option_none: + if content.features.fishsanity.is_enabled: early_candidates.append("Progressive Fishing Rod") early_forced.append("Progressive Pickaxe") - if options.skill_progression == stardew_options.SkillProgression.option_progressive: - early_forced.append("Fishing Level") + fishing = content.skills.get(Skill.fishing) + if fishing is not None and content.features.skill_progression.is_progressive: + early_forced.append(fishing.level_name) if options.quest_locations >= 0: early_candidates.append(Wallet.magnifying_glass) diff --git a/worlds/stardew_valley/items.py b/worlds/stardew_valley/items.py index 31c7da5e3ade..3d852a37f402 100644 --- a/worlds/stardew_valley/items.py +++ b/worlds/stardew_valley/items.py @@ -2,6 +2,7 @@ import enum import logging from dataclasses import dataclass, field +from functools import reduce from pathlib import Path from random import Random from typing import Dict, List, Protocol, Union, Set, Optional @@ -14,7 +15,7 @@ from .logic.logic_event import all_events from .mods.mod_data import ModNames from .options import StardewValleyOptions, TrapItems, FestivalLocations, ExcludeGingerIsland, SpecialOrderLocations, SeasonRandomization, Museumsanity, \ - BuildingProgression, SkillProgression, ToolProgression, ElevatorProgression, BackpackProgression, ArcadeMachineLocations, Monstersanity, Goal, \ + 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_weapon_names import APWeapon @@ -124,17 +125,14 @@ def __call__(self, item: Item): def load_item_csv(): - try: - from importlib.resources import files - except ImportError: - from importlib_resources import files # noqa + from importlib.resources import files items = [] with files(data).joinpath("items.csv").open() as file: item_reader = csv.DictReader(file) for item in item_reader: id = int(item["id"]) if item["id"] else None - classification = ItemClassification[item["classification"]] + classification = reduce((lambda a, b: a | b), {ItemClassification[str_classification] for str_classification in item["classification"].split(",")}) groups = {Group[group] for group in item["groups"].split(",") if group} mod_name = str(item["mod_name"]) if item["mod_name"] else None items.append(ItemData(id, item["name"], classification, mod_name, groups)) @@ -171,14 +169,14 @@ def get_too_many_items_error_message(locations_count: int, items_count: int) -> return f"There should be at least as many locations [{locations_count}] as there are mandatory items [{items_count}]" -def create_items(item_factory: StardewItemFactory, item_deleter: StardewItemDeleter, locations_count: int, items_to_exclude: List[Item], +def create_items(item_factory: StardewItemFactory, locations_count: int, items_to_exclude: List[Item], options: StardewValleyOptions, content: StardewContent, random: Random) -> List[Item]: items = [] unique_items = create_unique_items(item_factory, options, content, random) - remove_items(item_deleter, items_to_exclude, unique_items) + remove_items(items_to_exclude, unique_items) - remove_items_if_no_room_for_them(item_deleter, unique_items, locations_count, random) + remove_items_if_no_room_for_them(unique_items, locations_count, random) items += unique_items logger.debug(f"Created {len(unique_items)} unique items") @@ -194,14 +192,13 @@ def create_items(item_factory: StardewItemFactory, item_deleter: StardewItemDele return items -def remove_items(item_deleter: StardewItemDeleter, items_to_remove, items): +def remove_items(items_to_remove, items): for item in items_to_remove: if item in items: items.remove(item) - item_deleter(item) -def remove_items_if_no_room_for_them(item_deleter: StardewItemDeleter, unique_items: List[Item], locations_count: int, random: Random): +def remove_items_if_no_room_for_them(unique_items: List[Item], locations_count: int, random: Random): if len(unique_items) <= locations_count: return @@ -214,7 +211,7 @@ def remove_items_if_no_room_for_them(item_deleter: StardewItemDeleter, unique_it logger.debug(f"Player has more items than locations, trying to remove {number_of_items_to_remove} random filler items") assert len(removable_items) >= number_of_items_to_remove, get_too_many_items_error_message(locations_count, len(unique_items)) items_to_remove = random.sample(removable_items, number_of_items_to_remove) - remove_items(item_deleter, items_to_remove, unique_items) + remove_items(items_to_remove, unique_items) def create_unique_items(item_factory: StardewItemFactory, options: StardewValleyOptions, content: StardewContent, random: Random) -> List[Item]: @@ -229,8 +226,8 @@ def create_unique_items(item_factory: StardewItemFactory, options: StardewValley create_weapons(item_factory, options, items) items.append(item_factory("Skull Key")) create_elevators(item_factory, options, items) - create_tools(item_factory, options, items) - create_skills(item_factory, options, items) + create_tools(item_factory, options, content, items) + create_skills(item_factory, content, items) create_wizard_buildings(item_factory, options, items) create_carpenter_buildings(item_factory, options, items) items.append(item_factory("Railroad Boulder Removed")) @@ -319,7 +316,7 @@ def create_elevators(item_factory: StardewItemFactory, options: StardewValleyOpt items.extend([item_factory(item) for item in ["Progressive Skull Cavern Elevator"] * 8]) -def create_tools(item_factory: StardewItemFactory, options: StardewValleyOptions, items: List[Item]): +def create_tools(item_factory: StardewItemFactory, options: StardewValleyOptions, content: StardewContent, items: List[Item]): if options.tool_progression & ToolProgression.option_progressive: for item_data in items_by_group[Group.PROGRESSIVE_TOOLS]: name = item_data.name @@ -328,28 +325,29 @@ def create_tools(item_factory: StardewItemFactory, options: StardewValleyOptions items.append(item_factory(item_data, ItemClassification.useful)) else: items.extend([item_factory(item) for item in [item_data] * 4]) - if options.skill_progression == SkillProgression.option_progressive_with_masteries: + + if content.features.skill_progression.are_masteries_shuffled: + # Masteries add another tier to the scythe and the fishing rod items.append(item_factory("Progressive Scythe")) items.append(item_factory("Progressive Fishing Rod")) + + # The golden scythe is always randomized items.append(item_factory("Progressive Scythe")) -def create_skills(item_factory: StardewItemFactory, options: StardewValleyOptions, items: List[Item]): - if options.skill_progression == SkillProgression.option_vanilla: +def create_skills(item_factory: StardewItemFactory, content: StardewContent, items: List[Item]): + skill_progression = content.features.skill_progression + if not skill_progression.is_progressive: return - for item in items_by_group[Group.SKILL_LEVEL_UP]: - if item.mod_name not in options.mods and item.mod_name is not None: - continue - items.extend(item_factory(item) for item in [item.name] * 10) + for skill in content.skills.values(): + items.extend(item_factory(skill.level_name) for _ in skill_progression.get_randomized_level_names_by_level(skill)) - if options.skill_progression != SkillProgression.option_progressive_with_masteries: - return + if skill_progression.is_mastery_randomized(skill): + items.append(item_factory(skill.mastery_name)) - for item in items_by_group[Group.SKILL_MASTERY]: - if item.mod_name not in options.mods and item.mod_name is not None: - continue - items.append(item_factory(item)) + if skill_progression.are_masteries_shuffled: + items.append(item_factory(Wallet.mastery_of_the_five_ways)) def create_wizard_buildings(item_factory: StardewItemFactory, options: StardewValleyOptions, items: List[Item]): diff --git a/worlds/stardew_valley/locations.py b/worlds/stardew_valley/locations.py index 43246a94a356..b3a8db6f0341 100644 --- a/worlds/stardew_valley/locations.py +++ b/worlds/stardew_valley/locations.py @@ -11,7 +11,7 @@ from .data.museum_data import all_museum_items from .mods.mod_data import ModNames from .options import ExcludeGingerIsland, ArcadeMachineLocations, SpecialOrderLocations, Museumsanity, \ - FestivalLocations, SkillProgression, BuildingProgression, ToolProgression, ElevatorProgression, BackpackProgression, FarmType + FestivalLocations, BuildingProgression, ToolProgression, ElevatorProgression, BackpackProgression, FarmType from .options import StardewValleyOptions, Craftsanity, Chefsanity, Cooksanity, Shipsanity, Monstersanity from .strings.goal_names import Goal from .strings.quest_names import ModQuest, Quest @@ -130,10 +130,7 @@ def __call__(self, name: str, code: Optional[int], region: str) -> None: def load_location_csv() -> List[LocationData]: - try: - from importlib.resources import files - except ImportError: - from importlib_resources import files + from importlib.resources import files with files(data).joinpath("locations.csv").open() as file: reader = csv.DictReader(file) @@ -191,12 +188,12 @@ def extend_cropsanity_locations(randomized_locations: List[LocationData], conten for item in content.find_tagged_items(ItemTag.CROPSANITY)) -def extend_quests_locations(randomized_locations: List[LocationData], options: StardewValleyOptions): +def extend_quests_locations(randomized_locations: List[LocationData], options: StardewValleyOptions, content: StardewContent): if options.quest_locations < 0: return story_quest_locations = locations_by_tag[LocationTags.STORY_QUEST] - story_quest_locations = filter_disabled_locations(options, story_quest_locations) + story_quest_locations = filter_disabled_locations(options, content, story_quest_locations) randomized_locations.extend(story_quest_locations) for i in range(0, options.quest_locations.value): @@ -287,9 +284,9 @@ def extend_desert_festival_chef_locations(randomized_locations: List[LocationDat randomized_locations.extend(locations_to_add) -def extend_special_order_locations(randomized_locations: List[LocationData], options: StardewValleyOptions): +def extend_special_order_locations(randomized_locations: List[LocationData], options: StardewValleyOptions, content: StardewContent): if options.special_order_locations & SpecialOrderLocations.option_board: - board_locations = filter_disabled_locations(options, locations_by_tag[LocationTags.SPECIAL_ORDER_BOARD]) + board_locations = filter_disabled_locations(options, content, locations_by_tag[LocationTags.SPECIAL_ORDER_BOARD]) randomized_locations.extend(board_locations) include_island = options.exclude_ginger_island == ExcludeGingerIsland.option_false @@ -311,9 +308,9 @@ def extend_walnut_purchase_locations(randomized_locations: List[LocationData], o randomized_locations.extend(locations_by_tag[LocationTags.WALNUT_PURCHASE]) -def extend_mandatory_locations(randomized_locations: List[LocationData], options: StardewValleyOptions): +def extend_mandatory_locations(randomized_locations: List[LocationData], options: StardewValleyOptions, content: StardewContent): mandatory_locations = [location for location in locations_by_tag[LocationTags.MANDATORY]] - filtered_mandatory_locations = filter_disabled_locations(options, mandatory_locations) + filtered_mandatory_locations = filter_disabled_locations(options, content, mandatory_locations) randomized_locations.extend(filtered_mandatory_locations) @@ -352,32 +349,32 @@ def extend_elevator_locations(randomized_locations: List[LocationData], options: randomized_locations.extend(filtered_elevator_locations) -def extend_monstersanity_locations(randomized_locations: List[LocationData], options): +def extend_monstersanity_locations(randomized_locations: List[LocationData], options: StardewValleyOptions, content: StardewContent): monstersanity = options.monstersanity if monstersanity == Monstersanity.option_none: return if monstersanity == Monstersanity.option_one_per_monster or monstersanity == Monstersanity.option_split_goals: monster_locations = [location for location in locations_by_tag[LocationTags.MONSTERSANITY_MONSTER]] - filtered_monster_locations = filter_disabled_locations(options, monster_locations) + filtered_monster_locations = filter_disabled_locations(options, content, monster_locations) randomized_locations.extend(filtered_monster_locations) return goal_locations = [location for location in locations_by_tag[LocationTags.MONSTERSANITY_GOALS]] - filtered_goal_locations = filter_disabled_locations(options, goal_locations) + filtered_goal_locations = filter_disabled_locations(options, content, goal_locations) randomized_locations.extend(filtered_goal_locations) if monstersanity != Monstersanity.option_progressive_goals: return progressive_goal_locations = [location for location in locations_by_tag[LocationTags.MONSTERSANITY_PROGRESSIVE_GOALS]] - filtered_progressive_goal_locations = filter_disabled_locations(options, progressive_goal_locations) + filtered_progressive_goal_locations = filter_disabled_locations(options, content, progressive_goal_locations) randomized_locations.extend(filtered_progressive_goal_locations) -def extend_shipsanity_locations(randomized_locations: List[LocationData], options: StardewValleyOptions): +def extend_shipsanity_locations(randomized_locations: List[LocationData], options: StardewValleyOptions, content: StardewContent): shipsanity = options.shipsanity if shipsanity == Shipsanity.option_none: return if shipsanity == Shipsanity.option_everything: ship_locations = [location for location in locations_by_tag[LocationTags.SHIPSANITY]] - filtered_ship_locations = filter_disabled_locations(options, ship_locations) + filtered_ship_locations = filter_disabled_locations(options, content, ship_locations) randomized_locations.extend(filtered_ship_locations) return shipsanity_locations = set() @@ -388,11 +385,11 @@ def extend_shipsanity_locations(randomized_locations: List[LocationData], option if shipsanity == Shipsanity.option_full_shipment or shipsanity == Shipsanity.option_full_shipment_with_fish: shipsanity_locations = shipsanity_locations.union({location for location in locations_by_tag[LocationTags.SHIPSANITY_FULL_SHIPMENT]}) - filtered_shipsanity_locations = filter_disabled_locations(options, list(shipsanity_locations)) + filtered_shipsanity_locations = filter_disabled_locations(options, content, list(shipsanity_locations)) randomized_locations.extend(filtered_shipsanity_locations) -def extend_cooksanity_locations(randomized_locations: List[LocationData], options: StardewValleyOptions): +def extend_cooksanity_locations(randomized_locations: List[LocationData], options: StardewValleyOptions, content: StardewContent): cooksanity = options.cooksanity if cooksanity == Cooksanity.option_none: return @@ -401,11 +398,11 @@ def extend_cooksanity_locations(randomized_locations: List[LocationData], option else: cooksanity_locations = (location for location in locations_by_tag[LocationTags.COOKSANITY]) - filtered_cooksanity_locations = filter_disabled_locations(options, cooksanity_locations) + filtered_cooksanity_locations = filter_disabled_locations(options, content, cooksanity_locations) randomized_locations.extend(filtered_cooksanity_locations) -def extend_chefsanity_locations(randomized_locations: List[LocationData], options: StardewValleyOptions): +def extend_chefsanity_locations(randomized_locations: List[LocationData], options: StardewValleyOptions, content: StardewContent): chefsanity = options.chefsanity if chefsanity == Chefsanity.option_none: return @@ -421,16 +418,16 @@ def extend_chefsanity_locations(randomized_locations: List[LocationData], option if chefsanity & Chefsanity.option_skills: chefsanity_locations_by_name.update({location.name: location for location in locations_by_tag[LocationTags.CHEFSANITY_SKILL]}) - filtered_chefsanity_locations = filter_disabled_locations(options, list(chefsanity_locations_by_name.values())) + filtered_chefsanity_locations = filter_disabled_locations(options, content, list(chefsanity_locations_by_name.values())) randomized_locations.extend(filtered_chefsanity_locations) -def extend_craftsanity_locations(randomized_locations: List[LocationData], options: StardewValleyOptions): +def extend_craftsanity_locations(randomized_locations: List[LocationData], options: StardewValleyOptions, content: StardewContent): if options.craftsanity == Craftsanity.option_none: return craftsanity_locations = [craft for craft in locations_by_tag[LocationTags.CRAFTSANITY]] - filtered_craftsanity_locations = filter_disabled_locations(options, craftsanity_locations) + filtered_craftsanity_locations = filter_disabled_locations(options, content, craftsanity_locations) randomized_locations.extend(filtered_craftsanity_locations) @@ -470,7 +467,7 @@ def create_locations(location_collector: StardewLocationCollector, random: Random): randomized_locations = [] - extend_mandatory_locations(randomized_locations, options) + extend_mandatory_locations(randomized_locations, options, content) extend_bundle_locations(randomized_locations, bundle_rooms) extend_backpack_locations(randomized_locations, options) @@ -479,13 +476,12 @@ def create_locations(location_collector: StardewLocationCollector, extend_elevator_locations(randomized_locations, options) - if not options.skill_progression == SkillProgression.option_vanilla: - for location in locations_by_tag[LocationTags.SKILL_LEVEL]: - if location.mod_name is not None and location.mod_name not in options.mods: - continue - if LocationTags.MASTERY_LEVEL in location.tags and options.skill_progression != SkillProgression.option_progressive_with_masteries: - continue - randomized_locations.append(location_table[location.name]) + skill_progression = content.features.skill_progression + if skill_progression.is_progressive: + for skill in content.skills.values(): + randomized_locations.extend([location_table[location_name] for _, location_name in skill_progression.get_randomized_level_names_by_level(skill)]) + if skill_progression.is_mastery_randomized(skill): + randomized_locations.append(location_table[skill.mastery_name]) if options.building_progression & BuildingProgression.option_progressive: for location in locations_by_tag[LocationTags.BUILDING_BLUEPRINT]: @@ -504,15 +500,15 @@ def create_locations(location_collector: StardewLocationCollector, extend_friendsanity_locations(randomized_locations, content) extend_festival_locations(randomized_locations, options, random) - extend_special_order_locations(randomized_locations, options) + extend_special_order_locations(randomized_locations, options, content) extend_walnut_purchase_locations(randomized_locations, options) - extend_monstersanity_locations(randomized_locations, options) - extend_shipsanity_locations(randomized_locations, options) - extend_cooksanity_locations(randomized_locations, options) - extend_chefsanity_locations(randomized_locations, options) - extend_craftsanity_locations(randomized_locations, options) - extend_quests_locations(randomized_locations, options) + extend_monstersanity_locations(randomized_locations, options, content) + extend_shipsanity_locations(randomized_locations, options, content) + extend_cooksanity_locations(randomized_locations, options, content) + extend_chefsanity_locations(randomized_locations, options, content) + extend_craftsanity_locations(randomized_locations, options, content) + extend_quests_locations(randomized_locations, options, content) extend_book_locations(randomized_locations, content) extend_walnutsanity_locations(randomized_locations, options) @@ -541,19 +537,21 @@ def filter_qi_order_locations(options: StardewValleyOptions, locations: Iterable return (location for location in locations if include_qi_orders or LocationTags.REQUIRES_QI_ORDERS not in location.tags) -def filter_masteries_locations(options: StardewValleyOptions, locations: Iterable[LocationData]) -> Iterable[LocationData]: - include_masteries = options.skill_progression == SkillProgression.option_progressive_with_masteries - return (location for location in locations if include_masteries or LocationTags.REQUIRES_MASTERIES not in location.tags) +def filter_masteries_locations(content: StardewContent, locations: Iterable[LocationData]) -> Iterable[LocationData]: + # FIXME Remove once recipes are handled by the content packs + if content.features.skill_progression.are_masteries_shuffled: + return locations + return (location for location in locations if LocationTags.REQUIRES_MASTERIES not in location.tags) def filter_modded_locations(options: StardewValleyOptions, locations: Iterable[LocationData]) -> Iterable[LocationData]: return (location for location in locations if location.mod_name is None or location.mod_name in options.mods) -def filter_disabled_locations(options: StardewValleyOptions, locations: Iterable[LocationData]) -> Iterable[LocationData]: +def filter_disabled_locations(options: StardewValleyOptions, content: StardewContent, locations: Iterable[LocationData]) -> Iterable[LocationData]: locations_farm_filter = filter_farm_type(options, locations) locations_island_filter = filter_ginger_island(options, locations_farm_filter) locations_qi_filter = filter_qi_order_locations(options, locations_island_filter) - locations_masteries_filter = filter_masteries_locations(options, locations_qi_filter) + locations_masteries_filter = filter_masteries_locations(content, locations_qi_filter) locations_mod_filter = filter_modded_locations(options, locations_masteries_filter) return locations_mod_filter diff --git a/worlds/stardew_valley/logic/building_logic.py b/worlds/stardew_valley/logic/building_logic.py index 4611eba37d64..b4eff4399385 100644 --- a/worlds/stardew_valley/logic/building_logic.py +++ b/worlds/stardew_valley/logic/building_logic.py @@ -1,3 +1,4 @@ +from functools import cached_property from typing import Dict, Union from Utils import cache_self1 @@ -8,12 +9,12 @@ from .region_logic import RegionLogicMixin from ..options import BuildingProgression from ..stardew_rule import StardewRule, True_, False_, Has -from ..strings.ap_names.event_names import Event from ..strings.artisan_good_names import ArtisanGood from ..strings.building_names import Building from ..strings.fish_names import WaterItem from ..strings.material_names import Material from ..strings.metal_names import MetalBar +from ..strings.region_names import Region has_group = "building" @@ -60,7 +61,7 @@ def has_building(self, building: str) -> StardewRule: return True_() return self.logic.received(building) - carpenter_rule = self.logic.received(Event.can_construct_buildings) + carpenter_rule = self.logic.building.can_construct_buildings if not self.options.building_progression & BuildingProgression.option_progressive: return Has(building, self.registry.building_rules, has_group) & carpenter_rule @@ -75,6 +76,10 @@ def has_building(self, building: str) -> StardewRule: building = " ".join(["Progressive", *building.split(" ")[1:]]) return self.logic.received(building, count) & carpenter_rule + @cached_property + def can_construct_buildings(self) -> StardewRule: + return self.logic.region.can_reach(Region.carpenter) + @cache_self1 def has_house(self, upgrade_level: int) -> StardewRule: if upgrade_level < 1: @@ -83,7 +88,7 @@ def has_house(self, upgrade_level: int) -> StardewRule: if upgrade_level > 3: return False_() - carpenter_rule = self.logic.received(Event.can_construct_buildings) + carpenter_rule = self.logic.building.can_construct_buildings if self.options.building_progression & BuildingProgression.option_progressive: return carpenter_rule & self.logic.received(f"Progressive House", upgrade_level) diff --git a/worlds/stardew_valley/logic/crafting_logic.py b/worlds/stardew_valley/logic/crafting_logic.py index e346e4ba238b..28bf0d2af22c 100644 --- a/worlds/stardew_valley/logic/crafting_logic.py +++ b/worlds/stardew_valley/logic/crafting_logic.py @@ -14,9 +14,9 @@ from .. import options from ..data.craftable_data import CraftingRecipe, all_crafting_recipes_by_name from ..data.recipe_source import CutsceneSource, ShopTradeSource, ArchipelagoSource, LogicSource, SpecialOrderSource, \ - FestivalShopSource, QuestSource, StarterSource, ShopSource, SkillSource, MasterySource, FriendshipSource + FestivalShopSource, QuestSource, StarterSource, ShopSource, SkillSource, MasterySource, FriendshipSource, SkillCraftsanitySource from ..locations import locations_by_tag, LocationTags -from ..options import Craftsanity, SpecialOrderLocations, ExcludeGingerIsland, SkillProgression +from ..options import Craftsanity, SpecialOrderLocations, ExcludeGingerIsland from ..stardew_rule import StardewRule, True_, False_ from ..strings.region_names import Region @@ -54,8 +54,7 @@ def knows_recipe(self, recipe: CraftingRecipe) -> StardewRule: return self.logic.crafting.received_recipe(recipe.item) if self.options.craftsanity == Craftsanity.option_none: return self.logic.crafting.can_learn_recipe(recipe) - if isinstance(recipe.source, StarterSource) or isinstance(recipe.source, ShopTradeSource) or isinstance( - recipe.source, ShopSource): + if isinstance(recipe.source, (StarterSource, ShopTradeSource, ShopSource, SkillCraftsanitySource)): return self.logic.crafting.received_recipe(recipe.item) if isinstance(recipe.source, SpecialOrderSource) and self.options.special_order_locations & SpecialOrderLocations.option_board: return self.logic.crafting.received_recipe(recipe.item) @@ -71,6 +70,8 @@ def can_learn_recipe(self, recipe: CraftingRecipe) -> StardewRule: return self.logic.money.can_trade_at(recipe.source.region, recipe.source.currency, recipe.source.price) if isinstance(recipe.source, ShopSource): return self.logic.money.can_spend_at(recipe.source.region, recipe.source.price) + if isinstance(recipe.source, SkillCraftsanitySource): + return self.logic.skill.has_level(recipe.source.skill, recipe.source.level) & self.logic.skill.can_earn_level(recipe.source.skill, recipe.source.level) if isinstance(recipe.source, SkillSource): return self.logic.skill.has_level(recipe.source.skill, recipe.source.level) if isinstance(recipe.source, MasterySource): @@ -100,12 +101,13 @@ def can_craft_everything(self) -> StardewRule: craftsanity_prefix = "Craft " all_recipes_names = [] exclude_island = self.options.exclude_ginger_island == ExcludeGingerIsland.option_true - exclude_masteries = self.options.skill_progression != SkillProgression.option_progressive_with_masteries + exclude_masteries = not self.content.features.skill_progression.are_masteries_shuffled for location in locations_by_tag[LocationTags.CRAFTSANITY]: if not location.name.startswith(craftsanity_prefix): continue if exclude_island and LocationTags.GINGER_ISLAND in location.tags: continue + # FIXME Remove when recipes are in content packs if exclude_masteries and LocationTags.REQUIRES_MASTERIES in location.tags: continue if location.mod_name and location.mod_name not in self.options.mods: diff --git a/worlds/stardew_valley/logic/grind_logic.py b/worlds/stardew_valley/logic/grind_logic.py index e0ac84639d9c..997300ae7a54 100644 --- a/worlds/stardew_valley/logic/grind_logic.py +++ b/worlds/stardew_valley/logic/grind_logic.py @@ -7,7 +7,6 @@ from .received_logic import ReceivedLogicMixin from .region_logic import RegionLogicMixin from .time_logic import TimeLogicMixin -from ..options import Booksanity from ..stardew_rule import StardewRule, HasProgressionPercent from ..strings.book_names import Book from ..strings.craftable_names import Consumable @@ -39,7 +38,7 @@ def can_grind_mystery_boxes(self, quantity: int) -> StardewRule: opening_rule = self.logic.region.can_reach(Region.blacksmith) mystery_box_rule = self.logic.has(Consumable.mystery_box) book_of_mysteries_rule = self.logic.true_ \ - if self.options.booksanity == Booksanity.option_none \ + if not self.content.features.booksanity.is_enabled \ else self.logic.book.has_book_power(Book.book_of_mysteries) # Assuming one box per day, but halved because we don't know how many months have passed before Mr. Qi's Plane Ride. time_rule = self.logic.time.has_lived_months(quantity // 14) diff --git a/worlds/stardew_valley/logic/mine_logic.py b/worlds/stardew_valley/logic/mine_logic.py index 61eba41ffe07..350582ae0dbb 100644 --- a/worlds/stardew_valley/logic/mine_logic.py +++ b/worlds/stardew_valley/logic/mine_logic.py @@ -58,14 +58,19 @@ def can_progress_in_the_mines_from_floor(self, floor: int) -> StardewRule: rules = [] weapon_rule = self.logic.mine.get_weapon_rule_for_floor_tier(tier) rules.append(weapon_rule) + if self.options.tool_progression & ToolProgression.option_progressive: rules.append(self.logic.tool.has_tool(Tool.pickaxe, ToolMaterial.tiers[tier])) - if self.options.skill_progression >= options.SkillProgression.option_progressive: - skill_tier = min(10, max(0, tier * 2)) - rules.append(self.logic.skill.has_level(Skill.combat, skill_tier)) - rules.append(self.logic.skill.has_level(Skill.mining, skill_tier)) + + # No alternative for vanilla because we assume that you will grind the levels in the mines. + if self.content.features.skill_progression.is_progressive: + skill_level = min(10, max(0, tier * 2)) + rules.append(self.logic.skill.has_level(Skill.combat, skill_level)) + rules.append(self.logic.skill.has_level(Skill.mining, skill_level)) + if tier >= 4: rules.append(self.logic.cooking.can_cook()) + return self.logic.and_(*rules) @cache_self1 @@ -82,10 +87,14 @@ def can_progress_in_the_skull_cavern_from_floor(self, floor: int) -> StardewRule rules = [] weapon_rule = self.logic.combat.has_great_weapon rules.append(weapon_rule) + if self.options.tool_progression & ToolProgression.option_progressive: rules.append(self.logic.received("Progressive Pickaxe", min(4, max(0, tier + 2)))) - if self.options.skill_progression >= options.SkillProgression.option_progressive: - skill_tier = min(10, max(0, tier * 2 + 6)) - rules.extend({self.logic.skill.has_level(Skill.combat, skill_tier), - self.logic.skill.has_level(Skill.mining, skill_tier)}) + + # No alternative for vanilla because we assume that you will grind the levels in the mines. + if self.content.features.skill_progression.is_progressive: + skill_level = min(10, max(0, tier * 2 + 6)) + rules.extend((self.logic.skill.has_level(Skill.combat, skill_level), + self.logic.skill.has_level(Skill.mining, skill_level))) + return self.logic.and_(*rules) diff --git a/worlds/stardew_valley/logic/money_logic.py b/worlds/stardew_valley/logic/money_logic.py index 73c5291af082..85370273c987 100644 --- a/worlds/stardew_valley/logic/money_logic.py +++ b/worlds/stardew_valley/logic/money_logic.py @@ -1,3 +1,4 @@ +import typing from typing import Union from Utils import cache_self1 @@ -11,10 +12,14 @@ from ..data.shop import ShopSource from ..options import SpecialOrderLocations from ..stardew_rule import StardewRule, True_, HasProgressionPercent, False_, true_ -from ..strings.ap_names.event_names import Event from ..strings.currency_names import Currency from ..strings.region_names import Region, LogicRegion +if typing.TYPE_CHECKING: + from .shipping_logic import ShippingLogicMixin + + assert ShippingLogicMixin + qi_gem_rewards = ("100 Qi Gems", "50 Qi Gems", "40 Qi Gems", "35 Qi Gems", "25 Qi Gems", "20 Qi Gems", "15 Qi Gems", "10 Qi Gems") @@ -26,7 +31,7 @@ def __init__(self, *args, **kwargs): class MoneyLogic(BaseLogic[Union[RegionLogicMixin, MoneyLogicMixin, TimeLogicMixin, RegionLogicMixin, ReceivedLogicMixin, HasLogicMixin, SeasonLogicMixin, -GrindLogicMixin]]): +GrindLogicMixin, 'ShippingLogicMixin']]): @cache_self1 def can_have_earned_total(self, amount: int) -> StardewRule: @@ -37,7 +42,7 @@ def can_have_earned_total(self, amount: int) -> StardewRule: willy_rule = self.logic.region.can_reach_all((Region.fish_shop, LogicRegion.fishing)) clint_rule = self.logic.region.can_reach_all((Region.blacksmith, Region.mines_floor_5)) robin_rule = self.logic.region.can_reach_all((Region.carpenter, Region.secret_woods)) - shipping_rule = self.logic.received(Event.can_ship_items) + shipping_rule = self.logic.shipping.can_use_shipping_bin if amount < 2000: selling_any_rule = pierre_rule | willy_rule | clint_rule | robin_rule | shipping_rule @@ -50,7 +55,7 @@ def can_have_earned_total(self, amount: int) -> StardewRule: if amount < 10000: return shipping_rule - seed_rules = self.logic.received(Event.can_shop_at_pierre) + seed_rules = self.logic.region.can_reach(Region.pierre_store) if amount < 40000: return shipping_rule & seed_rules diff --git a/worlds/stardew_valley/logic/shipping_logic.py b/worlds/stardew_valley/logic/shipping_logic.py index 8d545e219627..e9f2258172e6 100644 --- a/worlds/stardew_valley/logic/shipping_logic.py +++ b/worlds/stardew_valley/logic/shipping_logic.py @@ -11,7 +11,6 @@ from ..options import ExcludeGingerIsland, Shipsanity from ..options import SpecialOrderLocations from ..stardew_rule import StardewRule -from ..strings.ap_names.event_names import Event from ..strings.building_names import Building @@ -29,7 +28,7 @@ def can_use_shipping_bin(self) -> StardewRule: @cache_self1 def can_ship(self, item: str) -> StardewRule: - return self.logic.received(Event.can_ship_items) & self.logic.has(item) + return self.logic.shipping.can_use_shipping_bin & self.logic.has(item) def can_ship_everything(self) -> StardewRule: shipsanity_prefix = "Shipsanity: " @@ -49,7 +48,7 @@ def can_ship_everything(self) -> StardewRule: def can_ship_everything_in_slot(self, all_location_names_in_slot: List[str]) -> StardewRule: if self.options.shipsanity == Shipsanity.option_none: - return self.can_ship_everything() + return self.logic.shipping.can_ship_everything() rules = [self.logic.building.has_building(Building.shipping_bin)] diff --git a/worlds/stardew_valley/logic/skill_logic.py b/worlds/stardew_valley/logic/skill_logic.py index 17fabca28d95..bc2f6cb1263d 100644 --- a/worlds/stardew_valley/logic/skill_logic.py +++ b/worlds/stardew_valley/logic/skill_logic.py @@ -11,7 +11,6 @@ from .season_logic import SeasonLogicMixin from .time_logic import TimeLogicMixin from .tool_logic import ToolLogicMixin -from .. import options from ..data.harvest import HarvestCropSource from ..mods.logic.magic_logic import MagicLogicMixin from ..mods.logic.mod_skills_levels import get_mod_skill_levels @@ -77,21 +76,21 @@ def has_level(self, skill: str, level: int) -> StardewRule: if level == 0: return true_ - if self.options.skill_progression == options.SkillProgression.option_vanilla: - return self.logic.skill.can_earn_level(skill, level) + if self.content.features.skill_progression.is_progressive: + return self.logic.received(f"{skill} Level", level) - return self.logic.received(f"{skill} Level", level) + return self.logic.skill.can_earn_level(skill, level) def has_previous_level(self, skill: str, level: int) -> StardewRule: assert level > 0, f"There is no level before level 0." if level == 1: return true_ - if self.options.skill_progression == options.SkillProgression.option_vanilla: - months = max(1, level - 1) - return self.logic.time.has_lived_months(months) + if self.content.features.skill_progression.is_progressive: + return self.logic.received(f"{skill} Level", level - 1) - return self.logic.received(f"{skill} Level", level - 1) + months = max(1, level - 1) + return self.logic.time.has_lived_months(months) @cache_self1 def has_farming_level(self, level: int) -> StardewRule: @@ -102,7 +101,7 @@ def has_total_level(self, level: int, allow_modded_skills: bool = False) -> Star if level <= 0: return True_() - if self.options.skill_progression >= options.SkillProgression.option_progressive: + if self.content.features.skill_progression.is_progressive: skills_items = vanilla_skill_items if allow_modded_skills: skills_items += get_mod_skill_levels(self.options.mods) @@ -148,7 +147,7 @@ def can_get_combat_xp(self) -> StardewRule: @cached_property def can_get_fishing_xp(self) -> StardewRule: - if self.options.skill_progression >= options.SkillProgression.option_progressive: + if self.content.features.skill_progression.is_progressive: return self.logic.skill.can_fish() | self.logic.skill.can_crab_pot return self.logic.skill.can_fish() @@ -178,7 +177,9 @@ def can_crab_pot_at(self, region: str) -> StardewRule: @cached_property def can_crab_pot(self) -> StardewRule: crab_pot_rule = self.logic.has(Fishing.bait) - if self.options.skill_progression >= options.SkillProgression.option_progressive: + + # We can't use the same rule if skills are vanilla, because fishing levels are required to crab pot, which is required to get fishing levels... + if self.content.features.skill_progression.is_progressive: crab_pot_rule = crab_pot_rule & self.logic.has(Machine.crab_pot) else: crab_pot_rule = crab_pot_rule & self.logic.skill.can_get_fishing_xp @@ -200,14 +201,14 @@ def can_earn_mastery(self, skill: str) -> StardewRule: return self.logic.skill.can_earn_level(skill, 11) & self.logic.region.can_reach(Region.mastery_cave) def has_mastery(self, skill: str) -> StardewRule: - if self.options.skill_progression == options.SkillProgression.option_progressive_with_masteries: + if self.content.features.skill_progression.are_masteries_shuffled: return self.logic.received(f"{skill} Mastery") return self.logic.skill.can_earn_mastery(skill) @cached_property def can_enter_mastery_cave(self) -> StardewRule: - if self.options.skill_progression == options.SkillProgression.option_progressive_with_masteries: + if self.content.features.skill_progression.are_masteries_shuffled: return self.logic.received(Wallet.mastery_of_the_five_ways) return self.has_any_skills_maxed(included_modded_skills=False) diff --git a/worlds/stardew_valley/logic/special_order_logic.py b/worlds/stardew_valley/logic/special_order_logic.py index 65497df477b8..8bcd78d7d26e 100644 --- a/worlds/stardew_valley/logic/special_order_logic.py +++ b/worlds/stardew_valley/logic/special_order_logic.py @@ -21,7 +21,6 @@ from ..content.vanilla.qi_board import qi_board_content_pack from ..stardew_rule import StardewRule, Has, false_ from ..strings.animal_product_names import AnimalProduct -from ..strings.ap_names.event_names import Event from ..strings.ap_names.transport_names import Transportation from ..strings.artisan_good_names import ArtisanGood from ..strings.crop_names import Vegetable, Fruit @@ -61,7 +60,7 @@ def initialize_rules(self): SpecialOrder.gifts_for_george: self.logic.season.has(Season.spring) & self.logic.has(Forageable.leek), SpecialOrder.fragments_of_the_past: self.logic.monster.can_kill(Monster.skeleton), SpecialOrder.gus_famous_omelet: self.logic.has(AnimalProduct.any_egg), - SpecialOrder.crop_order: self.logic.ability.can_farm_perfectly() & self.logic.received(Event.can_ship_items), + SpecialOrder.crop_order: self.logic.ability.can_farm_perfectly() & self.logic.shipping.can_use_shipping_bin, SpecialOrder.community_cleanup: self.logic.skill.can_crab_pot, SpecialOrder.the_strong_stuff: self.logic.has(ArtisanGood.specific_juice(Vegetable.potato)), SpecialOrder.pierres_prime_produce: self.logic.ability.can_farm_perfectly(), @@ -94,12 +93,12 @@ def initialize_rules(self): self.update_rules({ SpecialOrder.qis_crop: self.logic.ability.can_farm_perfectly() & self.logic.region.can_reach(Region.greenhouse) & self.logic.region.can_reach(Region.island_west) & self.logic.skill.has_total_level(50) & - self.logic.has(Machine.seed_maker) & self.logic.received(Event.can_ship_items), + self.logic.has(Machine.seed_maker) & self.logic.shipping.can_use_shipping_bin, SpecialOrder.lets_play_a_game: self.logic.arcade.has_junimo_kart_max_level(), SpecialOrder.four_precious_stones: self.logic.time.has_lived_max_months & self.logic.has("Prismatic Shard") & self.logic.ability.can_mine_perfectly_in_the_skull_cavern(), SpecialOrder.qis_hungry_challenge: self.logic.ability.can_mine_perfectly_in_the_skull_cavern(), - SpecialOrder.qis_cuisine: self.logic.cooking.can_cook() & self.logic.received(Event.can_ship_items) & + SpecialOrder.qis_cuisine: self.logic.cooking.can_cook() & self.logic.shipping.can_use_shipping_bin & (self.logic.money.can_spend_at(Region.saloon, 205000) | self.logic.money.can_spend_at(Region.pierre_store, 170000)), SpecialOrder.qis_kindness: self.logic.relationship.can_give_loved_gifts_to_everyone(), SpecialOrder.extended_family: self.logic.ability.can_fish_perfectly() & self.logic.has(Fish.angler) & self.logic.has(Fish.glacierfish) & diff --git a/worlds/stardew_valley/mods/logic/deepwoods_logic.py b/worlds/stardew_valley/mods/logic/deepwoods_logic.py index 26704eb7d11b..6e0eadfd5486 100644 --- a/worlds/stardew_valley/mods/logic/deepwoods_logic.py +++ b/worlds/stardew_valley/mods/logic/deepwoods_logic.py @@ -1,6 +1,5 @@ from typing import Union -from ... import options from ...logic.base_logic import BaseLogicMixin, BaseLogic from ...logic.combat_logic import CombatLogicMixin from ...logic.cooking_logic import CookingLogicMixin @@ -45,9 +44,9 @@ def can_reach_woods_depth(self, depth: int) -> StardewRule: self.logic.received(ModTransportation.woods_obelisk)) tier = int(depth / 25) + 1 - if self.options.skill_progression >= options.SkillProgression.option_progressive: - combat_tier = min(10, max(0, tier + 5)) - rules.append(self.logic.skill.has_level(Skill.combat, combat_tier)) + if self.content.features.skill_progression.is_progressive: + combat_level = min(10, max(0, tier + 5)) + rules.append(self.logic.skill.has_level(Skill.combat, combat_level)) return self.logic.and_(*rules) diff --git a/worlds/stardew_valley/mods/logic/skills_logic.py b/worlds/stardew_valley/mods/logic/skills_logic.py index cb12274dc651..ba9d27741807 100644 --- a/worlds/stardew_valley/mods/logic/skills_logic.py +++ b/worlds/stardew_valley/mods/logic/skills_logic.py @@ -13,7 +13,6 @@ from ...logic.relationship_logic import RelationshipLogicMixin from ...logic.tool_logic import ToolLogicMixin from ...mods.mod_data import ModNames -from ...options import SkillProgression from ...stardew_rule import StardewRule, False_, True_, And from ...strings.building_names import Building from ...strings.craftable_names import ModCraftable, ModMachine @@ -37,7 +36,7 @@ def has_mod_level(self, skill: str, level: int) -> StardewRule: if level <= 0: return True_() - if self.options.skill_progression == SkillProgression.option_progressive: + if self.content.features.skill_progression.is_progressive: return self.logic.received(f"{skill} Level", level) return self.can_earn_mod_skill_level(skill, level) @@ -85,13 +84,15 @@ def can_earn_socializing_skill_level(self, level: int) -> StardewRule: def can_earn_archaeology_skill_level(self, level: int) -> StardewRule: shifter_rule = True_() preservation_rule = True_() - if self.options.skill_progression == self.options.skill_progression.option_progressive: + if self.content.features.skill_progression.is_progressive: shifter_rule = self.logic.has(ModCraftable.water_shifter) preservation_rule = self.logic.has(ModMachine.hardwood_preservation_chamber) if level >= 8: - return (self.logic.tool.has_tool(Tool.pan, ToolMaterial.iridium) & self.logic.tool.has_tool(Tool.hoe, ToolMaterial.gold)) & shifter_rule & preservation_rule + tool_rule = self.logic.tool.has_tool(Tool.pan, ToolMaterial.iridium) & self.logic.tool.has_tool(Tool.hoe, ToolMaterial.gold) + return tool_rule & shifter_rule & preservation_rule if level >= 5: - return (self.logic.tool.has_tool(Tool.pan, ToolMaterial.gold) & self.logic.tool.has_tool(Tool.hoe, ToolMaterial.iron)) & shifter_rule + tool_rule = self.logic.tool.has_tool(Tool.pan, ToolMaterial.gold) & self.logic.tool.has_tool(Tool.hoe, ToolMaterial.iron) + return tool_rule & shifter_rule if level >= 3: return self.logic.tool.has_tool(Tool.pan, ToolMaterial.iron) | self.logic.tool.has_tool(Tool.hoe, ToolMaterial.copper) return self.logic.tool.has_tool(Tool.pan, ToolMaterial.copper) | self.logic.tool.has_tool(Tool.hoe, ToolMaterial.basic) diff --git a/worlds/stardew_valley/presets.py b/worlds/stardew_valley/presets.py index 1861a914235c..62672f29e424 100644 --- a/worlds/stardew_valley/presets.py +++ b/worlds/stardew_valley/presets.py @@ -41,9 +41,7 @@ Friendsanity.internal_name: "random", FriendsanityHeartSize.internal_name: "random", Booksanity.internal_name: "random", - Walnutsanity.internal_name: "random", NumberOfMovementBuffs.internal_name: "random", - EnabledFillerBuffs.internal_name: "random", ExcludeGingerIsland.internal_name: "random", TrapItems.internal_name: "random", MultipleDaySleepEnabled.internal_name: "random", diff --git a/worlds/stardew_valley/regions.py b/worlds/stardew_valley/regions.py index 5b7db5ac79d1..d59439a4879d 100644 --- a/worlds/stardew_valley/regions.py +++ b/worlds/stardew_valley/regions.py @@ -2,8 +2,9 @@ from typing import Iterable, Dict, Protocol, List, Tuple, Set from BaseClasses import Region, Entrance +from .content import content_packs, StardewContent from .mods.mod_regions import ModDataList, vanilla_connections_to_remove_by_mod -from .options import EntranceRandomization, ExcludeGingerIsland, StardewValleyOptions, SkillProgression +from .options import EntranceRandomization, ExcludeGingerIsland, StardewValleyOptions from .region_classes import RegionData, ConnectionData, RandomizationFlag, ModificationFlag from .strings.entrance_names import Entrance, LogicEntrance from .strings.region_names import Region, LogicRegion @@ -587,7 +588,7 @@ def modify_vanilla_regions(existing_region: RegionData, modified_region: RegionD return updated_region -def create_regions(region_factory: RegionFactory, random: Random, world_options: StardewValleyOptions) \ +def create_regions(region_factory: RegionFactory, random: Random, world_options: StardewValleyOptions, content: StardewContent) \ -> Tuple[Dict[str, Region], Dict[str, Entrance], Dict[str, str]]: entrances_data, regions_data = create_final_connections_and_regions(world_options) regions_by_name: Dict[str: Region] = {region_name: region_factory(region_name, regions_data[region_name].exits) for region_name in regions_data} @@ -598,7 +599,7 @@ def create_regions(region_factory: RegionFactory, random: Random, world_options: if entrance.name in entrances_data } - connections, randomized_data = randomize_connections(random, world_options, regions_data, entrances_data) + connections, randomized_data = randomize_connections(random, world_options, content, regions_data, entrances_data) for connection in connections: if connection.name in entrances_by_name: @@ -606,7 +607,7 @@ def create_regions(region_factory: RegionFactory, random: Random, world_options: return regions_by_name, entrances_by_name, randomized_data -def randomize_connections(random: Random, world_options: StardewValleyOptions, regions_by_name: Dict[str, RegionData], +def randomize_connections(random: Random, world_options: StardewValleyOptions, content: StardewContent, regions_by_name: Dict[str, RegionData], connections_by_name: Dict[str, ConnectionData]) -> Tuple[List[ConnectionData], Dict[str, str]]: connections_to_randomize: List[ConnectionData] = [] if world_options.entrance_randomization == EntranceRandomization.option_pelican_town: @@ -621,7 +622,7 @@ def randomize_connections(random: Random, world_options: StardewValleyOptions, r elif world_options.entrance_randomization == EntranceRandomization.option_chaos: connections_to_randomize = [connections_by_name[connection] for connection in connections_by_name if RandomizationFlag.BUILDINGS in connections_by_name[connection].flag] - connections_to_randomize = remove_excluded_entrances(connections_to_randomize, world_options) + connections_to_randomize = remove_excluded_entrances(connections_to_randomize, content) # On Chaos, we just add the connections to randomize, unshuffled, and the client does it every day randomized_data_for_mod = {} @@ -630,7 +631,7 @@ def randomize_connections(random: Random, world_options: StardewValleyOptions, r randomized_data_for_mod[connection.reverse] = connection.reverse return list(connections_by_name.values()), randomized_data_for_mod - connections_to_randomize = remove_excluded_entrances(connections_to_randomize, world_options) + connections_to_randomize = remove_excluded_entrances(connections_to_randomize, content) random.shuffle(connections_to_randomize) destination_pool = list(connections_to_randomize) random.shuffle(destination_pool) @@ -645,12 +646,11 @@ def randomize_connections(random: Random, world_options: StardewValleyOptions, r return randomized_connections_for_generation, randomized_data_for_mod -def remove_excluded_entrances(connections_to_randomize: List[ConnectionData], world_options: StardewValleyOptions) -> List[ConnectionData]: - exclude_island = world_options.exclude_ginger_island == ExcludeGingerIsland.option_true - if exclude_island: +def remove_excluded_entrances(connections_to_randomize: List[ConnectionData], content: StardewContent) -> List[ConnectionData]: + # FIXME remove when regions are handled in content packs + if content_packs.ginger_island_content_pack.name not in content.registered_packs: connections_to_randomize = [connection for connection in connections_to_randomize if RandomizationFlag.GINGER_ISLAND not in connection.flag] - exclude_masteries = world_options.skill_progression != SkillProgression.option_progressive_with_masteries - if exclude_masteries: + if not content.features.skill_progression.are_masteries_shuffled: connections_to_randomize = [connection for connection in connections_to_randomize if RandomizationFlag.MASTERIES not in connection.flag] return connections_to_randomize diff --git a/worlds/stardew_valley/requirements.txt b/worlds/stardew_valley/requirements.txt deleted file mode 100644 index 65e922a64483..000000000000 --- a/worlds/stardew_valley/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -importlib_resources; python_version <= '3.8' -graphlib_backport; python_version <= '3.8' diff --git a/worlds/stardew_valley/rules.py b/worlds/stardew_valley/rules.py index eda2d4377e09..96f081788041 100644 --- a/worlds/stardew_valley/rules.py +++ b/worlds/stardew_valley/rules.py @@ -21,13 +21,12 @@ from .mods.mod_data import ModNames from .options import StardewValleyOptions, Walnutsanity from .options import ToolProgression, BuildingProgression, ExcludeGingerIsland, SpecialOrderLocations, Museumsanity, BackpackProgression, Shipsanity, \ - Monstersanity, Chefsanity, Craftsanity, ArcadeMachineLocations, Cooksanity, SkillProgression + Monstersanity, Chefsanity, Craftsanity, ArcadeMachineLocations, Cooksanity 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.community_upgrade_names import CommunityUpgrade -from .strings.ap_names.event_names import Event from .strings.ap_names.mods.mod_items import SVEQuestItem, SVERunes from .strings.ap_names.transport_names import Transportation from .strings.artisan_good_names import ArtisanGood @@ -48,7 +47,7 @@ from .strings.quest_names import Quest from .strings.region_names import Region from .strings.season_names import Season -from .strings.skill_names import ModSkill, Skill +from .strings.skill_names import Skill from .strings.tool_names import Tool, ToolMaterial from .strings.tv_channel_names import Channel from .strings.villager_names import NPC, ModNPC @@ -71,7 +70,7 @@ def set_rules(world): set_ginger_island_rules(logic, multiworld, player, world_options) set_tool_rules(logic, multiworld, player, world_options) - set_skills_rules(logic, multiworld, player, world_options) + set_skills_rules(logic, multiworld, player, world_content) set_bundle_rules(bundle_rooms, logic, multiworld, player, world_options) set_building_rules(logic, multiworld, player, world_options) set_cropsanity_rules(logic, multiworld, player, world_content) @@ -165,58 +164,21 @@ def set_bundle_rules(bundle_rooms: List[BundleRoom], logic: StardewLogic, multiw MultiWorldRules.add_rule(multiworld.get_location(room_location, player), And(*room_rules)) -def set_skills_rules(logic: StardewLogic, multiworld, player, world_options: StardewValleyOptions): - mods = world_options.mods - if world_options.skill_progression == SkillProgression.option_vanilla: +def set_skills_rules(logic: StardewLogic, multiworld: MultiWorld, player: int, content: StardewContent): + skill_progression = content.features.skill_progression + if not skill_progression.is_progressive: return - for i in range(1, 11): - set_vanilla_skill_rule_for_level(logic, multiworld, player, i) - set_modded_skill_rule_for_level(logic, multiworld, player, mods, i) - - if world_options.skill_progression == SkillProgression.option_progressive: - return - - for skill in [Skill.farming, Skill.fishing, Skill.foraging, Skill.mining, Skill.combat]: - MultiWorldRules.set_rule(multiworld.get_location(f"{skill} Mastery", player), logic.skill.can_earn_mastery(skill)) - - -def set_vanilla_skill_rule_for_level(logic: StardewLogic, multiworld, player, level: int): - set_vanilla_skill_rule(logic, multiworld, player, Skill.farming, level) - set_vanilla_skill_rule(logic, multiworld, player, Skill.fishing, level) - set_vanilla_skill_rule(logic, multiworld, player, Skill.foraging, level) - set_vanilla_skill_rule(logic, multiworld, player, Skill.mining, level) - set_vanilla_skill_rule(logic, multiworld, player, Skill.combat, level) - - -def set_modded_skill_rule_for_level(logic: StardewLogic, multiworld, player, mods, level: int): - if ModNames.luck_skill in mods: - set_modded_skill_rule(logic, multiworld, player, ModSkill.luck, level) - if ModNames.magic in mods: - set_modded_skill_rule(logic, multiworld, player, ModSkill.magic, level) - if ModNames.binning_skill in mods: - set_modded_skill_rule(logic, multiworld, player, ModSkill.binning, level) - if ModNames.cooking_skill in mods: - set_modded_skill_rule(logic, multiworld, player, ModSkill.cooking, level) - if ModNames.socializing_skill in mods: - set_modded_skill_rule(logic, multiworld, player, ModSkill.socializing, level) - if ModNames.archaeology in mods: - set_modded_skill_rule(logic, multiworld, player, ModSkill.archaeology, level) + for skill in content.skills.values(): + for level, level_name in skill_progression.get_randomized_level_names_by_level(skill): + rule = logic.skill.can_earn_level(skill.name, level) + location = multiworld.get_location(level_name, player) + MultiWorldRules.set_rule(location, rule) - -def get_skill_level_location(multiworld, player, skill: str, level: int): - location_name = f"Level {level} {skill}" - return multiworld.get_location(location_name, player) - - -def set_vanilla_skill_rule(logic: StardewLogic, multiworld, player, skill: str, level: int): - rule = logic.skill.can_earn_level(skill, level) - MultiWorldRules.set_rule(get_skill_level_location(multiworld, player, skill, level), rule) - - -def set_modded_skill_rule(logic: StardewLogic, multiworld, player, skill: str, level: int): - rule = logic.skill.can_earn_level(skill, level) - MultiWorldRules.set_rule(get_skill_level_location(multiworld, player, skill, level), rule) + if skill_progression.is_mastery_randomized(skill): + rule = logic.skill.can_earn_mastery(skill.name) + location = multiworld.get_location(skill.mastery_name, player) + MultiWorldRules.set_rule(location, rule) def set_entrance_rules(logic: StardewLogic, multiworld, player, world_options: StardewValleyOptions): @@ -251,7 +213,8 @@ def set_entrance_rules(logic: StardewLogic, multiworld, player, world_options: S set_entrance_rule(multiworld, player, Entrance.enter_witch_warp_cave, logic.quest.has_dark_talisman() | (logic.mod.magic.can_blink())) set_entrance_rule(multiworld, player, Entrance.enter_witch_hut, (logic.has(ArtisanGood.void_mayonnaise) | logic.mod.magic.can_blink())) set_entrance_rule(multiworld, player, Entrance.enter_mutant_bug_lair, - (logic.received(Event.start_dark_talisman_quest) & logic.relationship.can_meet(NPC.krobus)) | logic.mod.magic.can_blink()) + (logic.wallet.has_rusty_key() & logic.region.can_reach(Region.railroad) & logic.relationship.can_meet( + NPC.krobus)) | logic.mod.magic.can_blink()) set_entrance_rule(multiworld, player, Entrance.enter_casino, logic.quest.has_club_card()) set_bedroom_entrance_rules(logic, multiworld, player, world_options) @@ -307,8 +270,7 @@ def set_mines_floor_entrance_rules(logic, multiworld, player): rule = logic.mine.has_mine_elevator_to_floor(floor - 10) if floor == 5 or floor == 45 or floor == 85: rule = rule & logic.mine.can_progress_in_the_mines_from_floor(floor) - entrance = multiworld.get_entrance(dig_to_mines_floor(floor), player) - MultiWorldRules.set_rule(entrance, rule) + set_entrance_rule(multiworld, player, dig_to_mines_floor(floor), rule) def set_skull_cavern_floor_entrance_rules(logic, multiworld, player): @@ -316,8 +278,7 @@ def set_skull_cavern_floor_entrance_rules(logic, multiworld, player): rule = logic.mod.elevator.has_skull_cavern_elevator_to_floor(floor - 25) if floor == 25 or floor == 75 or floor == 125: rule = rule & logic.mine.can_progress_in_the_skull_cavern_from_floor(floor) - entrance = multiworld.get_entrance(dig_to_skull_floor(floor), player) - MultiWorldRules.set_rule(entrance, rule) + set_entrance_rule(multiworld, player, dig_to_skull_floor(floor), rule) def set_blacksmith_entrance_rules(logic, multiworld, player): @@ -346,9 +307,8 @@ def set_skill_entrance_rules(logic, multiworld, player, world_options: StardewVa def set_blacksmith_upgrade_rule(logic, multiworld, player, entrance_name: str, item_name: str, tool_material: str): - material_entrance = multiworld.get_entrance(entrance_name, player) upgrade_rule = logic.has(item_name) & logic.money.can_spend(tool_upgrade_prices[tool_material]) - MultiWorldRules.set_rule(material_entrance, upgrade_rule) + set_entrance_rule(multiworld, player, entrance_name, upgrade_rule) def set_festival_entrance_rules(logic, multiworld, player): @@ -880,25 +840,19 @@ def set_traveling_merchant_day_rules(logic: StardewLogic, multiworld: MultiWorld def set_arcade_machine_rules(logic: StardewLogic, multiworld: MultiWorld, player: int, world_options: StardewValleyOptions): - MultiWorldRules.add_rule(multiworld.get_entrance(Entrance.play_junimo_kart, player), - logic.received(Wallet.skull_key)) + play_junimo_kart_rule = logic.received(Wallet.skull_key) + if world_options.arcade_machine_locations != ArcadeMachineLocations.option_full_shuffling: + set_entrance_rule(multiworld, player, Entrance.play_junimo_kart, play_junimo_kart_rule) return - MultiWorldRules.add_rule(multiworld.get_entrance(Entrance.play_junimo_kart, player), - logic.has("Junimo Kart Small Buff")) - MultiWorldRules.add_rule(multiworld.get_entrance(Entrance.reach_junimo_kart_2, player), - logic.has("Junimo Kart Medium Buff")) - MultiWorldRules.add_rule(multiworld.get_entrance(Entrance.reach_junimo_kart_3, player), - logic.has("Junimo Kart Big Buff")) - MultiWorldRules.add_rule(multiworld.get_entrance(Entrance.reach_junimo_kart_4, player), - logic.has("Junimo Kart Max Buff")) - MultiWorldRules.add_rule(multiworld.get_entrance(Entrance.play_journey_of_the_prairie_king, player), - logic.has("JotPK Small Buff")) - MultiWorldRules.add_rule(multiworld.get_entrance(Entrance.reach_jotpk_world_2, player), - logic.has("JotPK Medium Buff")) - MultiWorldRules.add_rule(multiworld.get_entrance(Entrance.reach_jotpk_world_3, player), - logic.has("JotPK Big Buff")) + set_entrance_rule(multiworld, player, Entrance.play_junimo_kart, play_junimo_kart_rule & logic.has("Junimo Kart Small Buff")) + set_entrance_rule(multiworld, player, Entrance.reach_junimo_kart_2, logic.has("Junimo Kart Medium Buff")) + set_entrance_rule(multiworld, player, Entrance.reach_junimo_kart_3, logic.has("Junimo Kart Big Buff")) + set_entrance_rule(multiworld, player, Entrance.reach_junimo_kart_4, logic.has("Junimo Kart Max Buff")) + set_entrance_rule(multiworld, player, Entrance.play_journey_of_the_prairie_king, logic.has("JotPK Small Buff")) + set_entrance_rule(multiworld, player, Entrance.reach_jotpk_world_2, logic.has("JotPK Medium Buff")) + set_entrance_rule(multiworld, player, Entrance.reach_jotpk_world_3, logic.has("JotPK Big Buff")) MultiWorldRules.add_rule(multiworld.get_location("Journey of the Prairie King Victory", player), logic.has("JotPK Max Buff")) @@ -1049,6 +1003,7 @@ def set_entrance_rule(multiworld, player, entrance: str, rule: StardewRule): potentially_required_regions = look_for_indirect_connection(rule) if potentially_required_regions: for region in potentially_required_regions: + logger.debug(f"Registering indirect condition for {region} -> {entrance}") multiworld.register_indirect_condition(multiworld.get_region(region, player), multiworld.get_entrance(entrance, player)) MultiWorldRules.set_rule(multiworld.get_entrance(entrance, player), rule) 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: diff --git a/worlds/stardew_valley/stardew_rule/rule_explain.py b/worlds/stardew_valley/stardew_rule/rule_explain.py index a9767c7b72d5..2e2b9c959d7f 100644 --- a/worlds/stardew_valley/stardew_rule/rule_explain.py +++ b/worlds/stardew_valley/stardew_rule/rule_explain.py @@ -4,7 +4,7 @@ from functools import cached_property, singledispatch from typing import Iterable, Set, Tuple, List, Optional -from BaseClasses import CollectionState +from BaseClasses import CollectionState, Location, Entrance from worlds.generic.Rules import CollectionRule from . import StardewRule, AggregatingStardewRule, Count, Has, TotalReceived, Received, Reach, true_ @@ -12,10 +12,10 @@ @dataclass class RuleExplanation: rule: StardewRule - state: CollectionState + state: CollectionState = field(repr=False, hash=False) expected: bool sub_rules: Iterable[StardewRule] = field(default_factory=list) - explored_rules_key: Set[Tuple[str, str]] = field(default_factory=set) + explored_rules_key: Set[Tuple[str, str]] = field(default_factory=set, repr=False, hash=False) current_rule_explored: bool = False def __post_init__(self): @@ -38,13 +38,6 @@ def __str__(self, depth=0): if i.result is not self.expected else i.summary(depth + 1) for i in sorted(self.explained_sub_rules, key=lambda x: x.result)) - def __repr__(self, depth=0): - if not self.sub_rules: - return self.summary(depth) - - return self.summary(depth) + "\n" + "\n".join(i.__repr__(depth + 1) - for i in sorted(self.explained_sub_rules, key=lambda x: x.result)) - @cached_property def result(self) -> bool: try: @@ -134,6 +127,10 @@ def _(rule: Reach, state: CollectionState, expected: bool, explored_spots: Set[T access_rules = [Reach(spot.parent_region.name, "Region", rule.player)] else: access_rules = [spot.access_rule, Reach(spot.parent_region.name, "Region", rule.player)] + elif spot.access_rule == Location.access_rule: + # Sometime locations just don't have an access rule and all the relevant logic is in the parent region. + access_rules = [Reach(spot.parent_region.name, "Region", rule.player)] + elif rule.resolution_hint == 'Entrance': spot = state.multiworld.get_entrance(rule.spot, rule.player) @@ -143,6 +140,9 @@ def _(rule: Reach, state: CollectionState, expected: bool, explored_spots: Set[T access_rules = [Reach(spot.parent_region.name, "Region", rule.player)] else: access_rules = [spot.access_rule, Reach(spot.parent_region.name, "Region", rule.player)] + elif spot.access_rule == Entrance.access_rule: + # Sometime entrances just don't have an access rule and all the relevant logic is in the parent region. + access_rules = [Reach(spot.parent_region.name, "Region", rule.player)] else: spot = state.multiworld.get_region(rule.spot, rule.player) diff --git a/worlds/stardew_valley/stardew_rule/state.py b/worlds/stardew_valley/stardew_rule/state.py index 5f5e61b3d4e5..6fc349a6274d 100644 --- a/worlds/stardew_valley/stardew_rule/state.py +++ b/worlds/stardew_valley/stardew_rule/state.py @@ -1,10 +1,13 @@ from dataclasses import dataclass -from typing import Iterable, Union, List, Tuple, Hashable +from typing import Iterable, Union, List, Tuple, Hashable, TYPE_CHECKING from BaseClasses import CollectionState from .base import BaseStardewRule, CombinableStardewRule from .protocol import StardewRule +if TYPE_CHECKING: + from .. import StardewValleyWorld + class TotalReceived(BaseStardewRule): count: int @@ -102,16 +105,19 @@ def value(self): return self.percent def __call__(self, state: CollectionState) -> bool: - stardew_world = state.multiworld.worlds[self.player] + stardew_world: "StardewValleyWorld" = state.multiworld.worlds[self.player] total_count = stardew_world.total_progression_items needed_count = (total_count * self.percent) // 100 player_state = state.prog_items[self.player] - if needed_count <= len(player_state): + if needed_count <= len(player_state) - len(stardew_world.excluded_from_total_progression_items): return True total_count = 0 for item, item_count in player_state.items(): + if item in stardew_world.excluded_from_total_progression_items: + continue + total_count += item_count if total_count >= needed_count: return True diff --git a/worlds/stardew_valley/strings/ap_names/event_names.py b/worlds/stardew_valley/strings/ap_names/event_names.py index 88f9715abc65..449bb6720964 100644 --- a/worlds/stardew_valley/strings/ap_names/event_names.py +++ b/worlds/stardew_valley/strings/ap_names/event_names.py @@ -8,10 +8,6 @@ def event(name: str): class Event: victory = event("Victory") - can_construct_buildings = event("Can Construct Buildings") - start_dark_talisman_quest = event("Start Dark Talisman Quest") - can_ship_items = event("Can Ship Items") - can_shop_at_pierre = event("Can Shop At Pierre's") spring_farming = event("Spring Farming") summer_farming = event("Summer Farming") fall_farming = event("Fall Farming") diff --git a/worlds/stardew_valley/test/TestCrops.py b/worlds/stardew_valley/test/TestCrops.py index 362e6bf27e7c..4fa836a97d14 100644 --- a/worlds/stardew_valley/test/TestCrops.py +++ b/worlds/stardew_valley/test/TestCrops.py @@ -11,10 +11,10 @@ def test_need_greenhouse_for_cactus(self): harvest_cactus = self.world.logic.region.can_reach_location("Harvest Cactus Fruit") self.assert_rule_false(harvest_cactus, self.multiworld.state) - self.multiworld.state.collect(self.world.create_item("Cactus Seeds"), prevent_sweep=False) - self.multiworld.state.collect(self.world.create_item("Shipping Bin"), prevent_sweep=False) - self.multiworld.state.collect(self.world.create_item("Desert Obelisk"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Cactus Seeds")) + self.multiworld.state.collect(self.create_item("Shipping Bin")) + self.multiworld.state.collect(self.create_item("Desert Obelisk")) self.assert_rule_false(harvest_cactus, self.multiworld.state) - self.multiworld.state.collect(self.world.create_item("Greenhouse"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Greenhouse")) self.assert_rule_true(harvest_cactus, self.multiworld.state) diff --git a/worlds/stardew_valley/test/TestGeneration.py b/worlds/stardew_valley/test/TestGeneration.py index 8431e6857eaf..56f338fe8e11 100644 --- a/worlds/stardew_valley/test/TestGeneration.py +++ b/worlds/stardew_valley/test/TestGeneration.py @@ -35,7 +35,7 @@ def test_all_progression_items_are_added_to_the_pool(self): items_to_ignore.extend(baby.name for baby in items.items_by_group[Group.BABY]) items_to_ignore.extend(resource_pack.name for resource_pack in items.items_by_group[Group.RESOURCE_PACK]) items_to_ignore.append("The Gateway Gazette") - progression_items = [item for item in items.all_items if item.classification is ItemClassification.progression and item.name not in items_to_ignore] + progression_items = [item for item in items.all_items if item.classification & ItemClassification.progression and item.name not in items_to_ignore] for progression_item in progression_items: with self.subTest(f"{progression_item.name}"): self.assertIn(progression_item.name, all_created_items) @@ -86,7 +86,7 @@ def test_all_progression_items_except_island_are_added_to_the_pool(self): items_to_ignore.extend(season.name for season in items.items_by_group[Group.WEAPON]) items_to_ignore.extend(baby.name for baby in items.items_by_group[Group.BABY]) items_to_ignore.append("The Gateway Gazette") - progression_items = [item for item in items.all_items if item.classification is ItemClassification.progression and item.name not in items_to_ignore] + progression_items = [item for item in items.all_items if item.classification & ItemClassification.progression and item.name not in items_to_ignore] for progression_item in progression_items: with self.subTest(f"{progression_item.name}"): if Group.GINGER_ISLAND in progression_item.groups: diff --git a/worlds/stardew_valley/test/TestOptions.py b/worlds/stardew_valley/test/TestOptions.py index 2824a10c38af..9db7f06ff5a5 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 +from Options import NamedRange, Accessibility 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,6 +54,23 @@ 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): diff --git a/worlds/stardew_valley/test/TestRegions.py b/worlds/stardew_valley/test/TestRegions.py index a25feea22085..c2e962d88a7e 100644 --- a/worlds/stardew_valley/test/TestRegions.py +++ b/worlds/stardew_valley/test/TestRegions.py @@ -4,6 +4,7 @@ from BaseClasses import get_seed from . import SVTestCase, complete_options_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 from ..strings.entrance_names import Entrance as EntranceName @@ -63,11 +64,12 @@ def test_entrance_randomization(self): ExcludeGingerIsland.internal_name: ExcludeGingerIsland.option_false, SkillProgression.internal_name: SkillProgression.option_progressive_with_masteries, }) + content = create_content(sv_options) seed = get_seed() rand = random.Random(seed) with self.subTest(flag=flag, msg=f"Seed: {seed}"): entrances, regions = create_final_connections_and_regions(sv_options) - _, randomized_connections = randomize_connections(rand, sv_options, regions, entrances) + _, randomized_connections = randomize_connections(rand, sv_options, content, regions, entrances) for connection in vanilla_connections: if flag in connection.flag: @@ -90,11 +92,12 @@ def test_entrance_randomization_without_island(self): ExcludeGingerIsland.internal_name: ExcludeGingerIsland.option_true, SkillProgression.internal_name: SkillProgression.option_progressive_with_masteries, }) + content = create_content(sv_options) seed = get_seed() rand = random.Random(seed) with self.subTest(option=option, flag=flag, seed=seed): entrances, regions = create_final_connections_and_regions(sv_options) - _, randomized_connections = randomize_connections(rand, sv_options, regions, entrances) + _, randomized_connections = randomize_connections(rand, sv_options, content, regions, entrances) for connection in vanilla_connections: if flag in connection.flag: @@ -118,13 +121,14 @@ def test_cannot_put_island_access_on_island(self): ExcludeGingerIsland.internal_name: ExcludeGingerIsland.option_false, SkillProgression.internal_name: SkillProgression.option_progressive_with_masteries, }) + content = create_content(sv_options) for i in range(0, 100 if self.skip_long_tests else 10000): seed = get_seed() rand = random.Random(seed) with self.subTest(msg=f"Seed: {seed}"): entrances, regions = create_final_connections_and_regions(sv_options) - randomized_connections, randomized_data = randomize_connections(rand, sv_options, regions, entrances) + randomized_connections, randomized_data = randomize_connections(rand, sv_options, content, regions, entrances) connections_by_name = {connection.name: connection for connection in randomized_connections} blocked_entrances = {EntranceName.use_island_obelisk, EntranceName.boat_to_ginger_island} diff --git a/worlds/stardew_valley/test/__init__.py b/worlds/stardew_valley/test/__init__.py index 3fe05d205ce0..1a312e569d11 100644 --- a/worlds/stardew_valley/test/__init__.py +++ b/worlds/stardew_valley/test/__init__.py @@ -6,7 +6,7 @@ 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, ItemClassification +from BaseClasses import MultiWorld, CollectionState, PlandoOptions, get_seed, Location, Item from Options import VerifyKeys from test.bases import WorldTestBase from test.general import gen_steps, setup_solo_multiworld as setup_base_solo_multiworld @@ -236,7 +236,6 @@ def world_setup(self, *args, **kwargs): self.original_state = self.multiworld.state.copy() self.original_itempool = self.multiworld.itempool.copy() - self.original_prog_item_count = world.total_progression_items self.unfilled_locations = self.multiworld.get_unfilled_locations(1) if self.constructed: self.world = world # noqa @@ -246,7 +245,6 @@ def tearDown(self) -> None: self.multiworld.itempool = self.original_itempool for location in self.unfilled_locations: location.item = None - self.world.total_progression_items = self.original_prog_item_count self.multiworld.lock.release() @@ -257,20 +255,13 @@ def run_default_tests(self) -> bool: return super().run_default_tests def collect_lots_of_money(self, percent: float = 0.25): - self.multiworld.state.collect(self.world.create_item("Shipping Bin"), prevent_sweep=False) - real_total_prog_items = self.multiworld.worlds[self.player].total_progression_items + self.collect("Shipping Bin") + real_total_prog_items = self.world.total_progression_items required_prog_items = int(round(real_total_prog_items * percent)) - for i in range(required_prog_items): - self.multiworld.state.collect(self.world.create_item("Stardrop"), prevent_sweep=False) - self.multiworld.worlds[self.player].total_progression_items = real_total_prog_items + self.collect("Stardrop", required_prog_items) def collect_all_the_money(self): - self.multiworld.state.collect(self.world.create_item("Shipping Bin"), prevent_sweep=False) - real_total_prog_items = self.multiworld.worlds[self.player].total_progression_items - required_prog_items = int(round(real_total_prog_items * 0.95)) - for i in range(required_prog_items): - self.multiworld.state.collect(self.world.create_item("Stardrop"), prevent_sweep=False) - self.multiworld.worlds[self.player].total_progression_items = real_total_prog_items + self.collect_lots_of_money(0.95) def collect_everything(self): non_event_items = [item for item in self.multiworld.get_items() if item.code] @@ -278,7 +269,8 @@ def collect_everything(self): self.multiworld.state.collect(item) def collect_all_except(self, item_to_not_collect: str): - for item in self.multiworld.get_items(): + non_event_items = [item for item in self.multiworld.get_items() if item.code] + for item in non_event_items: if item.name != item_to_not_collect: self.multiworld.state.collect(item) @@ -290,25 +282,26 @@ def get_real_location_names(self) -> List[str]: def collect(self, item: Union[str, Item, Iterable[Item]], count: int = 1) -> Union[None, Item, List[Item]]: assert count > 0 + if not isinstance(item, str): super().collect(item) return + if count == 1: item = self.create_item(item) self.multiworld.state.collect(item) return item + items = [] for i in range(count): item = self.create_item(item) self.multiworld.state.collect(item) items.append(item) + return items def create_item(self, item: str) -> StardewItem: - created_item = self.world.create_item(item) - if created_item.classification == ItemClassification.progression: - self.multiworld.worlds[self.player].total_progression_items -= 1 - return created_item + return self.world.create_item(item) def remove_one_by_name(self, item: str) -> None: self.remove(self.create_item(item)) @@ -336,7 +329,6 @@ def solo_multiworld(world_options: Optional[Dict[Union[str, StardewValleyOption] original_state = multiworld.state.copy() original_itempool = multiworld.itempool.copy() unfilled_locations = multiworld.get_unfilled_locations(1) - original_prog_item_count = world.total_progression_items yield multiworld, world @@ -344,7 +336,6 @@ def solo_multiworld(world_options: Optional[Dict[Union[str, StardewValleyOption] multiworld.itempool = original_itempool for location in unfilled_locations: location.item = None - multiworld.total_progression_items = original_prog_item_count multiworld.lock.release() diff --git a/worlds/stardew_valley/test/assertion/rule_assert.py b/worlds/stardew_valley/test/assertion/rule_assert.py index 5a1dad2925cf..1031a18e115c 100644 --- a/worlds/stardew_valley/test/assertion/rule_assert.py +++ b/worlds/stardew_valley/test/assertion/rule_assert.py @@ -1,3 +1,4 @@ +from typing import List from unittest import TestCase from BaseClasses import CollectionState, Location @@ -14,6 +15,10 @@ def assert_rule_true(self, rule: StardewRule, state: CollectionState): raise AssertionError(f"Error while checking rule {rule}: {e}" f"\nExplanation: {expl}") + def assert_rules_true(self, rules: List[StardewRule], state: CollectionState): + for rule in rules: + self.assert_rule_true(rule, state) + def assert_rule_false(self, rule: StardewRule, state: CollectionState): expl = explain(rule, state, expected=False) try: @@ -22,6 +27,10 @@ def assert_rule_false(self, rule: StardewRule, state: CollectionState): raise AssertionError(f"Error while checking rule {rule}: {e}" f"\nExplanation: {expl}") + def assert_rules_false(self, rules: List[StardewRule], state: CollectionState): + for rule in rules: + self.assert_rule_false(rule, state) + def assert_rule_can_be_resolved(self, rule: StardewRule, complete_state: CollectionState): expl = explain(rule, complete_state) try: diff --git a/worlds/stardew_valley/test/content/__init__.py b/worlds/stardew_valley/test/content/__init__.py index 4130dae90dc3..c666a3aae14d 100644 --- a/worlds/stardew_valley/test/content/__init__.py +++ b/worlds/stardew_valley/test/content/__init__.py @@ -7,7 +7,8 @@ feature.booksanity.BooksanityDisabled(), feature.cropsanity.CropsanityDisabled(), feature.fishsanity.FishsanityNone(), - feature.friendsanity.FriendsanityNone() + feature.friendsanity.FriendsanityNone(), + feature.skill_progression.SkillProgressionVanilla(), ) diff --git a/worlds/stardew_valley/test/mods/TestMods.py b/worlds/stardew_valley/test/mods/TestMods.py index 97184b1338b8..56138cf582a7 100644 --- a/worlds/stardew_valley/test/mods/TestMods.py +++ b/worlds/stardew_valley/test/mods/TestMods.py @@ -3,7 +3,7 @@ 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 ..assertion import ModAssertMixin, WorldAssertMixin -from ... import items, Group, ItemClassification +from ... import items, Group, ItemClassification, create_content from ... import options from ...items import items_by_group from ...options import SkillProgression, Walnutsanity @@ -75,7 +75,7 @@ def test_all_progression_items_are_added_to_the_pool(self): items_to_ignore.extend(baby.name for baby in items.items_by_group[Group.BABY]) items_to_ignore.extend(resource_pack.name for resource_pack in items.items_by_group[Group.RESOURCE_PACK]) items_to_ignore.append("The Gateway Gazette") - progression_items = [item for item in items.all_items if item.classification is ItemClassification.progression + progression_items = [item for item in items.all_items if item.classification & ItemClassification.progression and item.name not in items_to_ignore] for progression_item in progression_items: with self.subTest(f"{progression_item.name}"): @@ -105,7 +105,7 @@ def test_all_progression_items_except_island_are_added_to_the_pool(self): items_to_ignore.extend(baby.name for baby in items.items_by_group[Group.BABY]) items_to_ignore.extend(resource_pack.name for resource_pack in items.items_by_group[Group.RESOURCE_PACK]) items_to_ignore.append("The Gateway Gazette") - progression_items = [item for item in items.all_items if item.classification is ItemClassification.progression + progression_items = [item for item in items.all_items if item.classification & ItemClassification.progression and item.name not in items_to_ignore] for progression_item in progression_items: with self.subTest(f"{progression_item.name}"): @@ -128,12 +128,13 @@ def test_mod_entrance_randomization(self): SkillProgression.internal_name: SkillProgression.option_progressive_with_masteries, options.Mods.internal_name: frozenset(options.Mods.valid_keys) }) + content = create_content(sv_options) seed = get_seed() rand = random.Random(seed) with self.subTest(option=option, flag=flag, seed=seed): final_connections, final_regions = create_final_connections_and_regions(sv_options) - _, randomized_connections = randomize_connections(rand, sv_options, final_regions, final_connections) + _, randomized_connections = randomize_connections(rand, sv_options, content, final_regions, final_connections) for connection_name in final_connections: connection = final_connections[connection_name] diff --git a/worlds/stardew_valley/test/rules/TestArcades.py b/worlds/stardew_valley/test/rules/TestArcades.py index 2922ecfb5d9e..69e5b22cc01b 100644 --- a/worlds/stardew_valley/test/rules/TestArcades.py +++ b/worlds/stardew_valley/test/rules/TestArcades.py @@ -19,8 +19,8 @@ def test_prairie_king(self): life = self.create_item("JotPK: Extra Life") drop = self.create_item("JotPK: Increased Drop Rate") - self.multiworld.state.collect(boots, prevent_sweep=True) - self.multiworld.state.collect(gun, prevent_sweep=True) + self.multiworld.state.collect(boots) + self.multiworld.state.collect(gun) self.assertTrue(self.world.logic.region.can_reach("JotPK World 1")(self.multiworld.state)) self.assertFalse(self.world.logic.region.can_reach("JotPK World 2")(self.multiworld.state)) self.assertFalse(self.world.logic.region.can_reach("JotPK World 3")(self.multiworld.state)) @@ -28,8 +28,8 @@ def test_prairie_king(self): self.remove(boots) self.remove(gun) - self.multiworld.state.collect(boots, prevent_sweep=True) - self.multiworld.state.collect(boots, prevent_sweep=True) + self.multiworld.state.collect(boots) + self.multiworld.state.collect(boots) self.assertTrue(self.world.logic.region.can_reach("JotPK World 1")(self.multiworld.state)) self.assertFalse(self.world.logic.region.can_reach("JotPK World 2")(self.multiworld.state)) self.assertFalse(self.world.logic.region.can_reach("JotPK World 3")(self.multiworld.state)) @@ -37,10 +37,10 @@ def test_prairie_king(self): self.remove(boots) self.remove(boots) - self.multiworld.state.collect(boots, prevent_sweep=True) - self.multiworld.state.collect(gun, prevent_sweep=True) - self.multiworld.state.collect(ammo, prevent_sweep=True) - self.multiworld.state.collect(life, prevent_sweep=True) + self.multiworld.state.collect(boots) + self.multiworld.state.collect(gun) + self.multiworld.state.collect(ammo) + self.multiworld.state.collect(life) self.assertTrue(self.world.logic.region.can_reach("JotPK World 1")(self.multiworld.state)) self.assertTrue(self.world.logic.region.can_reach("JotPK World 2")(self.multiworld.state)) self.assertFalse(self.world.logic.region.can_reach("JotPK World 3")(self.multiworld.state)) @@ -50,13 +50,13 @@ def test_prairie_king(self): self.remove(ammo) self.remove(life) - self.multiworld.state.collect(boots, prevent_sweep=True) - self.multiworld.state.collect(gun, prevent_sweep=True) - self.multiworld.state.collect(gun, prevent_sweep=True) - self.multiworld.state.collect(ammo, prevent_sweep=True) - self.multiworld.state.collect(ammo, prevent_sweep=True) - self.multiworld.state.collect(life, prevent_sweep=True) - self.multiworld.state.collect(drop, prevent_sweep=True) + self.multiworld.state.collect(boots) + self.multiworld.state.collect(gun) + self.multiworld.state.collect(gun) + self.multiworld.state.collect(ammo) + self.multiworld.state.collect(ammo) + self.multiworld.state.collect(life) + self.multiworld.state.collect(drop) self.assertTrue(self.world.logic.region.can_reach("JotPK World 1")(self.multiworld.state)) self.assertTrue(self.world.logic.region.can_reach("JotPK World 2")(self.multiworld.state)) self.assertTrue(self.world.logic.region.can_reach("JotPK World 3")(self.multiworld.state)) @@ -69,17 +69,17 @@ def test_prairie_king(self): self.remove(life) self.remove(drop) - self.multiworld.state.collect(boots, prevent_sweep=True) - self.multiworld.state.collect(boots, prevent_sweep=True) - self.multiworld.state.collect(gun, prevent_sweep=True) - self.multiworld.state.collect(gun, prevent_sweep=True) - self.multiworld.state.collect(gun, prevent_sweep=True) - self.multiworld.state.collect(gun, prevent_sweep=True) - self.multiworld.state.collect(ammo, prevent_sweep=True) - self.multiworld.state.collect(ammo, prevent_sweep=True) - self.multiworld.state.collect(ammo, prevent_sweep=True) - self.multiworld.state.collect(life, prevent_sweep=True) - self.multiworld.state.collect(drop, prevent_sweep=True) + self.multiworld.state.collect(boots) + self.multiworld.state.collect(boots) + self.multiworld.state.collect(gun) + self.multiworld.state.collect(gun) + self.multiworld.state.collect(gun) + self.multiworld.state.collect(gun) + self.multiworld.state.collect(ammo) + self.multiworld.state.collect(ammo) + self.multiworld.state.collect(ammo) + self.multiworld.state.collect(life) + self.multiworld.state.collect(drop) self.assertTrue(self.world.logic.region.can_reach("JotPK World 1")(self.multiworld.state)) self.assertTrue(self.world.logic.region.can_reach("JotPK World 2")(self.multiworld.state)) self.assertTrue(self.world.logic.region.can_reach("JotPK World 3")(self.multiworld.state)) diff --git a/worlds/stardew_valley/test/rules/TestBuildings.py b/worlds/stardew_valley/test/rules/TestBuildings.py index 2c276d8b5cbe..d1f60b20e0db 100644 --- a/worlds/stardew_valley/test/rules/TestBuildings.py +++ b/worlds/stardew_valley/test/rules/TestBuildings.py @@ -23,11 +23,7 @@ def test_big_coop_blueprint(self): self.assertFalse(big_coop_blueprint_rule(self.multiworld.state), f"Rule is {repr(self.multiworld.get_location('Big Coop Blueprint', self.player).access_rule)}") - self.multiworld.state.collect(self.create_item("Can Construct Buildings"), prevent_sweep=True) - self.assertFalse(big_coop_blueprint_rule(self.multiworld.state), - f"Rule is {repr(self.multiworld.get_location('Big Coop Blueprint', self.player).access_rule)}") - - self.multiworld.state.collect(self.create_item("Progressive Coop"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Progressive Coop")) self.assertTrue(big_coop_blueprint_rule(self.multiworld.state), f"Rule is {repr(self.multiworld.get_location('Big Coop Blueprint', self.player).access_rule)}") @@ -35,13 +31,12 @@ def test_deluxe_coop_blueprint(self): self.assertFalse(self.world.logic.region.can_reach_location("Deluxe Coop Blueprint")(self.multiworld.state)) self.collect_lots_of_money() - self.multiworld.state.collect(self.create_item("Can Construct Buildings"), prevent_sweep=True) self.assertFalse(self.world.logic.region.can_reach_location("Deluxe Coop Blueprint")(self.multiworld.state)) - self.multiworld.state.collect(self.create_item("Progressive Coop"), prevent_sweep=True) + self.multiworld.state.collect(self.create_item("Progressive Coop")) self.assertFalse(self.world.logic.region.can_reach_location("Deluxe Coop Blueprint")(self.multiworld.state)) - self.multiworld.state.collect(self.create_item("Progressive Coop"), prevent_sweep=True) + self.multiworld.state.collect(self.create_item("Progressive Coop")) self.assertTrue(self.world.logic.region.can_reach_location("Deluxe Coop Blueprint")(self.multiworld.state)) def test_big_shed_blueprint(self): @@ -53,10 +48,6 @@ def test_big_shed_blueprint(self): self.assertFalse(big_shed_rule(self.multiworld.state), f"Rule is {repr(self.multiworld.get_location('Big Shed Blueprint', self.player).access_rule)}") - self.multiworld.state.collect(self.create_item("Can Construct Buildings"), prevent_sweep=True) - self.assertFalse(big_shed_rule(self.multiworld.state), - f"Rule is {repr(self.multiworld.get_location('Big Shed Blueprint', self.player).access_rule)}") - - self.multiworld.state.collect(self.create_item("Progressive Shed"), prevent_sweep=True) + self.multiworld.state.collect(self.create_item("Progressive Shed")) self.assertTrue(big_shed_rule(self.multiworld.state), f"Rule is {repr(self.multiworld.get_location('Big Shed Blueprint', self.player).access_rule)}") diff --git a/worlds/stardew_valley/test/rules/TestBundles.py b/worlds/stardew_valley/test/rules/TestBundles.py index ab376c90d4ea..0bc7f9bfdfd4 100644 --- a/worlds/stardew_valley/test/rules/TestBundles.py +++ b/worlds/stardew_valley/test/rules/TestBundles.py @@ -56,6 +56,7 @@ def test_raccoon_bundles_rely_on_previous_ones(self): self.collect("Mushroom Boxes") self.collect("Progressive Fishing Rod", 4) self.collect("Fishing Level", 10) + self.collect("Furnace Recipe") self.assertFalse(raccoon_rule_1(self.multiworld.state)) self.assertFalse(raccoon_rule_3(self.multiworld.state)) diff --git a/worlds/stardew_valley/test/rules/TestCookingRecipes.py b/worlds/stardew_valley/test/rules/TestCookingRecipes.py index 7ab9d61cb942..d5f9da73c9d7 100644 --- a/worlds/stardew_valley/test/rules/TestCookingRecipes.py +++ b/worlds/stardew_valley/test/rules/TestCookingRecipes.py @@ -17,14 +17,14 @@ def test_can_learn_qos_recipe(self): rule = self.world.logic.region.can_reach_location(location) self.assert_rule_false(rule, self.multiworld.state) - self.multiworld.state.collect(self.create_item("Progressive House"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Radish Seeds"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Spring"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Summer"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Progressive House")) + self.multiworld.state.collect(self.create_item("Radish Seeds")) + self.multiworld.state.collect(self.create_item("Spring")) + self.multiworld.state.collect(self.create_item("Summer")) self.collect_lots_of_money() self.assert_rule_false(rule, self.multiworld.state) - self.multiworld.state.collect(self.create_item("The Queen of Sauce"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("The Queen of Sauce")) self.assert_rule_true(rule, self.multiworld.state) @@ -42,21 +42,21 @@ def test_can_learn_qos_recipe(self): rule = self.world.logic.region.can_reach_location(location) self.assert_rule_false(rule, self.multiworld.state) - self.multiworld.state.collect(self.create_item("Progressive House"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Radish Seeds"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Summer"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Progressive House")) + self.multiworld.state.collect(self.create_item("Radish Seeds")) + self.multiworld.state.collect(self.create_item("Summer")) self.collect_lots_of_money() self.assert_rule_false(rule, self.multiworld.state) spring = self.create_item("Spring") qos = self.create_item("The Queen of Sauce") - self.multiworld.state.collect(spring, prevent_sweep=False) - self.multiworld.state.collect(qos, prevent_sweep=False) + self.multiworld.state.collect(spring) + self.multiworld.state.collect(qos) self.assert_rule_false(rule, self.multiworld.state) self.multiworld.state.remove(spring) self.multiworld.state.remove(qos) - self.multiworld.state.collect(self.create_item("Radish Salad Recipe"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Radish Salad Recipe")) self.assert_rule_true(rule, self.multiworld.state) def test_get_chefsanity_check_recipe(self): @@ -64,20 +64,20 @@ def test_get_chefsanity_check_recipe(self): rule = self.world.logic.region.can_reach_location(location) self.assert_rule_false(rule, self.multiworld.state) - self.multiworld.state.collect(self.create_item("Spring"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Spring")) self.collect_lots_of_money() self.assert_rule_false(rule, self.multiworld.state) seeds = self.create_item("Radish Seeds") summer = self.create_item("Summer") house = self.create_item("Progressive House") - self.multiworld.state.collect(seeds, prevent_sweep=False) - self.multiworld.state.collect(summer, prevent_sweep=False) - self.multiworld.state.collect(house, prevent_sweep=False) + self.multiworld.state.collect(seeds) + self.multiworld.state.collect(summer) + self.multiworld.state.collect(house) self.assert_rule_false(rule, self.multiworld.state) self.multiworld.state.remove(seeds) self.multiworld.state.remove(summer) self.multiworld.state.remove(house) - self.multiworld.state.collect(self.create_item("The Queen of Sauce"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("The Queen of Sauce")) self.assert_rule_true(rule, self.multiworld.state) diff --git a/worlds/stardew_valley/test/rules/TestCraftingRecipes.py b/worlds/stardew_valley/test/rules/TestCraftingRecipes.py index 93c325ae5c5c..46a1b73d0b7a 100644 --- a/worlds/stardew_valley/test/rules/TestCraftingRecipes.py +++ b/worlds/stardew_valley/test/rules/TestCraftingRecipes.py @@ -25,7 +25,7 @@ def test_can_craft_recipe(self): self.collect_all_the_money() self.assert_rule_false(rule, self.multiworld.state) - self.multiworld.state.collect(self.create_item("Marble Brazier Recipe"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Marble Brazier Recipe")) self.assert_rule_true(rule, self.multiworld.state) def test_can_learn_crafting_recipe(self): @@ -38,18 +38,35 @@ def test_can_learn_crafting_recipe(self): def test_can_craft_festival_recipe(self): recipe = all_crafting_recipes_by_name["Jack-O-Lantern"] - self.multiworld.state.collect(self.create_item("Pumpkin Seeds"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Torch Recipe"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Pumpkin Seeds")) + self.multiworld.state.collect(self.create_item("Torch Recipe")) self.collect_lots_of_money() rule = self.world.logic.crafting.can_craft(recipe) self.assert_rule_false(rule, self.multiworld.state) - self.multiworld.state.collect(self.create_item("Fall"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Fall")) self.assert_rule_false(rule, self.multiworld.state) - self.multiworld.state.collect(self.create_item("Jack-O-Lantern Recipe"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Jack-O-Lantern Recipe")) self.assert_rule_true(rule, self.multiworld.state) + def test_require_furnace_recipe_for_smelting_checks(self): + locations = ["Craft Furnace", "Smelting", "Copper Pickaxe Upgrade", "Gold Trash Can Upgrade"] + rules = [self.world.logic.region.can_reach_location(location) for location in locations] + self.collect([self.create_item("Progressive Pickaxe")] * 4) + self.collect([self.create_item("Progressive Fishing Rod")] * 4) + self.collect([self.create_item("Progressive Sword")] * 4) + self.collect([self.create_item("Progressive Mine Elevator")] * 24) + self.collect([self.create_item("Progressive Trash Can")] * 2) + self.collect([self.create_item("Mining Level")] * 10) + self.collect([self.create_item("Combat Level")] * 10) + self.collect([self.create_item("Fishing Level")] * 10) + self.collect_all_the_money() + self.assert_rules_false(rules, self.multiworld.state) + + self.multiworld.state.collect(self.create_item("Furnace Recipe")) + self.assert_rules_true(rules, self.multiworld.state) + class TestCraftsanityWithFestivalsLogic(SVTestBase): options = { @@ -62,16 +79,16 @@ class TestCraftsanityWithFestivalsLogic(SVTestBase): def test_can_craft_festival_recipe(self): recipe = all_crafting_recipes_by_name["Jack-O-Lantern"] - self.multiworld.state.collect(self.create_item("Pumpkin Seeds"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Fall"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Pumpkin Seeds")) + self.multiworld.state.collect(self.create_item("Fall")) self.collect_lots_of_money() rule = self.world.logic.crafting.can_craft(recipe) self.assert_rule_false(rule, self.multiworld.state) - self.multiworld.state.collect(self.create_item("Jack-O-Lantern Recipe"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Jack-O-Lantern Recipe")) self.assert_rule_false(rule, self.multiworld.state) - self.multiworld.state.collect(self.create_item("Torch Recipe"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Torch Recipe")) self.assert_rule_true(rule, self.multiworld.state) @@ -92,7 +109,7 @@ def test_can_craft_recipe(self): def test_can_craft_festival_recipe(self): recipe = all_crafting_recipes_by_name["Jack-O-Lantern"] - self.multiworld.state.collect(self.create_item("Pumpkin Seeds"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Pumpkin Seeds")) self.collect_lots_of_money() rule = self.world.logic.crafting.can_craft(recipe) result = rule(self.multiworld.state) @@ -101,6 +118,23 @@ def test_can_craft_festival_recipe(self): self.collect([self.create_item("Progressive Season")] * 2) self.assert_rule_true(rule, self.multiworld.state) + def test_requires_mining_levels_for_smelting_checks(self): + locations = ["Smelting", "Copper Pickaxe Upgrade", "Gold Trash Can Upgrade"] + rules = [self.world.logic.region.can_reach_location(location) for location in locations] + self.collect([self.create_item("Progressive Pickaxe")] * 4) + self.collect([self.create_item("Progressive Fishing Rod")] * 4) + self.collect([self.create_item("Progressive Sword")] * 4) + self.collect([self.create_item("Progressive Mine Elevator")] * 24) + self.collect([self.create_item("Progressive Trash Can")] * 2) + self.multiworld.state.collect(self.create_item("Furnace Recipe")) + self.collect([self.create_item("Combat Level")] * 10) + self.collect([self.create_item("Fishing Level")] * 10) + self.collect_all_the_money() + self.assert_rules_false(rules, self.multiworld.state) + + self.collect([self.create_item("Mining Level")] * 10) + self.assert_rules_true(rules, self.multiworld.state) + class TestNoCraftsanityWithFestivalsLogic(SVTestBase): options = { @@ -113,11 +147,11 @@ class TestNoCraftsanityWithFestivalsLogic(SVTestBase): def test_can_craft_festival_recipe(self): recipe = all_crafting_recipes_by_name["Jack-O-Lantern"] - self.multiworld.state.collect(self.create_item("Pumpkin Seeds"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Fall"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Pumpkin Seeds")) + self.multiworld.state.collect(self.create_item("Fall")) self.collect_lots_of_money() rule = self.world.logic.crafting.can_craft(recipe) self.assert_rule_false(rule, self.multiworld.state) - self.multiworld.state.collect(self.create_item("Jack-O-Lantern Recipe"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Jack-O-Lantern Recipe")) self.assert_rule_true(rule, self.multiworld.state) diff --git a/worlds/stardew_valley/test/rules/TestDonations.py b/worlds/stardew_valley/test/rules/TestDonations.py index 984a3ebc38b4..3927bd09a48b 100644 --- a/worlds/stardew_valley/test/rules/TestDonations.py +++ b/worlds/stardew_valley/test/rules/TestDonations.py @@ -18,7 +18,7 @@ def test_cannot_make_any_donation_without_museum_access(self): for donation in locations_by_tag[LocationTags.MUSEUM_DONATIONS]: self.assertFalse(self.world.logic.region.can_reach_location(donation.name)(self.multiworld.state)) - self.multiworld.state.collect(self.create_item(railroad_item), prevent_sweep=False) + self.multiworld.state.collect(self.create_item(railroad_item)) for donation in locations_by_tag[LocationTags.MUSEUM_DONATIONS]: self.assertTrue(self.world.logic.region.can_reach_location(donation.name)(self.multiworld.state)) @@ -39,7 +39,7 @@ def test_cannot_make_any_donation_without_museum_access(self): for donation in donation_locations: self.assertFalse(self.world.logic.region.can_reach_location(donation.name)(self.multiworld.state)) - self.multiworld.state.collect(self.create_item(railroad_item), prevent_sweep=False) + self.multiworld.state.collect(self.create_item(railroad_item)) for donation in donation_locations: self.assertTrue(self.world.logic.region.can_reach_location(donation.name)(self.multiworld.state)) @@ -58,7 +58,7 @@ def test_cannot_make_any_donation_without_museum_access(self): for donation in locations_by_tag[LocationTags.MUSEUM_MILESTONES]: self.assertFalse(self.world.logic.region.can_reach_location(donation.name)(self.multiworld.state)) - self.multiworld.state.collect(self.create_item(railroad_item), prevent_sweep=False) + self.multiworld.state.collect(self.create_item(railroad_item)) for donation in locations_by_tag[LocationTags.MUSEUM_MILESTONES]: self.assertTrue(self.world.logic.region.can_reach_location(donation.name)(self.multiworld.state)) diff --git a/worlds/stardew_valley/test/rules/TestFriendship.py b/worlds/stardew_valley/test/rules/TestFriendship.py index fb186ca99480..3e9109ed5010 100644 --- a/worlds/stardew_valley/test/rules/TestFriendship.py +++ b/worlds/stardew_valley/test/rules/TestFriendship.py @@ -11,34 +11,34 @@ class TestFriendsanityDatingRules(SVTestBase): def test_earning_dating_heart_requires_dating(self): self.collect_all_the_money() - self.multiworld.state.collect(self.create_item("Fall"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Beach Bridge"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Progressive House"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Fall")) + self.multiworld.state.collect(self.create_item("Beach Bridge")) + self.multiworld.state.collect(self.create_item("Progressive House")) for i in range(3): - self.multiworld.state.collect(self.create_item("Progressive Pickaxe"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Progressive Weapon"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Progressive Axe"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Progressive Barn"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Progressive Pickaxe")) + self.multiworld.state.collect(self.create_item("Progressive Weapon")) + self.multiworld.state.collect(self.create_item("Progressive Axe")) + self.multiworld.state.collect(self.create_item("Progressive Barn")) for i in range(10): - self.multiworld.state.collect(self.create_item("Foraging Level"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Farming Level"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Mining Level"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Combat Level"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Progressive Mine Elevator"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Progressive Mine Elevator"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Foraging Level")) + self.multiworld.state.collect(self.create_item("Farming Level")) + self.multiworld.state.collect(self.create_item("Mining Level")) + self.multiworld.state.collect(self.create_item("Combat Level")) + self.multiworld.state.collect(self.create_item("Progressive Mine Elevator")) + self.multiworld.state.collect(self.create_item("Progressive Mine Elevator")) npc = "Abigail" heart_name = f"{npc} <3" step = 3 self.assert_can_reach_heart_up_to(npc, 3, step) - self.multiworld.state.collect(self.create_item(heart_name), prevent_sweep=False) + self.multiworld.state.collect(self.create_item(heart_name)) self.assert_can_reach_heart_up_to(npc, 6, step) - self.multiworld.state.collect(self.create_item(heart_name), prevent_sweep=False) + self.multiworld.state.collect(self.create_item(heart_name)) self.assert_can_reach_heart_up_to(npc, 8, step) - self.multiworld.state.collect(self.create_item(heart_name), prevent_sweep=False) + self.multiworld.state.collect(self.create_item(heart_name)) self.assert_can_reach_heart_up_to(npc, 10, step) - self.multiworld.state.collect(self.create_item(heart_name), prevent_sweep=False) + self.multiworld.state.collect(self.create_item(heart_name)) self.assert_can_reach_heart_up_to(npc, 14, step) def assert_can_reach_heart_up_to(self, npc: str, max_reachable: int, step: int): diff --git a/worlds/stardew_valley/test/rules/TestShipping.py b/worlds/stardew_valley/test/rules/TestShipping.py index 973d8d3ada7d..b26d1e94ee2c 100644 --- a/worlds/stardew_valley/test/rules/TestShipping.py +++ b/worlds/stardew_valley/test/rules/TestShipping.py @@ -76,7 +76,7 @@ def test_all_shipsanity_locations_require_shipping_bin(self): with self.subTest(location.name): self.remove(bin_item) self.assertFalse(self.world.logic.region.can_reach_location(location.name)(self.multiworld.state)) - self.multiworld.state.collect(bin_item, prevent_sweep=False) + self.multiworld.state.collect(bin_item) shipsanity_rule = self.world.logic.region.can_reach_location(location.name) self.assert_rule_true(shipsanity_rule, self.multiworld.state) self.remove(bin_item) diff --git a/worlds/stardew_valley/test/rules/TestStateRules.py b/worlds/stardew_valley/test/rules/TestStateRules.py index 4f53b9a7f536..49577d2223e0 100644 --- a/worlds/stardew_valley/test/rules/TestStateRules.py +++ b/worlds/stardew_valley/test/rules/TestStateRules.py @@ -1,12 +1,22 @@ -import unittest +from .. import SVTestBase, allsanity_mods_6_x_x +from ...stardew_rule import HasProgressionPercent -from BaseClasses import ItemClassification -from ...test import solo_multiworld +class TestHasProgressionPercentWithVictory(SVTestBase): + options = allsanity_mods_6_x_x() -class TestHasProgressionPercent(unittest.TestCase): - def test_max_item_amount_is_full_collection(self): - # Not caching because it fails too often for some reason - with solo_multiworld(world_caching=False) as (multiworld, world): - progression_item_count = sum(1 for i in multiworld.get_items() if ItemClassification.progression in i.classification) - self.assertEqual(world.total_progression_items, progression_item_count - 1) # -1 to skip Victory + def test_has_100_progression_percent_is_false_while_items_are_missing(self): + has_100_progression_percent = HasProgressionPercent(1, 100) + + for i, item in enumerate([i for i in self.multiworld.get_items() if i.advancement and i.code][1:]): + if item.name != "Victory": + self.collect(item) + self.assertFalse(has_100_progression_percent(self.multiworld.state), + f"Rule became true after {i} items, total_progression_items is {self.world.total_progression_items}") + + def test_has_100_progression_percent_account_for_victory_not_being_collected(self): + has_100_progression_percent = HasProgressionPercent(1, 100) + + self.collect_all_except("Victory") + + self.assert_rule_true(has_100_progression_percent, self.multiworld.state) diff --git a/worlds/stardew_valley/test/rules/TestTools.py b/worlds/stardew_valley/test/rules/TestTools.py index 5f0fe8ef3ffb..5b8975f4e707 100644 --- a/worlds/stardew_valley/test/rules/TestTools.py +++ b/worlds/stardew_valley/test/rules/TestTools.py @@ -21,30 +21,30 @@ def test_sturgeon(self): self.assert_rule_false(sturgeon_rule, self.multiworld.state) summer = self.create_item("Summer") - self.multiworld.state.collect(summer, prevent_sweep=False) + self.multiworld.state.collect(summer) self.assert_rule_false(sturgeon_rule, self.multiworld.state) fishing_rod = self.create_item("Progressive Fishing Rod") - self.multiworld.state.collect(fishing_rod, prevent_sweep=False) - self.multiworld.state.collect(fishing_rod, prevent_sweep=False) + self.multiworld.state.collect(fishing_rod) + self.multiworld.state.collect(fishing_rod) self.assert_rule_false(sturgeon_rule, self.multiworld.state) fishing_level = self.create_item("Fishing Level") - self.multiworld.state.collect(fishing_level, prevent_sweep=False) + self.multiworld.state.collect(fishing_level) self.assert_rule_false(sturgeon_rule, self.multiworld.state) - self.multiworld.state.collect(fishing_level, prevent_sweep=False) - self.multiworld.state.collect(fishing_level, prevent_sweep=False) - self.multiworld.state.collect(fishing_level, prevent_sweep=False) - self.multiworld.state.collect(fishing_level, prevent_sweep=False) - self.multiworld.state.collect(fishing_level, prevent_sweep=False) + self.multiworld.state.collect(fishing_level) + self.multiworld.state.collect(fishing_level) + self.multiworld.state.collect(fishing_level) + self.multiworld.state.collect(fishing_level) + self.multiworld.state.collect(fishing_level) self.assert_rule_true(sturgeon_rule, self.multiworld.state) self.remove(summer) self.assert_rule_false(sturgeon_rule, self.multiworld.state) winter = self.create_item("Winter") - self.multiworld.state.collect(winter, prevent_sweep=False) + self.multiworld.state.collect(winter) self.assert_rule_true(sturgeon_rule, self.multiworld.state) self.remove(fishing_rod) @@ -53,24 +53,24 @@ def test_sturgeon(self): def test_old_master_cannoli(self): self.multiworld.state.prog_items = {1: Counter()} - self.multiworld.state.collect(self.create_item("Progressive Axe"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Progressive Axe"), prevent_sweep=False) - self.multiworld.state.collect(self.create_item("Summer"), prevent_sweep=False) + self.multiworld.state.collect(self.create_item("Progressive Axe")) + self.multiworld.state.collect(self.create_item("Progressive Axe")) + self.multiworld.state.collect(self.create_item("Summer")) self.collect_lots_of_money() rule = self.world.logic.region.can_reach_location("Old Master Cannoli") self.assert_rule_false(rule, self.multiworld.state) fall = self.create_item("Fall") - self.multiworld.state.collect(fall, prevent_sweep=False) + self.multiworld.state.collect(fall) self.assert_rule_false(rule, self.multiworld.state) tuesday = self.create_item("Traveling Merchant: Tuesday") - self.multiworld.state.collect(tuesday, prevent_sweep=False) + self.multiworld.state.collect(tuesday) self.assert_rule_false(rule, self.multiworld.state) rare_seed = self.create_item("Rare Seed") - self.multiworld.state.collect(rare_seed, prevent_sweep=False) + self.multiworld.state.collect(rare_seed) self.assert_rule_true(rule, self.multiworld.state) self.remove(fall) @@ -80,11 +80,11 @@ def test_old_master_cannoli(self): green_house = self.create_item("Greenhouse") self.collect(self.create_item(Event.fall_farming)) - self.multiworld.state.collect(green_house, prevent_sweep=False) + self.multiworld.state.collect(green_house) self.assert_rule_false(rule, self.multiworld.state) friday = self.create_item("Traveling Merchant: Friday") - self.multiworld.state.collect(friday, prevent_sweep=False) + self.multiworld.state.collect(friday) self.assertTrue(self.multiworld.get_location("Old Master Cannoli", 1).access_rule(self.multiworld.state)) self.remove(green_house) @@ -111,7 +111,7 @@ def test_cannot_get_any_tool_without_blacksmith_access(self): for material in [ToolMaterial.copper, ToolMaterial.iron, ToolMaterial.gold, ToolMaterial.iridium]: self.assert_rule_false(self.world.logic.tool.has_tool(tool, material), self.multiworld.state) - self.multiworld.state.collect(self.create_item(railroad_item), prevent_sweep=False) + self.multiworld.state.collect(self.create_item(railroad_item)) for tool in [Tool.pickaxe, Tool.axe, Tool.hoe, Tool.trash_can, Tool.watering_can]: for material in [ToolMaterial.copper, ToolMaterial.iron, ToolMaterial.gold, ToolMaterial.iridium]: @@ -125,7 +125,7 @@ def test_cannot_get_fishing_rod_without_willy_access(self): for fishing_rod_level in [3, 4]: self.assert_rule_false(self.world.logic.tool.has_fishing_rod(fishing_rod_level), self.multiworld.state) - self.multiworld.state.collect(self.create_item(railroad_item), prevent_sweep=False) + self.multiworld.state.collect(self.create_item(railroad_item)) for fishing_rod_level in [3, 4]: self.assert_rule_true(self.world.logic.tool.has_fishing_rod(fishing_rod_level), self.multiworld.state) diff --git a/worlds/stardew_valley/test/rules/TestWeapons.py b/worlds/stardew_valley/test/rules/TestWeapons.py index 972170b93c75..383f26e841d2 100644 --- a/worlds/stardew_valley/test/rules/TestWeapons.py +++ b/worlds/stardew_valley/test/rules/TestWeapons.py @@ -10,40 +10,40 @@ class TestWeaponsLogic(SVTestBase): } def test_mine(self): - self.multiworld.state.collect(self.create_item("Progressive Pickaxe"), prevent_sweep=True) - self.multiworld.state.collect(self.create_item("Progressive Pickaxe"), prevent_sweep=True) - self.multiworld.state.collect(self.create_item("Progressive Pickaxe"), prevent_sweep=True) - self.multiworld.state.collect(self.create_item("Progressive Pickaxe"), prevent_sweep=True) - self.multiworld.state.collect(self.create_item("Progressive House"), prevent_sweep=True) + self.multiworld.state.collect(self.create_item("Progressive Pickaxe")) + self.multiworld.state.collect(self.create_item("Progressive Pickaxe")) + self.multiworld.state.collect(self.create_item("Progressive Pickaxe")) + self.multiworld.state.collect(self.create_item("Progressive Pickaxe")) + self.multiworld.state.collect(self.create_item("Progressive House")) self.collect([self.create_item("Combat Level")] * 10) self.collect([self.create_item("Mining Level")] * 10) self.collect([self.create_item("Progressive Mine Elevator")] * 24) - self.multiworld.state.collect(self.create_item("Bus Repair"), prevent_sweep=True) - self.multiworld.state.collect(self.create_item("Skull Key"), prevent_sweep=True) + self.multiworld.state.collect(self.create_item("Bus Repair")) + self.multiworld.state.collect(self.create_item("Skull Key")) - self.GiveItemAndCheckReachableMine("Progressive Sword", 1) - self.GiveItemAndCheckReachableMine("Progressive Dagger", 1) - self.GiveItemAndCheckReachableMine("Progressive Club", 1) + self.give_item_and_check_reachable_mine("Progressive Sword", 1) + self.give_item_and_check_reachable_mine("Progressive Dagger", 1) + self.give_item_and_check_reachable_mine("Progressive Club", 1) - self.GiveItemAndCheckReachableMine("Progressive Sword", 2) - self.GiveItemAndCheckReachableMine("Progressive Dagger", 2) - self.GiveItemAndCheckReachableMine("Progressive Club", 2) + self.give_item_and_check_reachable_mine("Progressive Sword", 2) + self.give_item_and_check_reachable_mine("Progressive Dagger", 2) + self.give_item_and_check_reachable_mine("Progressive Club", 2) - self.GiveItemAndCheckReachableMine("Progressive Sword", 3) - self.GiveItemAndCheckReachableMine("Progressive Dagger", 3) - self.GiveItemAndCheckReachableMine("Progressive Club", 3) + self.give_item_and_check_reachable_mine("Progressive Sword", 3) + self.give_item_and_check_reachable_mine("Progressive Dagger", 3) + self.give_item_and_check_reachable_mine("Progressive Club", 3) - self.GiveItemAndCheckReachableMine("Progressive Sword", 4) - self.GiveItemAndCheckReachableMine("Progressive Dagger", 4) - self.GiveItemAndCheckReachableMine("Progressive Club", 4) + self.give_item_and_check_reachable_mine("Progressive Sword", 4) + self.give_item_and_check_reachable_mine("Progressive Dagger", 4) + self.give_item_and_check_reachable_mine("Progressive Club", 4) - self.GiveItemAndCheckReachableMine("Progressive Sword", 5) - self.GiveItemAndCheckReachableMine("Progressive Dagger", 5) - self.GiveItemAndCheckReachableMine("Progressive Club", 5) + self.give_item_and_check_reachable_mine("Progressive Sword", 5) + self.give_item_and_check_reachable_mine("Progressive Dagger", 5) + self.give_item_and_check_reachable_mine("Progressive Club", 5) - def GiveItemAndCheckReachableMine(self, item_name: str, reachable_level: int): + def give_item_and_check_reachable_mine(self, item_name: str, reachable_level: int): item = self.multiworld.create_item(item_name, self.player) - self.multiworld.state.collect(item, prevent_sweep=True) + self.multiworld.state.collect(item) rule = self.world.logic.mine.can_mine_in_the_mines_floor_1_40() if reachable_level > 0: self.assert_rule_true(rule, self.multiworld.state) diff --git a/worlds/stardew_valley/test/stability/TestStability.py b/worlds/stardew_valley/test/stability/TestStability.py index 8bb904a56ea2..b4d0f30ea51f 100644 --- a/worlds/stardew_valley/test/stability/TestStability.py +++ b/worlds/stardew_valley/test/stability/TestStability.py @@ -7,13 +7,8 @@ from BaseClasses import get_seed from .. import SVTestCase -# There seems to be 4 bytes that appear at random at the end of the output, breaking the json... I don't know where they came from. -BYTES_TO_REMOVE = 4 - # at 0x102ca98a0> lambda_regex = re.compile(r"^ at (.*)>$") -# Python 3.10.2\r\n -python_version_regex = re.compile(r"^Python (\d+)\.(\d+)\.(\d+)\s*$") class TestGenerationIsStable(SVTestCase): @@ -29,8 +24,8 @@ def test_all_locations_and_items_are_the_same_between_two_generations(self): output_a = subprocess.check_output([sys.executable, '-m', 'worlds.stardew_valley.test.stability.StabilityOutputScript', '--seed', str(seed)]) output_b = subprocess.check_output([sys.executable, '-m', 'worlds.stardew_valley.test.stability.StabilityOutputScript', '--seed', str(seed)]) - result_a = json.loads(output_a[:-BYTES_TO_REMOVE]) - result_b = json.loads(output_b[:-BYTES_TO_REMOVE]) + result_a = json.loads(output_a) + result_b = json.loads(output_b) for i, ((room_a, bundles_a), (room_b, bundles_b)) in enumerate(zip(result_a["bundles"].items(), result_b["bundles"].items())): self.assertEqual(room_a, room_b, f"Bundle rooms at index {i} is different between both executions. Seed={seed}") diff --git a/worlds/subnautica/options.py b/worlds/subnautica/options.py index 4bdd9aafa53f..6cdcb33d8954 100644 --- a/worlds/subnautica/options.py +++ b/worlds/subnautica/options.py @@ -112,8 +112,7 @@ def get_pool(self) -> typing.List[str]: class SubnauticaDeathLink(DeathLink): - """When you die, everyone dies. Of course the reverse is true too. - Note: can be toggled via in-game console command "deathlink".""" + __doc__ = DeathLink.__doc__ + "\n\n Note: can be toggled via in-game console command \"deathlink\"." class FillerItemsDistribution(ItemDict): diff --git a/worlds/timespinner/Items.py b/worlds/timespinner/Items.py index 45c67c254736..3beead95153b 100644 --- a/worlds/timespinner/Items.py +++ b/worlds/timespinner/Items.py @@ -138,7 +138,7 @@ class ItemData(NamedTuple): 'Elevator Keycard': ItemData('Relic', 1337125, progression=True), 'Jewelry Box': ItemData('Relic', 1337126, useful=True), 'Goddess Brooch': ItemData('Relic', 1337127), - 'Wyrm Brooch': ItemData('Relic', 1337128), + 'Wyrm Brooch': ItemData('Relic', 1337128), 'Greed Brooch': ItemData('Relic', 1337129), 'Eternal Brooch': ItemData('Relic', 1337130), 'Blue Orb': ItemData('Orb Melee', 1337131), @@ -199,7 +199,11 @@ class ItemData(NamedTuple): 'Chaos Trap': ItemData('Trap', 1337186, 0, trap=True), 'Neurotoxin Trap': ItemData('Trap', 1337187, 0, trap=True), 'Bee Trap': ItemData('Trap', 1337188, 0, trap=True), - # 1337189 - 1337248 Reserved + 'Laser Access A': ItemData('Relic', 1337189, progression=True), + 'Laser Access I': ItemData('Relic', 1337191, progression=True), + 'Laser Access M': ItemData('Relic', 1337192, progression=True), + 'Throw Stun Trap': ItemData('Trap', 1337193, 0, trap=True), + # 1337194 - 1337248 Reserved 'Max Sand': ItemData('Stat', 1337249, 14) } diff --git a/worlds/timespinner/Locations.py b/worlds/timespinner/Locations.py index 2423e06bb010..93ac6ccb98c7 100644 --- a/worlds/timespinner/Locations.py +++ b/worlds/timespinner/Locations.py @@ -71,8 +71,8 @@ def get_location_datas(player: Optional[int], options: Optional[TimespinnerOptio LocationData('Skeleton Shaft', 'Sealed Caves (Xarion): Skeleton', 1337044), LocationData('Sealed Caves (Xarion)', 'Sealed Caves (Xarion): Shroom jump room', 1337045, logic.has_timestop), LocationData('Sealed Caves (Xarion)', 'Sealed Caves (Xarion): Double shroom room', 1337046), - LocationData('Sealed Caves (Xarion)', 'Sealed Caves (Xarion): Mini jackpot room', 1337047, logic.has_forwarddash_doublejump), - LocationData('Sealed Caves (Xarion)', 'Sealed Caves (Xarion): Below mini jackpot room', 1337048), + LocationData('Sealed Caves (Xarion)', 'Sealed Caves (Xarion): Jacksquat room', 1337047, logic.has_forwarddash_doublejump), + LocationData('Sealed Caves (Xarion)', 'Sealed Caves (Xarion): Below Jacksquat room', 1337048), LocationData('Sealed Caves (Xarion)', 'Sealed Caves (Xarion): Secret room', 1337049, logic.can_break_walls), LocationData('Sealed Caves (Xarion)', 'Sealed Caves (Xarion): Bottom left room', 1337050), LocationData('Sealed Caves (Xarion)', 'Sealed Caves (Xarion): Last chance before Xarion', 1337051, logic.has_doublejump), diff --git a/worlds/timespinner/LogicExtensions.py b/worlds/timespinner/LogicExtensions.py index 6c9cb3f684a0..2a0a358737f7 100644 --- a/worlds/timespinner/LogicExtensions.py +++ b/worlds/timespinner/LogicExtensions.py @@ -22,6 +22,7 @@ def __init__(self, player: int, options: Optional[TimespinnerOptions], self.flag_specific_keycards = bool(options and options.specific_keycards) self.flag_eye_spy = bool(options and options.eye_spy) self.flag_unchained_keys = bool(options and options.unchained_keys) + self.flag_prism_break = bool(options and options.prism_break) if precalculated_weights: if self.flag_unchained_keys: @@ -92,6 +93,8 @@ def can_break_walls(self, state: CollectionState) -> bool: return True def can_kill_all_3_bosses(self, state: CollectionState) -> bool: + if self.flag_prism_break: + return state.has_all({'Laser Access M', 'Laser Access I', 'Laser Access A'}, self.player) return state.has_all({'Killed Maw', 'Killed Twins', 'Killed Aelana'}, self.player) def has_teleport(self, state: CollectionState) -> bool: diff --git a/worlds/timespinner/Options.py b/worlds/timespinner/Options.py index 20ad8132c45f..72f2d8b35abf 100644 --- a/worlds/timespinner/Options.py +++ b/worlds/timespinner/Options.py @@ -180,12 +180,19 @@ class DamageRandoOverrides(OptionDict): } class HpCap(Range): - "Sets the number that Lunais's HP maxes out at." + """Sets the number that Lunais's HP maxes out at.""" display_name = "HP Cap" range_start = 1 range_end = 999 default = 999 +class AuraCap(Range): + """Sets the maximum Aura Lunais is allowed to have. Level 1 is 80. Djinn Inferno costs 45.""" + display_name = "Aura Cap" + range_start = 45 + range_end = 999 + default = 999 + class LevelCap(Range): """Sets the max level Lunais can achieve.""" display_name = "Level Cap" @@ -359,13 +366,18 @@ class TrapChance(Range): class Traps(OptionList): """List of traps that may be in the item pool to find""" display_name = "Traps Types" - valid_keys = { "Meteor Sparrow Trap", "Poison Trap", "Chaos Trap", "Neurotoxin Trap", "Bee Trap" } - default = [ "Meteor Sparrow Trap", "Poison Trap", "Chaos Trap", "Neurotoxin Trap", "Bee Trap" ] + valid_keys = { "Meteor Sparrow Trap", "Poison Trap", "Chaos Trap", "Neurotoxin Trap", "Bee Trap", "Throw Stun Trap" } + default = [ "Meteor Sparrow Trap", "Poison Trap", "Chaos Trap", "Neurotoxin Trap", "Bee Trap", "Throw Stun Trap" ] class PresentAccessWithWheelAndSpindle(Toggle): """When inverted, allows using the refugee camp warp when both the Timespinner Wheel and Spindle is acquired.""" display_name = "Back to the future" +class PrismBreak(Toggle): + """Adds 3 Laser Access items to the item pool to remove the lasers blocking the military hangar area + instead of needing to beat the Golden Idol, Aelana, and The Maw.""" + display_name = "Prism Break" + @dataclass class TimespinnerOptions(PerGameCommonOptions, DeathLinkMixin): start_with_jewelry_box: StartWithJewelryBox @@ -379,9 +391,11 @@ class TimespinnerOptions(PerGameCommonOptions, DeathLinkMixin): cantoran: Cantoran lore_checks: LoreChecks boss_rando: BossRando + enemy_rando: EnemyRando damage_rando: DamageRando damage_rando_overrides: DamageRandoOverrides hp_cap: HpCap + aura_cap: AuraCap level_cap: LevelCap extra_earrings_xp: ExtraEarringsXP boss_healing: BossHealing @@ -400,6 +414,7 @@ class TimespinnerOptions(PerGameCommonOptions, DeathLinkMixin): rising_tides_overrides: RisingTidesOverrides unchained_keys: UnchainedKeys back_to_the_future: PresentAccessWithWheelAndSpindle + prism_break: PrismBreak trap_chance: TrapChance traps: Traps @@ -417,13 +432,16 @@ class HiddenTraps(Traps): """List of traps that may be in the item pool to find""" visibility = Visibility.none -class OptionsHider: - @classmethod - def hidden(cls, option: Type[Option[Any]]) -> Type[Option]: - new_option = AssembleOptions(f"{option}Hidden", option.__bases__, vars(option).copy()) - new_option.visibility = Visibility.none - new_option.__doc__ = option.__doc__ - return new_option +class HiddenDeathLink(DeathLink): + """When you die, everyone who enabled death link dies. Of course, the reverse is true too.""" + visibility = Visibility.none + +def hidden(option: Type[Option[Any]]) -> Type[Option]: + new_option = AssembleOptions(f"{option.__name__}Hidden", option.__bases__, vars(option).copy()) + new_option.visibility = Visibility.none + new_option.__doc__ = option.__doc__ + globals()[f"{option.__name__}Hidden"] = new_option + return new_option class HasReplacedCamelCase(Toggle): """For internal use will display a warning message if true""" @@ -431,41 +449,42 @@ class HasReplacedCamelCase(Toggle): @dataclass class BackwardsCompatiableTimespinnerOptions(TimespinnerOptions): - StartWithJewelryBox: OptionsHider.hidden(StartWithJewelryBox) # type: ignore - DownloadableItems: OptionsHider.hidden(DownloadableItems) # type: ignore - EyeSpy: OptionsHider.hidden(EyeSpy) # type: ignore - StartWithMeyef: OptionsHider.hidden(StartWithMeyef) # type: ignore - QuickSeed: OptionsHider.hidden(QuickSeed) # type: ignore - SpecificKeycards: OptionsHider.hidden(SpecificKeycards) # type: ignore - Inverted: OptionsHider.hidden(Inverted) # type: ignore - GyreArchives: OptionsHider.hidden(GyreArchives) # type: ignore - Cantoran: OptionsHider.hidden(Cantoran) # type: ignore - LoreChecks: OptionsHider.hidden(LoreChecks) # type: ignore - BossRando: OptionsHider.hidden(BossRando) # type: ignore - DamageRando: OptionsHider.hidden(DamageRando) # type: ignore + StartWithJewelryBox: hidden(StartWithJewelryBox) # type: ignore + DownloadableItems: hidden(DownloadableItems) # type: ignore + EyeSpy: hidden(EyeSpy) # type: ignore + StartWithMeyef: hidden(StartWithMeyef) # type: ignore + QuickSeed: hidden(QuickSeed) # type: ignore + SpecificKeycards: hidden(SpecificKeycards) # type: ignore + Inverted: hidden(Inverted) # type: ignore + GyreArchives: hidden(GyreArchives) # type: ignore + Cantoran: hidden(Cantoran) # type: ignore + LoreChecks: hidden(LoreChecks) # type: ignore + BossRando: hidden(BossRando) # type: ignore + EnemyRando: hidden(EnemyRando) # type: ignore + DamageRando: hidden(DamageRando) # type: ignore DamageRandoOverrides: HiddenDamageRandoOverrides - HpCap: OptionsHider.hidden(HpCap) # type: ignore - LevelCap: OptionsHider.hidden(LevelCap) # type: ignore - ExtraEarringsXP: OptionsHider.hidden(ExtraEarringsXP) # type: ignore - BossHealing: OptionsHider.hidden(BossHealing) # type: ignore - ShopFill: OptionsHider.hidden(ShopFill) # type: ignore - ShopWarpShards: OptionsHider.hidden(ShopWarpShards) # type: ignore - ShopMultiplier: OptionsHider.hidden(ShopMultiplier) # type: ignore - LootPool: OptionsHider.hidden(LootPool) # type: ignore - DropRateCategory: OptionsHider.hidden(DropRateCategory) # type: ignore - FixedDropRate: OptionsHider.hidden(FixedDropRate) # type: ignore - LootTierDistro: OptionsHider.hidden(LootTierDistro) # type: ignore - ShowBestiary: OptionsHider.hidden(ShowBestiary) # type: ignore - ShowDrops: OptionsHider.hidden(ShowDrops) # type: ignore - EnterSandman: OptionsHider.hidden(EnterSandman) # type: ignore - DadPercent: OptionsHider.hidden(DadPercent) # type: ignore - RisingTides: OptionsHider.hidden(RisingTides) # type: ignore + HpCap: hidden(HpCap) # type: ignore + LevelCap: hidden(LevelCap) # type: ignore + ExtraEarringsXP: hidden(ExtraEarringsXP) # type: ignore + BossHealing: hidden(BossHealing) # type: ignore + ShopFill: hidden(ShopFill) # type: ignore + ShopWarpShards: hidden(ShopWarpShards) # type: ignore + ShopMultiplier: hidden(ShopMultiplier) # type: ignore + LootPool: hidden(LootPool) # type: ignore + DropRateCategory: hidden(DropRateCategory) # type: ignore + FixedDropRate: hidden(FixedDropRate) # type: ignore + LootTierDistro: hidden(LootTierDistro) # type: ignore + ShowBestiary: hidden(ShowBestiary) # type: ignore + ShowDrops: hidden(ShowDrops) # type: ignore + EnterSandman: hidden(EnterSandman) # type: ignore + DadPercent: hidden(DadPercent) # type: ignore + RisingTides: hidden(RisingTides) # type: ignore RisingTidesOverrides: HiddenRisingTidesOverrides - UnchainedKeys: OptionsHider.hidden(UnchainedKeys) # type: ignore - PresentAccessWithWheelAndSpindle: OptionsHider.hidden(PresentAccessWithWheelAndSpindle) # type: ignore - TrapChance: OptionsHider.hidden(TrapChance) # type: ignore + UnchainedKeys: hidden(UnchainedKeys) # type: ignore + PresentAccessWithWheelAndSpindle: hidden(PresentAccessWithWheelAndSpindle) # type: ignore + TrapChance: hidden(TrapChance) # type: ignore Traps: HiddenTraps # type: ignore - DeathLink: OptionsHider.hidden(DeathLink) # type: ignore + DeathLink: HiddenDeathLink # type: ignore has_replaced_options: HasReplacedCamelCase def handle_backward_compatibility(self) -> None: @@ -513,6 +532,10 @@ def handle_backward_compatibility(self) -> None: self.boss_rando == BossRando.default: self.boss_rando.value = self.BossRando.value self.has_replaced_options.value = Toggle.option_true + if self.EnemyRando != EnemyRando.default and \ + self.enemy_rando == EnemyRando.default: + self.enemy_rando.value = self.EnemyRando.value + self.has_replaced_options.value = Toggle.option_true if self.DamageRando != DamageRando.default and \ self.damage_rando == DamageRando.default: self.damage_rando.value = self.DamageRando.value diff --git a/worlds/timespinner/__init__.py b/worlds/timespinner/__init__.py index 66744cffdf85..ca31d08326b5 100644 --- a/worlds/timespinner/__init__.py +++ b/worlds/timespinner/__init__.py @@ -1,4 +1,4 @@ -from typing import Dict, List, Set, Tuple, TextIO +from typing import Dict, List, Set, Tuple, TextIO, Any, Optional from BaseClasses import Item, Tutorial, ItemClassification from .Items import get_item_names_per_category from .Items import item_table, starter_melee_weapons, starter_spells, filler_items, starter_progression_items @@ -55,13 +55,18 @@ def generate_early(self) -> None: self.precalculated_weights = PreCalculatedWeights(self.options, self.random) # in generate_early the start_inventory isnt copied over to precollected_items yet, so we can still modify the options directly - if self.options.start_inventory.value.pop('Meyef', 0) > 0: + if self.options.start_inventory.value.pop("Meyef", 0) > 0: self.options.start_with_meyef.value = Toggle.option_true - if self.options.start_inventory.value.pop('Talaria Attachment', 0) > 0: + if self.options.start_inventory.value.pop("Talaria Attachment", 0) > 0: self.options.quick_seed.value = Toggle.option_true - if self.options.start_inventory.value.pop('Jewelry Box', 0) > 0: + if self.options.start_inventory.value.pop("Jewelry Box", 0) > 0: self.options.start_with_jewelry_box.value = Toggle.option_true + self.interpret_slot_data(None) + + if self.options.quick_seed: + self.multiworld.push_precollected(self.create_item("Talaria Attachment")) + def create_regions(self) -> None: create_regions_and_locations(self.multiworld, self.player, self.options, self.precalculated_weights) @@ -98,9 +103,11 @@ def fill_slot_data(self) -> Dict[str, object]: "Cantoran": self.options.cantoran.value, "LoreChecks": self.options.lore_checks.value, "BossRando": self.options.boss_rando.value, + "EnemyRando": self.options.enemy_rando.value, "DamageRando": self.options.damage_rando.value, "DamageRandoOverrides": self.options.damage_rando_overrides.value, "HpCap": self.options.hp_cap.value, + "AuraCap": self.options.aura_cap.value, "LevelCap": self.options.level_cap.value, "ExtraEarringsXP": self.options.extra_earrings_xp.value, "BossHealing": self.options.boss_healing.value, @@ -118,6 +125,7 @@ def fill_slot_data(self) -> Dict[str, object]: "RisingTides": self.options.rising_tides.value, "UnchainedKeys": self.options.unchained_keys.value, "PresentAccessWithWheelAndSpindle": self.options.back_to_the_future.value, + "PrismBreak": self.options.prism_break.value, "Traps": self.options.traps.value, "DeathLink": self.options.death_link.value, "StinkyMaw": True, @@ -141,6 +149,76 @@ def fill_slot_data(self) -> Dict[str, object]: "LakeSereneBridge": self.precalculated_weights.flood_lake_serene_bridge, "Lab": self.precalculated_weights.flood_lab } + + def interpret_slot_data(self, slot_data: Optional[Dict[str, Any]]) -> Optional[Dict[str, Any]]: + """Used by Universal Tracker to correctly rebuild state""" + + if not slot_data \ + and hasattr(self.multiworld, "re_gen_passthrough") \ + and isinstance(self.multiworld.re_gen_passthrough, dict) \ + and "Timespinner" in self.multiworld.re_gen_passthrough: + slot_data = self.multiworld.re_gen_passthrough["Timespinner"] + + if not slot_data: + return None + + self.options.start_with_jewelry_box.value = slot_data["StartWithJewelryBox"] + self.options.downloadable_items.value = slot_data["DownloadableItems"] + self.options.eye_spy.value = slot_data["EyeSpy"] + self.options.start_with_meyef.value = slot_data["StartWithMeyef"] + self.options.quick_seed.value = slot_data["QuickSeed"] + self.options.specific_keycards.value = slot_data["SpecificKeycards"] + self.options.inverted.value = slot_data["Inverted"] + self.options.gyre_archives.value = slot_data["GyreArchives"] + self.options.cantoran.value = slot_data["Cantoran"] + self.options.lore_checks.value = slot_data["LoreChecks"] + self.options.boss_rando.value = slot_data["BossRando"] + self.options.damage_rando.value = slot_data["DamageRando"] + self.options.damage_rando_overrides.value = slot_data["DamageRandoOverrides"] + self.options.hp_cap.value = slot_data["HpCap"] + self.options.level_cap.value = slot_data["LevelCap"] + self.options.extra_earrings_xp.value = slot_data["ExtraEarringsXP"] + self.options.boss_healing.value = slot_data["BossHealing"] + self.options.shop_fill.value = slot_data["ShopFill"] + self.options.shop_warp_shards.value = slot_data["ShopWarpShards"] + self.options.shop_multiplier.value = slot_data["ShopMultiplier"] + self.options.loot_pool.value = slot_data["LootPool"] + self.options.drop_rate_category.value = slot_data["DropRateCategory"] + self.options.fixed_drop_rate.value = slot_data["FixedDropRate"] + self.options.loot_tier_distro.value = slot_data["LootTierDistro"] + self.options.show_bestiary.value = slot_data["ShowBestiary"] + self.options.show_drops.value = slot_data["ShowDrops"] + self.options.enter_sandman.value = slot_data["EnterSandman"] + self.options.dad_percent.value = slot_data["DadPercent"] + self.options.rising_tides.value = slot_data["RisingTides"] + self.options.unchained_keys.value = slot_data["UnchainedKeys"] + self.options.back_to_the_future.value = slot_data["PresentAccessWithWheelAndSpindle"] + self.options.traps.value = slot_data["Traps"] + self.options.death_link.value = slot_data["DeathLink"] + # Readonly slot_data["StinkyMaw"] + # data + # Readonly slot_data["PersonalItems"] + self.precalculated_weights.pyramid_keys_unlock = slot_data["PyramidKeysGate"] + self.precalculated_weights.present_key_unlock = slot_data["PresentGate"] + self.precalculated_weights.past_key_unlock = slot_data["PastGate"] + self.precalculated_weights.time_key_unlock = slot_data["TimeGate"] + # rising tides + if (slot_data["Basement"] > 1): + self.precalculated_weights.flood_basement = True + if (slot_data["Basement"] == 2): + self.precalculated_weights.flood_basement_high = True + self.precalculated_weights.flood_xarion = slot_data["Xarion"] + self.precalculated_weights.flood_maw = slot_data["Maw"] + self.precalculated_weights.flood_pyramid_shaft = slot_data["PyramidShaft"] + self.precalculated_weights.flood_pyramid_back = slot_data["BackPyramid"] + self.precalculated_weights.flood_moat = slot_data["CastleMoat"] + self.precalculated_weights.flood_courtyard = slot_data["CastleCourtyard"] + self.precalculated_weights.flood_lake_desolation = slot_data["LakeDesolation"] + self.precalculated_weights.flood_lake_serene = not slot_data["DryLakeSerene"] + self.precalculated_weights.flood_lake_serene_bridge = slot_data["LakeSereneBridge"] + self.precalculated_weights.flood_lab = slot_data["Lab"] + + return slot_data def write_spoiler_header(self, spoiler_handle: TextIO) -> None: if self.options.unchained_keys: @@ -190,7 +268,7 @@ def write_spoiler_header(self, spoiler_handle: TextIO) -> None: if self.options.has_replaced_options: warning = \ - f"NOTICE: Timespinner options for player '{self.player_name}' where renamed from PasCalCase to snake_case, " \ + f"NOTICE: Timespinner options for player '{self.player_name}' were renamed from PascalCase to snake_case, " \ "please update your yaml" spoiler_handle.write("\n") @@ -223,6 +301,9 @@ def create_item(self, name: str) -> Item: elif name in {"Timeworn Warp Beacon", "Modern Warp Beacon", "Mysterious Warp Beacon"} \ and not self.options.unchained_keys: item.classification = ItemClassification.filler + elif name in {"Laser Access A", "Laser Access I", "Laser Access M"} \ + and not self.options.prism_break: + item.classification = ItemClassification.filler return item @@ -255,6 +336,11 @@ def get_excluded_items(self) -> Set[str]: excluded_items.add('Modern Warp Beacon') excluded_items.add('Mysterious Warp Beacon') + if not self.options.prism_break: + excluded_items.add('Laser Access A') + excluded_items.add('Laser Access I') + excluded_items.add('Laser Access M') + for item in self.multiworld.precollected_items[self.player]: if item.name not in self.item_name_groups['UseItem']: excluded_items.add(item.name) diff --git a/worlds/tloz/Locations.py b/worlds/tloz/Locations.py index 9715cc684291..f95e5d80443e 100644 --- a/worlds/tloz/Locations.py +++ b/worlds/tloz/Locations.py @@ -108,11 +108,15 @@ ] food_locations = [ - "Level 7 Map", "Level 7 Boss", "Level 7 Triforce", "Level 7 Key Drop (Goriyas)", + "Level 7 Item (Red Candle)", "Level 7 Map", "Level 7 Boss", "Level 7 Triforce", "Level 7 Key Drop (Goriyas)", "Level 7 Bomb Drop (Moldorms North)", "Level 7 Bomb Drop (Goriyas North)", "Level 7 Bomb Drop (Dodongos)", "Level 7 Rupee Drop (Goriyas North)" ] +gohma_locations = [ + "Level 6 Boss", "Level 6 Triforce", "Level 8 Item (Magical Key)", "Level 8 Bomb Drop (Darknuts North)" +] + gleeok_locations = [ "Level 4 Boss", "Level 4 Triforce", "Level 8 Boss", "Level 8 Triforce" ] diff --git a/worlds/tloz/Rules.py b/worlds/tloz/Rules.py index 39c3b954f0d4..de627a533bd3 100644 --- a/worlds/tloz/Rules.py +++ b/worlds/tloz/Rules.py @@ -1,7 +1,7 @@ from typing import TYPE_CHECKING from worlds.generic.Rules import add_rule -from .Locations import food_locations, shop_locations, gleeok_locations +from .Locations import food_locations, shop_locations, gleeok_locations, gohma_locations from .ItemPool import dangerous_weapon_locations from .Options import StartingPosition @@ -10,13 +10,12 @@ def set_rules(tloz_world: "TLoZWorld"): player = tloz_world.player - world = tloz_world.multiworld options = tloz_world.options # Boss events for a nicer spoiler log play through for level in range(1, 9): - boss = world.get_location(f"Level {level} Boss", player) - boss_event = world.get_location(f"Level {level} Boss Status", player) + boss = tloz_world.get_location(f"Level {level} Boss") + boss_event = tloz_world.get_location(f"Level {level} Boss Status") status = tloz_world.create_event(f"Boss {level} Defeated") boss_event.place_locked_item(status) add_rule(boss_event, lambda state, b=boss: state.can_reach(b, "Location", player)) @@ -26,136 +25,131 @@ def set_rules(tloz_world: "TLoZWorld"): for location in level.locations: if options.StartingPosition < StartingPosition.option_dangerous \ or location.name not in dangerous_weapon_locations: - add_rule(world.get_location(location.name, player), + add_rule(tloz_world.get_location(location.name), lambda state: state.has_group("weapons", player)) # This part of the loop sets up an expected amount of defense needed for each dungeon if i > 0: # Don't need an extra heart for Level 1 - add_rule(world.get_location(location.name, player), + add_rule(tloz_world.get_location(location.name), lambda state, hearts=i: state.has("Heart Container", player, hearts) or (state.has("Blue Ring", player) and state.has("Heart Container", player, int(hearts / 2))) or (state.has("Red Ring", player) and state.has("Heart Container", player, int(hearts / 4)))) if "Pols Voice" in location.name: # This enemy needs specific weapons - add_rule(world.get_location(location.name, player), - lambda state: state.has_group("swords", player) or state.has("Bow", player)) + add_rule(tloz_world.get_location(location.name), + lambda state: state.has_group("swords", player) or + (state.has("Bow", player) and state.has_group("arrows", player))) # No requiring anything in a shop until we can farm for money for location in shop_locations: - add_rule(world.get_location(location, player), + add_rule(tloz_world.get_location(location), lambda state: state.has_group("weapons", player)) # Everything from 4 on up has dark rooms for level in tloz_world.levels[4:]: for location in level.locations: - add_rule(world.get_location(location.name, player), + add_rule(tloz_world.get_location(location.name), lambda state: state.has_group("candles", player) or (state.has("Magical Rod", player) and state.has("Book of Magic", player))) # Everything from 5 on up has gaps for level in tloz_world.levels[5:]: for location in level.locations: - add_rule(world.get_location(location.name, player), + add_rule(tloz_world.get_location(location.name), lambda state: state.has("Stepladder", player)) - add_rule(world.get_location("Level 5 Boss", player), - lambda state: state.has("Recorder", player)) - - add_rule(world.get_location("Level 6 Boss", player), - lambda state: state.has("Bow", player) and state.has_group("arrows", player)) + # Level 4 Access + for location in tloz_world.levels[4].locations: + add_rule(tloz_world.get_location(location.name), + lambda state: state.has_any(("Raft", "Recorder"), player)) - add_rule(world.get_location("Level 7 Item (Red Candle)", player), + # Digdogger boss. Rework this once ER happens + add_rule(tloz_world.get_location("Level 5 Boss"), lambda state: state.has("Recorder", player)) - add_rule(world.get_location("Level 7 Boss", player), + add_rule(tloz_world.get_location("Level 5 Triforce"), lambda state: state.has("Recorder", player)) - if options.ExpandedPool: - add_rule(world.get_location("Level 7 Key Drop (Stalfos)", player), - lambda state: state.has("Recorder", player)) - add_rule(world.get_location("Level 7 Bomb Drop (Digdogger)", player), - lambda state: state.has("Recorder", player)) - add_rule(world.get_location("Level 7 Rupee Drop (Dodongos)", player), + + for location in gohma_locations: + if options.ExpandedPool or "Drop" not in location: + add_rule(tloz_world.get_location(location), + lambda state: state.has("Bow", player) and state.has_group("arrows", player)) + + # Recorder Access for Level 7 + for location in tloz_world.levels[7].locations: + add_rule(tloz_world.get_location(location.name), lambda state: state.has("Recorder", player)) for location in food_locations: if options.ExpandedPool or "Drop" not in location: - add_rule(world.get_location(location, player), + add_rule(tloz_world.get_location(location), lambda state: state.has("Food", player)) for location in gleeok_locations: - add_rule(world.get_location(location, player), + add_rule(tloz_world.get_location(location), lambda state: state.has_group("swords", player) or state.has("Magical Rod", player)) # Candle access for Level 8 for location in tloz_world.levels[8].locations: - add_rule(world.get_location(location.name, player), + add_rule(tloz_world.get_location(location.name), lambda state: state.has_group("candles", player)) - add_rule(world.get_location("Level 8 Item (Magical Key)", player), + add_rule(tloz_world.get_location("Level 8 Item (Magical Key)"), lambda state: state.has("Bow", player) and state.has_group("arrows", player)) if options.ExpandedPool: - add_rule(world.get_location("Level 8 Bomb Drop (Darknuts North)", player), + add_rule(tloz_world.get_location("Level 8 Bomb Drop (Darknuts North)"), lambda state: state.has("Bow", player) and state.has_group("arrows", player)) for location in tloz_world.levels[9].locations: - add_rule(world.get_location(location.name, player), + add_rule(tloz_world.get_location(location.name), lambda state: state.has("Triforce Fragment", player, 8) and state.has_group("swords", player)) # Yes we are looping this range again for Triforce locations. No I can't add it to the boss event loop for level in range(1, 9): - add_rule(world.get_location(f"Level {level} Triforce", player), + add_rule(tloz_world.get_location(f"Level {level} Triforce"), lambda state, l=level: state.has(f"Boss {l} Defeated", player)) # Sword, raft, and ladder spots - add_rule(world.get_location("White Sword Pond", player), + add_rule(tloz_world.get_location("White Sword Pond"), lambda state: state.has("Heart Container", player, 2)) - add_rule(world.get_location("Magical Sword Grave", player), + add_rule(tloz_world.get_location("Magical Sword Grave"), lambda state: state.has("Heart Container", player, 9)) stepladder_locations = ["Ocean Heart Container", "Level 4 Triforce", "Level 4 Boss", "Level 4 Map"] stepladder_locations_expanded = ["Level 4 Key Drop (Keese North)"] for location in stepladder_locations: - add_rule(world.get_location(location, player), + add_rule(tloz_world.get_location(location), lambda state: state.has("Stepladder", player)) if options.ExpandedPool: for location in stepladder_locations_expanded: - add_rule(world.get_location(location, player), + add_rule(tloz_world.get_location(location), lambda state: state.has("Stepladder", player)) # Don't allow Take Any Items until we can actually get in one if options.ExpandedPool: - add_rule(world.get_location("Take Any Item Left", player), + add_rule(tloz_world.get_location("Take Any Item Left"), lambda state: state.has_group("candles", player) or state.has("Raft", player)) - add_rule(world.get_location("Take Any Item Middle", player), + add_rule(tloz_world.get_location("Take Any Item Middle"), lambda state: state.has_group("candles", player) or state.has("Raft", player)) - add_rule(world.get_location("Take Any Item Right", player), + add_rule(tloz_world.get_location("Take Any Item Right"), lambda state: state.has_group("candles", player) or state.has("Raft", player)) - for location in tloz_world.levels[4].locations: - add_rule(world.get_location(location.name, player), - lambda state: state.has("Raft", player) or state.has("Recorder", player)) - for location in tloz_world.levels[7].locations: - add_rule(world.get_location(location.name, player), - lambda state: state.has("Recorder", player)) - for location in tloz_world.levels[8].locations: - add_rule(world.get_location(location.name, player), - lambda state: state.has("Bow", player)) - add_rule(world.get_location("Potion Shop Item Left", player), + add_rule(tloz_world.get_location("Potion Shop Item Left"), lambda state: state.has("Letter", player)) - add_rule(world.get_location("Potion Shop Item Middle", player), + add_rule(tloz_world.get_location("Potion Shop Item Middle"), lambda state: state.has("Letter", player)) - add_rule(world.get_location("Potion Shop Item Right", player), + add_rule(tloz_world.get_location("Potion Shop Item Right"), lambda state: state.has("Letter", player)) - add_rule(world.get_location("Shield Shop Item Left", player), + add_rule(tloz_world.get_location("Shield Shop Item Left"), lambda state: state.has_group("candles", player) or state.has("Bomb", player)) - add_rule(world.get_location("Shield Shop Item Middle", player), + add_rule(tloz_world.get_location("Shield Shop Item Middle"), lambda state: state.has_group("candles", player) or state.has("Bomb", player)) - add_rule(world.get_location("Shield Shop Item Right", player), + add_rule(tloz_world.get_location("Shield Shop Item Right"), lambda state: state.has_group("candles", player) or - state.has("Bomb", player)) \ No newline at end of file + state.has("Bomb", player)) diff --git a/worlds/tunic/__init__.py b/worlds/tunic/__init__.py index cdd968acce44..d1430aac1895 100644 --- a/worlds/tunic/__init__.py +++ b/worlds/tunic/__init__.py @@ -83,6 +83,11 @@ class TunicWorld(World): shop_num: int = 1 # need to make it so that you can walk out of shops, but also that they aren't all connected er_regions: Dict[str, RegionInfo] # absolutely needed so outlet regions work + # so we only loop the multiworld locations once + # if these are locations instead of their info, it gives a memory leak error + item_link_locations: Dict[int, Dict[str, List[Tuple[int, str]]]] = {} + player_item_link_locations: Dict[str, List[Location]] + def generate_early(self) -> None: if self.options.logic_rules >= LogicRules.option_no_major_glitches: self.options.laurels_zips.value = LaurelsZips.option_true @@ -274,6 +279,12 @@ def remove_filler(amount: int) -> None: if items_to_create[page] > 0: tunic_items.append(self.create_item(page, ItemClassification.useful)) items_to_create[page] = 0 + # if ice grapple logic is on, probably really want icebolt + elif self.options.ice_grappling: + page = "Pages 52-53 (Icebolt)" + if items_to_create[page] > 0: + tunic_items.append(self.create_item(page, ItemClassification.progression | ItemClassification.useful)) + items_to_create[page] = 0 if self.options.maskless: tunic_items.append(self.create_item("Scavenger Mask", ItemClassification.useful)) @@ -381,6 +392,18 @@ def extend_hint_information(self, hint_data: Dict[int, Dict[int, str]]) -> None: if hint_text: hint_data[self.player][location.address] = hint_text + def get_real_location(self, location: Location) -> Tuple[str, int]: + # if it's not in a group, it's not in an item link + if location.player not in self.multiworld.groups or not location.item: + return location.name, location.player + try: + loc = self.player_item_link_locations[location.item.name].pop() + return loc.name, loc.player + except IndexError: + warning(f"TUNIC: Failed to parse item location for in-game hints for {self.player_name}. " + f"Using a potentially incorrect location name instead.") + return location.name, location.player + def fill_slot_data(self) -> Dict[str, Any]: slot_data: Dict[str, Any] = { "seed": self.random.randint(0, 2147483647), @@ -406,12 +429,35 @@ def fill_slot_data(self) -> Dict[str, Any]: "disable_local_spoiler": int(self.settings.disable_local_spoiler or self.multiworld.is_race), } + # this would be in a stage if there was an appropriate stage for it + self.player_item_link_locations = {} + groups = self.multiworld.get_player_groups(self.player) + # checking if groups so that this doesn't run if the player isn't in a group + if groups: + if not self.item_link_locations: + tunic_worlds: Tuple[TunicWorld] = self.multiworld.get_game_worlds("TUNIC") + # figure out our groups and the items in them + for tunic in tunic_worlds: + for group in self.multiworld.get_player_groups(tunic.player): + self.item_link_locations.setdefault(group, {}) + for location in self.multiworld.get_locations(): + if location.item and location.item.player in self.item_link_locations.keys(): + (self.item_link_locations[location.item.player].setdefault(location.item.name, []) + .append((location.player, location.name))) + + # if item links are on, set up the player's personal item link locations, so we can pop them as needed + for group, item_links in self.item_link_locations.items(): + if group in groups: + for item_name, locs in item_links.items(): + self.player_item_link_locations[item_name] = \ + [self.multiworld.get_location(location_name, player) for player, location_name in locs] + for tunic_item in filter(lambda item: item.location is not None and item.code is not None, self.slot_data_items): if tunic_item.name not in slot_data: slot_data[tunic_item.name] = [] if tunic_item.name == gold_hexagon and len(slot_data[gold_hexagon]) >= 6: continue - slot_data[tunic_item.name].extend([tunic_item.location.name, tunic_item.location.player]) + slot_data[tunic_item.name].extend(self.get_real_location(tunic_item.location)) for start_item in self.options.start_inventory_from_pool: if start_item in slot_data_item_names: @@ -430,7 +476,7 @@ def fill_slot_data(self) -> Dict[str, Any]: if item in slot_data_item_names: slot_data[item] = [] for item_location in self.multiworld.find_item_locations(item, self.player): - slot_data[item].extend([item_location.name, item_location.player]) + slot_data[item].extend(self.get_real_location(item_location)) return slot_data diff --git a/worlds/tunic/docs/en_TUNIC.md b/worlds/tunic/docs/en_TUNIC.md index b2e1a71897c0..ab751d8e669d 100644 --- a/worlds/tunic/docs/en_TUNIC.md +++ b/worlds/tunic/docs/en_TUNIC.md @@ -56,6 +56,7 @@ In general: - Bushes are not considered in logic. It is assumed that the player will find a way past them, whether it is with a sword, a bomb, fire, luring an enemy, etc. There is also an option in the in-game randomizer settings menu to clear some of the early bushes. - The Cathedral is accessible during the day by using the Hero's Laurels to reach the Overworld fuse near the Swamp entrance. - The Secret Legend chest at the Cathedral can be obtained during the day by opening the Holy Cross door from the outside. +- For the Ice Grappling, Ladder Storage, and Laurels Zips options, there is [this document](https://docs.google.com/document/d/1SFZBfsqZWH1_EAV9zyZobvrBcvCd3_54JP3iVnJ8rUg/edit?usp=sharing) that shows the individual applications of these tricks in logic. For the Entrance Randomizer: - Activating a fuse to turn on a yellow teleporter pad also activates its counterpart in the Far Shore. diff --git a/worlds/tunic/er_data.py b/worlds/tunic/er_data.py index 343bf3055378..1269f3b85e45 100644 --- a/worlds/tunic/er_data.py +++ b/worlds/tunic/er_data.py @@ -807,7 +807,7 @@ class DeadEnd(IntEnum): [], # drop a rudeling, icebolt or ice bomb "Overworld to West Garden from Furnace": - [["IG3"]], + [["IG3"], ["LS1"]], }, "East Overworld": { "Above Ruined Passage": diff --git a/worlds/tunic/er_rules.py b/worlds/tunic/er_rules.py index bd2498a56a35..d5d6f16c57ec 100644 --- a/worlds/tunic/er_rules.py +++ b/worlds/tunic/er_rules.py @@ -344,9 +344,10 @@ def set_er_region_rules(world: "TunicWorld", regions: Dict[str, Region], portal_ connecting_region=regions["Overworld"], rule=lambda state: state.has_any({grapple, laurels}, player)) - regions["Overworld"].connect( + cube_entrance = regions["Overworld"].connect( connecting_region=regions["Cube Cave Entrance Region"], rule=lambda state: state.has(gun, player) or can_shop(state, world)) + world.multiworld.register_indirect_condition(regions["Shop"], cube_entrance) regions["Cube Cave Entrance Region"].connect( connecting_region=regions["Overworld"]) @@ -500,9 +501,11 @@ def set_er_region_rules(world: "TunicWorld", regions: Dict[str, Region], portal_ regions["Dark Tomb Upper"].connect( connecting_region=regions["Dark Tomb Entry Point"]) + # ice grapple through the wall, get the little secret sound to trigger regions["Dark Tomb Upper"].connect( connecting_region=regions["Dark Tomb Main"], - rule=lambda state: has_ladder("Ladder in Dark Tomb", state, world)) + rule=lambda state: has_ladder("Ladder in Dark Tomb", state, world) + or has_ice_grapple_logic(False, IceGrappling.option_hard, state, world)) regions["Dark Tomb Main"].connect( connecting_region=regions["Dark Tomb Upper"], rule=lambda state: has_ladder("Ladder in Dark Tomb", state, world)) @@ -778,12 +781,10 @@ def set_er_region_rules(world: "TunicWorld", regions: Dict[str, Region], portal_ regions["Fortress East Shortcut Upper"].connect( connecting_region=regions["Fortress East Shortcut Lower"]) - # nmg: can ice grapple upwards regions["Fortress East Shortcut Lower"].connect( connecting_region=regions["Fortress East Shortcut Upper"], rule=lambda state: has_ice_grapple_logic(True, IceGrappling.option_easy, state, world)) - # nmg: ice grapple through the big gold door, can do it both ways regions["Eastern Vault Fortress"].connect( connecting_region=regions["Eastern Vault Fortress Gold Door"], rule=lambda state: state.has_all({"Activate Eastern Vault West Fuses", @@ -806,7 +807,6 @@ def set_er_region_rules(world: "TunicWorld", regions: Dict[str, Region], portal_ regions["Fortress Hero's Grave Region"].connect( connecting_region=regions["Fortress Grave Path"]) - # nmg: ice grapple from upper grave path to lower regions["Fortress Grave Path Upper"].connect( connecting_region=regions["Fortress Grave Path"], rule=lambda state: has_ice_grapple_logic(True, IceGrappling.option_easy, state, world)) @@ -1138,6 +1138,9 @@ def ls_connect(origin_name: str, portal_sdt: str) -> None: for portal_dest in region_info.portals: ls_connect(ladder_region, "Overworld Redux, " + portal_dest) + # convenient staircase means this one is easy difficulty, even though there's an elevation change + ls_connect("LS Elev 0", "Overworld Redux, Furnace_gyro_west") + # connect ls elevation regions to regions where you can get an enemy to knock you down, also well rail if options.ladder_storage >= LadderStorage.option_medium: for ladder_region, region_info in ow_ladder_groups.items(): @@ -1153,6 +1156,7 @@ def ls_connect(origin_name: str, portal_sdt: str) -> None: if options.ladder_storage >= LadderStorage.option_hard: ls_connect("LS Elev 1", "Overworld Redux, EastFiligreeCache_") ls_connect("LS Elev 2", "Overworld Redux, Town_FiligreeRoom_") + ls_connect("LS Elev 2", "Overworld Redux, Ruins Passage_west") ls_connect("LS Elev 3", "Overworld Redux, Overworld Interiors_house") ls_connect("LS Elev 5", "Overworld Redux, Temple_main") @@ -1442,7 +1446,7 @@ def set_er_location_rules(world: "TunicWorld") -> None: set_rule(world.get_location("West Garden Fuse"), lambda state: has_ability(prayer, state, world)) set_rule(world.get_location("Library Fuse"), - lambda state: has_ability(prayer, state, world)) + lambda state: has_ability(prayer, state, world) and has_ladder("Ladders in Library", state, world)) # Bombable Walls for location_name in bomb_walls: diff --git a/worlds/tunic/items.py b/worlds/tunic/items.py index 55aa3468fc6b..b6ce5d8995a8 100644 --- a/worlds/tunic/items.py +++ b/worlds/tunic/items.py @@ -1,10 +1,10 @@ from itertools import groupby from typing import Dict, List, Set, NamedTuple -from BaseClasses import ItemClassification +from BaseClasses import ItemClassification as IC class TunicItemData(NamedTuple): - classification: ItemClassification + classification: IC quantity_in_item_pool: int item_id_offset: int item_group: str = "" @@ -13,157 +13,157 @@ class TunicItemData(NamedTuple): item_base_id = 509342400 item_table: Dict[str, TunicItemData] = { - "Firecracker x2": TunicItemData(ItemClassification.filler, 3, 0, "Bombs"), - "Firecracker x3": TunicItemData(ItemClassification.filler, 3, 1, "Bombs"), - "Firecracker x4": TunicItemData(ItemClassification.filler, 3, 2, "Bombs"), - "Firecracker x5": TunicItemData(ItemClassification.filler, 1, 3, "Bombs"), - "Firecracker x6": TunicItemData(ItemClassification.filler, 2, 4, "Bombs"), - "Fire Bomb x2": TunicItemData(ItemClassification.filler, 2, 5, "Bombs"), - "Fire Bomb x3": TunicItemData(ItemClassification.filler, 1, 6, "Bombs"), - "Ice Bomb x2": TunicItemData(ItemClassification.filler, 2, 7, "Bombs"), - "Ice Bomb x3": TunicItemData(ItemClassification.filler, 2, 8, "Bombs"), - "Ice Bomb x5": TunicItemData(ItemClassification.filler, 1, 9, "Bombs"), - "Lure": TunicItemData(ItemClassification.filler, 4, 10, "Consumables"), - "Lure x2": TunicItemData(ItemClassification.filler, 1, 11, "Consumables"), - "Pepper x2": TunicItemData(ItemClassification.filler, 4, 12, "Consumables"), - "Ivy x3": TunicItemData(ItemClassification.filler, 2, 13, "Consumables"), - "Effigy": TunicItemData(ItemClassification.useful, 12, 14, "Money"), - "HP Berry": TunicItemData(ItemClassification.filler, 2, 15, "Consumables"), - "HP Berry x2": TunicItemData(ItemClassification.filler, 4, 16, "Consumables"), - "HP Berry x3": TunicItemData(ItemClassification.filler, 2, 17, "Consumables"), - "MP Berry": TunicItemData(ItemClassification.filler, 4, 18, "Consumables"), - "MP Berry x2": TunicItemData(ItemClassification.filler, 2, 19, "Consumables"), - "MP Berry x3": TunicItemData(ItemClassification.filler, 7, 20, "Consumables"), - "Fairy": TunicItemData(ItemClassification.progression, 20, 21), - "Stick": TunicItemData(ItemClassification.progression, 1, 22, "Weapons"), - "Sword": TunicItemData(ItemClassification.progression, 3, 23, "Weapons"), - "Sword Upgrade": TunicItemData(ItemClassification.progression, 4, 24, "Weapons"), - "Magic Wand": TunicItemData(ItemClassification.progression, 1, 25, "Weapons"), - "Magic Dagger": TunicItemData(ItemClassification.progression, 1, 26), - "Magic Orb": TunicItemData(ItemClassification.progression, 1, 27), - "Hero's Laurels": TunicItemData(ItemClassification.progression, 1, 28), - "Lantern": TunicItemData(ItemClassification.progression, 1, 29), - "Gun": TunicItemData(ItemClassification.progression, 1, 30, "Weapons"), - "Shield": TunicItemData(ItemClassification.useful, 1, 31), - "Dath Stone": TunicItemData(ItemClassification.useful, 1, 32), - "Hourglass": TunicItemData(ItemClassification.useful, 1, 33), - "Old House Key": TunicItemData(ItemClassification.progression, 1, 34, "Keys"), - "Key": TunicItemData(ItemClassification.progression, 2, 35, "Keys"), - "Fortress Vault Key": TunicItemData(ItemClassification.progression, 1, 36, "Keys"), - "Flask Shard": TunicItemData(ItemClassification.useful, 12, 37), - "Potion Flask": TunicItemData(ItemClassification.useful, 5, 38, "Flask"), - "Golden Coin": TunicItemData(ItemClassification.progression, 17, 39), - "Card Slot": TunicItemData(ItemClassification.useful, 4, 40), - "Red Questagon": TunicItemData(ItemClassification.progression_skip_balancing, 1, 41, "Hexagons"), - "Green Questagon": TunicItemData(ItemClassification.progression_skip_balancing, 1, 42, "Hexagons"), - "Blue Questagon": TunicItemData(ItemClassification.progression_skip_balancing, 1, 43, "Hexagons"), - "Gold Questagon": TunicItemData(ItemClassification.progression_skip_balancing, 0, 44, "Hexagons"), - "ATT Offering": TunicItemData(ItemClassification.useful, 4, 45, "Offerings"), - "DEF Offering": TunicItemData(ItemClassification.useful, 4, 46, "Offerings"), - "Potion Offering": TunicItemData(ItemClassification.useful, 3, 47, "Offerings"), - "HP Offering": TunicItemData(ItemClassification.useful, 6, 48, "Offerings"), - "MP Offering": TunicItemData(ItemClassification.useful, 3, 49, "Offerings"), - "SP Offering": TunicItemData(ItemClassification.useful, 2, 50, "Offerings"), - "Hero Relic - ATT": TunicItemData(ItemClassification.progression_skip_balancing, 1, 51, "Hero Relics"), - "Hero Relic - DEF": TunicItemData(ItemClassification.progression_skip_balancing, 1, 52, "Hero Relics"), - "Hero Relic - HP": TunicItemData(ItemClassification.progression_skip_balancing, 1, 53, "Hero Relics"), - "Hero Relic - MP": TunicItemData(ItemClassification.progression_skip_balancing, 1, 54, "Hero Relics"), - "Hero Relic - POTION": TunicItemData(ItemClassification.progression_skip_balancing, 1, 55, "Hero Relics"), - "Hero Relic - SP": TunicItemData(ItemClassification.progression_skip_balancing, 1, 56, "Hero Relics"), - "Orange Peril Ring": TunicItemData(ItemClassification.useful, 1, 57, "Cards"), - "Tincture": TunicItemData(ItemClassification.useful, 1, 58, "Cards"), - "Scavenger Mask": TunicItemData(ItemClassification.progression, 1, 59, "Cards"), - "Cyan Peril Ring": TunicItemData(ItemClassification.useful, 1, 60, "Cards"), - "Bracer": TunicItemData(ItemClassification.useful, 1, 61, "Cards"), - "Dagger Strap": TunicItemData(ItemClassification.useful, 1, 62, "Cards"), - "Inverted Ash": TunicItemData(ItemClassification.useful, 1, 63, "Cards"), - "Lucky Cup": TunicItemData(ItemClassification.useful, 1, 64, "Cards"), - "Magic Echo": TunicItemData(ItemClassification.useful, 1, 65, "Cards"), - "Anklet": TunicItemData(ItemClassification.useful, 1, 66, "Cards"), - "Muffling Bell": TunicItemData(ItemClassification.useful, 1, 67, "Cards"), - "Glass Cannon": TunicItemData(ItemClassification.useful, 1, 68, "Cards"), - "Perfume": TunicItemData(ItemClassification.useful, 1, 69, "Cards"), - "Louder Echo": TunicItemData(ItemClassification.useful, 1, 70, "Cards"), - "Aura's Gem": TunicItemData(ItemClassification.useful, 1, 71, "Cards"), - "Bone Card": TunicItemData(ItemClassification.useful, 1, 72, "Cards"), - "Mr Mayor": TunicItemData(ItemClassification.useful, 1, 73, "Golden Treasures"), - "Secret Legend": TunicItemData(ItemClassification.useful, 1, 74, "Golden Treasures"), - "Sacred Geometry": TunicItemData(ItemClassification.useful, 1, 75, "Golden Treasures"), - "Vintage": TunicItemData(ItemClassification.useful, 1, 76, "Golden Treasures"), - "Just Some Pals": TunicItemData(ItemClassification.useful, 1, 77, "Golden Treasures"), - "Regal Weasel": TunicItemData(ItemClassification.useful, 1, 78, "Golden Treasures"), - "Spring Falls": TunicItemData(ItemClassification.useful, 1, 79, "Golden Treasures"), - "Power Up": TunicItemData(ItemClassification.useful, 1, 80, "Golden Treasures"), - "Back To Work": TunicItemData(ItemClassification.useful, 1, 81, "Golden Treasures"), - "Phonomath": TunicItemData(ItemClassification.useful, 1, 82, "Golden Treasures"), - "Dusty": TunicItemData(ItemClassification.useful, 1, 83, "Golden Treasures"), - "Forever Friend": TunicItemData(ItemClassification.useful, 1, 84, "Golden Treasures"), - "Fool Trap": TunicItemData(ItemClassification.trap, 0, 85), - "Money x1": TunicItemData(ItemClassification.filler, 3, 86, "Money"), - "Money x10": TunicItemData(ItemClassification.filler, 1, 87, "Money"), - "Money x15": TunicItemData(ItemClassification.filler, 10, 88, "Money"), - "Money x16": TunicItemData(ItemClassification.filler, 1, 89, "Money"), - "Money x20": TunicItemData(ItemClassification.filler, 17, 90, "Money"), - "Money x25": TunicItemData(ItemClassification.filler, 14, 91, "Money"), - "Money x30": TunicItemData(ItemClassification.filler, 4, 92, "Money"), - "Money x32": TunicItemData(ItemClassification.filler, 4, 93, "Money"), - "Money x40": TunicItemData(ItemClassification.filler, 3, 94, "Money"), - "Money x48": TunicItemData(ItemClassification.filler, 1, 95, "Money"), - "Money x50": TunicItemData(ItemClassification.filler, 7, 96, "Money"), - "Money x64": TunicItemData(ItemClassification.filler, 1, 97, "Money"), - "Money x100": TunicItemData(ItemClassification.filler, 5, 98, "Money"), - "Money x128": TunicItemData(ItemClassification.useful, 3, 99, "Money"), - "Money x200": TunicItemData(ItemClassification.useful, 1, 100, "Money"), - "Money x255": TunicItemData(ItemClassification.useful, 1, 101, "Money"), - "Pages 0-1": TunicItemData(ItemClassification.useful, 1, 102, "Pages"), - "Pages 2-3": TunicItemData(ItemClassification.useful, 1, 103, "Pages"), - "Pages 4-5": TunicItemData(ItemClassification.useful, 1, 104, "Pages"), - "Pages 6-7": TunicItemData(ItemClassification.useful, 1, 105, "Pages"), - "Pages 8-9": TunicItemData(ItemClassification.useful, 1, 106, "Pages"), - "Pages 10-11": TunicItemData(ItemClassification.useful, 1, 107, "Pages"), - "Pages 12-13": TunicItemData(ItemClassification.useful, 1, 108, "Pages"), - "Pages 14-15": TunicItemData(ItemClassification.useful, 1, 109, "Pages"), - "Pages 16-17": TunicItemData(ItemClassification.useful, 1, 110, "Pages"), - "Pages 18-19": TunicItemData(ItemClassification.useful, 1, 111, "Pages"), - "Pages 20-21": TunicItemData(ItemClassification.useful, 1, 112, "Pages"), - "Pages 22-23": TunicItemData(ItemClassification.useful, 1, 113, "Pages"), - "Pages 24-25 (Prayer)": TunicItemData(ItemClassification.progression, 1, 114, "Pages"), - "Pages 26-27": TunicItemData(ItemClassification.useful, 1, 115, "Pages"), - "Pages 28-29": TunicItemData(ItemClassification.useful, 1, 116, "Pages"), - "Pages 30-31": TunicItemData(ItemClassification.useful, 1, 117, "Pages"), - "Pages 32-33": TunicItemData(ItemClassification.useful, 1, 118, "Pages"), - "Pages 34-35": TunicItemData(ItemClassification.useful, 1, 119, "Pages"), - "Pages 36-37": TunicItemData(ItemClassification.useful, 1, 120, "Pages"), - "Pages 38-39": TunicItemData(ItemClassification.useful, 1, 121, "Pages"), - "Pages 40-41": TunicItemData(ItemClassification.useful, 1, 122, "Pages"), - "Pages 42-43 (Holy Cross)": TunicItemData(ItemClassification.progression, 1, 123, "Pages"), - "Pages 44-45": TunicItemData(ItemClassification.useful, 1, 124, "Pages"), - "Pages 46-47": TunicItemData(ItemClassification.useful, 1, 125, "Pages"), - "Pages 48-49": TunicItemData(ItemClassification.useful, 1, 126, "Pages"), - "Pages 50-51": TunicItemData(ItemClassification.useful, 1, 127, "Pages"), - "Pages 52-53 (Icebolt)": TunicItemData(ItemClassification.progression, 1, 128, "Pages"), - "Pages 54-55": TunicItemData(ItemClassification.useful, 1, 129, "Pages"), - "Ladders near Weathervane": TunicItemData(ItemClassification.progression, 0, 130, "Ladders"), - "Ladders near Overworld Checkpoint": TunicItemData(ItemClassification.progression, 0, 131, "Ladders"), - "Ladders near Patrol Cave": TunicItemData(ItemClassification.progression, 0, 132, "Ladders"), - "Ladder near Temple Rafters": TunicItemData(ItemClassification.progression, 0, 133, "Ladders"), - "Ladders near Dark Tomb": TunicItemData(ItemClassification.progression, 0, 134, "Ladders"), - "Ladder to Quarry": TunicItemData(ItemClassification.progression, 0, 135, "Ladders"), - "Ladders to West Bell": TunicItemData(ItemClassification.progression, 0, 136, "Ladders"), - "Ladders in Overworld Town": TunicItemData(ItemClassification.progression, 0, 137, "Ladders"), - "Ladder to Ruined Atoll": TunicItemData(ItemClassification.progression, 0, 138, "Ladders"), - "Ladder to Swamp": TunicItemData(ItemClassification.progression, 0, 139, "Ladders"), - "Ladders in Well": TunicItemData(ItemClassification.progression, 0, 140, "Ladders"), - "Ladder in Dark Tomb": TunicItemData(ItemClassification.progression, 0, 141, "Ladders"), - "Ladder to East Forest": TunicItemData(ItemClassification.progression, 0, 142, "Ladders"), - "Ladders to Lower Forest": TunicItemData(ItemClassification.progression, 0, 143, "Ladders"), - "Ladder to Beneath the Vault": TunicItemData(ItemClassification.progression, 0, 144, "Ladders"), - "Ladders in Hourglass Cave": TunicItemData(ItemClassification.progression, 0, 145, "Ladders"), - "Ladders in South Atoll": TunicItemData(ItemClassification.progression, 0, 146, "Ladders"), - "Ladders to Frog's Domain": TunicItemData(ItemClassification.progression, 0, 147, "Ladders"), - "Ladders in Library": TunicItemData(ItemClassification.progression, 0, 148, "Ladders"), - "Ladders in Lower Quarry": TunicItemData(ItemClassification.progression, 0, 149, "Ladders"), - "Ladders in Swamp": TunicItemData(ItemClassification.progression, 0, 150, "Ladders"), + "Firecracker x2": TunicItemData(IC.filler, 3, 0, "Bombs"), + "Firecracker x3": TunicItemData(IC.filler, 3, 1, "Bombs"), + "Firecracker x4": TunicItemData(IC.filler, 3, 2, "Bombs"), + "Firecracker x5": TunicItemData(IC.filler, 1, 3, "Bombs"), + "Firecracker x6": TunicItemData(IC.filler, 2, 4, "Bombs"), + "Fire Bomb x2": TunicItemData(IC.filler, 2, 5, "Bombs"), + "Fire Bomb x3": TunicItemData(IC.filler, 1, 6, "Bombs"), + "Ice Bomb x2": TunicItemData(IC.filler, 2, 7, "Bombs"), + "Ice Bomb x3": TunicItemData(IC.filler, 2, 8, "Bombs"), + "Ice Bomb x5": TunicItemData(IC.filler, 1, 9, "Bombs"), + "Lure": TunicItemData(IC.filler, 4, 10, "Consumables"), + "Lure x2": TunicItemData(IC.filler, 1, 11, "Consumables"), + "Pepper x2": TunicItemData(IC.filler, 4, 12, "Consumables"), + "Ivy x3": TunicItemData(IC.filler, 2, 13, "Consumables"), + "Effigy": TunicItemData(IC.useful, 12, 14, "Money"), + "HP Berry": TunicItemData(IC.filler, 2, 15, "Consumables"), + "HP Berry x2": TunicItemData(IC.filler, 4, 16, "Consumables"), + "HP Berry x3": TunicItemData(IC.filler, 2, 17, "Consumables"), + "MP Berry": TunicItemData(IC.filler, 4, 18, "Consumables"), + "MP Berry x2": TunicItemData(IC.filler, 2, 19, "Consumables"), + "MP Berry x3": TunicItemData(IC.filler, 7, 20, "Consumables"), + "Fairy": TunicItemData(IC.progression, 20, 21), + "Stick": TunicItemData(IC.progression | IC.useful, 1, 22, "Weapons"), + "Sword": TunicItemData(IC.progression | IC.useful, 3, 23, "Weapons"), + "Sword Upgrade": TunicItemData(IC.progression | IC.useful, 4, 24, "Weapons"), + "Magic Wand": TunicItemData(IC.progression | IC.useful, 1, 25, "Weapons"), + "Magic Dagger": TunicItemData(IC.progression | IC.useful, 1, 26), + "Magic Orb": TunicItemData(IC.progression | IC.useful, 1, 27), + "Hero's Laurels": TunicItemData(IC.progression | IC.useful, 1, 28), + "Lantern": TunicItemData(IC.progression, 1, 29), + "Gun": TunicItemData(IC.progression | IC.useful, 1, 30, "Weapons"), + "Shield": TunicItemData(IC.useful, 1, 31), + "Dath Stone": TunicItemData(IC.useful, 1, 32), + "Hourglass": TunicItemData(IC.useful, 1, 33), + "Old House Key": TunicItemData(IC.progression, 1, 34, "Keys"), + "Key": TunicItemData(IC.progression, 2, 35, "Keys"), + "Fortress Vault Key": TunicItemData(IC.progression, 1, 36, "Keys"), + "Flask Shard": TunicItemData(IC.useful, 12, 37), + "Potion Flask": TunicItemData(IC.useful, 5, 38, "Flask"), + "Golden Coin": TunicItemData(IC.progression, 17, 39), + "Card Slot": TunicItemData(IC.useful, 4, 40), + "Red Questagon": TunicItemData(IC.progression_skip_balancing, 1, 41, "Hexagons"), + "Green Questagon": TunicItemData(IC.progression_skip_balancing, 1, 42, "Hexagons"), + "Blue Questagon": TunicItemData(IC.progression_skip_balancing, 1, 43, "Hexagons"), + "Gold Questagon": TunicItemData(IC.progression_skip_balancing, 0, 44, "Hexagons"), + "ATT Offering": TunicItemData(IC.useful, 4, 45, "Offerings"), + "DEF Offering": TunicItemData(IC.useful, 4, 46, "Offerings"), + "Potion Offering": TunicItemData(IC.useful, 3, 47, "Offerings"), + "HP Offering": TunicItemData(IC.useful, 6, 48, "Offerings"), + "MP Offering": TunicItemData(IC.useful, 3, 49, "Offerings"), + "SP Offering": TunicItemData(IC.useful, 2, 50, "Offerings"), + "Hero Relic - ATT": TunicItemData(IC.progression_skip_balancing, 1, 51, "Hero Relics"), + "Hero Relic - DEF": TunicItemData(IC.progression_skip_balancing, 1, 52, "Hero Relics"), + "Hero Relic - HP": TunicItemData(IC.progression_skip_balancing, 1, 53, "Hero Relics"), + "Hero Relic - MP": TunicItemData(IC.progression_skip_balancing, 1, 54, "Hero Relics"), + "Hero Relic - POTION": TunicItemData(IC.progression_skip_balancing, 1, 55, "Hero Relics"), + "Hero Relic - SP": TunicItemData(IC.progression_skip_balancing, 1, 56, "Hero Relics"), + "Orange Peril Ring": TunicItemData(IC.useful, 1, 57, "Cards"), + "Tincture": TunicItemData(IC.useful, 1, 58, "Cards"), + "Scavenger Mask": TunicItemData(IC.progression, 1, 59, "Cards"), + "Cyan Peril Ring": TunicItemData(IC.useful, 1, 60, "Cards"), + "Bracer": TunicItemData(IC.useful, 1, 61, "Cards"), + "Dagger Strap": TunicItemData(IC.useful, 1, 62, "Cards"), + "Inverted Ash": TunicItemData(IC.useful, 1, 63, "Cards"), + "Lucky Cup": TunicItemData(IC.useful, 1, 64, "Cards"), + "Magic Echo": TunicItemData(IC.useful, 1, 65, "Cards"), + "Anklet": TunicItemData(IC.useful, 1, 66, "Cards"), + "Muffling Bell": TunicItemData(IC.useful, 1, 67, "Cards"), + "Glass Cannon": TunicItemData(IC.useful, 1, 68, "Cards"), + "Perfume": TunicItemData(IC.useful, 1, 69, "Cards"), + "Louder Echo": TunicItemData(IC.useful, 1, 70, "Cards"), + "Aura's Gem": TunicItemData(IC.useful, 1, 71, "Cards"), + "Bone Card": TunicItemData(IC.useful, 1, 72, "Cards"), + "Mr Mayor": TunicItemData(IC.useful, 1, 73, "Golden Treasures"), + "Secret Legend": TunicItemData(IC.useful, 1, 74, "Golden Treasures"), + "Sacred Geometry": TunicItemData(IC.useful, 1, 75, "Golden Treasures"), + "Vintage": TunicItemData(IC.useful, 1, 76, "Golden Treasures"), + "Just Some Pals": TunicItemData(IC.useful, 1, 77, "Golden Treasures"), + "Regal Weasel": TunicItemData(IC.useful, 1, 78, "Golden Treasures"), + "Spring Falls": TunicItemData(IC.useful, 1, 79, "Golden Treasures"), + "Power Up": TunicItemData(IC.useful, 1, 80, "Golden Treasures"), + "Back To Work": TunicItemData(IC.useful, 1, 81, "Golden Treasures"), + "Phonomath": TunicItemData(IC.useful, 1, 82, "Golden Treasures"), + "Dusty": TunicItemData(IC.useful, 1, 83, "Golden Treasures"), + "Forever Friend": TunicItemData(IC.useful, 1, 84, "Golden Treasures"), + "Fool Trap": TunicItemData(IC.trap, 0, 85), + "Money x1": TunicItemData(IC.filler, 3, 86, "Money"), + "Money x10": TunicItemData(IC.filler, 1, 87, "Money"), + "Money x15": TunicItemData(IC.filler, 10, 88, "Money"), + "Money x16": TunicItemData(IC.filler, 1, 89, "Money"), + "Money x20": TunicItemData(IC.filler, 17, 90, "Money"), + "Money x25": TunicItemData(IC.filler, 14, 91, "Money"), + "Money x30": TunicItemData(IC.filler, 4, 92, "Money"), + "Money x32": TunicItemData(IC.filler, 4, 93, "Money"), + "Money x40": TunicItemData(IC.filler, 3, 94, "Money"), + "Money x48": TunicItemData(IC.filler, 1, 95, "Money"), + "Money x50": TunicItemData(IC.filler, 7, 96, "Money"), + "Money x64": TunicItemData(IC.filler, 1, 97, "Money"), + "Money x100": TunicItemData(IC.filler, 5, 98, "Money"), + "Money x128": TunicItemData(IC.useful, 3, 99, "Money"), + "Money x200": TunicItemData(IC.useful, 1, 100, "Money"), + "Money x255": TunicItemData(IC.useful, 1, 101, "Money"), + "Pages 0-1": TunicItemData(IC.useful, 1, 102, "Pages"), + "Pages 2-3": TunicItemData(IC.useful, 1, 103, "Pages"), + "Pages 4-5": TunicItemData(IC.useful, 1, 104, "Pages"), + "Pages 6-7": TunicItemData(IC.useful, 1, 105, "Pages"), + "Pages 8-9": TunicItemData(IC.useful, 1, 106, "Pages"), + "Pages 10-11": TunicItemData(IC.useful, 1, 107, "Pages"), + "Pages 12-13": TunicItemData(IC.useful, 1, 108, "Pages"), + "Pages 14-15": TunicItemData(IC.useful, 1, 109, "Pages"), + "Pages 16-17": TunicItemData(IC.useful, 1, 110, "Pages"), + "Pages 18-19": TunicItemData(IC.useful, 1, 111, "Pages"), + "Pages 20-21": TunicItemData(IC.useful, 1, 112, "Pages"), + "Pages 22-23": TunicItemData(IC.useful, 1, 113, "Pages"), + "Pages 24-25 (Prayer)": TunicItemData(IC.progression | IC.useful, 1, 114, "Pages"), + "Pages 26-27": TunicItemData(IC.useful, 1, 115, "Pages"), + "Pages 28-29": TunicItemData(IC.useful, 1, 116, "Pages"), + "Pages 30-31": TunicItemData(IC.useful, 1, 117, "Pages"), + "Pages 32-33": TunicItemData(IC.useful, 1, 118, "Pages"), + "Pages 34-35": TunicItemData(IC.useful, 1, 119, "Pages"), + "Pages 36-37": TunicItemData(IC.useful, 1, 120, "Pages"), + "Pages 38-39": TunicItemData(IC.useful, 1, 121, "Pages"), + "Pages 40-41": TunicItemData(IC.useful, 1, 122, "Pages"), + "Pages 42-43 (Holy Cross)": TunicItemData(IC.progression | IC.useful, 1, 123, "Pages"), + "Pages 44-45": TunicItemData(IC.useful, 1, 124, "Pages"), + "Pages 46-47": TunicItemData(IC.useful, 1, 125, "Pages"), + "Pages 48-49": TunicItemData(IC.useful, 1, 126, "Pages"), + "Pages 50-51": TunicItemData(IC.useful, 1, 127, "Pages"), + "Pages 52-53 (Icebolt)": TunicItemData(IC.progression, 1, 128, "Pages"), + "Pages 54-55": TunicItemData(IC.useful, 1, 129, "Pages"), + "Ladders near Weathervane": TunicItemData(IC.progression, 0, 130, "Ladders"), + "Ladders near Overworld Checkpoint": TunicItemData(IC.progression, 0, 131, "Ladders"), + "Ladders near Patrol Cave": TunicItemData(IC.progression, 0, 132, "Ladders"), + "Ladder near Temple Rafters": TunicItemData(IC.progression, 0, 133, "Ladders"), + "Ladders near Dark Tomb": TunicItemData(IC.progression, 0, 134, "Ladders"), + "Ladder to Quarry": TunicItemData(IC.progression, 0, 135, "Ladders"), + "Ladders to West Bell": TunicItemData(IC.progression, 0, 136, "Ladders"), + "Ladders in Overworld Town": TunicItemData(IC.progression, 0, 137, "Ladders"), + "Ladder to Ruined Atoll": TunicItemData(IC.progression, 0, 138, "Ladders"), + "Ladder to Swamp": TunicItemData(IC.progression, 0, 139, "Ladders"), + "Ladders in Well": TunicItemData(IC.progression, 0, 140, "Ladders"), + "Ladder in Dark Tomb": TunicItemData(IC.progression, 0, 141, "Ladders"), + "Ladder to East Forest": TunicItemData(IC.progression, 0, 142, "Ladders"), + "Ladders to Lower Forest": TunicItemData(IC.progression, 0, 143, "Ladders"), + "Ladder to Beneath the Vault": TunicItemData(IC.progression, 0, 144, "Ladders"), + "Ladders in Hourglass Cave": TunicItemData(IC.progression, 0, 145, "Ladders"), + "Ladders in South Atoll": TunicItemData(IC.progression, 0, 146, "Ladders"), + "Ladders to Frog's Domain": TunicItemData(IC.progression, 0, 147, "Ladders"), + "Ladders in Library": TunicItemData(IC.progression, 0, 148, "Ladders"), + "Ladders in Lower Quarry": TunicItemData(IC.progression, 0, 149, "Ladders"), + "Ladders in Swamp": TunicItemData(IC.progression, 0, 150, "Ladders"), } # items to be replaced by fool traps @@ -208,7 +208,7 @@ class TunicItemData(NamedTuple): item_name_to_id: Dict[str, int] = {name: item_base_id + data.item_id_offset for name, data in item_table.items()} -filler_items: List[str] = [name for name, data in item_table.items() if data.classification == ItemClassification.filler] +filler_items: List[str] = [name for name, data in item_table.items() if data.classification == IC.filler] def get_item_group(item_name: str) -> str: diff --git a/worlds/tunic/ladder_storage_data.py b/worlds/tunic/ladder_storage_data.py index a29d50b4f455..c6dda42bca79 100644 --- a/worlds/tunic/ladder_storage_data.py +++ b/worlds/tunic/ladder_storage_data.py @@ -17,7 +17,7 @@ class OWLadderInfo(NamedTuple): ["Overworld Beach"]), # also the east filigree room "LS Elev 1": OWLadderInfo({"Ladders near Weathervane", "Ladders in Overworld Town", "Ladder to Swamp"}, - ["Furnace_gyro_lower", "Swamp Redux 2_wall"], + ["Furnace_gyro_lower", "Furnace_gyro_west", "Swamp Redux 2_wall"], ["Overworld Tunnel Turret"]), # also the fountain filigree room and ruined passage door "LS Elev 2": OWLadderInfo({"Ladders near Weathervane", "Ladders to West Bell"}, diff --git a/worlds/tunic/options.py b/worlds/tunic/options.py index 1683b3ca5aee..cdd37a889461 100644 --- a/worlds/tunic/options.py +++ b/worlds/tunic/options.py @@ -183,7 +183,7 @@ class IceGrappling(Choice): Easy includes ice grappling enemies that are in range without luring them. May include clips through terrain. Medium includes using ice grapples to push enemies through doors or off ledges without luring them. Also includes bringing an enemy over to the Temple Door to grapple through it. Hard includes luring or grappling enemies to get to where you want to go. - The Medium and Hard options will give the player the Torch to return to the Overworld checkpoint to avoid softlocks. Using the Torch is considered in logic. + Enabling any of these difficulty options will give the player the Torch to return to the Overworld checkpoint to avoid softlocks. Using the Torch is considered in logic. Note: You will still be expected to ice grapple to the slime in East Forest from below with this option off. """ internal_name = "ice_grappling" @@ -201,7 +201,7 @@ class LadderStorage(Choice): Easy includes uses of Ladder Storage to get to open doors over a long distance without too much difficulty. May include convenient elevation changes (going up Mountain stairs, stairs in front of Special Shop, etc.). Medium includes the above as well as changing your elevation using the environment and getting knocked down by melee enemies mid-LS. Hard includes the above as well as going behind the map to enter closed doors from behind, shooting a fuse with the magic wand to knock yourself down at close range, and getting into the Cathedral Secret Legend room mid-LS. - Enabling any of these difficulty options will give the player the Torch item to return to the Overworld checkpoint to avoid softlocks. Using the Torch is considered in logic. + Enabling any of these difficulty options will give the player the Torch to return to the Overworld checkpoint to avoid softlocks. Using the Torch is considered in logic. Opening individual chests while doing ladder storage is excluded due to tedium. Knocking yourself out of LS with a bomb is excluded due to the problematic nature of consumables in logic. """ diff --git a/worlds/witness/__init__.py b/worlds/witness/__init__.py index c9848f2ffe47..ac9197bd92bb 100644 --- a/worlds/witness/__init__.py +++ b/worlds/witness/__init__.py @@ -50,6 +50,8 @@ class WitnessWorld(World): topology_present = False web = WitnessWebWorld() + origin_region_name = "Entry" + options_dataclass = TheWitnessOptions options: TheWitnessOptions @@ -78,7 +80,7 @@ class WitnessWorld(World): def _get_slot_data(self) -> Dict[str, Any]: return { - "seed": self.random.randrange(0, 1000000), + "seed": self.options.puzzle_randomization_seed.value, "victory_location": int(self.player_logic.VICTORY_LOCATION, 16), "panelhex_to_id": self.player_locations.CHECK_PANELHEX_TO_ID, "item_id_to_door_hexes": static_witness_items.get_item_to_door_mappings(), diff --git a/worlds/witness/data/WitnessLogic.txt b/worlds/witness/data/WitnessLogic.txt index fabd1428810b..0dbb88a107b1 100644 --- a/worlds/witness/data/WitnessLogic.txt +++ b/worlds/witness/data/WitnessLogic.txt @@ -1,7 +1,5 @@ ==Tutorial (Inside)== -Menu (Menu) - Entry - True: - Entry (Entry): Tutorial First Hallway (Tutorial First Hallway) - Entry - True - Tutorial First Hallway Room - 0x00064: @@ -754,12 +752,12 @@ Swamp Entry Area (Swamp) - Swamp Sliding Bridge - TrueOneWay: 158300 - 0x00987 (Intro Back 7) - 0x00985 - Shapers 158301 - 0x181A9 (Intro Back 8) - 0x00987 - Shapers -Swamp Sliding Bridge (Swamp) - Swamp Entry Area - 0x00609 - Swamp Near Platform - 0x00609: +Swamp Sliding Bridge (Swamp) - Swamp Entry Area - 0x00609 - Swamp Platform - 0x00609: 158302 - 0x00609 (Sliding Bridge) - True - Shapers 159342 - 0x0105D (Sliding Bridge Left EP) - 0x00609 - True 159343 - 0x0A304 (Sliding Bridge Right EP) - 0x00609 - True -Swamp Near Platform (Swamp) - Swamp Cyan Underwater - 0x04B7F - Swamp Near Boat - 0x38AE6 - Swamp Between Bridges Near - 0x184B7 - Swamp Sliding Bridge - TrueOneWay: +Swamp Platform (Swamp) - Swamp Cyan Underwater - 0x04B7F - Swamp Near Boat - 0x38AE6 - Swamp Between Bridges Near - 0x184B7 - Swamp Sliding Bridge - TrueOneWay: 158313 - 0x00982 (Platform Row 1) - True - Shapers 158314 - 0x0097F (Platform Row 2) - 0x00982 - Shapers 158315 - 0x0098F (Platform Row 3) - 0x0097F - Shapers diff --git a/worlds/witness/data/WitnessLogicExpert.txt b/worlds/witness/data/WitnessLogicExpert.txt index 200138dee1f7..0f601724acbe 100644 --- a/worlds/witness/data/WitnessLogicExpert.txt +++ b/worlds/witness/data/WitnessLogicExpert.txt @@ -1,7 +1,5 @@ ==Tutorial (Inside)== -Menu (Menu) - Entry - True: - Entry (Entry): Tutorial First Hallway (Tutorial First Hallway) - Entry - True - Tutorial First Hallway Room - 0x00064: @@ -754,12 +752,12 @@ Swamp Entry Area (Swamp) - Swamp Sliding Bridge - TrueOneWay: 158300 - 0x00987 (Intro Back 7) - 0x00985 - Shapers & Rotated Shapers & Triangles & Black/White Squares 158301 - 0x181A9 (Intro Back 8) - 0x00987 - Rotated Shapers & Triangles & Black/White Squares -Swamp Sliding Bridge (Swamp) - Swamp Entry Area - 0x00609 - Swamp Near Platform - 0x00609: +Swamp Sliding Bridge (Swamp) - Swamp Entry Area - 0x00609 - Swamp Platform - 0x00609: 158302 - 0x00609 (Sliding Bridge) - True - Shapers & Black/White Squares 159342 - 0x0105D (Sliding Bridge Left EP) - 0x00609 - True 159343 - 0x0A304 (Sliding Bridge Right EP) - 0x00609 - True -Swamp Near Platform (Swamp) - Swamp Cyan Underwater - 0x04B7F - Swamp Near Boat - 0x38AE6 - Swamp Between Bridges Near - 0x184B7 - Swamp Sliding Bridge - TrueOneWay: +Swamp Platform (Swamp) - Swamp Cyan Underwater - 0x04B7F - Swamp Near Boat - 0x38AE6 - Swamp Between Bridges Near - 0x184B7 - Swamp Sliding Bridge - TrueOneWay: 158313 - 0x00982 (Platform Row 1) - True - Rotated Shapers 158314 - 0x0097F (Platform Row 2) - 0x00982 - Rotated Shapers 158315 - 0x0098F (Platform Row 3) - 0x0097F - Rotated Shapers diff --git a/worlds/witness/data/WitnessLogicVanilla.txt b/worlds/witness/data/WitnessLogicVanilla.txt index 67a42ba7e4d4..f0c6a8690ed3 100644 --- a/worlds/witness/data/WitnessLogicVanilla.txt +++ b/worlds/witness/data/WitnessLogicVanilla.txt @@ -1,7 +1,5 @@ ==Tutorial (Inside)== -Menu (Menu) - Entry - True: - Entry (Entry): Tutorial First Hallway (Tutorial First Hallway) - Entry - True - Tutorial First Hallway Room - 0x00064: @@ -754,12 +752,12 @@ Swamp Entry Area (Swamp) - Swamp Sliding Bridge - TrueOneWay: 158300 - 0x00987 (Intro Back 7) - 0x00985 - Shapers 158301 - 0x181A9 (Intro Back 8) - 0x00987 - Shapers -Swamp Sliding Bridge (Swamp) - Swamp Entry Area - 0x00609 - Swamp Near Platform - 0x00609: +Swamp Sliding Bridge (Swamp) - Swamp Entry Area - 0x00609 - Swamp Platform - 0x00609: 158302 - 0x00609 (Sliding Bridge) - True - Shapers 159342 - 0x0105D (Sliding Bridge Left EP) - 0x00609 - True 159343 - 0x0A304 (Sliding Bridge Right EP) - 0x00609 - True -Swamp Near Platform (Swamp) - Swamp Cyan Underwater - 0x04B7F - Swamp Near Boat - 0x38AE6 - Swamp Between Bridges Near - 0x184B7 - Swamp Sliding Bridge - TrueOneWay: +Swamp Platform (Swamp) - Swamp Cyan Underwater - 0x04B7F - Swamp Near Boat - 0x38AE6 - Swamp Between Bridges Near - 0x184B7 - Swamp Sliding Bridge - TrueOneWay: 158313 - 0x00982 (Platform Row 1) - True - Shapers 158314 - 0x0097F (Platform Row 2) - 0x00982 - Shapers 158315 - 0x0098F (Platform Row 3) - 0x0097F - Shapers diff --git a/worlds/witness/data/WitnessLogicVariety.txt b/worlds/witness/data/WitnessLogicVariety.txt index a3c388dfb1e4..b7b705a6db9f 100644 --- a/worlds/witness/data/WitnessLogicVariety.txt +++ b/worlds/witness/data/WitnessLogicVariety.txt @@ -1,7 +1,5 @@ ==Tutorial (Inside)== -Menu (Menu) - Entry - True: - Entry (Entry): Tutorial First Hallway (Tutorial First Hallway) - Entry - True - Tutorial First Hallway Room - 0x00064: @@ -754,12 +752,12 @@ Swamp Entry Area (Swamp) - Swamp Sliding Bridge - TrueOneWay: 158300 - 0x00987 (Intro Back 7) - 0x00985 - Rotated Shapers & Triangles 158301 - 0x181A9 (Intro Back 8) - 0x00987 - Shapers & Triangles -Swamp Sliding Bridge (Swamp) - Swamp Entry Area - 0x00609 - Swamp Near Platform - 0x00609: +Swamp Sliding Bridge (Swamp) - Swamp Entry Area - 0x00609 - Swamp Platform - 0x00609: 158302 - 0x00609 (Sliding Bridge) - True - Shapers 159342 - 0x0105D (Sliding Bridge Left EP) - 0x00609 - True 159343 - 0x0A304 (Sliding Bridge Right EP) - 0x00609 - True -Swamp Near Platform (Swamp) - Swamp Cyan Underwater - 0x04B7F - Swamp Near Boat - 0x38AE6 - Swamp Between Bridges Near - 0x184B7 - Swamp Sliding Bridge - TrueOneWay: +Swamp Platform (Swamp) - Swamp Cyan Underwater - 0x04B7F - Swamp Near Boat - 0x38AE6 - Swamp Between Bridges Near - 0x184B7 - Swamp Sliding Bridge - TrueOneWay: 158313 - 0x00982 (Platform Row 1) - True - Shapers 158314 - 0x0097F (Platform Row 2) - 0x00982 - Shapers 158315 - 0x0098F (Platform Row 3) - 0x0097F - Shapers diff --git a/worlds/witness/data/settings/Door_Shuffle/Elevators_Come_To_You.txt b/worlds/witness/data/settings/Door_Shuffle/Elevators_Come_To_You.txt deleted file mode 100644 index 78d245f9f0b5..000000000000 --- a/worlds/witness/data/settings/Door_Shuffle/Elevators_Come_To_You.txt +++ /dev/null @@ -1,11 +0,0 @@ -New Connections: -Quarry - Quarry Elevator - TrueOneWay -Outside Quarry - Quarry Elevator - TrueOneWay -Outside Bunker - Bunker Elevator - TrueOneWay -Outside Swamp - Swamp Long Bridge - TrueOneWay -Swamp Near Boat - Swamp Long Bridge - TrueOneWay -Town Red Rooftop - Town Maze Rooftop - TrueOneWay - - -Requirement Changes: -0x035DE - 0x17E2B - True \ No newline at end of file diff --git a/worlds/witness/data/static_items.py b/worlds/witness/data/static_items.py index e5103ef3807e..c64df741982e 100644 --- a/worlds/witness/data/static_items.py +++ b/worlds/witness/data/static_items.py @@ -1,4 +1,4 @@ -from typing import Dict, List, Set +from typing import Dict, List, Set, cast from BaseClasses import ItemClassification @@ -41,7 +41,19 @@ def populate_items() -> None: ITEM_GROUPS.setdefault("Symbols", set()).add(item_name) elif definition.category is ItemCategory.DOOR: classification = ItemClassification.progression - ITEM_GROUPS.setdefault("Doors", set()).add(item_name) + + first_entity_hex = cast(DoorItemDefinition, definition).panel_id_hexes[0] + entity_type = static_witness_logic.ENTITIES_BY_HEX[first_entity_hex]["entityType"] + + if entity_type == "Door": + ITEM_GROUPS.setdefault("Doors", set()).add(item_name) + elif entity_type == "Panel": + ITEM_GROUPS.setdefault("Panel Keys", set()).add(item_name) + elif entity_type in {"EP", "Obelisk Side", "Obelisk"}: + ITEM_GROUPS.setdefault("Obelisk Keys", set()).add(item_name) + else: + raise ValueError(f"Couldn't figure out what type of door item {definition} is.") + elif definition.category is ItemCategory.LASER: classification = ItemClassification.progression_skip_balancing ITEM_GROUPS.setdefault("Lasers", set()).add(item_name) diff --git a/worlds/witness/data/utils.py b/worlds/witness/data/utils.py index 737daff70fae..190c00dc283b 100644 --- a/worlds/witness/data/utils.py +++ b/worlds/witness/data/utils.py @@ -204,10 +204,6 @@ def get_caves_except_path_to_challenge_exclusion_list() -> List[str]: return get_adjustment_file("settings/Exclusions/Caves_Except_Path_To_Challenge.txt") -def get_elevators_come_to_you() -> List[str]: - return get_adjustment_file("settings/Door_Shuffle/Elevators_Come_To_You.txt") - - def get_entity_hunt() -> List[str]: return get_adjustment_file("settings/Entity_Hunt.txt") diff --git a/worlds/witness/hints.py b/worlds/witness/hints.py index 99e8eea2eb89..82837aed0686 100644 --- a/worlds/witness/hints.py +++ b/worlds/witness/hints.py @@ -250,8 +250,11 @@ def word_direct_hint(world: "WitnessWorld", hint: WitnessLocationHint) -> Witnes elif group_type == "Group": location_name = f"a \"{chosen_group}\" location in {player_name}'s world" elif group_type == "Region": - if chosen_group == "Menu": - location_name = f"a location near the start of {player_name}'s game (\"Menu\" region)" + origin_region_name = world.multiworld.worlds[hint.location.player].origin_region_name + if chosen_group == origin_region_name: + location_name = ( + f"a location in the origin region of {player_name}'s world (\"{origin_region_name}\" region)" + ) else: location_name = f"a location in {player_name}'s \"{chosen_group}\" region" @@ -298,11 +301,11 @@ def hint_from_location(world: "WitnessWorld", location: str) -> Optional[Witness def get_item_and_location_names_in_random_order(world: "WitnessWorld", own_itempool: List["WitnessItem"]) -> Tuple[List[str], List[str]]: - prog_item_names_in_this_world = [ + progression_item_names_in_this_world = [ item.name for item in own_itempool if item.advancement and item.code and item.location ] - world.random.shuffle(prog_item_names_in_this_world) + world.random.shuffle(progression_item_names_in_this_world) locations_in_this_world = [ location for location in world.multiworld.get_locations(world.player) @@ -315,22 +318,24 @@ def get_item_and_location_names_in_random_order(world: "WitnessWorld", location_names_in_this_world = [location.name for location in locations_in_this_world] - return prog_item_names_in_this_world, location_names_in_this_world + return progression_item_names_in_this_world, location_names_in_this_world def make_always_and_priority_hints(world: "WitnessWorld", own_itempool: List["WitnessItem"], already_hinted_locations: Set[Location] ) -> Tuple[List[WitnessLocationHint], List[WitnessLocationHint]]: - prog_items_in_this_world, loc_in_this_world = get_item_and_location_names_in_random_order(world, own_itempool) + progression_items_in_this_world, locations_in_this_world = get_item_and_location_names_in_random_order( + world, own_itempool + ) always_items = [ item for item in get_always_hint_items(world) - if item in prog_items_in_this_world + if item in progression_items_in_this_world ] priority_items = [ item for item in get_priority_hint_items(world) - if item in prog_items_in_this_world + if item in progression_items_in_this_world ] if world.options.vague_hints: @@ -338,11 +343,11 @@ def make_always_and_priority_hints(world: "WitnessWorld", own_itempool: List["Wi else: always_locations = [ location for location in get_always_hint_locations(world) - if location in loc_in_this_world + if location in locations_in_this_world ] priority_locations = [ location for location in get_priority_hint_locations(world) - if location in loc_in_this_world + if location in locations_in_this_world ] # Get always and priority location/item hints @@ -373,7 +378,9 @@ def make_always_and_priority_hints(world: "WitnessWorld", own_itempool: List["Wi def make_extra_location_hints(world: "WitnessWorld", hint_amount: int, own_itempool: List["WitnessItem"], already_hinted_locations: Set[Location], hints_to_use_first: List[WitnessLocationHint], unhinted_locations_for_hinted_areas: Dict[str, Set[Location]]) -> List[WitnessWordedHint]: - prog_items_in_this_world, locations_in_this_world = get_item_and_location_names_in_random_order(world, own_itempool) + progression_items_in_this_world, locations_in_this_world = get_item_and_location_names_in_random_order( + world, own_itempool + ) next_random_hint_is_location = world.random.randrange(0, 2) @@ -387,7 +394,7 @@ def make_extra_location_hints(world: "WitnessWorld", hint_amount: int, own_itemp } while len(hints) < hint_amount: - if not prog_items_in_this_world and not locations_in_this_world and not hints_to_use_first: + if not progression_items_in_this_world and not locations_in_this_world and not hints_to_use_first: logging.warning(f"Ran out of items/locations to hint for player {world.player_name}.") break @@ -396,8 +403,8 @@ def make_extra_location_hints(world: "WitnessWorld", hint_amount: int, own_itemp location_hint = hints_to_use_first.pop() elif next_random_hint_is_location and locations_in_this_world: location_hint = hint_from_location(world, locations_in_this_world.pop()) - elif not next_random_hint_is_location and prog_items_in_this_world: - location_hint = hint_from_item(world, prog_items_in_this_world.pop(), own_itempool) + elif not next_random_hint_is_location and progression_items_in_this_world: + location_hint = hint_from_item(world, progression_items_in_this_world.pop(), own_itempool) # The list that the hint was supposed to be taken from was empty. # Try the other list, which has to still have something, as otherwise, all lists would be empty, # which would have triggered the guard condition above. @@ -584,9 +591,11 @@ def make_area_hints(world: "WitnessWorld", amount: int, already_hinted_locations hints = [] for hinted_area in hinted_areas: - hint_string, prog_amount, hunt_panels = word_area_hint(world, hinted_area, items_per_area[hinted_area]) + hint_string, progression_amount, hunt_panels = word_area_hint(world, hinted_area, items_per_area[hinted_area]) - hints.append(WitnessWordedHint(hint_string, None, f"hinted_area:{hinted_area}", prog_amount, hunt_panels)) + hints.append( + WitnessWordedHint(hint_string, None, f"hinted_area:{hinted_area}", progression_amount, hunt_panels) + ) if len(hinted_areas) < amount: logging.warning(f"Was not able to make {amount} area hints for player {world.player_name}. " diff --git a/worlds/witness/options.py b/worlds/witness/options.py index 4de966abe96d..b5c15e242f10 100644 --- a/worlds/witness/options.py +++ b/worlds/witness/options.py @@ -2,7 +2,18 @@ from schema import And, Schema -from Options import Choice, DefaultOnToggle, OptionDict, OptionGroup, PerGameCommonOptions, Range, Toggle, Visibility +from Options import ( + Choice, + DefaultOnToggle, + OptionDict, + OptionError, + OptionGroup, + OptionSet, + PerGameCommonOptions, + Range, + Toggle, + Visibility, +) from .data import static_logic as static_witness_logic from .data.item_definition_classes import ItemCategory, WeightedItemDefinition @@ -164,6 +175,16 @@ class ObeliskKeys(DefaultOnToggle): display_name = "Obelisk Keys" +class UnlockableWarps(Toggle): + """ + Adds unlockable fast travel points to the game. + These warp points are represented by spheres in game. You walk up to one, you unlock it for warping. + + The warp points are: Entry, Symmetry Island, Desert, Quarry, Keep, Shipwreck, Town, Jungle, Bunker, Treehouse, Mountaintop, Caves. + """ + display_name = "Unlockable Fast Travel Points" + + class ShufflePostgame(Toggle): """ Adds locations into the pool that are guaranteed to become accessible after or at the same time as your goal. @@ -284,12 +305,33 @@ class ChallengeLasers(Range): default = 11 -class ElevatorsComeToYou(Toggle): +class ElevatorsComeToYou(OptionSet): """ - If on, the Quarry Elevator, Bunker Elevator and Swamp Long Bridge will "come to you" if you approach them. - This does actually affect logic as it allows unintended backwards / early access into these areas. + In vanilla, some bridges/elevators come to you if you walk up to them when they are not currently there. + However, there are some that don't. Notably, this prevents Quarry Elevator from being a logical access method into Quarry, because you can send it away without riding ot and then permanently be locked out of using it. + + This option allows you to change specific elevators/bridges to "come to you" as well. + + - Quarry Elevator: Makes the Quarry Elevator come down when you approach it from lower Quarry and back up when you approach it from above + - Swamp Long Bridge: Rotates the side you approach it from towards you, but also rotates the other side away + - Bunker Elevator: Makes the Bunker Elevator come to any floor that you approach it from, meaning it can be accessed from the roof immediately """ - display_name = "All Bridges & Elevators come to you" + + # Used to be a toggle + @classmethod + def from_text(cls, text: str): + if text.lower() in {"off", "0", "false", "none", "null", "no"}: + raise OptionError('elevators_come_to_you is an OptionSet now. The equivalent of "false" is {}') + if text.lower() in {"on", "1", "true", "yes"}: + raise OptionError( + f'elevators_come_to_you is an OptionSet now. The equivalent of "true" is {set(cls.valid_keys)}' + ) + return super().from_text(text) + + display_name = "Elevators come to you" + + valid_keys = frozenset({"Quarry Elevator", "Swamp Long Bridge", "Bunker Elevator"}) + default = frozenset({"Quarry Elevator"}) class TrapPercentage(Range): @@ -401,6 +443,17 @@ class DeathLinkAmnesty(Range): default = 1 +class PuzzleRandomizationSeed(Range): + """ + Sigma Rando, which is the basis for all puzzle randomization in this randomizer, uses a seed from 1 to 9999999 for the puzzle randomization. + This option lets you set this seed yourself. + """ + display_name = "Puzzle Randomization Seed" + range_start = 1 + range_end = 9999999 + default = "random" + + @dataclass class TheWitnessOptions(PerGameCommonOptions): puzzle_randomization: PuzzleRandomization @@ -413,6 +466,7 @@ class TheWitnessOptions(PerGameCommonOptions): shuffle_discarded_panels: ShuffleDiscardedPanels shuffle_vault_boxes: ShuffleVaultBoxes obelisk_keys: ObeliskKeys + unlockable_warps: UnlockableWarps shuffle_EPs: ShuffleEnvironmentalPuzzles # noqa: N815 EP_difficulty: EnvironmentalPuzzlesDifficulty shuffle_postgame: ShufflePostgame @@ -435,6 +489,7 @@ class TheWitnessOptions(PerGameCommonOptions): laser_hints: LaserHints death_link: DeathLink death_link_amnesty: DeathLinkAmnesty + puzzle_randomization_seed: PuzzleRandomizationSeed shuffle_dog: ShuffleDog @@ -445,7 +500,7 @@ class TheWitnessOptions(PerGameCommonOptions): MountainLasers, ChallengeLasers, ]), - OptionGroup("Panel Hunt Settings", [ + OptionGroup("Panel Hunt Options", [ PanelHuntRequiredPercentage, PanelHuntTotal, PanelHuntPostgame, @@ -467,6 +522,9 @@ class TheWitnessOptions(PerGameCommonOptions): ShuffleBoat, ObeliskKeys, ]), + OptionGroup("Warps", [ + UnlockableWarps, + ]), OptionGroup("Filler Items", [ PuzzleSkipAmount, TrapPercentage, @@ -483,6 +541,7 @@ class TheWitnessOptions(PerGameCommonOptions): ElevatorsComeToYou, DeathLink, DeathLinkAmnesty, + PuzzleRandomizationSeed, ]), OptionGroup("Silly Options", [ ShuffleDog, diff --git a/worlds/witness/player_items.py b/worlds/witness/player_items.py index 4c98cb78495e..831e614f21c4 100644 --- a/worlds/witness/player_items.py +++ b/worlds/witness/player_items.py @@ -2,7 +2,7 @@ Defines progression, junk and event items for The Witness """ import copy -from typing import TYPE_CHECKING, Dict, List, Set, cast +from typing import TYPE_CHECKING, Dict, List, Set from BaseClasses import Item, ItemClassification, MultiWorld @@ -55,7 +55,7 @@ def __init__(self, world: "WitnessWorld", player_logic: WitnessPlayerLogic, 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.PROG_ITEMS_ACTUALLY_IN_THE_GAME + or name in player_logic.PROGRESSION_ITEMS_ACTUALLY_IN_THE_GAME } # Downgrade door items @@ -76,7 +76,7 @@ def __init__(self, world: "WitnessWorld", player_logic: WitnessPlayerLogic, } for item_name, item_data in progression_dict.items(): if isinstance(item_data.definition, ProgressiveItemDefinition): - num_progression = len(self._logic.MULTI_LISTS[item_name]) + num_progression = len(self._logic.PROGRESSIVE_LISTS[item_name]) self._mandatory_items[item_name] = num_progression else: self._mandatory_items[item_name] = 1 diff --git a/worlds/witness/player_logic.py b/worlds/witness/player_logic.py index f8b7db3570a9..58f15532f58c 100644 --- a/worlds/witness/player_logic.py +++ b/worlds/witness/player_logic.py @@ -34,7 +34,6 @@ get_discard_exclusion_list, get_early_caves_list, get_early_caves_start_list, - get_elevators_come_to_you, get_entity_hunt, get_ep_all_individual, get_ep_easy, @@ -75,13 +74,15 @@ def __init__(self, world: "WitnessWorld", disabled_locations: Set[str], start_in self.UNREACHABLE_REGIONS: Set[str] = set() + self.THEORETICAL_BASE_ITEMS: Set[str] = set() self.THEORETICAL_ITEMS: Set[str] = set() - self.THEORETICAL_ITEMS_NO_MULTI: Set[str] = set() - self.MULTI_AMOUNTS: Dict[str, int] = defaultdict(lambda: 1) - self.MULTI_LISTS: Dict[str, List[str]] = {} - self.PROG_ITEMS_ACTUALLY_IN_THE_GAME_NO_MULTI: Set[str] = set() - self.PROG_ITEMS_ACTUALLY_IN_THE_GAME: Set[str] = set() + self.BASE_PROGESSION_ITEMS_ACTUALLY_IN_THE_GAME: Set[str] = set() + self.PROGRESSION_ITEMS_ACTUALLY_IN_THE_GAME: Set[str] = set() + + 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.STARTING_INVENTORY: Set[str] = set() self.DIFFICULTY = world.options.puzzle_randomization @@ -183,13 +184,13 @@ def reduce_req_within_region(self, entity_hex: str) -> WitnessRule: # Remove any items that don't actually exist in the settings (e.g. Symbol Shuffle turned off) these_items = frozenset({ - subset.intersection(self.THEORETICAL_ITEMS_NO_MULTI) + subset.intersection(self.THEORETICAL_BASE_ITEMS) for subset in these_items }) # Update the list of "items that are actually being used by any entity" for subset in these_items: - self.PROG_ITEMS_ACTUALLY_IN_THE_GAME_NO_MULTI.update(subset) + self.BASE_PROGESSION_ITEMS_ACTUALLY_IN_THE_GAME.update(subset) # Handle door entities (door shuffle) if entity_hex in self.DOOR_ITEMS_BY_ID: @@ -197,7 +198,7 @@ def reduce_req_within_region(self, entity_hex: str) -> WitnessRule: door_items = frozenset({frozenset([item]) for item in self.DOOR_ITEMS_BY_ID[entity_hex]}) for dependent_item in door_items: - self.PROG_ITEMS_ACTUALLY_IN_THE_GAME_NO_MULTI.update(dependent_item) + self.BASE_PROGESSION_ITEMS_ACTUALLY_IN_THE_GAME.update(dependent_item) these_items = logical_and_witness_rules([door_items, these_items]) @@ -299,10 +300,10 @@ def make_single_adjustment(self, adj_type: str, line: str) -> None: self.THEORETICAL_ITEMS.add(item_name) if isinstance(static_witness_logic.ALL_ITEMS[item_name], ProgressiveItemDefinition): - self.THEORETICAL_ITEMS_NO_MULTI.update(cast(ProgressiveItemDefinition, - static_witness_logic.ALL_ITEMS[item_name]).child_item_names) + self.THEORETICAL_BASE_ITEMS.update(cast(ProgressiveItemDefinition, + static_witness_logic.ALL_ITEMS[item_name]).child_item_names) else: - self.THEORETICAL_ITEMS_NO_MULTI.add(item_name) + self.THEORETICAL_BASE_ITEMS.add(item_name) if static_witness_logic.ALL_ITEMS[item_name].category in [ItemCategory.DOOR, ItemCategory.LASER]: entity_hexes = cast(DoorItemDefinition, static_witness_logic.ALL_ITEMS[item_name]).panel_id_hexes @@ -316,11 +317,11 @@ def make_single_adjustment(self, adj_type: str, line: str) -> None: self.THEORETICAL_ITEMS.discard(item_name) if isinstance(static_witness_logic.ALL_ITEMS[item_name], ProgressiveItemDefinition): - self.THEORETICAL_ITEMS_NO_MULTI.difference_update( + self.THEORETICAL_BASE_ITEMS.difference_update( cast(ProgressiveItemDefinition, static_witness_logic.ALL_ITEMS[item_name]).child_item_names ) else: - self.THEORETICAL_ITEMS_NO_MULTI.discard(item_name) + self.THEORETICAL_BASE_ITEMS.discard(item_name) if static_witness_logic.ALL_ITEMS[item_name].category in [ItemCategory.DOOR, ItemCategory.LASER]: entity_hexes = cast(DoorItemDefinition, static_witness_logic.ALL_ITEMS[item_name]).panel_id_hexes @@ -624,8 +625,29 @@ def make_options_adjustments(self, world: "WitnessWorld") -> None: if world.options.early_caves == "add_to_pool" and not remote_doors: adjustment_linesets_in_order.append(get_early_caves_list()) - if world.options.elevators_come_to_you: - adjustment_linesets_in_order.append(get_elevators_come_to_you()) + if "Quarry Elevator" in world.options.elevators_come_to_you: + adjustment_linesets_in_order.append([ + "New Connections:", + "Quarry - Quarry Elevator - TrueOneWay", + "Outside Quarry - Quarry Elevator - TrueOneWay", + ]) + if "Bunker Elevator" in world.options.elevators_come_to_you: + adjustment_linesets_in_order.append([ + "New Connections:", + "Outside Bunker - Bunker Elevator - TrueOneWay", + ]) + if "Swamp Long Bridge" in world.options.elevators_come_to_you: + adjustment_linesets_in_order.append([ + "New Connections:", + "Outside Swamp - Swamp Long Bridge - TrueOneWay", + "Swamp Near Boat - Swamp Long Bridge - TrueOneWay", + "Requirement Changes:", + "0x035DE - 0x17E2B - True", # Swamp Purple Sand Bottom EP + ]) + # if "Town Maze Rooftop Bridge" in world.options.elevators_come_to_you: + # adjustment_linesets_in_order.append([ + # "New Connections:" + # "Town Red Rooftop - Town Maze Rooftop - TrueOneWay" if world.options.victory_condition == "panel_hunt": adjustment_linesets_in_order.append(get_entity_hunt()) @@ -843,7 +865,7 @@ def make_dependency_reduced_checklist(self) -> None: self.REQUIREMENTS_BY_HEX = {} self.USED_EVENT_NAMES_BY_HEX = defaultdict(list) self.CONNECTIONS_BY_REGION_NAME = {} - self.PROG_ITEMS_ACTUALLY_IN_THE_GAME_NO_MULTI = set() + self.BASE_PROGESSION_ITEMS_ACTUALLY_IN_THE_GAME = set() # Make independent requirements for entities for entity_hex in self.DEPENDENT_REQUIREMENTS_BY_HEX.keys(): @@ -868,18 +890,18 @@ def finalize_items(self) -> None: """ Finalise which items are used in the world, and handle their progressive versions. """ - for item in self.PROG_ITEMS_ACTUALLY_IN_THE_GAME_NO_MULTI: + for item in self.BASE_PROGESSION_ITEMS_ACTUALLY_IN_THE_GAME: if item not in self.THEORETICAL_ITEMS: progressive_item_name = static_witness_logic.get_parent_progressive_item(item) - self.PROG_ITEMS_ACTUALLY_IN_THE_GAME.add(progressive_item_name) + self.PROGRESSION_ITEMS_ACTUALLY_IN_THE_GAME.add(progressive_item_name) child_items = cast(ProgressiveItemDefinition, static_witness_logic.ALL_ITEMS[progressive_item_name]).child_item_names - multi_list = [child_item for child_item in child_items - if child_item in self.PROG_ITEMS_ACTUALLY_IN_THE_GAME_NO_MULTI] - self.MULTI_AMOUNTS[item] = multi_list.index(item) + 1 - self.MULTI_LISTS[progressive_item_name] = multi_list + progressive_list = [child_item for child_item in child_items + if child_item in self.BASE_PROGESSION_ITEMS_ACTUALLY_IN_THE_GAME] + self.PARENT_ITEM_COUNT_PER_BASE_ITEM[item] = progressive_list.index(item) + 1 + self.PROGRESSIVE_LISTS[progressive_item_name] = progressive_list else: - self.PROG_ITEMS_ACTUALLY_IN_THE_GAME.add(item) + self.PROGRESSION_ITEMS_ACTUALLY_IN_THE_GAME.add(item) def solvability_guaranteed(self, entity_hex: str) -> bool: return not ( @@ -962,7 +984,7 @@ def make_event_panel_lists(self) -> None: Makes event-item pairs for entities with associated events, unless these entities are disabled. """ - self.ALWAYS_EVENT_NAMES_BY_HEX[self.VICTORY_LOCATION] = "Victory" + self.USED_EVENT_NAMES_BY_HEX[self.VICTORY_LOCATION].append("Victory") for event_hex, event_name in self.ALWAYS_EVENT_NAMES_BY_HEX.items(): self.USED_EVENT_NAMES_BY_HEX[event_hex].append(event_name) diff --git a/worlds/witness/presets.py b/worlds/witness/presets.py index 8993048065f4..687d74f771cb 100644 --- a/worlds/witness/presets.py +++ b/worlds/witness/presets.py @@ -35,7 +35,8 @@ "challenge_lasers": 11, "early_caves": EarlyCaves.option_off, - "elevators_come_to_you": False, + + "elevators_come_to_you": ElevatorsComeToYou.default, "trap_percentage": TrapPercentage.default, "puzzle_skip_amount": PuzzleSkipAmount.default, @@ -73,7 +74,8 @@ "challenge_lasers": 9, "early_caves": EarlyCaves.option_off, - "elevators_come_to_you": False, + + "elevators_come_to_you": ElevatorsComeToYou.default, "trap_percentage": TrapPercentage.default, "puzzle_skip_amount": 15, @@ -111,7 +113,8 @@ "challenge_lasers": 9, "early_caves": EarlyCaves.option_off, - "elevators_come_to_you": True, + + "elevators_come_to_you": ElevatorsComeToYou.valid_keys, "trap_percentage": TrapPercentage.default, "puzzle_skip_amount": 15, diff --git a/worlds/witness/rules.py b/worlds/witness/rules.py index 74ea2aef5740..dac1556e46d4 100644 --- a/worlds/witness/rules.py +++ b/worlds/witness/rules.py @@ -201,10 +201,10 @@ def _has_item(item: str, world: "WitnessWorld", if item == "Theater to Tunnels": return lambda state: _can_do_theater_to_tunnels(state, world) - prog_item = static_witness_logic.get_parent_progressive_item(item) - needed_amount = player_logic.MULTI_AMOUNTS[item] + actual_item = static_witness_logic.get_parent_progressive_item(item) + needed_amount = player_logic.PARENT_ITEM_COUNT_PER_BASE_ITEM[item] - simple_rule: SimpleItemRepresentation = SimpleItemRepresentation(prog_item, needed_amount) + simple_rule: SimpleItemRepresentation = SimpleItemRepresentation(actual_item, needed_amount) return simple_rule @@ -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 diff --git a/worlds/witness/test/test_auto_elevators.py b/worlds/witness/test/test_auto_elevators.py index 16b1b5a56d37..f91943e85577 100644 --- a/worlds/witness/test/test_auto_elevators.py +++ b/worlds/witness/test/test_auto_elevators.py @@ -1,49 +1,25 @@ -from ..test import WitnessMultiworldTestBase, WitnessTestBase - - -class TestElevatorsComeToYou(WitnessTestBase): - options = { - "elevators_come_to_you": True, - "shuffle_doors": "mixed", - "shuffle_symbols": False, - } - - def test_bunker_laser(self) -> None: - """ - In elevators_come_to_you, Bunker can be entered from the back. - This means that you can access the laser with just Bunker Elevator Control (Panel). - It also means that you can, for example, access UV Room with the Control and the Elevator Room Entry Door. - """ - - self.assertFalse(self.multiworld.state.can_reach("Bunker Laser Panel", "Location", self.player)) - - self.collect_by_name("Bunker Elevator Control (Panel)") - - self.assertTrue(self.multiworld.state.can_reach("Bunker Laser Panel", "Location", self.player)) - self.assertFalse(self.multiworld.state.can_reach("Bunker UV Room 2", "Location", self.player)) - - self.collect_by_name("Bunker Elevator Room Entry (Door)") - self.collect_by_name("Bunker Drop-Down Door Controls (Panel)") - - self.assertTrue(self.multiworld.state.can_reach("Bunker UV Room 2", "Location", self.player)) +from ..test import WitnessMultiworldTestBase class TestElevatorsComeToYouBleed(WitnessMultiworldTestBase): options_per_world = [ { - "elevators_come_to_you": False, + "elevators_come_to_you": {}, }, { - "elevators_come_to_you": True, + "elevators_come_to_you": {"Quarry Elevator", "Swamp Long Bridge", "Bunker Elevator"}, }, { - "elevators_come_to_you": False, + "elevators_come_to_you": {} }, ] common_options = { "shuffle_symbols": False, "shuffle_doors": "panels", + "shuffle_boat": True, + "shuffle_EPs": "individual", + "obelisk_keys": False, } def test_correct_access_per_player(self) -> None: @@ -53,14 +29,22 @@ def test_correct_access_per_player(self) -> None: (This is essentially a "does connection info bleed over" test). """ - self.assertFalse(self.multiworld.state.can_reach("Bunker Laser Panel", "Location", 1)) - self.assertFalse(self.multiworld.state.can_reach("Bunker Laser Panel", "Location", 2)) - self.assertFalse(self.multiworld.state.can_reach("Bunker Laser Panel", "Location", 3)) - - self.collect_by_name(["Bunker Elevator Control (Panel)"], 1) - self.collect_by_name(["Bunker Elevator Control (Panel)"], 2) - self.collect_by_name(["Bunker Elevator Control (Panel)"], 3) - - self.assertFalse(self.multiworld.state.can_reach("Bunker Laser Panel", "Location", 1)) - self.assertTrue(self.multiworld.state.can_reach("Bunker Laser Panel", "Location", 2)) - self.assertFalse(self.multiworld.state.can_reach("Bunker Laser Panel", "Location", 3)) + combinations = [ + ("Quarry Elevator Control (Panel)", "Quarry Boathouse Intro Left"), + ("Swamp Long Bridge (Panel)", "Swamp Long Bridge Side EP"), + ("Bunker Elevator Control (Panel)", "Bunker Laser Panel"), + ] + + for item, location in combinations: + with self.subTest(f"Test that {item} only locks {location} for player 2"): + self.assertFalse(self.multiworld.state.can_reach_location(location, 1)) + self.assertFalse(self.multiworld.state.can_reach_location(location, 2)) + self.assertFalse(self.multiworld.state.can_reach_location(location, 3)) + + self.collect_by_name(item, 1) + self.collect_by_name(item, 2) + self.collect_by_name(item, 3) + + self.assertFalse(self.multiworld.state.can_reach_location(location, 1)) + self.assertTrue(self.multiworld.state.can_reach_location(location, 2)) + self.assertFalse(self.multiworld.state.can_reach_location(location, 3)) diff --git a/worlds/witness/test/test_disable_non_randomized.py b/worlds/witness/test/test_disable_non_randomized.py index e7cb1597b2ba..bf285f035d5b 100644 --- a/worlds/witness/test/test_disable_non_randomized.py +++ b/worlds/witness/test/test_disable_non_randomized.py @@ -3,6 +3,8 @@ class TestDisableNonRandomized(WitnessTestBase): + run_default_tests = False + options = { "disable_non_randomized_puzzles": True, "shuffle_doors": "panels", diff --git a/worlds/witness/test/test_roll_other_options.py b/worlds/witness/test/test_roll_other_options.py index 7473716e06e6..05f3235a1f4d 100644 --- a/worlds/witness/test/test_roll_other_options.py +++ b/worlds/witness/test/test_roll_other_options.py @@ -1,3 +1,4 @@ +from ..options import ElevatorsComeToYou from ..test import WitnessTestBase # These are just some random options combinations, just to catch whether I broke anything obvious @@ -19,7 +20,7 @@ class TestExpertNonRandomizedEPs(WitnessTestBase): class TestVanillaAutoElevatorsPanels(WitnessTestBase): options = { "puzzle_randomization": "none", - "elevators_come_to_you": True, + "elevators_come_to_you": ElevatorsComeToYou.valid_keys - ElevatorsComeToYou.default, # Opposite of default "shuffle_doors": "panels", "victory_condition": "mountain_box_short", "early_caves": True, @@ -61,3 +62,10 @@ class TestPostgameGroupedDoors(WitnessTestBase): "door_groupings": "regional", "victory_condition": "elevator", } + + +class TestPostgamePanels(WitnessTestBase): + options = { + "victory_condition": "mountain_box_long", + "shuffle_postgame": True + } diff --git a/worlds/yachtdice/Items.py b/worlds/yachtdice/Items.py index c76dc538146e..d6488498f51a 100644 --- a/worlds/yachtdice/Items.py +++ b/worlds/yachtdice/Items.py @@ -16,7 +16,7 @@ class YachtDiceItem(Item): item_table = { - "Dice": ItemData(16871244000, ItemClassification.progression), + "Dice": ItemData(16871244000, ItemClassification.progression | ItemClassification.useful), "Dice Fragment": ItemData(16871244001, ItemClassification.progression), "Roll": ItemData(16871244002, ItemClassification.progression), "Roll Fragment": ItemData(16871244003, ItemClassification.progression), @@ -64,7 +64,7 @@ class YachtDiceItem(Item): # These points are included in the logic and might be necessary to progress. "1 Point": ItemData(16871244301, ItemClassification.progression_skip_balancing), "10 Points": ItemData(16871244302, ItemClassification.progression), - "100 Points": ItemData(16871244303, ItemClassification.progression), + "100 Points": ItemData(16871244303, ItemClassification.progression | ItemClassification.useful), } # item groups for better hinting diff --git a/worlds/yachtdice/Options.py b/worlds/yachtdice/Options.py index e687936224c3..f311caa5a993 100644 --- a/worlds/yachtdice/Options.py +++ b/worlds/yachtdice/Options.py @@ -80,7 +80,7 @@ class NumberRollFragmentsPerRoll(Range): """ Rolls can be split into fragments, gathering enough will give you an extra roll. You start with one roll, and there will always be one full roll in the pool. - The other three rolls are split into fragments, according to this option. + The other rolls are split into fragments, according to this option. Setting this to 1 fragment per roll just puts "Roll" objects in the pool. """ diff --git a/worlds/yachtdice/Rules.py b/worlds/yachtdice/Rules.py index d99f5b147493..3fb712fdca09 100644 --- a/worlds/yachtdice/Rules.py +++ b/worlds/yachtdice/Rules.py @@ -101,14 +101,15 @@ def dice_simulation_strings(categories, num_dice, num_rolls, fixed_mult, step_mu return yachtdice_cache[player][tup] # sort categories because for the step multiplier, you will want low-scoring categories first - categories.sort(key=lambda category: category.mean_score(num_dice, num_rolls)) + # to avoid errors with order changing when obtaining rolls, we order assuming 4 rolls + categories.sort(key=lambda category: category.mean_score(num_dice, 4)) # function to add two discrete distribution. # defaultdict is a dict where you don't need to check if an id is present, you can just use += (lot faster) def add_distributions(dist1, dist2): combined_dist = defaultdict(float) - for val1, prob1 in dist1.items(): - for val2, prob2 in dist2.items(): + for val2, prob2 in dist2.items(): + for val1, prob1 in dist1.items(): combined_dist[val1 + val2] += prob1 * prob2 return dict(combined_dist) diff --git a/worlds/yachtdice/YachtWeights.py b/worlds/yachtdice/YachtWeights.py index 5f647f3420ba..f18766d9498a 100644 --- a/worlds/yachtdice/YachtWeights.py +++ b/worlds/yachtdice/YachtWeights.py @@ -1,11 +1,3 @@ -# A file containing the results of our simulations. -# Every entry consists of a key. This key has input category, number of dice, and number of rolls. -# The value then shows a list of all possible scores to get, and how many times of 100000 it achieved. - -# example: ("Category Choice", 2, 2): -# {8: 13639, 9: 12220, 10: 13755, 5: 4889, 6: 9840, 7: 14772, 12: 7780, 11: 15622, 2: 1269, 3: 2445, 4: 3769} -# this example shows the outcomes for the category "Category Choice", with 2 dice and 2 rolls. -# 13639 out of 100000 times, a score of 8 was achieved for example. yacht_weights = { ("Category Ones", 0, 0): {0: 100000}, ("Category Ones", 0, 1): {0: 100000}, @@ -30,64 +22,64 @@ ("Category Ones", 2, 2): {0: 100000}, ("Category Ones", 2, 3): {0: 33544, 1: 66456}, ("Category Ones", 2, 4): {0: 23342, 1: 76658}, - ("Category Ones", 2, 5): {0: 16036, 2: 83964}, - ("Category Ones", 2, 6): {0: 11355, 2: 88645}, - ("Category Ones", 2, 7): {0: 7812, 2: 92188}, - ("Category Ones", 2, 8): {0: 5395, 2: 94605}, + ("Category Ones", 2, 5): {0: 16036, 1: 83964}, + ("Category Ones", 2, 6): {0: 11355, 1: 88645}, + ("Category Ones", 2, 7): {0: 7812, 1: 92188}, + ("Category Ones", 2, 8): {0: 5395, 1: 94605}, ("Category Ones", 3, 0): {0: 100000}, ("Category Ones", 3, 1): {0: 100000}, ("Category Ones", 3, 2): {0: 33327, 1: 66673}, - ("Category Ones", 3, 3): {0: 19432, 2: 80568}, - ("Category Ones", 3, 4): {0: 11191, 2: 88809}, - ("Category Ones", 3, 5): {0: 35427, 2: 64573}, - ("Category Ones", 3, 6): {0: 26198, 2: 73802}, - ("Category Ones", 3, 7): {0: 18851, 3: 81149}, - ("Category Ones", 3, 8): {0: 13847, 3: 86153}, + ("Category Ones", 3, 3): {0: 19432, 1: 80568}, + ("Category Ones", 3, 4): {0: 11191, 1: 88809}, + ("Category Ones", 3, 5): {0: 3963, 2: 64583, 1: 31454}, + ("Category Ones", 3, 6): {0: 3286, 2: 96714}, + ("Category Ones", 3, 7): {0: 57, 2: 99943}, + ("Category Ones", 3, 8): {2: 100000}, ("Category Ones", 4, 0): {0: 100000}, ("Category Ones", 4, 1): {0: 100000}, - ("Category Ones", 4, 2): {0: 23349, 2: 76651}, - ("Category Ones", 4, 3): {0: 11366, 2: 88634}, - ("Category Ones", 4, 4): {0: 28572, 3: 71428}, - ("Category Ones", 4, 5): {0: 17976, 3: 82024}, - ("Category Ones", 4, 6): {0: 1253, 3: 98747}, - ("Category Ones", 4, 7): {0: 31228, 3: 68772}, - ("Category Ones", 4, 8): {0: 23273, 4: 76727}, + ("Category Ones", 4, 2): {0: 23349, 1: 76651}, + ("Category Ones", 4, 3): {0: 11366, 1: 88634}, + ("Category Ones", 4, 4): {0: 3246, 2: 71438, 1: 25316}, + ("Category Ones", 4, 5): {0: 1466, 2: 98534}, + ("Category Ones", 4, 6): {0: 7, 2: 99993}, + ("Category Ones", 4, 7): {0: 2, 2: 31222, 3: 68776}, + ("Category Ones", 4, 8): {3: 99999, 2: 1}, ("Category Ones", 5, 0): {0: 100000}, ("Category Ones", 5, 1): {0: 100000}, - ("Category Ones", 5, 2): {0: 16212, 2: 83788}, - ("Category Ones", 5, 3): {0: 30104, 3: 69896}, - ("Category Ones", 5, 4): {0: 2552, 3: 97448}, - ("Category Ones", 5, 5): {0: 32028, 4: 67972}, - ("Category Ones", 5, 6): {0: 21215, 4: 78785}, - ("Category Ones", 5, 7): {0: 2295, 4: 97705}, - ("Category Ones", 5, 8): {0: 1167, 4: 98833}, + ("Category Ones", 5, 2): {0: 16212, 1: 83788}, + ("Category Ones", 5, 3): {0: 4879, 2: 69906, 1: 25215}, + ("Category Ones", 5, 4): {0: 1513, 2: 98487}, + ("Category Ones", 5, 5): {0: 484, 2: 31541, 3: 67975}, + ("Category Ones", 5, 6): {3: 99785, 2: 215}, + ("Category Ones", 5, 7): {3: 100000}, + ("Category Ones", 5, 8): {4: 66815, 3: 33185}, ("Category Ones", 6, 0): {0: 100000}, ("Category Ones", 6, 1): {0: 33501, 1: 66499}, - ("Category Ones", 6, 2): {0: 40705, 2: 59295}, - ("Category Ones", 6, 3): {0: 3764, 3: 96236}, - ("Category Ones", 6, 4): {0: 9324, 4: 90676}, - ("Category Ones", 6, 5): {0: 4208, 4: 95792}, - ("Category Ones", 6, 6): {0: 158, 5: 99842}, - ("Category Ones", 6, 7): {0: 5503, 5: 94497}, - ("Category Ones", 6, 8): {0: 2896, 5: 97104}, + ("Category Ones", 6, 2): {0: 11326, 1: 88674}, + ("Category Ones", 6, 3): {0: 2289, 2: 79783, 1: 17928}, + ("Category Ones", 6, 4): {0: 10, 3: 68933, 2: 30973, 1: 84}, + ("Category Ones", 6, 5): {0: 4, 3: 99996}, + ("Category Ones", 6, 6): {2: 1, 4: 67785, 3: 32214}, + ("Category Ones", 6, 7): {4: 100000}, + ("Category Ones", 6, 8): {4: 100000}, ("Category Ones", 7, 0): {0: 100000}, - ("Category Ones", 7, 1): {0: 27838, 2: 72162}, - ("Category Ones", 7, 2): {0: 7796, 3: 92204}, - ("Category Ones", 7, 3): {0: 13389, 4: 86611}, - ("Category Ones", 7, 4): {0: 5252, 4: 94748}, - ("Category Ones", 7, 5): {0: 9854, 5: 90146}, - ("Category Ones", 7, 6): {0: 4625, 5: 95375}, - ("Category Ones", 7, 7): {0: 30339, 6: 69661}, - ("Category Ones", 7, 8): {0: 5519, 6: 94481}, + ("Category Ones", 7, 1): {0: 27838, 1: 72162}, + ("Category Ones", 7, 2): {0: 8807, 2: 68364, 1: 22829}, + ("Category Ones", 7, 3): {0: 75, 3: 62348, 2: 35246, 1: 2331}, + ("Category Ones", 7, 4): {0: 6, 3: 99994}, + ("Category Ones", 7, 5): {3: 29500, 4: 70500}, + ("Category Ones", 7, 6): {4: 100000}, + ("Category Ones", 7, 7): {4: 30322, 5: 69678}, + ("Category Ones", 7, 8): {5: 100000}, ("Category Ones", 8, 0): {0: 100000}, - ("Category Ones", 8, 1): {0: 23156, 2: 76844}, - ("Category Ones", 8, 2): {0: 5472, 3: 94528}, - ("Category Ones", 8, 3): {0: 8661, 4: 91339}, - ("Category Ones", 8, 4): {0: 12125, 5: 87875}, - ("Category Ones", 8, 5): {0: 5173, 5: 94827}, - ("Category Ones", 8, 6): {0: 8872, 6: 91128}, - ("Category Ones", 8, 7): {0: 4236, 6: 95764}, - ("Category Ones", 8, 8): {0: 9107, 7: 90893}, + ("Category Ones", 8, 1): {0: 23156, 1: 76844}, + ("Category Ones", 8, 2): {0: 5678, 2: 75480, 1: 18842}, + ("Category Ones", 8, 3): {0: 28, 3: 99972}, + ("Category Ones", 8, 4): {3: 32486, 4: 67514}, + ("Category Ones", 8, 5): {4: 100000}, + ("Category Ones", 8, 6): {5: 74125, 4: 25875}, + ("Category Ones", 8, 7): {6: 60476, 5: 29297, 4: 10227}, + ("Category Ones", 8, 8): {6: 99999, 5: 1}, ("Category Twos", 0, 0): {0: 100000}, ("Category Twos", 0, 1): {0: 100000}, ("Category Twos", 0, 2): {0: 100000}, @@ -99,7 +91,7 @@ ("Category Twos", 0, 8): {0: 100000}, ("Category Twos", 1, 0): {0: 100000}, ("Category Twos", 1, 1): {0: 100000}, - ("Category Twos", 1, 2): {0: 100000}, + ("Category Twos", 1, 2): {0: 69690, 2: 30310}, ("Category Twos", 1, 3): {0: 57818, 2: 42182}, ("Category Twos", 1, 4): {0: 48418, 2: 51582}, ("Category Twos", 1, 5): {0: 40301, 2: 59699}, @@ -107,68 +99,68 @@ ("Category Twos", 1, 7): {0: 28182, 2: 71818}, ("Category Twos", 1, 8): {0: 23406, 2: 76594}, ("Category Twos", 2, 0): {0: 100000}, - ("Category Twos", 2, 1): {0: 100000}, + ("Category Twos", 2, 1): {0: 69724, 2: 30276}, ("Category Twos", 2, 2): {0: 48238, 2: 51762}, - ("Category Twos", 2, 3): {0: 33290, 4: 66710}, - ("Category Twos", 2, 4): {0: 23136, 4: 76864}, - ("Category Twos", 2, 5): {0: 16146, 4: 83854}, - ("Category Twos", 2, 6): {0: 11083, 4: 88917}, - ("Category Twos", 2, 7): {0: 7662, 4: 92338}, - ("Category Twos", 2, 8): {0: 5354, 4: 94646}, + ("Category Twos", 2, 3): {0: 33290, 2: 66710}, + ("Category Twos", 2, 4): {0: 23136, 2: 76864}, + ("Category Twos", 2, 5): {0: 16146, 2: 48200, 4: 35654}, + ("Category Twos", 2, 6): {0: 11083, 2: 44497, 4: 44420}, + ("Category Twos", 2, 7): {0: 7662, 2: 40343, 4: 51995}, + ("Category Twos", 2, 8): {0: 5354, 2: 35526, 4: 59120}, ("Category Twos", 3, 0): {0: 100000}, ("Category Twos", 3, 1): {0: 58021, 2: 41979}, - ("Category Twos", 3, 2): {0: 33548, 4: 66452}, - ("Category Twos", 3, 3): {0: 19375, 4: 80625}, - ("Category Twos", 3, 4): {0: 10998, 4: 89002}, - ("Category Twos", 3, 5): {0: 6519, 6: 93481}, - ("Category Twos", 3, 6): {0: 3619, 6: 96381}, - ("Category Twos", 3, 7): {0: 2195, 6: 97805}, - ("Category Twos", 3, 8): {0: 13675, 6: 86325}, + ("Category Twos", 3, 2): {0: 33548, 2: 66452}, + ("Category Twos", 3, 3): {0: 19375, 2: 42372, 4: 38253}, + ("Category Twos", 3, 4): {0: 10998, 2: 36435, 4: 52567}, + ("Category Twos", 3, 5): {0: 7954, 4: 92046}, + ("Category Twos", 3, 6): {0: 347, 4: 99653}, + ("Category Twos", 3, 7): {0: 2, 4: 62851, 6: 37147}, + ("Category Twos", 3, 8): {6: 99476, 4: 524}, ("Category Twos", 4, 0): {0: 100000}, ("Category Twos", 4, 1): {0: 48235, 2: 51765}, - ("Category Twos", 4, 2): {0: 23289, 4: 76711}, - ("Category Twos", 4, 3): {0: 11177, 6: 88823}, - ("Category Twos", 4, 4): {0: 5499, 6: 94501}, - ("Category Twos", 4, 5): {0: 18356, 6: 81644}, - ("Category Twos", 4, 6): {0: 11169, 8: 88831}, - ("Category Twos", 4, 7): {0: 6945, 8: 93055}, - ("Category Twos", 4, 8): {0: 4091, 8: 95909}, + ("Category Twos", 4, 2): {0: 23289, 2: 40678, 4: 36033}, + ("Category Twos", 4, 3): {0: 11177, 2: 32677, 4: 56146}, + ("Category Twos", 4, 4): {0: 5522, 4: 60436, 6: 34042}, + ("Category Twos", 4, 5): {0: 4358, 6: 95642}, + ("Category Twos", 4, 6): {0: 20, 6: 99980}, + ("Category Twos", 4, 7): {6: 100000}, + ("Category Twos", 4, 8): {6: 65250, 8: 34750}, ("Category Twos", 5, 0): {0: 100000}, - ("Category Twos", 5, 1): {0: 40028, 4: 59972}, - ("Category Twos", 5, 2): {0: 16009, 6: 83991}, - ("Category Twos", 5, 3): {0: 6489, 6: 93511}, - ("Category Twos", 5, 4): {0: 16690, 8: 83310}, - ("Category Twos", 5, 5): {0: 9016, 8: 90984}, - ("Category Twos", 5, 6): {0: 4602, 8: 95398}, - ("Category Twos", 5, 7): {0: 13627, 10: 86373}, - ("Category Twos", 5, 8): {0: 8742, 10: 91258}, + ("Category Twos", 5, 1): {0: 40028, 2: 59972}, + ("Category Twos", 5, 2): {0: 16009, 2: 35901, 4: 48090}, + ("Category Twos", 5, 3): {0: 6820, 4: 57489, 6: 35691}, + ("Category Twos", 5, 4): {0: 5285, 6: 94715}, + ("Category Twos", 5, 5): {0: 18, 6: 66613, 8: 33369}, + ("Category Twos", 5, 6): {8: 99073, 6: 927}, + ("Category Twos", 5, 7): {8: 100000}, + ("Category Twos", 5, 8): {8: 100000}, ("Category Twos", 6, 0): {0: 100000}, - ("Category Twos", 6, 1): {0: 33502, 4: 66498}, - ("Category Twos", 6, 2): {0: 11210, 6: 88790}, - ("Category Twos", 6, 3): {0: 3673, 6: 96327}, - ("Category Twos", 6, 4): {0: 9291, 8: 90709}, - ("Category Twos", 6, 5): {0: 441, 8: 99559}, - ("Category Twos", 6, 6): {0: 10255, 10: 89745}, - ("Category Twos", 6, 7): {0: 5646, 10: 94354}, - ("Category Twos", 6, 8): {0: 14287, 12: 85713}, + ("Category Twos", 6, 1): {0: 33502, 2: 66498}, + ("Category Twos", 6, 2): {0: 13681, 4: 59162, 2: 27157}, + ("Category Twos", 6, 3): {0: 5486, 6: 94514}, + ("Category Twos", 6, 4): {0: 190, 6: 62108, 8: 37702}, + ("Category Twos", 6, 5): {8: 99882, 6: 118}, + ("Category Twos", 6, 6): {8: 65144, 10: 34856}, + ("Category Twos", 6, 7): {10: 99524, 8: 476}, + ("Category Twos", 6, 8): {10: 100000}, ("Category Twos", 7, 0): {0: 100000}, - ("Category Twos", 7, 1): {0: 27683, 4: 72317}, - ("Category Twos", 7, 2): {0: 7824, 6: 92176}, - ("Category Twos", 7, 3): {0: 13167, 8: 86833}, - ("Category Twos", 7, 4): {0: 564, 10: 99436}, - ("Category Twos", 7, 5): {0: 9824, 10: 90176}, - ("Category Twos", 7, 6): {0: 702, 12: 99298}, - ("Category Twos", 7, 7): {0: 10186, 12: 89814}, - ("Category Twos", 7, 8): {0: 942, 12: 99058}, + ("Category Twos", 7, 1): {0: 27683, 2: 39060, 4: 33257}, + ("Category Twos", 7, 2): {0: 8683, 4: 54932, 6: 36385}, + ("Category Twos", 7, 3): {0: 373, 6: 66572, 8: 33055}, + ("Category Twos", 7, 4): {8: 99816, 6: 184}, + ("Category Twos", 7, 5): {8: 58124, 10: 41876}, + ("Category Twos", 7, 6): {10: 99948, 8: 52}, + ("Category Twos", 7, 7): {10: 62549, 12: 37451}, + ("Category Twos", 7, 8): {12: 99818, 10: 182}, ("Category Twos", 8, 0): {0: 100000}, - ("Category Twos", 8, 1): {0: 23378, 4: 76622}, - ("Category Twos", 8, 2): {0: 5420, 8: 94580}, - ("Category Twos", 8, 3): {0: 8560, 10: 91440}, - ("Category Twos", 8, 4): {0: 12199, 12: 87801}, - ("Category Twos", 8, 5): {0: 879, 12: 99121}, - ("Category Twos", 8, 6): {0: 9033, 14: 90967}, - ("Category Twos", 8, 7): {0: 15767, 14: 84233}, - ("Category Twos", 8, 8): {2: 9033, 14: 90967}, + ("Category Twos", 8, 1): {0: 23378, 2: 37157, 4: 39465}, + ("Category Twos", 8, 2): {0: 5602, 6: 94398}, + ("Category Twos", 8, 3): {0: 8, 6: 10911, 8: 89081}, + ("Category Twos", 8, 4): {8: 59809, 10: 40191}, + ("Category Twos", 8, 5): {10: 68808, 12: 31114, 8: 78}, + ("Category Twos", 8, 6): {12: 98712, 10: 1287, 8: 1}, + ("Category Twos", 8, 7): {12: 100000}, + ("Category Twos", 8, 8): {12: 59018, 14: 40982}, ("Category Threes", 0, 0): {0: 100000}, ("Category Threes", 0, 1): {0: 100000}, ("Category Threes", 0, 2): {0: 100000}, @@ -190,66 +182,66 @@ ("Category Threes", 2, 0): {0: 100000}, ("Category Threes", 2, 1): {0: 69419, 3: 30581}, ("Category Threes", 2, 2): {0: 48202, 3: 51798}, - ("Category Threes", 2, 3): {0: 33376, 6: 66624}, - ("Category Threes", 2, 4): {0: 23276, 6: 76724}, - ("Category Threes", 2, 5): {0: 16092, 6: 83908}, - ("Category Threes", 2, 6): {0: 11232, 6: 88768}, - ("Category Threes", 2, 7): {0: 7589, 6: 92411}, - ("Category Threes", 2, 8): {0: 5447, 6: 94553}, + ("Category Threes", 2, 3): {0: 33376, 3: 66624}, + ("Category Threes", 2, 4): {0: 23276, 3: 49810, 6: 26914}, + ("Category Threes", 2, 5): {0: 16092, 3: 47718, 6: 36190}, + ("Category Threes", 2, 6): {0: 11232, 3: 44515, 6: 44253}, + ("Category Threes", 2, 7): {0: 7589, 3: 40459, 6: 51952}, + ("Category Threes", 2, 8): {0: 5447, 3: 35804, 6: 58749}, ("Category Threes", 3, 0): {0: 100000}, ("Category Threes", 3, 1): {0: 57964, 3: 42036}, - ("Category Threes", 3, 2): {0: 33637, 6: 66363}, - ("Category Threes", 3, 3): {0: 19520, 6: 80480}, - ("Category Threes", 3, 4): {0: 11265, 6: 88735}, - ("Category Threes", 3, 5): {0: 6419, 6: 72177, 9: 21404}, - ("Category Threes", 3, 6): {0: 3810, 6: 66884, 9: 29306}, - ("Category Threes", 3, 7): {0: 2174, 6: 60595, 9: 37231}, - ("Category Threes", 3, 8): {0: 1237, 6: 53693, 9: 45070}, + ("Category Threes", 3, 2): {0: 33637, 3: 44263, 6: 22100}, + ("Category Threes", 3, 3): {0: 19520, 3: 42382, 6: 38098}, + ("Category Threes", 3, 4): {0: 11265, 3: 35772, 6: 52963}, + ("Category Threes", 3, 5): {0: 6419, 3: 28916, 6: 43261, 9: 21404}, + ("Category Threes", 3, 6): {0: 3810, 3: 22496, 6: 44388, 9: 29306}, + ("Category Threes", 3, 7): {0: 1317, 6: 30047, 9: 68636}, + ("Category Threes", 3, 8): {0: 750, 9: 99250}, ("Category Threes", 4, 0): {0: 100000}, - ("Category Threes", 4, 1): {0: 48121, 6: 51879}, - ("Category Threes", 4, 2): {0: 23296, 6: 76704}, - ("Category Threes", 4, 3): {0: 11233, 6: 68363, 9: 20404}, - ("Category Threes", 4, 4): {0: 5463, 6: 60738, 9: 33799}, - ("Category Threes", 4, 5): {0: 2691, 6: 50035, 12: 47274}, - ("Category Threes", 4, 6): {0: 11267, 9: 88733}, - ("Category Threes", 4, 7): {0: 6921, 9: 66034, 12: 27045}, - ("Category Threes", 4, 8): {0: 4185, 9: 61079, 12: 34736}, + ("Category Threes", 4, 1): {0: 48121, 3: 51879}, + ("Category Threes", 4, 2): {0: 23296, 3: 40989, 6: 35715}, + ("Category Threes", 4, 3): {0: 11233, 3: 32653, 6: 35710, 9: 20404}, + ("Category Threes", 4, 4): {0: 5463, 3: 23270, 6: 37468, 9: 33799}, + ("Category Threes", 4, 5): {0: 5225, 6: 29678, 9: 65097}, + ("Category Threes", 4, 6): {0: 3535, 9: 96465}, + ("Category Threes", 4, 7): {0: 6, 9: 72939, 12: 27055}, + ("Category Threes", 4, 8): {9: 25326, 12: 74674}, ("Category Threes", 5, 0): {0: 100000}, - ("Category Threes", 5, 1): {0: 40183, 6: 59817}, - ("Category Threes", 5, 2): {0: 16197, 6: 83803}, - ("Category Threes", 5, 3): {0: 6583, 6: 57826, 9: 35591}, - ("Category Threes", 5, 4): {0: 2636, 9: 76577, 12: 20787}, - ("Category Threes", 5, 5): {0: 8879, 9: 57821, 12: 33300}, - ("Category Threes", 5, 6): {0: 4652, 12: 95348}, - ("Category Threes", 5, 7): {0: 2365, 12: 97635}, - ("Category Threes", 5, 8): {0: 8671, 12: 64865, 15: 26464}, + ("Category Threes", 5, 1): {0: 40183, 3: 59817}, + ("Category Threes", 5, 2): {0: 16197, 3: 35494, 6: 48309}, + ("Category Threes", 5, 3): {0: 6583, 3: 23394, 6: 34432, 9: 35591}, + ("Category Threes", 5, 4): {0: 5007, 6: 25159, 9: 49038, 12: 20796}, + ("Category Threes", 5, 5): {0: 2900, 9: 38935, 12: 58165}, + ("Category Threes", 5, 6): {0: 2090, 12: 97910}, + ("Category Threes", 5, 7): {12: 99994, 9: 6}, + ("Category Threes", 5, 8): {12: 73524, 15: 26476}, ("Category Threes", 6, 0): {0: 100000}, - ("Category Threes", 6, 1): {0: 33473, 6: 66527}, - ("Category Threes", 6, 2): {0: 11147, 6: 62222, 9: 26631}, - ("Category Threes", 6, 3): {0: 3628, 9: 75348, 12: 21024}, - ("Category Threes", 6, 4): {0: 9498, 9: 52940, 15: 37562}, - ("Category Threes", 6, 5): {0: 4236, 12: 72944, 15: 22820}, - ("Category Threes", 6, 6): {0: 10168, 12: 55072, 15: 34760}, - ("Category Threes", 6, 7): {0: 5519, 15: 94481}, - ("Category Threes", 6, 8): {0: 2968, 15: 76504, 18: 20528}, + ("Category Threes", 6, 1): {0: 33473, 3: 40175, 6: 26352}, + ("Category Threes", 6, 2): {0: 11147, 3: 29592, 6: 32630, 9: 26631}, + ("Category Threes", 6, 3): {0: 2460, 6: 21148, 9: 55356, 12: 21036}, + ("Category Threes", 6, 4): {0: 997, 9: 29741, 12: 69262}, + ("Category Threes", 6, 5): {0: 831, 12: 76328, 15: 22841}, + ("Category Threes", 6, 6): {12: 29960, 15: 70040}, + ("Category Threes", 6, 7): {15: 100000}, + ("Category Threes", 6, 8): {15: 79456, 18: 20544}, ("Category Threes", 7, 0): {0: 100000}, - ("Category Threes", 7, 1): {0: 27933, 6: 72067}, - ("Category Threes", 7, 2): {0: 7794, 6: 55728, 12: 36478}, - ("Category Threes", 7, 3): {0: 2138, 9: 64554, 15: 33308}, - ("Category Threes", 7, 4): {0: 5238, 12: 69214, 15: 25548}, - ("Category Threes", 7, 5): {0: 9894, 15: 90106}, - ("Category Threes", 7, 6): {0: 4656, 15: 69353, 18: 25991}, - ("Category Threes", 7, 7): {0: 10005, 15: 52430, 18: 37565}, - ("Category Threes", 7, 8): {0: 5710, 18: 94290}, + ("Category Threes", 7, 1): {0: 27933, 3: 39105, 6: 32962}, + ("Category Threes", 7, 2): {0: 7794, 3: 23896, 6: 31832, 9: 36478}, + ("Category Threes", 7, 3): {0: 1321, 9: 40251, 12: 58428}, + ("Category Threes", 7, 4): {0: 370, 12: 74039, 15: 25591}, + ("Category Threes", 7, 5): {0: 6, 15: 98660, 12: 1334}, + ("Category Threes", 7, 6): {15: 73973, 18: 26027}, + ("Category Threes", 7, 7): {18: 100000}, + ("Category Threes", 7, 8): {18: 100000}, ("Category Threes", 8, 0): {0: 100000}, - ("Category Threes", 8, 1): {0: 23337, 6: 76663}, - ("Category Threes", 8, 2): {0: 5310, 9: 74178, 12: 20512}, - ("Category Threes", 8, 3): {0: 8656, 12: 70598, 15: 20746}, - ("Category Threes", 8, 4): {0: 291, 12: 59487, 18: 40222}, - ("Category Threes", 8, 5): {0: 5145, 15: 63787, 18: 31068}, - ("Category Threes", 8, 6): {0: 8804, 18: 91196}, - ("Category Threes", 8, 7): {0: 4347, 18: 65663, 21: 29990}, - ("Category Threes", 8, 8): {0: 9252, 21: 90748}, + ("Category Threes", 8, 1): {0: 23337, 3: 37232, 6: 39431}, + ("Category Threes", 8, 2): {0: 4652, 6: 29310, 9: 45517, 12: 20521}, + ("Category Threes", 8, 3): {0: 1300, 12: 77919, 15: 20781}, + ("Category Threes", 8, 4): {0: 21, 15: 98678, 12: 1301}, + ("Category Threes", 8, 5): {15: 68893, 18: 31107}, + ("Category Threes", 8, 6): {18: 100000}, + ("Category Threes", 8, 7): {18: 69986, 21: 30014}, + ("Category Threes", 8, 8): {21: 98839, 18: 1161}, ("Category Fours", 0, 0): {0: 100000}, ("Category Fours", 0, 1): {0: 100000}, ("Category Fours", 0, 2): {0: 100000}, @@ -276,61 +268,61 @@ ("Category Fours", 2, 5): {0: 16222, 4: 48009, 8: 35769}, ("Category Fours", 2, 6): {0: 11125, 4: 44400, 8: 44475}, ("Category Fours", 2, 7): {0: 7919, 4: 40216, 8: 51865}, - ("Category Fours", 2, 8): {0: 5348, 8: 94652}, + ("Category Fours", 2, 8): {0: 5348, 4: 35757, 8: 58895}, ("Category Fours", 3, 0): {0: 100000}, ("Category Fours", 3, 1): {0: 57914, 4: 42086}, ("Category Fours", 3, 2): {0: 33621, 4: 44110, 8: 22269}, ("Category Fours", 3, 3): {0: 19153, 4: 42425, 8: 38422}, - ("Category Fours", 3, 4): {0: 11125, 8: 88875}, - ("Category Fours", 3, 5): {0: 6367, 8: 72308, 12: 21325}, - ("Category Fours", 3, 6): {0: 3643, 8: 66934, 12: 29423}, - ("Category Fours", 3, 7): {0: 2178, 8: 60077, 12: 37745}, - ("Category Fours", 3, 8): {0: 1255, 8: 53433, 12: 45312}, + ("Category Fours", 3, 4): {0: 11125, 4: 36011, 8: 52864}, + ("Category Fours", 3, 5): {0: 6367, 4: 29116, 8: 43192, 12: 21325}, + ("Category Fours", 3, 6): {0: 3643, 4: 22457, 8: 44477, 12: 29423}, + ("Category Fours", 3, 7): {0: 2178, 4: 16802, 8: 43275, 12: 37745}, + ("Category Fours", 3, 8): {0: 488, 8: 20703, 12: 78809}, ("Category Fours", 4, 0): {0: 100000}, ("Category Fours", 4, 1): {0: 48465, 4: 51535}, - ("Category Fours", 4, 2): {0: 23296, 4: 40911, 12: 35793}, - ("Category Fours", 4, 3): {0: 11200, 8: 68528, 12: 20272}, - ("Category Fours", 4, 4): {0: 5447, 8: 60507, 12: 34046}, - ("Category Fours", 4, 5): {0: 2533, 8: 50449, 16: 47018}, - ("Category Fours", 4, 6): {0: 1314, 8: 39851, 12: 39425, 16: 19410}, - ("Category Fours", 4, 7): {0: 6823, 12: 66167, 16: 27010}, - ("Category Fours", 4, 8): {0: 4189, 12: 61034, 16: 34777}, + ("Category Fours", 4, 2): {0: 23296, 4: 40911, 8: 35793}, + ("Category Fours", 4, 3): {0: 11200, 4: 33191, 8: 35337, 12: 20272}, + ("Category Fours", 4, 4): {0: 5447, 4: 23066, 8: 37441, 12: 34046}, + ("Category Fours", 4, 5): {0: 2533, 4: 15668, 8: 34781, 12: 47018}, + ("Category Fours", 4, 6): {0: 2058, 8: 19749, 12: 58777, 16: 19416}, + ("Category Fours", 4, 7): {0: 1476, 12: 45913, 16: 52611}, + ("Category Fours", 4, 8): {0: 23, 12: 18149, 16: 81828}, ("Category Fours", 5, 0): {0: 100000}, ("Category Fours", 5, 1): {0: 40215, 4: 40127, 8: 19658}, - ("Category Fours", 5, 2): {0: 15946, 8: 66737, 12: 17317}, - ("Category Fours", 5, 3): {0: 6479, 8: 58280, 16: 35241}, - ("Category Fours", 5, 4): {0: 2635, 8: 43968, 16: 53397}, - ("Category Fours", 5, 5): {0: 8916, 12: 57586, 16: 33498}, - ("Category Fours", 5, 6): {0: 4682, 12: 49435, 20: 45883}, - ("Category Fours", 5, 7): {0: 2291, 12: 40537, 16: 37701, 20: 19471}, - ("Category Fours", 5, 8): {0: 75, 16: 73483, 20: 26442}, + ("Category Fours", 5, 2): {0: 15946, 4: 35579, 8: 31158, 12: 17317}, + ("Category Fours", 5, 3): {0: 6479, 4: 23705, 8: 34575, 12: 35241}, + ("Category Fours", 5, 4): {0: 4987, 8: 25190, 12: 48849, 16: 20974}, + ("Category Fours", 5, 5): {0: 1553, 12: 39966, 16: 58481}, + ("Category Fours", 5, 6): {0: 843, 16: 99157}, + ("Category Fours", 5, 7): {16: 80514, 20: 19486}, + ("Category Fours", 5, 8): {16: 38393, 20: 61607}, ("Category Fours", 6, 0): {0: 100000}, ("Category Fours", 6, 1): {0: 33632, 4: 39856, 8: 26512}, - ("Category Fours", 6, 2): {0: 11175, 8: 62205, 12: 26620}, - ("Category Fours", 6, 3): {0: 3698, 8: 46268, 16: 50034}, - ("Category Fours", 6, 4): {0: 9173, 12: 52855, 20: 37972}, - ("Category Fours", 6, 5): {0: 4254, 12: 41626, 20: 54120}, - ("Category Fours", 6, 6): {0: 1783, 16: 63190, 24: 35027}, - ("Category Fours", 6, 7): {0: 5456, 16: 47775, 24: 46769}, - ("Category Fours", 6, 8): {0: 2881, 16: 39229, 24: 57890}, + ("Category Fours", 6, 2): {0: 11175, 4: 29824, 8: 32381, 12: 26620}, + ("Category Fours", 6, 3): {0: 3698, 4: 16329, 8: 29939, 12: 29071, 16: 20963}, + ("Category Fours", 6, 4): {0: 2326, 12: 28286, 16: 69388}, + ("Category Fours", 6, 5): {0: 1030, 16: 76056, 20: 22914}, + ("Category Fours", 6, 6): {0: 7, 16: 29753, 20: 70240}, + ("Category Fours", 6, 7): {20: 99999, 16: 1}, + ("Category Fours", 6, 8): {20: 79470, 24: 20530}, ("Category Fours", 7, 0): {0: 100000}, - ("Category Fours", 7, 1): {0: 27821, 4: 39289, 12: 32890}, - ("Category Fours", 7, 2): {0: 7950, 8: 55659, 16: 36391}, - ("Category Fours", 7, 3): {0: 2194, 12: 64671, 20: 33135}, - ("Category Fours", 7, 4): {0: 5063, 12: 41118, 20: 53819}, - ("Category Fours", 7, 5): {0: 171, 16: 57977, 24: 41852}, - ("Category Fours", 7, 6): {0: 4575, 16: 38694, 24: 56731}, - ("Category Fours", 7, 7): {0: 252, 20: 62191, 28: 37557}, - ("Category Fours", 7, 8): {4: 5576, 20: 45351, 28: 49073}, + ("Category Fours", 7, 1): {0: 27821, 4: 39289, 8: 32890}, + ("Category Fours", 7, 2): {0: 7950, 4: 24026, 8: 31633, 12: 36391}, + ("Category Fours", 7, 3): {0: 1887, 12: 31108, 16: 67005}, + ("Category Fours", 7, 4): {0: 423, 16: 73837, 20: 25740}, + ("Category Fours", 7, 5): {0: 57, 16: 10063, 20: 74092, 24: 15788}, + ("Category Fours", 7, 6): {0: 6, 20: 31342, 24: 68652}, + ("Category Fours", 7, 7): {24: 99995, 20: 5}, + ("Category Fours", 7, 8): {24: 84330, 28: 15670}, ("Category Fours", 8, 0): {0: 100000}, - ("Category Fours", 8, 1): {0: 23275, 8: 76725}, - ("Category Fours", 8, 2): {0: 5421, 8: 48273, 16: 46306}, - ("Category Fours", 8, 3): {0: 8626, 12: 45516, 20: 45858}, - ("Category Fours", 8, 4): {0: 2852, 16: 56608, 24: 40540}, - ("Category Fours", 8, 5): {0: 5049, 20: 63834, 28: 31117}, - ("Category Fours", 8, 6): {0: 269, 20: 53357, 28: 46374}, - ("Category Fours", 8, 7): {0: 4394, 24: 65785, 28: 29821}, - ("Category Fours", 8, 8): {0: 266, 24: 58443, 32: 41291}, + ("Category Fours", 8, 1): {0: 23275, 4: 37161, 8: 39564}, + ("Category Fours", 8, 2): {0: 5421, 4: 19014, 8: 29259, 12: 25812, 16: 20494}, + ("Category Fours", 8, 3): {0: 649, 16: 78572, 20: 20779}, + ("Category Fours", 8, 4): {0: 15, 20: 80772, 24: 17355, 16: 1858}, + ("Category Fours", 8, 5): {20: 15615, 24: 84385}, + ("Category Fours", 8, 6): {24: 80655, 28: 19345}, + ("Category Fours", 8, 7): {24: 23969, 28: 76031}, + ("Category Fours", 8, 8): {28: 100000}, ("Category Fives", 0, 0): {0: 100000}, ("Category Fives", 0, 1): {0: 100000}, ("Category Fives", 0, 2): {0: 100000}, @@ -363,55 +355,55 @@ ("Category Fives", 3, 2): {0: 33466, 5: 44227, 10: 22307}, ("Category Fives", 3, 3): {0: 19231, 5: 42483, 10: 38286}, ("Category Fives", 3, 4): {0: 11196, 5: 36192, 10: 38673, 15: 13939}, - ("Category Fives", 3, 5): {0: 6561, 10: 72177, 15: 21262}, - ("Category Fives", 3, 6): {0: 3719, 10: 66792, 15: 29489}, - ("Category Fives", 3, 7): {0: 2099, 10: 60283, 15: 37618}, - ("Category Fives", 3, 8): {0: 1281, 10: 53409, 15: 45310}, + ("Category Fives", 3, 5): {0: 6561, 5: 29163, 10: 43014, 15: 21262}, + ("Category Fives", 3, 6): {0: 3719, 5: 22181, 10: 44611, 15: 29489}, + ("Category Fives", 3, 7): {0: 2099, 5: 16817, 10: 43466, 15: 37618}, + ("Category Fives", 3, 8): {0: 1281, 5: 12473, 10: 40936, 15: 45310}, ("Category Fives", 4, 0): {0: 100000}, ("Category Fives", 4, 1): {0: 48377, 5: 38345, 10: 13278}, - ("Category Fives", 4, 2): {0: 23126, 5: 40940, 15: 35934}, + ("Category Fives", 4, 2): {0: 23126, 5: 40940, 10: 35934}, ("Category Fives", 4, 3): {0: 11192, 5: 32597, 10: 35753, 15: 20458}, - ("Category Fives", 4, 4): {0: 5362, 10: 60452, 20: 34186}, - ("Category Fives", 4, 5): {0: 2655, 10: 50264, 15: 34186, 20: 12895}, - ("Category Fives", 4, 6): {0: 1291, 10: 39792, 15: 39417, 20: 19500}, - ("Category Fives", 4, 7): {0: 6854, 15: 66139, 20: 27007}, - ("Category Fives", 4, 8): {0: 4150, 15: 61121, 20: 34729}, + ("Category Fives", 4, 4): {0: 5362, 5: 23073, 10: 37379, 15: 34186}, + ("Category Fives", 4, 5): {0: 2655, 5: 15662, 10: 34602, 15: 34186, 20: 12895}, + ("Category Fives", 4, 6): {0: 2059, 10: 19678, 15: 48376, 20: 29887}, + ("Category Fives", 4, 7): {0: 1473, 15: 34402, 20: 64125}, + ("Category Fives", 4, 8): {0: 551, 20: 99449}, ("Category Fives", 5, 0): {0: 100000}, ("Category Fives", 5, 1): {0: 39911, 5: 40561, 10: 19528}, ("Category Fives", 5, 2): {0: 16178, 5: 35517, 10: 31246, 15: 17059}, - ("Category Fives", 5, 3): {0: 6526, 10: 58146, 20: 35328}, - ("Category Fives", 5, 4): {0: 2615, 10: 44108, 15: 32247, 20: 21030}, - ("Category Fives", 5, 5): {0: 1063, 10: 31079, 15: 34489, 25: 33369}, - ("Category Fives", 5, 6): {0: 4520, 15: 49551, 20: 32891, 25: 13038}, - ("Category Fives", 5, 7): {0: 2370, 15: 40714, 20: 37778, 25: 19138}, - ("Category Fives", 5, 8): {0: 1179, 15: 31909, 20: 40615, 25: 26297}, + ("Category Fives", 5, 3): {0: 6526, 5: 23716, 10: 34430, 15: 35328}, + ("Category Fives", 5, 4): {0: 2615, 5: 13975, 10: 30133, 15: 32247, 20: 21030}, + ("Category Fives", 5, 5): {0: 1482, 10: 13532, 15: 37597, 20: 47389}, + ("Category Fives", 5, 6): {0: 477, 15: 14484, 20: 71985, 25: 13054}, + ("Category Fives", 5, 7): {0: 273, 20: 52865, 25: 46862}, + ("Category Fives", 5, 8): {20: 16822, 25: 83178}, ("Category Fives", 6, 0): {0: 100000}, ("Category Fives", 6, 1): {0: 33476, 5: 40167, 10: 26357}, - ("Category Fives", 6, 2): {0: 11322, 10: 62277, 20: 26401}, - ("Category Fives", 6, 3): {0: 3765, 10: 46058, 20: 50177}, - ("Category Fives", 6, 4): {0: 1201, 15: 60973, 25: 37826}, - ("Category Fives", 6, 5): {0: 4307, 15: 41966, 20: 30800, 25: 22927}, - ("Category Fives", 6, 6): {0: 1827, 15: 30580, 20: 32744, 30: 34849}, - ("Category Fives", 6, 7): {0: 5496, 20: 47569, 25: 32784, 30: 14151}, - ("Category Fives", 6, 8): {0: 2920, 20: 39283, 25: 37178, 30: 20619}, + ("Category Fives", 6, 2): {0: 11322, 5: 29613, 10: 32664, 15: 26401}, + ("Category Fives", 6, 3): {0: 3765, 5: 16288, 10: 29770, 15: 29233, 20: 20944}, + ("Category Fives", 6, 4): {0: 1889, 10: 13525, 15: 33731, 20: 38179, 25: 12676}, + ("Category Fives", 6, 5): {0: 53, 10: 11118, 20: 47588, 25: 41241}, + ("Category Fives", 6, 6): {0: 10, 20: 8876, 25: 91114}, + ("Category Fives", 6, 7): {0: 7, 25: 85815, 30: 14178}, + ("Category Fives", 6, 8): {25: 43072, 30: 56928}, ("Category Fives", 7, 0): {0: 100000}, - ("Category Fives", 7, 1): {0: 27826, 5: 39154, 15: 33020}, - ("Category Fives", 7, 2): {0: 7609, 10: 55915, 20: 36476}, - ("Category Fives", 7, 3): {0: 2262, 10: 35456, 20: 62282}, - ("Category Fives", 7, 4): {0: 5201, 15: 40920, 25: 53879}, - ("Category Fives", 7, 5): {0: 1890, 20: 56509, 30: 41601}, - ("Category Fives", 7, 6): {0: 4506, 20: 38614, 25: 30456, 30: 26424}, - ("Category Fives", 7, 7): {0: 2107, 25: 60445, 35: 37448}, - ("Category Fives", 7, 8): {0: 5627, 25: 45590, 30: 33015, 35: 15768}, + ("Category Fives", 7, 1): {0: 27826, 5: 39154, 10: 33020}, + ("Category Fives", 7, 2): {0: 7609, 5: 24193, 10: 31722, 15: 23214, 20: 13262}, + ("Category Fives", 7, 3): {0: 1879, 15: 23021, 20: 75100}, + ("Category Fives", 7, 4): {0: 345, 20: 64636, 25: 35019}, + ("Category Fives", 7, 5): {0: 40, 20: 7522, 25: 76792, 30: 15646}, + ("Category Fives", 7, 6): {0: 8, 25: 26517, 30: 73475}, + ("Category Fives", 7, 7): {0: 2, 30: 99998}, + ("Category Fives", 7, 8): {30: 84211, 35: 15789}, ("Category Fives", 8, 0): {0: 100000}, - ("Category Fives", 8, 1): {0: 23333, 5: 37259, 15: 39408}, - ("Category Fives", 8, 2): {0: 5425, 10: 48295, 20: 46280}, - ("Category Fives", 8, 3): {0: 1258, 15: 53475, 25: 45267}, - ("Category Fives", 8, 4): {0: 2752, 20: 56808, 30: 40440}, - ("Category Fives", 8, 5): {0: 5203, 20: 35571, 30: 59226}, - ("Category Fives", 8, 6): {0: 1970, 25: 51621, 35: 46409}, - ("Category Fives", 8, 7): {0: 4281, 25: 35146, 30: 30426, 40: 30147}, - ("Category Fives", 8, 8): {0: 2040, 30: 56946, 40: 41014}, + ("Category Fives", 8, 1): {0: 23333, 5: 37259, 10: 25947, 15: 13461}, + ("Category Fives", 8, 2): {0: 5425, 5: 18915, 10: 29380, 15: 25994, 20: 20286}, + ("Category Fives", 8, 3): {0: 495, 20: 78726, 25: 20779}, + ("Category Fives", 8, 4): {20: 12998, 25: 70085, 30: 16917}, + ("Category Fives", 8, 5): {25: 15859, 30: 84141}, + ("Category Fives", 8, 6): {30: 80722, 35: 19278}, + ("Category Fives", 8, 7): {30: 23955, 35: 76045}, + ("Category Fives", 8, 8): {35: 100000}, ("Category Sixes", 0, 0): {0: 100000}, ("Category Sixes", 0, 1): {0: 100000}, ("Category Sixes", 0, 2): {0: 100000}, @@ -445,54 +437,54 @@ ("Category Sixes", 3, 3): {0: 19366, 6: 42246, 12: 38388}, ("Category Sixes", 3, 4): {0: 11144, 6: 36281, 12: 38817, 18: 13758}, ("Category Sixes", 3, 5): {0: 6414, 6: 28891, 12: 43114, 18: 21581}, - ("Category Sixes", 3, 6): {0: 3870, 12: 66712, 18: 29418}, - ("Category Sixes", 3, 7): {0: 2188, 12: 60290, 18: 37522}, - ("Category Sixes", 3, 8): {0: 1289, 12: 53503, 18: 45208}, + ("Category Sixes", 3, 6): {0: 3870, 6: 22394, 12: 44318, 18: 29418}, + ("Category Sixes", 3, 7): {0: 2188, 6: 16803, 12: 43487, 18: 37522}, + ("Category Sixes", 3, 8): {0: 1289, 6: 12421, 12: 41082, 18: 45208}, ("Category Sixes", 4, 0): {0: 100000}, ("Category Sixes", 4, 1): {0: 48197, 6: 38521, 12: 13282}, ("Category Sixes", 4, 2): {0: 23155, 6: 41179, 12: 35666}, ("Category Sixes", 4, 3): {0: 11256, 6: 32609, 12: 35588, 18: 20547}, - ("Category Sixes", 4, 4): {0: 5324, 12: 60474, 18: 34202}, - ("Category Sixes", 4, 5): {0: 2658, 12: 50173, 18: 34476, 24: 12693}, - ("Category Sixes", 4, 6): {0: 1282, 12: 39852, 18: 39379, 24: 19487}, - ("Category Sixes", 4, 7): {0: 588, 12: 30598, 18: 41935, 24: 26879}, - ("Category Sixes", 4, 8): {0: 4180, 18: 61222, 24: 34598}, + ("Category Sixes", 4, 4): {0: 5324, 6: 23265, 12: 37209, 18: 34202}, + ("Category Sixes", 4, 5): {0: 2658, 6: 15488, 12: 34685, 18: 34476, 24: 12693}, + ("Category Sixes", 4, 6): {0: 2045, 12: 19683, 18: 48559, 24: 29713}, + ("Category Sixes", 4, 7): {0: 1470, 18: 34646, 24: 63884}, + ("Category Sixes", 4, 8): {0: 22, 18: 12111, 24: 87867}, ("Category Sixes", 5, 0): {0: 100000}, ("Category Sixes", 5, 1): {0: 40393, 6: 39904, 12: 19703}, ("Category Sixes", 5, 2): {0: 16202, 6: 35664, 12: 31241, 18: 16893}, - ("Category Sixes", 5, 3): {0: 6456, 12: 58124, 18: 25020, 24: 10400}, - ("Category Sixes", 5, 4): {0: 2581, 12: 44335, 18: 32198, 24: 20886}, - ("Category Sixes", 5, 5): {0: 1119, 12: 30838, 18: 34716, 24: 33327}, - ("Category Sixes", 5, 6): {0: 4563, 18: 49516, 24: 32829, 30: 13092}, - ("Category Sixes", 5, 7): {0: 2315, 18: 40699, 24: 37560, 30: 19426}, - ("Category Sixes", 5, 8): {0: 1246, 18: 31964, 24: 40134, 30: 26656}, + ("Category Sixes", 5, 3): {0: 6456, 6: 23539, 12: 34585, 18: 25020, 24: 10400}, + ("Category Sixes", 5, 4): {0: 2581, 6: 13980, 12: 30355, 18: 32198, 24: 20886}, + ("Category Sixes", 5, 5): {0: 1472, 12: 13518, 18: 37752, 24: 47258}, + ("Category Sixes", 5, 6): {0: 476, 18: 14559, 24: 71856, 30: 13109}, + ("Category Sixes", 5, 7): {0: 275, 24: 52573, 30: 47152}, + ("Category Sixes", 5, 8): {24: 16500, 30: 83500}, ("Category Sixes", 6, 0): {0: 100000}, - ("Category Sixes", 6, 1): {0: 33316, 6: 40218, 18: 26466}, - ("Category Sixes", 6, 2): {0: 11256, 6: 29444, 12: 32590, 24: 26710}, - ("Category Sixes", 6, 3): {0: 3787, 12: 46139, 18: 29107, 24: 20967}, - ("Category Sixes", 6, 4): {0: 1286, 12: 29719, 18: 31264, 24: 25039, 30: 12692}, - ("Category Sixes", 6, 5): {0: 4190, 18: 41667, 24: 30919, 30: 23224}, - ("Category Sixes", 6, 6): {0: 1804, 18: 30702, 24: 32923, 30: 34571}, - ("Category Sixes", 6, 7): {0: 51, 24: 53324, 30: 32487, 36: 14138}, - ("Category Sixes", 6, 8): {0: 2886, 24: 39510, 30: 37212, 36: 20392}, + ("Category Sixes", 6, 1): {0: 33316, 6: 40218, 12: 26466}, + ("Category Sixes", 6, 2): {0: 11256, 6: 29444, 12: 32590, 18: 26710}, + ("Category Sixes", 6, 3): {0: 3787, 6: 16266, 12: 29873, 18: 29107, 24: 20967}, + ("Category Sixes", 6, 4): {0: 1875, 12: 13602, 18: 33731, 24: 38090, 30: 12702}, + ("Category Sixes", 6, 5): {0: 433, 18: 10665, 24: 47398, 30: 41504}, + ("Category Sixes", 6, 6): {0: 89, 24: 14905, 30: 85006}, + ("Category Sixes", 6, 7): {0: 19, 30: 85816, 36: 14165}, + ("Category Sixes", 6, 8): {30: 43219, 36: 56781}, ("Category Sixes", 7, 0): {0: 100000}, - ("Category Sixes", 7, 1): {0: 27852, 6: 38984, 18: 33164}, - ("Category Sixes", 7, 2): {0: 7883, 12: 55404, 24: 36713}, - ("Category Sixes", 7, 3): {0: 2186, 12: 35249, 18: 29650, 30: 32915}, - ("Category Sixes", 7, 4): {0: 5062, 18: 40976, 24: 28335, 36: 25627}, - ("Category Sixes", 7, 5): {0: 1947, 18: 27260, 24: 29254, 30: 25790, 36: 15749}, - ("Category Sixes", 7, 6): {0: 4568, 24: 38799, 30: 30698, 42: 25935}, - ("Category Sixes", 7, 7): {0: 2081, 24: 28590, 30: 31709, 36: 37620}, - ("Category Sixes", 7, 8): {0: 73, 30: 51135, 36: 33183, 42: 15609}, + ("Category Sixes", 7, 1): {0: 27852, 6: 38984, 12: 33164}, + ("Category Sixes", 7, 2): {0: 7883, 6: 23846, 12: 31558, 18: 23295, 24: 13418}, + ("Category Sixes", 7, 3): {0: 2186, 6: 10928, 12: 24321, 18: 29650, 24: 21177, 30: 11738}, + ("Category Sixes", 7, 4): {0: 1034, 18: 12857, 24: 37227, 30: 48882}, + ("Category Sixes", 7, 5): {0: 300, 30: 83887, 36: 15813}, + ("Category Sixes", 7, 6): {30: 31359, 36: 68641}, + ("Category Sixes", 7, 7): {36: 89879, 42: 10121}, + ("Category Sixes", 7, 8): {36: 49549, 42: 50451}, ("Category Sixes", 8, 0): {0: 100000}, ("Category Sixes", 8, 1): {0: 23220, 6: 37213, 12: 25961, 18: 13606}, - ("Category Sixes", 8, 2): {0: 5280, 12: 48607, 18: 25777, 30: 20336}, - ("Category Sixes", 8, 3): {0: 1246, 12: 25869, 18: 27277, 30: 45608}, - ("Category Sixes", 8, 4): {0: 2761, 18: 29831, 24: 27146, 36: 40262}, - ("Category Sixes", 8, 5): {0: 5100, 24: 35948, 30: 27655, 42: 31297}, - ("Category Sixes", 8, 6): {0: 2067, 30: 51586, 36: 27024, 42: 19323}, - ("Category Sixes", 8, 7): {0: 4269, 30: 35032, 36: 30772, 48: 29927}, - ("Category Sixes", 8, 8): {6: 2012, 30: 25871, 36: 31116, 42: 28870, 48: 12131}, + ("Category Sixes", 8, 2): {0: 5280, 6: 18943, 12: 29664, 18: 25777, 24: 20336}, + ("Category Sixes", 8, 3): {0: 2024, 12: 12586, 18: 28717, 24: 35860, 30: 20813}, + ("Category Sixes", 8, 4): {0: 175, 24: 10907, 30: 72017, 36: 16901}, + ("Category Sixes", 8, 5): {0: 1, 30: 23224, 36: 66215, 42: 10560}, + ("Category Sixes", 8, 6): {36: 29563, 42: 70437}, + ("Category Sixes", 8, 7): {42: 99990, 36: 10}, + ("Category Sixes", 8, 8): {42: 87843, 48: 12157}, ("Category Choice", 0, 0): {0: 100000}, ("Category Choice", 0, 1): {0: 100000}, ("Category Choice", 0, 2): {0: 100000}, @@ -503,77 +495,77 @@ ("Category Choice", 0, 7): {0: 100000}, ("Category Choice", 0, 8): {0: 100000}, ("Category Choice", 1, 0): {0: 100000}, - ("Category Choice", 1, 1): {1: 33315, 5: 66685}, - ("Category Choice", 1, 2): {1: 10921, 5: 89079}, - ("Category Choice", 1, 3): {1: 27995, 6: 72005}, - ("Category Choice", 1, 4): {1: 15490, 6: 84510}, - ("Category Choice", 1, 5): {1: 6390, 6: 93610}, - ("Category Choice", 1, 6): {1: 34656, 6: 65344}, - ("Category Choice", 1, 7): {1: 28829, 6: 71171}, - ("Category Choice", 1, 8): {1: 23996, 6: 76004}, + ("Category Choice", 1, 1): {1: 33315, 3: 66685}, + ("Category Choice", 1, 2): {1: 32981, 4: 67019}, + ("Category Choice", 1, 3): {1: 12312, 4: 25020, 5: 62668}, + ("Category Choice", 1, 4): {1: 11564, 5: 88436}, + ("Category Choice", 1, 5): {1: 2956, 5: 97044}, + ("Category Choice", 1, 6): {4: 1024, 6: 65357, 5: 33619}, + ("Category Choice", 1, 7): {6: 100000}, + ("Category Choice", 1, 8): {6: 100000}, ("Category Choice", 2, 0): {0: 100000}, - ("Category Choice", 2, 1): {2: 16796, 8: 83204}, - ("Category Choice", 2, 2): {2: 22212, 10: 77788}, - ("Category Choice", 2, 3): {2: 29002, 11: 70998}, - ("Category Choice", 2, 4): {2: 22485, 11: 77515}, - ("Category Choice", 2, 5): {2: 28019, 12: 71981}, - ("Category Choice", 2, 6): {2: 23193, 12: 76807}, - ("Category Choice", 2, 7): {2: 11255, 8: 38369, 12: 50376}, - ("Category Choice", 2, 8): {2: 9297, 12: 90703}, + ("Category Choice", 2, 1): {2: 27810, 6: 72190}, + ("Category Choice", 2, 2): {2: 10285, 6: 26698, 8: 63017}, + ("Category Choice", 2, 3): {2: 3965, 8: 96035}, + ("Category Choice", 2, 4): {2: 143, 8: 33731, 9: 66126}, + ("Category Choice", 2, 5): {8: 12687, 10: 62544, 9: 24769}, + ("Category Choice", 2, 6): {10: 100000}, + ("Category Choice", 2, 7): {11: 66194, 10: 33806}, + ("Category Choice", 2, 8): {11: 100000}, ("Category Choice", 3, 0): {0: 100000}, - ("Category Choice", 3, 1): {3: 25983, 12: 74017}, - ("Category Choice", 3, 2): {3: 24419, 14: 75581}, - ("Category Choice", 3, 3): {3: 24466, 15: 75534}, - ("Category Choice", 3, 4): {3: 25866, 16: 74134}, - ("Category Choice", 3, 5): {3: 30994, 17: 69006}, - ("Category Choice", 3, 6): {3: 13523, 13: 41606, 17: 44871}, - ("Category Choice", 3, 7): {3: 28667, 18: 71333}, - ("Category Choice", 3, 8): {3: 23852, 18: 76148}, + ("Category Choice", 3, 1): {3: 10461, 6: 27156, 10: 62383}, + ("Category Choice", 3, 2): {3: 3586, 6: 31281, 12: 65133}, + ("Category Choice", 3, 3): {3: 1491, 12: 33737, 13: 64772}, + ("Category Choice", 3, 4): {12: 13802, 14: 60820, 13: 25378}, + ("Category Choice", 3, 5): {14: 99999, 13: 1}, + ("Category Choice", 3, 6): {15: 64851, 14: 35149}, + ("Category Choice", 3, 7): {16: 62341, 15: 24422, 14: 13237}, + ("Category Choice", 3, 8): {16: 100000}, ("Category Choice", 4, 0): {0: 100000}, - ("Category Choice", 4, 1): {4: 1125, 7: 32443, 16: 66432}, - ("Category Choice", 4, 2): {4: 18156, 14: 39494, 18: 42350}, - ("Category Choice", 4, 3): {4: 538, 9: 32084, 20: 67378}, - ("Category Choice", 4, 4): {4: 30873, 21: 69127}, - ("Category Choice", 4, 5): {4: 31056, 22: 68944}, - ("Category Choice", 4, 6): {4: 22939, 19: 43956, 23: 33105}, - ("Category Choice", 4, 7): {5: 16935, 19: 41836, 23: 41229}, - ("Category Choice", 4, 8): {5: 31948, 24: 68052}, + ("Category Choice", 4, 1): {4: 4748, 10: 28815, 13: 66437}, + ("Category Choice", 4, 2): {12: 12006, 16: 64226, 13: 23768}, + ("Category Choice", 4, 3): {16: 32567, 17: 67433}, + ("Category Choice", 4, 4): {16: 30845, 18: 69155}, + ("Category Choice", 4, 5): {16: 9568, 19: 68981, 18: 21451}, + ("Category Choice", 4, 6): {18: 10841, 20: 65051, 19: 24108}, + ("Category Choice", 4, 7): {18: 4198, 21: 61270, 20: 25195, 19: 9337}, + ("Category Choice", 4, 8): {21: 99999, 20: 1}, ("Category Choice", 5, 0): {0: 100000}, - ("Category Choice", 5, 1): {5: 21998, 15: 38001, 19: 40001}, - ("Category Choice", 5, 2): {5: 26627, 19: 38217, 23: 35156}, - ("Category Choice", 5, 3): {6: 22251, 24: 77749}, - ("Category Choice", 5, 4): {5: 27098, 22: 39632, 26: 33270}, - ("Category Choice", 5, 5): {6: 1166, 16: 32131, 27: 66703}, - ("Category Choice", 5, 6): {7: 1177, 17: 32221, 28: 66602}, - ("Category Choice", 5, 7): {8: 25048, 25: 42590, 29: 32362}, - ("Category Choice", 5, 8): {9: 18270, 25: 41089, 29: 40641}, + ("Category Choice", 5, 1): {5: 4485, 13: 35340, 17: 60175}, + ("Category Choice", 5, 2): {16: 35286, 20: 64714}, + ("Category Choice", 5, 3): {20: 39254, 22: 60746}, + ("Category Choice", 5, 4): {20: 35320, 23: 64680}, + ("Category Choice", 5, 5): {22: 33253, 24: 66747}, + ("Category Choice", 5, 6): {22: 11089, 25: 66653, 24: 22258}, + ("Category Choice", 5, 7): {24: 12216, 26: 63214, 22: 50, 25: 24520}, + ("Category Choice", 5, 8): {24: 4866, 27: 60314, 26: 25089, 25: 9731}, ("Category Choice", 6, 0): {0: 100000}, - ("Category Choice", 6, 1): {6: 27848, 23: 72152}, - ("Category Choice", 6, 2): {8: 27078, 27: 72922}, - ("Category Choice", 6, 3): {6: 27876, 29: 72124}, - ("Category Choice", 6, 4): {9: 30912, 31: 69088}, - ("Category Choice", 6, 5): {10: 27761, 28: 38016, 32: 34223}, - ("Category Choice", 6, 6): {13: 25547, 29: 39452, 33: 35001}, - ("Category Choice", 6, 7): {12: 767, 22: 32355, 34: 66878}, - ("Category Choice", 6, 8): {12: 25224, 31: 41692, 35: 33084}, + ("Category Choice", 6, 1): {6: 2276, 17: 33774, 20: 63950}, + ("Category Choice", 6, 2): {20: 34853, 24: 65147}, + ("Category Choice", 6, 3): {22: 12477, 26: 64201, 24: 23322}, + ("Category Choice", 6, 4): {24: 14073, 28: 60688, 26: 25239}, + ("Category Choice", 6, 5): {26: 35591, 29: 64409}, + ("Category Choice", 6, 6): {26: 33229, 30: 66771}, + ("Category Choice", 6, 7): {28: 33078, 31: 66922}, + ("Category Choice", 6, 8): {28: 12143, 31: 24567, 32: 63290}, ("Category Choice", 7, 0): {0: 100000}, - ("Category Choice", 7, 1): {7: 1237, 15: 32047, 27: 66716}, - ("Category Choice", 7, 2): {10: 27324, 31: 72676}, - ("Category Choice", 7, 3): {10: 759, 20: 32233, 34: 67008}, - ("Category Choice", 7, 4): {13: 26663, 35: 73337}, - ("Category Choice", 7, 5): {12: 29276, 37: 70724}, - ("Category Choice", 7, 6): {14: 26539, 38: 73461}, - ("Category Choice", 7, 7): {16: 24675, 35: 38365, 39: 36960}, - ("Category Choice", 7, 8): {14: 2, 19: 31688, 40: 68310}, + ("Category Choice", 7, 1): {7: 1558, 20: 31716, 23: 66726}, + ("Category Choice", 7, 2): {23: 34663, 28: 65337}, + ("Category Choice", 7, 3): {28: 32932, 30: 67062, 23: 6}, + ("Category Choice", 7, 4): {28: 11163, 32: 66108, 30: 22729}, + ("Category Choice", 7, 5): {30: 12528, 34: 63034, 32: 24438}, + ("Category Choice", 7, 6): {30: 4270, 35: 65916, 34: 21485, 32: 8329}, + ("Category Choice", 7, 7): {32: 4014, 36: 68134, 35: 21006, 34: 6846}, + ("Category Choice", 7, 8): {34: 3434, 37: 68373, 36: 21550, 35: 6643}, ("Category Choice", 8, 0): {0: 100000}, - ("Category Choice", 8, 1): {10: 23768, 25: 38280, 30: 37952}, - ("Category Choice", 8, 2): {11: 27666, 31: 38472, 36: 33862}, - ("Category Choice", 8, 3): {12: 24387, 33: 37477, 38: 38136}, - ("Category Choice", 8, 4): {16: 23316, 35: 38117, 40: 38567}, - ("Category Choice", 8, 5): {16: 30949, 42: 69051}, - ("Category Choice", 8, 6): {16: 26968, 43: 73032}, - ("Category Choice", 8, 7): {20: 24559, 44: 75441}, - ("Category Choice", 8, 8): {20: 1, 23: 22731, 41: 37835, 45: 39433}, + ("Category Choice", 8, 1): {10: 1400, 23: 36664, 27: 61936}, + ("Category Choice", 8, 2): {27: 34595, 32: 65405}, + ("Category Choice", 8, 3): {30: 13097, 35: 62142, 32: 24761}, + ("Category Choice", 8, 4): {35: 36672, 37: 63328}, + ("Category Choice", 8, 5): {39: 61292, 35: 14195, 37: 24513}, + ("Category Choice", 8, 6): {40: 65672, 39: 21040, 35: 4873, 37: 8415}, + ("Category Choice", 8, 7): {39: 13561, 42: 60493, 40: 25946}, + ("Category Choice", 8, 8): {39: 5250, 43: 61284, 42: 23421, 40: 10045}, ("Category Inverse Choice", 0, 0): {0: 100000}, ("Category Inverse Choice", 0, 1): {0: 100000}, ("Category Inverse Choice", 0, 2): {0: 100000}, @@ -584,77 +576,77 @@ ("Category Inverse Choice", 0, 7): {0: 100000}, ("Category Inverse Choice", 0, 8): {0: 100000}, ("Category Inverse Choice", 1, 0): {0: 100000}, - ("Category Inverse Choice", 1, 1): {1: 33315, 5: 66685}, - ("Category Inverse Choice", 1, 2): {1: 10921, 5: 89079}, - ("Category Inverse Choice", 1, 3): {1: 27995, 6: 72005}, - ("Category Inverse Choice", 1, 4): {1: 15490, 6: 84510}, - ("Category Inverse Choice", 1, 5): {1: 6390, 6: 93610}, - ("Category Inverse Choice", 1, 6): {1: 34656, 6: 65344}, - ("Category Inverse Choice", 1, 7): {1: 28829, 6: 71171}, - ("Category Inverse Choice", 1, 8): {1: 23996, 6: 76004}, + ("Category Inverse Choice", 1, 1): {1: 33315, 3: 66685}, + ("Category Inverse Choice", 1, 2): {1: 32981, 4: 67019}, + ("Category Inverse Choice", 1, 3): {1: 12312, 4: 25020, 5: 62668}, + ("Category Inverse Choice", 1, 4): {1: 11564, 5: 88436}, + ("Category Inverse Choice", 1, 5): {1: 2956, 5: 97044}, + ("Category Inverse Choice", 1, 6): {4: 1024, 6: 65357, 5: 33619}, + ("Category Inverse Choice", 1, 7): {6: 100000}, + ("Category Inverse Choice", 1, 8): {6: 100000}, ("Category Inverse Choice", 2, 0): {0: 100000}, - ("Category Inverse Choice", 2, 1): {2: 16796, 8: 83204}, - ("Category Inverse Choice", 2, 2): {2: 22212, 10: 77788}, - ("Category Inverse Choice", 2, 3): {2: 29002, 11: 70998}, - ("Category Inverse Choice", 2, 4): {2: 22485, 11: 77515}, - ("Category Inverse Choice", 2, 5): {2: 28019, 12: 71981}, - ("Category Inverse Choice", 2, 6): {2: 23193, 12: 76807}, - ("Category Inverse Choice", 2, 7): {2: 11255, 8: 38369, 12: 50376}, - ("Category Inverse Choice", 2, 8): {2: 9297, 12: 90703}, + ("Category Inverse Choice", 2, 1): {2: 27810, 6: 72190}, + ("Category Inverse Choice", 2, 2): {2: 10285, 6: 26698, 8: 63017}, + ("Category Inverse Choice", 2, 3): {2: 3965, 8: 96035}, + ("Category Inverse Choice", 2, 4): {2: 143, 8: 33731, 9: 66126}, + ("Category Inverse Choice", 2, 5): {8: 12687, 10: 62544, 9: 24769}, + ("Category Inverse Choice", 2, 6): {10: 100000}, + ("Category Inverse Choice", 2, 7): {11: 66194, 10: 33806}, + ("Category Inverse Choice", 2, 8): {11: 100000}, ("Category Inverse Choice", 3, 0): {0: 100000}, - ("Category Inverse Choice", 3, 1): {3: 25983, 12: 74017}, - ("Category Inverse Choice", 3, 2): {3: 24419, 14: 75581}, - ("Category Inverse Choice", 3, 3): {3: 24466, 15: 75534}, - ("Category Inverse Choice", 3, 4): {3: 25866, 16: 74134}, - ("Category Inverse Choice", 3, 5): {3: 30994, 17: 69006}, - ("Category Inverse Choice", 3, 6): {3: 13523, 13: 41606, 17: 44871}, - ("Category Inverse Choice", 3, 7): {3: 28667, 18: 71333}, - ("Category Inverse Choice", 3, 8): {3: 23852, 18: 76148}, + ("Category Inverse Choice", 3, 1): {3: 10461, 6: 27156, 10: 62383}, + ("Category Inverse Choice", 3, 2): {3: 3586, 6: 31281, 12: 65133}, + ("Category Inverse Choice", 3, 3): {3: 1491, 12: 33737, 13: 64772}, + ("Category Inverse Choice", 3, 4): {12: 13802, 14: 60820, 13: 25378}, + ("Category Inverse Choice", 3, 5): {14: 99999, 13: 1}, + ("Category Inverse Choice", 3, 6): {15: 64851, 14: 35149}, + ("Category Inverse Choice", 3, 7): {16: 62341, 15: 24422, 14: 13237}, + ("Category Inverse Choice", 3, 8): {16: 100000}, ("Category Inverse Choice", 4, 0): {0: 100000}, - ("Category Inverse Choice", 4, 1): {4: 1125, 7: 32443, 16: 66432}, - ("Category Inverse Choice", 4, 2): {4: 18156, 14: 39494, 18: 42350}, - ("Category Inverse Choice", 4, 3): {4: 538, 9: 32084, 20: 67378}, - ("Category Inverse Choice", 4, 4): {4: 30873, 21: 69127}, - ("Category Inverse Choice", 4, 5): {4: 31056, 22: 68944}, - ("Category Inverse Choice", 4, 6): {4: 22939, 19: 43956, 23: 33105}, - ("Category Inverse Choice", 4, 7): {5: 16935, 19: 41836, 23: 41229}, - ("Category Inverse Choice", 4, 8): {5: 31948, 24: 68052}, + ("Category Inverse Choice", 4, 1): {4: 4748, 10: 28815, 13: 66437}, + ("Category Inverse Choice", 4, 2): {12: 12006, 16: 64226, 13: 23768}, + ("Category Inverse Choice", 4, 3): {16: 32567, 17: 67433}, + ("Category Inverse Choice", 4, 4): {16: 30845, 18: 69155}, + ("Category Inverse Choice", 4, 5): {16: 9568, 19: 68981, 18: 21451}, + ("Category Inverse Choice", 4, 6): {18: 10841, 20: 65051, 19: 24108}, + ("Category Inverse Choice", 4, 7): {18: 4198, 21: 61270, 20: 25195, 19: 9337}, + ("Category Inverse Choice", 4, 8): {21: 99999, 20: 1}, ("Category Inverse Choice", 5, 0): {0: 100000}, - ("Category Inverse Choice", 5, 1): {5: 21998, 15: 38001, 19: 40001}, - ("Category Inverse Choice", 5, 2): {5: 26627, 19: 38217, 23: 35156}, - ("Category Inverse Choice", 5, 3): {6: 22251, 24: 77749}, - ("Category Inverse Choice", 5, 4): {5: 27098, 22: 39632, 26: 33270}, - ("Category Inverse Choice", 5, 5): {6: 1166, 16: 32131, 27: 66703}, - ("Category Inverse Choice", 5, 6): {7: 1177, 17: 32221, 28: 66602}, - ("Category Inverse Choice", 5, 7): {8: 25048, 25: 42590, 29: 32362}, - ("Category Inverse Choice", 5, 8): {9: 18270, 25: 41089, 29: 40641}, + ("Category Inverse Choice", 5, 1): {5: 4485, 13: 35340, 17: 60175}, + ("Category Inverse Choice", 5, 2): {16: 35286, 20: 64714}, + ("Category Inverse Choice", 5, 3): {20: 39254, 22: 60746}, + ("Category Inverse Choice", 5, 4): {20: 35320, 23: 64680}, + ("Category Inverse Choice", 5, 5): {22: 33253, 24: 66747}, + ("Category Inverse Choice", 5, 6): {22: 11089, 25: 66653, 24: 22258}, + ("Category Inverse Choice", 5, 7): {24: 12216, 26: 63214, 22: 50, 25: 24520}, + ("Category Inverse Choice", 5, 8): {24: 4866, 27: 60314, 26: 25089, 25: 9731}, ("Category Inverse Choice", 6, 0): {0: 100000}, - ("Category Inverse Choice", 6, 1): {6: 27848, 23: 72152}, - ("Category Inverse Choice", 6, 2): {8: 27078, 27: 72922}, - ("Category Inverse Choice", 6, 3): {6: 27876, 29: 72124}, - ("Category Inverse Choice", 6, 4): {9: 30912, 31: 69088}, - ("Category Inverse Choice", 6, 5): {10: 27761, 28: 38016, 32: 34223}, - ("Category Inverse Choice", 6, 6): {13: 25547, 29: 39452, 33: 35001}, - ("Category Inverse Choice", 6, 7): {12: 767, 22: 32355, 34: 66878}, - ("Category Inverse Choice", 6, 8): {12: 25224, 31: 41692, 35: 33084}, + ("Category Inverse Choice", 6, 1): {6: 2276, 17: 33774, 20: 63950}, + ("Category Inverse Choice", 6, 2): {20: 34853, 24: 65147}, + ("Category Inverse Choice", 6, 3): {22: 12477, 26: 64201, 24: 23322}, + ("Category Inverse Choice", 6, 4): {24: 14073, 28: 60688, 26: 25239}, + ("Category Inverse Choice", 6, 5): {26: 35591, 29: 64409}, + ("Category Inverse Choice", 6, 6): {26: 33229, 30: 66771}, + ("Category Inverse Choice", 6, 7): {28: 33078, 31: 66922}, + ("Category Inverse Choice", 6, 8): {28: 12143, 31: 24567, 32: 63290}, ("Category Inverse Choice", 7, 0): {0: 100000}, - ("Category Inverse Choice", 7, 1): {7: 1237, 15: 32047, 27: 66716}, - ("Category Inverse Choice", 7, 2): {10: 27324, 31: 72676}, - ("Category Inverse Choice", 7, 3): {10: 759, 20: 32233, 34: 67008}, - ("Category Inverse Choice", 7, 4): {13: 26663, 35: 73337}, - ("Category Inverse Choice", 7, 5): {12: 29276, 37: 70724}, - ("Category Inverse Choice", 7, 6): {14: 26539, 38: 73461}, - ("Category Inverse Choice", 7, 7): {16: 24675, 35: 38365, 39: 36960}, - ("Category Inverse Choice", 7, 8): {14: 2, 19: 31688, 40: 68310}, + ("Category Inverse Choice", 7, 1): {7: 1558, 20: 31716, 23: 66726}, + ("Category Inverse Choice", 7, 2): {23: 34663, 28: 65337}, + ("Category Inverse Choice", 7, 3): {28: 32932, 30: 67062, 23: 6}, + ("Category Inverse Choice", 7, 4): {28: 11163, 32: 66108, 30: 22729}, + ("Category Inverse Choice", 7, 5): {30: 12528, 34: 63034, 32: 24438}, + ("Category Inverse Choice", 7, 6): {30: 4270, 35: 65916, 34: 21485, 32: 8329}, + ("Category Inverse Choice", 7, 7): {32: 4014, 36: 68134, 35: 21006, 34: 6846}, + ("Category Inverse Choice", 7, 8): {34: 3434, 37: 68373, 36: 21550, 35: 6643}, ("Category Inverse Choice", 8, 0): {0: 100000}, - ("Category Inverse Choice", 8, 1): {10: 23768, 25: 38280, 30: 37952}, - ("Category Inverse Choice", 8, 2): {11: 27666, 31: 38472, 36: 33862}, - ("Category Inverse Choice", 8, 3): {12: 24387, 33: 37477, 38: 38136}, - ("Category Inverse Choice", 8, 4): {16: 23316, 35: 38117, 40: 38567}, - ("Category Inverse Choice", 8, 5): {16: 30949, 42: 69051}, - ("Category Inverse Choice", 8, 6): {16: 26968, 43: 73032}, - ("Category Inverse Choice", 8, 7): {20: 24559, 44: 75441}, - ("Category Inverse Choice", 8, 8): {20: 1, 23: 22731, 41: 37835, 45: 39433}, + ("Category Inverse Choice", 8, 1): {10: 1400, 23: 36664, 27: 61936}, + ("Category Inverse Choice", 8, 2): {27: 34595, 32: 65405}, + ("Category Inverse Choice", 8, 3): {30: 13097, 35: 62142, 32: 24761}, + ("Category Inverse Choice", 8, 4): {35: 36672, 37: 63328}, + ("Category Inverse Choice", 8, 5): {39: 61292, 35: 14195, 37: 24513}, + ("Category Inverse Choice", 8, 6): {40: 65672, 39: 21040, 35: 4873, 37: 8415}, + ("Category Inverse Choice", 8, 7): {39: 13561, 42: 60493, 40: 25946}, + ("Category Inverse Choice", 8, 8): {39: 5250, 43: 61284, 42: 23421, 40: 10045}, ("Category Pair", 0, 0): {0: 100000}, ("Category Pair", 0, 1): {0: 100000}, ("Category Pair", 0, 2): {0: 100000}, @@ -1319,54 +1311,54 @@ ("Category Distincts", 2, 6): {1: 1, 2: 99999}, ("Category Distincts", 2, 7): {2: 100000}, ("Category Distincts", 2, 8): {2: 100000}, - ("Category Distincts", 3, 1): {1: 2760, 3: 97240}, - ("Category Distincts", 3, 2): {1: 15014, 3: 84986}, - ("Category Distincts", 3, 3): {1: 4866, 3: 95134}, - ("Category Distincts", 3, 4): {2: 1659, 3: 98341}, - ("Category Distincts", 3, 5): {2: 575, 3: 99425}, - ("Category Distincts", 3, 6): {2: 200, 3: 99800}, - ("Category Distincts", 3, 7): {2: 69, 3: 99931}, - ("Category Distincts", 3, 8): {2: 22, 3: 99978}, - ("Category Distincts", 4, 1): {1: 16634, 3: 83366}, - ("Category Distincts", 4, 2): {1: 1893, 4: 98107}, - ("Category Distincts", 4, 3): {2: 19861, 4: 80139}, - ("Category Distincts", 4, 4): {2: 9879, 4: 90121}, - ("Category Distincts", 4, 5): {2: 4906, 4: 95094}, - ("Category Distincts", 4, 6): {3: 2494, 4: 97506}, - ("Category Distincts", 4, 7): {3: 1297, 4: 98703}, - ("Category Distincts", 4, 8): {3: 611, 4: 99389}, - ("Category Distincts", 5, 1): {1: 5798, 4: 94202}, - ("Category Distincts", 5, 2): {2: 11843, 4: 88157}, - ("Category Distincts", 5, 3): {2: 3022, 5: 96978}, - ("Category Distincts", 5, 4): {3: 32354, 5: 67646}, - ("Category Distincts", 5, 5): {3: 21606, 5: 78394}, - ("Category Distincts", 5, 6): {3: 14525, 5: 85475}, - ("Category Distincts", 5, 7): {3: 9660, 5: 90340}, - ("Category Distincts", 5, 8): {3: 6463, 5: 93537}, - ("Category Distincts", 6, 1): {1: 25012, 4: 74988}, - ("Category Distincts", 6, 2): {2: 3299, 5: 96701}, - ("Category Distincts", 6, 3): {3: 17793, 5: 82207}, - ("Category Distincts", 6, 4): {3: 7831, 5: 92169}, - ("Category Distincts", 6, 5): {3: 3699, 6: 96301}, - ("Category Distincts", 6, 6): {4: 1557, 6: 98443}, - ("Category Distincts", 6, 7): {4: 728, 6: 99272}, - ("Category Distincts", 6, 8): {4: 321, 6: 99679}, - ("Category Distincts", 7, 1): {1: 13671, 5: 86329}, - ("Category Distincts", 7, 2): {2: 19686, 5: 80314}, - ("Category Distincts", 7, 3): {3: 6051, 6: 93949}, - ("Category Distincts", 7, 4): {3: 1796, 6: 98204}, - ("Category Distincts", 7, 5): {4: 28257, 6: 71743}, - ("Category Distincts", 7, 6): {4: 19581, 6: 80419}, - ("Category Distincts", 7, 7): {4: 13618, 6: 86382}, - ("Category Distincts", 7, 8): {4: 9545, 6: 90455}, - ("Category Distincts", 8, 1): {1: 7137, 5: 92863}, - ("Category Distincts", 8, 2): {2: 9414, 6: 90586}, - ("Category Distincts", 8, 3): {3: 1976, 6: 98024}, - ("Category Distincts", 8, 4): {4: 21397, 6: 78603}, - ("Category Distincts", 8, 5): {4: 12592, 6: 87408}, - ("Category Distincts", 8, 6): {4: 7177, 6: 92823}, - ("Category Distincts", 8, 7): {4: 4179, 6: 95821}, - ("Category Distincts", 8, 8): {5: 2440, 6: 97560}, + ("Category Distincts", 3, 1): {1: 2760, 2: 97240}, + ("Category Distincts", 3, 2): {1: 414, 3: 84996, 2: 14590}, + ("Category Distincts", 3, 3): {1: 109, 3: 99891}, + ("Category Distincts", 3, 4): {2: 11, 3: 99989}, + ("Category Distincts", 3, 5): {3: 100000}, + ("Category Distincts", 3, 6): {3: 100000}, + ("Category Distincts", 3, 7): {3: 100000}, + ("Category Distincts", 3, 8): {3: 100000}, + ("Category Distincts", 4, 1): {1: 458, 3: 83376, 2: 16166}, + ("Category Distincts", 4, 2): {1: 26, 4: 61232, 3: 37802, 2: 940}, + ("Category Distincts", 4, 3): {2: 3, 4: 97020, 3: 2977}, + ("Category Distincts", 4, 4): {4: 100000}, + ("Category Distincts", 4, 5): {4: 100000}, + ("Category Distincts", 4, 6): {4: 100000}, + ("Category Distincts", 4, 7): {4: 100000}, + ("Category Distincts", 4, 8): {4: 100000}, + ("Category Distincts", 5, 1): {1: 159, 3: 99841}, + ("Category Distincts", 5, 2): {2: 18, 4: 88167, 3: 11815}, + ("Category Distincts", 5, 3): {4: 100000}, + ("Category Distincts", 5, 4): {5: 67650, 4: 32350}, + ("Category Distincts", 5, 5): {5: 100000}, + ("Category Distincts", 5, 6): {5: 100000}, + ("Category Distincts", 5, 7): {5: 100000}, + ("Category Distincts", 5, 8): {5: 100000}, + ("Category Distincts", 6, 1): {1: 39, 4: 74998, 3: 24963}, + ("Category Distincts", 6, 2): {2: 1, 5: 61568, 4: 37296, 3: 1135}, + ("Category Distincts", 6, 3): {5: 93157, 4: 6843}, + ("Category Distincts", 6, 4): {5: 100000}, + ("Category Distincts", 6, 5): {5: 100000}, + ("Category Distincts", 6, 6): {5: 100000}, + ("Category Distincts", 6, 7): {5: 100000}, + ("Category Distincts", 6, 8): {6: 65828, 5: 34172}, + ("Category Distincts", 7, 1): {1: 13, 4: 99987}, + ("Category Distincts", 7, 2): {5: 99580, 4: 420}, + ("Category Distincts", 7, 3): {5: 100000}, + ("Category Distincts", 7, 4): {5: 100000}, + ("Category Distincts", 7, 5): {6: 71744, 5: 28256}, + ("Category Distincts", 7, 6): {6: 100000}, + ("Category Distincts", 7, 7): {6: 100000}, + ("Category Distincts", 7, 8): {6: 100000}, + ("Category Distincts", 8, 1): {4: 100000}, + ("Category Distincts", 8, 2): {5: 99981, 4: 19}, + ("Category Distincts", 8, 3): {6: 63291, 5: 36709}, + ("Category Distincts", 8, 4): {6: 99994, 5: 6}, + ("Category Distincts", 8, 5): {6: 100000}, + ("Category Distincts", 8, 6): {6: 100000}, + ("Category Distincts", 8, 7): {6: 100000}, + ("Category Distincts", 8, 8): {6: 100000}, ("Category Two times Ones", 0, 0): {0: 100000}, ("Category Two times Ones", 0, 1): {0: 100000}, ("Category Two times Ones", 0, 2): {0: 100000}, @@ -1378,7 +1370,7 @@ ("Category Two times Ones", 0, 8): {0: 100000}, ("Category Two times Ones", 1, 0): {0: 100000}, ("Category Two times Ones", 1, 1): {0: 100000}, - ("Category Two times Ones", 1, 2): {0: 100000}, + ("Category Two times Ones", 1, 2): {0: 69690, 2: 30310}, ("Category Two times Ones", 1, 3): {0: 57818, 2: 42182}, ("Category Two times Ones", 1, 4): {0: 48418, 2: 51582}, ("Category Two times Ones", 1, 5): {0: 40301, 2: 59699}, @@ -1386,68 +1378,68 @@ ("Category Two times Ones", 1, 7): {0: 28182, 2: 71818}, ("Category Two times Ones", 1, 8): {0: 23406, 2: 76594}, ("Category Two times Ones", 2, 0): {0: 100000}, - ("Category Two times Ones", 2, 1): {0: 100000}, + ("Category Two times Ones", 2, 1): {0: 69724, 2: 30276}, ("Category Two times Ones", 2, 2): {0: 48238, 2: 51762}, - ("Category Two times Ones", 2, 3): {0: 33290, 4: 66710}, - ("Category Two times Ones", 2, 4): {0: 23136, 4: 76864}, - ("Category Two times Ones", 2, 5): {0: 16146, 4: 83854}, - ("Category Two times Ones", 2, 6): {0: 11083, 4: 88917}, - ("Category Two times Ones", 2, 7): {0: 7662, 4: 92338}, - ("Category Two times Ones", 2, 8): {0: 5354, 4: 94646}, + ("Category Two times Ones", 2, 3): {0: 33290, 2: 66710}, + ("Category Two times Ones", 2, 4): {0: 23136, 2: 76864}, + ("Category Two times Ones", 2, 5): {0: 16146, 2: 48200, 4: 35654}, + ("Category Two times Ones", 2, 6): {0: 11083, 2: 44497, 4: 44420}, + ("Category Two times Ones", 2, 7): {0: 7662, 2: 40343, 4: 51995}, + ("Category Two times Ones", 2, 8): {0: 5354, 2: 35526, 4: 59120}, ("Category Two times Ones", 3, 0): {0: 100000}, ("Category Two times Ones", 3, 1): {0: 58021, 2: 41979}, - ("Category Two times Ones", 3, 2): {0: 33548, 4: 66452}, - ("Category Two times Ones", 3, 3): {0: 19375, 4: 80625}, - ("Category Two times Ones", 3, 4): {0: 10998, 4: 89002}, - ("Category Two times Ones", 3, 5): {0: 6519, 6: 93481}, - ("Category Two times Ones", 3, 6): {0: 3619, 6: 96381}, - ("Category Two times Ones", 3, 7): {0: 2195, 6: 97805}, - ("Category Two times Ones", 3, 8): {0: 13675, 6: 86325}, + ("Category Two times Ones", 3, 2): {0: 33548, 2: 66452}, + ("Category Two times Ones", 3, 3): {0: 19375, 2: 42372, 4: 38253}, + ("Category Two times Ones", 3, 4): {0: 10998, 2: 36435, 4: 52567}, + ("Category Two times Ones", 3, 5): {0: 7954, 4: 92046}, + ("Category Two times Ones", 3, 6): {0: 347, 4: 99653}, + ("Category Two times Ones", 3, 7): {0: 2, 4: 62851, 6: 37147}, + ("Category Two times Ones", 3, 8): {6: 99476, 4: 524}, ("Category Two times Ones", 4, 0): {0: 100000}, ("Category Two times Ones", 4, 1): {0: 48235, 2: 51765}, - ("Category Two times Ones", 4, 2): {0: 23289, 4: 76711}, - ("Category Two times Ones", 4, 3): {0: 11177, 6: 88823}, - ("Category Two times Ones", 4, 4): {0: 5499, 6: 94501}, - ("Category Two times Ones", 4, 5): {0: 18356, 6: 81644}, - ("Category Two times Ones", 4, 6): {0: 11169, 8: 88831}, - ("Category Two times Ones", 4, 7): {0: 6945, 8: 93055}, - ("Category Two times Ones", 4, 8): {0: 4091, 8: 95909}, + ("Category Two times Ones", 4, 2): {0: 23289, 2: 40678, 4: 36033}, + ("Category Two times Ones", 4, 3): {0: 11177, 2: 32677, 4: 56146}, + ("Category Two times Ones", 4, 4): {0: 5522, 4: 60436, 6: 34042}, + ("Category Two times Ones", 4, 5): {0: 4358, 6: 95642}, + ("Category Two times Ones", 4, 6): {0: 20, 6: 99980}, + ("Category Two times Ones", 4, 7): {6: 100000}, + ("Category Two times Ones", 4, 8): {6: 65250, 8: 34750}, ("Category Two times Ones", 5, 0): {0: 100000}, - ("Category Two times Ones", 5, 1): {0: 40028, 4: 59972}, - ("Category Two times Ones", 5, 2): {0: 16009, 6: 83991}, - ("Category Two times Ones", 5, 3): {0: 6489, 6: 93511}, - ("Category Two times Ones", 5, 4): {0: 16690, 8: 83310}, - ("Category Two times Ones", 5, 5): {0: 9016, 8: 90984}, - ("Category Two times Ones", 5, 6): {0: 4602, 8: 95398}, - ("Category Two times Ones", 5, 7): {0: 13627, 10: 86373}, - ("Category Two times Ones", 5, 8): {0: 8742, 10: 91258}, + ("Category Two times Ones", 5, 1): {0: 40028, 2: 59972}, + ("Category Two times Ones", 5, 2): {0: 16009, 2: 35901, 4: 48090}, + ("Category Two times Ones", 5, 3): {0: 6820, 4: 57489, 6: 35691}, + ("Category Two times Ones", 5, 4): {0: 5285, 6: 94715}, + ("Category Two times Ones", 5, 5): {0: 18, 6: 66613, 8: 33369}, + ("Category Two times Ones", 5, 6): {8: 99073, 6: 927}, + ("Category Two times Ones", 5, 7): {8: 100000}, + ("Category Two times Ones", 5, 8): {8: 100000}, ("Category Two times Ones", 6, 0): {0: 100000}, - ("Category Two times Ones", 6, 1): {0: 33502, 4: 66498}, - ("Category Two times Ones", 6, 2): {0: 11210, 6: 88790}, - ("Category Two times Ones", 6, 3): {0: 3673, 6: 96327}, - ("Category Two times Ones", 6, 4): {0: 9291, 8: 90709}, - ("Category Two times Ones", 6, 5): {0: 441, 8: 99559}, - ("Category Two times Ones", 6, 6): {0: 10255, 10: 89745}, - ("Category Two times Ones", 6, 7): {0: 5646, 10: 94354}, - ("Category Two times Ones", 6, 8): {0: 14287, 12: 85713}, + ("Category Two times Ones", 6, 1): {0: 33502, 2: 66498}, + ("Category Two times Ones", 6, 2): {0: 13681, 4: 59162, 2: 27157}, + ("Category Two times Ones", 6, 3): {0: 5486, 6: 94514}, + ("Category Two times Ones", 6, 4): {0: 190, 6: 62108, 8: 37702}, + ("Category Two times Ones", 6, 5): {8: 99882, 6: 118}, + ("Category Two times Ones", 6, 6): {8: 65144, 10: 34856}, + ("Category Two times Ones", 6, 7): {10: 99524, 8: 476}, + ("Category Two times Ones", 6, 8): {10: 100000}, ("Category Two times Ones", 7, 0): {0: 100000}, - ("Category Two times Ones", 7, 1): {0: 27683, 4: 72317}, - ("Category Two times Ones", 7, 2): {0: 7824, 6: 92176}, - ("Category Two times Ones", 7, 3): {0: 13167, 8: 86833}, - ("Category Two times Ones", 7, 4): {0: 564, 10: 99436}, - ("Category Two times Ones", 7, 5): {0: 9824, 10: 90176}, - ("Category Two times Ones", 7, 6): {0: 702, 12: 99298}, - ("Category Two times Ones", 7, 7): {0: 10186, 12: 89814}, - ("Category Two times Ones", 7, 8): {0: 942, 12: 99058}, + ("Category Two times Ones", 7, 1): {0: 27683, 2: 39060, 4: 33257}, + ("Category Two times Ones", 7, 2): {0: 8683, 4: 54932, 6: 36385}, + ("Category Two times Ones", 7, 3): {0: 373, 6: 66572, 8: 33055}, + ("Category Two times Ones", 7, 4): {8: 99816, 6: 184}, + ("Category Two times Ones", 7, 5): {8: 58124, 10: 41876}, + ("Category Two times Ones", 7, 6): {10: 99948, 8: 52}, + ("Category Two times Ones", 7, 7): {10: 62549, 12: 37451}, + ("Category Two times Ones", 7, 8): {12: 99818, 10: 182}, ("Category Two times Ones", 8, 0): {0: 100000}, - ("Category Two times Ones", 8, 1): {0: 23378, 4: 76622}, - ("Category Two times Ones", 8, 2): {0: 5420, 8: 94580}, - ("Category Two times Ones", 8, 3): {0: 8560, 10: 91440}, - ("Category Two times Ones", 8, 4): {0: 12199, 12: 87801}, - ("Category Two times Ones", 8, 5): {0: 879, 12: 99121}, - ("Category Two times Ones", 8, 6): {0: 9033, 14: 90967}, - ("Category Two times Ones", 8, 7): {0: 15767, 14: 84233}, - ("Category Two times Ones", 8, 8): {2: 9033, 14: 90967}, + ("Category Two times Ones", 8, 1): {0: 23378, 2: 37157, 4: 39465}, + ("Category Two times Ones", 8, 2): {0: 5602, 6: 94398}, + ("Category Two times Ones", 8, 3): {0: 8, 6: 10911, 8: 89081}, + ("Category Two times Ones", 8, 4): {8: 59809, 10: 40191}, + ("Category Two times Ones", 8, 5): {10: 68808, 12: 31114, 8: 78}, + ("Category Two times Ones", 8, 6): {12: 98712, 10: 1287, 8: 1}, + ("Category Two times Ones", 8, 7): {12: 100000}, + ("Category Two times Ones", 8, 8): {12: 59018, 14: 40982}, ("Category Half of Sixes", 0, 0): {0: 100000}, ("Category Half of Sixes", 0, 1): {0: 100000}, ("Category Half of Sixes", 0, 2): {0: 100000}, @@ -1469,386 +1461,386 @@ ("Category Half of Sixes", 2, 0): {0: 100000}, ("Category Half of Sixes", 2, 1): {0: 69419, 3: 30581}, ("Category Half of Sixes", 2, 2): {0: 48202, 3: 51798}, - ("Category Half of Sixes", 2, 3): {0: 33376, 6: 66624}, - ("Category Half of Sixes", 2, 4): {0: 23276, 6: 76724}, - ("Category Half of Sixes", 2, 5): {0: 16092, 6: 83908}, - ("Category Half of Sixes", 2, 6): {0: 11232, 6: 88768}, - ("Category Half of Sixes", 2, 7): {0: 7589, 6: 92411}, - ("Category Half of Sixes", 2, 8): {0: 5447, 6: 94553}, + ("Category Half of Sixes", 2, 3): {0: 33376, 3: 66624}, + ("Category Half of Sixes", 2, 4): {0: 23276, 3: 49810, 6: 26914}, + ("Category Half of Sixes", 2, 5): {0: 16092, 3: 47718, 6: 36190}, + ("Category Half of Sixes", 2, 6): {0: 11232, 3: 44515, 6: 44253}, + ("Category Half of Sixes", 2, 7): {0: 7589, 3: 40459, 6: 51952}, + ("Category Half of Sixes", 2, 8): {0: 5447, 3: 35804, 6: 58749}, ("Category Half of Sixes", 3, 0): {0: 100000}, ("Category Half of Sixes", 3, 1): {0: 57964, 3: 42036}, - ("Category Half of Sixes", 3, 2): {0: 33637, 6: 66363}, - ("Category Half of Sixes", 3, 3): {0: 19520, 6: 80480}, - ("Category Half of Sixes", 3, 4): {0: 11265, 6: 88735}, - ("Category Half of Sixes", 3, 5): {0: 6419, 6: 72177, 9: 21404}, - ("Category Half of Sixes", 3, 6): {0: 3810, 6: 66884, 9: 29306}, - ("Category Half of Sixes", 3, 7): {0: 2174, 6: 60595, 9: 37231}, - ("Category Half of Sixes", 3, 8): {0: 1237, 6: 53693, 9: 45070}, + ("Category Half of Sixes", 3, 2): {0: 33637, 3: 44263, 6: 22100}, + ("Category Half of Sixes", 3, 3): {0: 19520, 3: 42382, 6: 38098}, + ("Category Half of Sixes", 3, 4): {0: 11265, 3: 35772, 6: 52963}, + ("Category Half of Sixes", 3, 5): {0: 6419, 3: 28916, 6: 43261, 9: 21404}, + ("Category Half of Sixes", 3, 6): {0: 3810, 3: 22496, 6: 44388, 9: 29306}, + ("Category Half of Sixes", 3, 7): {0: 1317, 6: 30047, 9: 68636}, + ("Category Half of Sixes", 3, 8): {0: 750, 9: 99250}, ("Category Half of Sixes", 4, 0): {0: 100000}, - ("Category Half of Sixes", 4, 1): {0: 48121, 6: 51879}, - ("Category Half of Sixes", 4, 2): {0: 23296, 6: 76704}, - ("Category Half of Sixes", 4, 3): {0: 11233, 6: 68363, 9: 20404}, - ("Category Half of Sixes", 4, 4): {0: 5463, 6: 60738, 9: 33799}, - ("Category Half of Sixes", 4, 5): {0: 2691, 6: 50035, 12: 47274}, - ("Category Half of Sixes", 4, 6): {0: 11267, 9: 88733}, - ("Category Half of Sixes", 4, 7): {0: 6921, 9: 66034, 12: 27045}, - ("Category Half of Sixes", 4, 8): {0: 4185, 9: 61079, 12: 34736}, + ("Category Half of Sixes", 4, 1): {0: 48121, 3: 51879}, + ("Category Half of Sixes", 4, 2): {0: 23296, 3: 40989, 6: 35715}, + ("Category Half of Sixes", 4, 3): {0: 11233, 3: 32653, 6: 35710, 9: 20404}, + ("Category Half of Sixes", 4, 4): {0: 5463, 3: 23270, 6: 37468, 9: 33799}, + ("Category Half of Sixes", 4, 5): {0: 5225, 6: 29678, 9: 65097}, + ("Category Half of Sixes", 4, 6): {0: 3535, 9: 96465}, + ("Category Half of Sixes", 4, 7): {0: 6, 9: 72939, 12: 27055}, + ("Category Half of Sixes", 4, 8): {9: 25326, 12: 74674}, ("Category Half of Sixes", 5, 0): {0: 100000}, - ("Category Half of Sixes", 5, 1): {0: 40183, 6: 59817}, - ("Category Half of Sixes", 5, 2): {0: 16197, 6: 83803}, - ("Category Half of Sixes", 5, 3): {0: 6583, 6: 57826, 9: 35591}, - ("Category Half of Sixes", 5, 4): {0: 2636, 9: 76577, 12: 20787}, - ("Category Half of Sixes", 5, 5): {0: 8879, 9: 57821, 12: 33300}, - ("Category Half of Sixes", 5, 6): {0: 4652, 12: 95348}, - ("Category Half of Sixes", 5, 7): {0: 2365, 12: 97635}, - ("Category Half of Sixes", 5, 8): {0: 8671, 12: 64865, 15: 26464}, + ("Category Half of Sixes", 5, 1): {0: 40183, 3: 59817}, + ("Category Half of Sixes", 5, 2): {0: 16197, 3: 35494, 6: 48309}, + ("Category Half of Sixes", 5, 3): {0: 6583, 3: 23394, 6: 34432, 9: 35591}, + ("Category Half of Sixes", 5, 4): {0: 5007, 6: 25159, 9: 49038, 12: 20796}, + ("Category Half of Sixes", 5, 5): {0: 2900, 9: 38935, 12: 58165}, + ("Category Half of Sixes", 5, 6): {0: 2090, 12: 97910}, + ("Category Half of Sixes", 5, 7): {12: 99994, 9: 6}, + ("Category Half of Sixes", 5, 8): {12: 73524, 15: 26476}, ("Category Half of Sixes", 6, 0): {0: 100000}, - ("Category Half of Sixes", 6, 1): {0: 33473, 6: 66527}, - ("Category Half of Sixes", 6, 2): {0: 11147, 6: 62222, 9: 26631}, - ("Category Half of Sixes", 6, 3): {0: 3628, 9: 75348, 12: 21024}, - ("Category Half of Sixes", 6, 4): {0: 9498, 9: 52940, 15: 37562}, - ("Category Half of Sixes", 6, 5): {0: 4236, 12: 72944, 15: 22820}, - ("Category Half of Sixes", 6, 6): {0: 10168, 12: 55072, 15: 34760}, - ("Category Half of Sixes", 6, 7): {0: 5519, 15: 94481}, - ("Category Half of Sixes", 6, 8): {0: 2968, 15: 76504, 18: 20528}, + ("Category Half of Sixes", 6, 1): {0: 33473, 3: 40175, 6: 26352}, + ("Category Half of Sixes", 6, 2): {0: 11147, 3: 29592, 6: 32630, 9: 26631}, + ("Category Half of Sixes", 6, 3): {0: 2460, 6: 21148, 9: 55356, 12: 21036}, + ("Category Half of Sixes", 6, 4): {0: 997, 9: 29741, 12: 69262}, + ("Category Half of Sixes", 6, 5): {0: 831, 12: 76328, 15: 22841}, + ("Category Half of Sixes", 6, 6): {12: 29960, 15: 70040}, + ("Category Half of Sixes", 6, 7): {15: 100000}, + ("Category Half of Sixes", 6, 8): {15: 79456, 18: 20544}, ("Category Half of Sixes", 7, 0): {0: 100000}, - ("Category Half of Sixes", 7, 1): {0: 27933, 6: 72067}, - ("Category Half of Sixes", 7, 2): {0: 7794, 6: 55728, 12: 36478}, - ("Category Half of Sixes", 7, 3): {0: 2138, 9: 64554, 15: 33308}, - ("Category Half of Sixes", 7, 4): {0: 5238, 12: 69214, 15: 25548}, - ("Category Half of Sixes", 7, 5): {0: 9894, 15: 90106}, - ("Category Half of Sixes", 7, 6): {0: 4656, 15: 69353, 18: 25991}, - ("Category Half of Sixes", 7, 7): {0: 10005, 15: 52430, 18: 37565}, - ("Category Half of Sixes", 7, 8): {0: 5710, 18: 94290}, + ("Category Half of Sixes", 7, 1): {0: 27933, 3: 39105, 6: 32962}, + ("Category Half of Sixes", 7, 2): {0: 7794, 3: 23896, 6: 31832, 9: 36478}, + ("Category Half of Sixes", 7, 3): {0: 1321, 9: 40251, 12: 58428}, + ("Category Half of Sixes", 7, 4): {0: 370, 12: 74039, 15: 25591}, + ("Category Half of Sixes", 7, 5): {0: 6, 15: 98660, 12: 1334}, + ("Category Half of Sixes", 7, 6): {15: 73973, 18: 26027}, + ("Category Half of Sixes", 7, 7): {18: 100000}, + ("Category Half of Sixes", 7, 8): {18: 100000}, ("Category Half of Sixes", 8, 0): {0: 100000}, - ("Category Half of Sixes", 8, 1): {0: 23337, 6: 76663}, - ("Category Half of Sixes", 8, 2): {0: 5310, 9: 74178, 12: 20512}, - ("Category Half of Sixes", 8, 3): {0: 8656, 12: 70598, 15: 20746}, - ("Category Half of Sixes", 8, 4): {0: 291, 12: 59487, 18: 40222}, - ("Category Half of Sixes", 8, 5): {0: 5145, 15: 63787, 18: 31068}, - ("Category Half of Sixes", 8, 6): {0: 8804, 18: 91196}, - ("Category Half of Sixes", 8, 7): {0: 4347, 18: 65663, 21: 29990}, - ("Category Half of Sixes", 8, 8): {0: 9252, 21: 90748}, + ("Category Half of Sixes", 8, 1): {0: 23337, 3: 37232, 6: 39431}, + ("Category Half of Sixes", 8, 2): {0: 4652, 6: 29310, 9: 45517, 12: 20521}, + ("Category Half of Sixes", 8, 3): {0: 1300, 12: 77919, 15: 20781}, + ("Category Half of Sixes", 8, 4): {0: 21, 15: 98678, 12: 1301}, + ("Category Half of Sixes", 8, 5): {15: 68893, 18: 31107}, + ("Category Half of Sixes", 8, 6): {18: 100000}, + ("Category Half of Sixes", 8, 7): {18: 69986, 21: 30014}, + ("Category Half of Sixes", 8, 8): {21: 98839, 18: 1161}, ("Category Twos and Threes", 1, 1): {0: 66466, 2: 33534}, ("Category Twos and Threes", 1, 2): {0: 55640, 2: 44360}, - ("Category Twos and Threes", 1, 3): {0: 57822, 3: 42178}, - ("Category Twos and Threes", 1, 4): {0: 48170, 3: 51830}, - ("Category Twos and Threes", 1, 5): {0: 40294, 3: 59706}, - ("Category Twos and Threes", 1, 6): {0: 33417, 3: 66583}, - ("Category Twos and Threes", 1, 7): {0: 27852, 3: 72148}, - ("Category Twos and Threes", 1, 8): {0: 23364, 3: 76636}, - ("Category Twos and Threes", 2, 1): {0: 44565, 3: 55435}, - ("Category Twos and Threes", 2, 2): {0: 46335, 3: 53665}, - ("Category Twos and Threes", 2, 3): {0: 32347, 3: 67653}, - ("Category Twos and Threes", 2, 4): {0: 22424, 5: 77576}, - ("Category Twos and Threes", 2, 5): {0: 15661, 6: 84339}, - ("Category Twos and Threes", 2, 6): {0: 10775, 6: 89225}, - ("Category Twos and Threes", 2, 7): {0: 7375, 6: 92625}, - ("Category Twos and Threes", 2, 8): {0: 5212, 6: 94788}, - ("Category Twos and Threes", 3, 1): {0: 29892, 3: 70108}, - ("Category Twos and Threes", 3, 2): {0: 17285, 5: 82715}, - ("Category Twos and Threes", 3, 3): {0: 17436, 6: 82564}, - ("Category Twos and Threes", 3, 4): {0: 9962, 6: 90038}, - ("Category Twos and Threes", 3, 5): {0: 3347, 6: 96653}, - ("Category Twos and Threes", 3, 6): {0: 1821, 8: 98179}, - ("Category Twos and Threes", 3, 7): {0: 1082, 6: 61417, 9: 37501}, - ("Category Twos and Threes", 3, 8): {0: 13346, 9: 86654}, - ("Category Twos and Threes", 4, 1): {0: 19619, 5: 80381}, - ("Category Twos and Threes", 4, 2): {0: 18914, 6: 81086}, - ("Category Twos and Threes", 4, 3): {0: 4538, 5: 61859, 8: 33603}, - ("Category Twos and Threes", 4, 4): {0: 2183, 6: 62279, 9: 35538}, - ("Category Twos and Threes", 4, 5): {0: 16416, 9: 83584}, - ("Category Twos and Threes", 4, 6): {0: 6285, 9: 93715}, - ("Category Twos and Threes", 4, 7): {0: 30331, 11: 69669}, - ("Category Twos and Threes", 4, 8): {0: 22305, 12: 77695}, - ("Category Twos and Threes", 5, 1): {0: 13070, 5: 86930}, - ("Category Twos and Threes", 5, 2): {0: 5213, 5: 61441, 8: 33346}, - ("Category Twos and Threes", 5, 3): {0: 2126, 6: 58142, 9: 39732}, - ("Category Twos and Threes", 5, 4): {0: 848, 2: 30734, 11: 68418}, - ("Category Twos and Threes", 5, 5): {0: 29502, 12: 70498}, - ("Category Twos and Threes", 5, 6): {0: 123, 9: 52792, 12: 47085}, - ("Category Twos and Threes", 5, 7): {0: 8241, 12: 91759}, - ("Category Twos and Threes", 5, 8): {0: 13, 2: 31670, 14: 68317}, - ("Category Twos and Threes", 6, 1): {0: 22090, 6: 77910}, - ("Category Twos and Threes", 6, 2): {0: 2944, 6: 62394, 9: 34662}, - ("Category Twos and Threes", 6, 3): {0: 977, 2: 30626, 11: 68397}, - ("Category Twos and Threes", 6, 4): {0: 320, 8: 58370, 12: 41310}, - ("Category Twos and Threes", 6, 5): {0: 114, 2: 31718, 14: 68168}, - ("Category Twos and Threes", 6, 6): {0: 29669, 15: 70331}, - ("Category Twos and Threes", 6, 7): {0: 19855, 15: 80145}, - ("Category Twos and Threes", 6, 8): {0: 8524, 15: 91476}, - ("Category Twos and Threes", 7, 1): {0: 5802, 4: 54580, 7: 39618}, - ("Category Twos and Threes", 7, 2): {0: 1605, 6: 62574, 10: 35821}, - ("Category Twos and Threes", 7, 3): {0: 471, 8: 59691, 12: 39838}, - ("Category Twos and Threes", 7, 4): {0: 26620, 14: 73380}, - ("Category Twos and Threes", 7, 5): {0: 17308, 11: 37515, 15: 45177}, - ("Category Twos and Threes", 7, 6): {0: 30281, 17: 69719}, - ("Category Twos and Threes", 7, 7): {0: 28433, 18: 71567}, - ("Category Twos and Threes", 7, 8): {0: 13274, 18: 86726}, - ("Category Twos and Threes", 8, 1): {0: 3799, 5: 56614, 8: 39587}, - ("Category Twos and Threes", 8, 2): {0: 902, 7: 58003, 11: 41095}, - ("Category Twos and Threes", 8, 3): {0: 29391, 14: 70609}, - ("Category Twos and Threes", 8, 4): {0: 26041, 12: 40535, 16: 33424}, - ("Category Twos and Threes", 8, 5): {0: 26328, 14: 38760, 18: 34912}, - ("Category Twos and Threes", 8, 6): {0: 22646, 15: 45218, 19: 32136}, - ("Category Twos and Threes", 8, 7): {0: 25908, 20: 74092}, - ("Category Twos and Threes", 8, 8): {3: 18441, 17: 38826, 21: 42733}, - ("Category Sum of Odds", 1, 1): {0: 66572, 5: 33428}, - ("Category Sum of Odds", 1, 2): {0: 44489, 5: 55511}, - ("Category Sum of Odds", 1, 3): {0: 37185, 5: 62815}, - ("Category Sum of Odds", 1, 4): {0: 30917, 5: 69083}, - ("Category Sum of Odds", 1, 5): {0: 41833, 5: 58167}, - ("Category Sum of Odds", 1, 6): {0: 34902, 5: 65098}, - ("Category Sum of Odds", 1, 7): {0: 29031, 5: 70969}, - ("Category Sum of Odds", 1, 8): {0: 24051, 5: 75949}, - ("Category Sum of Odds", 2, 1): {0: 66460, 5: 33540}, - ("Category Sum of Odds", 2, 2): {0: 11216, 5: 65597, 8: 23187}, - ("Category Sum of Odds", 2, 3): {0: 30785, 8: 69215}, - ("Category Sum of Odds", 2, 4): {0: 21441, 10: 78559}, - ("Category Sum of Odds", 2, 5): {0: 14948, 10: 85052}, - ("Category Sum of Odds", 2, 6): {0: 4657, 3: 35569, 10: 59774}, - ("Category Sum of Odds", 2, 7): {0: 7262, 5: 42684, 10: 50054}, - ("Category Sum of Odds", 2, 8): {0: 4950, 5: 37432, 10: 57618}, - ("Category Sum of Odds", 3, 1): {0: 29203, 6: 70797}, - ("Category Sum of Odds", 3, 2): {0: 34454, 9: 65546}, - ("Category Sum of Odds", 3, 3): {0: 5022, 3: 32067, 8: 45663, 13: 17248}, - ("Category Sum of Odds", 3, 4): {0: 6138, 4: 33396, 13: 60466}, - ("Category Sum of Odds", 3, 5): {0: 29405, 15: 70595}, - ("Category Sum of Odds", 3, 6): {0: 21390, 15: 78610}, - ("Category Sum of Odds", 3, 7): {0: 8991, 8: 38279, 15: 52730}, - ("Category Sum of Odds", 3, 8): {0: 6340, 8: 34003, 15: 59657}, - ("Category Sum of Odds", 4, 1): {0: 28095, 4: 38198, 8: 33707}, - ("Category Sum of Odds", 4, 2): {0: 27003, 11: 72997}, - ("Category Sum of Odds", 4, 3): {0: 18712, 8: 40563, 13: 40725}, - ("Category Sum of Odds", 4, 4): {0: 30691, 15: 69309}, - ("Category Sum of Odds", 4, 5): {0: 433, 3: 32140, 13: 43150, 18: 24277}, - ("Category Sum of Odds", 4, 6): {0: 6549, 9: 32451, 15: 43220, 20: 17780}, - ("Category Sum of Odds", 4, 7): {0: 29215, 15: 45491, 20: 25294}, - ("Category Sum of Odds", 4, 8): {0: 11807, 13: 38927, 20: 49266}, - ("Category Sum of Odds", 5, 1): {0: 25139, 9: 74861}, - ("Category Sum of Odds", 5, 2): {0: 25110, 9: 40175, 14: 34715}, - ("Category Sum of Odds", 5, 3): {0: 23453, 11: 37756, 16: 38791}, - ("Category Sum of Odds", 5, 4): {0: 22993, 13: 37263, 18: 39744}, - ("Category Sum of Odds", 5, 5): {0: 25501, 15: 38407, 20: 36092}, - ("Category Sum of Odds", 5, 6): {0: 2542, 10: 32537, 18: 41122, 23: 23799}, - ("Category Sum of Odds", 5, 7): {0: 8228, 14: 32413, 20: 41289, 25: 18070}, - ("Category Sum of Odds", 5, 8): {0: 2, 2: 31173, 20: 43652, 25: 25173}, - ("Category Sum of Odds", 6, 1): {0: 23822, 6: 40166, 11: 36012}, - ("Category Sum of Odds", 6, 2): {0: 24182, 11: 37137, 16: 38681}, - ("Category Sum of Odds", 6, 3): {0: 27005, 14: 35759, 19: 37236}, - ("Category Sum of Odds", 6, 4): {0: 25133, 16: 35011, 21: 39856}, - ("Category Sum of Odds", 6, 5): {0: 24201, 18: 34934, 23: 40865}, - ("Category Sum of Odds", 6, 6): {0: 12978, 17: 32943, 23: 36836, 28: 17243}, - ("Category Sum of Odds", 6, 7): {0: 2314, 14: 32834, 23: 40134, 28: 24718}, - ("Category Sum of Odds", 6, 8): {0: 5464, 18: 34562, 25: 40735, 30: 19239}, - ("Category Sum of Odds", 7, 1): {0: 29329, 8: 37697, 13: 32974}, - ("Category Sum of Odds", 7, 2): {0: 29935, 14: 34878, 19: 35187}, - ("Category Sum of Odds", 7, 3): {0: 30638, 17: 33733, 22: 35629}, - ("Category Sum of Odds", 7, 4): {0: 163, 6: 32024, 20: 33870, 25: 33943}, - ("Category Sum of Odds", 7, 5): {0: 31200, 22: 35565, 27: 33235}, - ("Category Sum of Odds", 7, 6): {2: 30174, 24: 36670, 29: 33156}, - ("Category Sum of Odds", 7, 7): {4: 8712, 21: 35208, 28: 36799, 33: 19281}, - ("Category Sum of Odds", 7, 8): {0: 1447, 18: 32027, 28: 39941, 33: 26585}, - ("Category Sum of Odds", 8, 1): {0: 26931, 9: 35423, 14: 37646}, - ("Category Sum of Odds", 8, 2): {0: 29521, 16: 32919, 21: 37560}, - ("Category Sum of Odds", 8, 3): {0: 412, 7: 32219, 20: 32055, 25: 35314}, - ("Category Sum of Odds", 8, 4): {1: 27021, 22: 36376, 28: 36603}, - ("Category Sum of Odds", 8, 5): {1: 1069, 14: 32451, 26: 32884, 31: 33596}, - ("Category Sum of Odds", 8, 6): {4: 31598, 28: 33454, 33: 34948}, - ("Category Sum of Odds", 8, 7): {6: 27327, 29: 35647, 34: 37026}, - ("Category Sum of Odds", 8, 8): {4: 1, 26: 40489, 33: 37825, 38: 21685}, - ("Category Sum of Evens", 1, 1): {0: 49585, 6: 50415}, - ("Category Sum of Evens", 1, 2): {0: 44331, 6: 55669}, - ("Category Sum of Evens", 1, 3): {0: 29576, 6: 70424}, - ("Category Sum of Evens", 1, 4): {0: 24744, 6: 75256}, - ("Category Sum of Evens", 1, 5): {0: 20574, 6: 79426}, - ("Category Sum of Evens", 1, 6): {0: 17182, 6: 82818}, - ("Category Sum of Evens", 1, 7): {0: 14152, 6: 85848}, - ("Category Sum of Evens", 1, 8): {0: 8911, 6: 91089}, - ("Category Sum of Evens", 2, 1): {0: 25229, 8: 74771}, - ("Category Sum of Evens", 2, 2): {0: 18682, 6: 58078, 10: 23240}, - ("Category Sum of Evens", 2, 3): {0: 8099, 10: 91901}, - ("Category Sum of Evens", 2, 4): {0: 16906, 12: 83094}, - ("Category Sum of Evens", 2, 5): {0: 11901, 12: 88099}, - ("Category Sum of Evens", 2, 6): {0: 8054, 12: 91946}, - ("Category Sum of Evens", 2, 7): {0: 5695, 12: 94305}, - ("Category Sum of Evens", 2, 8): {0: 3950, 12: 96050}, - ("Category Sum of Evens", 3, 1): {0: 25054, 6: 51545, 10: 23401}, - ("Category Sum of Evens", 3, 2): {0: 17863, 10: 64652, 14: 17485}, - ("Category Sum of Evens", 3, 3): {0: 7748, 12: 75072, 16: 17180}, - ("Category Sum of Evens", 3, 4): {0: 1318, 12: 70339, 16: 28343}, - ("Category Sum of Evens", 3, 5): {0: 7680, 12: 53582, 18: 38738}, - ("Category Sum of Evens", 3, 6): {0: 1475, 12: 50152, 18: 48373}, - ("Category Sum of Evens", 3, 7): {0: 14328, 18: 85672}, - ("Category Sum of Evens", 3, 8): {0: 10001, 18: 89999}, - ("Category Sum of Evens", 4, 1): {0: 6214, 8: 67940, 12: 25846}, - ("Category Sum of Evens", 4, 2): {0: 16230, 12: 55675, 16: 28095}, - ("Category Sum of Evens", 4, 3): {0: 11069, 16: 70703, 20: 18228}, - ("Category Sum of Evens", 4, 4): {0: 13339, 20: 86661}, - ("Category Sum of Evens", 4, 5): {0: 8193, 18: 66423, 22: 25384}, - ("Category Sum of Evens", 4, 6): {0: 11127, 18: 53742, 22: 35131}, - ("Category Sum of Evens", 4, 7): {0: 7585, 18: 48073, 24: 44342}, - ("Category Sum of Evens", 4, 8): {0: 642, 18: 46588, 24: 52770}, - ("Category Sum of Evens", 5, 1): {0: 8373, 8: 50641, 16: 40986}, - ("Category Sum of Evens", 5, 2): {0: 7271, 12: 42254, 20: 50475}, - ("Category Sum of Evens", 5, 3): {0: 8350, 16: 44711, 24: 46939}, - ("Category Sum of Evens", 5, 4): {0: 8161, 18: 44426, 26: 47413}, - ("Category Sum of Evens", 5, 5): {0: 350, 8: 16033, 24: 67192, 28: 16425}, - ("Category Sum of Evens", 5, 6): {0: 10318, 24: 64804, 28: 24878}, - ("Category Sum of Evens", 5, 7): {0: 12783, 24: 52804, 28: 34413}, - ("Category Sum of Evens", 5, 8): {0: 1, 24: 56646, 30: 43353}, - ("Category Sum of Evens", 6, 1): {0: 10482, 10: 48137, 18: 41381}, - ("Category Sum of Evens", 6, 2): {0: 12446, 16: 43676, 24: 43878}, - ("Category Sum of Evens", 6, 3): {0: 11037, 20: 44249, 28: 44714}, - ("Category Sum of Evens", 6, 4): {0: 10005, 22: 42316, 30: 47679}, - ("Category Sum of Evens", 6, 5): {0: 9751, 24: 42204, 32: 48045}, - ("Category Sum of Evens", 6, 6): {0: 9692, 26: 45108, 34: 45200}, - ("Category Sum of Evens", 6, 7): {4: 1437, 26: 42351, 34: 56212}, - ("Category Sum of Evens", 6, 8): {4: 13017, 30: 51814, 36: 35169}, - ("Category Sum of Evens", 7, 1): {0: 12688, 12: 45275, 20: 42037}, - ("Category Sum of Evens", 7, 2): {0: 1433, 20: 60350, 28: 38217}, - ("Category Sum of Evens", 7, 3): {0: 13724, 24: 43514, 32: 42762}, - ("Category Sum of Evens", 7, 4): {0: 11285, 26: 40694, 34: 48021}, - ("Category Sum of Evens", 7, 5): {4: 5699, 28: 43740, 36: 50561}, - ("Category Sum of Evens", 7, 6): {4: 5478, 30: 43711, 38: 50811}, - ("Category Sum of Evens", 7, 7): {6: 9399, 32: 43251, 40: 47350}, - ("Category Sum of Evens", 7, 8): {10: 1490, 32: 40719, 40: 57791}, - ("Category Sum of Evens", 8, 1): {0: 14585, 14: 42804, 22: 42611}, - ("Category Sum of Evens", 8, 2): {0: 15891, 22: 39707, 30: 44402}, - ("Category Sum of Evens", 8, 3): {2: 297, 12: 16199, 28: 42274, 36: 41230}, - ("Category Sum of Evens", 8, 4): {0: 7625, 30: 43948, 38: 48427}, - ("Category Sum of Evens", 8, 5): {4: 413, 18: 16209, 34: 43301, 42: 40077}, - ("Category Sum of Evens", 8, 6): {6: 14927, 36: 43139, 44: 41934}, - ("Category Sum of Evens", 8, 7): {8: 5042, 36: 40440, 44: 54518}, - ("Category Sum of Evens", 8, 8): {10: 5005, 38: 44269, 46: 50726}, - ("Category Double Threes and Fours", 1, 1): {0: 66749, 8: 33251}, - ("Category Double Threes and Fours", 1, 2): {0: 44675, 8: 55325}, - ("Category Double Threes and Fours", 1, 3): {0: 29592, 8: 70408}, - ("Category Double Threes and Fours", 1, 4): {0: 24601, 8: 75399}, - ("Category Double Threes and Fours", 1, 5): {0: 20499, 8: 79501}, - ("Category Double Threes and Fours", 1, 6): {0: 17116, 8: 82884}, - ("Category Double Threes and Fours", 1, 7): {0: 14193, 8: 85807}, - ("Category Double Threes and Fours", 1, 8): {0: 11977, 8: 88023}, - ("Category Double Threes and Fours", 2, 1): {0: 44382, 8: 55618}, - ("Category Double Threes and Fours", 2, 2): {0: 19720, 8: 57236, 14: 23044}, - ("Category Double Threes and Fours", 2, 3): {0: 8765, 8: 41937, 14: 49298}, - ("Category Double Threes and Fours", 2, 4): {0: 6164, 16: 93836}, - ("Category Double Threes and Fours", 2, 5): {0: 4307, 8: 38682, 16: 57011}, - ("Category Double Threes and Fours", 2, 6): {0: 2879, 8: 32717, 16: 64404}, - ("Category Double Threes and Fours", 2, 7): {0: 6679, 16: 93321}, - ("Category Double Threes and Fours", 2, 8): {0: 4758, 16: 95242}, - ("Category Double Threes and Fours", 3, 1): {0: 29378, 8: 50024, 14: 20598}, - ("Category Double Threes and Fours", 3, 2): {0: 8894, 14: 74049, 18: 17057}, - ("Category Double Threes and Fours", 3, 3): {0: 2643, 14: 62555, 22: 34802}, - ("Category Double Threes and Fours", 3, 4): {0: 1523, 6: 19996, 16: 50281, 22: 28200}, - ("Category Double Threes and Fours", 3, 5): {0: 845, 16: 60496, 24: 38659}, - ("Category Double Threes and Fours", 3, 6): {0: 499, 16: 51131, 24: 48370}, - ("Category Double Threes and Fours", 3, 7): {0: 5542, 16: 37755, 24: 56703}, - ("Category Double Threes and Fours", 3, 8): {0: 3805, 16: 32611, 24: 63584}, - ("Category Double Threes and Fours", 4, 1): {0: 19809, 8: 39303, 16: 40888}, - ("Category Double Threes and Fours", 4, 2): {0: 3972, 16: 71506, 22: 24522}, - ("Category Double Threes and Fours", 4, 3): {0: 745, 18: 53727, 22: 28503, 28: 17025}, - ("Category Double Threes and Fours", 4, 4): {0: 4862, 16: 34879, 22: 33529, 28: 26730}, - ("Category Double Threes and Fours", 4, 5): {0: 2891, 16: 25367, 24: 46333, 30: 25409}, - ("Category Double Threes and Fours", 4, 6): {0: 2525, 24: 62353, 30: 35122}, - ("Category Double Threes and Fours", 4, 7): {0: 1042, 24: 54543, 32: 44415}, - ("Category Double Threes and Fours", 4, 8): {0: 2510, 24: 44681, 32: 52809}, - ("Category Double Threes and Fours", 5, 1): {0: 13122, 14: 68022, 20: 18856}, - ("Category Double Threes and Fours", 5, 2): {0: 1676, 14: 37791, 22: 40810, 28: 19723}, - ("Category Double Threes and Fours", 5, 3): {0: 2945, 16: 28193, 22: 26795, 32: 42067}, - ("Category Double Threes and Fours", 5, 4): {0: 2807, 26: 53419, 30: 26733, 36: 17041}, - ("Category Double Threes and Fours", 5, 5): {0: 3651, 24: 38726, 32: 41484, 38: 16139}, - ("Category Double Threes and Fours", 5, 6): {0: 362, 12: 13070, 32: 61608, 38: 24960}, - ("Category Double Threes and Fours", 5, 7): {0: 161, 12: 15894, 32: 49464, 38: 34481}, - ("Category Double Threes and Fours", 5, 8): {0: 82, 12: 11438, 32: 45426, 40: 43054}, - ("Category Double Threes and Fours", 6, 1): {0: 8738, 6: 26451, 16: 43879, 22: 20932}, - ("Category Double Threes and Fours", 6, 2): {0: 784, 16: 38661, 28: 42164, 32: 18391}, - ("Category Double Threes and Fours", 6, 3): {0: 1062, 22: 34053, 28: 27996, 38: 36889}, - ("Category Double Threes and Fours", 6, 4): {0: 439, 12: 13100, 30: 43296, 40: 43165}, - ("Category Double Threes and Fours", 6, 5): {0: 3957, 34: 51190, 38: 26734, 44: 18119}, - ("Category Double Threes and Fours", 6, 6): {0: 4226, 32: 37492, 40: 40719, 46: 17563}, - ("Category Double Threes and Fours", 6, 7): {0: 31, 12: 13933, 40: 60102, 46: 25934}, - ("Category Double Threes and Fours", 6, 8): {8: 388, 22: 16287, 40: 48255, 48: 35070}, - ("Category Double Threes and Fours", 7, 1): {0: 5803, 8: 28280, 14: 26186, 26: 39731}, - ("Category Double Threes and Fours", 7, 2): {0: 3319, 20: 36331, 30: 38564, 36: 21786}, - ("Category Double Threes and Fours", 7, 3): {0: 2666, 18: 16444, 34: 41412, 44: 39478}, - ("Category Double Threes and Fours", 7, 4): {0: 99, 12: 9496, 38: 50302, 46: 40103}, - ("Category Double Threes and Fours", 7, 5): {0: 45, 12: 13200, 42: 52460, 50: 34295}, - ("Category Double Threes and Fours", 7, 6): {8: 2400, 28: 16653, 46: 60564, 52: 20383}, - ("Category Double Threes and Fours", 7, 7): {6: 7, 12: 11561, 44: 44119, 54: 44313}, - ("Category Double Threes and Fours", 7, 8): {8: 4625, 44: 40601, 48: 26475, 54: 28299}, - ("Category Double Threes and Fours", 8, 1): {0: 3982, 16: 56447, 28: 39571}, - ("Category Double Threes and Fours", 8, 2): {0: 1645, 20: 25350, 30: 37385, 42: 35620}, - ("Category Double Threes and Fours", 8, 3): {0: 6, 26: 23380, 40: 40181, 50: 36433}, - ("Category Double Threes and Fours", 8, 4): {0: 541, 20: 16547, 42: 38406, 52: 44506}, - ("Category Double Threes and Fours", 8, 5): {6: 2956, 30: 16449, 46: 43983, 56: 36612}, - ("Category Double Threes and Fours", 8, 6): {0: 2, 12: 7360, 38: 19332, 54: 53627, 58: 19679}, - ("Category Double Threes and Fours", 8, 7): {6: 9699, 48: 38611, 54: 28390, 60: 23300}, - ("Category Double Threes and Fours", 8, 8): {8: 5, 20: 10535, 52: 41790, 62: 47670}, - ("Category Quadruple Ones and Twos", 1, 1): {0: 66567, 8: 33433}, - ("Category Quadruple Ones and Twos", 1, 2): {0: 44809, 8: 55191}, - ("Category Quadruple Ones and Twos", 1, 3): {0: 37100, 8: 62900}, - ("Category Quadruple Ones and Twos", 1, 4): {0: 30963, 8: 69037}, - ("Category Quadruple Ones and Twos", 1, 5): {0: 25316, 8: 74684}, - ("Category Quadruple Ones and Twos", 1, 6): {0: 21505, 8: 78495}, - ("Category Quadruple Ones and Twos", 1, 7): {0: 17676, 8: 82324}, - ("Category Quadruple Ones and Twos", 1, 8): {0: 14971, 8: 85029}, - ("Category Quadruple Ones and Twos", 2, 1): {0: 44566, 8: 55434}, - ("Category Quadruple Ones and Twos", 2, 2): {0: 19963, 8: 57152, 12: 22885}, - ("Category Quadruple Ones and Twos", 2, 3): {0: 13766, 8: 52065, 16: 34169}, - ("Category Quadruple Ones and Twos", 2, 4): {0: 9543, 8: 46446, 16: 44011}, - ("Category Quadruple Ones and Twos", 2, 5): {0: 6472, 8: 40772, 16: 52756}, - ("Category Quadruple Ones and Twos", 2, 6): {0: 10306, 12: 46932, 16: 42762}, - ("Category Quadruple Ones and Twos", 2, 7): {0: 7120, 12: 42245, 16: 50635}, - ("Category Quadruple Ones and Twos", 2, 8): {0: 4989, 12: 37745, 16: 57266}, - ("Category Quadruple Ones and Twos", 3, 1): {0: 29440, 8: 50321, 16: 20239}, - ("Category Quadruple Ones and Twos", 3, 2): {0: 8857, 8: 42729, 16: 48414}, - ("Category Quadruple Ones and Twos", 3, 3): {0: 5063, 12: 53387, 20: 41550}, - ("Category Quadruple Ones and Twos", 3, 4): {0: 8395, 16: 64605, 24: 27000}, - ("Category Quadruple Ones and Twos", 3, 5): {0: 4895, 16: 58660, 24: 36445}, - ("Category Quadruple Ones and Twos", 3, 6): {0: 2681, 16: 52710, 24: 44609}, - ("Category Quadruple Ones and Twos", 3, 7): {0: 586, 16: 46781, 24: 52633}, - ("Category Quadruple Ones and Twos", 3, 8): {0: 941, 16: 39406, 24: 59653}, - ("Category Quadruple Ones and Twos", 4, 1): {0: 19691, 8: 46945, 16: 33364}, - ("Category Quadruple Ones and Twos", 4, 2): {0: 4023, 12: 50885, 24: 45092}, - ("Category Quadruple Ones and Twos", 4, 3): {0: 6553, 16: 52095, 28: 41352}, - ("Category Quadruple Ones and Twos", 4, 4): {0: 3221, 16: 41367, 24: 39881, 28: 15531}, - ("Category Quadruple Ones and Twos", 4, 5): {0: 1561, 20: 48731, 28: 49708}, - ("Category Quadruple Ones and Twos", 4, 6): {0: 190, 20: 38723, 28: 42931, 32: 18156}, - ("Category Quadruple Ones and Twos", 4, 7): {0: 5419, 24: 53017, 32: 41564}, - ("Category Quadruple Ones and Twos", 4, 8): {0: 3135, 24: 47352, 32: 49513}, - ("Category Quadruple Ones and Twos", 5, 1): {0: 13112, 8: 41252, 20: 45636}, - ("Category Quadruple Ones and Twos", 5, 2): {0: 7293, 16: 50711, 28: 41996}, - ("Category Quadruple Ones and Twos", 5, 3): {0: 719, 20: 55921, 32: 43360}, - ("Category Quadruple Ones and Twos", 5, 4): {0: 1152, 20: 38570, 32: 60278}, - ("Category Quadruple Ones and Twos", 5, 5): {0: 5647, 24: 40910, 36: 53443}, - ("Category Quadruple Ones and Twos", 5, 6): {0: 194, 28: 51527, 40: 48279}, - ("Category Quadruple Ones and Twos", 5, 7): {0: 1449, 28: 39301, 36: 41332, 40: 17918}, - ("Category Quadruple Ones and Twos", 5, 8): {0: 6781, 32: 52834, 40: 40385}, - ("Category Quadruple Ones and Twos", 6, 1): {0: 8646, 12: 53753, 24: 37601}, - ("Category Quadruple Ones and Twos", 6, 2): {0: 844, 16: 40583, 28: 58573}, - ("Category Quadruple Ones and Twos", 6, 3): {0: 1241, 24: 54870, 36: 43889}, - ("Category Quadruple Ones and Twos", 6, 4): {0: 1745, 28: 53286, 40: 44969}, - ("Category Quadruple Ones and Twos", 6, 5): {0: 2076, 32: 56909, 44: 41015}, - ("Category Quadruple Ones and Twos", 6, 6): {0: 6827, 32: 39400, 44: 53773}, - ("Category Quadruple Ones and Twos", 6, 7): {0: 1386, 36: 49865, 48: 48749}, - ("Category Quadruple Ones and Twos", 6, 8): {0: 1841, 36: 38680, 44: 40600, 48: 18879}, - ("Category Quadruple Ones and Twos", 7, 1): {0: 5780, 12: 46454, 24: 47766}, - ("Category Quadruple Ones and Twos", 7, 2): {0: 6122, 20: 38600, 32: 55278}, - ("Category Quadruple Ones and Twos", 7, 3): {0: 2065, 28: 52735, 40: 45200}, - ("Category Quadruple Ones and Twos", 7, 4): {0: 1950, 32: 50270, 44: 47780}, - ("Category Quadruple Ones and Twos", 7, 5): {0: 2267, 36: 49235, 48: 48498}, - ("Category Quadruple Ones and Twos", 7, 6): {0: 2500, 40: 53934, 52: 43566}, - ("Category Quadruple Ones and Twos", 7, 7): {0: 6756, 44: 53730, 56: 39514}, - ("Category Quadruple Ones and Twos", 7, 8): {0: 3625, 44: 45159, 56: 51216}, - ("Category Quadruple Ones and Twos", 8, 1): {0: 11493, 16: 50043, 28: 38464}, - ("Category Quadruple Ones and Twos", 8, 2): {0: 136, 24: 47795, 36: 52069}, - ("Category Quadruple Ones and Twos", 8, 3): {0: 2744, 32: 51640, 48: 45616}, - ("Category Quadruple Ones and Twos", 8, 4): {0: 2293, 36: 45979, 48: 51728}, - ("Category Quadruple Ones and Twos", 8, 5): {0: 2181, 40: 44909, 52: 52910}, - ("Category Quadruple Ones and Twos", 8, 6): {4: 2266, 44: 44775, 56: 52959}, - ("Category Quadruple Ones and Twos", 8, 7): {8: 2344, 48: 50198, 60: 47458}, - ("Category Quadruple Ones and Twos", 8, 8): {8: 2808, 48: 37515, 56: 37775, 64: 21902}, + ("Category Twos and Threes", 1, 3): {0: 46223, 2: 53777}, + ("Category Twos and Threes", 1, 4): {0: 38552, 2: 61448}, + ("Category Twos and Threes", 1, 5): {0: 32320, 2: 67680}, + ("Category Twos and Threes", 1, 6): {0: 10797, 3: 66593, 2: 22610}, + ("Category Twos and Threes", 1, 7): {0: 9307, 3: 90693}, + ("Category Twos and Threes", 1, 8): {0: 2173, 3: 97827}, + ("Category Twos and Threes", 2, 1): {0: 44565, 2: 55435}, + ("Category Twos and Threes", 2, 2): {0: 30855, 2: 69145}, + ("Category Twos and Threes", 2, 3): {0: 9977, 3: 67663, 2: 22360}, + ("Category Twos and Threes", 2, 4): {0: 7252, 3: 92748}, + ("Category Twos and Threes", 2, 5): {0: 1135, 3: 98865}, + ("Category Twos and Threes", 2, 6): {0: 121, 3: 99879}, + ("Category Twos and Threes", 2, 7): {2: 48, 5: 60169, 3: 39783}, + ("Category Twos and Threes", 2, 8): {5: 99998, 3: 2}, + ("Category Twos and Threes", 3, 1): {0: 29892, 2: 70108}, + ("Category Twos and Threes", 3, 2): {0: 8977, 3: 69968, 2: 21055}, + ("Category Twos and Threes", 3, 3): {0: 5237, 3: 94763}, + ("Category Twos and Threes", 3, 4): {2: 1781, 5: 65980, 3: 32239}, + ("Category Twos and Threes", 3, 5): {2: 609, 6: 65803, 5: 22563, 3: 11025}, + ("Category Twos and Threes", 3, 6): {6: 100000}, + ("Category Twos and Threes", 3, 7): {6: 100000}, + ("Category Twos and Threes", 3, 8): {6: 100000}, + ("Category Twos and Threes", 4, 1): {0: 11769, 3: 60627, 2: 27604}, + ("Category Twos and Threes", 4, 2): {2: 15639, 4: 60280, 3: 24081}, + ("Category Twos and Threes", 4, 3): {5: 72517, 2: 4298, 4: 16567, 3: 6618}, + ("Category Twos and Threes", 4, 4): {6: 73910, 5: 18921, 2: 1121, 4: 4322, 3: 1726}, + ("Category Twos and Threes", 4, 5): {2: 430, 7: 61608, 6: 28377, 5: 7264, 4: 1659, 3: 662}, + ("Category Twos and Threes", 4, 6): {9: 60343, 7: 24434, 6: 15223}, + ("Category Twos and Threes", 4, 7): {9: 100000}, + ("Category Twos and Threes", 4, 8): {9: 100000}, + ("Category Twos and Threes", 5, 1): {0: 11610, 3: 88390}, + ("Category Twos and Threes", 5, 2): {5: 70562, 3: 11158, 2: 534, 4: 17746}, + ("Category Twos and Threes", 5, 3): {6: 74716, 5: 23240, 3: 774, 2: 37, 4: 1233}, + ("Category Twos and Threes", 5, 4): {8: 68531, 6: 29461, 5: 1962, 3: 18, 4: 28}, + ("Category Twos and Threes", 5, 5): {9: 70635, 8: 26461, 6: 2860, 5: 44}, + ("Category Twos and Threes", 5, 6): {9: 100000}, + ("Category Twos and Threes", 5, 7): {11: 67606, 9: 32394}, + ("Category Twos and Threes", 5, 8): {12: 68354, 11: 21395, 9: 10251}, + ("Category Twos and Threes", 6, 1): {2: 4096, 4: 64713, 3: 31191}, + ("Category Twos and Threes", 6, 2): {2: 169, 6: 68210, 5: 22433, 3: 3547, 4: 5641}, + ("Category Twos and Threes", 6, 3): {2: 11, 8: 68425, 6: 23593, 5: 7338, 3: 244, 4: 389}, + ("Category Twos and Threes", 6, 4): {9: 73054, 8: 26109, 6: 787, 5: 50}, + ("Category Twos and Threes", 6, 5): {8: 8568, 11: 68223, 9: 23209}, + ("Category Twos and Threes", 6, 6): {12: 70373, 11: 20213, 9: 9414}, + ("Category Twos and Threes", 6, 7): {12: 100000}, + ("Category Twos and Threes", 6, 8): {14: 68062, 12: 31938}, + ("Category Twos and Threes", 7, 1): {2: 1390, 5: 66048, 4: 21972, 3: 10590}, + ("Category Twos and Threes", 7, 2): {2: 22, 8: 60665, 5: 11253, 6: 26834, 3: 473, 4: 753}, + ("Category Twos and Threes", 7, 3): {9: 70126, 8: 26169, 5: 909, 6: 2772, 3: 9, 4: 15}, + ("Category Twos and Threes", 7, 4): {11: 70543, 9: 28824, 8: 633}, + ("Category Twos and Threes", 7, 5): {12: 74745, 11: 22893, 9: 2173, 8: 189}, + ("Category Twos and Threes", 7, 6): {11: 7636, 14: 69766, 12: 22598}, + ("Category Twos and Threes", 7, 7): {15: 71620, 14: 19800, 12: 8580}, + ("Category Twos and Threes", 7, 8): {14: 10952, 16: 61407, 15: 27641}, + ("Category Twos and Threes", 8, 1): {2: 555, 6: 60067, 5: 26375, 4: 8774, 3: 4229}, + ("Category Twos and Threes", 8, 2): {8: 99967, 2: 13, 6: 20}, + ("Category Twos and Threes", 8, 3): {8: 10167, 11: 65964, 9: 23869}, + ("Category Twos and Threes", 8, 4): {11: 37966, 13: 62034}, + ("Category Twos and Threes", 8, 5): {11: 9059, 15: 64126, 12: 26815}, + ("Category Twos and Threes", 8, 6): {14: 14139, 17: 60581, 11: 2, 15: 25278}, + ("Category Twos and Threes", 8, 7): {14: 5173, 18: 63415, 17: 22164, 15: 9248}, + ("Category Twos and Threes", 8, 8): {18: 100000}, + ("Category Sum of Odds", 1, 1): {0: 66572, 3: 33428}, + ("Category Sum of Odds", 1, 2): {0: 44489, 3: 55511}, + ("Category Sum of Odds", 1, 3): {0: 26778, 3: 33412, 5: 39810}, + ("Category Sum of Odds", 1, 4): {0: 18191, 5: 81809}, + ("Category Sum of Odds", 1, 5): {0: 2299, 5: 97701}, + ("Category Sum of Odds", 1, 6): {0: 101, 5: 99899}, + ("Category Sum of Odds", 1, 7): {5: 100000}, + ("Category Sum of Odds", 1, 8): {5: 100000}, + ("Category Sum of Odds", 2, 1): {0: 66571, 3: 33429}, + ("Category Sum of Odds", 2, 2): {0: 38206, 4: 61794}, + ("Category Sum of Odds", 2, 3): {3: 15100, 8: 34337, 4: 24422, 5: 26141}, + ("Category Sum of Odds", 2, 4): {3: 4389, 8: 75870, 5: 19741}, + ("Category Sum of Odds", 2, 5): {8: 66180, 10: 33820}, + ("Category Sum of Odds", 2, 6): {10: 99075, 8: 925}, + ("Category Sum of Odds", 2, 7): {10: 100000}, + ("Category Sum of Odds", 2, 8): {10: 100000}, + ("Category Sum of Odds", 3, 1): {0: 19440, 3: 80560}, + ("Category Sum of Odds", 3, 2): {0: 3843, 3: 30607, 6: 65550}, + ("Category Sum of Odds", 3, 3): {8: 99451, 3: 126, 4: 204, 5: 219}, + ("Category Sum of Odds", 3, 4): {8: 39493, 9: 60507}, + ("Category Sum of Odds", 3, 5): {8: 25186, 13: 36226, 9: 38588}, + ("Category Sum of Odds", 3, 6): {13: 99387, 8: 242, 9: 371}, + ("Category Sum of Odds", 3, 7): {13: 63989, 15: 36011}, + ("Category Sum of Odds", 3, 8): {15: 99350, 13: 650}, + ("Category Sum of Odds", 4, 1): {0: 7100, 3: 29425, 5: 63475}, + ("Category Sum of Odds", 4, 2): {0: 1227, 3: 30702, 8: 68071}, + ("Category Sum of Odds", 4, 3): {8: 34941, 10: 65059}, + ("Category Sum of Odds", 4, 4): {8: 30671, 11: 69329}, + ("Category Sum of Odds", 4, 5): {8: 20766, 13: 79234}, + ("Category Sum of Odds", 4, 6): {13: 67313, 18: 32687}, + ("Category Sum of Odds", 4, 7): {13: 12063, 18: 87937}, + ("Category Sum of Odds", 4, 8): {18: 66936, 20: 33064}, + ("Category Sum of Odds", 5, 1): {0: 2404, 3: 31470, 6: 66126}, + ("Category Sum of Odds", 5, 2): {6: 12689, 11: 60256, 8: 27055}, + ("Category Sum of Odds", 5, 3): {10: 36853, 13: 63147}, + ("Category Sum of Odds", 5, 4): {13: 38005, 15: 61994, 10: 1}, + ("Category Sum of Odds", 5, 5): {13: 33747, 16: 66253}, + ("Category Sum of Odds", 5, 6): {13: 23587, 18: 76413}, + ("Category Sum of Odds", 5, 7): {18: 67776, 23: 32224}, + ("Category Sum of Odds", 5, 8): {23: 99176, 18: 824}, + ("Category Sum of Odds", 6, 1): {0: 791, 3: 32146, 7: 67063}, + ("Category Sum of Odds", 6, 2): {11: 38567, 13: 61432, 8: 1}, + ("Category Sum of Odds", 6, 3): {15: 65880, 11: 5075, 13: 29045}, + ("Category Sum of Odds", 6, 4): {15: 37367, 18: 62633}, + ("Category Sum of Odds", 6, 5): {18: 38038, 20: 61948, 15: 14}, + ("Category Sum of Odds", 6, 6): {18: 33838, 21: 66162}, + ("Category Sum of Odds", 6, 7): {18: 16130, 23: 83870}, + ("Category Sum of Odds", 6, 8): {23: 66748, 28: 33252}, + ("Category Sum of Odds", 7, 1): {5: 12019, 9: 63507, 7: 24474}, + ("Category Sum of Odds", 7, 2): {11: 37365, 15: 62635}, + ("Category Sum of Odds", 7, 3): {15: 36250, 18: 63750}, + ("Category Sum of Odds", 7, 4): {18: 37627, 21: 62373}, + ("Category Sum of Odds", 7, 5): {20: 35127, 23: 64873}, + ("Category Sum of Odds", 7, 6): {20: 12629, 25: 64047, 23: 23324}, + ("Category Sum of Odds", 7, 7): {23: 32409, 26: 67591}, + ("Category Sum of Odds", 7, 8): {23: 22322, 28: 77678}, + ("Category Sum of Odds", 8, 1): {5: 4088, 10: 65985, 9: 21602, 7: 8325}, + ("Category Sum of Odds", 8, 2): {13: 35686, 17: 64314}, + ("Category Sum of Odds", 8, 3): {17: 13770, 21: 62013, 18: 24217}, + ("Category Sum of Odds", 8, 4): {21: 37763, 24: 62237}, + ("Category Sum of Odds", 8, 5): {23: 12631, 26: 66541, 21: 4, 24: 20824}, + ("Category Sum of Odds", 8, 6): {23: 4929, 29: 60982, 26: 25964, 24: 8125}, + ("Category Sum of Odds", 8, 7): {23: 1608, 30: 67370, 29: 19899, 26: 8472, 24: 2651}, + ("Category Sum of Odds", 8, 8): {28: 4861, 32: 61811, 30: 25729, 29: 7599}, + ("Category Sum of Evens", 1, 1): {0: 66318, 4: 33682}, + ("Category Sum of Evens", 1, 2): {0: 44331, 4: 55669}, + ("Category Sum of Evens", 1, 3): {0: 29576, 4: 35040, 6: 35384}, + ("Category Sum of Evens", 1, 4): {0: 22612, 6: 77388}, + ("Category Sum of Evens", 1, 5): {0: 3566, 6: 96434}, + ("Category Sum of Evens", 1, 6): {0: 209, 6: 99791}, + ("Category Sum of Evens", 1, 7): {0: 3, 6: 99997}, + ("Category Sum of Evens", 1, 8): {6: 100000}, + ("Category Sum of Evens", 2, 1): {0: 25229, 2: 36083, 6: 38688}, + ("Category Sum of Evens", 2, 2): {0: 57, 4: 38346, 8: 37232, 2: 81, 6: 24284}, + ("Category Sum of Evens", 2, 3): {6: 39504, 10: 37060, 4: 1, 8: 23435}, + ("Category Sum of Evens", 2, 4): {10: 99495, 6: 317, 8: 188}, + ("Category Sum of Evens", 2, 5): {10: 69597, 12: 30403}, + ("Category Sum of Evens", 2, 6): {12: 98377, 10: 1623}, + ("Category Sum of Evens", 2, 7): {12: 100000}, + ("Category Sum of Evens", 2, 8): {12: 100000}, + ("Category Sum of Evens", 3, 1): {0: 76, 4: 38332, 8: 37178, 2: 109, 6: 24305}, + ("Category Sum of Evens", 3, 2): {8: 67248, 12: 32556, 4: 196}, + ("Category Sum of Evens", 3, 3): {10: 44843, 14: 33195, 8: 213, 12: 21749}, + ("Category Sum of Evens", 3, 4): {10: 37288, 14: 62712}, + ("Category Sum of Evens", 3, 5): {14: 61196, 16: 38802, 10: 2}, + ("Category Sum of Evens", 3, 6): {16: 99621, 14: 379}, + ("Category Sum of Evens", 3, 7): {16: 67674, 18: 32326}, + ("Category Sum of Evens", 3, 8): {18: 100000}, + ("Category Sum of Evens", 4, 1): {6: 37636, 10: 40039, 4: 32, 8: 22293}, + ("Category Sum of Evens", 4, 2): {10: 57689, 14: 42258, 6: 53}, + ("Category Sum of Evens", 4, 3): {14: 67801, 18: 32152, 10: 47}, + ("Category Sum of Evens", 4, 4): {18: 98878, 14: 1122}, + ("Category Sum of Evens", 4, 5): {18: 60401, 20: 39599}, + ("Category Sum of Evens", 4, 6): {20: 64396, 22: 35186, 18: 418}, + ("Category Sum of Evens", 4, 7): {22: 99697, 20: 302, 18: 1}, + ("Category Sum of Evens", 4, 8): {22: 100000}, + ("Category Sum of Evens", 5, 1): {8: 35338, 12: 41027, 6: 22, 10: 23613}, + ("Category Sum of Evens", 5, 2): {12: 37027, 18: 35856, 10: 10, 14: 27107}, + ("Category Sum of Evens", 5, 3): {18: 68230, 22: 31735, 14: 35}, + ("Category Sum of Evens", 5, 4): {18: 14880, 22: 53608, 24: 31512}, + ("Category Sum of Evens", 5, 5): {24: 98732, 18: 275, 22: 993}, + ("Category Sum of Evens", 5, 6): {24: 61498, 26: 38502}, + ("Category Sum of Evens", 5, 7): {26: 65201, 28: 34488, 24: 311}, + ("Category Sum of Evens", 5, 8): {28: 99648, 26: 351, 24: 1}, + ("Category Sum of Evens", 6, 1): {10: 34538, 14: 41426, 8: 4, 12: 24032}, + ("Category Sum of Evens", 6, 2): {16: 43552, 22: 31546, 14: 235, 12: 121, 18: 24546}, + ("Category Sum of Evens", 6, 3): {22: 68714, 26: 31239, 18: 47}, + ("Category Sum of Evens", 6, 4): {26: 59168, 28: 33835, 22: 4791, 18: 1, 24: 2205}, + ("Category Sum of Evens", 6, 5): {26: 44386, 30: 32920, 28: 22694}, + ("Category Sum of Evens", 6, 6): {30: 98992, 26: 667, 28: 341}, + ("Category Sum of Evens", 6, 7): {30: 60806, 32: 39194}, + ("Category Sum of Evens", 6, 8): {32: 64584, 34: 35252, 30: 164}, + ("Category Sum of Evens", 7, 1): {12: 40703, 18: 30507, 10: 1, 14: 28789}, + ("Category Sum of Evens", 7, 2): {22: 60249, 24: 38366, 12: 1, 18: 767, 16: 614, 14: 3}, + ("Category Sum of Evens", 7, 3): {24: 47964, 30: 30240, 22: 4, 26: 21792}, + ("Category Sum of Evens", 7, 4): {30: 63108, 32: 35114, 24: 1778}, + ("Category Sum of Evens", 7, 5): {32: 62062, 34: 37406, 30: 523, 26: 6, 28: 3}, + ("Category Sum of Evens", 7, 6): {32: 40371, 36: 35507, 34: 24122}, + ("Category Sum of Evens", 7, 7): {34: 44013, 38: 31749, 32: 4, 36: 24234}, + ("Category Sum of Evens", 7, 8): {38: 99116, 34: 570, 36: 314}, + ("Category Sum of Evens", 8, 1): {18: 66673, 20: 31528, 12: 1054, 14: 745}, + ("Category Sum of Evens", 8, 2): {22: 40918, 28: 33610, 24: 25472}, + ("Category Sum of Evens", 8, 3): {28: 40893, 32: 41346, 24: 17, 30: 17737, 26: 7}, + ("Category Sum of Evens", 8, 4): {32: 63665, 36: 36316, 28: 19}, + ("Category Sum of Evens", 8, 5): {36: 58736, 38: 40234, 32: 1030}, + ("Category Sum of Evens", 8, 6): {36: 57946, 40: 42054}, + ("Category Sum of Evens", 8, 7): {38: 34984, 42: 39622, 36: 2, 40: 25392}, + ("Category Sum of Evens", 8, 8): {42: 65137, 44: 34611, 38: 146, 40: 106}, + ("Category Double Threes and Fours", 1, 1): {0: 66749, 6: 33251}, + ("Category Double Threes and Fours", 1, 2): {0: 44675, 6: 55325}, + ("Category Double Threes and Fours", 1, 3): {0: 29592, 6: 35261, 8: 35147}, + ("Category Double Threes and Fours", 1, 4): {0: 24601, 6: 29406, 8: 45993}, + ("Category Double Threes and Fours", 1, 5): {0: 20499, 6: 24420, 8: 55081}, + ("Category Double Threes and Fours", 1, 6): {0: 17116, 6: 20227, 8: 62657}, + ("Category Double Threes and Fours", 1, 7): {0: 14193, 6: 17060, 8: 68747}, + ("Category Double Threes and Fours", 1, 8): {0: 11977, 6: 13924, 8: 74099}, + ("Category Double Threes and Fours", 2, 1): {0: 44382, 6: 22191, 8: 33427}, + ("Category Double Threes and Fours", 2, 2): {0: 5, 6: 46088, 12: 30763, 8: 23144}, + ("Category Double Threes and Fours", 2, 3): {0: 5, 6: 30159, 12: 32725, 14: 37111}, + ("Category Double Threes and Fours", 2, 4): {6: 20533, 14: 79467}, + ("Category Double Threes and Fours", 2, 5): {14: 69789, 16: 30211}, + ("Category Double Threes and Fours", 2, 6): {16: 99978, 14: 22}, + ("Category Double Threes and Fours", 2, 7): {16: 100000}, + ("Category Double Threes and Fours", 2, 8): {16: 100000}, + ("Category Double Threes and Fours", 3, 1): {0: 8, 6: 49139, 12: 26176, 8: 24677}, + ("Category Double Threes and Fours", 3, 2): {0: 5, 6: 24942, 12: 27065, 14: 47988}, + ("Category Double Threes and Fours", 3, 3): {6: 12743, 14: 56776, 20: 30481}, + ("Category Double Threes and Fours", 3, 4): {14: 9753, 20: 90247}, + ("Category Double Threes and Fours", 3, 5): {20: 61293, 22: 38707}, + ("Category Double Threes and Fours", 3, 6): {22: 99615, 20: 385}, + ("Category Double Threes and Fours", 3, 7): {22: 67267, 24: 32733}, + ("Category Double Threes and Fours", 3, 8): {24: 100000}, + ("Category Double Threes and Fours", 4, 1): {6: 26819, 12: 39789, 14: 33392}, + ("Category Double Threes and Fours", 4, 2): {14: 63726, 20: 36011, 6: 106, 12: 157}, + ("Category Double Threes and Fours", 4, 3): {20: 69628, 24: 30158, 14: 214}, + ("Category Double Threes and Fours", 4, 4): {20: 11409, 24: 57067, 26: 31524}, + ("Category Double Threes and Fours", 4, 5): {20: 6566, 26: 57047, 28: 36387}, + ("Category Double Threes and Fours", 4, 6): {28: 63694, 30: 35203, 20: 113, 26: 990}, + ("Category Double Threes and Fours", 4, 7): {30: 98893, 28: 1092, 26: 15}, + ("Category Double Threes and Fours", 4, 8): {30: 100000}, + ("Category Double Threes and Fours", 5, 1): {6: 16042, 14: 83958}, + ("Category Double Threes and Fours", 5, 2): {14: 44329, 20: 24912, 24: 30759}, + ("Category Double Threes and Fours", 5, 3): {24: 57603, 28: 42155, 20: 242}, + ("Category Double Threes and Fours", 5, 4): {26: 32446, 30: 43875, 24: 21, 28: 23658}, + ("Category Double Threes and Fours", 5, 5): {30: 69209, 34: 30672, 26: 69, 28: 50}, + ("Category Double Threes and Fours", 5, 6): {34: 63882, 36: 35323, 30: 795}, + ("Category Double Threes and Fours", 5, 7): {36: 65178, 38: 34598, 34: 222, 30: 2}, + ("Category Double Threes and Fours", 5, 8): {38: 99654, 36: 345, 34: 1}, + ("Category Double Threes and Fours", 6, 1): {14: 68079, 18: 31921}, + ("Category Double Threes and Fours", 6, 2): {14: 14542, 24: 48679, 28: 36779}, + ("Category Double Threes and Fours", 6, 3): {28: 62757, 34: 36962, 24: 281}, + ("Category Double Threes and Fours", 6, 4): {34: 68150, 38: 30771, 28: 604, 26: 1, 30: 474}, + ("Category Double Threes and Fours", 6, 5): {38: 68332, 40: 30833, 34: 823, 28: 12}, + ("Category Double Threes and Fours", 6, 6): {40: 67631, 42: 31174, 38: 1181, 34: 14}, + ("Category Double Threes and Fours", 6, 7): {42: 63245, 44: 35699, 40: 1038, 38: 18}, + ("Category Double Threes and Fours", 6, 8): {44: 64056, 46: 35162, 42: 770, 40: 12}, + ("Category Double Threes and Fours", 7, 1): {14: 14976, 18: 54685, 22: 30339}, + ("Category Double Threes and Fours", 7, 2): {14: 10532, 28: 55372, 32: 34096}, + ("Category Double Threes and Fours", 7, 3): {32: 42786, 40: 32123, 28: 2, 34: 25089}, + ("Category Double Threes and Fours", 7, 4): {38: 46172, 44: 31648, 32: 226, 40: 21954}, + ("Category Double Threes and Fours", 7, 5): {44: 64883, 46: 34437, 38: 460, 32: 2, 40: 218}, + ("Category Double Threes and Fours", 7, 6): {44: 43458, 48: 33715, 46: 22827}, + ("Category Double Threes and Fours", 7, 7): {46: 44472, 50: 32885, 44: 15, 48: 22628}, + ("Category Double Threes and Fours", 7, 8): {48: 41682, 52: 37868, 46: 18, 50: 20432}, + ("Category Double Threes and Fours", 8, 1): {14: 14227, 22: 85773}, + ("Category Double Threes and Fours", 8, 2): {22: 7990, 32: 56319, 36: 35691}, + ("Category Double Threes and Fours", 8, 3): {32: 19914, 40: 43585, 44: 36501}, + ("Category Double Threes and Fours", 8, 4): {44: 63232, 48: 36613, 32: 48, 40: 107}, + ("Category Double Threes and Fours", 8, 5): {48: 62939, 52: 36798, 44: 263}, + ("Category Double Threes and Fours", 8, 6): {52: 60756, 54: 38851, 48: 392, 44: 1}, + ("Category Double Threes and Fours", 8, 7): {54: 62281, 56: 37262, 52: 455, 48: 2}, + ("Category Double Threes and Fours", 8, 8): {56: 67295, 60: 32064, 54: 637, 52: 4}, + ("Category Quadruple Ones and Twos", 1, 1): {0: 66567, 4: 16803, 8: 16630}, + ("Category Quadruple Ones and Twos", 1, 2): {0: 44809, 4: 27448, 8: 27743}, + ("Category Quadruple Ones and Twos", 1, 3): {0: 37100, 4: 23184, 8: 39716}, + ("Category Quadruple Ones and Twos", 1, 4): {0: 30963, 4: 19221, 8: 49816}, + ("Category Quadruple Ones and Twos", 1, 5): {0: 25316, 4: 16079, 8: 58605}, + ("Category Quadruple Ones and Twos", 1, 6): {0: 14381, 8: 85619}, + ("Category Quadruple Ones and Twos", 1, 7): {0: 4137, 8: 95863}, + ("Category Quadruple Ones and Twos", 1, 8): {0: 1004, 8: 98996}, + ("Category Quadruple Ones and Twos", 2, 1): {0: 44566, 4: 22273, 8: 33161}, + ("Category Quadruple Ones and Twos", 2, 2): {0: 19963, 4: 24890, 8: 32262, 12: 22885}, + ("Category Quadruple Ones and Twos", 2, 3): {0: 13766, 4: 17158, 8: 34907, 12: 18539, 16: 15630}, + ("Category Quadruple Ones and Twos", 2, 4): {0: 6655, 8: 30200, 12: 26499, 16: 36646}, + ("Category Quadruple Ones and Twos", 2, 5): {0: 982, 8: 16426, 12: 24307, 16: 58285}, + ("Category Quadruple Ones and Twos", 2, 6): {0: 68, 8: 9887, 16: 90045}, + ("Category Quadruple Ones and Twos", 2, 7): {0: 11, 16: 99989}, + ("Category Quadruple Ones and Twos", 2, 8): {16: 100000}, + ("Category Quadruple Ones and Twos", 3, 1): {0: 29440, 4: 22574, 8: 27747, 12: 20239}, + ("Category Quadruple Ones and Twos", 3, 2): {0: 8857, 4: 16295, 8: 26434, 12: 22986, 16: 25428}, + ("Category Quadruple Ones and Twos", 3, 3): {0: 3649, 8: 15314, 12: 24619, 16: 38944, 20: 17474}, + ("Category Quadruple Ones and Twos", 3, 4): {0: 11, 8: 8430, 16: 41259, 20: 50300}, + ("Category Quadruple Ones and Twos", 3, 5): {20: 80030, 24: 19902, 8: 11, 16: 57}, + ("Category Quadruple Ones and Twos", 3, 6): {20: 23895, 24: 76105}, + ("Category Quadruple Ones and Twos", 3, 7): {24: 100000}, + ("Category Quadruple Ones and Twos", 3, 8): {24: 100000}, + ("Category Quadruple Ones and Twos", 4, 1): {0: 19691, 4: 19657, 8: 27288, 12: 16126, 16: 17238}, + ("Category Quadruple Ones and Twos", 4, 2): {0: 1222, 4: 15703, 12: 24015, 16: 34944, 20: 24116}, + ("Category Quadruple Ones and Twos", 4, 3): {0: 227, 12: 14519, 20: 62257, 24: 22997}, + ("Category Quadruple Ones and Twos", 4, 4): {0: 11, 20: 17266, 24: 67114, 28: 15609}, + ("Category Quadruple Ones and Twos", 4, 5): {24: 27365, 28: 72632, 20: 3}, + ("Category Quadruple Ones and Twos", 4, 6): {28: 81782, 32: 18215, 24: 3}, + ("Category Quadruple Ones and Twos", 4, 7): {28: 22319, 32: 77681}, + ("Category Quadruple Ones and Twos", 4, 8): {32: 100000}, + ("Category Quadruple Ones and Twos", 5, 1): {0: 13112, 4: 16534, 8: 24718, 12: 18558, 16: 27078}, + ("Category Quadruple Ones and Twos", 5, 2): {0: 21, 4: 15200, 16: 28784, 20: 32131, 24: 23864}, + ("Category Quadruple Ones and Twos", 5, 3): {0: 4, 16: 8475, 24: 66718, 28: 24803}, + ("Category Quadruple Ones and Twos", 5, 4): {28: 76149, 32: 23289, 24: 550, 20: 12}, + ("Category Quadruple Ones and Twos", 5, 5): {32: 81110, 36: 16222, 28: 2663, 24: 5}, + ("Category Quadruple Ones and Twos", 5, 6): {32: 18542, 36: 81458}, + ("Category Quadruple Ones and Twos", 5, 7): {36: 82036, 40: 17964}, + ("Category Quadruple Ones and Twos", 5, 8): {36: 27864, 40: 72136}, + ("Category Quadruple Ones and Twos", 6, 1): {0: 6419, 8: 16963, 12: 22116, 16: 33903, 20: 20599}, + ("Category Quadruple Ones and Twos", 6, 2): {0: 5, 16: 8913, 24: 67749, 28: 23333}, + ("Category Quadruple Ones and Twos", 6, 3): {28: 71779, 32: 27514, 16: 82, 24: 625}, + ("Category Quadruple Ones and Twos", 6, 4): {32: 72333, 36: 27328, 28: 337, 24: 2}, + ("Category Quadruple Ones and Twos", 6, 5): {36: 73993, 40: 25138, 32: 865, 28: 4}, + ("Category Quadruple Ones and Twos", 6, 6): {40: 80918, 44: 17126, 36: 1934, 32: 22}, + ("Category Quadruple Ones and Twos", 6, 7): {40: 20298, 44: 79702}, + ("Category Quadruple Ones and Twos", 6, 8): {44: 81077, 48: 18923}, + ("Category Quadruple Ones and Twos", 7, 1): {0: 508, 8: 10298, 16: 41828, 20: 30853, 24: 16513}, + ("Category Quadruple Ones and Twos", 7, 2): {16: 7429, 28: 69817, 32: 22754}, + ("Category Quadruple Ones and Twos", 7, 3): {32: 82871, 40: 16531, 16: 57, 28: 541}, + ("Category Quadruple Ones and Twos", 7, 4): {36: 67601, 44: 17916, 32: 909, 40: 13569, 28: 5}, + ("Category Quadruple Ones and Twos", 7, 5): {40: 67395, 48: 17447, 36: 364, 44: 14790, 32: 4}, + ("Category Quadruple Ones and Twos", 7, 6): {48: 91242, 40: 7151, 36: 38, 44: 1569}, + ("Category Quadruple Ones and Twos", 7, 7): {48: 80854, 52: 19146}, + ("Category Quadruple Ones and Twos", 7, 8): {48: 25334, 52: 74666}, + ("Category Quadruple Ones and Twos", 8, 1): {0: 119, 16: 17496, 20: 26705, 24: 55680}, + ("Category Quadruple Ones and Twos", 8, 2): {24: 569, 32: 72257, 36: 21817, 28: 5357}, + ("Category Quadruple Ones and Twos", 8, 3): {36: 66654, 44: 18473, 32: 1396, 40: 13477}, + ("Category Quadruple Ones and Twos", 8, 4): {44: 73954, 48: 22240, 36: 3178, 40: 628}, + ("Category Quadruple Ones and Twos", 8, 5): {48: 76082, 52: 22415, 44: 1500, 36: 3}, + ("Category Quadruple Ones and Twos", 8, 6): {52: 74901, 56: 21332, 48: 3766, 44: 1}, + ("Category Quadruple Ones and Twos", 8, 7): {56: 96171, 52: 3640, 48: 189}, + ("Category Quadruple Ones and Twos", 8, 8): {56: 78035, 60: 21965}, ("Category Micro Straight", 1, 1): {0: 100000}, ("Category Micro Straight", 1, 2): {0: 100000}, ("Category Micro Straight", 1, 3): {0: 100000}, diff --git a/worlds/yachtdice/__init__.py b/worlds/yachtdice/__init__.py index 75993fd39443..7efb8f94187c 100644 --- a/worlds/yachtdice/__init__.py +++ b/worlds/yachtdice/__init__.py @@ -56,7 +56,7 @@ class YachtDiceWorld(World): item_name_groups = item_groups - ap_world_version = "2.1.3" + ap_world_version = "2.1.4" def _get_yachtdice_data(self): return { @@ -468,7 +468,7 @@ def create_regions(self): menu.exits.append(connection) connection.connect(board) self.multiworld.regions += [menu, board] - + def get_filler_item_name(self) -> str: return "Good RNG" diff --git a/worlds/yachtdice/docs/en_Yacht Dice.md b/worlds/yachtdice/docs/en_Yacht Dice.md index 53eefe9e9c4b..c671dcee50b8 100644 --- a/worlds/yachtdice/docs/en_Yacht Dice.md +++ b/worlds/yachtdice/docs/en_Yacht Dice.md @@ -3,7 +3,7 @@ Welcome to Yacht Dice, the ultimate dice-rolling adventure in Archipelago! Cast your dice, chase high scores, and unlock valuable treasures. Discover new dice, extra rolls, multipliers, and special scoring categories to enhance your game. Roll your way to victory by reaching the target score! ## Understanding Location Checks -In Yacht Dice, location checks happen when you hit certain scores for the first time. The target score for your next location check is always displayed on the website. +In Yacht Dice, location checks happen when you hit certain scores for the first time. The target score for your next location check is always displayed in the game. ## Items and Their Effects When you receive an item, it could be extra dice, extra rolls, score multipliers, or new scoring categories. These boosts help you sail towards higher scores and more loot. Other items include extra points, lore, and fun facts to enrich your journey. diff --git a/worlds/yachtdice/docs/setup_en.md b/worlds/yachtdice/docs/setup_en.md index c76cd398ce55..f6c15af2b63c 100644 --- a/worlds/yachtdice/docs/setup_en.md +++ b/worlds/yachtdice/docs/setup_en.md @@ -3,19 +3,13 @@ ## Required Software - A browser (you are probably using one right now!). -- Archipelago from the [Archipelago Releases Page](https://github.com/ArchipelagoMW/Archipelago/releases). ## Playing the game Open the Yacht Dice website. There are two options: -- Download the latest release from [Yacht Dice Release](https://github.com/spinerak/ArchipelagoYachtDice/releases/latest) and unzip the Website.zip. Then open player.html in your browser. -- Cruise over to the [Yacht Dice website](https://yacht-dice-ap.netlify.app/). This also works on mobile. If the website is not available, use the first option. +- Cruise over to the [Yacht Dice Website](https://yacht-dice-ap.netlify.app/). This is the easiest option. If the website is unavailable, use the next option. +- Download the latest release from [Yacht Dice Release](https://github.com/spinerak/ArchipelagoYachtDice/releases/latest) and unzip the Website.zip. Then open index.html in your browser. -Both options have an "offline" play option to try out the game without having to generate a game first. +Press Archipelago, and after logging in, you are good to go. The website has a built-in client, where you can chat and send commands. +Both options also have a "Solo play" mode to try out the game without having to generate a game first. -## Play with Archipelago - -- Create your yaml file via the [Yacht Dice Player Options Page](../player-options). -- After generating, open the Yacht Dice website. After the tutoroll, fill in the room information. -- After logging in, you are good to go. The website has a built-in client, where you can chat and send commands. - -For more information on yaml files, generating Archipelago games, and connecting to servers, please see the [Basic Multiworld Setup Guide](/tutorial/Archipelago/setup/en). +For more information on generating Archipelago games and connecting to servers, please see the [Basic Multiworld Setup Guide](/tutorial/Archipelago/setup/en). \ No newline at end of file diff --git a/worlds/yugioh06/__init__.py b/worlds/yugioh06/__init__.py index a39b52cd09d5..9070683f33d5 100644 --- a/worlds/yugioh06/__init__.py +++ b/worlds/yugioh06/__init__.py @@ -1,6 +1,6 @@ import os import pkgutil -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Set import settings from BaseClasses import Entrance, Item, ItemClassification, Location, MultiWorld, Region, Tutorial @@ -17,12 +17,14 @@ draft_opponents, excluded_items, item_to_index, - tier_1_opponents, useful, + tier_1_opponents, + tier_2_opponents, + tier_3_opponents, + tier_4_opponents, + tier_5_opponents, ) -from .items import ( - challenges as challenges, -) +from .items import challenges as challenges from .locations import ( Bonuses, Campaign_Opponents, @@ -50,7 +52,7 @@ class Yugioh06Web(WebWorld): theme = "stone" setup = Tutorial( - "Multiworld Setup Tutorial", + "Multiworld Setup Guide", "A guide to setting up Yu-Gi-Oh! - Ultimate Masters Edition - World Championship Tournament 2006 " "for Archipelago on your computer.", "English", @@ -109,9 +111,17 @@ class Yugioh06World(World): for k, v in Required_Cards.items(): location_name_to_id[k] = v + start_id - item_name_groups = { - "Core Booster": core_booster, - "Campaign Boss Beaten": ["Tier 1 Beaten", "Tier 2 Beaten", "Tier 3 Beaten", "Tier 4 Beaten", "Tier 5 Beaten"], + item_name_groups: Dict[str, Set[str]] = { + "Core Booster": set(core_booster), + "Campaign Boss Beaten": {"Tier 1 Beaten", "Tier 2 Beaten", "Tier 3 Beaten", "Tier 4 Beaten", "Tier 5 Beaten"}, + "Challenge": set(challenges), + "Tier 1 Opponent": set(tier_1_opponents), + "Tier 2 Opponent": set(tier_2_opponents), + "Tier 3 Opponent": set(tier_3_opponents), + "Tier 4 Opponent": set(tier_4_opponents), + "Tier 5 Opponent": set(tier_5_opponents), + "Campaign Opponent": set(tier_1_opponents + tier_2_opponents + tier_3_opponents + + tier_4_opponents + tier_5_opponents) } removed_challenges: List[str] diff --git a/worlds/yugioh06/items.py b/worlds/yugioh06/items.py index f0f877fd9f7b..0cfcf32992f2 100644 --- a/worlds/yugioh06/items.py +++ b/worlds/yugioh06/items.py @@ -183,6 +183,35 @@ "Campaign Tier 1 Column 5", ] +tier_2_opponents: List[str] = [ + "Campaign Tier 2 Column 1", + "Campaign Tier 2 Column 2", + "Campaign Tier 2 Column 3", + "Campaign Tier 2 Column 4", + "Campaign Tier 2 Column 5", +] + +tier_3_opponents: List[str] = [ + "Campaign Tier 3 Column 1", + "Campaign Tier 3 Column 2", + "Campaign Tier 3 Column 3", + "Campaign Tier 3 Column 4", + "Campaign Tier 3 Column 5", +] + +tier_4_opponents: List[str] = [ + "Campaign Tier 4 Column 1", + "Campaign Tier 4 Column 2", + "Campaign Tier 4 Column 3", + "Campaign Tier 4 Column 4", + "Campaign Tier 4 Column 5", +] + +tier_5_opponents: List[str] = [ + "Campaign Tier 5 Column 1", + "Campaign Tier 5 Column 2", +] + Banlist_Items: List[str] = [ "No Banlist", "Banlist September 2003", diff --git a/worlds/zillion/__init__.py b/worlds/zillion/__init__.py index d5e86bb33292..5a4e2bb48f18 100644 --- a/worlds/zillion/__init__.py +++ b/worlds/zillion/__init__.py @@ -3,11 +3,12 @@ import functools import settings import threading -import typing -from typing import Any, Dict, List, Set, Tuple, Optional, Union +from typing import Any, ClassVar import os import logging +from typing_extensions import override + from BaseClasses import ItemClassification, LocationProgressType, \ MultiWorld, Item, CollectionState, Entrance, Tutorial @@ -47,7 +48,7 @@ class RomStart(str): """ rom_file: RomFile = RomFile(RomFile.copy_to) - rom_start: typing.Union[RomStart, bool] = RomStart("retroarch") + rom_start: RomStart | bool = RomStart("retroarch") class ZillionWebWorld(WebWorld): @@ -76,7 +77,7 @@ class ZillionWorld(World): options_dataclass = ZillionOptions options: ZillionOptions # type: ignore - settings: typing.ClassVar[ZillionSettings] # type: ignore + settings: ClassVar[ZillionSettings] # type: ignore # these type: ignore are because of this issue: https://github.com/python/typing/discussions/1486 topology_present = True # indicate if world type has any meaningful layout/pathing @@ -89,14 +90,14 @@ class ZillionWorld(World): class LogStreamInterface: logger: logging.Logger - buffer: List[str] + buffer: list[str] def __init__(self, logger: logging.Logger) -> None: self.logger = logger self.buffer = [] def write(self, msg: str) -> None: - if msg.endswith('\n'): + if msg.endswith("\n"): self.buffer.append(msg[:-1]) self.logger.debug("".join(self.buffer)) self.buffer = [] @@ -108,21 +109,21 @@ def flush(self) -> None: lsi: LogStreamInterface - id_to_zz_item: Optional[Dict[int, ZzItem]] = None + id_to_zz_item: dict[int, ZzItem] | None = None zz_system: System - _item_counts: "Counter[str]" = Counter() + _item_counts: Counter[str] = Counter() """ These are the items counts that will be in the game, which might be different from the item counts the player asked for in options (if the player asked for something invalid). """ - my_locations: List[ZillionLocation] = [] + my_locations: list[ZillionLocation] = [] """ This is kind of a cache to avoid iterating through all the multiworld locations in logic. """ slot_data_ready: threading.Event """ This event is set in `generate_output` when the data is ready for `fill_slot_data` """ - logic_cache: Union[ZillionLogicCache, None] = None + logic_cache: ZillionLogicCache | None = None - def __init__(self, world: MultiWorld, player: int): + def __init__(self, world: MultiWorld, player: int) -> None: super().__init__(world, player) self.logger = logging.getLogger("Zillion") self.lsi = ZillionWorld.LogStreamInterface(self.logger) @@ -133,6 +134,7 @@ def _make_item_maps(self, start_char: Chars) -> None: _id_to_name, _id_to_zz_id, id_to_zz_item = make_id_to_others(start_char) self.id_to_zz_item = id_to_zz_item + @override def generate_early(self) -> None: zz_op, item_counts = validate(self.options) @@ -150,12 +152,13 @@ def generate_early(self) -> None: # just in case the options changed anything (I don't think they do) assert self.zz_system.randomizer, "init failed" for zz_name in self.zz_system.randomizer.locations: - if zz_name != 'main': + if zz_name != "main": assert self.zz_system.randomizer.loc_name_2_pretty[zz_name] in self.location_name_to_id, \ f"{self.zz_system.randomizer.loc_name_2_pretty[zz_name]} not in location map" self._make_item_maps(zz_op.start_char) + @override def create_regions(self) -> None: assert self.zz_system.randomizer, "generate_early hasn't been called" assert self.id_to_zz_item, "generate_early hasn't been called" @@ -177,23 +180,23 @@ def create_regions(self) -> None: zz_loc.req.gun = 1 assert len(self.zz_system.randomizer.get_locations(Req(gun=1, jump=1))) != 0 - start = self.zz_system.randomizer.regions['start'] + start = self.zz_system.randomizer.regions["start"] - all: Dict[str, ZillionRegion] = {} + all_regions: dict[str, ZillionRegion] = {} for here_zz_name, zz_r in self.zz_system.randomizer.regions.items(): here_name = "Menu" if here_zz_name == "start" else zz_reg_name_to_reg_name(here_zz_name) - all[here_name] = ZillionRegion(zz_r, here_name, here_name, p, w) - self.multiworld.regions.append(all[here_name]) + all_regions[here_name] = ZillionRegion(zz_r, here_name, here_name, p, w) + self.multiworld.regions.append(all_regions[here_name]) limited_skill = Req(gun=3, jump=3, skill=self.zz_system.randomizer.options.skill, hp=940, red=1, floppy=126) queue = deque([start]) - done: Set[str] = set() + done: set[str] = set() while len(queue): zz_here = queue.popleft() here_name = "Menu" if zz_here.name == "start" else zz_reg_name_to_reg_name(zz_here.name) if here_name in done: continue - here = all[here_name] + here = all_regions[here_name] for zz_loc in zz_here.locations: # if local gun reqs didn't place "keyword" item @@ -217,15 +220,16 @@ def access_rule_wrapped(zz_loc_local: ZzLocation, self.my_locations.append(loc) for zz_dest in zz_here.connections.keys(): - dest_name = "Menu" if zz_dest.name == 'start' else zz_reg_name_to_reg_name(zz_dest.name) - dest = all[dest_name] - exit = Entrance(p, f"{here_name} to {dest_name}", here) - here.exits.append(exit) - exit.connect(dest) + dest_name = "Menu" if zz_dest.name == "start" else zz_reg_name_to_reg_name(zz_dest.name) + dest = all_regions[dest_name] + exit_ = Entrance(p, f"{here_name} to {dest_name}", here) + here.exits.append(exit_) + exit_.connect(dest) queue.append(zz_dest) done.add(here.name) + @override def create_items(self) -> None: if not self.id_to_zz_item: self._make_item_maps("JJ") @@ -249,14 +253,11 @@ def create_items(self) -> None: self.logger.debug(f"Zillion Items: {item_name} 1") self.multiworld.itempool.append(self.create_item(item_name)) - def set_rules(self) -> None: - # logic for this game is in create_regions - pass - + @override def generate_basic(self) -> None: assert self.zz_system.randomizer, "generate_early hasn't been called" # main location name is an alias - main_loc_name = self.zz_system.randomizer.loc_name_2_pretty[self.zz_system.randomizer.locations['main'].name] + main_loc_name = self.zz_system.randomizer.loc_name_2_pretty[self.zz_system.randomizer.locations["main"].name] self.multiworld.get_location(main_loc_name, self.player)\ .place_locked_item(self.create_item("Win")) @@ -264,22 +265,18 @@ def generate_basic(self) -> None: lambda state: state.has("Win", self.player) @staticmethod - def stage_generate_basic(multiworld: MultiWorld, *args: Any) -> None: + def stage_generate_basic(multiworld: MultiWorld, *args: Any) -> None: # noqa: ANN401 # item link pools are about to be created in main # JJ can't be an item link unless all the players share the same start_char # (The reason for this is that the JJ ZillionItem will have a different ZzItem depending # on whether the start char is Apple or Champ, and the logic depends on that ZzItem.) for group in multiworld.groups.values(): - # TODO: remove asserts on group when we can specify which members of TypedDict are optional - assert "game" in group - if group["game"] == "Zillion": - assert "item_pool" in group + if group["game"] == "Zillion" and "item_pool" in group: item_pool = group["item_pool"] to_stay: Chars = "JJ" if "JJ" in item_pool: - assert "players" in group - group_players = group["players"] - players_start_chars: List[Tuple[int, Chars]] = [] + group["players"] = group_players = set(group["players"]) + players_start_chars: list[tuple[int, Chars]] = [] for player in group_players: z_world = multiworld.worlds[player] assert isinstance(z_world, ZillionWorld) @@ -291,17 +288,17 @@ def stage_generate_basic(multiworld: MultiWorld, *args: Any) -> None: elif start_char_counts["Champ"] > start_char_counts["Apple"]: to_stay = "Champ" else: # equal - choices: Tuple[Chars, ...] = ("Apple", "Champ") + choices: tuple[Chars, ...] = ("Apple", "Champ") to_stay = multiworld.random.choice(choices) for p, sc in players_start_chars: if sc != to_stay: group_players.remove(p) - assert "world" in group group_world = group["world"] assert isinstance(group_world, ZillionWorld) group_world._make_item_maps(to_stay) + @override def post_fill(self) -> None: """Optional Method that is called after regular fill. Can be used to do adjustments before output generation. This happens before progression balancing, so the items may not be in their final locations yet.""" @@ -317,10 +314,10 @@ def finalize_item_locations(self) -> GenData: assert self.zz_system.randomizer, "generate_early hasn't been called" - # debug_zz_loc_ids: Dict[str, int] = {} + # debug_zz_loc_ids: dict[str, int] = {} empty = zz_items[4] multi_item = empty # a different patcher method differentiates empty from ap multi item - multi_items: Dict[str, Tuple[str, str]] = {} # zz_loc_name to (item_name, player_name) + multi_items: dict[str, tuple[str, str]] = {} # zz_loc_name to (item_name, player_name) for z_loc in self.multiworld.get_locations(self.player): assert isinstance(z_loc, ZillionLocation) # debug_zz_loc_ids[z_loc.zz_loc.name] = id(z_loc.zz_loc) @@ -343,7 +340,7 @@ def finalize_item_locations(self) -> GenData: # print(id_) # print("size:", len(debug_zz_loc_ids)) - # debug_loc_to_id: Dict[str, int] = {} + # debug_loc_to_id: dict[str, int] = {} # regions = self.zz_randomizer.regions # for region in regions.values(): # for loc in region.locations: @@ -358,10 +355,11 @@ def finalize_item_locations(self) -> GenData: f"in world {self.player} didn't get an item" ) - game_id = self.multiworld.player_name[self.player].encode() + b'\x00' + self.multiworld.seed_name[-6:].encode() + game_id = self.multiworld.player_name[self.player].encode() + b"\x00" + self.multiworld.seed_name[-6:].encode() return GenData(multi_items, self.zz_system.get_game(), game_id) + @override def generate_output(self, output_directory: str) -> None: """This method gets called from a threadpool, do not use multiworld.random here. If you need any last-second randomization, use self.random instead.""" @@ -383,6 +381,7 @@ def generate_output(self, output_directory: str) -> None: self.logger.debug(f"Zillion player {self.player} finished generate_output") + @override def fill_slot_data(self) -> ZillionSlotInfo: # json of WebHostLib.models.Slot """Fill in the `slot_data` field in the `Connected` network package. This is a way the generator can give custom data to the client. @@ -400,6 +399,7 @@ def fill_slot_data(self) -> ZillionSlotInfo: # json of WebHostLib.models.Slot # end of ordered Main.py calls + @override def create_item(self, name: str) -> Item: """Create an item for this world type and player. Warning: this may be called with self.multiworld = None, for example by MultiServer""" @@ -420,6 +420,7 @@ def create_item(self, name: str) -> Item: z_item = ZillionItem(name, classification, item_id, self.player, zz_item) return z_item + @override def get_filler_item_name(self) -> str: """Called when the item pool needs to be filled with additional items to match location count.""" return "Empty" diff --git a/worlds/zillion/client.py b/worlds/zillion/client.py index 09d0565e1c5e..d629df583a81 100644 --- a/worlds/zillion/client.py +++ b/worlds/zillion/client.py @@ -3,7 +3,7 @@ import io import pkgutil import platform -from typing import Any, ClassVar, Coroutine, Dict, List, Optional, Protocol, Tuple, cast +from typing import Any, ClassVar, Coroutine, Protocol, cast from CommonClient import CommonContext, server_loop, gui_enabled, \ ClientCommandProcessor, logger, get_base_parser @@ -11,6 +11,7 @@ from Utils import async_start import colorama +from typing_extensions import override from zilliandomizer.zri.memory import Memory, RescueInfo from zilliandomizer.zri import events @@ -35,11 +36,11 @@ def _cmd_map(self) -> None: class ToggleCallback(Protocol): - def __call__(self) -> None: ... + def __call__(self) -> object: ... class SetRoomCallback(Protocol): - def __call__(self, rooms: List[List[int]]) -> None: ... + def __call__(self, rooms: list[list[int]]) -> object: ... class ZillionContext(CommonContext): @@ -47,7 +48,7 @@ class ZillionContext(CommonContext): command_processor = ZillionCommandProcessor items_handling = 1 # receive items from other players - known_name: Optional[str] + known_name: str | None """ This is almost the same as `auth` except `auth` is reset to `None` when server disconnects, and this isn't. """ from_game: "asyncio.Queue[events.EventFromGame]" @@ -56,11 +57,11 @@ class ZillionContext(CommonContext): """ local checks watched by server """ next_item: int """ index in `items_received` """ - ap_id_to_name: Dict[int, str] - ap_id_to_zz_id: Dict[int, int] + ap_id_to_name: dict[int, str] + ap_id_to_zz_id: dict[int, int] start_char: Chars = "JJ" - rescues: Dict[int, RescueInfo] = {} - loc_mem_to_id: Dict[int, int] = {} + rescues: dict[int, RescueInfo] = {} + loc_mem_to_id: dict[int, int] = {} got_room_info: asyncio.Event """ flag for connected to server """ got_slot_data: asyncio.Event @@ -119,22 +120,22 @@ def reset_game_state(self) -> None: self.finished_game = False self.items_received.clear() - # override - def on_deathlink(self, data: Dict[str, Any]) -> None: + @override + def on_deathlink(self, data: dict[str, Any]) -> None: self.to_game.put_nowait(events.DeathEventToGame()) return super().on_deathlink(data) - # override + @override async def server_auth(self, password_requested: bool = False) -> None: if password_requested and not self.password: await super().server_auth(password_requested) if not self.auth: - logger.info('waiting for connection to game...') + logger.info("waiting for connection to game...") return logger.info("logging in to server...") await self.send_connect() - # override + @override def run_gui(self) -> None: from kvui import GameManager from kivy.core.text import Label as CoreLabel @@ -154,10 +155,10 @@ class MapPanel(Widget): MAP_WIDTH: ClassVar[int] = 281 map_background: CoreImage - _number_textures: List[Texture] = [] - rooms: List[List[int]] = [] + _number_textures: list[Texture] = [] + rooms: list[list[int]] = [] - def __init__(self, **kwargs: Any) -> None: + def __init__(self, **kwargs: Any) -> None: # noqa: ANN401 super().__init__(**kwargs) FILE_NAME = "empty-zillion-map-row-col-labels-281.png" @@ -183,7 +184,7 @@ def _make_numbers(self) -> None: label.refresh() self._number_textures.append(label.texture) - def update_map(self, *args: Any) -> None: + def update_map(self, *args: Any) -> None: # noqa: ANN401 self.canvas.clear() with self.canvas: @@ -203,6 +204,7 @@ def update_map(self, *args: Any) -> None: num_texture = self._number_textures[num] Rectangle(texture=num_texture, size=num_texture.size, pos=pos) + @override def build(self) -> Layout: container = super().build() self.map_widget = ZillionManager.MapPanel(size_hint_x=None, width=ZillionManager.MapPanel.MAP_WIDTH) @@ -216,17 +218,18 @@ def toggle_map_width(self) -> None: self.map_widget.width = 0 self.container.do_layout() - def set_rooms(self, rooms: List[List[int]]) -> None: + def set_rooms(self, rooms: list[list[int]]) -> None: self.map_widget.rooms = rooms self.map_widget.update_map() self.ui = ZillionManager(self) - self.ui_toggle_map = lambda: self.ui.toggle_map_width() - self.ui_set_rooms = lambda rooms: self.ui.set_rooms(rooms) + self.ui_toggle_map = lambda: isinstance(self.ui, ZillionManager) and self.ui.toggle_map_width() + self.ui_set_rooms = lambda rooms: isinstance(self.ui, ZillionManager) and self.ui.set_rooms(rooms) run_co: Coroutine[Any, Any, None] = self.ui.async_run() self.ui_task = asyncio.create_task(run_co, name="UI") - def on_package(self, cmd: str, args: Dict[str, Any]) -> None: + @override + def on_package(self, cmd: str, args: dict[str, Any]) -> None: self.room_item_numbers_to_ui() if cmd == "Connected": logger.info("logged in to Archipelago server") @@ -238,7 +241,7 @@ def on_package(self, cmd: str, args: Dict[str, Any]) -> None: if "start_char" not in slot_data: logger.warning("invalid Zillion `Connected` packet, `slot_data` missing `start_char`") return - self.start_char = slot_data['start_char'] + self.start_char = slot_data["start_char"] if self.start_char not in {"Apple", "Champ", "JJ"}: logger.warning("invalid Zillion `Connected` packet, " f"`slot_data` `start_char` has invalid value: {self.start_char}") @@ -259,7 +262,7 @@ def on_package(self, cmd: str, args: Dict[str, Any]) -> None: self.rescues[0 if rescue_id == "0" else 1] = ri if "loc_mem_to_id" not in slot_data: - logger.warn("invalid Zillion `Connected` packet, `slot_data` missing `loc_mem_to_id`") + logger.warning("invalid Zillion `Connected` packet, `slot_data` missing `loc_mem_to_id`") return loc_mem_to_id = slot_data["loc_mem_to_id"] self.loc_mem_to_id = {} @@ -286,7 +289,7 @@ def on_package(self, cmd: str, args: Dict[str, Any]) -> None: if "keys" not in args: logger.warning(f"invalid Retrieved packet to ZillionClient: {args}") return - keys = cast(Dict[str, Optional[str]], args["keys"]) + keys = cast(dict[str, str | None], args["keys"]) doors_b64 = keys.get(f"zillion-{self.auth}-doors", None) if doors_b64: logger.info("received door data from server") @@ -321,9 +324,9 @@ def process_from_game_queue(self) -> None: if server_id in self.missing_locations: self.ap_local_count += 1 n_locations = len(self.missing_locations) + len(self.checked_locations) - 1 # -1 to ignore win - logger.info(f'New Check: {loc_name} ({self.ap_local_count}/{n_locations})') + logger.info(f"New Check: {loc_name} ({self.ap_local_count}/{n_locations})") async_start(self.send_msgs([ - {"cmd": 'LocationChecks', "locations": [server_id]} + {"cmd": "LocationChecks", "locations": [server_id]} ])) else: # This will happen a lot in Zillion, @@ -334,7 +337,7 @@ def process_from_game_queue(self) -> None: elif isinstance(event_from_game, events.WinEventFromGame): if not self.finished_game: async_start(self.send_msgs([ - {"cmd": 'LocationChecks', "locations": [loc_name_to_id["J-6 bottom far left"]]}, + {"cmd": "LocationChecks", "locations": [loc_name_to_id["J-6 bottom far left"]]}, {"cmd": "StatusUpdate", "status": ClientStatus.CLIENT_GOAL} ])) self.finished_game = True @@ -362,24 +365,24 @@ def process_items_received(self) -> None: ap_id = self.items_received[index].item from_name = self.player_names[self.items_received[index].player] # TODO: colors in this text, like sni client? - logger.info(f'received {self.ap_id_to_name[ap_id]} from {from_name}') + logger.info(f"received {self.ap_id_to_name[ap_id]} from {from_name}") self.to_game.put_nowait( events.ItemEventToGame(zz_item_ids) ) self.next_item = len(self.items_received) -def name_seed_from_ram(data: bytes) -> Tuple[str, str]: +def name_seed_from_ram(data: bytes) -> tuple[str, str]: """ returns player name, and end of seed string """ if len(data) == 0: # no connection to game return "", "xxx" - null_index = data.find(b'\x00') + null_index = data.find(b"\x00") if null_index == -1: logger.warning(f"invalid game id in rom {repr(data)}") null_index = len(data) name = data[:null_index].decode() - null_index_2 = data.find(b'\x00', null_index + 1) + null_index_2 = data.find(b"\x00", null_index + 1) if null_index_2 == -1: null_index_2 = len(data) seed_name = data[null_index + 1:null_index_2].decode() @@ -479,8 +482,8 @@ def log_no_spam(msg: str) -> None: async def main() -> None: parser = get_base_parser() - parser.add_argument('diff_file', default="", type=str, nargs="?", - help='Path to a .apzl Archipelago Binary Patch file') + parser.add_argument("diff_file", default="", type=str, nargs="?", + help="Path to a .apzl Archipelago Binary Patch file") # SNI parser.add_argument('--loglevel', default='info', choices=['debug', 'info', 'warning', 'error', 'critical']) args = parser.parse_args() print(args) diff --git a/worlds/zillion/gen_data.py b/worlds/zillion/gen_data.py index 13cbee9ced20..214073396153 100644 --- a/worlds/zillion/gen_data.py +++ b/worlds/zillion/gen_data.py @@ -1,6 +1,5 @@ from dataclasses import dataclass import json -from typing import Dict, Tuple from zilliandomizer.game import Game as ZzGame @@ -9,7 +8,7 @@ class GenData: """ data passed from generation to patcher """ - multi_items: Dict[str, Tuple[str, str]] + multi_items: dict[str, tuple[str, str]] """ zz_loc_name to (item_name, player_name) """ zz_game: ZzGame game_id: bytes diff --git a/worlds/zillion/id_maps.py b/worlds/zillion/id_maps.py index 32d71fc79b30..25762f99cd6b 100644 --- a/worlds/zillion/id_maps.py +++ b/worlds/zillion/id_maps.py @@ -1,5 +1,6 @@ from collections import defaultdict -from typing import Dict, Iterable, Mapping, Tuple, TypedDict +from collections.abc import Iterable, Mapping +from typing import TypedDict from zilliandomizer.logic_components.items import ( Item as ZzItem, @@ -40,13 +41,13 @@ _zz_empty = zz_item_name_to_zz_item["empty"] -def make_id_to_others(start_char: Chars) -> Tuple[ - Dict[int, str], Dict[int, int], Dict[int, ZzItem] +def make_id_to_others(start_char: Chars) -> tuple[ + dict[int, str], dict[int, int], dict[int, ZzItem] ]: """ returns id_to_name, id_to_zz_id, id_to_zz_item """ - id_to_name: Dict[int, str] = {} - id_to_zz_id: Dict[int, int] = {} - id_to_zz_item: Dict[int, ZzItem] = {} + id_to_name: dict[int, str] = {} + id_to_zz_id: dict[int, int] = {} + id_to_zz_item: dict[int, ZzItem] = {} if start_char == "JJ": name_to_zz_item = { @@ -91,14 +92,14 @@ def make_room_name(row: int, col: int) -> str: return f"{chr(ord('A') + row - 1)}-{col + 1}" -loc_name_to_id: Dict[str, int] = { +loc_name_to_id: dict[str, int] = { name: id_ + base_id for name, id_ in pretty_loc_name_to_id.items() } def zz_reg_name_to_reg_name(zz_reg_name: str) -> str: - if zz_reg_name[0] == 'r' and zz_reg_name[3] == 'c': + if zz_reg_name[0] == "r" and zz_reg_name[3] == "c": row, col = parse_reg_name(zz_reg_name) end = zz_reg_name[5:] return f"{make_room_name(row, col)} {end.upper()}" @@ -113,17 +114,17 @@ class ClientRescue(TypedDict): class ZillionSlotInfo(TypedDict): start_char: Chars - rescues: Dict[str, ClientRescue] - loc_mem_to_id: Dict[int, int] + rescues: dict[str, ClientRescue] + loc_mem_to_id: dict[int, int] """ memory location of canister to Archipelago location id number """ def get_slot_info(regions: Iterable[RegionData], start_char: Chars, loc_name_to_pretty: Mapping[str, str]) -> ZillionSlotInfo: - items_placed_in_map_index: Dict[int, int] = defaultdict(int) - rescue_locations: Dict[int, RescueInfo] = {} - loc_memory_to_loc_id: Dict[int, int] = {} + items_placed_in_map_index: dict[int, int] = defaultdict(int) + rescue_locations: dict[int, RescueInfo] = {} + loc_memory_to_loc_id: dict[int, int] = {} for region in regions: for loc in region.locations: assert loc.item, ("There should be an item placed in every location before " @@ -142,7 +143,7 @@ def get_slot_info(regions: Iterable[RegionData], loc_memory_to_loc_id[loc_memory] = pretty_loc_name_to_id[loc_name_to_pretty[loc.name]] items_placed_in_map_index[map_index] += 1 - rescues: Dict[str, ClientRescue] = {} + rescues: dict[str, ClientRescue] = {} for i in (0, 1): if i in rescue_locations: ri = rescue_locations[i] diff --git a/worlds/zillion/logic.py b/worlds/zillion/logic.py index a14910a200e5..f3d1814a9e9b 100644 --- a/worlds/zillion/logic.py +++ b/worlds/zillion/logic.py @@ -1,4 +1,5 @@ -from typing import Dict, FrozenSet, Mapping, Tuple, List, Counter as _Counter +from collections import Counter +from collections.abc import Mapping from BaseClasses import CollectionState @@ -35,7 +36,7 @@ def set_randomizer_locs(cs: CollectionState, p: int, zz_r: Randomizer) -> int: return _hash -def item_counts(cs: CollectionState, p: int) -> Tuple[Tuple[str, int], ...]: +def item_counts(cs: CollectionState, p: int) -> tuple[tuple[str, int], ...]: """ the zilliandomizer items that player p has collected @@ -44,11 +45,11 @@ def item_counts(cs: CollectionState, p: int) -> Tuple[Tuple[str, int], ...]: return tuple((item_name, cs.count(item_name, p)) for item_name in item_name_to_id) -_cache_miss: Tuple[None, FrozenSet[Location]] = (None, frozenset()) +_cache_miss: tuple[None, frozenset[Location]] = (None, frozenset()) class ZillionLogicCache: - _cache: Dict[int, Tuple[_Counter[str], FrozenSet[Location]]] + _cache: dict[int, tuple[Counter[str], frozenset[Location]]] """ `{ hash: (counter_from_prog_items, accessible_zz_locations) }` """ _player: int _zz_r: Randomizer @@ -60,7 +61,7 @@ def __init__(self, player: int, zz_r: Randomizer, id_to_zz_item: Mapping[int, It self._zz_r = zz_r self._id_to_zz_item = id_to_zz_item - def cs_to_zz_locs(self, cs: CollectionState) -> FrozenSet[Location]: + def cs_to_zz_locs(self, cs: CollectionState) -> frozenset[Location]: """ given an Archipelago `CollectionState`, returns frozenset of accessible zilliandomizer locations @@ -76,7 +77,7 @@ def cs_to_zz_locs(self, cs: CollectionState) -> FrozenSet[Location]: return locs # print("cache miss") - have_items: List[Item] = [] + have_items: list[Item] = [] for name, count in counts: have_items.extend([self._id_to_zz_item[item_name_to_id[name]]] * count) # have_req is the result of converting AP CollectionState to zilliandomizer collection state diff --git a/worlds/zillion/options.py b/worlds/zillion/options.py index 5de0b65c82f0..22a698472265 100644 --- a/worlds/zillion/options.py +++ b/worlds/zillion/options.py @@ -1,7 +1,6 @@ from collections import Counter from dataclasses import dataclass -from typing import ClassVar, Dict, Literal, Tuple -from typing_extensions import TypeGuard # remove when Python >= 3.10 +from typing import ClassVar, Literal, TypeGuard from Options import Choice, DefaultOnToggle, NamedRange, OptionGroup, PerGameCommonOptions, Range, Removed, Toggle @@ -108,7 +107,7 @@ class ZillionStartChar(Choice): display_name = "start character" default = "random" - _name_capitalization: ClassVar[Dict[int, Chars]] = { + _name_capitalization: ClassVar[dict[int, Chars]] = { option_jj: "JJ", option_apple: "Apple", option_champ: "Champ", @@ -233,6 +232,7 @@ class ZillionSkill(Range): range_start = 0 range_end = 5 default = 2 + display_name = "skill" class ZillionStartingCards(NamedRange): @@ -263,7 +263,7 @@ class ZillionMapGen(Choice): option_full = 2 default = 0 - def zz_value(self) -> Literal['none', 'rooms', 'full']: + def zz_value(self) -> Literal["none", "rooms", "full"]: if self.value == ZillionMapGen.option_none: return "none" if self.value == ZillionMapGen.option_rooms: @@ -305,7 +305,7 @@ class ZillionOptions(PerGameCommonOptions): ] -def convert_item_counts(ic: "Counter[str]") -> ZzItemCounts: +def convert_item_counts(ic: Counter[str]) -> ZzItemCounts: tr: ZzItemCounts = { ID.card: ic["ID Card"], ID.red: ic["Red ID Card"], @@ -319,7 +319,7 @@ def convert_item_counts(ic: "Counter[str]") -> ZzItemCounts: return tr -def validate(options: ZillionOptions) -> "Tuple[ZzOptions, Counter[str]]": +def validate(options: ZillionOptions) -> tuple[ZzOptions, Counter[str]]: """ adjusts options to make game completion possible diff --git a/worlds/zillion/patch.py b/worlds/zillion/patch.py index 6bc6d04dd663..0eee3315f4a1 100644 --- a/worlds/zillion/patch.py +++ b/worlds/zillion/patch.py @@ -1,5 +1,5 @@ import os -from typing import Any, BinaryIO, Optional, cast +from typing import BinaryIO import zipfile from typing_extensions import override @@ -11,11 +11,11 @@ from .gen_data import GenData -USHASH = 'd4bf9e7bcf9a48da53785d2ae7bc4270' +US_HASH = "d4bf9e7bcf9a48da53785d2ae7bc4270" class ZillionPatch(APAutoPatchInterface): - hash = USHASH + hash = US_HASH game = "Zillion" patch_file_ending = ".apzl" result_file_ending = ".sms" @@ -23,8 +23,14 @@ class ZillionPatch(APAutoPatchInterface): gen_data_str: str """ JSON encoded """ - def __init__(self, *args: Any, gen_data_str: str = "", **kwargs: Any) -> None: - super().__init__(*args, **kwargs) + def __init__(self, + path: str | None = None, + player: int | None = None, + player_name: str = "", + server: str = "", + *, + gen_data_str: str = "") -> None: + super().__init__(path=path, player=player, player_name=player_name, server=server) self.gen_data_str = gen_data_str @classmethod @@ -44,15 +50,17 @@ def read_contents(self, opened_zipfile: zipfile.ZipFile) -> None: super().read_contents(opened_zipfile) self.gen_data_str = opened_zipfile.read("gen_data.json").decode() + @override def patch(self, target: str) -> None: self.read() write_rom_from_gen_data(self.gen_data_str, target) -def get_base_rom_path(file_name: Optional[str] = None) -> str: - options = Utils.get_options() +def get_base_rom_path(file_name: str | None = None) -> str: + from . import ZillionSettings, ZillionWorld + settings: ZillionSettings = ZillionWorld.settings if not file_name: - file_name = cast(str, options["zillion_options"]["rom_file"]) + file_name = settings.rom_file if not os.path.exists(file_name): file_name = Utils.user_path(file_name) return file_name diff --git a/worlds/zillion/region.py b/worlds/zillion/region.py index cf5aa6588950..40565f008263 100644 --- a/worlds/zillion/region.py +++ b/worlds/zillion/region.py @@ -1,9 +1,11 @@ -from typing import Optional -from BaseClasses import MultiWorld, Region, Location, Item, CollectionState +from typing_extensions import override + from zilliandomizer.logic_components.regions import Region as ZzRegion from zilliandomizer.logic_components.locations import Location as ZzLocation from zilliandomizer.logic_components.items import RESCUE +from BaseClasses import MultiWorld, Region, Location, Item, CollectionState + from .id_maps import loc_name_to_id from .item import ZillionItem @@ -28,12 +30,12 @@ def __init__(self, zz_loc: ZzLocation, player: int, name: str, - parent: Optional[Region] = None) -> None: + parent: Region | None = None) -> None: loc_id = loc_name_to_id[name] super().__init__(player, name, loc_id, parent) self.zz_loc = zz_loc - # override + @override def can_fill(self, state: CollectionState, item: Item, check_access: bool = True) -> bool: saved_gun_req = -1 if isinstance(item, ZillionItem) \ diff --git a/worlds/zillion/test/TestReproducibleRandom.py b/worlds/zillion/test/TestReproducibleRandom.py index a92fae240709..352165449a8b 100644 --- a/worlds/zillion/test/TestReproducibleRandom.py +++ b/worlds/zillion/test/TestReproducibleRandom.py @@ -1,4 +1,3 @@ -from typing import cast from . import ZillionTestBase from .. import ZillionWorld @@ -9,7 +8,8 @@ class SeedTest(ZillionTestBase): def test_reproduce_seed(self) -> None: self.world_setup(42) - z_world = cast(ZillionWorld, self.multiworld.worlds[1]) + z_world = self.multiworld.worlds[1] + assert isinstance(z_world, ZillionWorld) r = z_world.zz_system.randomizer assert r randomized_requirements_first = tuple( @@ -18,7 +18,8 @@ def test_reproduce_seed(self) -> None: ) self.world_setup(42) - z_world = cast(ZillionWorld, self.multiworld.worlds[1]) + z_world = self.multiworld.worlds[1] + assert isinstance(z_world, ZillionWorld) r = z_world.zz_system.randomizer assert r randomized_requirements_second = tuple( diff --git a/worlds/zillion/test/__init__.py b/worlds/zillion/test/__init__.py index fe62bae34c9e..a669442364fe 100644 --- a/worlds/zillion/test/__init__.py +++ b/worlds/zillion/test/__init__.py @@ -1,4 +1,3 @@ -from typing import cast from test.bases import WorldTestBase from .. import ZillionWorld @@ -13,8 +12,9 @@ def ensure_gun_3_requirement(self) -> None: This makes sure that gun 3 is required by making all the canisters in O-7 (including key word canisters) require gun 3. """ - zz_world = cast(ZillionWorld, self.multiworld.worlds[1]) - assert zz_world.zz_system.randomizer - for zz_loc_name, zz_loc in zz_world.zz_system.randomizer.locations.items(): + z_world = self.multiworld.worlds[1] + assert isinstance(z_world, ZillionWorld) + assert z_world.zz_system.randomizer + for zz_loc_name, zz_loc in z_world.zz_system.randomizer.locations.items(): if zz_loc_name.startswith("r15c6"): zz_loc.req.gun = 3